PageSourceSearch

https://www.pro-biomarkt.de/theme/7e4d21a45b00f0ba26aab19ca3f67213/js/d-i-sco-g-a4/d-i-sco-g-a4.js?1790930979

js pro-biomarkt.de collected 2026-10-07 23:20:39 UTC 117,899 bytes, 1 lines download raw bytes

1(()=>{"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 n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s(Array.isArray(e)?[]:{},e,t):e}function a(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function o(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 s(e,i,c){(c=c||{}).arrayMerge=c.arrayMerge||a,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=n;var d,l,u=Array.isArray(i);return u!==Array.isArray(e)?n(i,c):u?c.arrayMerge(e,i,c):(l={},(d=c).isMergeableObject(e)&&o(e).forEach(function(t){l[t]=n(e[t],d)}),o(i).forEach(function(t){(!r(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(r(e,t)&&d.isMergeableObject(i[t])?l[t]=(function(e,t){if(!t.customMerge)return s;var i=t.customMerge(e);return"function"==typeof i?i:s})(t,d)(e[t],i[t],d):l[t]=n(i[t],d))}),l)}s.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return s(e,i,t)},{})},e.exports=s}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.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 n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e=i(857),t=i.n(e);class n{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=n.toUpperCamelCase(e,t);return n.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>n.ucFirst(e.toLowerCase())).join(""):n.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class a{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!a.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===a.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],o=t.replace(/^data(|-)/,""),r=n.toLowerCamelCase(o,"-");if(!a.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 s=e.dataset[r];if(void 0===s){if(i)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return s}return n.parsePrimitive(s)}static querySelector(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!a.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelector(t)||!1;if(i&&!1===n)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return n}static querySelectorAll(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!a.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelectorAll(t);if(0===n.length&&(n=!1),i&&!1===n)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return n}}class o{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(n),n}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this,a=e.split("."),o=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=o;o=function(i){n.unsubscribe(e),t(i)}}return this.el.addEventListener(a[0],o),this.listeners.push({splitEventName:a,opts:i,cb:o}),!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}
1reset(){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=[]}}class r{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 i=n.toDashCase(this._pluginName),o=a.getDataAttribute(this.el,"data-".concat(i,"-config"),!1),r=a.getAttribute(this.el,"data-".concat(i,"-options"),!1),s=[this.constructor.options,this.options,e];o&&s.push(window.PluginConfigManager.get(this._pluginName,o));try{r&&s.push(JSON.parse(r))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(i,'-options" could not be parsed to json: ').concat(e.message))}return t().all(s.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(!a.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}class s{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 n=new Date;n.setTime(n.getTime()+864e5*i);let a="";"https:"===location.protocol&&(a="secure"),document.cookie="".concat(e,"=").concat(t,";expires=").concat(n.toUTCString(),";path=/;sameSite=lax;").concat(a)}static getItem(e){if(!e)return!1;let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t))return n.substring(t.length,n.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(){}}class c{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return c.isIPhoneDevice()||c.isIPadDevice()}static isNativeWindowsBrowser(){return c.isIEBrowser()||c.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":c.isTouchDevice(),"is-ios":c.isIOSDevice(),"is-native-windows":c.isNativeWindowsBrowser(),"is-iphone":c.isIPhoneDevice(),"is-ipad":c.isIPadDevice(),"is-ie":c.isIEBrowser(),"is-edge":c.isEdgeBrowser()}}}class d{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!"))}}let l="offcanvas";class u{open(e,t,i,n,a,o,r){this._removeExistingOffCanvas();let s=this._createOffCanvas(i,o,r,n);this.setContent(e,n,a),this._openOffcanvas(s,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(l))}close(e){let t=this.getOffCanvas();d.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){u.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=c.isTouchDevice()?"touchend":"click",i=this.getOffCanvas();d.iterate(i,t=>{let n=()=>{setTimeout(()=>{t.remove(),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:i})},e),t.removeEventListener("hide.bs.offcanvas",n)};t.addEventListener("hide.bs.offcanvas",n)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0});let n=document.querySelectorAll(".".concat("js-offcanvas-close"));d.iterate(n,i=>i.addEventListener(t,this.close.bind(this,e)))}_removeExistingOffCanvas(){u.bsOffcanvas=null;let e=this.getOffCanvas();return d.iterate(e,e=>e.remove())}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":"offcanvas-".concat(e)}_createOffCanvas(e,t,i,n){let a=document.createElement("div");if(a.classList.add(l),a.classList.add(this._getPositionClass(e)),!0===t&&a.classList.add("is-fullwidth"),i){let e=typeof i;if("string"===e)a.classList.add(i);
1else if(Array.isArray(i))i.forEach(e=>{a.classList.add(e)});else throw Error('The type "'.concat(e,'" is not supported. Please pass an array or a string.'))}return document.body.appendChild(a),u.bsOffcanvas=new bootstrap.Offcanvas(a,{backdrop:!1!==n||"static"}),a}constructor(){this.$emitter=new o}}let m=Object.freeze(new u);class g{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",n=!(arguments.length>3)||void 0===arguments[3]||arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";m.open(e,t,i,n,a,o,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;m.setContent(e,t,i)}static setAdditionalClassName(e){m.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;m.close(e)}static exists(){return m.exists()}static getOffCanvas(){return m.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}class p{get(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",e,i);return this._sendRequest(n,null,t)}post(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let a=this._createPreparedRequest("POST",e,n);return this._sendRequest(a,t,i)}delete(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let a=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(a,t,i)}patch(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let a=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(a,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}}let _="loader",h={BEFORE:"before",INNER:"inner"};class v{create(){if(!this.exists()){if(this.position===h.INNER){this.parent.innerHTML=v.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),v.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(_));d.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(_)).length>0}_getPosition(){return this.position===h.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(_,'" role="status">\n                    <span class="').concat("visually-hidden",'">Loading...</span>\n                </div>')}static SELECTOR_CLASS(){return _}constructor(e,t=h.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}}let y=null;class w extends g{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,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left",a=!(arguments.length>4)||void 0===arguments[4]||arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:g.REMOVE_OFF_CANVAS_DELAY(),r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";if(!e)throw Error("A url must be given!");m._removeExistingOffCanvas();let c=m._createOffCanvas(n,r,s,a);this.setContent(e,t,i,a,o),m._openOffcanvas(c)}static setContent(e,t,i,n,a){let o=new p;super.setContent('<div class="offcanvas-body">'.concat(v.getTemplate(),"</div>"),n,a),y&&y.abort();let r=e=>{super.setContent(e,n,a),"function"==typeof i&&i(e)};y=t?o.post(e,t,w.executeCallback.bind(this,r)):o.get(e,w.executeCallback.bind(this,r))}static executeCallback(e,t){"function"==typeof e&&e(t),window.PluginManager.initializePlugins()}}let f="element-loader-backdrop";class b extends v{static create(e){e.classList.add("has-element-loader"),b.exists(e)||(b.appendLoader(e),setTimeout(()=>{let t=e.querySelector(".".concat(f));t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(".".concat(f));t&&t.remove()}static exists(e){return e.querySelectorAll(".".concat(f)).length>0}static getTemplate(){return'\n        <div class="'.concat(f,'">\n            <div class="loader" role="status">
1\n                <span class="').concat("visually-hidden",'">Loading...</span>\n            </div>\n        </div>\n        ')}static appendLoader(e){e.insertAdjacentHTML("beforeend",b.getTemplate())}}let C="CookieConfiguration_Update";window.router["frontend.cookie.offcanvas"];class k{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 S{static setSimpleEntry(e,t){let i=this.cleanString(e);sessionStorage.setItem(i,t),localStorage.setItem(i,t),this.touchLocalStorageEntry(i)}static getSimpleEntry(e){let t=sessionStorage.getItem(this.cleanString(e));return t?t:localStorage.getItem(this.cleanString(e))||null}static setEntry(e,t,i){let n=this.cleanString(e)+t;sessionStorage.setItem(n,i),localStorage.setItem(n,i),this.touchLocalStorageEntry(n)}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:n}=e;this.getEntry(t,i)||this.setEntry(t,i,n)})}static persistAdvancedPrices(e,t){e&&t&&t.advancedPrices&&Array.isArray(t.advancedPrices)&&t.advancedPrices.length&&(this.setJsonEntry("advancedPrices_",e,t.advancedPrices),t.parentId&&this.setJsonEntry("advancedPrices_",t.parentId,t.advancedPrices))}static setJsonEntry(e,t,i){let n=this.cleanString(e)+t,a=JSON.stringify(i);sessionStorage.setItem(n,a),localStorage.setItem(n,a),this.touchLocalStorageEntry(n),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 null;{let e=JSON.parse(JSON.stringify(window.ga4Product[t]));return e.extra&&(this.persistAdvancedPrices(t,e.extra),delete e.extra),e}}static getOrigin(e){let t;let i={id:"",name:"",index:0};if(window.ga4Product[e]){let{item_list_id:n,item_list_name:a,index:o,extra:r}=window.ga4Product[e];(t=this.getJsonEntry("ga4item_",r.parentId))!==null?(i.id=t.item_list_id,i.name=t.item_list_name,i.index=t.index):(i.id=n,i.name=a,i.index=o)}else(t=this.getJsonEntry("ga4item_",e))!==null&&(i.id=t.item_list_id,i.name=t.item_list_name,i.index=t.index);return i}static getMetaEntries(){try{return JSON.parse(localStorage.getItem(this.META_KEY)||"{}")}catch(e){return{}}}static saveMetaEntries(e){localStorage.setItem(this.META_KEY,JSON.stringify(e))}static touchLocalStorageEntry(e){let t=this.getMetaEntries();t[e]=Date.now(),this.saveMetaEntries(t)}static purgeExpired(e){if(!e||e<=0)return;let t=Date.now(),i=this.getMetaEntries(),n=!1;
1Object.keys(i).forEach(a=>{let o=parseInt(i[a],10);if(!localStorage.getItem(a)){delete i[a],n=!0;return}(isNaN(o)||t-o>e)&&(localStorage.removeItem(a),delete i[a],n=!0)}),n&&this.saveMetaEntries(i)}static cleanString(e){let t="";for(let i=0;i<e.length;i++)127>=e.charCodeAt(i)&&(t+=e.charAt(i));return t}}S.META_KEY="ga4_storage_ttl";class I{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)?e:(e||(e=document.querySelector(".hidden-line-items-information")),e)?e:e?void 0:(console.warn("no hidden-line-items-information found - returning empty array "),[]))}static getItemsFromContainer(e){let t,i,n;if(!e)return[];let a=e.dataset.taxstatus?e.dataset.taxstatus:"gross",o=e.querySelectorAll(".hidden-line-item"),r=[],s=[],c=0,d=0,l="",u=0;return o.forEach(e=>{let o=parseFloat(e.dataset.price),m=parseFloat(e.dataset.taxrate),g=e.dataset.type;t=0,i=0,"gross"===a&&m>0?t=Math.round(100*(t=(i=o)/(1+m/100)))/100:i=Math.round(100*(i=(t=o)*(1+m/100)))/100;let p="brutto"===window.taxConfiguration?i:t;if(o>=0){let a="brutto"===window.conversionConfiguration||"bruttoWithShipping"===window.conversionConfiguration?i:t;n=p;let m=parseInt(e.dataset.quantity,10),g=e.dataset.id,_=e.dataset.sku,h=S.getEntry("productId_",_),v=S.getJsonEntry("ga4item_",h);v||(v=S.getJsonEntry("ga4item_",g));let y=e.dataset.name,w=e.dataset.itemBrand||(v&&v.item_brand?v.item_brand:void 0),f=e.dataset.itemCategory||(v&&v.item_category?v.item_category:void 0),b=e.dataset.itemCategory2||(v&&v.item_category2?v.item_category2:void 0),C=e.dataset.itemCategory3||(v&&v.item_category3?v.item_category3:void 0),k=e.dataset.itemCategory4||(v&&v.item_category4?v.item_category4:void 0),I=e.dataset.itemCategory5||(v&&v.item_category5?v.item_category5:void 0),A=e.dataset.itemVariant||(v&&v.item_variant?v.item_variant:void 0),E=v&&v.item_list_id?v.item_list_id:void 0,P=v&&v.item_list_name?v.item_list_name:void 0,L=v&&v.index?v.index:0;l=v&&v.coupon?v.coupon:"",u=v&&v.discount?v.discount:0;let j=!1;if(window.ga4gpCoupon){j=e.dataset.itemStartPrice-p>0;let t=v&&v.price?v.price:p;n=j?parseFloat(t):p}r.push({item_id:_,item_name:y,affiliation:window.ga4affiliation,coupon:j?"Graduated Price":l,discount:j?Math.round((n-o)*100)/100:Math.round(100*u)/100,index:L,item_brand:w,item_category:f,item_category2:b||void 0,item_category3:C||void 0,item_category4:k||void 0,item_category5:I||void 0,item_list_id:E,item_list_name:P,item_variant:A,price:n,google_business_vertical:"retail",quantity:m}),s.push({item_id:_,item_name:y,index:L,item_brand:w,item_category:f,item_category2:b||void 0,item_category3:C||void 0,item_category4:k||void 0,item_category5:I||void 0,item_list_id:E,item_list_name:P,item_variant:A,price:a,quantity:m}),c+=t*m,d+=i*m}else o<0&&"easy-coupon"!==g&&"easy-coupon-child-voucher"!==g&&"easy-coupon-child-shipping-costs"!==g&&(u=Math.round((u+Math.abs(p))*100)/100,l=l+","+e.dataset.name)}),c-=u,d-=u,{items:r,ads_items:s,net:Math.max(0,Math.round(100*c)/100),gross:Math.max(0,Math.round(100*d)/100),coupon:l.replace(/^,+|,+$/g,"").replace(/^\s+|\s+$/gm,""),discount:u,code:l&&u&&S.getSimpleEntry("couponCode")?S.getSimpleEntry("couponCode"):void 0}}static getCoupon(e){if(!e)return[];let t=e.querySelectorAll(".hidden-line-item"),i="",n=0;return t.forEach(e=>{let t=e.dataset.price;0>parseFloat(t)&&(n=Math.round((n+Math.abs(parseFloat(t)))*100)/100,i=i+","+e.dataset.name)}),{coupon:i.replace(/^,+|,+$/g,"").replace(/^\s+|\s+$/gm,""),discount:n,code:i&&n&&localStorage.getItem("couponCode")?localStorage.getItem("couponCode"):void 0}}}class A{static getTaxAwarePrice(e,t){let i=e;return"netto"===window.taxConfiguration&&("brutto"===window.conversionConfiguration||"bruttoWithShipping"===window.conversionConfiguration)&&(i*=1+t/100),"brutto"===window.taxConfiguration&&("netto"===window.conversionConfiguration||"nettoWithShipping"===window.conversionConfiguration)&&(i/=1+t/100),Math.round(100*i)/100}static getTaxShippingAwarePrice(e,t,i,n){let a=parseFloat(e);switch(window.conversionConfiguration){case"bruttoWithShipping":a=e+t+i+n;break;case"nettoWithShipping":a=e+i;break;case"brutto":a=e+t}return Math.round(100*a)/100}
1static toMinor(e){return Math.round(100*parseFloat(e))}}class E{static getAdsValueFromHeader(e,t){let i,n=0,a=0;if(window.ga4Product&&window.ga4Product[e]){let t=window.ga4Product[e].extra;n=window.ga4Product[e].price,a=t.taxRate}else(i=S.getJsonEntry("ga4item_",e))!==null&&(n=this.getSinglePriceFromJsonEntry(i),a=S.getEntry("taxRate_"+e)?S.getEntry("taxRate_"+e):0);let o=A.getTaxAwarePrice(n,a);return{unit:o,total:o*(0===t?1:t)}}static getFormUAItemFromHeader(e){let t,i="";return window.ga4Product&&window.ga4Product[e]?i=window.ga4Product[e].item_id:(t=S.getJsonEntry("ga4item_",e))!==null&&(i=t.item_id),{id:i,google_business_vertical:"retail"}}static getMetaItemFromItem(e,t){if(!e)return;let i=["item_category"in e&&e.item_category,"item_category2"in e&&e.item_category2,"item_category3"in e&&e.item_category3,"item_category4"in e&&e.item_category4,"item_category5"in e&&e.item_category5].filter(Boolean).join(">"),n=t||e.price;return{contents:{id:e.item_id,item_price:n},name:e.item_name,category:i}}static getMadsItemFromItem(e,t){if(!e)return;let i=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e),n=t||e.price;return{lineItem:{id:e.item_id,brand:e.item_brand,category:i,list_name:e.item_list_name,list_position:e.index,name:e.item_name,price:n,quantity:e.quantity,variant:e.item_variant},ecomm_prodid:[e.item_id],totalvalue:e.quantity*n}}static getPinterestItemFromItem(e,t){if(!e)return;let i=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e),n=t||e.price;return{product_name:e.item_name,product_id:e.item_id,product_category:i,product_variant_id:e.item_id,product_variant:e.item_variant,product_price:n,product_quantity:e.quantity,product_brand:e.item_brand}}static getPinterestContentsFromItems(e){if(!e||!e)return;let t=[],i=[],n=0,a=0;return e.forEach(e=>{t.push(e.item_id);let o=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e);i.push({item_name:e.item_name,id:e.item_id,item_category:o,item_price:e.price.toString(),quantity:e.quantity,item_brand:e.item_brand}),a+=e.quantity,n+=e.quantity*e.price}),{ids:t,contents:i,totalvalue:n,numberOfItems:a}}static getPinterestContentsFromWindow(e){let t;if(!e||("suggest"===e&&window.ga4SearchSuggestProduct?t=JSON.parse(JSON.stringify(window.ga4SearchSuggestProduct)):"view_search_results"===e&&window.ga4Product&&(t=JSON.parse(JSON.stringify(window.ga4Product))),!t))return;let i=[],n=[],a=0,o=0;return Object.entries(t).forEach(e=>{o+=1;let t=e[1]?e[1].item_id:void 0,r=e[1]?e[1].item_name:void 0,s=e[1]?e[1].price:void 0,c=e[1]?e[1].item_brand:void 0;i.push(t),n.push({item_name:r,id:t,item_price:1*s,quantity:1,item_brand:c}),a+=1*s}),{ids:i,contents:n,totalvalue:a,numberOfItems:o}}static getTikTokItemFromItem(e,t){if(!e)return;let i=["item_category"in e&&e.item_category,"item_category2"in e&&e.item_category2,"item_category3"in e&&e.item_category3,"item_category4"in e&&e.
1item_category4,"item_category5"in e&&e.item_category5].filter(Boolean).join(" > "),n=t||e.price;return{lineItem:{price:n,quantity:e.quantity,content_id:e.item_id,content_name:e.item_name,content_category:i,brand:e.item_brand},totalvalue:e.quantity*n,quantity:e.quantity}}static getOpenAiItemFromItem(e,t){if(!e)return;let i=t||e.price;return{lineItem:{id:e.item_id,name:e.item_name,content_type:"product",quantity:e.quantity,amount:A.toMinor(i)}}}static getGAdsItemsFromItems(e){if(!e)return;let t=[],i=0;return e.forEach(e=>{t.push({id:e.item_id,quantity:e.quantity,price:e.price}),i+=e.price*e.quantity}),{items:t,total:i}}static getMetaItemsFromItems(e){if(!e)return;let t=[],i=0;return e.forEach(e=>{i+=e.quantity,t.push({id:e.item_id,quantity:e.quantity})}),{contents:t,numberOfItems:i}}static getMetaItemsFromWindow(e){let t;if(!e||("suggest"===e&&window.ga4SearchSuggestProduct?t=JSON.parse(JSON.stringify(window.ga4SearchSuggestProduct)):"view_search_results"===e&&window.ga4Product&&(t=JSON.parse(JSON.stringify(window.ga4Product))),!t))return;let i=[],n=0;return Object.entries(t).forEach(e=>{n+=1;let t=e[1]?e[1].item_id:void 0;i.push({id:t,quantity:1})}),{contents:i,numberOfItems:n}}static getMadsItemsFromItems(e){if(!e)return;let t=[],i=[],n=0;return e.forEach(e=>{let a=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e);i.push(e.item_id),t.push({id:e.item_id,brand:e.item_brand,category:a,list_name:e.item_list_name,list_position:e.index,name:e.item_name,price:e.price,quantity:e.quantity,variant:e.item_variant}),n+=e.quantity*e.price}),{ecomm_prodid:i,lineItems:t,totalvalue:n}}static getTikTokItemsFromItems(e){if(!e)return;let t=[],i=0,n=0;return e.forEach(e=>{let a=["item_category"in e&&e.item_category,"item_category2"in e&&e.item_category2,"item_category3"in e&&e.item_category3,"item_category4"in e&&e.
1item_category4,"item_category5"in e&&e.item_category5].filter(Boolean).join(" > ");t.push({price:e.price,quantity:e.quantity,content_id:e.item_id,content_name:e.item_name,content_category:a,brand:e.item_brand}),i+=e.quantity*e.price,n+=e.quantity}),{lineItems:t,totalvalue:i,numberOfItems:n}}static getOpenAiItemsFromItems(e){if(!e)return;let t=[],i=0;return e.forEach(e=>{t.push({id:e.item_id,name:e.item_name,content_type:"product",quantity:e.quantity,amount:A.toMinor(e.price)}),i+=e.quantity*e.price}),{lineItems:t,totalvalue:A.toMinor(i)}}static getPinterestItemsFromItems(e){if(!e||!e)return;let t=[],i=0,n=0;return e.forEach(e=>{let a=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e);t.push({product_name:e.item_name,product_id:e.item_id,product_category:a,product_variant_id:e.item_id,product_variant:e.item_variant,product_price:e.price,product_quantity:e.quantity,product_brand:e.item_brand}),n+=e.quantity,i+=e.quantity*e.price}),{lineItems:t,totalvalue:i,numberOfItems:n}}static getMatchingAdvancedPrice(e,t,i){if(!Array.isArray(e)||!e.length)return i;for(let i of e){if(!i||"object"!=typeof i)continue;let e=parseInt(i.quantity,10),n=parseFloat(i.price);if(!(isNaN(e)||isNaN(n))&&t<=e)return n}return i}static getProductFromHeader(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r=!(arguments.length>6)||void 0===arguments[6]||arguments[6],{item_id:s,item_name:c,item_variant:d,item_brand:l,item_category:u,item_category2:m,item_category3:g,item_category4:p,item_category5:_,price:h,extra:v}=window.ga4Product[e],y=+v.listPrice,w=+h,f=+v.taxRate,b=v.parentId;if(Array.isArray(v.advancedPrices)&&v.advancedPrices.length&&t>0){let e=parseInt(v.cartQuantity,10)||0;w=this.getMatchingAdvancedPrice(v.advancedPrices,e+t,w)}let C=0===t?1:t,k=0,I="";return o&&(S.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:e,value:i},{entryString:"ga4_item_list_id",productId:e,value:n},{entryString:"ga4_item_list_name",productId:e,value:a}]),b&&S.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:b,value:i},{entryString:"ga4_item_list_id",productId:b,value:n},{entryString:"ga4_item_list_name",productId:b,value:a}])),r&&(b&&S.getEntry("ga4_item_list_index_",b)?(i=parseInt(S.getEntry("ga4_item_list_index_",b),10),n=S.getEntry("ga4_item_list_id",b)?S.getEntry("ga4_item_list_id",b):n,a=S.getEntry("ga4_item_list_name",b)?S.getEntry("ga4_item_list_name",b):a):s&&S.getEntry("ga4_item_list_index_",s)?(i=S.getEntry("ga4_item_list_index_",s)?parseInt(S.getEntry("ga4_item_list_index_",s),10):i,n=S.getEntry("ga4_item_list_id",s)?S.getEntry("ga4_item_list_id",s):n,a=S.getEntry("ga4_item_list_name",s)?S.getEntry("ga4_item_list_name",s):a):(i=S.getEntry("ga4_item_list_index_",e)?parseInt(S.getEntry("ga4_item_list_index_",e),10):i,n=S.getEntry("ga4_item_list_id",e)?S.getEntry("ga4_item_list_id",e):n,a=S.getEntry("ga4_item_list_name",e)?S.getEntry("ga4_item_list_name",e):a)),window.ga4upCoupon&&(k=Math.round((y-w)*100)/100)>0&&(I="List price"),{adsValue:A.getTaxAwarePrice(w,f),totalAdsValue:A.getTaxAwarePrice(w*C,f),value:w*C,ga:{item_id:s,item_name:c,affiliation:window.ga4affiliation,coupon:I,discount:k,index:i,item_brand:l,item_category:u,item_category2:m||void 0,item_category3:g||void 0,item_category4:p||void 0,item_category5:_||void 0,item_list_id:n,item_list_name:a,item_variant:d,price:w,google_business_vertical:"retail",quantity:C},channel:{item_id:s,item_name:c,index:i,item_brand:l,item_category:u,item_category2:m||void 0,item_category3:g||void 0,item_category4:p||void 0,item_category5:_||void 0,item_list_id:n,item_list_name:a,item_variant:d,price:A.getTaxAwarePrice(w,f),quantity:C}}}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 P{static getItems(e,t,i,n){let a=e.querySelectorAll(".product-box"),o=[],r=[],s=[],c=0,d=0;
1return a.forEach(e=>{let n;if((!0!==e.parentElement.classList.contains("product-slider-item")||!1!==e.parentElement.classList.contains("tns-slide-active"))&&(n=!0===e.hasAttribute("data-product-information")&&JSON.parse(e.getAttribute("data-product-information")).id in window.ga4Product?JSON.parse(e.getAttribute("data-product-information")).id:e.querySelector("input[name=product-id]")&&e.querySelector("input[name=product-id]").value in window.ga4Product?e.querySelector("input[name=product-id]").value:e.querySelector("input[name$='][id]']")&&e.querySelector("input[name$='][id]']").value in window.ga4Product?e.querySelector("input[name$='][id]']").value:e.querySelector("input[name$='][referencedId]']")&&e.querySelector("input[name$='][referencedId]']").value in window.ga4Product?e.querySelector("input[name$='][referencedId]']").value:null)&&window.ga4Product&&window.ga4Product[n]){let a="lineItems["+n+"][quantity]";e.querySelector("input[name='".concat(a,"']"))&&parseInt(e.querySelector("input[name='".concat(a,"']")).value,10),c+=parseFloat(E.getAdsValueFromHeader(n,0).total),r.push(E.getFormUAItemFromHeader(n));let l=E.getProductFromHeader(n,0,d,t,i,!1,!0);s.push(l.channel),o.push(l.ga),window.ga4Product[n].index=d,window.ga4Product[n].item_list_id=t,window.ga4Product[n].item_list_name=i,d++}}),{items:o,adsItems:r,channelItems:s,total:Math.round(100*c)/100}}}let L={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 j{static geteItnlPhone(e,t){if(!e)return;let i=e.trim();i.startsWith("+")&&i.replace("+",""),i=i.replace(/[^1-9]+|0+/g,"");let n=this.getPhonePrefixByCountryCode(t);return"+".concat(n).concat(i)}static gete164Phone(e,t){if(!e)return;let i=e.trim();if(i.startsWith("+"))return i;i=i.replace(/[^1-9]+|0+/g,"");let n=this.getPhonePrefixByCountryCode(t);return"+".concat(n).concat(i)}static getPhonePrefixByCountryCode(e){let t=L[e];return t||(t="",console.error("Phone prefix not found for country code '".concat(e,"'"))),Array.isArray(t)&&(t=t[0]),t}}class F extends k{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]")&&e in window.ga4Product?i=e:"product-id"===t&&e in window.ga4Product?i=e:t.endsWith("][referencedId]")&&e in window.ga4Product&&(i=e)}),!i)return;let n=parseInt(t.get("lineItems["+i+"][quantity]"),10);n||(n=1),T.addToCartFromHeader(i,n,!1,!0,!0)}}class T{static consentUpdated(){dataLayer.cleanPush({event:"consent_updated"})}static login(){let{acceptedMads:e}=window,t={event:"login",ga4_event:"login",method:"mail"};e&&(dataLayer.push({microsoft_ads_object:null}),t.microsoft_ads_object={event:"login",method:"mail"}),dataLayer.cleanPush(t)}static viewItemListAfterChange(e){let t=document.querySelectorAll(".discoga4-pagination-hidden-line-item");new F().trigger(),t&&(window.ga4Product=window.ga4Product||{}
1,t.forEach(e=>{let t=e.getAttribute("data-id");window.ga4Product[t]={currency:e.getAttribute("data-currency"),price:e.getAttribute("data-price"),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"),item_variant:e.getAttribute("data-item_variant"),extra:{minPurchase:e.getAttribute("data-min-purchase"),shopware_id:t,listPrice:e.getAttribute("data-list-price"),item_startPrice:e.getAttribute("data-item_start_price"),taxRate:e.getAttribute("data-tax-rate"),parentId:e.getAttribute("data-parentId")}};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]}),T.viewItemList(e))}static addToCartFromHeader(e,t,i,n,a){let o,r,s,c,d,l={event:"add_to_cart",ga4_event:"add_to_cart"};i&&(l.event="remove_from_cart",l.ga4_event="remove_from_cart",n=!1);let{customTagManagerEnabled:u,ga4AdvancedConsentMode:m,acceptedGa:g,googleAnalyticsEnabled:p,ga4Currency:_,ga4Product:h,acceptedGads:v,googleAdsEnabled:y,ecomm_pagetype:w,acceptedMeta:f,acceptedMads:b,acceptedPinterest:C,acceptedTiktok:k,acceptedOpenAi:I}=window,P=E.getFormUAItemFromHeader(e);if(h&&h[e]){let{index:i,item_list_id:l,item_list_name:u,item_id:m,extra:g}=h[e],p=E.getProductFromHeader(e,t,i,l,u,n,a);c=p.totalAdsValue,d=p.adsValue,s=p.value,o=p.ga,r=p.channel,S.persistAdvancedPrices(e,g),S.setJsonEntry("ga4item_",e,o),S.setEntriesIfMissing([{entryString:"item_startPrice_",productId:e,value:g.item_startPrice},{entryString:"taxRate_",productId:e,value:g.taxRate},{entryString:"productId_",productId:m,value:e},{entryString:"SKU_",productId:e,value:m}])}else if((o=S.getJsonEntry("ga4item_",e))!==null){o.quantity=t,o.discount=Math.round(100*o.discount)/100;let i=E.getSinglePriceFromJsonEntry(o,!0);s=t*i;let n=S.getEntry("taxRate_"+e)?S.getEntry("taxRate_"+e):0;c=(d=A.getTaxAwarePrice(i,n))*t}if(!r){r=o;let e=S.getEntry("taxRate_"+o.item_id)?S.getEntry("taxRate_"+o.item_id):0;d=A.getTaxAwarePrice(o.price,e)}if((m||g)&&p&&(dataLayer.push({ecommerce:null}),l.ecommerce={currency:_,value:parseFloat(s.toFixed(2)),items:[o]}),(m||v)&&y&&(dataLayer.push({items:null}),l.value=parseFloat(c.toFixed(2)),l.items=[P]),f){dataLayer.push({meta_object:null});let e=E.getMetaItemFromItem(r,d);l.meta_object={meta_event:i?"RemoveFromCart":"AddToCart",meta_object_data:{value:parseFloat(c.toFixed(2)),currency:_,contents:[e.contents],content_type:"product",content_name:e.name,content_category:e.category}}}if(b){dataLayer.push({microsoft_ads_object:null});let e=E.getMadsItemFromItem(r,d);e?l.microsoft_ads_object={event:i?"remove_from_cart":"add_to_cart",ecomm_prodid:e.ecomm_prodid,ecomm_pagetype:w,ecomm_totalvalue:parseFloat(c.toFixed(2)),revenue_value:parseFloat(c.toFixed(2)),currency:_,items:[e.lineItem]}:l.microsoft_ads_object={event:i?"remove_from_cart":"add_to_cart",ecomm_prodid:[],ecomm_pagetype:w,ecomm_totalvalue:parseFloat(c.toFixed(2)),revenue_value:parseFloat(c.toFixed(2)),currency:_,items:void 0}}if(C&&!i){dataLayer.push({pinterest_object:null});let e=E.getPinterestItemFromItem(r,d);if(e?l.pinterest_object={pinterest_event:"addtocart",value:parseFloat(c.toFixed(2)),currency:_,line_items:[e]}:l.pinterest_object={pinterest_event:"addtocart",currency:_,value:parseFloat(c.toFixed(2)),line_items:void 0},u){dataLayer.push({pinterest_object_serverside:null});let e=E.getPinterestContentsFromItems([r]);e?l.pinterest_object_serverside={event_name:"add_to_cart",currency:_,value:c.toFixed(2).toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}:l.pinterest_object_serverside={event_name:"add_to_cart",currency:_,value:parseFloat(c.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}}if(k){dataLayer.push({tiktok_object:null});let e=E.getTikTokItemFromItem(r,d);e?l.tiktok_object={tiktok_event:"AddToCart",currency:_,value:parseFloat(c.toFixed(2)),quantity:e.quantity,content_type:"product",contents:[e.lineItem]}:l.tiktok_object={tiktok_event:"AddToCart",currency:_,value:void 0,quantity:void 0,content_type:"product",line_items:void 0}}if(I){dataLayer.push({openai_object:null});let e=E.getOpenAiItemFromItem(r,d);e?l.openai_object={openai_event:"items_added",type:"contents",amount:A.toMinor(c),currency:_,contents:[e.lineItem]}:l.openai_object={openai_event:"items_added",type:"contents",amount:void 0,currency:_,contents:void 0}}if(dataLayer.cleanPush(l),window.ga4Product&&window.ga4Product[e]&&window.ga4Product[e].extra){let n=parseInt(window.ga4Product[e].extra.cartQuantity,10)||0;i?window.ga4Product[e].extra.cartQuantity=n-t:window.ga4Product[e].extra.cartQuantity=n+t}}static viewItemList(e,t){let i,n,a,o;let{customTagManagerEnabled:r,ga4activeNavigationId:s,searchTerm:c,searchResult:d,ga4AdvancedConsentMode:l,acceptedGa:u,googleAnalyticsEnabled:m,acceptedGads:g,ga4activeNavigationName:p,googleAdsEnabled:_,ga4Currency:h,ecomm_pagetype:v,acceptedMeta:y,acceptedMads:w,acceptedPinterest:f}=window;if("category"===e?(i=document.querySelector(".cms-element-product-listing"),n=s||"",a=document.title):"search"===e?(i=document.querySelector(".cms-element-product-listing-wrapper"),n="search="+c,a="search"):"productCrossSelling"===e?(i=t,n=t&&t.getAttribute("aria-labelledby")?t.getAttribute("aria-labelledby"):"cross selling",a=document.querySelector("#"+n).innerText):(n=(i=t)&&i.getAttribute("data-cms-element-id")?i.getAttribute("data-cms-element-id"):"cms element",a=e.toString()),!i)return;let b={event:"view_item_list",ga4_event:"view_item_list"},C=P.getItems(i,n,a),k=C.items;(l||u)&&m&&(dataLayer.push({ecommerce:null}),b.ecommerce={item_list_id:n,item_list_name:a,items:k});let S=0;if((o=C.adsItems)&&(S=C.total,(l||g)&&_&&(dataLayer.push({items:null}),b.value=parseFloat(S.toFixed(2)),b.items=o)),"search"===e&&this.viewSearchResults(o,S),"search"===e&&y){dataLayer.push({meta_object:null});let e=d?E.getMetaItemsFromWindow("view_search_results"):void 0;b.meta_object={meta_event:"Search",meta_object_data:{contents:e?e.contents:void 0,content_type:"product",search_string:c}}}if(w){dataLayer.push({microsoft_ads_object:null});let t=E.getMadsItemsFromItems(C.channelItems);t?b.microsoft_ads_object={event:"view_item_list",ecomm_category:"category"===e?p:void 0,ecomm_prodid:t.ecomm_prodid,ecomm_pagetype:v,ecomm_totalvalue:parseFloat(S.toFixed(2)),revenue_value:parseFloat(S.toFixed(2)),currency:h,items:t.lineItems}:b.microsoft_ads_object={event:"view_item_list",ecomm_category:"category"===e?window.ga4activeNavigationName:void 0,ecomm_prodid:[],ecomm_pagetype:v,ecomm_totalvalue:void 0,revenue_value:void 0,currency:h,items:[]}}if(dataLayer.cleanPush(b),f&&"category"===e){let e={event:"view_category"};dataLayer.push({pinterest_object:null,microsoft_ads_object:null,meta_object:null,ecommerce:null});let t=E.getPinterestItemsFromItems(k);if(t?e.pinterest_object={pinterest_event:"viewcategory",currency:h,value:parseFloat(S.toFixed(2)),line_items:t.lineItems}:e.pinterest_object={pinterest_event:"viewcategory",currency:h,value:parseFloat(S.toFixed(2)),line_items:void 0},r){dataLayer.push({pinterest_object_serverside:null});let t=E.getPinterestContentsFromItems(C.channelItems);t?e.pinterest_object_serverside={event_name:"view_category",currency:h,value:parseFloat(S.toFixed(2)).toString(),content_ids:t.ids,content_name:window.document.title,contents:t.contents,num_items:t.numberOfItems}:e.pinterest_object_serverside={event_name:"view_category",currency:h,value:parseFloat(S.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}dataLayer.cleanPush(e)}}static viewItemFromHeader(e){if(!e)return;let{customTagManagerEnabled:t,ga4Product:i,ga4Currency:n,ga4AdvancedConsentMode:a,acceptedGa:o,googleAnalyticsEnabled:r,acceptedGads:s,googleAdsEnabled:c,ecomm_pagetype:d,acceptedMeta:l,acceptedMads:u,acceptedPinterest:m,acceptedTiktok:g,acceptedOpenAi:p}=window;i[e].index=0,i[e].item_list_id="product",i[e].item_list_name="product";let _={event:"view_item",ga4_event:"view_item"},h=E.getProductFromHeader(e,0,0,"product","product",!1,!0),v=h.adsValue,y=h.value;if((a||o)&&r&&(dataLayer.push({ecommerce:null}),_.ecommerce={currency:n,value:y,items:[h.ga]}),(a||s)&&c&&(dataLayer.push({items:null}),_.value=v,_.items=[E.getFormUAItemFromHeader(e)]),l){dataLayer.push({meta_object:null});let e=E.getMetaItemFromItem(h.channel);_.meta_object={meta_event:"ViewContent",meta_object_data:{value:parseFloat(v.toFixed(2)),currency:n,contents:[e.contents],content_type:"product",content_name:e.name,content_category:e.category}}}if(u){dataLayer.push({microsoft_ads_object:null});let e=E.getMadsItemFromItem(h.channel);e?_.microsoft_ads_object={event:"view_item",ecomm_prodid:e.ecomm_prodid,ecomm_pagetype:d,ecomm_totalvalue:parseFloat(v.toFixed(2)),revenue_value:parseFloat(v.toFixed(2)),currency:n,items:[e.lineItem]}:_.microsoft_ads_object={event:"view_item",ecomm_prodid:[],ecomm_pagetype:d,ecomm_totalvalue:parseFloat(v.toFixed(2)),revenue_value:parseFloat(v.toFixed(2)),currency:n,items:void 0}}if(m){dataLayer.push({pinterest_object:null});let e=E.getPinterestItemFromItem(h.channel);if(e?_.pinterest_object={pinterest_event:"pagevisit",currency:n,value:parseFloat(v.toFixed(2)),line_items:[e]}:_.pinterest_object={pinterest_event:"pagevisit",currency:n,value:parseFloat(v.toFixed(2)),line_items:void 0},t){dataLayer.push({pinterest_object_serverside:null});let e=E.getPinterestContentsFromItems([h.channel]);e?_.pinterest_object_serverside={event_name:"view_content",currency:n,value:parseFloat(v.toFixed(2)).toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}:_.pinterest_object_serverside={event_name:"view_content",currency:n,value:parseFloat(v.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}}if(g){dataLayer.push({tiktok_object:null});let e=E.getTikTokItemFromItem(h.channel);e?_.tiktok_object={tiktok_event:"ViewContent",currency:n,value:parseFloat(v.toFixed(2)),content_type:"product",contents:[e.lineItem]}:_.tiktok_object={tiktok_event:"ViewContent",currency:n,value:void 0,content_type:"product",contents:void 0}}if(p){dataLayer.push({openai_object:null});let e=E.getOpenAiItemFromItem(h.channel,v);e?_.openai_object={openai_event:"contents_viewed",type:"contents",amount:A.toMinor(v),currency:n,contents:[e.lineItem]}:_.openai_object={openai_event:"contents_viewed",type:"contents",amount:void 0,currency:n,contents:void 0}}S.setJsonEntry("ga4item_",e,h.ga),dataLayer.cleanPush(_)}static selectItem(e,t,i){if(!e)return;let{ga4Currency:n,ecomm_pagetype:a,acceptedMads:o}=window;dataLayer.push({ecommerce:null,value:null,items:null,meta_object:null,microsoft_ads_object:null});let r={event:"select_item",ga4_event:"select_item"};if(r.ecommerce={item_list_id:t,item_list_name:i,items:[e]},o){let t=S.getEntry("taxRate_"+e.item_id)?S.getEntry("taxRate_"+e.item_id):0,i=A.getTaxAwarePrice(e.price,t),o=E.getMadsItemFromItem(e,i);o?r.microsoft_ads_object={event:"select_content",ecomm_prodid:o.ecomm_prodid,ecomm_pagetype:a,ecomm_totalvalue:parseFloat(o.totalvalue.toFixed(2)),revenue_value:parseFloat(o.totalvalue.toFixed(2)),currency:n,items:[o.lineItem]}:r.microsoft_ads_object={event:"select_content",ecomm_prodid:[],ecomm_pagetype:a,ecomm_totalvalue:void 0,revenue_value:void 0,currency:n,items:void 0}}dataLayer.cleanPush(r)}static addToCartFromForm(e){if(!e)return;let t={event:"add_to_cart",ga4_event:"add_to_cart"},{acceptedMeta:i,ga4Currency:n}=window;dataLayer.push({ecommerce:null,value:null,items:null}),t.ecommerce={currency:n,items:[e]},i&&(dataLayer.push({meta_object:null}),t.meta_object={meta_event:"AddToCart",meta_object_data:{value:void 0,currency:n,contents:[{id:e.item_id,item_price:void 0}],content_type:"product",content_name:void 0,content_category:void 0}}),dataLayer.cleanPush(t)}static addToWishlist(e,t){if(!e)return;let i={event:"add_to_wishlist",ga4_event:"add_to_wishlist"},{ga4Currency:n,acceptedMeta:a,acceptedTiktok:o,acceptedMads:r,ecomm_pagetype:s,acceptedPinterest:c,customTagManagerEnabled:d}=window;dataLayer.push({ecommerce:null,value:null,items:null});let l=parseFloat(t.toFixed(2));i.ecommerce={currency:n,value:l,items:[e]};let u=S.getEntry("taxRate_"+e.item_id)?S.getEntry("taxRate_"+e.item_id):0,m=A.getTaxAwarePrice(e.price,u);if(a){dataLayer.push({meta_object:null});let t=E.getMetaItemFromItem(e,m);i.meta_object={meta_event:"AddToWishlist",meta_object_data:{value:parseFloat(m.toFixed(2)),currency:n,contents:[t.contents],content_type:"product",content_name:t.name,content_category:t.category}}}if(r){dataLayer.push({microsoft_ads_object:null});let t=E.getMadsItemFromItem(e,m);i.microsoft_ads_object={event:"add_to_wishlist",ecomm_prodid:t.ecomm_prodid,ecomm_pagetype:s,ecomm_totalvalue:parseFloat(m.toFixed(2)),revenue_value:parseFloat(m.toFixed(2)),currency:n,items:[t.lineItem]}}if(c){dataLayer.push({pinterest_object:null});let t=E.getPinterestItemFromItem(e,m);if(t?i.pinterest_object={pinterest_event:"addtowishlist",currency:n,value:parseFloat(m.toFixed(2)),line_items:[t]}:i.pinterest_object={pinterest_event:"addtowishlist",currency:n,value:parseFloat(m.toFixed(2)),line_items:void 0},d){dataLayer.push({pinterest_object_serverside:null});let t=E.getPinterestContentsFromItems([e]);t?i.pinterest_object_serverside={event_name:"add_to_wishlist",currency:n,value:parseFloat(m.toFixed(2)).toString(),content_ids:t.ids,content_name:window.document.title,contents:t.contents,num_items:t.numberOfItems}:i.pinterest_object_serverside={event_name:"add_to_wishlist",currency:n,value:parseFloat(m.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}}if(o){dataLayer.push({tiktok_object:null});let t=E.getTikTokItemFromItem(e,m);t?i.tiktok_object={tiktok_event:"AddToWishlist",currency:n,value:parseFloat(t.totalvalue.toFixed(2)),content_type:"product",contents:[t.lineItem]}:i.tiktok_object={tiktok_event:"AddToWishlist",currency:n,value:void 0,content_type:"product",line_items:void 0}}dataLayer.cleanPush(i)}static shippingInfo(e,t){if(!e||Array.isArray(e)&&0===e.length||!t)return;let{ga4Currency:i}=window;dataLayer.push({ecommerce:null,value:null,items:null});let n=I.getItemsFromContainer(e);dataLayer.cleanPush({event:"add_shipping_info",ga4_event:"add_shipping_info",ecommerce:{currency:i,value:n.net,coupon:n.coupon,shipping_tier:t.toString(),items:n.items}})}static paymentInfo(e,t){if(!e||Array.isArray(e)&&0===e.length||!t)return;let{acceptedMeta:i,acceptedMads:n,acceptedTiktok:a,ga4Currency:o,ecomm_pagetype:r,acceptedPinterest:s,customTagManagerEnabled:c}=window;dataLayer.push({ecommerce:null,value:null,items:null});let d=I.getItemsFromContainer(e),l={event:"add_payment_info",ga4_event:"add_payment_info"},u=d.items,m=parseFloat(e.dataset.tax),g=parseFloat(e.dataset.shipping),p=parseFloat(e.dataset.shippingtax),_=d.ads_items,h=d.net,v="brutto"===window.taxConfiguration?d.gross:d.net,y=A.getTaxShippingAwarePrice(h,m,g,p);if(l.ecommerce={currency:o,value:v,coupon:d.coupon,payment_type:t.toString(),items:u},i&&(dataLayer.push({meta_object:null}),l.meta_object={meta_event:"AddPaymentInfo"}),n){dataLayer.push({microsoft_ads_object:null});let e=E.getMadsItemsFromItems(_);e&&e.ecomm_prodid?l.microsoft_ads_object={event:"add_payment_info",ecomm_prodid:e.ecomm_prodid,ecomm_pagetype:r}:l.microsoft_ads_object={event:"add_payment_info",ecomm_prodid:void 0,ecomm_pagetype:r}}if(s){dataLayer.push({pinterest_object:null});let e=E.getPinterestItemsFromItems(_);if(l.pinterest_object={pinterest_event:"addpaymentinfo",value:y,currency:o,line_items:e?e.lineItems:void 0},c){dataLayer.push({pinterest_object_serverside:null});let e=E.getPinterestContentsFromItems(_);l.pinterest_object_serverside={event_name:"add_payment_info",currency:o,value:y.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}}}if(a){dataLayer.push({tiktok_object:null});let e=E.getTikTokItemsFromItems(_);e?l.tiktok_object={tiktok_event:"AddPaymentInfo",currency:o,value:y,content_type:"product",contents:e.lineItems}:l.tiktok_ob
1ject={tiktok_event:"AddPaymentInfo",currency:o,value:v,content_type:"product",contents:void 0}}dataLayer.cleanPush(l)}static async purchase(e,t){let i={event:"purchase",ga4_event:"purchase"},{customTagManagerEnabled:n,ga4Currency:a,ga4AdvancedConsentMode:o,acceptedGa:r,googleAnalyticsEnabled:s,ga4CustomerLifetimeValue:c,ga4CustomerOrderCount:d,acceptedGads:l,googleAdsEnabled:u,ecomm_pagetype:m,acceptedMeta:g,acceptedMads:p,acceptedPinterest:_,acceptedTiktok:h,acceptedOpenAi:v}=window,y=t.dataset.useremail,w=t.dataset.usergroup,f=t.dataset.salutation,b="not_specified";"mr"===f?b="male":"mrs"===f&&(b="female");let C=await this.sha256(y),k=t.dataset.firstname,S=await this.sha256(k),P=t.dataset.lastname,L=await this.sha256(P),F=t.dataset.street,q=t.dataset.city,x=t.dataset.zip,M=t.dataset.region,O=t.dataset.land,N=t.dataset.phone,D=await this.sha256(N),R=j.gete164Phone(N,O),G=await this.sha256(R),B=j.geteItnlPhone(N,O),U=await this.sha256(B),V=window.ga4OrderNumber.toString(),J=await T.sha256(V),Q=I.getItemsFromContainer(e),H=parseFloat(e.dataset.tax),W=parseFloat(e.dataset.shipping),$=parseFloat(e.dataset.shippingtax),K=e.dataset.taxstatus,Y=parseFloat(Q.discount),z=Q.code,Z=Q.net,X="brutto"===window.taxConfiguration?Q.gross+W:Q.net,ee=A.getTaxShippingAwarePrice(Z,H,W,$),et=W;switch(!0){case"netto"===window.taxConfiguration&&"net"===K:et=W;break;case"netto"===window.taxConfiguration&&"gross"===K:et=W-$;break;case"brutto"===window.taxConfiguration&&"net"===K:et=W+$;break;case"brutto"===window.taxConfiguration&&"gross"===K:et=W}let ei={transaction_id:V,value:X,tax:H,shipping:et,currency:window.ga4Currency,coupon:Q.coupon,customer_type:!(d&&d<=1)&&c?"returning":"new",items:Q.items};if((o||r)&&s&&e&&(dataLayer.push({ecommerce:null}),i.ecommerce=ei,i.coupon_code=z),(o||l)&&u&&t){i.value=ee,i.transaction_id=V,i.currency=a,i.discount=Y,dataLayer.push({items:null}),i.items=E.getGAdsItemsFromItems(Q.ads_items).items,i.email=C,i.phone_number=G;let e={};e.first_name=S,e.last_name=L,e.street=F,e.city=q,e.region=M,e.postal_code=x,e.country=O,i.address=e}if(g){dataLayer.push({meta_object:null});let e=E.getMetaItemsFromItems(Q.ads_items);i.meta_object={meta_event:"Purchase",meta_object_data:{value:ee,currency:a,contents:e.contents,content_type:"product",num_items:e.numberOfItems,order_id:V}}}if(p){dataLayer.push({microsoft_ads_object:null});let e=E.getMadsItemsFromItems(Q.ads_items);i.microsoft_ads_object={event:"purchase",transaction_id:V,ecomm_prodid:e?e.ecomm_prodid:void 0,ecomm_pagetype:m,ecomm_totalvalue:ee,revenue_value:ee,currency:a,tax:ei.tax,shipping:ei.shipping,items:e?e.lineItems:void 0}}if(_){dataLayer.push({pinterest_object:null});let e=E.getPinterestItemsFromItems(Q.ads_items);if(i.pinterest_object={pinterest_event:"checkout",order_quantity:e?e.numberOfItems:void 0,currency:a,value:ee,order_id:V,promo_code:z,line_items:e?e.lineItems:void 0},n){dataLayer.push({pinterest_object_serverside:null});let e=E.getPinterestContentsFromItems(Q.ads_items);i.pinterest_object_serverside={event_name:"checkout",currency:a,value:ee.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems,order_id:V}}}if(h){dataLayer.push({tiktok_object:null});let e=E.getTikTokItemsFromItems(Q.ads_items);e?i.tiktok_object={tiktok_event:"CompletePayment",currency:a,quantity:e.numberOfItems,value:ee,content_type:"product",contents:e.lineItems}:i.tiktok_object={tiktok_event:"CompletePayment",currency:a,quantity:void 0,value:ee,content_type:"product",contents:void 0}}if(v){dataLayer.push({openai_object:null});let e=E.getOpenAiItemsFromItems(Q.ads_items);e?i.openai_object={openai_event:"order_created",type:"contents",event_id:V,amount:A.toMinor(ee),currency:a,contents:e.lineItems}:i.openai_object={openai_event:"order_created",type:"contents",event_id:V,amount:void 0,currency:a,contents:void 0}}i.additional={email:y,customer_group:w,sha256_email:C,first_name:k,sha256_first_name:S,last_name:P,sha256_last_name:L,e164_phone_number:R,sha256_e164_phone_number:G,phone_number:N,sha256_phone_number:D,phone_number_international:B,sha256_phone_number_international:U,gender:b,street:F,city:q,postal_code:x,region:M,country:O,transaction_id:V,sha256_transaction_id:J},dataLayer.cleanPush(i)}static viewCart(e){dataLayer.push({ecommerce:null,value:null,items:null}),dataLayer.cleanPush({event:"view_cart",ga4_event:"view_cart",ecommerce:this.cartContent(e),coupon_code:I.getCoupon(e).code})}static beginCheckout(e){let t={event:"begin_checkout",ga4_event:"begin_checkout"},{ga4Currency:i,ecomm_pagetype:n,acceptedMeta:a,acceptedMads:o,acceptedTiktok:r,customTagManagerEnabled:s,acceptedPinterest:c,acceptedOpenAi:d}=window;dataLayer.push({ecommerce:null,value:null,items:null});let l=I.getItemsFromContainer(e),u=l.items,m=l.ads_items,g=parseFloat(e.dataset.tax),p=parseFloat(e.dataset.shipping),_=parseFloat(e.dataset.shippingtax),h=l.net,v="brutto"===window.taxConfiguration?l.gross:l.net,y=A.getTaxShippingAwarePrice(h,g,p,_);if(t.ecommerce={currency:i,value:v,coupon:l.coupon,items:u},a){dataLayer.push({meta_object:null});let e=E.getMetaItemsFromItems(m);t.meta_object={meta_event:"InitiateCheckout",meta_object_data:{value:y,currency:i,contents:e.contents,content_type:"product",num_items:e.numberOfItems}}}if(o){dataLayer.push({microsoft_ads_object:null});let e=E.getMadsItemsFromItems(m);t.microsoft_ads_object={event:"begin_checkout",ecomm_prodid:e?e.ecomm_prodid:void 0,ecomm_pagetype:n,ecomm_totalvalue:y,revenue_value:y,currency:i,items:e?e.lineItems:void 0}}if(c){dataLayer.push({pinterest_object:null});let e=E.getPinterestItemsFromItems(l.ads_items);if(t.pinterest_object={pinterest_event:"initiatecheckout",value:y,currency:i,line_items:e?e.lineItems:void 0},s){dataLayer.push({pinterest_object_serverside:null});let e=E.getPinterestContentsFromItems(m);t.pinterest_object_serverside={event_name:"initiate_checkout",currency:i,value:y.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}}}if(r){dataLayer.push({tiktok_object:null});let e=E.getTikTokItemsFromItems(m);e?t.tiktok_object={tiktok_event:"InitiateCheckout",currency:i,value:y,content_type:"product",contents:e.lineItems}:t.tiktok_object={tiktok_event:"InitiateCheckout",currency:i,value:v,content_type:"product",contents:void 0}}if(d){dataLayer.push({openai_object:null});let e=E.getOpenAiItemsFromItems(m);e?t.openai_object={openai_event:"checkout_started",type:"contents",amount:A.toMinor(y),currency:i,contents:e.lineItems}:t.openai_object={openai_event:"checkout_started",type:"contents",amount:void 0,currency:i,contents:void 0}}dataLayer.cleanPush(t)}static signUp(){let{acceptedMeta:e,acceptedMads:t,acceptedPinterest:i,acceptedTiktok:n,acceptedOpenAi:a,ga4UserId:o,customTagManagerEnabled:r}=window,s={event:"sign_up",ga4_event:"sign_up",method:"mail"};e&&(dataLayer.push({meta_object:null}),s.meta_object={meta_event:"CompleteRegistration"}),t&&(dataLayer.push({microsoft_ads_object:null}),s.microsoft_ads_object={event:"sign_up",method:"mail"}),i&&(dataLayer.push({pinterest_object:null}),s.pinterest_object={pinterest_event:"signup"},r&&(dataLayer.push({pinterest_object_serverside:null}),s.pinterest_object_serverside={event_name:"signup"})),n&&(dataLayer.push({tiktok_object:null}),s.tiktok_object={tiktok_event:"CompleteRegistration"}
1),a&&(dataLayer.push({openai_object:null}),s.openai_object={openai_event:"registration_completed",type:"customer_action",event_id:"reg_"+o}),dataLayer.cleanPush(s)}static viewSearchResults(e,t){let i={event:"view_search_results",ga4_event:"view_search_results"};dataLayer.push({ecommerce:null});let{searchTerm:n,searchResult:a,ga4AdvancedConsentMode:o,acceptedGads:r,googleAdsEnabled:s,ecomm_pagetype:c,acceptedMeta:d,acceptedMads:l}=window;if(i.search_term=n,i.search_result=0,a&&(i.search_result=parseInt(a,10)),(o||r)&&s&&t&&e&&(dataLayer.push({items:null}),i.value=parseFloat(t),i.items=e),d){dataLayer.push({meta_object:null});let e=a?E.getMetaItemsFromWindow("view_search_results"):void 0;i.meta_object={meta_event:"Search",meta_object_data:{contents:e?e.contents:void 0,content_type:"product",search_string:n}}}if(l){dataLayer.push({microsoft_ads_object:null});let e=[];window.ga4Product&&Object.entries(JSON.parse(JSON.stringify(window.ga4Product))).forEach(t=>{t[1]&&e.push(t[1].item_id)}),e?i.microsoft_ads_object={event:"view_search_results",ecomm_query:n,ecomm_prodid:e,ecomm_pagetype:c,search_term:n}:i.microsoft_ads_object={event:"view_search_results",ecomm_query:n,ecomm_prodid:[],ecomm_pagetype:c,search_term:n}}dataLayer.cleanPush(i)}static changeQtyNumber(e){let t,i,n;let a=e.target;if(!a)return;let o=a.getAttribute("value")-a.value;if(a.closest(".cart-item"))t=a.closest(".cart-item").querySelector(".cart-item-remove-button");else{if(!a.closest(".line-item"))return;t=a.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");n=S.getEntry("productId_",e)}n&&this.addToCartFromHeader(n,Math.abs(o),o>0,!1,!0)}static changeQty(e){let t,i,n;let a=e.target,o=a.querySelector("[selected='selected']").value-a.value;if(a.closest(".cart-item"))t=a.closest(".cart-item").querySelector(".cart-item-remove-button");else{if(!a.closest(".line-item"))return;t=a.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");n=S.getEntry("productId_",e)}n&&this.addToCartFromHeader(n,Math.abs(o),o>0,!1,!0)}static searchSuggested(e,t){if(!e&&!t)return;let{acceptedMeta:i,acceptedMads:n,acceptedPinterest:a,acceptedTiktok:o,customTagManagerEnabled:r}=window;dataLayer.push({ecommerce:null});let s={event:"search",ga4_event:"search",search_term:e,search_result:parseInt(t,10)};if(i){dataLayer.push({meta_object:null});let i=t?E.getMetaItemsFromWindow("suggest"):void 0;s.meta_object={meta_event:"Search",meta_object_data:{contents:i?i.contents:void 0,content_type:"product",search_string:e}}}if(n&&(dataLayer.push({microsoft_ads_object:null}),s.microsoft_ads_object={event:"search",search_term:e}),a&&(dataLayer.push({pinterest_object:null}),s.pinterest_object={pinterest_event:"search",search_query:e},r)){dataLayer.push({pinterest_object_serverside:null});let t=E.getPinterestContentsFromWindow("suggest");t?s.pinterest_object_serverside={event_name:"search",currency:ga4Currency,value:t.totalvalue.toString(),content_ids:t.ids,content_name:window.document.title,contents:t.contents,num_items:t.numberOfItems,search_string:e}:s.pinterest_object_serverside={event_name:"search",search_query:e}}o&&(dataLayer.push({tiktok_object:null}),s.tiktok_object={tiktok_event:"Search",query:e}),dataLayer.cleanPush(s)}static search(){dataLayer.push({ecommerce:null});let{acceptedMads:e,acceptedPinterest:t,searchTerm:i,searchResult:n,customTagManagerEnabled:a}=window,o={event:"search",ga4_event:"search",search_term:i||void 0,search_result:n?parseInt(n,10):0};if(e&&(dataLayer.push({microsoft_ads_object:null}),o.microsoft_ads_object={event:"search",search_term:i}),t&&(dataLayer.push({pinterest_object:null}),o.pinterest_object={pinterest_event:"search",search_query:i},a)){dataLayer.push({pinterest_object_serverside:null});let e=E.getPinterestContentsFromWindow("view_search_results");e?o.pinterest_object_serverside={event_name:"search",currency:ga4Currency,value:e.totalvalue.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems,search_string:i}:o.pinterest_object_serverside={event_name:"search",currency:ga4Currency,value:"0",content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:0,search_string:i}}dataLayer.cleanPush(o)}static addCoupon(e){dataLayer.push({ecommerce:null}),dataLayer.cleanPush({event:"add_coupon_code",ga4_event:"add_coupon_code",coupon_code:e})}static async lead(){dataLayer.push({ecommerce:null,value:null,items:null});let{ga4Currency:e,ecomm_pagetype:t,acceptedMeta:i,acceptedMads:n,acceptedPinterest:a,acceptedTiktok:o,acceptedOpenAi:r,generateLeadValue:s,customTagManagerEnabled:c}=window,d=parseFloat(s),l={event:"generate_lead",ga4_event:"generate_lead",currency:e,value:d};if(i&&(dataLayer.push({meta_object:null}),l.meta_object={meta_event:"Lead",meta_object_data:{value:d,currency:e}}),n&&(dataLayer.push({microsoft_ads_object:null}),l.microsoft_ads_object={event:"generate_lead",ecomm_pagetype:t,ecomm_totalvalue:d,revenue_value:d,currency:e}),a&&(dataLayer.push({pinterest_object:null}),l.pinterest_object={pinterest_event:"lead",lead_type:"Contactform"},c&&(dataLayer.push({pinterest_object_serverside:null}),l.pinterest_object_serverside={event_name:"lead"})),o&&(dataLayer.push({tiktok_object:null}),l.tiktok_object={tiktok_event:"SubmitForm"}),r){let e=await this.sha256(Date.now().toString()),t="lead_"+(e?e.substring(0,8):Date.now().toString(36));dataLayer.push({openai_object:null}
1),l.openai_object={openai_event:"lead_created",type:"customer_action",event_id:t}}dataLayer.cleanPush(l)}static cartContent(e){let t=I.getItemsFromContainer(e);return{currency:window.ga4Currency,value:"brutto"===window.taxConfiguration?t.gross:t.net,coupon:t.coupon,items:t.items}}static checkoutContent(e,t){let i=I.getItemsFromContainer(e);return{transaction_id:t,value:"brutto"===window.taxConfiguration?i.gross:i.net,tax:parseFloat(e.dataset.tax),shipping:parseFloat(e.dataset.shipping),currency:window.ga4Currency,coupon:i.coupon,items:i.items}}static async sha256(e){if(!e)return;let t=e.trim();if(!t)return;let i=new TextEncoder("utf-8").encode(t.toLowerCase()),n=await crypto.subtle.digest("SHA-256",i);return this.hex(n)}static hex(e){let t="",i=new DataView(e);for(let e=0;e<i.byteLength;e+=4){let n=i.getUint32(e).toString(16),a="00000000";t+=(a+n).slice(-a.length)}return t}static getTaxAwareItemPrice(e,t){return e*(1+t/100)}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}}class q extends k{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)));let n=document.querySelector(".offcanvas-cart-promotion-form");n&&n.addEventListener("submit",this._onAddPromotionOffcanvasCart.bind(this))}_onAddPromotionOffcanvasCart(){if(document.getElementById("addPromotionOffcanvasCartInput")&&document.getElementById("addPromotionOffcanvasCartInput").value){let e=document.getElementById("addPromotionOffcanvasCartInput").value;T.addCoupon(e),S.setSimpleEntry("couponCode",e)}}_onChangeProductQuantity(e){T.changeQty(e)}_onChangeProductQuantityNumber(e){T.changeQtyNumber(e)}_onBeginCheckoutSidebar(){let e=I.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||T.beginCheckout(e)}_triggerViewCart(){let e=I.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||T.viewCart(e)}}class x{disableAction(){this.actionEnabled=!1}trigger(){}constructor(){this.actionEnabled=!0}}class M extends x{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 n=document.querySelectorAll(".js-quantity-selector");n&&n.forEach(e=>e.addEventListener("change",this._onChangeProductQuantityNumber.bind(this)));let a=document.querySelector(".cart-add-promotion");a&&a.addEventListener("submit",this._onAddPromotion.bind(this))}_onAddPromotion(){if(document.getElementById("addPromotionInput")&&document.getElementById("addPromotionInput").value){let e=document.getElementById("addPromotionInput").value;T.addCoupon(e),S.setSimpleEntry("couponCode",e)}}_addProduct(e){if(!this.actionEnabled)return;let t={item_id:e.currentTarget.querySelector(".form-control").value,quantity:1,affiliation:window.ga4affiliation,item_list_id:"checkout",item_list_name:"checkout"};T.addToCartFromForm(t)}_triggerViewCart(){if(!this.actionEnabled)return;let e=I.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||T.viewCart(e)}_onBeginCheckoutPage(){if(!this.actionEnabled)return;let e=I.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||T.beginCheckout(e)}_onChangeProductQuantity(e){T.changeQty(e)}_onChangeProductQuantityNumber(e){T.changeQtyNumber(e)}}class O extends x{trigger(){if(S.getSimpleEntry("purchaseSent")&&S.getSimpleEntry("purchaseSent")===new URLSearchParams(window.location.search).get("orderId"))return;let e=I.lineItemsContainer();return this._finish(e)}async _finish(e){if(!this.actionEnabled)return;S.getSimpleEntry("paymentSelected")&&"yes"===S.getSimpleEntry("paymentSelected")?console.info("paymentInfo sent in previous page"):(window.ga4PaymentMethod&&T.paymentInfo(e,window.ga4PaymentMethod),S.setSimpleEntry("paymentSelected","yes")),S.getSimpleEntry("shippingSelected")&&"yes"===S.getSimpleEntry("shippingSelected")?console.info("shippingInfo sent in previous page"):(window.ga4ShippingMethod&&T.shippingInfo(e,window.ga4ShippingMethod),S.setSimpleEntry("shippingSelected","yes"));let t=document.querySelector(".ga4-hidden-ads-information");window.ga4OrderNumber&&(await new Promise(e=>setTimeout(e,800)),await T.purchase(e,t),S.setSimpleEntry("purchaseSent",new URLSearchParams(window.location.search).get("orderId")),localStorage.removeItem("paymentSelected"),localStorage.removeItem("shippingSelected"),localStorage.removeItem("couponCode"))}}class N extends x{trigger(){this._triggerViewItem()}_triggerViewItem(){let e;if(!this.actionEnabled)return;let t=document.getElementById("productDetailPageBuyProductForm");t&&(t.querySelector("input[name$='][id]']")&&(e=t.querySelector("input[name$='][id]']").value)in window.ga4Product?T.viewItemFromHeader(e,1):t.querySelector("input[name$='][referencedId]']")&&(e=t.querySelector("input[name$='][referencedId]']").value)in window.ga4Product?T.viewItemFromHeader(e,1):t.querySelector("input[name=product-id]")&&(e=t.querySelector("input[name=product-id]").value)in window.ga4Product&&T.viewItemFromHeader(e,1))}}class D extends x{trigger(){this._triggerViewItemList(),document.querySelector(".cms-element-product-listing-wrapper")&&this._documentObserver(".cms-element-product-listing-wrapper")}_triggerViewItemList(){this.actionEnabled&&T.viewItemList("category")}_documentObserver(e){let t=document.querySelector(e),i=!1;new MutationObserver(function(e){for(let t of e)if("childList"===t.type&&t.target.classList.contains("cms-element-product-listing")){i=!0;break}i&&setTimeout(function(){T.viewItemListAfterChange("category")},1e3),i=!1}).observe(t,{subtree:!0,childList:!0})}}class R extends x{trigger(){let e=document.querySelectorAll(".cms-section");e&&R._nodeDeletedObserver(e),this._documentObserver()}_documentObserver(){let e=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEac
1h(function(t){t.hasChildNodes()&&t.querySelector(".cms-element-form")&&(R._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")&&(T.lead(),t.disconnect())})})});e.forEach(e=>{e.querySelector(".cms-element-form")&&t.observe(e,{subtree:!0,childList:!0})})}}let{Feature:G}=window;class B extends x{setAddToCartAction(e){this.addToCartAction=e}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.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&&(e.target.getAttribute("href")||e.target.parentElement&&e.target.parentElement.getAttribute("href")||e.target.closest(".product-image-link"))&&(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,n,a;if(window.ga4UserLoggedIn&&G.isActive("v6.6.0.0")?e.querySelector("button").classList.contains("product-wishlist-not-added"):e.querySelector("button").classList.contains("product-wishlist-added")){switch(!0){case(i=e.closest(".line-item-product"))!=null:if((n=i.querySelector(".line-item-remove-button"))!=null&&(a=document.querySelector(".discoga4-checkout-hidden-line-item[data-id='".concat(n.getAttribute("data-product-id"),"']")))!=null){let e=a.getAttribute("data-sku");t=S.getEntry("productId_",e)}break;case(i=e.closest(".cart-item-product"))!=null:if((n=i.querySelector(".cart-item-remove-button"))!=null&&(a=document.querySelector(".discoga4-checkout-hidden-line-item[data-id='".concat(n.getAttribute("data-product-id"),"']")))!=null){let e=a.getAttribute("data-sku");t=S.getEntry("productId_",e)}break;case(i=e.closest(".product-box"))!=null:(n=i.querySelector("input[name$='][id]']"))!=null&&n.value in window.ga4Product?t=n.value:(n=i.querySelector("input[name=product-id]"))!=null&&n.value in window.ga4Product?t=n.value:(n=i.querySelector("input[name$='][referencedId]']"))!=null&&n.value in window.ga4Product?t=n.value:!0===i.hasAttribute("data-product-information")&&JSON.parse(i.getAttribute("data-product-information")).id in window.ga4Product&&(t=JSON.parse(i.getAttribute("data-product-information")).id);break;case(i=e.closest(".product-detail-buy"))!=null:(n=i.querySelector("input[name$='][id]']"))!=null&&n.value in window.ga4Product?t=n.value:(n=i.querySelector("input[name=product-id]"))!=null&&n.value in window.ga4Product?t=n.value:(n=i.querySelector("input[name$='][referencedId]']"))!=null&&n.value in window.ga4Product&&(t=n.value)}if(t){let e;if(window.ga4Product&&window.ga4Product[t]){let e=S.getOrigin(t),i=E.getProductFromHeader(t,0,e.index,e.id,e.name,!0,!0);T.addToWishlist(i.ga,i.value)}else(e=S.getJsonEntry("ga4item_",t))!==null&&(e.discount=0,T.addToWishlist(e,E.getSinglePriceFromJsonEntry(e,!0)))}}}_onSelectItemFromListing(e){let t;if(e.closest(".product-action"))return;let i=e.closest(".product-box");if(i&&(t=!0===i.hasAttribute("data-product-information")&&JSON.parse(i.getAttribute("data-product-information")).id in window.ga4Product?JSON.parse(i.getAttribute("data-product-information")).id:i.querySelector("input[name=product-id]")&&i.querySelector("input[name=product-id]").value in window.ga4Product?i.querySelector("input[name=product-id]").value:i.querySelector("input[name$='][id]']")&&i.querySelector("input[name$='][id]']").value in window.ga4Product?i.querySelector("input[name$='][id]']").value:i.querySelector("input[name$='][referencedId]']")&&i.querySelector("input[name$='][referencedId]']").value in window.ga4Product?i.querySelector("input[name$='][referencedId]']").value:null)){let e=S.getOrigin(t),n=E.getProductFromHeader(t,0,e.index,e.id,e.name,!0,!0),a=i.closest('[data-swag-cms-extensions-quickview-box="true"]');null!==a&&a.getAttribute("data-focus-id")===t?this._subscribeQuickviewAddToCart(t):T.selectItem(n.ga,e.id,e.name)}}_subscribeQuickviewAddToCart(){let e=0,t=()=>{e++;let i=document.querySelector(".swag-cms-extensions-quickview-modal");if(!i){e<30&&setTimeout(t,100);return}this._hydrateQuickviewProducts(i),this._handleQuickviewProductChange(i),this._observeQuickviewContentChanges(i),this._watchQuickviewCarou
1selNavigation(i)};setTimeout(t,100)}_watchQuickviewCarouselNavigation(e){e._ga4CarouselListenerAttached||(e._ga4CarouselListenerAttached=!0,e.addEventListener("slid.bs.carousel",()=>{setTimeout(()=>{this._hydrateQuickviewProducts(e),this._handleQuickviewProductChange(e)},150)}))}_observeQuickviewContentChanges(e){if(e._ga4QuickviewObserverAttached)return;e._ga4QuickviewObserverAttached=!0;let t=e.querySelector(".modal-content")||e,i=null,n=new MutationObserver(()=>{clearTimeout(i),i=setTimeout(()=>{this._hydrateQuickviewProducts(e),this._handleQuickviewProductChange(e)},150)});n.observe(t,{childList:!0,subtree:!0,attributes:!0}),e._ga4QuickviewObserver=n}_handleQuickviewProductChange(e){let t=this._getQuickviewActiveProductId(e);if(!t||!window.ga4Product||!window.ga4Product[t])return;e._ga4LastQuickviewProductId!==t&&(e._ga4LastQuickviewProductId=t,T.viewItemFromHeader(t,1));let i=this._getQuickviewActiveForm(e);if(!i||(e._ga4SubscribedQuickviewForms||(e._ga4SubscribedQuickviewForms=new WeakSet),e._ga4SubscribedQuickviewForms.has(i)))return;let n=0,a=()=>{n++;let t=window.PluginManager.getPluginInstanceFromElement(i,"AddToCart");if(!t){n<20&&setTimeout(a,100);return}this.addToCartAction&&(e._ga4SubscribedQuickviewForms.add(i),t.$emitter.subscribe("beforeFormSubmit",this.addToCartAction._beforeFormSubmit.bind(this.addToCartAction)))};setTimeout(a,100)}_getQuickviewActiveForm(e){return(e.querySelector(".carousel-item.active")||e).querySelector("[data-add-to-cart], form.buy-widget, #productDetailPageBuyProductForm")}_getQuickviewActiveProductId(e){let t=this._getQuickviewActiveForm(e);if(!t)return null;let i=t.querySelector("input[name$='][id]']");if(i&&window.ga4Product&&window.ga4Product[i.value])return i.value;let n=t.querySelector("input[name=product-id]");if(n&&window.ga4Product&&window.ga4Product[n.value])return n.value;let a=t.querySelector("input[name$='][referencedId]']");if(a&&window.ga4Product&&window.ga4Product[a.value])return a.value;let o=e.querySelector(".carousel-item.active");if(o){let e=o.getAttribute("data-swag-cms-extensions-quickview-carousel-product-id");if(e&&window.ga4Product&&window.ga4Product[e])return e}return null}_hydrateQuickviewProducts(e){let t=e.querySelectorAll(".discoga4-quickview-hidden-line-item");t.length&&(window.ga4Product=window.ga4Product||{},t.forEach(e=>{let t=e.getAttribute("data-id");if(!t)return;window.ga4Product[t]={currency:e.getAttribute("data-currency"),price:e.getAttribute("data-price"),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")||"product",item_list_name:e.getAttribute("data-item-list-name")||"product",item_variant:e.getAttribute("data-item-variant"),extra:{minPurchase:e.getAttribute("data-min-purchase"),shopware_id:t,listPrice:e.getAttribute("data-list-price"),item_startPrice:e.getAttribute("data-item-start-price"),taxRate:e.getAttribute("data-tax-rate"),parentId:e.getAttribute("data-parent-id")}};let i=(e.getAttribute("data-item-category")||"").split("|").filter(Boolean);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]}))}_onSelectItemFromSearchSuggest(e){let t=0,i=e.closest("li"),n=Array.from(e.closest("ul").children);if(null!==i&&null!==n&&(t=n.indexOf(i)),!window.ga4SearchSuggestProduct||!window.ga4SearchSuggestProduct[t]){let i=e.getAttribute("href"),n=e.getAttribute("title"),a=i.split("/").slice(-1)[0],o=e.querySelector(".search-suggest-product-price").innerText;S.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:a,value:t},{entryString:"ga4_item_list_id",productId:a,value:"search_suggest"},{entryString:"ga4_item_list_name",productId:a,value:"search_suggest"}]),T.selectItem({item_id:a,item_name:n,quantity:1,price:o?parseFloat(o):0},"search_suggest","search_suggest");return}let a=JSON.parse(JSON.stringify(window.ga4SearchSuggestProduct[t]));if(!a)return;let{item_id:o,item_list_id:r,item_list_name:s,extra:c}=a,d=c.parentId;a.extra&&(S.persistAdvancedPrices(o,a.extra),delete a.extra),S.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:o,value:t},{entryString:"ga4_item_list_id",productId:o,value:r},{entryString:"ga4_item_list_name",productId:o,value:s}]),d&&S.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:d,value:t},{entryString:"ga4_item_list_id",productId:d,value:r},{entryString:"ga4_item_list_name",productId:d,value:s}]),T.selectItem(a,r,s)}_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)return;let n=i.querySelector(".cart-item-remove-button")?i.querySelector(".cart-item-remove-button"):i.querySelector(".line-item-remove-button");if(!n)return;let a=n.dataset.productId?n.dataset.productId:n.dataset["product-id"];
1if(a&&(t=S.getJsonEntry("ga4item_",a))!==null){t.discount=Math.round(100*t.discount)/100;let e=S.getEntry("ga4_item_list_id",a),i=S.getEntry("ga4_item_list_name",a);T.selectItem(t,e,i)}}_onRemoveFromCart(e){let t=e.dataset.productId;if(!t||!(e.closest(".cart-item-product")?e.closest(".cart-item-product"):e.closest(".line-item-product")))return;let i=e.closest(".cart-item-row")?e.closest(".cart-item-row"):e.closest(".line-item-row");if(!i)return;let n=1;i.querySelector("[selected='selected']")?n=i.querySelector("[selected='selected']").value:i.querySelector(".js-offcanvas-cart-change-quantity-number")?n=i.querySelector(".js-offcanvas-cart-change-quantity-number").value:i.querySelector(".js-quantity-selector")&&(n=i.querySelector(".js-quantity-selector").value),T.addToCartFromHeader(t,parseInt(n,10),!0,!1,!1)}constructor(...e){super(...e),this.addToCartAction=null}}class U extends x{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;T.viewItemList("productCrossSelling",i);let n=i.querySelectorAll(".product-slider-controls-prev,.product-slider-controls-next");i.querySelector(".product-slider-container")&&(e=i.querySelector(".product-slider-container").id
1),n&&e&&n.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 n=i.target.classList.contains("active");t!==n&&(t=n,n&&T.viewItemList("productCrossSelling",e))}})}).observe(e,{attributes:!0})}_onClick(e,t){this.sleep(2e3).then(()=>{let i=document.getElementById(t);i&&T.viewItemList(e,i.closest(".tab-pane"))})}sleep(e){return new Promise(t=>setTimeout(t,e))}}class V extends x{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 n=e.querySelectorAll("[data-cms-element-id]");n&&n.forEach(e=>{let n;T.viewItemList(t,e);let a=e.querySelectorAll(".product-slider-controls-prev,.product-slider-controls-next");e.querySelector(".product-slider-container")&&(n=e.querySelector(".product-slider-container").id
1),a&&n&&a.forEach(e=>e.addEventListener("click",function(){i._onClick(t,n)}))})})}_onClick(e,t){this.sleep(1e3).then(()=>{let i=document.getElementById(t);i&&T.viewItemList(e,i)})}sleep(e){return new Promise(t=>setTimeout(t,e))}}class J extends x{trigger(){this._triggerViewSearchResults(),this._triggerSearch(),document.querySelector(".cms-element-product-listing-wrapper")&&this._documentObserver(".cms-element-product-listing-wrapper")}_triggerSearch(){this.actionEnabled&&window.searchTerm&&T.search()}_triggerViewSearchResults(){this.actionEnabled&&T.viewItemList("search")}_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(){T.viewItemListAfterChange("search")},1e3)}).observe(t,{subtree:!0,childList:!0})}}class Q extends x{trigger(){let e=new URLSearchParams(window.location.search).get("isPayPalExpressCheckout"),t=I.lineItemsContainer();t&&(t.dataset.couponcode&&S.setSimpleEntry("couponCode",t.dataset.couponcode),"1"===e&&T.beginCheckout(t));let i=document.querySelectorAll(".quantity-select");i&&i.forEach(e=>e.addEventListener("change",this._onChangeProductQuantity.bind(this)));let n=document.querySelectorAll(".payment-method-input");n&&n.forEach(e=>e.addEventListener("change",this._onChangePayment.bind(this)));let a=document.querySelectorAll(".shipping-method-input");a&&a.forEach(e=>e.addEventListener("change",this._onChangeShipping.bind(this)))}_onChangeProductQuantity(e){T.changeQty(e)}_onChangePayment(e){let t=e.target.closest(".payment-method-radio").querySelector(".payment-method-description").querySelector("strong").innerText,i=I.lineItemsContainer();t&&T.paymentInfo(i,t),S.setSimpleEntry("paymentSelected","yes")}_onChangeShipping(e){let t=I.lineItemsContainer(),i=e.target.closest(".shipping-method-radio").querySelector(".shipping-method-description").querySelector("strong").innerText;i&&T.shippingInfo(t,i),S.setSimpleEntry("shippingSelected","yes")}}class H extends k{getPluginName(){return"SearchWidget"}getActions(){return{afterSuggest:this._afterSuggest.bind(this),clearSuggestResults:this._onAfterClearSearchResults.bind(this)}}_afterSuggest(){if(!this.actionEnabled)return;let e="";if(!document.querySelector(".header-search-input").value)return;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}let i=document.querySelector("#ga4AfterSuggestScript");if(!i)return;let n=document.createTextNode(i.textContent),a=document.createElement("script");a.appendChild(n),document.querySelector("head").appendChild(a),T.searchSuggested(e.replace("/search?search=",""),t)}_onAfterClearSearchResults(){window.ga4SearchSuggestProduct&&delete window.ga4SearchSuggestProduct}}let{PluginManager:W}=window;!window.ga4Enabled||W.getPluginList()&&W.getPluginList().GA4||W.register("GA4",class extends r{init(){let e=this;switch(this.cookieDisGoogleTag="_dis_gtag",this.cookieDisGoogleAnalytics="_dis_ga",this.cookieDisGoogleAds="_dis_gads",this.cookieDisMeta="_dis_meta",this.cookieDisMads="_dis_mads",this.cookieDisPinterest="_dis_pinterest",this.cookieDisTikTok="_dis_tiktok",this.cookieOpenAi="_dis_openai",this.trackingEnabled=!1,this.tagManagerEnabled=!1,this.gaEventsTriggered=!1,this.gadsEventsTriggered=!1,this.pageViewEventTriggered=!1,this.eventSequence=0,this.cookieConfig=window.ga4CookieConfig,this.ga4StorageTtlDays=parseInt(window.ga4StorageTtlDays,10),this.ga4StorageTtlDays&&S.purgeExpired(864e5*this.ga4StorageTtlDays),this.ga4AdvancedConsentMode=window.ga4AdvancedConsentMode,this.ga4ActiveConsentMode=window.ga4ActiveConsentMode,this.ga4customScript=window.ga4customScript,this.customTagManager=window.customTagManager,this.initializeConsent(),!0){case"cookieConsentPlus"===this.cookieConfig:case"standardCookies"===this.cookieConfig:e.activateIfConsent("gtag",s.getItem(this.cookieDisGoogleTag)),e.activateIfConsent("ga",s.getItem(this.cookieDisGoogleAnalytics)),e.activateIfConsent("gads",s.getItem(this.cookieDisGoogleAds)),e.activateIfConsent("meta",s.getItem(this.cookieDisMeta)),e.activateIfConsent("mads",s.getItem(this.cookieDisMads)),e.activateIfConsent("pinterest",s.getItem(this.cookieDisPinterest)),e.activateIfConsent("tiktok",s.getItem(this.cookieDisTikTok)),e.activateIfConsent("openai",s.getItem(this.cookieOpenAi)),e.updateConsent(),e.triggerCoreScript(),document.$emitter.subscribe(C,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.activateIfConsent("meta",Cookiebot.consent.marketing),e.activateIfConsent("mads",Cookiebot.consent.marketing),e.activateIfConsent("pinterest",Cookiebot.consent.marketing),e.activateIfConsent("tiktok",Cookiebot.consent.marketing),e.activateIfConsent("openai",Cookiebot.consent.marketing),e.updateConsent(),e.triggerCoreScript()}),window.addEventListener("CookiebotOnDecline",function(){e.activateIfConsent("gtag",!1),e.activateIfConsent("ga",!1),e.activateIfConsent("gads",!1),e.activateIfConsent("meta",!1),e.activateIfConsent("mads",!1),e.activateIfConsent("pinterest",!1),e.activateIfConsent("tiktok",!1),e.activateIfConsent("openai",!1)});break;case"userCentrics"===this.cookieConfig:setTimeout(function(){e.triggerUCConsentV3()},1e3),window.addEventListener("UC_CONSENT",function(){setTimeout(function(){e.triggerUCConsentV3()},1e3)}),window.addEventListener("consent_status",function(){setTimeout(function(){e.triggerUCConsentV3()},1e3)}),window.addEventListener("ucEvent",function(t){t.detail&&"consent_status"===t.detail.event&&setTimeout(function(){e.triggerUCConsentV3()},1e3)}),window.addEventListener("UC_UI_INITIALIZED",function(){e.triggerUCConsentV2(),setTimeout(function(){e.triggerUCConsentV3()},1e3)}),window.addEventListener("UC_UI_CMP_EVENT",function(t){("ACCEPT_ALL"===t.detail.type||"DENY_ALL"===t.detail.type||"SAVE"===t.detail.type)&&(e.triggerUCConsentV2(),setTimeout(function(){e.triggerUCConsentV3()},1e3))});break;case"didomi"===this.cookieConfig:window.didomiEventListeners=window.didomiEventListeners||[],window.didomiEventListeners.push({event:"consent.changed",listener:function(t){e.triggerDidomiConsent()}}),window.didomiEventListeners.push({event:"sync.ready",listener:function(){e.triggerDidomiConsent()}});break;case"consentManager"===this.cookieConfig:window.addEventListener("cmpEvent",function(){e.triggerCMPConsent()});break;case"ccm19"===this.cookieConfig:setTimeout(function(){e.triggerCCM19Consent()},2e3),window.addEventListener("ccm19WidgetLoaded",function(){e.triggerCCM19Consent()}),window.addEventListener("ccm19WidgetClosed",function(){e.triggerCCM19Consent()});break;case"acris"===this.cookieConfig:let t="acrisCookieStateChanged",i=()=>{window.acrisCookiePrivacy&&(e.activateIfConsent("gtag",window.acrisCookiePrivacy.c.includes(this.cookieDisGoogleTag)),e.activateIfConsent("ga",window.acrisCookiePrivacy.c.includes(this.cookieDisGoogleAnalytics)),e.activateIfConsent("gads",window.acrisCookiePrivacy.c.includes(this.cookieDisGoogleAds)),e.activateIfConsent("meta",window.acrisCookiePrivacy.c.includes(this.cookieDisMeta)),e.activateIfConsent("mads",window.acrisCookiePrivacy.c.includes(this.cookieDisMads)),e.activateIfConsent("pinterest",window.acrisCookiePrivacy.c.includes(this.cookieDisPinterest)),e.activateIfConsent("tiktok",window.acrisCookiePrivacy.c.includes(this.cookieDisTikTok)),e.activateIfConsent("openai",window.acrisCookiePrivacy.c.includes(this.cookieOpenAi)),e.updateConsent(),e.triggerCoreScript())};window.addEventListener(t,i),document.$emitter.subscribe(C,(()=>{window.dataLayer.find(e=>e.event&&"acrisCookieStateChanged"===e.event)&&i()}).bind(this));let n=0,a=setInterval(()=>{window.dataLayer.find(e=>e.event&&e.event===t)&&(window.dispatchEvent(new Event(t)),clearInterval(a)),++n>50&&(clearInterval(a),console.warn("Missing '".concat(t,"' Acris event.")))},200);break;case"cookieFirst"===this.cookieConfig:window.addEventListener("cf_services_consent_loaded",function(){setTimeout(function(){e.triggerCookieFirstConsent()},500)}),window.addEventListener("cf_consent",function(){setTimeout(function(){e.triggerCookieFirstConsent()},1e3)});break;case"cookieScript"===this.cookieConfig:window.addEventListener("CookieScriptLoaded",function(){e.triggerCookieScriptConsent()}),window.addEventListener("CookieScriptAccept",function(){setTimeout(function(){e.triggerCookieScriptConsent()},500)}),window.addEventListener("CookieScriptAcceptAll",function(){setTimeout(function(){e.triggerCookieScriptConsent()},500)});break;case"keine"===this.cookieConfig:window.acceptedGtag=!!window.googleTagEnabled&&window.googleTagEnabled,window.acceptedGa=!!window.googleAnalyticsEnabled&&window.googleAnalyticsEnabled,window.acceptedGads=!!window.googleAdsEnabled&&window.googleAdsEnabled,window.acceptedMeta=!!window.metaAdsEnabled&&window.metaAdsEnabled,window.acceptedMads=!!window.microsoftAdsEnabled&&window.microsoftAdsEnabled,window.acceptedPinterest=!!window.pinterestAdsEnabled&&window.pinterestAdsEnabled,window.acceptedTiktok=!!window.tiktokAdsEnabled&&window.tiktokAdsEnabled,window.acceptedOpenAi=!!window.openAiEnabled&&window.openAiEnabled,e.updateConsent(),e.triggerCoreScript()}ga4AdvancedConsentMode&&(this.tagManagerEnabled||(customTagManager&&ga4customScript?this.enableCustomTagManager():this.enableTagManager(),this.tagManagerEnabled=!0),setTimeout(function(){e.triggerCoreScript()},2e3))}generateEventId(){this.eventSequence+=1;let e=Date.now().toString(36),t=Math.floor(1e3*performance.now()).toString(36),i=this.eventSequence.toString(36),n=Math.random().toString(36).slice(2,10);return"".concat(e,"-").concat(t,"-").concat(i,"-").concat(n)}triggerCCM19Consent(){if(CCM&&CCM.acceptedCookies.length){let e=["_gads","_gcl_aw"].some(e=>CCM.acceptedCookies.includes(e));this.activateIfConsent("gtag",CCM.acceptedCookies.includes("cookiePreferences")),this.activateIfConsent("ga",CCM.acceptedCookies.includes("_ga")),this.activateIfConsent("gads",e),this.activateIfConsent("meta",CCM.acceptedCookies.includes("_fbp")),this.activateIfConsent("mads",CCM.acceptedCookies.includes("_uetsid")),this.activateIfConsent("pinterest",CCM.acceptedCookies.includes("_epik")),this.activateIfConsent("tiktok",CCM.acceptedCookies.includes("_ttp")),this.activateIfConsent("openai",e),this.updateConsent(),this.triggerCoreScript()}}triggerCookieScriptConsent(){window.CookieScript.instance&&window.CookieScript.instance.dispatchEventNames?(this.activateIfConsent("gtag",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-functionality")),this.activateIfConsent("ga",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-performance")),this.activateIfConsent("gads",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.activateIfConsent("meta",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.activateIfConsent("mads",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.activateIfConsent("pinterest",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.activateIfConsent("tiktok",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.activateIfConsent("openai",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.updateConsent(),this.triggerCoreScript()):console.debug("CookieScript.instance null")}triggerCookieFirstConsent(){window.CookieFirst&&window.CookieFirst.acceptedServices?(this.activateIfConsent("gtag",!!window.CookieFirst.acceptedServices.google_tag_manager),this.activateIfConsent("ga",!!window.CookieFirst.acceptedServices.google_analytics),this.activateIfConsent("gads",!!window.CookieFirst.acceptedServices.google_ads),this.activateIfConsent("meta",!!window.CookieFirst.acceptedServices.facebook),this.activateIfConsent("mads",!!window.CookieFirst.acceptedServices.bing_ads),this.activateIfConsent("pinterest",!!window.CookieFirst.acceptedServices.pinterest),this.activateIfConsent("tiktok",!!window.CookieFirst.acceptedServices.tiktok),this.activateIfConsent("openai",!!window.CookieFirst.acceptedServices.google_ads),this.updateConsent(),this.triggerCoreScript()):console.debug("window.CookieFirst null")}triggerCMPConsent(){if("consent"===window.cmpCurrentStatus){let e=window.cmpConsentVendors.split(","),t=0;for(let i in window.cmpmngr.vendors){if(e.includes(window.cmpmngr.vendors[t].id))switch(window.cmpmngr.vendors[t].systemid){case"s26":this.activateIfConsent("ga",!0);break;case"s1":this.activateIfConsent("gads",!0),this.activateIfConsent("openai",!0);break;case"s905":this.activateIfConsent("gtag",!0);break;case"s7":this.activateIfConsent("meta",!0);break;case"s11":case"s2644":this.activateIfConsent("mads",!0);break;case"s49":this.activateIfConsent("pinterest",!0);break;case"s3009":this.activateIfConsent("tiktok",!0)}t++}this.updateConsent(),this.triggerCoreScript()}}triggerDidomiConsent(){if(!window.didomiState||"string"!=typeof window.didomiState.didomiVendorsConsent||""===window.didomiState.didomiVendorsConsent.trim())return;let e=window.didomiState.didomiVendorsConsent,t=new Set(e.split(",").map(e=>
1e.trim()).filter(Boolean));[{key:"gtag",vendorIds:["c:googletag-eQxZQ9ra","c:googletag-DBzKHMky"]},{key:"ga",vendorIds:["c:googleana-YRikLRaT","c:googleana-4TXnJigR"]},{key:"gads",vendorIds:["google","c:googlead-bCCgL7pD","c:googleads-eT3rZxEY"]},{key:"openai",vendorIds:["google","c:googlead-bCCgL7pD","c:googleads-eT3rZxEY"]},{key:"meta",vendorIds:["facebook","c:facebookc-KTWfawWc","c:facebookc-DQ7BXqQe","c:metaads-xKecBpgc"]},{key:"mads",vendorIds:["1126","microsoft-6zPzfpLt","c:microsoft-tZVFUA2Y","c:microsoft-analytics","c:microsoft"]},{key:"pinterest",vendorIds:["c:pinterest-aEhfiXtj","c:pinterest"]},{key:"tiktok",vendorIds:["986","tiktokad-9TKVDC6d","c:tiktokan-R4hk2Pmz"]}].forEach(e=>{let{key:i,vendorIds:n}=e;n.some(e=>t.has(e))&&this.activateIfConsent(i,!0)}),this.updateConsent(),this.triggerCoreScript()}triggerUCConsentV2(){if(!window.UC_UI)return;let e=window.UC_UI.getServicesBaseInfo();Array.isArray(e)&&[{key:"gtag",name:"Google Tag Manager"},{key:"ga",name:"Google Analytics 4"},{key:"ga",name:"Google Analytics"},{key:"gads",name:"Google Ads"},{key:"gads",name:"Google Ads Conversion Tracking"},{key:"gads",name:"Google Ads Remarketing"},{key:"meta",name:"Meta Pixel"},{key:"meta",name:"Facebook Pixel"},{key:"mads",name:"Microsoft Advertising"},{key:"mads",name:"Microsoft Conversion Tracking"},{key:"pinterest",name:"Pinterest Ads"}
1,{key:"tiktok",name:"TikTok"},{key:"openai",name:"ChatGPT Ads"}].forEach(t=>{let{name:i,key:n}=t,a=e.find(e=>e.name===i);a&&this.activateIfConsent(n,a.consent.status)}),this.updateConsent(),this.triggerCoreScript()}triggerUCConsentV3(){let e=[{key:"gtag",name:"Google Tag Manager"},{key:"ga",name:"Google Analytics 4"},{key:"ga",name:"Google Analytics"},{key:"gads",name:"Google Ads"},{key:"gads",name:"Google Ads Conversion Tracking"},{key:"gads",name:"Google Ads Remarketing"},{key:"meta",name:"Meta Pixel"},{key:"meta",name:"Facebook Pixel"},{key:"mads",name:"Microsoft Advertising"},{key:"mads",name:"Microsoft Conversion Tracking"},{key:"pinterest",name:"Pinterest Ads"},{key:"tiktok",name:"TikTok"},{key:"openai",name:"Google Ads"}];if(S.getSimpleEntry("ucData")){let t=JSON.parse(S.getSimpleEntry("ucData"));if(t){let i=t.consent.services;e.forEach(e=>{let{name:t,key:n}=e,a=Object.values(i).filter(e=>e.name===t);void 0!==a&&0!==a.length&&this.activateIfConsent(n,a[0].consent)})}}else void 0!==window.__ucCmp&&void 0!==window.__ucCmp.getServices()&&__ucCmp.getServices()&&e.forEach(e=>{let{name:t,key:i}=e,n=__ucCmp.getServices().filter(e=>e.id===t&!0===e.consent.status);n&&this.activateIfConsent(i,n.consent.status)});this.updateConsent(),this.triggerCoreScript()}triggerCoreScript(){let{acceptedGtag:e,customTagManager:t,ga4customScript:i,ga4AdvancedConsentMode:n,acceptedGa:a,acceptedGads:o,acceptedMeta:r,acceptedMads:s,acceptedPinterest:c,acceptedTiktok:d,acceptedOpenAi:l}=window;!this.tagManagerEnabled&&e&&(t&&i?(this.enableCustomTagManager(),window.customTagManagerEnabled=!0):this.enableTagManager(),this.tagManagerEnabled=!0),!this.gaEventsTriggered&&(n||a)&&(this.triggerGaEvents(),this.gaEventsTriggered=!0),!this.gadsEventsTriggered&&(n||o)&&(this.triggerGadsEvents(),this.gadsEventsTriggered=!0);let u=[n,a,o,r,s,c,d,l].some(e=>e);!this.pageViewEventTriggered&&u&&(this.triggerPageViewEvent(),this.pageViewEventTriggered=!0),!this.trackingEnabled&&u&&(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);break;case"meta"===e:window.acceptedMeta=!!(t&&window.metaAdsEnabled);break;case"mads"===e:window.acceptedMads=!!(t&&window.microsoftAdsEnabled);break;case"pinterest"===e:window.acceptedPinterest=!!(t&&window.pinterestAdsEnabled);break;case"tiktok"===e:window.acceptedTiktok=!!(t&&window.tiktokAdsEnabled);break;case"openai"===e:window.acceptedOpenAi=!!(t&&window.openAiEnabled)}}enableTracking(){this.controllerName=window.ga4controllerName,this.controllerAction=window.ga4controllerAction,this.actions=[],this.registerJSActions(),this.registerControllerActions(this.controllerName,this.controllerAction),this.triggerActions()}gtag(){dataLayer.push(arguments)}initializeConsent(){var e=this;window.dataLayer=window.dataLayer||[],window.dataLayer.cleanPush=function(){for(var t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];let a=[];i.forEach(e=>{let t=T.replaceEmptyStringsWithUndefined(e);a.push(t)});let{ga4controllerName:o,ga4controllerAction:r,ga4UserLoggedIn:s,ga4Guest:c,ga4UserId:d,ga4CustomerType:l,ga4CustomerLifetimeValue:u,ga4CustomerOrderCount:m,ga4salesChannelId:g,ga4salesChannelName:p,ga4HidePricesForGuests:_,ga4Sha256UserId:h}=window,v="Logged Out";c?v="Guest":s&&(v="Logged In"),a[0].existing_customer=d?"yes":"no",a[0].user_id=d,a[0].sha256_user_id=h,a[0].account_type=l,a[0].user_login_state=v;let y=0;("customcheckout"===o&&"finishpage"===r||"checkout"===o&&"finishpage"===r)&&(y=1);let w=m&&m<=y;a[0].new_customer=!!w||!u,a[0].customer_type=!w&&u?"returning":"new",!w&&u&&(a[0].customer_lifetime_value=Math.round(100*parseFloat(u))/100),a[0].saleschannelid=g,a[0].saleschannelname=p,a[0].event_id=e.generateEventId();let f=e=>"number"==typeof e&&isFinite(e)?Math.round(100*e)/100:e,b=e=>{if(!e||"object"!=typeof e)return e;let t={...e};return"price"in t&&(t.price=f(t.price)),"item_price"in t&&(t.item_price=f(t.item_price)),"product_price"in t&&(t.product_price=f(t.product_price)),t},C=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(C);let t={...e};if("ecommerce"in t&&t.ecommerce){let e={...t.ecommerce};"value"in e&&(e.value=f(e.value)),"tax"in e&&(e.tax=f(e.tax)),"shipping"in e&&(e.shipping=f(e.shipping)),"items"in e&&Array.isArray(e.items)&&(e.items=e.items.map(b)),t.ecommerce=e}if("value"in t&&(t.value=f(t.value)),"items"in t&&Array.isArray(t.items)&&(t.items=t.items.map(b)),"meta_object"in t&&t.meta_object){let e={...t.meta_object};if("meta_object_data"in e&&e.meta_object_data){let t={...e.meta_object_data};"value"in t&&(t.value=f(t.value)),"contents"in t&&Array.isArray(t.contents)&&(t.contents=t.contents.map(b)),e.meta_object_data=t}t.meta_object=e}if("microsoft_ads_object"in t&&t.microsoft_ads_object){let e={...t.microsoft_ads_object};"ecomm_totalvalue"in e&&(e.ecomm_totalvalue=f(e.ecomm_totalvalue)),"revenue_value"in e&&(e.revenue_value=f(e.revenue_value)),"items"in e&&Array.isArray(e.items)&&(e.items=e.items.map(b)),t.microsoft_ads_object=e}if("tiktok_object"in t&&t.tiktok_object){let e={...t.tiktok_object};"value"in e&&(e.value=f(e.value)),"contents"in e&&Array.isArray(e.contents)&&(e.contents=e.contents.map(b)),t.tiktok_object=e}if("pinterest_object"in t&&t.pinterest_object){let e={...t.pinterest_object};"value"in e&&(e.value=f(e.value)),"line_items"in e&&Array.isArray(e.line_items)&&(e.line_items=e.line_items.map(b)),t.pinterest_object=e}if("pinterest_object_serverside"in t&&t.pinterest_object_serverside){let e={...t.pinterest_object_serverside};"value"in e&&(e.value=f(e.value)),"contents"in e&&Array.isArray(e.contents)&&(e.contents=e.contents.map(b)),t.pinterest_object_serverside=e}if("openai_object"in t&&t.openai_object){let e={...t.openai_object};"amount"in e&&(e.amount=f(e.amount)),"contents"in e&&Array.isArray(e.contents)&&(e.contents=e.contents.map(b)),t.openai_object=e}return t};if(a=a.map(C),_&&!s){let e=e=>{if(!e||"object"!=typeof e)return e;let t={...e};return"price"in t&&(t.price=void 0),"item_price"in t&&(t.item_price=void 0),"product_price"in t&&(t.product_price=void 0),t},t=i=>{if(!i||"object"!=typeof i)return i;if(Array.isArray(i))return i.map(t);let n={...i};if("ecommerce"in n&&n.ecommerce){let t={...n.ecommerce};"value"in t&&(t.value=void 0),"items"in t&&Array.isArray(t.items)&&(t.items=t.items.map(e)),n.ecommerce=t}if("value"in n&&(n.value=void 0),"items"in n&&Array.isArray(n.items)&&(n.items=n.items.map(e)),"meta_object"in n&&n.meta_object){let t={...n.meta_object};if("meta_object_data"in t&&t.meta_object_data){let i={...t.meta_object_data};
1"value"in i&&(i.value=void 0),"contents"in i&&Array.isArray(i.contents)&&(i.contents=i.contents.map(e)),t.meta_object_data=i}n.meta_object=t}if("microsoft_ads_object"in n&&n.microsoft_ads_object){let t={...n.microsoft_ads_object};"ecomm_totalvalue"in t&&(t.ecomm_totalvalue=void 0),"revenue_value"in t&&(t.revenue_value=void 0),"items"in t&&Array.isArray(t.items)&&(t.items=t.items.map(e)),n.microsoft_ads_object=t}if("tiktok_object"in n&&n.tiktok_object){let t={...n.tiktok_object};"value"in t&&(t.value=void 0),"contents"in t&&Array.isArray(t.contents)&&(t.contents=t.contents.map(e)),n.tiktok_object=t}if("pinterest_object"in n&&n.pinterest_object){let t={...n.pinterest_object};"value"in t&&(t.value=void 0),"line_items"in t&&Array.isArray(t.line_items)&&(t.line_items=t.line_items.map(e)),n.pinterest_object=t}if("pinterest_object_serverside"in n&&n.pinterest_object_serverside){let t={...n.pinterest_object_serverside};"value"in t&&(t.value=void 0),"contents"in t&&Array.isArray(t.contents)&&(t.contents=t.contents.map(e)),n.pinterest_object_serverside=t}if("openai_object"in n&&n.openai_object){let t={...n.openai_object};"amount"in t&&(t.value=void 0),"contents"in t&&Array.isArray(t.contents)&&(t.contents=t.contents.map(e)),n.openai_object=t}return n};a=a.map(t)}window.dataLayer.push(...a)},this.ga4ActiveConsentMode?this.gtag("consent","default",{ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied",functionality_storage:"denied",personalization_storage:"denied",security_storage:"denied"}):("cookieFirst"===this.cookieConfig||"cookieBot"===this.cookieConfig||"userCentrics"===this.cookieConfig)&&this.gtag("consent","default",{ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied"})}updateConsent(){if(!this.ga4ActiveConsentMode)return;let e={},{ga4Enabled:t,acceptedGa:i,googleAdsEnabled:n,acceptedGads:a,acceptedMads:o,ga4AdvancedConsentMode:r}=window;e.functionality_storage="granted",e.personalization_storage="granted",e.security_storage="granted",t&&i?(e.analytics_storage="granted",e.ad_storage="granted",e.ad_personalization="granted",e.ad_user_data="granted"):n&&a&&(e.ad_storage="granted",e.ad_personalization="granted",e.ad_user_data="granted"),Object.keys(e).length>0&&this.gtag("consent","update",e),o&&(window.uetq=window.uetq||[],window.uetq.push("consent","default",{ad_storage:"granted"}),window.uetq.cleanPush=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];let n=[];t.forEach(e=>{let t=T.replaceEmptyStringsWithUndefined(e);n.push(t)}),window.uetq.push(...n)}),r&&T.consentUpdated()}enableCustomTagManager(){if(window.__customTMLoaded)return;let e=()=>{if(!window.__customTMLoaded){window.__customTMLoaded=!0,window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":Date.now(),event:"gtm.js"});try{let e=(window.ga4customScript||"").replace(/<!--.*?-->/g,"");return Function(e)()}catch(e){console.error("Custom Tag Manager execution failed:",e)}}},t=()=>{e(),["scroll","mousemove","keydown","touchstart","pointerdown"].forEach(e=>window.removeEventListener(e,t,{passive:!0}))};["scroll","mousemove","keydown","touchstart","pointerdown"].forEach(e=>window.addEventListener(e,t,{once:!0,passive:!0})),"requestIdleCallback"in window?requestIdleCallback(e,{timeout:5e3}):setTimeout(e,3e3)}enableTagManager(){if(window.__gtmLoaded){console.log("[GA4] GTM already loaded, skipping");return}let e=()=>{window.__gtmLoaded||(window.__gtmLoaded=!0,window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":Date.now(),event:"gtm.js"}),function(e,t,i,n,a){var o=t.getElementsByTagName(i)[0],r=t.createElement(i);r.async=!0,r.src="https://www.googletagmanager.com/gtm.js?id="+encodeURIComponent(a)+("dataLayer"!==n?"&l="+n:"")+(window.ga4CustomUrl||""),o.parentNode.insertBefore(r,o)}(window,document,"script","dataLayer",(window.ga4TagId||"").trim()))},t=()=>{e(),["scroll","mousemove","keydown","touchstart","pointerdown"].forEach(e=>window.removeEventListener(e,t,{passive:!0}))};["scroll","mousemove","keydown","touchstart","pointerdown"].forEach(e
1=>window.addEventListener(e,t,{once:!0,passive:!0})),"requestIdleCallback"in window?requestIdleCallback(e,{timeout:5e3}):setTimeout(e,3e3)}triggerGaEvents(){let{ga4AdvancedConsentMode:e,acceptedGa:t,googleAnalyticsEnabled:i,ga4UserLoggedIn:n,ga4SignUp:a}=window;(e||t)&&i&&(window.dataLayer.cleanPush({event:"ga4_page_view"}),a&&(!S.getSimpleEntry("signUpSent")||"yes"!==S.getSimpleEntry("signUpSent"))?(T.signUp(),S.setSimpleEntry("signUpSent","yes")):S.getSimpleEntry("signUpSent")||S.setSimpleEntry("signUpSent","no"),n&&(!S.getSimpleEntry("loginSent")||"yes"!==S.getSimpleEntry("loginSent"))?(T.login(),S.setSimpleEntry("loginSent","yes")):S.getSimpleEntry("loginSent")||S.setSimpleEntry("loginSent","no"))}triggerGadsEvents(){let{googleAdsEnabled:e,ga4AdvancedConsentMode:t,acceptedGads:i}=window;(t||i)&&e&&window.dataLayer.cleanPush({event:"gads_page_view"})}cookieSubscriber(e){let t=e.detail;Object.keys(t).length>0?(Object.prototype.hasOwnProperty.call(t,this.cookieDisGoogleTag)&&window.googleTagEnabled&&t[this.cookieDisGoogleTag]&&(window.acceptedGtag=!0),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),Object.prototype.hasOwnProperty.call(t,this.cookieDisMeta)&&window.metaAdsEnabled&&t[this.cookieDisMeta]&&(window.acceptedMeta=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisMads)&&window.microsoftAdsEnabled&&t[this.cookieDisMads]&&(window.acceptedMads=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisPinterest)&&window.pinterestAdsEnabled&&t[this.cookieDisPinterest]&&(window.acceptedPinterest=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisTikTok)&&window.tiktokAdsEnabled&&t[this.cookieDisTikTok]&&(window.acceptedTiktok=!0),Object.prototype.hasOwnProperty.call(t,this.cookieOpenAi)&&window.openAiEnabled&&t[this.cookieOpenAi]&&(window.acceptedOpenAi=!0)):(this.activateIfConsent("gtag",s.getItem(this.cookieDisGoogleTag)),this.activateIfConsent("ga",s.getItem(this.cookieDisGoogleAnalytics)),this.activateIfConsent("gads",s.getItem(this.cookieDisGoogleAds)),this.activateIfConsent("meta",s.getItem(this.cookieDisMeta)),this.activateIfConsent("mads",s.getItem(this.cookieDisMads)),this.activateIfConsent("pinterest",s.getItem(this.cookieDisPinterest)),this.activateIfConsent("tiktok",s.getItem(this.cookieDisTikTok)),this.activateIfConsent("openai",s.getItem(this.cookieOpenAi))),this.updateConsent(),this.triggerCoreScript()}triggerActions(){this.actions.forEach(e=>{e.trigger()})}registerJSActions(){let{ga4AdvancedConsentMode:e,acceptedGa:t,acceptedGads:i,acceptedMeta:n,acceptedMads:a,acceptedPinterest:o,acceptedTiktok:r,acceptedOpenAi:s}=window;if(this.registerActions(R),this.registerActions(F),this.registerActions(H),[e,t,i,n,a,o,r,s].some(e=>e)){this.registerActions(q),this.registerActions(B);let e=this.actions.find(e=>e instanceof F),t=this.actions.find(e=>e instanceof B);e&&t&&t.setAddToCartAction(e)}}registerControllerActions(e,t){switch(!0){case"account"===e&&"logout"===t:S.setSimpleEntry("loginSent","no"),S.setSimpleEntry("signUpSent","no"),console.info("logout");break;case"checkout"===e&&"cartpage"===t:this.registerActions(M);break;case"customcheckout"===e&&"finishpage"===t:case"checkout"===e&&"finishpage"===t:this.registerActions(O);break;case"checkout"===e&&"confirmpage"===t:this.registerActions(Q);break;case"product"===e&&"index"===t:this.registerActions(N),this.registerActions(U);break;case"wishlist"===e&&"index"===t:case"navigation"===e&&"index"===t:case"navigation"===e&&"home"===t:this.registerActions(D),this.registerActions(V);break;case"navigation"===e&&"index"!==t:this.registerActions(V);break;case"search"===e&&"search"===t:this.registerActions(J)}}registerActions(e){this.actions.push(new e)}triggerPageViewEvent(){let e;let{ga4controllerName:t,ga4controllerAction:i,ga4AdvancedConsentMode:n,acceptedGa:a,acceptedGads:o,acceptedMeta:r,acceptedMads:s,acceptedPinterest:c,acceptedTiktok:d,acceptedOpenAi:l,customTagManagerEnabled:u,ga4Currency:m,ga4activeNavigationId:g,ga4activeNavigationName:p,requestLocale:_}=window,h="other_page";switch(window.ecomm_pagetype="other",window.openai_pageId="cms",!0){case"error"===t&&"error"===i:h="error_page",window.openai_pageId="error_page";break;case"accountprofile"===t&&"index"===i:case"accountprofile"===t&&"profileoverview"===i:case"orderoverview"===t&&"accountorder"===i:case"address"===t&&"accountaddressoverview"===i:case"accountpayment"===t&&"paymentoverview"===i:h="account_page",window.openai_pageId="account_page";break;case"checkout"===t&&"cartpage"===i:h="checkout_cart_page",window.ecomm_pagetype="cart",window.openai_pageId="cart";break;case"customcheckout"===t&&"finishpage"===i:case"checkout"===t&&"finishpage"===i:h="checkout_finish_page",window.ecomm_pagetype="purchase",window.openai_pageId="purchase";break;case"checkout"===t&&"confirmpage"===i:h="checkout_confirm_page",window.ecomm_pagetype="cart",window.openai_pageId="confirm_page";break;case"product"===t&&"index"===i:h="product_page",window.ecomm_pagetype="product",window.openai_pageId="product";break;case"wishlist"===t&&"index"===i:h="wishlist_page",window.openai_pageId="wishlist_page";break;case"navigation"===t&&"index"===i:h="category_page",window.ecomm_pagetype="category",window.openai_pageId="category";break;case"navigation"===t&&"home"===i:h="homepage",window.ecomm_pagetype="home",window.openai_pageId="home";break;case"search"===t&&"search"===i:h="search_page",window.ecomm_pagetype="searchresults",window.openai_pageId="search_page";break;case"auth"===t&&"loginpage"===i:h="login_page",window.openai_pageId="login_page";break;case"register"===t&&"checkoutregisterpage"===i:h="checkout_register_page",window.ecomm_pagetype="cart",window.openai_pageId="register_page"}let v=S.getSimpleEntry("landingPageInit");v&&"true"===v?e=!1:(e=!0,S.setSimpleEntry("landingPageInit","true"));let y=_.split("-"),w=y[0],f=y[1];(n||o||a||r||s||c||d||l)&&window.dataLayer.cleanPush({event:"pageview",ga4_event:"pageview",ga4_accept:a,google_ads_accept:o,meta_accept:r,pinterest_accept:c,microsoft_accept:s,tiktok_accept:d,openai_accept:l,page_type:h,meta_object:r?{meta_event:"PageView"}:void 0,microsoft_ads_object:s?{event:"page_view",page_title:window.document.title,page_location:window.location.href,ecomm_pagetype:window.ecomm_pagetype,ecomm_category:"category"===window.ecomm_pagetype?window.ga4activeNavigationName:void 0}:void 0,pinterest_object:c?{pinterest_event:"pagevisit"}:void 0,pinterest_object_serverside:c&&u?{pinterest_event:"page_visit"}:void 0,openai_object:l?{openai_event:"page_viewed",type:"contents",contents:{id:window.openai_pageId,name:window.document.title,content_type:"page"}}:void 0,landing_page_init:e,currency:m,language:w,country:f,category_id:"navigation"===t&&"index"===i?g:void 0,category:"navigation"===t&&"index"===i?p:void 0})}})})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.