(function(){var __sections__={};(function(){for(var i=0,s=document.getElementById("sections-script").getAttribute("data-sections").split(",");iitem.addEventListener("click",this.onItemClick.bind(this)))}hidePanel(){this.elements.button.setAttribute("aria-expanded","false"),this.elements.panel.setAttribute("hidden",!0)}onContainerKeyUp(event){event.code.toUpperCase()==="ESCAPE"&&(this.hidePanel(),this.elements.button.focus())}onItemClick(event){event.preventDefault(),this.elements.input.value=event.currentTarget.dataset.value,this.querySelector("form")?.submit()}openSelector(){this.elements.button.focus(),this.elements.panel.toggleAttribute("hidden"),this.elements.button.setAttribute("aria-expanded",(this.elements.button.getAttribute("aria-expanded")==="false").toString())}closeSelector(event){const shouldClose=event.relatedTarget&&event.relatedTarget.nodeName==="BUTTON";(event.relatedTarget===null||shouldClose)&&this.hidePanel()}}customElements.define("localization-form",LocalizationForm)}catch(e){console.error(e)}}(),function(){if(__sections__.header)try{class StickyHeader extends HTMLElement{constructor(){super()}connectedCallback(){this.header=document.querySelector(".shopify-section-header"),this.headerIsAlwaysSticky=this.getAttribute("data-sticky-type")==="always",this.headerBounds={},this.currentScrollTop=0,this.preventReveal=!1,this.headerIsAlwaysSticky&&(this.header.classList.add("shopify-section-header-sticky"),this.header.classList.add("always-fixed")),this.onScrollHandler=this.onScroll.bind(this),this.hideHeaderOnScrollUp=()=>this.preventReveal=!0,this.addEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.addEventListener("scroll",this.onScrollHandler,!1),this.createObserver()}disconnectedCallback(){this.removeEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.removeEventListener("scroll",this.onScrollHandler)}createObserver(){new IntersectionObserver((entries,observer2)=>{this.headerBounds=entries[0].intersectionRect,observer2.disconnect()}).observe(this.header)}onScroll(){const scrollTop=window.pageYOffset||document.documentElement.scrollTop;if(scrollTop>this.currentScrollTop&&scrollTop>this.headerBounds.bottom){if(this.preventHide)return;requestAnimationFrame(this.hide.bind(this))}else scrollTopthis.headerBounds.bottom?this.preventReveal?(window.clearTimeout(this.isScrolling),this.isScrolling=setTimeout(()=>{this.preventReveal=!1},66),requestAnimationFrame(this.hide.bind(this))):requestAnimationFrame(this.reveal.bind(this)):scrollTop<=this.headerBounds.top&&requestAnimationFrame(this.reset.bind(this));this.currentScrollTop=scrollTop}hide(){this.headerIsAlwaysSticky||(this.header.classList.add("shopify-section-header-hidden","shopify-section-header-sticky"),this.closeMenuDisclosure())}reveal(){this.headerIsAlwaysSticky||(this.header.classList.add("shopify-section-header-sticky","animate"),this.header.classList.add("shopify-section-header-sticky","animate"),this.header.classList.remove("shopify-section-header-hidden"))}reset(){this.headerIsAlwaysSticky||this.header.classList.remove("shopify-section-header-hidden","shopify-section-header-sticky","animate")}closeMenuDisclosure(){this.disclosures=this.disclosures||this.header.querySelectorAll("details-disclosure"),this.disclosures.forEach(disclosure=>disclosure.close())}}customElements.define("sticky-header",StickyHeader)}catch(e){console.error(e)}}(),function(){if(__sections__["main-cart-footer"])try{class CartNote extends HTMLElement{constructor(){super(),this.addEventListener("change",debounce(event=>{const body=JSON.stringify({note:event.target.value});fetch(`${routes.cart_update_url}`,{...fetchConfig(),body})},300))}}customElements.define("cart-note",CartNote)}catch(e){console.error(e)}}(),function(){if(__sections__["main-product"])try{class ProductModal extends ModalDialog{constructor(){super()}hide(){super.hide(),window.pauseAllMedia()}show(opener){super.show(opener),this.showActiveMedia()}showActiveMedia(){this.querySelectorAll(`[data-media-id]:not([data-media-id="${this.openedBy.getAttribute("data-media-id")}"])`).forEach(element=>{element.classList.remove("active")});const activeMedia=this.querySelector(`[data-media-id="${this.openedBy.getAttribute("data-media-id")}"]`);activeMedia&&(activeMedia.classList.add("active"),activeMedia.scrollIntoView()),activeMedia.nodeName=="DEFERRED-MEDIA"&&activeMedia.querySelector("template")?.content?.querySelector(".js-youtube")&&activeMedia.loadContent()}}class ProductRecommendations extends HTMLElement{constructor(){super();const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations--single");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML)}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}customElements.define("product-modal",ProductModal),customElements.define("product-recommendations--single",ProductRecommendations)}catch(e){console.error(e)}}(),function(){if(__sections__["product-recommendations"])try{class ProductRecommendations extends HTMLElement{constructor(){super();const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML)}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}customElements.define("product-recommendations",ProductRecommendations)}catch(e){console.error(e)}}()})(); //# sourceMappingURL=/cdn/shop/t/5/compiled_assets/scripts.js.map?525=