1(function(){function formatProductCount(count){return`${count} ${count===1?"product":"products"}`}function replaceFacetCount(labelWrapper,count){const textEl=labelWrapper.querySelector(".tag__text");if(!textEl)return;const countWrapper=textEl.parentElement;countWrapper&&(countWrapper.innerHTML="",countWrapper.appendChild(textEl),countWrapper.append(` (${count})`))}function stripFacetCount(labelWrapper){const textEl=labelWrapper.querySelector(".tag__text");if(!textEl)return;const countWrapper=textEl.parentElement;countWrapper&&(countWrapper.innerHTML="",countWrapper.appendChild(textEl))}function applyAvailabilityFilterFixes(){const availabilityFilters=new URLSearchParams(window.location.search).getAll("filter.v.availability"),inStockFilterActive=availabilityFilters.length===1&&availabilityFilters[0]==="1",outOfStockFilterActive=availabilityFilters.length===1&&availabilityFilters[0]==="0",ajaxContent=document.getElementById("CollectionAjaxContent");if(!ajaxContent)return;const soldOutLabel=window.theme&&window.theme.strings&&window.theme.strings.soldOut&&window.theme.strings.soldOut.toLowerCase()||"sold out",gridItems=Array.from(ajaxContent.querySelectorAll(".grid-item.grid-product")),soldOutItems=gridItems.filter(item=>Array.from(item.querySelectorAll(".grid-product__tag")).some(tag=>tag.textContent.trim().toLowerCase()===soldOutLabel)),inStockItems=gridItems.filter(item=>!soldOutItems.includes(item));inStockFilterActive?soldOutItems.forEach(item=>item.remove()):outOfStockFilterActive&&inStockItems.forEach(item=>item.remove());const visibleItems=Array.from(ajaxContent.querySelectorAll(".grid-item.grid-product")),visibleCount=visibleItems.length,visibleSoldOutCount=visibleItems.filter(item=>Array.from(item.querySelectorAll(".grid-product__tag")).some(tag=>tag.textContent.trim().toLowerCase()===soldOutLabel)).length,visibleInStockCount=Math.max(visibleCount-visibleSoldOutCount,0),effectiveInStockCount=inStockFilterActive?visibleCount:outOfStockFilterActive?0:visibleInStockCount,effectiveOutOfStockCount=inStockFilterActive?0:outOfStockFilterActive?visibleCount:visibleSoldOutCount;(inStockFilterActive||outOfStockFilterActive)&&document.querySelectorAll(".collection-filter__item--count, [data-collection-count]").forEach(el=>{el.textContent=formatProductCount(visibleCount)}),[document.getElementById("CollectionSidebar"),document.getElementById("CollectionInlineFilterWrap")].filter(Boolean).forEach(root=>{root.querySelectorAll(".tag__checkbox-wrapper").forEach(labelWrapper=>{const input=labelWrapper.querySelector(".tag__input");if(input){if(input.name==="filter.v.availability"){replaceFacetCount(labelWrapper,input.value==="1"?effectiveInStockCount:effectiveOutOfStockCount);return}(inStockFilterActive||outOfStockFilterActive)&&stripFacetCount(labelWrapper)}})})}function applyWholesaleCollectionSidebarFixes(){const wholesaleSidebar=document.querySelector("#CollectionSidebar[data-wcp-wholesale-customer='true']");if(!wholesaleSidebar)return;[wholesaleSidebar,document.getElementById("CollectionInlineFilterWrap")].filter(Boolean).forEach(root=>{root.querySelectorAll(".price-range").forEach(priceRange=>{const group=priceRange.closest("[class*='collection-sidebar__group--']");group&&(group.style.display="none")}),root.querySelectorAll("input[name='filter.v.availability']").forEach(availabilityInput=>{const group=availabilityInput.closest("[class*='collection-sidebar__group--']");group&&(group.style.display="none")}),root.querySelectorAll(".tag__text").forEach(textEl=>{const labelWrapper=textEl.parentElement;labelWrapper&&Array.from(labelWrapper.childNodes).forEach(node=>{node.nodeType===Node.TEXT_NODE&&/\(\s*\d+\s*\)/.test(node.textContent||"")&&(node.textContent="")})})})}if(window.innerWidth>768){const headerHeight=document.getElementById("HeaderWrapper")?.offsetHeight,off
1Set=headerHeight?Number(headerHeight):"180",subCollectionsWrapper=document.getElementById("subCollections");subCollectionsWrapper&&(subCollectionsWrapper.style.top=`${offSet}px`,new IntersectionObserver(([e])=>e.target.classList.toggle("isSticky",e.intersectionRatio<1),{rootMargin:`-${offSet+2}px 0px 0px 0px`,threshold:[1]}).observe(subCollectionsWrapper))}applyAvailabilityFilterFixes(),applyWholesaleCollectionSidebarFixes(),document.addEventListener("collection:reloaded",applyAvailabilityFilterFixes),document.addEventListener("collection:reloaded",applyWholesaleCollectionSidebarFixes);const cartNote=document.getElementById("CartHeaderNote"),toNote=document.getElementById("note-to"),fromNote=document.getElementById("note-from");cartNote&&toNote&&fromNote&&cartNote.addEventListener("input",event=>{const noteValue=event.target.value;noteValue&¬eValue!==""&&toNote.value!==""&&fromNote.value!==""?theme.cart.updateNote(`From: ${fromNote.value}. To: ${toNote.value}. Message: ${noteValue}`):theme.cart.updateNote("")})})(); 2//# sourceMappingURL=/cdn/shop/t/51/assets/custom.js.map?v=181566488877262328711778001090
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.