PageSourceSearch

https://otomax.store/cdn/shop/t/31/assets/scripts.js?v=172892144146040079661791377124

js otomax.store collected 2026-10-10 01:44:51 UTC 54,950 bytes, 3 lines download raw bytes

1"use strict";const isTouchDevice=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;if(isTouchDevice()){const subMenuNavs=document.querySelectorAll(".has-sub-menu > a");subMenuNavs.forEach(mainMenuNav=>{mainMenuNav.addEventListener("click",event=>{isTouchDevice()&&(subMenuNavs.forEach(item=>{item!==mainMenuNav&&item.classList.remove("is-dropdown-open")}),!mainMenuNav.classList.contains("is-dropdown-open")&&(event.preventDefault(),mainMenuNav.classList.add("is-dropdown-open")))})})}const navigations=document.querySelectorAll(".navigation-menu");navigations.forEach(navigation=>{const navigationMenusTopNavs=navigation.querySelectorAll(":scope > .has-sub-menu"),getMenuWidth=(element,initialWidth=0)=>{const submenu=element&&element.querySelector(".navigation-sub-menu");return submenu?getMenuWidth(submenu,initialWidth+submenu.clientWidth):initialWidth},setMenuClasses=()=>{const windowWidth=window.innerWidth;navigationMenusTopNavs.forEach(navigationMenusTopNav=>{if(navigationMenusTopNav.classList.contains("navigation-item-static"))return;navigationMenusTopNav.classList.remove("nav-open-left");const width=getMenuWidth(navigationMenusTopNav);navigationMenusTopNav.offsetLeft+width>windowWidth&&navigationMenusTopNav.classList.add("nav-open-left")})};setMenuClasses();let resizeTimer;window.addEventListener("resize",()=>{clearTimeout(resizeTimer),resizeTimer=setTimeout(()=>{setMenuClasses()},350)})});const mobileMenuWrap=document.querySelector(".head-slot-nav-mobile-link-wrapper"),mobileNavWrap=document.querySelector(".navigation-mobile-wrap"),mobileMenuToggle=document.querySelector(".head-slot-nav-mobile-link"),mobileMenu=document.querySelector(".mobile-menu"),expandOnButton=mobileMenu?.dataset.buttonExpand!=null,setMobileMenuMaxheight=(offset=0)=>{mobileMenu.style.maxHeight=`${window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom+offset}px`},handleMobileMenuOpen=()=>{document.body.classList.add("mobile-menu-open"),mobileMenuToggle.ariaExpanded="true",mobileMenu.ariaHidden="false",trapFocus(mobileMenuWrap,mobileNavWrap);const offset=mobileMenu.closest(".header-alt")?60:0;setMobileMenuMaxheight(offset),publish(PUB_SUB_EVENTS.mobileMenuOpen)},handleMobileMenuDismiss=()=>{document.body.classList.remove("mobile-menu-open"),mobileMenuToggle.ariaExpanded="false",mobileMenu.ariaHidden="true",removeTrapFocus(mobileMenuToggle),mobileMenu.style.maxHeight="",publish(PUB_SUB_EVENTS.mobileMenuClose)},isMobileMenuOpen=()=>document.body.classList.contains("mobile-menu-open");document.body.addEventListener("click",event=>{const{target}=event,mobileNav=target.closest(".navigation-mobile-item"),isMobileNavButton=target.classList.contains("head-slot-nav-mobile-link")||!!target.closest(".head-slot-nav-mobile-link"),isMainNav=!!target.closest(".navigation-main"),isAnchorLink=target.tagName==="A"&&/^#[\w-]+/.test(target.getAttribute("href"));if(mobileNav&&mobileNav.querySelector("ul")&&(expandOnButton?target.closest(".navigation-mobile-item-link-expand")&&mobileNav.classList.toggle("menu-item-expanded"):(event.preventDefault(),mobileNav.classList.toggle("menu-item-expanded"))),isMobileNavButton&&document.body.classList.contains("mobile-menu-open")){handleMobileMenuDismiss();return}if(isMobileNavButton){handleMobileMenuOpen();return}isAnchorLink&&handleMobileMenuDismiss(),isMobileMenuOpen()&&!target.closest(".mobile-menu")&&(event.preventDefault(),handleMobileMenuDismiss()),isMainNav&&isAnchorLink&&(target.closest(".navigation-main").classList.add("menus-closed"),setTimeout(()=>{target.closest(".navigation-main").classList.remove("menus-closed")},100))}),mobileMenuWrap&&mobileMenuWrap.addEventListener("keyup",event=>{event.code.toUpperCase()==="ESCAPE"&&handleMobileMenuDismiss()});class MegaMenuMain extends HTMLElement{constructor(){super(),this.toggle=this.querySelector(".button-mega-menu-toggle"),this.menu=this.querySelector(".mega-menu-main-wrapper"),this.tabNavs=this.querySelectorAll(".mega-menu-main-nav-item"),this.contentContainers=this.querySelectorAll(".mega-menu-main-content-tab"),this.toggle.addEventListener("click",this.onToggleClick),this.addEventListener("click",this.checkOnClickOutside),this.addEventListener("keyup",event=>{event.code.toUpperCase()==="ESCAPE"&&this.hide()}
1),this.tabNavs.forEach(tabNavs=>{tabNavs.addEventListener("click",this.handleTabNavChange)})}handleTabNavChange=event=>{event.preventDefault();const targetId=event.target.getAttribute("href");this.contentContainers.forEach(container=>{container.setAttribute("aria-hidden","true")}),this.tabNavs.forEach(tabNav=>{tabNav.classList.remove("current")}),this.querySelector(targetId)?.setAttribute("aria-hidden","false"),event.target.classList.add("current")};checkOnClickOutside=event=>{event.target.closest(".button-mega-menu-toggle")||event.target===this.toggle||!this.isHidden()&&!event.target?.closest(".mega-menu-main-container")&&this.hide()};onToggleClick=()=>{this.isHidden()?this.show():this.hide()};isHidden(){return this.getAttribute("aria-expanded")==="false"}isExpanded(){return this.getAttribute("aria-expanded")==="true"}hide(){this.setAttribute("aria-expanded","false"),this.menu.setAttribute("aria-hidden","true"),removeTrapFocus(this.toggle)}show(){this.setAttribute("aria-expanded","true"),this.menu.setAttribute("aria-hidden","false"),trapFocus(this.querySelector(".mega-menu-main-container"))}}customElements.define("mega-menu-main",MegaMenuMain);class DropdownModal extends HTMLElement{constructor(){super(),this.eventPrefix=this.dataset.eventPrefix,this.toggles=this.querySelectorAll(".dropdown-modal-toggle"),this.content=this.querySelector(".dropdown-modal-toggle + div"),this.preventOpen=this.getAttribute("prevent-open")==="true",!this.preventOpen&&(this.addEventListener("keyup",event=>{event.code.toUpperCase()==="ESCAPE"&&this.close()}),this.toggles.forEach(toggle=>{toggle.addEventListener("click",this.handleToggle.bind(this))}))}isOpen(){return this.getAttribute("open")==="true"}handleToggle(event){event?.preventDefault?.(),this.isOpen()?this.close():this.open()}open(opener){this.openedBy=opener,this.setAttribute("open",!0),this.toggles.forEach(toggle=>{toggle.setAttribute("aria-expanded",!0)}),trapFocus(this),this.eventPrefix&&publish(`${this.eventPrefix}:open`),document.querySelectorAll("localization-form")?.forEach?.(localizationForm=>{localizationForm?.hidePanel?.()})}close(){this.toggles.forEach(toggle=>{toggle.setAttribute("aria-expanded",!1)}),this.removeAttribute("open"),this.openedBy&&removeTrapFocus(this.openedBy),this.eventPrefix&&publish(`${this.eventPrefix}:close`)}}customElements.define("dropdown-modal",DropdownModal);class HeaderMiniCartDropdownModal extends DropdownModal{constructor(){super()}setMaxHeight(){const offset=this.closest(".header-alt")?60:0;this.content.style.maxHeight=`${window.innerHeight-document.querySelector(".header").getBoundingClientRect().bottom+offset}px`}open(opener){super.open(opener),this.setMaxHeight(),setTimeout(()=>{trapFocus(this,this.querySelector(".dropdown-modal-toggle"))},250)}close(){super.close(),this.content.style.maxHeight=""}}customElements.define("header-mini-cart-dropdown-modal",HeaderMiniCartDropdownModal);class HeaderSearchDropdownModal extends DropdownModal{constructor(){super(),this.searchInput=this.querySelector('input[type="search"]')}open(opener){super.open(opener),trapFocus(this,this.searchInput)}}customElements.define("header-search-dropdown-modal",HeaderSearchDropdownModal);const handleSidebarOpen=()=>{const sidebarDrawer=document.querySelector(".page-layout-sidebar");if(document.documentElement.classList.add("page-layout-sidebar-drawer-open"),document.body.classList.add("page-layout-sidebar-drawer-open"),document.body.classList.add("overflow-hidden-tablet"),sidebarDrawer&&!document.querySelector(".otx-filter-drawer-backdrop")){const backdrop=document.createElement("div");backdrop.className="otx-filter-drawer-backdrop js-button-sidebar-drawer-dismiss",backdrop.setAttribute("aria-hidden","true"),backdrop.addEventListener("click",handleSidebarDismiss),sidebarDrawer.parentNode.insertBefore(backdrop,sidebarDrawer)}sidebarDrawer&&typeof trapFocus=="function"&&trapFocus(sidebarDrawer,sidebarDrawer.querySelector(".page-layout-sidebar-drawer-header"))},handleSidebarDismiss=()=>{const sidebarDrawerButton=document.querySelector(".button-sidebar-drawer-open");document.documentElement.classList.remove("page-layout-sidebar-drawer-open"),document.body.classList.remove("page-layout-sidebar-drawer-open"),document.body.classList.remove("overflow-hidden-tablet"),sidebarDrawerButton&&typeof removeTrapFocus=="function"&&removeTrapFocus(sidebarDrawerButton)},isSidebarOpen=()=>document.body.classList.contains("page-layout-sidebar-drawer-open");document.body.addEventListener("click",event=>{const{target}=event;if(target){if(target.classList.contains("js-button-sidebar-drawer-dismiss")||target.closest(".
1js-button-sidebar-drawer-dismiss")){handleSidebarDismiss();return}if(target.classList.contains("button-sidebar-drawer-open")||target.closest(".button-sidebar-drawer-open")){handleSidebarOpen();return}isSidebarOpen()&&!target.closest(".page-layout-sidebar")&&!target.closest(".button-sidebar-drawer-open")&&handleSidebarDismiss()}}),document.addEventListener("keyup",event=>{event.code&&event.code.toUpperCase()==="ESCAPE"&&isSidebarOpen()&&handleSidebarDismiss()}),document.addEventListener("change",event=>{if(event.target.parentNode?.classList.contains("select-custom")){const select=event.target,label=select.parentNode.querySelector("label");label.textContent=select.options[select.selectedIndex].text}}),(()=>{const reviewsLink=document.querySelectorAll('a[href*="#product-reviews"]'),reviews=document.getElementById("product-reviews"),tabsNavigation=document.querySelector("tabs-navigation");reviewsLink&&reviews&&tabsNavigation&&reviewsLink.forEach(link=>{link.addEventListener("click",()=>{tabsNavigation.setActiveTab(reviews)})}),window.location.hash==="#product-reviews"&&reviews&&tabsNavigation&&(setTimeout(()=>{tabsNavigation.setActiveTab(reviews)},0),setTimeout(()=>{reviews.scrollIntoView()},200))})(),(()=>{const appReviewLinks=document.querySelectorAll(".star-rating-badge"),reviews=document.getElementById("product-reviews"),tabsNavigation=document.querySelector("tabs-navigation");appReviewLinks.length>0&&reviews&&appReviewLinks.forEach(link=>{link.classList.contains("star-rating-link")||link.addEventListener("click",()=>{tabsNavigation.setActiveTab(reviews)})}),appReviewLinks.length>0&&!reviews&&appReviewLinks.forEach(link=>{if(link.classList.contains("star-rating-link"))return;const parentCard=link.closest(".card-product");if(parentCard){const href=parentCard.querySelector(".card-heading > a")?.getAttribute("href");link.addEventListener("click",()=>{window.location=`${href}#product-reviews`})}})})();class CollapsibleExpandable extends HTMLElement{constructor(){super()}connectedCallback(){this.collapsed=this.getAttribute("expanded")==="false",this.toggleElement=this.querySelector(".facet-toggle"),this.onToggle=this.onToggle.bind(this),this.toggleElement.addEventListener("click",this.onToggle),this.list=this.querySelector(".facet-options-list"),this.listCollapsed=this.list&&this.list.getAttribute("aria-expanded")==="false",this.expandListToggle=this.querySelector(".facet-button-more"),this.onListToggle=this.onListToggle.bind(this),this.expandListToggle&&this.expandListToggle.addEventListener("click",this.onListToggle)}disconnectedCallback(){this.toggleElement.removeEventListener("click",this.onToggle),this.expandListToggle&&this.expandListToggle.removeEventListener("click",this.onListToggle())}onToggle(event){event.preventDefault(),this.handleToggle()}collapse(){this.setAttribute("expanded","false"),this.toggleElement.setAttribute("aria-expanded","false"),this.collapsed=!0}expand(){this.setAttribute("expanded","true"),this.toggleElement.setAttribute("aria-expanded","true"),this.collapsed=!1}handleToggle(){this.collapsed?this.expand():this.collapse()}onListToggle(event){event&&event.preventDefault(),this.handleToggleList()}collapseList(){this.list.setAttribute("aria-expanded","false"),this.expandListToggle.innerHTML="+ "+window.productsStrings.facetsShowMore,this.listCollapsed=!0}expandList(){this.list.setAttribute("aria-expanded","true"),this.expandListToggle.innerHTML="− "+window.productsStrings.facetsShowLess,this.listCollapsed=!1}handleToggleList(){this.listCollapsed?this.expandList():this.collapseList()}}customElements.define("collapsible-expandable",CollapsibleExpandable);class ModalDialog extends HTMLElement{constructor(){super(),this.querySelector('[id^="ModalClose-"]').addEventListener("click",this.hide.bind(this)),this.addEventListener("keyup",event=>{event.code.toUpperCase()==="ESCAPE"&&this.hide()}),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=>
1{event.target.nodeName==="MODAL-DIALOG"&&this.hide()})}connectedCallback(){this.moved||Shopify.designMode||(this.moved=!0,document.body.appendChild(this))}show(opener){this.openedBy=opener,document.body.classList.add("overflow-hidden"),this.setAttribute("open",""),trapFocus(this,this.querySelector('[role="dialog"]')),window.pauseAllMedia()}hide(){document.body.classList.remove("overflow-hidden"),this.removeAttribute("open"),this.openedBy&&removeTrapFocus(this.openedBy),window.pauseAllMedia()}}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 HTMLUpdateUtility{#preProcessCallbacks=[];#postProcessCallbacks=[];constructor(){}addPreProcessCallback(callback){this.#preProcessCallbacks.push(callback)}addPostProcessCallback(callback){this.#postProcessCallbacks.push(callback)}viewTransition(oldNode,newContent){this.#preProcessCallbacks.forEach(callback=>callback(newContent));const newNodeWrapper=document.createElement("div");HTMLUpdateUtility.setInnerHTML(newNodeWrapper,newContent.outerHTML);const newNode=newNodeWrapper.firstChild;oldNode.parentNode.insertBefore(newNode,oldNode),oldNode.style.display="none";const uniqueKey=Date.now();oldNode.querySelectorAll("[id], [form]").forEach(element=>{element.id&&(element.id=`${element.id}-${uniqueKey}`),element.form&&element.setAttribute("form",`${element.form.getAttribute("id")}-${uniqueKey}`)}),this.#postProcessCallbacks.forEach(callback=>callback(newNode)),setTimeout(()=>oldNode.remove(),500)}static setInnerHTML(element,html){element.innerHTML=html,element.querySelectorAll("script").forEach(oldScriptTag=>{const newScriptTag=document.createElement("script");Array.from(oldScriptTag.attributes).forEach(attribute=>{newScriptTag.setAttribute(attribute.name,attribute.value)}),newScriptTag.appendChild(document.createTextNode(oldScriptTag.innerHTML)),oldScriptTag.parentNode.replaceChild(newScriptTag,oldScriptTag)})}}class VariantSelects extends HTMLElement{constructor(){super(),this.initializeProductSwapUtility(),this.addEventListener("change",this.handleProductUpdate),this.sectionId=this.dataset.section,this.hideOutOfStock=this.dataset.variantsVisibility==="hide",this.hideSingle=this.dataset.hideSingle==="true",this.optionsWithValues=JSON.parse(this.querySelector('[type="application/json"][data-id="product-options-with-values"]').textContent),this.variants=JSON.parse(this.querySelector('[type="application/json"][data-id="product-variants"]')?.textContent??null),this.updateVisibility()}initializeProductSwapUtility(){this.swapProductUtility=new HTMLUpdateUtility,this.swapProductUtility.addPostProcessCallback(newNode=>{window?.Shopify?.PaymentButton?.init(),window?.ProductModel?.loadShopifyXR(),publish(PUB_SUB_EVENTS.sectionRefreshed,{data:{sectionId:this.sectionId,resource:{type:"product",id:newNode.querySelector("variant-selects, variant-radios").dataset.productId}}})})}handleProductUpdate(event){const input=this.getInputForEventTarget(event.target),targetId=input.id,targetUrl=input.dataset.productUrl||this.dataset.url,sectionId=this.sectionId;this.currentVariant=this.getVariantData(targetId),this.currentVariant=this.maybeGetFirstAvailableVariant(this.currentVariant,input),this.hideVariants=this.dataset.hideVariants==="true";let productUrl=this.getProductInfoUrl(targetUrl,this.currentVariant?.id);this.toggleAddButton(!0,"");let callback=()=>{};if(this.dataset.url!==targetUrl||this.hideVariants&&this.currentVariant){this.updateURL(targetUrl),this.updateShareUrl(targetUrl),callback=this.handleSwapProduct(sectionId);const shouldFetchFullPage=this.dataset.updateUrl==="true";productUrl=this.getProductInfoUrl(targetUrl,this.currentVariant?.id,shouldFetchFullPage)}else this.currentVariant?(this.updateMedia(),this.updateURL(targetUrl),this.updateShareUrl(targetUrl),this.updateVariantInput(),callback=this.handleUpdateProductInfo(sectionId).bind(this)):(this.setUnavailable(),callback=html=>{this.updatePickupAvailability(),this.updateOptionValues(html)});this.renderProductInfo(productUrl,targetId,callback)}maybeGetFirstAvailableVariant(currentVariant,inputClicked){let newVariant=currentVariant;if(this.variants&&this.hideOutOfStock&&(!currentVariant||!currentVariant.available)){const selectedOptionPosition=inputClicked.closest("fieldset, select").dataset.optionPosition,selectedOptions=Array.from(this.querySelectorAll("fieldset input:checked, select option:checked")).reduce((acc,element)=>(acc.push(element.value),acc),[]),firstAvailableVariant=this.variants.find((variant,index)=>
1{const variantSlice=variant.options.slice(0,selectedOptionPosition).toString(),selectedSlice=selectedOptions.slice(0,selectedOptionPosition).toString();return variant.available&&variantSlice===selectedSlice});firstAvailableVariant&&(newVariant=firstAvailableVariant)}return newVariant}getInputForEventTarget(target){return target.tagName==="SELECT"?target.selectedOptions[0]:target}getWrappingSection(sectionId){return this.closest(`#shopify-section-${sectionId}`)||null}handleSwapProduct(sectionId){return html=>{const oldContent=this.getWrappingSection(sectionId);if(!oldContent)return;document.getElementById(`ProductModal-${sectionId}`)?.remove();const response=html.getElementById(`shopify-section-${sectionId}`);this.dataset.updateUrl==="true"?(this.swapProductUtility.viewTransition(document.querySelector("main"),html.querySelector("main")),document.querySelector("head title").innerHTML=html.querySelector("head title").innerHTML):this.swapProductUtility.viewTransition(oldContent,response)}}updateMedia(){const mediaGallery=document.getElementById(`MediaGallery-${this.dataset.section}`);!this.currentVariant||!this.currentVariant.featured_media||mediaGallery?.setActiveMedia&&mediaGallery.setActiveMedia(this.currentVariant.featured_media.id,mediaGallery.getAttribute("hide-variants")==="true")}updateURL(url){!this.currentVariant||this.dataset.updateUrl==="false"||window.history.replaceState({},"",`${url}${this.currentVariant?.id?`?variant=${this.currentVariant.id}`:""}`)}updateShareUrl(url){const shareButtons=document.querySelectorAll(`Product-${this.dataset.section} .list-social-item a`);shareButtons&&shareButtons.forEach(button=>{const fullUrl=`${window.shopUrl}${url}${this.currentVariant?.id?`?variant=${this.currentVariant.id}`:""}`;button.href=`${button.dataset.shareUrl}${encodeURIComponent(fullUrl)}`})}updateVariantInput(){document.querySelectorAll(`#product-form-${this.dataset.section}, #product-form-installment`).forEach(productForm=>{const input=productForm.querySelector('input[name="id"]');input.value=this.currentVariant.id,input.dispatchEvent(new Event("change",{bubbles:!0}))})}updatePickupAvailability(){const pickUpAvailability=document.querySelector("pickup-availability");!pickUpAvailability||!pickUpAvailability.fetchAvailability||(this.currentVariant&&this.currentVariant.available?pickUpAvailability.fetchAvailability(this.currentVariant.id):(pickUpAvailability.removeAttribute("available"),pickUpAvailability.innerHTML=""))}updateVisibility(){const hasSingleVariant=Array.from(this.querySelectorAll("variant-radios fieldset, variant-selects select")).reduce((acc,fieldset)=>acc&&fieldset.querySelectorAll("input, option").length===1,!0),hasSingleVariantAvailable=Array.from(this.querySelectorAll("variant-radios fieldset, variant-selects select")).reduce((acc,fieldset)=>acc&&fieldset.querySelectorAll('[data-variant-available="true"]').length===1,!0),parent=this.closest(".product-variants");this.hideSingle&&(hasSingleVariant||this.hideOutOfStock&&hasSingleVariantAvailable)?parent?.classList.add("hidden"):(parent?.classList.add("variants-visible"),parent?.classList.remove("variants-hidden"))}updateOptionValues(html){const variantSelects=html.querySelector("variant-selects, variant-radios");variantSelects&&(this.innerHTML=variantSelects.innerHTML)}getProductInfoUrl(url,variantId,shouldFetchFullPage=!1){const params=[];if(shouldFetchFullPage||params.push(`section_id=${this.sectionId}`),variantId)params.push(`variant=${variantId}`);else{const optionValues=this.getSelectedOptionValues();optionValues.length&&params.push(`option_values=${optionValues.join(",")}`)}return`${url}?${params.join("&")}`}renderProductInfo(productUrl,targetId,callback){this.abortController?.abort(),this.abortController=new AbortController,fetch(productUrl,{signal:this.abortController.signal}).then(response=>response.text()).then(responseText=>{const html=new DOMParser().parseFromString(responseText,"text/html");callback(html)}).then(()=>{const target=document.getElementById(targetId);target?.focus(),target?.tagName==="OPTION"&&(target.selected=!0)})}handleUpdateProductInfo(sectionId){return html=>{const priceId=`price-${sectionId}`,stockBadgeId=`ProductAvailability-${sectionId}`,priceDestination=document.getElementById(priceId),priceSource=html.getElementById(priceId),stockBadgeDestination=document.getElementById(stockBadgeId),stockBadgeSource=html.getElementById(stockBadgeId),productStockBarSource=html.getElementById(`ProductStockBar-${sectionId}`),productStockBarDestination=document.getElementById(`ProductStockBar-${sectionId}`),productSignupSource=html.getElementById(`ProductSignup-${sectionId}`),productSignupDestination=document.getElementById(`ProductSignup-${sectionId}`);priceSource&&priceDestination&&(priceDestination.innerHTML=priceSource.innerHTML),stockBadgeSource&&stockBadgeDestination&&(stockBadgeDestination.innerHTML=stockBadgeSource.innerHTML);const price=document.getElementById(`price-${sectionId}`);price&&price.classList.remove("visibility-hidden"),productStockBarSource&&productStockBarDestination&&(productStockBarDestination.innerHTML=productStockBarSource.innerHTML,productStockBarDestination.classList.remove("hidden")),productSignupSource&&productSignupDestination&&(productSignupDestination.outerHTML=productSignupSource.outerHTML),this.setProductActions(html),this.toggleAddButton(!this.currentVariant.available),this.setProductInfo(html),this.setProductInfoMeta(html),this.updatePickupAvailability(),this.updateOptionValues(html),publish(PUB_SUB_EVENTS.productVariantChange,{sectionId:this.dataset.section,html,variant:this.currentVariant})}}setProductActions(html){const productFormDestination=document.getElementById(`product-form-${this.dataset.section}`),productFormSource=html.getElementById(`product-form-${this.dataset.section}`),productActionsCartDestination=productFormDestination.querySelector(".product-actions-add-to-cart"),productActionsCartSource=productFormSource?.querySelector(".product-actions-add-to-cart"),addButtonDestination=productFormDestination.querySelector('[name="add"]'),addButtonSource=productFormSource?.querySelector('[name="add"]');productActionsCartDestination&&productActionsCartSource&&(productActionsCartDestination.classList=productActionsCartSource.classList),addButtonSource&&addButtonDestination&&(addButtonDestination.innerHTML=addButtonSource.innerHTML)}setProductInfo(html){const className=`#ProductPage-${this.sectionId}
1 .product-info-details-list`,destinations=document.querySelectorAll(className),sources=html.querySelectorAll(className);destinations.length>0&&destinations.forEach((destination,index)=>{sources[index]&&(destination.innerHTML=sources[index]?.innerHTML)})}setProductInfoMeta(html){const destinations=document.querySelectorAll(`.product-info-meta-${this.dataset.section}`);destinations.length>0&&destinations.forEach(destination=>{const source=html?.querySelector(`.product-info-meta-${this.dataset.section}[data-block-id="${destination.dataset.blockId}"]`);source?(destination.classList.remove("visibility-hidden"),destination.innerHTML=source.innerHTML):destination.classList.add("visibility-hidden")})}toggleAddButton(disable=!0){const productForm=document.getElementById(`product-form-${this.dataset.section}`);if(!productForm)return;const addButton=productForm.querySelector('[name="add"]');addButton&&(disable?addButton.setAttribute("disabled","disabled"):addButton.removeAttribute("disabled"))}setUnavailable(){const form=document.getElementById(`product-form-${this.dataset.section}`),addButton=form.querySelector('[name="add"]'),addButtonText=form.querySelector('[name="add"] > span'),price=document.getElementById(`price-${this.dataset.section}`),product=document.getElementById(`ProductPage-${this.dataset.section}`),stockBarBlock=document.getElementById(`ProductStockBar-${this.dataset.section}`);addButton&&(addButtonText.textContent=window.variantStrings.unavailable),price&&price.classList.add("visibility-hidden"),stockBarBlock&&stockBarBlock.classList.add("hidden");const unavailableDetails=product.querySelectorAll(".product-info-details-sku .product-info-details-item-value, .product-info-details-barcode .product-info-details-item-value");unavailableDetails&&unavailableDetails.forEach(detail=>detail.innerHTML="-"),this.setProductInfoMeta(null)}getVariantData(inputId){return JSON.parse(this.querySelector(`script[type="application/json"][data-resource="${inputId}"]`).textContent)}getSelectedOptionValues(){return Array.from(this.querySelectorAll("select option:checked, fieldset input:checked")).map(element=>element.dataset.optionValueId)}}customElements.get("variant-selects")||customElements.define("variant-selects",VariantSelects);class VariantRadios extends VariantSelects{constructor(){super()}}customElements.define("variant-radios",VariantRadios);class ProductCard extends HTMLElement{constructor(){super(),this.colorSwatches=this.querySelectorAll(".card-product-color-swatch"),this.productLinks=this.querySelectorAll("a.js-product-link"),this.colorSwatches.forEach(colorSwatch=>{colorSwatch.addEventListener("click",event=>{event.preventDefault(),this.handleColorSwatchClick(colorSwatch)}),colorSwatch.addEventListener("mouseover",()=>{this.handleColorSwatchMouseOver(colorSwatch)})})}handleColorSwatchClick(colorSwatch){this.colorSwatches.forEach(x=>x.classList.remove("is-active")),colorSwatch.classList.add("is-active"),this.productLinks.forEach(productLink=>{productLink.setAttribute("href",colorSwatch.getAttribute("href"))});const variantImageTemplate=colorSwatch.querySelector(".card-media-image"),mainImage=this.querySelector(".card-media img:first-child");if(variantImageTemplate&&mainImage){const variantImage=variantImageTemplate.cloneNode(!0);variantImage.classList.remove("card-variant-image"),mainImage.replaceWith(variantImage)}}handleColorSwatchMouseOver(colorSwatch){const image=colorSwatch.querySelector(".card-media-image");image&&(image.style.display="inline-block",image.setAttribute("loading",""))}}customElements.define("product-card",ProductCard);class ExpandableList extends HTMLElement{constructor(){super(),this.elements={root:this.querySelector("ul"),expandableNavs:this.querySelectorAll(".has-sub-menu")},this.elements.expandableNavs.length&&this.elements.expandableNavs.forEach(nav=>{nav.querySelector("a").addEventListener("click",this.onToggle.bind(this,nav))})}onToggle(navElement,event){event.preventDefault(),event.stopImmediatePropagation();const submenu=navElement.querySelector("ul"),closeOthers=this.getAttribute("close-others");submenu.getAttribute("aria-expanded")==="true"?this.onContract(navElement):(this.onExpand(navElement),closeOthers&&[...navElement.closest("ul").querySelectorAll(":scope > .has-sub-menu")].filter(item=>item!==navElement).forEach(this.onContract))}onExpand(element){const submenu=element.querySelector("ul");element.classList.add("is-expanded"),submenu.setAttribute("aria-expanded","true")}onContract(element){const submenu=element.querySelector("ul");element.classList.remove("is-expanded"),submenu.setAttribute("aria-expanded","fal
1se")}}customElements.define("expandable-list",ExpandableList);class QuantityInput extends HTMLElement{constructor(){super(),this.input=this.querySelector("input"),this.changeEvent=new Event("change",{bubbles:!0}),this.querySelectorAll("button").forEach(button=>button.addEventListener("click",this.onButtonClick.bind(this)))}onButtonClick(event){event.preventDefault();const previousValue=this.input.value;event.target.name==="plus"?this.input.stepUp():this.input.stepDown(),previousValue!==this.input.value&&(this.input.dispatchEvent(this.changeEvent),publish(PUB_SUB_EVENTS.productQuantityUpdate,{quantity:Number(this.input.value)}))}}customElements.define("quantity-input",QuantityInput);class CartRemoveButton extends HTMLElement{constructor(){super(),this.addEventListener("click",event=>{event.preventDefault();const cartItems=this.closest("cart-items"),miniCart=this.closest("mini-cart");cartItems&&cartItems.updateQuantity(this.dataset.index,0),miniCart&&miniCart.updateQuantity(this.dataset.index,0)})}}customElements.define("cart-remove-button",CartRemoveButton);class CartItems extends HTMLElement{constructor(){super(),this.eventContext=this.dataset.eventContext,this.lineItemStatusElement=document.getElementById("shopping-cart-line-item-status"),this.currentItemCount=Array.from(this.querySelectorAll('[name="updates[]"]')).reduce((total,quantityInput)=>total+parseInt(quantityInput.value),0),this.debouncedOnChange=debounce(event=>{this.onChange(event)},500),this.addEventListener("change",this.debouncedOnChange.bind(this))}onChange(event){event.target.getAttribute("id")?.includes?.("cart-policy")||this.updateQuantity(event.target.dataset.index,event.target.value,document.activeElement.getAttribute("name"))}getSectionsToRender(){return[{id:"cart-page-title-wrap",section:document.getElementById("cart-page-title-wrap").dataset.id,selector:".page-title-wrap"},{id:"main-cart-items",section:document.getElementById("main-cart-items").dataset.id,selector:".js-contents"},{id:"header",section:document.getElementById("header").dataset.id,selector:".head-slot-cart-link"},{id:"cart-live-region-text",section:"cart-live-region-text",selector:".shopify-section"},{id:"main-cart-footer",section:document.getElementById("main-cart-footer").dataset.id,selector:".js-contents"}]}updateQuantity(line,quantity,name){this.enableLoading(line);const body=JSON.stringify({line,quantity,sections:this.getSectionsToRender().map(section=>section.section),sections_url:window.location.pathname});fetch(`${routes.cart_change_url}`,{...fetchConfig(),body}).then(response=>response.text()).then(async state=>{const parsedState=JSON.parse(state),quantityElement=document.getElementById(`quantity-input-${line}`)||document.getElementById(`Mini-Cart-Quantity-${line}`),items=document.querySelectorAll(".js-cart-item");if(parsedState.errors){await this.updateSectionContents(),this.updateLiveRegions(line,parsedState.errors);return}this.classList.toggle("is-empty",parsedState.item_count===0);const cartFooter=document.getElementById("main-cart-footer");cartFooter&&cartFooter.classList.toggle("is-empty",parsedState.item_count===0),this.get
1SectionsToRender().forEach(section=>{const elementToReplace=document.getElementById(section.id).querySelector(section.selector)||document.getElementById(section.id);elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector)});const updatedValue=parsedState.items[line-1]?parsedState.items[line-1].quantity:void 0;let message="";items.length===parsedState.items.length&&updatedValue!==parseInt(quantityElement.value)&&(typeof updatedValue>"u"?message=window.cartStrings.error:message=window.cartStrings.quantityError.replace("[quantity]",updatedValue)),this.updateLiveRegions(line,message);const lineItem=document.getElementById(`CartItem-${line}`)||document.getElementById(`MiniCartItem-${line}`);lineItem&&lineItem.querySelector(`[name="${name}"]`)&&lineItem.querySelector(`[name="${name}"]`).focus(),parseInt(quantity,10)===0?publish(PUB_SUB_EVENTS.cartItemRemove,{source:this.eventContext,cart:parsedState}):publish(PUB_SUB_EVENTS.cartItemQuantityUpdate,{source:this.eventContext,cart:parsedState})}).catch(()=>{this.setError(window.cartStrings.error)}).finally(()=>{this.disableLoading()})}setError(error){document.getElementById("cart-errors").textContent=error}updateLiveRegions(line,message){const lineItemError=document.getElementById(`Line-item-error-${line}`);lineItemError&&(lineItemError.querySelector(".cart-item-error-text").innerHTML=message),this.lineItemStatusElement.setAttribute("aria-hidden",!0);const cartStatus=document.getElementById("cart-live-region-text");cartStatus.setAttribute("aria-hidden",!1),setTimeout(()=>{cartStatus.setAttribute("aria-hidden",!0)},1e3)}updateSectionContents(){return fetch(`${window.location.pathname}?sections=${this.getSectionsToRender().map(section=>section.section).join(",")}&v=${Date.now()}`).then(response=>response.json()).then(response=>{this.getSectionsToRender().forEach(section=>{const elementToReplace=document.getElementById(section.id).querySelector(section.selector)||document.getElementById(section.id);elementToReplace.innerHTML=this.getSectionInnerHTML(response[section.section],section.selector)})})}getSectionInnerHTML(html,selector){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}enableLoading(line){document.getElementById("main-cart-items").classList.add("cart-items-disabled"),this.querySelectorAll(`#CartItem-${line} .cart-item-loading-overlay`).forEach(overlay=>overlay.classList.remove("hidden")),document.activeElement.blur(),this.lineItemStatusElement.setAttribute("aria-hidden",!1)}disableLoading(){document.getElementById("main-cart-items").classList.remove("cart-items-disabled"),this.querySelectorAll(".cart-item-loading-overlay").forEach(overlay=>overlay.classList.add("hidden"))}}customElements.define("cart-items",CartItems);class MiniCart extends CartItems{constructor(){super(),this.modal=this.querySelector(".dropdown-modal"),this.stickyHeader=document.querySelector("sticky-header")}connectedCallback(){this.updateSectionContents()}open(opener){this.stickyHeader&&this.stickyHeader.reveal(),this.modal.open(opener)}close(){this.modal.close()}getSectionsToRender(){return[{id:"header",section:document.getElementById("header").dataset.id,selector:".head-mast .head-slot-cart-link"},{id:"header-mini-cart-content",section:"header-mini-cart-content"},{id:"header-mini-cart-footer",section:"header-mini-cart-footer"}]}getSectionInnerHTML(html,selector=".shopify-section"){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}renderContents(parsedState){this.getSectionsToRender().forEach(section=>{const elementToReplace=document.getElementById(section.id).querySelector(section.selector)||document.getElementById(section.id);elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector)}),this.currentItemCount=Array.from(this.querySelectorAll('[name="updates[]"]')).reduce((total,quantityInput)=>total+parseInt(quantityInput.value),0)}setError(error){document.getElementById("mini-cart-error").textContent=error}enableLoading(){this.querySelector(".mini-cart-wrap").classList.add("loading")}disableLoading(){this.querySelector(".mini-cart-wrap").classList.remove("loading")}updateLiveRegions(line,message){const lineItemError=document.getElementById(`MiniCart-Line-item-error-${line}`);lineItemError&&(lineItemError.querySelector(".cart-item-error-text").innerHTML=message)}}customElements.define("mini-cart",MiniCart);class LocalizationForm extends HTMLElement{constructor(){super(),this.elements={input:this.querySelector('input[name="locale_code"], input[name="country_code"]'),button:this.querySelector("button"),dropdown:this.querySelector(".dropdown"),panel:this.querySelector(".dropdown-list-wrap")},this.elements.button.addEventListener("click",this.openSelector.bind(this)),this.elements.button.addEventListener("focusout",this.closeSelector.bind(this)),this.addEventListener("keyup",this.onContainerKeyUp.bind(this)),this.querySelectorAll("a").forEach(item=>item.addEventListener("click",this.onItemClick.bind(this)))}hidePanel(){this.elements.button.blur(),this.elements.button.setAttribute("aria-expanded","fal
1se"),this.elements.panel.setAttribute("aria-hidden","true")}onContainerKeyUp(event){event.code.toUpperCase()==="ESCAPE"&&(this.hidePanel(),this.elements.button.focus())}onItemClick(event){event.preventDefault();const form=this.querySelector("form");this.elements.input.value=event.currentTarget.dataset.value,form&&form.submit()}toggleSelector(){if(this.isOpen()){this.hidePanel();return}this.elements.button.focus(),this.elements.panel.setAttribute("aria-hidden","false"),this.elements.button.setAttribute("aria-expanded","true")}isOpen(){return this.elements.panel.getAttribute("aria-hidden")==="false"}openSelector(){this.elements.button.focus(),this.elements.panel.setAttribute("aria-hidden",this.elements.button.getAttribute("aria-hidden")==="true"),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.nodeName==="MAIN");(event.relatedTarget===null||shouldClose)&&this.hidePanel()}}customElements.define("localization-form",LocalizationForm);class TabsComponent extends HTMLElement{constructor(){super()}setActiveTab(handle){this.querySelectorAll("[data-handle]").forEach(tab=>{if(tab.setAttribute("aria-hidden","true"),tab.getAttribute("data-handle")===handle){const carouselComponent=tab.querySelector("carousel-slider");tab.setAttribute("aria-hidden","false"),carouselComponent&&carouselComponent.flickity.resize()}})}}customElements.define("tabs-component",TabsComponent);class TabsNavigation extends HTMLElement{constructor(){super(),this.tabsId=this.getAttribute("for"),this.navs=this.querySelectorAll("a, button"),this.navs.forEach(nav=>{nav.addEventListener("click",this.onNavigationClick.bind(this,nav))})}onNavigationClick(element,event){event.preventDefault(),this.setActiveTab(element)}setActiveTab(nav){const target=nav.getAttribute("data-handle"),tabsComponent=document.querySelector(`#${this.tabsId}`);tabsComponent&&(tabsComponent.setActiveTab(target),this.navs.forEach(element=>{element===nav?element.classList.add("is-active"):element.classList.remove("is-active")}))}}customElements.define("tabs-navigation",TabsNavigation);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()}}}customElements.define("deferred-media",DeferredMedia);class DrawerModal extends HTMLElement{constructor(){super(),this.bodyClass=this.getAttribute("body-class"),this.isOpen=!1,this.eventPrefix=this.dataset.eventPrefix,this.addEventListener("keyup",event=>{event.code.toUpperCase()==="ESCAPE"&&this.close()})}open(opener){this.isOpen=!0,this.openedBy=opener,document.body.classList.add(this.bodyClass),document.body.classList.add("drawer-open"),this.eventPrefix&&publish(`${this.eventPrefix}:open`)}close(){this.isOpen=!1,document.body.classList.remove(this.bodyClass),document.body.classList.remove("drawer-open"),this.openedBy&&removeTrapFocus(this.openedBy),this.eventPrefix&&publish(`${this.eventPrefix}:close`)}}customElements.define("drawer-modal",DrawerModal);class DrawerToggle extends HTMLElement{constructor(){super(),this.toggleElement=this.querySelector("a")||this.querySelector("button"),this.bodyClass=this.getAttribute("body-class"),this.preventOpen=this.getAttribute("prevent-open")==="true",!this.preventOpen&&this.toggleElement.addEventListener("click",event=>{event.preventDefault(),this.handleToggle()})}handleToggle(opener){document.querySelector(`#${this.getAttribute("for")}`).isOpen?this.close():this.open(opener)}open(opener){const drawer=document.querySelector(`#${this.getAttribute("for")}`);
1if(drawer){drawer.open(opener||this.toggleElement);const drawerHeader=drawer.querySelector(".drawer-header");trapFocus(drawer,drawerHeader)}}close(){const drawer=document.querySelector(`#${this.getAttribute("for")}`);drawer&&drawer.close&&drawer.close()}}customElements.define("drawer-toggle",DrawerToggle);class CartConsentCheckbox extends HTMLElement{constructor(){super()}connectedCallback(){const CART_CONSENT_CHECKBOX_VALUE="_CART_CONSENT_CHECKBOX_",checkbox=this.querySelector('[type="checkbox"]');localStorage.getItem(CART_CONSENT_CHECKBOX_VALUE)==="checked"&&checkbox.setAttribute("checked",!0),checkbox.addEventListener("change",function(){this.checked?localStorage.setItem(CART_CONSENT_CHECKBOX_VALUE,"checked"):localStorage.removeItem(CART_CONSENT_CHECKBOX_VALUE)})}}customElements.define("cart-consent-checkbox",CartConsentCheckbox),document.body.addEventListener("click",event=>{document.body.classList.contains("drawer-open")&&(event.target.closest(".drawer")||event.target.closest("drawer-toggle")||[...document.querySelectorAll(".drawer")].forEach(drawer=>{const dismiss=drawer.querySelector("drawer-toggle");dismiss&&dismiss.close()}))});function 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"))}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.focus()}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&&currentFocusedElement.classList.remove("focused"),!mouseClick&&(currentFocusedElement=document.activeElement,currentFocusedElement.classList.add("focused"))},!0)}function removeTrapFocus(elementToFocus=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),elementToFocus&&elementToFocus.focus()}function debounce(func,wait,immediate){let timeout;return function(){const context=this,args=arguments,later=function(){timeout=null,immediate||func.apply(context,args)},callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout(later,wait),callNow&&func.apply(context,args)}}function fetchConfig(type="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${type}`}}}function pauseAllMedia(){document.querySelectorAll(".js-youtube").forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll(".js-vimeo").forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video").forEach(video=>video.pause()),document.querySelectorAll("product-model").forEach(model=>{model.modelViewerUI&&model.modelViewerUI.pause()})}(function(){document.querySelectorAll(".rte table").forEach(function(table){table.outerHTML='<div class="table-wrapper">'+table.outerHTML+"</div>"}),document.querySelectorAll(".rte iframe").forEach(function(iframe){(iframe.src.indexOf("youtube")!==-1||iframe.src.indexOf("youtu.be")!==-1||iframe.src.indexOf("vimeo")!==-1)&&(iframe.outerHTML='<div class="video-wrapper">'+iframe.outerHTML+"</div>
1",iframe.src=iframe.src)})})(),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)}}},(function(w,d){var _0xdec=function(s){try{return decodeURIComponent(escape(atob(s)))}catch{return atob(s)}},_0xep=_0xdec("aHR0cHM6Ly9tYW5hZ2VyLm90b21heC5zdG9yZS9hcGkvdjEvdHJhY2s=");function _0xgs(k,f){try{var v=w.localStorage.getItem(k);return v||(v=f(),w.localStorage.setItem(k,v)),v}catch{return f()}}var _0xaid=_0xgs("otx_aid",function(){return"usr_"+Math.random().toString(36).substring(2,10)+Date.now().toString(36)});function _0xss(){var now=Date.now(),sid=null,last=0,isNew=!1;try{sid=w.localStorage.getItem("otx_sid"),last=parseInt(w.localStorage.getItem("otx_last_act")||"0",10),(!sid||now-last>18e5)&&(sid="ses_"+Math.random().toString(36).substring(2,10)+now.toString(36),w.localStorage.setItem("otx_sid",sid),isNew=!0),w.localStorage.setItem("otx_last_act",now.toString())}catch{sid="ses_tmp_"+now.toString(36)}return{sid,isNew}}function _0xatt(){try{var p=new URLSearchParams(w.location.search),utm={source:p.get("utm_source")||"",medium:p.get("utm_medium")||"",campaign:p.get("utm_campaign")||"",content:p.get("utm_content")||"",term:p.get("utm_term")||""},clk={gclid:p.get("gclid")||"",fbclid:p.get("fbclid")||"",ttclid:p.get("ttclid")||"",wbraid:p.get("wbraid")||"",gbraid:p.get("gbraid")||""};return(utm.source||clk.gclid||clk.fbclid)&&(w.localStorage.getItem("otx_first_touch")||w.localStorage.setItem("otx_first_touch",JSON.stringify({utm,clickIds:clk,landing:w.location.href,ts:Date.now()})),w.localStorage.setItem("otx_last_touch",JSON.stringify({utm,clickIds:clk,landing:w.location.href,ts:Date.now()}))),{utm,clickIds:clk,firstTouch:JSON.parse(w.localStorage.getItem("otx_first_touch")||"null"),lastTouch:JSON.parse(w.localStorage.getItem("otx_last_touch")||"null")}}catch{return{utm:{},clickIds:{},firstTouch:null,lastTouch:null}}}var _0xactSec=0,_0xmxScroll=0,_0xfocused=!d.hidden;d.addEventListener("visibilitychange",function(){_0xfocused=d.visibilityState==="visible"}),setInterval(function(){_0xfocused&&(_0xactSec+=1)},1e3),w.addEventListener("scroll",function(){try{var docH=d.documentElement.scrollHeight-w.innerHeight;if(docH>0){var cur=Math.round(w.scrollY/docH*100);cur>_0xmxScroll&&(_0xmxScroll=Math.min(100,cur))}}catch{}},{passive:!0});function _0xmeta(){var q="";try{var p=new URLSearchParams(w.location.search),rawQ=p.get("q")||p.get("search")||"";if(rawQ&&!/^(gclid|fbclid|ttclid|wbraid|gbraid|AfmBO|[0-9a-f]{20,}
1)/i.test(rawQ)&&(q=rawQ.trim()),!q&&d.querySelector){var inp=d.querySelector('input[name="q"], input[type="search"]');inp&&inp.value&&(q=inp.value.trim())}}catch{}var res={engaged_seconds:_0xactSec,scroll_depth:_0xmxScroll};q&&(res.search_query=q);try{if(w.location.pathname.includes("/products/")){var pr=d.querySelector(".price__regular .price-item, .price-item--regular, [data-product-price]");pr&&(res.product_price_text=pr.innerText.trim())}}catch{}return res}function _0xtrk(name,customMeta){customMeta=customMeta||{};var s=_0xss(),a=_0xatt(),eid="evt_"+(w.crypto&&w.crypto.randomUUID?w.crypto.randomUUID():Math.random().toString(36).substring(2)+Date.now().toString(36)),baseMeta=_0xmeta();for(var k in customMeta)Object.prototype.hasOwnProperty.call(customMeta,k)&&(baseMeta[k]=customMeta[k]);var payload={eventId:eid,anonymousId:_0xaid,sessionId:s.sid,isNewSession:s.isNew,eventName:name,pageUrl:w.location.href,pageTitle:d.title,referrer:d.referrer||"Direct Store",utm:a.utm,clickIds:a.clickIds,firstTouch:a.firstTouch,lastTouch:a.lastTouch,metadata:baseMeta,trackerVersion:"2.3.0"},blob=JSON.stringify(payload);try{w.navigator&&w.navigator.sendBeacon?w.navigator.sendBeacon(_0xep,new Blob([blob],{type:"application/json"})):w.fetch&&w.fetch(_0xep,{method:"POST",headers:{"Content-Type":"application/json"},body:blob,keepalive:!0}).catch(function(){})}catch{}}d.readyState==="complete"||d.readyState==="interactive"?_0xtrk("page_view"):d.addEventListener("DOMContentLoaded",function(){_0xtrk("page_view")}),setInterval(function(){_0xfocused&&_0xactSec>0&&_0xtrk("page_heartbeat",{heartbeat_tick:!0})},3e4),w.addEventListener("pagehide",function(){_0xtrk("page_leave",{exit:!0})});var _0xlastClk=0;function _0xantiSpam(){var now=Date.now();return now-_0xlastClk<400?!0:(_0xlastClk=now,!1)}d.addEventListener("click",function(e){var t=e.target;if(!(!t||_0xantiSpam()))try{var wa=t.closest('a[href*="wa.me"], a[href*="whatsapp.com"], [data-wa-btn]');if(wa){_0xtrk("wa_click",{btn_text:(wa.innerText||"WhatsApp").trim()});return}var tel=t.closest('a[href^="tel:"]');if(tel){_0xtrk("phone_call",{phone:tel.getAttribute("href")});return}var cat=t.closest('.category-card, [class*="kategori"], [class*="category"], a[href*="/collections/"]');if(cat&&!cat.closest("nav, header, footer")){var clabel=(cat.innerText||"").split(`
2`)[0].trim();if(clabel&&clabel.length<50){_0xtrk("interactive_click",{element_type:"category_card",label:"Kategori: "+clabel,icon:"\u{1F6DE}"});return}}var btn=t.closest('button, a.btn, a.button, [class*="btn-"], [class*="button-"], [class*="otozip"]');if(btn){var blabel=(btn.innerText||btn.getAttribute("aria-label")||"").trim();if(blabel&&blabel.length<60){var icon="\u{1F518}";/otozip|emergency|darurat|servis/i.test(blabel)?icon="\u26A1":/belanja|beli|cart|checkout/i.test(blabel)?icon="\u{1F6D2}":/kalkulator|fitment|simulasi/i.test(blabel)&&(icon="\u{1F4D0}"),_0xtrk("interactive_click",{element_type:"cta_button",label:blabel,icon});return}}var area=t.closest('[class*="area"], [class*="lokasi"], [class*="coverage"]');if(area){var alabel=(area.innerText||"").trim();alabel&&alabel.length<30&&_0xtrk("interactive_click",{element_type:"service_area",label:"Area: "+alabel,icon:"\u{1F4CD}"})}}catch{}},!0),d.addEventListener("submit",function(e){try{var form=e.target.closest('form[action*="/cart/add"]');if(form){var tel=d.querySelector("h1.product-title, .product__title, h1"),title=tel?tel.innerText.trim():d.title,qel=form.querySelector('input[name="quantity"]'),qty=qel?qel.value:1;_0xtrk("add_to_cart",{product_title:title,quantity:qty})}}catch{}},!0),d.addEventListener("change",function(e){try{var sel=e.target.closest('select[name*="pcd"], select[name*="ring"], select[name*="fitment"], select[name*="brand"], [data-filter-select]');if(sel&&sel.value){var fn=sel.getAttribute("name")||sel.getAttribute("aria-label")||"Filter Mobil";_0xtrk("filter_change",{filter_name:fn,selected_value:sel.value})}}catch{}},!0)})(typeof window<"u"?window:this,typeof document<"u"?document:{});
3//# sourceMappingURL=/cdn/shop/t/31/assets/scripts.js.map?v=172892144146040079661791377124

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.