PageSourceSearch

https://spaun.com/theme/05e3ad661579d4d119f5de9ec3a04859/js/dura-g-t-m/dura-g-t-m.js?1790854591

js spaun.com collected 2026-10-02 21:09:36 UTC 31,108 bytes, 16 lines download raw bytes

1(()=>{"use strict";var e={857:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function n(e,t,i){return e.concat(t).map(function(e){return s(e,i)})}function r(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,i,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=s;var c,d,u=Array.isArray(i);return u!==Array.isArray(e)?s(i,l):u?l.arrayMerge(e,i,l):(d={},(c=l).isMergeableObject(e)&&r(e).forEach(function(t){d[t]=s(e[t],c)}),r(i).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&c.isMergeableObject(i[t])?d[t]=(function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a})(t,c)(e[t],i[t],c):d[t]=s(i[t],c))}),d)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return a(e,i,t)},{})},e.exports=a}},t={};function i(s){var n=t[s];if(void 0!==n)return n.exports;var r=t[s]={exports:{}};return e[s](r,r.exports,i),r.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 s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}})(),(()=>{i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e=i(857),t=i.n(e);class s{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=s.toUpperCamelCase(e,t);return s.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>s.ucFirst(e.toLowerCase())).join(""):s.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class n{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!n.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===n.hasAttribute(e,t))throw Error(`The required property "${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],r=t.replace(/^data(|-)/,""),o=s.toLowerCamelCase(r,"-");if(!n.isNode(e)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let a=e.dataset[o];if(void 0===a){if(i)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return a}return s.parsePrimitive(a)}static querySelector(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let s=e.querySelector(t)||!1;if(i&&!1===s)throw Error(`The required element "${t}" does not exist in parent node!`);return s}static querySelectorAll(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let s=e.querySelectorAll(t);if(0===s.length&&(s=!1),i&&!1===s)throw Error(`At least one item of "${t}" must exist in parent node!`);return s}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=`
2            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),
3            select:not([tabindex^="-"]):not([disabled]),
4            textarea:not([tabindex^="-"]):not([disabled]),
5            button:not([tabindex^="-"]):not([disabled]),
6            a[href]:not([tabindex^="-"]):not([disabled]),
7            [tabindex]:not([tabindex^="-"]):not([disabled])
8        `;return e.querySelectorAll(t)}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}class r{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,n=e.split("."),r=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=r;r=function(i){s.unsubscribe(e),t(i)}}return this.el.addEventListener(n[0],r),this.listeners.push({splitEventName:n,opts:i,cb:r}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}class o{constructor(e,t={},i=!1){if(!n.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new r(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){throw Error(`The "init" method for the plugin "${this._pluginName}" is not defined.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let i=s.toDashCase(this._pluginName),r=n.getDataAttribute(this.el,`data-${i}-config`,!1),o=n.getAttribute(this.el,`data-${i}-options`,!1),a=[this.constructor.options,this.options,e];r&&a.push(window.PluginConfigManager.get(this._pluginName,r));try{o&&a.push(JSON.parse(o))}catch(e){throw console.error(this.el),Error(`The data attribute "data-${i}-options" could not be parsed to json: ${e.message}`)}return t().all(a.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}}class a{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 s=new Date;s.setTime(s.getTime()+864e5*i);let n="";"https:"===location.protocol&&(n="secure"),document.cookie=`${e}=${t};expires=${s.toUTCString()};path=/;sameSite=lax;${n}`}static getItem(e){if(!e)return!1;let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let s=i[e];for(;" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return!1}static removeItem(e){document.cookie=`${e}= ; expires = Thu, 01 Jan 1970 00:00:00 GMT;path=/`}static key(){return""}static clear(){}}class l{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return l.isIPhoneDevice()||l.isIPadDevice()}static isNativeWindowsBrowser(){return l.isIEBrowser()||l.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":l.isTouchDevice(),"is-ios":l.isIOSDevice(),"is-native-windows":l.isNativeWindowsBrowser(),"is-iphone":l.isIPhoneDevice(),"is-ipad":l.isIPadDevice(),"is-ie"
8:l.isIEBrowser(),"is-edge":l.isEdgeBrowser()}}}class c{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 ${typeof e} is not iterable!`)}}let d="offcanvas";class u{constructor(){this.$emitter=new r}open(e,t,i,s,n,r,o){this._removeExistingOffCanvas();let a=this._createOffCanvas(i,r,o,s);this.setContent(e,s,n),this._openOffcanvas(a,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(`.${d}`)}close(e){let t=this.getOffCanvas();c.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){window.focusHandler.saveFocusState("offcanvas"),u.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=l.isTouchDevice()?"touchend":"click",i=this.getOffCanvas();c.iterate(i,t=>{let s=()=>{setTimeout(()=>{t.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:i})},e),t.removeEventListener("hide.bs.offcanvas",s)};t.addEventListener("hide.bs.offcanvas",s)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0});let s=document.querySelectorAll(".js-offcanvas-close");c.iterate(s,i=>i.addEventListener(t,this.close.bind(this,e)))}_removeExistingOffCanvas(){u.bsOffcanvas=null;let e=this.getOffCanvas();return c.iterate(e,e=>e.remove())}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":`offcanvas-${e}`}_createOffCanvas(e,t,i,s){let n=document.createElement("div");if(n.classList.add(d),n.classList.add(this._getPositionClass(e)),n.setAttribute("tabindex","-1"),!0===t&&n.classList.add("is-fullwidth"),i){let e=typeof i;if("string"===e)n.classList.add(i);else if(Array.isArray(i))i.forEach(e=>{n.classList.add(e)});else throw Error(`The type "${e}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(n),u.bsOffcanvas=new bootstrap.Offcanvas(n,{backdrop:!1!==s||"static"}),n}}let h=Object.freeze(new u);class f{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",s=!(arguments.length>3)||void 0===arguments[3]||arguments[3],n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";h.open(e,t,i,s,n,r,o)}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;h.setContent(e,t,i)}static setAdditionalClassName(e){h.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;h.close(e)}static exists(){return h.exists()}static getOffCanvas(){return h.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}class m{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",e,i);return this._sendRequest(s,null,t)}post(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let n=this._createPreparedRequest("POST",e,s);return this._sendRequest(n,t,i)}delete(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let n=this._createPreparedRequest("DELETE",e,s);return this._sendRequest(n,t,i)}patch(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let n=this._createPreparedRequest("PATCH",e,s);return this._sendRequest(n,t,i)}
8abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):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}}let p="loader",g={BEFORE:"before",INNER:"inner"};class v{constructor(e,t=g.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===g.INNER){this.parent.innerHTML=v.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),v.getTemplate())}}remove(){let e=this.parent.querySelectorAll(`.${p}`);c.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${p}`).length>0}_getPosition(){return this.position===g.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${p}" role="status">
9                    <span class="visually-hidden">Loading...</span>
10                </div>`}static SELECTOR_CLASS(){return p}}let _=null;class b extends f{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,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left",n=!(arguments.length>4)||void 0===arguments[4]||arguments[4],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:f.REMOVE_OFF_CANVAS_DELAY(),o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";if(!e)throw Error("A url must be given!");h._removeExistingOffCanvas();let l=h._createOffCanvas(s,o,a,n);this.setContent(e,t,i,n,r),h._openOffcanvas(l)}static setContent(e,t,i,s,n){let r=new m;super.setContent(`<div class="offcanvas-body">${v.getTemplate()}</div>`,s,n),_&&_.abort();let o=e=>{super.setContent(e,s,n),"function"==typeof i&&i(e)};_=t?r.post(e,t,b.executeCallback.bind(this,o)):r.get(e,b.executeCallback.bind(this,o))}static executeCallback(e,t){"function"==typeof e&&e(t),window.PluginManager.initializePlugins()}}let C="element-loader-backdrop";class y extends v{static create(e){e.classList.add("has-element-loader"),y.exists(e)||(y.appendLoader(e),setTimeout(()=>{let t=e.querySelector(`.${C}`);t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(`.${C}`);t&&t.remove()}static exists(e){return e.querySelectorAll(`.${C}`).length>0}static getTemplate(){return`
11        <div class="${C}">
12            <div class="loader" role="status">
13                <span class="visually-hidden">Loading...</span>
14            </div>
15        </div>
16        `}static appendLoader(e){e.insertAdjacentHTML("beforeend",y.getTemplate())}}let w="CookieConfiguration_Update";class E extends o{static #e=this.options={offCanvasPosition:"left",submitEvent:"click",cookiePreference:"cookie-preference",cookieSelector:"[data-cookie]",buttonOpenSelector:".js-cookie-configuration-button button",buttonSubmitSelector:".js-offcanvas-cookie-submit",buttonAcceptAllSelector:".js-offcanvas-cookie-accept-all",globalButtonAcceptAllSelector:".js-cookie-accept-all-button",wrapperToggleSelector:".offcanvas-cookie-entries span",parentInputSelector:".offcanvas-cookie-parent-input",customLinkSelector:`[href="${window.router["frontend.cookie.offcanvas"]}"]`,entriesActiveClass:"offcanvas-cookie-entries--active",entriesClass:"offcanvas-cookie-entries",groupClass:"offcanvas-cookie-group",parentInputClass:"offcanvas-cookie-parent-input"};
16init(){this.lastState={active:[],inactive:[]},this._httpClient=new m,this._registerEvents()}_registerEvents(){let{submitEvent:e,buttonOpenSelector:t,customLinkSelector:i,globalButtonAcceptAllSelector:s}=this.options;Array.from(document.querySelectorAll(t)).forEach(t=>{t.addEventListener(e,this.openOffCanvas.bind(this))}),Array.from(document.querySelectorAll(i)).forEach(t=>{t.addEventListener(e,this._handleCustomLink.bind(this))}),Array.from(document.querySelectorAll(s)).forEach(t=>{t.addEventListener(e,this._acceptAllCookiesFromCookieBar.bind(this))})}_registerOffCanvasEvents(){let{submitEvent:e,buttonSubmitSelector:t,buttonAcceptAllSelector:i,wrapperToggleSelector:s}=this.options,n=this._getOffCanvas();if(n){let r=n.querySelector(t),o=n.querySelector(i),l=Array.from(n.querySelectorAll('input[type="checkbox"]')),c=Array.from(n.querySelectorAll(s));r&&r.addEventListener(e,this._handleSubmit.bind(this,a)),o&&o.addEventListener(e,this._acceptAllCookiesFromOffCanvas.bind(this,a)),l.forEach(t=>{t.addEventListener(e,this._handleCheckbox.bind(this))}),c.forEach(t=>{t.addEventListener(e,this._handleWrapperTrigger.bind(this))})}}_handleCustomLink(e){e.preventDefault(),this.openOffCanvas()}_handleUpdateListener(e,t){let i=this._getUpdatedCookies(e,t);document.$emitter.publish(w,i)}_getUpdatedCookies(e,t){let{lastState:i}=this,s={};return e.forEach(e=>{i.inactive.includes(e)&&(s[e]=!0)}),t.forEach(e=>{i.active.includes(e)&&(s[e]=!1)}),s}openOffCanvas(e){let{offCanvasPosition:t}=this.options,i=window.router["frontend.cookie.offcanvas"];this._hideCookieBar(),b.open(i,!1,this._onOffCanvasOpened.bind(this,e),t)}closeOffCanvas(e){b.close(),"function"==typeof e&&e()}_onOffCanvasOpened(e){this._registerOffCanvasEvents(),this._setInitialState(),this._setInitialOffcanvasState(),PluginManager.initializePlugins(),"function"==typeof e&&e()}_hideCookieBar(){let e=PluginManager.getPluginInstances("CookiePermission");e&&e[0]&&(e[0]._hideCookieBar(),e[0]._removeBodyPadding())}_setInitialState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||this._getCookies("all"),i=[],s=[];t.forEach(e=>{let{cookie:t,required:n}=e;a.getItem(t)||n?i.push(t):s.push(t)}),this.lastState={active:i,inactive:s}}_setInitialOffcanvasState(){let e=this.lastState.active,t=this._getOffCanvas();e.forEach(e=>{let i=t.querySelector(`[data-cookie="${e}"]`);i.checked=!0,this._childCheckboxEvent(i)})}_handleWrapperTrigger(e){e.preventDefault();let{entriesActiveClass:t,entriesClass:i,groupClass:s}=this.options,{target:n}=e,r=this._findParentEl(n,i,s);r&&(r.classList.contains(t)?r.classList.remove(t):r.classList.add(t))}_handleCheckbox(e){let{parentInputClass:t}=this.options,{target:i}=e;(i.classList.contains(t)?this._parentCheckboxEvent:this._childCheckboxEvent).call(this,i)}_findParentEl(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;for(;e&&!e.classList.contains(i);){if(e.classList.contains(t))return e;e=e.parentElement}return null}_isChecked(e){return!!e.checked}_parentCheckboxEvent(e){let{groupClass:t}=this.options,i=this._isChecked(e),s=this._findParentEl(e,t);this._toggleWholeGroup(i,s)}_childCheckboxEvent(e){let{groupClass:t}=this.options,i=this._isChecked(e),s=this._findParentEl(e,t);this._toggleParentCheckbox(i,s)}_toggleWholeGroup(e,t){Array.from(t.querySelectorAll("input")).forEach(t=>{t.checked=e})}_toggleParentCheckbox(e,t){let{parentInputSelector:i}=this.options,s=Array.from(t.querySelectorAll(`input:not(${i})`)),n=Array.from(t.querySelectorAll(`input:not(${i}):checked`));if(s.length>0){let e=t.querySelector(i);if(e){let t=n.length>0,i=t&&n.length!==s.length;e.checked=t,e.indeterminate=i}}}_handleSubmit(){let e=this._getCookies("active"),t=this._getCookies("inactive"),{cookiePreference:i}=this.options,s=[],n=[];t.forEach(e=>{let{cookie:t}=e;n.push(t),a.getItem(t)&&a.removeItem(t)}),e.forEach(e=>{let{cookie:t,value:i,expiration:n}=e;s.push(t),t&&i&&a.setItem(t,i,n)}),a.setItem(i,"1","30"),this._handleUpdateListener(s,n),this.closeOffCanvas(document.$emitter.publish("CookieConfiguration_CloseOffCanvas"))}acceptAllCookies(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e){this._handleAcceptAll(),this.closeOffCanvas();return}y.create(this.el);let t=window.router["frontend.cookie.offcanvas"];this._httpClient.get(t,e=>{let t=new DOMParser().parseFromString(e,"text/html");this._handleAcceptAll(t),y.remove(this.el),this._hideCookieBar()})}_acceptAllCookiesFromCookieBar(){return this.acceptAllCookies(!0)}_acceptAllCookiesFromOffCanvas(){return this.acceptAllCookies()}_handleAcceptAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this._getCookies("all",e);this._setInitialState(t);let{cookiePreference:i}=this.options;
16t.forEach(e=>{let{cookie:t,value:i,expiration:s}=e;t&&i&&a.setItem(t,i,s)}),a.setItem(i,"1","30"),this._handleUpdateListener(t.map(e=>{let{cookie:t}=e;return t}),[])}_getCookies(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{cookieSelector:i}=this.options;return t||(t=this._getOffCanvas()),Array.from(t.querySelectorAll(i)).filter(t=>{switch(e){case"all":return!0;case"active":return this._isChecked(t);case"inactive":return!this._isChecked(t);default:return!1}}).map(e=>{let{cookie:t,cookieValue:i,cookieExpiration:s,cookieRequired:n}=e.dataset;return{cookie:t,value:i,expiration:s,required:n}})}_getOffCanvas(){let e=f?f.getOffCanvas():[];return!!e&&e.length>0&&e[0]}}class S extends o{static #e=this.options={itemInputSelector:'input[name="dura-gtm-item"]',boxSelector:".product-box",detailSelector:".product-detail, .is-ctl-product",selectLinkSelector:".product-name, .product-image-link, .btn-detail, .product-button-detail",addToCartFormSelector:"form[data-add-to-cart], form.buy-widget",addByNumberFormSelector:"form.cart-add-product",removeButtonSelector:".line-item-remove-button",lineItemSelector:".line-item",wishlistSelector:"[data-add-to-wishlist]",wishlistAddedClass:"product-wishlist-added"};init(){this.cfg=window.duraGtm||{},this.cfg.active&&(document.addEventListener("submit",this._onSubmit.bind(this),!0),document.addEventListener("click",this._onClick.bind(this),!0),document.addEventListener("change",this._onChange.bind(this),!0),document.addEventListener("focusin",this._onFocus.bind(this),!0),document.$emitter&&(document.$emitter.subscribe(w,this._onCookieUpdate.bind(this)),document.$emitter.subscribe("DuraConsent_Decision",this._onConsentDecision.bind(this))),this._hookListing(),this._hookOffcanvasCart(),this._hookAjaxForms(),this.cfg.legacy&&window.duraGtmConsent&&window.duraGtmConsent.analytics&&this.push({event:"cookieConsentGiven"}))}push(e){window.dataLayer=window.dataLayer||[],Object.prototype.hasOwnProperty.call(e,"ecommerce")&&window.dataLayer.push({ecommerce:null}),window.dataLayer.push(e),this.cfg.debug&&window.console&&window.console.debug("[DuraGTM]",e)}_ecommerce(e,t){let i=e.reduce((e,t)=>e+(Number(t.price)||0)*(Number(t.quantity)||1),0);return Object.assign({currency:this.cfg.currency,value:Math.round(100*i)/100},t||{},{items:e})}_parseItem(e){if(!e)return null;let t=e.querySelector(this.options.itemInputSelector);if(!t||!t.value)return null;try{return JSON.parse(t.value)}catch(e){return null}}_itemFor(e,t,i){let s=this._parseItem(e)||this._parseItem(e.closest(this.options.boxSelector))||this._parseItem(e.closest(this.options.detailSelector));return!s&&t&&this.cfg.items&&this.cfg.items[t]&&(s=this.cfg.items[t]),s||(s={item_id:t||"",item_name:i||""}),s=Object.assign({},s),this.cfg.list&&!s.item_list_id&&e.closest(this.options.boxSelector)&&(this.cfg.list.id&&(s.item_list_id=this.cfg.list.id),this.cfg.list.name&&(s.item_list_name=this.cfg.list.name)),s}_onSubmit(e){let t=e.target;t instanceof HTMLFormElement&&(t.matches(this.options.addToCartFormSelector)?this._addToCart(t):t.matches(this.options.addByNumberFormSelector)&&this._addByNumber(t))}_addToCart(e){let t=new FormData(e),i=null,s=1;for(let[e]of t.entries()){let s=e.match(/^lineItems\[([^\]]+)\]\[id\]$/);if(s){i=t.get(e)||s[1];break}}if(i){let e=parseInt(t.get("lineItems["+i+"][quantity]"),10);e>0&&(s=e)}let n=this._itemFor(e,i,t.get("product-name"));!n.item_brand&&t.get("brand-name")&&(n.item_brand=t.get("brand-name")),n.quantity=s;let r=!!e.closest(this.options.boxSelector);this.push({event:r&&this.cfg.listingAddEvent||"add_to_cart",ecommerce:this._ecommerce([n])})}_addByNumber(e){let t=e.querySelector('input[name="number"], input.form-control'),i=t?t.value.trim():"";i&&this.push({event:"add_to_cart",ecommerce:this._ecommerce([{item_id:i,item_name:i,quantity:1}])})}_onClick(e){let t=e.target instanceof Element?e.target:null;if(!t)return;let i=t.closest(this.options.removeButtonSelector);if(i){this._removeFromCart(i);return}let s=t.closest(this.options.wishlistSelector);if(s){this._addToWishlist(s);return}let n=t.closest("a");if(n&&n.matches(this.options.selectLinkSelector)){let e=n.closest(this.options.boxSelector);e&&this._selectItem(e)}}_selectItem(e){let t=this._itemFor(e,null,null);if(!t.item_id)return;let i={items:[t]};t.item_list_id&&(i.item_list_id=t.item_list_id),t.item_list_name&&(i.item_list_name=t.item_list_name),this.push({event:"select_item",ecommerce:i})}_removeFromCart(e){let t=e.closest("form"),i=this._parseItem(t)||this._parseItem(e.closest(this.options.lineItemSelector));i&&this.push({event:"remove_from_cart",ecommerce:this._ecommerce([i])})}_addToWishlist(e){if(e.classList.contains(this.options.wishlistAddedClass))return;let t=null;
16try{t=JSON.parse(e.getAttribute("data-add-to-wishlist-options")||"{}").productId||null}catch(e){t=null}let i=this._itemFor(e,t,null);i.item_id&&this.push({event:"add_to_wishlist",ecommerce:this._ecommerce([i])})}_onFocus(e){let t=e.target;this._isQuantityField(t)&&void 0===t.dataset.duraGtmPrev&&(t.dataset.duraGtmPrev=String(this._currentValue(t)))}_onChange(e){let t=e.target;if(!this._isQuantityField(t))return;let i=t.closest(this.options.lineItemSelector);if(!i)return;let s=this._parseItem(i);if(!s)return;let n=parseInt(t.value,10),r=parseInt(void 0!==t.dataset.duraGtmPrev?t.dataset.duraGtmPrev:this._defaultValue(t),10);if(!n||!r||n===r)return;t.dataset.duraGtmPrev=String(n);let o=n-r,a=Object.assign({},s,{quantity:Math.abs(o)});this.push({event:o>0?"add_to_cart":"remove_from_cart",ecommerce:this._ecommerce([a])})}_isQuantityField(e){return(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)&&"quantity"===e.name&&!!e.closest(this.options.lineItemSelector)}_currentValue(e){return e.value}_defaultValue(e){if(e instanceof HTMLSelectElement){let t=Array.from(e.options).find(e=>e.defaultSelected);return t?t.value:e.value}return e.defaultValue||e.value}_instances(e){try{return window.PluginManager.getPluginInstances(e)||[]}catch(e){return[]}}_hookListing(){this._instances("Listing").forEach(e=>{e.$emitter.subscribe("Listing/afterRenderResponse",()=>this._pushListingFromDom(e.el))})}_pushListingFromDom(e){let t=e||document,i=[];if(t.querySelectorAll(".product-box").forEach((e,t)=>{let s=this._parseItem(e);if(!s)return;let n=Object.assign({},s,{index:t+1});this.cfg.list&&(this.cfg.list.id&&(n.item_list_id=this.cfg.list.id),this.cfg.list.name&&(n.item_list_name=this.cfg.list.name)),i.push(n)}),!i.length)return;let s={items:i};this.cfg.list&&this.cfg.list.id&&(s.item_list_id=this.cfg.list.id),this.cfg.list&&this.cfg.list.name&&(s.item_list_name=this.cfg.list.name),this.push({event:"view_item_list",trigger:"listing_update",ecommerce:s})}_hookOffcanvasCart(){this._instances("OffCanvasCart").forEach(e=>{e.$emitter.subscribe("offCanvasOpened",()=>{window.setTimeout(()=>{let e=[];document.querySelectorAll('.offcanvas .line-item input[name="dura-gtm-item"], .offcanvas-cart input[name="dura-gtm-item"]').forEach(t=>{try{e.push(JSON.parse(t.value))}catch(e){}}),e.length&&this.push({event:"view_cart",trigger:"offcanvas",ecommerce:this._ecommerce(e)})},50)})})}_hookAjaxForms(){this._instances("FormAjaxSubmit").forEach(e=>{e.$emitter.subscribe("onAfterAjaxSubmit",t=>{let i=e.el,s=t&&t.detail?String(t.detail.response||""):"";if(!i||!/alert-success/.test(s))return;let n=i.getAttribute("action")||"",r=/contact/.test(n)||i.classList.contains("contact-form")?"contact":/newsletter/.test(n)?"newsletter":"form";this.push({event:"generate_lead",lead_type:r})})})}_onConsentDecision(e){let t=this.cfg.consent;if(!t||"cookies"!==t.mode||!1===t.update)return;let i=e&&e.detail||(window.duraConsent?window.duraConsent.getState():null);if(!i||!i.signals||"none"===i.decision)return;let s=Object.assign({},i.signals),n=window.duraGtmConsent||{};window.duraGtmConsent={analytics:"granted"===s.analytics_storage,ads:"granted"===s.ad_storage},window.dataLayer=window.dataLayer||[],function(){window.dataLayer.push(arguments)}("consent","update",s),this.push({event:"dura_consent_update",consent:s}),this.cfg.legacy&&window.duraGtmConsent.analytics&&!n.analytics&&this.push({event:"cookieConsentGiven"})}_onCookieUpdate(e){let t=this.cfg.consent;if(!t||"cookies"!==t.mode||!1===t.update)return;let i=e&&e.detail||{};if(window.duraConsent&&"function"==typeof window.duraConsent.getState||![].concat(t.analytics||[],t.ads||[]).some(e=>Object.prototype.hasOwnProperty.call(i,e)))return;let s=e=>(e||[]).some(e=>Object.prototype.hasOwnProperty.call(i,e)?!!i[e]:this._cookieSet(e)),n=s(t.analytics),r=s(t.ads),o=window.duraGtmConsent||{};if(o.analytics===n&&o.ads===r)return;window.duraGtmConsent={analytics:n,ads:r};let a={ad_storage:r?"granted":"denied",ad_user_data:r?"granted":"denied",ad_personalization:r?"granted":"denied",analytics_storage:n?"granted":"denied"};window.dataLayer=window.dataLayer||[],function(){window.dataLayer.push(arguments)}("consent","update",a),this.push({event:"dura_consent_update",consent:a}),this.cfg.legacy&&n&&!o.analytics&&this.push({event:"cookieConsentGiven"})}_cookieSet(e){return document.cookie.split(";").some(t=>{let i=t.trim();if(0!==i.indexOf(e+"="))return!1;let s=decodeURIComponent(i.substring(e.length+1));return""!==s&&"0"!==s&&"false"!==s})}}window.PluginManager.register("DuraGtm",S,"body")})()})();

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.