(()=>{"use strict";var e={857:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function a(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function n(e,t,i){return e.concat(t).map(function(e){return a(e,i)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function r(e,t){try{return t in e}catch(e){return!1}}function o(e,i,c){(c=c||{}).arrayMerge=c.arrayMerge||n,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=a;var l,d,u=Array.isArray(i);return u!==Array.isArray(e)?a(i,c):u?c.arrayMerge(e,i,c):(d={},(l=c).isMergeableObject(e)&&s(e).forEach(function(t){d[t]=a(e[t],l)}),s(i).forEach(function(t){(!r(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(r(e,t)&&l.isMergeableObject(i[t])?d[t]=(function(e,t){if(!t.customMerge)return o;var i=t.customMerge(e);return"function"==typeof i?i:o})(t,l)(e[t],i[t],l):d[t]=a(i[t],l))}),d)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return o(e,i,t)},{})},e.exports=o},688:(e,t,i)=>{i.r(t),i.d(t,{default:()=>m});var a=i(568),n=i(49);class s{static debounce(e,t){let i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var n=arguments.length,s=Array(n),r=0;r<n;r++)s[r]=arguments[r];a&&!i&&setTimeout(e.bind(e,...s),0),clearTimeout(i),i=setTimeout(e.bind(e,...s),t)}}}var r=i(107),o=i(363);class c extends o.Z{create(){super.create(),this._isButtonElement()?this.parent.disabled=!0:this._isAnchorElement()&&this.parent.classList.add("disabled")}remove(){super.remove(),this._isButtonElement()?this.parent.disabled=!1:this._isAnchorElement()&&this.parent.classList.remove("disabled")}_isButtonElement(){return"button"===this.parent.tagName.toLowerCase()}_isAnchorElement(){return"a"===this.parent.tagName.toLowerCase()}constructor(e,t="before"){if(super(e,t),!this._isButtonElement()&&!this._isAnchorElement())throw Error("Parent element is not of type <button> or <a>")}}var l=i(206),d=i(266);let u="is-active";class g{resetIterator(){this._iterator=-1}_registerEvents(){this._element.addEventListener("keydown",this._onKeyDown.bind(this))}_onKeyDown(e){let t=n.Z.querySelector(document,this._parentSelector,!1);if(t&&(this._items=t.querySelectorAll(this._itemSelector),0!==this._items.length)){switch(e.key){case"Enter":this._onPressEnter(e);return;case"ArrowDown":e.preventDefault(),this._iterator++;break;case"ArrowUp":e.preventDefault(),this._iterator--;break;default:return}this._clampIterator(),d.Z.iterate(this._items,e=>e.classList.remove(u)),this._getCurrentSelection().classList.add(u)}}_onPressEnter(e){if(!(this._iterator<=-1))try{let t=n.Z.querySelector(this._getCurrentSelection(),"a");e.preventDefault(),t.click()}catch(e){}}_getCurrentSelection(){return this._items[this._iterator]}_clampIterator(){let e=this._getMaxItemCount();this._iterator<0&&(this._iterator=this._infinite?e:0),this._iterator>e&&(this._iterator=this._infinite?0:e)}_getMaxItemCount(){return this._items.length-1}constructor(e,t,i,a=!0){this._element=e,this._parentSelector=t,this._infinite=a,this._itemSelector=i,this.resetIterator(),this._registerEvents()}}class h extends a.Z{init(){try{this._inputField=n.Z.querySelector(this.el,this.options.searchWidgetInputFieldSelector),this._submitButton=n.Z.querySelector(this.el,this.options.searchWidgetButtonFieldSelector),this._url=n.Z.getAttribute(this.el,this.options.searchWidgetUrlDataAttribute)}catch(e){return}this._client=new r.Z,this._navigationHelper=new g(this._inputField,this.options.searchWidgetResultSelector,this.options.searchWidgetResultItemSelector,!0),this._registerEvents()}_registerEvents(){this._inputField.addEventListener("input",s.debounce(this._handleInputEvent.bind(this),this.options.searchWidgetDelay),{capture:!0,passive:!0}),this.el.addEventListener("submit",this._handleSearchEvent.bind(this));let e=l.Z.isTouchDevice()?"touchstart":"click";document.body.addEventListener(e,this._onBodyClick.bind(this)),this._registerInputFocus()}_handleSearchEvent(e){this._inputField.value.trim().length<this.options.searchWidgetMinChars&&(e.preventDefault(),e.stopPropagation())}_handleInputEvent(){let e=this._inputField.value.trim();if(e.length<this.options.searchWidgetMinChars){this._clearSuggestResults();return}this._suggest(e),this.$emitter.publish("handleInputEvent",{value:e})}_suggest(e){let t=this._url+encodeURIComponent(e);this._client.abort();let i=new c(this._submitButton);i.create(),this.$emitter.publish("beforeSearch"),this._client.get(t,e=>{this._clearSuggestResults(),i.remove(),this.el.insertAdjacentHTML("beforeend",e),this.$emitter.publish("afterSuggest")})}_clearSuggestResults(){this._navigationHelper.resetIterator();let e=document.querySelectorAll(this.options.searchWidgetResultSelector);d.Z.iterate(e,e=>e.remove()),this.$emitter.publish("clearSuggestResults")}_onBodyClick(e){e.target.closest(this.options.searchWidgetSelector)||e.target.closest(this.options.searchWidgetResultSelector)||(this._clearSuggestResults(),this.$emitter.publish("onBodyClick"))}_registerInputFocus(){if(this._toggleButton=n.Z.querySelector(document,this.options.searchWidgetCollapseButtonSelector,!1),!this._toggleButton){console.warn("Called selector '".concat(this.options.searchWidgetCollapseButtonSelector,"' for the search toggle button not found. Autofocus has been disabled on mobile."));return}let e=l.Z.isTouchDevice()?"touchstart":"click";this._toggleButton.addEventListener(e,()=>{setTimeout(()=>this._focusInput(),0)})}_focusInput(){this._toggleButton&&!this._toggleButton.classList.contains(this.options.searchWidgetCollapseClass)&&(this._toggleButton.blur(),this._inputField.setAttribute("tabindex","-1"),this._inputField.focus()),this.$emitter.publish("focusInput")}}h.options={searchWidgetSelector:".js-search-form",searchWidgetResultSelector:".js-search-result",searchWidgetResultItemSelector:".js-result",searchWidgetInputFieldSelector:"input[type=search]",searchWidgetButtonFieldSelector:"button[type=submit]",searchWidgetUrlDataAttribute:"data-url",searchWidgetCollapseButtonSelector:".js-search-toggle-btn",searchWidgetCollapseClass:"collapsed",searchWidgetDelay:250,searchWidgetMinChars:3};class m extends h{init(){super.init(),this.$emitter.subscribe("afterSuggest",this.onAfterSearchSuggest),this.$emitter.subscribe("clearSuggestResults",this.onAfterClearSearchResults)}onAfterSearchSuggest(){let e=document.querySelector("#ga4AfterSuggestScript");if(!e)return;let t=document.createTextNode(e.textContent),i=document.createElement("script");i.appendChild(t),document.querySelector("head").appendChild(i)}onAfterClearSearchResults(){window.ga4SearchSuggestProduct&&delete window.ga4SearchSuggestProduct}}},206:(e,t,i)=>{i.d(t,{Z:()=>a});class a{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return a.isIPhoneDevice()||a.isIPadDevice()}static isNativeWindowsBrowser(){return a.isIEBrowser()||a.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":a.isTouchDevice(),"is-ios":a.isIOSDevice(),"is-native-windows":a.isNativeWindowsBrowser(),"is-iphone":a.isIPhoneDevice(),"is-ipad":a.isIPadDevice(),"is-ie":a.isIEBrowser(),"is-edge":a.isEdgeBrowser()}}}},49:(e,t,i)=>{i.d(t,{Z:()=>n});var a=i(140);class n{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!n.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===n.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=t.replace(/^data(|-)/,""),r=a.Z.toLowerCamelCase(s,"-");if(!n.isNode(e)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let o=e.dataset[r];if(void 0===o){if(i)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return o}return a.Z.parsePrimitive(o)}static querySelector(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let a=e.querySelector(t)||!1;if(i&&!1===a)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return a}static querySelectorAll(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let a=e.querySelectorAll(t);if(0===a.length&&(a=!1),i&&!1===a)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return a}}},830:(e,t,i)=>{i.d(t,{Z:()=>a});class a{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(a),a}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=this,n=e.split("."),s=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=s;s=function(i){a.unsubscribe(e),t(i)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:i,cb:s}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}},266:(e,t,i)=>{i.d(t,{Z:()=>a});class a{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var i of e.entries())t(i[1],i[0]);return}if(e instanceof NodeList)return e.forEach(t);if(e instanceof HTMLCollection)return Array.from(e).forEach(t);if(e instanceof Object)return Object.keys(e).forEach(i=>{t(e[i],i)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}},140:(e,t,i)=>{i.d(t,{Z:()=>a});class a{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let i=a.toUpperCamelCase(e,t);return a.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>a.ucFirst(e.toLowerCase())).join(""):a.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}},568:(e,t,i)=>{i.d(t,{Z:()=>c});var a=i(857),n=i.n(a),s=i(49),r=i(140),o=i(830);class c{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=r.Z.toDashCase(this._pluginName),i=s.Z.getDataAttribute(this.el,"data-".concat(t,"-config"),!1),a=s.Z.getAttribute(this.el,"data-".concat(t,"-options"),!1),o=[this.constructor.options,this.options,e];i&&o.push(window.PluginConfigManager.get(this._pluginName,i));try{a&&o.push(JSON.parse(a))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(t,'-options" could not be parsed to json: ').concat(e.message))}return n().all(o.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}constructor(e,t={},i=!1){if(!s.Z.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new o.Z(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}},107:(e,t,i)=>{i.d(t,{Z:()=>a});class a{get(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",a=this._createPreparedRequest("GET",e,i);return this._sendRequest(a,null,t)}post(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";a=this._getContentType(t,a);let n=this._createPreparedRequest("POST",e,a);return this._sendRequest(n,t,i)}delete(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";a=this._getContentType(t,a);let n=this._createPreparedRequest("DELETE",e,a);return this._sendRequest(n,t,i)}patch(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";a=this._getContentType(t,a);let n=this._createPreparedRequest("PATCH",e,a);return this._sendRequest(n,t,i)}abort(){if(this._request)return this._request.abort()}_registerOnLoaded(e,t){t&&e.addEventListener("loadend",()=>{t(e.responseText,e)})}_sendRequest(e,t,i){return this._registerOnLoaded(e,i),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,i){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}constructor(){this._request=null}}},363:(e,t,i)=>{i.d(t,{Z:()=>r});var a=i(266);let n="loader",s={BEFORE:"before",INNER:"inner"};class r{create(){if(!this.exists()){if(this.position===s.INNER){this.parent.innerHTML=r.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),r.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(n));a.Z.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(n)).length>0}_getPosition(){return this.position===s.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(n,'" role="status">\n                    <span class="').concat("visually-hidden",'">Loading...</span>\n                </div>')}static SELECTOR_CLASS(){return n}constructor(e,t=s.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}}}},t={};function i(a){var n=t[a];if(void 0!==n)return n.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,i),s.exports}(()=>{i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t}})(),(()=>{i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{var e=i(568);class t{static isSupported(){return"undefined"!==document.cookie}static setItem(e,t,i){if(null==e)throw Error("You must specify a key to set a cookie");let a=new Date;a.setTime(a.getTime()+864e5*i);let n="";"https:"===location.protocol&&(n="secure"),document.cookie="".concat(e,"=").concat(t,";expires=").concat(a.toUTCString(),";path=/;sameSite=lax;").concat(n)}static getItem(e){if(!e)return!1;let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let a=i[e];for(;" "===a.charAt(0);)a=a.substring(1);if(0===a.indexOf(t))return a.substring(t.length,a.length)}return!1}static removeItem(e){document.cookie="".concat(e,"= ; expires = Thu, 01 Jan 1970 00:00:00 GMT;path=/")}static key(){return""}static clear(){}}var a=i(206),n=i(830),s=i(266);let r="offcanvas";class o{open(e,t,i,a,n,s,r){this._removeExistingOffCanvas();let o=this._createOffCanvas(i,s,r,a);this.setContent(e,a,n),this._openOffcanvas(o,t)}setContent(e,t){let i=this.getOffCanvas();i[0]&&(i[0].innerHTML=e,this._registerEvents(t))}setAdditionalClassName(e){this.getOffCanvas()[0].classList.add(e)}getOffCanvas(){return document.querySelectorAll(".".concat(r))}close(e){let t=this.getOffCanvas();s.Z.iterate(t,e=>{bootstrap.Offcanvas.getInstance(e).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(e,t){o.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=a.Z.isTouchDevice()?"touchend":"click",i=this.getOffCanvas();s.Z.iterate(i,t=>{let a=()=>{setTimeout(()=>{t.remove(),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:i})},e),t.removeEventListener("hide.bs.offcanvas",a)};t.addEventListener("hide.bs.offcanvas",a)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0});let n=document.querySelectorAll(".".concat("js-offcanvas-close"));s.Z.iterate(n,i=>i.addEventListener(t,this.close.bind(this,e)))}_removeExistingOffCanvas(){o.bsOffcanvas=null;let e=this.getOffCanvas();return s.Z.iterate(e,e=>e.remove())}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":"offcanvas-".concat(e)}_createOffCanvas(e,t,i,a){let n=document.createElement("div");if(n.classList.add(r),n.classList.add(this._getPositionClass(e)),!0===t&&n.classList.add("is-fullwidth"),i){let e=typeof i;if("string"===e)n.classList.add(i);else if(Array.isArray(i))i.forEach(e=>{n.classList.add(e)});else throw Error('The type "'.concat(e,'" is not supported. Please pass an array or a string.'))}return document.body.appendChild(n),o.bsOffcanvas=new bootstrap.Offcanvas(n,{backdrop:!1!==a||"static"}),n}constructor(){this.$emitter=new n.Z}}let c=Object.freeze(new o);class l{static open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",a=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";c.open(e,t,i,a,n,s,r)}static setContent(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;c.setContent(e,t,i)}static setAdditionalClassName(e){c.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;c.close(e)}static exists(){return c.exists()}static getOffCanvas(){return c.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}var d=i(107),u=i(363);let g=null;class h extends l{static open(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left",n=!(arguments.length>4)||void 0===arguments[4]||arguments[4],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:l.REMOVE_OFF_CANVAS_DELAY(),r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";if(!e)throw Error("A url must be given!");c._removeExistingOffCanvas();let d=c._createOffCanvas(a,r,o,n);this.setContent(e,t,i,n,s),c._openOffcanvas(d)}static setContent(e,t,i,a,n){let s=new d.Z;super.setContent('<div class="offcanvas-body">'.concat(u.Z.getTemplate(),"</div>"),a,n),g&&g.abort();let r=e=>{super.setContent(e,a,n),"function"==typeof i&&i(e)};g=t?s.post(e,t,h.executeCallback.bind(this,r)):s.get(e,h.executeCallback.bind(this,r))}static executeCallback(e,t){"function"==typeof e&&e(t),window.PluginManager.initializePlugins()}}let m="element-loader-backdrop";class p extends u.Z{static create(e){e.classList.add("has-element-loader"),p.exists(e)||(p.appendLoader(e),setTimeout(()=>{let t=e.querySelector(".".concat(m));t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(".".concat(m));t&&t.remove()}static exists(e){return e.querySelectorAll(".".concat(m)).length>0}static getTemplate(){return'\n        <div class="'.concat(m,'">\n            <div class="loader" role="status">\n                <span class="').concat("visually-hidden",'">Loading...</span>\n            </div>\n        </div>\n        ')}static appendLoader(e){e.insertAdjacentHTML("beforeend",p.getTemplate())}}let w="CookieConfiguration_Update";class f extends e.Z{init(){this.lastState={active:[],inactive:[]},this._httpClient=new d.Z,this._registerEvents()}_registerEvents(){let{submitEvent:e,buttonOpenSelector:t,customLinkSelector:i,globalButtonAcceptAllSelector:a}=this.options;Array.from(document.querySelectorAll(t)).forEach(t=>{t.addEventListener(e,this.openOffCanvas.bind(this))}),Array.from(document.querySelectorAll(i)).forEach(t=>{t.addEventListener(e,this._handleCustomLink.bind(this))}),Array.from(document.querySelectorAll(a)).forEach(t=>{t.addEventListener(e,this._acceptAllCookiesFromCookieBar.bind(this))})}_registerOffCanvasEvents(){let{submitEvent:e,buttonSubmitSelector:i,buttonAcceptAllSelector:a,wrapperToggleSelector:n}=this.options,s=this._getOffCanvas();if(s){let r=s.querySelector(i),o=s.querySelector(a),c=Array.from(s.querySelectorAll('input[type="checkbox"]')),l=Array.from(s.querySelectorAll(n));r&&r.addEventListener(e,this._handleSubmit.bind(this,t)),o&&o.addEventListener(e,this._acceptAllCookiesFromOffCanvas.bind(this,t)),c.forEach(t=>{t.addEventListener(e,this._handleCheckbox.bind(this))}),l.forEach(t=>{t.addEventListener(e,this._handleWrapperTrigger.bind(this))})}}_handleCustomLink(e){e.preventDefault(),this.openOffCanvas()}_handleUpdateListener(e,t){let i=this._getUpdatedCookies(e,t);document.$emitter.publish(w,i)}_getUpdatedCookies(e,t){let{lastState:i}=this,a={};return e.forEach(e=>{i.inactive.includes(e)&&(a[e]=!0)}),t.forEach(e=>{i.active.includes(e)&&(a[e]=!1)}),a}openOffCanvas(e){let{offCanvasPosition:t}=this.options,i=window.router["frontend.cookie.offcanvas"];this._hideCookieBar(),h.open(i,!1,this._onOffCanvasOpened.bind(this,e),t)}closeOffCanvas(e){h.close(),"function"==typeof e&&e()}_onOffCanvasOpened(e){this._registerOffCanvasEvents(),this._setInitialState(),this._setInitialOffcanvasState(),PluginManager.initializePlugins(),"function"==typeof e&&e()}_hideCookieBar(){let e=PluginManager.getPluginInstances("CookiePermission");e&&e[0]&&(e[0]._hideCookieBar(),e[0]._removeBodyPadding())}_setInitialState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=e||this._getCookies("all"),a=[],n=[];i.forEach(e=>{let{cookie:i,required:s}=e;t.getItem(i)||s?a.push(i):n.push(i)}),this.lastState={active:a,inactive:n}}_setInitialOffcanvasState(){let e=this.lastState.active,t=this._getOffCanvas();e.forEach(e=>{let i=t.querySelector('[data-cookie="'.concat(e,'"]'));i.checked=!0,this._childCheckboxEvent(i)})}_handleWrapperTrigger(e){e.preventDefault();let{entriesActiveClass:t,entriesClass:i,groupClass:a}=this.options,{target:n}=e,s=this._findParentEl(n,i,a);s&&(s.classList.contains(t)?s.classList.remove(t):s.classList.add(t))}_handleCheckbox(e){let{parentInputClass:t}=this.options,{target:i}=e;(i.classList.contains(t)?this._parentCheckboxEvent:this._childCheckboxEvent).call(this,i)}_findParentEl(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;for(;e&&!e.classList.contains(i);){if(e.classList.contains(t))return e;e=e.parentElement}return null}_isChecked(e){return!!e.checked}_parentCheckboxEvent(e){let{groupClass:t}=this.options,i=this._isChecked(e),a=this._findParentEl(e,t);this._toggleWholeGroup(i,a)}_childCheckboxEvent(e){let{groupClass:t}=this.options,i=this._isChecked(e),a=this._findParentEl(e,t);this._toggleParentCheckbox(i,a)}_toggleWholeGroup(e,t){Array.from(t.querySelectorAll("input")).forEach(t=>{t.checked=e})}_toggleParentCheckbox(e,t){let{parentInputSelector:i}=this.options,a=Array.from(t.querySelectorAll("input:not(".concat(i,")"))),n=Array.from(t.querySelectorAll("input:not(".concat(i,"):checked")));if(a.length>0){let e=t.querySelector(i);if(e){let t=n.length>0,i=t&&n.length!==a.length;e.checked=t,e.indeterminate=i}}}_handleSubmit(){let e=this._getCookies("active"),i=this._getCookies("inactive"),{cookiePreference:a}=this.options,n=[],s=[];i.forEach(e=>{let{cookie:i}=e;s.push(i),t.getItem(i)&&t.removeItem(i)}),e.forEach(e=>{let{cookie:i,value:a,expiration:s}=e;n.push(i),i&&a&&t.setItem(i,a,s)}),t.setItem(a,"1","30"),this._handleUpdateListener(n,s),this.closeOffCanvas(document.$emitter.publish("CookieConfiguration_CloseOffCanvas"))}acceptAllCookies(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e){this._handleAcceptAll(),this.closeOffCanvas();return}p.create(this.el);let t=window.router["frontend.cookie.offcanvas"];this._httpClient.get(t,e=>{let t=new DOMParser().parseFromString(e,"text/html");this._handleAcceptAll(t),p.remove(this.el),this._hideCookieBar()})}_acceptAllCookiesFromCookieBar(){return this.acceptAllCookies(!0)}_acceptAllCookiesFromOffCanvas(){return this.acceptAllCookies()}_handleAcceptAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this._getCookies("all",e);this._setInitialState(i);let{cookiePreference:a}=this.options;i.forEach(e=>{let{cookie:i,value:a,expiration:n}=e;i&&a&&t.setItem(i,a,n)}),t.setItem(a,"1","30"),this._handleUpdateListener(i.map(e=>{let{cookie:t}=e;return t}),[])}_getCookies(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{cookieSelector:i}=this.options;return t||(t=this._getOffCanvas()),Array.from(t.querySelectorAll(i)).filter(t=>{switch(e){case"all":return!0;case"active":return this._isChecked(t);case"inactive":return!this._isChecked(t);default:return!1}}).map(e=>{let{cookie:t,cookieValue:i,cookieExpiration:a,cookieRequired:n}=e.dataset;return{cookie:t,value:i,expiration:a,required:n}})}_getOffCanvas(){let e=l?l.getOffCanvas():[];return!!e&&e.length>0&&e[0]}}f.options={offCanvasPosition:"left",submitEvent:"click",cookiePreference:"cookie-preference",cookieSelector:"[data-cookie]",buttonOpenSelector:".js-cookie-configuration-button button",buttonSubmitSelector:".js-offcanvas-cookie-submit",buttonAcceptAllSelector:".js-offcanvas-cookie-accept-all",globalButtonAcceptAllSelector:".js-cookie-accept-all-button",wrapperToggleSelector:".offcanvas-cookie-entries span",parentInputSelector:".offcanvas-cookie-parent-input",customLinkSelector:'[href="'.concat(window.router["frontend.cookie.offcanvas"],'"]'),entriesActiveClass:"offcanvas-cookie-entries--active",entriesClass:"offcanvas-cookie-entries",groupClass:"offcanvas-cookie-group",parentInputClass:"offcanvas-cookie-parent-input"};class v{disableAction(){this.actionEnabled=!1}trigger(){let e=this.getActions();window.PluginManager.getPluginInstances(this.getPluginName()).forEach(t=>{Object.keys(e).forEach(i=>{t.$emitter.subscribe(i,e[i])})})}getActions(){}getPluginName(){}constructor(){this.actionEnabled=!0}}class _{static setEntry(e,t,i){sessionStorage.setItem(this.cleanString(e)+t,i),localStorage.setItem(this.cleanString(e)+t,i)}static getEntry(e,t){let i=sessionStorage.getItem(this.cleanString(e)+t);return i?i:localStorage.getItem(this.cleanString(e)+t)||null}static setEntriesIfMissing(e){e.forEach(e=>{let{entryString:t,productId:i,value:a}=e;this.getEntry(t,i)||this.setEntry(t,i,a)})}static setJsonEntry(e,t,i){sessionStorage.setItem(this.cleanString(e)+t,JSON.stringify(i)),localStorage.setItem(this.cleanString(e)+t,JSON.stringify(i)),this.getJsonEntry(this.cleanString(e),t)}static getJsonEntry(e,t){let i;if((i=sessionStorage.getItem(this.cleanString(e)+t))!==null||(i=localStorage.getItem(this.cleanString(e)+t))!==null)return JSON.parse(i);if(!window.ga4Product||!window.ga4Product[t])return console.log("could not find information for "+t),null;{let e=JSON.parse(JSON.stringify(window.ga4Product[t]));return e.extra&&delete e.extra,e}}static getOrigin(e){let t;let i={id:"",name:"",index:0};if(window.ga4Product[e]){let{itemListId:t,itemListName:a,itemListIndex:n}=window.ga4Product[e];i.id=t,i.name=a,i.index=n}else(t=this.getJsonEntry("ga4item_",e))!==null&&(i.id=t.itemListId,i.name=t.itemListName,i.index=t.itemListIndex);return i}static cleanString(e){let t="";for(let i=0;i<e.length;i++)127>=e.charCodeAt(i)&&(t+=e.charAt(i));return t}}class y{static lineItemsContainer(){let e=document.querySelector(".discoga4-checkout-hidden-line-items-information");return e||((e||(e=document.querySelector(".discoga4-header-hidden-line-items-information")),e)?(console.log("discoga4-checkout-hidden-line-items-information was not found, using discoga4-header-hidden-line-items-information"),e):(e||(e=document.querySelector(".hidden-line-items-information")),e)?(console.log("discoga4-header-hidden-line-items-information was not found, using hidden-line-items-information"),e):e?void 0:(console.log("no hidden-line-items-information found - returning empty array "),[]))}static getItemsFromStorage(e){if(!e)return[];let t=e.querySelectorAll(".hidden-line-item"),i=[];return t.forEach(e=>{let t=parseFloat(e.dataset.price);if(t>=0){let a=parseInt(e.dataset.quantity,10),n=e.dataset.id,s=e.dataset.sku,r=_.getEntry("productId_",s),o=_.getJsonEntry("ga4item_",r);if(o||(o=_.getJsonEntry("ga4item_",n)),o&&t>0){let e=t,n=!1;window.ga4gpCoupon&&(_.getEntry("item_startPrice_"+r)&&(e=parseFloat(_.getEntry("item_startPrice_"+r))),n=e-t>0);let{item_id:s,item_name:c,price:l,coupon:d,discount:u,index:g,item_brand:h,item_category:m,item_list_name:p,item_category2:w,item_category3:f,item_category4:v,item_category5:y,item_variant:b,item_list_id:C}=o;l=parseFloat(l),i.push({item_id:s,item_name:c,affiliation:window.ga4affiliation,coupon:n?"Graduated Price":d,discount:n?Math.round((l-t)*100)/100:Math.round(100*u)/100,index:g,item_brand:h,item_category:m,item_category2:w||void 0,item_category3:f||void 0,item_category4:v||void 0,item_category5:y||void 0,item_variant:b,item_list_id:C,item_list_name:p,location_id:void 0,price:l,quantity:a})}}}),i}static getAdsItemsFromStorage(){let e=this.lineItemsContainer();if(!e)return;let t=e.querySelectorAll(".hidden-line-item"),i=[];return t.forEach(e=>{if(parseFloat(e.dataset.price)>=0){let t,a=parseInt(e.dataset.quantity,10),n=e.dataset.sku,s=e.dataset.id,r=_.getEntry("productId_",n),o=_.getJsonEntry("ga4item_",r);o||(o=_.getJsonEntry("ga4item_",s),r=e.dataset.id);let c=e.dataset.price,l=0;(t=_.getEntry("taxRate_"+r))!==null&&window.adsValueNetto&&(l=Math.round(100*(l=c*parseFloat(t)/100))/100),o&&i.push({id:o.item_id,quantity:a,price:Math.round((c-l)*100)/100})}}),i}static getCoupon(e){if(!e)return[];let t=e.querySelectorAll(".hidden-line-item"),i="",a=0;return t.forEach(e=>{let t=e.dataset.price;0>parseFloat(t)&&(a=Math.round((a+Math.abs(parseFloat(t)))*100)/100,i=i+","+e.dataset.name)}),{coupon:i.replace(/^,+|,+$/g,"").replace(/^\s+|\s+$/gm,""),discount:a}}}class b{static getUAValueFromHeader(e,t){let i,a,n=0,s=0;if(window.ga4Product&&window.ga4Product[e]){let t=window.ga4Product[e].extra;n=parseFloat(t.cheapest),window.adsValueNetto&&(s=Math.round(100*(s=n*parseFloat(t.taxRate)/100))/100)}else(i=_.getJsonEntry("ga4item_",e))!==null&&(n=this.getSinglePriceFromJsonEntry(i),window.adsValueNetto&&(a=_.getEntry("taxRate_"+e))!==null&&(s=Math.round(100*(s=n*parseFloat(a)/100))/100));return Math.round((n-s)*100)/100*t}static getValueFromHeader(e,t){let i,a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=0;return window.ga4Product&&window.ga4Product[e]?n=parseFloat(window.ga4Product[e].extra.cheapest):(i=_.getJsonEntry("ga4item_",e))!==null&&(n=this.getSinglePriceFromJsonEntry(i,a)),n*t}static getFormUAItemFromHeader(e){let t,i="";return window.ga4Product&&window.ga4Product[e]?i=window.ga4Product[e].item_id:(t=_.getJsonEntry("ga4item_",e))!==null&&(i=t.item_id),{id:i,google_business_vertical:"retail"}}static getProductFromHeader(e,t){let i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=!(arguments.length>6)||void 0===arguments[6]||arguments[6];r&&_.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:e,value:a},{entryString:"ga4_item_list_id",productId:e,value:n},{entryString:"ga4_item_list_name",productId:e,value:s}]),o&&(a=_.getEntry("ga4_item_list_index_",e)?parseInt(_.getEntry("ga4_item_list_index_",e),10):a,n=_.getEntry("ga4_item_list_id",e)?_.getEntry("ga4_item_list_id",e):n,s=_.getEntry("ga4_item_list_name",e)?_.getEntry("ga4_item_list_name",e):s);let{item_id:c,item_name:l,item_brand:d,item_variant:u,item_category:g,item_category2:h,item_category3:m,item_category4:p,item_category5:w,extra:f}=window.ga4Product[e],v=+f.realPrice,y=+f.cheapest,b=0;return window.ga4upCoupon&&(b=Math.round((v-y)*100)/100)>0&&(i="List price"),{item_id:c,item_name:l,item_brand:d,quantity:t,coupon:i,discount:b,item_category:g,item_variant:u,item_category2:h||void 0,item_category3:m||void 0,item_category4:p||void 0,item_category5:w||void 0,affiliation:window.ga4affiliation,index:a,item_list_id:n,item_list_name:s,price:y}}static getSinglePriceFromJsonEntry(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=parseFloat(e.discount);return(isNaN(i)&&(i=0),t)?Math.round((parseFloat(e.price)-i)*100)/100:Math.round(100*parseFloat(e.price))/100}}class C{static getItems(e,t,i,a){let n=e.querySelectorAll(".product-box"),s=[],r=0,o=0,c=1;return n.forEach(e=>{if(!0===e.parentElement.classList.contains("product-slider-item")&&!1===e.parentElement.classList.contains("tns-slide-active"))return;let n=e.querySelector("input[name=product-id]").value;if(n&&window.ga4Product&&window.ga4Product[n]){let l="lineItems["+n+"][quantity]";c=1,e.querySelector('input[name="'.concat(l,'"]'))&&(c=parseInt(e.querySelector('input[name="'.concat(l,'"]')).value,10)),a?(r+=parseFloat(b.getUAValueFromHeader(n,c)),s.push(b.getFormUAItemFromHeader(n))):s.push(b.getProductFromHeader(n,c,o,t,i,!1,!0)),window.ga4Product[n].itemListIndex=o,window.ga4Product[n].itemListId=t,window.ga4Product[n].itemListName=i,o++}}),a&&s.push(Math.round(100*r)/100),s}}let S={CA:1,US:1,KZ:7,RU:7,EG:20,ZA:27,GR:30,NL:31,BE:32,FR:33,ES:34,HU:36,IT:39,RO:40,CH:41,AT:43,GB:44,DK:45,SE:46,NO:47,SJ:47,PL:48,DE:49,PE:51,MX:52,CU:53,AR:54,BR:55,CL:56,CO:57,VE:58,MY:60,AU:61,CX:61,CC:61,ID:62,PH:63,NZ:64,PN:64,SG:65,TH:66,JP:81,KR:82,VN:84,CN:86,TR:90,IN:91,PK:92,AF:93,LK:94,MM:95,IR:98,SS:211,MA:212,EH:212,DZ:213,TN:216,LY:218,GM:220,SN:221,MR:222,ML:223,GN:224,CI:225,BF:226,NE:227,TG:228,BJ:229,MU:230,LR:231,SL:232,GH:233,NG:234,TD:235,CF:236,CM:237,CV:238,ST:239,GQ:240,GA:241,CG:242,CD:243,AO:244,GW:245,IO:246,SC:248,SD:249,RW:250,ET:251,SO:252,DJ:253,KE:254,TZ:255,UG:256,BI:257,MZ:258,ZM:260,MG:261,YT:262,RE:262,ZW:263,NA:264,MW:265,LS:266,BW:267,SZ:268,KM:269,SH:290,ER:291,AW:297,FO:298,GL:299,GI:350,PT:351,LU:352,IE:353,IS:354,AL:355,MT:356,CY:357,FI:358,BG:359,LT:370,LV:371,EE:372,MD:373,AM:374,BY:375,AD:376,MC:377,SM:378,VA:379,UA:380,RS:381,ME:382,XK:383,HR:385,SI:386,BA:387,MK:389,CZ:420,SK:421,LI:423,FK:500,BZ:501,GT:502,SV:503,HN:504,NI:505,CR:506,PA:507,PM:508,HT:509,BL:590,MF:590,BO:591,GY:592,EC:593,PY:595,SR:597,UY:598,CW:599,AN:599,TL:670,AQ:672,BN:673,NR:674,PG:675,TO:676,SB:677,VU:678,FJ:679,PW:680,WF:681,CK:682,NU:683,WS:685,KI:686,NC:687,TV:688,PF:689,TK:690,FM:691,MH:692,KP:850,HK:852,MO:853,KH:855,LA:856,BD:880,TW:886,MV:960,LB:961,JO:962,SY:963,IQ:964,KW:965,SA:966,YE:967,OM:968,PS:970,AE:971,IL:972,BH:973,QA:974,BT:975,MN:976,NP:977,TJ:992,TM:993,AZ:994,GE:995,KG:996,UZ:998,BS:"1-242",BB:"1-246",AI:"1-264",AG:"1-268",VG:"1-284",VI:"1-340",KY:"1-345",BM:"1-441",GD:"1-473",TC:"1-649",MS:"1-664",MP:"1-670",GU:"1-671",AS:"1-684",SX:"1-721",LC:"1-758",DM:"1-767",VC:"1-784",TT:"1-868",KN:"1-869",JM:"1-876",GG:"44-1481",JE:"44-1534",IM:"44-1624",PR:["1-787","1-939"],DO:["1-809","1-829","1-849"]};class E{static getPhone(e,t){if(!e)return;let i=e.trim();if(i.startsWith("+"))return i;i=i.replace(/[^1-9]+|0+/g,"");let a=this.getPhonePrefixByCountryCode(t);return"+".concat(a).concat(i)}static getPhonePrefixByCountryCode(e){let t=S[e];return t||(t="",console.error("Phone prefix not found for country code '".concat(e,"'"))),Array.isArray(t)&&(t=t[0]),t}}class A{static viewItemListAfterChange(){let e=document.querySelectorAll(".discoga4-pagination-hidden-line-item");e&&(window.ga4Product=window.ga4Product||{},e.forEach(e=>{let t=e.getAttribute("data-id");window.ga4Product[t]={item_brand:e.getAttribute("data-item_brand"),item_name:e.getAttribute("data-item_name"),item_id:e.getAttribute("data-item_id"),item_list_id:e.getAttribute("data-item_list_id"),item_list_name:e.getAttribute("data-item_list_name"),currency:e.getAttribute("data-currency"),item_variant:e.getAttribute("data-id"),extra:{minPurchase:e.getAttribute("data-min-purchase"),shopware_id:t,realPrice:e.getAttribute("data-real-price"),item_startPrice:e.getAttribute("data-item_start_price"),item_hasGraduatedPrice:e.getAttribute("data-item_hasGraduatedPrice"),taxRate:e.getAttribute("data-tax-rate"),cheapest:e.getAttribute("data-cheapest")}};let i=e.getAttribute("data-item_category").split("|");for(let e=0;e<i.length;e++)0===e?window.ga4Product[t].item_category=i[e]:window.ga4Product[t]["item_category"+e.toString()]=i[e]}),A.viewItemList("category"))}static addToCartFromHeader(e,t,i,a,n){let s={event:"add_to_cart"};i&&(s.event="remove_from_cart",a=!1);let r=parseFloat(b.getUAValueFromHeader(e,t)),o=parseFloat(b.getValueFromHeader(e,t,!1)),c=b.getFormUAItemFromHeader(e);if(window.acceptedGa&&window.googleAnalyticsEnabled){let i;if(dataLayer.disPush({ecommerce:null}),window.ga4Product&&window.ga4Product[e]){let{itemListIndex:s,itemListId:r,itemListName:o,item_id:c,extra:l}=window.ga4Product[e];i=b.getProductFromHeader(e,t,s,r,o,a,n),_.setJsonEntry("ga4item_",e,i),_.setEntriesIfMissing([{entryString:"item_startPrice_",productId:e,value:l.item_startPrice},{entryString:"taxRate_",productId:e,value:l.taxRate},{entryString:"productId_",productId:c,value:e},{entryString:"SKU_",productId:e,value:c}])}(i=_.getJsonEntry("ga4item_",e))!==null&&(i.quantity=t,i.discount=Math.round(100*i.discount)/100),s.ecommerce={currency:window.ga4Currency,value:parseFloat(o.toFixed(2)),items:[i]}}window.acceptedGads&&window.googleAdsEnabled&&window.ga4RemarketingEnabled&&(dataLayer.disPush({items:null}),s.value=parseFloat(r.toFixed(2)),s.items=[c]),s.saleschannelid=window.ga4salesChannelId,s.saleschannelname=window.ga4salesChannelName,dataLayer.disPush(s)}static viewItemList(e,t){let i,a,n,s;if("category"===e?(i=document.querySelector(".cms-element-product-listing"),a=window.ga4activeNavigationId?window.ga4activeNavigationId:"",n=document.title):"search"===e?(i=document.querySelector(".cms-element-product-listing-wrapper"),a="search="+window.searchTerm,n="search"):"productCrossSelling"===e?(i=t,a=t.getAttribute("aria-labelledby"),n=document.querySelector("#"+a).innerText):(a=(i=t).getAttribute("data-cms-element-id"),n=e.toString()),!i)return;let r={event:"view_item_list"};window.acceptedGa&&window.googleAnalyticsEnabled&&(dataLayer.disPush({ecommerce:null}),r.ecommerce={item_list_id:a,item_list_name:n,items:C.getItems(i,a,n,!1)});let o=0;(s=C.getItems(i,a,n,!0))&&(o=s.pop(),window.acceptedGads&&window.googleAdsEnabled&&window.ga4RemarketingEnabled&&(dataLayer.disPush({items:null}),r.value=parseFloat(o.toFixed(2)),r.items=s)),"search"===e&&this.viewSearchResults(s,o),r.saleschannelid=window.ga4salesChannelId,r.saleschannelname=window.ga4salesChannelName,dataLayer.disPush(r)}static viewItemFromHeader(e,t){if(!e)return;let i=b.getUAValueFromHeader(e,t),a=b.getValueFromHeader(e,t);window.ga4Product[e].itemListIndex=0,window.ga4Product[e].itemListId="product",window.ga4Product[e].itemListName="product";let n={event:"view_item"};window.acceptedGa&&window.googleAnalyticsEnabled&&(dataLayer.disPush({ecommerce:null}),n.ecommerce={value:parseFloat(a.toFixed(2)),currency:window.ga4Currency,items:[b.getProductFromHeader(e,t,0,"product","product",!1,!0)]}),window.acceptedGads&&window.googleAdsEnabled&&window.ga4RemarketingEnabled&&(dataLayer.disPush({items:null}),n.value=parseFloat(i.toFixed(2)),n.items=[b.getFormUAItemFromHeader(e)]);let s=b.getProductFromHeader(e,t,0,"product","product");_.setJsonEntry("ga4item_",e,s),dataLayer.disPush({...n,saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName})}static shoppingJourney(e,t,i,a,n,s){t&&e&&(dataLayer.disPush({ecommerce:null,value:null,items:null}),"string"==typeof i&&"number"==typeof a?dataLayer.disPush({event:e,ecommerce:{currency:i,value:parseFloat(a.toFixed(2)),items:t},saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName}):"string"==typeof n&&"string"==typeof s?dataLayer.disPush({event:e,ecommerce:{item_list_id:n,item_list_name:s,items:t},saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName}):dataLayer.disPush({event:e,ecommerce:{items:t},saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName}))}static shippingInfo(e,t){e&&t&&(dataLayer.disPush({ecommerce:null,value:null,items:null}),dataLayer.disPush({event:"add_shipping_info",ecommerce:{currency:window.ga4Currency,value:parseFloat(e.dataset.value),coupon:y.getCoupon(e).coupon,shipping_tier:t.toString(),items:y.getItemsFromStorage(e)},saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName}))}static paymentInfo(e,t){e&&t&&(dataLayer.disPush({ecommerce:null,value:null,items:null}),dataLayer.disPush({event:"add_payment_info",ecommerce:{value:parseFloat(e.dataset.value),currency:window.ga4Currency,coupon:y.getCoupon(e).coupon,payment_type:t.toString(),items:y.getItemsFromStorage(e)},saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName}))}static async purchase(e,t,i){let a={event:"purchase"};if(window.acceptedGa&&window.googleAnalyticsEnabled&&e&&i&&(dataLayer.disPush({ecommerce:null}),a.ecommerce=this.checkoutContent(e,i)),window.acceptedGads&&window.googleAdsEnabled&&t&&(a.value=this.getTotalAdsValue(e.dataset.value,e.dataset.tax,a.ecommerce.shipping),a.transaction_id=i,a.currency=window.ga4Currency,a.discount=parseFloat(y.getCoupon(e).discount),a.aw_feed_country=t.dataset.feedcountry,a.aw_feed_language=t.dataset.feedlangage,(window.ga4RemarketingEnabled||window.ga4AdvancedAdsEnabled)&&(dataLayer.disPush({items:null}),a.items=y.getAdsItemsFromStorage()),window.ga4AdvancedAdsEnabled)){a.email=await this.sha256(t.dataset.useremail),a.phone_number=await this.sha256(E.getPhone(t.dataset.phone,t.dataset.land));let e={};e.first_name=await this.sha256(t.dataset.firstname),e.last_name=await this.sha256(t.dataset.lastname),e.street=t.dataset.street,e.city=t.dataset.city,e.region=t.dataset.region,e.postal_code=t.dataset.zip,e.country=t.dataset.land,a.address=e}a.saleschannelid=window.ga4salesChannelId,a.saleschannelname=window.ga4salesChannelName,dataLayer.disPush(a)}static viewCart(e){dataLayer.disPush({ecommerce:null,value:null,items:null}),dataLayer.disPush({event:"view_cart",ecommerce:this.cartContent(e),saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName})}static beginCheckout(e){dataLayer.disPush({ecommerce:null,value:null,items:null}),dataLayer.disPush({event:"begin_checkout",ecommerce:{currency:window.ga4Currency,value:parseFloat(e.dataset.value),coupon:y.getCoupon(e).coupon,items:y.getItemsFromStorage(e)},saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName})}static account(e,t){window.ga4UserId?dataLayer.disPush({event:e,method:t,user_id:window.ga4UserId,saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName}):dataLayer.disPush({event:e,method:t,saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName})}static viewSearchResults(e,t){let i={event:"view_search_results"};dataLayer.disPush({ecommerce:null}),i.search_term=window.searchTerm,i.search_result=0,window.searchResult&&(i.search_result=parseInt(window.searchResult,10)),window.acceptedGads&&window.googleAdsEnabled&&window.ga4RemarketingEnabled&&t&&e&&(dataLayer.disPush({items:null}),i.value=parseFloat(t),i.items=e),i.saleschannelid=window.ga4salesChannelId,i.saleschannelname=window.ga4salesChannelName,dataLayer.disPush(i)}static changeQtyNumber(e){let t,i,a;let n=e.target;if(!n)return;let s=n.getAttribute("value")-n.value;if(n.closest(".cart-item"))t=n.closest(".cart-item").querySelector(".cart-item-remove-button");else{if(!n.closest(".line-item"))return;t=n.closest(".line-item").querySelector(".line-item-remove-button")}if((i=document.querySelector('.discoga4-checkout-hidden-line-item[data-id="'.concat(t.getAttribute("data-product-id"),'"]')))!=null){let e=i.getAttribute("data-sku");a=_.getEntry("productId_",e)}a&&this.addToCartFromHeader(a,Math.abs(s),s>0,!1,!1)}static changeQty(e){let t,i,a;let n=e.target,s=n.querySelector('[selected="selected"]').value-n.value;if(n.closest(".cart-item"))t=n.closest(".cart-item").querySelector(".cart-item-remove-button");else{if(!n.closest(".line-item"))return;t=n.closest(".line-item").querySelector(".line-item-remove-button")}if((i=document.querySelector('.discoga4-checkout-hidden-line-item[data-id="'.concat(t.getAttribute("data-product-id"),'"]')))!=null){let e=i.getAttribute("data-sku");a=_.getEntry("productId_",e)}a&&this.addToCartFromHeader(a,Math.abs(s),s>0,!1,!1)}static searchSuggested(e,t){dataLayer.disPush({ecommerce:null}),dataLayer.disPush({event:"search",search_term:e,search_result:parseInt(t,10),saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName})}static search(){if(window.searchResult){dataLayer.disPush({ecommerce:null}),dataLayer.disPush({event:"search",search_term:window.searchTerm,search_result:parseInt(window.searchResult,10),saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName});return}dataLayer.disPush({ecommerce:null}),dataLayer.disPush({event:"search",search_term:window.searchTerm,saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName})}static forms(e){dataLayer.disPush({ecommerce:null,value:null,items:null}),dataLayer.disPush({event:e,currency:window.ga4Currency,value:parseFloat(window.generateLeadValue),saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName})}static cartContent(e){return{currency:window.ga4Currency,value:parseFloat(e.dataset.value),items:y.getItemsFromStorage(e)}}static checkoutContent(e,t){let i=y.getCoupon(e).coupon,a={currency:window.ga4Currency,value:parseFloat(e.dataset.value),shipping:parseFloat(e.dataset.shipping),tax:parseFloat(e.dataset.tax),coupon:i,items:y.getItemsFromStorage(e)};return t?{transaction_id:t,...a}:a}static async sha256(e){if(!e)return;let t=e.trim();if(!t)return;let i=new TextEncoder("utf-8").encode(t.toLowerCase()),a=await crypto.subtle.digest("SHA-256",i);return this.hex(a)}static hex(e){let t="",i=new DataView(e);for(let e=0;e<i.byteLength;e+=4){let a=i.getUint32(e).toString(16),n="00000000";t+=(n+a).slice(-n.length)}return t}static replaceEmptyStringsWithUndefined(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e)){for(let t=0;t<e.length;t++)"object"==typeof e[t]&&null!==e[t]?this.replaceEmptyStringsWithUndefined(e[t]):""===e[t]&&(e[t]=void 0);return e}for(let t in e)if(e.hasOwnProperty(t)){let i=e[t];"object"==typeof i&&null!==i?this.replaceEmptyStringsWithUndefined(i):""===i&&(e[t]=void 0)}return e}static getTotalAdsValue(e,t,i){let a=parseFloat(e)-parseFloat(i),n=this.calculateShipping(i,this.getGlobalPurchaseTaxState());switch(!0){case!1===window.adsValueNetto&&!0===window.adsWithShipping:a+=parseFloat(n);break;case!0===window.adsValueNetto&&!0===window.adsWithShipping:a=a-parseFloat(t)+parseFloat(n);break;case!0===window.adsValueNetto&&!1===window.adsWithShipping:a-=parseFloat(t)}return Math.round(100*a)/100}static calculateShipping(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"net",i=sessionStorage.getItem("ga4_shipping_price");return i&&t?(i=JSON.parse(i))[t]:e}static getGlobalPurchaseTaxState(){let e=sessionStorage.getItem("ga4_shipping_price");if(!e)return"gross";let{globalTaxState:t}=JSON.parse(e);return t}}class I extends v{getPluginName(){return"OffCanvasCart"}getActions(){return{offCanvasOpened:this._sidebarOpened.bind(this)}}_sidebarOpened(){if(!this.actionEnabled)return;this._triggerViewCart();let e=document.querySelector(".begin-checkout-btn");e&&e.addEventListener("click",this._onBeginCheckoutSidebar.bind(this));let t=document.querySelectorAll(".js-offcanvas-cart-change-quantity");t&&t.forEach(e=>e.addEventListener("change",this._onChangeProductQuantity.bind(this)));let i=document.querySelectorAll(".js-offcanvas-cart-change-quantity-number");i&&i.forEach(e=>e.addEventListener("change",this._onChangeProductQuantityNumber.bind(this)))}_onChangeProductQuantity(e){A.changeQty(e)}_onChangeProductQuantityNumber(e){A.changeQtyNumber(e)}_onBeginCheckoutSidebar(){let e=y.lineItemsContainer();e&&A.beginCheckout(e)}_triggerViewCart(){let e=y.lineItemsContainer();e&&A.viewCart(e)}}class k{disableAction(){this.actionEnabled=!1}trigger(){}constructor(){this.actionEnabled=!0}}class P extends k{trigger(){this._triggerViewCart();let e=document.querySelector(".begin-checkout-btn");e&&e.addEventListener("click",this._onBeginCheckoutPage.bind(this));let t=document.querySelector(".cart-add-product");t&&t.addEventListener("submit",this._addProduct.bind(this));let i=document.querySelectorAll(".quantity-select");i&&i.forEach(e=>e.addEventListener("change",this._onChangeProductQuantity.bind(this)));let a=document.querySelectorAll(".js-quantity-selector");a&&a.forEach(e=>e.addEventListener("change",this._onChangeProductQuantityNumber.bind(this)))}_addProduct(e){if(!this.actionEnabled)return;let t=e.currentTarget.querySelector(".form-control");A.shoppingJourney("add_to_cart",[{item_id:t.value,quantity:1,affiliation:window.ga4affiliation,item_list_id:"checkout",item_list_name:"checkout"}])}_triggerViewCart(){if(!this.actionEnabled)return;let e=y.lineItemsContainer();e&&A.viewCart(e)}_onBeginCheckoutPage(){if(!this.actionEnabled)return;let e=y.lineItemsContainer();e&&A.beginCheckout(e)}_onChangeProductQuantity(e){A.changeQty(e)}_onChangeProductQuantityNumber(e){A.changeQtyNumber(e)}}class L extends k{trigger(){if(localStorage.getItem("purchaseSent")&&localStorage.getItem("purchaseSent")===new URLSearchParams(window.location.search).get("orderId"))return;let e=y.lineItemsContainer();this._finish(e)}async _finish(e){if(!this.actionEnabled)return;localStorage.getItem("paymentSelected")&&"yes"===localStorage.getItem("paymentSelected")?console.log("paymentInfo sent in previous page"):window.ga4PaymentMethod&&A.paymentInfo(e,window.ga4PaymentMethod),localStorage.getItem("shippingSelected")&&"yes"===localStorage.getItem("shippingSelected")?console.log("shippingInfo sent in previous page"):window.ga4ShippingMethod&&A.shippingInfo(e,window.ga4ShippingMethod);let t=document.querySelector(".ga4-hidden-ads-information");if(window.ga4OrderNumber){let i=window.ga4OrderNumber.toString();"hashedOrderId"===window.transationIdMethod&&(i=await A.sha256(window.ga4OrderNumber.toString())),A.purchase(e,t,i),localStorage.setItem("purchaseSent",new URLSearchParams(window.location.search).get("orderId"))}}}class F extends k{trigger(){this._triggerViewItem()}_triggerViewItem(){if(!this.actionEnabled)return;let e=document.getElementById("productDetailPageBuyProductForm");if(!e)return;let t=e.querySelector('input[name$="][id]"]').value;t&&t&&A.viewItemFromHeader(t,1)}}class q extends k{trigger(){this._triggerViewItemList(),document.querySelector(".cms-element-product-listing-wrapper")&&this._documentObserver(".cms-element-product-listing-wrapper")}_triggerViewItemList(){this.actionEnabled&&A.viewItemList("category")}_documentObserver(e){let t=document.querySelector(e),i=!1;new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type&&(i=!0)}),i&&setTimeout(function(){A.viewItemListAfterChange()},1e3)}).observe(t,{subtree:!0,childList:!0})}}class O extends k{trigger(){let e=document.querySelectorAll(".cms-section");e&&O._nodeDeletedObserver(e),this._documentObserver()}_documentObserver(){let e=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){t.hasChildNodes()&&t.querySelector(".cms-element-form")&&(O._nodeDeletedObserver([t]),e.disconnect())})})});e.observe(document.body,{subtree:!0,childList:!0})}static _nodeDeletedObserver(e){let t=new MutationObserver(function(e){e.forEach(function(e){e.removedNodes.forEach(function(e){e.hasChildNodes()&&e.querySelector(".cms-element-form")&&(A.forms("generate_lead"),t.disconnect())})})});e.forEach(e=>{e.querySelector(".cms-element-form")&&t.observe(e,{subtree:!0,childList:!0})})}}class T extends k{trigger(){document.addEventListener("click",this._onClick.bind(this))}_onClick(e){if(this.actionEnabled)switch(this.closestForm=e.target.closest("form.buy-widget"),!0){case!this.closestForm&&(this.closestWishList=e.target.closest(".product-wishlist"))!=null:this._onAddToWishList(this.closestWishList);break;case!this.closestForm&&(this.closestSearchSuggestItem=e.target.closest(".search-suggest-product-link"))!=null:this._onSelectItemFromSearchSuggest(this.closestSearchSuggestItem);break;case!this.closestForm&&(this.closestProduct=e.target.closest(".product-box"))!=null:this._onSelectItemFromListing(this.closestProduct);break;case!this.closestForm&&(this.closestRemoveItem=e.target.closest(".cart-item-remove-button"))!=null:case!this.closestForm&&(this.closestRemoveItem=e.target.closest(".line-item-remove-button"))!=null:this._onRemoveFromCart(this.closestRemoveItem);break;case!this.closestForm&&(this.closestCartItem=e.target.closest(".cart-item-img"))!=null:case!this.closestForm&&(this.closestCartItem=e.target.closest(".cart-item-label"))!=null:case!this.closestForm&&(this.closestCartItem=e.target.closest(".line-item-img"))!=null:case!this.closestForm&&(this.closestCartItem=e.target.closest(".line-item-label"))!=null:this._onSelectItemFromCart(this.closestCartItem)}}_onAddToWishList(e){let t,i,a,n;if(!e.closest(".product-wishlist").querySelector(".product-wishlist-not-added")){switch(!0){case(i=e.closest(".line-item-product"))!=null:if((a=i.querySelector(".line-item-remove-button"))!=null&&(n=document.querySelector('.discoga4-checkout-hidden-line-item[data-id="'.concat(a.getAttribute("data-product-id"),'"]')))!=null){let e=n.getAttribute("data-sku");t=_.getEntry("productId_",e)}break;case(i=e.closest(".cart-item-product"))!=null:if((a=i.querySelector(".cart-item-remove-button"))!=null&&(n=document.querySelector('.discoga4-checkout-hidden-line-item[data-id="'.concat(a.getAttribute("data-product-id"),'"]')))!=null){let e=n.getAttribute("data-sku");t=_.getEntry("productId_",e)}break;case(i=e.closest(".product-box"))!=null:(a=i.querySelector("input[name=product-id]"))!=null&&(t=a.value);break;case(i=e.closest(".product-detail-buy"))!=null:(a=i.querySelector('input[name$="][id]"]'))!=null&&(t=a.value);break;default:console.log("no fitting item for wishlist event")}if(t){let e;if((e=_.getJsonEntry("ga4item_",t))!==null)e.discount=Math.round(100*e.discount)/100,A.shoppingJourney("add_to_wishlist",[e],window.ga4Currency,b.getValueFromHeader(t,1));else if(window.ga4Product[t]){let e=_.getOrigin(t);A.shoppingJourney("add_to_wishlist",[b.getProductFromHeader(t,1,e.index,e.id,e.name,!0,!0)],window.ga4Currency,b.getValueFromHeader(t,1))}else console.log("productId not found in page nor storage")}}}_onSelectItemFromListing(e){if(e.closest(".product-action"))return;let t=e.closest(".product-box");if(!t)return;let i=t.querySelector("input[name=product-id]").value;if(i){let e=_.getOrigin(i);A.shoppingJourney("select_item",[b.getProductFromHeader(i,1,e.index,e.id,e.name,!0,!0)],!1,!1,e.id,e.name)}}_onSelectItemFromSearchSuggest(e){let t=e.getAttribute("href").split("/").slice(-1)[0];if(!window.ga4SearchSuggestProduct[t])return;let i=JSON.parse(JSON.stringify(window.ga4SearchSuggestProduct[t]));i&&A.shoppingJourney("select_item",[i],!1,!1,"search","search")}_onSelectItemFromCart(e){let t;if(e.closest(".cart-quantity-price"))return;let i=e.closest(".cart-item-row")?e.closest(".cart-item-row"):e.closest(".line-item");if(!i){console.log("cart-item-row or line-item not found");return}let a=i.querySelector(".cart-item-remove-button")?i.querySelector(".cart-item-remove-button"):i.querySelector(".line-item-remove-button");if(!a){console.log("cart-item-remove-button or line-item-remove-button not found");return}let n=a.dataset.productId?a.dataset.productId:a.dataset["product-id"];if(!n){console.log("productId not found on page");return}if((t=_.getJsonEntry("ga4item_",n))!==null){t.discount=Math.round(100*t.discount)/100;let e=_.getEntry("ga4_item_list_id",n),i=_.getEntry("ga4_item_list_name",n);A.shoppingJourney("select_item",[t],!1,!1,e,i)}else console.log("productId not found in storage")}_onRemoveFromCart(e){let t=e.dataset.productId;if(!t)return;let i=e.closest(".cart-item-row")?e.closest(".cart-item-row"):e.closest(".line-item-row");if(!i)return;let a=1;i.querySelector('[selected="selected"]')?a=i.querySelector('[selected="selected"]').value:i.querySelector(".js-offcanvas-cart-change-quantity-number")&&(a=i.querySelector(".js-offcanvas-cart-change-quantity-number").value),A.addToCartFromHeader(t,parseInt(a,10),!0,!1,!1)}}class M extends k{trigger(){let e=document.querySelectorAll(".product-slider-container");e&&e.forEach(e=>{this._onLoad(e)})}_onLoad(e){if(!this.actionEnabled)return;let t=this,i=e.closest(".tab-pane");if(i){if(i.classList.contains("active")){let e;A.viewItemList("productCrossSelling",i);let a=i.querySelectorAll(".product-slider-controls-prev,.product-slider-controls-next");i.querySelector(".product-slider-container")&&(e=i.querySelector(".product-slider-container").id),a&&e&&a.forEach(i=>i.addEventListener("click",function(){t._onClick("productCrossSelling",e)}))}this.respondToClassChange(i)}}respondToClassChange(e){let t=e.classList.contains("active");new MutationObserver(function(i){i.forEach(function(i){if("class"===i.attributeName){let a=i.target.classList.contains("active");t!==a&&(t=a,a&&A.viewItemList("productCrossSelling",e))}})}).observe(e,{attributes:!0})}_onClick(e,t){this.sleep(2e3).then(()=>{let i=document.getElementById(t);i&&A.viewItemList(e,i.closest(".tab-pane"))})}sleep(e){return new Promise(t=>setTimeout(t,e))}}class N extends k{trigger(){let e=document.querySelectorAll(".cms-block-product-slider"),t=document.querySelectorAll(".cms-block-product-three-column"),i=document.querySelectorAll(".cms-block-cross-selling");e&&this._onLoad(e,"cms-block-product-slider"),t&&this._onLoad(t,"cms-block-product-three-column"),i&&this._onLoad(i,"cms-block-cross-selling")}_onLoad(e,t){if(!this.actionEnabled)return;let i=this;e.forEach(e=>{let a=e.querySelectorAll("[data-cms-element-id]");a&&a.forEach(e=>{let a;A.viewItemList(t,e);let n=e.querySelectorAll(".product-slider-controls-prev,.product-slider-controls-next");e.querySelector(".product-slider-container")&&(a=e.querySelector(".product-slider-container").id),n&&a&&n.forEach(e=>e.addEventListener("click",function(){i._onClick(t,a)}))})})}_onClick(e,t){this.sleep(1e3).then(()=>{let i=document.getElementById(t);i&&A.viewItemList(e,i)})}sleep(e){return new Promise(t=>setTimeout(t,e))}}class x extends k{trigger(){this._triggerViewSearchResults(),this._triggerSearch();let e=document.querySelector(".cms-element-product-listing-wrapper");e&&e.addEventListener("change",this._onChangeListing.bind(this))}_triggerSearch(){this.actionEnabled&&window.searchTerm&&A.search()}_triggerViewSearchResults(){this.actionEnabled&&A.viewItemList("search")}_onChangeListing(){setTimeout(function(){A.viewItemList("search")},1e3)}}class R extends v{getPluginName(){return"AddToCart"}getActions(){return{beforeFormSubmit:this._beforeFormSubmit.bind(this)}}_beforeFormSubmit(e){if(!this.actionEnabled)return;let t=e.detail,i=null;if(t.forEach((e,t)=>{t.endsWith("][id]")&&(i=e)}),!i)return;let a=parseInt(t.get("lineItems["+i+"][quantity]"),10);a||(a=1),A.addToCartFromHeader(i,a,!1,!0,!0)}}class G extends v{getPluginName(){return"FormValidation"}getActions(){return{onFormSubmit:this._onFormSubmit.bind(this),beforeSubmit:this._onFormSubmit.bind(this)}}_onFormSubmit(e){if(!this.actionEnabled)return;let t=e.target;if(!document.getElementById("personalGuest")||document.getElementById("personalGuest")&&document.getElementById("personalGuest").checked){if(!t.classList.contains("register-form")||!e.detail.validity)return;A.account("sign_up","mail")}}}class B extends k{trigger(){let e=document.querySelectorAll(".quantity-select");e&&e.forEach(e=>e.addEventListener("change",this._onChangeProductQuantity.bind(this)));let t=document.querySelectorAll(".payment-method-input");t&&t.forEach(e=>e.addEventListener("change",this._onChangePayment.bind(this)));let i=document.querySelectorAll(".shipping-method-input");i&&i.forEach(e=>e.addEventListener("change",this._onChangeShipping.bind(this)))}_onChangeProductQuantity(e){A.changeQty(e)}_onChangePayment(e){let t=e.target.closest(".payment-method-radio").querySelector(".payment-method-description").querySelector("strong").innerText,i=y.lineItemsContainer();t&&A.paymentInfo(i,t),localStorage.setItem("paymentSelected","yes")}_onChangeShipping(e){let t=y.lineItemsContainer(),i=e.target.closest(".shipping-method-radio").querySelector(".shipping-method-description").querySelector("strong").innerText;i&&A.shippingInfo(t,i),localStorage.setItem("shippingSelected","yes")}}class D extends v{getPluginName(){return"SearchWidget"}getActions(){return{afterSuggest:this._afterSuggest.bind(this)}}_afterSuggest(){if(!this.actionEnabled)return;let e="";document.querySelector(".header-search-input").value&&(e=document.querySelector(".header-search-input").value);let t=0;if(document.querySelector(".search-suggest-container")){let e=document.querySelector(".search-suggest-container .search-suggest-total-count");t=e?parseInt(e.textContent):document.querySelectorAll(".search-suggest-container > .search-suggest-product").length}A.searchSuggested(e.replace("/search?search=",""),t)}}class U extends e.Z{init(){let e=this;switch(this.cookieArray=["gtag","ga","gads"],this.cookieDisGoogleTag="_dis_gtag",this.cookieDisGoogleAnalytics="_dis_ga",this.cookieDisGoogleAds="_dis_gads",this.cookieConfig=window.ga4CookieConfig,this.trackingEnabled=!1,this.tagManagerEnabled=!1,this.gaEventsTriggered=!1,this.gadsEventsTriggered=!1,this.ga4Enabled=window.ga4Enabled,this.googleAdsEnabled=window.googleAdsEnabled,this.ga4RemarketingEnabled=window.ga4RemarketingEnabled,this.ga4enableUserId=window.ga4enableUserId,!0){case"standardCookies"===this.cookieConfig:this.activateIfConsent("gtag",t.getItem(this.cookieDisGoogleTag)),this.activateIfConsent("ga",t.getItem(this.cookieDisGoogleAnalytics)),this.activateIfConsent("gads",t.getItem(this.cookieDisGoogleAds)),e.triggerCoreScript(),document.$emitter.subscribe(w,this.cookieSubscriber.bind(this));break;case"cookieBot"===this.cookieConfig:window.addEventListener("CookiebotOnConsentReady",function(){e.activateIfConsent("gtag",Cookiebot.consent.statistics),e.activateIfConsent("ga",Cookiebot.consent.statistics),e.activateIfConsent("gads",Cookiebot.consent.marketing),e.triggerCoreScript()}),window.addEventListener("CookiebotOnDecline",function(){e.activateIfConsent("gtag",!1),e.activateIfConsent("ga",!1),e.activateIfConsent("gads",!1)});break;case"userCentrics"===this.cookieConfig:window.addEventListener("UC_UI_INITIALIZED",function(t){e.triggerUCConsent()}),window.addEventListener("UC_UI_CMP_EVENT",function(t){("ACCEPT_ALL"===t.detail.type||"DENY_ALL"===t.detail.type||"SAVE"===t.detail.type)&&e.triggerUCConsent()});break;case"consentManager"===this.cookieConfig:window.addEventListener("cmpEvent",function(){e.triggerCMPConsent()});break;case"cmm19"===this.cookieConfig:e.triggerCMM19Consent(),window.addEventListener("ccm19WidgetClosed",function(){e.triggerCMM19Consent()});break;case"acris"===this.cookieConfig:let i="acrisCookieStateChanged",a=()=>{window.acrisCookiePrivacy&&(e.activateIfConsent("gtag",window.acrisCookiePrivacy.c.includes("_dis_gtag")),e.activateIfConsent("ga",window.acrisCookiePrivacy.c.includes("_dis_ga")),e.activateIfConsent("gads",window.acrisCookiePrivacy.c.includes("_dis_gads")),e.triggerCoreScript())};window.addEventListener(i,a),document.$emitter.subscribe(w,(()=>{window.dataLayer.find(e=>e.event&&"acrisCookieStateChanged"===e.event)&&a()}).bind(this));let n=0,s=setInterval(()=>{window.dataLayer.find(e=>e.event&&e.event===i)&&(window.dispatchEvent(new Event(i)),clearInterval(s)),++n>50&&(clearInterval(s),console.warn('Missing "'.concat(i,'" Acris event.')))},200);break;case"keine"===this.cookieConfig:window.acceptedGtag=!0,window.acceptedGa=!0,window.acceptedGads=!0,e.triggerCoreScript()}}triggerCMM19Consent(){CCM&&CCM.acceptedCookies.length&&(this.activateIfConsent("gtag",CCM.acceptedCookies.includes("cookiePreferences")),this.activateIfConsent("ga",CCM.acceptedCookies.includes("_ga")),this.activateIfConsent("gads",CCM.acceptedCookies.includes("_gads")),this.triggerCoreScript())}triggerCMPConsent(){if("consent"===window.cmpCurrentStatus){let e=!1,t=!1,i=window.cmpConsentPurposes.split(","),a=0;for(let n in window.cmpmngr.purposes){if(i.includes(window.cmpmngr.purposes[a].id)){switch(window.cmpmngr.purposes[a].nameTrans.DE){case"Marketing":e=!0;break;case"Statistik":t=!0}switch(window.cmpmngr.purposes[a].nameTrans.EN){case"Marketing":e=!0;break;case"Measurement":t=!0}switch(window.cmpmngr.purposes[a].nameTrans.XX){case"Marketing":e=!0;break;case"Measurement":case"Statistik":t=!0}switch(window.cmpmngr.purposes[a].nameTrans){case"Marketing":e=!0;break;case"Measurement":case"Statistik":case"Messung":t=!0}}a++}this.activateIfConsent("gtag",t),this.activateIfConsent("ga",t),this.activateIfConsent("gads",e),this.triggerCoreScript()}}triggerUCConsent(){if(!window.UC_UI)return;let e=window.UC_UI.getServicesBaseInfo();[{key:"gtag",name:"Google Tag Manager"},{key:"ga",name:"Google Analytics 4"},{key:"ga",name:"Google Analytics"},{key:"gads",name:"Google Ads"}].forEach(t=>{let{name:i,key:a}=t,n=e.find(e=>e.name===i);n&&this.activateIfConsent(a,n.consent.status)}),this.triggerCoreScript()}triggerCoreScript(){window.acceptedGtag&&!this.tagManagerEnabled&&(this.initializeConsent(),window.customTagManager||this.enableTagManager(),this.updateConsent(),this.tagManagerEnabled=!0),window.acceptedGa&&!this.gaEventsTriggered&&(this.triggerUserIdEvent(),this.triggerGaEvents(),this.gaEventsTriggered=!0),window.acceptedGads&&!this.gadsEventsTriggered&&(this.triggerGadsEvents(),this.gadsEventsTriggered=!0),(window.acceptedGads||window.acceptedGa)&&!this.trackingEnabled&&(this.enableTracking(),this.trackingEnabled=!0)}activateIfConsent(e,t){switch(!0){case"gtag"===e:window.acceptedGtag=!!(t&&window.googleTagEnabled);break;case"ga"===e:window.acceptedGa=!!(t&&window.googleAnalyticsEnabled);break;case"gads"===e:window.acceptedGads=!!(t&&window.googleAdsEnabled)}}enableTracking(){this.controllerName=window.ga4controllerName,this.controllerAction=window.ga4controllerAction,this.actions=[],this.registerJSActions(),this.registerControllerActions(this.controllerName,this.controllerAction),this.triggerActions()}gtag(){dataLayer.disPush(arguments)}initializeConsent(){window.dataLayer=window.dataLayer||[],window.dataLayer.disPush=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];let a=[];t.forEach(e=>{let t=A.replaceEmptyStringsWithUndefined(e);a.push(t)}),window.dataLayer.push(...a)},this.gtag("consent","default",{ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied"})}updateConsent(){let e={};window.ga4Enabled&&window.acceptedGa&&(e.analytics_storage="granted"),window.googleAdsEnabled&&window.acceptedGads&&(e.ad_storage="granted",window.ga4RemarketingEnabled&&(e.ad_personalization="granted"),e.ad_user_data="granted"),Object.keys(e).length>0&&this.gtag("consent","update",e)}enableTagManager(){(function(e,t,i,a,n){e[a]=e[a]||[],e[a].push({"gtm.start":new Date().getTime(),event:"gtm.js"});var s=t.getElementsByTagName(i)[0],r=t.createElement(i);r.async=!0,r.src="https://www.googletagmanager.com/gtm.js?id="+n+("dataLayer"!==a?"&l="+a:"")+window.ga4CustomUrl,s.parentNode.insertBefore(r,s)})(window,document,"script","dataLayer",window.ga4TagId.trim())}triggerUserIdEvent(){window.ga4UserId&&window.dataLayer.disPush({user_id:window.ga4UserId,saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName})}triggerGaEvents(){window.acceptedGa&&window.googleAnalyticsEnabled&&(window.dataLayer.disPush({event:"ga4_page_view",saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName}),window.ga4UserLoggedIn&&(!localStorage.getItem("loginSent")||"yes"!==localStorage.getItem("loginSent"))?(window.ga4UserId?window.dataLayer.disPush({event:"login",method:"mail",user_id:window.ga4UserId,saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName}):window.dataLayer.disPush({event:"login",method:"mail",saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName}),localStorage.setItem("loginSent","yes")):localStorage.getItem("loginSent")||localStorage.setItem("loginSent","no"))}triggerGadsEvents(){window.acceptedGads&&window.googleAdsEnabled&&window.dataLayer.disPush({event:"gads_page_view",saleschannelid:window.ga4salesChannelId,saleschannelname:window.ga4salesChannelName})}cookieSubscriber(e){let t=e.detail;Object.prototype.hasOwnProperty.call(t,this.cookieDisGoogleAnalytics)&&window.googleAnalyticsEnabled&&t[this.cookieDisGoogleAnalytics]&&(window.acceptedGa=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisGoogleAds)&&window.googleAdsEnabled&&t[this.cookieDisGoogleAds]&&(window.acceptedGads=!0),window.acceptedGtag=!0,this.triggerCoreScript()}removeCookie(e){document.cookie.split(";").forEach(i=>{let a=i.split("=")[0].trim();a.match(e)&&t.removeItem(a)})}removeCookies(){let e=document.cookie.split(";"),i=/^(_ga|_dis|_gtag|_gads)/;e.forEach(e=>{let a=e.split("=")[0].trim();a.match(i)&&t.removeItem(a)})}disableActions(){this.actions.forEach(e=>{e.disableAction()})}triggerActions(){this.actions.forEach(e=>{e.trigger()})}registerJSActions(){this.registerActions(O),this.registerActions(R),this.registerActions(D),window.googleAnalyticsEnabled&&(this.registerActions(I),this.registerActions(T))}registerControllerActions(e,t){switch(!0){case"account"===e&&"logout"===t:localStorage.setItem("loginSent","no"),console.log("logout");break;case"checkout"===e&&"cartpage"===t:this.registerActions(P);break;case"customcheckout"===e&&"finishpage"===t:case"checkout"===e&&"finishpage"===t:this.registerActions(L);break;case"checkout"===e&&"confirmpage"===t:this.registerActions(B);break;case"product"===e&&"index"===t:this.registerActions(F),this.registerActions(M);break;case"wishlist"===e&&"index"===t:case"navigation"===e&&"index"===t:case"navigation"===e&&"home"===t:this.registerActions(q),this.registerActions(N);break;case"navigation"===e&&"index"!==t:this.registerActions(N);break;case"search"===e&&"search"===t:this.registerActions(x);break;case"auth"===e&&"loginpage"===t:case"register"===e&&"checkoutregisterpage"===t:this.registerActions(G)}}registerActions(e){this.actions.push(new e)}}var H=i(688);let{PluginManager:W,Feature:j}=window;window.ga4Enabled&&(W.getPluginList()&&W.getPluginList().GA4||W.register("GA4",U),j.isActive("v6.6.0.0")?W.override("SearchWidget",()=>Promise.resolve().then(i.bind(i,688)),"[data-search-widget]"):W.override("SearchWidget",H.default,"[data-search-form]"))})()})();