1function getFocusableElements(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}document.querySelectorAll('[id^="Details-"] summary').forEach(summary=>{summary.setAttribute("role","button"),summary.setAttribute("aria-expanded",summary.parentNode.hasAttribute("open")),summary.nextElementSibling.getAttribute("id")&&summary.setAttribute("aria-controls",summary.nextElementSibling.id),summary.addEventListener("click",event=>{event.currentTarget.setAttribute("aria-expanded",!event.currentTarget.closest("details").hasAttribute("open"))}),!summary.closest("header-drawer, menu-drawer")&&summary.parentElement.addEventListener("keyup",onKeyUpEscape)});const trapFocusHandlers={};function trapFocus(container,elementToFocus=container){var elements=getFocusableElements(container),first=elements[0],last=elements[elements.length-1];removeTrapFocus(),trapFocusHandlers.focusin=event=>{event.target!==container&&event.target!==last&&event.target!==first||document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(event){event.code.toUpperCase()==="TAB"&&(event.target===last&&!event.shiftKey&&(event.preventDefault(),first.focus()),(event.target===container||event.target===first)&&event.shiftKey&&(event.preventDefault(),last.focus()))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),elementToFocus&&elementToFocus.focus(),elementToFocus.tagName==="INPUT"&&["search","text","email","url"].includes(elementToFocus.type)&&elementToFocus.value&&elementToFocus.setSelectionRange(0,elementToFocus.value.length)}try{document.querySelector(":focus-visible")}catch{focusVisiblePolyfill()}function focusVisiblePolyfill(){const navKeys=["ARROWUP","ARROWDOWN","ARROWLEFT","ARROWRIGHT","TAB","ENTER","SPACE","ESCAPE","HOME","END","PAGEUP","PAGEDOWN"];let currentFocusedElement=null,mouseClick=null;window.addEventListener("keydown",event=>{navKeys.includes(event.code.toUpperCase())&&(mouseClick=!1)}),window.addEventListener("mousedown",event=>{mouseClick=!0}),window.addEventListener("focus",()=>{currentFocusedElement&¤tFocusedElement.classList.remove("focused"),!mouseClick&&(currentFocusedElement=document.activeElement,currentFocusedElement.classList.add("focused"))},!0)}function pauseAllMedia(){document.querySelectorAll(".js-youtube:not([data-ignore-pause])").forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll(".js-vimeo:not([data-ignore-pause])").forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video:not([data-ignore-pause])").forEach(video=>{video.pause()}),document.querySelectorAll("product-model").forEach(model=>{model.modelViewerUI&&model.modelViewerUI.pause()})}function removeTrapFocus(elementToFocus=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),elementToFocus&&elementToFocus.focus()}function onKeyUpEscape(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");if(!openDetailsElement)return;const summaryElement=openDetailsElement.querySelector("summary");openDetailsElement.removeAttribute("open"),summaryElement.setAttribute("aria-expanded",!1),summaryElement.focus()}class QuantityInput extends HTMLElement{constructor(){super(),this.input=this.querySelector("input"),this.changeEvent=ne
1w Event("change",{bubbles:!0}),this.input.addEventListener("change",this.onInputChange.bind(this)),this.querySelectorAll("button").forEach(button=>button.addEventListener("click",this.onButtonClick.bind(this)))}quantityUpdateUnsubscriber=void 0;connectedCallback(){this.validateQtyRules(),this.quantityUpdateUnsubscriber=subscribe(PUB_SUB_EVENTS.quantityUpdate,this.validateQtyRules.bind(this))}disconnectedCallback(){this.quantityUpdateUnsubscriber&&this.quantityUpdateUnsubscriber()}onInputChange(event){this.validateQtyRules()}onButtonClick(event){event.preventDefault();const previousValue=this.input.value;event.target.name==="plus"?parseInt(this.input.dataset.min)>parseInt(this.input.step)&&this.input.value==0?this.input.value=this.input.dataset.min:this.input.stepUp():this.input.stepDown(),previousValue!==this.input.value&&this.input.dispatchEvent(this.changeEvent),this.input.dataset.min===previousValue&&event.target.name==="minus"&&(this.input.value=parseInt(this.input.min))}validateQtyRules(){const value=parseInt(this.input.value);if(this.input.min&&this.querySelector(".quantity__button[name='minus']").classList.toggle("disabled",parseInt(value)<=parseInt(this.input.min)),this.input.max){const max=parseInt(this.input.max);this.querySelector(".quantity__button[name='plus']").classList.toggle("disabled",value>=max)}}}customElements.define("quantity-input",QuantityInput);function throttle(fn,delay){let lastCall=0;return function(...args){const now=new Date().getTime();if(!(now-lastCall<delay))return lastCall=now,fn(...args)}}function fetchConfig(type="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${type}`}}}typeof window.Shopify>"u"&&(window.Shopify={}),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;i<count;i++){var option=selector.options[i];if(value==option.value||value==option.innerHTML)return selector.selectedIndex=i,i}},Shopify.addListener=function(target,eventName,callback){target.addEventListener?target.addEventListener(eventName,callback,!1):target.attachEvent("on"+eventName,callback)},Shopify.postLink=function(path,options){options=options||{};var method=options.method||"post",params=options.parameters||{},form=document.createElement("form");form.setAttribute("method",method),form.setAttribute("action",path);for(var key in params){var hiddenField=document.createElement("input");hiddenField.setAttribute("type","hidden"),hiddenField.setAttribute("name",key),hiddenField.setAttribute("value",params[key]),form.appendChild(hiddenField)}document.body.appendChild(form),form.submit(),document.body.removeChild(form)},Shopify.CountryProvinceSelector=function(country_domid,province_domid,options){this.countryEl=document.getElementById(country_domid),this.provinceEl=document.getElementById(province_domid),this.provinceContainer=document.getElementById(options.hideElement||province_domid),Shopify.addListener(this.countryEl,"change",Shopify.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.CountryProvinceSelector.prototype={initCountry:function(){var value=this.countryEl.getAttribute("data-default");Shopify.setSelectorByValue(this.countryEl,value),this.countryHandler()},initProvince:function(){var value=this.provinceEl.getAttribute("data-default");value&&this.provinceEl.options.length>0&&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<provinces.length;i++){var opt=document.createElement("option");opt.value=provinces[i][0],opt.innerHTML=provinces[i][1],this.provinceEl.appendChild(opt)}this.provinceContainer.style.display=""}},clearOptions:function(selector){for(;selector.firstChild;)selector.removeChild(selector.firstChild)},setOptions:function(selector,values){for(var i=0,count=values.length;i<values.length;i++){var opt=document.createElement("option");opt.value=values[i],opt.innerHTML=values[i],selector.appendChild(opt)}}};class MenuDrawer extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details"),this.addEventListener("keyup",this.onKeyUp.bind(this)),this.addEventListener("focusout",this.onFocusOut.bind(this)),this.bindEvents()}bindEvents(){this.querySelectorAll("summary").forEach(summary=>summary.addEventListener("click",this.onSummaryClick.bind(this))),this.querySelectorAll("button:not(.localization-selector):not(.country-selector__close-button):not(.country-filter__reset-button)").forEach(button=>button.addEventListener("click",this.onCloseButtonClick.bind(this)))}onKeyUp(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");openDetailsElement&&(openDetailsElement===this.mainDetailsToggle?this.closeMenuDrawer(event,this.mainDetailsToggle.querySelector("summary")):this.closeSubmenu(openDetailsElement))}onSummaryClick(event){const summaryElement=event.currentTarget,detailsElement=summaryElement.parentNode,parentMenuElement=detailsElement.closest(".has-submenu"),isOpen=detailsElement.hasAttribute("open"),reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)");function addTrapFocus(){trapFocus(summaryElement.nextElementSibling,detailsElement.querySelector("button")),summaryElement.nextElementSibling.removeEventListener("transitionend",addTrapFocus)}detailsElement===this.mainDetailsToggle?(isOpen&&event.preventDefault(),isOpen?this.closeMenuDrawer(event,summaryElement):this.openMenuDrawer(summaryElement),window.matchMedia("(max-width: 990px)")&&document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`)):setTimeout(()=>{detailsElement.classList.add("menu-opening"),summaryElement.setAttribute("aria-expanded",!0),parentMenuElement&&parentMenuElement.classList.add("submenu-open"),!reducedMotion||reducedMotion.matches?addTrapFocus():summaryElement.nextElementSibling.addEventListener("transitionend",addTrapFocus)},100)}openMenuDrawer(summaryElement){setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),summaryElement.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,summaryElement),document.body.classList.add(`overflow-hidden-${this.dataset.breakpoint}`)}closeMenuDrawer(event,elementToFocus=!1){event!==void 0&&(this.mainDetailsToggle.classList.remove("menu-opening"),this.mainDetailsToggle.querySelectorAll("details").forEach(detail
1s=>{details.removeAttribute("open"),details.classList.remove("menu-opening")}),this.mainDetailsToggle.querySelectorAll(".submenu-open").forEach(submenu=>{submenu.classList.remove("submenu-open")}),document.body.classList.remove(`overflow-hidden-${this.dataset.breakpoint}`),removeTrapFocus(elementToFocus),this.closeAnimation(this.mainDetailsToggle),event instanceof KeyboardEvent&&elementToFocus?.setAttribute("aria-expanded",!1))}onFocusOut(){setTimeout(()=>{this.mainDetailsToggle.hasAttribute("open")&&!this.mainDetailsToggle.contains(document.activeElement)&&this.closeMenuDrawer()})}onCloseButtonClick(event){const detailsElement=event.currentTarget.closest("details");this.closeSubmenu(detailsElement)}closeSubmenu(detailsElement){const parentMenuElement=detailsElement.closest(".submenu-open");parentMenuElement&&parentMenuElement.classList.remove("submenu-open"),detailsElement.classList.remove("menu-opening"),detailsElement.querySelector("summary").setAttribute("aria-expanded",!1),removeTrapFocus(detailsElement.querySelector("summary")),this.closeAnimation(detailsElement)}closeAnimation(detailsElement){let animationStart;const handleAnimation=time=>{animationStart===void 0&&(animationStart=time),time-animationStart<400?window.requestAnimationFrame(handleAnimation):(detailsElement.removeAttribute("open"),detailsElement.closest("details[open]")&&trapFocus(detail
1sElement.closest("details[open]"),detailsElement.querySelector("summary")))};window.requestAnimationFrame(handleAnimation)}}customElements.define("menu-drawer",MenuDrawer);class CustomDrawer extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const content=document.createElement("div");for(;this.firstChild;)content.appendChild(this.firstChild);this.shadowRoot.appendChild(content),this.overlay=this.shadowRoot.querySelector(".overlay"),this.drawer=this.shadowRoot.querySelector(".drawer"),this.closeButton=this.shadowRoot.querySelector(".close-drawer-btn"),this.overlay.addEventListener("click",()=>this.close()),this.closeButton.addEventListener("click",()=>this.close())}open(){this.setAttribute("open","")}close(){this.removeAttribute("open")}static get observedAttributes(){return["open"]}attributeChangedCallback(name,oldValue,newValue){name==="open"&&newValue!==null?this.style.display="block":this.style.display="none"}}customElements.define("custom-drawer",CustomDrawer),document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".open-drawer-btn").forEach(button=>{button.addEventListener("click",()=>{const targetId=button.getAttribute("data-target"),targetDrawer=document.getElementById(targetId);targetDrawer&&targetDrawer.open()})})});class HeaderDrawer extends MenuDrawer{constructor(){super()}openMenuDrawer(summaryElement){this.header=this.header||document.querySelector(".section-header"),this.borderOffset=this.borderOffset||this.closest(".header-wrapper").classList.contains("header-wrapper--border-bottom")?1:0,document.documentElement.style.setProperty("--header-bottom-position",`${parseInt(this.header.getBoundingClientRect().bottom-this.borderOffset)}px`),this.header.classList.add("menu-open"),setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),summaryElement.setAttribute("aria-expanded",!0),window.addEventListener("resize",this.onResize),trapFocus(this.mainDetailsToggle,summaryElement),document.body.classList.add(`overflow-hidden-${this.dataset.breakpoint}`)}closeMenuDrawer(event,elementToFocus){elementToFocus&&(super.closeMenuDrawer(event,elementToFocus),this.header.classList.remove("menu-open"),window.removeEventListener("resize",this.onResize))}onResize=()=>{this.header&&document.documentElement.style.setProperty("--header-bottom-position",`${parseInt(this.header.getBoundingClientRect().bottom-this.borderOffset)}px`),document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`)}}customElements.define("header-drawer",HeaderDrawer);class ModalDialog extends HTMLElement{constructor(){super(),this.querySelector('[id^="ModalClose-"]').addEventListener("click",this.hide.bind(this,!1)),this.handleKeyDown=this.handleKeyDown.bind(this),this.classList.contains("media-modal")?this.addEventListener("pointerup",event=>{event.pointerType==="mouse"&&!event.target.closest("deferred-media, product-model")&&this.hide()}):this.addEventListener("click",event=>{event.target===this&&this.hide()})}connectedCallback(){this.moved||(this.moved=!0,document.addEventListener("keydown",this.handleKeyDown))}disconnectedCallback(){document.removeEventListener("keydown",this.handleKeyDown)}handleKeyDown(event){event.key==="Escape"&&this.hasAttribute("open")&&this.hide()}show(opener){this.openedBy=opener;const popup=this.querySelector(".template-popup");document.body.classList.add("overflow-hidden"),this.setAttribute("open",""),popup&&popup.loadContent(),setTimeout(()=>{const firstFocusableElement=this.querySelector('a, input, button, [tabindex]:not([tabindex="-1"])');trapFocus(this,firstFocusableElement)},300)}hide(){this.setAttribute("closing","true"),setTimeout(()=>{document.body.classList.remove("overflow-hidden"),document.body.dispatchEvent(new CustomEvent("modalClosed")),this.removeAttribute("open"),this.removeAttribute("closing"),removeTrapFocus(this.openedBy)},300)}}customElements.define("modal-dialog",ModalDialog);class ModalOpener extends HTMLElement{constructor(){super();const button=this.querySelector("button");button&&button.addEventListener("click",()=>{const modal=document.querySelector(this.getAttribute("data-modal"));modal&&modal.show(button)})}}customElements.define("modal-opener",ModalOpener);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()}}}customElements.define("deferred-media",DeferredMedia);class VariantSelects extends HTMLElement{constructor(){super(),this.addEventListener("change",this.onVariantChange)}connectedCallback(){this.getVariantData()}onVariantChange(event){this.updateOptions(),this.updateMasterId(),this.updateSelectedSwatchValue(event),this.toggleAddButton(!0,"",!1),this.toggleStickyAddButton(!0,"",!1),this.updatePickupAvailability(),this.removeErrorMessage(),this.updateV
1ariantStatuses(),this.updateVariantText(),this.currentVariant?(this.updateURL(),this.updateVariantInput(),this.renderProductInfo(),this.updateShareUrl(),this.updateCarousel()):(this.toggleAddButton(!0,"",!0),this.toggleStickyAddButton(!0,"",!0),this.setUnavailable())}updateCarousel(){const updateCarouselForElement=element=>{element&&this.currentVariant.featured_media&&element.updateCarouselImages(this.currentVariant.featured_media.id)},galleryCarousel=document.getElementById(`Gallery-carousel-${this.dataset.section}`);updateCarouselForElement(galleryCarousel);const quickViewContainer=document.querySelector(".product-modal-content");if(quickViewContainer){const galleryCarouselQuickView=quickViewContainer.querySelector(`#Gallery-carousel-${this.dataset.section}`);updateCarouselForElement(galleryCarouselQuickView)}}updateOptions(){this.options=Array.from(this.querySelectorAll("select, fieldset"),element=>{if(element.tagName==="SELECT")return element.value;if(element.tagName==="FIELDSET")return Array.from(element.querySelectorAll("input")).find(radio=>radio.checked)?.value})}updateVariantText(){this.querySelectorAll(".product-form__input").forEach((item,i)=>item.querySelector(".form__label-value").innerHTML=this.options[i])}updateMasterId(){this.currentVariant=this.getVariantData().find(variant=>!variant.options.map((option,index)=>this.options[index]===option).includes(!1))}updateSelectedSwatchValue({target}){const{name,value,tagName}=target;if(tagName==="SELECT"&&target.selectedOptions.length){const swatchValue=target.selectedOptions[0].dataset.optionSwatchValue,selectedDropdownSwatchValue=this.querySelector(`[data-selected-dropdown-swatch="${name}"] > .swatch`);if(!selectedDropdownSwatchValue)return;swatchValue?(selectedDropdownSwatchValue.style.setProperty("--swatch--background",swatchValue),selectedDropdownSwatchValue.classList.remove("swatch--unavailable")):(selectedDropdownSwatchValue.style.setProperty("--swatch--background","unset"),selectedDropdownSwatchValue.classList.add("swatch--unavailable")),selectedDropdownSwatchValue.style.setProperty("--swatch-focal-point",target.selectedOptions[0].dataset.optionSwatchFocalPoint||"unset")}else if(tagName==="INPUT"&&target.type==="radio"){const selectedSwatchValue=this.querySelector(`[data-selected-swatch-value="${name}"]`);selectedSwatchValue&&(selectedSwatchValue.innerHTML=value)}}updateURL(){!this.currentVariant||this.dataset.updateUrl==="false"||window.history.replaceState({},"",`${this.dataset.url}?variant=${this.currentVariant.id}`)}updateShareUrl(){const shareButton=document.getElementById(`Share-${this.dataset.section}`);shareButton&&shareButton.setAttribute("data-url",`${window.shopUrl}${this.dataset.url}?variant=${this.currentVariant.id}`)}updateVariantInput(){document.querySelectorAll(`#product-form-${this.dataset.section}, #product-form-installment-${this.dataset.section}`).forEach(productForm=>{const input=productForm.querySelector('input[name="id"]');input.value=this.currentVariant.id,input.dispatchEvent(new Event("change",{bubbles:!0}))})}updateVariantStatuses(){const selectedOptionOneVariants=this.variantData.filter(variant=>this.querySelector(":checked").value===variant.option1),inputWrappers=[...this.querySelectorAll(".product-form__input")];inputWrappers.forEach((option,index)=>{if(index===0)return;const optionInputs=[...option.querySelectorAll('input[type="radio"], option')],previousOptionSelected=inputWrappers[index-1].querySelector(":checked").value,availableOptionInputsValue=selectedOptionOneVariants.filter(variant=>variant.available&&variant[`option${index}`]===previousOptionSelected).map(variantOption=>variantOption[`option${index+1}`]);this.setInputAvailability(optionInputs,availableOptionInputsValue)})}setInputAvailability(elementList,availableValuesList){elementList.forEach(element=>{const value=element.getAttribute("value"),availableElement=availableValuesList.includes(value);element.tagName==="INPUT"?element.classList.toggle("disabled",!availableElement):element.tagName==="OPTION"&&(element.innerText=availableElement?value:window.variantStrings.unavailable_with_option.replace("[value]",value))})}updatePickupAvailability(){const pickUpAvailability=document.querySelector("pickup-availability");pickUpAvailability&&(this.currentVariant&&this.currentVariant.available?pickUpAvailability.fetchAvailability(this.currentVariant.id):(pickUpAvailability.removeAttribute("available"),pickUpAvailability.innerHTML=""))}removeErrorMessage(){const section=this.closest("section");if(!section)return;const productForm=section.querySelector("product-form");productForm&&productForm.handleErrorMessage()}renderProductInfo(){const requestedVariantId=this.currentVariant.id,sectionId=this.dataset.originalSection?this.dataset.originalSection:this.dataset.section;fetch(`${this.dataset.url}?variant=${requestedVariantId}§ion_id=${this.dataset.originalSection?this.dataset.originalSection:this.dataset.section}`).then(response=>response.text()).then(responseText=>{if(!this.currentVariant||this.currentVariant.id!==requestedVariantId)return;const html=new DOMParser().parseFromString(responseText,"text/html"),destination=document.getElementById(`price-${this.dataset.section}`),source=html.getElementById(`price-${this.dataset.originalSection?this.dataset.originalSection:this.dataset.section}`),skuSource=html.getElementById(`Sku-${this.dataset.originalSection?this.dataset.originalSection:this.dataset.section}`),skuDestination=document.getElementById(`Sku-${this.dataset.section}`),inventorySource=html.getElementById(`Inventory-${this.dataset.originalSection?this.dataset.originalSection:this.dataset.section}`),inventoryDestination=document.getElementById(`Inventory-${this.dataset.section}`),volumePricingSource=html.getElementById(`Volume-${this.dataset.originalSection?this.dataset.originalSection:this.dataset.section}`);this.updateStickyImage(sectionId,html),this.updateStickyPrice(sectionId,html);const pricePerItemDestination=document.getElementById(`Price-Per-Item-${this.dataset.section}`),pricePerItemSource=html.getElementById(`Price-Per-Item-${this.dataset.originalSection?this.dataset.originalSection:this.dataset.section}`),volumePricingDestination=document.getElementById(`Volume-${this.dataset.section}`),qtyRules=document.getElementById(`Quantity-Rules-${this.dataset.section}`),volumeNote=document.getElementById(`Volume-Note-${this.dataset.section}`);volumeNote&&volumeNote.classList.remove("hidden"),volumePricingDestination&&volumePricingDestination.classList.remove("hidden"),qtyRules&&qtyRules.classList.remove("hidden"),source&&destination&&(destination.innerHTML=source.innerHTML),inventorySource&&inventoryDestination&&(inventoryDestination.innerHTML=inventorySource.innerHTML),skuSource&&skuDestination&&(skuDestination.innerHTML=skuSource.innerHTML,skuDestination.classList.toggle("hidden",skuSource.classList.contains("hidden"))),volumePricingSource&&volumePricingDestination&&(volumePricingDestination.innerHTML=volumePricingSource.innerHTML),pricePerItemSource&&pricePerItemDestination&&(pricePerItemDestination.innerHTML=pricePerItemSource.innerHTML,pricePerItemDestination.classList.toggle("hidden",pricePerItemSource.classList.contains("hidden")));const price=document.getElementById(`price-${this.dataset.section}`);price&&price.classList.remove("hidden"),inventoryDestination&&inventoryDestination.classList.toggle("hidden",inventorySource.innerText==="");const addButtonUpdated=html.getElementById(`ProductSubmitButton-${sectionId}`);this.toggleAddButton(addButtonUpdated?addButtonUpdated.hasAttribute("disabled"):!0,window.variantStrings.soldOut);const stickyAddButtonUpdated=html.getElementById(`StickyProductSubmitButton-${sectionId}`);this.toggleStickyAddButton(stickyAddButtonUpdated?stickyAddButtonUpdated.hasAttribute("disabled"):!0,window.variantStrings.soldOut),publish(PUB_SUB_EVENTS.variantChange,{data:{sectionId,html,variant:this.currentVariant}})})}toggleAddButton(disable=!0,text,modifyClass=!0){const productForm=d
1ocument.getElementById(`product-form-${this.dataset.section}`);if(!productForm)return;const addButton=productForm.querySelector('[name="add"]'),addButtonText=productForm.querySelector('[name="add"] > span');addButton&&(disable?(addButton.setAttribute("disabled","disabled"),text&&(addButtonText.textContent=text)):(addButton.removeAttribute("disabled"),addButtonText.textContent=addButton.hasAttribute("data-preorder")?window.variantStrings.preOrder:window.variantStrings.addToCart))}toggleStickyAddButton(disable=!0,text,modifyClass=!0){const stickyProductForm=document.getElementById(`sticky-atc-${this.dataset.section}`);if(!stickyProductForm)return;const stickyAddButton=stickyProductForm.querySelector('[name="add"]'),stickyAddButtonText=stickyAddButton.querySelector('[name="add"] > span');stickyAddButton&&(disable?(stickyAddButton.setAttribute("disabled","disabled"),text&&(stickyAddButtonText.textContent=text)):(stickyAddButton.removeAttribute("disabled"),stickyAddButtonText.textContent=stickyAddButton.hasAttribute("data-preorder")?window.variantStrings.preOrder:window.variantStrings.addToCart))}updateStickyPrice(sectionId,html){const stickyPriceSourceId=`price-${sectionId}-sticky`,stickyPriceDestinationId=`price-${sectionId}-sticky`,source=html.getElementById(stickyPriceSourceId),destination=document.getElementById(stickyPriceDestinationId);source&&destination&&(destination.innerHTML=source.innerHTML,destination.classList.toggle("hidden",source.classList.contains("hidden")));const price=document.getElementById(`price-${sectionId}-sticky`);price&&price.classList.remove("hidden")}updateStickyImage(sectionId,html){const sourceImage=html.getElementById(`image-${sectionId}-sticky`),destinationImage=document.getElementById(`image-${sectionId}-sticky`);sourceImage&&destinationImage&&(destinationImage.src=sourceImage.src,destinationImage.srcset=sourceImage.srcset,destinationImage.sizes=sourceImage.sizes)}setUnavailable(){const button=document.getElementById(`product-form-${this.dataset.section}`),addButton=button.querySelector('[name="add"]'),addButtonText=button.querySelector('[name="add"] > span'),buttonSticky=document.getElementById(`sticky-atc-${this.dataset.section}`),addButtonSticky=buttonSticky?.querySelector('[name="add"]'),addButtonTextSticky=buttonSticky?.querySelector('[name="add"] > span'),price=document.getElementById(`price-${this.dataset.section}`),priceSticky=document.getElementById(`price-${this.dataset.section}-sticky`),inventory=document.getElementById(`Inventory-${this.dataset.section}`),sku=document.getElementById(`Sku-${this.dataset.section}`),pricePerItem=document.getElementById(`Price-Per-Item-${this.dataset.section}`),volumeNote=document.getElementById(`Volume-Note-${this.dataset.section}`),volumeTable=document.getElementById(`Volume-${this.dataset.section}`),qtyRules=document.getElementById(`Quantity-Rules-${this.dataset.section}`);addButton&&addButtonText&&(addButtonText.textContent=window.variantStrings.unavailable),addButtonSticky&&addButtonTextSticky&&(addButtonTextSticky.textContent=window.variantStrings.unavailable),price&&price.classList.add("hidden"),priceSticky&&priceSticky.classList.add("hidden"),inventory&&inventory.classList.add("hidden"),sku&&sku.classList.add("hidden"),pricePerItem&&pricePerItem.classList.add("hidden"),volumeNote&&volumeNote.classList.add("hidden"),volumeTable&&volumeTable.classList.add("hidden"),qtyRules&&qtyRules.classList.add("hidden")}getVariantData(){return this.variantData=this.variantData||JSON.parse(this.querySelector('[type="application/json"]').textContent),this.variantData}}customElements.define("variant-selects",VariantSelects);class AccountIcon extends HTMLElement{constructor(){super(),this.icon=this.querySelector(".icon")}connectedCallback(){document.addEventListener("storefront:signincompleted",this.handleStorefrontSignInCompleted.bind(this))}handleStorefrontSignInCompleted(event){event?.detail?.avatar&&this.icon?.replaceWith(event.detail.avatar.cloneNode())}}customElements.define("account-icon",AccountIcon);var dispatchCustomEvent=function(eventName){var data=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}
1,detail={detail:data},event=new CustomEvent(eventName,data?detail:null);document.dispatchEvent(event)};const setScrollbarWidth=()=>{const scrollbarWidth=window.innerWidth-document.body.clientWidth;scrollbarWidth>0&&document.documentElement.style.setProperty("--scrollbar-width",`${scrollbarWidth}px`)};setScrollbarWidth(),window.addEventListener("resize",throttle(setScrollbarWidth));class ResponsiveImage extends HTMLElement{constructor(){super(),this.handleIntersection=this.handleIntersection.bind(this),this.onImageLoad=this.onImageLoad.bind(this),this.intersectionObserver=new IntersectionObserver(this.handleIntersection,{rootMargin:"10px",threshold:0})}connectedCallback(){this.img=this.querySelector("img"),this.img&&(this.img.addEventListener("load",this.onImageLoad),this.img.classList.add("img-loading"),this.img.hasAttribute("srcset")&&(this.originalSrcset=this.img.getAttribute("srcset"),this.img.removeAttribute("srcset"),this.intersectionObserver.observe(this.img)))}disconnectedCallback(){this.img&&(this.img.removeEventListener("load",this.onImageLoad),this.intersectionObserver.unobserve(this.img),this.intersectionObserver.disconnect())}onImageLoad(){this.img.classList.remove("img-loading"),this.img.classList.add("img-loaded")}handleIntersection(entries){entries.forEach(entry=>{if(entry.isIntersecting){const img=entry.target;img.setAttribute("srcset",this.originalSrcset),this.intersectionObserver.unobserve(img)}})}}if(customElements.define("responsive-image",ResponsiveImage),!customElements.get("splide-carousel")){class SplideCarousel extends HTMLElement{constructor(){super(),this.slideInstance=null,this.isUserInteracting=!1}connectedCallback(){if(!this.slideInstance){const splideElement=this.querySelector(".splide"),options=splideElement.getAttribute("data-splide");if(options)try{const parsedOptions=JSON.parse(options);this.slideInstance=new Splide(splideElement,parsedOptions),setTimeout(()=>this.initializeProgressBar(),300),this.slideInstance.mount()}catch(e){console.error("Failed to initialize Splide carousel:",e)}Shopify.designMode&&this.addShopifyEventListeners()}}disconnectedCallback(){Shopify.designMode&&this.removeShopifyEventListeners()}addShopifyEventListeners(){this.handleBlockSelect=this.handleBlockSelect.bind(this),this.handleBlockDeselect=this.handleBlockDeselect.bind(this),document.addEventListener("shopify:block:select",this.handleBlockSelect),document.addEventListener("shopify:block:deselect",this.handleBlockDeselect)}removeShopifyEventListeners(){document.removeEventListener("shopify:block:select",this.handleBlockSelect),document.removeEventListener("shopify:block:deselect",this.handleBlockDeselect)}handleBlockSelect(event){const blockElement=event.target;if(blockElement.closest("splide-carousel")===this&&this.slideInstance){const index=parseInt(blockElement.getAttribute("data-splide-index"));isNaN(index)||(this.slideInstance.go(index),this.isUserInteracting=!0,this.slideInstance.Components.Autoplay.pause())}}handleBlockDeselect(event){event.target.closest("splide-carousel")===this&&this.slideInstance&&(this.isUserInteracting=!1)}initializeProgressBar(){const bar=this.querySelector(".splide-carousel-progress-bar");if(bar&&this.slideInstance){const updateProgressBar=()=>{requestAnimationFrame(()=>{const end=this.slideInstance.Components.Controller.getEnd()+1,rate=Math.min((this.slideInstance.index+1)/end,1);bar.style.width=`${100*rate}%`})};updateProgressBar(),this.slideInstance.on("mounted move",updateProgressBar),this.slideInstance.on("destroy",()=>{this.slideInstance.off("mounted move",updateProgressBar)})}}}customElements.define("splide-carousel",SplideCarousel)}if(!customElements.get("slide-show")){class Slideshow extends HTMLElement{constructor(){super(),this.slideInstance=null,this.videoStates=new Map}connectedCallback(){this.init(),Shopify&&Shopify.designMode&&(document.addEventListener("shopify:block:select",this.handleBlockSelect.bind(this)),document.addEventListener("shopify:block:deselect",this.handleBlockDeselect.bind(this)))}init(){const options=this.getAttribute("data-splide");if(options){const parsedOptions=JSON.parse(options);this.slideInstance=new Splide(this,parsedOptions),this.getAttribute("data-pagination")==="numbers"&&this.slideInstance.on("pagination:mounted",this.customizePagination),this.slideInstance.mount(),this.slideInstance.on("moved",this.handleVideoPlayback.bind(this)),this.slideInstance.on("moved",this.updateSlideCounter.bind(this)),this.slideInstance.on("moved",this.handleFirstSlide.bind(this)),this.updateSlideCounter(this.slideInstance.index)}}handleFirstSlide(){this.slideInstance.Components.Elements.slides.forEac
1h(slide=>{slide.classList.remove("first-slide")})}handleVideoPlayback(){this.slideInstance.Components.Elements.slides.forEach(slide=>{const video=slide.querySelector("video");video&&(video.muted=!0,slide.classList.contains("is-active")?video.play():video.pause())})}updateSlideCounter(newIndex){const totalSlides=this.slideInstance.length,currentSlideElement=this.querySelector(".current-slide"),totalSlidesElement=this.querySelector(".total-slides");currentSlideElement&&totalSlidesElement&&(totalSlidesElement.textContent=totalSlides,currentSlideElement.textContent=newIndex+1)}customizePagination(data){data.list.classList.add("splide__pagination--custom"),data.items.forEach(item=>{item.button.textContent=String(item.page+1).padStart(2,"0")})}handleBlockSelect(event){const blockElement=event.target,carouselElement=blockElement.closest("slide-show");if(carouselElement&&carouselElement.slideInstance){const index=parseInt(blockElement.getAttribute("data-splide-index"));isNaN(index)||(carouselElement.slideInstance.go(index),carouselElement.isUserInteracting=!0,carouselElement.slideInstance.Components.Autoplay.pause())}}handleBlockDeselect(event){const carouselElement=event.target.closest("slide-show");carouselElement&&carouselElement.slideInstance&&(carouselElement.isUserInteracting=!1)}}customElements.define("slide-show",Slideshow)}if(!customElements.get("async-carousel")){class AsyncCarousel extends HTMLElement{constructor(){super(),this.slideInstance=null,this.thumbnailInstance=null,this.isUserInteracting=!1,this.thumbnails=null,this.currentThumbnail=null}connectedCallback(){this.initCarousel()}initCarousel(){const mainSlider=this.querySelector('[data-slider="main"]'),thumbnailSlider=this.querySelector('[data-slider="thumbnail"]');if(mainSlider){const mainOptions=JSON.parse(mainSlider.getAttribute("data-splide")||"{}");if(this.slideInstance=new Splide(mainSlider,mainOptions),thumbnailSlider){const thumbnailOptions=JSON.parse(thumbnailSlider.getAttribute("data-splide")||"{}");this.thumbnailInstance=new Splide(thumbnailSlider,thumbnailOptions),this.slideInstance.sync(this.thumbnailInstance),this.updateThumbnailARIA(thumbnailSlider)}this.slideInstance.mount(),this.thumbnailInstance&&this.thumbnailInstance.mount(),setTimeout(()=>this.initializeProgressBar(),300),this.initThumbnails(),this.addShopifyEventListeners()}}disconnectedCallback(){Shopify.designMode&&this.removeShopifyEventListeners()}addShopifyEventListeners(){Shopify.designMode&&(document.addEventListener("shopify:block:select",this.handleBlockSelect.bind(this)),document.addEventListener("shopify:block:deselect",this.handleBlockDeselect.bind(this)))}removeShopifyEventListeners(){document.removeEventListener("shopify:block:select",this.handleBlockSelect.bind(this)),document.removeEventListener("shopify:block:deselect",this.handleBlockDeselect.bind(this))}handleBlockSelect(event){const blockElement=event.target,index=parseInt(blockElement.getAttribute("data-splide-index"));!isNaN(index)&&this.slideInstance&&(this.slideInstance.go(index),this.isUserInteracting=!0,this.slideInstance.Components.Autoplay.pause())}handleBlockDeselect(){this.isUserInteracting=!1}initThumbnails(){this.thumbnails=this.querySelectorAll(".thumbnail-item"),this.thumbnails.forEach((thumbnail,index)=>{thumbnail.addEventListener("click",()=>{this.slideInstance.go(index)})}),this.slideInstance.on("mounted move",()=>{const thumbnail=this.thumbnails[this.slideInstance.index];thumbnail&&(this.currentThumbnail&&this.currentThumbnail.classList.remove("is-active"),thumbnail.classList.add("is-active"),this.currentThumbnail=thumbnail)})}initializeProgressBar(){const bar=this.querySelector(".splide-carousel-progress-bar");if(bar&&this.slideInstance){const updateProgressBar=()=>{const end=this.slideInstance.Components.Controller.getEnd()+1,rate=Math.min((this.slideInstance.index+1)/end,1);bar.style.width=`${100*rate}%`};updateProgressBar(),this.slideInstance.on("mounted move",updateProgressBar)}}updateThumbnailARIA(thumbnailSlider){thumbnailSlider.querySelectorAll(".splide__slide").forEach(thumbnailItem=>{thumbnailItem.setAttribute("role","group")})}}customElements.define("async-carousel",AsyncCarousel)}
1if(!customElements.get("gallery-carousel")){class GalleryCarousel extends HTMLElement{constructor(){super(),this.main=null,this.thumbnails=null}connectedCallback(){const mainCarousel=this.querySelector('[id^="Main-Carousel"]'),thumbnailCarousel=this.querySelector('[id^="Thumbnail-Carousel"]');if(!mainCarousel||!thumbnailCarousel){console.error("Main or thumbnail carousel element not found.");return}const mainOptions=this.getCarouselOptions(mainCarousel),thumbnailOptions=this.getCarouselOptions(thumbnailCarousel),initialSlideIndex=this.getInitialSlideIndex();mainOptions.start=initialSlideIndex,thumbnailOptions.start=initialSlideIndex,this.initializeCarousels(mainCarousel,mainOptions,thumbnailCarousel,thumbnailOptions),this.addEventListeners(),this.updateMainCarousel()}getCarouselOptions(carouselElement){return JSON.parse(carouselElement.getAttribute("data-splide")||"{}")}getInitialSlideIndex(){const selectedThumbnailSlide=this.querySelector('.thumbnail-carousel .splide__slide[data-selected="true"]');return selectedThumbnailSlide?Array.from(this.querySelectorAll(".thumbnail-carousel .splide__slide")).indexOf(selectedThumbnailSlide):0}initializeCarousels(mainCarousel,mainOptions,thumbnailCarousel,thumbnailOptions){this.main=new Splide(mainCarousel,mainOptions),this.thumbnails=new Splide(thumbnailCarousel,thumbnailOptions),thumbnailCarousel.getAttribute("data-thumbnail")==="vertical"&&(this.thumbnails.on("mounted",()=>{const thumbnailList=thumbnailCarousel.querySelector(".splide__list");thumbnailList&&thumbnailList.setAttribute("role","tablist")}),this.thumbnails.on("mounted",this.updateThumbnailARIA.bind(this))),this.thumbnails.mount(),this.main.sync(this.thumbnails),this.main.mount(),this.main.on("moved",this.updateSlideCounter.bind(this)),this.updateSlideCounter(this.main.index)}addEventListeners(){this.main.on("inactive",this.handleInactiveSlide.bind(this)),this.main.on("active",this.handleMainActiveSlide.bind(this)),this.thumbnails.on("active",this.handleThumbnailActiveSlide.bind(this))}updateSlideCounter(newIndex){const totalSlides=this.main.length,currentSlideElement=this.querySelector(".current-slide"),totalSlidesElement=this.querySelector(".total-slides");currentSlideElement&&totalSlidesElement&&(totalSlidesElement.textContent=totalSlides,currentSlideElement.textContent=newIndex+1)}handleInactiveSlide(oldSlide){const inactiveSlide=this.main.Components.Elements.slides[oldSlide.index];this.pauseYouTubeVideo(inactiveSlide)}handleMainActiveSlide(newSlide){window.pauseAllMedia();const activeSlide=this.main.Components.Elements.slides[newSlide.index];this.handleActiveSlide(activeSlide);const hasProductModel=activeSlide.querySelector("product-model")!==null;this.main.Components.Drag.disable(hasProductModel)}handleThumbnailActiveSlide(newSlide){window.pauseAllMedia();const target=this.thumbnails.Components.Elements.slides[newSlide.index].getAttribute("data-target"),activeSlide=Array.from(this.main.Components.Elements.slides).find(slide=>slide.getAttribute("data-media-id")===target);this.handleActiveSlide(activeSlide)}handleActiveSlide(slide){slide&&!slide.dataset.played&&this.getAttribute("data-autoplay")==="true"&&(this.playActiveMedia(slide),slide.dataset.played=!0)}playActiveMedia(activeSlide){const deferredMedia=activeSlide.querySelector(".deferred-media");deferredMedia&&deferredMedia.loadContent(!1)}pauseYouTubeVideo(slide){const iframe=slide.querySelector("iframe");iframe&&iframe.src.includes("youtube.com")&&(iframe.src=iframe.src.replace("autoplay=1","autoplay=0"))}updateCarouselImages(mediaId){if(!this.main)return;const mainSlides=this.main.Components.Elements.slides,mainSlide=mainSlides.find(slide=>slide.getAttribute("data-media-id")===mediaId.toString());if(mainSlide){const mainIndex=mainSlides.indexOf(mainSlide);this.main.go(mainIndex)}if(this.hasAttribute("desktop-grid")){const galleryListsContainer=this.querySelector(".splide__gallery");galleryListsContainer&&galleryListsContainer.querySelectorAll(".splide__slide").forEach(item=>{if(item.getAttribute("data-media-id")===mediaId.toString()){const headerOffset=document.querySelector(".header").offsetHeight+16,offsetPosition=item.getBoundingClientRect().top+window.pageYOffset-headerOffset;window.scrollTo({top:offsetPosition,behavior:"smooth"})}})}}updateMainCarousel(){if(!this.main||!this.thumbnails)return;const mainSlides=this.main.Components.Elements.slides,thumbnailSlides=this.thumbnails.Components.Elements.slides,selectedThumbnailSlide=Array.from(thumbnailSlides).find(slide=>slide.getAttribute("data-selected")==="true");if(selectedThumbnailSlide){const selectedIndex=Array.from(thumbnailSlides).indexOf(selectedThumbnailSlide);selectedIndex!==-1&&selectedIndex<mainSlides.length&&this.main.go(selectedIndex,!0)}}updateThumbnailARIA(){this.thumbnails.Components.Elements.list.querySelectorAll(".splide__slide").forEach((thumbn
1ailItem,index)=>{thumbnailItem.setAttribute("role","tab")})}}customElements.define("gallery-carousel",GalleryCarousel)}if(!customElements.get("product-recommendations")){class ProductRecommendations extends HTMLElement{constructor(){super()}connectedCallback(){this.fetchProducts()}fetchProducts(){fetch(this.dataset.url).then(response=>response.text()).then(text=>{const recommendations=new DOMParser().parseFromString(text,"text/html").querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML,this.querySelectorAll("splide-carousel").length>0&&this.initCarousels()),this.classList.add("product-recommendations--loaded")}).catch(e=>{console.error(e)})}initCarousels(){this.querySelectorAll("splide-carousel").forEach(carousel=>{typeof carousel.connectedCallback=="function"&&carousel.connectedCallback()})}}customElements.define("product-recommendations",ProductRecommendations)}class ComponentDrawer extends HTMLElement{constructor(){super(),this.overlay=this.querySelector(".drawer-overlay"),this.drawer=this.querySelector(".drawer-content"),this.closeButton=this.querySelector(".close-drawer-btn"),this.triggerButton=null,this.overlay.addEventListener("click",()=>this.close()),this.closeButton.addEventListener("click",()=>this.close()),this.handleKeyPress=this.handleKeyPress.bind(this),this.trapFocus=this.trapFocus.bind(this)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("keydown",this.handleKeyPress)}disconnectedCallback(){document.removeEventListener("keydown",this.handleKeyPress),document.removeEventListener("focus",this.trapFocus,!0)}open(triggerButton){this.triggerButton=triggerButton,this.setAttribute("open",""),document.body.classList.add("overflow-hidden"),this.drawer.setAttribute("aria-hidden","false"),this.closeButton.focus(),document.addEventListener("focus",this.trapFocus,!0)}close(){this.removeAttribute("open"),document.body.classList.remove("overflow-hidden"),this.drawer.setAttribute("aria-hidden","true"),document.removeEventListener("focus",this.trapFocus,!0),this.triggerButton&&(this.triggerButton.focus(),this.triggerButton=null)}handleKeyPress(event){event.key==="Escape"&&this.close()}trapFocus(event){this.contains(event.target)||(event.stopPropagation(),this.closeButton.focus())}static get observedAttributes(){return["open"]}}customElements.define("component-drawer",ComponentDrawer);class SearchDrawer extends ComponentDrawer{constructor(){super(),this.predictiveSearch=this.querySelector("predictive-search"),this.openTransitionEndHandler=this.openTransitionEndHandler.bind(this)}open(triggerButton){this.triggerButton=triggerButton,this.setAttribute("open",""),document.body.classList.add("overflow-hidden"),this.drawer.setAttribute("aria-hidden","false"),this.addEventListener("transitionend",this.openTransitionEndHandler),document.addEventListener("focus",this.trapFocus,!0)}openTransitionEndHandler(event){event.target===this.overlay&&(this.removeEventListener("transitionend",this.openTransitionEndHandler),setTimeout(()=>{const focusElement=this.predictiveSearch.querySelector('input:not([type="hidden"])');focusElement&&typeof focusElement.focus=="function"&&focusElement.focus()},100))}close(){const inputElement=this.predictiveSearch.querySelector('input:not([type="hidden"])');inputElement&&(inputElement.value=""),this.predictiveSearch.hasAttribute("open")&&this.predictiveSearch.removeAttribute("open"),this.predictiveSearch.setAttribute("results","false"),super.close()}}customElements.define("search-drawer",SearchDrawer);class DrawerButton extends HTMLElement{constructor(){super(),this.handleClick=this.handleClick.bind(this),this.handleKeyPress=this.handleKeyPress.bind(this)}connectedCallback(){this.targetId=this.getAttribute("data-target"),this.targetDrawer=document.getElementById(this.targetId),this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.targetDrawer?(this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyPress)):console.warn(`Drawer element with ID '${this.targetId}' does not exist.`)}disconnectedCallback(){this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyPress)}handleKeyPress(event){(event.key==="Enter"||event.key===" ")&&(event.preventDefault(),this.handleClick())}handleClick(){this.targetDrawer&&typeof this.targetDrawer.open=="function"&&this.targetDrawer.open(this)}}customElements.define("drawer-button",DrawerButton);class ModalTrigger extends DrawerButton{constructor(){super()}handleClick(){this.targetDrawer&&this.targetDrawer instanceof ModalDrawer&&this.targetDrawer.open()}}customElements.define("modal-trigger",ModalTrigger);class ModalDrawer extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=` 2 <style> 3 :host { 4 position: fixed; 5 top: 0; 6 left: 0; 7 width: 100%; 8 height: 100%; 9 display: none; 10 z-index: 1000; 11 } 12 13 :host([open]) { 14 display: block; 15 } 16
17 .modal-drawer-overlay { 18 position: fixed; 19 top: 0; 20 left: 0; 21 width: 100%; 22 height: 100%; 23 background: rgba(0, 0, 0, 0.3); 24 backdrop-filter: blur(1px); 25 opacity: 0; 26 transition: opacity var(--duration-medium, 0.3s) ease; 27 pointer-events: none; 28 } 29 30 :host([open]) .modal-drawer-overlay { 31 opacity: 1; 32 pointer-events: auto; 33 } 34 35 .modal-drawer__content { 36 position: fixed; 37 bottom: 0; 38 left: 0; 39 width: 100%; 40 background: rgb(var(--color-drawer-background)); 41 transform: translateY(100%); 42 transition: transform var(--duration-medium, 0.3s) ease; 43 z-index: 1001; 44 padding: 30px; 45 box-sizing: border-box; 46 } 47 48 :host([open]) .modal-drawer__content { 49 transform: translateY(0); 50 } 51 52 @media (max-width: 768px) { 53 .modal-drawer__content { 54 padding: 20px 20px 30px 20px; 55 } 56 } 57 </style> 58 <div class="modal-drawer-overlay"></div> 59 <div class="modal-drawer__content"> 60 <slot></slot> 61 </div> 62 `,this.handleKeyDown=this.handleKeyDown.bind(this)}connectedCallback(){this.overlay=this.shadowRoot.querySelector(".modal-drawer-overlay"),this.content=this.shadowRoot.querySelector(".modal-drawer__content"),this.closeButtons=this.querySelectorAll(".close-modal-drawer"),this.setAttribute("role","dialog"),this.setAttribute("aria-modal","true"),this.overlay.addEventListener("click",()=>this.close()),this.closeButtons.forEach(button=>button.addEventListener("click",()=>this.close())),this.hasAttribute("open")?this.open():this.close()}open(){this.style.display="block",requestAnimationFrame(()=>{setTimeout(()=>{this.setAttribute("open",""),document.addEventListener("keydown",this.handleKeyDown),document.body.style.overflow="hidden"},10)})}close(){this.removeAttribute("open"),document.removeEventListener("keydown",this.handleKeyDown),document.body.style.overflow="",setTimeout(()=>{this.style.display="none"},300)}handleKeyDown(event){event.key==="Escape"&&this.close()}static get observedAttributes(){return["open"]}}if(customElements.define("modal-drawer",ModalDrawer),!customElements.get("quick-view")){class QuickView extends HTMLElement{constructor(){super(),this.initElements(),this.bindEvents()}initElements(){const modal=document.getElementById("product-modal");this.elements={overlay:document.querySelector(".product-quick-view-overlay"),modal,body:document.body,closeButton:modal.querySelector(".product-modal-close"),modalContent:modal.querySelector("#product-modal-content")}}bindEvents(){const{overlay,closeButton,modal}=this.elements;this.addEventListener("click",this.onQuickViewClick.bind(this)),this.addEventListener("keydown",this.onQuickViewKeydown.bind(this)),overlay.addEventListener("click",this.closeQuickView.bind(this)),closeButton?.addEventListener("click",this.closeQuickView.bind(this)),modal.addEventListener("transitionend",this.onTransitionEnd.bind(this)),document.addEventListener("keydown",this.onKeyDown.bind(this))}onKeyDown(event){event.key==="Escape"&&this.elements.modal.classList.contains("active")&&this.closeQuickView()}onQuickViewKeydown(event){(event.key==="Enter"||event.key===" ")&&(event.preventDefault(),this.onQuickViewClick(event))}trapFocus(event){if(event.key==="Tab"){const focusableContent=this.elements.modal.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),firstFocusableElement=focusableContent[0],lastFocusableElement=focusableContent[focusableContent.length-1];event.shiftKey?document.activeElement===firstFocusableElement&&(event.preventDefault(),lastFocusableElement.focus()):document.activeElement===lastFocusableElement&&(event.preventDefault(),firstFocusableElement.focus())}}onTransitionEnd(){this.elements.modal.classList.contains("active")||(this.elements.modalContent.innerHTML="")}async onQuickViewClick(event){event.preventDefault();const productHandle=this.dataset.productHandle,href=this.buildProductUrl(productHandle);if(!(!href||!productHandle||this.classList.contains("loading"))){this.classList.add("loading");try{const content=await this.fetchProductContent(href);this.renderQuickView(content,href,productHandle)}finally{this.classList.remove("loading")}}}buildProductUrl(productHandle){return`${theme.routes.root_url}/products/${productHandle}?view=quick-view`.replace("//","/")}async fetchProductContent(url){const text=await(await fetch(url)).text();return new DOMParser().parseFromString(text,"text/html").querySelector("#product-modal-content").innerHTML}renderQuickView(content,url,productHandle){content&&(this.elements.modalContent.innerHTML=content,this.loadJavaScriptFiles(),this.initializeShopifyComponents(),this.setupProductForm(
62),this.openQuickView(),this.dispatchQuickViewOpenEvent(url,productHandle))}loadJavaScriptFiles(){const scripts=this.elements.modalContent.querySelectorAll("script"),head=document.head;scripts.forEach(({src})=>{const script=document.createElement("script");script.src=src,head.appendChild(script)})}initializeShopifyComponents(){setTimeout(()=>{Shopify?.PaymentButton&&Shopify.PaymentButton.init(),window.ProductModel&&window.ProductModel.loadShopifyXR()},100)}setupProductForm(){const productForm=this.elements.modalContent.querySelector("product-form");if(productForm){const form=productForm.querySelector("form"),submitButton=form.querySelector('[type="submit"]');if(productForm.onSubmitHandler){const originalOnSubmitHandler=productForm.onSubmitHandler;productForm.onSubmitHandler=async evt=>{evt.preventDefault();try{await originalOnSubmitHandler.call(productForm,evt),this.observeSubmitButton(submitButton)}catch(error){console.error("Error in product form submission:",error)}},form.addEventListener("submit",productForm.onSubmitHandler.bind(productForm))}else console.warn("onSubmitHandler is not defined on the productForm")}}observeSubmitButton(submitButton){const observer=new MutationObserver(mutations=>{mutations.forEach(mutation=>{if(mutation.type==="attributes"&&mutation.attributeName==="class"&&!submitButton.classList.contains("loading")){observer.disconnect();const productForm=this.elements.modalContent.querySelector("product-form");productForm&&!productForm.error&&this.closeQuickView()}})});observer.observe(submitButton,{attributes:!0})}openQuickView(){const{body,modal,closeButton}=this.elements;body.classList.add("quickview-open"),modal.classList.add("active"),closeButton?.focus(),document.addEventListener("keydown",this.trapFocus.bind(this))}closeQuickView(){const{body,modal}=this.elements;body.classList.remove("quickview-open"),modal.classList.remove("active"),document.removeEventListener("keydown",this.trapFocus.bind(this))}dispatchQuickViewOpenEvent(url,productHandle){document.dispatchEvent(new CustomEvent("quick-view:open",{detail:{productUrl:url,productHandle}}))}}customElements.define("quick-view",QuickView)}if(!customElements.get("collapsible-details")){class CollapsibleDetails extends HTMLElement{constructor(){super(),this.toggleContent=this.toggleContent.bind(this),this.onTransitionEnd=this.onTransitionEnd.bind(this),this.updateHeight=this.updateHeight.bind(this),this.setResponsiveState=this.setResponsiveState.bind(this),this.isAnimating=!1}connectedCallback(){this.detailsEl=this.querySelector("details"),this.summaryEl=this.querySelector("summary"),this.contentEl=this.querySelector(".collapsible__content"),this.contentInnerEl=this.querySelector(".collapsible__content-inner"),this.wrapContent(),this.setupInitialState(),this.addEventListeners(),this.resizeObserver=new ResizeObserver(this.updateHeight),this.resizeObserver.observe(this.contentInnerEl),this.detailsEl.dataset.responsive==="true"&&this.setResponsiveState(),this.mutationObserver=new MutationObserver(this.updateContentHeight.bind(this)),this.mutationObserver.observe(this.contentInnerEl,{childList:!0,subtree:!0,characterData:!0})}wrapContent(){this.contentWrapper=document.createElement("div"),this.contentWrapper.className="collapsible__content-wrapper",this.contentEl.parentNode.insertBefore(this.contentWrapper,this.contentEl),this.contentWrapper.appendChild(this.contentEl)}setupInitialState(){this.detailsEl.hasAttribute("open")?(this.contentWrapper.style.height="auto",this.contentEl.style.transform="translateY(0)",this.detailsEl.classList.add("is-open")):(this.contentWrapper.style.height="0",this.contentEl.style.transform="translateY(16px)")}addEventListeners(){this.summaryEl.addEventListener("click",this.toggleContent),this.contentWrapper.addEventListener("transitionend",this.onTransitionEnd)}toggleContent(event){if(event.preventDefault(),this.isAnimating){this.pendingState=!this.detailsEl.open;return}this[this.detailsEl.open?"closeContent":"openContent"]()}openContent(){this.isAnimating=!0,this.detailsEl.open=!0,requestAnimationFrame(()=>{const height=this.contentEl.scrollHeight;this.contentWrapper.style.height="0",this.contentEl.style.transform="translateY(16px)",requestAnimationFrame(()=>{this.detailsEl.classList.add("is-open"),this.contentWrapper.style.height=`${height}px`,this.contentEl.style.transform="translateY(0)"})})}closeContent(){this.isAnimating=!0,requestAnimationFrame(()=>{const height=this.contentWrapper.scrollHeight;this.contentWrapper.style.height=`${height}px`,requestAnimationFrame(()=>{this.detailsEl.classList.remove("is-open"),this.contentWrapper.style.height="0",this.contentEl.style.transform="translateY(16px)"})})}onTransitionEnd(event){event.propertyName!=="height"||event.target!==this.contentWrapper||(this.isAnimating=!1,this.detailsEl.classList.contains("is-open")?this.contentWrapper.style.height="auto":this.detailsEl.open=!1,this.pendingState!==void 0&&(this[this.pendingState?"openContent":"closeContent"](),this.pendingState=void 0))}updateHeight(){if(this.detailsEl.open&&!this.isAnimating){this.contentWrapper.style.height="auto";const height=this.contentWrapper.scrollHeight;this.contentWrapper.style.height=`${height}px`}}updateContentHeight(){if(this.detailsEl.open){const height=this.contentEl.scrollHeight;this.contentWrapper.style.height=`${height}px`}}disconnectedCallback(){this.summaryEl.removeEventListener("click",this.toggleContent),this.contentWrapper.removeEventListener("transitionend",this.onTransitionEnd),this.resizeObserver.disconnect(),this.mutationObserver.disconnect()}setResponsiveState(){const isMobile=window.matchMedia("(max-width: 768px)").matches;isMobile&&this.detailsEl.open||(this.detailsEl.open=!isMobile,this.detailsEl.classList.toggle("is-open",!isMobile),isMobile?this.contentWrapper.style.height="0":(this.contentWrapper.style.height="auto",this.contentEl.style.transform="translateY(0)",setTimeout(()=>{const height=this.contentEl.scrollHeight;this.contentWrapper.style.height=`${height}px`},0)))}}customElements.define("collapsible-details",CollapsibleDetails)}function debounce(func,wait=100){let timeout;return function(...args){clearTimeout(timeout),timeout=setTimeout(()=>func.apply(this,args),wait)}}if(window.addEventListener("resize",debounce(()=>{document.querySelectorAll('collapsible-details details[data-responsive="true"]').forEach(detail
62s=>details.closest("collapsible-details").setResponsiveState())})),!customElements.get("tabs-component")){class TabsComponent extends HTMLElement{constructor(){super()}connectedCallback(){this.tabsHeader=this.querySelector(".tabs-header"),this.tabsContent=this.querySelector(".tabs-content"),this.tabActiveIndicator=this.querySelector(".indicator"),this.tabsHeader.addEventListener("click",e=>{e.target.classList.contains("tab-button")&&this.activateTab(e.target)}),this.tabsHeader.addEventListener("keydown",e=>{e.target.classList.contains("tab-button")&&this.handleKeyDown(e)}),this.activateTab(this.tabsHeader.querySelector(".tab-button")),Shopify&&Shopify.designMode&&document.addEventListener("shopify:block:select",this.handleBlockSelect.bind(this))}activateTab(tab){const tabIndex=tab.getAttribute("data-tab");this.tabsHeader.querySelectorAll(".tab-button").forEach(t=>{const isActive=t===tab;t.classList.toggle("active",isActive),t.setAttribute("aria-selected",isActive),t.setAttribute("tabindex",isActive?"0":"-1")}),this.tabsContent.querySelectorAll(".tab-content").forEach(content=>{content.classList.toggle("active",content.getAttribute("id")===tabIndex)});const tabRect=tab.getBoundingClientRect(),tabsHeaderRect=this.tabsHeader.getBoundingClientRect(),offsetLeft=tabRect.left-tabsHeaderRect.left;this.tabsHeader.style.setProperty("--indicator-width",`${tabRect.width}px`),this.tabsHeader.style.setProperty("--indicator-offset",`${offsetLeft}px`)}handleKeyDown(e){const key=e.key,currentTab=e.target;let newTab;switch(key){case"ArrowRight":newTab=currentTab.nextElementSibling||this.tabsHeader.firstElementChild;break;case"ArrowLeft":newTab=currentTab.previousElementSibling||this.tabsHeader.lastElementChild;break;case"Enter":case"Space":this.activateTab(currentTab);return}newTab&&newTab.classList.contains("tab-button")&&(e.preventDefault(),newTab.focus())}handleBlockSelect(e){const blockId=e.detail.blockId,tabToActivate=this.tabsHeader.querySelector(`[data-tab="tab-${blockId}"]`);tabToActivate&&this.activateTab(tabToActivate)}}customElements.define("tabs-component",TabsComponent)}if(!customElements.get("card-product-swatch")){class CardProductSwatch extends HTMLElement{constructor(){super()}connectedCallback(){this.swatchButtons=this.querySelectorAll(".swatch-button"),this.image=this.closest(".card-product").querySelector(".product-first-image img"),this.link=this.closest(".card-product").querySelector(".product-link"),this.swatchButtons.forEach(button=>{button.addEventListener("click",this.handleSwatchClick.bind(this))})}handleSwatchClick(event){const button=event.currentTarget;this.updateActiveSwatch(button),this.updateProductImage(button),this.updateProductLink(button)}updateActiveSwatch(button){this.swatchButtons.forEach(b=>b.classList.remove("active")),button.classList.add("active")}updateProductImage(button){const newImageSrcset=button.getAttribute("data-srcset"),newImageSrc=button.getAttribute("data-src");newImageSrcset&&(this.image.srcset=newImageSrcset),newImageSrc&&(this.image.src=newImageSrc)}updateProductLink(button){const newLink=button.getAttribute("data-link");newLink&&(this.link.href=newLink)}}customElements.define("card-product-swatch",CardProductSwatch)}if(document.addEventListener("DOMContentLoaded",()=>{if(!customElements.get("parallax-element")){class ParallaxElement extends HTMLElement{constructor(){super()}connectedCallback(){this.parallax=new Ukiyo(".parallax-image",{scale:1.7,speed:1.7,externalRAF:!0});const animate=time=>{this.parallax.animate(),requestAnimationFrame(animate)};this.animationFrameId=requestAnimationFrame(animate)}disconnectedCallback(){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId)}}customElements.define("parallax-element",ParallaxElement)}}),!customElements.get("viewport-media")){class ViewportMedia extends HTMLElement{constructor(){super(),this.initObserver()}initObserver(){"IntersectionObserver"in window?(this.observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting&&(this.loadContent(),this.observer.unobserve(entry.target),this.observer.disconnect())})},{rootMargin:"200px 0px 200px 0px"}),this.observer.observe(this)):this.loadContent()}loadContent(){if(!this.getAttribute("loaded")){const template=this.querySelector("template");if(template&&template.content&&template.content.firstElementChild){const content=document.createElement("div");content.appendChild(template.content.firstElementChild.cloneNode(!0)),this.setAttribute("loaded",!0);const deferredElement=this.appendChild(content.querySelector("video, iframe"));if(deferredElement.nodeName==="IFRAME"){const src=deferredElement.getAttribute("data-src");src&&deferredElement.setAttribute("src",src),deferredElement.onload=()=>this.removePlaceholder()}if(deferredElement.nodeName==="VIDEO"){const isAutoplay=deferredElement.getAttribute("autoplay"),poster=deferredElement.getAttribute("poster");!isAutoplay&&poster&&deferredElement.setAttribute("poster",poster),deferredElement.onloadeddata=()=>{this.removePlaceholder(),isAutoplay&&(deferredElement.muted=!0,deferredElement.play().catch(error=>{console.warn("Autoplay failed:",error)}))},deferredElement.load()}}}}removePlaceholder(){const placeholder=this.querySelector(".video-placeholder");placeholder&&(placeholder.style.display="none")}}customElements.define("viewport-media",ViewportMedia)}if(!customElements.get("count-down")){class CountdownTimer extends HTMLElement{constructor(){super(),this.endTime=new Date(this.getAttribute("data-timer")).getTime(),this.daysElem=this.querySelector('li[data-value="days"] .countdown-day'),this.hoursElem=this.querySelector('li[data-value="hours"] .countdown-hour'),this.minutesElem=this.querySelector('li[data-value="minutes"] .countdown-minute'),this.secondsElem=this.querySelector('li[data-value="seconds"] .countdown-second')}connectedCallback(){this.startCountdown()}startCountdown(){const updateCountdown=()=>{const now=new Date().getTime(),distance=this.endTime-now;if(distance<0){this.displayTime(0,0,0,0);return}const days=Math.floor(distance/(1e3*60*60*24)),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);this.displayTime(days,hours,minutes,seconds),requestAnimationFrame(updateCountdown)};updateCountdown()}displayTime(days,hours,minutes,seconds){this.daysElem.textContent=days,this.hoursElem.textContent=hours,this.minutesElem.textContent=minutes,this.secondsElem.textContent=seconds}}customElements.define("count-down",CountdownTimer)}(function(){function getAbsoluteTop(element){if(!element)return 0;const rect=element.getBoundingClientRect(),scrollTop=window.pageYOffset||document.documentElement.scrollTop;return rect.top+scrollTop}function initSmoothScroll(){document.addEventListener("click",function(event){if(event.target.matches("[data-anchor]")){event.preventDefault();const href=event.target.getAttribute("href");if(!href||href==="#")return;const targetId=href.replace("#",""),targetSection=document.getElementById(targetId);
62if(targetSection){const headerHeight=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--header-height"))||0,targetPosition=getAbsoluteTop(targetSection)-headerHeight;window.scrollTo({top:targetPosition,behavior:"smooth"})}}})}document.addEventListener("DOMContentLoaded",initSmoothScroll)})(); 63//# sourceMappingURL=/cdn/shop/t/20/assets/theme.js.map?v=164547736616995171651735231829
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.