1class ColorSwatchHandler{constructor(){this.options={swatchSelector:".color-swatch",productSelector:".grid-product",mainImageSelector:".grid-product__image-mask img",secondaryImageSelector:".grid-product__secondary-image img"},document.addEventListener("click",this.handleClick.bind(this))}handleClick(e){const swatch=e.target.closest(this.options.swatchSelector);if(!swatch)return;e.preventDefault();const variantImage=swatch.dataset.variantImage;if(!variantImage)return;const productCard=swatch.closest(this.options.productSelector);productCard&&this.updateImages(productCard,variantImage)}updateImages(productCard,variantImage){console.log("helloooo");const mainImage=productCard.querySelector(this.options.mainImageSelector),secondaryImage=productCard.querySelector(this.options.secondaryImageSelector);mainImage&&this.updateImageAttributes(mainImage,variantImage),secondaryImage&&this.updateImageAttributes(secondaryImage,variantImage)}updateImageAttributes(img,baseUrl){img.removeAttribute("srcset"),img.src=baseUrl;const srcset=[180,360,540,720,900,1080].map(size=>`${baseUrl.split("?")[0]}?width=${size} ${size}w`).join(", ");img.srcset=srcset}}new ColorSwatchHandler; 2//# sourceMappingURL=/cdn/shop/t/141/assets/color-swatch-handler.js.map?v=166145955224369304901790177878
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.