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 o(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function a(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||o,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)&&a(e).forEach(function(t){l[t]=n(e[t],d)}),a(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 o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,i),a.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 o{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!o.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===o.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],a=t.replace(/^data(|-)/,""),r=n.toLowerCamelCase(a,"-");if(!o.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&&!o.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&&!o.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 a{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,o=e.split("."),a=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=a;a=function(i){n.unsubscribe(e),t(i)}}return this.el.addEventListener(o[0],a),this.listeners.push({splitEventName:o,opts:i,cb:a}),!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),a=o.getDataAttribute(this.el,"data-".concat(i,"-config"),!1),r=o.getAttribute(this.el,"data-".concat(i,"-options"),!1),s=[this.constructor.options,this.options,e];a&&s.push(window.PluginConfigManager.get(this._pluginName,a));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(!o.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new a(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 o="";"https:"===location.protocol&&(o="secure"),document.cookie="".concat(e,"=").concat(t,";expires=").concat(n.toUTCString(),";path=/;sameSite=lax;").concat(o)}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,o,a,r){this._removeExistingOffCanvas();let s=this._createOffCanvas(i,a,r,n);this.setContent(e,n,o),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 o=document.createElement("div");if(o.classList.add(l),o.classList.add(this._getPositionClass(e)),!0===t&&o.classList.add("is-fullwidth"),i){let e=typeof i;if("string"===e)o.classList.add(i);
1else if(Array.isArray(i))i.forEach(e=>{o.classList.add(e)});else throw Error('The type "'.concat(e,'" is not supported. Please pass an array or a string.'))}return document.body.appendChild(o),u.bsOffcanvas=new bootstrap.Offcanvas(o,{backdrop:!1!==n||"static"}),o}constructor(){this.$emitter=new a}}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],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=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,o,a,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 _{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 o=this._createPreparedRequest("POST",e,n);return this._sendRequest(o,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 o=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(o,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 o=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(o,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 p="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(p));d.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(p)).length>0}_getPosition(){return this.position===h.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(p,'" role="status">\n <span class="').concat("visually-hidden",'">Loading...</span>\n </div>')}static SELECTOR_CLASS(){return p}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",o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],a=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,o);this.setContent(e,t,i,o,a),m._openOffcanvas(c)}static setContent(e,t,i,n,o){let a=new _;super.setContent('<div class="offcanvas-body">'.concat(v.getTemplate(),"</div>"),n,o),y&&y.abort();let r=e=>{super.setContent(e,n,o),"function"==typeof i&&i(e)};y=t?a.post(e,t,w.executeCallback.bind(this,r)):a.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 I{static setEntry(e,t,i){sessionStorage.setItem(this.cleanString(e)+t,i),localStorage.setItem(this.cleanString(e)+t,i)}static getEntry(e,t){let i=sessionStorage.getItem(this.cleanString(e)+t);return i?i:localStorage.getItem(this.cleanString(e)+t)||null}static setEntriesIfMissing(e){e.forEach(e=>{let{entryString:t,productId:i,value:n}=e;this.getEntry(t,i)||this.setEntry(t,i,n)})}static setJsonEntry(e,t,i){sessionStorage.setItem(this.cleanString(e)+t,JSON.stringify(i)),localStorage.setItem(this.cleanString(e)+t,JSON.stringify(i)),this.getJsonEntry(this.cleanString(e),t)}static getJsonEntry(e,t){let i;if((i=sessionStorage.getItem(this.cleanString(e)+t))!==null||(i=localStorage.getItem(this.cleanString(e)+t))!==null)return JSON.parse(i);if(!window.ga4Product||!window.ga4Product[t])return console.warn("could not find information for "+t),null;{let e=JSON.parse(JSON.stringify(window.ga4Product[t]));return e.extra&&delete e.extra,e}}static getOrigin(e){let t;let i={id:"",name:"",index:0};if(window.ga4Product[e]){let{item_list_id:n,item_list_name:o,index:a,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=o,i.index=a)}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 cleanString(e){let t="";for(let i=0;i<e.length;i++)127>=e.charCodeAt(i)&&(t+=e.charAt(i));return t}}class S{static lineItemsContainer(){let e=document.querySelector(".discoga4-checkout-hidden-line-items-information");return e||((e||(e=document.querySelector(".discoga4-header-hidden-line-items-information")),e)?(console.info("discoga4-checkout-hidden-line-items-information was not found, using discoga4-header-hidden-line-items-information"),e):(e||(e=document.querySelector(".hidden-line-items-information")),e)?(console.info("discoga4-header-hidden-line-items-information was not found, using hidden-line-items-information"),e):e?void 0:(console.warn("no hidden-line-items-information found - returning empty array "),[]))}static getItemsFromStorage(e){let t,i,n;if(!e)return[];let o=e.dataset.taxstatus?e.dataset.taxstatus:"gross",a=e.querySelectorAll(".hidden-line-item"),r=[],s=[],c=0,d=0,l="",u=0;return a.forEach(e=>{let a=parseFloat(e.dataset.price),m=parseFloat(e.dataset.taxrate);t=0,i=0,"gross"===o&&m>0?t=Math.round(100*(t=(i=a)/(1+m/100)))/100:i=Math.round(100*(i=(t=a)*(1+m/100)))/100;let g="brutto"===window.taxConfiguration?i:t;if(a>=0){let o="brutto"===window.conversionConfiguration||"bruttoWithShipping"===window.conversionConfiguration?i:t,l=parseInt(e.dataset.quantity,10),u=e.dataset.id,m=e.dataset.sku,_=I.getEntry("productId_",m),p=I.getJsonEntry("ga4item_",_);if(p||(p=I.getJsonEntry("ga4item_",u)),p){let e=g,t=!1;window.ga4gpCoupon&&(I.getEntry("item_startPrice_"+_)&&(e=parseFloat(I.getEntry("item_startPrice_"+_))),t=e-g>0);let{item_id:i,item_name:n,price:c,coupon:d,discount:u,index:m,item_brand:h,item_category:v,item_list_name:y,item_category2:w,item_category3:f,item_category4:b,item_category5:C,item_variant:k,item_list_id:S}=p,E=t?parseFloat(c):g;r.push({item_id:i,item_name:n,affiliation:window.ga4affiliation,coupon:t?"Graduated Price":d,discount:t?Math.round((E-a)*100)/100:Math.round(100*u)/100,index:m,item_brand:h,item_category:v,item_category2:w||void 0,item_category3:f||void 0,item_category4:b||void 0,item_category5:C||void 0,item_list_id:S,item_list_name:y,item_variant:k,price:E,google_business_vertical:"retail",quantity:l}),s.push({item_id:i,item_name:n,index:m,item_brand:h,item_category:v,item_category2:w||void 0,item_category3:f||void 0,item_category4:b||void 0,item_category5:C||void 0,item_list_id:S,item_list_name:y,item_variant:k,price:o,quantity:l})}else r.push({item_id:m,item_name:e.dataset.name,affiliation:window.ga4affiliation,price:n,google_business_vertical:"retail",quantity:l}),s.push({item_id:m,item_name:e.dataset.name,affiliation:window.ga4affiliation,price:o,quantity:l});c+=t*l,d+=i*l}else a<0&&(u=Math.round((u+Math.abs(g))*100)/100,l=l+","+e.dataset.name)}),c-=u,d-=u,{items:r,ads_items:s,net:Math.round(100*c)/100,gross:Math.round(100*d)/100,coupon:l.replace(/^,+|,+$/g,"").replace(/^\s+|\s+$/gm,""),discount:u,code:l&&u&&localStorage.getItem("couponCode")?localStorage.getItem("couponCode"):void 0}}static getCoupon(e){if(!e)return[];let t=e.querySelectorAll(".hidden-line-item"),i="",n=0;
1return 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 E{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 o=parseFloat(e);switch(window.conversionConfiguration){case"bruttoWithShipping":o=e+t+i+n;break;case"nettoWithShipping":o=e+i;break;case"brutto":o=e+t}return Math.round(100*o)/100}}class A{static getAdsValueFromHeader(e,t){let i,n=0,o=0;if(window.ga4Product&&window.ga4Product[e]){let t=window.ga4Product[e].extra;n=window.ga4Product[e].price,o=t.taxRate}else(i=I.getJsonEntry("ga4item_",e))!==null&&(n=this.getSinglePriceFromJsonEntry(i),o=I.getEntry("taxRate_"+e)?I.getEntry("taxRate_"+e):0);let a=E.getTaxAwarePrice(n,o);return{unit:a,total:a*t}}static getValueFromHeader(e,t){let i,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=0;return window.ga4Product&&window.ga4Product[e]?o=parseFloat(window.ga4Product[e].price):(i=I.getJsonEntry("ga4item_",e))!==null&&(o=this.getSinglePriceFromJsonEntry(i,n)),o*t}static getFormUAItemFromHeader(e){let t,i="";return window.ga4Product&&window.ga4Product[e]?i=window.ga4Product[e].item_id:(t=I.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.
1item_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,o=0;return e.forEach(e=>{t.push(e.item_id);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({item_name:e.item_name,id:e.item_id,item_category:a,item_price:e.price.toString(),quantity:e.quantity,item_brand:e.item_brand}),o+=e.quantity,n+=e.quantity*e.price}),{ids:t,contents:i,totalvalue:n,numberOfItems:o}}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=[],o=0,a=0;return Object.entries(t).forEach(e=>{a+=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}),o+=1*s}),{ids:i,contents:n,totalvalue:o,numberOfItems:a}}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 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 o=[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:o,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 o=["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:o,brand:e.item_brand}),i+=e.quantity*e.price,n+=e.quantity}),{lineItems:t,totalvalue:i,numberOfItems:n}}static getPinterestItemsFromItems(e){if(!e||!e)return;let t=[],i=0,n=0;return e.forEach(e=>{let o=[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:o,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 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]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=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:_,item_category5:p,price:h,extra:v}=window.ga4Product[e],y=+v.realPrice,w=+h,f=+v.taxRate,b=v.parentId,C=0,k="";return a&&(I.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:o}]),b&&I.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:o}])),r&&(b&&I.getEntry("ga4_item_list_index_",b)?(i=parseInt(I.getEntry("ga4_item_list_index_",b),10),n=I.getEntry("ga4_item_list_id",b)?I.getEntry("ga4_item_list_id",b):n,o=I.getEntry("ga4_item_list_name",b)?I.getEntry("ga4_item_list_name",b):o):s&&I.getEntry("ga4_item_list_index_",s)?(i=I.getEntry("ga4_item_list_index_",s)?parseInt(I.getEntry("ga4_item_list_index_",s),10):i,n=I.getEntry("ga4_item_list_id",s)?I.getEntry("ga4_item_list_id",s):n,o=I.getEntry("ga4_item_list_name",s)?I.getEntry("ga4_item_list_name",s):o):(i=I.getEntry("ga4_item_list_index_",e)?parseInt(I.getEntry("ga4_item_list_index_",e),10):i,n=I.getEntry("ga4_item_list_id",e)?I.getEntry("ga4_item_list_id",e):n,o=I.getEntry("ga4_item_list_name",e)?I.getEntry("ga4_item_list_name",e):o)),window.ga4upCoupon&&(C=Math.round((y-w)*100)/100)>0&&(k="List price"),{ga:{item_id:s,item_name:c,affiliation:window.ga4affiliation,coupon:k,discount:C,index:i,item_brand:l,item_category:u,item_category2:m||void 0,item_category3:g||void 0,item_category4:_||void 0,item_category5:p||void 0,item_list_id:n,item_list_name:o,item_variant:d,price:w,google_business_vertical:"retail",quantity:t},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:_||void 0,item_category5:p||void 0,item_list_id:n,item_list_name:o,item_variant:d,price:E.getTaxAwarePrice(w,f),quantity:t}}}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 o=e.querySelectorAll(".product-box"),a=[],r=[],s=[],c=0,d=0,l=1;return o.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 o="lineItems["+n+"][quantity]";l=1,e.querySelector("input[name='".concat(o,"']"))&&(l=parseInt(e.querySelector("input[name='".concat(o,"']")).value,10)),c+=parseFloat(A.getAdsValueFromHeader(n,l).total),r.push(A.getFormUAItemFromHeader(n));let u=A.getProductFromHeader(n,l,d,t,i,!1,!0);s.push(u.channel),a.push(u.ga),window.ga4Product[n].index=d,window.ga4Product[n].item_list_id=t,window.ga4Product[n].item_list_name=i,d++}}),{items:a,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
1: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 F{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 T 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),q.addToCartFromHeader(i,n,!1,!0,!0)}}class q{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 T().trigger(),t&&(window.ga4Product=window.ga4Product||{},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,realPrice:e.getAttribute("data-real-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]}),q.viewItemList(e))}static addToCartFromHeader(e,t,i,n,o){let a,r,s={event:"add_to_cart",ga4_event:"add_to_cart"};i&&(s.event="remove_from_cart",s.ga4_event="remove_from_cart",n=!1);let c=parseFloat(A.getAdsValueFromHeader(e,t).total),d=parseFloat(A.getAdsValueFromHeader(e,t).unit),l=parseFloat(A.getValueFromHeader(e,t,!1)),u=A.getFormUAItemFromHeader(e),{customTagManagerEnabled:m,ga4AdvancedConsentMode:g,acceptedGa:_,googleAnalyticsEnabled:p,ga4Currency:h,ga4Product:v,acceptedGads:y,googleAdsEnabled:w,ecomm_pagetype:f,acceptedMeta:b,acceptedMads:C,acceptedPinterest:k,acceptedTiktok:S}=window;if(v&&v[e]){let{index:i,item_list_id:s,item_list_name:c,item_id:d,extra:l}=v[e],u=A.getProductFromHeader(e,t,i,s,c,n,o);a=u.ga,r=u.channel,I.setJsonEntry("ga4item_",e,a),I.setEntriesIfMissing([{entryString:"item_startPrice_",productId:e,value:l.item_startPrice}
1,{entryString:"taxRate_",productId:e,value:l.taxRate},{entryString:"productId_",productId:d,value:e},{entryString:"SKU_",productId:e,value:d}])}if((a=I.getJsonEntry("ga4item_",e))!==null&&(a.quantity=t,a.discount=Math.round(100*a.discount)/100),(g||_)&&p&&(dataLayer.push({ecommerce:null}),s.ecommerce={currency:h,value:parseFloat(l.toFixed(2)),items:[a]}),(g||y)&&w&&(dataLayer.push({items:null}),s.value=parseFloat(c.toFixed(2)),s.items=[u]),b){dataLayer.push({meta_object:null});let e=A.getMetaItemFromItem(r,d);s.meta_object={meta_event:i?"RemoveFromCart":"AddToCart",meta_object_data:{value:parseFloat(c.toFixed(2)),currency:h,contents:[e.contents],content_type:"product",content_name:e.name,content_category:e.category}}}if(C){dataLayer.push({microsoft_ads_object:null});let e=A.getMadsItemFromItem(r,d);e?s.microsoft_ads_object={event:i?"remove_from_cart":"add_to_cart",ecomm_prodid:e.ecomm_prodid,ecomm_pagetype:f,ecomm_totalvalue:parseFloat(c.toFixed(2)),revenue_value:parseFloat(c.toFixed(2)),currency:h,items:[e.lineItem]}:s.microsoft_ads_object={event:i?"remove_from_cart":"add_to_cart",ecomm_prodid:[],ecomm_pagetype:f,ecomm_totalvalue:parseFloat(c.toFixed(2)),revenue_value:parseFloat(c.toFixed(2)),currency:h,items:void 0}}if(k&&!i){dataLayer.push({pinterest_object:null});let e=A.getPinterestItemFromItem(r,d);if(e?s.pinterest_object={pinterest_event:"addtocart",value:parseFloat(c.toFixed(2)),currency:h,line_items:[e]}:s.pinterest_object={pinterest_event:"addtocart",currency:h,value:parseFloat(c.toFixed(2)),line_items:void 0},m){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems([r]);e?s.pinterest_object_serverside={event_name:"add_to_cart",currency:h,value:c.toFixed(2).toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}:s.pinterest_object_serverside={event_name:"add_to_cart",currency:h,value:parseFloat(c.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}}if(S){dataLayer.push({tiktok_object:null});let e=A.getTikTokItemFromItem(r,d);e?s.tiktok_object={tiktok_event:"AddToCart",currency:h,value:parseFloat(c.toFixed(2)),quantity:e.quantity,content_type:"product",contents:[e.lineItem]}:s.tiktok_object={tiktok_event:"AddToCart",currency:h,value:void 0,quantity:void 0,content_type:"product",line_items:void 0}}dataLayer.cleanPush(s)}static viewItemList(e,t){let i,n,o,a;let{customTagManagerEnabled:r,ga4activeNavigationId:s,searchTerm:c,searchResult:d,ga4AdvancedConsentMode:l,acceptedGa:u,googleAnalyticsEnabled:m,acceptedGads:g,ga4activeNavigationName:_,googleAdsEnabled:p,ga4Currency:h,ecomm_pagetype:v,acceptedMeta:y,acceptedMads:w,acceptedPinterest:f}=window;if("category"===e?(i=document.querySelector(".cms-element-product-listing"),n=s||"",o=document.title):"search"===e?(i=document.querySelector(".cms-element-product-listing-wrapper"),n="search="+c,o="search"):"productCrossSelling"===e?(i=t,n=t&&t.getAttribute("aria-labelledby")?t.getAttribute("aria-labelledby"):"cross selling",o=document.querySelector("#"+n).innerText):(n=(i=t)&&i.getAttribute("data-cms-element-id")?i.getAttribute("data-cms-element-id"):"cms element",o=e.toString()),!i)return;let b={event:"view_item_list",ga4_event:"view_item_list"},C=P.getItems(i,n,o),k=C.items;(l||u)&&m&&(dataLayer.push({ecommerce:null}),b.ecommerce={item_list_id:n,item_list_name:o,items:k});let I=0;if((a=C.adsItems)&&(I=C.total,(l||g)&&p&&(dataLayer.push({items:null}),b.value=parseFloat(I.toFixed(2)),b.items=a)),"search"===e&&this.viewSearchResults(a,I),"search"===e&&y){dataLayer.push({meta_object:null});let e=d?A.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=A.getMadsItemsFromItems(C.channelItems);t?b.microsoft_ads_object={event:"view_item_list",ecomm_category:"category"===e?_:void 0,ecomm_prodid:t.ecomm_prodid,ecomm_pagetype:v,ecomm_totalvalue:parseFloat(I.toFixed(2)),revenue_value:parseFloat(I.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=A.getPinterestItemsFromItems(k);if(t?e.pinterest_object={pinterest_event:"viewcategory",currency:h,value:parseFloat(I.toFixed(2)),line_items:t.lineItems}:e.pinterest_object={pinterest_event:"viewcategory",currency:h,value:parseFloat(I.toFixed(2)),line_items:void 0},r){dataLayer.push({pinterest_object_serverside:null});let t=A.getPinterestContentsFromItems(C.channelItems);t?e.pinterest_object_serverside={event_name:"view_category",currency:h,value:parseFloat(I.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(I.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,t){if(!e)return;let{customTagManagerEnabled:i,ga4Product:n,ga4Currency:o,ga4AdvancedConsentMode:a,acceptedGa:r,googleAnalyticsEnabled:s,acceptedGads:c,googleAdsEnabled:d,ecomm_pagetype:l,acceptedMeta:u,acceptedMads:m,acceptedPinterest:g,acceptedTiktok:_}=window,p=A.getAdsValueFromHeader(e,t).total,h=A.getValueFromHeader(e,t);n[e].index=0,n[e].item_list_id="product",n[e].item_list_name="product";let v={event:"view_item",ga4_event:"view_item"},y=A.getProductFromHeader(e,t,0,"product","product",!1,!0);if((a||r)&&s&&(dataLayer.push({ecommerce:null}),v.ecommerce={currency:o,value:parseFloat(h.toFixed(2)),items:[y.ga]}),(a||c)&&d&&(dataLayer.push({items:null}),v.value=parseFloat(p.toFixed(2)),v.items=[A.getFormUAItemFromHeader(e)]),u){dataLayer.push({meta_object:null});let e=A.getMetaItemFromItem(y.channel);v.meta_object={meta_event:"ViewContent",meta_object_data:{value:parseFloat(p.toFixed(2)),currency:o,contents:[e.contents],content_type:"product",content_name:e.name,content_category:e.category}}}if(m){dataLayer.push({microsoft_ads_object:null});let e=A.getMadsItemFromItem(y.channel);e?v.microsoft_ads_object={event:"view_item",ecomm_prodid:e.ecomm_prodid,ecomm_pagetype:l,ecomm_totalvalue:parseFloat(p.toFixed(2)),revenue_value:parseFloat(p.toFixed(2)),currency:o,items:[e.lineItem]}:v.microsoft_ads_object={event:"view_item",ecomm_prodid:[],ecomm_pagetype:l,ecomm_totalvalue:parseFloat(p.toFixed(2)),revenue_value:parseFloat(p.toFixed(2)),currency:o,items:void 0}}if(g){dataLayer.push({pinterest_object:null});let e=A.getPinterestItemFromItem(y.channel);if(e?v.pinterest_object={pinterest_event:"pagevisit",currency:o,value:parseFloat(p.toFixed(2)),line_items:[e]}:v.pinterest_object={pinterest_event:"pagevisit",currency:o,value:parseFloat(p.toFixed(2)),line_items:void 0},i){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems([y.channel]);e?v.pinterest_object_serverside={event_name:"view_content",currency:o,value:parseFloat(p.toFixed(2)).toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}:v.pinterest_object_serverside={event_name:"view_content",currency:o,value:parseFloat(p.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}}if(_){dataLayer.push({tiktok_object:null});let e=A.getTikTokItemFromItem(y.channel);e?v.tiktok_object={tiktok_event:"ViewContent",currency:o,value:parseFloat(p.toFixed(2)),content_type:"product",contents:[e.lineItem]}:v.tiktok_object={tiktok_event:"ViewContent",currency:o,value:void 0,content_type:"product",line_items:void 0}}I.setJsonEntry("ga4item_",e,y.ga),dataLayer.cleanPush(v)}static selectItem(e,t,i){if(!e)return;let{ga4Currency:n,ecomm_pagetype:o,acceptedMads:a}=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]},a){let t=I.getEntry("taxRate_"+e.item_id)?I.getEntry("taxRate_"+e.item_id):0,i=E.getTaxAwarePrice(e.price,t),a=A.getMadsItemFromItem(e,i);a?r.microsoft_ads_object={event:"select_content",ecomm_prodid:a.ecomm_prodid,ecomm_pagetype:o,ecomm_totalvalue:parseFloat(a.totalvalue.toFixed(2)),revenue_value:parseFloat(a.totalvalue.toFixed(2)),currency:n,items:[a.lineItem]}:r.microsoft_ads_object={event:"select_content",ecomm_prodid:[],ecomm_pagetype:o,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:o,acceptedTiktok:a,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=I.getEntry("taxRate_"+e.item_id)?I.getEntry("taxRate_"+e.item_id):0,m=E.getTaxAwarePrice(e.price,u);if(o){dataLayer.push({meta_object:null});let t=A.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=A.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=A.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=A.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(a){dataLayer.push({tiktok_object:null});let t=A.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=S.getItemsFromStorage(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:o,ga4Currency:a,ecomm_pagetype:r,acceptedPinterest:s,customTagManagerEnabled:c}=window;dataLayer.push({ecommerce:null,value:null,items:null});let d=S.getItemsFromStorage(e),l={event:"add_payment_info",ga4_event:"add_payment_info"},u=d.items,m=parseFloat(e.dataset.tax),g=parseFloat(e.dataset.shipping),_=parseFloat(e.dataset.shippingtax),p=d.ads_items,h=d.net,v="brutto"===window.taxConfiguration?d.gross:d.net,y=E.getTaxShippingAwarePrice(h,m,g,_);if(l.ecommerce={currency:a,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=A.getMadsItemsFromItems(p);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=A.getPinterestItemsFromItems(p);if(l.pinterest_object={pinterest_event:"addpaymentinfo",value:y,currency:a,line_items:e?e.lineItems:void 0},c){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems(p);l.pinterest_object_serverside={event_name:"add_payment_info",currency:a,value:y.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}}}if(o){dataLayer.push({tiktok_object:null});let e=A.getTikTokItemsFromItems(p);e?l.tiktok_object={tiktok_event:"AddPaymentInfo",currency:a,value:y,content_type:"product",contents:e.lineItems}:l.tiktok_object={tiktok_event:"AddPaymentInfo",currency:a,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:o,ga4AdvancedConsentMode:a,acceptedGa:r,googleAnalyticsEnabled:s,ga4CustomerLifetimeValue:c,ga4CustomerOrderCount:d,acceptedGads:l,googleAdsEnabled:u,ecomm_pagetype:m,acceptedMeta:g,acceptedMads:_,acceptedPinterest:p,acceptedTiktok:h}=window,v=t.dataset.useremail,y=t.dataset.usergroup,w=t.dataset.salutation,f="not_specified";"mr"===w?f="male":"mrs"===w&&(f="female");
1let b=await this.sha256(v),C=t.dataset.firstname,k=await this.sha256(C),I=t.dataset.lastname,P=await this.sha256(I),L=t.dataset.street,T=t.dataset.city,j=t.dataset.zip,x=t.dataset.region,M=t.dataset.land,O=t.dataset.phone,N=await this.sha256(O),D=F.gete164Phone(O,M),G=await this.sha256(D),R=F.geteItnlPhone(O,M),U=await this.sha256(R),B=window.ga4OrderNumber.toString(),V=await q.sha256(B),H=S.getItemsFromStorage(e),J=parseFloat(e.dataset.tax),W=parseFloat(e.dataset.shipping),$=parseFloat(e.dataset.shippingtax),K=e.dataset.taxstatus,Q=parseFloat(H.discount),z=H.code,Y=H.net,Z="brutto"===window.taxConfiguration?H.gross+W:H.net,X=E.getTaxShippingAwarePrice(Y,J,W,$),ee=W;switch(!0){case"netto"===window.taxConfiguration&&"net"===K:ee=W;break;case"netto"===window.taxConfiguration&&"gross"===K:ee=W-$;break;case"brutto"===window.taxConfiguration&&"net"===K:ee=W+$;break;case"brutto"===window.taxConfiguration&&"gross"===K:ee=W}let et={transaction_id:B,value:Z,tax:J,shipping:ee,currency:window.ga4Currency,coupon:H.coupon,customer_type:!(d&&d<=1)&&c?"returning":"new",items:H.items};if((a||r)&&s&&e&&(dataLayer.push({ecommerce:null}),i.ecommerce=et,i.coupon_code=z),(a||l)&&u&&t){i.value=X,i.transaction_id=B,i.currency=o,i.discount=Q,dataLayer.push({items:null}),i.items=A.getGAdsItemsFromItems(H.ads_items).items,i.email=b,i.phone_number=G;let e={};e.first_name=k,e.last_name=P,e.street=L,e.city=T,e.region=x,e.postal_code=j,e.country=M,i.address=e}if(g){dataLayer.push({meta_object:null});let e=A.getMetaItemsFromItems(H.ads_items);i.meta_object={meta_event:"Purchase",meta_object_data:{value:parseFloat(X.toFixed(2)),currency:o,contents:e.contents,content_type:"product",num_items:e.numberOfItems,order_id:B}}}if(_){dataLayer.push({microsoft_ads_object:null});let e=A.getMadsItemsFromItems(H.ads_items);i.microsoft_ads_object={event:"purchase",transaction_id:B,ecomm_prodid:e?e.ecomm_prodid:void 0,ecomm_pagetype:m,ecomm_totalvalue:X,revenue_value:X,currency:o,tax:et.tax,shipping:et.shipping,items:e?e.lineItems:void 0}}if(p){dataLayer.push({pinterest_object:null});let e=A.getPinterestItemsFromItems(H.ads_items);if(i.pinterest_object={pinterest_event:"checkout",order_quantity:e?e.numberOfItems:void 0,currency:o,value:X,order_id:B,promo_code:z,line_items:e?e.lineItems:void 0},n){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems(H.ads_items);i.pinterest_object_serverside={event_name:"checkout",currency:o,value:X.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems,order_id:B}}}if(h){dataLayer.push({tiktok_object:null});let e=A.getTikTokItemsFromItems(H.ads_items);e?i.tiktok_object={tiktok_event:"CompletePayment",currency:o,quantity:e.numberOfItems,value:X,content_type:"product",contents:e.lineItems}:i.tiktok_object={tiktok_event:"CompletePayment",currency:o,quantity:void 0,value:X,content_type:"product",contents:void 0}}i.additional={email:v,customer_group:y,sha256_email:b,first_name:C,sha256_first_name:k,last_name:I,sha256_last_name:P,e164_phone_number:D,sha256_e164_phone_number:G,phone_number:O,sha256_phone_number:N,phone_number_international:R,sha256_phone_number_international:U,gender:f,street:L,city:T,postal_code:j,region:x,country:M,transaction_id:B,sha256_transaction_id:V},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:S.getCoupon(e).code})}static beginCheckout(e){let t={event:"begin_checkout",ga4_event:"begin_checkout"},{ga4Currency:i,ecomm_pagetype:n,acceptedMeta:o,acceptedMads:a,acceptedTiktok:r,customTagManagerEnabled:s,acceptedPinterest:c}=window;dataLayer.push({ecommerce:null,value:null,items:null});let d=S.getItemsFromStorage(e),l=d.items,u=d.ads_items,m=parseFloat(e.dataset.tax),g=parseFloat(e.dataset.shipping),_=parseFloat(e.dataset.shippingtax),p=d.net,h="brutto"===window.taxConfiguration?d.gross:d.net,v=E.getTaxShippingAwarePrice(p,m,g,_);if(t.ecommerce={currency:i,value:h,coupon:d.coupon,items:l},o){dataLayer.push({meta_object:null});let e=A.getMetaItemsFromItems(u);t.meta_object={meta_event:"InitiateCheckout",meta_object_data:{value:parseFloat(v.toFixed(2)),currency:i,contents:e.contents,content_type:"product",num_items:e.numberOfItems}}}if(a){dataLayer.push({microsoft_ads_object:null});let e=A.getMadsItemsFromItems(u);t.microsoft_ads_object={event:"begin_checkout",ecomm_prodid:e?e.ecomm_prodid:void 0,ecomm_pagetype:n,ecomm_totalvalue:v,revenue_value:v,currency:i,items:e?e.lineItems:void 0}}if(c){dataLayer.push({pinterest_object:null});let e=A.getPinterestItemsFromItems(d.ads_items);if(t.pinterest_object={pinterest_event:"initiatecheckout",value:v,currency:i,line_items:e?e.lineItems:void 0},s){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems(u);t.pinterest_object_serverside={event_name:"initiate_checkout",currency:i,value:v.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=A.getTikTokItemsFromItems(u);e?t.tiktok_object={tiktok_event:"InitiateCheckout",currency:i,value:v,content_type:"product",contents:e.lineItems}:t.tiktok_object={tiktok_event:"InitiateCheckout",currency:i,value:h,content_type:"product",contents:void 0}}dataLayer.cleanPush(t)}static signUp(){let{acceptedMeta:e,acceptedMads:t,acceptedPinterest:i,acceptedTiktok:n,customTagManagerEnabled:o}=window,a={event:"sign_up",ga4_event:"sign_up",method:"mail"};e&&(dataLayer.push({meta_object:null}),a.meta_object={meta_event:"CompleteRegistration"}),t&&(dataLayer.push({microsoft_ads_object:null}),a.microsoft_ads_object={event:"sign_up",method:"mail"}),i&&(dataLayer.push({pinterest_object:null}),a.pinterest_object={pinterest_event:"signup"},o&&(dataLayer.push({pinterest_object_serverside:null}),a.pinterest_object_serverside={event_name:"signup"})),n&&(dataLayer.push({tiktok_object:null}),a.tiktok_object={tiktok_event:"CompleteRegistration"}),dataLayer.cleanPush(a)}static viewSearchResults(e,t){let i={event:"view_search_results",ga4_event:"view_search_results"};dataLayer.push({ecommerce:null});let{searchTerm:n,searchResult:o,ga4AdvancedConsentMode:a,acceptedGads:r,googleAdsEnabled:s,ecomm_pagetype:c,acceptedMeta:d,acceptedMads:l}=window;if(i.search_term=n,i.search_result=0,o&&(i.search_result=parseInt(o,10)),(a||r)&&s&&t&&e&&(dataLayer.push({items:null}),i.value=parseFloat(t),i.items=e),d){dataLayer.push({meta_object:null});let e=o?A.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))).forEac
1h(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 o=e.target;if(!o)return;let a=o.getAttribute("value")-o.value;if(o.closest(".cart-item"))t=o.closest(".cart-item").querySelector(".cart-item-remove-button");else{if(!o.closest(".line-item"))return;t=o.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=I.getEntry("productId_",e)}n&&this.addToCartFromHeader(n,Math.abs(a),a>0,!1,!0)}static changeQty(e){let t,i,n;let o=e.target,a=o.querySelector("[selected='selected']").value-o.value;if(o.closest(".cart-item"))t=o.closest(".cart-item").querySelector(".cart-item-remove-button");else{if(!o.closest(".line-item"))return;t=o.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=I.getEntry("productId_",e)}n&&this.addToCartFromHeader(n,Math.abs(a),a>0,!1,!0)}static searchSuggested(e,t){if(!e&&!t)return;let{acceptedMeta:i,acceptedMads:n,acceptedPinterest:o,acceptedTiktok:a,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?A.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}),o&&(dataLayer.push({pinterest_object:null}),s.pinterest_object={pinterest_event:"search",search_query:e},r)){dataLayer.push({pinterest_object_serverside:null});let t=A.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}}a&&(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:o}=window,a={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}),a.microsoft_ads_object={event:"search",search_term:i}),t&&(dataLayer.push({pinterest_object:null}),a.pinterest_object={pinterest_event:"search",search_query:i},o)){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromWindow("view_search_results");e?a.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}:a.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(a)}static addCoupon(e){dataLayer.push({ecommerce:null}),dataLayer.cleanPush({event:"add_coupon_code",ga4_event:"add_coupon_code",coupon_code:e})}static lead(){dataLayer.push({ecommerce:null,value:null,items:null});let{ga4Currency:e,ecomm_pagetype:t,acceptedMeta:i,acceptedMads:n,acceptedPinterest:o,acceptedTiktok:a,generateLeadValue:r,customTagManagerEnabled:s}=window,c=parseFloat(r),d={event:"generate_lead",ga4_event:"generate_lead",currency:e,value:c};i&&(dataLayer.push({meta_object:null}),d.meta_object={meta_event:"Lead",meta_object_data:{value:c,currency:e}}),n&&(dataLayer.push({microsoft_ads_object:null}),d.microsoft_ads_object={event:"generate_lead",ecomm_pagetype:t,ecomm_totalvalue:c,revenue_value:c,currency:e}
1),o&&(dataLayer.push({pinterest_object:null}),d.pinterest_object={pinterest_event:"lead",lead_type:"Contactform"},s&&(dataLayer.push({pinterest_object_serverside:null}),d.pinterest_object_serverside={event_name:"lead"})),a&&(dataLayer.push({tiktok_object:null}),d.tiktok_object={tiktok_event:"SubmitForm"}),dataLayer.cleanPush(d)}static cartContent(e){let t=S.getItemsFromStorage(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=S.getItemsFromStorage(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),o="00000000";t+=(o+n).slice(-o.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 j 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;q.addCoupon(e),localStorage.setItem("couponCode",e)}}_onChangeProductQuantity(e){q.changeQty(e)}_onChangeProductQuantityNumber(e){q.changeQtyNumber(e)}_onBeginCheckoutSidebar(){let e=S.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||q.beginCheckout(e)}_triggerViewCart(){let e=S.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||q.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 o=document.querySelector(".cart-add-promotion");o&&o.addEventListener("submit",this._onAddPromotion.bind(this))}_onAddPromotion(){if(document.getElementById("addPromotionInput")&&document.getElementById("addPromotionInput").value){let e=document.getElementById("addPromotionInput").value;q.addCoupon(e),localStorage.setItem("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"};q.addToCartFromForm(t)}_triggerViewCart(){if(!this.actionEnabled)return;let e=S.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||q.viewCart(e)}_onBeginCheckoutPage(){if(!this.actionEnabled)return;let e=S.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||q.beginCheckout(e)}_onChangeProductQuantity(e){q.changeQty(e)}_onChangeProductQuantityNumber(e){q.changeQtyNumber(e)}}class O extends x{trigger(){if(localStorage.getItem("purchaseSent")&&localStorage.getItem("purchaseSent")===new URLSearchParams(window.location.search).get("orderId"))return;let e=S.lineItemsContainer();return this._finish(e)}async _finish(e){if(!this.actionEnabled)return;localStorage.getItem("paymentSelected")&&"yes"===localStorage.getItem("paymentSelected")?console.info("paymentInfo sent in previous page"):window.ga4PaymentMethod&&q.paymentInfo(e,window.ga4PaymentMethod),localStorage.getItem("shippingSelected")&&"yes"===localStorage.getItem("shippingSelected")?console.info("shippingInfo sent in previous page"):window.ga4ShippingMethod&&q.shippingInfo(e,window.ga4ShippingMethod);let t=document.querySelector(".ga4-hidden-ads-information");window.ga4OrderNumber&&(await new Promise(e=>setTimeout(e,800)),await q.purchase(e,t),localStorage.setItem("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?q.viewItemFromHeader(e,1):t.querySelector("input[name$='][referencedId]']")&&(e=t.querySelector("input[name$='][referencedId]']").value)in window.ga4Product?q.viewItemFromHeader(e,1):t.querySelector("input[name=product-id]")&&(e=t.querySelector("input[name=product-id]").value)in window.ga4Product&&q.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&&q.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(){q.viewItemListAfterChange("category")},1e3),i=!1}).observe(t,{subtree:!0,childList:!0})}}class G extends x{trigger(){let e=document.querySelectorAll(".cms-section");e&&G._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")&&(G._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")&&(q.lead(),t.disconnect())})})});e.forEach(e=>{e.querySelector(".cms-element-form")&&t.observe(e,{subtree:!0,childList:!0})})}}let{Feature:R}=window;class U extends x{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,o;if(window.ga4UserLoggedIn&&R.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&&(o=document.querySelector(".discoga4-checkout-hidden-line-item[data-id='".concat(n.getAttribute("data-product-id"),"']")))!=null){let e=o.getAttribute("data-sku");t=I.getEntry("productId_",e)}break;case(i=e.closest(".cart-item-product"))!=null:if((n=i.querySelector(".cart-item-remove-button"))!=null&&(o=document.querySelector(".discoga4-checkout-hidden-line-item[data-id='".concat(n.getAttribute("data-product-id"),"']")))!=null){let e=o.getAttribute("data-sku");t=I.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);break;default:console.warn("no fitting item for wishlist event")}if(t){let e;if(window.ga4Product&&window.ga4Product[t]){let e=I.getOrigin(t),i=A.getProductFromHeader(t,1,e.index,e.id,e.name,!0,!0);q.addToWishlist(i.ga,A.getValueFromHeader(t,1))}else(e=I.getJsonEntry("ga4item_",t))!==null?(e.discount=0,q.addToWishlist(e,A.getValueFromHeader(t,1))):console.warn("productId not found in page nor storage")}}}_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=I.getOrigin(t),i=A.getProductFromHeader(t,1,e.index,e.id,e.name,!0,!0);q.selectItem(i.ga,e.id,e.name)}}_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]){console.warn("ga4SearchSuggestProduct not found in window object for index: "+t+" - Sending minimal info...");let i=e.getAttribute("href"),n=e.getAttribute("title"),o=i.split("/").slice(-1)[0],a=e.querySelector(".search-suggest-product-price").innerText;I.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:o,value:t},{entryString:"ga4_item_list_id",productId:o,value:"search_suggest"},{entryString:"ga4_item_list_name",productId:o,value:"search_suggest"}]),q.selectItem({item_id:o,item_name:n,quantity:1,price:a?parseFloat(a):0},"search_suggest","search_suggest");return}let o=JSON.parse(JSON.stringify(window.ga4SearchSuggestProduct[t]));if(!o)return;let{item_id:a,item_list_id:r,item_list_name:s,extra:c}=o,d=c.parentId;o.extra&&delete o.extra,I.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:a,value:t},{entryString:"ga4_item_list_id",productId:a,value:r},{entryString:"ga4_item_list_name",productId:a,value:s}]),d&&I.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}]),q.selectItem(o,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){console.warn("cart-item-row or line-item not found");return}let n=i.querySelector(".cart-item-remove-button")?i.querySelector(".cart-item-remove-button"):i.querySelector(".line-item-remove-button");if(!n){console.warn("cart-item-remove-button or line-item-remove-button not found");return}let o=n.dataset.productId?n.dataset.productId:n.dataset["product-id"];if(!o){console.warn("productId not found on page");return}if((t=I.getJsonEntry("ga4item_",o))!==null){t.discount=Math.round(100*t.discount)/100;let e=I.getEntry("ga4_item_list_id",o),i=I.getEntry("ga4_item_list_name",o);q.selectItem(t,e,i)}else console.warn("productId not found in storage")}_onRemoveFromCart(e){let t=e.dataset.productId;if(!t)return;let i=e.closest(".cart-item-row")?e.closest(".cart-item-row"):e.closest(".line-item-row");
1if(!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),q.addToCartFromHeader(t,parseInt(n,10),!0,!1,!1)}}class B 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;q.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),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&&q.viewItemList("productCrossSelling",e))}})}).observe(e,{attributes:!0})}_onClick(e,t){this.sleep(2e3).then(()=>{let i=document.getElementById(t);i&&q.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;q.viewItemList(t,e);let o=e.querySelectorAll(".product-slider-controls-prev,.product-slider-controls-next");e.querySelector(".product-slider-container")&&(n=e.querySelector(".product-slider-container").id
1),o&&n&&o.forEach(e=>e.addEventListener("click",function(){i._onClick(t,n)}))})})}_onClick(e,t){this.sleep(1e3).then(()=>{let i=document.getElementById(t);i&&q.viewItemList(e,i)})}sleep(e){return new Promise(t=>setTimeout(t,e))}}class H 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&&q.search()}_triggerViewSearchResults(){this.actionEnabled&&q.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(){q.viewItemListAfterChange("search")},1e3)}).observe(t,{subtree:!0,childList:!0})}}class J extends x{trigger(){let e=new URLSearchParams(window.location.search).get("isPayPalExpressCheckout"),t=S.lineItemsContainer();t&&(localStorage.setItem("couponCode",t.dataset.couponcode),"1"===e&&q.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 o=document.querySelectorAll(".shipping-method-input");o&&o.forEach(e=>e.addEventListener("change",this._onChangeShipping.bind(this)))}_onChangeProductQuantity(e){q.changeQty(e)}_onChangePayment(e){let t=e.target.closest(".payment-method-radio").querySelector(".payment-method-description").querySelector("strong").innerText,i=S.lineItemsContainer();t&&q.paymentInfo(i,t),localStorage.setItem("paymentSelected","yes")}_onChangeShipping(e){let t=S.lineItemsContainer(),i=e.target.closest(".shipping-method-radio").querySelector(".shipping-method-description").querySelector("strong").innerText;i&&q.shippingInfo(t,i),localStorage.setItem("shippingSelected","yes")}}class W 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),o=document.createElement("script");o.appendChild(n),document.querySelector("head").appendChild(o),q.searchSuggested(e.replace("/search?search=",""),t)}_onAfterClearSearchResults(){window.ga4SearchSuggestProduct&&delete window.ga4SearchSuggestProduct}}let{PluginManager:$}=window;!window.ga4Enabled||$.getPluginList()&&$.getPluginList().GA4||$.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.trackingEnabled=!1,this.tagManagerEnabled=!1,this.gaEventsTriggered=!1,this.gadsEventsTriggered=!1,this.pageViewEventTriggered=!1,this.cookieConfig=window.ga4CookieConfig,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.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.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)});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.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,o=setInterval(()=>{window.dataLayer.find(e=>e.event&&e.event===t)&&(window.dispatchEvent(new Event(t)),clearInterval(o)),++n>50&&(clearInterval(o),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,e.updateConsent(),e.triggerCoreScript()}ga4AdvancedConsentMode&&(this.tagManagerEnabled||(customTagManager&&ga4customScript?this.enableCustomTagManager():this.enableTagManager(),this.tagManagerEnabled=!0),setTimeout(function(){e.triggerCoreScript()},2e3))}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.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.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.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);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:"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"}].forEach(t=>{let{name:i,key:n}=t,o=e.find(e=>e.name===i);o&&this.activateIfConsent(n,o.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"}];if(localStorage.getItem("ucData")){let t=JSON.parse(localStorage.getItem("ucData"));if(t){let i=t.consent.services;e.forEach(e=>{let{name:t,key:n}=e,o=Object.values(i).filter(e=>e.name===t);void 0!==o&&0!==o.length&&this.activateIfConsent(n,o[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:o,acceptedGads:a,acceptedMeta:r,acceptedMads:s,acceptedPinterest:c,acceptedTiktok:d}=window;!this.tagManagerEnabled&&e&&(t&&i?(this.enableCustomTagManager(),window.customTagManagerEnabled=!0):this.enableTagManager(),this.tagManagerEnabled=!0),!this.gaEventsTriggered&&(n||o)&&(this.triggerGaEvents(),this.gaEventsTriggered=!0),!this.gadsEventsTriggered&&(n||a)&&(this.triggerGadsEvents(),this.gadsEventsTriggered=!0);let l=[n,o,a,r,s,c,d].some(e=>e);!this.pageViewEventTriggered&&l&&(this.triggerPageViewEvent(),this.pageViewEventTriggered=!0),!this.trackingEnabled&&l&&(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)}}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(){window.dataLayer=window.dataLayer||[],window.dataLayer.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=q.replaceEmptyStringsWithUndefined(e);n.push(t)});let{ga4controllerName:o,ga4controllerAction:a,ga4UserLoggedIn:r,ga4Guest:s,ga4UserId:c,ga4CustomerType:d,ga4CustomerLifetimeValue:l,ga4CustomerOrderCount:u,ga4salesChannelId:m,ga4salesChannelName:g}=window,_="Logged Out";s?_="Guest":r&&(_="Logged In"),n[0].existing_customer=c?"yes":"no",n[0].user_id=c,n[0].account_type=d,n[0].user_login_state=_;let p=0;("customcheckout"===o&&"finishpage"===a||"checkout"===o&&"finishpage"===a)&&(p=1);let h=u&&u<=p;n[0].new_customer=!!h||!l,n[0].customer_type=!h&&l?"returning":"new",!h&&l&&(n[0].customer_lifetime_value=Math.round(100*parseFloat(l))/100),n[0].saleschannelid=m,n[0].saleschannelname=g,window.dataLayer.push(...n)},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:o,acceptedMads:a,ga4AdvancedConsentMode:r}=window;e.functionality_storage="granted",e.personalization_storage="granted",e.security_storage="granted",t&&i?(e.anal
1ytics_storage="granted",e.ad_storage="granted",e.ad_personalization="granted",e.ad_user_data="granted"):n&&o&&(e.ad_storage="granted",e.ad_personalization="granted",e.ad_user_data="granted"),Object.keys(e).length>0&&this.gtag("consent","update",e),a&&(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=q.replaceEmptyStringsWithUndefined(e);n.push(t)}),window.uetq.push(...n)}),r&&q.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,o){var a=t.getElementsByTagName(i)[0],r=t.createElement(i);r.async=!0,r.src="https://www.googletagmanager.com/gtm.js?id="+encodeURIComponent(o)+("dataLayer"!==n?"&l="+n:"")+(window.ga4CustomUrl||""),a.parentNode.insertBefore(r,a)}(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=>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:o}=window;(e||t)&&i&&(window.dataLayer.cleanPush({event:"ga4_page_view"}),o&&(!localStorage.getItem("signUpSent")||"yes"!==localStorage.getItem("signUpSent"))?(q.signUp(),localStorage.setItem("signUpSent","yes")):localStorage.getItem("signUpSent")||localStorage.setItem("signUpSent","no"),n&&(!localStorage.getItem("loginSent")||"yes"!==localStorage.getItem("loginSent"))?(q.login(),localStorage.setItem("loginSent","yes")):localStorage.getItem("loginSent")||localStorage.setItem("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)):(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.updateConsent(),this.triggerCoreScript()}
1triggerActions(){this.actions.forEach(e=>{e.trigger()})}registerJSActions(){let{ga4AdvancedConsentMode:e,acceptedGa:t,acceptedGads:i,acceptedMeta:n,acceptedMads:o,acceptedPinterest:a,acceptedTiktok:r}=window;this.registerActions(G),this.registerActions(T),this.registerActions(W),[e,t,i,n,o,a,r].some(e=>e)&&(this.registerActions(j),this.registerActions(U))}registerControllerActions(e,t){switch(!0){case"account"===e&&"logout"===t:localStorage.setItem("loginSent","no"),localStorage.setItem("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(J);break;case"product"===e&&"index"===t:this.registerActions(N),this.registerActions(B);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(H)}}registerActions(e){this.actions.push(new e)}triggerPageViewEvent(){let e;let{ga4controllerName:t,ga4controllerAction:i,ga4AdvancedConsentMode:n,acceptedGa:o,acceptedGads:a,acceptedMeta:r,acceptedMads:s,acceptedPinterest:c,acceptedTiktok:d,customTagManagerEnabled:l,ga4Currency:u,ga4activeNavigationId:m,ga4activeNavigationName:g,requestLocale:_}=window,p="other_page";switch(window.ecomm_pagetype="other",!0){case"error"===t&&"error"===i:p="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:p="account_page";break;case"checkout"===t&&"cartpage"===i:p="checkout_cart_page",window.ecomm_pagetype="cart";break;case"customcheckout"===t&&"finishpage"===i:case"checkout"===t&&"finishpage"===i:p="checkout_finish_page",window.ecomm_pagetype="purchase";break;case"checkout"===t&&"confirmpage"===i:p="checkout_confirm_page",window.ecomm_pagetype="cart";break;case"product"===t&&"index"===i:p="product_page",window.ecomm_pagetype="product";break;case"wishlist"===t&&"index"===i:p="wishlist_page";break;case"navigation"===t&&"index"===i:p="category_page",window.ecomm_pagetype="category";break;case"navigation"===t&&"home"===i:p="homepage",window.ecomm_pagetype="home";break;case"search"===t&&"search"===i:p="search_page",window.ecomm_pagetype="searchresults";break;case"auth"===t&&"loginpage"===i:p="login_page";break;case"register"===t&&"checkoutregisterpage"===i:p="checkout_register_page",window.ecomm_pagetype="cart"}let h=sessionStorage.getItem("landingPageInit");h&&"true"===h?e=!1:(e=!0,sessionStorage.setItem("landingPageInit","true"));let v=_.split("-"),y=v[0],w=v[1];(n||a||o||r||s||c||d)&&window.dataLayer.cleanPush({event:"pageview",ga4_event:"pageview",ga4_accept:o,google_ads_accept:a,meta_accept:r,pinterest_accept:c,microsoft_accept:s,tiktok_accept:d,page_type:p,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&&l?{pinterest_event:"page_visit"}:void 0,landing_page_init:e,currency:u,language:y,country:w,category_id:"navigation"===t&&"index"===i?m:void 0,category:"navigation"===t&&"index"===i?g: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.