PageSourceSearch

https://udggear.com/cdn/shop/t/62/compiled_assets/snippet-scripts.js?v=56328719812517536651789634541

js udggear.com collected 2026-10-04 08:01:40 UTC 26,116 bytes, 2 lines download raw bytes

1(function(){var __snippets__={};(function(){for(var element=document.getElementById("snippets-script"),attribute=element?element.getAttribute("data-snippets"):"",snippets=attribute.split(",").filter(Boolean),i=0;i<snippets.length;i++)__snippets__[snippets[i]]=!0})(),(function(){if(!(!__snippets__["element.select"]&&!Shopify.designMode))try{class ElementSelect extends HTMLElement{constructor(){super(),this.select=null,this.buttonText=null,this.button=null}connectedCallback(){this.select=this.querySelector("select"),this.button=this.querySelector(".element-button"),this.select&&this.button&&this.init()}init(){this.buttonText=this.button.querySelector(".element-text")||this.button.querySelector("[data-button-text]"),this.updateButtonText(),this.button.addEventListener("click",e=>this.handleButtonClick(e)),this.select.addEventListener("keydown",e=>this.handleKeydown(e)),this.select.addEventListener("change",()=>this.updateButtonText()),this.select.addEventListener("focus",()=>this.handleFocus()),this.select.addEventListener("blur",()=>this.handleBlur())}handleButtonClick(e){e.preventDefault(),e.stopPropagation(),this.select.focus(),this.select.click()}handleKeydown(e){switch(e.key){case"Enter":case" ":e.preventDefault(),this.select.click();break;case"ArrowDown":case"ArrowUp":break;default:break}}updateButtonText(){if(!this.buttonText)return;const selectedOption=this.select.options[this.select.selectedIndex];selectedOption&&selectedOption.value!==""?this.buttonText.textContent=selectedOption.textContent:this.buttonText.textContent=this.select.getAttribute("aria-label")||"Select an option"}handleFocus(){this.classList.add("element-select__wrapper--focused")}handleBlur(){this.classList.remove("element-select__wrapper--focused")}disconnectedCallback(){this.button&&this.button.removeEventListener("click",e=>this.handleButtonClick(e)),this.select&&(this.select.removeEventListener("keydown",e=>this.handleKeydown(e)),this.select.removeEventListener("change",()=>this.updateButtonText()),this.select.removeEventListener("focus",()=>this.handleFocus()),this.select.removeEventListener("blur",()=>this.handleBlur()))}}customElements.define("element-select",ElementSelect)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["form.customer"]&&!Shopify.designMode))try{class FormCustomer extends HTMLElement{static emailPattern=/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;connectedCallback(){this.controller?.abort();const{signal}=this.controller=new AbortController,form=this.querySelector("form"),input=form?.querySelector('input[name="contact[email]"]');if(!input)return;const validate=()=>{const ok=FormCustomer.emailPattern.test(input.value.trim());input.setCustomValidity(ok?"":this.dataset.invalidMessage)};input.addEventListener("input",validate,{signal}),form.addEventListener("submit",e=>{validate(),form.reportValidity()||e.preventDefault()},{signal,passive:!1})}disconnectedCallback(){this.controller?.abort()}}customElements.define("form-customer",FormCustomer)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["form.product"]&&!Shopify.designMode))try{class ProductForm extends HTMLElement{constructor(){super(),this.form=this.querySelector("form"),this.submitButton=this.findSubmitButton(),this.form.addEventListener("submit",this.onSubmitHandler.bind(this))}findSubmitButton(){return this.form.querySelector('button[type="submit"], input[type="submit"]')}disableSubmitButton(){this.submitButton&&(this.submitButton.disabled=!0,this.submitButton.classList.add("product-form__submit-button--pulsing"))}enableSubmitButton(){this.submitButton&&(this.submitButton.disabled=!1,this.submitButton.classList.remove("product-form__submit-button--pulsing"))}async onSubmitHandler(evt){evt.preventDefault(),this.disableSubmitButton();let cartBeforeSubmission;try{cartBeforeSubmission=await(await fetch(`${window.Shopify.routes.root}cart.js`)).json()}catch(error){console.error("Failed to get cart state before submission:",error),cartBeforeSubmission=null}const config={method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"}},formData=new FormData(this.form);this.dispatchEvent(new CustomEvent("product-form:submit:before",{bubbles:!0,detail:{form:formData},cancelable:!0})),await new Promise(resolve=>{queueMicrotask(resolve)}),config.body=formData;
1const cartRequestEvent=new CustomEvent("product-form:cart:request",{bubbles:!0,cancelable:!0,detail:{form:formData,config,cartBefore:cartBeforeSubmission,resolve:responseData2=>this.resolveCartRequest(responseData2),reject:error=>this.rejectCartRequest(error)}}),cartRequestHandled=!this.dispatchEvent(cartRequestEvent);let responseData;try{if(cartRequestHandled)responseData=await this.waitForCartResponse();else{const response=await fetch(`${window.Shopify.routes.root}cart/add.js`,config);if(responseData=await response.json(),!response.ok)throw responseData}const cartAfterSubmission=await(await fetch(`${window.Shopify.routes.root}cart.js`)).json();this.dispatchEvent(new CustomEvent("product-form:submit:success",{bubbles:!0,detail:{form:formData,response:responseData,cart:cartAfterSubmission}})),this.hasCartChanged(cartBeforeSubmission,cartAfterSubmission)&&this.dispatchEvent(new CustomEvent("product-form:cart:update",{bubbles:!0,detail:{cart:cartAfterSubmission,form:formData,response:responseData}}));const cartNavigationEvent=new CustomEvent("product-form:cart:navigate",{bubbles:!0,cancelable:!0,detail:{form:formData,response:responseData,cart:cartAfterSubmission}});!this.dispatchEvent(cartNavigationEvent)||(window.location.href=`${window.Shopify.routes.root}cart`)}catch(error){this.dispatchEvent(new CustomEvent("product-form:submit:error",{bubbles:!0,detail:{form:formData,cart:cartBeforeSubmission,error}}))}finally{this.enableSubmitButton()}}waitForCartResponse(){return new Promise((resolve,reject)=>{this._cartRequestResolver={resolve,reject};const timeout=setTimeout(()=>{this._cartRequestResolver&&(delete this._cartRequestResolver,reject(new Error("Cart request timeout - no response received from subscriber")))},3e4);this._cartRequestResolver.timeout=timeout})}resolveCartRequest(responseData){this._cartRequestResolver&&(clearTimeout(this._cartRequestResolver.timeout),this._cartRequestResolver.resolve(responseData),delete this._cartRequestResolver)}rejectCartRequest(error){this._cartRequestResolver&&(clearTimeout(this._cartRequestResolver.timeout),this._cartRequestResolver.reject(error),delete this._cartRequestResolver)}hasCartChanged(cartBefore,cartAfter){return!cartBefore||!cartAfter?!0:JSON.stringify(cartBefore)!==JSON.stringify(cartAfter)}}customElements.define("product-form",ProductForm)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["form.product.messages"]&&!Shopify.designMode))try{class ProductFormMessages extends HTMLElement{constructor(){super(),this.formId=this.dataset.formId,this.defaultErrorMessage=this.dataset.error,this.defaultSuccessMessage=this.dataset.success,this.abortController=new AbortController}connectedCallback(){this.cacheTemplate(),this.bindEvents()}disconnectedCallback(){this.abortController.abort()}cacheTemplate(){const template=this.querySelector("template");template&&(this.template=template.innerHTML,this.templateElement=template)}bindEvents(){const{signal}=this.abortController;document.addEventListener("product-form:submit:before",this.handleSubmitStart.bind(this),{signal}),document.addEventListener("product-form:submit:error",this.handleError.bind(this),{signal}),document.addEventListener("product-form:submit:success",this.handleSuccess.bind(this),{signal})}handleSubmitStart(e){e.target.form.getAttribute("id")===this.formId&&this.clearMessages()}handleSuccess(e){if(e.target.form.getAttribute("id")!==this.formId)return;let message=this.defaultSuccessMessage;const successMessageEvent=new CustomEvent("product-form:message:success",{bubbles:!0,cancelable:!0,detail:{form:e.target.form,response:e.detail.response,cart:e.detail.cart,message}});this.dispatchEvent(successMessageEvent)&&this.showMessage(successMessageEvent.detail.message)}handleError(e){if(e.target.form.getAttribute("id")!==this.formId)return;const error=e.detail.error;let message=this.defaultErrorMessage;error.description?message=error.description:error.message&&(message=error.message);const errorMessageEvent=new CustomEvent("product-form:message:error",{bubbles:!0,cancelable:!0,detail:{form:e.target.form,response:e.detail.response,cart:e.detail.cart,message}});this.dispatchEvent(errorMessageEvent)&&this.showMessage(errorMessageEvent.detail.message)}showMessage(message){if(this.clearMessages(),this.classList.remove("hide"),this.template){const messageContent=this.template.replace("<slot></slot>",message);this.innerHTML=messageContent}}clearMessages(){this.classList.add("hide"),this.templateElement&&(this.innerHTML=this.templateElement.outerHTML)}}customElements.define("product-form-messages",ProductFormMessages)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["layout.grid"]&&!Shopify.designMode))try{class LayoutGrid extends HTMLElement{constructor(){super()}connectedCallback(){this.attachShadowRoots(this)}attachShadowRoots(element){this.shadowRoot||element.querySelectorAll("template[shadowrootmode]").forEach(template=>{const mode=template.getAttribute("shadowrootmode"),shadowRoot=template.parentNode.attachShadow({mode});shadowRoot.appendChild(template.content),template.remove(),this.attachShadowRoots(shadowRoot)})}}customElements.define("layout-grid",LayoutGrid)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["layout.stack"]&&!Shopify.designMode))try{class LayoutStack extends HTMLElement{constructor(){super()}connectedCallback(){this.attachShadowRoots(this)}attachShadowRoots(element){this.shadowRoot||element.querySelectorAll("template[shadowrootmode]").forEach(template=>{const mode=template.getAttribute("shadowrootmode"),shadowRoot=template.parentNode.attachShadow({mode});shadowRoot.appendChild(template.content),template.remove(),this.attachShadowRoots(shadowRoot)})}}customElements.define("layout-stack",LayoutStack)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["layout.sticky-scroller"]&&!Shopify.designMode))try{class StickyScroller extends HTMLElement{constructor(){super(),this.resizeObserver=new ResizeObserver(()=>this.recalculateStyles()),this.abortController=new AbortController,this.isScrolling=!1,this.position="relative",this.lastKnownScrollY=0,this.initialTop=0,this.currentTop=0,this.boundOnScroll=this.onScroll.bind(this)}connectedCallback(){this.inView(this,this.setupObservers.bind(this),{margin:"500px"})}disconnectedCallback(){this.cleanupObservers()}setupObservers(){return this.resizeObserver.observe(this),window.addEventListener("scroll",this.boundOnScroll,{passive:!0,signal:this.abortController.signal}),this.cleanupObservers.bind(this)}cleanupObservers(){this.abortController.abort(),this.resizeObserver.disconnect()}onScroll(){this.isScrolling||(requestAnimationFrame(()=>{this.updatePosition(),this.isScrolling=!1}),this.isScrolling=!0)}recalculateStyles(){this.style.removeProperty("top");const{top,position}=getComputedStyle(this);
1this.initialTop=parseInt(top,10),this.position=position,this.updatePosition()}updatePosition(){if(this.position!=="sticky"){this.style.removeProperty("top");return}const{top,height}=this.getBoundingClientRect(),maxTop=top+window.scrollY-this.offsetTop+this.initialTop,minTop=height-window.innerHeight+20;this.currentTop+=this.lastKnownScrollY-window.scrollY,this.currentTop=Math.min(Math.max(this.currentTop,-minTop),maxTop,this.initialTop),this.lastKnownScrollY=window.scrollY,this.style.top=`${Math.round(this.currentTop)}px`}inView(elementOrSelector,onStart,{root,margin:rootMargin,amount="any"}={}){const thresholds={any:0,all:1};if(typeof IntersectionObserver>"u")return()=>{};let elements;typeof elementOrSelector=="string"?elements=document.querySelectorAll(elementOrSelector):elementOrSelector instanceof Element?elements=[elementOrSelector]:elements=Array.from(elementOrSelector||[]);const activeIntersections=new WeakMap,onIntersectionChange=entries=>{entries.forEach(entry=>{const onEnd=activeIntersections.get(entry.target);if(entry.isIntersecting!==!!onEnd)if(entry.isIntersecting){const newOnEnd=onStart(entry);typeof newOnEnd=="function"?activeIntersections.set(entry.target,newOnEnd):observer.unobserve(entry.target)}else onEnd&&(onEnd(entry),activeIntersections.delete(entry.target))})},observer=new IntersectionObserver(onIntersectionChange,{root,rootMargin,threshold:typeof amount=="number"?amount:thresholds[amount]});return elements.forEach(element=>observer.observe(element)),()=>observer.disconnect()}}customElements.define("sticky-scroller",StickyScroller)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["overlay.drawer"]&&!Shopify.designMode))try{let animateWithClass2=function(element,className){return window.matchMedia("(prefers-reduced-motion: reduce)").matches?Promise.resolve():new Promise(resolve=>{function handleAnimationEnd(event){event.target===element&&(element.removeEventListener("animationend",handleAnimationEnd),element.classList.remove(className),resolve())}element.addEventListener("animationend",handleAnimationEnd),element.classList.add(className)})};var animateWithClass=animateWithClass2;class OverlayDrawer extends HTMLElement{#dialog=null;#originalTrigger=null;#abortController=null;connectedCallback(){if(this.#dialog=this.querySelector("dialog"),!this.#dialog)return;this.#abortController=new AbortController;const{signal}=this.#abortController;this.#dialog.addEventListener("cancel",e=>this.#handleCancel(e),{signal}),this.#dialog.addEventListener("click",e=>this.#handleClick(e),{signal}),this.#dialog.addEventListener("pointerdown",e=>this.#handlePointerDown(e),{signal})}disconnectedCallback(){this.#abortController?.abort()}get lightDismiss(){return this.getAttribute("light-dismiss")!=="false"}async show(){if(this.#dialog.open)return;const showEvent=new CustomEvent("drawer:show",{bubbles:!0,cancelable:!0});this.dispatchEvent(showEvent),!showEvent.defaultPrevented&&(this.#originalTrigger=document.activeElement,this.#dialog.showModal(),await animateWithClass2(this.#dialog,"overlay-drawer--show"),requestAnimationFrame(()=>{this.#dialog.contains(document.activeElement)||(this.#dialog.querySelector("[autofocus]")?.focus()??this.#dialog.focus())}),this.dispatchEvent(new CustomEvent("drawer:after-show",{bubbles:!0})))}async hide(source=this){if(!this.#dialog.open)return;const hideEvent=new CustomEvent("drawer:hide",{bubbles:!0,cancelable:!0,detail:{source}});if(this.dispatchEvent(hideEvent),hideEvent.defaultPrevented){await animateWithClass2(this.#dialog,"overlay-drawer--pulse");return}await animateWithClass2(this.#dialog,"overlay-drawer--hide"),this.#dialog.close(),this.#originalTrigger?.focus&&setTimeout(()=>{try{this.#originalTrigger.focus({preventScroll:!0})}catch{this.#originalTrigger.focus()}},0),this.dispatchEvent(new CustomEvent("drawer:after-hide",{bubbles:!0}))}#handleCancel(event){event.preventDefault(),this.hide(this)}#handleClick(event){const closeButton=event.target.closest('[data-drawer="close"]');closeButton&&(event.stopPropagation(),this.hide(closeButton))}async#handlePointerDown(event){if(event.target!==this.#dialog)return;const rect=this.#dialog.getBoundingClientRect();event.clientX>=rect.left&&event.clientX<=rect.right&&event.clientY>
1=rect.top&&event.clientY<=rect.bottom||(this.lightDismiss?this.hide(this):await animateWithClass2(this.#dialog,"overlay-drawer--pulse"))}}customElements.define("overlay-drawer",OverlayDrawer),document.addEventListener("click",event=>{const trigger=event.target.closest("[data-drawer]");if(!trigger)return;const attr=trigger.getAttribute("data-drawer");if(!attr)return;const[command,id]=attr.trim().split(/\s+/);if(command==="open"&&id){const drawer=document.getElementById(id);drawer?.tagName==="OVERLAY-DRAWER"&&(event.preventDefault(),drawer.show())}}),document.body.addEventListener("pointerdown",()=>{})}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["overlay.lightbox"]&&!Shopify.designMode))try{class OverlayLightbox extends HTMLElement{static registry=new Map;static prefetchedGroups=new Set;constructor(){super(),this.trigger=null,this.template=null,this.overlay=null,this.closeBtn=null,this.prevBtn=null,this.nextBtn=null,this.group=this.dataset.group,this.groupItems=[],this.currentIndex=0,this.group&&(OverlayLightbox.registry.has(this.group)||OverlayLightbox.registry.set(this.group,[]),OverlayLightbox.registry.get(this.group).push(this))}connectedCallback(){this.trigger=this.querySelector(".overlay-lightbox__trigger"),this.template=this.querySelector(".overlay-lightbox__template"),this.init()}init(){this.trigger&&this.trigger.addEventListener("click",e=>{e.preventDefault(),this.openLightbox()}),document.addEventListener("keydown",e=>{e.key==="Escape"&&this.isOpen()?this.closeLightbox():this.isOpen()&&this.group&&(e.key==="ArrowLeft"?(e.preventDefault(),this.navigateToPrevious()):e.key==="ArrowRight"&&(e.preventDefault(),this.navigateToNext()))})}openLightbox(){this.overlay||this.createOverlay(),this.overlay.classList.add("overlay-lightbox__overlay--open"),document.body.style.overflow="hidden",this.group?(this.findGroupItems(),this.prefetchGroupImages(),this.groupItems.length<=1?this.overlay.classList.add("overlay-lightbox__overlay--single-item"):this.overlay.classList.remove("overlay-lightbox__overlay--single-item")):this.overlay.classList.add("overlay-lightbox__overlay--single-item")}createOverlay(){if(!this.template){console.error("OverlayLightbox: Template not found");return}if(this.overlay=this.template.content.cloneNode(!0).querySelector(".overlay-lightbox__overlay"),!this.overlay){console.error("OverlayLightbox: Overlay element not found in template");return}this.closeBtn=this.overlay.querySelector(".lightbox-close"),this.prevBtn=this.overlay.querySelector(".overlay-lightbox__nav--prev"),this.nextBtn=this.overlay.querySelector(".overlay-lightbox__nav--next"),this.closeBtn&&this.closeBtn.addEventListener("click",e=>{e.preventDefault(),this.closeLightbox()}),this.prevBtn&&this.prevBtn.addEventListener("click",e=>{e.preventDefault(),this.navigateToPrevious()}),this.nextBtn&&this.nextBtn.addEventListener("click",e=>{e.preventDefault(),this.navigateToNext()}),this.overlay&&this.overlay.addEventListener("click",e=>{e.target===this.overlay&&this.closeLightbox()}),this.overlay&&document.body.appendChild(this.overlay)}closeLightbox(){this.overlay&&(this.overlay.classList.remove("overlay-lightbox__overlay--open"),this.overlay.classList.remove("overlay-lightbox__overlay--single-item"),this.overlay.parentNode&&(this.overlay.parentNode.removeChild(this.overlay),this.overlay=null,this.closeBtn=null,this.prevBtn=null,this.nextBtn=null)),document.body.style.overflow=""}findGroupItems(){this.groupItems=OverlayLightbox.registry.get(this.group)||[],this.currentIndex=this.groupItems.indexOf(this)}navigateToPrevious(){if(!this.group||this.groupItems.length<=1)return;let targetIndex=this.currentIndex-1;targetIndex<0&&(targetIndex=this.groupItems.length-1);const targetLightbox=this.groupItems[targetIndex];targetLightbox&&this.switchToLightbox(targetLightbox)}navigateToNext(){if(!this.group||this.groupItems.length<=1)return;let targetIndex=this.currentIndex+1;targetIndex>=this.groupItems.length&&(targetIndex=0);const targetLightbox=this.groupItems[targetIndex];targetLightbox&&this.switchToLightbox(targetLightbox)}switchToLightbox(targetLightbox){this.closeLightbox(),targetLightbox.openLightbox()}prefetchGroupImages(){this.group&&!OverlayLightbox.prefetchedGroups.has(this.group)&&(OverlayLightbox.prefetchedGroups.add(this.group),this.groupItems.forEac
1h(lightbox=>{lightbox.querySelectorAll("img").forEach(img=>{this.prefetchLargestImage(img)})}))}prefetchLargestImage(img){if(img.srcset){const srcsetUrls=img.srcset.split(",").map(src=>src.trim().split(" ")[0]);let largestUrl=img.src,largestSize=0;srcsetUrls.forEach(url=>{const size=this.extractImageSize(url);size>largestSize&&(largestSize=size,largestUrl=url)}),this.prefetchImage(largestUrl)}else{const largestUrl=this.getLargestImageUrl(img.src);this.prefetchImage(largestUrl)}}extractImageSize(url){try{const urlObj=new URL(url);if(urlObj.searchParams.has("width"))return parseInt(urlObj.searchParams.get("width"))||0;const pathParts=urlObj.pathname.split("_");if(pathParts.length>1){const sizeMatch=pathParts[pathParts.length-1].match(/(\d+)x/);if(sizeMatch)return parseInt(sizeMatch[1])||0}}catch{}return 0}getLargestImageUrl(originalUrl){try{const url=new URL(originalUrl);if(url.searchParams.has("width"))return url.searchParams.set("width","2400"),url.toString();if(url.pathname.includes("_")){const pathParts=url.pathname.split("_");if(pathParts.length>1){const extension=pathParts[pathParts.length-1].split(".")[1]||"jpg",newPath=pathParts.slice(0,-1).join("_")+"_2400x."+extension;return url.pathname=newPath,url.toString()}}}catch{}return originalUrl}prefetchImage(url){const prefetchImg=new Image;prefetchImg.src=url}isOpen(){return this.overlay&&this.overlay.classList.contains("overlay-lightbox__overlay--open")}disconnectedCallback(){if(this.group){const groupItems=OverlayLightbox.registry.get(this.group);if(groupItems){const index=groupItems.indexOf(this);index>-1&&groupItems.splice(index,1),groupItems.length===0&&OverlayLightbox.registry.delete(this.group)}}}}customElements.define("overlay-lightbox",OverlayLightbox)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["product.hot-reload"]&&!Shopify.designMode))try{class ProductHotReload extends HTMLElement{constructor(){super(),this.cache=new Map,this.activeRequests=new Map,this.loadingTimeout=null,this.supportsViewTransitions="startViewTransition"in document,this.addEventListener("change",event=>this.onVariantChange(event)),this.addEventListener("mouseover",event=>this.onMouseOver(event))}showLoadingState(){this.loadingTimeout=setTimeout(()=>{this.classList.add("product-hot-reload--loading")},200)}hideLoadingState(){this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.classList.remove("product-hot-reload--loading")}buildRequestUrl(input){const productFormElement=input.closest("form"),sectionId=this.dataset.sectionId;let newProductUrl,optionValueId;if(input.type==="radio")newProductUrl=input.dataset.productUrl,optionValueId=input.dataset.optionValueId;else if(input.tagName==="SELECT"){const selectedOption=input.options[input.selectedIndex];newProductUrl=selectedOption.dataset.productUrl,optionValueId=selectedOption.dataset.optionValueId}let selectedOptionValues=[];if(selectedOptionValues=Array.from(productFormElement.querySelectorAll('input[type="radio"]:checked')).map(({dataset})=>dataset.optionValueId).filter(Boolean),Array.from(productFormElement.querySelectorAll("select")).forEac
1h(select=>{const selectedOption=select.options[select.selectedIndex];selectedOption&&selectedOption.dataset.optionValueId&&selectedOptionValues.push(selectedOption.dataset.optionValueId)}),input.type==="radio"&&!input.checked){const currentOptionName=input.name;selectedOptionValues=selectedOptionValues.filter(id=>{const input2=productFormElement.querySelector(`input[data-option-value-id="${id}"]`);return input2&&input2.name!==currentOptionName}),selectedOptionValues.push(optionValueId)}const params=selectedOptionValues.length>0?`&option_values=${selectedOptionValues.join(",")}`:"";return`${newProductUrl}?section_id=${sectionId}${params}`}onMouseOver(event){const label=event.target.closest("label");if(!label)return;const input=label.querySelector('input[type="radio"]');if(!input||input.checked)return;const requestUrl=this.buildRequestUrl(input);this.cache.has(requestUrl)||this.activeRequests.has(requestUrl)||this.fetchContent(requestUrl)}fetchContent(requestUrl){const fetchPromise=fetch(requestUrl).then(response=>response.text()).then(responseText=>{const html=new DOMParser().parseFromString(responseText,"text/html");return this.cache.set(requestUrl,html),this.activeRequests.delete(requestUrl),html}).catch(error=>{throw this.activeRequests.delete(requestUrl),error});return this.activeRequests.set(requestUrl,fetchPromise),fetchPromise}async onVariantChange(event){if(!event.target.hasAttribute("data-product-hot-reload-trigger"))return;const optionValueElement=event.target,requestUrl=this.buildRequestUrl(optionValueElement),oldProductUrl=this.dataset.productUrl;let newProductUrl;optionValueElement.type==="radio"?newProductUrl=optionValueElement.dataset.productUrl||oldProductUrl:optionValueElement.tagName==="SELECT"?newProductUrl=optionValueElement.options[optionValueElement.selectedIndex].dataset.productUrl||oldProductUrl:newProductUrl=oldProductUrl,this.showLoadingState();let html;try{this.cache.has(requestUrl)?html=this.cache.get(requestUrl):this.activeRequests.has(requestUrl)?html=await this.activeRequests.get(requestUrl):html=await this.fetchContent(requestUrl),await this.updateProductWithTransition(html,newProductUrl,event.target.id)}catch(error){console.error("Error updating product content:",error)}finally{this.hideLoadingState()}}async updateProductWithTransition(html,newProductUrl,targetId){const updatedHtml=html.getElementById(this.id);this.supportsViewTransitions?await document.startViewTransition(()=>{this.innerHTML=updatedHtml.innerHTML,this.dataset.productUrl=updatedHtml.dataset.productUrl,this.dataset.variantId=updatedHtml.dataset.variantId}).finished:(this.innerHTML=updatedHtml.innerHTML,this.dataset.productUrl=updatedHtml.dataset.productUrl,this.dataset.variantId=updatedHtml.dataset.variantId);let url=new URL(newProductUrl,window.location.origin);const currentUrl=new URL(window.location.href);for(const[key,value]of currentUrl.searchParams.entries())key!=="variant"&&url.searchParams.set(key,value);url.searchParams.set("variant",this.dataset.variantId),window.history.pushState({},"",url.toString()),this.querySelector(`#${targetId}`).focus()}}customElements.define("product-hot-reload",ProductHotReload)}catch(e){console.error(e)}})()})();
2//# sourceMappingURL=/cdn/shop/t/62/compiled_assets/snippet-scripts.js.map?v=56328719812517536651789634541

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.