1class PdpSizeScarcityLabel{constructor(configEl){this.sizes=new Set((configEl.dataset.sizes||"").split(",").map(size=>size.trim()).filter(Boolean)),this.labelText=configEl.dataset.label,this.labelClass="pdp-size-scarcity-label",this.updateLabels=this.updateLabels.bind(this)}init(){this.updateLabels(),document.querySelectorAll("[data-single-option-selector]").forEach(input=>{new MutationObserver(this.updateLabels).observe(input,{attributes:!0,attributeFilter:["class"]})})}updateLabels(){document.querySelectorAll('[data-test-id="variant-size-input"]').forEach(container=>{const input=container.querySelector("[data-single-option-selector]"),stockLabel=container.querySelector(".starts-shipping-wrapper");if(!input||!stockLabel)return;const isAvailable=!!!container.querySelector("[data-pdp-notify-me]")&&!input.classList.contains("sold-out")&&!input.classList.contains("unavailable"),isScarceSize=this.sizes.has(input.value),alreadyHasShipDate=stockLabel.textContent.trim().startsWith("Starts shipping");isAvailable&&isScarceSize&&!alreadyHasShipDate?(stockLabel.textContent=this.labelText,stockLabel.classList.add(this.labelClass)):stockLabel.classList.remove(this.labelClass)})}}function initPdpSizeScarcityLabel(){const configEl=document.querySelector("[data-pdp-size-scarcity-config]");configEl&&new PdpSizeScarcityLabel(configEl).init()}initPdpSizeScarcityLabel(),document.addEventListener("shopify:section:load",initPdpSizeScarcityLabel); 2//# sourceMappingURL=/cdn/shop/t/524/assets/pdp-size-scarcity-label.js.map?v=58789708122452684671785264855
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.