https://wetforher.com/cdn/shop/t/358/assets/snippet-product-card.js?v=147170954233145706791762792259
1const ProductCard=class{constructor(element){this.element=element,this.swatches=element.querySelectorAll(".product-card__swatch");const productId=element.dataset.productId;this.primaryImage=document.getElementById(`primary-image-${productId}`),this.secondaryImage=document.getElementById(`secondary-image-${productId}`),this._attachListeners()}_attachListeners(){this.swatches.forEach(s=>s.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this._handleSwatchClick(e)}))}_handleSwatchClick(evt){this.element.classList.remove("hovered");const clickedSwatch=evt.currentTarget;this.swatches.forEach(swatch=>swatch.classList.remove("active")),clickedSwatch.classList.add("active");const newImage=clickedSwatch.getAttribute("data-image");this._updateImages(newImage)}_updateImages(imageUrl){this.primaryImage&&(this.primaryImage.src=imageUrl),this.secondaryImage&&(this.secondaryImage.src=imageUrl)}};document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".product-card").forEach(card=>new ProductCard(card))});export default ProductCard; 2//# sourceMappingURL=/cdn/shop/t/358/assets/snippet-product-card.js.map?v=147170954233145706791762792259
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.