1class WishlistButton extends HTMLElement{constructor(){super(),this.addEventListener("click",this.handleClick.bind(this))}handleClick(){console.log("wishlist-button clicked",this.dataset);let event="remove_from_wishlist";const payload={id:this.dataset.product_id,name:this.dataset.productTitle,brand:"ONLY",category:this.dataset.productCategory,price:this.dataset.productPrice,variant:this.dataset.productVariant};this.dataset.added==="false"&&(event="add_to_wishlist"),console.log("event",event),console.log("payload",payload),Shopify.analytics.publish(event,payload)}}customElements.define("wishlist-button",WishlistButton),(function(){const SELECTOR=".wishlist-h-count, .wishlist-total-count",getCount=el=>{const fromAttr=el.getAttribute("data-total");if(fromAttr!==null&&fromAttr!==""){const parsed=parseInt(fromAttr,10);if(Number.isFinite(parsed))return parsed}return parseInt(el.textContent.trim(),10)||0},updateEl=el=>{const isEmpty=getCount(el)<=0;el.hidden=!1,el.classList.toggle("is-empty",isEmpty)},observeEl=el=>{el.__wishlistCountObserved||(el.__wishlistCountObserved=!0,updateEl(el),new MutationObserver(()=>updateEl(el)).observe(el,{childList:!0,characterData:!0,subtree:!0,attributes:!0,attributeFilter:["data-total","hidden"]}))},scan=root=>{root.nodeType===1&&(root.matches?.(SELECTOR)&&observeEl(root),root.querySelectorAll?.(SELECTOR).forEach(observeEl))},init=()=>{scan(document.body),new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.addedNodes.forEach(scan)})}).observe(document.body,{childList:!0,subtree:!0})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})(),(function(){const EMPTY_SELECTOR=".wishlsitnoitem",TEMPLATE_ID="wishlist-empty-state-template",syncWishlistEmptyFooter=()=>{const isEnhanced=!!document.querySelector(".wishlist-empty-state--enhanced");document.body.classList.toggle("wishlist-empty-enhanced",isEnhanced)},enhance=el=>{if(el.dataset.wishlistEmptyEnhanced==="true")return;const template=document.getElementById(TEMPLATE_ID);template&&(el.dataset.wishlistEmptyEnhanced="true",el.classList.add("wishlist-empty-state--enhanced"),el.replaceChildren(template.content.cloneNode(!0)),syncWishlistEmptyFooter())},scan=root=>{root.nodeType===1&&(root.matches?.(EMPTY_SELECTOR)&&enhance(root),root.querySelectorAll?.(EMPTY_SELECTOR).forEach(enhance),syncWishlistEmptyFooter())},init=()=>{scan(document.body),syncWishlistEmptyFooter(),new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.addedNodes.forEach(scan),(mutation.type==="childList"||mutation.type==="attributes")&&syncWishlistEmptyFooter()})}).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()})(),(function(){const DESKTOP_BAR_SELECTOR=".quick_category.hide_on_mob",MOBILE_BAR_SELECTOR=".collection-toolbar",DESKTOP_MQ="(min-width: 1000px)",MOBILE_MQ="(max-width: 999px)",resolveMobileStickyBarEl=()=>document.querySelector(MOBILE_BAR_SELECTOR),getStickyAreaHeight=()=>{const root=getComputedStyle(document.documentElement),num=name=>{const raw=root.getPropertyValue(name).trim(),parsed=parseFloat(raw);return Number.isFinite(parsed)?parsed:0};return Math.max(num("--sticky-area-height"),num("--wigmix-mobile-header-height"),num("--liquid-mobile-header-height"),num("--collection-plp-sort-sticky-top-measured"))},setupOne=({barSelector,resolveBar,mediaQuery})=>{const bar=typeof resolveBar=="function"?resolveBar():document.querySelector(barSelector);if(!bar)return;const mq=window.matchMedia(mediaQuery);let lastY=window.scrollY||0,pendingY=lastY,rafId=0,scrollStopTimer=0,abortController=null,isHidden=!1,isStuck=!1,lastDirection=0;const show=()=>{isHidden&&(isHidden=!1,bar.classList.remove("is-hidden"))},hide=()=>{isHidden||(isHidden=!0,bar.classList.add("is-hidden"))},setStuck=next=>{isStuck!==next&&(isStuck=next,bar.classList.toggle("is-stuck",isStuck),isStuck||show())},updateStuckState=()=>{const stickyTop=getStickyAreaHeight(),top=bar.getBoundingClientRect().top;isStuck?top>stickyTop+12&&setStuck(!1):top<=stickyTop+1&&setStuck(!0)},scheduleScrollStopShow=()=>{window.clearTimeout(scrollStopTimer),scrollStopTimer=window.setTimeout(()=>{isStuck&&show()},260)},processScroll=()=>{rafId=0;const y=pendingY,delta=y-lastY;if(lastY=y,updateStuckState(),!isStuck)return;const DIRECTION_THRESHOLD=6;delta>DIRECTION_THRESHOLD?(lastDirection=1,hide()):delta<-DIRECTION_THRESHOLD&&(lastDirection=-1,show()),scheduleScrollStopShow()},onScroll=()=>
1{pendingY=window.scrollY||0,rafId||(rafId=requestAnimationFrame(processScroll))},enable=()=>{lastY=window.scrollY||0,pendingY=lastY,isHidden=bar.classList.contains("is-hidden"),isStuck=bar.classList.contains("is-stuck"),lastDirection=0,show(),updateStuckState(),abortController?.abort(),abortController=new AbortController,window.addEventListener("scroll",onScroll,{passive:!0,signal:abortController.signal})},disable=()=>{abortController?.abort(),abortController=null,rafId&&cancelAnimationFrame(rafId),rafId=0,window.clearTimeout(scrollStopTimer),scrollStopTimer=0,show(),setStuck(!1)},onMqChange=()=>{mq.matches?enable():disable()};typeof mq.addEventListener=="function"?mq.addEventListener("change",onMqChange):typeof mq.addListener=="function"&&mq.addListener(onMqChange),onMqChange()},setup=()=>{setupOne({barSelector:DESKTOP_BAR_SELECTOR,mediaQuery:DESKTOP_MQ}),setupOne({resolveBar:resolveMobileStickyBarEl,mediaQuery:MOBILE_MQ})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",setup):setup()})(),(function(){const PWA_LINK_SELECTOR=".pwa-mob-menu",PWA_DRAWER_IDS=["sidebar-menu","cart-drawer"],patchDialogElement=()=>{const dialogProto=customElements.get("dialog-element")?.prototype;if(!dialogProto||dialogProto.__pwaOutsideClickPatched)return;const originalAllow=dialogProto.allowOutsideClickForTarget,originalHideTarget=dialogProto.hideForOutsideClickTarget;dialogProto.allowOutsideClickForTarget=function(target){const pwaLink=target?.closest?.(PWA_LINK_SELECTOR);if(!pwaLink)return originalAllow.call(this,target);const controlsId=pwaLink.getAttribute("aria-controls");return!(controlsId&&controlsId===this.id)},dialogProto.hideForOutsideClickTarget=function(target){const pwaLink=target?.closest?.(`${PWA_LINK_SELECTOR}[aria-controls]`);if(pwaLink){const controlsId=pwaLink.getAttribute("aria-controls");if(controlsId&&controlsId!==this.id&&PWA_DRAWER_IDS.includes(controlsId))return!1}return originalHideTarget.call(this,target)},dialogProto.__pwaOutsideClickPatched=!0};customElements.get("dialog-element")?patchDialogElement():customElements.whenDefined("dialog-element").then(patchDialogElement)})(),(function(){const PWA_LINK_SELECTOR=".pwa-mob-menu[aria-controls]",PWA_DRAWER_IDS=["sidebar-menu","cart-drawer"],SWITCHING_CLASS="pwa-drawer-switching",closePdpCouponModals=()=>{document.querySelectorAll('x-modal.customer-coupons__x-modal[open], x-modal[id^="pdp-coupons-modal-"][open]').forEach(modal=>modal.hide?.())},getOtherOpenDrawers=target=>PWA_DRAWER_IDS.map(id=>document.getElementById(id)).filter(drawer=>drawer&&drawer!==target&&drawer.open);document.addEventListener("click",async event=>{const link=event.target.closest(PWA_LINK_SELECTOR);if(!link)return;const drawerId=link.getAttribute("aria-controls"),drawer=drawerId?document.getElementById(drawerId):null;if(!(!drawer||typeof drawer.hide!="function"||typeof drawer.show!="function")){event.preventDefault(),event.stopImmediatePropagation(),closePdpCouponModals();try{if(drawer.open){await drawer.hide();return}const othersOpen=getOtherOpenDrawers(drawer);if(othersOpen.length>0){document.documentElement.classList.add(SWITCHING_CLASS),drawer.classList.add("pwa-drawer-incoming");try{const showPromise=drawer.show(!1);await Promise.all(othersOpen.map(other=>other.hide())),await showPromise}finally{drawer.classList.remove("pwa-drawer-incoming"),document.documentElement.classList.remove(SWITCHING_CLASS)}return}await drawer.show()}catch(error){console.error("PWA drawer toggle failed",error)}}},!0)})(),(function(){const WIDGET_SELECTOR=".ps-widget-10533",STYLE_ID="only-wigmix-scanner-visibility",HIDE_RULE='[data-icon-scanner="true"],[data-icon-scanner]:not([data-icon-scanner="false"]) {display: none !important;visibility: hidden !important;pointer-events: none !important;}',isCanvasApp=()=>document.documentElement.classList.contains("canvas-app-webview"),collectShadowRoots=(node,roots=[])=>(!node||typeof node.querySelectorAll!="function"||(node.shadowRoot&&!roots.includes(node.shadowRoot)&&(roots.push(node.shadowRoot),collectShadowRoots(node.shadowRoot,roots)),node.querySelectorAll("*").forEach(el=>{!el.shadowRoot||roots.includes(el.shadowRoot)||(roots.push(el.shadowRoot),collectShadowRoots(el.shadowRoot,roots))})),roots),syncShadowRoot=root=>{let style=root.getElementById(STYLE_ID);if(isCanvasApp()){style&&style.remove();return}style||(style=document.createElement("style"),style.id=STYLE_ID,root.appendChild(style)),style.textContent=HIDE_RULE},syncAll=()=>
1{document.querySelectorAll(WIDGET_SELECTOR).forEach(widget=>{collectShadowRoots(widget).forEach(syncShadowRoot)})};new MutationObserver(syncAll).observe(document.body,{childList:!0,subtree:!0}),new MutationObserver(syncAll).observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),syncAll(),window.setTimeout(syncAll,500),window.setTimeout(syncAll,1500),window.setTimeout(syncAll,3e3)})(),(function(){const DESKTOP_WIDGET_SELECTOR=".ps-widget-10533.expandable.wide-search-overlay",SEARCH_INPUT_SELECTOR='[data-pw="msb-search-bar-input"], [data-testid="wigmix-msb-search-bar-input"]',DESKTOP_MQ=window.matchMedia("(min-width: 1000px)"),closestAcrossShadowRoots=(node,selector)=>{let current=node;for(;current;){if(current.nodeType===1&¤t.matches?.(selector))return current;current.assignedSlot?current=current.assignedSlot:current.parentElement?current=current.parentElement:current=current.getRootNode?.()?.host||null}return null},isGuardedInput=node=>!!(DESKTOP_MQ.matches&&node?.matches?.(SEARCH_INPUT_SELECTOR)&&closestAcrossShadowRoots(node,DESKTOP_WIDGET_SELECTOR)),findGuardedInputInEvent=event=>event.composedPath?.().find(isGuardedInput)||null,getDeepActiveElement=()=>{let active=document.activeElement;for(;active?.shadowRoot?.activeElement;)active=active.shadowRoot.activeElement;return active},restoreIfWidgetMovedPage=(scrollX,scrollY)=>{const active=getDeepActiveElement();isGuardedInput(active)&&window.scrollY<scrollY-1&&window.scrollTo({left:scrollX,top:scrollY,behavior:"auto"})},preserveScrollDuringInput=event=>{if(!findGuardedInputInEvent(event))return;const scrollX=window.scrollX,scrollY=window.scrollY;requestAnimationFrame(()=>restoreIfWidgetMovedPage(scrollX,scrollY)),window.setTimeout(()=>restoreIfWidgetMovedPage(scrollX,scrollY),0),window.setTimeout(()=>restoreIfWidgetMovedPage(scrollX,scrollY),80)};["keydown","beforeinput","input","keyup"].forEach(eventName=>{document.addEventListener(eventName,preserveScrollDuringInput,!0)});const originalFocus=HTMLElement.prototype.focus;originalFocus.__visenzeDesktopSearchGuarded||(HTMLElement.prototype.focus=function(options){if(isGuardedInput(this)){const nextOptions=options&&typeof options=="object"?{...options,preventScroll:!0}:{preventScroll:!0};return originalFocus.call(this,nextOptions)}return originalFocus.apply(this,arguments)},HTMLElement.prototype.focus.__visenzeDesktopSearchGuarded=!0);const originalScrollIntoView=Element.prototype.scrollIntoView;originalScrollIntoView.__visenzeDesktopSearchGuarded||(Element.prototype.scrollIntoView=function(){if(!isGuardedInput(this))return originalScrollIntoView.apply(this,arguments)},Element.prototype.scrollIntoView.__visenzeDesktopSearchGuarded=!0)})(),document.addEventListener("DOMContentLoaded",function(){var backToTopButton=document.querySelector("[data-back-to-top]");if(!backToTopButton)return;var SHOW_OFFSET=400;function toggleBackToTopVisibility(){window.scrollY>SHOW_OFFSET?backToTopButton.classList.add("back-to-top--visible"):backToTopButton.classList.remove("back-to-top--visible")}window.addEventListener("scroll",toggleBackToTopVisibility,{passive:!0}),toggleBackToTopVisibility(),backToTopButton.addEventListener("click",function(){window.scrollTo({top:0,behavior:"smooth"})})}),document.addEventListener("DOMContentLoaded",function(){var invoiceSection=document.querySelector(".invoice-section[data-invoice-endpoint]");if(!invoiceSection)return;var phone=invoiceSection.getAttribute("data-invoice-phone")||"",store=invoiceSection.getAttribute("data-invoice-store")||"",endpoint=invoiceSection.getAttribute("data-invoice-endpoint")||"";if(!phone||!endpoint||!store)return;var cache={online:null,offline:null},currentType="online",tabs=invoiceSection.querySelectorAll(".invoice-tab");tabs.forEach(function(tab){tab.addEventListener("click",function(){var type=tab.getAttribute("data-invoice-type");!type||type===currentType||(currentType=type,tabs.forEach(function(innerTab){innerTab.classList.toggle("is-active",innerTab===tab)}),loadInvoices(type))})}),loadInvoices("online");function loadInvoices(type){var tbody=invoiceSection.querySelector(".invoice-table-body"),errorEl=invoiceSection.querySelector(".invoice-error"),emptyMessageEl=invoiceSection.querySelector(".invoice-empty-message"),table=invoiceSection.querySelector(".invoice-table");if(!(!tbody||!errorEl)){if(table&&table.classList.toggle("invoice-table--offline",type==="offline"),errorEl.style.display="none",errorEl.textContent="",emptyMessageEl&&(emptyMessageEl.style.display="none",emptyMessageEl.textContent=""),tbody.innerHTML='<tr><td colspan="6">Loading '+(type==="online"?"website":"offline")+" invoices…</td></tr>",cache[type]){renderInvoices(cache[type],type);return}try{var url=new URL(endpoint);url.searchParams.set("phone",phone),url.searchParams.set("store",store),url.searchParams.set("type",type),fetch(url.toString()).then(function(response){if(!response.ok)throw new Error("Network response was not ok");return response.json()}).then(function(data){if(!data||data.success!==!0||!Array.isArray(data.data))throw new Error("Unexpected API response");cache[type]=data.data,renderInvoices(cache[type],type)}).catch(function(error){console.error("Error fetching invoices",error),tbody.innerHTML="",errorEl.textContent="Unable to load invoices at the moment. Please try again later.",errorEl.style.display="block",emptyMessageEl&&(emptyMessageEl.style.display="none",emptyMessageEl.textContent="")})}catch(e){console.error("Error building invoice URL",e)}}}function renderInvoices(list,type){var tbody=invoiceSection.querySelector(".invoice-table-body"),emptyMessageEl=invoiceSection.querySelector(".invoice-empty-message");if(tbody){if(!list||list.length===0){var message=type==="offline"?"You do not have any in-store purchases yet.":"You do not have any online orders yet.";tbody.innerHTML="",emptyMessageEl&&(emptyMessageEl.textContent=message,emptyMessageEl.style.display="block");return}tbody.innerHTML="",emptyMessageEl&&(emptyMessageEl.style.display="none",emptyMessageEl.textContent=""),list.forEach(function(item){var tr=document.createElement("tr"),orderNumber=item.salesOrderNumber||"",invoiceNumber=item.invoiceNumber||"",purchaseDate=formatInvoiceDate(item.purchaseDate),amount=item.paidAmount||"",invoiceDate=formatInvoiceDate(item.invoiceDate),url=item.invoiceUrl||"";tr.innerHTML="<td>"+escapeHtml(orderNumber)+"</td><td>"+escapeHtml(invoiceNumber)+"</td><td>"+escapeHtml(purchaseDate)+"</td><td>"+escapeHtml(amount)+"</td><td>"+escapeHtml(invoiceDate)+'</td><td class="text-end">'+(url?'<a href="'+encodeURI(url)+'" target="_blank" rel="noopener" class="link-faded">View invoice</a>':"")+"</td>",tbody.appendChild(tr)})}}function formatInvoiceDate(raw){if(!raw)return"";var value=String(raw).trim(),dotMatch=value.match(/^(\d{2})\.(\d{2})\.(\d{4})/);if(dotMatch)return dotMatch[1]+"/"+dotMatch[2]+"/"+dotMatch[3];var dashMatch=value.match(/^(\d{4})-(\d{2})-(\d{2})/);if(dashMatch)return dashMatch[3]+"/"+dashMatch[2]+"/"+dashMatch[1];var d=new Date(value);if(!isNaN(d.getTime())){var dd=String(d.getDate()).padStart(2,"0"),mm=String(d.getMonth()+1).padStart(2,"0"),yyyy=d.getFullYear();return dd+"/"+mm+"/"+yyyy}return value}function escapeHtml(value){return String(value??"").replace(/[&<>
1"']/g,function(char){switch(char){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return"'"}})}(function(){if(!document.documentElement.classList.contains("canvas-app-webview"))return;const stickyBar=document.querySelector("product-sticky-bar.product-sticky-bar");if(!stickyBar)return;const root=document.documentElement,updateHeight=()=>{root.style.setProperty("--product-sticky-bar-height",`${stickyBar.offsetHeight}px`)};updateHeight(),typeof ResizeObserver<"u"?new ResizeObserver(updateHeight).observe(stickyBar):window.addEventListener("resize",updateHeight),new MutationObserver(updateHeight).observe(stickyBar,{attributes:!0,attributeFilter:["class"],childList:!0,subtree:!0})})()}); 2//# sourceMappingURL=/cdn/shop/t/85/assets/custom.js.map?v=85215280260608003631785501889
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.