1class Product{constructor(){this.productReview=document.querySelector(".product__review"),this.addToCartBtn=document.querySelector(".product-form__submit"),this.stickyATC=document.querySelector(".pdp-sticky"),this.toggleElement=document.querySelector("[data-select-toggle]"),this.optionsElement=document.querySelector("[data-select-options]"),this.init(),this.initializeCompleteTheLookDesktopSplide(),this.initializeCompleteTheLookMobileSplide()}init(){this.productReview?.addEventListener("click",this.scrollProductReview.bind(this)),this.toggleElement?.addEventListener("click",event=>{event.stopPropagation(),this.toggleDropdown()}),document.addEventListener("click",event=>{this.optionsElement&&!this.toggleElement?.contains(event.target)&&!this.optionsElement.contains(event.target)&&(this.optionsElement.style.display="none")}),this.observeAddToCart(),this.initializeSelectSizePrompt()}scrollProductReview(){let productReview=document.getElementById("product__review");productReview&&setTimeout(()=>{productReview.scrollIntoView({behavior:"smooth",block:"center"})},50)}toggleDropdown(){this.optionsElement.style.display==="none"||this.optionsElement.style.display===""?this.optionsElement.style.display="block":this.optionsElement.style.display="none"}toggleStickyATC(isVisible){this.stickyATC&&(this.stickyATC.style.transform=isVisible?"translateY(100%)":"translateY(0)")}observeAddToCart(){const isGridGallery=!!document.querySelector(".product--grid-gallery"),observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{if(entry.isIntersecting){this.toggleStickyATC(!0),this.optionsElement&&(this.optionsElement.style.display="none");return}const isMobile=window.matchMedia("(max-width: 749px)").matches;if(isGridGallery&&isMobile&&entry.boundingClientRect.top>0){this.toggleStickyATC(!0);return}this.toggleStickyATC(!1)})},{threshold:0});this.addToCartBtn&&observer.observe(this.addToCartBtn)}initializeSelectSizePrompt(){if(!this.hasMultipleVariants())return;const soldOutText=window.variantStrings?.soldOut||"SOLD OUT",selectASizeText=window.variantStrings?.selectASize||"SELECT A SIZE";document.querySelectorAll(".product-form__submit").forEach(button=>{const label=button.querySelector("span");label&&label.textContent.trim()!==soldOutText&&(button.disabled=!0,label.textContent=selectASizeText)})}hasMultipleVariants(){return!!document.querySelector('product-form[data-has-multiple-variants="true"]')}initializeCompleteTheLookDesktopSplide(){if(document.querySelector("#splide-complete-the-look-below"))return;const target=document.querySelector("#splide-complete-the-look-desktop");target&&new Splide(target,{type:"slide",gap:18,perPage:4,arrows:!1,perMove:1,lazyLoad:"sequential",breakpoints:{1280:{perPage:3},768:{perPage:2}}}).mount()}initializeCompleteTheLookMobileSplide(){if(document.querySelector("#splide-complete-the-look-below"))return;const target=document.querySelector("#splide-complete-the-look-mobile");target&&new Splide(target,{type:"slide",gap:18,perPage:4,arrows:!1,perMove:1,lazyLoad:"sequential",breakpoints:{1280:{perPage:3},768:{perPage:2}}}).mount()}}document.addEventListener("DOMContentLoaded",function(){new Product}); 2//# sourceMappingURL=/cdn/shop/t/36/assets/product.js.map?v=6289015044539426191790663877
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.