PageSourceSearch

https://www.47brand.com/cdn/shop/t/1457/assets/product-card.js?v=30479357935782834741782156752

js 47brand.com collected 2026-10-02 06:17:12 UTC 2,773 bytes, 2 lines download raw bytes

1class ProductCard extends HTMLElement{#observer=null;connectedCallback(){if(this.closest("swiper-slide")){const innerSwiper=this.querySelector("swiper-container");innerSwiper&&innerSwiper.setAttribute("allow-touch-move","false")}this.addEventListener("mouseover",e=>{const swatch=e.target.closest("[data-swatch][href]");if(swatch){this.#warmProduct(swatch.href);return}const pdpLink=e.target.closest('a[href*="/products/"]');pdpLink&&window._warmSwatch?.(pdpLink.href)},{passive:!0}),this.addEventListener("click",e=>{const swatch=e.target.closest("[data-swatch]");if(swatch){e.preventDefault(),this.#loadProduct(swatch.href);return}const mediaArea=e.target.closest("[data-product-url]");mediaArea&&!e.target.closest("button, a")&&(window.location.href=mediaArea.dataset.productUrl)}),this.#syncReviewCount(),this.#watchBadge()}#watchBadge(){this.#observer?.disconnect();const widget=this.querySelector(".jdgm-widget");widget&&(this.#observer=new MutationObserver(()=>this.#syncReviewCount()),this.#observer.observe(widget,{childList:!0,subtree:!0,characterData:!0}))}#syncReviewCount(){const span=this.querySelector("[data-reviews-count]");if(!span)return;const match=(this.querySelector(".jdgm-prev-badge__text")?.textContent??"").match(/\d[\d,]*/);span.textContent=match?`(${match[0]})`:""}#warmProduct(url){const parsed=new URL(url,window.location.origin),handle=parsed.pathname.split("/products/")[1],fetchUrl=`${parsed.origin}/products/${handle}?section_id=product-card`;this._cardCache||(this._cardCache=new Map),!this._cardCache.has(fetchUrl)&&this._cardCache.set(fetchUrl,fetch(fetchUrl).then(r=>r.text()))}async#loadProduct(url){const parsed=new URL(url,window.location.origin),handle=parsed.pathname.split("/products/")[1],params=new URLSearchParams;params.set("section_id","product-card");const fetchUrl=`${parsed.origin}/products/${handle}?${params}`;try{const text=await(this._cardCache?.get(fetchUrl)??fetch(fetchUrl).then(r=>r.text()));this._cardCache?.delete(fetchUrl);const next=new DOMParser().parseFromString(text,"text/html").querySelector("#shopify-section-product-card product-card");if(!next)return;const swap=()=>{for(const attr of[...this.attributes])this.removeAttribute(attr.name);for(const attr of[...next.attributes])this.setAttribute(attr.name,attr.value);this.style.viewTransitionName="product-card-active",this.innerHTML=next.innerHTML,this.#syncReviewCount(),this.#watchBadge()};document.startViewTransition?(this.style.viewTransitionName="product-card-active",document.startViewTransition(swap).finished.then(()=>{this.style.viewTransitionName=""})):swap()}catch{window.location.href=url}}}customElements.define("product-card",ProductCard);
2//# sourceMappingURL=/cdn/shop/t/1457/assets/product-card.js.map?v=30479357935782834741782156752

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.