1(function(){function onVariant(event){const variantId=event?.detail?.resource?.id||event?.detail?.variant?.id;let qtyMaxErrorWrapper=document.querySelector(".buy-buttons-block [data-max-qty-text]");qtyMaxErrorWrapper&&(qtyMaxErrorWrapper.textContent=""),variantId&&document.querySelectorAll("quantity-selector-component").forEach(comp=>{const input=comp.querySelector('[ref="quantityInput"], input[type="number"]');if(!input)return;const url=comp.dataset.productUrl||window.location.pathname,sec=comp.dataset.sectionId||"",qs=new URLSearchParams({variant:String(variantId)});sec&&qs.set("section_id",sec),fetch(`${url}?${qs.toString()}`).then(r=>r.text()).then(html=>{const doc=new DOMParser().parseFromString(html,"text/html"),scope=sec&&doc.querySelector(`#shopify-section-${sec}`)||doc,fetched=scope.querySelector('quantity-selector-component [ref="quantityInput"]')||scope.querySelector('quantity-selector-component input[type="number"]')||scope.querySelector('input[type="number"]');if(!fetched)return;const max=fetched.getAttribute("max");max!=null?(input.setAttribute("max",max),input.setAttribute("data-max-qty",max)):(input.removeAttribute("max"),input.removeAttribute("data-max-qty")),input.removeAttribute("disabled"),input.value="1",input.dispatchEvent(new Event("input",{bubbles:!0})),input.dispatchEvent(new Event("change",{bubbles:!0}))}).catch(()=>{})})}document.addEventListener(window.ThemeEvents&&window.ThemeEvents.variantUpdate||"variant:update",onVariant),document.addEventListener("variantChange",onVariant),document.addEventListener("product:variant-change",onVariant)})(); 2//# sourceMappingURL=/cdn/shop/t/9/assets/quantity-selector-variant-sync.js.map?v=51467523398879066001774463879
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.