"use-strict";let subscribers={};Shopify.bind=function(fn,scope){return function(){return fn.apply(scope,arguments)}},Shopify.setSelectorByValue=function(selector,value){for(var i=0,count=selector.options.length;i0&&Shopify.setSelectorByValue(this.provinceEl,value)},countryHandler:function(e){var opt=this.countryEl.options[this.countryEl.selectedIndex],raw=opt.getAttribute("data-provinces"),provinces=JSON.parse(raw);if(this.clearOptions(this.provinceEl),provinces&&provinces.length==0)this.provinceContainer.style.display="none";else{for(var i=0;i"u"?def:opt}function formatWithDelimiters(number,precision,thousands,decimal){if(precision=defaultOption(precision,2),thousands=defaultOption(thousands,","),decimal=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),cents2=parts[1]?decimal+parts[1]:"";return dollars+cents2}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break}return formatString.replace(placeholderRegex,value)};var getScrollBarWidth=function(){return{init:function(){var scrollDiv=document.createElement("div");scrollDiv.style.width="100px",scrollDiv.style.height="100px",scrollDiv.style.overflow="scroll",scrollDiv.style.position="absolute",scrollDiv.style.top="-9999px",document.body.appendChild(scrollDiv);var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth;return document.body.removeChild(scrollDiv),scrollbarWidth}}}();function subscribe(eventName,callback){return subscribers[eventName]===void 0&&(subscribers[eventName]=[]),subscribers[eventName]=[...subscribers[eventName],callback],function(){subscribers[eventName]=subscribers[eventName].filter(cb=>cb!==callback)}}function publish(eventName,data){subscribers[eventName]&&subscribers[eventName].forEach(callback=>{data?callback(data):callback()})}var BlsLazyloadImg=function(){return{init:function(){this.lazyReady()},lazyReady:function(){if(window.IntersectionObserver){let observer=new IntersectionObserver((entries,observer2)=>{entries.forEach(entry=>{if(entry.isIntersecting){const onImageLoad=e=>{const target=e.currentTarget;setTimeout(()=>{target?.closest("motion-element")?.classList.remove("bls-loading-image"),target?.classList.remove("bls-loading-image")},600),e.currentTarget.removeEventListener("load",onImageLoad)};entry.target.width=entry.boundingClientRect.width,entry.target.height=entry.boundingClientRect.height,entry.target.sizes=`${entry.boundingClientRect.width}px`,entry.target.addEventListener("load",onImageLoad),observer2.unobserve(entry.target)}})},{rootMargin:"10px"});document.querySelectorAll(".bls-image-js img").forEach(img=>{observer.observe(img)})}}}}();BlsLazyloadImg.init();function CloseAllPopup(data){publish("closeCanvas",data)}let parser=new DOMParser;const ON_CHANGE_DEBOUNCE_TIMER=300,PUB_SUB_EVENTS={cartUpdate:"cart-update",quantityUpdate:"quantity-update",variantChange:"variant-change"},imageReady=imageOrArray=>imageOrArray?(imageOrArray=imageOrArray instanceof Element?[imageOrArray]:Array.from(imageOrArray),Promise.all(imageOrArray.map(image=>new Promise(resolve=>{image.tagName==="IMG"&&image.complete||!image.offsetParent?setTimeout(()=>{image.closest("motion-element")?.classList.remove("bls-loading-image"),image.classList.remove("bls-loading-image"),resolve()},100):image.addEventListener("load",e=>{e.currentTarget.closest("motion-element")?.classList.remove("bls-loading-image"),e.currentTarget.classList.remove("bls-loading-image"),resolve()})})))):Promise.resolve();class MotionElement extends HTMLElement{constructor(){super()}connectedCallback(){if(this.isHold||(this.preInitialize(),this.dataset.noview))return;if(!this.isConnected||!document.body.contains(this)){setTimeout(()=>{this.connectedCallback()},100);return}var _this=this;let custom_margin=this.dataset.margin||"0px 0px -5px 0px",rootElement={};if(this.dataset.parent){var parent=this.closest(`.${this.dataset.parent}`);rootElement={root:parent},custom_margin="0px 0px 0px 0px"}motion.inView(_this,async()=>{!this.isInstant&&this.mediaElements&&this.hasAttribute("data-image")&&await imageReady(this.mediaElements),setTimeout(()=>{_this.initialize()},50)},{margin:custom_margin,...rootElement})}get isHold(){return this.hasAttribute("hold")}get Transition(){return this.getAttribute("data-transition")?.split(",").map(Number)||[0,0,.3,1]}get isInstant(){return this.hasAttribute("data-instantly")}get mediaElements(){return Array.from(this.querySelectorAll("img, iframe, svg"))}get animationType(){return this.dataset.motion||"fade-up"}get animationDelay(){return parseInt(this.dataset.motionDelay||0)/1e3}set animationDelay(value){this.dataset.motionDelay=value}preInitialize(){if(!this.isHold)switch(this.animationType){case"fade-in":motion.animate(this,{opacity:.01},{duration:0});break;case"fade-up":motion.animate(this,{transform:"translateY(2.5rem)",opacity:.01},{duration:0});break;case"fade-up-sm":motion.animate(this,{transform:"translateY(1rem)",opacity:.01},{duration:0});break;case"fade-up-lg":motion.animate(this,{transform:"translateY(4rem)",opacity:.01},{duration:0});break;case"zoom-in":motion.animate(this,{transform:"scale(0.8)"},{duration:0});break;case"zoom-in-lg":motion.animate(this,{transform:"scale(0)"},{duration:0});break;case"zoom-out":motion.animate(this,{transform:"scale(1.07)"},{duration:0});break;case"zoom-out-sm":motion.animate(this,{transform:"scale(1.07)"},{duration:0});break;case"zoom-out-lg":motion.animate(this,{transform:"scale(1.07)"},{duration:0});break}}async initialize(){if(!this.isHold)switch(this.animationType){case"fade-in":await motion.animate(this,{opacity:1},{duration:1.5,delay:this.animationDelay,easing:this.transition}).finished;break;case"fade-up":await motion.animate(this,{transform:"translateY(0)",opacity:1},{duration:.5,delay:this.animationDelay,easing:this.transition}).finished;break;case"fade-up-sm":await motion.animate(this,{transform:"translateY(0)",opacity:1},{duration:.3,delay:this.animationDelay,easing:this.transition}).finished;break;case"fade-up-lg":await motion.animate(this,{transform:"translateY(0)",opacity:1},{duration:.5,delay:this.animationDelay,easing:this.transition}).finished;break;case"zoom-in":await motion.animate(this,{transform:"scale(1)"},{duration:1.3,delay:this.animationDelay,easing:this.transition}).finished;break;case"zoom-in-lg":await motion.animate(this,{transform:"scale(1)"},{duration:.5,delay:this.animationDelay,easing:this.transition}).finished;break;case"zoom-out":await motion.animate(this,{transform:"scale(1)"},{duration:1.5,delay:this.animationDelay,easing:this.transition}).finished;break;case"zoom-out-sm":await motion.animate(this,{transform:"scale(1)"},{duration:1,delay:this.animationDelay,easing:this.transition}).finished;break;case"zoom-out-lg":await motion.animate(this,{transform:"scale(1)"},{duration:1,delay:this.animationDelay,easing:this.transition}).finished;break}}refreshAnimation(){this.removeAttribute("hold"),this.preInitialize(),setTimeout(()=>{this.initialize()},50)}}customElements.define("motion-element",MotionElement);class SlideSection extends HTMLElement{constructor(){super(),this.globalSlide=null,this.init()}init(){document.body.classList.contains("index")?window.pageYOffset>0||document.body.classList.contains("swiper-lazy")?this.initSlide():this.classList.contains("lazy-loading-swiper-before")?this.initSlide():this.classList.add("lazy-loading-swiper-after"):this.initSlide()}initSlide(){const _this=this;var autoplaying=_this?.dataset.autoplay==="true";const loop=_this?.dataset.loop==="true",itemDesktop=_this?.dataset.desktop?_this?.dataset.desktop:4;var itemTablet=_this?.dataset.tablet?_this?.dataset.tablet:"";const itemMobile=_this?.dataset.mobile?_this?.dataset.mobile:1,direction=_this?.dataset.direction?_this?.dataset.direction:"horizontal";var autoplaySpeed=_this?.dataset.autoplaySpeed?_this?.dataset.autoplaySpeed*1e3:3e3,speed=_this?.dataset.speed?_this?.dataset.speed:400;const effect=_this?.dataset.effect?_this?.dataset.effect:"slide",row=_this?.dataset.row?_this?.dataset.row:1;var spacing=_this?.dataset.spacing?_this?.dataset.spacing:30;const progressbar=_this?.dataset.paginationProgressbar==="true",autoItem=_this?.dataset.itemMobile==="true",autoHeight=_this?.dataset.autoHeight==="true",arrowCenterimage=_this?.dataset.arrowCenterimage?_this?.dataset.arrowCenterimage:0;spacing=Number(spacing),autoplaySpeed=Number(autoplaySpeed),speed=Number(speed),autoplaying&&(autoplaying={delay:autoplaySpeed}),itemTablet||(itemDesktop<2?itemTablet=1:itemDesktop<3?itemTablet=2:itemTablet=3),direction=="vertical"&&(_this.style.maxHeight=_this.offsetHeight+"px"),this.globalSlide=new Swiper(_this,{slidesPerView:autoItem?"auto":itemMobile,spaceBetween:spacing>=15?15:spacing,autoplay:autoplaying,direction,loop,effect,autoHeight,speed,watchSlidesProgress:!0,watchSlidesVisibility:!0,grid:{rows:row,fill:"row"},navigation:{nextEl:_this.querySelector(".swiper-button-next"),prevEl:_this.querySelector(".swiper-button-prev")},pagination:{clickable:!0,el:_this.querySelector(".parent-pagination")||_this.querySelector(".swiper-pagination"),type:progressbar?"progressbar":"bullets"},breakpoints:{768:{slidesPerView:itemTablet,spaceBetween:spacing>=30?30:spacing,type:progressbar?"progressbar":"bullets",autoHeight:!1},1025:{slidesPerView:itemDesktop,spaceBetween:spacing,type:progressbar?"progressbar":"bullets",autoHeight:!1}},thumbs:{swiper:this.thumbnailSlide?this.thumbnailSlide:null},on:{init:function(e){var sec__tiktok=_this.closest(".sec__tiktok-video");if(_this.classList.contains("slideshow")){const motionElement=_this.querySelectorAll(".swiper-slide.swiper-slide-active motion-element.effect_fadeinup");setTimeout(()=>{motionElement&&motionElement.forEach(item=>{item.refreshAnimation()})},350)}var slide_visibles=_this.querySelectorAll(".swiper-slide:not(.swiper-slide-visible) motion-element:not([data-image]),motion-element.swiper-slide:not(.swiper-slide-visible)");if(slide_visibles?.forEach(slide=>{slide&&typeof slide.initialize=="function"&&slide.initialize()}),e.autoplay.stop(),_this?.dataset.autoplay==="true"&&motion.inView(_this,async()=>{e.autoplay.start()},{margin:"0px 0px -50px 0px"}),sec__tiktok&&(_this.initSecTiktok(sec__tiktok),window.addEventListener("resize",function(){setTimeout(()=>{_this.initSecTiktok(sec__tiktok)},150)})),arrowCenterimage){var items_slide=_this.querySelectorAll(".product-item__media--ratio");if(items_slide.length!=0){var oH=[];items_slide.forEach(e2=>{oH.push(e2.offsetHeight/2)});var max=Math.max(...oH),arrowsOffset="--arrows-offset-top: "+max+"px";_this.querySelectorAll(".swiper-arrow")&&_this.querySelectorAll(".swiper-arrow").forEach(arrow=>{arrow.setAttribute("style",arrowsOffset)})}}var video=_this.querySelector("video.slideshow");if(video){const handleIntersection=(entries,observer)=>{if(!entries[0].isIntersecting)return;observer.unobserve(_this),_this.querySelectorAll("video").forEach(video2=>{const dataSrc=video2.dataset.src;dataSrc&&(video2.src=dataSrc,video2.removeAttribute("data-src"))})};new IntersectionObserver(handleIntersection.bind(_this),{rootMargin:"0px 0px 200px 0px"}).observe(_this)}},realIndexChange:function(swiper){if(_this?.dataset.autoplay){var slide_visibles=_this.querySelectorAll(".swiper-slide motion-element:not([data-image])");slide_visibles?.forEach(slide=>{slide.hasAttribute("hold")||slide?.setAttribute("hold",!0)})}else{var slide_visibles=_this.querySelectorAll(".swiper-slide motion-element:not([data-image])");slide_visibles?.forEach(slide=>{slide.hasAttribute("hold")||slide?.setAttribute("hold",!0)})}setTimeout(()=>{if(_this.classList.contains("slideshow")){const motionElement=_this.querySelectorAll(".swiper-slide.swiper-slide-active motion-element.effect_fadeinup, .swiper-slide.swiper-slide-active motion-element.motion-image");motionElement&&motionElement.forEach(item=>{item.refreshAnimation()})}},50)},slideChange:function(){const index_currentSlide=this.realIndex+1;_this.closest(".sec__testimonials-single")&&(_this.closest(".sec__testimonials-single").querySelectorAll("single-item").forEach(dot=>{dot.classList.remove("active")}),_this.closest(".sec__testimonials-single").querySelector(".testimonials-author-image[data-position='"+index_currentSlide+"']").classList.add("active"))}}})}initSecTiktok(sec){sec.querySelectorAll(".swiper-slide").forEach(arrow=>{const tiktok=arrow.querySelector(".section_tiktok-image");let width="--item-width: "+arrow.offsetWidth;tiktok.setAttribute("style",width)})}}customElements.define("slide-section",SlideSection);class PopupBase extends HTMLElement{constructor(){super(),this.customClass=this.dataset.customClass,this.modal=null}initPopup(content,text,customClass){const _this=this;this.modal=new tingle.modal({footer:!1,stickyFooter:!1,closeMethods:["overlay","button","escape"],cssClass:[this.customClass||customClass],onOpen:function(){document.documentElement.classList.add("open-popup"),root.style.setProperty("padding-right",getScrollBarWidth.init()+"px");const video=this.modalBox.querySelector("video");video&&(video.play(),this.modal.classList.contains("shopable-video")&&(video.muted=!1))},onClose:function(){document.documentElement.classList.remove("open-popup"),root.style.removeProperty("padding-right")},beforeClose:function(){return _this.onCloseEvent(),document.documentElement.classList.remove("open-popup"),root.style.removeProperty("padding-right"),!0}}),this.modal.setHeader=function(content2){let popup_content=this.modalBoxContent,popup_header=document.createElement("div");popup_header.classList.add("tingle-modal-box__header"),popup_header.innerHTML=content2,popup_content.parentNode.insertBefore(popup_header,popup_content)},text&&this.modal.setHeader(text),this.modal.setContent(content),this.modal.open()}onClose(){this.modal.close()}onCloseEvent(){}}class SwatchInit extends HTMLElement{constructor(){super(),this.options=null,this.init()}init(){const _this=this;this.querySelectorAll(".product__color-swatches--js").forEach(btn=>{_this.checkSwatches(btn)})}checkSwatches(e){const{color,image,customValue,swatchType,optionSwatchValue}=e.dataset;color&&(swatchType!="variant_images"?optionSwatchValue.length==0||optionSwatchValue==null?this.checkColor(color)?(e.style.backgroundColor=color,e.classList.add(customValue)):(e.classList.add(customValue),image&&(e.classList.add("color__"+color.replace(" ","-")),e.style.backgroundColor=null,e.style.backgroundImage="url('"+image+"')",e.style.backgroundSize="cover",e.style.backgroundRepeat="no-repeat")):e.style.setProperty("--swatch--background",optionSwatchValue):optionSwatchValue==null||optionSwatchValue.length==0?image?(e.classList.add("color__"+color.replace(" ","-")),e.style.backgroundColor=null,e.style.backgroundImage="url('"+image+"')",e.style.backgroundSize="cover",e.style.backgroundRepeat="no-repeat"):(this.checkColor(color)&&(e.style.backgroundColor=color),e.classList.add(customValue)):e.style.setProperty("--swatch--background",optionSwatchValue))}checkColor(strColor){var s=new Option().style;return s.color=strColor,s.color==strColor}updateOptions(){this.options=Array.from(this.querySelectorAll(".product__color-swatches--js.active"),select=>select.getAttribute("data-value")),this.variantData.find(variant=>{this.options.length==1&&{1:variant.option1,2:variant.option2,3:variant.option3}[this.position_swatch]===this.options[0]&&(this.options=variant.options)})}updateMasterId(variantData){return this.currentVariant=variantData.find(variant=>!variant.options.map((option,index)=>this.options[index]===option).includes(!1))}}class DeferredMedia extends HTMLElement{constructor(){super();const poster=this.querySelector('[id^="Deferred-Poster-"]');poster&&poster.addEventListener("click",this.loadContent.bind(this))}loadContent(focus=!0){if(window.pauseAllMedia(),!this.getAttribute("loaded")){const content=document.createElement("div");content.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),this.setAttribute("loaded",!0);const deferredElement=this.appendChild(content.querySelector("video, model-viewer, iframe"));focus&&deferredElement.focus(),deferredElement.nodeName=="VIDEO"&&deferredElement.getAttribute("autoplay")&&deferredElement.play()}}}function handleErrorMessagePopup(errorMessage=!1){const url=`${window.location.pathname}?section_id=form-message`;fetch(url).then(response=>response.text()).then(responseText=>{const elementErrorMessage=new DOMParser().parseFromString(responseText,"text/html").querySelector(".product-form__error-message-wrapper"),elementMessage=elementErrorMessage.querySelector(".product-form__error-message");elementMessage.textContent=errorMessage,showToast(elementErrorMessage.innerHTML,5e3,"modal-error")}).catch(e=>{throw e})}function showToast(message,duration=3e3,customClass=""){let toastContainer=document.getElementById("toast-container");toastContainer||(toastContainer=document.createElement("div"),toastContainer.id="toast-container",document.body.appendChild(toastContainer));const toast=document.createElement("div");toast.className=`toast show ${customClass}`,toast.innerHTML=message,toastContainer.appendChild(toast),setTimeout(()=>{closeToast(toast)},duration)}function closeToast(toast){toast.classList.remove("show"),setTimeout(()=>{toast.remove(),document.querySelector("#toast-container .toast")||document.getElementById("toast-container").remove()},500)}class SlideLazyLoad{constructor(e){this.triggerEventsJs=e,this.eventOptionsJs={passive:!0},this.userEventListenerJs=this.triggerListenerJs.bind(this),this.delayedScriptsJs={normal:[],async:[],defer:[]}}triggerListenerJs(){this._removeUserInteractionListenerJs(this),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",this._loadEverythingReadyNow.bind(this)):this._loadEverythingReadyNow()}_removeUserInteractionListenerJs(e){this.triggerEventsJs.forEach(t=>window.removeEventListener(t,e.userEventListenerJs,e.eventOptionsJs))}_addUserInteractionListenerJs(e){this.triggerEventsJs.forEach(t=>window.addEventListener(t,e.userEventListenerJs,e.eventOptionsJs))}_preloadAllScriptsJs(){document.body.classList.add("swiper-lazy"),document.body.classList.add("review-lazy"),document.querySelectorAll(".lazy-loading-swiper-after").forEach(el=>{el.classList.remove("lazy-loading-swiper-after"),this.initSlide(el)}),document.querySelectorAll(".review-product-added").forEach(el=>{el.classList.remove("review-product-added"),el.innerHTML=el.querySelector(".product-review-json").innerHTML,el.classList.remove("inline-loading")})}initSlide(el){const _this=el;var autoplaying=_this?.dataset.autoplay==="true";const loop=_this?.dataset.loop==="true",itemDesktop=_this?.dataset.desktop?_this?.dataset.desktop:4;var itemTablet=_this?.dataset.tablet?_this?.dataset.tablet:"";const itemMobile=_this?.dataset.mobile?_this?.dataset.mobile:1,direction=_this?.dataset.direction?_this?.dataset.direction:"horizontal";var autoplaySpeed=_this?.dataset.autoplaySpeed?_this?.dataset.autoplaySpeed*1e3:3e3,speed=_this?.dataset.speed?_this?.dataset.speed:400;const effect=_this?.dataset.effect?_this?.dataset.effect:"slide",row=_this?.dataset.row?_this?.dataset.row:1;var spacing=_this?.dataset.spacing?_this?.dataset.spacing:30;const progressbar=_this?.dataset.paginationProgressbar==="true",autoItem=_this?.dataset.itemMobile==="true",arrowCenterimage=_this?.dataset.arrowCenterimage?_this?.dataset.arrowCenterimage:0;spacing=Number(spacing),autoplaySpeed=Number(autoplaySpeed),speed=Number(speed),autoplaying&&(autoplaying={delay:autoplaySpeed}),itemTablet||(itemDesktop<2?itemTablet=1:itemDesktop<3?itemTablet=2:itemTablet=3),direction=="vertical"&&(_this.style.maxHeight=_this.offsetHeight+"px"),_this.globalSlide=new Swiper(el,{slidesPerView:autoItem?"auto":itemMobile,spaceBetween:spacing>=15?15:spacing,autoplay:autoplaying,direction,loop,effect,speed,watchSlidesProgress:!0,watchSlidesVisibility:!0,grid:{rows:row,fill:"row"},navigation:{nextEl:_this.querySelector(".swiper-button-next"),prevEl:_this.querySelector(".swiper-button-prev")},pagination:{clickable:!0,el:_this.querySelector(".parent-pagination")||_this.querySelector(".swiper-pagination"),type:progressbar?"progressbar":"bullets"},breakpoints:{768:{slidesPerView:itemTablet,spaceBetween:spacing>=30?30:spacing,pagination:{type:progressbar?"progressbar":"bullets"}},1025:{slidesPerView:itemDesktop,spaceBetween:spacing,pagination:{type:progressbar?"progressbar":"bullets"}}},thumbs:{swiper:this.thumbnailSlide?this.thumbnailSlide:null},on:{init:function(e){var slide_visibles=_this.querySelectorAll(".swiper-slide:not(.swiper-slide-visible) motion-element:not([data-image]),motion-element.swiper-slide:not(.swiper-slide-visible)");slide_visibles?.forEach(slide=>{slide?.initialize()}),e.autoplay.stop(),_this?.dataset.autoplay==="true"&&motion.inView(_this,async()=>{e.autoplay.start()},{margin:"0px 0px -50px 0px"});var sec__tiktok=_this.closest(".sec__tiktok-video");if(sec__tiktok&&(_this.initSecTiktok(sec__tiktok),window.addEventListener("resize",function(){setTimeout(()=>{_this.initSecTiktok(sec__tiktok)},150)})),arrowCenterimage){var items_slide=_this.querySelectorAll(".product-item__media--ratio");if(items_slide.length!=0){var oH=[];items_slide.forEach(e2=>{oH.push(e2.offsetHeight/2)});var max=Math.max(...oH),arrowsOffset="--arrows-offset-top: "+max+"px";_this.querySelectorAll(".swiper-arrow")&&_this.querySelectorAll(".swiper-arrow").forEach(arrow=>{arrow.setAttribute("style",arrowsOffset)})}}},realIndexChange:function(swiper){var slide_visibles=_this.querySelectorAll(".swiper-slide motion-element:not([data-image])");slide_visibles?.forEach(slide=>{slide.hasAttribute("hold")||slide?.setAttribute("hold",!0)})},slideChange:function(){const index_currentSlide=this.realIndex+1;_this.closest(".sec__testimonials-single")&&(_this.closest(".sec__testimonials-single").querySelectorAll("single-item").forEach(dot=>{dot.classList.remove("active")}),_this.closest(".sec__testimonials-single").querySelector(".testimonials-author-image[data-position='"+index_currentSlide+"']").classList.add("active"))}}})}async _loadEverythingReadyNow(){this._preloadAllScriptsJs(),await this._loadScriptsFromListJs(this.delayedScriptsJs.normal),await this._loadScriptsFromListJs(this.delayedScriptsJs.defer),await this._loadScriptsFromListJs(this.delayedScriptsJs.async),await this._triggerDOMContentLoadedJs(),await this._triggerWindowLoadJs(),window.dispatchEvent(new Event("glozinspeed-allScriptsLoaded"))}async _loadScriptsFromListJs(e){const t=e.shift();return t?(await this._transformScript(t),this._loadScriptsFromListJs(e)):Promise.resolve()}async _transformScript(e){return await this._requestAnimFrame(),new Promise(t=>{const s=document.createElement("script");let n;[...e.attributes].forEach(e2=>{let t2=e2.nodeName;t2!=="type"&&(t2==="data-glozinlazy-type"&&(t2="type",n=e2.nodeValue),s.setAttribute(t2,e2.nodeValue))}),e.hasAttribute("src")?(s.addEventListener("load",t),s.addEventListener("error",t)):(s.text=e.text,t()),e.parentNode.replaceChild(s,e)})}async _triggerDOMContentLoadedJs(){this.domReadyFired=!0,await this._requestAnimFrame(),document.dispatchEvent(new Event("glozinspeed-DOMContentLoaded")),await this._requestAnimFrame(),window.dispatchEvent(new Event("glozinspeed-DOMContentLoaded")),await this._requestAnimFrame(),document.dispatchEvent(new Event("glozinspeed-readystatechange")),await this._requestAnimFrame(),document.glozinonreadystatechange&&document.glozinonreadystatechange()}async _triggerWindowLoadJs(){await this._requestAnimFrame(),window.dispatchEvent(new Event("glozinspeed-load")),await this._requestAnimFrame(),window.glozinonload&&window.glozinonload(),await this._requestAnimFrame(),window.dispatchEvent(new Event("glozinspeed-pageshow")),await this._requestAnimFrame(),window.glozinonpageshow&&window.glozinonpageshow()}async _requestAnimFrame(){return new Promise(e=>requestAnimationFrame(e))}static run(){const e=new SlideLazyLoad(["keydown","mousemove","touchmove","touchstart","touchend","wheel"]);e._addUserInteractionListenerJs(e)}}SlideLazyLoad.run();class CopyButton extends HTMLElement{constructor(){super(),this.content=this.dataset.content,this.init()}init(){this.content&&this.addEventListener("click",this.onClick.bind(this))}onClick(){navigator.clipboard.writeText(this.content),this.classList.add("copied")}updateUrl(newContent){this.content=newContent}}customElements.define("copy-button",CopyButton); //# sourceMappingURL=/cdn/shop/t/2/assets/global.js.map?v=152687518965471647851746889713