1const installMediaQueryWatcher=(mediaQuery,changedCallback)=>{const mq=window.matchMedia(mediaQuery);mq.addEventListener("change",e=>changedCallback(e.matches)),changedCallback(mq.matches)};window.xViewport={innerWidth:0,innerHeight:0};const viewportObserver=new ResizeObserver(()=>{window.xViewport.innerWidth=window.innerWidth,window.xViewport.innerHeight=window.innerHeight});viewportObserver.observe(document.documentElement);const deferScriptLoad=(name,src,onload,requestVisualChange=!1)=>{window.Eurus.loadedScript.add(name),(events=>{const loadScript=()=>{events.forEach(type=>window.removeEventListener(type,loadScript)),clearTimeout(autoloadScript);const initScript=()=>{const script=document.createElement("script");script.setAttribute("src",src),script.setAttribute("defer",""),script.onload=()=>{document.dispatchEvent(new CustomEvent(name+" loaded")),onload()},document.head.appendChild(script)};requestVisualChange?window.requestIdleCallback?requestIdleCallback(initScript):requestAnimationFrame(initScript):initScript()};let autoloadScript;if(Shopify.designMode)loadScript();else{const wait=window.matchMedia("(min-width: 768px)").matches?1e3:3e3;events.forEach(type=>window.addEventListener(type,loadScript,{once:!0,passive:!0})),autoloadScript=setTimeout(()=>{loadScript()},wait)}})(["mouseover","wheel","scroll","keydown"])},getSectionInnerHTML=(html,selector=".shopify-section")=>new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML,xParseJSON=jsonString=>(jsonString=String.raw`${jsonString}`,jsonString=jsonString.replaceAll("\\","\\\\").replaceAll('\\"','"'),JSON.parse(jsonString));window.addEventListener("pageshow",()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xMiniCart")&&(Alpine.store("xMiniCart").needReload&&Alpine.store("xMiniCart").reLoad(),document.getElementById("main-cart-items")&&Alpine.store("xMiniCart").needReload&&location.reload(),Alpine.store("xMiniCart").needReload=!0)})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xVariantPickerSizeChart",{openSizeChart:!1,sizeChartFocus(){Alpine.store("xFocusElement").trapFocus("VariantPickerSizeChart","CloseVariantPickerSizeChart")},sizeChartRemoveFocus(){const activeElement=document.getElementById("OpenVariantPickerSizeChart");Alpine.store("xFocusElement").removeTrapFocus(activeElement),this.openSizeChart=!1,Alpine.store("xPopup").close()}}),Alpine.store("xHelper",{toUpdate:[],requestControllers:new Map,eventControllers:new Map,fbtProductListDraft:[],cancelRequest(key){const controller=this.requestControllers.get(key);controller&&(controller.abort(),this.requestControllers.delete(key))},cancelEvent(key){const controller=this.eventControllers.get(key);controller&&(controller.abort(),this.eventControllers.delete(key))},formatMoney(amount,formatString){var placeholderRegex=/\{\{\s*(\w+)\s*\}\}/;switch(formatString.match(placeholderRegex)[1]){case"amount":value=this.formatWithDelimiters(amount,2);break;case"amount_no_decimals":value=this.formatWithDelimiters(amount,0);break;case"amount_with_comma_separator":value=this.formatWithDelimiters(amount,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=this.formatWithDelimiters(amount,0,".",",");break}return formatString.replace(placeholderRegex,value)},defaultOption(opt,def){return typeof opt>"u"?def:opt},formatWithDelimiters(number,precision,thousands,decimal){if(precision=this.defaultOption(precision,2),thousands=this.defaultOption(thousands,","),decimal=this.defaultOption(decimal,"."),isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);var parts=number.split("."),dollars=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),cents=parts[1]?decimal+parts[1]:"";return dollars+cents},countdown(configs,callback){let endDate=new Date(configs.end_year,configs.end_month-1,configs.end_day,configs.end_hour,configs.end_minute),reset=configs.reset,duration=configs.duration,endTime=endDate.getTime()+(-1*configs.timezone*60-endDate.getTimezoneOffset())*60*1e3,startTime;if(configs.start_year){let startDate=new Date(configs.start_year,configs.start_month-1,configs.start_day,configs.start_hour,configs.start_minute);startTime=startDate.getTime()+(-1*configs.timezone*60-startDate.getTimezoneOffset())*60*1e3,reset&&(endDate=new Date(startTime+duration),endTime=endDate.getTime())}else reset?(startTime=endTime,endDate=new Date(startTime+duration),endTime=endDate.getTime()):startTime=new Date().getTime();if(new Date().getTime()<startTime){callback(!1,0,0,0,0);return}const startInterval=()=>{let x=setInterval(()=>{let now=new Date().getTime(),distance=0;if(distance=endTime-now,distance<0)if(clearInterval(x),reset){let attempt=0;for(;distance<0&&attempt<100;){if(attempt++,attempt==1){let elapsed=now-startTime,loopOffset=Math.floor(elapsed/duration)-1;startTime=startTime+loopOffset*duration}else startTime=endTime;endDate=new Date(startTime+duration),endTime=endDate.getTime(),distance=endTime-now}if(attempt>=100){callback(!1,0,0,0,0);return}startInterval()}else{callback(!1,0,0,0,0);return}if(distance>0){var days=Math.floor(distance/864e5),hours=Math.floor(distance%(1e3*60*60*24)/(1e3*60*60)),minutes=Math.floor(distance%(1e3*60*60)/(1e3*60)),seconds=Math.floor(distance%(1e3*60)/1e3);minutes=minutes<10?"0"+minutes:""+minutes,seconds=seconds<10?"0"+seconds:""+seconds,callback(!0,seconds,minutes,hours,days)}},1e3)};startInterval()},canShow(configs){let endDate=new Date(configs.end_year,configs.end_month-1,configs.end_day,configs.end_hour,configs.end_minute);const endTime=endDate.getTime()+(-1*configs.timezone*60-endDate.getTimezoneOffset())*60*1e3;let startTime;if(configs.start_year){let startDate=new Date(configs.start_year,configs.start_month-1,configs.start_day,configs.start_hour,configs.start_minute);startTime=startDate.getTime()+(-1*configs.timezone*60-startDate.getTimezoneOffset())*60*1e3}else startTime=new Date().getTime();let now=new Date().getTime();return!(endTime-now<0||startTime>now)},handleTime(configs){let endDate=new Date(configs.end_year,configs.end_month-1,configs.end_day,configs.end_hour,configs.end_minute);const endTime=endDate.getTime()+(-1*configs.timezone*60-endDate.getTimezoneOffset())*60*1e3;let startTime;if(configs.start_year){let startDate=new Date(configs.start_year,configs.start_month-1,configs.start_day,configs.start_hour,configs.start_minute);startTime=startDate.getTime()+(-1*configs.timezone*60-startDate.getTimezoneOffset())*60*1e3}else startTime=new Date().getTime();let now=new Date().getTime(),distance=endTime-now;return{startTime,endTime,now,distance}},centerElement(el){let resizeTimeout,currTranslate=0;const update=()=>{window.requestAnimationFrame(()=>{const rect=el.getBoundingClientRect(),translate=rect.left+Math.abs(currTranslate)-(document.documentElement.clientWidth-rect.width)/2;el.style.transform=`translateX(-${translate}px)`,currTranslate=translate})};window.addEventListener("resize",()=>{clearTimeout(resizeTimeout),resizeTimeout=setTimeout(update,150)}),update()}}
1),Alpine.store("xInit",{runDispatch:!0,init(){const fire=()=>{this.runDispatch&&(this.runDispatch=!1,window.dispatchEvent(new CustomEvent("init-run")))};(window.requestIdleCallback||(cb=>setTimeout(cb,1e3)))(fire,{timeout:1500}),["pointerdown","keydown","scroll","touchstart"].forEach(evt=>{window.addEventListener(evt,fire,{once:!0,passive:!0})})}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.data("xCart",()=>({t:"",loading:!1,customFieldInitOpened:!1,updateItemQty(itemId,line,inventory_policy,track_inventory,maxQty,willRemoveInsurance){let qty=parseInt(document.getElementById(`cart-qty-${itemId}`).value);if(this.validateQty(qty)&&(track_inventory||inventory_policy!=="continue"?this._postUpdateItem(itemId,line,qty,maxQty):this._postUpdateItem(itemId,line,qty,qty)),willRemoveInsurance&&qty<=0){this.clearCart(itemId);return}},minusItemQty(itemId,line,inventory_policy,track_inventory,maxQty,willRemoveInsurance){let qty=parseInt(document.getElementById(`cart-qty-${itemId}`).value);if(this.validateQty(qty)&&(qty>0&&(qty-=1,document.getElementById(`cart-qty-${itemId}`).value=qty),track_inventory||inventory_policy!=="continue"?this._postUpdateItem(itemId,line,qty,maxQty):this._postUpdateItem(itemId,line,qty,qty)),willRemoveInsurance&&qty<=0){this.clearCart(itemId);return}},plusItemQty(itemId,line,inventory_policy,track_inventory,maxQty){let qty=parseInt(document.getElementById(`cart-qty-${itemId}`).value);this.validateQty(qty)&&(qty>=0&&(qty+=1,document.getElementById(`cart-qty-${itemId}`).value=qty),track_inventory||inventory_policy!=="continue"?this._postUpdateItem(itemId,line,qty,maxQty):this._postUpdateItem(itemId,line,qty,qty))},removeItem(itemId,line,isShippingInsurance){this._postUpdateItem(itemId,line,0,0,500,isShippingInsurance)},handleKeydown(evt,el){evt.key==="Enter"&&(evt.preventDefault(),el.blur(),el.focus())},_postUpdateItem(itemId,line,qty,maxQty,wait=500,isShippingInsurance){isShippingInsurance&&(Alpine.store("xPopupInsurance").loading=!0),clearTimeout(this.t);const func=async()=>{this.loading=!0,await Alpine.store("xCartHelper").waitForCartUpdate(),window.updatingCart=!0;let removeEl=document.getElementById(`remove-${itemId}`);removeEl&&(removeEl.style.display="none"),document.getElementById(`loading-${itemId}`)?.classList?.remove("hidden");let updateData={line:`${line}`,quantity:`${qty}`,sections:Alpine.store("xCartHelper").getSectionsToRender().map(s=>s.id),sections_url:window.location.pathname},productIds=[];fetch(`${Shopify.routes.root}cart/change.js`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(updateData)}).then(response=>response.json()).then(parsedState=>{parsedState.status=="422"?(this._addErrorMessage(itemId,parsedState.message),this.updateCart(line,itemId)):(parsedState.items.forEach(item=>{productIds.push(item.product_id)}),this.updateCartUI(parsedState,itemId,line,qty),document.dispatchEvent(new CustomEvent("eurus:cart:items-changed")))}).finally(()=>{window.updatingCart=!1,productIds.forEach(id=>{document.dispatchEvent(new CustomEvent(`eurus:product-card:clear:${id}`))}),isShippingInsurance&&(Alpine.store("xPopupInsurance").loading=!1)})};this.t=setTimeout(()=>{func()},wait)},updateCartUI(parsedState,itemId,line,qty){const items=document.querySelectorAll(".cart-item");if(parsedState.errors){this._addErrorMessage(itemId,parsedState.errors);return}Alpine.store("xCartHelper").reRenderSections(parsedState.sections),Alpine.store("xCartHelper").currentItemCount=parseInt(document.getElementById("cart-icon-bubble").innerHTML);const currentItemCount=Alpine.store("xCartHelper").currentItemCount;Alpine.store("xCartHelper").currentItemCount=parsedState.item_count,currentItemCount!=parsedState.item_count&&document.dispatchEvent(new CustomEvent("eurus:cart:items-changed"));const lineItemError=document.getElementById(`LineItemError-${itemId}`);lineItemError&&lineItemError.classList.add("hidden");const updatedValue=parsedState.items[line-1]?parsedState.items[line-1].quantity:void 0;if(items.length===parsedState.items.length&&updatedValue!==parseInt(qty)){let message="";typeof updatedValue>"u"?message=window.Eurus.cart_error:message=window.Eurus.cart_quantity_error_html.replace("[quantity]",updatedValue),this._addErrorMessage(itemId,message)}let loadingEl=document.getElementById(`loading-${itemId}`),removeEl=document.getElementById(`remove-${itemId}`);removeEl&&(removeEl.style.display="block"),loadingEl&&loadingEl.classList.add("hidden"),this.loading=!1},updateCart(line,itemId){let url="";window.location.pathname!=="/cart"?url=`${window.location.pathname}?section_id=cart-drawer`:url=`${window.location.pathname}`,fetch(url).then(reponse=>reponse.text()).then(response=>{const html=new DOMParser().parseFromString(response,"text/html"),rpCartFooter=html.getElementById("main-cart-footer"),cartFooter=document.getElementById("main-cart-footer");rpCartFooter&&cartFooter&&(cartFooter.innerHTML=rpCartFooter.innerHTML);const rpItemInput=html.querySelector(".cart-item-qty-"+line),itemInput=document.querySelector(".cart-item-qty-"+line);rpItemInput&&itemInput&&(itemInput.value=rpItemInput.value);const rpItemTotal=html.querySelector(".cart-item-price-"+line),itemTotal=document.querySelector(".cart-item-price-"+line);itemTotal&&rpItemTotal&&(itemTotal.innerHTML=rpItemTotal.innerHTML);const rpPriceTotal=html.querySelector(".cart-drawer-price-total"),priceTotal=document.querySelector(".cart-drawer-price-total");rpPriceTotal&&priceTotal&&(priceTotal.innerHTML=rpPriceTotal.innerHTML);const rpCartIcon=html.getElementById("cart-icon-bubble"),cartIcon=document.getElementById("cart-icon-bubble");cartIcon&&rpCartIcon&&(cartIcon.innerHTML=rpCartIcon.innerHTML)}).finally(()=>{let loadingEl=document.getElementById(`loading-${itemId}`);loadingEl&&loadingEl.classList.add("hidden"),this.loading=!1})},clearCart(itemId){let removeEl=document.getElementById(`remove-${itemId}`);removeEl&&(removeEl.style.display="none"),document.getElementById(`loading-${itemId}`)?.classList?.remove("hidden"),fetch(window.Shopify.routes.root+"cart/clear.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sections:Alpine.store("xCartHelper").getSectionsToRender().map(section=>section.id)})}).then(response=>response.json()).then(response=>{requestAnimationFrame(()=>{setTimeout(()=>{Alpine.store("xCartHelper").reRenderSections(response.sections),Alpine.store("xCartHelper").currentItemCount=parseInt(document.getElementById("cart-icon-bubble").innerHTML),document.dispatchEvent(new CustomEvent("eurus:cart:items-changed"))},0)})}).catch(error=>{console.error("Error:",error)}).finally(()=>{document.cookie="eurus_insurance=; path=/"})},async addShippingInsurance(productId){Alpine.store("xPopupInsurance").loading=!0,Alpine.store("xPopupInsurance").openInsuranceNoti=!1;let item=[{id:productId,quantity:1}];await Alpine.store("xCartHelper").waitForCartUpdate(),window.updatingCart=!0,fetch(window.Shopify.routes.root+"cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:item,sections:Alpine.store("xCartHelper").getSectionsToRender().map(section=>section.id)})}).then(response=>response.json()).then(response=>{Alpine.store("xCartHelper").reRenderSections(response.sections),Alpine.store("xCartHelper").currentItemCount=parseInt(document.getElementById("cart-icon-bubble").innerHTML)}).catch(error=>{console.error("Error:",error)}).finally(()=>{window.updatingCart=!1,document.cookie=`eurus_insurance=${productId}; path=/`,Alpine.store("xPopupInsurance").loading=!1,Alpine.store("xPopupInsurance").openInsuranceNotification()})},updateEstimateShippingAll(el){const cartItems=el.getElementsByClassName("cart-item");
1Array.from(cartItems).forEach((item,index)=>{window.requestAnimationFrame(()=>{item.dispatchEvent(new CustomEvent(`eurus:cart-item:updateEstimateShipping:${index+1}`))})})},waitForEstimateUpdate(){return new Promise(resolve=>{function check(){window.updatingEstimate?requestAnimationFrame(check):resolve()}check()})},async updateEstimateShipping(el,line,qty,itemId,cutOffHour,cutOffMinute,hour,minutes,calculationType,daysText,dayText,hrText,minText,excludeDay,holidayList,currentLanguage,shippingInsuranceId,cartSize){el.addEventListener(`eurus:cart-item:updateEstimateShipping:${line}`,async()=>{if(shippingInsuranceId===itemId||window.location.search.includes("share_cart:true")&&!Alpine.store("xCartShare").shared)return;const key=el.getAttribute("x-data-update-estimate-key");let estimateProperty=el.getAttribute("x-data-update-estimate-property"),properties=JSON.parse(el.getAttribute("x-data-properties"));estimateProperty!==""&&estimateProperty.includes("time_to_cut_off")&&(Alpine.store("xEstimateDelivery").noti==""&&Alpine.store("xEstimateDelivery").countdownCutOffTime(cutOffHour,cutOffMinute,hour,minutes,calculationType,daysText,dayText,hrText,minText,excludeDay,holidayList,currentLanguage),estimateProperty=estimateProperty.replace("time_to_cut_off",Alpine.store("xEstimateDelivery").noti),properties[key]=estimateProperty,await this.waitForEstimateUpdate(),window.updatingEstimate=!0,await fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({line,quantity:qty,properties})}).finally(()=>{window.updatingEstimate=!1}))})},async updateDate(date){await Alpine.store("xCartHelper").waitForCartUpdate();var formData={attributes:{"datetime-updated":`${date}`}};fetch(Shopify.routes.root+"cart/update",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(formData)})},_addErrorMessage(itemId,message){const lineItemError=document.getElementById(`LineItemError-${itemId}`);lineItemError&&(lineItemError.classList.remove("hidden"),lineItemError.getElementsByClassName("cart-item__error-text")[0].innerHTML=message)},validateQty:function(number){return!(parseFloat(number)!=parseInt(number)&&isNaN(number))}})),Alpine.store("xCartHelper",{currentItemCount:0,validated:!0,openField:"",openDeliveryDateField:"",openDiscountField:"",updateCart:async function(data,needValidate=!1){await Alpine.store("xCartHelper").waitForCartUpdate();const formData=JSON.stringify(data);fetch(Shopify.routes.root+"cart/update",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:formData}).then(response=>(needValidate&&this.validateCart(),response.json())).then(response=>{document.dispatchEvent(new CustomEvent("eurus:cart-drawer:order-note:update",{detail:{message:response.note}}))})},cartValidationRequest(){this.validateCart(),Alpine.store("xMiniCart").openCart()},validateCart:function(isCheckOut=!1){this.validated=!0,document.dispatchEvent(new CustomEvent("eurus:cart:validate",{detail:{isCheckOut}}))},goToCheckout(e){if(this.validateCart(!0),this.validated){let formData={attributes:{"collection-pagination":null,"blog-pagination":null,choose_option_id:null,"datetime-updated":null}};fetch(Shopify.routes.root+"cart/update",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(formData)})}else e.preventDefault()},waitForCartUpdate(){return new Promise(resolve=>{function check(){!window.updatingCart&&!window.updatingEstimate?resolve():requestAnimationFrame(check)}check()})},getSectionsToRender(){const cartItemEl=document.getElementById("main-cart-items");if(cartItemEl){const templateId=cartItemEl.closest(".shopify-section").id.replace("cart-items","").replace("shopify-section-","");return[{id:templateId+"cart-items",selector:"#main-cart-items"},{id:templateId+"cart-footer",selector:"#main-cart-footer"},{id:templateId+"cart-upsell",selector:"#main-cart-upsell"},{id:"cart-icon-bubble",selector:"#cart-icon-bubble"},{id:"mobile-cart-icon-bubble",selector:"#mobile-cart-icon-bubble"}
1,{id:"cart-icon-bubble-mobile-dock",selector:"#cart-icon-bubble-mobile-dock"}]}return[{id:"cart-icon-bubble",selector:"#cart-icon-bubble"},{id:"mobile-cart-icon-bubble",selector:"#mobile-cart-icon-bubble"},{id:"cart-icon-bubble-mobile-dock",selector:"#cart-icon-bubble-mobile-dock"},{id:"cart-drawer",selector:"#CartDrawer"}]},async reRenderSections(sections){let resSection=sections;const sectionsToRender=this.getSectionsToRender();if(!resSection){const sectionsToRenderIds=sectionsToRender.map(s=>s.id);if(sectionsToRender.length>4){const results=await Promise.all(sectionsToRenderIds.map(id=>fetch(`${window.location.pathname}?sections=${id}`).then(res=>res.json())));resSection=Object.assign({},...results)}else resSection=await(await fetch(`${window.location.pathname}?sections=${sectionsToRender}`)).json()}this.getSectionsToRender().forEach((section=>{section.selector.split(",").forEach(selector=>{const sectionElement=document.querySelector(selector);sectionElement&&resSection[section.id]&&(sectionElement.innerHTML=getSectionInnerHTML(resSection[section.id],selector))})}))}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.data("xModalSearch",(type,desktopMaximunResults,mobileMaximunResults,productTypeSelected)=>({open_search:"",t:"",result:"",query:"",cachedResults:[],openResults:!1,productTypeSelected,showSuggest:!1,loading:!1,open(refName){this.$refs[refName]?.classList.remove("popup-hidden");const input_search=document.getElementById("search-in-modal");input_search&&setTimeout(()=>{input_search.focus()},100)},close(refName){this.$refs[refName]?.classList.add("popup-hidden")},keyUp(){return this.query=this.$el.value,()=>{clearTimeout(this.t),this.t=setTimeout(()=>{this.query!=""?(this.showSuggest=!1,this.getSearchResult(this.query)):(this.showSuggest=!0,this.result="")},300)}},getSearchResult(query){this.openResults=!0;const limit=window.xViewport.innerWidth>767?desktopMaximunResults:mobileMaximunResults;let q=this.productTypeSelected!=productTypeSelected?`${this.productTypeSelected} AND ${query}`:query;const queryKey=q.replace(" ","-").toLowerCase()+"_"+limit;if(this.cachedResults[queryKey]){this.result=this.cachedResults[queryKey];return}this.loading=!0,fetch(`${Shopify.routes.root}search/suggest?q=${encodeURIComponent(q)}&${encodeURIComponent("resources[type]")}=${encodeURIComponent(type)}&${encodeURIComponent("resources[options][fields]")}=${encodeURIComponent("author,body,product_type,tag,title,variants.barcode,variants.sku,variants.title,vendor")}&${encodeURIComponent("resources[limit]")}=${encodeURIComponent(limit)}§ion_id=predictive-search`).then(response=>response.text()).then(response=>{const text=new DOMParser().parseFromString(response,"text/html");this.result=text.getElementById("shopify-section-predictive-search").innerHTML,this.cachedResults[queryKey]=this.result}).catch(error=>{throw error}),this.loading=!1},setProductType(value2,input){this.productTypeSelected=value2,document.getElementById(input).value=value2,this.query!=""&&this.getSearchResult(this.query)},focusForm(){this.$el.value!=""?this.showSuggest=!1:this.showSuggest=!0}}))})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xMobileNav",{show:!1,loading:!1,currentMenuLinks:[],open(){this.show=!0,Alpine.store("xPopup").open=!0},close(){this.show=!1,Alpine.store("xPopup").close()},setActiveLink(linkId){this.currentMenuLinks.push(linkId)},removeActiveLink(linkId){const index=this.currentMenuLinks.indexOf(linkId);index!==-1&&this.currentMenuLinks.splice(index,1)},resetMenu(){this.currentMenuLinks=[]},scrollTop(el=null){document.getElementById("menu-navigation").scrollTop=0,el&&(el.closest(".scrollbar-body").scrollTop=0)}}),Alpine.store("xPopup",{open:!1,widthScrollBar:0,setWidthScrollbar(){window.requestAnimationFrame(()=>{const root=document.documentElement,clientWidth=root.clientWidth,width=Math.abs(window.xViewport.innerWidth-clientWidth);window.requestAnimationFrame(()=>{this.widthScrollBar=Math.max(this.widthScrollBar,width),root.style.setProperty("--width-scrollbar",this.widthScrollBar+"px")})})},close(){document.dispatchEvent(new CustomEvent("eurus:popup:close")),setTimeout(()=>{this.open=!1},500)}}),Alpine.store("xShowCookieBanner",{show:!1}),Alpine.store("xMiniCart",{open:!1,type:"",loading:!1,needReload:!1,reLoad(){this.loading=!0;const sections=Alpine.store("xCartHelper").getSectionsToRender().map(s=>s.id).join(",");fetch(`${window.location.pathname}?sections=${sections}`).then(response=>response.json()).then(response=>{requestAnimationFrame(()=>{setTimeout(()=>
1{Alpine.store("xCartHelper").getSectionsToRender().forEach((section=>{section.selector.split(",").forEach(selector=>{const sectionElement=document.querySelector(selector);sectionElement&&response[section.id]&&(sectionElement.innerHTML=getSectionInnerHTML(response[section.id],selector))})})),this.loading=!1},0)})})},openCart(){window.location.pathname!="/cart"&&(requestAnimationFrame(()=>{Alpine.store("xQuickView")&&Alpine.store("xQuickView").show&&(Alpine.store("xQuickView").show=!1)}),requestAnimationFrame(()=>{document.getElementById("x-header-container").classList.remove("on-scroll-up-animation"),(window.xViewport.innerWidth<768||this.type=="drawer")&&setTimeout(()=>{Alpine.store("xPopup").open=!0},50),requestAnimationFrame(()=>{document.getElementById("x-header-container").classList.remove("header-up"),this.open=!0,document.querySelector(".section-announcement")&&(document.querySelector(".section-announcement").style.zIndex=49)}),Alpine.store("xHeaderMenu").stickyType=="on-scroll-up"&&setTimeout(()=>{requestAnimationFrame(()=>{document.getElementById("x-header-container").classList.add("on-scroll-up-animation")})},200)}))},hideCart(){requestAnimationFrame(()=>{this.open=!1,Alpine.store("xPopup").close(),document.querySelector(".section-announcement")&&setTimeout(()=>{document.querySelector(".section-announcement").style.zIndex=60},500)})}}),Alpine.store("xModal",{activeElement:"",focused:!1,setActiveElement(element){this.activeElement=element},focus(container,elementFocus){this.focused=!0,window.requestAnimationFrame(()=>{Alpine.store("xFocusElement").trapFocus(container,elementFocus)})},removeFocus(){this.focused=!1;const openedBy=document.getElementById(this.activeElement);Alpine.store("xFocusElement").removeTrapFocus(openedBy)}}),Alpine.store("xFocusElement",{focusableElements:['button, [href], input, select, textarea, [tabindex]:not([tabindex^="-"])'],listeners:{},windowWidth:window.xViewport.innerWidth,trapFocus(container,elementFocus){if(this.windowWidth<1025)return;let c=document.getElementById(container),e=document.getElementById(elementFocus);this.listeners=this.listeners||{};const elements=Array.from(c.querySelectorAll(this.focusableElements));var first=elements[0],last=elements[elements.length-1];this.removeTrapFocus(),this.listeners.focusin=event=>{event.target!==c&&event.target!==last&&event.target!==first||document.addEventListener("keydown",this.listeners.keydown)},this.listeners.focusout=()=>{document.removeEventListener("keydown",this.listeners.keydown)},this.listeners.keydown=e2=>{e2.code.toUpperCase()==="TAB"&&(e2.target===last&&!e2.shiftKey&&(e2.preventDefault(),first.focus()),(e2.target===first||e2.target==c)&&e2.shiftKey&&(e2.preventDefault(),last.focus()))},document.addEventListener("focusout",this.listeners.focusout),document.addEventListener("focusin",this.listeners.focusin),window.requestAnimationFrame(()=>{e.focus()})},removeTrapFocus(elementToFocus=null){window.xViewport.innerWidth<1025||(document.removeEventListener("focusin",()=>{document.addEventListener("keydown",this.listeners.focusin)}),document.removeEventListener("focusout",()=>{document.removeEventListener("keydown",this.listeners.focusout)}),document.removeEventListener("keydown",this.listeners.keydown),elementToFocus&&elementToFocus.focus())}}),Alpine.store("xEstimateDelivery",{day:0,hour:0,minute:0,noti:"",countdownCutOffTime(cutOffHour,cutOffMinute,hrsText,minsText,calculationType,daysText,dayText,hrText,minText,excludeDay,holidayList,currentLanguage){if(this.noti!="")return;const holidayArray=holidayList?holidayList.split(",").map(holiday=>{const parts=holiday.trim().split(" "),day=parts.pop().padStart(2,"0");return`${parts.join(" ")} ${day}`}):[],now=new Date,currentHour=now.getHours(),currentMinute=now.getMinutes(),current=new Date(now.getFullYear(),now.getMonth(),now.getDate(),currentHour,currentMinute),cutOff=new Date(now.getFullYear(),now.getMonth(),now.getDate(),cutOffHour,cutOffMinute);if(current>=cutOff&&cutOff.setDate(cutOff.getDate()+1),calculationType=="working"){let isInvalid=!0;for(;isInvalid;){if(isInvalid=!1,excludeDay==="saturday_sunday"&&(cutOff.getDay()===6||cutOff.getDay()===0)){cutOff.getDay()===6?cutOff.setDate(cutOff.getDate()+2):cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(excludeDay==="saturday"&&cutOff.getDay()===6){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(excludeDay==="sunday"&&cutOff.getDay()===0){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(holidayArray.length>0){const dayOfMonth=cutOff.getDate(),dateString=`${new Intl.DateTimeFormat(currentLanguage,{month:"long"}).format(cutOff)} ${dayOfMonth<10?`0${dayOfMonth}`:dayOfMonth}`;if(holidayArray.includes(dateString)){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}}}}const diffMs=cutOff-current;return this.day=Math.floor(diffMs/1e3/60/60/24),this.hour=Math.floor(diffMs/1e3/60/60%24),this.minute=Math.floor(diffMs/1e3/60%60),this.noti=this.day>0?this.day+" "+(this.day>1?daysText:dayText)+" ":"",this.noti+=this.hour>0?this.hour+" "+(this.hour>1?hrsText:hrText)+" "+this.minute+" "+(this.minute>1?minsText:minText):this.minute+" "+(this.minute>1?minsText:minText),this.noti},calculateCutOffTime(el,cutOffHour,cutOffMinute,hrsText,minsText,calculationType,daysText,dayText,hrText,minText,excludeDay,holidayList,currentLanguage){const holidayArray=holidayList?holidayList.split(",").map(holiday=>{const parts=holiday.trim().split(" "),day2=parts.pop().padStart(2,"0");return`${parts.join(" ")} ${day2}`}):[],now=new Date,currentHour=now.getHours(),currentMinute=now.getMinutes(),current=ne
1w Date(now.getFullYear(),now.getMonth(),now.getDate(),currentHour,currentMinute),cutOff=new Date(now.getFullYear(),now.getMonth(),now.getDate(),cutOffHour,cutOffMinute);if(current>=cutOff&&cutOff.setDate(cutOff.getDate()+1),calculationType=="working"){let isInvalid=!0;for(;isInvalid;){if(isInvalid=!1,excludeDay==="saturday_sunday"&&(cutOff.getDay()===6||cutOff.getDay()===0)){cutOff.getDay()===6?cutOff.setDate(cutOff.getDate()+2):cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(excludeDay==="saturday"&&cutOff.getDay()===6){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(excludeDay==="sunday"&&cutOff.getDay()===0){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}if(holidayArray.length>0){const dayOfMonth=cutOff.getDate(),dateString=`${new Intl.DateTimeFormat(currentLanguage,{month:"long"}).format(cutOff)} ${dayOfMonth<10?`0${dayOfMonth}`:dayOfMonth}`;if(holidayArray.includes(dateString)){cutOff.setDate(cutOff.getDate()+1),isInvalid=!0;continue}}}}const diffMs=cutOff-current,day=Math.floor(diffMs/1e3/60/60/24),hour=Math.floor(diffMs/1e3/60/60%24),minute=Math.floor(diffMs/1e3/60%60);let noti=day>0?day+" "+(day>1?daysText:dayText)+" ":"";noti+=hour>0?hour+" "+(hour>1?hrsText:hrText)+" "+minute+" "+(minute>1?minsText:minText):minute+" "+(minute>1?minsText:minText),this.noti=noti,el.value=el.value.replace("time_to_cut_off",noti)}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xCartAnalytics",{viewCart(){fetch("/cart.js").then(response=>response.text()).then(cart=>{cart=JSON.parse(cart),cart.items.length>0&&Shopify.analytics.publish("view_cart",{cart})})}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xCustomerEvent",{fire(eventName,el,data){if(Shopify.designMode)return;const formatedData=data||xParseJSON(el.getAttribute("x-customer-event-data"));Shopify.analytics.publish(eventName,formatedData)}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xSplide",{load(el,configs){const initSlider=()=>{const id=el.getAttribute("id");configs.classes!=null&&(configs.classes.arrow||(configs.classes.arrow="arrow w-8 h-8 pt-2 pb-2 pl-2 pr-2 absolute z-10 top-1/2 -translate-y-1/2 hidden md:flex items-center justify-center"),configs.classes.next||(configs.classes.next="right-0"),configs.classes.prev||(configs.classes.prev="-rotate-180"));let splide=new Splide("#"+id,configs);if(configs.thumbs){let thumbsRoot=document.getElementById(configs.thumbs),thumbs=thumbsRoot.getElementsByClassName("x-thumbnail"),current,_this=this;for(let i=0;i<thumbs.length;i++)thumbs[i]==current?configs.enableThumbnailOverlay?(thumbs[i].classList.remove("opacity-30"),thumbs[i].classList.add("quickview-border")):thumbs[i].classList.add("border"):configs.enableThumbnailOverlay?(thumbs[i].classList.add("opacity-30"),thumbs[i].classList.remove("quickview-border")):thumbs[i].classList.remove("border"),thumbs[i].addEventListener("click",function(){_this.moveThumbnail(i,thumbs[i],thumbsRoot,configs.thumbs_direction,configs.direction),splide.go(i)});splide.on("refresh",function(){for(let i=0;i<thumbs.length;i++)thumbs[i].removeEventListener("click",function(){_this.moveThumbnail(i,thumbs[i],thumbsRoot2,configs.thumbs_direction,configs.direction),splide.go(i)});let thumbsRoot2=document.getElementById(configs.thumbs),thumbsNew=thumbsRoot2.getElementsByClassName("x-thumbnail");for(let i=0;i<thumbsNew.length;i++)i==0?configs.enableThumbnailOverlay?(thumbsNew[i].classList.remove("opacity-30"),thumbsNew[i].classList.add("quickview-border")):thumbsNew[i].classList.add("border"):configs.enableThumbnailOverlay?(thumbsNew[i].classList.add("opacity-30"),thumbsNew[i].classList.remove("quickview-border")):thumbsNew[i].classList.remove("border"),thumbsNew[i].addEventListener("click",function(){_this.moveThumbnail(i,thumbsNew[i],thumbsRoot2,configs.thumbs_direction,configs.direction),splide.go(i)})}),splide.on("mounted move",function(){let thumbnail=thumbs[splide.index];thumbnail&&(current&&(configs.enableThumbnailOverlay?(current.classList.add("opacity-30"),current.classList.remove("quickview-border")):current.classList.remove("border")),configs.enableThumbnailOverlay?(thumbnail.classList.remove("opacity-30"),thumbnail.classList.add("quickview-border")):thumbn
1ail.classList.add("border"),current=thumbnail,_this.moveThumbnail(splide.index,thumbnail,thumbsRoot,configs.thumbs_direction,configs.direction))})}if(configs.hotspot){let hotspots=document.getElementById(configs.hotspot).getElementsByClassName("x-hotspot"),current;if(configs.disableHoverOnTouch&&("ontouchstart"in window||window.DocumentTouch&&window.document instanceof DocumentTouch||window.navigator.maxTouchPoints||window.navigator.msMaxTouchPoints))for(let i=0;i<hotspots.length;i++)hotspots[i].addEventListener("click",function(){splide.go(i)});else for(let i=0;i<hotspots.length;i++)hotspots[i].addEventListener("mouseover",function(){splide.go(i)}),hotspots[i].addEventListener("focus",function(){splide.go(i)});splide.on("mounted move",function(){let hotspot=hotspots[splide.index];hotspot&&(current&¤t.classList.remove("active-hotspot"),hotspot.classList.add("active-hotspot"),current=hotspot)})}if(configs.cardHover){let cardImage=document.getElementById(configs.cardHover);window.xViewport.innerWidth>1024&&(cardImage.addEventListener("mousemove",function(e){let left=e.offsetX,width=cardImage.getBoundingClientRect().width,spacing=left/width,index=Math.floor(spacing*configs.maxSlide);splide.go(index)}),cardImage.addEventListener("mouseleave",function(e){splide.go(0)}))}if(configs.progressBar){var bar=splide.root.querySelector(".splide-progress-bar");splide.on("mounted move",function(){var end=configs.progressBar;configs.progressBarHeader&&(end=splide.Components.Slides.getLength());var rate=100*(splide.index/end);if(bar){var widthBar=window.getComputedStyle(bar).getPropertyValue("width").replace("px",""),widthProgressBar=window.getComputedStyle(bar.closest(".splide-progress")).getPropertyValue("width").replace("px",""),percentBar=100*(Number(widthBar)/Number(widthProgressBar)),rateBar=rate+percentBar,maxRate=100-percentBar;rateBar>100&&(rate=maxRate),document.querySelector("body").classList.contains("rtl")?bar.style.marginRight=rate+"%":bar.style.marginLeft=rate+"%"}});var progressBar=splide.root.querySelector(".splide-progress");progressBar?.addEventListener("click",function(e){var rect=progressBar.getBoundingClientRect(),clickX=e.clientX-rect.left,percent=clickX/rect.width,totalPages=Math.ceil(splide.length/splide.options.perPage),page=Math.floor(percent*totalPages);page>=totalPages&&(page=totalPages-1);var index=page*splide.options.perPage;splide.go(index)})}if(el.classList.contains("card-product-img")&&splide.on("resized",function(){var height=splide.root.querySelector(".splide__track").offsetHeight;splide.Components.Slides.get().forEach(item=>{item.slide.style.height=height+"px"})}),configs.events&&configs.events.forEach(e=>{splide.on(e.event,e.callback)}),el.splide=splide,splide.mount(),configs.videoProduct){const move=splide.Components.Move;move.translate(move.toPosition(0))}if(configs.playOnHover){const breakPoint=window.matchMedia("(min-width: 1024px)");breakPoint.addEventListener("change",()=>{breakPoint.matches&&splide.Components.Autoplay.pause()})}configs.playOnHover&&window.innerWidth>1024&&(splide.Components.Autoplay.pause(),el.onmouseover=function(){splide.Components.Autoplay.play()},el.onmouseout=function(){splide.Components.Autoplay.pause()})};window.Splide?initSlider():window.addEventListener("load",initSlider,{once:!0})},togglePlayPause(el){if(!el||!el.splide||!el.splide.Components.Autoplay)return;const splide=el.splide,autoplay=splide.Components.Autoplay;autoplay.isPaused()?autoplay.play():(splide.go(0),autoplay.pause())},moveThumbnail(index,thumbnail,thumbsRoot,direction){if(thumbnail)if(direction=="vertical"){const thumbnailHeight=thumbnail.offsetHeight,rootHeight=thumbsRoot.offsetHeight;setTimeout(()=>{window.requestAnimationFrame(()=>{thumbsRoot.scrollTop=(index+1)*thumbnailHeight-rootHeight*.5+thumbnailHeight*.5+index*6})},50)}else thumbsRoot.scrollLeft=(index-2)*thumbnail.offsetWidth},jumpToLast(el){const splide=el.splide,index=splide.Components.Controller.getEnd()+2;splide.go(index)}})})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.data("xParallax",()=>({debounce(func,wait){var timeout;return function(){var context=this,args=arguments,later=function(){timeout=null,func.apply(context,args)};clearTimeout(timeout),timeout=setTimeout(later,wait)}},load(disable){if(!disable&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window){let handleIntersect2=function(entries){entries.forEac
1h(function(entry){entry.isIntersecting?(el=entry.target,window.addEventListener("scroll",parallax,{passive:!0,capture:!1})):window.removeEventListener("scroll",parallax,{passive:!0,capture:!1})})};var handleIntersect=handleIntersect2;const observerOptions={root:null,rootMargin:"0px 0px",threshold:0};var observer=new IntersectionObserver(handleIntersect2,observerOptions),el;observer.observe(this.$el);var parallax=this.debounce(function(){var rect=el.getBoundingClientRect(),speed=window.xViewport.innerHeight/el.parentElement.offsetHeight*20,shiftDistance=(rect.top-window.xViewport.innerHeight)/speed,maxShiftDistance=el.parentElement.offsetHeight/11;(shiftDistance<-maxShiftDistance||shiftDistance>maxShiftDistance)&&(shiftDistance=-maxShiftDistance),requestAnimationFrame(()=>{el.style.transform="translate3d(0, "+shiftDistance+"px, 0)"})},10)}}}))})}),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xDOM",{rePainting:null})})}); 2//# sourceMappingURL=/cdn/shop/t/33/assets/theme.js.map?v=1702753306403503671785346107
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.