PageSourceSearch

https://www.deuter.com/theme/844d577e27288815b915146180acbe43/js/a…op-switch-header-offcanvas.plugin.5824de.js

js deuter.com collected 2026-10-02 03:09:38 UTC 28,732 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[54386,37817,53156],{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!==o},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?r(Array.isArray(e)?[]:{},e,t):e}function i(e,t,o){return e.concat(t).map(function(e){return n(e,o)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function r(e,o,l){(l=l||{}).arrayMerge=l.arrayMerge||i,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c,d,h=Array.isArray(o);return h!==Array.isArray(e)?n(o,l):h?l.arrayMerge(e,o,l):(d={},(c=l).isMergeableObject(e)&&s(e).forEach(function(t){d[t]=n(e[t],c)}),s(o).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&c.isMergeableObject(o[t])?d[t]=(function(e,t){if(!t.customMerge)return r;var o=t.customMerge(e);return"function"==typeof o?o:r})(t,c)(e[t],o[t],c):d[t]=n(o[t],c))}),d)}r.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,o){return r(e,o,t)},{})},e.exports=r},709:(e,t,o)=>{o.d(t,{Z:()=>i});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 o=n.toUpperCamelCase(e,t);return n.lcFirst(o)}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 i{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!i.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 o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!1===i.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(o)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=t.replace(/^data(|-)/,""),a=n.toLowerCamelCase(s,"-");if(!i.isNode(e)){if(o)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(o)throw Error("This node doesn't support the dataset attribute!");return}let r=e.dataset[a];if(void 0===r){if(o)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return r}return n.parsePrimitive(r)}static querySelector(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelector(t)||!1;if(o&&!1===n)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return n}static querySelectorAll(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelectorAll(t);if(0===n.length&&(n=!1),o&&!1===n)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return n}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return e.querySelectorAll('\n            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n            select:not([tabindex^="-"]):not([disabled]),\n            textarea:not([tabindex^="-"]):not([disabled]),\n            button:not([tabindex^="-"]):not([disabled]),\n            a[href]:not([tabindex^="-"]):not([disabled]),\n            [tabindex]:not
1([tabindex^="-"]):not([disabled])\n        ')}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]}}},266:(e,t,o)=>{o.d(t,{Z:()=>n});class n{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var o of e.entries())t(o[1],o[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(o=>{t(e[o],o)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}},107:(e,t,o)=>{o.d(t,{Z:()=>n});class n{get(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",e,o);return this._sendRequest(n,null,t)}post(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("POST",e,n);return this._sendRequest(i,t,o)}delete(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(i,t,o)}patch(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let i=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(i,t,o)}abort(){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 ".concat(e.responseURL," was aborted"))}),e.addEventListener("error",()=>{console.warn("the request to ".concat(e.responseURL," failed with status ").concat(e.status))}),e.addEventListener("timeout",()=>{console.warn("the request to ".concat(e.responseURL," timed out"))})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,o){return this._registerOnLoaded(e,o),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,o){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),o&&this._request.setRequestHeader("Content-type",o),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}},306:(e,t,o)=>{o.d(t,{ar:()=>l,ZP:()=>u});class n{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return n.isIPhoneDevice()||n.isIPadDevice()}static isNativeWindowsBrowser(){return n.isIEBrowser()||n.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":n.isTouchDevice(),"is-ios":n.isIOSDevice(),"is-native-windows":n.isNativeWindowsBrowser(),"is-iphone":n.isIPhoneDevice(),"is-ipad":n.isIPadDevice(),"is-ie":n.isIEBrowser(),"is-edge":n.isEdgeBrowser()}}}var i=o(266);let s="modal-backdrop",a="modal-backdrop-open",r="no-scroll",l=350,c={ON_CLICK:"backdrop/onclick"};class d{create(e){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let t=document.body.lastChild;document.documentElement.classList.add(r),setTimeout(function(){t.classList.add(a),"function"==typeof e&&e()},75),this._dispatchEvents()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=this._getBackdrops();i.Z.iterate(t,e=>e.classList.remove(a)),setTimeout(this._removeExistingBackdrops.bind(this),e),document.documentElement.classList.remove(r)}_dispatchEvents(){let e=n.isTouchDevice()?"touchstart":"click";document.addEventListener(e,function(e){e.target.classList.contains(s)&&document.dispatchEvent(new CustomEvent(c.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(".".concat(s))}_removeExistingBackdrops(){if(!1===this._exists())return;let e=this._getBackdrops();i.Z.iterate(e,e=>e.remove())}_exists(){return document.querySelectorAll(".".concat(s)).length>0}_getTemplate(){return'<div class="'.concat(s,'"></div>')}constructor(){return d.instance||(d.instance=this),d.instance}}let h=Object.freeze(new d);class u{static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;h.create(e)}static remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;h.remove(e)}static SELECTOR_CLASS(){return s}}},386:(e,t,o)=>{o.r(t),o.d(t,{default:()=>c});var n=o(857),i=o.n(n),s=o(107),a=o(709),r=o(156),l=o(817);class c extends l.default{init(){this._client=new s.Z(window.accessKey,window.contextToken),this.PluginManager=window.PluginManager,"ajax"===this.options.integrationType?(document.addEventListener("updateShopSwitchHeader",e=>{"offcanvas"===this.options.componentPosition&&(this.removeHeaderOffCanvas(),this.requestHeaderOffcanvas())},{once:!0}),"offcanvas"===this.options.componentPosition&&this.requestHeaderOffcanvas()):(this.initHeader(),document.addEventListener("updateShopSwitchHeader",e=>{this.updateActiveCountry(e.detail.countryName,e.detail.countryIso.toLowerCase())},{once:!0}))}requestHeaderOffcanvas(){let e={};this.options.componentPosition&&(e.componentPosition="offcanvas"),this._client.post(this.options.url,JSON.stringify(e),this.insertHeaderOffcanvas.bind(this))}
1removeHeaderOffCanvas(){document.getElementById("acris-shop-switch-header-ajax-offcanvas").innerHTML=""}insertHeaderOffcanvas(e){document.getElementById("acris-shop-switch-header-ajax-offcanvas").innerHTML=e,this.initHeader()}initHeader(){this.headerContainerOffcanvas=a.Z.querySelector(document,".top-bar-country-offcanvas"),this.activeHeaderSpansOffcanvas=document.querySelectorAll(".offcanvas-nav-text"),this.headerContainerOffcanvas&&"offcanvas"===this.options.componentPosition?(this.options.currentDomainUrl=this.headerContainerOffcanvas.dataset.currentdomainurl,this.options.modalCloseType=this.headerContainerOffcanvas.dataset.currentmodalclosetype,this.options.externalDomains=this.collectExternalDomains(this.headerContainerOffcanvas.dataset.externaldomains)):(this.options.currentDomainUrl="",this.options.modalCloseType="",this.options.externalDomains=""),this.headerContainerOffcanvas&&"offcanvas"===this.options.componentPosition&&this.headerContainerOffcanvas.addEventListener("click",this._onChangeCountrySelectHeader.bind(this),!0)}updateActiveCountry(e,t){for(let t=0;t<this.activeHeaderSpansOffcanvas.length;t++)this.activeHeaderSpansOffcanvas[t].innerHTML=e}}c.options=i()(r.default.options,{componentPosition:""})},817:(e,t,o)=>{o.r(t),o.d(t,{default:()=>m});var n=o(857),i=o.n(n),s=o(107),a=o(156),r=o(266);let l="loader",c={BEFORE:"before",INNER:"inner"};class d{create(){if(!this.exists()){if(this.position===c.INNER){this.parent.innerHTML=d.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),d.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(l));r.Z.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(l)).length>0}_getPosition(){return this.position===c.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(l,'" role="status">\n                    <span class="').concat("visually-hidden",'">Loading...</span>\n                </div>')}static SELECTOR_CLASS(){return l}constructor(e,t=c.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}}var h=o(306);let u=Object.freeze(new class extends d{create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!this.exists()&&e&&(h.ZP.create(),document.querySelector(".".concat(h.ZP.SELECTOR_CLASS())).insertAdjacentHTML("beforeend",d.getTemplate()))}remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];super.remove(),e&&h.ZP.remove()}constructor(){super(document.body)}});class p{static create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];u.create(e)}static remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];u.remove(e)}}class m extends a.default{init(){this._client=new s.Z(window.accessKey,window.contextToken),this.PluginManager=window.PluginManager,"ajax"===this.options.integrationType?(document.addEventListener("updateShopSwitchHeader",e=>{"top-bar"===this.options.componentPosition&&(this.removeHeaderTopBar(),this.requestHeaderTopBar())},{once:!0}),"top-bar"===this.options.componentPosition&&this.requestHeaderTopBar()):(this.initHeader(),document.addEventListener("updateShopSwitchHeader",e=>{this.updateActiveCountry(e.detail.countryName,e.detail.countryIso.toLowerCase())},{once:!0}))}requestHeaderTopBar(){let e={};this.options.componentPosition&&(e.componentPosition="top-bar"),this._client.post(this.options.url,JSON.stringify(e),this.insertHeaderTopBar.bind(this))}removeHeaderTopBar(){document.getElementById("acris-shop-switch-header-ajax-top-bar").innerHTML=""}insertHeaderTopBar(e){document.getElementById("acris-shop-switch-header-ajax-top-bar").innerHTML=e,this.initHeader()}requestHeaderOffcanvas(){let e={};this.options.componentPosition&&(e.componentPosition="offcanvas"),this._client.post(this.options.url,JSON.stringify(e),this.insertHeaderOffcanvas.bind(this))}removeHeaderOffCanvas(){document.getElementById("acris-shop-switch-header-ajax-offcanvas").innerHTML=""}insertHeaderOffcanvas(e){document.getElementById("acris-shop-switch-header-ajax-offcanvas").innerHTML=e,this.initHeader()}initHeader(){"ajax"===this.options.integrationType?this.headerContainer=document.getElementById("acris-s
1hop-switch-header-ajax-top-bar"):this.headerContainer=document.getElementById("acris-shop-switch-header-direct-top-bar"),this.activeHeaderSpan=document.getElementById("shop-switch-header-active-country-name-top-bar"),this.activeHeaderFlag=document.getElementById("shop-switch-header-active-country-flag-top-bar"),this.activeHeaderSpansOffcanvas=document.querySelectorAll(".offcanvas-nav-text"),this.headerContainer&&"top-bar"===this.options.componentPosition?(this.options.currentDomainUrl=this.headerContainer.dataset.currentdomainurl,this.options.modalCloseType=this.headerContainer.dataset.currentmodalclosetype,this.options.externalDomains=this.collectExternalDomains(this.headerContainer.dataset.externaldomains)):(this.options.currentDomainUrl="",this.options.modalCloseType="",this.options.externalDomains=""),this.headerContainer&&"top-bar"===this.options.componentPosition&&this.headerContainer.addEventListener("click",this._onChangeCountrySelectHeader.bind(this),!0)}_onChangeCountrySelectHeader(e){if("INPUT"===e.target.nodeName&&(this.selectedElement=e.target,this.selectedElement.dataset.domaincountryposition===this.options.componentPosition&&this.selectedElement.dataset.domainurls)){let e=JSON.parse(this.selectedElement.dataset.domainurls)[0],t=this.getSelectedCountryId();this.updateShippingCountry(t,e)}}getSelectedCountryId(){if(this.selectedElement)return this.selectedElement.dataset.countryid}updateShippingCountry(e,t){let o=this.selectedElement.dataset.domaincountryname,n=this.selectedElement.dataset.domaincountryiso.toLowerCase();p.create(),this.options.currentDomainUrl===t||""===t?(this.updateActiveCountry(o,n),super.saveConfigurationByAjaxRequest(!0)):this.setRedirect(t,this.options.currentDomainUrl,this.getSelectedCountryId())}updateActiveCountry(e,t){if(this.activeHeaderSpan&&(this.activeHeaderSpan.innerHTML=e),this.activeHeaderFlag){let e=this.activeHeaderFlag.classList,o="";for(let t=0;t<e.length;t++)e[t].startsWith("country-")&&(o=e[t].split("-")[1]);this.activeHeaderFlag.classList.replace("country-"+o,"country-"+t),this.activeHeaderFlag.classList.replace("language-"+o,"language-"+t)}}collectExternalDomains(e){if(e)try{return JSON.parse(e)}catch(e){}return[]}}m.options=i()(a.default.options,{componentPosition:"",switchCountryIdParamName:"switch-country-id",switchDoneParamName:"switch-done"})},156:(e,t,o)=>{o.r(t),o.d(t,{default:()=>d});var n=o(107),i=o(709);class s{static isSupported(){return"undefined"!==document.cookie}static setItem(e,t,o){if(null==e)throw Error("You must specify a key to set a cookie");let n=new Date;n.setTime(n.getTime()+864e5*o);let i="";"https:"===location.protocol&&(i="secure"),document.cookie="".concat(e,"=").concat(t,";expires=").concat(n.toUTCString(),";path=/;sameSite=lax;").concat(i)}static getItem(e){if(!e)return!1;let t=e+"=",o=document.cookie.split(";");for(let e=0;e<o.length;e++){let n=o[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(){}}var a=o(306);let r="js-pseudo-modal",l="js-pseudo-modal-template-root-element";class c{open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.ar;this._hideExistingModal(),this._create(),setTimeout(this._open.bind(this,e),t)}close(){let e=this.getModal();this._modalInstance=bootstrap.Modal.getInstance(e),this._modalInstance.hide()}getModal(){return this._modal||this._create(),this._modal}updatePosition(){this._modalInstance.handleUpdate()}updateContent(e,t){this._content=e,this._setModalContent(e),this.updatePosition(),"function"==typeof t&&t.bind(this)()}_hideExistingModal(){try{let e=i.Z.querySelector(document,".".concat(r," .modal"),!1);if(!e)return;let t=bootstrap.Modal.getInstance(e);if(!t)return;t.hide()}catch(e){console.warn("[PseudoModalUtil] Unable to hide existing pseudo modal before opening pseudo modal: ".concat(e.message))}}_open(e){this.getModal(),this._modal.addEventListener("hidden.bs.modal",this._modalWrapper.remove),this._modal.addEventListener("shown.bs.modal",e),this._modal.addEventListener("hide.bs.modal",()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur()}),this._modalInstance.show()}_create(){this._modalMarkupEl=i.Z.querySelector(document,this._templateSelector),this._createModalWrapper(),this._modalWrapper.innerHTML=this._content,this._modal=this._createModalMar
1kup(),this._modalInstance=new bootstrap.Modal(this._modal,{backdrop:this._useBackdrop}),document.body.insertAdjacentElement("beforeend",this._modalWrapper)}_createModalWrapper(){this._modalWrapper=i.Z.querySelector(document,".".concat(r),!1),this._modalWrapper||(this._modalWrapper=document.createElement("div"),this._modalWrapper.classList.add(r))}_createModalMarkup(){let e=i.Z.querySelector(this._modalWrapper,".modal",!1);if(e)return e;let t=this._modalWrapper.innerHTML;return this._modalWrapper.innerHTML=this._modalMarkupEl.innerHTML,this._setModalContent(t),i.Z.querySelector(this._modalWrapper,".modal")}_setModalTitle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{i.Z.querySelector(this._modalWrapper,this._templateTitleSelector).innerHTML=e}catch(e){}}_setModalContent(e){let t=i.Z.querySelector(this._modalWrapper,this._templateContentSelector);t.innerHTML=e;let o=i.Z.querySelector(t,".".concat(l),!1);if(o){i.Z.querySelector(this._modalWrapper,".".concat(l)).replaceChildren(o);return}try{let e=i.Z.querySelector(t,this._templateTitleSelector);e&&(this._setModalTitle(e.innerHTML),e.parentNode.removeChild(e))}catch(e){}}constructor(e,t=!0,o=".".concat("js-pseudo-modal-template"),n=".".concat("js-pseudo-modal-template-content-element"),i=".".concat("js-pseudo-modal-template-title-element")){this._content=e,this._useBackdrop=t,this._templateSelector=o,this._templateContentSelector=n,this._templateTitleSelector=i}}class d extends window.PluginBaseClass{init(){(this._client=new n.Z(window.accessKey,window.contextToken),this.PluginManager=window.PluginManager,"ajax"===this.options.integrationType)?!1===this.isCookieSet(this.options.currentDomainId,this.options.cookieName)&&this.checkShopSwitchByAjaxRequest():(this.modal=this.el,this.initModal(),!1!==this.options.loadImmediately&&this.openModal())}isCookieSet(e,t){let o=s.getItem(t);return o&&-1!==o.indexOf(e)}checkShopSwitchByAjaxRequest(){this._client.get(this.options.url+"?uri="+encodeURI(this.options.uri)+"&route="+encodeURI(this.options.route)+"&route-params="+encodeURI(this.options.routeParams),this._onAfterGetAjaxResponse.bind(this))}_onAfterGetAjaxResponse(e){let t=this.getValidJson(e);if(!1!==t){!0===t.success&&t.redirectTo?this.setRedirect(t.redirectTo,t.currentUrl,t.countryId):!0===t.success&&this.saveConfiguration();return}this.removeModalLoadedWithoutAjax();let o=new DOMParser().parseFromString(e,"text/html");this.backdropSettings=this.setBackdropSettings(o);let n=new c(e,this.backdropSettings);n.open(()=>{window.PluginManager.initializePlugins().then(()=>{this.modal=i.Z.querySelector(document,"."+this.options.modalClass,!1),this.initModal()})});let s=n.getModal();this.options.modalClass&&s.classList.add(this.options.modalClass),this.modal=s}saveConfiguration(){this.saveConfigurationByAjaxRequest(this.options.reloadPage)}saveConfigurationByAjaxRequest(e){let t={},o=this.getSelectedCountryId();o&&(t.selectedCountryId=o),this._client.post(this.options.saveConfigurationUrl,JSON.stringify(t),t=>{("1"===e||!0===e)&&location.reload()})}getBrowserLanguage(){return navigator.language||navigator.userLanguage}initModal(){this.modal&&(this._collectModalComponents(),this._registerModalEvents(),this.hideModalCloseButton())}_collectModalComponents(){this.modalContentContainer=i.Z.querySelector(this.modal,this.options.modalContentContainerSelector,!1),this.modalButtonClose=i.Z.querySelector(this.modal,this.options.modalCloseButtonSelector,!1),this.modalBackdrop=i.Z.querySelector(document,this.options.backdropSelector,!1),this.modalContentContainer?(this.options.currentDomainUrl=this.modalContentContainer.dataset.currentdomainurl,this.options.modalCloseType=this.modalContentContainer.dataset.currentmodalclosetype,this.options.reloadPage=this.modalContentContainer.dataset.currentmodalreloadpage,this.options.externalDomains=this.collectExternalDomains(this.modalContentContainer.dataset.externaldomains)):(this.options.currentDomainUrl="",this.options.modalCloseType="",this.options.reloadPage="",this.options.externalDomains=""),this.submitButton=i.Z.querySelector(this.modal,this.options.submitButtonSelector,!1),this.countrySelect=i.Z.querySelector(this.modal,this.options.countrySelectSelector,!1),this.languageSelect=i.Z.querySelector(this.modal,this.options.languageSelectSelector,!1),this.countrySelect&&this.languageSelect&&this.onChangeCountrySelect()}_registerModalEvents(){this.submitButton&&this.submitButton.addEventListener("click",this.onSubmitSelection.bind(this)),this.countrySelect&&this.languageSelect&&this.countrySelect.addEventListener("change",this.onChangeCountrySelect.bind(this)),"close_and_switch"===this.options.modalCloseType?(this.modalButtonClose&&this.modalButtonClose.addEventListener("click",this.onSubmitSelection.bind(this)),this.modal&&this.modal.addEventListener("click",this.onClickOutsideModal.bind(this))):"close_and_remember"===this.options.modalCloseType&&(this.modalButtonClose&&this.modalButtonClose.addEventListener("click",this.onStayCurrentDomain.bind(this)),this.modal&&this.modal.addEventListener("click",this.onClickOutsideModal.bind(this)))}hideModalCloseButton(){if("disabled"===this.options.modalCloseType){let e=i.Z.querySelector(this.modal,this.options.modalCloseButtonSelector,!1);e&&e.remove()}}openModal(){void 0!==this.modal&&("disabled"===this.options.modalCloseType?new bootstrap.Modal(this.modal,{backdrop:"static",keyboard:!1}).show():new bootstrap.Modal(this.modal).show(),setTimeout(()=>{let e=i.Z.querySelector(document,".acris-cookie-consent.is--modal",!1);e&&(e.style.display="none")},"500"))}onChangeCountrySelect(){let e=this.getDomainUrlsOfElement(this.countrySelect),t=this.getCountryIsoOfElement(this.countrySelect),o=0,n=!1;for(var i=0;i<this.languageSelect.children.length;i+=1){let s=JSON.parse(this.languageSelect.children[i].dataset.domainurls),a=this.languageSelect.children[i];if(""===this.getMatchOfArrays(e,s)){if(a.disabled=!0,a.style.display="none",a.selected=!1,!0===this.isSafari()){let e=document.createElement("span");e.textContent=a.textContent,e.dataset.value=a.value,e.dataset.domainurls=a.dataset.domainurls,e.dataset.languageiso=a.dataset.languageiso,a.parentNode.replaceChild(e,a)}}else if(o||(o=i),a.disabled=!1,a.style.display="block",!1===n&&(!this.languageSelect.value||a.dataset.languageiso.includes(t))&&(n=!0,a.selected=!0),"SPAN"===a.nodeName){let e=document.createElement("option");e.textContent=a.textContent,e.dataset.value=a.value,e.dataset.domainurls=a.dataset.domainurls,e.dataset.languageiso=a.dataset.languageiso,a.parentNode.replaceChild(e,a)}}this.languageSelect.value||(this.languageSelect.children[o].selected=!0)}onSubmitSelection(){let e=this.getMatchingDomain();if(this.options.currentDomainUrl===e){this.closeModal(),this.saveConfiguration();return}
1this.setRedirect(e,this.options.currentDomainUrl,this.getSelectedCountryId())}onStayCurrentDomain(){this.closeModal(),this.saveConfiguration()}onClickOutsideModal(e){e.target.closest("div.modal-dialog")||("close_and_switch"===this.options.modalCloseType?this.onSubmitSelection():"close_and_remember"===this.options.modalCloseType&&this.onStayCurrentDomain())}getMatchingDomain(){let e=this.getDomainUrlsOfElement(this.countrySelect),t=this.getDomainUrlsOfElement(this.languageSelect);return e&&e.length>0&&t&&t.length>0?this.getMatchOfArrays(e,t):e&&e.length>0?e[0]:t&&t.length>0?t[0]:""}getDomainUrlsOfElement(e){if(e){let t=e.options[e.selectedIndex];if(t)return JSON.parse(t.dataset.domainurls)}return[]}getCountryIsoOfElement(e){if(e){let t=e.options[e.selectedIndex];if(t)return t.dataset.countryiso}return[]}getMatchOfArrays(e,t){for(var o=0;o<e.length;o+=1)for(var n=0;n<t.length;n+=1)if(e[o]===t[n])return e[o];return""}setRedirect(e,t,o){e&&(e!==t?(e=this.addSetCountryId(e,o),window.location.replace(e)):this.saveConfiguration())}addSetCountryId(e,t){return e&&!0!==this.urlInExternalDomains(e)&&(e=e.includes("?")?e+"&"+this.options.switchDoneParamName+"=1":e+"?"+this.options.switchDoneParamName+"=1",t&&(e=e+"&"+this.options.switchCountryIdParamName+"="+t)),e}urlInExternalDomains(e){let t=this.options.externalDomains,o=!1;return t&&t.forEach(function(t){e===t&&(o=!0)}),o}closeModal(){bootstrap.Modal.getInstance(this.modal).hide();let e=i.Z.querySelector(document,".acris-cookie-consent.is--modal",!1);e&&(e.style.display="")}getSelectedCountryId(){if(this.countrySelect&&this.countrySelect.options[this.countrySelect.selectedIndex]&&this.countrySelect.options[this.countrySelect.selectedIndex].dataset.countryid)return this.countrySelect.options[this.countrySelect.selectedIndex].dataset.countryid}getValidJson(e){let t="";try{t=JSON.parse(e)}catch(e){return!1}return t}setBackdropSettings(e){let t=i.Z.querySelector(e,this.options.modalContentContainerSelector,!1);if(!t)return;let o=t.dataset.currentmodalclosetype;return!o||"disabled"!==o||"static"}collectExternalDomains(e){if(e)try{return JSON.parse(e)}catch(e){}return[]}removeModalLoadedWithoutAjax(){let e=i.Z.querySelector(document,"#"+this.options.modalId,!1);e&&e.remove(),window.PluginManager.getPluginInstances("AcrisShopSwitch").forEach(e=>{e.modal=void 0})}isSafari(){let e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")&&!e.includes("android")}}d.options={cookieName:"acris_shop_switch_checked",url:"",modalClass:"acris-shop-switch-modal",modalContentContainerSelector:".acris-shop-switch-modal-content",submitButtonSelector:".acris-shop-switch-submit-btn",countrySelectSelector:".acris-shop-switch-country-select",languageSelectSelector:".acris-shop-switch-language-select",modalCloseButtonSelector:".only-close",directRedirectLinkSelector:".acris-shop-switch-direct-url",backdropSelector:".modal-backdrop",saveConfigurationUrl:"",modalCloseType:"only_close",currentDomainUrl:"",switchCountryIdParamName:"switch-country-id",switchDoneParamName:"switch-done",externalDomains:[],integrationType:"direct",currentDomainId:"",reloadPage:"",routeParams:[],route:"",uri:"",loadImmediately:!0,modalId:"acrisShopSwitchModal"}}}]);

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.