1window.customElements.get("pods-lease-line")||window.customElements.define("pods-lease-line",class extends HTMLElement{connectedCallback(){const formId=this.getAttribute("form-id");formId&&(this._form=document.getElementById(formId),this._onVariantChanged=event=>{const variant=event.detail&&event.detail.variant;variant&&this._update(variant.price)},this._form&&this._form.addEventListener("variant:changed",this._onVariantChanged))}disconnectedCallback(){this._form&&this._form.removeEventListener("variant:changed",this._onVariantChanged)}_update(priceCents){const terms=(this.dataset.terms||"").split(",").map(t=>t.split(":"));if(!terms.length||!(priceCents>0))return;const net=priceCents/125,monthly=factor=>this._format(Math.ceil(net*Number(factor))),from=this.querySelector("[data-lease-from]");from&&(from.textContent=monthly(terms[terms.length-1][1])),terms.forEach(([months,factor])=>{const cell=this.querySelector(`[data-lease-term="${months}"]`);cell&&(cell.textContent=monthly(factor))})}_format(amount){const sample=this.dataset.moneySample||"1000000",match=sample.match(/1(\D?)000\1?000/);if(!match)return String(amount);const grouped=String(amount).replace(/\B(?=(\d{3})+(?!\d))/g,match[1]);return sample.replace(match[0],grouped)}}),(()=>{const refresh=(button,list,observer)=>{observer&&observer.disconnect();const items=Array.from(list.querySelectorAll(".product__thumbnail-item"));let visibleCount=0;items.forEach(item=>{const filtered=item.classList.contains("is-filtered");filtered||(visibleCount+=1);const overflow=!filtered&&visibleCount>8;item.classList.contains("pods-gallery-overflow")!==overflow&&item.classList.toggle("pods-gallery-overflow",overflow)});const hide=list.classList.contains("is-expanded")||visibleCount<=8;button.hidden!==hide&&(button.hidden=hide);const label=`${button.dataset.label} (${visibleCount})`;button.textContent!==label&&(button.textContent=label),observer&&(observer.takeRecords(),observer.observe(list,{subtree:!0,attributes:!0,attributeFilter:["class"]}))},init=button=>{if(button._podsGallery)return;button._podsGallery=!0;const list=button.closest("product-media")?.querySelector(".product__thumbnail-list");if(!list)return;const observer=new MutationObserver(()=>refresh(button,list,observer));observer.observe(list,{subtree:!0,attributes:!0,attributeFilter:["class"]})},setup=()=>document.querySelectorAll("[data-pods-gallery-more]").forEach(init);document.readyState==="loading"?document.addEventListener("DOMContentLoaded",setup):setup(),document.addEventListener("shopify:section:load",setup),document.addEventListener("click",event=>{const button=event.target.closest("[data-pods-gallery-more]");if(!button)return;const list=button.closest("product-media")?.querySelector(".product__thumbnail-list");if(!list)return;const firstHidden=list.querySelector(".pods-gallery-overflow");list.classList.add("is-expanded"),button.setAttribute("aria-expanded","true"),button.hidden=!0,firstHidden&&firstHidden.focus({preventScroll:!0})})})(); 2//# sourceMappingURL=/cdn/shop/t/60/assets/custom.js.map?v=35063034051429694701791296113
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.