1customElements.get("product-side-drawer")||customElements.define("product-side-drawer",class extends Drawer{constructor(){super(),this.quickViewContent=this.querySelector(".quickview-content")}show(opener){super.show(opener);let productUrl;if(opener?productUrl=opener.getAttribute("data-product-url"):window.Shopify.designMode&&(productUrl=this.getAttribute("data-product-url")),!productUrl)return;const productDetailsLink=document.getElementById("Product-Details-Link");productDetailsLink&&(productDetailsLink.href=productUrl),this.fetchContent(productUrl)}hide(){this.endLoading(),this.fetchController&&this.fetchController.abort(),this.quickViewContent.innerHTML="",super.hide()}fetchContent(url){this.startLoading(),this.fetchController=new AbortController;const signal=this.fetchController.signal;webvista.fetchHtml(url,signal).then(html=>{this.handleHTML(html),webvista.trapFocus(this),this.endLoading()}).catch(error=>{console.log(window.accessibilityStrings.unknownError,"error")})}startLoading(){this.openedBy&&(this.openedBy.setAttribute("aria-disabled",!0),this.openedBy.classList.add("loading")),this.quickViewContent.innerHTML=this.querySelector("template").innerHTML}endLoading(){this.openedBy&&(this.openedBy.removeAttribute("aria-disabled"),this.openedBy.classList.remove("loading"))}handleHTML(html){this.productHtml=html.querySelector('[id^="MainProduct-"]'),this.preventDuplicatedIDs(),this.updateProductContainerStyle(),this.removeUnnecessaryElements(),this.changeGalleryLayout(),this.updateImageSizes(),this.setInnerHTML(this.quickViewContent,this.productHtml.innerHTML),webvista.initLazyImages(),webvista.initTooltips(),window.Shopify&&Shopify.PaymentButton&&Shopify.PaymentButton.init(),this.preventVariantURLSwitching()}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)})}preventVariantURLSwitching(){const variantPicker=this.quickViewContent.querySelector("high-variant-selects");variantPicker&&variantPicker.setAttribute("data-update-url","false")}removeUnnecessaryElements(){Array.from(this.productHtml.querySelectorAll(".quick-add-remove")).forEac
1h(element=>{element.remove()})}updateProductContainerStyle(){const productContainer=this.productHtml.querySelector(".product-container");productContainer&&(productContainer.className="product-container isolate");const productContainerMain=this.productHtml.querySelector(".product-container-main");productContainerMain&&(productContainerMain.className="product-container-main")}preventDuplicatedIDs(){const sectionId=this.productHtml.dataset.section;if(!sectionId)return;const quickAddSectionId=`quickadd-${sectionId}`;this.productHtml.innerHTML=this.productHtml.innerHTML.replaceAll(sectionId,quickAddSectionId),this.productHtml.querySelectorAll(`[data-section='${quickAddSectionId}']`).forEach(element=>{element.dataset.originalSection=sectionId})}updateImageSizes(){const mediaImages=this.productHtml.querySelectorAll(".product-media img");if(!mediaImages.length)return;let mediaImageSizes="(min-width: 750px) 15rem, calc(100vw - 2rem)";mediaImages.forEach(img=>{img.setAttribute("sizes",mediaImageSizes),img.setAttribute("loading","lazy"),img.removeAttribute("fetchpriority")})}changeGalleryLayout(){this.productHtml.querySelector("[data-media-stack]")?.removeAttribute("data-media-stack");const galleryView=this.productHtml.querySelector('[id^="Gallery-Viewer"]');galleryView&&(galleryView.setAttribute("data-slide-desktop","true"),galleryView.setAttribute("data-slide-mobile","true"),galleryView.setAttribute("data-draggable","true"),galleryView.setAttribute("data-slide-smooth","true"),galleryView.setAttribute("data-wheelable","true"),galleryView.removeAttribute("data-looping-infinite"))}}); 2//# sourceMappingURL=/cdn/shop/t/12/assets/quick-add.js.map?v=28703184943752638821760603776
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.