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A0BH,GAAG,EAAAK,EAAA,KAA6BC,QAAQC,UAAUJ,EAAG3E,GAAK,IAAI,EAAA4E,EAAA,GAAeJ,GAAGQ,aAAeL,EAAEM,MAAMT,EAAGxE,GACpK,C,uBCLA,SAASkF,EAAgBV,GACvB,OAAOU,EAAkB/B,OAAOgC,eAAiBhC,OAAOyB,eAAe7G,OAAS,SAAUyG,GACxF,OAAOA,EAAEY,WAAajC,OAAOyB,eAAeJ,EAC9C,EAAGU,EAAgBV,EACrB,C,oGCHA,SAASvG,EAAUuG,EAAGxE,GACpB,GAAI,mBAAqBA,GAAK,OAASA,EAAG,MAAM,IAAIyE,UAAU,sDAC9DD,EAAEa,UAAYlC,OAAOmC,OAAOtF,GAAKA,EAAEqF,UAAW,CAC5CL,YAAa,CACX5G,MAAOoG,EACPe,UAAU,EACVC,cAAc,KAEdrC,OAAOsC,eAAejB,EAAG,YAAa,CACxCe,UAAU,IACRvF,IAAK,OAAewE,EAAGxE,EAC7B,C,uBCZA,SAAS0F,IACP,IACE,IAAIlB,GAAKmB,QAAQN,UAAUO,QAAQC,KAAKf,QAAQC,UAAUY,QAAS,IAAI,WAAa,IACtF,CAAE,MAAOnB,GAAI,CACb,OAAQkB,EAA4B,WAClC,QAASlB,CACX,IACF,C,sDCPA,SAASsB,EAAgBtB,EAAGxE,GAC1B,OAAO8F,EAAkB3C,OAAOgC,eAAiBhC,OAAOgC,eAAepH,OAAS,SAAUyG,EAAGxE,GAC3F,OAAOwE,EAAEY,UAAYpF,EAAGwE,CAC1B,EAAGsB,EAAgBtB,EAAGxE,EACxB,C","sources":["helpers/components/OutsideClickTrigger.jsx","helpers/currencyHelper.js","modules/hotspot-banner/component/Hotspot.jsx","modules/hotspot-banner/component/HotspotBanner.jsx","modules/hotspot-banner/HotspotBannerModule.js","../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/callSuper.js","../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"],"sourcesContent":["import React, { Component } from \"react\"\nimport PropTypes from \"prop-types\"\n\n/**\n * Component that alerts if you click outside of it\n */\nexport default class OutsideClickTrigger extends Component {\n constructor(props) {\n super(props)\n\n this.setWrapperRef = this.setWrapperRef.bind(this)\n this.handleClickOutside = this.handleClickOutside.bind(this)\n }\n\n componentDidMount() {\n document.addEventListener(\"mousedown\", this.handleClickOutside)\n }\n\n componentWillUnmount() {\n document.removeEventListener(\"mousedown\", this.handleClickOutside)\n }\n\n /**\n * Set the wrapper ref\n */\n setWrapperRef(node) {\n this.wrapperRef = node\n }\n\n /**\n * Alert if clicked on outside of element\n */\n handleClickOutside(event) {\n if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {\n if (this.props.onOutsideClick) this.props.onOutsideClick()\n }\n }\n\n render() {\n return (\n
\n {this.props.children}\n
\n )\n }\n}\n\nOutsideClickTrigger.propTypes = {\n children: PropTypes.element.isRequired,\n}\n","const formatCurrency = (val) => {\n let showFraction = 0\n if (val % 1 > 0) {\n showFraction = 2\n }\n\n return new Intl.NumberFormat(\"da-DK\", {\n minimumFractionDigits: showFraction,\n maximumFractionDigits: showFraction,\n }).format(val)\n}\n\nexport default formatCurrency\n","import formatCurrency from \"../../../helpers/currencyHelper\"\nimport React from \"react\"\n\nconst Hotspot = (props) => {\n let spot = props.spot\n const spotContentStyle = {\n backgroundColor: spot.BgColor,\n color: spot.TextColor,\n }\n\n const spotStyle = {\n top: spot.VerticalPlacement + \"%\",\n left: spot.HorizontalPlacement + \"%\",\n }\n\n const dotStyle = {\n backgroundColor: spot.BgColor,\n }\n\n const innerDotStyle = {\n backgroundColor: spot.DotColor,\n }\n\n let verticalDirection = spot.VerticalPlacement > 50 ? \"v-open-up\" : \"v-open-down\"\n let horizontalDirection = spot.HorizontalPlacement === 50 ? \"h-open-center\" : spot.HorizontalPlacement > 50 ? \"h-open-left\" : \"h-open-right\"\n\n if (spot.Product) {\n let productInfo = spot.Product\n return (\n
\n \n \n \n {dot(props.onClick, dotStyle, innerDotStyle)}\n
\n )\n } else {\n return (\n
\n \n {dot(props.onClick, dotStyle, innerDotStyle)}\n
\n )\n }\n}\n\nconst dot = (onClick, dotStyle, innerDotStyle) => {\n return (\n
onClick(e)} className={\"hotspot-dot\"}>\n
\n
\n )\n}\n\nconst getPriceDom = (product) => {\n const discountedPrice = product.DiscountedPrice\n if (discountedPrice < product.Price) {\n return (\n \n
\n {formatCurrency(product.Price)} kr\n
\n
\n {formatCurrency(discountedPrice)} kr\n
\n
\n )\n } else {\n return
{formatCurrency(product.Price)} kr
\n }\n}\n\nexport default Hotspot\n","import React from \"react\"\nimport { isMobile } from \"react-device-detect\"\nimport Hotspot from \"./Hotspot\"\nimport OutsideClickTrigger from \"../../../helpers/components/OutsideClickTrigger\"\n\nconst HotspotBanner = (props) => {\n let activeSpotData = isMobile ? props.mobileSpots : props.spots\n if (!activeSpotData || Object.keys(activeSpotData).length === 0) return \"\"\n\n let n = 0\n let spots = (\n closeAllSpots(e)}>\n \n {activeSpotData.map((spot) => (\n \n ))}\n \n \n )\n\n return spots\n}\n\nconst closeAllSpots = () => {\n let allSpots = document.querySelectorAll(\".hotspot-content\")\n allSpots.forEach((spot) => spot.classList.add(\"hidden\"))\n allSpots.forEach((spot) => spot.parentElement.classList.remove(\"spotopen\"))\n}\n\nconst handleSpotClick = (e) => {\n let clickedDot = e.target.closest(\".hotspot-dot\")\n let clickedHotspot = clickedDot.parentElement\n let spotContent = clickedHotspot.querySelector(\".hotspot-content\")\n\n if (spotContent && spotContent.classList.contains(\"hidden\")) {\n closeAllSpots()\n spotContent.classList.remove(\"hidden\")\n clickedHotspot.classList.add(\"spotopen\")\n } else {\n spotContent.classList.add(\"hidden\")\n clickedHotspot.classList.remove(\"spotopen\")\n }\n}\n\nexport default HotspotBanner\n","import React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport HotspotBanner from \"./component/HotspotBanner\"\n\nexport default class HotspotModule {\n constructor(elem) {\n this.elem = elem\n this.dotsElem = elem.parentElement.querySelector(\".js-hotspot-dots\")\n\n this.spots = JSON.parse(elem.dataset.spots || \"{}\")\n this.mobileSpots = JSON.parse(elem.dataset.mobileSpots || \"{}\")\n this.dimensions = { x: this.elem.offsetWidth, y: this.elem.offsetHeight }\n\n this.init()\n return this\n }\n\n init() {\n ReactDOM.unmountComponentAtNode(this.elem)\n ReactDOM.render(, this.dotsElem)\n }\n}\n","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return assertThisInitialized(t);\n}\nexport { _possibleConstructorReturn as default };","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nfunction _callSuper(t, o, e) {\n return o = getPrototypeOf(o), possibleConstructorReturn(t, isNativeReflectConstruct() ? Reflect.construct(o, e || [], getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nexport { _callSuper as default };","function _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nexport { _getPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && setPrototypeOf(t, e);\n}\nexport { _inherits as default };","function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}\nexport { _isNativeReflectConstruct as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };"],"names":["OutsideClickTrigger","_Component","props","_this","_classCallCheck","_callSuper","setWrapperRef","bind","handleClickOutside","_inherits","_createClass","key","value","document","addEventListener","this","removeEventListener","node","wrapperRef","event","contains","target","onOutsideClick","_jsx","className","ref","children","Component","val","showFraction","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","format","dot","onClick","dotStyle","innerDotStyle","style","e","getPriceDom","product","discountedPrice","DiscountedPrice","Price","_jsxs","React","id","formatCurrency","spot","spotContentStyle","backgroundColor","BgColor","color","TextColor","spotStyle","top","VerticalPlacement","left","HorizontalPlacement","DotColor","verticalDirection","horizontalDirection","Product","productInfo","href","PageUrl","Brand","Name","Heading","dangerouslySetInnerHTML","__html","Text","closeAllSpots","allSpots","querySelectorAll","forEach","classList","add","parentElement","remove","handleSpotClick","clickedHotspot","closest","spotContent","querySelector","activeSpotData","isMobile","mobileSpots","spots","Object","keys","length","n","map","Hotspot","HotspotModule","elem","dotsElem","JSON","parse","dataset","dimensions","x","offsetWidth","y","offsetHeight","init","ReactDOM","HotspotBanner","_possibleConstructorReturn","t","TypeError","ReferenceError","o","getPrototypeOf","isNativeReflectConstruct","Reflect","construct","constructor","apply","_getPrototypeOf","setPrototypeOf","__proto__","prototype","create","writable","configurable","defineProperty","_isNativeReflectConstruct","Boolean","valueOf","call","_setPrototypeOf"],"sourceRoot":""}