1(()=>{"use strict";const t=(e,...o)=>o.length>=e.length?e(...o):t.bind(void 0,e,...o),e=t((t,e)=>Array.isArray(e)?e.map(t):t(e)),o=(t((t,e)=>Array.isArray(e)?e.filter(t):t(e)?e:void 0),(t,...e)=>t.bind(void 0,...e)),n=(...t)=>function(e){return t.reduce((t,e)=>e.apply(this,[t]),e)},s=t((t,e)=>e[t]),i=(t((t,e)=>e<t),t((t,e,o)=>(o[t]=e,o)),(t,e,o)=>t(o)?i(t,e,e(o)):o),r=(t((t,e)=>e/t),t((t,e)=>e*t),t((t,e)=>-1!==t.indexOf(e)),t((t,e)=>t<0?e[e.length+t]:e[t]));n((r(1),r(-1)),t((t,e)=>e+t)(1)),t((t,o)=>e(e=>(e.classList.add(t),e),o)),t((t,o)=>e(e=>t.appendChild(e),o)),t((t,e,o)=>(o.style[t]=e,o))("display","none"),t((t,e)=>getComputedStyle(e)[t]),s("clientHeight"),t((t,e)=>e.classList.contains(t));const l=(t,e)=>e.getAttribute(t),a=(t(l),t((t,e,o)=>(o.setAttribute(t,e),o))),c=(t((t,e)=>{e.removeAttribute(t)}),t((t,e)=>l("data-"+t,e))),h=(t((t,e,o)=>a("data-"+t,e,o)),(t,e,o,n)=>(n.addEventListener(t,e,o),n)),d=(t,e,o,n)=>(n.removeEventListener(t,e,o),n),u=(t,e)=>{const o=["matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector"];for(const n of o)if("function"==typeof e[n])return e[n](t);return!1},p=t((t,n,s)=>e(o(h,t,n,{}),s)),y=(t((t,n,s)=>e(o(d,t,n,{}),s)),t((t,n,s)=>e(o(h,t,n,{passive:!0}),s)),t((t,n,s)=>e(o(h,t,n,!0),s)),t((t,e)=>i(e=>e&&!u(t,e)&&e.parentNode,t=>t.parentNode===document?null:t.parentNode,e.parentNode)),(t,e,o,n)=>h(t,t=>{const s=i(t=>t&&t!==document&&!u(o,t)&&t.parentNode,t=>t.parentNode,t.target);s!==document&&u(o,s)&&e.apply(n,[t])},{},n)),w=(t((t,n,s,i)=>e(o(y,t,n,s),i)),t((t,o)=>e(e=>(e.classList.remove(t),e),o)),t((t,o)=>e(e=>(e.classList.toggle(t),e),o)),(t,e=document)=>e.querySelector(t)),m=(n(s("children"),t=>Array.prototype.slice.call(t)),s("parentNode"),s("offsetTop"),s("value"),"undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iPad|iPhone|iPod/.test(window.navigator.platform)||"MacIntel"===navigator.platform&&navigator),".js-select-country"),S="storeSwitcherCookie";class g extends HTMLElement{constructor(){super(),this.modal=this.querySelector("modal-dialog"),this.selectCountryEl=w(m,this),this.descriptionRegionEl=w(".js-description-region span",this),this.buttonSwitcherEL=w(".js-button-switcher",this),this.buttonSecondaryEl=w(".js-button-secondary",this),this.delayTime=1e3*c("delay",this),this.apiKey=c("key",this),this.allOptionsCountry=Array.from(this.selectCountryEl.options).map(t=>t.value),this.fetchDataCountry().then(t=>{t&&(this.innerContent(t),this.showButtonGoTo(),this.showButtonSecondary(),this.showModalCountry(),this.selectCountryEl&&p("change",()=>{this.showButtonGoTo(),this.showButtonSecondary()},this.selectCountryEl))})}showModalCountry(){var t;!this.modal||null!==(t=Shopify)&&void 0!==t&&t.designMode||"true"===c("other-store",this.selectCountryEl.options[this.selectCountryEl.selectedIndex])||this.openModal()}openModal(){(t=>{const e=document.cookie.match(new RegExp(t+"=([^;]+)"));return e?e[1]:null})(S)||setTimeout(()=>{var t;null===(t=this.modal)||void 0===t||t.show(),(t=>{let e="";{const t=new Date;t.setTime(t.getTime()+864e5),e="; expires="+t.toUTCString()}document.cookie=t+"=1"+e+"; path=/"})(S)},this.delayTime)}async fetchDataCountry(){try{const t=await fetch("/browsing_context_suggestions.json");return await t.json()}catch(t){console.error("Error fetching data:",t)}}showButtonGoTo(){this.buttonSwitcherEL&&(this.buttonSwitcherEL.innerHTML=`\n <a\n href="${c("region-url",this.selectCountryEl.options[this.selectCountryEl.selectedIndex])}"\n class="button-primary w-full uppercase"\n >\n ${"true"===c("other-store",this.selectCountryEl.options[this.selectCountryEl.selectedIndex])?`${window.storeSwitcherState.continueShopping}`:`${window.storeSwitcherState.goTo} ${this.selectCountryEl.options[this.selectCountryEl.selectedIndex].value}`}\n </a>\n `)}showButtonSecondary(){if(this.buttonSecondaryEl){const t="true"===c("other-store",this.selectCountryEl.options[this.selectCountryEl.selectedIndex]);this.buttonSecondaryEl.innerHTML=`\n <span\n class="link mt-5 text-primary no-underline block w-fit mx-auto text-sm normal-case"\n href="${t?`${window.storeSwitcherState.seeOptionLink||"#"}`:"#"}"\n >\n ${t?`${window.storeSwitcherState.seeOptionText}`:`${window.storeSwitcherState.stayOnShop} ${Shopify.cdnHost.replace("/cdn","")}`}\n </span>\n `,this.buttonSecondaryEl.addEventListener("click",()=>{this.buttonSecondaryEl.closest("modal-dialog").hide()})}}innerContent(t){var e;const o=(null===(e=t.detected_values)||void 0===e?void 0:e.country)||{};this.descriptionRegionEl&&(this.descriptionRegionEl.innerHTML=o.name),this.allOptionsCountry.length>0&&(this.selectCountryEl.value=this.allOptionsCountry.find(t=>t===o.handle)||"")}}customElements.get("store-switcher")||customElements.define("store-switcher",g)})(); 2//# sourceMappingURL=section-store-switcher.js.map
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.