1customElements.get("quick-add-modal")||customElements.define("quick-add-modal",class extends ModalDialog{constructor(){super(),this.modalContent=this.querySelector('[id^="QuickAddInfo-"]'),this.addEventListener("product-info:loaded",(({target:e})=>{e.addPreProcessCallback(this.preprocessHTML.bind(this))}))}hide(e=!1){const t=document.querySelector("cart-notification")||document.querySelector("cart-drawer");t&&t.setActiveElement(this.openedBy),this.modalContent.innerHTML="",e&&(this.openedBy=null),super.hide()}show(e){e.setAttribute("aria-disabled",!0),e.classList.add("loading"),e.querySelector(".loading__spinner").classList.remove("hidden"),fetch(e.getAttribute("data-product-url")).then((e=>e.text())).then((t=>{const r=(new DOMParser).parseFromString(t,"text/html").querySelector("product-info");this.preprocessHTML(r),HTMLUpdateUtility.setInnerHTML(this.modalContent,r.outerHTML),window.Shopify&&Shopify.PaymentButton&&Shopify.PaymentButton.init(),window.ProductModel&&window.ProductModel.loadShopifyXR(),super.show(e)})).finally((()=>{e.removeAttribute("aria-disabled"),e.classList.remove("loading"),e.querySelector(".loading__spinner").classList.add("hidden")}))}preprocessHTML(e){e.classList.forEach((e=>{(e.startsWith("color-")||"gradient"===e)&&this.modalContent.classList.add(e)})),this.preventDuplicatedIDs(e),this.removeDOMElements(e),this.removeGalleryListSemantic(e),this.updateImageSizes(e),this.preventVariantURLSwitching(e)}preventVariantURLSwitching(e){e.setAttribute("data-update-url","false")}removeDOMElements(e){const t=e.querySelector("pickup-availability");t&&t.remove();const r=e.querySelector("product-modal");r&&r.remove();const i=e.querySelectorAll("modal-dialog");i&&i.forEach((e=>e.remove()))}preventDuplicatedIDs(e){const t=e.dataset.section,r=t,i=`quickadd-${t}`;e.innerHTML=e.innerHTML.replaceAll(r,i),Array.from(e.attributes).forEach((t=>{t.value.includes(r)&&e.setAttribute(t.name,t.value.replace(r,i))})),e.dataset.originalSection=t}removeGalleryListSemantic(e){const t=e.querySelector('[id^="Slider-Gallery"]');t&&(t.setAttribute("role","presentation"),t.querySelectorAll('[id^="Slide-"]').forEach((e=>e.setAttribute("role","presentation"))))}updateImageSizes(e){const t=e.querySelector(".product"),r=t?.classList.contains("product--columns");if(!r)return;const i=t.querySelectorAll(".product__media img");if(!i.length)return;let o="(min-width: 1000px) 715px, (min-width: 750px) calc((100vw - 11.5rem) / 2), calc(100vw - 4rem)";t.classList.contains("product--medium")?o=o.replace("715px","605px"):t.classList.contains("product--small")&&(o=o.replace("715px","495px")),i.forEach((e=>e.setAttribute("sizes",o)))}});
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.