https://mimicoco.com.au/cdn/shop/t/16/assets/section-recently-view…?v=133749854212665461791709918160
1customElements.define("recently-viewed-products",class extends HTMLElement{constructor(){super(),this.containers=[this.querySelector(".splide__list"),this.querySelector(".grid")],this.productHtml=[],this.history=sessionStorage.getItem("Woolman_Product_History")?sessionStorage.getItem("Woolman_Product_History").split(","):[],(!this.history||this.history.length===0)&&this.containers.forEach(container=>{if(!container)return;container.closest("recently-viewed-products").setAttribute("hidden",!0)}),this.fetchProductHtml(),this.closest(".shopify-section").addEventListener("section:in-viewport",()=>{this.renderContainers()})}async fetchProductHtml(){const promises=[],rootUrl=window.routes.root=="/"?"/":window.routes.root+"/";return this.history.forEach(productHandle=>{promises.push(fetch(`${rootUrl}products/${productHandle}?view=ajax-card`))}),(await Promise.allSettled(promises)).forEach(async promise=>{try{const res=await promise.value;if(res.status!==200)throw res.status;const html=await res.text();this.productHtml.push(html)}catch(err){console.error(err);return}}),this.productHtml}async renderContainers(){if(this.productHtml.length==0){this.setAttribute("hidden",!0);return}await this.containers.forEach(async container=>{container&&(container.dataset.firstChildClass=container.firstElementChild.className,container.dataset.firstChildNodeType=container.firstElementChild.nodeName,container.dataset.firstChildMargin=container.firstElementChild.style.marginRight,container.innerHTML="",this.productHtml.forEach(html=>{const item=document.createElement(container.dataset.firstChildNodeType);item.className=container.dataset.firstChildClass,item.style.marginRight=container.dataset.firstChildMargin,item.innerHTML=html,container.appendChild(item)}))})}}); 2//# sourceMappingURL=/cdn/shop/t/16/assets/section-recently-viewed-products.js.map?v=133749854212665461791709918160
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.