{"version":3,"sources":["webpack:///./app/components/m/hotspots/index.js","webpack:///./node_modules/global/document.js","webpack:///./node_modules/text-overflow-clamp/index.js","webpack:///min-document (ignored)"],"names":["$","fn","hotspots","args","arguments","length","undefined","reorderSpotsA","component","rowTop","find","rowBottom","getRow","val","row","each","idx","item","spot","lineOffset","parseInt","data","idxRow","marginTop","isNaN","css","lineBottom","Math","max","tipBottom","initSpotA","classes","spotRadius","spotX","spotY","col","ceil","hasCol","hasRow","hasClass","attr","push","left","addClass","join","top","on","initSpotB","clonedSpot","removeClass","animate","setTimeout","hotspotsImage","sliderMain","closest","swiper","updateAutoHeight","txtTip","document","querySelectorAll","textContent","lineClamp","thumbsSlider","querySelector","mainSlider","sliderThumbs","Swiper","spaceBetween","slidesPerView","watchSlidesVisibility","watchSlidesProgress","grabCursor","autoHeight","modules","Thumbs","Pagination","Navigation","thumbs","pagination","el","type","navigation","nextEl","prevEl"],"mappings":";;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoC;AAC4B;AACpB;;AAE5C;AACA;AACA;AACA;AACAA,CAAC,CAACC,EAAE,CAACC,QAAQ,GAAG,YAAqB;EAAA,IAAXC,IAAI,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACjC,IAAI,CAAC,IAAI,EAAE;IACT,OAAO,KAAK;EACd;;EAEA;AACF;AACA;AACA;EACE,MAAMG,aAAa,GAAIC,SAAS,IAAK;IACnC,MAAMC,MAAM,GAAGD,SAAS,CAACE,IAAI,CAAC,eAAe,CAAC;IAC9C,MAAMC,SAAS,GAAGH,SAAS,CAACE,IAAI,CAAC,kBAAkB,CAAC;IAEpD,MAAME,MAAM,GAAIC,GAAG,IAAK;MACtB,IAAIC,GAAG,GAAGD,GAAG,GAAG,CAAC;MAEjB,IAAIA,GAAG,KAAK,CAAC,EAAE;QACbC,GAAG,GAAG,CAAC;MACT,CAAC,MAAM,IAAID,GAAG,KA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a,mBAAO,CAAC,qBAAc;;AAEnC;;AAEA;AACA;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,mBAAO,CAAC,0DAAiB;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,0BAA0B;AAC1B,uBAAuB;AACvB,0BAA0B;AAC1B,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,qB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;;;;;;;;;;;;AChIA,e","file":"hotspots.chunk.js","sourcesContent":["import { icon } from '../../a/icon';\r\nimport { Swiper, Thumbs, Pagination, Navigation } from 'swiper';\r\nimport lineClamp from 'text-overflow-clamp';\r\n\r\n/**\r\n * jQuery M-081 Hotspots Plugin\r\n * 12.06.2019 - wha\r\n */\r\n$.fn.hotspots = function (args = {}) {\r\n if (!this) {\r\n return false;\r\n }\r\n\r\n /**\r\n * Reorder the rows with Gersche Logic\r\n * @param {jquery object} component\r\n */\r\n const reorderSpotsA = (component) => {\r\n const rowTop = component.find('.hotspot--top');\r\n const rowBottom = component.find('.hotspot--bottom');\r\n\r\n const getRow = (val) => {\r\n let row = val % 3;\r\n\r\n if (val === 3) {\r\n row = 1;\r\n } else if (val === 4) {\r\n row = 0;\r\n }\r\n\r\n return row;\r\n };\r\n\r\n rowTop.each((idx, item) => {\r\n const spot = $(item);\r\n const lineOffset = parseInt(spot.data('line-offset'), 10);\r\n const idxRow = getRow(idx);\r\n let marginTop = (idxRow + 1) * 45;\r\n if (!isNaN(lineOffset)) marginTop -= lineOffset;\r\n spot.find('.hotspot__line').css('margin-top', marginTop);\r\n spot.find('.hotspot__tip').css('margin-top', marginTop);\r\n });\r\n rowBottom.each((idx, item) => {\r\n const spot = $(item);\r\n const lineOffset = parseInt(spot.data('line-offset'), 10);\r\n // let val = spot.data('sy');\r\n const idxRow = getRow(idx);\r\n let lineBottom = Math.max(50, 75 - idxRow * 50);\r\n let tipBottom = Math.max(100, 125 - idxRow * 50);\r\n if (!isNaN(lineOffset)) {\r\n lineBottom += lineOffset;\r\n tipBottom += lineOffset;\r\n }\r\n spot.find('.hotspot__line').css('bottom', `-${lineBottom}px`);\r\n spot.find('.hotspot__tip').css('bottom', `-${tipBottom}px`);\r\n });\r\n };\r\n\r\n /**\r\n * Initial Spot A position\r\n * @param {object} spot\r\n * @param {jquery object} component\r\n */\r\n const initSpotA = (spot, component) => {\r\n const classes = [];\r\n const spotRadius = 30;\r\n const spotX = parseInt(spot.data('sx'), 10);\r\n const spotY = parseInt(spot.data('sy'), 10);\r\n let col = Math.ceil(Math.max(1, spotX) / (100 / 3));\r\n let row = Math.ceil(Math.max(1, spotY) / 50);\r\n let hasCol = false;\r\n let hasRow = false;\r\n\r\n // allow to override the row (top/bottom) of a single\r\n // hotspot, by defining the classes (hotspot--top/hotspot--bottom)\r\n // initially within the markup of a spot\r\n if (spot.hasClass('hotspot--top') || spot.hasClass('hotspot--bottom')) {\r\n hasRow = true;\r\n //\r\n if (spot.hasClass('hotspot--top')) {\r\n row = 1;\r\n }\r\n //\r\n if (spot.hasClass('hotspot--bottom')) {\r\n row = 2;\r\n }\r\n }\r\n\r\n // allow to override the col (left/middle/right) of a single\r\n // hotspot, by defining the classes (hotspot--left/hotspot--middle/\r\n // hotspot--right) initially within the markup of a spot\r\n if (spot.hasClass('hotspot--left') || spot.hasClass('hotspot--middle') || spot.hasClass('hotspot--right')) {\r\n hasCol = true;\r\n //\r\n if (spot.hasClass('hotspot--left')) {\r\n col = 1;\r\n }\r\n //\r\n if (spot.hasClass('hotspot--middle')) {\r\n col = 2;\r\n }\r\n //\r\n if (spot.hasClass('hotspot--right')) {\r\n col = 3;\r\n }\r\n }\r\n\r\n spot.attr({\r\n 'data-col': col,\r\n 'data-row': row,\r\n });\r\n if (!hasCol) {\r\n switch (col) {\r\n case 1:\r\n classes.push('hotspot--left');\r\n break;\r\n case 2:\r\n classes.push('hotspot--middle');\r\n break;\r\n case 3:\r\n classes.push('hotspot--right');\r\n break;\r\n }\r\n }\r\n\r\n switch (row) {\r\n case 1:\r\n if (!hasRow) classes.push('hotspot--top');\r\n spot.find('.hotspot__line').css('bottom', `calc(${100 - spotY}% + ${spotRadius}px)`);\r\n spot.find('.hotspot__tip').css({\r\n left: `${spotX}%`,\r\n });\r\n break;\r\n case 2:\r\n if (!hasRow) classes.push('hotspot--bottom');\r\n spot.find('.hotspot__line').css('top', `calc(${spotY}% + ${spotRadius}px)`);\r\n spot.find('.hotspot__tip').css({\r\n left: `${spotX}%`,\r\n });\r\n break;\r\n }\r\n\r\n spot.addClass(classes.join(' '));\r\n spot.find('.hotspot__spot').css({\r\n left: `${spotX}%`,\r\n top: `${spotY}%`,\r\n });\r\n spot.find('.hotspot__line').css('left', `${spotX}%`);\r\n\r\n spot.find('.hotspot__spot').on('click', function () {\r\n $(this).addClass('hotspot--clicked');\r\n });\r\n };\r\n\r\n /**\r\n * Initial Spot B position\r\n * @param {object} spot\r\n * @param {jquery object} component\r\n */\r\n const initSpotB = (spot, component) => {\r\n const classes = [];\r\n const spotRadius = 30;\r\n const spotX = parseInt(spot.data('sx'), 10);\r\n const spotY = parseInt(spot.data('sy'), 10);\r\n const col = Math.ceil(Math.max(1, spotX) / 50);\r\n spot.attr({\r\n 'data-col': col,\r\n });\r\n switch (col) {\r\n case 1:\r\n classes.push('hotspot--left');\r\n spot.find('.hotspot__line').css('width', `calc(${spotX}%)`);\r\n break;\r\n case 2:\r\n classes.push('hotspot--right');\r\n spot.find('.hotspot__line').css('left', `calc(${spotX}% + ${spotRadius}px)`);\r\n break;\r\n }\r\n\r\n spot.addClass(classes.join(' '));\r\n spot.find('.hotspot__spot').css({\r\n left: `${spotX}%`,\r\n top: `${spotY}%`,\r\n });\r\n spot.find('.hotspot__line').css('top', `${spotY}%`);\r\n spot.find('.hotspot__tip').css('top', `calc(${spotY}% - ${spotRadius / 2}px)`);\r\n\r\n spot.find('.hotspot__spot').on('click', function () {\r\n $(this).addClass('hotspot--clicked');\r\n });\r\n };\r\n\r\n // Modal Handler\r\n $('.modal--hotspots').on('hide.bs.modal', function () {\r\n const clonedSpot = $('.page > .hotspot__spot');\r\n\r\n clonedSpot.removeClass('hotspot--opened').animate(250);\r\n\r\n setTimeout(() => {\r\n $('.hotspot__spot.hotspot--clicked').addClass('hotspot--wasClicked').removeClass('hotspot--clicked');\r\n }, 500);\r\n });\r\n\r\n // ===========================================================================\r\n // == MAIN jQuery Plugin Function ==\r\n // ===========================================================================\r\n\r\n // Iterate over all components\r\n return this.each(function () {\r\n const component = $(this);\r\n const hotspotsImage = component.find('.hotspots__image');\r\n\r\n if (component.hasClass('hotspots--a')) {\r\n // Horizontal Hotspots (A)\r\n component.find('.hotspot').each(function () {\r\n initSpotA($(this), component);\r\n });\r\n reorderSpotsA(component);\r\n } else {\r\n // Vertical Hotspots (B)\r\n component.find('.hotspot').each(function () {\r\n initSpotB($(this), component);\r\n });\r\n }\r\n\r\n // Display component after image is loaded\r\n hotspotsImage\r\n .on('lazyloaded', function () {\r\n // Recalc sliderAutoHeight after image is loaded\r\n const sliderMain = $(this).closest('.hotspots-slider__main');\r\n if (sliderMain.length > 0) {\r\n sliderMain[0].swiper.updateAutoHeight();\r\n }\r\n // Cut text with ellipsis\r\n for (const txtTip of document.querySelectorAll('.hotspot__tip > div')) {\r\n txtTip.textContent += ' ';\r\n lineClamp(txtTip, 2);\r\n }\r\n // Display hidden component\r\n component.css('opacity', 1);\r\n })\r\n .addClass('lazyload');\r\n });\r\n};\r\n\r\n$('.hotspots').hotspots();\r\n\r\n$('.hotspots-slider').each(function () {\r\n const thumbsSlider = this.querySelector('.hotspots-slider__thumbs');\r\n const mainSlider = this.querySelector('.hotspots-slider__main');\r\n\r\n const sliderThumbs = new Swiper(thumbsSlider, {\r\n spaceBetween: 10,\r\n slidesPerView: 'auto',\r\n watchSlidesVisibility: true,\r\n watchSlidesProgress: true,\r\n });\r\n\r\n return new Swiper(mainSlider, {\r\n spaceBetween: 10,\r\n grabCursor: true,\r\n autoHeight: true,\r\n modules: [Thumbs, Pagination, Navigation],\r\n thumbs: {\r\n swiper: sliderThumbs,\r\n },\r\n pagination: {\r\n el: mainSlider.querySelector('.swiper-pagination'),\r\n type: 'fraction',\r\n },\r\n navigation: {\r\n nextEl: mainSlider.querySelector('.swiper-button-next'),\r\n prevEl: mainSlider.querySelector('.swiper-button-prev'),\r\n },\r\n });\r\n});\r\n","var topLevel = typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n doccy = document;\n} else {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n if (!doccy) {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n }\n}\n\nmodule.exports = doccy;\n","// http://codepen.io/Merri/pen/Dsuim\n/**\n * TextOverflowClamp.js\n *\n * Updated 2013-05-09 to remove jQuery dependancy.\n * But be careful with webfonts!\n */\n\n// nieve window and document polyfill\nvar window = {};\nvar document = require('global/document');\n\n// bind function support for older browsers without it\n// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind\nif (!Function.prototype.bind) {\n Function.prototype.bind = function (oThis) {\n if (typeof this !== \"function\") {\n // closest thing possible to the ECMAScript 5 internal IsCallable function\n throw new TypeError(\"Function.prototype.bind - what is trying to be bound is not callable\");\n }\n \n var aArgs = Array.prototype.slice.call(arguments, 1),\n fToBind = this,\n fNOP = function () {},\n fBound = function () {\n return fToBind.apply(this instanceof fNOP && oThis\n ? this\n : oThis,\n aArgs.concat(Array.prototype.slice.call(arguments)));\n };\n \n fNOP.prototype = this.prototype;\n fBound.prototype = new fNOP();\n \n return fBound;\n };\n}\n\n// the actual meat is here\n(function(w, d){\n\tvar clamp, measure, text, lineWidth,\n\t\tlineStart, lineCount, wordStart,\n\t\tline, lineText, wasNewLine,\n ce = d.createElement.bind(d),\n ctn = d.createTextNode.bind(d);\n\t\n\t// measurement element is made a child of the clamped element to get it's style\n\tmeasure = ce('span');\n \n\t(function(s){\n\t\ts.position = 'absolute'; // prevent page reflow\n\t\ts.whiteSpace = 'pre'; // cross-browser width results\n\t\ts.visibility = 'hidden'; // prevent drawing\n\t})(measure.style);\n\t\n\tclamp = function (el, lineClamp) {\n // make sure the element belongs to the document\n if(!el.ownerDocument || !el.ownerDocument === d) return;\n\t\t// reset to safe starting values\n\t\tlineStart = wordStart = 0;\n\t\tlineCount = 1;\n\t\twasNewLine = false; \n\t\tlineWidth = el.clientWidth;\n\t\t// get all the text, remove any line changes\n\t\ttext = (el.textContent || el.innerText).replace(/\\n/g, ' ');\n\t\t// remove all content\n\t\twhile(el.firstChild !== null)\n\t\t\tel.removeChild(el.firstChild);\n\t\t// add measurement element within so it inherits styles\n\t\tel.appendChild(measure);\n\t\t// http://ejohn.org/blog/search-and-dont-replace/\n\t\ttext.replace(/ /g, function(m, pos) {\n\t\t\t// ignore any further processing if we have total lines\n if(lineCount === lineClamp) return;\n\t\t\t// create a text node and place it in the measurement element\n\t\t\tmeasure.appendChild(ctn(text.substr(lineStart, pos - lineStart)));\n\t\t\t// have we exceeded allowed line width?\n\t\t\tif(lineWidth < measure.clientWidth) {\n\t\t\t\tif(wasNewLine) {\n\t\t\t\t\t// we have a long word so it gets a line of it's own\n\t\t\t\t\tlineText = text.substr(lineStart, pos + 1 - lineStart);\n\t\t\t\t\t// next line start position\n\t\t\t\t\tlineStart = pos + 1;\n\t\t\t\t} else {\n\t\t\t\t\t// grab the text until this word\n\t\t\t\t\tlineText = text.substr(lineStart, wordStart - lineStart);\n\t\t\t\t\t// next line start position\n\t\t\t\t\tlineStart = wordStart;\n\t\t\t\t}\n\t\t\t\t// create a line element\n\t\t\t\tline = ce('span');\n\t\t\t\t// add text to the line element\n\t\t\t\tline.appendChild(ctn(lineText));\n\t\t\t\t// add the line element to the container\n\t\t\t\tel.appendChild(line);\n\t\t\t\t// yes, we created a new line\n\t\t\t\twasNewLine = true;\n lineCount++;\n\t\t\t} else {\n\t\t\t\t// did not create a new line\n\t\t\t\twasNewLine = false;\n\t\t\t}\n\t\t\t// remember last word start position\n\t\t\twordStart = pos + 1;\n\t\t\t// clear measurement element\n\t\t\tmeasure.removeChild(measure.firstChild);\n\t\t});\n\t\t// remove the measurement element from the container\n\t\tel.removeChild(measure);\n\t\t// create the last line element\n\t\tline = ce('span');\n\t\t// give styles required for text-overflow to kick in\n\t\t(function(s){\n\t\t\ts.display = 'inline-block';\n\t\t\ts.overflow = 'hidden';\n\t\t\ts.textOverflow = 'ellipsis';\n\t\t\ts.whiteSpace = 'nowrap';\n\t\t\ts.width = '100%';\n\t\t})(line.style);\n\t\t// add all remaining text to the line element\n\t\tline.appendChild(ctn(text.substr(lineStart)));\n\t\t// add the line element to the container\n\t\tel.appendChild(line);\n\t}\n\tw.clamp = clamp;\n})(window, document);\n\n// export npm ready clamp function\nmodule.exports = window.clamp;\n","/* (ignored) */"],"sourceRoot":""}