PageSourceSearch

https://www.roxy.com/cdn/shop/t/157/assets/gm.js?v=17935745152898897801790259653?v=c86ddf0e74e7

js roxy.com collected 2026-09-24 19:31:55 UTC 634,202 bytes, 2 lines download raw bytes

1var e,t,i;import{c as o,a as s,o as r,b as a,n,d as l,F as d,r as c,w as u,e as h,f as p,t as m,g,h as f,i as w,j as y,V as v,k as b,N as S,P as _,S as C,C as P,l as k,m as T,p as I,q as A,s as L,T as E,u as M,v as x,x as O,y as B,z as F,A as D,B as $,D as z,E as H,G as R,H as N,I as V,J as q}from"./gm-vendor.js?v=c86ddf0e74e7";function U(...e){return o(...e)}function G(e,t=10,i=!0){let o;const s=function(){let s=this,r=arguments,a=i&&!o;clearTimeout(o),o=setTimeout((function(){o=null,i||e.apply(s,r)}),t),a&&e.apply(s,r)};return s.cancel=()=>{clearTimeout(o),o=null},s}function W(){const e=document.getElementById("vue-zoom-wrapper");if(!e)return;e.classList.contains("hideZoom")?(e.classList.remove("hideZoom"),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0})),document.dispatchEvent(new CustomEvent("pdp-zoom:open",{bubbles:!0}))):(e.classList.add("hideZoom"),document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0})),document.dispatchEvent(new CustomEvent("pdp-zoom:close",{bubbles:!0})))}function K(e){var t,i;const o=(null==e?void 0:e.node)||e||{};return o.alt||o.altText||(null==(t=o.image)?void 0:t.alt)||(null==(i=o.image)?void 0:i.altText)||""}function j(e){return null==e||""===e?"":String(e).replace("gid://shopify/Product/","")}function Q(e){return null==e||""===e?"":String(e).replace("gid://shopify/Collection/","")}function Z(e,t){const i=j(t);if(!i)return!1;const o=[],s=e=>{const t=j(e);t&&o.push(t)};if(s(null==e?void 0:e.id),s(null==e?void 0:e.pid),s(null==e?void 0:e.i),s(null==e?void 0:e.productID),s(null==e?void 0:e.product_id),Array.isArray(null==e?void 0:e.alt))for(const r of e.alt)Array.isArray(r)&&r.length>2&&s(r[2]);return o.some((e=>e===i))}function J(e,t,i){let o="";if(void 0!==t&&void 0!==e[t]&&void 0!==e[t].att){Array.from(e[t].att).forEach((e=>{var t;void 0!==i&&"undefined"!==i&&""!==i&&e.indexOf(i)>-1&&(o=null==(t=null==e?void 0:e[1])?void 0:t[0])}))}return o}function Y(e,t,i){var o;let s=null;if(void 0!==t&&void 0!==e[t]&&void 0!==e[t].att){const r=Array.from(e[t].att);for(const e of r)if(void 0!==i&&"undefined"!==i&&""!==i&&e.indexOf(i)>-1){s=null==(o=null==e?void 0:e[1])?void 0:o[0];break}}if(!s)return"";if("string"==typeof s)return s.startsWith("/collections/")||s.startsWith("http"),s;if(s&&"object"==typeof s){if(s.url)return s.url;if(s.handle)return"/collections/"+s.handle;if(s.id){const e=s.id.match(/collections\/([^\/]+)/);return e?"/collections/"+e[1]:s.id}}return""}const X=["isp_token_1","ISP_PRODUCTS_VIEWED_SESSION_2","fast-session-token","fs-hydrated","__isp_cart"];function ee(e,{timeout:t=1e4,onTimeout:i}={}){if(window.fast_simon_sdk_ready)return void e();const o=setInterval((()=>{window.fast_simon_sdk_ready&&(clearInterval(o),clearTimeout(s),e())}),100),s=setTimeout((()=>{clearInterval(o),te(`SDK not ready after ${t}ms — callback skipped. Clearing FS session data for next page load.`),function(){try{X.forEach((e=>localStorage.removeItem(e))),Object.keys(localStorage).forEach((e=>{0===e.indexOf("isp_location_")&&localStorage.removeItem(e)}))}catch(e){console.warn("[FastSimon] Failed to clear session data:",e)}}(),i&&i()}),t)}function te(e,t){var i;const o=`[FastSimon] ${e}`;t?console.error(o,t):console.error(o);try{if(null==(i=window.NOIBUJS)?void 0:i.addError){const e=t?`: ${(null==t?void 0:t.message)||t}`:"";window.NOIBUJS.addError(new Error(`${o}${e}`))}}catch(s){}}const ie=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),oe=e=>{if(!e)return"";return`title:"${String(e).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`},se=e=>e.replace(/ *\([^)]*\) */g,""),re=e=>e===e.trim();function ae(e){return e&&"string"==typeof e?e.trim().replace(/[^a-zA-Z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"").toLowerCase():""}function ne(e,t,i){if(!e||!e.length)return-1;if(t&&"string"==typeof t){const i=e=>{try{return e.split("?")[0].toLowerCase()}catch(t){return(e||"").toLowerCase()}},o=i(t),s=e.findIndex((e=>{var t,s,r;return i((null==(s=null==(t=e.node)?void 0:t.image)?void 0:s.url)||(null==(r=e.node)?void 0:r.url)||"")===o}));if(-1!==s)return s}if(i&&""!==i&&"undefined"!==i){const t=ie(i),o=e.findIndex((e=>{var i,o,s;return((null==(i=e.node)?void 0:i.url)||(null==(s=null==(o=e.node)?void 0:o.image)?void 0:s.url)||"").toLowerCase().includes(t)}));if(-1!==o)return o}return 0}function le(){if(window.__gmHistoryNavigationAugmented)return;window.__gmHistoryNavigationAugmented=!0;const e=window.history.replaceState.bind(window.history),t=window.history.pushState.bind(window.history);window.history.replaceState=function(t,i,o){const s=e(t,i,o);return window.dispatchEvent(new CustomEvent("replacestate",{detail:{state:t,title:i,url:o}})),s},window.history.pushState=function(e,i,o){const s=t(e,i,o);return window.dispatchEvent(new CustomEvent("pushstate",{detail:{state:e,title:i,url:o}})),s}}function de(e,t){ee((()=>{window.FastSimonSDK.event({eventName:window.FastSimonEventName.RecommendationsProductsShown,data:{products:e,widget_id:t}})}))}function ce({productID:e,sourceProductID:t,position:i}={}){const o=null!=e&&""!==e?String(e):"",s=null!=t&&""!==t?String(t):"";o&&s&&o!==s&&ee((()=>{var e,t;if(!(null==(e=window.FastSimonSDK)?void 0:e.event))return void te("ProductSwatchSwitchPerformed: FastSimonSDK.event unavailable");const r=(null==(t=window.FastSimonEventName)?void 0:t.ProductSwatchSwitchPerformed)||"productSwatchSwitch",a={productID:o,sourceProductID:s},n=Number(i);Number.isFinite(n)&&n>0&&(a.position=n),window.FastSimonSDK.event({eventName:r,data:a})}))}function ue(e,t,i=0){const o=document.getElementById(`pid-${e}`);o?window.FastSimonSDK.trackViewportImpression(o,e,t+1):i<10?setTimeout((()=>{ue(e,t,i+1)}),1e3):console.warn(`[FastSimon] trackViewportImpression: element #pid-${e} not found after ${i} retries`)}function he(e,t){if(!e||!t)return e;const i=e.includes("?");return`${e}${i?"&":"?"}width=${t}`}function pe(e,t){if(!e||!t)return e;const i=he(e,t),o=i.lastIndexOf(".");
1return o<=0?i:`${i.substring(0,o)}@2x${i.substring(o)}`}function me(e,t){if(!e||!t)return"";return`${he(e,t)} 1x, ${he(e,2*t)} 2x`}function ge(e,t={}){var i;try{const o=t.useRoot?null==e?void 0:e.$el:(null==(i=null==e?void 0:e.$el)?void 0:i.parentElement)||(null==e?void 0:e.$el);if(!o)return()=>{};const s=()=>{var e,t,i,s;const r=window.innerWidth,a=null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium,n=null==(s=null==(i=window.theme)?void 0:i.sizes)?void 0:s.large;let l="is-desktop";r<=a?l="is-mobile":r<=n&&(l="is-tablet"),o.classList.remove("is-mobile","is-tablet","is-desktop"),o.classList.add(l)};s();const r=()=>s();return document.addEventListener("theme:resize:width",r),()=>{document.removeEventListener("theme:resize:width",r)}}catch(o){return console.error("Error handling viewport size",o),()=>{}}}const fe=(e,t)=>{const i=e.__vccOpts||e;for(const[o,s]of t)i[o]=s;return i},we=["min","max","value"],ye=["min","max","value"],ve={class:"input-wrapper"},be=["value"],Se={key:0,class:"CAD"},_e={class:"input-wrapper"},Ce=["value"],Pe={key:0,class:"CAD"};const ke={class:"filter-controls"},Te=["innerHTML"],Ie={key:0},Ae=["onClick","aria-expanded","aria-controls"],Le=["id","innerHTML"],Ee=["id"],Me={class:"visually-hidden"},xe={"aria-hidden":"true"},Oe={class:"filter__button"},Be=["onClick","aria-expanded","aria-controls"],Fe=["id","innerHTML"],De=["id"],$e={class:"visually-hidden"},ze={"aria-hidden":"true"},He=["id"],Re=["onClick"],Ne=["name","value","id","checked","onClick","onChange"],Ve=["for","onClick"],qe=["aria-label","innerHTML"],Ue={class:"star-label","aria-hidden":"true"},Ge={key:0,"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-box",viewBox:"0 0 20 20"},We={key:0,class:"filter__button filter__show-more"},Ke=["aria-expanded","aria-controls","onClick"];const je=fe({name:"CollectionFilters",components:{PriceFilterSlider:fe({name:"PriceFilterSlider",props:{priceFilterMin:{type:Number,required:!0},priceFilterMax:{type:Number,required:!0},priceFilter:{type:Number,required:!0},sliderColor:{type:String,required:!0},borderColor:{type:String,required:!0},borderRadius:{type:String,required:!0}},data(){return{sliderValue:this.priceFilter,currentMin:this.priceFilterMin,currentMax:this.priceFilterMax,minGap:0,timeout:null,countryCode:window.countryCode,isInitialized:!1,sliderTrackElement:null,textInputTimeout:null}},methods:{userInputText(e){var t,i;"minInput"===(null==(t=null==e?void 0:e.target)?void 0:t.id)?this.currentMin=e.target.value:"maxInput"===(null==(i=null==e?void 0:e.target)?void 0:i.id)&&(this.currentMax=e.target.value),this.textInputTimeout&&clearTimeout(this.textInputTimeout),this.textInputTimeout=setTimeout((()=>{this.fillColor(),this.updateNarrow("Price_from_to",this.currentMin+"-"+this.currentMax),this.textInputTimeout=null}),1e3)},getUrlParam:e=>new URL(window.location.href).searchParams.get(e),getCurrentFilters(){let e=this.getUrlParam("filters");return e?JSON.parse(decodeURIComponent(e)):[]},sendNarrowUpdate(e){fp.emit("fs-update-filter",e)},updateNarrow(e,t){let i=this.getCurrentFilters().filter((e=>"Price_from_to"!==e[0]));i.push([e,t]),this.setUrlParam("filters",i),this.sendNarrowUpdate(i)},setUrlParam(e,t){const i=new URL(window.location.href);i.searchParams.set(e,JSON.stringify(t)),window.history.replaceState(null,null,i)},priceSliderFilter(){this.currentMin=document.getElementById("slider-1").value,parseInt(this.currentMax)-parseInt(this.currentMin)<=this.minGap&&(this.currentMin=parseInt(this.currentMax)-this.minGap),this.currentMax=document.getElementById("slider-2").value,parseInt(this.currentMax)-parseInt(this.currentMin)<=this.minGap&&(this.currentMax=parseInt(this.currentMin)+this.minGap),this.fillColor(),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout((()=>{this.updateNarrow("Price_from_to",this.currentMin+"-"+this.currentMax),this.timeout=null}),1e3)},fillColor(){if(this.sliderTrackElement||(this.sliderTrackElement=document.getElementById("slider-track")),!this.sliderTrackElement)return;if(!this.priceFilterMin||!this.priceFilterMax||this.priceFilterMin>=this.priceFilterMax)return void(this.sliderTrackElement.style.background=`linear-gradient(to right, #00000000 0%, ${this.sliderColor} 0%, ${this.sliderColor} 100%, #00000000 100%)`);const e=this.priceFilterMax-this.priceFilterMin,t=(this.currentMin-this.priceFilterMin)/e*100,i=(this.currentMax-this.priceFilterMin)/e*100;this.sliderTrackElement.style.background=`linear-gradient(\n      to right, \n      #00000000 ${t}% , \n      ${this.sliderColor} ${t}% , \n      ${this.sliderColor} ${i}%, \n      #00000000 ${i}%)`},checkForURLParams(){const e=this.getUrlParam("filters");if(e){const t=JSON.parse(decodeURIComponent(e)).find((e=>"Price_from_to"===e[0]));if(t){const[e,i]=t[1].split("-");this.currentMin=e,this.currentMax=i,this.fillColor()}else this.resetToFullRange()}else this.resetToFullRange()},resetToFullRange(){this.currentMin=this.priceFilterMin,this.currentMax=this.priceFilterMax,this.fillColor()}},watch:{priceFilterMin(e,t){e!==t&&e&&(this.currentMin=e,this.$nextTick((()=>{this.fillColor()})))},priceFilterMax(e,t){e!==t&&e&&(this.currentMax=e,this.$nextTick((()=>{this.fillColor()})))}},mounted(){le(),this.$nextTick((()=>{this.sliderTrackElement=document.getElementById("slider-track"),this.sliderTrackElement&&(this.sliderTrackElement.style.background=`linear-gradient(to right, #00000000 0%, ${this.sliderColor} 0%, ${this.sliderColor} 100%, #00000000 100%)`)})),fp.on("fs-update",(e=>{var t,i,o,s;this.currentMin=null==(i=null==(t=e.facets)?void 0:t.find((e=>"Price_min"===e[0])))?void 0:i[1][0],this.currentMax=null==(s=null==(o=e.facets)?void 0:o.find((e=>"Price_max"===e[0])))?void 0:s[1][0],this.checkForURLParams(),setTimeout((()=>{this.fillColor(),this.isInitialized=!0}),500)})),fp.on("filters-cleared",(()=>{this.resetToFullRange()})),this.checkForURLParams(),this.isInitialized||(this.currentMin=this.priceFilterMin,this.currentMax=this.priceFilterMax),setTimeout((()=>{this.fillColor(),this.isInitialized=!0}),100)},beforeUnmount(){fp.off("fs-update"),fp.off("filters-cleared"),this.sliderTrackElement=null,this.timeout&&clearTimeout(this.timeout),this.textInputTimeout&&clearTimeout(this.textInputTimeout)}},[["render",function(e,t,i,o,c,u){return r(),s(d,null,[a("div",{class:"container",style:n({"--slider-color":i.sliderColor,"--border-color":i.borderColor})},[t[4]||(t[4]=a("div",{class:"slider-track",id:"slider-track"},null,-1)),a("hr",{class:"slider-track-border",style:n({borderColor:i.borderColor})},null,4),a("input",{type:"range",min:i.priceFilterMin,max:i.priceFilterMax,value:c.currentMin,style:n({"--border-radius":i.borderRadius+"%"}),id:"slider-1",class:"price-range",onInput:t[0]||(t[0]=(...e)=>u.priceSliderFilter&&u.priceSliderFilter(...e))},null,44,we),a("input",{type:"range",min:i.priceFilterMin,max:i.priceFilterMax,value:c.currentMax,style:n({"--border-radius":i.borderRadius+"%"}),id:"slider-2",class:"price-range",onInput:t[1]||(t[1]=(...e)=>u.priceSliderFilter&&u.priceSliderFilter(...e))},null,44,ye)],4),a("div",{class:"values",style:n({"--slider-color":i.sliderColor,"--border-color":i.borderColor})},[a("div",ve,[t[5]||(t[5]=a("span",{class:"currency-symbol first-currency"},"$",-1)),a("input",{type:"number",value:c.currentMin,class:"price-range",id:"minInput",onInput:t[2]||(t[2]=e=>u.userInputText(e))},null,40,be),"CA"===c.countryCode?(r(),s("span",Se,"CAD")):l("",!0)]),a("div",_e,[t[6]||(t[6]=a("span",{class:"currency-symbol second-currency"},"$",-1)),a("input",{type:"number",value:c.currentMax,class:"price-range",id:"maxInput",onInput:t[3]||(t[3]=e=>u.userInputText(e))},null,40,Ce),"CA"===c.countryCode?(r(),s("span",Pe,"CAD")):l("",!0)])],4)],64)}],["__scopeId","data-v-c1c818e2"],["__file","PriceFilterSlider.vue"]])},data:()=>
1({facets:[],avoidList:[],narrowBy:[],totalResults:0,showFilters:!1,filterToggle:null,sectionSettingFiltersListButtons:"",priceFilter:"",priceFilterMin:"",priceFilterMax:"",sliderColor:"",borderColor:"",borderRadius:"",expandedFilters:new Set,filterAccordion:{toggleText:!1,toggleBtns:!1,limitText:8,limitBtns:8,labelMore:"",labelLess:""},accordionGroups:new Map,originalFacetOrder:[],isDesktop:"desktop-size"===window.siteGlobals.device,filterToggleButtons:[],filterUnderlay:null,filterToggleHandler:null,filterUnderlayHandler:null,ratingFilterShowLevel:"4",ratingFilterCountText:" & up"}),mounted(){var e,t,i,o,s,r,a,n,l,d,c,u,h,p,m,g,f,w,y,b;le(),this.sliderColor=null==(t=null==(e=this.$el.parentElement)?void 0:e.dataset)?void 0:t.sliderColor,this.borderColor=null==(o=null==(i=this.$el.parentElement)?void 0:i.dataset)?void 0:o.borderColor,this.borderRadius=null==(r=null==(s=this.$el.parentElement)?void 0:s.dataset)?void 0:r.borderRadius,this.filterToggle=document.getElementById("filter-toggle"),this.ratingFilterShowLevel=null==(n=null==(a=this.$el.parentElement)?void 0:a.dataset)?void 0:n.ratingFilterShowLevel,this.ratingFilterCountText=null==(d=null==(l=this.$el.parentElement)?void 0:l.dataset)?void 0:d.ratingFilterCountText;const S=v.get("showFilters");if(this.showFilters=!!S&&JSON.parse(S),this.isDesktop){const e=document.querySelector(".collection__filters__wrapper");e&&(e.setAttribute("data-default-hide",this.showFilters?"false":"true"),this.updateFilterVisibility(this.showFilters,e))}this.sectionSettingFiltersListButtons=null==(u=null==(c=this.$el.parentElement)?void 0:c.dataset)?void 0:u.filtersListButtons;const _=null==(p=null==(h=this.$el)?void 0:h.parentElement)?void 0:p.parentElement;if(_&&(this.filterAccordion.toggleText="true"===(null==(m=_.dataset)?void 0:m.filterAccordionText)||!1,this.filterAccordion.toggleBtns="true"===(null==(g=_.dataset)?void 0:g.filterAccordionBtns)||!1,this.filterAccordion.limitText=(null==(f=_.dataset)?void 0:f.filterAccordionLimitText)||"8",this.filterAccordion.limitBtns=(null==(w=_.dataset)?void 0:w.filterAccordionLimitBtns)||"8",this.filterAccordion.labelMore=(null==(y=_.dataset)?void 0:y.filterAccordionLabelMore)||"Show more",this.filterAccordion.labelLess=(null==(b=_.dataset)?void 0:b.filterAccordionLabelLess)||"Show less"),this.narrowBy=this.getCurrentFilters(),window.addEventListener("replacestate",this.syncStateFromUrl),this.$nextTick((()=>{this.closeAllAccordions()})),this.fsUpdateHandler=e=>{e.facets&&this.handleFacetUpdate(e.facets),this.setPriceFilterValues(),this.avoidList=e.avoidPrefixList,this.totalResults=e.totalResults,[...document.querySelectorAll("#productCounter")].forEach((e=>{e.innerHTML="("+this.totalResults+")"})),this.setFilterCount(this.narrowBy)},fp.on("fs-update",this.fsUpdateHandler),this.filterToggleButtons=Array.from(document.querySelectorAll('[data-filters-toggle="filters"]')),this.filterUnderlay=document.querySelector("[data-filters-underlay]"),this.filterToggleButtons.length>0){let e=this;this.filterToggleHandler=function(){e.updateShowFilters(!e.showFilters)},this.filterUnderlayHandler=function(){e.updateShowFilters(!1)},this.filterToggleButtons.forEach((e=>{e.addEventListener("click",this.filterToggleHandler)})),this.filterUnderlay&&this.filterUnderlay.addEventListener("click",this.filterUnderlayHandler)}window.addEventListener("resize",this.handleResize)},beforeUnmount(){window.removeEventListener("resize",this.handleResize),window.removeEventListener("replacestate",this.syncStateFromUrl),fp.off("fs-update",this.fsUpdateHandler),this.filterToggleButtons&&this.filterToggleHandler&&this.filterToggleButtons.forEach((e=>{e.removeEventListener("click",this.filterToggleHandler)})),this.filterUnderlay&&this.filterUnderlayHandler&&this.filterUnderlay.removeEventListener("click",this.filterUnderlayHandler)},methods:{sanitizeObjectKey:ae,handleize:ie,syncStateFromUrl(){this.narrowBy=this.getCurrentFilters(),this.setFilterCount(this.narrowBy)},updateShowFilters(e){if(this.showFilters=e,this.isDesktop&&v.set("showFilters",e,"7d"),this.isDesktop){const t=document.querySelector(".collection__filters__wrapper");t&&(t.setAttribute("data-default-hide",e?"false":"true"),this.updateFilterVisibility(e,t))}},updateFilterVisibility(e,t=null){const i=t||document.querySelector(".collection__filters__wrapper");i&&(i.classList.toggle("vue-filters--visible",e),i.classList.toggle("filters--default-visible",e),this.filterToggle&&this.filterToggle.classList.toggle("vue-filters--visible",e))},setFilterCount(e){let t=(null==e?void 0:e.length)||0;t>9&&(t=9);const i=document.getElementById("active-filters-count");
1i&&(i.innerHTML=t>0?`&nbsp;(${null==e?void 0:e.length})`:"")},clearFilters(){const e=[];this.setUrlParam("filters",e);const t=document.getElementById("slider-track");t&&(t.style.background=`linear-gradient(to right, #00000000 0% , ${this.sliderColor} 0%, ${this.sliderColor} 100%, #00000000 100%)`);const i=document.getElementById("minInput"),o=document.getElementById("slider-1"),s=document.getElementById("maxInput"),r=document.getElementById("slider-2");i&&(i.value=this.priceFilterMin),o&&(o.value=this.priceFilterMin),s&&(s.value=this.priceFilterMax),r&&(r.value=this.priceFilterMax),this.narrowBy=this.getCurrentFilters(),this.setFilterCount(this.narrowBy),fp.emit("filters-cleared"),this.sendNarrowUpdate(e),this.scrollToView()},scrollToView(){var e;const t=(null==(e=document.getElementById("collection-start"))?void 0:e.offsetTop)||0,i=[".collection__text-content",".collection__nav--fs"].reduce(((e,t)=>{const i=document.querySelector(t);return e+(i?i.offsetHeight:0)}),40);window.scrollTo({top:t-i,behavior:"smooth"})},sendNarrowUpdate(e){fp.emit("fs-update-filter",e)},getUrlParam:e=>new URL(window.location.href).searchParams.get(e),getCurrentFilters(){let e=this.getUrlParam("filters");return e?JSON.parse(decodeURIComponent(e)):[]},handleFilterInteraction(e,t,i,o){e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),this.updateNarrow(t,i,o)},updateNarrow(e,t,i){this.isUpdatingFilter=!0;const o=this.getCurrentFilters(),s=i?o.filter((i=>!(i[0]===e&&i[1]===t))):[...o,[e,t]];this.setUrlParam("filters",s),this.narrowBy=this.getCurrentFilters(),this.setFilterCount(this.narrowBy),this.sendNarrowUpdate(this.narrowBy)},formatRatingLabel(e,t=!1){return this.getStarLabel(e,t)},getStarIconsHtml(e){const t=parseInt(e[0]);if(isNaN(t))return"";const i="M9 14.118L14.562 17.475L13.086 11.148L18 6.891L11.529 6.342L9 0.375L6.471 6.342L0 6.891L4.914 11.148L3.438 17.475L9 14.118Z";let o="";for(let s=0;s<5;s++){o+=s<t?`<svg aria-hidden="true" viewBox="0 0 18 18" class="filter-star filter-star--filled" width="15" height="15" style="display: flex; margin-inline-end: 3.5px;"><path d="${i}" stroke="rgba(0,0,0,1)" fill="var(--primary)"></path></svg>`:`<svg aria-hidden="true" viewBox="0 0 18 18" class="filter-star filter-star--empty" width="15" height="15" style="display: flex; margin-inline-end: 3.5px;"><path d="${i}" stroke="rgba(0,0,0,1)" fill="transparent"></path></svg>`}return o},getStarLabel(e,t=!1){const i=parseInt(e[0]),o=e[1];if(isNaN(i))return t?e[0]:` ${e[0]} (${o})`;const s=1===i?"1 Star":`${i} Stars`;return i<5?t?` ${s}${this.ratingFilterCountText}`:` ${this.ratingFilterCountText} (${o})`:t?` ${s}`:` (${o})`},getStarAriaLabel(e){const t=parseInt(e[0]),i=e[1];if(isNaN(t))return`Filter by ${e[0]}, ${i} products`;const o=1===t?"1 star":`${t} stars`;return`Filter by ${t<5?`${o} and up`:o} rating, ${i} products`},setUrlParam(e,t){try{const i=new URL(window.location.href);i.searchParams.set(e,JSON.stringify(t)),window.history.replaceState(null,null,i)}catch(i){console.error("CollectionFilters: Failed to update URL:",i)}},isChecked(e,t){var i;return(null==(i=this.narrowBy)?void 0:i.some((i=>i[0]===e&&i[1]===t)))||!1},cleanFacetName(e,t,i=null){var o;if("Isp-review-stars"===i)return this.formatRatingLabel(e,t);let s=e[0]||"";const r=e[1],a=null==(o=this.avoidList)?void 0:o.find((e=>s.startsWith(e)));return a&&(s=s.replace(a,"")),t?s:`${s} (${r})`},handleFacetUpdate(e){if(e){let t=e;if(w(e)&&(t=y(e)),0===this.originalFacetOrder.length)return this.originalFacetOrder=t.map((e=>e[2])),void(this.facets=t);const i=[];this.originalFacetOrder.forEach((e=>{const o=t.find((t=>t[2]===e));o&&i.push(o)})),t.forEach((e=>{this.originalFacetOrder.includes(e[2])||(i.push(e),this.originalFacetOrder.push(e[2]))})),this.facets=i}},setPriceFilterValues(){for(let e=0;e<this.facets.length;e++){const t=this.facets[e];"Price"===t[0]&&(this.priceFilter=t[1][0]),"Price_min"===t[0]&&(this.priceFilterMin=t[1][0]),"Price_max"===t[0]&&(this.priceFilterMax=t[1][0])}},toggleShowMore(e){this.expandedFilters.has(e)?this.expandedFilters.delete(e):this.expandedFilters.add(e)}
1,toggleAccordion(e,t){if(!this.isValidAccordionClick(e))return;this.preventThemeInterference(e);const i=ae(t);this.accordionGroups.set(i,!this.accordionGroups.get(i)||!1)},closeAllAccordions(){this.accordionGroups.clear()},handleListClick(e){e.stopPropagation(),e.stopImmediatePropagation(),"INPUT"!==e.target.tagName&&"LABEL"!==e.target.tagName&&"BUTTON"!==e.target.tagName&&e.preventDefault()},handleListMouseDown(e){e.stopPropagation(),e.stopImmediatePropagation()},handleGroupClick(e){e.target.closest(".filter__show-more-button")||null!==e.target.closest(".filter__button")&&(e.stopPropagation(),e.stopImmediatePropagation())},handleResize(){window.setClientWidthClass(),this.isDesktop="desktop-size"===window.siteGlobals.device},preventThemeInterference(e){e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault()},isValidAccordionClick:e=>e.target.classList.contains("vue-accordion-trigger")||e.currentTarget.classList.contains("vue-accordion-trigger"),findFilterIndexByName(e){if(!this.facets)return-1;const t=[e=>e.toLowerCase(),e=>e.replace(/-/g," ").toLowerCase(),e=>e.replace(/_/g," ").toLowerCase(),e=>e.toLowerCase().replace(/\s+/g,"-")];for(const i of t){const t=i(e),o=this.facets.findIndex((e=>i(e[2])===t));if(-1!==o)return o}return-1}},computed:{activeFacetsCount(){const e={};if(this.narrowBy&&this.facets)for(const t of this.narrowBy){const i=this.facets.find((e=>e[0]===t[0])),o=i?i[2]:t[0];e[o]||(e[o]=0),e[o]++}return e},currentActiveFacetCount(){return e=>this.activeFacetsCount[e]||0},shouldDisplayFilterAsButton(){return e=>!(!e||"string"!=typeof e)&&new RegExp(`\\b${e.toLowerCase()}\\b`,"i").test(this.sectionSettingFiltersListButtons.toLowerCase())},isExpanded(){return e=>this.expandedFilters.has(e)},getFilterConfig(){return e=>{var t;if(!e||!Array.isArray(e)||e.length<3)return{isButtonType:!1,shouldLimit:!1,limit:0,itemCount:0};const i=this.shouldDisplayFilterAsButton(e[2]);return{isButtonType:i,shouldLimit:i?this.filterAccordion.toggleBtns:this.filterAccordion.toggleText,limit:Number(i?this.filterAccordion.limitBtns:this.filterAccordion.limitText),itemCount:(null==(t=e[1])?void 0:t.length)||0}}},shouldShowMoreButton(){return e=>{const t=this.getFilterConfig(e);return t.shouldLimit&&t.itemCount>t.limit}},getVisibleFacets(){return(e,t)=>{const i=this.getFilterConfig(e),o=this.isExpanded(t);if(!(e&&Array.isArray(e)&&e[1]&&Array.isArray(e[1])))return[];let s=e[1];if("Isp-review-stars"===e[0]){s=[...e[1]].reverse();const t=parseInt(this.ratingFilterShowLevel);s=s.filter((e=>{const i=parseInt(e[0]);return!isNaN(i)&&i>=t}))}return!i.shouldLimit||o?s:s.slice(0,i.limit)}}},watch:{narrowBy:{handler(e){this.setFilterCount(e)},immediate:!1,deep:!0}}},[["render",function(e,t,i,o,n,w){const y=c("PriceFilterSlider");return r(),s(d,null,[a("div",ke,[a("p",{class:"count",innerHTML:n.totalResults+" Results"},null,8,Te),n.narrowBy&&n.narrowBy.length>0?(r(),s("p",{key:0,onClick:t[0]||(t[0]=u(((...e)=>w.clearFilters&&w.clearFilters(...e)),["prevent"])),class:"clear"},"Clear Filters")):l("",!0)]),n.totalResults>0?(r(),s("div",Ie,[(r(!0),s(d,null,h(n.facets,((e,i)=>(r(),s("div",{key:"facet-"+w.sanitizeObjectKey(e[2])},["Price"===e[2]?(r(),s("div",{key:0,class:p(["sidebar__filter__group",!0===n.accordionGroups.get(w.sanitizeObjectKey(e[2]))?"":"accordion-is-closed"]),onClickCapture:t[3]||(t[3]=e=>w.handleGroupClick(e))},[a("button",{class:"sidebar__heading vue-accordion-trigger",onClick:u((t=>w.toggleAccordion(t,e[2])),["prevent","stop"]),"aria-expanded":!0===n.accordionGroups.get(w.sanitizeObjectKey(e[2])),"aria-controls":`filter-group-${w.handleize(e[2])}`},[a("span",{id:w.handleize(String(i)),innerHTML:e[2]},null,8,Le),w.currentActiveFacetCount(e[2])>0?(r(),s("span",{key:0,id:"filter-count-"+w.handleize(String(i))},[a("span",Me," , "+m(w.currentActiveFacetCount(e[2]))+" filter"+m(w.currentActiveFacetCount(e[2])>1?"s":"")+" applied ",1),a("b",xe,"  ("+m(w.currentActiveFacetCount(e[2]))+") ",1)],8,Ee)):l("",!0),t[7]||(t[7]=a("span",{class:"sidebar__heading-chevron"},[a("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-arrow-medium-right",viewBox:"0 0 9 15"},[a("path",{"fill-rule":"evenodd",d:"M6.875 7.066.87 1.06 1.93 0l6.006 6.005L7.94 6 9 7.06l-.004.006.005.005-1.06 1.06-.006-.004-6.005 6.005-1.061-1.06 6.005-6.006z"})])],-1))],8,Ae),a("ul",{class:p("sidebar__navigation__list "+(w.shouldDisplayFilterAsButton(e[2])?"filter__button-type-button-container":"")),style:{"margin-top":"0px","padding-top":"0px"},onClick:t[1]||(t[1]=u((e=>w.handleListClick(e)),["stop","prevent"])),onMousedown:t[2]||(t[2]=u((e=>w.handleListMouseDown(e)),["stop"]))},[a("li",Oe,[g(y,{priceFilterMin:n.priceFilterMin,priceFilterMax:n.priceFilterMax,priceFilter:n.priceFilter,sliderColor:n.sliderColor,borderColor:n.borderColor,borderRadius:n.borderRadius},null,8,["priceFilterMin","priceFilterMax","priceFilter","sliderColor","borderColor","borderRadius"])])],34)],34)):l("",!0),e[2].startsWith("Price")?l("",!0):(r(),s("div",{key:1,class:p(["sidebar__filter__group",!0===n.accordionGroups.get(w.sanitizeObjectKey(e[2]))?"":"accordion-is-closed"]),onClickCapture:t[6]||(t[6]=e=>w.handleGroupClick(e))},[a("button",{class:"sidebar__heading vue-accordion-trigger",onClick:u((t=>w.toggleAccordion(t,e[2])),["prevent","stop"]),"aria-expanded":!0===n.accordionGroups.get(w.sanitizeObjectKey(e[2])),"aria-controls":`filter-group-${w.handleize(e[2])}`},[a("span",{id:w.handleize(String(i)),innerHTML:e[2]},null,8,Fe),w.currentActiveFacetCount(e[2])>0?(r(),s("span",{key:0,id:"filter-count-"+w.handleize(String(i))},[a("span",$e," , "+m(w.currentActiveFacetCount(e[2]))+" filter"+m(w.currentActiveFacetCount(e[2])>1?"s":"")+" applied ",1),a("b",ze,"  ("+m(w.currentActiveFacetCount(e[2]))+") ",1)],8,De)):l("",!0),t[8]||(t[8]=a("span",{class:"sidebar__heading-chevron"},[a("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-arrow-medium-right",viewBox:"0 0 9 15"},[a("path",{"fill-rule":"evenodd",d:"M6.875 7.066.87 1.06 1.93 0l6.006 6.005L7.94 6 9 7.06l-.004.006.005.005-1.06 1.06-.006-.004-6.005 6.005-1.061-1.06 6.005-6.006z"})])],-1))],8,Be),a("ul",{class:p("sidebar__navigation__list "+(w.shouldDisplayFilterAsButton(e[2])?"filter__button-type-button-container":"")),id:`filter-group-${w.handleize(e[2])}`,onClick:t[4]||(t[4]=u((e=>w.handleListClick(e)),["stop","prevent"])),onMousedown:t[5]||(t[5]=u((e=>w.handleListMouseDown(e)),["stop"]))},[(r(!0),s(d,null,h(w.getVisibleFacets(e,i),((i,o)=>(r(),s("li",{key:"facet-"+o,class:"filter__button",onClick:u((t=>w.handleFilterInteraction(t,e[0],i[0],w.isChecked(e[0],i[0]))),["stop"])},[a("input",{type:"checkbox",name:w.handleize(i[0]),value:i[0],id:w.handleize(i[0])+"-"+o,checked:w.isChecked(e[0],i[0]),onClick:u((t=>w.handleFilterInteraction(t,e[0],i[0],w.isChecked(e[0],i[0]))),["stop","prevent"]),onChange:u((t=>w.handleFilterInteraction(t,e[0],i[0],w.isChecked(e[0],i[0]))),["stop","prevent"])},null,40,Ne),a("label",{for:w.handleize(i[0])+"-"+o,class:p(w.shouldDisplayFilterAsButton(e[2])&&"filter__button-type-button"),onClick:u((t=>w.handleFilterInteraction(t,e[0],i[0],w.isChecked(e[0],i[0]))),["stop","prevent"])},[a("span",{class:p(""+(w.shouldDisplayFilterAsButton(e[2])?"":"text-center"))},["Isp-review-stars"===e[0]?(r(),s(d,{key:0},[a("span",{class:"star-rating star-icons",role:"img","aria-label":w.getStarAriaLabel(i),innerHTML:w.get
1StarIconsHtml(i)},null,8,qe),a("span",Ue,m(w.getStarLabel(i,w.shouldDisplayFilterAsButton(e[2]))),1)],64)):(r(),s(d,{key:1},[f(m(w.cleanFacetName(i,w.shouldDisplayFilterAsButton(e[2]),e[0])),1)],64))],2),w.shouldDisplayFilterAsButton(e[2])?l("",!0):(r(),s("svg",Ge,[...t[9]||(t[9]=[a("g",{fill:"none","fill-rule":"evenodd"},[a("path",{class:"checkbox-border",stroke:"#000",d:"M.5.5h19v19H.5z"}),a("path",{class:"checkbox-core",fill:"#000",d:"M5 5h10v10H5z"})],-1)])])),t[10]||(t[10]=a("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-reset",viewBox:"0 0 20 20"},[a("path",{"fill-rule":"evenodd",d:"M20 10a9.73 9.73 0 0 1-.794 3.88 10.088 10.088 0 0 1-2.136 3.19 10.089 10.089 0 0 1-3.19 2.136A9.73 9.73 0 0 1 10 20a9.93 9.93 0 0 1-4.258-.944 9.776 9.776 0 0 1-3.437-2.663.465.465 0 0 1-.085-.293.384.384 0 0 1 .11-.267l1.785-1.797a.468.468 0 0 1 .325-.117c.139.018.239.07.3.157a6.535 6.535 0 0 0 2.33 1.914c.92.451 1.897.677 2.93.677a6.49 6.49 0 0 0 2.585-.528 6.717 6.717 0 0 0 2.129-1.425 6.717 6.717 0 0 0 1.425-2.13c.352-.82.528-1.681.528-2.584s-.176-1.764-.528-2.585a6.717 6.717 0 0 0-1.425-2.129 6.717 6.717 0 0 0-2.13-1.425A6.494 6.494 0 0 0 10 3.333c-.85 0-1.667.154-2.448.463A6.469 6.469 0 0 0 5.47 5.117l1.784 1.797c.269.26.33.56.182.899-.148.347-.404.52-.768.52H.833a.8.8 0 0 1-.586-.247A.8.8 0 0 1 0 7.5V1.667c0-.365.174-.621.52-.769.34-.147.639-.086.9.183l1.692 1.68A10.107 10.107 0 0 1 6.296.722 9.809 9.809 0 0 1 10 0a9.73 9.73 0 0 1 3.88.794 10.088 10.088 0 0 1 3.19 2.136 10.088 10.088 0 0 1 2.136 3.19A9.73 9.73 0 0 1 20 10z"})],-1))],10,Ve)],8,Re)))),128)),w.shouldShowMoreButton(e)?(r(),s("li",We,[a("button",{class:"filter__show-more-button gt-p__small","aria-expanded":w.isExpanded(i),"aria-controls":`filter-group-${w.handleize(e[2])}`,onClick:e=>w.toggleShowMore(i)},m(w.isExpanded(i)?n.filterAccordion.labelLess:n.filterAccordion.labelMore),9,Ke)])):l("",!0)],42,He)],34))])))),128))])):l("",!0)],64)}],["__file","CollectionFilters.vue"]]);let Qe,Ze=null,Je=!1;const Ye=new Promise((e=>{Qe=e}));function Xe(){Je||(Je=!0,Qe(null))}setTimeout((()=>Xe()),4e3);const et=`https://${window.domain}.myshopify.com/api/2026-04/graphql.json`,tt=window.storefrontToken;const it=new class{constructor(){this.client=new b({url:et,headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":tt},retries:1})}async request(e,t){var i;Je||await Ye;const o=Ze;let s=t;if(o){s=t&&"object"==typeof t&&!Array.isArray(t)&&"variables"in t?{...t,variables:{...t.variables||{},buyer:o}}:{...t||{},buyer:o}}let r=await this.client.request(e,s);const a=(null==(i=null==r?void 0:r.errors)?void 0:i.graphQLErrors)||[];if(o&&a.some((e=>String((null==e?void 0:e.message)||"").includes("not valid")))){try{sessionStorage.removeItem("cap.token")}catch(n){}Ze=null,r=await this.client.request(e,t)}return r}},ot="\n  query metafieldsByProductHandle($handle: String!, $countryIso2: CountryCode!, $metaIdentifier: [HasMetafieldsIdentifier!]!, $buyer: BuyerInput) @inContext(country: $countryIso2, buyer: $buyer) {\n  product(handle: $handle) {\n    id\n    title\n    metafields(identifiers: $metaIdentifier)\n    \t{\n    \t\tnamespace\n    \t\tkey\n     \t \tvalue\n      }\n    }\n  }\n",st="\n  query variantMetafieldsByProductHandle($handle: String!, $countryIso2: CountryCode!, $metaIdentifier: [HasMetafieldsIdentifier!]!, $buyer: BuyerInput) @inContext(country: $countryIso2, buyer: $buyer) {\n  product(handle: $handle) {\n    id\n    variants(first: 250) {\n      edges {\n        node {\n          id\n          metafields(identifiers: $metaIdentifier) {\n            namespace\n            key\n            value\n          }\n        }\n      }\n    }\n  }\n}\n",rt="\n  query PageShow($id: ID!) {\n    page(id: $id) {\n      body\n      handle\n      id\n      title\n    }\n  }\n",at="\nquery variantsByTitle($query: String!, $countryIso2: CountryCode!,$images:Int, $totalProduct:Int, $imageNS: String = null, $imageKey: String = null, $imageNS2: String = null, $imageKey2: String = null, $vimageNS: String = null, $vimageKey: String = null, $bundleSwatchMetafieldNameSpace: String = null, $bundleSwatchMetafieldName: String = null, $buyer: BuyerInput) @inContext(country: $countryIso2, buyer: $buyer) {\n  products: products(first: $totalProduct, query: $query) {\n    edges {\n      node {\n        id\n        handle\n        title\n        descriptionHtml\n        tags\n        productType\n        vendor\n        totalInventory\n        media(first:$images) {\n          edges {\n            node {\n              ... fieldsForMediaTypes\n            }\n          }\n        }\n        images (first:$images) {\n          edges {\n            node {\n              id\n              url\n              altText\n            }\n          }\n        }\n        upsellProductOption:metafield(namespace:$imageNS,key:$imageKey){\n          id,\n          value\n        }\n        upsellProductOption2:metafield(namespace:$imageNS2,key:$imageKey2){\n          id,\n          value\n        }\n        bundleSwatch:metafield(namespace:$bundleSwatchMetafieldNameSpace,key:$bundleSwatchMetafieldName){\n          id,\n          value\n          reference {\n            ... on MediaImage {\n              image {\n                url\n              }\n            }\n          }\n        }
1\n        variants(first: 250) {\n          pageInfo {\n            hasNextPage\n            endCursor\n          }\n          edges {\n            node {\n              product {\n                id\n              }\n              components(first: 50) {\n                edges {\n                  node {\n                    quantity\n                    productVariant {\n                      id\n                      sku\n                      image {\n                        url\n                      }\n                      product {\n                        handle\n                        title\n                      }\n                      selectedOptions {\n                        name\n                        value\n                      }\n                    }\n                  }\n                }\n              }\n              quantityAvailable\n              id\n              image {\n                id\n                url\n              }\n              price{\n                amount\n                currencyCode\n              }\n              compareAtPrice{\n                amount\n                currencyCode\n              }\n              availableForSale\n              selectedOptions{\n                name\n                value\n              }\n                upsellImage:metafield(namespace:$vimageNS,key:$vimageKey){\n                references(first: 5) {\n                  edges {\n                    node {\n                      ... on MediaImage {\n                        id\n                        image {\n                          url\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n  fragment fieldsForMediaTypes on Media {\n  alt\n  ... on Video {\n    id\n    sources {\n      format\n      height\n      mimeType\n      url\n      width\n    }\n  }\n  ... on ExternalVideo {\n    id\n    host\n    embeddedUrl\n  }\n  ... on MediaImage {\n    id\n    image {\n      url\n      width\n      height\n    }\n  }\n}\n",nt="\nquery variantsByHandle($handle: String!, $countryIso2: CountryCode!,$images:Int, $imageNS: String = null, $imageKey: String = null, $imageNS2: String = null, $imageKey2: String = null, $vimageNS: String = null, $vimageKey: String = null, $bundleSwatchMetafieldNameSpace: String = null, $bundleSwatchMetafieldName: String = null, $buyer: BuyerInput) @inContext(country: $countryIso2, buyer: $buyer) {\n  product(handle: $handle) {\n    id\n    handle\n    title\n    descriptionHtml\n    tags\n    productType\n    vendor\n    totalInventory\n    media(first:$images) {\n      edges {\n        node {\n          ... fieldsForMediaTypesByHandle\n        }\n      }\n    }\n    images (first:$images) {\n      edges {\n        node {\n          id\n          url\n        }\n      }\n    }\n    upsellProductOption:metafield(namespace:$imageNS,key:$imageKey){\n      id,\n      value\n    }\n    upsellProductOption2:metafield(namespace:$imageNS2,key:$imageKey2){\n      id,\n      value\n    }\n    bundleSwatch:metafield(namespace:$bundleSwatchMetafieldNameSpace,key:$bundleSwatchMetafieldName){\n      id,\n      value\n      reference {\n        ... on MediaImage {\n          image {\n            url\n          }\n        }\n      }\n    }\n    variants(first: 250) {\n      pageInfo {\n        hasNextPage\n        endCursor\n      }\n      edges {\n        node {\n          product {\n            id\n          }\n          components(first: 50) {\n            edges {\n              node {\n                quantity\n                productVariant {\n                  id\n                  sku\n                  image {\n                    url\n                  }\n                  product {\n                    handle\n                    title\n                  }\n                  selectedOptions {\n                    name\n                    value\n                  }\n                }\n              }\n            }\n          }\n          quantityAvailable\n          id\n          image {\n            id\n            url\n          }\n          price{\n            amount\n            currencyCode\n          }\n          compareAtPrice{\n            amount\n            currencyCode\n          }\n          availableForSale\n          selectedOptions{\n            name\n            value\n          }\n          upsellImage:metafield(namespace:$vimageNS,key:$vimageKey){\n            references(first: 5) {\
1n              edges {\n                node {\n                  ... on MediaImage {\n                    id\n                    image {\n                      url\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n  fragment fieldsForMediaTypesByHandle on Media {\n  alt\n  ... on Video {\n    id\n    sources {\n      format\n      height\n      mimeType\n      url\n      width\n    }\n  }\n  ... on ExternalVideo {\n    id\n    host\n    embeddedUrl\n  }\n  ... on MediaImage {\n    id\n    image {\n      url\n      width\n      height\n    }\n  }\n}\n",lt="\nquery completeTheRoom($ids: [ID!]!, $buyer: BuyerInput) @inContext(buyer: $buyer) {\n  nodes(ids: $ids) {\n    ...on Product {\n      id\n      title\n      handle\n      availableForSale\n      tags\n      images(first: 1) {\n        edges {\n          node {\n            url\n          }\n        }\n      }\n      variants(first: 250) {\n        edges {\n          node {\n            id\n            sku\n            product {\n              id\n            }\n            image {\n              id\n              url\n            }\n            price{\n              amount\n              currencyCode\n            }\n            compareAtPrice{\n              amount\n              currencyCode\n            }\n            availableForSale\n            selectedOptions{\n              name\n              value\n            }\n          }\n        }\n      }\n    }\n  }\n}\n",dt="\nquery productMasterByIds($query: String!, $countryIso2: CountryCode!, $imageNS: String = null, $imageKey: String = null, $buyer: BuyerInput) @inContext(country: $countryIso2, buyer: $buyer) {\n  products: products(first: 50, query: $query) {\n    edges {\n      node {\n        id\n        handle\n        title\n        descriptionHtml\n        tags\n        totalInventory\n        productType\n        vendor\n        images (first:5) {\n          edges {\n            node {\n              id\n              url\n            }\n          }\n        }\n        variants(first: 250) {\n          edges {\n            node {\n              id\n              product {\n                id\n              }\n              image {\n                id\n                url\n              }\n              price{\n                amount\n                currencyCode\n              }\n              compareAtPrice{\n                amount\n                currencyCode\n              }\n              availableForSale\n              selectedOptions{\n                name\n                value\n              }\n              upsellImage:metafield(namespace:$imageNS,key:$imageKey){\n                references(first: 5) {\n                  edges {\n                    node {\n                      ... on MediaImage {\n                        id\n                        image {\n                          url\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n",ct="\n  query getCollectionByGid($id: ID!) {\n    collection(id: $id) {\n      id\n      handle\n    }\n  }\n",ut="\n  query getCollectionProductsWithMetafields($id: ID!, $namespace: String!, $key: String!, $buyer: BuyerInput) @inContext(buyer: $buyer) {\n    collection(id: $id) {\n      id\n      title\n      products(first: 50) {\n        edges {\n          node {\n            id\n            title\n            handle\n            metafield(namespace: $namespace, key: $key) {\n              id\n              namespace\n              key\n              value\n              reference {\n                ... on MediaImage {\n                  alt\n                  image {\n                    altText\n                    url(transform: {maxWidth: 800 })\n                  }\n                }\n              }\n            }\n            variants(first: 250) {\n              edges {\n                node {\n                  id\n                  price {\n                    amount\n                    currencyCode\n                  }\n                  compareAtPrice {\n                    amount\n                    currencyCode\n                  }\n                  availableForSale\n                  selectedOptions {\n                    name\n                    value\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n",ht="\nquery moreProductVariants($productId: ID!, $after: String!, $countryIso2: CountryCode!, $vimageNS: String = null, $vimageKey: String = null, $buyer: BuyerInput) @inContext(country: $countryIso2, buyer: $buyer) {\n  node(id: $productId) {\n    ... on Product {\n      variants(first: 250, after: $after) {\n        pageInfo {\n          hasNextPage\n          endCursor\n        }\n        edges {\n          node {\n            product {\n              id\n            }\n            components(first: 50) {\n              edges {\n                node {\n                  quantity\n                  productVariant {\n                    id\n                    sku\n                    image {\n                      url\n                    }\n                    product {\n                      handle\n                      title\n                    }\n                    selectedOptions {\n                      name\n                      value\n                    }\n                  }\n                }\n              }\n            }\n            quantityAvailable\n            id\n            image {\n              id\n              url\n            }\n            price {\n              amount\n              currencyCode\n            }\n            compareAtPrice {\n              amount\n              currencyCode\n            }\n            availableForSale\n            selectedOptions {\n              name\n              value\n            }\n            upsellImage:metafield(namespace:$vimageNS,key:$vimageKey){\n              references(first: 5) {\
1n                edges {\n                  node {\n                    ... on MediaImage {\n                      id\n                      image {\n                        url\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n",pt="\nquery CaCustomerIdForMetafield { customer { id } }\n",mt="\nmutation SetCookieOptIn($metafields: [MetafieldsSetInput!]!) {\n  metafieldsSet(metafields: $metafields) {\n    metafields { id namespace key type value }\n    userErrors { field message code }\n  }\n}\n",gt=Object.freeze(Object.defineProperty({__proto__:null,CTLMetafieldsByTitle:'\nquery CTLMetafieldsByTitle($query: String!, $buyer: BuyerInput) @inContext(buyer: $buyer) {\n  products: products(first: 20, query: $query) {\n    edges {\n      node {\n        id\n        title\n        ctl1:metafield(namespace:"my_fields", key:"complete_the_look_1") {\n          value\n        }\n         ctl2:metafield(namespace:"my_fields", key:"complete_the_look_2") {\n          value\n        }\n        ctl3:metafield(namespace:"my_fields", key:"complete_the_look_3") {\n          value\n        }\n        ctl4:metafield(namespace:"my_fields", key:"complete_the_look_4") {\n          value\n        }\n      }\n    }\n  }\n}',CTRMetafieldsByHandle:'\nquery CTRMetafieldsByHandle($query: String!, $buyer: BuyerInput) @inContext(buyer: $buyer) {\n  product(handle: $query) {\n    CTR1: metafield(namespace: "my_fields", key: "complete_the_room_1") {\n      value\n    }\n    CTR2: metafield(namespace: "my_fields", key: "complete_the_room_2") {\n      value\n    }\n    CTR3: metafield(namespace: "my_fields", key: "complete_the_room_3") {\n      value\n    }\n    CTR4: metafield(namespace: "my_fields", key: "complete_the_room_4") {\n      value\n    }\n    CTR5: metafield(namespace: "my_fields", key: "complete_the_room_5") {\n      value\n    }\n    CTR6: metafield(namespace: "my_fields", key: "complete_the_room_6") {\n      value\n    }\n  }\n}',caCustomerIdForMetafield:pt,caSetCookieOptInMetafield:mt,completeTheLook:"\nquery completeTheLook($ids: [ID!]!, $buyer: BuyerInput) @inContext(buyer: $buyer) {\n  nodes(ids: $ids) {\
1n    ...on Product {\n      id\n      title\n      handle\n      images(first: 1) {\n        edges {\n          node {\n             url\n          }\n        }\n      }\n    }\n  }\n}\n",completeTheRoom:lt,getCollectionByGid:ct,getCollectionProductsWithMetafields:ut,getOnlineStorePageById:rt,metafieldsByProductHandle:ot,moreProductVariants:ht,productMasterByIds:dt,productSwatches:"\n  query productByTitle($query: String!, $buyer: BuyerInput) @inContext(buyer: $buyer) {\n    product: products(first: 20, query: $query) {\n      edges {\n        node {\n          id\n          title\n          handle\n          tags\n          options(first: 10) {\n            name\n            optionValues {\n              name\n            }\n          }\n        }\n      }\n    }\n  }\n",productSwatchesByTitle:"\nquery productSwatchesByTitle($query: String!, $buyer: BuyerInput) @inContext(buyer: $buyer) {\n  products: products(first: 20, query: $query) {\n    edges {\n      node {\n        id\n        handle\n        title\n        variants(first: 250) {\n          edges {\n            node {\n              product {\n                id\n              }\n              quantityAvailable\n              id\n              availableForSale\n              selectedOptions{\n                name\n                value\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n",productVariantsByHandle:nt,productVariantsByTitle:at,variantMetafieldsByProductHandle:st},Symbol.toStringTag,{value:"Module"}));const ft=new class{constructor(){this.dbName="productVariantStore",this.storeName="productData",this.db=null,this.currentProductTitle="",this.currentProductHandle="",this.productsByTitleLookup=null,this.imageNS=null,this.imageKey=null,this.imageNS2=null,this.imageKey2=null,this.vimageNS=null,this.vimageKey=null,this.bundleSwatchMetafieldNameSpace=null,this.bundleSwatchMetafieldName=null,this.hasUpsellProduct=!1,this.hasUpsellProduct2=!1,this.pendingFetches={},this.collectionCache=new Map,this.collectionPendingFetches={},this.dbDisabled=!1,this.dbOpening=!1,this.bfcacheClosed=!1,this.dbGeneration=0,this.dbOpenFailures=0,this.warmInFlightKey=null,this.warmQueued=null,this.pendingMetafields={},this.openInBackground(),this.registerBfcacheHandlers()}registerBfcacheHandlers(){if("undefined"==typeof window||!window.addEventListener)return;const e=()=>{try{this.closeConnection()}catch(e){}},t=()=>{try{this.reopenConnection()}catch(e){}};window.addEventListener("pagehide",e),window.addEventListener("pageshow",(e=>{e&&e.persisted&&t()})),"undefined"!=typeof document&&document.addEventListener&&(document.addEventListener("freeze",e),document.addEventListener("resume",t),document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&t()})))}closeConnection(){this.bfcacheClosed=!0,this.dbGeneration+=1,this.dbOpening=!1,this.db&&(this.db.close(),this.db=null)}reopenConnection(){this.bfcacheClosed=!1,this.dbOpenFailures=0,this.dbDisabled||this.db||this.dbOpening||this.openInBackground()}openInBackground(){return this.dbInitialized=this.initDB().catch((e=>{console.warn("IndexedDB open failed, running without cache:",e)})),this.dbInitialized}async ensureOpen(){await this.dbInitialized,this.db||this.dbDisabled||this.bfcacheClosed||this.dbOpenFailures>=3||(this.dbOpening||this.openInBackground(),await this.dbInitialized)}isLoggingEnabled(e=!1){return Boolean(window.productFamiliesDataDebug)||e}initDB(){const e=++this.dbGeneration,t=()=>e===this.dbGeneration;return this.dbOpening=!0,new Promise(((e,i)=>{const o=e=>{t()&&(this.dbOpening=!1,this.dbOpenFailures+=1,this.db=null),i(e)},s=setTimeout((()=>o(new Error("IndexedDB open timed out"))),3e3);let r;try{r=indexedDB.open(this.dbName,1)}catch(a){return clearTimeout(s),void o(a)}r.onerror=()=>{clearTimeout(s),o(r.error)},r.onblocked=()=>{clearTimeout(s),t()?(this.dbOpening=!1,console.warn("IndexedDB blocked by another tab, running without cache"),this.dbDisabled=!0,this.db=null,e()):e()},r.onsuccess=()=>{if(clearTimeout(s),t()&&(this.dbOpening=!1),!t()||this.dbDisabled||this.bfcacheClosed){try{r.result.close()}catch(i){}t()&&(this.db=null)}else{const e=r.result;this.db=e,this.dbOpenFailures=0,e.onversionchange=()=>{e.close(),this.db===e&&(this.db=null)}}e()},r.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName,{keyPath:"productTitle"})}}))}async getData(e){return await this.ensureOpen(),this.db?new Promise(((t,i)=>{try{const o=this.db.transaction([this.storeName],"readonly"),s=o.objectStore(this.storeName).get(e);s.onerror=()=>i(s.error),s.onsuccess=()=>t(s.result)}catch(o){i(o)}})):null}metafieldFingerprint(e={}){return[e.imageNS,e.imageKey,e.imageNS2,e.imageKey2,e.vimageNS,e.vimageKey,e.bundleSwatchMetafieldNameSpace,e.bundleSwatchMetafieldName].map((e=>e||"")).join("|")}metafieldScore(e){return e&&"string"==typeof e?e.split("|").filter(
1Boolean).length:0}metafieldsCover(e,t){const i=String(e||"").split("|");return String(t||"").split("|").every(((e,t)=>!e||i[t]===e))}async setData(e,t,i="",{allowDowngrade:o=!0}={}){var s;if(await this.ensureOpen(),this.db){if(!o)try{const t=await this.getData(e);if((null==(s=null==t?void 0:t.data)?void 0:s.length)&&Date.now()-t.timestamp<3e5&&this.metafieldScore(t.metafields)>=this.metafieldScore(i))return}catch(r){console.warn("IndexedDB read failed before write:",r)}return new Promise(((o,s)=>{try{const r=this.db.transaction([this.storeName],"readwrite"),a=r.objectStore(this.storeName).put({productTitle:e,data:t,timestamp:Date.now(),metafields:i});a.onerror=()=>s(a.error),a.onsuccess=()=>o(a.result)}catch(r){s(r)}}))}}getPreloadedProductData(e,t=null,i="product-families-json-data"){const o=i=>!!i&&(!(!t||i.handle!==t)||ie(i.title)===ie(e));if("product-families-json-data"===i&&window.productFamiliesData&&Array.isArray(window.productFamiliesData)&&window.productFamiliesData.length>0){const t=window.productFamiliesData.filter(o);if(t.length>0)return t.some((e=>this.isBundleProductType(e.productType)))?null:(this.isLoggingEnabled()&&console.log(`Using pre-loaded PDP stitch products data for "${e}" (${t.length} products found)`),t)}const s=document.getElementById(i);if(s)try{const t=JSON.parse(s.textContent);if(t&&Array.isArray(t)&&t.length>0){const i=t.filter(o);if(i.length>0)return i.some((e=>this.isBundleProductType(e.productType)))?null:(this.isLoggingEnabled()&&console.log(`Using pre-loaded PDP stitch products data from JSON for "${e}" (${i.length} products found)`),this.processProductFamiliesData(i))}}catch(r){console.warn("Error reading PDP stitch products JSON data:",r)}return null}getLiquidBootstrapProductData(e,t=null){const i=this.getPreloadedProductData(e,t,"mini-pdp-graphql-fallback-data");return i&&i.length?this.processProductFamiliesData(i):[]}async fetchGraphqlProductData(e,t,i,o,s,r=null){var a,n,l,d,c,u;let h=[];if(r){const e=await it.request(nt,{variables:{handle:r,countryIso2:t,images:i,...s}});(null==(a=null==e?void 0:e.errors)?void 0:a.length)&&console.warn("Storefront handle lookup errors:",e.errors);const o=null==(n=null==e?void 0:e.data)?void 0:n.product;o&&h.push(o)}const p=await it.request(at,{variables:{query:oe(e),countryIso2:t,images:i,totalProduct:o,...s}});(null==(l=null==p?void 0:p.errors)?void 0:l.length)&&console.warn("Storefront title lookup errors:",p.errors);return((null==(u=null==(c=null==(d=null==p?void 0:p.data)?void 0:d.products)?void 0:c.edges)?void 0:u.map((e=>e.node)))??[]).forEach((e=>{e&&!h.some((t=>t.handle===e.handle))&&h.push(e)})),h}async fetchProductData(e,t,i,o,s,r,a,n,l,d,c,u,h=null,p={}){const m=`${e}::${t}`,g=Boolean(null==p?void 0:p.silent),f=g?`${m}::silent`:m,w={imageNS:s||"",imageKey:r||"",imageNS2:a||"",imageKey2:n||"",vimageNS:l||"",vimageKey:d||"",bundleSwatchMetafieldNameSpace:c||"",bundleSwatchMetafieldName:u||""},y=this.metafieldFingerprint(w),v=(e,t,i)=>{g||this.processAndEmitData(e,t,i)};if(this.pendingFetches[f])return this.pendingFetches[f];if(!g){const t=`${m}::silent`;if(this.pendingFetches[t]&&this.metafieldsCover(this.pendingMetafields[t],y)){const i=this.pendingFetches[t];return this.pendingMetafields[f]=y,this.pendingFetches[f]=(async()=>{try{const t=await i;return this.processAndEmitData(t,e,h),t}finally{delete this.pendingFetches[f],delete this.pendingMetafields[f]}})(),this.pendingFetches[f]}}return this.pendingMetafields[f]=y,this.pendingFetches[f]=(async()=>{var p;try{this.currentProductTitle=e,this.currentProductHandle=h||"",this.productsByTitleLookup=o,this.imageNS=s||this.imageNS,this.imageKey=r||this.imageKey,this.imageNS2=a||this.imageNS2,this.imageKey2=n||this.imageKey2,this.vimageNS=l||this.vimageNS,this.vimageKey=d||this.vimageKey,this.bundleSwatchMetafieldNameSpace=c||this.bundleSwatchMetafieldNameSpace,this.bundleSwatchMetafieldName=u||this.bundleSwatchMetafieldName;const f=this.getPreloadedProductData(e,h);if(f&&f.length>0){const t=this.processProductFamiliesData(f);await this.setData(m,t,y,{allowDowngrade:!g}),v(t,e,h);const i=document.getElementById("product-families-json-data"),o="true"===(null==i?void 0:i.dataset.speedTracking),s=this.isLoggingEnabled(o);return s&&o?(console.log("[Plytix Speed] 📍 Data Source: Plytix PDP Stitch Products Metafield (used by ProductStore)"),
1console.log(`[Plytix Speed] ✅ Skipped GraphQL API call for "${e}" - using pre-loaded PDP stitch products data`)):s&&console.log(`Skipped GraphQL API call for "${e}" - using pre-loaded PDP stitch products data`),t}let S=null;try{S=await this.getData(m)}catch(b){console.warn("IndexedDB read failed, fetching from API:",b)}if(S&&(null==(p=S.data)?void 0:p.length)&&Date.now()-S.timestamp<3e5&&(g||this.metafieldsCover(S.metafields,y)))return v(S.data,e,h),S.data;const _=document.getElementById("product-families-json-data"),C="true"===(null==_?void 0:_.dataset.speedTracking),P=C?performance.now():null;this.isLoggingEnabled(C)&&(console.log("[Plytix Speed] 📍 Data Source: GraphQL API"),console.log(`[Plytix Speed] 🔄 Making GraphQL API call for "${e}" (no PDP stitch products data available)`));let k=await this.fetchGraphqlProductData(e,t,i,o,w,h);if(k.length||(k=this.getLiquidBootstrapProductData(e,h),k.length&&this.isLoggingEnabled(C)&&console.log(`[Plytix Speed] GraphQL returned 0 products, using Liquid bootstrap for "${e}"`)),this.isLoggingEnabled(C)&&null!==P){const e=performance.now()-P;console.log(`[Plytix Speed] ⏱️ GraphQL API call completed: ${e.toFixed(2)}ms`),console.log(`[Plytix Speed] 📦 Products returned from GraphQL: ${k.length}`)}if(C&&(window.productFamiliesDataSource="graphql-api"),await this.fetchRemainingVariants(k,t),k.length)try{await this.setData(m,k,y,{allowDowngrade:!g})}catch(b){console.warn("IndexedDB write failed:",b)}else console.warn("Storefront API returned 0 products for:",e,h?`(handle: ${h})`:"");return v(k,e,h),k}catch(S){console.error("Error in fetchProductData:",S);const t=this.getLiquidBootstrapProductData(e,h);return t.length?(v(t,e,h),t):(v([],e,h),[])}finally{delete this.pendingFetches[f],delete this.pendingMetafields[f]}})(),this.pendingFetches[f]}splitMetafield(e){if(!e||"string"!=typeof e||!e.includes("."))return{ns:null,key:null};const[t,i]=e.split(".");return{ns:t||null,key:i||null}}normalizeVariantMetafields(e){if(!Array.isArray(e))return null;const t={};return e.forEach((e=>{e&&e.namespace&&e.key&&null!==e.value&&void 0!==e.value&&""!==e.value&&(t[`${e.namespace}.${e.key}`]=e.value)})),t}warmFromPlp({productTitle:e,productHandle:t,countryCode:i}={}){var o;if(!e)return;const s=i||(null==(o=window.Shopify)?void 0:o.country);if(!s)return;const r=this.getPreloadedProductData(e,t);if(null==r?void 0:r.length)return;const a={key:`${e}::${s}`,productTitle:e,productHandle:t||null,country:s};this.warmInFlightKey?this.warmQueued=a:this.startWarm(a)}cancelWarmIfNotStarted(e){var t;(null==(t=this.warmQueued)?void 0:t.key)===e&&(this.warmQueued=null)}startWarm(e){var t,i;this.warmInFlightKey=e.key;const o=window.siteGlobals||{},s=this.splitMetafield(window.product_upsell_options_option_product||o.pdp_warm_upsell_option_product_1),r=this.splitMetafield(window.product_upsell_options_option_product_2||o.pdp_warm_upsell_option_product_2),a=this.splitMetafield(o.pdp_warm_variant_image_metafield),n=this.splitMetafield(o.pdp_warm_bundle_swatch_metafield),l=document.getElementById("fs-collection-products"),d=parseInt(null==(t=window.siteGlobals)?void 0:t.pdp_max_images,10)||parseInt(null==l?void 0:l.getAttribute("data-pdp-max-images"),10)||5,c=parseInt(null==(i=window.siteGlobals)?void 0:i.pdp_productsByTitleLookup,10)||10;this.fetchProductData(e.productTitle,e.country,d,c,s.ns,s.key,r.ns,r.key,a.ns,a.key,n.ns,n.key,e.productHandle,{silent:!0}).finally((()=>{this.warmInFlightKey=null;const t=this.warmQueued;this.warmQueued=null,t&&t.key!==e.key&&this.startWarm(t)}))}processAndEmitData(e,t,i=null){const o=t||this.currentProductTitle,s=i||this.currentProductHandle||null,r=this.processVariantData(e,o,s),a={variants:r.variants,colors:r.colors,sizes:y(r.sizes),widths:y(r.widths),hasUpsellProduct:r.hasUpsellProduct,optionOneName:r.optionOneName,optionTwoName:r.optionTwoName,optionThreeName:r.optionThreeName,productTitle:o,isBundleProduct:r.isBundleProduct,bundleOptionNames:r.bundleOptionNames,bundleComponents:r.bundleComponents,bundledProducts:r.bundledProducts,bundleFamilies:r.bundleFamilies||[],activeBundleHandle:r.activeBundleHandle||null};fp.emit("product-data-updated",a)}
1processProductFamiliesData(e){if(!e||!Array.isArray(e))return console.warn("processProductFamiliesData: Invalid or empty data provided"),[];const t=e.map((e=>({...e,images:e.images||{edges:[]},media:e.media||{edges:[]},variants:e.variants||{edges:[]}})));return window.productFamiliesDataDebug&&console.log("Plytix PDP stitch products data (from Liquid):",t),t}processVariantData(e,t,i=null){const o=ie(t);let s=e.filter((e=>e&&o===ie(e.title)));!s.length&&i&&(s=e.filter((e=>e&&e.handle===i)));const r=s.filter((e=>this.isBundleProductType(e.productType)));if(r.length)return this.processBundleProducts(r);const a=s.length?s:e,n=new Set;let l="",d="",c="",u="",h="";const p=a.reduce(((e,s)=>{var r,a,p;const m=o===ie(s.title),g=i&&s.handle===i;if(!s||!m&&!g)return e;const{handle:f,id:w,descriptionHtml:y,tags:v,upsellProductOption:b,upsellProductOption2:S,productType:_}=s,C=Object.prototype.hasOwnProperty.call(s,"faqsAccordionHtml")?s.faqsAccordionHtml:"",P=(null==(r=s.images)?void 0:r.edges)||[],k=(null==(a=s.media)?void 0:a.edges)||[],T=(null==(p=s.variants)?void 0:p.edges)||[];((null==b?void 0:b.value)||(null==S?void 0:S.value))&&(e.hasUpsellProduct=!0);const I=this.getProductMasterIDfromBase(w);for(const t of v)t.startsWith("color-")&&(d=t.trim());const A=T.filter((e=>null==e?void 0:e.node));A.length<T.length&&console.warn(`Filtered ${T.length-A.length} malformed variant edge(s) for:`,t);const L=A.map((({node:t})=>{var i;const o={handle:f,descriptionHtml:y,variantId:this.getVarinatIDfromBase(t.id),masterId:this.getProductMasterIDfromBase(t.product.id),availableForSale:t.availableForSale,price:t.price.amount,compareAtPrice:t.compareAtPrice?t.compareAtPrice.amount:"",color:"",size:"",width:"",quantityAvailable:t.quantityAvailable,image:(null==(i=t.image)?void 0:i.url)||"",sku:t.sku,productType:_,upsellProductId:b,upsellProductId2:S,sizeDetails:t.sizeDetails?t.sizeDetails.value:"",upsellImage:t.upsellImage?t.upsellImage.references.edges:"",variantMetafields:this.normalizeVariantMetafields(t.variantMetafields),bundleSelections:[]};l=t.price.amount;return(t.selectedOptions||[]).forEach(((t,i)=>{0===i&&(o.color=t.value,n.has(t.value)||(n.add(t.value),e.colors.push({name:t.value,handle:f,pid:I,images:P,media:k,tags:v,upsellProductOption:b,upsellProductOption2:S,productType:_,description:y,faqsAccordionHtml:C,price:l,colorGroupId:d}),c=t.name)),1===i&&(o.size=t.value,e.sizes.includes(t.value)||(e.sizes.push(t.value),u=t.name)),2===i&&(o.width=t.value,e.widths.includes(t.value)||(e.widths.push(t.value),h=t.name))})),o}));return e.variants.push(...L),e}),{variants:[],colors:[],sizes:[],widths:[],hasUpsellProduct:!1});return{variants:p.variants,colors:p.colors,sizes:p.sizes,widths:p.widths,hasUpsellProduct:p.hasUpsellProduct,isBundleProduct:!1,bundleOptionNames:[],bundleComponents:{},bundledProducts:[],bundleFamilies:[],activeBundleHandle:null,optionOneName:c,optionTwoName:u,optionThreeName:h}}processBundleProducts(e){const t=e.map((e=>this.processSingleBundleNode(e))).filter(Boolean),i=this.sortBundlesByAdminOrder(t),o="undefined"!=typeof window&&window.pdp_product_handle?window.pdp_product_handle:null,s=o?this.prioritizeBundledProductsByHandle(i,o):i,r=s[0]||this.buildEmptyBundleResult(),a=this.groupBundledProducts(s);return{variants:r.variants,colors:r.colors,sizes:r.sizes,widths:r.widths,hasUpsellProduct:r.hasUpsellProduct,optionOneName:r.optionOneName,optionTwoName:r.optionTwoName,optionThreeName:r.optionThreeName,bundleOptionNames:r.bundleOptionNames,bundleComponents:r.bundleComponents,bundledProducts:s,bundleFamilies:a,activeBundleHandle:r.handle||null,isBundleProduct:!0,BundledProductRefHandle:r.BundledProductRefHandle}}processSingleBundleNode(e){var t,i,o,s,r,a,n,l,d,c,u,h;if(!e)return null;const p=new Set,m=new Set,g=new Set,f={},w=new Set,y=[],v=[];let b="",S="",_="";if(Array.isArray(e.tags))for(const x of e.tags)x.startsWith("color-")&&(b=x.trim());const C=(null==(t=null==e?void 0:e.images)?void 0:t.edges)||[],P=(null==(i=null==e?void 0:e.media)?void 0:i.edges)||[],k=Array.isArray(null==(o=null==e?void 0:e.variants)?void 0:o.edges)?e.variants.edges:[],T=this.getProductMasterIDfromBase(e.id),I=k.filter((e=>null==e?void 0:e.node)),A=I.filter((e=>{var t,i,o;return null==(o=null==(i=null==(t=null==e?void 0:e.node)?void 0:t.components)?void 0:i.edges)?void 0:o.length}))||[];
1(A.length?A:I).forEach((({node:t})=>{var i,o,s,r,a,n;const l=this.normalizeBundleComponents((null==(i=null==t?void 0:t.components)?void 0:i.edges)||[]),d=l,c=this.buildBundleColorLabel(d,null==t?void 0:t.selectedOptions),u=this.buildBundleComponentSizeLabel(d,null==t?void 0:t.selectedOptions),h=this.buildBundleChildSwatchMap(d,null==t?void 0:t.selectedOptions),g={handle:e.handle,descriptionHtml:e.descriptionHtml,variantId:this.getVarinatIDfromBase(t.id),masterId:this.getProductMasterIDfromBase(t.product.id),availableForSale:t.availableForSale,price:t.price.amount,compareAtPrice:t.compareAtPrice?t.compareAtPrice.amount:"",color:c,size:u,width:"",quantityAvailable:t.quantityAvailable,image:(null==(o=t.image)?void 0:o.url)||"",sku:t.sku,productType:e.productType,upsellProductId:e.upsellProductOption,upsellProductId2:e.upsellProductOption2,sizeDetails:t.sizeDetails?t.sizeDetails.value:"",upsellImage:t.upsellImage?t.upsellImage.references.edges:"",variantMetafields:this.normalizeVariantMetafields(t.variantMetafields),bundleSelections:d,childSwatchMap:h};if(f[g.variantId]=l,!p.has(c)){p.add(c);const i=this.getPrimaryChildProductId(d);y.push({name:c,handle:e.handle,pid:i||g.masterId||T,images:C,media:P,tags:e.tags,upsellProductOption:e.upsellProductOption,upsellProductOption2:e.upsellProductOption2,productType:e.productType,description:e.descriptionHtml,faqsAccordionHtml:Object.prototype.hasOwnProperty.call(e,"faqsAccordionHtml")?e.faqsAccordionHtml:"",price:t.price.amount,colorGroupId:b,bundleComponents:l,bundleSwatch:null==(s=e.bundleSwatch)?void 0:s.value,bundleSwatchImageUrl:null==(n=null==(a=null==(r=e.bundleSwatch)?void 0:r.reference)?void 0:a.image)?void 0:n.url}),S=S||"Color"}u&&!m.has(u)&&(m.add(u),_=_||"Bundle Options"),Array.isArray(null==t?void 0:t.selectedOptions)&&t.selectedOptions.forEach((e=>{(null==e?void 0:e.name)&&w.add(e.name)})),v.push(g)}));const L=Array.from(w),E=Boolean((null==(s=e.upsellProductOption)?void 0:s.value)||(null==(r=e.upsellProductOption2)?void 0:r.value)),M=(null==(l=null==(n=null==(a=v[0])?void 0:a.bundleSelections)?void 0:n[0])?void 0:l.productHandle)||null;return{handle:e.handle,title:e.title,id:e.id,productType:e.productType,variants:v,colors:y,sizes:Array.from(m),widths:Array.from(g),hasUpsellProduct:E,optionOneName:S,optionTwoName:_,optionThreeName:"",bundleOptionNames:L,bundleComponents:f,bundleChildSwatches:v.reduce(((e,t)=>((null==t?void 0:t.variantId)&&(e[t.variantId]=t.childSwatchMap||{}),e)),{}),BundledProductRefHandle:M,bundleSwatch:null==(d=e.bundleSwatch)?void 0:d.value,bundleSwatchImageUrl:null==(h=null==(u=null==(c=e.bundleSwatch)?void 0:c.reference)?void 0:u.image)?void 0:h.url,isBundleProduct:!0}}normalizeBundleComponents(e){return Array.isArray(e)?e.map((({node:e})=>{var t,i,o,s;if(!(null==e?void 0:e.productVariant))return null;const r=e.productVariant,a=r.selectedOptions||[],n=this.getFirstMatchingOption(a,["color","colour","shade"]),l=this.getFirstMatchingOption(a,["size","waist","inseam","length"]),d=a.reduce(((e,t)=>((null==t?void 0:t.name)&&(e[t.name]=t.value||""),e)),{});return{quantity:e.quantity??0,productVariantId:this.getVarinatIDfromBase(r.id||""),productId:(null==(t=r.product)?void 0:t.id)?this.getProductMasterIDfromBase(r.product.id):"",sku:r.sku||"",productHandle:(null==(i=r.product)?void 0:i.handle)||"",productTitle:(null==(o=r.product)?void 0:o.title)||"",selectedOptions:a,optionValues:d,color:(null==n?void 0:n.value)||"",colorOptionName:(null==n?void 0:n.name)||"",size:(null==l?void 0:l.value)||"",sizeOptionName:(null==l?void 0:l.name)||"",swatchColor:(null==n?void 0:n.value)||"",image:(null==(s=r.image)?void 0:s.url)||""}})).filter(Boolean):[]}getFirstMatchingOptionValue(e,t){const i=this.getFirstMatchingOption(e,t);return(null==i?void 0:i.value)||""}getFirstMatchingOption(e,t){if(!Array.isArray(e)||!(null==t?void 0:t.length))return null;const i=t.map((e=>e.toLowerCase()));for(const o of e){if(!(null==o?void 0:o.name))continue;const e=o.name.toLowerCase();if(i.some((t=>e.includes(t))))return o}return null}buildBundleColorLabel(e,t){const i=Array.isArray(e)?e.map((e=>
1e.color)).filter(Boolean):[];if(i.length)return i.join(" + ");if(Array.isArray(e)){const t=e.map((e=>e.productTitle)).filter(Boolean);if(t.length)return t.join(" + ")}if(Array.isArray(t)&&t.length){const e=this.getFirstMatchingOptionValue(t,["color","colour","shade"]);if(e)return e;const i=t.map((e=>null==e?void 0:e.value)).filter(Boolean);if(i.length)return i.join(" / ")}return"Bundle"}buildBundleChildSwatchMap(e,t){if(!Array.isArray(e)||!e.length)return{};const i={};return e.forEach(((e,t)=>{const o=e.productHandle||e.productTitle||`child-${t}`,s=e.swatchColor||e.color||this.getFirstMatchingOptionValue(e.selectedOptions,["color","colour","shade"])||"";i[o]={color:s,optionName:e.colorOptionName||"Color"}})),i}buildBundleComponentSizeLabel(e,t){return Array.isArray(e)&&e.length?e.map((e=>{const t=e.productTitle||e.productHandle||"Item",i=e.size||this.getFirstMatchingOptionValue(e.selectedOptions,["size","waist","inseam","length"]);return i?`${t}: ${i}`:t})).join(" / "):Array.isArray(t)&&t.length?this.buildBundleSelectionLabel(t):"Bundle"}prioritizeBundledProductsByHandle(e,t){const i=e.findIndex((e=>(null==e?void 0:e.handle)===t));if(i<=0)return e;const o=e.slice(),[s]=o.splice(i,1);return o.unshift(s),o}sortBundlesByAdminOrder(e){if(!Array.isArray(e)||!e.length)return e;const t=this.getBundleOrderTokens();return t.length?e.slice().sort(((e,i)=>{const o=this.getBundleComparisonValue(e),s=this.getBundleComparisonValue(i),r=this.getBundleOrderIndex(t,o),a=this.getBundleOrderIndex(t,s);return r===a?o.localeCompare(s):r-a})):e}getBundleComparisonValue(e){var t,i;if(!e)return"";const o=null==(i=null==(t=null==e?void 0:e.colors)?void 0:t[0])?void 0:i.name;return o||((null==e?void 0:e.title)||"")}getBundleOrderTokens(){if("undefined"==typeof window||!window.pdp_bundle_order)return[];const e=window.pdp_bundle_order;return Array.isArray(e)?e.map((e=>null==e?void 0:e.toString().trim().toLowerCase())).filter(Boolean):e.toString().split(",").map((e=>e.trim().toLowerCase())).filter(Boolean)}getBundleOrderIndex(e,t){if(!e.length||null==t)return Number.MAX_SAFE_INTEGER;const i=t.toString().trim().toLowerCase();if(!i.length)return Number.MAX_SAFE_INTEGER;const o=e.indexOf(i);return-1===o?Number.MAX_SAFE_INTEGER:o}buildEmptyBundleResult(){return{variants:[],colors:[],sizes:[],widths:[],hasUpsellProduct:!1,optionOneName:"",optionTwoName:"",optionThreeName:"",bundleOptionNames:[],bundleComponents:{},bundledProducts:[],bundleFamilies:[],activeBundleHandle:null,isBundleProduct:!0}}groupBundledProducts(e){const t=new Map;return e.forEach((e=>{if(!e)return;const i=this.buildBundleFamilyKey(e.title||e.handle);t.has(i)||t.set(i,{title:e.title,handles:[],products:[],childHandleSet:new Set});const o=t.get(i);o.handles.push(e.handle),o.products.push(e);const s=e.bundleComponents||{};Object.values(s).forEach((e=>{Array.isArray(e)&&e.forEach((e=>{(null==e?void 0:e.productHandle)&&o.childHandleSet.add(e.productHandle)}))}))})),Array.from(t.values()).map((e=>({title:e.title,handles:e.handles,products:e.products,childHandles:Array.from(e.childHandleSet||[])})))}buildBundleFamilyKey(e){return e?ie(e):"bundle-family-unknown"}getPrimaryChildProductId(e){if(!Array.isArray(e)||!e.length)return"";const t=e.find((e=>null==e?void 0:e.productId));return(null==t?void 0:t.productId)||""}isBundleProductType(e){return!(!e||"string"!=typeof e)&&"bundles"===e.trim().toLowerCase()}buildBundleSelectionLabel(e){return Array.isArray(e)&&e.length?e.map((e=>null==e?void 0:e.value)).filter(Boolean).join(" / "):"Bundle"}getVarinatIDfromBase(e){return e.replace("gid://shopify/ProductVariant/","")}getProductMasterIDfromBase(e){return e.replace("gid://shopify/Product/","")}async fetchCollectionUrl(e){if(!e)return"";const t=this.collectionCache.get(e);return t||(this.collectionPendingFetches[e]||(this.collectionPendingFetches[e]=it.request(ct,{variables:{id:e}}).then((t=>{var i,o;const s=null==(o=null==(i=t.data)?void 0:i.collection)?void 0:o.handle,r=s?"/collections/"+s:"";return r&&this.collectionCache.set(e,r),r})).catch((()=>"")).finally((()=>delete this.collectionPendingFetches[e]))),this.collectionPendingFetches[e])}async fetchRemainingVariants(e,t){const i=e.filter((e=>{var t,i;return null==(i=null==(t=null==e?void 0:e.variants)?void 0:t.pageInfo)?void 0:i.hasNextPage}));i.length&&await Promise.all(i.map((async e=>{var i,o,s,r,a;let n=!0,l=e.variants.pageInfo.endCursor;for(;n;)try{const d=await it.request(ht,{variables:{productId:e.id,after:l,countryIso2:t,vimageNS:this.vimageNS||"",vimageKey:this.vimageKey||""}}),c=null==(o=null==(i=null==d?void 0:d.data)?void 0:i.node)?void 0:o.variants;if(!(null==(s=null==c?void 0:c.edges)?void 0:s.length))break;e.variants.edges.push(...c.edges),n=(null==(r=c.pageInfo)?void 0:r.hasNextPage)||!1,l=null==(a=c.pageInfo)?void 0:a.endCursor}catch(d){console.warn("Failed to fetch additional variants for product:",e.id,d);break}}
1)))}},wt=["data-badge-tag"],yt=["src","alt"],vt=["innerHTML"];const bt=fe({name:"ProductListTopLeftBadge",props:{tags:Array,collectionId:String,badgeHideConfig:{type:Object,default:()=>({})}},data(){var e;return{alt:"",badgeDetails:null==(e=window.productBadges)?void 0:e.topLeftBadges,badgeTag:"",color:"",img:"",isProcessing:!1,rank:15,showBadge:!1,text:"",textColor:"",showOverrideBadge:!1}},computed:{shouldShowImage(){return this.img&&""!==this.img.trim()},isTextBadge(){return this.text&&!this.shouldShowImage},textBadgeWidthVars(){const e=window.productBadges||{},t={};return null!=e.topLeftTextBadgeWidthMobile&&(t["--top-left-text-badge-width-mobile"]=`${e.topLeftTextBadgeWidthMobile}px`),null!=e.topLeftTextBadgeWidthDesktop&&(t["--top-left-text-badge-width-desktop"]=`${e.topLeftTextBadgeWidthDesktop}px`),t},badgeAltText(){const e=window.Shopify.cdnHost.replace("/cdn","");return this.alt||e+" badge image"}},mounted(){var e,t;const i=null==(e=window.productBadges)?void 0:e.overrideEventName;i&&(window.addEventListener(i,(e=>{this.showOverrideBadge=!0===e.detail,this.setTag()})),!0===(null==(t=window.productBadges)?void 0:t[i])&&(this.showOverrideBadge=!0)),this.handleViewportSize=ge(this),this.setTag()},beforeUnmount(){this.handleViewportSize&&this.handleViewportSize()},watch:{tags:function(){this.setTag()}},methods:{reset(){this.rank=15,this.showBadge=!1,this.color="",this.img="",this.text="",this.textColor="",this.alt="",this.badgeTag=""},isHidden(e){var t;if(!(null==(t=this.badgeHideConfig)?void 0:t.topLeft)||!this.collectionId)return!1;const i=this.badgeHideConfig.topLeft[e];if(!i)return!1;const o=this.collectionId.replace(/[\s_-]/g,"");return i.has(o)},setTag(){this.reset(),this.isProcessing||(this.isProcessing=!0,requestAnimationFrame((()=>{this.performTagUpdate(),this.isProcessing=!1})))},shouldShowOverrideImage(e){return!0===this.showOverrideBadge&&e.img_override?e.img_override:e.img},shouldShowOverrideText(e){return!0===this.showOverrideBadge&&e.text_override?e.text_override:e.text},shouldShowOverrideTextColor(e){return!0===this.showOverrideBadge&&e.text_color_override?e.text_color_override:e.text_color},shouldShowOverrideColor(e){return!0===this.showOverrideBadge&&e.color_override?e.color_override:e.color},performTagUpdate(){let e=this.badgeDetails;w(e)&&(e=y(e));let t=this.tags;w(t)&&(t=y(t));const i=[];if(t&&Array.isArray(t))for(const o in e){const s=e[o].tag;t.find((e=>e==s))&&i.push({tag:s,rank:e[o].rank,color:this.shouldShowOverrideColor(e[o]),img:this.shouldShowOverrideImage(e[o]),text:this.shouldShowOverrideText(e[o]),textColor:this.shouldShowOverrideTextColor(e[o]),alt:e[o].alt||""})}if(0!==i.length){i.sort(((e,t)=>e.rank-t.rank));for(const e of i){let t=null;e.rank>=1&&e.rank<=6?t=`product_badge_image_tag_${e.rank}`:e.rank>=7&&e.rank<=9&&(t="product_badge_image_text_tag_"+(e.rank-6));if(!!t&&this.isHidden(t))return void this.reset();if(e.img||e.text)return this.rank=e.rank,this.showBadge=!0,this.color=e.color,this.img=e.img,this.text=e.text,this.textColor=e.textColor,this.badgeTag=e.tag,void(this.alt=e.alt)}this.reset()}else this.reset()}}},[["render",function(e,t,i,o,a,d){return a.showBadge&&(a.img||a.text)?(r(),s("div",{key:0,class:p(["topLeftBadge pdp-badge gt-badge",{"topLeftBadge--text":d.isTextBadge}]),style:n(d.isTextBadge?d.textBadgeWidthVars:null),"data-badge-tag":a.badgeTag},[d.shouldShowImage?(r(),s("img",{key:0,src:a.img,class:"badge-image",alt:d.badgeAltText},null,8,yt)):l("",!0),a.text?(r(),s("div",{key:1,innerHTML:a.text,style:n({color:a.textColor,backgroundColor:a.color})},null,12,vt)):l("",!0)],14,wt)):l("",!0)}],["__file","ProductListTopLeftBadge.vue"]]),St=["data-badge-tag"],_t=["src","alt"];const Ct=fe({name:"ProductListBottomPillBadge",props:{tags:Array,collectionId:String,badgeHideConfig:{type:Object,default:()=>({})}},data(){var e,t;return{alt:"",badgeDetails:null==(e=window.productBadges)?void 0:e.pillbadges,badgeTag:"",img:"",isProcessing:!1,plpHide:null==(t=window.productBadges)?void 0:t.plp_pill_hide,rank:1
15,showBadge:!1,showOverrideBadge:!1}},computed:{badgeAltText(){const e=window.Shopify.cdnHost.replace("/cdn","");return this.alt||e+" badge image"}},mounted(){var e,t;const i=null==(e=window.productBadges)?void 0:e.overrideEventName;i&&(window.addEventListener(i,(e=>{this.showOverrideBadge=!0===e.detail,this.setTag()})),!0===(null==(t=window.productBadges)?void 0:t[i])&&(this.showOverrideBadge=!0)),this.setTag()},watch:{tags:function(){this.setTag()}},methods:{reset(){this.rank=15,this.showBadge=!1,this.img="",this.alt="",this.badgeTag=""},isHidden(e){var t;if(!(null==(t=this.badgeHideConfig)?void 0:t.pill)||!this.collectionId)return!1;const i=this.badgeHideConfig.pill[e];if(!i)return!1;const o=this.collectionId.replace(/[\s_-]/g,"");return i.has(o)},setTag(){this.reset(),this.isProcessing||(this.isProcessing=!0,requestAnimationFrame((()=>{this.performTagUpdate(),this.isProcessing=!1})))},shouldShowOverrideImage(e){return!0===this.showOverrideBadge&&e.img_override?e.img_override:e.img},performTagUpdate(){let e=this.badgeDetails;w(e)&&(e=y(e));let t=this.tags;w(t)&&(t=y(t));const i=[];for(const o in e){const s=e[o].tag;t.find((e=>e===s))&&i.push({tag:s,rank:e[o].rank,img:this.shouldShowOverrideImage(e[o]),alt:e[o].alt||""})}if(0!==i.length){i.sort(((e,t)=>e.rank-t.rank));for(const e of i){const t=`pill_badge_image_tag_${e.rank}`;return this.isHidden(t)?void this.reset():(this.showBadge=!this.plpHide,this.rank=e.rank,this.img=e.img,this.alt=e.alt,void(this.badgeTag=e.tag))}this.reset()}else this.reset()}}},[["render",function(e,t,i,o,n,d){return n.showBadge&&n.img?(r(),s("div",{key:0,class:"pillbadges","data-badge-tag":n.badgeTag},[a("img",{src:n.img,class:"badge-image",alt:d.badgeAltText},null,8,_t)],8,St)):l("",!0)}],["__file","ProductListBottomPillBadge.vue"]]),Pt={name:"ProductListTextUnderBadge",props:{tags:Array,collectionId:String,badgeHideConfig:{type:Object,default:()=>({})},isPlp:{type:Boolean,default:!1},price:{type:Number,default:0}},data(){var e;return{badgeDetails:null==(e=window.productBadges)?void 0:e.textBadge,badgeTag:"",color:"",isProcessing:!1,rank:15,showBadge:!1,text:"",showOverrideBadge:!1}},computed:{},mounted(){var e,t;const i=null==(e=window.productBadges)?void 0:e.overrideEventName;i&&(window.addEventListener(i,(e=>{this.showOverrideBadge=!0===e.detail,this.setTag()})),!0===(null==(t=window.productBadges)?void 0:t[i])&&(this.showOverrideBadge=!0)),this.setTag()},watch:{tags:function(){this.setTag()},price:function(){this.setTag()}},methods:{reset(){this.rank=15,this.showBadge=!1,this.color="",this.text="",this.badgeTag=""},isHidden(e){var t;if(!(null==(t=this.badgeHideConfig)?void 0:t.textUnderPrice)||!this.collectionId)return!1;const i=this.badgeHideConfig.textUnderPrice[e];if(!i)return!1;const o=this.collectionId.replace(/[\s_-]/g,"");return i.has(o)},setTag(){this.reset(),this.isProcessing||(this.isProcessing=!0,requestAnimationFrame((()=>{this.performTagUpdate(),this.isProcessing=!1})))},shouldShowOverrideText(e){return!0===this.showOverrideBadge&&e.text_override?e.text_override:e.text},shouldShowOverrideColor(e){return!0===this.showOverrideBadge&&e.color_override?e.color_override:e.color},performTagUpdate(){let e=this.badgeDetails;w(e)&&(e=y(e));let t=this.tags;w(t)&&(t=y(t));const i=[];for(const o in e){const s=e[o].tag;t.find((e=>e===s))&&i.push({tag:s,rank:e[o].rank,color:this.shouldShowOverrideColor(e[o]),text:this.shouldShowOverrideText(e[o]),showInPlp:e[o].showInPlp,showInPdp:e[o].showInPdp,discountPercent:e[o].discountPercent||null})}if(0!==i.length){i.sort(((e,t)=>e.rank-t.rank));for(const e of i){if(this.isPlp&&!e.showInPlp)continue;if(!this.isPlp&&!e.showInPdp)continue;const t=`text_badge_tag_${e.rank}`;return this.isHidden(t)?void this.reset():(this.showBadge=!0,this.rank=e.rank,this.color=e.color,this.text=this.applyDiscountToText(e.text,e.discountPercent),void(this.badgeTag=e.tag))}this.reset()}else this.reset()},applyDiscountToText(e,t){var i,o;if(!(t&&this.price&&e&&e.includes("||new price||")))return e;const s=this.price*(1-parseFloat(t)/100),r=new Intl.NumberFormat("en-US",{style:"currency",currency:(null==(o=null==(i=window.Shopify)?void 0:i.currency)?void 0:o.active)||"USD"}).format(s).replace(".00","");return e.replace(/\|\|new price\|\|/g,r)}}},kt=["data-badge-tag"],Tt=["innerHTML"];const It=fe(Pt,[["render",function(e,t,i,o,d,c){return d.showBadge&&d.text?(r(),s("div",{key:0,class:"product__grid__title__wrapper promo-badge gt-p__small","data-badge-tag":d.badgeTag},[a("div",{innerHTML:d.text,style:n("color:"+d.color)},null,12,Tt)],8,kt)):l("",!0)}],["__file","ProductListTextUnderBadge.vue"]]);let At=!1;const Lt={components:{ProductListTopLeftBadge:bt,ProductListBottomPillBadge:Ct,ProductListTextUnderBadge:It,Carousel:P,Slide:C,Pagination:_,Navigation:S},name:"ProductListItem",props:{fsData:Object,useFsProductData:Boolean,collectionHandle:String,collectionId:String,disableSlider:Boolean,getCurrentLocales:String,gridLarge:Number,gridSmall:Number,hideSwatches:Boolean,hideQuickview:Boolean,imageLookUpMax:Number,parentActiveSlider:String,pid:String,productAttrObj:Object,productCategoryMetafieldOne:String,productCategoryMetafieldTwo:String,productCategoryMetafieldOneCollection:String,productCategoryMetafieldTwoCollection:String,productImageName:String,productIndex:Number,productPLPDescription:String,productReminderMetafieldEmbed:String,productTitle:String,productsToCompare:Set,productTypesExcluded:String,searchTerm:String,setReminderFormIdPopup:String,setReminderLinkText:String,showFullDetailsLink:{type:Boolean,required:!1,default:!1},sliderIDActive:String,sliderIDLast:String,slideIndex:{type:Number,required:!0},swatchSuffix:String,showSalePercentage:{type:Boolean,required:!1,default:!1},showRating:{type:Boolean,required:!1,default:!1},ratingStarColor:{type:String,required:!1,default:""},ratingCountColor:{type:String,required:!1,default:""},collectionTracking:Boolean,badgeHideConfig:{type:Object,default:()=>({})},fsWidgetId:{type:String,default:""},fsProductPosition:{type:Number,default:0},kameleoonCompareEnabled:{type:Boolean,default:!0},enableMobilePeekABoo:{type:Boolean,default:!1}},emits:["currentCarouselSlideStart","countCarouselsLoaded","update:productsToCompare","toggle-compare"],watch:{sliderIDActive:{handler(e){e===this.activePid?this.hideMe=!1:this.hideMe=!0}},sliderIDLast:{handler(e){e===this.activePid&&this.resetCarousel()}},colors:{handler(){this.$nextTick((()=>{this.applyCarouselARIA()}))},deep:!1}},data(){var e,t;return{activePid:"",aspectRatio:0,bodyClasses:"",bodyID:"",colors:[],colorsCount:0,countryCode:"",currencyCode:"",currentSlide:0,gridSizeBasedSwatches:1,hideMe:!0,isHovering:!1,isPeeking:!1,peekResyncing:!1,mobileShowPaginationDots:!1,mobilePaginationDotsHideTimeout:null,intentDwellTimer:null,itemsToScroll:1,itemsToShow:1,lessThan3Swatches:!1,lessThan5Swatches:!1,metafieldValueSplit:[],mouseDrag:!1,pagination:"",PIDshowing:!1,prices:[],product:"",productIsFragrance:!0,productIsType:"",productsByTitleLookup:parseInt(window.siteGlobals.plp_productsByTitleLookup),productSwatchesHidden:!1,reminderFormIDEmbed:"",reminderFormIDPopup:"",rootUrl:window.Shopify.routes.root||window.location.origin,sellOutSettings:!1,enableLazyLoading:"undefined"==typeof window||!window.theme||!window.theme.settings||Boolean(window.theme.settings.enable_lazy_loading),setReminderMetafield:"",setReminderPDP:!1,setReminderPDPHideSizes:!1,setReminderProductLink:!1,setReminderTag:"",shouldAutoPlay:0,slideInitialPid:"",slideNewPid:"",slideTimeOut:1500,soldOutTag:"",swatchLimits:{mobile:3,tablet:4,desktop:6},swatchType:"",touchDrag:!1,vendor:"",hasReorganized:!1,reorganizedColors:[],colorName:"Color",enableCompare:!1,plpAllowedCompareCollectionIds:[],rating:null,ratingCount:null,productCategoryMetafieldOneCollectionUrl:"",productCategoryMetafieldTwoCollectionUrl:"",showVendor:!1,addVendorLink:!1,defaultVendor:"",vendorColorText:"",vendorCollectionExists:!1,collectionIdFallback:"",isPlpRoute:!1,plpQuickviewIconAlt:"undefined"!=typeof window&&(null==(e=window.siteGlobals)?void 0:e.plp_quickview_icon_alt)||"",plpQuickviewAriaLabel:"undefined"!=typeof window&&(null==(t=window.siteGlobals)?void 0:t.plp_quickview_aria_label)||""}},computed:{resolvedCollectionId(){return this.collectionId||this.collectionIdFallback||""},compareCount(){return this.productsToCompare?this.productsToCompare.size:0},compareSetSize(){const e=this.$props.productsToCompare||this.productsToCompare;return(null==e?void 0:e.size)||0},compareSetIds(){const e=this.$props.productsToCompare||this.productsToCompare;return e?Array.from(e).map((e=>
1String((null==e?void 0:e.pid)||(null==e?void 0:e.id)))).filter(Boolean):[]},enableCompareResolved(){return this.kameleoonCompareEnabled&&this.enableCompare},swatchConfig(){const e=this.getClientWidth(),t={"mobile-size":this.swatchLimits.mobile,"tablet-size":this.swatchLimits.tablet,"desktop-size":this.swatchLimits.desktop};return{device:e,limit:Number(t[e])}},visibleColors(){return this.hasReorganized&&this.reorganizedColors.length?this.reorganizedColors:this.colors},remainingColorsCount(){const e=this.colors.findIndex((e=>e.pid===this.activePid));return-1===e||this.swatchConfig.limit,Math.max(0,this.colorsCount-this.swatchConfig.limit)},shouldShowSalePercentage(){return this.showSalePercentage},shouldShowMobilePlpQuickview(){if(this.hideQuickview||!this.isPlpRoute)return!1;const e=window.siteGlobals;return!!this.isCheckboxSettingOn(null==e?void 0:e.quickview_enable)&&this.isCheckboxSettingOn(e.mobile_plp_quickview_enable)},shouldShowDesktopPlpQuickview(){if(this.hideQuickview||!this.isPlpRoute)return!1;const e=window.siteGlobals;return!!this.isCheckboxSettingOn(null==e?void 0:e.quickview_enable)&&this.isCheckboxSettingOn(e.desktop_plp_quickview_enable)},shouldShowCrosssellQuickview(){if(this.hideQuickview||this.isPlpRoute)return!1;const e=window.siteGlobals;return this.isCheckboxSettingOn(null==e?void 0:e.quickview_enable)},shouldShowQuickviewIcon(){return this.shouldShowMobilePlpQuickview||this.shouldShowDesktopPlpQuickview||this.shouldShowCrosssellQuickview},isCrosssellQuickviewIcon(){return this.shouldShowCrosssellQuickview},showQuickviewMounted(){return this.shouldShowQuickviewIcon},hasDesktopPlpImageSwatches(){var e;return this.isPlpRoute&&!!this.swatchSuffix&&!0!==this.hideSwatches&&!this.productSwatchesHidden&&(null==(e=this.colors)?void 0:e.length)>1},plpQuickviewIconUrl(){var e;const t=null==(e=window.siteGlobals)?void 0:e.plp_quickview_icon_url;if("string"!=typeof t)return"";const i=t.trim();return i.length?i:""},hasPlpQuickviewIcon(){return!!this.plpQuickviewIconUrl},showPaginationDots(){return!0!==this.disableSlider&&("mobile-size"===this.getClientWidth()?this.mobileShowPaginationDots:this.isHovering)},shouldShowVendor(){return!(!this.showVendor||!this.vendor||"string"!=typeof this.vendor)&&(!this.defaultVendor||"string"!=typeof this.defaultVendor||this.vendor.trim()!==this.defaultVendor.trim())},vendorUrl(){if(!this.addVendorLink||!this.vendor||"string"!=typeof this.vendor||!this.vendorCollectionExists)return null;const e=this.handleize(this.vendor);return window.theme.routes.root_url+"collections/"+e},hasVisibleSwatches(){var e;return!0!==this.hideSwatches&&!this.productSwatchesHidden&&!!(null==(e=this.colors)?void 0:e.length)},intrinsicImageHeight(){const e=this.aspectRatio||getComputedStyle(document.documentElement).getPropertyValue("--PRODUCT-GRID-ASPECT-RATIO-DECIMAL").trim()||"3 / 4",[t,i]=e.includes("/")?e.split("/").map((e=>parseFloat(e.trim()))):[parseFloat(e)||.75,1];return Math.round(500/(t/i))}},created(){if("undefined"!=typeof document){const e=document.querySelector("body");this.bodyID=(null==e?void 0:e.id)||"",this.bodyClasses=Array.from((null==e?void 0:e.classList)||[]),this.isPlpRoute=this.resolveIsPlpRoute()}},mounted(){var e,t,i,o;if(this.handleViewportSize=ge(this),this.activePid=this.pid,this.countryCode=window.Shopify.country,this.currencyCode=window.Shopify.currency.active,this.bodyID=document.querySelector("body").id,this.bodyClasses=Array.from(document.querySelector("body").classList),this.isPlpRoute=this.resolveIsPlpRoute(),this.getCurrentPage(),this.soldOutTag=window.siteGlobals.badge_sellout_tag,this.sellOutSettings=window.siteGlobals.badge_sellout,this.showVendor="true"===(null==(e=window.siteGlobals)?void 0:e.show_vendor)||!0===(null==(t=window.siteGlobals)?void 0:t.show_vendor),this.addVendorLink=!1,this.defaultVendor=(null==(i=window.siteGlobals)?void 0:i.default_vendor)||"",this.vendorColorText=(null==(o=window.siteGlobals)?void 0:o.vendor_color_text)||"","true"==this.useFsProductData?this.setupDataFromFS():1!=this.hideSwatches?this.getProductData():this.getProductDataById(),setTimeout((()=>{this.applyCarouselARIA()}),100),this.setReminderTag=window.siteGlobals.set_reminder_tag,this.setReminderMetafield=window.siteGlobals.set_reminder_metafield,this.setReminderProductLink=window.siteGlobals.set_reminder_product_link,this.setReminderPDP=window.siteGlobals.set_reminder_pdp,this.setReminderPDPHideSizes=window.siteGlobals.set_reminder_pdp_hide_sizes,"true"===this.useFsProductData){const e=this.extractGidFromUrl(this.productCategoryMetafieldOneCollection),t=this.extractGidFromUrl(this.productCategoryMetafieldTwoCollection);e?this.fetchCollectionUrl(e,"productCategoryMetafieldOneCollectionUrl"):this.productCategoryMetafieldOneCollectionUrl=this.productCategoryMetafieldOneCollection&&!this.productCategoryMetafieldOneCollection.includes("gid://")?this.productCategoryMetafieldOneCollection:"",t?this.fetchCollectionUrl(t,"productCategoryMetafieldTwoCollectionUrl"):this.productCategoryMetafieldTwoCollectionUrl=this.productCategoryMetafieldTwoCollection&&!this.productCategoryMetafieldTwoCollection.includes("gid://")?this.productCategoryMetafieldTwoCollection:""}else this.productCategoryMetafieldOneCollectionUrl=this.productCategoryMetafieldOneCollection&&!this.productCategoryMetafieldOneCollection.includes("gid://")?this.productCategoryMetafieldOneCollection:"",this.productCategoryMetafieldTwoCollectionUrl=this.productCategoryMetafieldTwoCollection&&!this.productCategoryMetafieldTwoCollection.includes("gid://")?this.productCategoryMetafieldTwoCollection:"";if(""!=this.productReminderMetafieldEmbed&&null!=this.productReminderMetafieldEmbed){let e=this.productReminderMetafieldEmbed.split("|");this.reminderFormIDEmbed=e[0],this.reminderFormIDPopup=e[1]}
1const s=document.getElementById("fs-collection-products");if(null!=s){this.aspectRatio=s.getAttribute("data-grid-ratio"),this.swatchType=s.getAttribute("data-product_swatch_type");const e=s.getAttribute("data-swatch_limit_mobile"),t=s.getAttribute("data-swatch_limit_tablet"),i=s.getAttribute("data-swatch_limit_desktop");this.swatchLimits={mobile:e?Number(e):this.swatchLimits.mobile,tablet:t?Number(t):this.swatchLimits.tablet,desktop:i?Number(i):this.swatchLimits.desktop};const o=s.getAttribute("data-plp-enable-compare"),r=s.getAttribute("data-plp-compare-collections")||"",a=s.getAttribute("data-collection-id")||"";!this.collectionId&&a&&(this.collectionIdFallback=String(a));const n="true"===String(o||"").toLowerCase(),l=r.split(",").map((e=>String(e||"").trim())).filter(Boolean);this.plpAllowedCompareCollectionIds=l,this.enableCompare=n&&(!l.length||this.resolvedCollectionId&&l.includes(String(this.resolvedCollectionId)))}fp.on("fs-update-filter",(()=>{this.resetCarousel()})),fp.on("fs-update-grid-size-large",(e=>{this.updateSwatchCountBasedOnGridSize(e)})),fp.on("fs-update-grid-size-small",(e=>{this.updateSwatchCountBasedOnGridSize(e)})),fp.on("fs-sidebar-click",(()=>{setTimeout((()=>{this.$nextTick((()=>{this.resetCarousel()}))}),500)})),this.debouncedResize=G((()=>{this.updateSwatchCountBasedOnGridSize()}),500,!1),document.addEventListener("theme:resize:width",this.debouncedResize),this.$watch((()=>this.colors),(e=>{if(!e.length)return;const t=e.findIndex((e=>e.pid===this.activePid));if(t>=this.swatchConfig.limit){const i=[...e],o=i.splice(t,1)[0];i.splice(this.swatchConfig.limit-1,0,o),this.reorganizedColors=i,this.hasReorganized=!0}else this.reorganizedColors=[],this.hasReorganized=!1}),{immediate:!0,flush:"post"})},updated(){this.$nextTick((()=>{if(!this.$el||"function"!=typeof this.$el.querySelectorAll)return;const e=this.$el.querySelectorAll(".carousel__viewport"),t=this.$el.querySelectorAll(".carousel__track");e.forEach((e=>{e.hasAttribute("role")||e.setAttribute("role","none")})),t.forEach((e=>{e.hasAttribute("role")||e.setAttribute("role","none")}))}))},beforeUnmount(){clearTimeout(this.mobilePaginationDotsHideTimeout),clearTimeout(this.intentDwellTimer),this.handleViewportSize&&this.handleViewportSize(),fp.off("fs-update-filter"),fp.off("fs-update-grid-size-large"),fp.off("fs-update-grid-size-small"),fp.off("fs-sidebar-click"),document.removeEventListener("theme:resize:width",this.debouncedResize)},methods:{isCheckboxSettingOn(e){if(!0===e)return!0;const t=String(null==e?"":e).trim().toLowerCase();return"true"===t||"1"===t||"yes"===t},resolveIsPlpRoute(){const e=window.siteGlobals,t=(null==e?void 0:e.pageType)?String(e.pageType).toLowerCase().trim():"";return"collection"===t||"search"===t||(!(!this.bodyClasses.includes("template-collection")&&!this.bodyClasses.includes("template-search"))||!("undefined"==typeof document||!document.getElementById("fs-collection-products")))},isCompareDisabled(e){return this.compareSetSize>=3&&!this.isItemCompared(e)},isItemCompared(e){if(!(null==e?void 0:e.pid)&&!(null==e?void 0:e.id))return!1;const t=String((null==e?void 0:e.pid)||(null==e?void 0:e.id));return this.compareSetIds.includes(t)},toggleCompare(e){!this.isItemCompared(e)&&this.compareSetSize>=3||this.$emit("toggle-compare",e)},applyCarouselARIA(e=0){if(!this.$el||"function"!=typeof this.$el.querySelectorAll)return;const t=this.$el.querySelectorAll(".carousel__viewport"),i=this.$el.querySelectorAll(".carousel__track");if(0!==t.length||0!==i.length)t.forEach((e=>{e.hasAttribute("role")||e.setAttribute("role","none")})),i.forEach((e=>{e.hasAttribute("role")||e.setAttribute("role","none")})),this.syncProductImageCarouselInert();else if(e<3){const t=100*Math.pow(2,e);setTimeout((()=>{this.applyCarouselARIA(e+1)}),t)}},syncProductImageCarouselInert(){this.$el&&"function"==typeof this.$el.querySelectorAll&&this.$el.querySelectorAll(".product-image-carousel").forEach((e=>function(e){if(!e||"function"!=typeof e.querySelectorAll)return;const t="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,i=e.querySelectorAll('li.carousel__slide[aria-hidden="true"]'),o=e.querySelectorAll('li.carousel__slide:not([aria-hidden="true"])');
1if(t)return i.forEach((e=>{e.inert=!0})),void o.forEach((e=>{e.inert=!1}));i.forEach((e=>{e.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])').forEach((e=>{if(!e.hasAttribute("data-vc-inert-tab")){const t=e.hasAttribute("tabindex")?e.getAttribute("tabindex"):"";e.setAttribute("data-vc-inert-tab",t)}e.setAttribute("tabindex","-1")}))})),o.forEach((e=>{e.querySelectorAll("[data-vc-inert-tab]").forEach((e=>{const t=e.getAttribute("data-vc-inert-tab");e.removeAttribute("data-vc-inert-tab"),""===t?e.removeAttribute("tabindex"):e.setAttribute("tabindex",t)}))}))}(e)))},isHidden(e,t){if(!this.badgeHideConfig||!this.resolvedCollectionId)return!1;const i=this.badgeHideConfig[e];if(!i||!i[t])return!1;const o=this.resolvedCollectionId.replace(/[\s_-]/g,"");return i[t].has(o)},chooseTextUnderPriceBadge(e){var t,i;if(!(null==(t=window.productBadges)?void 0:t.textBadge)||!e)return null;const o=null==(i=window.productBadges)?void 0:i.textBadge,s=[];for(const r in o){const t=o[r].tag;e.find((e=>e===t))&&s.push({tag:t,rank:o[r].rank,color:o[r].color,text:o[r].text})}if(0===s.length)return null;s.sort(((e,t)=>e.rank-t.rank));for(const r of s){const e=`text_badge_tag_${r.rank}`;if(!this.isHidden("textUnderPrice",e))return{...r,key:e}}return null},getFSDataByName:(e,t)=>e&&e.length>0?e.find((e=>e[0]===t)):[],setColoObjectFromFSalt(e,t){var i,o,s,r;const a=e[1].replace("/products/","");if(a===t)return;let n=this.getFSDataByName(e[3].att,"Product images")||[];n=n[1]&&Array.isArray(n[1])?n[1].slice(0,this.imageLookUpMax):[];let l=this.getFSDataByName(e[3].att,"Tag"),d=this.getFSDataByName(this.fsData.att,"Type"),c=this.fsData.d,u={availableForSale:!e[3].iso,compareAtPrice:e[3].p_c&&e[3].p_c>0?{amount:String(e[3].p_c)}:null,descriptionHtml:c,handle:a,productTitle:this.productTitle,images:n,name:e[0],pid:e[2],price:e[3].p,productType:d&&d[1]?d[1]:"",tags:l&&l[1]?l[1]:[]},h={compareAtPriceMax:parseFloat(e.p_max_c??(null==(i=e[3])?void 0:i.p_max_c))||0,compareAtPriceMin:parseFloat(e.p_min_c??(null==(o=e[3])?void 0:o.p_min_c))||0,priceMax:parseFloat(e.p_max??(null==(s=e[3])?void 0:s.p_max))||0,priceMin:parseFloat(e.p_min??(null==(r=e[3])?void 0:r.p_min))||0,handle:u.handle};return this.prices.push(h),u},setColoObjectFromFSPrimary(e){var t,i;const o=null==(t=e.vra[0])?void 0:t[1],s=o?this.getFSDataByName(o,"Color"):null,r=(null==(i=null==s?void 0:s[1])?void 0:i[0])||"";let a=this.getFSDataByName(e.att,"Option 1 name")||[0,"Color"];this.colorName=a&&a[1]?a[1]:"Color";let n=this.getFSDataByName(e.att,"Product images")||[];n=n[1]&&Array.isArray(n[1])?n[1].slice(0,this.imageLookUpMax):[];let l=this.getFSDataByName(e.att,"Tag"),d=this.getFSDataByName(e.att,"Type"),c=e.d,u={availableForSale:!e.iso,compareAtPrice:e.p_c&&e.p_c>0?{amount:String(e.p_c)}:null,descriptionHtml:c,handle:e.u.replace("/products/",""),productTitle:this.productTitle,images:n,name:r,pid:e.id,price:e.p,productType:d&&d[1]?d[1]:"",tags:l&&l[1]?l[1]:[]},h={compareAtPriceMax:parseFloat(e.p_max_c)||0,compareAtPriceMin:parseFloat(e.p_min_c)||0,priceMax:parseFloat(e.p_max)||0,priceMin:parseFloat(e.p_min)||0,handle:u.handle};return this.prices.push(h),u},setupDataFromFS(){var e;if(null==(e=this.fsData)?void 0:e.att){let e=this.getFSDataByName(this.fsData.att,"Vendor"),t=e&&e[1]?e[1]:"";this.vendor=Array.isArray(t)?t[0]||"":t,this.checkVendorCollectionExists()}let t=this.setColoObjectFromFSPrimary(this.fsData),i=t.handle;this.colors.push(t),this.fsData.alt&&this.fsData.alt.forEach((e=>{let t=this.setColoObjectFromFSalt(e,i);t&&this.colors.push(t)})),this.colorsCount=this.colors.length,this.updateSwatchCountBasedOnGridSize(),this.fetchRatingIfEnabled(),this.$nextTick((()=>{this.$nextTick((()=>{if(!this.$el||"function"!=typeof this.$el.querySelectorAll)return void fp.emit("fs-products-loaded",!0);const e=this.$el.querySelectorAll(".product-grid-item__image");if(!e.length)return void fp.emit("fs-products-loaded",!0);if(Array.from(e).every((e=>e.complete)))return void fp.emit("fs-products-loaded",!0);const t=Array.from(e).map((e=>e.complete?Promise.resolve():new Promise((t=>{e.onload=t,e.onerror=t}))));Promise.all(t).then((()=>{fp.emit("fs-products-loaded",!0)}))}))}))},getClientWidth(){const e=window.siteGlobals.device;return"mobile-size"==e?"mobile-size":"tablet-size"==e?"tablet-size":"desktop-size"},checkSoldOutBadgeStatus(e){let t=this.sellOutSettings;if(this.soldOutTag){e.find((e=>e==this.soldOutTag))&&(t=!1)}return t},checkReminderTag(e){let t=!1;if(""!=this.setReminderTag){e.find((e=>e==this.setReminderTag))&&(t=!0)}return t},colorHasPriceRange(e){const t=this.prices.find((t=>t.handle===e));if(!t)return!1;const i=parseFloat(t.priceMin)||0,o=parseFloat(t.priceMax)||0;return i>0&&o>0&&i!==o},compareAtRangeClass(e){const t=this.prices.find((t=>t.handle===e));if(!t)return"hide_compare_at_price_range";return 0===(parseFloat(t.compareAtPriceMin)||0)?"hide_compare_at_price_range":" sale_color_range compare_at_range_crossed_out"},getPriceRangeMinByHandle(e){let t=0;
1return this.prices.forEach((i=>{i.handle===e&&(t=i.priceMin)})),this.convertToCurrency(t)},getPriceRangeMaxByHandle(e){let t=0;return this.prices.forEach((i=>{i.handle===e&&(t=i.priceMax)})),this.convertToCurrency(t)},getCompareAtPriceRangeMinByHandle(e){let t=0;return this.prices.forEach((i=>{i.handle===e&&(t=i.compareAtPriceMin)})),this.convertToCurrency(t)},getCompareAtPriceRangeMaxByHandle(e){let t=0;return this.prices.forEach((i=>{i.handle===e&&(t=i.compareAtPriceMax)})),this.convertToCurrency(t)},trackClick(e){"undefined"!=typeof ElevarDataLayer&&""!=this.searchTerm&&window.handleSearchResultsClick(e)},HandleColorlessProducts(e,t){return this.productIsFragrance?0===e:this.activePid===t},checkSwatchesByProductType(e){let t=!0;return e.forEach((e=>{"Fragrance"!=e.productType&&"Candles"!=e.productType&&"Diffusers"!=e.productType||(t=!1)})),this.productIsFragrance=!t,t},getCurrentPage:()=>new URL(document.location).searchParams.get("current"),handleize:e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),async checkVendorCollectionExists(){if(!this.addVendorLink||!this.vendor||"string"!=typeof this.vendor)return;const e=this.handleize(this.vendor);if(window._vendorCollectionCache=window._vendorCollectionCache||{},e in window._vendorCollectionCache)this.vendorCollectionExists=window._vendorCollectionCache[e];else try{const t=(await fetch(window.theme.routes.root_url+"collections/"+e+".json",{method:"HEAD"})).ok;window._vendorCollectionCache[e]=t,this.vendorCollectionExists=t}catch{window._vendorCollectionCache[e]=!1,this.vendorCollectionExists=!1}},getColorSwatchImages(e){const t=window.cdn+this.handleize(e)+".png";return"background-image:url("+this.buildSizedImageUrl(t,120)+")"},getImageSwatchImages(e){var t,i,o,s;if("true"!==this.useFsProductData){let r=null==(i=null==(t=e.images.find((e=>{var t;const i=null==(t=null==e?void 0:e.node)?void 0:t.url;return i.includes(this.productImageName)||i.includes(this.swatchSuffix)})))?void 0:t.node)?void 0:i.url;return r||(r=(null==(s=null==(o=e.images[0])?void 0:o.node)?void 0:s.url)||this.assetUrl+e.swatch),r}{let t=e.images.find((e=>{const t=e;return t.includes(this.productImageName)||t.includes(this.swatchSuffix)}));return t||(t=e.images[0]||this.assetUrl+e.swatch),t}},resolveImageUrl(e){var t;return"true"==this.useFsProductData?e:null==(t=null==e?void 0:e.node)?void 0:t.url},handleImageUrl(e){return he(this.resolveImageUrl(e),700)},productImageSrcset(e){const t=this.resolveImageUrl(e);return t?[400,600,800,1e3,1200,1600].map((e=>`${he(t,e)} ${e}w`)).join(", "):""},productImageSizes(){var e,t;const i=Number(this.gridLarge)||4,o=Number(this.gridSmall)||2;return`(min-width: ${((null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium)||767)+1}px) calc(100vw / ${i}), calc(100vw / ${o})`},buildSizedImageUrl:(e,t)=>he(e,t),getImageSwatchSrcSet(e){return me(this.getImageSwatchImages(e),60)},handleSlideStart(e){this.$emit("currentCarouselSlideStart",e),this.peekResyncing||this.revealMobilePaginationDots()},handleSlideEnd(){this.scheduleHideMobilePaginationDots(),this.syncProductImageCarouselInert()},revealMobilePaginationDots(){"mobile-size"===this.getClientWidth()&&(clearTimeout(this.mobilePaginationDotsHideTimeout),this.mobileShowPaginationDots=!0)},scheduleHideMobilePaginationDots(){"mobile-size"===this.getClientWidth()&&(clearTimeout(this.mobilePaginationDotsHideTimeout),this.mobilePaginationDotsHideTimeout=setTimeout((()=>{this.mobileShowPaginationDots=!1}),800))},handleMouseLeave(e){var t;if("mobile-size"!=window.siteGlobals.device){const i=null==e?void 0:e.relatedTarget;if(i&&(null==(t=this.$el)?void 0:t.contains(i)))return;this.isHovering=!1,this.resetCarousel()}},handleMouseOver(){"mobile-size"!=window.siteGlobals.device&&(this.isHovering=!0,this.shouldAutoPlay=this.slideTimeOut)},getIntentColor(){var e,t;return(null==(e=this.colors)?void 0:e.find((e=>e.pid===this.activePid)))||(null==(t=this.colors)?void 0:t[0])||null},getPdpImageWidths(){var e,t;const i=document.getElementById("fs-collection-products");return{desktop:Number(window.pdp_desktop_image_width||(null==i?void 0:i.getAttribute("data-pdp-desktop-image-width"))||(null==(e=window.theme)?void 0:e.pdpDesktopImageWidth)),mobile:Number(window.pdp_mobile_image_width||(null==i?void 0:i.getAttribute("data-pdp-mobile-image-width"))||(null==(t=window.theme)?void 0:t.pdpMobileImageWidth))}},onProductIntentStart(){clearTimeout(this.intentDwellTimer),this.intentDwellTimer=setTimeout(this.onProductIntent,120)},onProductIntent(){var e,t;const i=this.getIntentColor();if(!i)return;!("product"===String((null==(e=window.siteGlobals)?void 0:e.pageType)||"").toLowerCase())&&this.productTitle&&ft.warmFromPlp({productTitle:this.productTitle,productHandle:i.handle,countryCode:this.countryCode||(null==(t=window.Shopify)?void 0:t.country)}),this.prefetchPdpLcpImage(i)},onProductPointerDown(e){if(e.target.closest(".swatch_button_wrapper"))return;const t=e.target.closest("a");t&&!/\/products\//.test(t.getAttribute("href")||"")||(clearTimeout(this.intentDwellTimer),this.onProductIntent())},onProductIntentEnd(){var e;clearTimeout(this.intentDwellTimer);const t=this.countryCode||(null==(e=window.Shopify)?void 0:e.country);this.productTitle&&t&&ft.cancelWarmIfNotStarted(`${this.productTitle}::${t}`)},prefetchPdpLcpImage(e){var t,i,o;const s=this.resolveImageUrl(null==(t=null==e?void 0:e.images)?void 0:t[0]);if(!s)return;const r=null==(o=null==(i=window.theme)?void 0:i.sizes)?void 0:o.medium,a="number"==typeof r&&window.innerWidth<=r,{desktop:n,mobile:l}=this.getPdpImageWidths();if(!(a?l:n))return;const d=he(s,a?2*l:n);if(!d)return;const c="gm-pdp-lcp-prefetch";let u=document.getElementById(c);(null==u?void 0:u.href)!==d&&(u||(u=document.createElement("link"),u.id=c,u.rel="prefetch",u.as="image",document.head.appendChild(u)),u.href=d)},resetCarousel(){const e=this.$refs.mainCarousel;this.shouldAutoPlay=0,e&&(Array.isArray(e)?e.forEach((e=>e.slideTo(0,!0))):e.slideTo(0,!0))},async triggerPeekABoo(){var e,t,i,o,s;if(!this.enableMobilePeekABoo)return;if(At||"mobile-size"!==(null==(e=window.siteGlobals)?void 0:e.device))return;if(((null==(o=null==(i=null==(t=this.colors)?void 0:t[0])?void 0:i.images)?void 0:o.length)??0)<=1)return;await new Promise((e=>setTimeout(e,800)));const r=this.$refs.mainCarousel,a=Array.isArray(r)?r[0]:r,n=null==a?void 0:a.$el;if(!n)return;const l=n.querySelector(".carousel__track"),d=n.querySelector(".carousel__viewport");if(!l||!d)return;At=!0;const c=d.getBoundingClientRect().width,u=window.getComputedStyle(l).transform,h="none"===u?0:new DOMMatrixReadOnly(u).m41,p=n.querySelectorAll(".carousel__slide")[Math.round(Math.abs(h)/c)+1]||null;p&&p.classList.add("peek-target"),this.isPeeking=!0,await this.$nextTick();try{await l.animate([{transform:`translateX(${h}px)`,easing:"ease-in-out"},{transform:`translateX(${h-.33*c}px)`,offset:.35,easing:"cubic-bezier(0.34, 1.56, 0.64, 1)"},{transform:`translateX(${h}px)`}],{duration:1400,fill:"none"}).finished}finally{if(p&&p.classList.remove("peek-target"),this.isPeeking=!1,null==(s=l.getAnimations)||s.call(l).forEach((e=>e.cancel())),await this.$nextTick(),"function"==typeof a.restartCarousel&&a.restartCarousel(),await this.$nextTick(),"function"==typeof a.slideTo){this.peekResyncing=!0;try{a.slideTo(0,!0)}finally{await this.$nextTick(),this.peekResyncing=!1}}}},updateSwatchCountBasedOnGridSize(){this.$nextTick((()=>{this.calculateMaxVisibleSwatches(),this.resetCarousel(),this.$nextTick((()=>{const e=this.$refs.swatchCarousel;e&&"function"==typeof e.restartCarousel&&e.restartCarousel()}))}))},calculateMaxVisibleSwatches(){if(!this.$el||"function"!=typeof this.$el.querySelector)return;const e=this.$el.querySelector(".swatch_button_wrapper.image_swatches");if(!e)return;const t=e.offsetWidth,i=e.querySelector(".swatch-spacer .swatch-anchor"),o=null==i?void 0:i.offsetWidth;!t||!o||o<=0||(this.itemsToShow=Math.max(1,Math.floor(t/o)),this.itemsToScroll=this.itemsToShow)},alignSwatchCarouselToIndex(e){if(!this.swatchSuffix||!0===this.hideSwatches||this.productSwatchesHidden)return;if(!this.$el||"function"!=typeof this.$el.querySelector)return;this.calculateMaxVisibleSwatches();const t=this.colors.length;if(0===t||e<0||e>=t)return;const i=Math.max(1,this.itemsToShow);if(t<=i)return void(this.currentSlide=0);const o=Math.max(0,Math.ceil(t-i));let s=this.currentSlide;e<s?s=e:e>s+i-1&&(s=e-i+1),this.currentSlide=Math.min(Math.max(0,s),o)},areThereLessThan5Swatches(){this.colors.length<this.gridSizeBasedSwatches&&(this.lessThan5Swatches=!0)},areThereLessThan3Swatches(){this.colors.length<=3&&(this.lessThan3Swatches=!0)},setCounterMessage(e){return 1==e?"1 "+this.colorName:e+" "+this.colorName+"s"},setSwatchesToShow:e=>e>6?6:e,setProductPDPLink(e){return this.collectionHandle?window.theme.routes.root_url+"collections/"+this.collectionHandle+"/products/"+e:window.theme.routes.root_url+"products/"+e},isActive:e=>0==e?"product-grid-item__image-wrapper is-active":"product-grid-item__image-wrapper",shouldDisplayProduct(){let e=!1;
1return this.colors.forEach((t=>{t.pid===this.activePid&&(e=!0)})),e},ShouldDisplayComparePrice:(e,t)=>!!(e&&e.amount&&parseFloat(e.amount)>parseFloat(t)),getSwatchSwitchPosition(){return this.fsProductPosition?this.fsProductPosition:"number"==typeof this.productIndex?this.productIndex+1:"number"==typeof this.slideIndex?this.slideIndex+1:void 0},setActiveColor(e,t){const i=this.activePid;this.activePid=e,String(e)!==String(this.pid)&&String(e)!==String(i)&&ce({productID:e,sourceProductID:this.pid,position:this.getSwatchSwitchPosition()}),"true"==this.useFsProductData&&this.resetCarousel(),String(e)!==String(i)&&(clearTimeout(this.intentDwellTimer),this.onProductIntent()),this.$nextTick((()=>{this.alignSwatchCarouselToIndex(t)}))},onSwatchCarouselModelValue(e){this.currentSlide=e},convertToCurrency(e){let t=Intl.NumberFormat("en-US",{style:"currency",currency:this.currencyCode}).format(e).replace(".00","");return t.includes("CA")&&(t=t.replace("CA",""),t+=" CAD"),t},getProductMasterIDfromBase:e=>e.replace("gid://shopify/Product/",""),getActiveClass(e){return e===this.activePid?"swatch__label is-active":"swatch__label"},getProductDataById(){it.request(dt,{variables:{query:"id:"+this.pid,countryIso2:this.countryCode}}).then((e=>{var t;const i=null==(t=e.data.products.edges[0])?void 0:t.node;i&&this.productTitle===i.title&&this.processProductData([i])})).then((()=>{this.$nextTick((()=>{if(!this.$el||"function"!=typeof this.$el.querySelectorAll)return void fp.emit("fs-products-loaded",!1);const e=this.$el.querySelectorAll(".product-grid-item__image");if(!e.length)return void fp.emit("fs-products-loaded",!1);const t=Array.from(e).map((e=>e.complete?Promise.resolve():new Promise((t=>{e.onload=t,e.onerror=t}))));Promise.all(t).then((()=>{fp.emit("fs-products-loaded",!0)}))}))})).catch((e=>{console.error("ProductListItem: Error fetching product data:",{error:(null==e?void 0:e.message)||e,stack:null==e?void 0:e.stack,response:null==e?void 0:e.response,fullError:e})}))},getProductData(){it.request(at,{variables:{query:oe(this.productTitle),countryIso2:this.countryCode,images:this.imageLookUpMax,totalProduct:this.productsByTitleLookup}}).then((e=>{const t=e.data.products.edges.map((e=>e.node));this.processProductData(t)})).catch((e=>{console.error("ProductListItem: Error fetching product data:",{error:(null==e?void 0:e.message)||e,stack:null==e?void 0:e.stack,response:null==e?void 0:e.response,fullError:e})}))},processProductData(e){const t=new Set,i=e.reduce(((e,i)=>{if(!i||this.handleize(this.productTitle)!==this.handleize(i.title))return e;const{handle:o,id:s,descriptionHtml:r,images:{edges:a},variants:{edges:n},tags:l,totalInventory:d,productType:c,vendor:u}=i;this.vendor=u,this.checkVendorCollectionExists();const h=this.getProductMasterIDfromBase(s);let p=1/0,m=-1/0,g=1/0,f=-1/0;const w=n.map((({node:i})=>{var s;const{price:{amount:n},compareAtPrice:u}=i,w=parseFloat(n),y=u?parseFloat(u.amount):null;p=Math.min(p,w),m=Math.max(m,w),null!==y&&(g=Math.min(g,y),f=Math.max(f,y));const v=i.selectedOptions.reduce(((s,n,p)=>(0===p&&("Color"===n.name&&(this.isColorOption=!0),this.colorName=n.name||"Color","Default Title"===n.value&&(this.hideColorOption=1),t.has(n.value)||(t.add(n.value),e.colors.push({name:n.value,handle:o,title:this.productTitle,descriptionHtml:r,images:a,pid:h,productType:c,price:w,compareAtPrice:u,availableForSale:i.availableForSale,tags:l,totalInventory:d}),this.optionOneName=n.name),s.color=n.value),s)),{});return{handle:o,availableForSale:i.availableForSale,price:w,compareAtPrice:u,color:v.color||"",size:"",width:"",quantityAvailable:i.quantityAvailable,image:(null==(s=i.image)?void 0:s.url)||"",sku:i.sku}}));return e.variants.push(...w),e.prices.push({handle:o,priceMin:p,priceMax:m,compareAtPriceMin:g===1/0?0:g,compareAtPriceMax:f===-1/0?0:f}),e}),{variants:[],colors:[],prices:[]});this.variants=i.variants,this.colors=i.colors,this.colorsCount=i.colors.length,this.prices=i.prices,this.updateSwatchCountBasedOnGridSize(),this.areThereLessThan5Swatches(),this.areThereLessThan3Swatches(),this.fetchRatingIfEnabled()},async fetchRatingIfEnabled(){var e,t;if(this.showRating)try{const i=null==(t=null==(e=this.colors)?void 0:e[0])?void 0:t.handle;if(!i)return;const o=await async function(e,t,i,o){const s=Array.from(new Set((i||[]).filter(
1Boolean))),r=[{namespace:"reviews",key:"rating"},{namespace:"reviews",key:"rating_count"}],a=e=>{const t=Number(e);return Number.isFinite(t)?t:null},n=(e,t)=>{var i,o;const s=a(e);if(null!=s)return s;try{e=JSON.parse(e)}catch(n){}if("string"==typeof e){const t=a(e);if(null!=t)return t;try{e=JSON.parse(e)}catch(n){}}const r=[e,null==e?void 0:e.value];for(const a of t)r.push(null==e?void 0:e[a],null==(i=null==e?void 0:e.value)?void 0:i[a],null==(o=null==e?void 0:e[a])?void 0:o.value);for(const l of r){const e=a(l);if(null!=e)return e}return null},l=await Promise.all(s.map((async i=>{var s,a,l,d;try{const c=await e.request(t.metafieldsByProductHandle,{variables:{handle:i,countryIso2:o,metaIdentifier:r}}),u=(null==(a=null==(s=null==c?void 0:c.data)?void 0:s.product)?void 0:a.metafields)||[],h=(null==(l=u.find((e=>"reviews"===(null==e?void 0:e.namespace)&&"rating"===(null==e?void 0:e.key))))?void 0:l.value)||"",p=(null==(d=u.find((e=>"reviews"===(null==e?void 0:e.namespace)&&"rating_count"===(null==e?void 0:e.key))))?void 0:d.value)||"";return[i,{rating:n(h,["rating","value"])??0,count:n(p,["count","value"])}]}catch(c){return[i,{rating:0,count:null}]}}))),d=new Map;for(const[c,u]of l)d.set(c,u);return d}(it,gt,[i],this.countryCode),s=o.get(i);s&&(this.rating=s.rating??0,this.ratingCount=s.count??null)}catch(i){console.error("ProductListItem: Error fetching rating data:",i),this.rating=0,this.ratingCount=null}},reportClickView(e,t){ee((()=>{"undefined"!==this.resolvedCollectionId&&void 0!==this.resolvedCollectionId&&""!==this.resolvedCollectionId&&"search-results"!==this.bodyID?this.reportProductViewCollection(e,t):"search-results"===this.bodyID&&this.reportProductViewSearch(e,t)}))},reportProductViewCollection(e,t){ee((()=>{let i=t+1;window.FastSimonSDK.event({eventName:window.FastSimonEventName.CollectionProductClicked,data:{collectionID:this.resolvedCollectionId,productID:e,position:i,query:this.collectionHandle}})}))},reportQuickViewClickedWidget(e){this.fsWidgetId&&ee((()=>{window.FastSimonSDK.event({eventName:window.FastSimonEventName.QuickViewClickedWidget,data:{widget_id:this.fsWidgetId,productID:String(e),position:this.fsProductPosition}})}))},reportProductViewSearch(e,t){ee((()=>{let i=t+1;window.FastSimonSDK.event({eventName:window.FastSimonEventName.SerpProductClicked,data:{query:this.searchTerm,productID:e,position:i}})}))},templateType(){this.bodyClasses.includes("template-page")||this.bodyClasses.includes("template-collection")||"search-results"===this.bodyID?"mobile-size"==window.siteGlobals.device?(this.mouseDrag=!1,this.touchDrag=!0):(this.mouseDrag=!0,this.touchDrag=!1):(this.mouseDrag=!1,this.touchDrag=!1),this.triggerPeekABoo()},checkExcludedProductTypes(e){e&&this.productTypesExcluded&&this.productTypesExcluded.includes(e)?this.productSwatchesHidden=!0:this.productSwatchesHidden=!1},triggerKlaviyoPopup(){window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",this.reminderFormIDPopup])},handleImageLoad(){fp.emit("product-slide-loaded",this.slideIndex)},getQuickviewModalTemplate:e=>`<div class="drawer drawer--right quickview__modal" data-quickview-modal data-form-holder id="${e}" aria-hidden="true"><div class="drawer__content" data-product-quickview-ajax></div><span class="drawer__underlay" data-micromodal-close tabindex="-1"><span class="drawer__underlay__fill"></span><span class="drawer__underlay__blur"></span></span></div>`,async fetchCollectionUrl(e,t){const i=await ft.fetchCollectionUrl(e);this[t]=i},extractGidFromUrl(e){if(!e)return null;if(e.startsWith("gid://shopify/Collection/"))return e;const t=e.match(/gid:\/\/shopify\/Collection\/\d+/);return t?t[0]:null}}},Et=["id","data-pid"],Mt=["href","onClick"],xt={class:"product-grid-item__slide-hit"},Ot=["src","srcset","sizes","alt","height"],Bt={key:1,class:"product-grid-single-wrap"},Ft=["src","srcset","sizes","alt","height"],Dt={key:2,class:"product__badge product__badge--sold pdp-badge gt-badge"},$t=["data-quickview-holder"],zt=["aria-label","onClick"],Ht={class:"btn-state-ready product-grid-item__mobile-quickview-btn__ready"},Rt=["src","alt"],Nt=["aria-label","onClick"],Vt={class:"gt-btn btn-state-ready",role:"button"},qt={class:"swatch__button",role:"none"},Ut=["onClick","aria-checked"],Gt=["innerHTML"],Wt={key:1,class:"gt-p__small swatch-anchor plp-mini-swatch-count"},Kt=["innerHTML"],jt=["onClick","aria-checked"],Qt=["src","srcset","alt","loading"],Zt=["innerHTML"],Jt=["innerHTML"],Yt=["href"],Xt=["href"],ei=["data-product-type","data-color","data-vendor","data-price","data-compare-price","data-placement"],ti=["id","innerHTML"],ii={key:0,class:"product__grid__price"},oi=["innerHTML"],si=["innerHTML"],ri={key:0,class:"gt-p__small--x"},ai=["innerHTML"],ni={key:1,class:"product__grid__price gt-p__small"},li=["innerHTML"],di=["innerHTML"],ci=["innerHTML"],ui=["href"],hi={class:"visually-hidden"},pi={key:5,class:"product__grid__compare kam-plp-compare"},mi=["id","checked","disabled","onChange"],gi=["for"],fi={class:"visually-hidden"},wi={key:6,class:"product__grid__reminder"},yi=["data-klaviyo-form-id-popup"],vi={key:7,class:"product__grid__combo_category gt-p__small"},bi=["href"],Si={key:1,class:"combo-category__one gt-p__small"},_i={key:2,class:"combo-category__spacer gt-p__small"},Ci=["href"],Pi={key:4,class:"combo-category__two gt-p__small"},ki={key:8,class:"product__grid__description gt-p__small"},Ti={class:"description"},Ii={class:"plp-rating__text gt-p__small"},Ai={class:"plp-rating__value"},Li={key:0,class:"plp-rating__count"};const Ei=fe(Lt,[["render",function(e,t,i,o,w,y){const v=c("ProductListTopLeftBadge"),b=c("slide"),S=c("pagination"),_=c("carousel"),C=c("ProductListBottomPillBadge"),P=c("product-quickview"),L=c("navigation"),E=c("ProductListTextUnderBadge");return y.shouldDisplayProduct()?(r(),s("div",{key:0,class:"product-grid-item",id:"product-tile-"+i.pid,"data-pid":this.productIndex,onMouseenter:t[4]||(t[4]=(...e)=>y.onProductIntentStart&&y.onProductIntentStart(...e)),onMouseleave:t[5]||
1(t[5]=(...e)=>y.onProductIntentEnd&&y.onProductIntentEnd(...e)),onPointerdown:t[6]||(t[6]=(...e)=>y.onProductPointerDown&&y.onProductPointerDown(...e))},[(r(!0),s(d,null,h(w.colors,((o,c)=>{var M,x,O,B;return r(),s(d,{key:"image"+c+"-color-"+o.handle+y.getCurrentPage()},[y.HandleColorlessProducts(c,o.pid)?(r(),s("div",{key:0,class:p("product-grid-item__container product-grid-item__content hide-me-"+w.hideMe+((null==(M=o.images)?void 0:M.length)>1&&y.showPaginationDots?" show-pagination-dots":""))},[a("a",{href:y.setProductPDPLink(o.handle),onClick:e=>{y.reportClickView(o.pid,this.productIndex),y.trackClick(o.pid)}},[g(v,{tags:o.tags,collectionId:y.resolvedCollectionId,badgeHideConfig:i.badgeHideConfig},null,8,["tags","collectionId","badgeHideConfig"]),!0!==this.disableSlider&&o.images&&o.images.length>1?(r(),s("div",{key:0,class:p(["product-grid-carousel-wrap",{"is-peeking":w.isPeeking}])},[g(_,{autoplay:w.shouldAutoPlay,class:p(["product-image-carousel",{"product-image-carousel--no-drag":!w.touchDrag}]),"items-to-show":1,"items-to-scroll":1,"mouse-drag":w.mouseDrag,"touch-drag":w.touchDrag,wrapAround:!0,ignoreAnimations:!0,onMouseleave:t[1]||(t[1]=e=>y.handleMouseLeave(e)),onMouseover:y.handleMouseOver,onSlideStart:e=>y.handleSlideStart(o.pid),onSlideEnd:y.handleSlideEnd,ref_for:!0,ref:"mainCarousel",onInit:t=>(y.templateType(),e.$emit("countCarouselsLoaded"),y.checkExcludedProductTypes(o.productType),e.$nextTick((()=>y.syncProductImageCarouselInert())))},{addons:T((()=>[!0!==i.disableSlider?(r(),k(S,{key:0})):l("",!0)])),default:T((()=>[(r(!0),s(d,null,h(o.images,((e,s)=>(r(),k(b,{key:o.pid+"image"+s+"-color-image"+o.handle},{default:T((()=>[a("div",xt,[a("img",{src:y.handleImageUrl(e),srcset:y.productImageSrcset(e),sizes:y.productImageSizes(),alt:`${i.productTitle}${o.name?" in "+o.name:""} product image`,class:"tw-block tw-overflow-hidden tw-object-cover tw-w-full tw-h-full product-grid-item__image",width:"500",height:y.intrinsicImageHeight,onLoad:t[0]||(t[0]=(...e)=>y.handleImageLoad&&y.handleImageLoad(...e))},null,40,Ot)])])),_:2},1024)))),128))])),_:2},1032,["autoplay","class","mouse-drag","touch-drag","onMouseover","onSlideStart","onSlideEnd","onInit"]),g(C,{tags:o.tags,collectionId:y.resolvedCollectionId,badgeHideConfig:i.badgeHideConfig},null,8,["tags","collectionId","badgeHideConfig"])],2)):o.images&&o.images.length?(r(),s("div",Bt,[a("img",{src:y.handleImageUrl(null==o?void 0:o.images[0]),srcset:y.productImageSrcset(null==o?void 0:o.images[0]),sizes:y.productImageSizes(),alt:`${i.productTitle}${o.name?" in "+o.name:""} product image`,class:"tw-block tw-overflow-hidden tw-object-cover tw-w-full tw-h-full product-grid-item__image",width:"500",height:y.intrinsicImageHeight,onLoad:t[2]||(t[2]=(...e)=>y.handleImageLoad&&y.handleImageLoad(...e))},null,40,Ft),g(C,{tags:o.tags,collectionId:y.resolvedCollectionId,badgeHideConfig:i.badgeHideConfig},null,8,["tags","collectionId","badgeHideConfig"])])):l("",!0),0==o.totalInventory&&"true"==y.checkSoldOutBadgeStatus(o.tags)?(r(),s("div",Dt,"Sold Out")):l("",!0)],8,Mt),y.showQuickviewMounted&&o.pid===w.activePid?(r(),k(P,{key:0,"data-quickview":o.pid,class:p(["product-grid-item__quickview-root",{"product-grid-item__actions":y.shouldShowQuickviewIcon&&!y.hasPlpQuickviewIcon}])},{default:T((()=>[a("div",{"data-quickview-holder":o.pid,"data-add-action-wrapper":""},[y.shouldShowQuickviewIcon&&y.hasPlpQuickviewIcon?(r(),s("div",{key:0,class:p(["product-grid-item__mobile-quickview-wrap","product-grid-item__plp-quickview-wrap",{"kam-plp-quickview":y.shouldShowMobilePlpQuickview||y.shouldShowDesktopPlpQuickview,"kam-mobile-plp-quickview":y.shouldShowMobilePlpQuickview,"kam-desktop-plp-quickview":y.shouldShowDesktopPlpQuickview,"product-grid-item__plp-quickview-wrap--has-image-swatches":y.hasDesktopPlpImageSwatches,"kam-crosssell-quickview product-grid-item__mobile-quickview-wrap--crosssell":y.isCrosssellQuickviewIcon}])},[a("button",I({type:"button",class:"product-grid-item__mobile-quickview-btn",[`data-popup-${o.pid}`||""]:o.handle,"aria-label":w.plpQuickviewAriaLabel,onClick:u((e=>y.reportQuickViewClickedWidget(o.pid)),["stop"])}),[a("span",Ht,[a("img",{src:y.plpQuickviewIconUrl,class:"product-grid-item__mobile-quickview-btn__icon-img",alt:w.plpQuickviewIconAlt,loading:"lazy"}
1,null,8,Rt)]),t[7]||(t[7]=a("span",{class:"btn-state-loading"},[a("svg",{height:"18",width:"18",class:"svg-loader"},[a("circle",{r:"7",cx:"9",cy:"9"}),a("circle",{"stroke-dasharray":"87.96459430051421 87.96459430051421",r:"7",cx:"9",cy:"9"})])],-1))],16,zt)],2)):y.shouldShowQuickviewIcon?(r(),s("button",I({key:1,type:"button",class:"product-grid-item__btn gt-btn",[`data-popup-${o.pid}`||""]:o.handle,"aria-label":w.plpQuickviewAriaLabel,onClick:u((e=>y.reportQuickViewClickedWidget(o.pid)),["stop"])}),[a("span",Vt,m(w.plpQuickviewAriaLabel),1),t[8]||(t[8]=a("span",{class:"btn-state-loading"},[a("svg",{height:"18",width:"18",class:"svg-loader"},[a("circle",{r:"7",cx:"9",cy:"9"}),a("circle",{"stroke-dasharray":"87.96459430051421 87.96459430051421",r:"7",cx:"9",cy:"9"})])],-1))],16,Nt)):l("",!0),(r(),k(A("script"),{"data-quickview-modal-template":"",type:"text/x-template",innerHTML:y.getQuickviewModalTemplate(o.pid)},null,8,["innerHTML"]))],8,$t)])),_:2},1032,["data-quickview","class"])):l("",!0)],2)):l("",!0),y.HandleColorlessProducts(c,o.pid)?(r(),s("div",{key:1,class:p(["product__grid__info text-left",{"no-swatches":!y.hasVisibleSwatches}])},[1==i.hideSwatches||!y.checkSwatchesByProductType(w.colors)||i.swatchSuffix||w.productSwatchesHidden||y.getClientWidth()!==y.swatchConfig.device?l("",!0):(r(),s("div",{key:0,class:p(["swatch_button_wrapper color_swatches",`${y.swatchConfig.device.replace("-size","")}-swatch-limit`]),role:"radiogroup","aria-label":"Color options"},[a("div",qt,[(r(!0),s(d,null,h(y.visibleColors,((e,t)=>(r(),s("div",{key:"image"+t+"-swatch-"+e.name,class:"swatch-spacer",role:"none"},[t<y.swatchConfig.limit?(r(),s("button",{key:0,type:"button",class:p(y.getActiveClass(e.pid)),style:n(y.getColorSwatchImages(e.name)),onClick:i=>y.setActiveColor(e.pid,t),role:"radio","aria-checked":w.activePid==e.pid?"true":"false"},[a("span",{innerHTML:e.name,class:"visually-hidden"},null,8,Gt)],14,Ut)):l("",!0),t===y.swatchConfig.limit&&y.remainingColorsCount>0?(r(),s("span",Wt,"+"+m(y.remainingColorsCount),1)):l("",!0)])))),128))])],2)),1!=i.hideSwatches&&y.checkSwatchesByProductType(w.colors)&&!i.swatchSuffix&&!w.productSwatchesHidden&&w.colors.length>1&&y.swatchConfig.limit<1&&y.getClientWidth()===y.swatchConfig.device?(r(),s("div",{key:1,class:"plp-color-count gt-p__small",innerHTML:y.setCounterMessage(w.colors.length)},null,8,Kt)):l("",!0),1!=i.hideSwatches&&this.swatchSuffix&&!this.productSwatchesHidden?(r(),s("div",{key:2,class:p(["swatch_button_wrapper image_swatches",w.lessThan5Swatches?"smallSwatchesPadding":""]),role:"radiogroup","aria-label":"Color options"},[g(_,{ref_for:!0,ref:"swatchCarousel",snapAlign:"start",class:p(w.lessThan5Swatches?"smallSwatchesOl":""),"items-to-scroll":w.itemsToScroll,"items-to-show":w.itemsToShow,modelValue:w.currentSlide,role:"none","onUpdate:modelValue":y.onSwatchCarouselModelValue},{addons:T((()=>[w.colors.length>w.gridSizeBasedSwatches?(r(),k(L,{key:0})):l("",!0)])),default:T((()=>[(r(!0),s(d,null,h(w.colors,((e,t)=>(r(),k(b,{key:"image"+t+"-image-swatch-"+e.name,class:"swatch-spacer",role:"none"},{default:T((()=>[a("button",{type:"button",class:p(w.activePid==e.pid?"swatch-anchor activeSwatch":"swatch-anchor"),onClick:i=>y.setActiveColor(e.pid,t),role:"radio","aria-checked":w.activePid==e.pid?"true":"false"},[a("img",{src:y.buildSizedImageUrl(y.getImageSwatchImages(e),60),srcset:y.getImageSwatchSrcSet(e),sizes:"50px",alt:`${i.productTitle} color option: ${e.name}`,style:{width:"100%"},class:"smallSwatches",loading:w.enableLazyLoading?"lazy":"eager"},null,8,Qt),a("span",{innerHTML:e.name,class:"visually-hidden"},null,8,Zt)],10,jt)])),_:2},1024)))),128))])),_:2},1032,["class","items-to-scroll","items-to-show","modelValue","onUpdate:modelValue"])],2)):l("",!0),1!=i.hideSwatches&&this.swatchSuffix&&!this.productSwatchesHidden?(r(),s("div",{key:3,class:"imageCounter gt-p__small",innerHTML:y.setCounterMessage(w.colors.length)},null,8,Jt)):l("",!0),y.shouldShowVendor?(r(),s("p",{key:4,class:"product__grid__vendor gt-p__small",style:n({color:w.vendorColorText})},[y.vendorUrl?(r(),s("a",{key:0,href:y.vendorUrl,class:"vendor-link",style:n({color:w.vendorColorText,textDecoration:"underline"})},m(w.vendor),13,Yt)):(r(),s(d,{key:1},[f(m(w.vendor),1)],64))],4)):l("",!0),a("a",{href:"/products/"+o.handle,"data-grid-link":""},[a("div",{class:p(["product__grid__title__wrapper",{"has-no-vendor":!y.shouldShowVen
1dor}]),"data-product-type":o.productType,"data-color":o.name,"data-vendor":w.vendor,"data-price":o.price,"data-compare-price":null==(x=o.compareAtPrice)?void 0:x.amount,"data-placement":c},[a("p",{id:"product-"+o.pid,class:"product__grid__title gt-p",innerHTML:i.productTitle},null,8,ti)],10,ei),y.ShouldDisplayComparePrice(o.compareAtPrice,o.price)&&!y.colorHasPriceRange(o.handle)?(r(),s("div",ii,[a("span",{class:"price on-sale gt-p__small",innerHTML:y.convertToCurrency(o.price)},null,8,oi),a("span",{class:"compare-at gt-p__small",innerHTML:y.convertToCurrency(null==(O=o.compareAtPrice)?void 0:O.amount)},null,8,si),y.shouldShowSalePercentage?(r(),s("small",ri,[a("span",{class:"percentage-off on-sale",innerHTML:"("+Math.round(100*(1-o.price/(null==(B=o.compareAtPrice)?void 0:B.amount)))+"% off)"},null,8,ai)])):l("",!0)])):l("",!0),y.ShouldDisplayComparePrice(o.compareAtPrice,o.price)||y.colorHasPriceRange(o.handle)?l("",!0):(r(),s("div",ni,[a("span",{class:"price gt-p__small",innerHTML:y.convertToCurrency(o.price)},null,8,li)])),y.colorHasPriceRange(o.handle)?(r(),s("p",{key:2,style:{display:"inline"},class:p("price first_price gt-p__small "+y.compareAtRangeClass(o.handle)),innerHTML:y.getPriceRangeMinByHandle(o.handle)+" - "+y.getPriceRangeMaxByHandle(o.handle)+" "},null,10,di)):l("",!0),y.colorHasPriceRange(o.handle)?(r(),s("p",{key:3,style:{display:"inline"},class:p("price compare_at_price gt-p__small "+y.compareAtRangeClass(o.handle)),innerHTML:y.getCompareAtPriceRangeMinByHandle(o.handle)+" - "+y.getCompareAtPriceRangeMaxByHandle(o.handle)},null,10,ci)):l("",!0),i.showFullDetailsLink?(r(),s("a",{key:4,class:"gt-p__small view-product-details",href:`${w.rootUrl}products/${o.handle}`},[t[9]||(t[9]=f(" View Full Details ",-1)),a("span",hi,"for "+m(i.productTitle),1)],8,ui)):l("",!0),g(E,{tags:o.tags,collectionId:y.resolvedCollectionId,badgeHideConfig:i.badgeHideConfig,isPlp:!0,price:parseFloat(o.price)||0},null,8,["tags","collectionId","badgeHideConfig","price"])],8,Xt),y.enableCompareResolved?(r(),s("div",pi,[a("input",{type:"checkbox",id:"compare-product-"+o.pid,checked:y.isItemCompared(o),disabled:y.isCompareDisabled(o),onChange:u((e=>y.toggleCompare(o)),["prevent"]),class:"gt-p__small"},null,40,mi),a("label",{for:"compare-product-"+o.pid,class:"gt-p__small"},[t[10]||(t[10]=f("Compare ",-1)),a("span",fi,m(o.name),1)],8,gi)])):l("",!0),this.checkReminderTag(o.tags)&&""!=this.setReminderMetafield&&this.setReminderProductLink&&this.setReminderPDP&&this.setReminderPDPHideSizes&&""!=this.reminderFormIDPopup&&null!=this.reminderFormIDPopup&&""!=this.setReminderLinkText&&null!=this.setReminderLinkText?(r(),s("div",wi,[a("button",{class:"product__grid__reminder__button","data-klaviyo-form-id-popup":this.reminderFormIDPopup,onClick:t[3]||(t[3]=(...e)=>this.triggerKlaviyoPopup&&this.triggerKlaviyoPopup(...e))},m(this.setReminderLinkText),9,yi)])):l("",!0),this.productCategoryMetafieldOne||this.productCategoryMetafieldTwo?(r(),s("div",vi,[this.productCategoryMetafieldOne&&w.productCategoryMetafieldOneCollectionUrl&&!w.productCategoryMetafieldOneCollectionUrl.startsWith("gid://")?(r(),s("a",{key:0,href:w.productCategoryMetafieldOneCollectionUrl,class:"combo-category__one combo-category__link gt-p__small"},m(this.productCategoryMetafieldOne),9,bi)):this.productCategoryMetafieldOne?(r(),s("span",Si,m(this.productCategoryMetafieldOne),1)):l("",!0),(this.productCategoryMetafieldOne||w.productCategoryMetafieldOneCollectionUrl&&!w.productCategoryMetafieldOneCollectionUrl.startsWith("gid://"))&&(this.productCategoryMetafieldTwo||w.productCategoryMetafieldTwoCollectionUrl&&!w.productCategoryMetafieldTwoCollectionUrl.startsWith("gid://"))?(r(),s("span",_i,"•")):l("",!0),this.productCategoryMetafieldTwo&&w.productCategoryMetafieldTwoCollectionUrl&&!w.productCategoryMetafieldTwoCollectionUrl.startsWith("gid://")?(r(),s("a",{key:3,href:w.productCategoryMetafieldTwoCollectionUrl,class:"combo-category__two combo-category__link gt-p__small"},m(this.productCategoryMetafieldTwo),9,Ci)):this.productCategoryMetafieldTwo?(r(),s("span",Pi,m(this.productCategoryMetafieldTwo),1)):l("",!0)])):l("",!0),this.productPLPDescription?(r(),s("div",ki,[a("span",Ti,m(this.productPLPDescription),1)])):l("",!0),i.showRating&&w.rating>0?(r(),s("div",{key:9,class:"plp-rating",style:n({"--plp-star-color":i.ratingStarColor||void 0,"--plp-count-color":i.ratingCountColor||void 0})},[t[11]||(t[11]=a("span",{class:"plp-rating__star","aria-hidden":"true"},"★",-1)),a("span",Ii,[a("span",Ai,m(Number(w.rating).toFixed(1)),1),null!=w.ratingCount?(r(),s("span",Li," ("+m(w.ratingCount)+")",1)):l("",!0)])],4)):l("",!0)],2)):l("",!0)],64)})),128))],40,Et)):l("",!0)}],["__file","ProductListItem.vue"]]),Mi={name:"ProductListPromo",props:{Title:String,Image:String,Link:String,Pid:String,productIndex:Number,collectionTracking:Boolean,collectionId:{type:String,default:""},collectionHandle:{type:String,default:""},searchTerm:{type:String,default:""},width:{type:Number,default:1},height:{type:Number,default:1},mobileImage:{type:String,default:""}},computed:{isOversized(){return this.width>1||this.height>1}
1,promoClasses(){const e=["promo-wrapper"];return this.width>1&&e.push("promo-wide"),this.height>1&&e.push("promo-tall"),e},activeImage(){var e,t;return this.mobileImage&&window.innerWidth<=((null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium)||767)?this.mobileImage:this.Image}},methods:{shouldHaveLink(){return""!=this.Link&&(this.reportPromoTileClick(),window.location=window.theme.routes.root_url+this.Link),!1},reportPromoTileClick(){if(!this.collectionTracking)return;const e="search-results"===document.querySelector("body").id,t=null!=this.productIndex?this.productIndex+1:void 0;ee((()=>{e?window.FastSimonSDK.event({eventName:window.FastSimonEventName.SerpPromoTileClicked,data:{query:this.searchTerm,productID:String(this.Pid),position:t,link:this.Link,thumbnail:this.Image}}):window.FastSimonSDK.event({eventName:window.FastSimonEventName.CollectionPromoTileClicked,data:{collectionID:this.collectionId,productID:String(this.Pid),position:t,query:this.collectionHandle,link:this.Link,thumbnail:this.Image}})}))},shouldHaveHandClass(){return""!=this.Link?"product-grid-item__container pointer":"product-grid-item__container "},shouldHideNonUsProducts:()=>"US"==window.siteGlobals.countryCode}},xi=["data-promotion_id","id","data-promotion_name","data-pid"];const Oi=fe(Mi,[["render",function(e,t,i,o,d,c){return c.shouldHideNonUsProducts()?(r(),s("div",{key:0,class:p(c.promoClasses),"data-promotion_id":"promo-"+i.Pid,"data-promotion_creative":"PLP-Content-Tile",id:"product-tile-"+i.Pid,"data-promotion_position":"PLP-Content-Tile","data-promotion_name":i.Title,"data-pid":i.productIndex},[a("div",{class:p(c.shouldHaveHandClass())},[a("div",{class:"product-grid-item__images promo-tile",onClick:t[0]||(t[0]=e=>c.shouldHaveLink())},[a("div",{style:n({"background-image":"url("+c.activeImage+")"})}," ",4)])],2)],10,xi)):l("",!0)}],["__file","ProductListPromo.vue"]]),Bi={name:"CompareProductsWidget",props:{productsToCompare:Set,collectionHandle:String,collectionTitle:String},emits:["update:productsToCompare","keep-open"],data:()=>({compareButtonLabel:null,bodyClassAdded:!1,imageHeightDesktop:null,imageHeightMobile:null,widgetBg:null,buttonBg:null,buttonText:null,widgetTextColor:null,widgetProductBg:null,aspectRatio:null,imageFit:null,settingsRetryCount:0,settingsElement:null,viewportClass:"",_productsCache:null,_productsCacheKey:null,_urlCache:null,_urlCacheKey:null}),computed:{products(){var e;const t=(null==(e=this.productsToCompare)?void 0:e.size)||0;if(this._productsCache&&this._productsCacheKey===t)return this._productsCache;const i=Array.from(this.productsToCompare||new Set).slice(0,3);return this._productsCache=i,this._productsCacheKey=t,i},cardWidthDesktop(){return this.calculateCardWidth(this.imageHeightDesktop)},cardWidthMobile(){return this.calculateCardWidth(this.imageHeightMobile)},popupMaxWidthDesktop(){if(!this.cardWidthDesktop)return null;return 3*this.cardWidthDesktop+64+16+240},popupMinHeightDesktop(){if(!this.imageHeightDesktop)return null;return this.imageHeightDesktop+40+32},popupMaxWidthMobile(){if(!this.cardWidthMobile)return null;return 3*this.cardWidthMobile+32+24},popupMinHeightMobile(){if(!this.imageHeightMobile)return null;return this.imageHeightMobile+30+80+24},themeStyleVars(){const e={};if(this.imageHeightDesktop){const t=this.imageHeightDesktop;e["--cpw-image-height-desktop"]=`${t}px`,e["--cpw-product-name-margin-top-desktop"]="0",e["--cpw-card-min-height-desktop"]=`${Math.round(1.154*t)}px`,e["--cpw-desktop-padding-top"]="32px",e["--cpw-desktop-padding-bottom"]="32px"}if(this.imageHeightMobile){const t=this.imageHeightMobile;e["--cpw-image-height-mobile"]=`${t}px`,e["--cpw-product-name-margin-top-mobile"]="0",e["--cpw-mobile-padding-top"]="20px",e["--cpw-mobile-padding-bottom"]="20px",e["--cpw-mobile-list-padding-top"]="20px"}return this.cardWidthDesktop&&(e["--cpw-card-width-desktop"]=`${this.cardWidthDesktop}px`),this.cardWidthMobile&&(e["--cpw-card-width-mobile"]=`${this.cardWidthMobile}px`),this.popupMaxWidthDesktop&&(e["--cpw-popup-max-width-desktop"]=`${this.popupMaxWidthDesktop}px`),this.popupMinHeightDesktop&&(e["--cpw-popup-min-height-desktop"]=`${this.popupMinHeightDesktop}px`),this.popupMaxWidthMobile&&(e["--cpw-popup-max-width-mobile"]=`${this.popupMaxWidthMobile}px`),this.popupMinHeightMobile&&(e["--cpw-popup-min-height-mobile"]=`${this.popupMinHeightMobile}px`),this.widgetBg&&(e["--cpw-widget-bg"]=this.widgetBg),this.buttonBg&&(e["--cpw-button-bg"]=this.buttonBg),this.buttonText&&(e["--cpw-button-text"]=this.buttonText),this.widgetTextColor&&(e["--cpw-widget-text"]=this.widgetTextColor),this.widgetProductBg&&(e["--cpw-widget-product-bg"]=this.widgetProductBg),this.imageFit&&(e["--cpw-image-fit"]=this.imageFit),e},compareProductsUrl(){const e=this.products,t=`${e.length}-${this.collectionHandle||""}-${this.collectionTitle||""}`;if(this._urlCache&&this._urlCacheKey===t)return this._urlCache;
1const i=new URLSearchParams,o=e.map((e=>e.pid)).filter(Boolean);if(o.length){i.set("products",o[0]);for(let e=1;e<o.length;e++)i.append("product",o[e])}this.collectionHandle&&i.set("collection_handle",this.collectionHandle),this.collectionTitle&&i.set("collection_title",this.collectionTitle);const s=`/pages/compare-products?${i.toString()}`;return this._urlCache=s,this._urlCacheKey=t,s},isCompareActive(){return this.products.length>=2},placeholderCount(){return 3-this.products.length}},watch:{productsToCompare:{handler(e,t){((null==e?void 0:e.size)||0)!==((null==t?void 0:t.size)||0)&&(this._productsCache=null,this._productsCacheKey=null,this._urlCache=null,this._urlCacheKey=null),this.toggleCompareOpenClass()},deep:!1}},mounted(){this.updateViewportClass(),document.addEventListener("theme:resize:width",this.updateViewportClass),this.loadSettings(),this.toggleCompareOpenClass()},beforeUnmount(){document.removeEventListener("theme:resize:width",this.updateViewportClass),this.removeBodyClass(),this.settingsRetryTimeout&&(clearTimeout(this.settingsRetryTimeout),this.settingsRetryTimeout=null)},methods:{updateViewportClass(){var e,t,i,o;const s=window.innerWidth,r=null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium,a=null==(o=null==(i=window.theme)?void 0:i.sizes)?void 0:o.large;let n="is-desktop";s<=r?n="is-mobile":s<=a&&(n="is-tablet"),this.viewportClass=n},loadSettings(){if(this.settingsElement)return void this.processSettings(this.settingsElement);const e=document.getElementById("fs-collection-products");e?(this.settingsElement=e,this.settingsRetryCount=0,this.processSettings(e)):this.settingsRetryCount<50&&(this.settingsRetryCount++,this.settingsRetryTimeout=setTimeout((()=>this.loadSettings()),100))},processSettings(e){var t,i,o;const s=t=>e.getAttribute(t),r={compareButtonLabel:s("data-plp-compare-button-label"),imageHeightDesktop:s("data-plp-compare-widget-image-height-desktop"),imageHeightMobile:s("data-plp-compare-widget-image-height-mobile"),widgetBg:s("data-plp-compare-widget-bg"),buttonBg:s("data-plp-compare-widget-button-bg"),buttonText:s("data-plp-compare-widget-button-text"),widgetTextColor:s("data-plp-compare-widget-text"),widgetProductBg:s("data-plp-compare-widget-bg-product"),productGridImage:s("data-product-grid-image")};r.compareButtonLabel&&(this.compareButtonLabel=r.compareButtonLabel);const a=Number(r.imageHeightDesktop),n=Number(r.imageHeightMobile);a&&(this.imageHeightDesktop=a),n&&(this.imageHeightMobile=n),r.widgetBg&&(this.widgetBg=r.widgetBg),r.buttonBg&&(this.buttonBg=r.buttonBg),r.buttonText&&(this.buttonText=r.buttonText);const l=null==(t=r.widgetTextColor)?void 0:t.trim();l&&(this.widgetTextColor=l);const d=null==(i=r.widgetProductBg)?void 0:i.trim();d&&(this.widgetProductBg=d);const c=null==(o=r.productGridImage)?void 0:o.trim();this.imageFit="scale"===c?"contain":"cover",this.loadAspectRatio()},loadAspectRatio(){const e=getComputedStyle(document.documentElement).getPropertyValue("--PRODUCT-GRID-ASPECT-RATIO-DECIMAL").trim();e&&(this.aspectRatio=e.includes("/")?e.split("/").map((e=>parseFloat(e.trim()))):[parseFloat(e),1])},calculateCardWidth(e){if(!e||e<=0||!this.aspectRatio)return null;const[t,i]=this.aspectRatio;return t&&i?Math.round(e*(t/i))+2:null},toggleCompareOpenClass(){this.bodyClassAdded||(document.body.classList.add("compare-open"),this.bodyClassAdded=!0)},removeBodyClass(){this.bodyClassAdded&&(document.body.classList.remove("compare-open"),this.bodyClassAdded=!1)},clearAll(){this.$emit("keep-open",!0),this.$emit("update:productsToCompare",new Set)},close(){this.$emit("keep-open",!1),this.$emit("update:productsToCompare",new Set)},getProductImageUrl(e){var t,i,o,s;return he(e.compareImage||(null==(o=null==(i=null==(t=e.images)?void 0:t[0])?void 0:i.node)?void 0:o.url)||(null==(s=e.images)?void 0:s[0])||e.image||e.t||"",500)},getProductPdpUrl(e){var t,i,o;const s=e.handle||(null==(t=e.u)?void 0:t.replace("/products/",""))||"";if(!s)return"#";const r=(null==(o=null==(i=window.theme)?void 0:i.routes)?void 0:o.root_url)||"/",a=r.endsWith("/")?r:`${r}/`;return this.collectionHandle?`${a}collections/${this.collectionHandle}/products/${s}`:`${a}products/${s}`},removeProduct(e){if(!this.productsToCompare||!this.productsToCompare.size)return;const t=new Set;for(const i of this.productsToCompare){const o=(null==i?void 0:i.pid)||(null==i?void 0:i.id);o&&o!==e&&t.add(i)}
1t.size?this.$emit("update:productsToCompare",t):this.close()}}},Fi={class:"compare-products__content"},Di={class:"compare-products__list"},$i={class:"compare-products__image"},zi=["src","alt"],Hi={class:"compare-products__product-info"},Ri=["href"],Ni=["onClick"],Vi={key:0,class:"compare-products__help gt-p__small"},qi={class:"compare-products__actions"},Ui=["href"];const Gi={key:0,class:"collection__error"},Wi={key:1},Ki={key:0,class:"isNoResults"},ji=["data-grid-large","data-grid-small"];const Qi=fe({name:"CollectionProducts",components:{CompareProductsWidget:fe(Bi,[["render",function(e,t,i,o,c,u){return r(),k(E,{to:"#theme-overlays"},[a("section",{class:p(["compare-products",c.viewportClass]),style:n(u.themeStyleVars)},[a("div",Fi,[a("ul",Di,[(r(!0),s(d,null,h(u.products,(e=>(r(),s("li",{key:e.pid,class:"filled"},[a("div",$i,[a("img",{src:u.getProductImageUrl(e),alt:e.title||e.productTitle||e.l||e.name,loading:"eager",onLoad:t[0]||(t[0]=e=>e.target.classList.add("is-loaded"))},null,40,zi)]),a("div",Hi,[a("a",{href:u.getProductPdpUrl(e),class:"compare-products__product-name gt-p__small"},m(e.title||e.productTitle||e.l||e.name),9,Ri),a("button",{type:"button",class:"compare-products__remove-product","aria-label":"Remove product",onClick:t=>u.removeProduct(e.pid)},[t[1]||(L(-1,!0),(t[1]=(r(),s("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t[5]||(t[5]=a("path",{d:"M12.3977 0.397461L0.397705 12.3975M0.397705 0.397461L12.3977 12.3975",stroke:"currentColor","stroke-width":"1.125","stroke-miterlimit":"10"},null,-1))]))).cacheIndex=1,L(1),t[1])],8,Ni)])])))),128)),(r(!0),s(d,null,h(u.placeholderCount,(e=>(r(),s("li",{key:`placeholder-${e}`,class:"placeholder"},[u.products.length<2&&1===e?(r(),s("p",Vi,"Select at least two items to compare")):l("",!0)])))),128))]),a("ul",qi,[a("li",null,[u.isCompareActive?(r(),s("a",{key:0,href:u.compareProductsUrl,class:"compare-products__compare-items gt-p__small is-active"},m(c.compareButtonLabel),9,Ui)):(r(),s("span",{key:1,class:p(["compare-products__compare-items gt-p__small",{"is-disabled":!u.isCompareActive}])},m(c.compareButtonLabel),3))]),a("li",null,[t[2]||(L(-1,!0),(t[2]=a("button",{type:"button",class:"compare-products__clear-all gt-p__small",onClick:u.clearAll},[t[6]||(t[6]=f("CLEAR ALL",-1))],8,["onClick"])).cacheIndex=2,L(1),t[2])])])]),a("button",{type:"button",class:"compare-products__close","aria-label":"Close",onClick:t[4]||(t[4]=(...e)=>u.close&&u.close(...e))},[t[3]||(L(-1,!0),(t[3]=(r(),s("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t[7]||(t[7]=a("path",{d:"M12.3977 0.397461L0.397705 12.3975M0.397705 0.397461L12.3977 12.3975",stroke:"currentColor","stroke-width":"1.125","stroke-miterlimit":"10"},null,-1))]))).cacheIndex=3,L(1),t[3])])],6)])}],["__file","CompareProductsWidget.vue"]]),ProductListPromo:Oi,ProductListItem:Ei},data(){var e,t;return{collectionHandle:"",collectionId:"",collectionName:"",descriptionMetafield:"",fastSimonResponseAction:"facets and products",gridLarge:0,gridSmall:0,isNoResults:!1,maxImages:2,narrowBy:"",page:"",pageCount:"",pastPage:"",productCategoryMetafieldOneAttr:"",productCategoryMetafieldTwoAttr:"",productCategoryMetafieldOneCollectionAttr:"",productCategoryMetafieldTwoCollectionAttr:"",productReminderMetafieldEmbedAttr:"",products:[],productsPerPage:"",productsToCompare:new Set,productsToCompareKey:0,showCompareUI:!1,compareKeepOpen:!1,comparePlpSessionKey:`plp_compare_products_${window.location.hostname}`,productTypesExcluded:"",searchTerm:"",setReminderFormIdPopup:"",setReminderLinkText:"",showPage:!1,sliderIDActive:"",sliderIDLast:"",sortBy:"",totalResults:"",url:new URL(window.location.href),debouncedCheckCurrentActiveSlider:null,debouncedSyncStateFromUrl:null,showSalePercentage:!1,showRating:!1,ratingStarColor:"",ratingCountColor:"",isFilterUpdate:!1,sortUpdateHandler:null,searchUpdateHandler:null,pageUpdateHandler:null,scrollHandler:null,filterToggleHandler:null,filterUpdateHandler:null,lastReportedSearchKey:new Set,lastReportedCollectionKey:new Set,searchResultsCollection:"",trackedProducts:[],trackingRetryCounter:0,cachedBadgeConfig:null,useFsProductData:!1,isMobile:window.innerWidth<=((null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium)||767),productTileHeight:0,resizeHandler:null,gridSizeLargeHandler:null,gridSizeSmallHandler:null,fsError:!1,prepTrackedRetryCounter:0,pendingComparePid:null,
1stickyComparePid:null,isRestoringComparePid:!1,restoreComparePidHandler:null,forceCompareOn:!1,plpRestoreScrollY:null,plpPageHideHandler:null,persistPlpCacheDebounced:null,comparePlpEnabled:!0,comparePlpRecheckTimer:null,comparePlpRecheckAttempts:0}},created(){this.lastRequestId=0,this.pendingRequests=0,this.currentSetupRequestId=null},mounted(){var e,t,i,o,s,r,a;le(),this.handleViewportSize=ge(this),this.resizeHandler=()=>{var e,t;this.isMobile=window.innerWidth<=((null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium)||767),this.measureProductTileHeight()},document.addEventListener("theme:resize:width",this.resizeHandler),this.maxImages=parseInt(this.$el.parentElement.getAttribute("data-plp_max_images")),this.initializeBadgeHideConfig(),this.debouncedCheckCurrentActiveSlider=G(this.checkCurrentActiveSlider,100),this.debouncedSyncStateFromUrl=G(this.syncStateFromUrl,300),this.persistPlpCacheDebounced=G(this.persistPlpCache,400),this.plpPageHideHandler=()=>this.savePlpScrollToCache(),window.addEventListener("pagehide",this.plpPageHideHandler),this.sortUpdateHandler=e=>{this.fsError||(this.isFilterUpdate=!0,this.sortBy=e,this.page=1,this.pastPage="1",this.products=[],this.lastReportedSearchKey=new Set,this.lastReportedCollectionKey=new Set,this.startCollectionPage(),this.scrollToView(),setTimeout((()=>{this.isFilterUpdate=!1}),2e3))},fp.on("fs-sort-update",this.sortUpdateHandler),this.searchUpdateHandler=e=>{this.fsError||(this.isFilterUpdate=!0,this.searchTerm=e,this.page=1,this.pastPage="1",this.products=[],this.narrowBy=[],this.lastReportedSearchKey=new Set,this.lastReportedCollectionKey=new Set,this.removeUrlParam("current"),fp.emit("fs-new-search-reset",{page:1}),this.startSearchTermPage(),this.scrollToView(),setTimeout((()=>{this.isFilterUpdate=!1}),2e3))},fp.on("fs-search-update",this.searchUpdateHandler),this.pageUpdateHandler=e=>{if(this.fsError)return;this.isFilterUpdate||this.pendingRequests>0||(this.page=e,this.endlessScrollCollectionPage())},fp.on("fs-update-page",this.pageUpdateHandler),this.filterUpdateHandler=e=>{if(this.fsError)return;const t=Array.isArray(e)?e:this.getCurrentFilters();this.isFilterUpdate=!0,this.narrowBy=t,this.page=1,this.pastPage="1",this.products=[],this.lastReportedSearchKey=new Set,this.lastReportedCollectionKey=new Set,this.setUrlParam("current",this.page),fp.emit("fs-filter-reset"),this.startCollectionPage(),this.scrollToView(),setTimeout((()=>{this.isFilterUpdate=!1}),2e3)},fp.on("fs-update-filter",this.filterUpdateHandler),window.addEventListener("replacestate",this.debouncedSyncStateFromUrl),this.sortBy=this.getCurrentSort();const n=this.getCurrentPage()||1;if(this.pastPage=n,this.stickyComparePid=this.url.searchParams.get("compare_pid")||null,this.stickyCompareColor=this.url.searchParams.get("compare_color")||null,this.pendingComparePid=this.stickyComparePid,this.stickyComparePid)try{sessionStorage.removeItem(this.comparePlpSessionKey)}catch(d){console.error("Error clearing compare session for compare_pid URL:",d)}this.restoreComparePidHandler=()=>{this.restoreComparePidIfNeededToUrl()},window.addEventListener("replacestate",this.restoreComparePidHandler),window.addEventListener("pushstate",this.restoreComparePidHandler),this.loadCompareProducts(),this.narrowBy=this.getCurrentFilters(),this.searchTerm=this.getSearchTerm(),this.collectionId=null==(e=document.getElementById("fs-collection-products"))?void 0:e.getAttribute("data-collection-id"),this.collectionHandle=null==(t=document.getElementById("fs-collection-products"))?void 0:t.getAttribute("data-collection-handle"),this.forceCompareOn="true"===(null==(i=document.getElementById("fs-collection-products"))?void 0:i.getAttribute("data-plp-force-compare-on")),this.comparePlpEnabled=this.resolveComparePlpEnabled(),this.checkCompareEnabled(),this.startComparePlpRecheck(),this.productsPerPage=parseInt(null==(o=document.getElementById("fs-collection-products"))?void 0:o.getAttribute("data-product_limit"))||36,this.useFsProductData=null==(s=document.getElementById("fs-collection-products"))?void 0:s.getAttribute("data-use_fs_product_data"),this.gridLarge=Number(null==(r=document.getElementById("fs-collection-
1products"))?void 0:r.getAttribute("data-grid-large")),this.gridSmall=Number(null==(a=document.getElementById("fs-collection-products"))?void 0:a.getAttribute("data-grid-small")),this.gridLarge=v.get("gridViewLarge")?JSON.parse(v.get("gridViewLarge")):this.gridLarge,this.gridSmall=v.get("gridViewSmall")?JSON.parse(v.get("gridViewSmall")):this.gridSmall,this.gridSizeLargeHandler=e=>{this.gridLarge=Number(e),this.measureProductTileHeight()},this.gridSizeSmallHandler=e=>{this.gridSmall=Number(e),this.measureProductTileHeight()},fp.on("fs-update-grid-size-large",this.gridSizeLargeHandler),fp.on("fs-update-grid-size-small",this.gridSizeSmallHandler);const l=document.getElementById("filter-toggle");if(null!==l&&(this.filterToggleHandler=function(){fp.emit("fs-sidebar-click")},l.addEventListener("click",this.filterToggleHandler)),this.searchResultsCollection=this.$el.parentElement.getAttribute("data-search-results-collection"),this.swatch_suffix=this.$el.parentElement.getAttribute("data-swatch_suffix"),this.productTypesExcluded=this.$el.parentElement.getAttribute("data-excluded_product_type"),this.productCategoryMetafieldOneAttr=window.siteGlobals.product_cat_metafield_one||"",this.productCategoryMetafieldTwoAttr=window.siteGlobals.product_cat_metafield_two||"",this.productCategoryMetafieldOneCollectionAttr=window.siteGlobals.product_cat_metafield_one_collection||"",this.productCategoryMetafieldTwoCollectionAttr=window.siteGlobals.product_cat_metafield_two_collection||"",this.productReminderMetafieldEmbedAttr=window.siteGlobals.set_reminder_metafield,this.setReminderLinkText=window.siteGlobals.set_reminder_link_text,this.setReminderFormIdPopup=this.$el.parentElement.getAttribute("data-klaviyo_form_id_popup"),this.descriptionMetafield=this.$el.parentElement.getAttribute("data-description_metafield"),this.showSalePercentage=this.$el.parentElement.dataset.plpShowSalePercentage,this.showRating="true"===this.$el.parentElement.dataset.plpShowRating,this.ratingStarColor=this.$el.parentElement.getAttribute("data-plp-rating-star-color")||"",this.ratingCountColor=this.$el.parentElement.getAttribute("data-plp-rating-count-color")||"",this.pendingComparePid?(this.page=1,this.pastPage="1",fp.emit("plp-compare-pid-active",!0)):this.page=n,this.maybeRestorePlpFromCache(),"1"!==this.searchTerm?this.startSearchTermPage():this.startCollectionPage(),""!=this.searchTerm){const e=this;this.scrollHandler=G((function(){window.handleSearchResultsView&&window.handleSearchResultsView(e.searchTerm,e.totalResults)})),window.addEventListener("scroll",this.scrollHandler)}},beforeUnmount(){if(fp.emit("plp-compare-pid-active",!1),this.stopComparePlpRecheck(),this.restoreComparePidHandler&&(window.removeEventListener("replacestate",this.restoreComparePidHandler),window.removeEventListener("pushstate",this.restoreComparePidHandler)),this.handleViewportSize&&this.handleViewportSize(),this.resizeHandler&&document.removeEventListener("theme:resize:width",this.resizeHandler),window.removeEventListener("replacestate",this.debouncedSyncStateFromUrl),this.sortUpdateHandler&&fp.off("fs-sort-update",this.sortUpdateHandler),this.searchUpdateHandler&&fp.off("fs-search-update",this.searchUpdateHandler),this.pageUpdateHandler&&fp.off("fs-update-page",this.pageUpdateHandler),this.filterUpdateHandler&&fp.off("fs-update-filter",this.filterUpdateHandler),this.gridSizeLargeHandler&&fp.off("fs-update-grid-size-large",this.gridSizeLargeHandler),this.gridSizeSmallHandler&&fp.off("fs-update-grid-size-small",this.gridSizeSmallHandler),this.scrollHandler&&window.removeEventListener("scroll",this.scrollHandler),this.plpPageHideHandler&&window.removeEventListener("pagehide",this.plpPageHideHandler),this.savePlpScrollToCache(),this.filterToggleHandler){const e=document.getElementById("filter-toggle");e&&e.removeEventListener("click",this.filterToggleHandler)}},methods:{initializeBadgeHideConfig(){var e;
1try{const t=null==(e=document.querySelector('[data-section-type="collection"]'))?void 0:e.getAttribute("data-section-id");if(!t)return console.warn("Collection section ID not found"),void(this.cachedBadgeConfig={});const i=document.getElementById(`badge-hide-config-${t}`);if(!i)return console.warn(`Badge hide config script not found: badge-hide-config-${t}`),void(this.cachedBadgeConfig={});const o=JSON.parse(i.textContent),s=e=>{const t={};for(const[i,o]of Object.entries(e))if("string"==typeof o&&o.trim()){const e=o.split(",").map((e=>e.trim().replace(/[\s_-]/g,""))).filter((e=>e.length>0));t[i]=new Set(e)}else t[i]=new Set;return t};this.cachedBadgeConfig={topLeft:s(o.topLeft||{}),pill:s(o.pill||{}),textUnderPrice:s(o.textUnderPrice||{})}}catch(t){console.warn("Failed to parse badge hide configuration:",t),this.cachedBadgeConfig={}}},syncStateFromUrl(e){var t;if(this.fsError)return;if(this.isFilterUpdate)return;const i=new URL(e.detail.url,window.location.origin),o=this.url.searchParams.get("filters"),s=i.searchParams.get("filters"),r=this.url.searchParams.get("sortBy"),a=i.searchParams.get("sortBy"),n=null==(t=document.getElementById("fs-collection-products"))?void 0:t.getAttribute("data-collection-handle");n&&n!==this.collectionHandle&&(this.collectionHandle=n,this.checkCompareEnabled()),this.url=i,o===s&&r===a||(this.page=1,this.pastPage="1",this.products=[],this.narrowBy=this.getCurrentFilters(),this.setUrlParam("current",1),fp.emit("fs-filter-reset"),this.startCollectionPage(),this.scrollToView())},scrollToView(){var e;const t=(null==(e=document.getElementById("collection-start"))?void 0:e.offsetTop)||0,i=[".collection__text-content",".collection__nav--fs"].reduce(((e,t)=>{const i=document.querySelector(t);return e+(i?i.offsetHeight:0)}),40);window.scrollTo({top:t-i,behavior:"smooth"})},getCurrentSort(){return this.getUrlParam("sortBy")||"relevency"},getCurrentPage(){return parseInt(this.getUrlParam("current")||"1")},getSearchTerm(){return this.getUrlParam("q")||"1"},getCurrentFilters(){let e=this.getUrlParam("filters");return e?JSON.parse(decodeURIComponent(e)):[]},getFilteredNarrowBy(){return this.narrowBy&&Array.isArray(this.narrowBy)?this.narrowBy:[]},getUrlParam(e){return this.url.searchParams.get(e)},isBackForwardNavigation(){try{const e=performance.getEntriesByType&&performance.getEntriesByType("navigation");if(e&&e.length)return"back_forward"===e[0].type;if(performance.navigation)return 2===performance.navigation.type}catch(e){return!1}return!1},plpCacheKey(){const e=new URL(window.location.href);return e.searchParams.delete("compare_pid"),e.searchParams.delete("compare_color"),`fsplp:${e.pathname}${e.search}`},readPlpCache(){try{const e=sessionStorage.getItem(this.plpCacheKey());if(!e)return null;const t=JSON.parse(e);return t&&1===t.v?t:null}catch(e){return null}},prunePlpCache(){try{const e=[];for(let t=0;t<sessionStorage.length;t++){const i=sessionStorage.key(t);i&&0===i.indexOf("fsplp:")&&e.push(i)}if(e.length>=5){const t=this.plpCacheKey();e.forEach((e=>{e!==t&&sessionStorage.removeItem(e)}))}}catch(e){}},clearPlpCache(){try{for(let e=sessionStorage.length-1;e>=0;e--){const t=sessionStorage.key(e);t&&0===t.indexOf("fsplp:")&&sessionStorage.removeItem(t)}}catch(e){}},persistPlpCache(){try{if(window.theme&&window.theme.plpRestoreDisabled)return;if(this.pendingComparePid||this.stickyComparePid)return;if(!Array.isArray(this.products)||0===this.products.length)return;const e={v:1,products:this.products,page:this.page,pageCount:this.pageCount,totalResults:this.totalResults,collectionName:this.collectionName,narrowBy:this.narrowBy||[],sortBy:this.sortBy,searchTerm:this.searchTerm,scrollY:window.scrollY||window.pageYOffset||0};this.prunePlpCache(),sessionStorage.setItem(this.plpCacheKey(),JSON.stringify(e))}catch(e){console.debug("[plp-restore] persist skipped:",e),this.clearPlpCache()}},savePlpScrollToCache(){try{if(window.theme&&window.theme.plpRestoreDisabled)return;const e=this.plpCacheKey(),t=sessionStorage.getItem(e);if(!t)return void this.persistPlpCache();const i=JSON.parse(t);i.scrollY=window.scrollY||window.pageYOffset||0,sessionStorage.setItem(e,JSON.stringify(i))}catch(e){}}
1,maybeRestorePlpFromCache(){try{if(window.theme&&window.theme.plpRestoreDisabled)return!1;if(this.pendingComparePid)return!1;if(!this.isBackForwardNavigation())return!1;const e=this.readPlpCache();return!(!e||!Array.isArray(e.products)||0===e.products.length)&&(e.sortBy===this.sortBy&&((e.searchTerm||"1")===(this.searchTerm||"1")&&(JSON.stringify(e.narrowBy||[])===JSON.stringify(this.narrowBy||[])&&(this.products=e.products,this.pageCount=e.pageCount,this.totalResults=e.totalResults,e.collectionName&&(this.collectionName=e.collectionName),this.page=e.page,this.pastPage=String(e.page),this.removePreviewImages(),requestAnimationFrame((()=>{fp.emit("fs-update-pager",{pageCount:this.pageCount,totalResults:this.totalResults,page:this.page})})),this.plpRestoreScrollY="number"==typeof e.scrollY?e.scrollY:null,this.restorePlpScroll(),!0))))}catch(e){return console.debug("[plp-restore] seed failed:",e),!1}},restorePlpScroll(){if(null==this.plpRestoreScrollY)return;try{"scrollRestoration"in history&&(history.scrollRestoration="manual")}catch(i){}const e=this.plpRestoreScrollY,t=i=>{this.$nextTick((()=>{window.scrollTo(0,e),i>0&&Math.abs((window.scrollY||window.pageYOffset||0)-e)>4&&setTimeout((()=>t(i-1)),120)}))};requestAnimationFrame((()=>t(8)))},removePreviewImages(){var e;this.showPage=!0,null==(e=document.getElementById("fs-collection-products-preview"))||e.remove()},setupProducts(e){if(null!==this.currentSetupRequestId&&this.currentSetupRequestId!==this.lastRequestId)return;let t=this.products,i=[],o=[];if(t.forEach((e=>{o.push(e.id)})),e.payload.products.forEach((e=>{o.includes(e.id)||i.push(e)})),t=this.products.length>0?this.products.concat(i):i,e.action==this.fastSimonResponseAction||"products"==e.action){if(this.collectionName=e.payload.name,this.products=t,this.pendingComparePid){const t=this.products.find((e=>Z(e,this.pendingComparePid)));if(t)this.pendingComparePid=null,this.stickyComparePid=null,fp.emit("plp-compare-pid-active",!1),this.$nextTick((()=>{if(this.resolveComparePlpEnabled()){if(this.productsToCompare.size>=3){const e=Array.from(this.productsToCompare);for(;e.length>=3;)e.shift();this.updateProductsToCompare(new Set(e))}this.stickyCompareColor&&(t.compareImage=this.getCompareImageForColor(t,this.stickyCompareColor)),this.toggleCompareItem(t),this.showCompareUI=!0,this.checkCompareEnabled()}else this.checkCompareEnabled()}));else{const t=e.payload,i=t.page,o=t.pageCount;if(i<o){const e=parseInt(this.pastPage)||0;!this.isFilterUpdate&&e>i&&e>1&&!this.pendingComparePid||this.$nextTick((()=>{this.page=i+1,""!==this.searchTerm&&"1"!==this.searchTerm?this.startSearchTermPage():this.startCollectionPage()}))}else this.pendingComparePid=null,this.stickyComparePid=null,fp.emit("plp-compare-pid-active",!1)}}this.pageCount=e.payload.pageCount,this.totalResults=e.payload.totalResults,this.page=e.payload.page,window.setFindingMethod&&window.setFindingMethod("PLP:"+this.collectionName),requestAnimationFrame((()=>{fp.emit("fs-update-pager",{pageCount:this.pageCount,totalResults:this.totalResults,page:this.page})})),this.setUrlParam("current",this.page),this.persistPlpCacheDebounced&&this.persistPlpCacheDebounced();const i=parseInt(this.pastPage)||0;if(this.page===i&&i>1){const e=""!==this.searchTerm&&"1"!==this.searchTerm;this.reportAllPagesUpTo(this.page,e)}if(!this.pendingComparePid&&!this.isFilterUpdate&&i>this.page&&i>1){var s=this.page+1;this.page=s,this.startCollectionPage()}if(this.isFilterUpdate&&setTimeout((()=>{this.isFilterUpdate=!1}),1e3),setTimeout((()=>{if(this.removePreviewImages(),window.yotpoWidgetsContainer&&window.yotpoWidgetsContainer.guids)try{const e=Object.keys(window.yotpoWidgetsContainer.guids);e.length>0&&(e.forEach((e=>{const t=window.yotpoWidgetsContainer.guids[e].config.widgets;Object.keys(t).forEach((e=>{const i=t[e];window.dispatchEvent(new CustomEvent("yotpo-widget-refresh",{detail:{widgetId:e,className:i.className}})),window.dispatchEvent(new CustomEvent(`yotpo-${i.className}-refresh`))}))})),setTimeout((()=>{document.querySelectorAll("[data-yotpo-instance-id]").forEach((e=>{e.setAttribute("data-yotpo-refreshed",Date.now().toString())}))}),100))}catch(e){console.warn("Yotpo widget refresh failed:",e.message)}}),500),this.products.length){let e=null;try{e=new URL(window.location.href).searchParams.get("compare_pid")}catch(r){e=null}if(e&&0===this.productsToCompare.size){const t=this.products.find((t=>Z(t,e)));t&&this.$nextTick((()=>{this.productsToCompare.size>0||(this.resolveComparePlpEnabled()?(this.stickyCompareColor&&(t.compareImage=this.getCompareImageForColor(t,this.stickyCompareColor)),this.toggleCompareItem(t),this.showCompareUI=!0,this.checkCompareEnabled()):this.checkCompareEnabled())}))}}setTimeout((()=>{this.measureProductTileHeight()}),800)}""!=this.searchTerm&&setTimeout((()=>{window.handleSearchResultsView(this.searchTerm,this.totalResults)}),250),e.payload.totalResults||(this.isNoResults=!0),this.prepTrackedProducts()},prepTrackedProducts(){let e=!0;
1this.products.forEach((t=>{document.getElementById("pid-"+t.id)||(e=!1)})),!e&&this.prepTrackedRetryCounter<50?(this.prepTrackedRetryCounter++,setTimeout((()=>{this.prepTrackedProducts()}),100)):(this.prepTrackedRetryCounter=0,this.setTrackedProducts())},setTrackedProducts(){this.products.forEach((e=>{document.getElementById("product-tile-"+e.id)&&(this.trackedProducts.includes(e.id)||this.trackedProducts.push(e.id))})),this.trackedProducts.length<this.products.length&&this.trackingRetryCounter<10?setTimeout((()=>{this.setTrackedProducts(),this.trackingRetryCounter++}),100):this.trackedProducts.forEach(((e,t)=>{ue(e,t),this.trackingRetryCounter=0}))},restoreComparePidIfNeededToUrl(){const e=this.stickyComparePid;if(e&&!this.isRestoringComparePid)try{const t=new URL(window.location.href);if(t.pathname.includes("/collections/")){const i=t.searchParams.get("compare_pid");i===String(e)||null!=i&&""!==i||(this.isRestoringComparePid=!0,t.searchParams.set("compare_pid",String(e)),window.history.replaceState(null,null,t),this.url=new URL(t.toString()),this.$nextTick((()=>{this.isRestoringComparePid=!1})))}}catch(t){console.error("Error restoring compare_pid to URL:",t)}},setUrlParam(e,t){const i=new URL(window.location.href);i.searchParams.set(e,String(t));const o=this.comparePidForUrl;o&&i.searchParams.set("compare_pid",String(o)),window.history.replaceState(null,null,i),this.url=new URL(i.toString())},removeUrlParam(e){const t=new URL(window.location.href);t.searchParams.delete(e);const i=this.comparePidForUrl;"compare_pid"!==e&&i&&t.searchParams.set("compare_pid",String(i)),window.history.replaceState(null,null,t),this.url=new URL(t.toString())},startSearchTermPage(){"1"!==this.searchTerm&&""!==this.searchTerm||""==this.searchResultsCollection?(window.setFindingMethod&&window.setFindingMethod("Search Results"),ee((()=>{var e;try{if(!(null==(e=window.FastSimonSDK)?void 0:e.fullTextSearch))return console.warn("FastSimon SDK not available or fullTextSearch method missing"),void(this.fsError=!0);let t=!1;const i=setTimeout((()=>{t||(te("fullTextSearch callback not received within 15s"),this.fsError=!0)}),15e3),o=++this.lastRequestId;this.pendingRequests+=1;const s=this.getFilteredNarrowBy();window.FastSimonSDK.fullTextSearch({narrowBy:s,page:this.page,productsPerPage:this.productsPerPage,sortBy:this.sortBy,term:this.searchTerm,withAttributes:!0,maxFacetValues:100,facetLimit:100,includeFacetsFromAllResults:!0,callback:e=>{t=!0,clearTimeout(i),this.pendingRequests-=1,o===this.lastRequestId&&(this.currentSetupRequestId=o,this.setupProducts(e),fp.emit("fs-update",e.payload),e.payload.totalResults?this.isNoResults=!1:this.isNoResults=!0,e.payload.products&&e.payload.products.length>0&&this.reportSearchResultPageViewed())}})}catch(t){te("fullTextSearch error",t),this.fsError=!0}}),{onTimeout:()=>{this.fsError=!0}})):window.location.href="/collections/"+this.searchResultsCollection},startCollectionPage(){""!==this.searchTerm&&"1"===this.searchTerm&&this.collectionId?ee((()=>{var e;try{if(!(null==(e=window.FastSimonSDK)?void 0:e.smartCollections))return console.warn("FastSimon SDK not available or smartCollections method missing"),void(this.fsError=!0);let t=!1;const i=setTimeout((()=>{t||(te("smartCollections callback not received within 15s"),this.fsError=!0)}),15e3),o=++this.lastRequestId;this.pendingRequests+=1;const s=this.getFilteredNarrowBy();window.FastSimonSDK.smartCollections({categoryID:this.collectionId,narrowBy:s,page:this.page,productsPerPage:this.productsPerPage,sortBy:this.sortBy,term:this.searchTerm,withAttributes:!0,maxFacetValues:100,facetLimit:100,includeFacetsFromAllResults:!0,callback:e=>{t=!0,clearTimeout(i),this.pendingRequests-=1,o===this.lastRequestId&&(this.currentSetupRequestId=o,this.setupProducts(e),fp.emit("fs-update",e.payload),setTimeout((()=>{var t,i;const o=document.querySelector(".filter-controls .count");if(o&&(null==(t=e.payload)?void 0:t.totalResults)){const t=e.payload.totalResults+" Results";o.innerHTML!==t&&(o.innerHTML=t)}const s=document.querySelectorAll("#productCounter");if(s.length>0&&(null==(i=e.payload)?void 0:i.totalResults)){const t="("+e.payload.totalResults+")";
1s.forEach((e=>{e.innerHTML!==t&&(e.innerHTML=t)}))}}),100),this.isNoResults=e.payload.isNoResults,e.payload.products&&e.payload.products.length>0&&this.reportCollectionViewed())}})}catch(t){te("smartCollections error",t),this.fsError=!0}}),{onTimeout:()=>{this.fsError=!0}}):this.startSearchTermPage()},reportCollectionViewed(){const e=`${this.collectionId}-${this.page}`;this.lastReportedCollectionKey.has(e)||ee((()=>{var t,i,o;try{if(!(null==(t=window.FastSimonSDK)?void 0:t.event))return void console.warn("FastSimon SDK not available or event method missing");const s=this.promoTiles;if(!(null==(i=window.FastSimonEventName)?void 0:i.SmartCollectionPreformed))return void console.warn("FastSimonEventName.SmartCollectionPreformed not found, available events:",Object.keys(window.FastSimonEventName||{}));const r=localStorage.getItem("fromTurboLink");window.FastSimonSDK.event({eventName:window.FastSimonEventName.SmartCollectionPreformed,data:{categoryID:this.collectionId,query:this.collectionHandle,narrowBy:this.narrowBy,sortBy:this.sortBy,products:null==(o=this.products)?void 0:o.map((e=>e.id)),promoTiles:(null==s?void 0:s.length)>0?s:void 0,fromTurboLink:"true"===r}}),this.lastReportedCollectionKey.add(e),localStorage.removeItem("fromTurboLink")}catch(s){te("SmartCollectionPreformed event error",s)}}))},reportSearchResultPageViewed(){const e=`${this.searchTerm}-${this.page}`;this.lastReportedSearchKey.has(e)||ee((()=>{var t,i,o;try{if(!(null==(t=window.FastSimonSDK)?void 0:t.event))return void console.warn("FastSimon SDK not available or event method missing");const s=this.promoTiles;if(!(null==(i=window.FastSimonEventName)?void 0:i.SearchPerformed))return void console.warn("FastSimonEventName.SearchPerformed not found, available events:",Object.keys(window.FastSimonEventName||{}));window.FastSimonSDK.event({eventName:window.FastSimonEventName.SearchPerformed,data:{query:this.searchTerm,narrowBy:this.narrowBy,sortBy:this.sortBy,products:null==(o=this.products)?void 0:o.map((e=>e.id)),promoTiles:(null==s?void 0:s.length)>0?s:void 0}}),this.lastReportedSearchKey.add(e)}catch(s){te("SearchPerformed event error",s)}}))},checkCurrentActiveSlider(e){e!==this.sliderIDActive&&(this.sliderIDLast=this.sliderIDActive,this.sliderIDActive=e)},endlessScrollCollectionPage(){"1"===this.searchTerm&&this.collectionId?ee((()=>{var e;try{if(!(null==(e=window.FastSimonSDK)?void 0:e.smartCollections))return console.warn("FastSimon SDK not available or smartCollections method missing"),void(this.fsError=!0);let t=!1;const i=setTimeout((()=>{t||(te("smartCollections (endless scroll) callback not received within 15s"),this.fsError=!0)}),15e3),o=++this.lastRequestId;this.pendingRequests+=1;const s=this.getFilteredNarrowBy();window.FastSimonSDK.smartCollections({categoryID:this.collectionId,narrowBy:s,sortBy:this.sortBy,page:this.page,productsPerPage:this.productsPerPage,withAttributes:!0,callback:e=>{t=!0,clearTimeout(i),this.pendingRequests-=1,o===this.lastRequestId&&(this.currentSetupRequestId=o,this.setupProducts(e),fp.emit("fs-update",e.payload),this.isNoResults=e.payload.isNoResults,e.payload.products&&e.payload.products.length>0&&this.reportCollectionViewed())}})}catch(t){te("smartCollections (endless scroll) error",t),this.fsError=!0}}),{onTimeout:()=>{this.fsError=!0}}):this.startSearchTermPage()},endlessScrollSearchTermPage(){ee((()=>{var e;try{if(!(null==(e=window.FastSimonSDK)?void 0:e.fullTextSearch))return console.warn("FastSimon SDK not available or fullTextSearch method missing"),void(this.fsError=!0);let t=!1;const i=setTimeout((()=>{t||(te("fullTextSearch (endless scroll) callback not received within 15s"),this.fsError=!0)}),15e3);window.FastSimonSDK.fullTextSearch({narrowBy:this.narrowBy,page:this.page,productsPerPage:this.productsPerPage,sortBy:this.sortBy,term:this.searchTerm,withAttributes:!0,maxFacetValues:100,facetLimit:100,includeFacetsFromAllResults:!0,callback:e=>{t=!0,clearTimeout(i),this.setupProducts(e),fp.emit("fs-update",e.payload),this.isNoResults=e.payload.isNoResults,e.payload.products&&e.payload.products.length>0&&this.reportSearchResultPageViewed()}})}catch(t){te("fullTextSearch (endless scroll) error",t),this.fsError=!0}}
1),{onTimeout:()=>{this.fsError=!0}})},localGetPLPDescription:(e,t,i)=>J(e,t,i),localGetProductMetafieldOneFromFS:(e,t,i)=>J(e,t,i),localGetProductMetafieldTwoFromFS:(e,t,i)=>J(e,t,i),localGetProductCategoryMetafieldOneCollectionFromFS:(e,t,i)=>Y(e,t,i),localGetProductCategoryMetafieldTwoCollectionFromFS:(e,t,i)=>Y(e,t,i),localGetProductReminderEmbedFromFS:(e,t,i)=>J(e,t,i),reportAllPagesUpTo(e,t=!1){for(let i=1;i<=e;i++)if(t){const e=`${this.searchTerm}-${i}`;if(!this.lastReportedSearchKey.has(e)){const e=this.page;this.page=i,this.reportSearchResultPageViewed(),this.page=e}}else{const e=`${this.collectionId}-${i}`;if(!this.lastReportedCollectionKey.has(e)){const e=this.page;this.page=i,this.reportCollectionViewed(),this.page=e}}},onCompareKeepOpen(e){this.compareKeepOpen=!0===e,e||(this.showCompareUI=!1)},updateProductsToCompare(e){if(!(e&&e instanceof Set)){this.productsToCompare=new Set,this.compareKeepOpen=!1,this.showCompareUI=!1,this.productsToCompareKey=0;try{sessionStorage.removeItem(this.comparePlpSessionKey)}catch(i){console.error("Error updating products to compare:",i)}return}const t=this.productsToCompare.size;this.productsToCompare=new Set(Array.from(e)),this.showCompareUI=this.compareKeepOpen||this.productsToCompare.size>0,this.compareKeepOpen=!1,t!==this.productsToCompare.size&&(this.productsToCompareKey+=1);try{0===this.productsToCompare.size?sessionStorage.removeItem(this.comparePlpSessionKey):sessionStorage.setItem(this.comparePlpSessionKey,JSON.stringify(Array.from(this.productsToCompare)))}catch(i){console.error("Error updating products to compare:",i)}},getCompareImageForColor(e,t){var i,o,s;if(!e||!t)return null;const r=t.toLowerCase().trim(),a=(e,t)=>e&&e.length>0?e.find((e=>e[0]===t)):null;if(Array.isArray(e.alt))for(const n of e.alt)if((null==(i=n[0])?void 0:i.toLowerCase().trim())===r){const e=a(null==(o=n[3])?void 0:o.att,"Product images");if(null==(s=null==e?void 0:e[1])?void 0:s[0])return e[1][0]}return null},toggleCompareItem(e){const t=(null==e?void 0:e.pid)??(null==e?void 0:e.id)??(null==e?void 0:e.i)??(null==e?void 0:e.productID)??(null==e?void 0:e.product_id);if(null==t||""===t)return;const i=String(t);if("undefined"===i)return;const o={...e,pid:e.pid??e.id??e.i??e.productID??e.product_id},s=Array.from(this.productsToCompare).some((e=>String((null==e?void 0:e.pid)??(null==e?void 0:e.id))===i));if(!s&&this.productsToCompare.size>=3)return;const r=new Set;for(const a of this.productsToCompare){String((null==a?void 0:a.pid)??(null==a?void 0:a.id))!==i&&r.add(a)}s||r.add(o),this.updateProductsToCompare(r)},resolveComparePlpEnabled(){var e;if(this.forceCompareOn)return!0;const t=document.documentElement;if(t.classList.contains("kam-plp-compare-off"))return!1;if(t.classList.contains("kam-plp-compare"))return!0;const i=null==(e=window.theme)?void 0:e.kameleoonComparePlpEnabled;if(void 0!==i)return i;if(this.stickyComparePid)return!0;const o=document.getElementById("fs-collection-products");return"true"===(null==o?void 0:o.getAttribute("data-plp-enable-compare"))},comparePlpSignalPresent(){var e;const t=document.documentElement;return t.classList.contains("kam-plp-compare-off")||t.classList.contains("kam-plp-compare")||void 0!==(null==(e=window.theme)?void 0:e.kameleoonComparePlpEnabled)},startComparePlpRecheck(){if(this.stopComparePlpRecheck(),this.forceCompareOn||this.comparePlpSignalPresent())return;const e=()=>{this.comparePlpRecheckAttempts+=1;const t=this.comparePlpSignalPresent();if(t){const e=this.resolveComparePlpEnabled();e!==this.comparePlpEnabled&&(this.comparePlpEnabled=e,this.checkCompareEnabled())}t||this.comparePlpRecheckAttempts>=15?this.stopComparePlpRecheck():this.comparePlpRecheckTimer=setTimeout(e,200)};this.comparePlpRecheckTimer=setTimeout(e,200)},stopComparePlpRecheck(){this.comparePlpRecheckTimer&&(clearTimeout(this.comparePlpRecheckTimer),this.comparePlpRecheckTimer=null)},checkCompareEnabled(){var e;if(this.comparePlpEnabled=this.resolveComparePlpEnabled(),!this.comparePlpEnabled)return void(this.showCompareUI=!1);const t=document.getElementById("fs-collection-products");if(!t)return;
1if(!("true"===t.getAttribute("data-plp-enable-compare")))return void(this.showCompareUI=!1);const i=(null==(e=t.getAttribute("data-plp-compare-collections"))?void 0:e.split(",").map((e=>e.trim())).filter(Boolean))||[];if(i.length>0){const e=Q(t.getAttribute("data-collection-id"));if(!i.map(Q).includes(e))return void(this.showCompareUI=!1)}this.productsToCompare.size>0&&(this.showCompareUI=!0)},loadCompareProducts(){try{const e=sessionStorage.getItem(this.comparePlpSessionKey);if(e){const t=JSON.parse(e);Array.isArray(t)&&t.length&&(this.productsToCompare=new Set(t))}}catch(e){console.error("Error loading products to compare:",e)}this.checkCompareEnabled()},isProductInCompare(e){var t;if(!e)return!1;if([e.id,e.pid].filter(Boolean).map(String).some((e=>this.compareSetIdsSet.has(e))))return!0;const i=e.alt;if(Array.isArray(i))for(const s of i){const e=(null==s?void 0:s[2])||(null==s?void 0:s.pid)||(null==s?void 0:s.id);if(e&&this.compareSetIdsSet.has(String(e)))return!0}const o=e.vra;if(Array.isArray(o))for(const s of o){const e=(null==(t=null==s?void 0:s[1])?void 0:t[2])||(null==s?void 0:s[2])||(null==s?void 0:s.id)||(null==s?void 0:s.pid);if(e&&this.compareSetIdsSet.has(String(e)))return!0}return!1},measureProductTileHeight(){const e=document.getElementById("fs-collection-products-grid");if(!e)return;const t=e.querySelectorAll(":scope > div");for(const i of t)if(i.querySelector(".product-grid-item")&&i.offsetHeight>0){this.productTileHeight=i.offsetHeight;break}},getPromoGridStyle(e){if(!e.promotile)return{position:"relative"};const t=Math.min(e.width||1,this.activeGridColumns),i=e.height||1,o={position:"relative"};if(t>1&&(o["grid-column"]=`span ${t}`),i>1&&(o["grid-row"]=`span ${i}`),this.productTileHeight>0)if(i>1){const e=document.getElementById("fs-collection-products-grid"),t=e&&parseFloat(getComputedStyle(e).rowGap)||0;o["min-height"]=i*this.productTileHeight+(i-1)*t+"px"}else t>=this.activeGridColumns&&(o["min-height"]=`${this.productTileHeight}px`);return o}
1,promoFitsInRow(e,t){const i=t.width||1;return i<=1||i<=this.activeGridColumns},isInLastRow(e){const t=this.activeGridColumns;return e>=this.products.length-(this.products.length%t||t)}},computed:{compareSetIdsSet(){return new Set(Array.from(this.productsToCompare||[]).map((e=>String((null==e?void 0:e.pid)||(null==e?void 0:e.id)))).filter(Boolean))},promoTiles(){var e;return(null==(e=this.products)?void 0:e.filter((e=>e.promotile&&e.id&&e.title)).map((e=>({id:e.id,name:e.title,link:e.link||"",thumbnail:e.image||""}))))||[]},badgeHideConfig(){return this.cachedBadgeConfig?this.cachedBadgeConfig:{}},hasActiveFilters(){return Array.isArray(this.narrowBy)&&this.narrowBy.length>0},activeGridColumns(){return this.isMobile?Number(this.gridSmall)||2:Number(this.gridLarge)||4},comparePidForUrl(){return this.pendingComparePid||this.stickyComparePid},compareCheckboxGateOpen(){return this.comparePlpEnabled},firstNonPromoProductListIndex(){return Array.isArray(this.products)?this.products.findIndex((e=>e&&e.l&&!e.promotile)):-1}}},[["render",function(e,t,i,o,u,p){const m=c("ProductListItem"),f=c("ProductListPromo"),w=c("CompareProductsWidget");return u.fsError?(r(),s("div",Gi,[...t[2]||(t[2]=[a("p",null,"There was an error loading products, please reload the page.",-1)])])):u.products.length?(r(),s("div",Wi,[u.isNoResults?(r(),s("div",Ki,[...t[3]||(t[3]=[a("h3",{class:"gt-h3 suggestions"},"No results found. Instead we recommend:",-1)])])):l("",!0),a("div",{class:"js-grid","data-grid-large":Number(u.gridLarge),"data-grid-small":Number(u.gridSmall),id:"fs-collection-products-grid"},[(r(!0),s(d,null,h(u.products,((e,t,i,o)=>{const a=[e.id,e.l,t,u.productsToCompareKey,p.isProductInCompare(e),p.hasActiveFilters,p.activeGridColumns,u.productTileHeight,u.products.length,u.comparePlpEnabled];if(o&&o.key===e.id&&M(o,a))return o;const d=(r(),s("div",{key:e.id,pid:e.id,id:`pid-${e.id}`,style:n(p.getPromoGridStyle(e))},[e.l?(r(),k(m,{fsData:e,useFsProductData:u.useFsProductData,collectionHandle:u.collectionHandle,collectionId:u.collectionId,badgeHideConfig:p.badgeHideConfig,gridLarge:u.gridLarge?u.gridLarge:"",gridSmall:u.gridSmall?u.gridSmall:"",imageLookUpMax:this.maxImages,key:e.id,pid:e.id,productIndex:t,productTitle:e.l,productTypesExcluded:this.productTypesExcluded,searchTerm:this.searchTerm,setReminderFormIdPopup:this.setReminderFormIdPopup,setReminderLinkText:this.setReminderLinkText,sliderIDActive:u.sliderIDActive?u.sliderIDActive:"",sliderIDLast:u.sliderIDLast?u.sliderIDLast:"",swatchSuffix:this.swatch_suffix,showSalePercentage:u.showSalePercentage,productsToCompare:u.productsToCompare,kameleoonCompareEnabled:p.compareCheckboxGateOpen,onToggleCompare:p.toggleCompareItem,onCurrentCarouselSlideStart:u.debouncedCheckCurrentActiveSlider,ref_for:!0,ref:"productItems",productPLPDescription:p.localGetPLPDescription(this.products,t,this.descriptionMetafield),productReminderMetafieldEmbed:p.localGetProductReminderEmbedFromFS(this.products,t,this.productReminderMetafieldEmbedAttr),productCategoryMetafieldOne:p.localGetProductMetafieldOneFromFS(this.products,t,this.productCategoryMetafieldOneAttr),productCategoryMetafieldTwo:p.localGetProductMetafieldTwoFromFS(this.products,t,this.productCategoryMetafieldTwoAttr),productCategoryMetafieldOneCollection:p.localGetProductCategoryMetafieldOneCollectionFromFS(this.products,t,this.productCategoryMetafieldOneCollectionAttr),productCategoryMetafieldTwoCollection:p.localGetProductCategoryMetafieldTwoCollectionFromFS(this.products,t,this.productCategoryMetafieldTwoCollectionAttr),collectionTracking:!0,showRating:u.showRating,ratingStarColor:u.ratingStarColor,ratingCountColor:u.ratingCountColor,enableMobilePeekABoo:t===p.firstNonPromoProductListIndex,slideIndex:t},null,8,["fsData","useFsProductData","collectionHandle","collectionId","badgeHideConfig","gridLarge","gridSmall","imageLookUpMax","pid","productIndex","productTitle","productTypesExcluded","searchTerm","setReminderFormIdPopup","setReminderLinkText","sliderIDActive","sliderIDLast","swatchSuffix","showSalePercentage","productsToCompare","kameleoonCompareEnabled","onToggleCompare","onCurrentCarouselSlideStart","productPLPDescription","productReminderMetafieldEmbed","productCategoryMetafieldOne","productCategoryMetafieldTwo","productCategoryMetafieldOneCollection","productCategoryMetafieldTwoCollection","showRating","ratingStarColor","ratingCountColor","enableMobilePeekABoo","slideIndex"])):l("",!0),e.promotile&&!p.hasActiveFilters&&p.promoFitsInRow(t,e)&&!p.isInLastRow(t)?(r(),k(f,{key:1,Title:e.title,Image:e.image,Link:e.link,Pid:e.id,productIndex:t,collectionTracking:!0,collectionId:u.collectionId,collectionHandle:u.collectionHandle,searchTerm:u.searchTerm,width:e.width||1,height:e.height||1,mobileImage:e.mobile_image||""},null,8,["Title","Image","Link","Pid","productIndex","collectionId","collectionHandle","searchTerm","width","height","mobileImage"])):l("",!0)],12,["pid","id"]));return d.memo=a,d}
1),t,0),128))],8,ji),u.showCompareUI?(r(),s("div",{key:"compare-bar-"+u.productsToCompareKey},[g(w,{productsToCompare:u.productsToCompare,"onUpdate:productsToCompare":p.updateProductsToCompare,collectionHandle:u.collectionHandle,collectionTitle:u.collectionName,onKeepOpen:p.onCompareKeepOpen},null,8,["productsToCompare","onUpdate:productsToCompare","collectionHandle","collectionTitle","onKeepOpen"])])):l("",!0)])):l("",!0)}],["__file","CollectionProducts.vue"]]),Zi={class:"popout--navbar"},Ji=["data-sort-enabled"],Yi=["innerHTML"],Xi={id:"collection-sort-list",class:"popout-list","data-popout-list":""},eo=["data-value","onClick"],to=["innerHTML"];const io=fe({name:"CollectionSort",mounted(){this.SetCurrentSortName(this.getCurrentSort())},data:()=>({sortOptions:[{option:"relevency",name:"Featured"},{option:"price_min_to_max",name:"Price: Low to High"},{option:"price_max_to_min",name:"Price: High to Low"},{option:"popularity",name:"Most Popular"}],currentSortName:"",url:new URL(window.location.href)}),methods:{setActiveSort(e,t){this.currentSortName=e,this.toggleSortList(),fp.emit("fs-sort-update",t),this.setUrlParam("sortBy",t)},getActiveClass(e){return e===this.currentSortName?"popout-list__item popout-list__item--current":"popout-list__item"},toggleSortList(){document.getElementById("collection-sort-list").classList.toggle("popout-list--visible")},handleFacetUpdate(e){this.facets=e,w(e)&&(this.facets=y(e))},SetCurrentSortName(e){this.sortOptions.forEach((t=>{t.option===e&&(this.currentSortName=t.name)}))},getCurrentSort(){return this.getUrlParam("sortBy")||"relevency"},getUrlParam(e){return this.url.searchParams.get(e)},setUrlParam(e,t){const i=new URL(window.location.href);i.searchParams.set(e,t),window.history.replaceState(null,null,i)}}},[["render",function(e,t,i,o,n,l){const m=c("popout-select");return r(),s("div",Zi,[t[3]||(t[3]=a("h2",{class:"visually-hidden",id:"sort-heading"},"Sort Heading",-1)),g(m,null,{default:T((()=>[a("div",{class:"popout","data-sort-enabled":n.currentSortName,"data-popout":""},[a("button",{type:"button",class:"popout__toggle gt-p",onClick:t[0]||(t[0]=e=>l.toggleSortList()),"aria-controls":"collection-sort-list","aria-describedby":"sort-heading","aria-label":"Sort"},[t[1]||(t[1]=a("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon--wide icon-sort",viewBox:"0 0 10 6"},[a("path",{d:"M0 0h10v1H0zm0 2.5h6v1H0zM3 5H0v1h3z","fill-rule":"evenodd"})],-1)),a("span",{"data-sort-button-text":"",class:"medium-down--hide gt-p__filter-heading",innerHTML:n.currentSortName},null,8,Yi),t[2]||(t[2]=a("span",{class:"large-up--hide gt-p__filter-heading"},"Sort",-1))]),a("ul",Xi,[(r(!0),s(d,null,h(n.sortOptions,((e,t)=>(r(),s("li",{class:p(l.getActiveClass(e.name)),key:"sort-"+t},[a("a",{class:"popout-list__option","data-value":e.option,onClick:u((t=>l.setActiveSort(e.name,e.option)),["prevent"])},[a("span",{innerHTML:e.name},null,8,to)],8,eo)],2)))),128))])],8,Ji)])),_:1})])}],["__file","CollectionSort.vue"]]),oo=["src"],so=["src"],ro=["src"],ao=["src"],no=["src"];const lo=fe({name:"CollectionGridSize",mounted(){const e=document.getElementById("fs-collection-products"),t=document.getElementById("collection-grid-size");e&&(this.gridLarge=e.getAttribute("data-grid-large"),this.gridSmall=e.getAttribute("data-grid-small")),t&&(this.grid_1=t.getAttribute("data-swatch-grid-1"),this.grid_1_over=t.getAttribute("data-swatch-grid-1-over"),this.grid_2=t.getAttribute("data-swatch-grid-2"),this.grid_2_over=t.getAttribute("data-swatch-grid-2-over"),this.grid_3=t.getAttribute("data-swatch-grid-3"),this.grid_3_over=t.getAttribute("data-swatch-grid-3-over"),this.grid_4=t.getAttribute("data-swatch-grid-4"),this.grid_4_over=t.getAttribute("data-swatch-grid-4-over"),this.grid_5=t.getAttribute("data-swatch-grid-5"),this.grid_5_over=t.getAttribute("data-swatch-grid-5-over"));const i=v.get("gridViewLarge")?JSON.parse(v.get("gridViewLarge")):Number(this.gridLarge),o=v.get("gridViewSmall")?JSON.parse(v.get("gridViewSmall")):Number(this.gridSmall);this.setTheCurrentGridSizeLarge(i),this.setTheCurrentGridSizeSmall(o),this.resizeHandler=G((()=>{this.isNarrowViewport=this.getIsNarrowViewport()}),100,!1),document.addEventListener("theme:resize:width",this.resizeHandler)},beforeUnmount(){this.resizeHandler&&(document.removeEventListener("theme:resize:width",this.resizeHandler),this.resizeHandler.cancel&&this.resizeHandler.cancel())},data(){var e,t;return{gridLarge:0,gridSmall:0,grid_1:"",grid_1_over:"",grid_2:"",grid_2_over:"",grid_3:"",grid_3_over:"",grid_4:"",grid_4_over:"",grid_5:"",grid_5_over:"",currentGridSizeSmall:"",currentGridSizeLarge:"",isNarrowViewport:window.innerWidth<=((null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium)||767),resizeHandler:null}},computed:{plpGlassEnabled:()=>!(!window.theme||"boolean"!=typeof window.theme.plpGlassEnabled)&&window.theme.plpGlassEnabled},methods:{getIsNarrowViewport(){var e,t;return window.innerWidth<=((null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium)||767)},sendGridSizeUpdate(e,t){fp.emit("fs-update-grid-size-large",e),fp.emit("fs-update-grid-size-small",t)},setTheCurrentGridSizeSmall(e){this.currentGridSizeSmall=e,v.set("gridViewSmall",this.currentGridSizeSmall),this.setGridSize()},setTheCurrentGridSizeLarge(e){this.currentGridSizeLarge=e,v.set("gridViewLarge",this.currentGridSizeLarge),this.setGridSize()}
1,setGridSize(){const e=document.getElementById("fs-collection-products-grid");e&&(e.setAttribute("data-grid-large",this.currentGridSizeLarge),e.setAttribute("data-grid-small",this.currentGridSizeSmall),window.dispatchEvent(new Event("resize")),this.sendGridSizeUpdate(this.currentGridSizeLarge,this.currentGridSizeSmall))}}},[["render",function(e,t,i,o,l,d){return r(),s("div",{class:p(["grid-size-toggles",{"is-narrow":l.isNarrowViewport}]),style:{display:"flex"}},[a("button",{class:"grid-size mobile grid-size--1","data-focus-element":"","aria-label":"1 product per row",onClick:t[0]||(t[0]=u((e=>d.setTheCurrentGridSizeSmall(1)),["prevent"]))},[d.plpGlassEnabled?(r(),s("span",{key:0,class:p(["grid-ico",{selected:1===l.currentGridSizeSmall}]),style:n({"--m":`url(${1===l.currentGridSizeSmall?l.grid_1_over:l.grid_1})`})},null,6)):(r(),s("img",{key:1,src:1===l.currentGridSizeSmall?l.grid_1_over:l.grid_1,class:p(1===l.currentGridSizeSmall?"selected":"")},null,10,oo))]),a("button",{class:"grid-size mobile grid-size--2","data-focus-element":"","aria-label":"2 products per row",onClick:t[1]||(t[1]=u((e=>d.setTheCurrentGridSizeSmall(2)),["prevent"]))},[d.plpGlassEnabled?(r(),s("span",{key:0,class:p(["grid-ico",{selected:2===l.currentGridSizeSmall}]),style:n({"--m":`url(${2===l.currentGridSizeSmall?l.grid_2_over:l.grid_2})`})},null,6)):(r(),s("img",{key:1,src:2===l.currentGridSizeSmall?l.grid_2_over:l.grid_2,class:p(2===l.currentGridSizeSmall?"selected":"")},null,10,so))]),a("button",{class:"grid-size desktop grid-size--3","data-focus-element":"","aria-label":"3 products per row",onClick:t[2]||(t[2]=u((e=>d.setTheCurrentGridSizeLarge(3)),["prevent"]))},[d.plpGlassEnabled?(r(),s("span",{key:0,class:p(["grid-ico",{selected:3===l.currentGridSizeLarge}]),style:n({"--m":`url(${3===l.currentGridSizeLarge?l.grid_3_over:l.grid_3})`})},null,6)):(r(),s("img",{key:1,src:3===l.currentGridSizeLarge?l.grid_3_over:l.grid_3,class:p(3===l.currentGridSizeLarge?"selected":"")},null,10,ro))]),a("button",{class:"grid-size desktop grid-size--4","data-focus-element":"","aria-label":"4 products per row",onClick:t[3]||(t[3]=u((e=>d.setTheCurrentGridSizeLarge(4)),["prevent"]))},[d.plpGlassEnabled?(r(),s("span",{key:0,class:p(["grid-ico",{selected:4===l.currentGridSizeLarge}]),style:n({"--m":`url(${4===l.currentGridSizeLarge?l.grid_4_over:l.grid_4})`})},null,6)):(r(),s("img",{key:1,src:4===l.currentGridSizeLarge?l.grid_4_over:l.grid_4,class:p(4===l.currentGridSizeLarge?"selected":"")},null,10,ao))]),a("button",{class:"grid-size desktop grid-size--5","data-focus-element":"","aria-label":"5 products per row",onClick:t[4]||(t[4]=u((e=>d.setTheCurrentGridSizeLarge(5)),["prevent"]))},[d.plpGlassEnabled?(r(),s("span",{key:0,class:p(["grid-ico",{selected:5===l.currentGridSizeLarge}]),style:n({"--m":`url(${5===l.currentGridSizeLarge?l.grid_5_over:l.grid_5})`})},null,6)):(r(),s("img",{key:1,src:5===l.currentGridSizeLarge?l.grid_5_over:l.grid_5,class:p(5===l.currentGridSizeLarge?"selected":"")},null,10,no))])],2)}],["__file","CollectionGridSize.vue"]]),co={key:0,class:"collection__active__filters__wrapper"},uo={class:"collection__active__filters"},ho=["onClick"],po=["innerHTML"],mo={key:0,class:"collection__count","data-products-count":"",style:{display:"none"}},go=["innerHTML"],fo=["innerHTML"];const wo=fe({name:"CollectionFilterButtons",mounted(){this.handleViewportSize=ge(this),le(),this.narrowBy=this.getCurrentFilters(),this.glassEnabled=this.resolveGlassEnabled(),window.addEventListener("replacestate",this.syncStateFromUrl),document.addEventListener("theme:plp-glass:change",this.onGlassChange),fp.on("fs-update",(e=>{this.avoidList=e.avoidPrefixList,this.totalResults=e.totalResults,this.shownProducts=e.products.length}))},beforeUnmount(){this.handleViewportSize&&this.handleViewportSize(),window.removeEventListener("replacestate",this.syncStateFromUrl),document.removeEventListener("theme:plp-glass:change",this.onGlassChange),fp.off("fs-update")},data:()=>({avoidList:[],narrowBy:[],totalResults:0,shownProducts:0,glassEnabled:!1}),computed:{crumbCap(){return this.glassEnabled?15:5}},methods:{resolveGlassEnabled:()=>window.theme&&"boolean"==typeof window.theme.plpGlassEnabled?window.theme.plpGlassEnabled:document.documentElement.classList.contains("plp-glass-on"),onGlassChange(e){this.glassEnabled=!!(e&&e.detail&&e.detail.enabled)},syncStateFromUrl(){this.narrowBy=this.getCurrentFilters()},getUrlParam:e=>new URL(window.location.href).searchParams.get(e),getCurrentFilters(){let e=this.getUrlParam("filters");return e?JSON.parse(decodeURIComponent(e)):[]},updateNarrowButtons(e){const t=this.getCurrentFilters().filter((t=>t[1]!==e));this.setUrlParam("filters",t),this.narrowBy=this.getCurrentFilters(),fp.emit("fs-update-filter",t)},setUrlParam(e,t){const i=new URL(window.location.href);i.searchParams.set(e,JSON.stringify(t)),window.history.replaceState(null,null,i)},cleanPillText(e,t){let i=t;if(this.avoidList&&this.avoidList.forEach((e=>{const t=e.replace("*","");i&&i.startsWith(t)&&(i=i.replace(t,""))})),"Price_from_to"===e){const e=/^(\d+)-(\d+)$/,t=i.match(e);if(t)return`$${t[1]}-$${t[2]}`}return i}}}
1,[["render",function(e,t,i,o,n,c){return n.narrowBy&&n.narrowBy.length>0?(r(),s("div",co,[a("div",uo,[(r(!0),s(d,null,h(n.narrowBy.slice(0,c.crumbCap).reverse(),((e,i)=>(r(),s("a",{class:"active__filters__remove gt-p__small",key:"facet-buttons-"+i,onClick:u((t=>c.updateNarrowButtons(e[1])),["prevent"])},[a("span",{innerHTML:c.cleanPillText(e[0],e[1])},null,8,po),t[0]||(t[0]=a("span",{class:"filter__x"},"X",-1))],8,ho)))),128))]),n.totalResults?(r(),s("div",mo,[a("strong",{innerHTML:n.shownProducts},null,8,go),t[1]||(t[1]=f(" of ",-1)),a("strong",{innerHTML:n.totalResults},null,8,fo),t[2]||(t[2]=f(" products",-1))])):l("",!0)])):l("",!0)}],["__file","CollectionFilterButtons.vue"]]),yo=["innerHTML"],vo=["value"];const bo=fe({name:"FsSearchField",mounted(){this.handleViewportSize=ge(this),this.searchMessage=document.getElementById("fs-search-field").getAttribute("data-search-message"),this.debouncedOnInput=G(this.handleInput,150,!1),fp.on("fs-update",(e=>{this.query=e.query}))},beforeUnmount(){this.handleViewportSize&&this.handleViewportSize()},data:()=>({searchMessage:"",query:"",initialScrollPosition:0,isNavigating:!1}),methods:{handleInput(e){this.isNavigating||(this.query=e.target.value)},onFocus(){this.isIOS()&&(this.initialScrollPosition=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop,this.initialScrollPosition>10&&(document.body.classList.add("keyboard-open"),this.hideHeader()),this.initialScrollPosition<=5&&(setTimeout((()=>{this.preventAutoScroll()}),10),setTimeout((()=>{this.preventAutoScroll()}),50),setTimeout((()=>{this.preventAutoScroll()}),100)))},onBlur(){this.isIOS()&&(document.body.classList.remove("keyboard-open"),setTimeout((()=>{this.showHeader()}),300))},preventAutoScroll(){const e=window.scrollY||document.documentElement.scrollTop||document.body.scrollTop;if(this.initialScrollPosition<=5&&e>this.initialScrollPosition+5){try{window.scrollTo({top:this.initialScrollPosition,behavior:"instant"})}catch(t){window.scrollTo(0,this.initialScrollPosition)}document.documentElement.scrollTop=this.initialScrollPosition,document.body.scrollTop=this.initialScrollPosition}},hideHeader(){const e=document.querySelector(".theme__header");e&&e.classList.add("header-hidden"),document.body.classList.add("header-hidden-fallback")},showHeader(){const e=document.querySelector(".theme__header");e&&e.classList.remove("header-hidden"),document.body.classList.remove("header-hidden-fallback")},isIOS:()=>/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,submitForm(){const e=this.query.trim();e&&(this.debouncedOnInput.cancel(),this.isNavigating=!0,this.resolveTurbolink(e,!0))},resolveTurbolink(e,t){const i=e.trim();if(!i)return;let o=!1;const s=()=>{o||t&&(o=!0,fp.emit("fs-search-update",i),this.setUrlParam("q",i),this.scrollToTop())};ee((()=>{const e=setTimeout(s,4e3);window.FastSimonSDK.fullTextSearch({term:i,callback:t=>{var i,r;if(o)return;const a=null==(r=null==(i=null==t?void 0:t.payload)?void 0:i.turbolink)?void 0:r.u;if(a)return clearTimeout(e),o=!0,this.setTurbolinkCollectionFlag(a),void(window.location.href=a);"facets and products"===(null==t?void 0:t.action)&&(clearTimeout(e),s())}})}),{onTimeout:s})},setTurbolinkCollectionFlag(e){e.includes("/collections/")&&localStorage.setItem("fromTurboLink","true")},scrollToTop(){let e=0;const t=()=>{try{window.scrollTo({top:0,behavior:"instant"})}catch(e){window.scrollTo(0,0)}document.documentElement.scrollTop=0,document.body.scrollTop=0},i=()=>{(window.scrollY||document.documentElement.scrollTop||document.body.scrollTop)>1&&e<8?(e+=1,t(),setTimeout(i,16)):(()=>{const e=document.querySelector(".theme__header");null==e||e.classList.remove("header-hidden"),document.body.classList.remove("header-hidden-fallback","sticky-active"),document.body.classList.add("at-top"),window.dispatchEvent(new Event("scroll"))})()};requestAnimationFrame((()=>{t(),setTimeout(i,16)}))},setUrlParam(e,t){const i=new URL(window.location.href);i.searchParams.set(e,t),i.searchParams.set("filters",""),i.searchParams.delete("current"),window.history.replaceState(null,null,i)},onTouchStart(){this.$refs.searchInput.focus()},onInputClick(){this.$refs.searchInput.focus()},onDoubleClick(){this.$refs.searchInput.select()}}},[["render",function(e,t,i,o,n,l){return r(),s(d,null,[a("h4",{innerHTML:n.searchMessage,class:"gt-h4"},null,8,yo),a("input",{type:"text",id:"search-field-value",value:n.query,onKeyup:t[0]||(t[0]=x(((...e)=>l.submitForm&&l.submitForm(...e)),["enter"])),onClick:t[1]||(t[1]=(...e)=>l.onInputClick&&l.onInputClick(...e)),onDblclick:t[2]||(t[2]=(...e)=>l.onDoubleClick&&l.onDoubleClick(...e)),onInput:t[3]||(t[3]=(...t)=>e.debouncedOnInput&&e.debouncedOnInput(...t)),onTouchstart:t[4]||(t[4]=(...e)=>l.onTouchStart&&l.onTouchStart(...e)),onFocus:t[5]||(t[5]=(...e)=>l.onFocus&&l.onFocus(...e)),onBlur:t[6]||(t[6]=(...e)=>l.onBlur&&l.onBlur(...e)),class:"gt-input fs-search-input",ref:"searchInput"},null,40,vo)],64)}],["__file","FsSearchField.vue"]]);const So=fe({components:{ProductListTopLeftBadge:bt,ProductListBottomPillBadge:Ct,ProductListTextUnderBadge:It},name:"ProductBadgePDP",data:()=>({tags:[],badgeType:"",price:0}),mounted(){const e=this.$el.parentElement;this.badgeType=e.getAttribute("data-badge-type");const t=e.getAttribute("data-product-price");this.price=t?parseFloat(t):0,fp.on("pdp-tags-updated",(e=>{this.tags=e.tags})),fp.on("updateAddButton",(e=>{e.variantPrice&&(this.price=parseFloat(e.variantPrice)||0)}))}},[["render",function(e,t,i,o,s,a){return""!=s.badgeType?(r(),k(A(s.badgeType),{key:0,tags:s.tags,price:s.price},null,8,["tags","price"])):l("",!0)}],["__file","ProductBadgePDP.vue"]]),_o=e=>String(e||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),Co=async e=>{var t;const i=(null==(t=window.theme)?void 0:t.fetchWithRetry)||window.fetch,o=await i.call(window,e);return(null==o?void 0:o.ok)?o.text():""},Po=e=>/data-section-type=["']data-table["']/i.test(e||""),ko=e=>{if("undefined"==typeof DOMParser||!e)return"";const t=(new DOMParser).parseFromString(e,"text/html").querySelector('[data-section-type="data-table"]');return t?t.outerHTML:""},To=(e,t)=>({title:e,content:`<div class="size-guide-modal-content"><div class="section-padding" style="--PT: 50px; --PB: 0;"><div class="wrapper"><h1 class="gt-h1">${_o(e)}</h1></div></div>${t}</div>`});async function Io(e){var t,i,o;if(!e)return null;try{const s=await it.request(rt,{variables:{id:`gid://shopify/Page/${e}`}}),r=null==(t=null==s?void 0:s.data)?void 0:t.page;if(!r)return null;const a=r.handle;if(a){const e=(()=>{var e,t;return(null==(t=null==(e=window.theme)?void 0:e.routes)?void 0:t.root_url)||"/"})(),t=await Co(`${e}pages/${a}?section_id=template--page-size-guide__size_guide`);if(Po(t))return To(r.title,t);const i=await Co(`${e}pages/${a}?view=size-guide`),o=ko(i);if(Po(o))return To(r.title,o);const s=await Co(`${e}pages/${a}`),n=ko(s);if(Po(n))return To(r.title,n)}return i=r.title,o=r.body,{title:i,content:`\n            <section class="section-padding" style="--PT: 50px; --PB: 36px;">\n              <div class="wrapper">\n                <div class="text__standard text-left">\n                  <h1 class="gt-h1">\n                    ${_o(i)}\n                  </h1>\n                  <div class="rte gt-p">\n                    ${o||""}\n                  </div>\n                </div>\n              </div>\n            </section>\n          `}}catch(s){return console.error("Error loading size guide content",s),null}}let Ao=0,Lo=0,Eo="";const Mo=new WeakSet,xo=e=>e?String(e).replace(/\D+/g,""):"",Oo=()=>{var e,t,i,o;if(Eo)return Eo;
1const s=null==(e=document.querySelector('link[rel="canonical"]'))?void 0:e.href;if(s)try{return Eo=new URL(s).origin,Eo}catch(a){}const r=(null==(t=window.customerAccount)?void 0:t.oauthOrigin)||(null==(o=null==(i=window.siteGlobals)?void 0:i.customerAccount)?void 0:o.oauthOrigin);if(r){try{Eo=new URL(r).origin}catch(a){Eo=r.replace(/\/$/,"")}return Eo}return window.domain?(Eo=`https://${String(window.domain).replace(/^https?:\/\//,"")}`,Eo):(Eo=window.location.origin,Eo)},Bo=e=>e?/^https?:\/\//i.test(e)?e:e.startsWith("//")?`${window.location.protocol}${e}`:e.startsWith("/")?`${Oo()}${e}`:e:"",Fo=e=>e?`${Oo()}/products/${e}`:"",Do=e=>{var t;if(!Array.isArray(e)||e.length<2)return e||[];const i=xo(null==(t=window.__pdpAddButtonPayload)?void 0:t.variantId);if(!i)return e;const o=e.findIndex((e=>xo(null==e?void 0:e.id)===i));if(o<1)return e;const s=e.slice();return s.unshift(s.splice(o,1)[0]),s},$o=(e,t,i="",o="")=>{if(!window.customerHub||!e)return;const s=window.customerHub.activeProduct||{},r=String(s.id)===String(e);window.customerHub.activeProduct={id:e,link:t||(r?s.link:"")||"",name:o||(r?s.name:"")||"",imageUrl:Bo(i||(r?s.imageUrl:"")||""),variants:r&&s.variants||[]}},zo=e=>{var t;if(!e)return;if(null==(t=window.customerHubApi)?void 0:t.hydrateProduct)return void window.customerHubApi.hydrateProduct(e);let i=0;const o=()=>{var t;(null==(t=window.customerHubApi)?void 0:t.hydrateProduct)?window.customerHubApi.hydrateProduct(e):++i<120&&requestAnimationFrame(o)};o()},Ho=(e,t,i,o="",s="")=>{var r;if(!t)return;const a=Fo(t),n=Bo(o);if($o(e,a,n,s),(null==(r=window.customerHubApi)?void 0:r.hydrateProduct)&&(window.customerHubApi.hydrateProduct(t),n))return;if(!window.customerHub)return;const l=++Lo;fetch(`/products/${t}.js`).then((e=>e.ok?e.json():null)).then((e=>{var t;e&&i===Ao&&l===Lo&&(window.customerHub.activeProduct={id:String(e.id),link:Fo(e.handle),name:e.title||s||"",imageUrl:Bo(e.featured_image||(null==(t=e.images)?void 0:t[0])||n||""),variants:Do(e.variants||[])})})).catch((e=>{console.warn("[pdpFavorites] Failed to hydrate active product",e)}))},Ro=(e,t,i,o,s="",r=!1)=>{((e,t,i,o,s="")=>{e.setAttribute("data-fav-pid",t),i&&(e.setAttribute("data-fav-handle",i),e.setAttribute("data-fav-url",o)),s&&e.setAttribute("data-fav-image",s);const r=e.querySelector(".klaviyo-wishlist-slot");r&&(r.setAttribute("data-product-id",t),o&&r.setAttribute("data-product-url",o))})(e,t,i,o,s),r&&((e,t,i,o=!1)=>{e.querySelectorAll(".klaviyo-wishlist-slot, .kl-hub-favorites-widget, [data-product-id]").forEach((e=>{e.setAttribute("data-product-id",t),i&&e.setAttribute("data-product-url",i),o&&e.setAttribute("data-rendered-product-id",t)}))})(e,t,o,!0)},No=(e,t)=>{const i=document.createElement("div");return i.className="klaviyo-wishlist-slot",i.setAttribute("data-product-id",e),t&&i.setAttribute("data-product-url",t),i},Vo=".kl-hub-favorites-widget",qo=new WeakMap,Uo=(e,t,i)=>{setTimeout((()=>{if(e.getAttribute("data-fav-mounted-pid")!==t)return;if(e.querySelector(Vo))return void qo.delete(e);const o=qo.get(e),s=o&&o.pid===t?o.attempts:0;s>=3||(qo.set(e,{pid:t,attempts:s+1}),e.replaceChildren(No(t,i)),zo(e.getAttribute("data-fav-handle")||""),Uo(e,t,i))}),1200)},Go=()=>-1!==location.hash.indexOf("k-hub")||!!document.querySelector(".kl-hub-drawer--opened, .kl-hub-modal-veil--opened"),Wo=(e,t)=>{const i=e.querySelector(".kl-hub-wishlist-icon");i&&i.classList.toggle("kl-hub-wishlist-icon--active",(e=>{const t=xo(e);return!(!t||!window.customerHub)&&[window.customerHub.favorites,window.customerHub.wishlist,window.customerHub.favoriteProducts,window.customerHub.items].some((e=>Array.isArray(e)&&e.some((e=>xo((null==e?void 0:e.id)||(null==e?void 0:e.productId)||(null==e?void 0:e.ProductID))===t))))})(t))},Ko=(e,t,i,o,s="",r="")=>{const a=Bo(r);Ro(e,t,i,o,a),$o(t,o,a,s),s&&e.setAttribute("data-fav-name",s),((e,t,i,o="",s="")=>{var r;if(!e)return;const a={ProductID:e,URL:i||(t?Fo(t):window.location.href)};o&&(a.Name=o),s&&(a.ImageURL=Bo(s)),(null==(r=window.klaviyo)?void 0:r.track)?window.klaviyo.track("Viewed Product",a):window._learnq&&window._learnq.push(["track","Vie
1wed Product",a])})(t,i,o,s,a),e.querySelector(Vo)&&Wo(e,t)},jo=e=>{Mo.has(e)||(Mo.add(e),e.addEventListener("pointerdown",(()=>(e=>{var t,i;const o=e.getAttribute("data-fav-pid"),s=e.getAttribute("data-fav-handle")||"";if(!o)return;const r=e.getAttribute("data-fav-url")||Fo(s),a=e.getAttribute("data-fav-image")||"",n=e.getAttribute("data-fav-name")||"";Ro(e,o,s,r,a,!0),$o(o,r,a,n);const l=null==(i=null==(t=window.customerHub)?void 0:t.activeProduct)?void 0:i.variants;Array.isArray(l)&&l.length&&(window.customerHub.activeProduct.variants=Do(l)),zo(s),Ho(o,s,Ao,a,n)})(e)),!0))},Qo=(e,t,i="",o=!0,s="")=>{const r=xo(e);if(!r||!t)return;const a=++Ao,n=Fo(t),l=(e=>{var t,i,o;if(!e)return"";if("string"==typeof e)return Bo(e);if(!Array.isArray(e)||!e.length)return"";const s=e[0];return Bo((null==(t=null==s?void 0:s.node)?void 0:t.url)||(null==(o=null==(i=null==s?void 0:s.node)?void 0:i.image)?void 0:o.url)||(null==s?void 0:s.url)||"")})(s),d=!window.isLoggedIn;d&&o&&!Go()&&(e=>{if(!e)return!1;const{pathname:t,search:i,hash:o}=window.location;if(!t.includes("/products/"))return!1;const s=t.replace(/\/products\/[^/?#]+/,`/products/${e}`);if(s===t)return!1;window.history.replaceState(window.history.state,"",`${s}${i}${o}`);const r=document.querySelector('link[rel="canonical"]');r&&r.setAttribute("href",`${window.location.origin}${s}`)})(t),document.querySelectorAll("[data-pdp-favorite]").forEach((e=>{d&&((e,t,i)=>{if(Go())return void e.setAttribute("data-fav-mounted-pid",t);if(e.querySelector(Vo))return void e.setAttribute("data-fav-mounted-pid",t);const o=e.getAttribute("data-fav-mounted-pid"),s=(e=>e.querySelector(".klaviyo-wishlist-slot, [data-product-id]"))(e);if(xo(null==s?void 0:s.getAttribute("data-product-id"))===t)return e.setAttribute("data-fav-mounted-pid",t),void Uo(e,t,i);o!==t?(e.replaceChildren(No(t,i)),e.setAttribute("data-fav-mounted-pid",t),Uo(e,t,i)):Uo(e,t,i)})(e,r,n),jo(e),Ko(e,r,t,n,i,l)})),Ho(r,t,a,l,i)},Zo={name:"PDPPriceGroupBlock",props:{currentPriceNumber:{type:String,required:!0},comparePriceNumber:{type:String,required:!0},showPercentage:{type:Boolean,required:!0},showOriginalOnSalePrice:{type:Boolean,required:!0}},data:()=>({currentPrice:"",comparePrice:"",currencyCode:""}),computed:{percentage:function(){return this.handlePercentage()}},mounted(){this.currencyCode=window.Shopify.currency.active,this.currentPrice=this.convertToCurrency(this.currentPriceNumber),this.comparePrice=this.convertToCurrency(this.comparePriceNumber)},methods:{handlePercentage(){return this.currentPriceNumber&&"true"==this.showPercentage&&""!=this.comparePriceNumber&&isFinite(Math.round((this.comparePriceNumber-this.currentPriceNumber)/this.comparePriceNumber*100))?Math.round((this.comparePriceNumber-this.currentPriceNumber)/this.comparePriceNumber*100):""},checkClass(){const e=parseFloat(this.comparePriceNumber)||0,t=parseFloat(this.currentPriceNumber)||0;return e>0&&e>t?"product__price--sale":""},convertToCurrency(e){let t=Intl.NumberFormat("en-US",{style:"currency",currency:this.currencyCode}).format(e).replace(".00","");return t.includes("CA")&&(t=t.replace("CA",""),t+=" CAD"),isNaN(e)?"":t}}},Jo={class:"PDPPriceGroupBlock"},Yo=["innerHTML"],Xo=["innerHTML"],es=["innerHTML"];const ts={key:0,class:"bling-wrapper"},is=["onClick"],os=["innerHTML"],ss={key:0,class:"bundle-selector"},rs={class:"bundle-selector__title gt-p__small"},as={class:"bundle-selector__list"},ns=["aria-pressed","onClick"],ls={class:"visually-hidden"},ds={class:"bundle-child-list"},cs={class:"bundle-child__title-row"},us={class:"visually-hidden"},hs={class:"bundle-child__title gt-p__small"},ps=["href"],ms={class:"bundle-child__title-main gt-p__small"},gs={class:"bundle-child__title-selected gt-p__small"},fs=["id"],ws={class:"option-title gt-p__small"},ys={class:"option-name gt-p__small"},vs={class:"variant-spacing variant-spacing-swatch"},bs=["onClick"],Ss=["innerHTML"],_s=["innerHTML"],Cs={key:0,class:"variant-spacing variant-spacing-swatch"},Ps=["data-color","data-coming-soon","onClick","onTouchstart","innerHTML"],ks=["data-coming-soon","data-color","onClick","onTouchstart"],Ts=["src","srcset","alt","loading"],Is=["innerHTML"],As={key:1,class:"variant-spacing variant-spacing-swatch"},Ls=["data-color","data-coming-soon","onClick","innerHTML"],Es=["data-color","data-coming-soon","onClick"],Ms=["src","srcset","alt","loading"],xs=["innerHTML"],Os=["innerHTML"];const Bs=fe({name:"ColorVariantOption",props:{previouslySelectedProduct:{type:Object,default:null}},components:{PDPPriceGroupBlock:fe(Zo,[["render",function(e,t,i,o,n,d){return r(),s("div",Jo,[a("div",null,[a("span",{"data-product-price":"",class:p(d.checkClass()+" gt-p__small"),innerHTML:n.currentPrice},null,10,Yo),parseFloat(i.comparePriceNumber)>0&&parseFloat(i.comparePriceNumber)>parseFloat(i.currentPriceNumber)&&!0===i.showOriginalOnSalePrice?(r(),s("span",{key:0,class:"pdp-sale markdown gt-p__small","data-price-sale-amount":"",innerHTML:n.comparePrice},null,8,Xo)):l("",!0),""!=d.percentage&&d.percentage>0?(r(),s("span",{key:1,class:"gt-p__small on-sale percentage",innerHTML:"("+d.percentage+"% off)"},null,8,es)):l("",!0)])])}],["__file","PDPPriceGroupBlock.vue"]])},computed:{cleanColorName:()=>e=>se(e),bundleSelectorLabel(){return this.bundleOptionTitle&&this.bundleOptionTitle.trim().length?this.bundleOptionTitle:"Bundle Options"},swatchRenderingConfig(){return{showColorSwatches:!this.swatch_suffix||this.isCurrentExcludedColorOption(),showImageSwatches:this.swatch_suffix&&!this.isCurrentExcludedColorOption(),shouldShowSwatches:!this.swatch_suffix||this.isCurrentExcludedColorOption()||this.swatch_suffix&&!this.isCurrentExcludedColorOption()}},bundleSizeGuideAnchorKey(){if(!this.showSizeGuideButton||!Array.isArray(this.bundleChildren))return null;const e=this.bundleChildren.find((e=>this.childHasSizeOption(e)));return e?e.key:null}},data:()=>({colorPriceGroupMap:null,colorTagPrefix:"color-",colors:[],currentBling:"",current_product_type:"",customBling:"",customBlingBase:"",customBlingElements:[],enablePriceGrouping:!1,excludedProductType:[],hasUpsellProduct:!1,imageKey:null,imageNS:null,includedProductType:"",isColorSelected:!1,isLoading:!1,mini_pdp:!1,isOutfitPicker:!1,pdpSection:null,optionOneName:"",passedOptOne:"",priceGroupOrder:!1,priceGroups:[],priceGroupsCompareList:[],productC
1ollection:"",product_handle:"",product_swatch_name:"",product_title:"",enableLazyLoading:"undefined"==typeof window||!window.theme||!window.theme.settings||Boolean(window.theme.settings.enable_lazy_loading),selectedColor:"",selectedSize:"",selectedWidth:"",showPercentageOff:!1,showOriginalOnSalePrice:!0,swatchColorGroupOrder:[],swatch_suffix:"",upsellProductDetails:window.product_upsell_options_option_product||null,variants:[],upsellProductDetails2:window.product_upsell_options_option_product_2||null,imageNS2:null,imageKey2:null,vimageNS:null,vimageKey:null,variant_image_metafield_name:null,enableABTestingVariable:null,comingSoonTag:window.siteGlobals.set_reminder_tag,previousVariant:null,abTestingHandler:null,pendingProductColor:null,bundleSwatchMetafieldNameSpace:null,bundleSwatchMetafieldName:null,isBundleFromDom:!1,bundleOptionTitle:"",bundleOptionOrder:[],optionTwoOrderTokens:[],optionThreeOrderTokens:[],isBundleProduct:!1,bundleFamilies:[],bundledProducts:[],activeBundleHandle:null,activeBundleIndex:0,bundleChildren:[],bundleChildSelections:{},activeBundleVariantId:null,suspendBundleChildSync:!1,defaultsTimer:null,sizeGuideMetafield:"",showSizeGuideButton:!1,bundleSizeGuideLoading:!1,lastEmittedHandle:"",sourceProductID:"",currentDisplayedProductID:""}),mounted(){var e,t,i,o;this.showPercentageOff=this.$el.parentElement.getAttribute("data-showPercentageOff"),this.sourceProductID=this.$el.parentElement.getAttribute("data-product-id")||"",this.currentDisplayedProductID=this.sourceProductID,this.upsellProductDetails&&(this.imageNS=this.upsellProductDetails.split(".")[0],this.imageKey=this.upsellProductDetails.split(".")[1]),this.upsellProductDetails2&&(this.imageNS2=this.upsellProductDetails2.split(".")[0],this.imageKey2=this.upsellProductDetails2.split(".")[1]),this.variant_image_metafield_name=this.$el.parentElement.getAttribute("data-variant_image_metafield_name"),this.variant_image_metafield_name&&(this.vimageNS=this.variant_image_metafield_name.split(".")[0],this.vimageKey=this.variant_image_metafield_name.split(".")[1]),this.product_title=this.$el.parentElement.getAttribute("data-product-name"),this.product_handle=this.$el.parentElement.getAttribute("data-product-handle"),this.imageLookUpMax=parseInt(this.$el.parentElement.getAttribute("data-imageLookUpMax")),this.swatchColorGroupOrder=(null==(e=this.$el.parentElement.getAttribute("data-swatchColorGroupOrder"))?void 0:e.split(","))||[],this.swatch_suffix=this.$el.parentElement.getAttribute("data-swatch_suffix"),this.current_product_type=this.$el.parentElement.getAttribute("data-current_product_type"),this.excludedProductType=this.$el.parentElement.getAttribute("data-excludedProductType").split(","),this.mini_pdp="true"===this.$el.parentElement.getAttribute("data-mini-pdp"),this.isOutfitPicker="true"===this.$el.parentElement.getAttribute("data-is-outfit-picker"),this.pdpSection=this.$el.parentElement.closest(".product-single")||this.$el.parentElement.closest(".mini-product-single"),this.product_swatch_name=this.$el.parentElement.getAttribute("data-product-swatch-name"),this.customBling=this.$el.parentElement.getAttribute("data-customBling"),this.customBlingElements=this.$el.parentElement.getAttribute("data-customBlingElements").split(","),this.priceGroupOrder=this.$el.parentElement.getAttribute("data-priceGroupOrder"),this.enablePriceGrouping=this.$el.parentElement.getAttribute("data-enablePriceGrouping"),this.showOriginalOnSalePrice="true"===this.$el.parentElement.getAttribute("data-showOriginalOnSalePrice"),this.productCollection=this.$el.parentElement.getAttribute("data-product-collection"),this.excludeSwatchWidth="true"===window.excludeSwatchWidth,this.isBundleFromDom="true"===this.$el.parentElement.getAttribute("data-is-bundle"),this.bundleOptionTitle=this.$el.parentElement.getAttribute("data-bundle-option-title")||"";const s=this.$el.parentElement.getAttribute("data-bundle-swatch-metafield-name");if(s&&s.includes(".")){const[e,t]=s.split(".");this.bundleSwatchMetafieldNameSpace=e||null,this.bundleSwatchMetafieldName=t||null}this.refreshBundleOptionOrder(),this.sizeGuideMetafield=window.sizeGuideMetafield||"",this.optionTwoOrderTokens=this.normalizeOrderTokens("undefined"!=typeof window&&(window.defaultOptionOrder||(null==(t=window.siteGlobals)?void 0:t.defaultOptionOrder))||""),this.optionThreeOrderTokens=this.normalizeOrderTokens("undefined"!=typeof window&&(window.optionthreeorder||(null==(i=window.siteGlobals)?void 0:i.optionthreeorder))||""),this.isOutfitPicker&&(this.pdpSection=this.$el.parentElement);const r=window.location.search,a=new URLSearchParams(r);this.passedOptOne=a.get("op1"),fp.on("product-data-updated",this.handleProductData),fp.on("plytix-product-data-ready",this.handlePlytixData),fp.on("ctl-request-bundle-children",this.emitBundleChildrenMetaUpdate),fp.on("variant-size-selected",(({size:e})=>{this.isOutfitPicker||this.variants.length&&!this.variants.some((t=>t.size===e))||(this.selectedSize=e,this.updateColorPriceGroupMapping(),this.setAddToBagButton())})),fp.on("variant-width-selected",(({width:e})=>{this.isOutfitPicker||this.variants.length&&!this.variants.some((t=>t.width===e))||(this.selectedWidth=e,this.setAddToBagButton())})),this.isOutfitPicker&&fp.on("outfit-picker-product-changed",(({productHandle:e,productC
1olor:t})=>{e&&e===this.product_handle&&t&&(this.pendingProductColor=t,this.colors&&this.colors.length>0&&this.applyPendingProductColor())}));this.checkPlytixData()||this.initializeData(),this.setBlingLinks(),this.enableABTestingVariable=(null==(o=this.$el.parentElement.getAttribute("data-enableABTestingVariable"))?void 0:o.toString())||null,window[this.enableABTestingVariable]&&(this.enablePriceGrouping=window[this.enableABTestingVariable].toString()),null!==this.enableABTestingVariable&&(this.abTestingHandler=e=>{const t=e.detail.toString();t!==this.enablePriceGrouping&&(this.enablePriceGrouping=t)},window.addEventListener(this.enableABTestingVariable,this.abTestingHandler))},beforeUnmount(){clearTimeout(this.defaultsTimer),fp.off("product-data-updated",this.handleProductData),fp.off("plytix-product-data-ready",this.handlePlytixData),fp.off("ctl-request-bundle-children",this.emitBundleChildrenMetaUpdate),fp.off("variant-size-selected"),fp.off("variant-width-selected"),this.isOutfitPicker&&fp.off("outfit-picker-product-changed"),null!==this.enableABTestingVariable&&this.abTestingHandler&&window.removeEventListener(this.enableABTestingVariable,this.abTestingHandler)},methods:{hasVisibleSwatchesForPriceGroup(e){if(!this.colorPriceGroupMap)return!1;return this.colors.filter((t=>this.colorPriceGroupMap.get(t.name)===e)).length>0&&this.shouldShowSwatches()},shouldShowSwatches(){return!this.swatch_suffix||this.isCurrentExcludedColorOption()||this.swatch_suffix&&!this.isCurrentExcludedColorOption()},analyzePriceGrouping(e){const t=new Map;return e.forEach((e=>{e.size&&e.color&&(t.has(e.size)||t.set(e.size,new Set),t.get(e.size).add(e.price))})),Array.from(t.values()).some((e=>e.size>1))},setupPriceGrouping(e){const t=new Set(e.variants.map((e=>e.price)));this.priceGroups=Array.from(t),this.priceGroupsCompareList={}
1,e.variants.forEach((e=>{this.priceGroupsCompareList[e.price]=e.compareAtPrice||""})),this.colorPriceGroupMap=new Map,e.colors.forEach((t=>{const i=e.variants.filter((e=>e.color===t.name));if(i.length>0){const e=this.selectedSize&&i.find((e=>e.size===this.selectedSize))||i[0];this.colorPriceGroupMap.set(t.name,e.price)}}))},updateColorPriceGroupMapping(){this.colorPriceGroupMap&&"true"===this.enablePriceGrouping&&this.colors.forEach((e=>{const t=this.variants.filter((t=>t.color===e.name));if(t.length>0){let i=t[0];if(this.selectedSize){const e=t.find((e=>e.size===this.selectedSize));e&&(i=e)}this.colorPriceGroupMap.set(e.name,i.price)}}))},isComingSoonColor(e){return!!e.tags.includes(this.comingSoonTag)},isExcludedColorOption(e){return this.excludedProductType.includes(e)?"option p-options option2":this.getSwatchClass()},isCurrentExcludedColorOption(){return!!this.excludedProductType.includes(this.current_product_type)},getSwatchClass(){let e="color-swatches p-options";return""!=this.productImageName&&(e="color-swatches p-options product-image"),e},getImageSwatchClass:()=>"image-swatches p-options product-image",checkPlytixData(){var e;if(this.current_product_type&&"bundles"===this.current_product_type.trim().toLowerCase())return!1;if(!("true"===(null==(e=this.pdpSection)?void 0:e.getAttribute("data-plytix-data-enabled"))))return!1;const t=ft.getPreloadedProductData(this.product_title,this.product_handle);return!!(t&&t.length>0)&&(ft.processAndEmitData(t,this.product_title,this.product_handle),this.handleContentLoaded(),!0)},handlePlytixData(e){if(e&&Array.isArray(e)&&e.length>0){const e=ft.getPreloadedProductData(this.product_title,this.product_handle);e&&e.length>0&&(ft.processAndEmitData(e,this.product_title,this.product_handle),this.handleContentLoaded())}},async initializeData(){this.isLoading=!0;try{await ft.fetchProductData(this.product_title,window.Shopify.country,this.imageLookUpMax,parseInt(window.siteGlobals.pdp_productsByTitleLookup),this.imageNS,this.imageKey,this.imageNS2,this.imageKey2,this.vimageNS,this.vimageKey,this.bundleSwatchMetafieldNameSpace,this.bundleSwatchMetafieldName,this.product_handle)}catch(e){console.error("PDP color data fetch failed:",e)}finally{this.isLoading=!1,this.handleContentLoaded(),this.colors&&this.colors.length||this.emitFallbackStartFullPdp()}},emitFallbackStartFullPdp(){fp.emit("start-full-pdp",{images:[],media:[],pid:"",tags:[],handle:this.product_handle})},handleContentLoaded(){const e=this.$el.parentElement.closest(".pdp-color-variant-options-container").querySelector(".pdp-variant-loader");e&&(e.style.minHeight="0",e.style.display="none")},handleProductData(e){if(!e||!e.colors)return void console.error("Invalid data received in handleProductData:",e);const t=e.productTitle===this.product_title||ie(e.productTitle||"")===ie(this.product_title||""),i=Boolean(this.product_handle&&e.colors.some((e=>e.handle===this.product_handle)));if(t||i)if(this.isBundleProduct=Boolean(e.isBundleProduct),this.bundleFamilies=e.bundleFamilies||[],this.bundledProducts=e.bundledProducts||[],this.activeBundleHandle=e.activeBundleHandle||(this.isBundleProduct&&this.bundledProducts.length?this.bundledProducts[0].handle:this.product_handle),this.isBundleProduct?(this.ensureBundleSizeGuideSetup(),this.bundleOptionOrder.length||this.refreshBundleOptionOrder()):(this.showSizeGuideButton=!1,this.bundleOptionOrder=[]),this.isBundleProduct&&this.bundledProducts.length){const t=this.bundledProducts.findIndex((e=>(null==e?void 0:e.handle)===this.activeBundleHandle));this.activeBundleIndex=t>=0?t:0;const i=this.bundledProducts[this.activeBundleIndex];i&&this.product_handle!==i.handle&&(this.product_handle=i.handle),this.applyBundleProductData(i||e)}else this.activeBundleIndex=0,this.applyBundleProductData(e)},applyBundleProductData(e){if(!e)return void console.warn("[ColorVariantOption] No product data available for bundle application");this.priceGroups=[],this.hasUpsellProduct=Boolean(e.hasUpsellProduct);const t=(e.colors||[]).map((e=>{let t="";for(const i of e.tags||[])if(i.startsWith(this.colorTagPrefix)){t=i.trim();break}return e.price&&!this.priceGroups.includes(e.price)&&this.priceGroups.push(e.price),{...e,colorGroupId:t}}
1));(e.variants||[]).forEach((e=>{e.price&&!this.priceGroups.includes(e.price)&&this.priceGroups.push(e.price)})),this.colors=this.sortColorGroupOrder(t),this.optionOneName=e.optionOneName||this.optionOneName,this.variants=e.variants||[],this.bundleChildren=this.buildBundleChildren(e),this.bundleChildSelections=this.buildInitialBundleChildSelections(this.bundleChildren),this.activeBundleVariantId=null,this.isBundleProduct&&(this.emitBundleChildHandleUpdate(),this.emitBundleChildrenMetaUpdate());this.analyzePriceGrouping(e.variants)?this.setupPriceGrouping({colors:this.colors,variants:e.variants}):this.enablePriceGrouping="false",this.handleContentLoaded();const i=this.priceGroups.sort(((e,t)=>t-e));if(this.priceGroups="false"===this.priceGroupOrder?i:i.reverse(),this.previouslySelectedProduct){const e=this.colors.find((e=>e.name===this.previouslySelectedProduct.color));e&&e.images&&this.setColorSelection(this.previouslySelectedProduct.name,e.images,e.media,e.tags,e.pid,this.previouslySelectedProduct.handle,e.description)}this.pendingProductColor&&this.applyPendingProductColor(),clearTimeout(this.defaultsTimer),this.defaultsTimer=setTimeout((()=>this.setDefaultSelections()),300),this.emitBundleHandleUpdate(this.product_handle)},selectBundle(e){if(!this.isBundleProduct||!e)return;const t=this.bundledProducts.findIndex((t=>(null==t?void 0:t.handle)===e));if(-1===t||t===this.activeBundleIndex)return;const i=this.bundledProducts[t],o=this.getBundleProductId(i);o&&(this.sourceProductID||(this.sourceProductID=o),this.sourceProductID&&o!==String(this.sourceProductID)&&o!==String(this.currentDisplayedProductID)&&ce({productID:o,sourceProductID:this.sourceProductID}),this.currentDisplayedProductID=o),this.activeBundleIndex=t,this.activeBundleHandle=e,this.product_handle=e,this.applyBundleProductData(i),this.emitBundleHandleUpdate(),this.emitBundleChildHandleUpdate(),this.emitBundleChildrenMetaUpdate(),fp.emit("bundled-product-selected",{handle:e,index:t,bundle:i})},getBundleProductId:e=>e&&(j(e.id)||j(e.pid))||"",emitBundleChildrenMetaUpdate(){if(!this.isBundleProduct||!Array.isArray(this.bundleChildren))return;const e=this.bundleChildren.filter((e=>e&&e.handle)).map((e=>({handle:e.handle,title:e.title||""})));fp.emit("bundle-children-meta-updated",{isBundleProduct:Boolean(this.isBundleProduct),children:e})},getBundleSwatchStyle(e){const t=(null==e?void 0:e.bundleSwatchImageUrl)?this.buildSizedImageUrl(e.bundleSwatchImageUrl,120):"";return t?{backgroundImage:`url(${t})`}:{}},buildBundleChildren(e){const t=new Map,i=(null==e?void 0:e.variants)||[],o=(null==e?void 0:e.bundleComponents)||{},s=(null==e?void 0:e.bundleChildSwatches)||{};return i.forEach((e=>{const i=o[e.variantId]||[],r=s[e.variantId]||{};i.forEach(((e,i)=>{const o=this.getBundleChildKey(e,i);t.has(o)||t.set(o,{key:o,title:e.productTitle||`Product ${t.size+1}`,handle:e.productHandle||"",productId:e.productId||"",optionsMap:{},image:e.image||"",swatchColor:e.swatchColor||e.color||""});const s=t.get(o);if(!s.image&&e.image&&(s.image=e.image),s.swatchColor||!e.swatchColor&&!e.color||(s.swatchColor=e.swatchColor||e.color),!s.productId&&e.productId&&(s.productId=e.productId),!s.swatchColor){const e=r[o];(null==e?void 0:e.color)&&(s.swatchColor=e.color)}(e.selectedOptions||[]).forEach((e=>{(null==e?void 0:e.name)&&(null==e?void 0:e.value)&&(s.optionsMap[e.name]||(s.optionsMap[e.name]=new Set),s.optionsMap[e.name].add(e.value))}))}))})),Array.from(t.values()).map((e=>{const t=Object.entries(e.optionsMap).map((([e,t])=>({name:e,values:this.sortBundleOptionValues(e,Array.from(t))}))),i=t.filter((e=>this.shouldShowBundleOption(e))),o=i.some((e=>this.isSizeOptionName(e.name)));return{key:e.key,title:e.title,handle:e.handle,productId:e.productId||"",image:e.image,swatchColor:e.swatchColor,options:t,visibleOptions:i,hasSizeOption:o}}))},ensureBundleSizeGuideSetup(){this.isBundleProduct&&(this.sizeGuideMetafield||(this.sizeGuideMetafield=window.sizeGuideMetafield||""),this.sizeGuideMetafield&&this.sizeGuideMetafield.includes(".")&&(this.showSizeGuideButton||this.bundleSizeGuideLoading||this.loadSizeGuideContent()))},async loadSizeGuideContent(){if(this.bundleSizeGuideLoading)return;this.bundleSizeGuideLoading=!0;let e=!1;try{const[t,i]=this.sizeGuideMetafield.split("."),o=await this.getMetafields([{namespace:t,key:i}]);if(!o||!o.length)return;const s=o.find((e=>(null==e?void 0:e.key)===i));if(!(null==s?void 0:s.value))return;const r=s.value.split("/").pop(),a=await Io(r);if(!a)return;const n=this.getSizeGuideModalIndex(),l=document.querySelector(`.size-guide-content-${n}`);l&&(l.innerHTML=a.content,e=!0)}catch(t){console.error("[ColorVariantOption] Error loading size guide data",t)}finally{this.showSizeGuideButton=e,this.bundleSizeGuideLoading=!1}},async getMetafields(e){var t,i;try{const o=await it.request(ot,{variables:{handle:this.product_handle,countryIso2:window.Shopify.country,metaIdentifier:e}});return(null==(i=null==(t=null==o?void 0:o.data)?void 0:t.product)?void 0:i.metafields)||null}catch(o){return console.error("Error fetching size guide metafields",o),null}},getSizeGuideModalIndex:()=>1,setBundleSizeGuideFloatingContentVisible(e){document.dispatchEvent(new CustomEvent(e?"chat:show":"chat:hide",{bubbles:!0}))}
1,showSizeGuide(){const e=`sizeGuideModal-${this.getSizeGuideModalIndex()}`;if(window.MicroModal&&"function"==typeof window.MicroModal.show)try{return void window.MicroModal.show(e,{disableScroll:!0,onShow:()=>this.setBundleSizeGuideFloatingContentVisible(!1),onClose:()=>this.setBundleSizeGuideFloatingContentVisible(!0)})}catch(i){console.error("Error showing size guide modal via MicroModal",i)}const t=document.getElementById(e)||document.getElementById("sizeGuideModal-1");t&&(t.classList.add("is-open"),document.documentElement.classList.remove("aos-initialized"),document.body.classList.add("unscrollable-body"),this.setBundleSizeGuideFloatingContentVisible(!1))},shouldShowBundleSizeGuide(e){return!(!this.showSizeGuideButton||!e)&&this.childHasSizeOption(e)},childHasSizeOption(e){return!!e&&("boolean"==typeof e.hasSizeOption?e.hasSizeOption:Array.isArray(e.visibleOptions)&&e.visibleOptions.some((e=>this.isSizeOptionName(e.name))))},isSizeOptionName(e){if(!e||"string"!=typeof e)return!1;const t=e.toLowerCase();return["size","waist","inseam","length","width"].some((e=>t.includes(e)))},isWidthOptionName(e){if(!e||"string"!=typeof e)return!1;const t=e.toLowerCase();return["width","calf"].some((e=>t.includes(e)))},getBundleChildKey:(e,t)=>e&&"object"==typeof e?e.productHandle||`${e.productTitle||"child"}-${t}`:`bundle-child-${t}`,cloneBundleSelections(){const e={};return Object.entries(this.bundleChildSelections||{}).forEach((([t,i])=>{e[t]={...i||{}}})),e},updateBundleChildSelection(e,t,i){const o=this.bundleChildSelections[e]||{};this.bundleChildSelections={...this.bundleChildSelections,[e]:{...o,[t]:i}}},buildBundleSelectionConstraints(e){if(!e)return[];const t=[];return Object.entries(e).forEach((([e,i])=>{i&&"object"==typeof i&&Object.entries(i).forEach((([i,o])=>{o&&t.push({childKey:e,optionName:String(i),value:o,normalizedValue:String(o).toLowerCase()})}))})),t},getComponentOptionValue(e,t){if(!(null==e?void 0:e.selectedOptions)||!t)return"";const i=t.toLowerCase(),o=e.selectedOptions.find((e=>!!(null==e?void 0:e.name)&&e.name.toLowerCase()===i));return null!=(null==o?void 0:o.value)?String(o.value):""},updateBundleChildSelectionsFromVariant(e){if(!(null==e?void 0:e.bundleSelections))return;const t={...this.bundleChildSelections};e.bundleSelections.forEach(((e,i)=>{const o=this.getBundleChildKey(e,i),s=t[o]||{},r={};(e.selectedOptions||[]).forEach((e=>{(null==e?void 0:e.name)&&(null==e?void 0:e.value)&&(r[e.name]=e.value)})),t[o]={...s,...r}})),this.bundleChildSelections=t},findBundleVariantByColor(e){if(!Array.isArray(this.variants)||!e)return null;const t=e.toLowerCase(),i=this.variants.filter((e=>(e.color||"").toLowerCase()===t));if(!i.length)return null;if(this.selectedSize){const e=this.selectedSize.toLowerCase(),t=i.find((t=>(t.size||"").toLowerCase()===e));if(t)return t}return i[0]||null},findBestBundleVariantForSelections(e){if(!Array.isArray(this.variants)||!this.variants.length)return null;const t=this.buildBundleSelectionConstraints(e);if(!t.length)return this.variants[0];let i=null,o=-1;for(const s of this.variants){const e=s.bundleSelections||[],r=new Map;e.forEach(((e,t)=>{r.set(this.getBundleChildKey(e,t),e)}));let a=0,n=!1;for(const i of t){const e=r.get(i.childKey);if(!e){n=!0;break}const t=this.getComponentOptionValue(e,i.optionName);if(!t){n=!0;break}if(String(t).toLowerCase()!==i.normalizedValue){n=!0;break}a+=1}if(!n&&a===t.length)return s;!n&&a>o&&(i=s,o=a)}return i||this.variants[0]||null},hasBundleVariantForSelections(e,t=!1){if(!Array.isArray(this.variants)||!this.variants.length)return!1;const i=this.buildBundleSelectionConstraints(e);return!!i.length&&this.variants.some((e=>{if(t&&!e.availableForSale)return!1;const o=new Map;return(e.bundleSelections||[]).forEach(((e,t)=>{o.set(this.getBundleChildKey(e,t),e)})),i.every((e=>{const t=o.get(e.childKey);if(!t)return!1;const i=this.getComponentOptionValue(t,e.optionName);return!!i&&String(i).toLowerCase()===e.normalizedValue}))}))},isBundleChildOptionAvailable(e,t,i){if(!this.isBundleProduct||!e||!t)return!0;const o=this.cloneBundleSelections();return o[e]||(o[e]={}),o[e][t]=i,this.hasBundleVariantForSelections(o,!0)},getBundleChildPrimaryOptionValue(e){var t;if(!e)return"";const i=this.bundleChildSelections[e.key]||{},o=(e=[])=>e.find((e=>(null==e?void 0:e.name)&&e.name.toLowerCase().includes("color")))||e[0]||null,s=o(e.visibleOptions||[]),r=o(e.options||[]),a=s||r;return a&&(i[a.name]||(null==(t=a.values)?void 0:t[0]))||""},getBundleChildSwatchColor(e){var t;return(null==e?void 0:e.swatchColor)?e.swatchColor:(null==e?void 0:e.options)&&e.options.length&&(null==(t=e.options[0].values)?void 0:t[0])||""},hasBundleChildSwatch(e){return Boolean(this.getBundleChildSwatchColor(e)||(null==e?void 0:e.image))},getBundleChildSwatchStyle(e){const t=this.getBundleChildSwatchColor(e);
1if(t&&"undefined"!=typeof window&&window.cdn){const e=`${window.cdn}${ie(t)}.png`;return{backgroundImage:`url(${this.buildSizedImageUrl(e,80)})`}}if(null==e?void 0:e.image){return{backgroundImage:`url(${this.buildSizedImageUrl(e.image,80)})`}}return{}},getBundleChildSelectedLabel(e){const t=this.getBundleChildDisplayLabel(e);if(!t)return"";const i=t.split(":");return i.length>1?`/ ${i.slice(1).join(":").trim()}`:t},applyBundleVariantMetadata(e,t={}){if(!e)return;const{updateColor:i=!1,syncChildSelections:o=!0,skipAddToBag:s=!1}=t;if(this.activeBundleVariantId=e.variantId||null,this.selectedSize=e.size||"",this.selectedWidth=e.width||"",o&&this.updateBundleChildSelectionsFromVariant(e),i){const t=this.colors.find((t=>t.name===e.color));if(t){this.suspendBundleChildSync=!0;try{this.setColorSelection(t.name,t.images,t.media,t.tags,t.pid,t.handle,t.description)}finally{this.suspendBundleChildSync=!1}}else this.selectedColor=e.color||"",this.isColorSelected=Boolean(this.selectedColor),s||this.setAddToBagButton()}else s||this.setAddToBagButton()},syncBundleChildrenToColor(e){if(!this.isBundleProduct||!e)return;const t=this.findBundleVariantByColor(e);t?this.applyBundleVariantMetadata(t,{updateColor:!1,syncChildSelections:!0,skipAddToBag:!0}):console.warn("No bundle variant found for color",e)},handleBundleChildSelectionChange(){if(!this.isBundleProduct)return;const e=this.findBestBundleVariantForSelections(this.bundleChildSelections);e?this.applyBundleVariantMetadata(e,{updateColor:!0,syncChildSelections:!1}):console.warn("Unable to resolve bundle variant from selections")},buildInitialBundleChildSelections(e){const t={};return Array.isArray(e)?(e.forEach((e=>{t[e.key]={},(e.options||[]).forEach((i=>{var o;t[e.key][i.name]=(null==(o=i.values)?void 0:o[0])||""}))})),t):t},isBundleOptionSelected(e,t,i){return this.bundleChildSelections[e]&&this.bundleChildSelections[e][t]===i},getBundleOptionClasses(e,t,i){const o=this.isBundleOptionSelected(e,t,i),s=this.isBundleChildOptionAvailable(e,t,i);return{selected:o,unavailable:!s,"is-disabled":!s}},selectBundleChildOption(e,t,i,o){o&&("function"==typeof o.preventDefault&&o.preventDefault(),"function"==typeof o.stopPropagation&&o.stopPropagation(),"function"==typeof o.stopImmediatePropagation&&o.stopImmediatePropagation()),e&&t&&i&&(this.isBundleOptionSelected(e,t,i)||(this.updateBundleChildSelection(e,t,i),this.handleBundleChildSelectionChange()))},shouldShowBundleOption(e){if(!e||!Array.isArray(e.values))return!1;return e.values.filter(((e,t,i)=>i.indexOf(e)===t)).length>1},getBundleChildColorLabel(e){var t;if(!e)return"";const i=this.bundleChildSelections[e.key]||{},o=(e=[])=>e.find((e=>(null==e?void 0:e.name)&&e.name.toLowerCase().includes("color"))),s=o(e.visibleOptions||[])||o(e.options||[]);if(s){const e=i[s.name]||(null==(t=s.values)?void 0:t[0])||"";if(e)return e}return e.swatchColor||""},getBundleChildTitleMain(e){if(!e)return"";const t=this.getBundleChildColorLabel(e);return t?`${e.title}: ${t}`:e.title},getBundleChildDisplayLabel(e){const t=this.bundleChildSelections[e.key]||{},i=(e.visibleOptions&&e.visibleOptions.length?e.visibleOptions:e.options||[]).map((e=>t[e.name]||e.values[0]||"")).filter(Boolean);return!i.length&&e.options&&e.options.length&&i.push(e.options[0].values[0]||""),i.length?`${e.title}: ${i.join(" / ")}`:e.title},getBundleChildLink(e){if(!(null==e?void 0:e.handle))return"#";const t=this.bundleChildSelections[e.key]||{},i=new URLSearchParams;(e.options||[]).forEach(((e,o)=>{const s=t[e.name]||e.values[0]||"";s&&i.set(`op${o+1}`,s)}));const o=i.toString();return`/products/${e.handle}${o?`?${o}`:""}`},applyPendingProductColor(){if(!this.pendingProductColor||!this.colors||0===this.colors.length)return;const e=this.colors.find((e=>e.name===this.pendingProductColor));e&&(this.setColorSelection(e.name,e.images,e.media,e.tags,e.pid,e.handle,e.description),this.pendingProductColor=null)},syncPdpProductFaq(e){if(!e)return;const t=document.querySelector("[data-pdp-product-faq]");if(!t)return;const i=t.querySelector("[data-pdp-faq-accordion-mount]");if(!i)return;const o="string"==typeof e.faqsAccordionHtml?e.faqsAccordionHtml:"";if(!o.trim())return t.setAttribute("hidden",""),void(i.innerHTML="");t.removeAttribute("hidden"),i.innerHTML!==o&&(i.innerHTML=o,document.dispatchEvent(new CustomEvent("theme:accordion:bind",{bubbles:!0,detail:{root:i}})))},setColorSelection(e,t,i,o,s,r,a,n=!1){const l=null!=s&&""!==s?String(s):"";!this.sourceProductID&&l&&(this.sourceProductID=l),n&&this.sourceProductID&&l&&l!==String(this.sourceProductID)&&l!==String(this.currentDisplayedProductID)&&ce({productID:l,sourceProductID:this.sourceProductID}),l&&(this.currentDisplayedProductID=l),this.selectedColor=e,this.isColorSelected=!0;const d=this.getDisplayHandle(r);this.isBundleProduct&&!this.suspendBundleChildSync&&this.syncBundleChildrenToColor(e);const c=this.pdpSection.querySelectorAll(`.color-variant-options [data-color='${CSS.escape(e)}']`);[...this.pdpSection.querySelectorAll(".color-variant-options [data-color]")].forEac
1h((e=>{e.classList.remove("selected")})),c.forEach((e=>{e.classList.add("selected")})),fp.emit("pdp-color-updated",{images:t,pid:s,media:i});const u=s?String(s).replace(/\D+/g,""):"",h=this.getFavoriteHandle(s,r);if(u&&h&&Qo(u,h,this.product_title,!this.mini_pdp,t),o&&fp.emit("pdp-tags-updated",{tags:o,pid:s}),this.emitBundleHandleUpdate(d),this.emitBundleChildHandleUpdate(),this.mini_pdp){const e=this.pdpSection.querySelector(".product-template-link");e&&(e.href=`/products/${r}`)}const p=this.colors.find((t=>t.name===e));this.syncPdpProductFaq(p),fp.emit("variant-color-selected",{color:e,images:t,media:i,pid:s,handle:d,description:a,faqsAccordionHtml:null==p?void 0:p.faqsAccordionHtml}),fp.emit("start-full-pdp",{images:t,media:i,pid:s,tags:o,handle:r});const m=()=>{this.clickSelectedVariants(),this.setBundleChildOptionWidths(),this.setAddToBagButton(),this.isBundleProduct&&this.emitBundleChildHandleUpdate()};"requestIdleCallback"in window?requestIdleCallback((()=>{m()}),{timeout:100}):setTimeout((()=>{m()}),50)},sortColorGroupOrder(e){if(!Array.isArray(e))return[];const t=this.normalizeOrderTokens(this.swatchColorGroupOrder);if(!this.isBundleProduct)return e.sort(((e,i)=>{const o=this.compareByOrder(t,null==e?void 0:e.colorGroupId,null==i?void 0:i.colorGroupId);return 0!==o?o:((null==e?void 0:e.name)||"").localeCompare((null==i?void 0:i.name)||"")}));const i=this.bundleOptionOrder.length?this.bundleOptionOrder:this.normalizeOrderTokens("undefined"!=typeof window?window.pdp_bundle_order:"");return e.sort(((e,o)=>{const s=this.compareByOrder(i,null==e?void 0:e.name,null==o?void 0:o.name);if(0!==s)return s;const r=this.compareByOrder(t,null==e?void 0:e.colorGroupId,null==o?void 0:o.colorGroupId);return 0!==r?r:((null==e?void 0:e.name)||"").localeCompare((null==o?void 0:o.name)||"")}))},refreshBundleOptionOrder(){this.bundleOptionOrder=this.normalizeOrderTokens("undefined"!=typeof window?window.pdp_bundle_order:"")},normalizeOrderTokens(e){if(!e)return[];return(Array.isArray(e)?e:String(e).split(",")).map((e=>(e||"").toString().trim().toLowerCase())).filter(Boolean)},compareByOrder(e,t,i){const o=this.getOrderIndex(e,t),s=this.getOrderIndex(e,i);return o===s?0:o-s},getOrderIndex(e,t){if(!Array.isArray(e)||!e.length||null==t)return Number.MAX_SAFE_INTEGER;const i=t.toString().trim().toLowerCase();if(!i.length)return Number.MAX_SAFE_INTEGER;const o=e.findIndex((e=>null!=e&&e.toString().trim().toLowerCase()===i));return-1===o?Number.MAX_SAFE_INTEGER:o},getFirstBundleChildHandle(){var e;return Array.isArray(this.bundleChildren)&&this.bundleChildren.length&&(null==(e=this.bundleChildren[0])?void 0:e.handle)||""},getFavoriteHandle(e,t){var i;const o=e?String(e).replace(/\D+/g,""):"";if(this.isBundleProduct&&o){const e=this.colors.find((e=>e.name===this.selectedColor))||this.colors.find((e=>String(e.pid||"").replace(/\D+/g,"")===o)),t=null==(i=null==e?void 0:e.bundleComponents)?void 0:i.find((e=>String(e.productId||"").replace(/\D+/g,"")===o));if(null==t?void 0:t.productHandle)return t.productHandle}return t||this.product_handle||""},getDisplayHandle(e){if(this.isBundleProduct){const e=this.getFirstBundleChildHandle();if(e)return e}return e||this.product_handle||""},emitBundleHandleUpdate(e){const t=this.getDisplayHandle(e);t&&t!==this.lastEmittedHandle&&(this.lastEmittedHandle=t,fp.emit("pdp-handle-updated",{handle:t}))},emitBundleChildHandleUpdate(){var e,t;if(!this.isBundleProduct||!(null==(e=this.bundleChildren)?void 0:e.length))return;const i=null==(t=this.bundleChildren[0])?void 0:t.handle;i&&fp.emit("bundle-child-handle-updated",{handle:i})},sortBundleOptionValues(e,t){if(!Array.isArray(t)||!t.length)return[];const i=this.getOptionOrderTokens(e);return i.length?t.slice().sort(((e,t)=>{const o=this.getOrderIndex(i,e),s=this.getOrderIndex(i,t);return o===s?e.localeCompare(t):o-s})):t.slice().sort(((e,t)=>e.localeCompare(t)))},getOptionOrderTokens(e){return e?this.isWidthOptionName(e)?this.optionThreeOrderTokens:this.isSizeOptionName(e)?this.optionTwoOrderTokens:[]:[]},setBlingLinks(){this.customBling&&this.customBlingElements&&this.customBlingElements.forEac
1h((e=>{var t;(null==(t=this.product_handle)?void 0:t.includes(e.toLowerCase()))&&(this.customBlingBase=this.product_handle.replace("juicy-couture-"+e.toLowerCase(),""),this.currentBling=e)}))},isThisBling(e){return e===this.currentBling?"selected "+this.customBling:this.customBling},getColorSwatchImages(e){const t=window.cdn+ie(e.name)+".png";return"background-image:url("+this.buildSizedImageUrl(t,120)+")"},getImageSwatchImages(e){var t,i,o,s;let r=null==(i=null==(t=e.images.find((e=>{var t;const i=null==(t=null==e?void 0:e.node)?void 0:t.url;return null==i?void 0:i.includes(this.swatch_suffix)})))?void 0:t.node)?void 0:i.url;return!r&&(null==(s=null==(o=e.images[0])?void 0:o.node)?void 0:s.url)&&(r=e.images[0].node.url),r},buildSizedImageUrl:(e,t)=>he(e,t),getImageSwatchSrcSet(e){return me(this.getImageSwatchImages(e),60)},setDefaultSelections(){var e,t;if(!Array.isArray(this.colors)||!this.colors.length)return;if(this.isOutfitPicker&&this.pendingProductColor)return void this.applyPendingProductColor();const i=[];this.passedOptOne&&i.push(this.passedOptOne),(null==(e=this.previouslySelectedProduct)?void 0:e.color)&&i.push(this.previouslySelectedProduct.color);let o=i.find((e=>this.colors.some((t=>t.name===e))));if(!o){const e=this.colors.find((e=>e.handle===this.product_handle));e&&(o=e.name)}if(!o){const e=this.colors.find((e=>this.variants&&this.variants.some((t=>t.availableForSale&&t.color===e.name))));e&&(o=e.name)}o||(o=this.colors[0].name);const s=this.colors.find((e=>e.name===o));s&&this.setColorSelection(s.name,s.images,s.media,s.tags,s.pid,s.handle,s.description),this.isBundleProduct&&(null==(t=this.bundleChildren)?void 0:t.length)&&this.emitBundleChildrenMetaUpdate()},updateColorAvailabilityForPartialSelection(){this.disableAllOptions();let e="",t="",i="";this.isColorSelected&&(e=re(this.selectedColor.toString())?this.selectedColor.toString():this.selectedColor.trim()),this.selectedSize&&(t=re(this.selectedSize.toString())?this.selectedSize.toString():this.selectedSize.trim()),this.selectedWidth&&(i=re(this.selectedWidth.toString())?this.selectedWidth.toString():this.selectedWidth.trim()),this.variants.forEac
1h((o=>{o.availableForSale&&(t&&o.size!==t||i&&o.width!==i||this.setEnabled(o.color,t||o.size,i||o.width,o.color===e))}))},setAddToBagButton(){if(!this.variants||!this.variants.length)return;if(this.isOutfitPicker&&!this.isColorSelected)return;const e=this.variants.some((e=>e.size)),t=this.variants.some((e=>e.width));if(e&&!this.selectedSize||t&&!this.selectedWidth)return void this.updateColorAvailabilityForPartialSelection();this.disableAllOptions();let i,o,s,r,a,n,l,d,c="",u="",h="",p=!0,m=!1,g="",f="";this.isColorSelected&&(c=re(this.selectedColor.toString())?this.selectedColor.toString():this.selectedColor.trim()),this.selectedSize&&(h=re(this.selectedSize.toString())?this.selectedSize.toString():this.selectedSize.trim()),this.selectedWidth&&(u=re(this.selectedWidth.toString())?this.selectedWidth.toString():this.selectedWidth.trim());let w=!1;this.variants.forEach((e=>{e.color===c&&e.width===u&&e.size===h?(w=!0,e.availableForSale?(e.variantId,g=e.masterId,i=e.quantityAvailable,r=e.variantId,o=e.price,s=e.compareAtPrice,e.sku,f=e.image,e.productType,a=e.upsellProductId,n=e.upsellProductId2,l=e.upsellImage,d=e.variantMetafields,this.setEnabled(c,h,u,!0)):(r=e.variantId,g=e.masterId,o=e.price,s=e.compareAtPrice,f=e.image,e.productType,a=e.upsellProductId,n=e.upsellProductId2,l=e.upsellImage,d=e.variantMetafields,this.setDisabled(c),p=!1)):(e.color===c&&e.width===u&&e.availableForSale&&this.setEnabled(c,e.size,u,!1),e.color===c&&e.size===h&&e.availableForSale&&this.setEnabled(c,h,e.width,!1),e.size===h&&e.width===u&&e.availableForSale&&this.setEnabled(e.color,h,u,!1))})),w||(p=!1,m=!0,this.setDisabled(c)),i>0&&(p=!0),this.setElevarTrackingPDP(r,c,h,u);const y={variantId:r,parentId:g,handle:this.product_handle,pageHandle:"undefined"!=typeof window&&window.pdp_product_handle||"",variantPrice:o,comparePrice:s,instock:p,notavail:m,quantityAvailable:i,upsellProductId:a,upsellProductId2:n,enableUpsellOption:this.hasUpsellProduct,isOutfitPicker:this.isOutfitPicker,isBundleProduct:this.isBundleProduct,selectedOptions:[this.selectedColor||null,this.selectedSize||null,this.selectedWidth||null],variantMetafields:d||null};"undefined"!=typeof window&&(window.__pdpAddButtonPayload=y),fp.emit("updateAddButton",y),this.setProductListOptionLinks(),setTimeout((()=>{if(l)fp.emit("replace-variant-image",l);else{const e=this.previousVariant||{},t=e.color!==c,i=e.width!==u;(t||i)&&fp.emit("variant-updated",{image:f,variantId:r,color:c,size:h,width:u}),this.previousVariant={color:c,size:h,width:u}}}),200)},setElevarTrackingPDP(e,t,i,o){if("string"==typeof e){const s={vid:e.toString(),color:t.toString(),size:i.toString(),width:o.toString()};window.setPDPProductTrackingDetails&&window.setPDPProductTrackingDetails(s)}},colorOptionAriaLabel(e,t){const i=this.selectedSize?` in size ${this.selectedSize}`:"",o=t?"available":"currently unavailable";return`${this.product_title}${i} color option: ${e} is ${o}`},disableAllOptions(){[...this.pdpSection.querySelectorAll(".color-variant-options [data-color]")].forEach((e=>{e.classList.add("unavailable"),e.setAttribute("aria-label",this.colorOptionAriaLabel(e.getAttribute("data-color"),!1))}))},setEnabled(e,t,i,o){[...this.pdpSection.querySelectorAll(`[data-color='${e}']`)].forEach((e=>{!o&&e.classList.contains("selected")||(e.classList.remove("unavailable"),e.setAttribute("aria-label",this.colorOptionAriaLabel(e.getAttribute("data-color"),!0)))}))},setDisabled(e){[...this.pdpSection.querySelectorAll(`[data-color='${CSS.escape(e)}']`)].forEach((t=>{t.classList.add("unavailable"),t.setAttribute("aria-label",this.colorOptionAriaLabel(e,!1))}))},setBundleChildOptionWidths(){!this.excludeSwatchWidth&&this.isBundleProduct&&this.pdpSection.querySelectorAll(".bundle-child__option-block .variant-spacing").forEach((e=>{const t=[...e.querySelectorAll(".p-options")];if(t.length){var i=0;t.forEach((e=>{e.style.width="";var t=e.offsetWidth;t>i&&(i=t)})),t.forEach((e=>{e.style.width=i+"px"}))}}))},setProductListOptionLinks(){const e=this.pdpSection.querySelectorAll(".product_list_option_item"),t=this.mini_pdp?"&view=mini":"",i="op1="+(this.selectedColor||"")+"&op2="+(this.selectedSize||"")+"&op3="+(this.selectedWidth||"")+t;e.forEach((e=>{const t=e.getAttribute("href").split("?")[0];e.setAttribute("href",t+"?"+i)}))},clickSelectedVariants(){if(this.selectedSize){const e=this.pdpSection.querySelector(`[data-size='s${CSS.escape(this.selectedSize)}']`);e&&e.click()}if(this.selectedWidth){const e=this.pdpSection.querySelector(`[data-width='w${CSS.escape(this.selectedWidth)}']`);e&&e.click()}},setBlingHref(e){window.location=e+"?op1="+this.selectedColor+"&op2="+this.selectedSize+"&op3="+this.selectedWidth}}},[["render",function(e,t,i,o,g,f){const w=c("PDPPriceGroupBlock");return r(),s("div",{class:p(["color-variant-options",{"is-bundle-mode":g.isBundleProduct}])},[g.customBling?(r(),s("div",ts,[(r(!0),s(d,null,h(g.customBlingElements,((e,t)=>(r(),s("div",{class:p(f.isThisBling(e)),key:"bling-"+t,onClick:t=>f.setBlingHref("/products/juicy-couture-"+e.toLowerCase()+g.customBlingBase)},[a("a",{innerHTML:e},null,8,os)],10,is)))),128))])):l("",!0),g.isBundleProduct?(r(),s(d,{key:1},[g.bundledProducts.length>
11?(r(),s("div",ss,[a("p",rs,m(f.bundleSelectorLabel),1),a("div",as,[(r(!0),s(d,null,h(g.bundledProducts,((e,t)=>(r(),s("button",{key:e.handle||t,type:"button",class:p(["bundle-selector__item",{"is-active":e.handle===g.activeBundleHandle}]),"aria-pressed":e.handle===g.activeBundleHandle,onClick:t=>f.selectBundle(e.handle)},[a("span",{class:"bundle-selector__image",style:n(f.getBundleSwatchStyle(e))},[a("span",ls,m(f.bundleSelectorLabel)+" "+m(t+1),1)],4)],10,ns)))),128))])])):l("",!0),a("div",ds,[(r(!0),s(d,null,h(g.bundleChildren,(e=>(r(),s("div",{class:"bundle-child__header",key:e.key},[a("div",cs,[a("span",{class:p(["bundle-child__swatch",{"bundle-child__swatch--empty":!f.hasBundleChildSwatch(e)}]),style:n(f.getBundleChildSwatchStyle(e))},[a("span",us,m(f.getBundleChildDisplayLabel(e)),1)],6),a("h4",hs,[a("a",{href:f.getBundleChildLink(e)},[a("span",ms,m(f.getBundleChildTitleMain(e)),1),a("span",gs,m(f.getBundleChildSelectedLabel(e)),1)],8,ps)]),f.shouldShowBundleSizeGuide(e)?(r(),s("button",{key:0,type:"button",id:f.bundleSizeGuideAnchorKey===e.key?"size-guide-toggle":null,class:"size-guide-toggle gt-p__small bundle-child__size-guide",onClick:t[0]||(t[0]=e=>f.showSizeGuide())},"Size Guide",8,fs)):l("",!0)]),(r(!0),s(d,null,h(e.visibleOptions,(t=>(r(),s("div",{key:e.key+t.name,class:"bundle-child__option-block gt-p__small"},[a("p",ws,[a("span",ys,m(t.name),1)]),a("div",vs,[(r(!0),s(d,null,h(t.values,(i=>(r(),s("button",{key:e.key+t.name+i,type:"button",class:p(["option p-options option2",f.getBundleOptionClasses(e.key,t.name,i)]),onClick:u((o=>f.selectBundleChildOption(e.key,t.name,i,o)),["stop","prevent"])},m(i),11,bs)))),128))])])))),128))])))),128))])],64)):(r(),s(d,{key:2},[g.colors.length&&"Default Title"!==f.cleanColorName(g.selectedColor)?(r(),s("p",{key:0,class:p("option-title color-title"+(g.mini_pdp?" mini-pdp-option-title":""))},[a("span",{innerHTML:g.optionOneName,class:"option-name gt-p__small"},null,8,Ss),t[1]||(t[1]=a("span",{class:"gt-p__small"},": ",-1)),a("span",{innerHTML:f.cleanColorName(g.selectedColor),class:"gt-p__small"},null,8,_s)],2)):l("",!0),"false"!==this.enablePriceGrouping||g.isOutfitPicker?l("",!0):(r(),s(d,{key:1},[f.swatchRenderingConfig.shouldShowSwatches?(r(),s("div",Cs,[(r(!0),s(d,null,h(g.colors,((e,t)=>(r(),s("div",{key:"color"+t},[a("div",{class:p(e.name)},[f.swatchRenderingConfig.showColorSwatches?(r(),s("a",{key:0,class:p(f.isExcludedColorOption(e.productType)),"data-color":e.name,"data-coming-soon":f.isComingSoonColor(e),style:n(f.getColorSwatchImages(e)),onClick:t=>f.setColorSelection(e.name,e.images,e.media,e.tags,e.pid,e.handle,e.description,!0),onTouchstart:t=>f.setColorSelection(e.name,e.images,e.media,e.tags,e.pid,e.handle,e.description,!0),innerHTML:e.name,tabindex:"0"},null,46,Ps)):f.swatchRenderingConfig.showImageSwatches?(r(),s("a",{key:1,class:p(f.getImageSwatchClass()),"data-coming-soon":f.isComingSoonColor(e),"data-color":e.name,onClick:t=>f.setColorSelection(e.name,e.images,e.media,e.tags,e.pid,e.handle,e.description,!0),onTouchstart:t=>f.setColorSelection(e.name,e.images,e.media,e.tags,e.pid,e.handle,e.description,!0),tabindex:"0"},[a("img",{src:f.buildSizedImageUrl(f.getImageSwatchImages(e),60),srcset:f.getImageSwatchSrcSet(e),sizes:"50px",alt:`${g.product_title} color option: ${e.name}`,style:{width:"100%"},loading:g.enableLazyLoading?"lazy":"eager"},null,8,Ts),a("span",{innerHTML:e.name,class:"visually-hidden"},null,8,Is)],42,ks)):l("",!0)],2)])))),128))])):l("",!0)],64)),"true"!==this.enablePriceGrouping||g.isOutfitPicker?l("",!0):(r(!0),s(d,{key:2},h(g.priceGroups,((e,t)=>(r(),s(d,{key:"price-group"+t},[g.priceGroups.length>1&&f.hasVisibleSwatchesForPriceGroup(e)?(r(),k(w,{key:0,currentPriceNumber:e,comparePriceNumber:g.priceGroupsCompareList[e],showPercentage:g.showPercentageOff,showOriginalOnSalePrice:g.showOriginalOnSalePrice},null,8,["currentPriceNumber","comparePriceNumber","showPercentage","showOriginalOnSalePrice"])):l("",!0),f.shouldShowSwatches()&&f.hasVisibleSwatchesForPriceGroup(e)?(r(),s("div",As,[(r(!0),s(d,null,h(g.colors,((t,i)=>(r(),s(d,{key:"color-"+e+"-"+i},[g.colorPriceGroupMap&&g.colorPriceGroupMap.get(t.name)===e?(r(),s(d,{key:0},[!g.swatch_suffix||f.isCurrentExcludedColorOption()?(r(),s("a",{key:0,class:p(f.isExcludedColorOption(t.productType)),"data-color":t.name,"data-coming-soon":f.isComingSoonColor(t),style:n(f.getColorSwatchImages(t)),onClick:e=>f.setColorSelection(t.name,t.images,t.media,t.tags,t.pid,t.handle,t.description,!0),innerHTML:t.name,tabindex:"0"},null,14,Ls)):g.swatch_suffix&&!f.isCurrentExcludedColorOption()?(r(),s("a",{key:1,class:p(f.getImageSwatchClass()),"data-color":t.name,"data-coming-soon":f.isComingSoonColor(t),onClick:e=>f.setColorSelection(t.name,t.images,t.media,t.tags,t.pid,t.handle,t.description,!0),tabindex:"0"},[a("img",{src:f.buildSizedImageUrl(f.getImageSwatchImages(t),60),srcset:f.getImageSwatchSrcSet(t),sizes:"50px",alt:`${g.product_title} color option: ${t.name}`,style:{width:"100%"},loading:g.enableLazyLoading?"lazy":"eager"},null,8,Ms),a("span",{innerHTML:t.colorGroupId.replace("color-",""),class:"visually-hidden"},null,8,xs),a("span",{innerHTML:t.name,class:"visually-hidden"},null,8,Os)],10,Es)):l("",!0)],64)):l("",!0)],64)))),128))])):l("",!0)],64)))),128))],64))],2)}],["__scopeId","data-v-ec3eb108"],["__file","ColorVariantOption.vue"]]),Fs=(e,t=!1)=>
1{if(t)return;const i=[...e],o=i.map((e=>e.style.width));i.forEach((e=>{e.style.width="auto"}));const s=i.reduce(((e,t)=>Math.max(e,t.getBoundingClientRect().width)),0);if(!Number.isFinite(s)||s<=0)return void i.forEach(((e,t)=>{e.style.width=o[t]}));const r=`${Math.ceil(s)}px`;i.forEach((e=>{e.style.width=r}))},Ds={key:0,class:"size-variant-option"},$s={class:"size-variant-options"},zs={key:0,class:"size-wrapper"},Hs=["innerHTML"],Rs=["innerHTML"],Ns=["aria-label"],Vs={class:"variant-spacing option-size-2 variant-spacing-size"},qs=["onClick"],Us=["innerHTML","data-size"];const Gs=fe({name:"SizeVariantOption",computed:{cleanSizeName:()=>e=>se(e)},data:()=>({colors:[],product_title:"",sizes:[],selectedColor:"",selectedSize:"",selectedWidth:"",isSizeSelected:!1,optionTwoName:"",isLoading:!0,sizeGuideMetafield:"",helpGuideMetafield:"",isOutfitPicker:!1,mini_pdp:!1,isMobileViewport:!1,excludeSwatchWidth:!1,optiontwoorder:[],optiontwoorderoverride:[],optiontwoorderoverridetag:"",passedOptTwo:"",pdpSection:null,previouslySelectedSize:"",product_handle:"",userPreferredProductSize:"",show_image_2:"",comingSoonTag:window.siteGlobals.set_reminder_tag,variants:[],slideVariantImageTags:"",slideVariantImage:!1,lastEmittedImage:null,imageNS:null,imageKey:null,imageNS2:null,imageKey2:null,vimageNS:null,vimageKey:null,outfitPickerIndex:null,ShowSizeGuideButton:!1,ShowHelpGuideButton:!1,helpGuidePageTitle:"",isBundleProduct:!1,bundledProducts:[],activeBundleHandle:null,selectedBundledProductIndex:0,originalProductData:null,isHiddenForBundle:!1}),mounted(){var e,t;if(this.handleViewportSize=ge(this),this.sizeGuideMetafield=window.sizeGuideMetafield,this.helpGuideMetafield=window.helpGuideMetafield,this.product_title=this.$el.parentElement.getAttribute("data-product-name"),this.product_handle=this.$el.parentElement.getAttribute("data-product-handle"),this.imageLookUpMax=parseInt(this.$el.parentElement.getAttribute("data-imageLookUpMax")),this.mini_pdp="true"===this.$el.parentElement.getAttribute("data-mini-pdp"),this.isOutfitPicker="true"===this.$el.parentElement.getAttribute("data-is-outfit-picker"),this.excludeSwatchWidth="true"===window.excludeSwatchWidth,this.optiontwoorder=(null==(e=this.$el.parentElement.getAttribute("data-optiontwoorder"))?void 0:e.split(","))||[],this.optiontwoorderoverride=(null==(t=this.$el.parentElement.getAttribute("data-optiontwoorderoverride"))?void 0:t.split(","))||[],this.optiontwoorderoverridetag=this.$el.parentElement.getAttribute("data-optiontwoorderoverridetag"),this.show_image_2="true"===this.$el.parentElement.getAttribute("data-show-image-2"),this.pdpSection=this.$el.parentElement.closest(".product-single")||this.$el.parentElement.closest(".mini-product-single"),this.slideVariantImageTags=this.$el.parentElement.getAttribute("data-slide-variant-image-tags")||"",this.slideVariantImage="true"===this.$el.parentElement.getAttribute("data-slideVariantImage"),!this.slideVariantImage&&this.pdpSection){const e=this.pdpSection.querySelector("[data-slide-variant-image]");e&&"true"===e.getAttribute("data-slide-variant-image")&&(this.slideVariantImage=!0)}this.isOutfitPicker&&(this.pdpSection=this.$el.parentElement);const i=window.location.search,o=new URLSearchParams(i);this.passedOptTwo=o.get("op2"),this.userPreferredProductSize=v.get("pdp-size"),fp.on("product-data-updated",this.handleProductData),fp.on("plytix-product-data-ready",this.handlePlytixData),fp.on("variant-color-selected",(({color:e})=>{this.isOutfitPicker||(this.selectedColor=e,this.updateAvailability(),this.shouldHideSizes(),this.$nextTick((()=>this.setOptionTwoWidth())))})),fp.on("pdp-cookie-updated",(({type:e,value:t})=>{"size"===e&&(this.userPreferredProductSize=t)})),fp.on("variant-width-selected",(({width:e})=>{this.isOutfitPicker||(this.selectedWidth=e,this.updateAvailability(),this.shouldHideSizes(),this.$nextTick((()=>this.setOptionTwoWidth())))})),fp.on("bundled-product-selected",this.handleBundledProductSelected);this.checkPlytixData()||this.initializeData(),this.closeSizeGuideModal(),this.updateMobileViewport(),this.isOutfitPicker&&(this.$nextTick((()=>
1{this.resolveOutfitPickerIndex(),this.getSizeGuideData()})),fp.on("outfit-picker-product-changed",this.handleOutfitPickerProductChanged),fp.on("outfit-picker-width-changed",(({blockIndex:e,width:t})=>{this.outfitPickerIndex||this.resolveOutfitPickerIndex(),this.outfitPickerIndex===e&&(this.selectedWidth=t,this.updateAvailability(),this.shouldHideSizes(),this.$nextTick((()=>this.setOptionTwoWidth())))}))),document.addEventListener("theme:resize:width",this.handleSwatchResize),this.getSizeGuideData(),this.getHelpGuideData()},beforeUnmount(){this.handleViewportSize&&this.handleViewportSize(),fp.off("product-data-updated",this.handleProductData),fp.off("plytix-product-data-ready",this.handlePlytixData),fp.off("variant-color-selected"),fp.off("pdp-cookie-updated"),fp.off("variant-width-selected"),fp.off("bundled-product-selected"),this.isOutfitPicker&&(fp.off("outfit-picker-product-changed",this.handleOutfitPickerProductChanged),fp.off("outfit-picker-width-changed")),document.removeEventListener("theme:resize:width",this.handleSwatchResize)},methods:{sizeOptionAriaLabel(e,t){const i=(null==e?void 0:e.startsWith("s"))?e.slice(1):(e||"").trim(),o=this.selectedColor?` in color ${this.selectedColor}`:"",s=t?"available":"currently unavailable";return`${this.product_title}${o} size option: ${i} is ${s}`},shouldShowSizeGuideButton(e){this.sizeGuideMetafield&&e?this.ShowSizeGuideButton=!0:this.ShowSizeGuideButton=!1},shouldShowHelpGuideButton(e){this.helpGuideMetafield&&e?this.ShowHelpGuideButton=!0:this.ShowHelpGuideButton=!1},normalizeSmartTags:e=>(e||"").split(",").map((e=>e.trim().toLowerCase())).filter(Boolean),shouldEnableSmartTagsFromPlytixTags(e){const t=this.normalizeSmartTags(this.slideVariantImageTags);if(!t.length||!Array.isArray(e))return null;const i=e.map((e=>(e||"").toString().trim().toLowerCase()));return t.some((e=>i.includes(e)))},applySmartTagsFromPlytix(e){var t,i,o,s,r;const a=null==(i=null==(t=null==e?void 0:e.colors)?void 0:t[0])?void 0:i.tags,n=this.shouldEnableSmartTagsFromPlytixTags(null==(s=null==(o=null==e?void 0:e.colors)?void 0:o[0])?void 0:s.tags),l=ft.isLoggingEnabled("true"===(null==(r=document.getElementById("product-families-json-data"))?void 0:r.dataset.speedTracking));null!==n?(this.slideVariantImage=n,l&&console.log("[SmartTags][Size] Plytix tag match",{productTitle:this.product_title,enabled:n,smartTags:this.slideVariantImageTags,plytixTags:a})):l&&console.log("[SmartTags][Size] Fallback to Liquid boolean",{productTitle:this.product_title,slideVariantImage:this.slideVariantImage,smartTags:this.slideVariantImageTags,plytixTags:a})},async initializeData(){try{await ft.fetchProductData(this.product_title,window.Shopify.country,this.imageLookUpMax,parseInt(window.siteGlobals.pdp_productsByTitleLookup),this.imageNS,this.imageKey,this.imageNS2,this.imageKey2,this.vimageNS,this.vimageKey,null,null,this.product_handle)}catch(e){console.error("PDP size data fetch failed:",e)}finally{this.handleContentLoaded()}},handleProductData(e){e&&Array.isArray(e.sizes)&&(this.isOutfitPicker&&e.productHandle&&e.productHandle!==this.product_handle||e.productTitle&&e.productTitle!==this.product_title||(this.originalProductData=e,this.isBundleProduct=Boolean(e.isBundleProduct),this.bundledProducts=e.bundledProducts||[],this.activeBundleHandle=e.activeBundleHandle||(this.isBundleProduct&&this.bundledProducts.length?this.bundledProducts[0].handle:this.product_handle),this.isBundleProduct?this.hideSizeModule():this.applyProductData(e)))},hideSizeModule(){this.isHiddenForBundle||(this.isHiddenForBundle=!0,this.$el&&this.$el.style&&(this.$el.style.display="none"))},handleBundledProductSelected(){this.isBundleProduct&&this.hideSizeModule()},applyProductData(e){var t,i;if(!e)return;this.applySmartTagsFromPlytix(e),this.colors=e.colors||[],this.sizes=this.sortOptionTwoData(e.sizes||[],null==(i=null==(t=e.colors)?void 0:t[0])?void 0:i.tags),this.optionTwoName=e.optionTwoName,this.variants=e.variants||[],this.isLoading=!0,this.selectedSize="",this.isSizeSelected=!1;const o=this.isOutfitPicker?0:300;setTimeout((()=>{this.setDefaultSelections(),this.isLoading=!1,this.$nextTick((()=>{this.setOptionTwoWidth(),this.updateAvailability(),this.selectedSize&&Array.isArray(this.sizes)&&this.sizes.includes(this.selectedSize)&&this.setSizeSelection(this.selectedSize),this.shouldHideSizes()}))}),o)},setOptionTwoWidth(){var e;if(!(null==(e=this.$el)?void 0:e.querySelectorAll))return;
1const t=this.$el.querySelectorAll(".variant-spacing.option-size-2 .p-options");Fs(t,this.excludeSwatchWidth)},handleSwatchResize(){this.updateMobileViewport(),this.$nextTick((()=>this.setOptionTwoWidth()))},handleOutfitPickerProductChanged({blockIndex:e,productTitle:t,productHandle:i}){this.isOutfitPicker&&(this.outfitPickerIndex||this.resolveOutfitPickerIndex(),this.outfitPickerIndex===e&&t&&(this.product_title=t,this.product_handle=i||"",this.selectedSize=this.previouslySelectedSize||"",this.isSizeSelected=!!this.selectedSize,this.isLoading||(this.isLoading=!0),this.initializeData(),this.getSizeGuideData(),this.getHelpGuideData()))},setSizeSelection(e){e=re(e.toString())?e.toString():e.trim(),this.selectedSize=e,this.isSizeSelected=!0,[...this.pdpSection.querySelectorAll("[data-size]")].forEach((e=>{e.classList.remove("selected")}));this.pdpSection.querySelectorAll(`[data-size='s${CSS.escape(e)}']`).forEach((e=>{e.classList.add("selected")}));this.variants.some((t=>t.availableForSale&&t.size===e&&t.color===this.selectedColor))&&(v.set("pdp-size",e),fp.emit("pdp-cookie-updated",{type:"size",value:e})),this.previouslySelectedSize=e,fp.emit("variant-size-selected",{size:e}),this.isOutfitPicker&&(this.outfitPickerIndex||this.resolveOutfitPickerIndex(),fp.emit("outfit-picker-size-changed",{blockIndex:this.outfitPickerIndex,size:e})),this.updateAvailability(),this.shouldHideSizes(),this.handleSlideVariantImage(e)},updateAvailability(){var e,t;let i=this.selectedColor;try{const t=null==(e=this.pdpSection)?void 0:e.querySelector(".color-variant-options [data-color].selected");t&&(i=t.getAttribute("data-color")||"")}catch(n){console.warn("Failed to resolve selected color for size options",n)}if(!i&&Array.isArray(this.colors)&&this.colors.length){const e=this.product_handle?this.colors.find((e=>e.handle===this.product_handle)):null;i=e&&e.name||this.colors[0].name||""}let o=this.selectedWidth;try{const e=null==(t=this.pdpSection)?void 0:t.querySelector(".width-variant-options [data-width].selected");if(e){const t=e.getAttribute("data-width")||"";o=t.startsWith("w")?t.slice(1):t}}catch(n){console.warn("Failed to resolve selected width for size options",n)}if(!i)return;const s=this.variants||[];if(o){s.some((e=>e&&e.color===i&&(!e.width||e.width===o)))||(o="")}const r=s.filter((e=>e&&e.availableForSale&&e.color===i&&(!o||!e.width||e.width===o)&&e.size));let a=new Set(r.map((e=>e.size)));0!==a.size||o||(a=new Set(s.filter((e=>e&&e.availableForSale&&e.color===i&&e.size)).map((e=>e.size)))),this.disableAllOptions(),a.forEach((e=>this.setEnabled(e)))},disableAllOptions(){[...this.pdpSection.querySelectorAll("[data-size]")].forEach((e=>{e.classList.add("unavailable"),e.setAttribute("aria-label",this.sizeOptionAriaLabel(e.getAttribute("data-size"),!1))}))},setEnabled(e){[...this.$el.parentElement.querySelectorAll(`[data-size='s${CSS.escape(e)}']`)].forEach((e=>{e.classList.remove("unavailable"),e.setAttribute("aria-label",this.sizeOptionAriaLabel(e.getAttribute("data-size"),!0))}))},sortOptionTwoData(e,t){if(!Array.isArray(e))return[];let i=this.optiontwoorder;return t&&t.includes(this.optiontwoorderoverridetag)&&(i=this.optiontwoorderoverride),i=Array.isArray(i)?i:[],e.length?e.sort(((e,t)=>i.indexOf(e)-i.indexOf(t))):[]},checkPlytixData(){if(window.productFamiliesData&&Array.isArray(window.productFamiliesData)&&window.productFamiliesData.length>0){const e=ft.getPreloadedProductData(this.product_title);if(e&&e.length>0)return ft.processAndEmitData(e,this.product_title),this.handleContentLoaded(),!0}return!1},handlePlytixData(e){if(e&&Array.isArray(e)&&e.length>0){const e=ft.getPreloadedProductData(this.product_title);e&&e.length>0&&(ft.processAndEmitData(e,this.product_title),this.handleContentLoaded())}},handleContentLoaded(){const e=this.$el.parentElement.closest(".pdp-size-variant-options-container");if(!e)return;const t=e.querySelector(".pdp-variant-loader");t&&(t.style.minHeight="0",t.style.opacity="0",t.style.visibility="hidden",t.style.transition="opacity 0.2s ease-out, visibility 0.2s ease-out, height 0.2s ease-out, margin 0.2s ease-out",setTimeout((()=>{t.style.display="none",t.style.height="",t.style.margin="",t.style.overflow="",t.style.pointerEvents=""}),200))},async getMetafields(e){var t,i;try{const o=await it.request(ot,{variables:{handle:this.product_handle,countryIso2:window.Shopify.country,metaIdentifier:e}});if(o&&(null==(i=null==(t=o.data)?void 0:t.product)?void 0:i.metafields))return o.data.product.metafields}catch(o){return console.error("Error fetching size guide metafields:",o),null}},async getOnlineStorePage(e){try{const t=await it.request(rt,{variables:{id:`gid://shopify/Page/${e}`}});if(t&&t.data.page){const e=t.data.page,i=`\n            <section class="section-padding" style="--PT: 50px; --PB: 36px;">\n              <div class="wrapper">\n                <div class="text__standard text-left">\n                  <h1 class="gt-h1">\n                    ${e.title}\n                  </h1>\n                  <div class="rte gt-p">\n                    ${e.body}\n                  </div>\n                </div>\n              </div>\n            </section>\n          `;return{title:e.title,content:i}}}catch(t){return console.error("Error fetching page details:",t),null}},setSizeGuideFloatingContentVisible(e){document.dispatchEvent(new CustomEvent(e?"chat:show":"chat:hide",{bubbles:!0}))},showSizeGuide(){const e=`sizeGuideModal-${this.outfitPickerIndex&&this.isOutfitPicker?this.outfitPickerIndex:1}`;if(window.MicroModal&&"function"==typeof window.MicroModal.show)try{return void window.MicroModal.show(e,{disableScroll:!0,onShow:()=>this.setSizeGuideFloatingContentVisible(!1),onClose:()=>this.setSizeGuideFloatingContentVisible(!0)})}catch(i){console.warn("Failed to open size guide modal",i)}const t=document.getElementById(e)||document.getElementById("sizeGuideModal-1");t&&(t.classList.add("is-open"),document.documentElement.classList.remove("aos-initialized"),document.body.classList.add("unscrollable-body"),this.setSizeGuideFloatingContentVisible(!1))},async getSizeGuideData(){let e=!1;try{const t=this.outfitPickerIndex&&this.isOutfitPicker?String(this.outfitPickerIndex):"1",i=await this.getMetafields([{namespace:this.sizeGuideMetafield.split(".")[0],key:this.sizeGuideMetafield.split(".")[1]}]);if(!i)return;const o=i.find((e=>(null==e?void 0:e.key)===this.sizeGuideMetafield.split(".")[1]));if(!o)return;const s=o.value.split("/").pop(),r=await Io(s);if(!r)return;const a=document.querySelector(`.size-guide-content-${t}`);if(!a)return;a.innerHTML=r.content,e=!0}catch(t){e=!1}this.shouldShowSizeGuideButton(e)},async getHelpGuideData(){if(!this.helpGuideMetafield)return void this.shouldShowHelpGuideButton(!1);let e=!1;try{const t=await this.getMetafields([{namespace:this.helpGuideMetafield.split(".")[0],key:this.helpGuideMetafield.split(".")[1]}]);if(!t)return;const i=t.find((e=>(null==e?void 0:e.key)===this.helpGuideMetafield.split(".")[1]));if(!i)return;const o=i.value.split("/").pop(),s=await this.getOnlineStorePage(o);if(!s)return;const r=document.querySelector("#more-info-modal-content");r&&(r.innerHTML=s.content,document.dispatchEvent(new CustomEvent("theme:accordion:bind",{bubbles:!0,detail:{root:r}})),this.helpGuidePageTitle=s.title,e=!0)}catch(t){e=!1}this.shouldShowHelpGuideButton(e)},setDefaultSelections(){var e,t;let i=this.selectedColor,o=this.selectedWidth;
1if(this.isOutfitPicker){try{const s=null==(e=this.pdpSection)?void 0:e.querySelector(".color-variant-options [data-color].selected"),r=null==(t=this.pdpSection)?void 0:t.querySelector(".width-variant-options [data-width].selected");if(s&&(i=s.getAttribute("data-color")),r){const e=r.getAttribute("data-width");o=e.startsWith("w")?e.slice(1):e}}catch(a){console.error("Error getting selected width and color:",a)}if(!i&&this.colors.length){const e=this.product_handle?this.colors.find((e=>e.handle===this.product_handle)):null;i=e&&e.name||this.colors[0].name}}const s=[];this.isOutfitPicker&&this.previouslySelectedSize&&s.push(this.previouslySelectedSize),this.passedOptTwo&&s.push(this.passedOptTwo),this.userPreferredProductSize&&s.push(this.userPreferredProductSize);let r=s.find((e=>Array.isArray(this.sizes)&&this.sizes.includes(e)));r||(r=this.findFirstAvailableSize(i,o)),!r&&Array.isArray(this.sizes)&&this.sizes.length>0&&(r=this.sizes[0]),r&&this.setSizeSelection(r),this.updateAvailability(),setTimeout((()=>{this.positionHelpGuide()}),1e3)},findFirstAvailableSize(e,t){if(!Array.isArray(this.sizes)||!Array.isArray(this.variants))return"";for(const i of this.sizes){if(this.variants.find((o=>o&&o.size===i&&o.availableForSale&&(!e||o.color===e)&&(!t||!o.width||o.width===t))))return i}return""},getOptionImage(e,t){if("option2"===e&&"true"===this.show_image_2)return"background-image:url("+window.cdn+ie(t)+".png)"},positionHelpGuide(){fp.emit("showHelpGuide")},showHelpGuide(){const e="more-info-modal";if(window.MicroModal&&"function"==typeof window.MicroModal.show)try{return void window.MicroModal.show(e,{disableScroll:!0,onShow:()=>this.setSizeGuideFloatingContentVisible(!1),onClose:()=>this.setSizeGuideFloatingContentVisible(!0)})}catch(i){console.warn("Failed to open help guide modal",i)}const t=document.getElementById(e);if(t&&(t.classList.add("is-open"),document.documentElement.classList.remove("aos-initialized"),document.body.classList.add("unscrollable-body"),this.setSizeGuideFloatingContentVisible(!1),!t.getAttribute("data-help-guide-close-bound"))){t.setAttribute("data-help-guide-close-bound","true");const e=t.querySelector(".modal__close");e&&e.addEventListener("click",(()=>{t.classList.remove("is-open"),document.documentElement.classList.add("aos-initialized"),document.body.classList.remove("unscrollable-body"),this.setSizeGuideFloatingContentVisible(!0)}))}},closeSizeGuideModal(){const e=e=>{const t=document.getElementById(e);if(!t||!t.classList.contains("is-open"))return!1;if(window.MicroModal&&"function"==typeof window.MicroModal.close)try{return window.MicroModal.close(e),!0}catch(i){}return t.classList.remove("is-open"),document.documentElement.classList.add("aos-initialized"),document.body.scrollTop=0,document.body.classList.remove("unscrollable-body"),this.setSizeGuideFloatingContentVisible(!0),!0};e("sizeGuideModal-1"),e("sizeGuideModal-2")},shouldHideSizes(){const e="true"===window.siteGlobals.set_reminder_pdp_hide_sizes;let t=!1;if(this.colors&&this.selectedColor){const e=this.colors.find((e=>e.name===this.selectedColor));e&&e.tags&&e.tags.includes(this.comingSoonTag)&&(t=!0,[...this.pdpSection.querySelectorAll(`[data-color='${CSS.escape(this.selectedColor)}']`)].forEach((e=>{e.classList.remove("unavailable");const t=e.getAttribute("data-color")||this.selectedColor,i=this.selectedSize?` in size ${this.selectedSize}`:"";e.setAttribute("aria-label",`${this.product_title}${i} color option: ${t} is available`)})))}return e&&t},resolveOutfitPickerIndex(){try{const e=this.$el.closest(".product__inner"),t=this.$el.closest(".op-size-options"),i=(e?Array.from(e.querySelectorAll(".op-size-options")):[]).findIndex((e=>e===t));this.outfitPickerIndex=i>=0?i+1:null}catch(e){this.outfitPickerIndex=null}},handleSlideVariantImage(e){var t;const i=ft.isLoggingEnabled("true"===(null==(t=document.getElementById("product-families-json-data"))?void 0:t.dataset.speedTracking));if(!this.slideVariantImage)return void(i&&console.log("[SmartTags][Size] Slide disabled",{productTitle:this.product_title,selectedColor:this.selectedColor,selectedSize:e,selectedWidth:this.selectedWidth}));const o=this.variants.find((t=>t.color===this.selectedColor&&t.size===e));
1o&&o.image?(i&&console.log("[SmartTags][Size] Emit variant-updated",{productTitle:this.product_title,selectedColor:this.selectedColor,selectedSize:e,image:o.image}),this.lastEmittedImage=o.image,setTimeout((()=>{fp.emit("variant-updated",{image:o.image,width:e})}),200)):(i&&console.log("[SmartTags][Size] No variant image match",{productTitle:this.product_title,selectedColor:this.selectedColor,selectedSize:e,hasVariant:!!o,variantImage:(null==o?void 0:o.image)||null}),setTimeout((()=>{fp.emit("variant-updated",{resetToFirst:!0})}),200))},isMobile(){var e;return window.innerWidth<=(null==(e=window.theme)?void 0:e.sizes.medium)},updateMobileViewport(){this.isMobileViewport=this.isMobile()}}},[["render",function(e,t,i,o,n,c){return n.isBundleProduct||!n.isOutfitPicker&&n.isLoading||c.shouldHideSizes()?l("",!0):(r(),s("div",Ds,[a("div",$s,[n.sizes.length?(r(),s("div",zs,[a("p",{class:p("option-title"+(n.mini_pdp?" mini-pdp-option-title":""))},[a("span",{innerHTML:n.optionTwoName,class:"option-name gt-p__small"},null,8,Hs),t[2]||(t[2]=a("span",{class:"gt-p__small"},": ",-1)),a("span",{innerHTML:c.cleanSizeName(n.selectedSize),class:"gt-p__small"},null,8,Rs)],2),n.ShowHelpGuideButton?(r(),s("button",{key:0,id:"help-guide-toggle",type:"button",class:"help-guide-toggle gt-p__small",onClick:t[0]||(t[0]=e=>c.showHelpGuide())},m(n.helpGuidePageTitle),1)):l("",!0),n.ShowSizeGuideButton?(r(),s("button",{key:1,id:"size-guide-toggle",type:"button",class:"size-guide-toggle gt-p__small","aria-label":"Size Guide for "+n.product_title,onClick:t[1]||(t[1]=e=>c.showSizeGuide())},"Size Guide",8,Ns)):l("",!0)])):l("",!0),a("div",Vs,[(r(!0),s(d,null,h(n.sizes,((e,t)=>(r(),s("div",{key:"size"+t,onClick:t=>c.setSizeSelection(e)},[a("button",{type:"button",innerHTML:c.cleanSizeName(e),class:p("option p-options option2"+(n.mini_pdp?" mini-pdp-size-swatches":"")+(n.isOutfitPicker&&n.isMobileViewport?" gt-p__small":"")),"data-size":"s"+e},null,10,Us)],8,qs)))),128))])])]))}],["__scopeId","data-v-359916a2"],["__file","SizeVariantOption.vue"]]),Ws={key:0},Ks={class:"width-variant-options"},js={key:0,class:"width-wrapper"},Qs=["innerHTML"],Zs=["innerHTML"],Js=["onClick"],Ys=["innerHTML","data-width"];const Xs=fe({name:"WidthVariantOption",computed:{cleanWidthName:()=>e=>se(e)},data:()=>({colors:[],product_title:"",widths:[],selectedColor:"",selectedSize:"",selectedWidth:"",isWidthSelected:!1,includedProductType:[],optionThreeName:"",isLoading:!0,mini_pdp:!1,isOutfitPicker:!1,isMobileViewport:!1,excludeSwatchWidth:!1,pdpSection:null,product_handle:"",optionthreeorder:[],passedOptThree:"",previouslySelectedWidth:"",userPreferredProductWidth:"",variants:[],slideVariantImageTags:"",slideVariantImage:!1,shiftFontToSmall:!1,lastEmittedImage:null,comingSoonTag:window.siteGlobals.set_reminder_tag,imageNS:null,imageKey:null,imageNS2:null,imageKey2:null,variant_image_metafield_name:null,vimageNS:null,vimageKey:null,outfitPickerIndex:null,isBundleProduct:!1,bundledProducts:[],activeBundleHandle:null,selectedBundledProductIndex:0,originalProductData:null,isHiddenForBundle:!1}),mounted(){var e;this.product_title=this.$el.parentElement.getAttribute("data-product-name"),this.imageLookUpMax=parseInt(this.$el.parentElement.getAttribute("data-imageLookUpMax")),this.product_handle=this.$el.parentElement.getAttribute("data-product-handle"),this.includedProductType=this.$el.parentElement.getAttribute("data-includedProductType").split(","),this.mini_pdp="true"===this.$el.parentElement.getAttribute("data-mini-pdp"),this.isOutfitPicker="true"===this.$el.parentElement.getAttribute("data-is-outfit-picker"),this.excludeSwatchWidth="true"===window.excludeSwatchWidth,this.show_image_3=this.$el.parentElement.getAttribute("data-show_image_3"),this.optionthreeorder=(null==(e=this.$el.parentElement.getAttribute("data-optionthreeorder"))?void 0:e.split(","))||[],this.slideVariantImageTags=this.$el.parentElement.getAttribute("data-slide-variant-image-tags")||"",this.slideVariantImage="true"===this.$el.parentElement.getAttribute("data-slide-variant-image"),this.shiftFontToSmall=this.$el.parentElement.getAttribute("data-shift_font_to_small"),this.pdpSection=this.$el.parentElement.closest(".product-single")||this.$el.parentElement.closest(".mini-product-single"),this.isOutfitPicker&&(this.pdpSection=this.$el.parentElement);const t=window.location.search,i=new URLSearchParams(t);this.passedOptThree=i.get("op3"),this.userPreferredProductWidth=v.get("pdp-width"),fp.on("product-data-updated",this.handleProductData),fp.on("plytix-product-data-ready",this.handlePlytixData),fp.on("variant-color-selected",(({color:e})=>{this.isOutfitPicker||(this.selectedColor=e,this.updateAvailability(),this.shouldHideSizes(),this.$nextTick((()=>this.setOptionThreeWidth())))})),fp.on("pdp-cookie-updated",(({type:e,value:t})=>{"width"===e&&(this.userPreferredProductWidth=t)})),fp.on("variant-size-selected",(({size:e})=>{this.isOutfitPicker||(this.selectedSize=e,this.updateAvailability(),this.shouldHideSizes(),this.$nextTick((()=>this.setOptionThreeWidth())))}
1)),fp.on("bundled-product-selected",this.handleBundledProductSelected);this.checkPlytixData()||this.initializeData(),this.updateMobileViewport(),this.isOutfitPicker&&(this.$nextTick((()=>{this.resolveOutfitPickerIndex()})),fp.on("outfit-picker-product-changed",this.handleOutfitPickerProductChanged),fp.on("outfit-picker-size-changed",(({blockIndex:e,size:t})=>{this.outfitPickerIndex||this.resolveOutfitPickerIndex(),this.outfitPickerIndex===e&&(this.selectedSize=t,this.updateAvailability(),this.shouldHideSizes(),this.$nextTick((()=>this.setOptionThreeWidth())))}))),document.addEventListener("theme:resize:width",this.handleSwatchResize)},beforeUnmount(){fp.off("product-data-updated",this.handleProductData),fp.off("plytix-product-data-ready",this.handlePlytixData),fp.off("variant-color-selected"),fp.off("variant-size-selected"),fp.off("bundled-product-selected"),fp.off("pdp-cookie-updated"),this.isOutfitPicker&&(fp.off("outfit-picker-product-changed",this.handleOutfitPickerProductChanged),fp.off("outfit-picker-size-changed")),document.removeEventListener("theme:resize:width",this.handleSwatchResize)},methods:{widthOptionAriaLabel(e,t){const i=(null==e?void 0:e.startsWith("w"))?e.slice(1).trim():(e||"").trim(),o=[];this.selectedColor&&o.push(`color ${this.selectedColor}`),this.selectedSize&&o.push(`size ${this.selectedSize}`);const s=o.length?` in ${o.join(" ")}`:"",r=t?"available":"currently unavailable";return`${this.product_title}${s} width option: ${i} is ${r}`},checkPlytixData(){if(window.productFamiliesData&&Array.isArray(window.productFamiliesData)&&window.productFamiliesData.length>0){const e=ft.getPreloadedProductData(this.product_title);if(e&&e.length>0)return ft.processAndEmitData(e,this.product_title),this.handleContentLoaded(),!0}return!1},handlePlytixData(e){if(e&&Array.isArray(e)&&e.length>0){const e=ft.getPreloadedProductData(this.product_title);e&&e.length>0&&(ft.processAndEmitData(e,this.product_title),this.handleContentLoaded())}},normalizeSmartTags:e=>(e||"").split(",").map((e=>e.trim().toLowerCase())).filter(Boolean),shouldEnableSmartTagsFromPlytixTags(e){const t=this.normalizeSmartTags(this.slideVariantImageTags);if(!t.length||!Array.isArray(e))return null;const i=e.map((e=>(e||"").toString().trim().toLowerCase()));return t.some((e=>i.includes(e)))},applySmartTagsFromPlytix(e){var t,i,o,s,r;const a=null==(i=null==(t=null==e?void 0:e.colors)?void 0:t[0])?void 0:i.tags,n=this.shouldEnableSmartTagsFromPlytixTags(null==(s=null==(o=null==e?void 0:e.colors)?void 0:o[0])?void 0:s.tags),l=ft.isLoggingEnabled("true"===(null==(r=document.getElementById("product-families-json-data"))?void 0:r.dataset.speedTracking));null!==n?(this.slideVariantImage=n,l&&console.log("[SmartTags][Width] Plytix tag match",{productTitle:this.product_title,enabled:n,smartTags:this.slideVariantImageTags,plytixTags:a})):l&&console.log("[SmartTags][Width] Fallback to Liquid boolean",{productTitle:this.product_title,slideVariantImage:this.slideVariantImage,smartTags:this.slideVariantImageTags,plytixTags:a})},async initializeData(){try{await ft.fetchProductData(this.product_title,window.Shopify.country,this.imageLookUpMax,parseInt(window.siteGlobals.pdp_productsByTitleLookup),this.imageNS,this.imageKey,this.imageNS2,this.imageKey2,this.vimageNS,this.vimageKey,null,null,this.product_handle)}catch(e){console.error("PDP width data fetch failed:",e)}finally{this.handleContentLoaded()}},handleContentLoaded(){const e=this.$el.parentElement.closest(".pdp-width-variant-options-container").querySelector(".pdp-variant-loader");e&&(e.style.minHeight="0",e.style.display="none")},handleProductData(e){e&&e.widths&&(this.isOutfitPicker&&e.productHandle&&e.productHandle!==this.product_handle||e.productTitle&&e.productTitle!==this.product_title||(this.originalProductData=e,this.isBundleProduct=Boolean(e.isBundleProduct),this.bundledProducts=e.bundledProducts||[],this.activeBundleHandle=e.activeBundleHandle||(this.isBundleProduct&&this.bundledProducts.length?this.bundledProducts[0].handle:this.product_handle),this.isBundleProduct?this.hideWidthModule():this.applyProductData(e)))},hideWidthModule(){this.isHiddenForBundle||(this.isHiddenForBundle=!0,this.$el&&this.$el.style&&(this.$el.style.display="none"))},applyProductData(e){if(!e)return;this.applySmartTagsFromPlytix(e),this.colors=e.colors||[],this.widths=this.sortOptionThreeData(e.widths||[]),this.optionThreeName=e.optionThreeName,this.variants=e.variants||[],this.isLoading=!0,this.selectedWidth="",this.isWidthSelected=!1;const t=this.isOutfitPicker?0:300;setTimeout((()=>{this.setDefaultSelections(),this.isLoading=!1,this.$nextTick((()=>{this.setOptionThreeWidth(),this.updateAvailability(),this.selectedWidth&&Array.isArray(this.widths)&&this.widths.includes(this.selectedWidth)&&this.setWidthSelection(this.selectedWidth)}))}),t)},setOptionThreeWidth(){var e;if(!(null==(e=this.$el)?void 0:e.querySelectorAll))return;
1const t=this.$el.querySelectorAll(".variant-spacing.option-size-3 .p-options.option2");Fs(t,this.excludeSwatchWidth)},handleSwatchResize(){this.updateMobileViewport(),this.$nextTick((()=>this.setOptionThreeWidth()))},handleBundledProductSelected(){this.isBundleProduct&&this.hideWidthModule()},handleOutfitPickerProductChanged({blockIndex:e,productTitle:t,productHandle:i}){this.isOutfitPicker&&(this.outfitPickerIndex||this.resolveOutfitPickerIndex(),this.outfitPickerIndex===e&&t&&(this.product_title=t,this.product_handle=i||"",this.selectedWidth=this.previouslySelectedWidth||"",this.isWidthSelected=!!this.selectedWidth,this.isLoading||(this.isLoading=!0),this.initializeData()))},setWidthSelection(e){e=re(e.toString())?e.toString():e.trim(),this.selectedWidth=e,this.isWidthSelected=!0,this.previouslySelectedWidth=e,[...this.pdpSection.querySelectorAll("[data-width]")].forEach((e=>{e.classList.remove("selected")}));this.pdpSection.querySelectorAll(`[data-width='w${CSS.escape(e)}']`).forEach((e=>{e.classList.add("selected")}));this.variants.some((t=>t.availableForSale&&t.width===e&&t.color===this.selectedColor))&&(v.set("pdp-width",e),fp.emit("pdp-cookie-updated",{type:"width",value:e})),fp.emit("variant-width-selected",{width:e}),this.isOutfitPicker&&(this.outfitPickerIndex||this.resolveOutfitPickerIndex(),fp.emit("outfit-picker-width-changed",{blockIndex:this.outfitPickerIndex,width:e})),this.updateAvailability(),this.handleSlideVariantImage(e)},getOptionImage(e,t){if("option3"===e&&"true"===this.show_image_3)return"background-image:url("+window.cdn+ie(t)+".png)"},sortOptionThreeData(e){return e.sort(((e,t)=>this.optionthreeorder.indexOf(e)-this.optionthreeorder.indexOf(t)))},setDefaultSelections(){var e,t;let i=this.selectedColor,o=this.selectedSize;if(this.isOutfitPicker){try{const s=null==(e=this.pdpSection)?void 0:e.querySelector(".color-variant-options [data-color].selected"),r=null==(t=this.pdpSection)?void 0:t.querySelector(".size-variant-options [data-size].selected");if(s&&(i=s.getAttribute("data-color")),r){const e=r.getAttribute("data-size");o=e.startsWith("s")?e.slice(1):e}}catch(a){console.error("Error getting selected size and color:",a)}if(!i&&this.colors.length){const e=this.product_handle?this.colors.find((e=>e.handle===this.product_handle)):null;i=e&&e.name||this.colors[0].name}}const s=[];this.isOutfitPicker&&this.previouslySelectedWidth&&s.push(this.previouslySelectedWidth),this.passedOptThree&&s.push(this.passedOptThree),this.userPreferredProductWidth&&s.push(this.userPreferredProductWidth);let r=s.find((e=>Array.isArray(this.widths)&&this.widths.includes(e)));r||(r=this.findFirstAvailableWidth(i,o)),!r&&Array.isArray(this.widths)&&this.widths.length>0&&(r=this.widths[0]),r&&this.setWidthSelection(r),this.updateAvailability()},findFirstAvailableWidth(e,t){if(!Array.isArray(this.widths)||!Array.isArray(this.variants))return"";for(const i of this.widths){if(this.variants.find((o=>o&&o.width===i&&o.availableForSale&&(!e||o.color===e)&&(!t||!o.size||o.size===t))))return i}return""},isExcludedDefaultOption(e){return this.includedProductType.includes(e)?"option p-options option3":"option p-options option2"},resolveOutfitPickerIndex(){try{const e=this.$el.closest(".product__inner"),t=this.$el.closest(".op-width-options"),i=(e?Array.from(e.querySelectorAll(".op-width-options")):[]).findIndex((e=>e===t));this.outfitPickerIndex=i>=0?i+1:null}catch(e){this.outfitPickerIndex=null}},handleSlideVariantImage(e){var t;const i=ft.isLoggingEnabled("true"===(null==(t=document.getElementById("product-families-json-data"))?void 0:t.dataset.speedTracking));if(!this.slideVariantImage)return void(i&&console.log("[SmartTags][Width] Slide disabled",{productTitle:this.product_title,selectedColor:this.selectedColor,selectedSize:this.selectedSize,selectedWidth:e}));const o=this.variants.find((t=>t.color===this.selectedColor&&t.size===this.selectedSize&&t.width===e));o&&o.image?(i&&console.log("[SmartTags][Width] Emit variant-updated",{productTitle:this.product_title,selectedColor:this.selectedColor,selectedSize:this.selectedSize,selectedWidth:e,image:o.image}),this.lastEmittedImage!==o.image&&(this.lastEmittedImage=o.image,setTimeout((()=>{fp.emit("variant-updated",{image:o.image,width:e,preferWidthSlug:!0})}
1),200))):i&&console.log("[SmartTags][Width] No variant image match",{productTitle:this.product_title,selectedColor:this.selectedColor,selectedSize:this.selectedSize,selectedWidth:e,hasVariant:!!o,variantImage:(null==o?void 0:o.image)||null})},updateAvailability(){var e,t;let i=this.selectedColor;const o=null==(e=this.pdpSection)?void 0:e.querySelector(".color-variant-options [data-color].selected");if(o&&(i=o.getAttribute("data-color")||""),!i&&Array.isArray(this.colors)&&this.colors.length){const e=this.product_handle?this.colors.find((e=>e.handle===this.product_handle)):null;i=e&&e.name||this.colors[0].name||""}let s=this.selectedSize;const r=null==(t=this.pdpSection)?void 0:t.querySelector(".size-variant-options [data-size].selected");if(r){const e=r.getAttribute("data-size")||"";s=e.startsWith("s")?e.slice(1):e}if(!i)return;const a=this.variants||[];if(s){a.some((e=>e&&e.color===i&&(!e.size||e.size===s)))||(s="")}const n=a.filter((e=>e&&e.availableForSale&&e.color===i&&(!s||!e.size||e.size===s)&&e.width));let l=new Set(n.map((e=>e.width)));0!==l.size||s||(l=new Set(a.filter((e=>e&&e.availableForSale&&e.color===i&&e.width)).map((e=>e.width)))),this.disableAllWidthOptions(),l.forEach((e=>this.setWidthEnabled(e)))},disableAllWidthOptions(){[...this.pdpSection.querySelectorAll("[data-width]")].forEach((e=>{e.classList.add("unavailable"),e.setAttribute("aria-label",this.widthOptionAriaLabel(e.getAttribute("data-width"),!1))}))},setWidthEnabled(e){[...this.pdpSection.querySelectorAll(`[data-width='w${CSS.escape(e)}']`)].forEach((e=>{e.classList.remove("unavailable"),e.setAttribute("aria-label",this.widthOptionAriaLabel(e.getAttribute("data-width"),!0))}))},shouldHideSizes(){const e="true"===window.siteGlobals.set_reminder_pdp_hide_sizes;let t=!1;if(this.colors&&this.selectedColor){const e=this.colors.find((e=>e.name===this.selectedColor));e&&e.tags&&e.tags.includes(this.comingSoonTag)&&(t=!0,[...this.pdpSection.querySelectorAll(`[data-color='${CSS.escape(this.selectedColor)}']`)].forEach((e=>{e.classList.remove("unavailable");const t=e.getAttribute("data-color")||this.selectedColor,i=this.selectedSize?` in size ${this.selectedSize}`:"";e.setAttribute("aria-label",`${this.product_title}${i} color option: ${t} is available`)})))}return e&&t},isMobile(){var e;return window.innerWidth<=(null==(e=window.theme)?void 0:e.sizes.medium)},updateMobileViewport(){this.isMobileViewport=this.isMobile()}}},[["render",function(e,t,i,o,c,u){return c.isBundleProduct||!c.isOutfitPicker&&c.isLoading||u.shouldHideSizes()?l("",!0):(r(),s("div",Ws,[a("div",Ks,[c.widths.length?(r(),s("div",js,[a("p",{class:p("option-title"+(c.mini_pdp?" mini-pdp-option-title":""))},[a("span",{innerHTML:c.optionThreeName,class:"option-name gt-p__small"},null,8,Qs),t[0]||(t[0]=a("span",{class:"gt-p__small"},": ",-1)),a("span",{innerHTML:u.cleanWidthName(c.selectedWidth),class:"gt-p__small"},null,8,Zs)],2)])):l("",!0),a("div",{class:p(["variant-spacing option-size-3 variant-spacing-size",{"gt-p__small":"true"==c.shiftFontToSmall}])},[(r(!0),s(d,null,h(c.widths,((e,t)=>(r(),s("div",{key:"width"+t,onClick:t=>u.setWidthSelection(e)},[a("button",{type:"button",innerHTML:u.cleanWidthName(e),class:p(u.isExcludedDefaultOption(c.optionThreeName)+(c.isOutfitPicker&&c.isMobileViewport?" gt-p__small":"")),style:n(u.getOptionImage("option3",e)),"data-width":"w"+e},null,14,Ys)],8,Js)))),128))],2)])]))}],["__scopeId","data-v-9e703d4d"],["__file","WidthVariantOption.vue"]]);const er=new class{constructor(){this.headers={"Content-Type":"application/json"}}async getProductSectionContent(e,t,i,o){const s=`${window.theme.routes.root_url}products/${i}?section_id=${e}`;fetch(t?`${s}&block_id=${t}`:s).then((e=>e.body)).then((e=>{const t=e.getReader();return new ReadableStream({start(e){!function i(){t.read().then((({done:t,value:o})=>{t?e.close():(e.enqueue(o),i())}))}()}})})).then((e=>new Response(e,{headers:{"Content-Type":"text/html"}}).text())).then((s=>{const r={result:s,handle:i,sectionId:e,...t&&{blockId:t}};o(r)}))}async getPageContent(e,t){const i=`${window.theme.routes.root_url}pages/${e}`;fetch(i).then((e=>e.body)).then((e=>{const t=e.getReader();return new ReadableStream({start(e){!function i(){t.read().then((({done:t,value:o})=>{t?e.close():(e.enqueue(o),i())}))}()}})})).then((e=>new Response(e,{headers:{"Content-Type":"text/html"}}).text())).then((e=>{t({result:e})}))}get(e){return(window.theme.fetchWithRetry||window.fetch).call(window,e)}postCart(e,t,i,o){const s=window.Shopify.routes.root+"cart/add.js",r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)};(window.theme&&window.theme.fetchWithRetry?window.theme.fetchWithRetry:window.fetch).call(window,s,r).then((async e=>{if(!e.ok){const t=await e.json(),i=new Error(t.message||`Cart add failed with status ${e.status}`);throw i.status=e.status,i.data=t,i}return e.json()})).then((e=>{e.self=t,i(e)})).catch((e=>{!function(e,t,i={}){var o;const{url:s,status:r,data:a}=i,n=[`[Fetch] ${e}`];s&&n.push(`url=${s}`),r&&n.push(`status=${r}`),(null==a?void 0:a.message)&&n.push(`message=${a.message}`);const l=n.join(" "),d=t?`: ${(null==t?void 0:t.message)||t}`:"";console.error(l,{error:t,status:r,url:s,data:a});try{(null==(o=window.NOIBUJS)?void 0:o.addError)&&window.NOIBUJS.addError(new Error(`${l}${d}`))}catch(c){}}("Cart add failed",e,{url:s,status:e.status,data:e.data}),o&&o(e,t)}))}},tr={name:"PDPaddToCartButton",data(){var e;return{localLoading:this.loading,localSuccess:this.success,localError:this.error,localEmailFormValidationError:this.emailFormValidationError,localShowWidget:this.showWidget,membershipInCart:window._authentic_membershipInCart||!1,memberIsSubscribed:!1,memberDiscountApplied:!1,isMobile:window.innerWidth<(null==(e=window.theme)?void 0:e.sizes.medium)}},props:{instock:{type:Boolean,required:!0},comingSoonProduct:{type:Boolean,required:!0},success:{type:Boolean,required:!0},addToCartText:{type:String,required:!0},comingsoonText:{type:String,required:!0},variantPrice:{type:String,required:!0},soldOutText:{type:String,required:!0},showingForm:{type:Boolean,required:!0},unavailableText:{type:String,required:!0},notifyMeText:{type:String,required:!0},notavail:{type:Boolean,required:!0},isSticky:{type:Boolean,default:!1,required:!1},variantId:{type:String,required:!0},formEmail:{type:String,required:!1},formEmailList:{type:String,required:!1},formEmailListId:{type:String,required:!1},klaviyo_key:{type:String,required:!1},klaviyoFormShowing:{type:Boolean,required:!0},emailFormValidationError:{type:Boolean,required:!0},scrollToVariantData:{type:Function,required:!1},membershipPrice:{type:String,required:!1},useMemberPrice:{type:Boolean,required:!1,default:!1},isOutfitPicker:{type:Boolean,required:!1,default:!1},surface:{type:String,required:!1,default:"pdp"}},methods:{checkClass(){return this.localLoading?"gt-btn__atc btn--outline btn--full btn--primary btn--add-to-cart loading":`gt-btn__atc btn--outline btn--full btn--primary btn--add-to-cart form-${this.showingForm} stock-${this.instock} coming-soon-${this.comingSoonProduct} klaviyo-form-showing-${this.klaviyoFormShowing}`},validateEmail:e=>/\S+@\S+\.\S+/.test(e),checkSoldOutMessage(){return this.notavail?this.unavailableText:!this.instock&&this.klaviyoFormShowing?this.notifyMeText:this.soldOutText},handleAddToCartClick(){this.localLoading||(this.showingForm||!this.variantId||this.notavail||!this.instock||this.comingSoonProduct||this.addToBag(),this.showingForm&&this.variantId&&(this.isSticky?this.scrollToVariantData():(this.validateEmail(this.formEmail)?(this.localEmailFormValidationError=!1,this.submitKlaviyo()):this.localEmailFormValidationError=!0,fp.emit("updateEmailError",{emailFormValidationError:this.localEmailFormValidationError}))))},reloadCart(){(window.theme&&window.theme.getCart?window.theme.getCart(!0):er.get(`${window.theme.routes.cart}.js`).then((e=>e.json()))).then((e=>{document.dispatchEvent(new CustomEvent("theme:cart:change",{detail:{cart:e},bubbles:!0})),document.dispatchEvent(new CustomEvent("theme:cart:reload",{bubbles:!0})),setTimeout((()=>{[...document.querySelectorAll("[ data-drawer-toggle='drawer-cart']")].forEac
1h((e=>{e.click()})),this.localLoading=!1,fp.emit("cart-added",{surface:this.surface})}),300)})).catch((e=>{console.error("PDPaddToCartButton: Error loading widget:",{error:(null==e?void 0:e.message)||e,stack:null==e?void 0:e.stack,response:null==e?void 0:e.response,fullError:e}),this.localShowWidget=!1,this.localError=!0}))},addToBag(){if(!this.variantId)return void console.error("Add to cart failed: No variant ID");const e=parseInt(this.variantId,10);if(isNaN(e)||e<=0)return void console.error("Add to cart failed: Invalid variant ID",this.variantId);localStorage.setItem("clear-tracking",!0),this.localLoading=!0;const t={items:[{id:e,quantity:1}]};this.gwpEnabled&&(this.parentId!==this.gwpProduct1&&this.parentId!==this.gwpProduct2&&this.parentId!==this.gwpProduct3&&this.parentId!==this.gwpProduct4&&this.parentId!==this.gwpProduct5||(t.properties={},t.properties[this.gwpTag]=!0));er.postCart(t,this,(e=>{e.self.reloadCart()}),((e,t)=>{t.localLoading=!1,console.error("Failed to add item to cart:",e.message||e)})),this.reportCartPageVisited(),this.reportAddToCartPerformed()},reportCartPageVisited(){ee((()=>{window.FastSimonSDK.event({reportAppType:"MPA",eventName:window.FastSimonEventName.CartVisited,data:{}})}))},reportAddToCartPerformed(){ee((()=>{window.FastSimonSDK.event({reportAppType:"MPA",eventName:window.FastSimonEventName.AddToCartPerformed,data:{productID:this.variantId}})}))},submitKlaviyo(){const e=this.formEmail;if(!this.validateEmail(e))return this.localEmailFormValidationError=!0,void fp.emit("updateEmailError",{emailFormValidationError:this.localEmailFormValidationError});this.localLoading=!0,this.subscribeToBackInStock(e).then((()=>(this.localSuccess=!0,this.formEmailList&&this.formEmailListId?this.subscribeToMarketingList(e):Promise.resolve()))).then((()=>{this.localLoading=!1,fp.emit("updateSuccessState",{success:this.localSuccess})})).catch((e=>{console.error("Klaviyo subscription error:",e),this.localLoading=!1,this.localError=!0,fp.emit("updateSuccessState",{error:this.localError})}))},async subscribeToBackInStock(e){const t={method:"POST",headers:{accept:"application/json",revision:"2025-04-15","content-type":"application/json"},body:JSON.stringify({data:{type:"back-in-stock-subscription",attributes:{channels:["EMAIL"],profile:{data:{type:"profile",attributes:{email:e}}}},relationships:{variant:{data:{type:"catalog-variant",id:"$shopify:::$default:::"+this.variantId}}}}})};try{const e=await fetch("https://a.klaviyo.com/client/back-in-stock-subscriptions/?company_id="+this.klaviyo_key,t);if(!e.ok){const t=await e.text();throw console.error("Error:",e.status,t),new Error("Failed to subscribe to back in stock")}return e}catch(i){throw console.error("Klaviyo back-in-stock subscription error:",i),i}},async subscribeToMarketingList(e){const t={method:"POST",headers:{accept:"application/json",revision:"2025-04-15","content-type":"application/json"},body:JSON.stringify({data:{type:"subscription",attributes:{profile:{data:{type:"profile",attributes:{email:e,subscriptions:{email:{marketing:{consent:"SUBSCRIBED"}}}}}}},relationships:{list:{data:{type:"list",id:this.formEmailListId}}}}})};try{const e=await fetch("https://a.klaviyo.com/client/subscriptions/?company_id="+this.klaviyo_key,t);if(!e.ok){const t=await e.text();throw console.error("Error:",e.status,t),new Error("Failed to subscribe to marketing list")}return e}catch(i){throw console.error("Klaviyo marketing list subscription error:",i),i}},isUSD:()=>"USD"===window.Shopify.currency.active,async getAppliedDiscounts(){let e=!1;try{e=(window.theme&&window.theme.getCart?await window.theme.getCart():await(await fetch("/cart.js")).json()).cart_level_discount_applications.some((e=>"AUTHENTIC"===e.title)),fp.emit("membershipDiscountApplied",{isApplied:e})}catch(t){console.error("Error fetching cart:",t)}return e}},computed:{displayPrice(){return(this.membershipInCart||this.memberIsSubscribed||this.memberDiscountApplied)&&this.isUSD()&&this.membershipPrice&&this.useMemberPrice?this.membershipPrice:this.variantPrice}},async mounted(){const e=Object.getOwnPropertyDescriptor(window,"_authentic_membershipInCart");Object.defineProperty(window,"_authentic_membershipInCart",{get:function(){return!!e&&(e.get?e.get.call(window):e.value)},set:t=>{e&&e.set&&e.set.call(window,t),this.membershipInCart=t||!1},configurable:!0}),fp.on("membershipStatusUpdated",(e=>{this.memberIsSubscribed=e.isSubscribed})),this.memberDiscountApplied=await this.getAppliedDiscounts(),this.isOutfitPicker&&(this.onResize=()=>{var e;this.isMobile=window.innerWidth<(null==(e=window.theme)?void 0:e.sizes.medium)},document.addEventListener("theme:resize:width",this.onResize))},beforeUnmount(){const e=Object.getOwnPropertyDescriptor(window,"_authentic_membershipInCart");e&&Object.defineProperty(window,"_authentic_membershipInCart",e),this.isOutfitPicker&&(document.removeEventListener("theme:resize:width",this.onResize),this.onResize=null)}},ir={key:0,class:"gt-btn__atc btn-state-ready gt-btn__atc"},or=["innerHTML"],sr={key:0,class:"cta__dot"},rr=["innerHTML"],ar={key:1,class:"gt-btn__atc btn-state-ready"},nr=["innerHTML"],lr={key:2,class:"gt-btn__atc btn-state-ready"},dr=["innerHTML"];const cr=fe(tr,[["render",function(e,t,i,o,n,d){return O((r(),s("button",{type:"submit",name:"add",class:
1p(d.checkClass()),"data-add-to-cart":"",onClick:t[0]||(t[0]=e=>d.handleAddToCartClick()),ref:i.isSticky?"stickyATCBtn":"atcBtn"},[i.instock&&!i.comingSoonProduct?(r(),s("span",ir,[a("span",{"data-add-to-cart-text":"",innerHTML:i.addToCartText},null,8,or),!i.isOutfitPicker||i.isOutfitPicker&&!n.isMobile?(r(),s("span",sr,"•")):l("",!0),!i.isOutfitPicker||i.isOutfitPicker&&!n.isMobile?(r(),s("span",{key:1,"data-button-price":"",innerHTML:d.displayPrice},null,8,rr)):l("",!0)])):l("",!0),i.comingSoonProduct?(r(),s("span",ar,[a("span",{"data-add-to-cart-text":"",innerHTML:i.comingsoonText},null,8,nr)])):l("",!0),i.instock||i.comingSoonProduct?l("",!0):(r(),s("span",lr,[a("span",{"data-add-to-cart-text":"",innerHTML:d.checkSoldOutMessage()},null,8,dr)])),t[1]||(t[1]=a("span",{class:"gt-btn__atc btn-state-loading",role:"button"},[a("svg",{height:"18",width:"18",class:"svg-loader"},[a("circle",{r:"7",cx:"9",cy:"9"}),a("circle",{"stroke-dasharray":"87.96459430051421 87.96459430051421",r:"7",cx:"9",cy:"9"})])],-1)),t[2]||(t[2]=a("span",{class:"gt-btn__atc btn-state-complete",role:"button"}," ",-1))],2)),[[B,!i.success]])}],["__file","PDPaddToCartButton.vue"]]),ur={key:0,class:"error"},hr=["id"],pr={class:"email-checkbox"},mr=["aria-labelledby"],gr=["id","innerHTML"],fr=["innerHTML"];const wr=fe({name:"PDPaddToCart",components:{PDPaddToCartButton:cr},data:()=>({addToCartText:"",UnavailableText:"",SoldOutText:"",variantId:"",parentId:"",variantPrice:"",handle:"",instock:!1,countryCode:"",currencyCode:"",loading:!1,notavail:!1,hideButton:!1,showWidget:!1,success:!1,showingForm:!0,error:!1,compare:"",variantPriceNumber:"",formEmail:"",formEmailList:"",formEmailListId:"",emailFormValidationError:!1,comingsoon_tag:"",comingsoonText:"",comingSoonProduct:!1,klaviyoEnabled:!1,joinMessage:"",NotifyMeSuccess:"",NotifyMeText:"",enable_klaviyo:!1,klaviyo_key:"",gwpEnabled:window.siteGlobals.gwpEnabled,gwpTag:window.siteGlobals.gwpTag,gwpProduct1:window.siteGlobals.gwpProduct1,gwpProduct2:window.siteGlobals.gwpProduct2,gwpProduct3:window.siteGlobals.gwpProduct3,gwpProduct4:window.siteGlobals.gwpProduct4,gwpProduct5:window.siteGlobals.gwpProduct5,membershipPrice:"",useMemberPrice:!1,localProductId:null,localProductHandle:null,surface:"pdp",isOutfitPicker:!1,outfitPickerIndex:null,miniPdpHydrated:!1}),computed:{uid(){return`${this.surface}-${this.localProductId||"default"}`},joinMessageId(){return`joinMessage-${this.uid}`},klaviyoInputId(){return`klaviyo-remind-email-auth-input-${this.uid}`},klaviyoFormShowing(){return!("false"===this.enable_klaviyo||!this.variantId||this.instock||this.notavail||this.comingSoonProduct)},klaviyoFormClass(){const e=""===this.joinMessage?" shortForm":"";return(this.klaviyoFormShowing?"show-form":"hide-form")+e},favoriteAllowed(){return this.instock&&!this.notavail&&!this.comingSoonProduct}},mounted(){this.countryCode=window.Shopify.country,this.currencyCode=window.Shopify.currency.active,this.surface=this.$el.parentElement.getAttribute("data-surface")||"pdp",this.addToCartText=this.$el.parentElement.getAttribute("data-addToCartText"),this.UnavailableText=this.$el.parentElement.getAttribute("data-UnavailableText"),this.SoldOutText=this.$el.parentElement.getAttribute("data-SoldOutText"),this.NotifyMeText=this.$el.parentElement.getAttribute("data-NotifyMeText"),this.NotifyMeSuccess=this.$el.parentElement.getAttribute("data-NotifyMeSuccess"),this.joinMessage=this.$el.parentElement.getAttribute("data-joinMessage"),this.comingsoon_tag=this.$el.parentElement.getAttribute("data-comingsoon_tag"),this.comingsoonText=this.$el.parentElement.getAttribute("data-comingsoonText"),this.enable_klaviyo=this.$el.parentElement.getAttribute("data-enable_klaviyo"),this.klaviyo_key=this.$el.parentElement.getAttribute("data-klaviyo-company-key"),this.formEmailListId=this.$el.parentElement.dataset.klaviyoListId,this.useMemberPrice="true"===this.$el.parentElement.getAttribute("data-use-member-price"),this.localProductId=this.$el.parentElement.getAttribute("data-product-id"),this.localProductHandle=this.$el.parentElement.getAttribute("data-product-handle"),"quickview"!==this.surface&&this.reportDirectProductViewIfApplicable(),this.isOutfitPicker="quickview"!==this.surface&&("true"===this.$el.getAttribute("data-is-outfit-picker")||"true"===this.$el.parentElement.getAttribute("data-is-outfit-picker"));const e=this.$el.getAttribute("data-outfit-picker-index")||this.$el.parentElement.getAttribute("data-outfit-picker-index");this.outfitPickerIndex=null!=e&&""!==e?Number(e):null,"false"!==this.enable_klaviyo&&this.checkIfKlaviyoLoaded(),"quickview"===this.surface&&this.initQuickviewVariant(),"mini-pdp"===this.surface&&this.initMiniPdpVariant(),fp.on("updateUpsellVariantId",this.handleUpsellVariantUpdate),fp.on("updateAddButton",this.handleAddButtonUpdate);const t="undefined"!=typeof window?window.__pdpAddButtonPayload:null;t&&"mini-pdp"!==this.surface&&this.handleAddButtonUpdate(t),this.handleMembershipPriceUpdate=e=>{const{formattedMembershipPrice:t,shouldShowMemberPrice:i}=e.detail;this.membershipPrice=i?t:null},window.addEventListener("membershipPriceUpdated",this.handleMembershipPriceUpdate),fp.on("pdp-tags-updated",this.handlePdpTagsUpdated),fp.on("updateEmailError",this.handleUpdateEmailError),fp.on("updateSuccessState",this.handleUpdateSuccessState),fp.on("cart-added",this.handleCartAdded)},updated(){this.syncFavoriteVisibility()},unmounted(){window.removeEventListener("membershipPriceUpdated",this.handleMembershipPriceUpdate),fp.off("updateUpsellVariantId",this.handleUpsellVariantUpdate),fp.off("updateAddButton",this.handleAddButtonUpdate),fp.off("pdp-tags-updated",this.handlePdpTagsUpdated),fp.off("updateEmailError",this.handleUpdateEmailError),fp.off("updateSuccessState",this.handleUpdateSuccessState),fp.off("
1cart-added",this.handleCartAdded),this._quickviewForm&&this._quickviewVariantHandler&&this._quickviewForm.removeEventListener("theme:variant:change",this._quickviewVariantHandler)},methods:{syncFavoriteVisibility(){var e;if("pdp"!==this.surface)return;const t=null==(e=this.$el.parentElement)?void 0:e.closest(".pdp-cta-row");t&&t.querySelector("[data-pdp-favorite]")&&t.classList.toggle("pdp-cta-row--atc-no-favorite",!this.favoriteAllowed)},reportDirectProductViewIfApplicable(){if(!this.localProductId)return;const e=localStorage.getItem("findingMethod")||"";["PLP:","Search Results","Complete The Look","Recently Viewed","Cart Recommendations","PDP Recommendation:","Collection Slider Recommendation"].some((t=>e.includes(t)))||ee((()=>{window.FastSimonSDK.event({eventName:window.FastSimonEventName.DirectProductClicked,data:{productID:String(this.localProductId)}})}))},handleAddButtonUpdate(e){if(!e)return;const t=this.$el.parentElement;if(this.isOutfitPicker){let i=null;if(t){const e=t.getAttribute("data-outfit-picker-index");null!=e&&""!==e&&(i=Number(e))}if(null===i||Number.isNaN(i))try{const e=this.$el.closest(".product__inner"),o=(e?Array.from(e.querySelectorAll(".op-atc")):[]).findIndex((e=>e&&e.contains(t)));o>=0&&(i=o+1)}catch(c){console.error("Failed to derive outfit picker index",c)}if(null===i||Number.isNaN(i)||(this.outfitPickerIndex=i),void 0===e.blockIndex)return;if(null===i||Number.isNaN(i))return;if(Number(e.blockIndex)!==Number(i))return;try{const e=t&&t.getAttribute("data-product-id"),i=t&&t.getAttribute("data-product-handle");e&&(this.localProductId=e),i&&(this.localProductHandle=i)}catch(c){console.error("Failed to read outfit picker product metadata",c)}return void this.applyAddButtonUpdate(e)}const i=this.$el.parentElement.getAttribute("data-product-id"),o=this.$el.parentElement.getAttribute("data-product-handle");i&&(this.localProductId=i),o&&(this.localProductHandle=o);const s=e=>e?String(e).replace(/\D+/g,""):"",r=e=>e?String(e).replace(/-\d+$/,""):"",a=s(e.parentId)&&s(this.localProductId)&&s(e.parentId)===s(this.localProductId),n=e.handle&&this.localProductHandle&&String(e.handle)===String(this.localProductHandle),l=e.isBundleProduct&&e.handle&&this.localProductHandle&&r(e.handle)===r(this.localProductHandle),d=("pdp"===this.surface||"mini-pdp"===this.surface)&&e.pageHandle&&this.localProductHandle&&String(e.pageHandle)===String(this.localProductHandle);if(a||n||l||d){if("mini-pdp"===this.surface&&!this.miniPdpHydrated){if(e.notavail&&this.instock)return;this.miniPdpHydrated=!0}this.applyAddButtonUpdate(e)}},handleUpsellVariantUpdate(e){this.variantId=e.upsellVariantId,this.variantPrice=this.convertToCurrency(e.upsellVariantPrice)},handlePdpTagsUpdated(e){this.comingSoonProduct=!1,this.checkComingSoonState(e.tags)},handleUpdateEmailError(e){this.emailFormValidationError=e.emailFormValidationError},handleUpdateSuccessState(e){this.success=e.success},handleCartAdded(e){"quickview"===this.surface&&"quickview"===(null==e?void 0:e.surface)&&this.closeQuickview()},checkComingSoonState(e){e.forEach((e=>{e===this.comingsoon_tag&&(this.comingSoonProduct=!0)}))},checkShouldFormShow(){this.instock&&(this.showingForm=!1),this.comingSoonProduct&&(this.showingForm=!1)},checkIfKlaviyoLoaded(){if(window.klaviyo)return!0},applyAddButtonUpdate(e){this.variantId=e.variantId,this.parentId=e.parentId,this.handle=e.handle,this.variantPrice=this.convertToCurrency(e.variantPrice),this.instock=e.instock,this.notavail=e.notavail,this.showWidget=!0,this.success=!1,this.showingForm=!0,this.loading=!1,this.error=!1,this.compare=e.comparePrice,this.variantPriceNumber=e.variantPrice,this.checkShouldFormShow()},initQuickviewVariant(){const e=this.$el.parentElement,t=e.getAttribute("data-variant-id"),i=Number(e.getAttribute("data-variant-price"))/100,o="true"===e.getAttribute("data-variant-available"),s=Number(e.getAttribute("data-variant-compare")||0)/100,r=e.getAttribute("data-product-tags");let a=[];try{a=JSON.parse(r||"[]")}catch(l){a=[]}t&&(this.checkComingSoonState(a),this.applyAddButtonUpdate({variantId:t,parentId:this.localProductId,handle:this.localProductHandle,variantPrice:i,instock:o,notavail:!1,comparePrice:s||"",tags:a}));const n=this.$el.closest(".quickview__form")||this.$el.closest("[data-quickview-form-area]");n&&(this._quickviewForm=n,this._quickviewVariantHandler=e=>{var t;const i=null==(t=e.detail)?void 0:t.variant;i?this.applyAddButtonUpdate({variantId:i.id,parentId:String(i.product_id),handle:this.localProductHandle,variantPrice:i.price/100,instock:i.available,notavail:!1,comparePrice:i.compare_at_price?i.c
1ompare_at_price/100:"",tags:a}):this.applyAddButtonUpdate({variantId:"",parentId:this.localProductId,handle:this.localProductHandle,variantPrice:0,instock:!1,notavail:!0,comparePrice:"",tags:a})},n.addEventListener("theme:variant:change",this._quickviewVariantHandler))},initMiniPdpVariant(){const e=this.$el.parentElement,t=e.getAttribute("data-variant-id"),i=Number(e.getAttribute("data-variant-price"))/100,o="true"===e.getAttribute("data-variant-available"),s=Number(e.getAttribute("data-variant-compare")||0)/100,r=e.getAttribute("data-product-tags");let a=[];try{a=JSON.parse(r||"[]")}catch(n){a=[]}t&&(this.checkComingSoonState(a),this.applyAddButtonUpdate({variantId:t,parentId:this.localProductId,handle:this.localProductHandle,variantPrice:i,instock:o,notavail:!1,comparePrice:s||"",tags:a}))},closeQuickview(){var e;const t=this.$el.closest("[data-quickview-modal]")||this.$el.closest(".modal.is-active");if(t)return void t.dispatchEvent(new CustomEvent("theme:quickview:close",{bubbles:!0}));const i=null==(e=this.$el.closest("[data-api-content]"))?void 0:e.querySelector("[data-micromodal-close]");i&&i.click()},convertToCurrency(e){let t=Intl.NumberFormat("en-US",{style:"currency",currency:this.currencyCode}).format(e).replace(".00","");return t.includes("CA")&&(t=t.replace("CA",""),t+=" CAD"),t}}},[["render",function(e,t,i,o,n,d){const u=c("PDPaddToCartButton");return O((r(),s("div",null,[a("div",{class:p(["klaviyo-collect",d.klaviyoFormClass])},[!0===n.emailFormValidationError?(r(),s("p",ur,"The email address is not valid")):l("",!0),O(a("input",{type:"email",class:"klaviyo-input",name:"klaviyo-remind-email-auth",id:d.klaviyoInputId,onFocus:t[0]||(t[0]=e=>n.emailFormValidationError=!1),"aria-label":"Email",placeholder:"Email",required:"","onUpdate:modelValue":t[1]||(t[1]=e=>n.formEmail=e)},null,40,hr),[[F,n.formEmail]]),a("div",pr,[O(a("input",{type:"checkbox",name:"klaviyo-email-opt-in","onUpdate:modelValue":t[2]||(t[2]=e=>n.formEmailList=e),"aria-labelledby":d.joinMessageId},null,8,mr),[[D,n.formEmailList]]),a("p",{id:d.joinMessageId,innerHTML:n.joinMessage},null,8,gr)])],2),g(u,{ref:"atcBtn",instock:n.instock,comingSoonProduct:n.comingSoonProduct,success:n.success,addToCartText:n.addToCartText,comingsoonText:n.comingsoonText,variantPrice:n.variantPrice,membershipPrice:n.membershipPrice,useMemberPrice:n.useMemberPrice,soldOutText:n.SoldOutText,unavailableText:n.UnavailableText,notifyMeText:n.NotifyMeText,notavail:n.notavail,showingForm:n.showingForm,variantId:n.variantId,formEmail:n.formEmail,loading:n.loading,klaviyoFormShowing:d.klaviyoFormShowing,klaviyo_key:n.klaviyo_key,emailFormValidationError:n.emailFormValidationError,formEmailList:n.formEmailList,formEmailListId:n.formEmailListId,isOutfitPicker:n.isOutfitPicker,surface:n.surface},null,8,["instock","comingSoonProduct","success","addToCartText","comingsoonText","variantPrice","membershipPrice","useMemberPrice","soldOutText","unavailableText","notifyMeText","notavail","showingForm","variantId","formEmail","loading","klaviyoFormShowing","klaviyo_key","emailFormValidationError","formEmailList","formEmailListId","isOutfitPicker","surface"]),n.success?(r(),s("p",{key:0,innerHTML:n.NotifyMeSuccess,class:"successMessage"},null,8,fr)):l("",!0)],512)),[[B,n.showWidget]])}],["__file","PDPaddToCart.vue"]]),yr={class:"sticky-atc-container opacity-0"},vr=["innerHTML"],br=["innerHTML"];const Sr=fe({name:"PDPaddToCartSticky",components:{PDPaddToCartButton:cr},data:()=>({addToCartText:"",UnavailableText:"",SoldOutText:"",variantId:"",parentId:"",variantPrice:"",handle:"",instock:!1,countryCode:"",currencyCode:"",loading:!1,notavail:!1,hideButton:!1,showWidget:!1,stickyVisible:!1,success:!1,showingForm:!0,error:!1,compare:"",variantPriceNumber:"",formEmail:"",formEmailList:"",formEmailListId:"",emailFormValidationError:!1,comingsoon_tag:"",comingsoonText:"",comingSoonProduct:!1,klaviyoEnabled:!1,joinMessage:"",NotifyMeSuccess:"",NotifyMeText:"",enable_klaviyo:!1,klaviyo_key:"",klaviyoFormShowing:!1,gwpEnabled:window.siteGlobals.gwpEnabled,gwpTag:window.siteGlobals.gwpTag,gwpProduct1:window.siteGlobals.gwpProduct1,gwpProduct2:window.siteGlobals.gwpProduct2,gwpProduct3:window.siteGlobals.gwpProduct3,gwpProduct4:window.siteGlobals.gwpProduct4,gwpProduct5:window.siteGlobals.gwpProduct5,membershipPrice:"",useMemberPrice:!1,stickyAtcInitialized:!1,zoomOpen:!1}),mounted(){var e,t=this;const i=null==(e=this.$el)?void 0:e.parentElement;this.handleViewportSize=ge(this,{useRoot:!0}),this.countryCode=window.Shopify.country,this.currencyCode=window.Shopify.currency.active,this.addToCartText=i.getAttribute("data-addToCartText"),this.UnavailableText=i.getAttribute("data-UnavailableText"),this.SoldOutText=i.getAttribute("data-SoldOutText"),this.NotifyMeText=i.getAttribute("data-NotifyMeText"),this.NotifyMeSuccess=i.getAttribute("data-NotifyMeSuccess"),this.joinMessage=i.getAttribute("data-joinMessage"),this.comingsoon_tag=i.getAttribute("data-comingsoon_tag"),this.comingsoonText=i.getAttribute("data-comingsoonText"),this.enable_klaviyo=i.getAttribute("data-enable_klaviyo"),this.klaviyo_key=i.getAttribute("data-klaviyo-company-key"),this.formEmailListId=i.dataset.klaviyoListId,this.useMemberPrice="true"===i.getAttribute("data-use-member-price"),"false"!=this.enable_klaviyo&&this.checkIfKlaviyoLoaded(),this.selectedColor="",this.selectedSize="",this.selectedBling="",fp.on("updateAddButton",(e=>{t.variantId=e.variantId,t.parentId=e.parentId,t.handle=e.handle,t.variantPrice=this.convertToCurrency(e.variantPrice),t.instock=e.instock,t.notavail=e.notavail,t.showWidget=!0,t.success=!1,t.showingForm=!0,t.loading=!1,t.error=!1,t.compare=e.comparePrice,t.variantPriceNumber=e.variantPrice,this.checkShouldFormShow()})),this.handleMembershipPriceUpdate=e=>{const{formattedMembershipPrice:i,shouldShowMemberPrice:o}=e.detail;t.membershipPrice=o?i:""},window.addEventListener("membershipPriceUpdated",this.handleMembershipPriceUpdate),fp.on("pdp-tags-updated",(e=>{const t=e.tags;this.comingSoonProduct=!1,this.checkComingSoonState(t)}));const o=i.getAttribute("data-product-tags");if(o)try{const e=JSON.parse(o);this.checkComingSoonState(e)}catch(s){}fp.on("updateEmailError",(e=>{t.emailFormValidationError=e.emailFormValidationError})),fp.on("updateSuccessState",(e=>{t.success=e.success})),fp.on("updateUpsellVariantId",(e=>{t.variantId=e.upsellVariantId,t.variantPrice=this.convertToCurrency(e.upsellVariantPrice)})),this.$nextTick((()=>{this.initializeStickyATC()})),this.onStickyResize=()=>this.initializeStickyATC(),document.addEventListener("theme:resize:width",this.onStickyResize),this.onZoomOpen=()=>{this.zoomOpen=!0},this.onZoomClose=()=>{this.zoomOpen=!1,this.toggleVisibility()},document.addEventListener("pdp-zoom:open",this.onZoomOpen),document.addEventListener("pdp-zoom:close",this.onZoomClose),this.onCookieBarChange=()=>{this.updateStickyButtonPosition(),this.syncFloatingWidgetLift()},document.addEventListener("cookie-bar:change",this.onCookieBarChange),document.addEventListener("chat:hide",this.onCookieBarChange),document.addEventListener("chat:show",this.onCookieBarChange),setTimeout(G(this.toggleVisibility),100)},created(){window.addEventListener("scroll",this.handleScroll)},unmounted(){this.handleViewportSize&&this.handleViewportSize(),this.onStickyResize&&document.removeEventListener("theme:resize:width",this.onStickyResize),this.onZoomOpen&&document.removeEventListener("pdp-zoom:open",this.onZoomOpen),this.onZoomClose&&document.removeEventListener("pdp-zoom:close",this.onZoomClose),this.cookieLiftTimer&&clearTimeout(this.cookieLiftTimer),this.onCookieBarChange&&(document.removeEventListener("cookie-bar:change",this.onCookieBarChange),document.removeEventListener("chat:hide",this.onCookieBarChange),document.removeEventListener("chat:show",this.onCookieBarChange)),window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("membershipPriceUpdated",this.handleMembershipPriceUpdate),this.clearStickyAtcState()},methods:{isStickyAtcViewport(){var e,t;return window.innerWidth<=(null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium)},clearStickyAtcState(){var e;
1null==(e=document.querySelector(".template-product"))||e.classList.remove("sticky-atc-container-visible"),document.documentElement.classList.remove("sticky-atc-container-visible"),document.documentElement.style.removeProperty("--sticky-atc-shift"),this.stickyVisible=!1},updateFloatingWidgetLift(e){const t=e.getBoundingClientRect().top,i=parseFloat(getComputedStyle(e).getPropertyValue("--sticky-atc-offset"))||0,o=Math.round(Math.max(0,window.innerHeight-t-i));document.documentElement.style.setProperty("--sticky-atc-shift",`${o}px`)},syncFloatingWidgetLift(){this.toggleVisibility(),requestAnimationFrame((()=>this.toggleVisibility())),this.cookieLiftTimer&&clearTimeout(this.cookieLiftTimer),this.cookieLiftTimer=setTimeout((()=>this.toggleVisibility()),550)},toggleVisibility(){if(this.zoomOpen)return;const e=document.querySelector(".PDPaddToCart .btn--add-to-cart");if(!e)return;if(!this.isStickyAtcViewport())return void this.clearStickyAtcState();const t=e.getBoundingClientRect().bottom<0,i=document.querySelector(".sticky-atc-container");i&&i.classList.toggle("opacity-0",!t);const o=document.querySelector(".template-product"),s=!i||"none"===i.style.display,r=Boolean(o&&t&&!s);o&&o.classList.toggle("sticky-atc-container-visible",r),document.documentElement.classList.toggle("sticky-atc-container-visible",r),r?this.updateFloatingWidgetLift(i):document.documentElement.style.removeProperty("--sticky-atc-shift"),this.stickyVisible=r},handleScroll(){this.checkScrollPosition(),this.toggleVisibility(),this.updateStickyButtonPosition()},checkScrollPosition(){const e=document.querySelector(".sticky-atc-container");if(!e)return;this.stickyBarHeight=e.offsetHeight||this.stickyBarHeight||0;const t=parseFloat(getComputedStyle(e).getPropertyValue("--sticky-atc-offset"))||0,i=document.documentElement.scrollHeight-(window.scrollY+window.innerHeight);e.style.display=i<=this.stickyBarHeight+t?"none":"flex"},updateStickyButtonPosition(){const e=document.querySelector(".sticky-atc-container");if(!e)return;const t=document.getElementById("site-cb-footer"),i=!!t&&document.body.classList.contains("cb-showing")&&!t.classList.contains("hidden-bar");e.style.setProperty("--sticky-atc-offset",i?"50px":"0px")},CBPositionAddToCart(){this.updateStickyButtonPosition()},initializeStickyATC(){var e;(null==(e=this.$refs.stickyATCBtn)?void 0:e.$el)&&(this.isStickyAtcViewport()?(this.stickyAtcInitialized||(this.CBPositionAddToCart(),this.stickyAtcInitialized=!0),this.handleScroll()):this.clearStickyAtcState())},scrollToVariantData(){let e=document.querySelector(".color-variant-options")||document.querySelector(".size-variant-options")||document.querySelector(".width-variant-options"),t=document.querySelector(".header__wrapper").clientHeight,i=e.getBoundingClientRect().top+window.scrollY-t;window.scrollTo({top:i,behavior:"smooth"})},getVariantData(){let e=document.querySelector(".image-swatches.selected")||document.querySelector(".color-swatches.selected");this.selectedColor=e?"Default Title"===e.getAttribute("data-color")?"OS":e.getAttribute("data-color"):"OS";let t=document.querySelector(".option2.selected");this.selectedSize=t?t.textContent:null;let i=document.querySelector(".option3.selected");return this.selectedBling=i?i.textContent:null,[this.selectedColor,this.selectedSize,this.selectedBling].filter(Boolean).join(" / ")},checkComingSoonState(e){e.forEach((e=>{e===this.comingsoon_tag&&(this.comingSoonProduct=!0)}))},checkShouldFormShow(){this.instock&&(this.showingForm=!1),this.comingSoonProduct&&(this.showingForm=!1)},checkIfKlaviyoLoaded(){if(window.klaviyo)return!0},checkKlaviyo(){"false"!=this.enable_klaviyo&&(this.instock||this.notavail||this.comingSoonProduct?this.klaviyoFormShowing=!1:this.klaviyoFormShowing=!0)},checkSoldOutMessage(){let e=this.SoldOutText;return this.notavail&&(e=this.UnavailableText),this.hideButton||(e=this.NotifyMeText,this.showingForm=!0),e},convertToCurrency(e){let t=Intl.NumberFormat("en-US",{style:"currency",currency:this.currencyCode}).format(e).replace(".00","");return t.includes("CA")&&(t=t.replace("CA",""),t+=" CAD"),t}}},[["render",function(e,t,i,o,n,d){const u=c("PDPaddToCartButton");return O((r(),s("div",null,[a("div",{class:p("checkKlaviyo"+d.checkKlaviyo())},null,2),a("div",yr,[a("button",{class:"sticky-variant-data",onClick:t[0]||(t[0]=e=>d.scrollToVariantData()),ref:"stickyVariantData"},[a("span",{innerHTML:d.getVariantData()},null,8,vr)],512),g(u,{ref:"stickyATCBtn",instock:n.instock,comingSoonProduct:n.comingSoonProduct,success:n.success,addToCartText:n.addToCartText,comingsoonText:n.comingsoonText,variantPrice:n.variantPrice,membershipPrice:n.membershipPrice,useMemberPrice:n.useMemberPrice,soldOutText:n.SoldOutText,unavailableText:n.UnavailableText,notifyMeText:n.NotifyMeText,notavail:n.notavail,showingForm:n.showingForm,variantId:n.variantId,formEmail:n.formEmail,loading:n.loading,klaviyoFormShowing:n.klaviyoFormShowing,klaviyo_key:n.klaviyo_key,emailFormValidationError:n.emailFormValidationError,isSticky:!0,scrollToVariantData:d.scrollToVariantData,formEmailList:n.formEmailList,formEmailListId:n.formEmailListId},null,8,["instock","comingSoonProduct","success","addToCartText","comingsoonText","variantPrice","membershipPrice","useMemberPrice","soldOutText","unavailableText","notifyMeText","notavail","showingForm","variantId","formEmail","loading","klaviyoFormShowing","klaviyo_key","emailFormValidationError","scrollToVariantData","formEmailList","formEmailListId"])]),n.success?(r(),s("p",{key:0,innerHTML:n.NotifyMeSuccess,class:"successMessage"},null,8,br)):l("",!0)],512)),[[B,n.showWidget]])}],["__file","PDPaddToCartSticky.vue"]]),_r={key:0,class:"variant__countdown"},Cr={key:0,class:"gt-p__small"},Pr={key:1,class:"gt-p__small"},kr=["innerHTML"],Tr={key:2,class:"gt-p__small"},Ir={key:3,class:"gt-p__small"};const Ar=fe({name:"PDPinventory",data:()=>({quantityAvailable:"",inventoryCountdown:"",showInventoryMessage:"",showAlways:"",instock:"",notavail:"",productType:"",show:!1}),mounted(){this.inventoryCountdown=this.$el.parentElement.getAttribute("data-inventory-countdown"),this.showInventoryMessage=this.$el.parentElement.getAttribute("data-show-inventory-message"),this.showAlways=this.$el.parentElement.getAttribute("data-show-style"),fp.on("updateAddButton",(e=>{this.quantityAvailable=e.quantityAvailable,this.instock=e.instock,this.notavail=e.notavail,this.productType=e.productType,this.show=this.shouldShowWidget(e.quantityAvailable)}))},methods:{shouldShowWidget(e){let t=!1;return"true"===this.showAlways&&"true"===this.showInventoryMessage&&(t=!0),parseInt(e)<parseInt(this.inventoryCountdown)&&(t=!0),"false"===this.showInventoryMessage&&(t=!1),"Gift Card"===this.productType&&(t=!1),t}}},[["render",function(e,t,i,o,n,d){return n.show?(r(),s("p",_r,[n.quantityAvailable>=n.inventoryCountdown?(r(),s("span",Cr,"Item is in stock")):l("",!0),n.quantityAvailable<n.inventoryCountdown?(r(),s("span",Pr,[t[0]||(t[0]=f("Only ",-1)),a("span",{innerHTML:n.quantityAvailable},null,8,kr),t[1]||(t[1]=f(" left in stock",-1))])):l("",!0),!1===n.instock&&!1===n.notavail?(r(),s("span",Tr,"Item is out of stock")):l("",!0),!0===n.notavail?(r(),s("span",Ir,"Item is unavailable")):l("",!0)])):l("",!0)}],["__file","PDPinventory.vue"]]),Lr={class:"pdp-price-block"},Er=["innerHTML"],Mr=["innerHTML"],xr=["innerHTML"],Or=["innerHTML"],Br={key:1,class:"final-sale"};const Fr=fe({name:"PDPPriceBlock",data:()=>({currentPrice:"",comparePrice:"",currentPriceNumber:"",comparePriceNumber:"",countryCode:"",currencyCode:"",showPercentage:!1,isFinalSale:!1,isOutfitPicker:!1,currentVariantPrice:"",final_sale_tag:"final-sale",localProductId:null,localProductHandle:null,priceBlockIndex:null,showOriginalOnSalePrice:!1}),computed:{percentage:function(){return this.handlePercentage()}}
1,mounted(){this.canadaFinalSale=window.canadaFinalSale,this.countryCode=window.Shopify.country,this.showCanadaFinalSale=this.canadaFinalSale&&"CA"===this.countryCode,this.currencyCode=window.Shopify.currency.active,this.showPercentage=this.$el.parentElement.dataset.showPercentage,this.isFinalSale="true"===this.$el.parentElement.dataset.finalSale,this.localProductId=this.$el.parentElement.dataset.productId,this.localProductHandle=this.$el.parentElement.dataset.productHandle,this.isOutfitPicker="true"===this.$el.parentElement.dataset.isOutfitPicker,this.isOutfitPicker&&(this.priceBlockIndex=Number(this.$el.parentElement.dataset.outfitPickerPriceBlockIndex)),this.showOriginalOnSalePrice="true"===this.$el.parentElement.dataset.showOriginalOnSalePrice,fp.on("pdp-color-updated",(e=>{e.pid&&window.dispatchEvent(new CustomEvent("authentic:membership-parent-id-change",{bubbles:!0,detail:{pid:e.pid}}))})),fp.on("pdp-tags-updated",(e=>{const t=e.tags;this.isFinalSale=!1,this.isFinalSale=t.includes(this.final_sale_tag)})),fp.on("updateAddButton",(e=>{if(this.isOutfitPicker)return;const t=e=>e?String(e).replace(/\D+/g,""):"",i=t(e.parentId)&&t(this.localProductId)&&t(e.parentId)===t(this.localProductId),o=e.handle&&this.localProductHandle&&String(e.handle)===String(this.localProductHandle);(i||o)&&(e.variantPrice!==this.currentVariantPrice&&window.dispatchEvent(new CustomEvent("authentic:variant-price-change",{bubbles:!0,detail:{variantPrice:e.variantPrice}})),this.currentVariantPrice=e.variantPrice,this.currentPrice=this.convertToCurrency(e.variantPrice),this.comparePrice=this.convertToCurrency(e.comparePrice),this.currentPriceNumber=parseFloat(e.variantPrice)||0,this.comparePriceNumber=parseFloat(e.comparePrice)||0)})),fp.on("updatePriceBlock",(e=>{e.isOutfitPicker===this.isOutfitPicker&&(this.isOutfitPicker&&e.blockIndex!==this.priceBlockIndex||(this.currentVariantPrice=e.variantPrice,this.currentPrice=this.convertToCurrency(e.variantPrice),this.comparePrice=this.convertToCurrency(e.comparePrice),this.currentPriceNumber=parseFloat(e.variantPrice)||0,this.comparePriceNumber=parseFloat(e.comparePrice)||0))}))},methods:{handlePercentage(){return this.currentPriceNumber&&this.currentPriceNumber&&"true"==this.showPercentage&&""!=this.comparePriceNumber&&isFinite(Math.round((this.comparePriceNumber-this.currentPriceNumber)/this.comparePriceNumber*100))?Math.round((this.comparePriceNumber-this.currentPriceNumber)/this.comparePriceNumber*100):""},checkClass(){return this.comparePriceNumber>0&&this.comparePriceNumber>this.currentPriceNumber?"product__price--sale":""},convertToCurrency(e){let t=Intl.NumberFormat("en-US",{style:"currency",currency:this.currencyCode}).format(e).replace(".00","");return t.includes("CA")&&(t=t.replace("CA",""),t+=" CAD"),isNaN(e)?"":t}}},[["render",function(e,t,i,o,n,d){return r(),s("div",Lr,[a("div",null,[a("span",{"data-product-price":"",class:p(d.checkClass()),innerHTML:n.currentPrice},null,10,Er),n.comparePriceNumber>0&&n.comparePriceNumber>n.currentPriceNumber?(r(),s("span",{key:0,class:"pdp-sale markdown","data-price-sale-amount":"",innerHTML:n.comparePrice},null,8,Mr)):l("",!0),""!=d.percentage&&d.percentage>0?(r(),s("span",{key:1,class:"gt-p__small--x on-sale percentage",innerHTML:"("+d.percentage+"% off)"},null,8,xr)):l("",!0)]),"CA"===n.countryCode&&e.canadaFinalSale?(r(),s("span",{key:0,class:"final-sale",innerHTML:e.canadaFinalSale},null,8,Or)):l("",!0),n.isFinalSale&&"CA"!==n.countryCode||n.isFinalSale&&"CA"==n.countryCode&&!e.canadaFinalSale?(r(),s("span",Br,"Final Sale")):l("",!0)])}],["__file","PDPPriceBlock.vue"]]),Dr={"aria-hidden":"true",focusable:"false",role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 23 24"};const $r=fe({name:"IconSearch"},[["render",function(e,t,i,o,n,l){return r(),s("svg",Dr,[...t[0]||(t[0]=[a("path",{d:"M21 21L15.5 15.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1),a("circle",{cx:"10",cy:"9",r:"8",stroke:"currentColor","stroke-width":"2"},null,-1)])])}],["__file","IconSearch.vue"]]),zr={name:"LiveSearch",directives:{clickOutside:$.directive},components:{IconSearch:$r},data(){var e,t;return{currencyCode:window.Shopify.currency.active,searchResults:[],placeHolder:"Search",searchInput:"",defaultQuery:"",defaultQueryEnabled:!1,defaultSuggestions:"",defaultCategories:"",suggestions:[],categories:[],categoryHandles:[],showCrosssellPercentage:!1,defaultResults:null,isInputFocused:!1,isMobile:window.innerWidth<=(null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium),isNavigating:!1,searchRequestId:0}},mounted(){var e;this.handleViewportSize=ge(this),this.debouncedHideMobile=G(this.shouldHideMobile),this.debouncedCheckAnnouncement=G(this.checkForAnnouncementBar),this.debouncedOnChanger=G(this.onChanger,200,!1),this.defaultQuery=this.$el.parentElement.dataset.defaultQuery,this.defaultQueryEnabled="true"===this.$el.parentElement.dataset.defaultQueryEnabled,this.defaultSuggestions=this.$el.parentElement.dataset.defaultSuggestions,this.suggestions=this.defaultQueryEnabled&&this.defaultSuggestions?this.defaultSuggestions.split(","):this.searchResults.popularSearches,this.defaultCategories=this.$el.parentElement.dataset.defaultCategories;const t=this.$el.parentElement.dataset.defaultCategoryTitles,i=this.$el.parentElement.dataset.defaultCategoryHandles;if(this.defaultQueryEnabled&&t&&i)try{this.categories=JSON.parse(t),this.categoryHandles=JSON.parse(i)}catch(o){this.categories=(this.defaultCategories||"").split(",").filter(
1Boolean),this.categoryHandles=this.categories.slice()}else this.categories=this.defaultQueryEnabled?this.defaultCategories.split(",").filter(Boolean):this.searchResults.categories||[],this.categoryHandles=this.categories.slice();this.loadHandler=()=>{window.addEventListener("scroll",this.debouncedCheckAnnouncement),this.debouncedCheckAnnouncement()},window.addEventListener("scroll",this.debouncedHideMobile),window.addEventListener("load",this.loadHandler),this.onResize=()=>{var e,t;this.isMobile=window.innerWidth<=(null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium)},document.addEventListener("theme:resize:width",this.onResize),this.onPageShow=e=>{e.persisted&&(this.isNavigating=!1,this.searchRequestId++,this.defaultResults=null)},window.addEventListener("pageshow",this.onPageShow),this.onPopdownClose=e=>{e.target&&e.target.contains&&e.target.contains(this.$el)&&this.closeSearchResults()},document.addEventListener("theme:scroll:unlock",this.onPopdownClose),this.checkDirectSearchNavigation(),this.showCrosssellPercentage="true"===(null==(e=window.siteGlobals)?void 0:e.crosssell_show_percentage_off)},beforeUnmount(){this.handleViewportSize&&this.handleViewportSize(),window.removeEventListener("scroll",this.debouncedHideMobile),window.removeEventListener("scroll",this.debouncedCheckAnnouncement),window.removeEventListener("load",this.loadHandler),window.removeEventListener("pageshow",this.onPageShow),document.removeEventListener("theme:resize:width",this.onResize),document.removeEventListener("theme:scroll:unlock",this.onPopdownClose)},computed:{getCurrentLocales(){let e=window.Shopify.routes.root;return e.endsWith("/")?e.slice(0,-1):e},mobileSearchSeeAll(){return`See All Results for "<strong>${this.escapeHtml(this.searchInput.trim())}</strong>" >`}},methods:{escapeHtml:e=>e?String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):"",resetToDefaultSearchResults(){if(!this.defaultQueryEnabled)return this.suggestions=[],void(this.categories=[]);this.suggestions=this.defaultSuggestions&&this.defaultSuggestions.length?this.defaultSuggestions.split(",").filter(Boolean):[];const e=this.$el.parentElement.dataset.defaultCategoryTitles,t=this.$el.parentElement.dataset.defaultCategoryHandles;if(e&&t)try{this.categories=JSON.parse(e),this.categoryHandles=JSON.parse(t)}catch(i){this.categories=(this.defaultCategories||"").split(",").filter(Boolean),this.categoryHandles=this.categories.slice()}else this.categories=(this.defaultCategories||"").split(",").filter(Boolean),this.categoryHandles=this.categories.slice()},loadDefaultResults(){if(!this.defaultQueryEnabled)return;this.resetToDefaultSearchResults();const e=this.searchRequestId;this.defaultResults?this.searchResults=this.defaultResults:ee((()=>{window.FastSimonSDK.instantSearch({query:this.defaultQuery,callback:t=>{var i;(null==t?void 0:t.payload)&&t.payload.query===this.defaultQuery.trim()&&(this.defaultResults=t.payload,(null==(i=t.payload.turbolinks)?void 0:i.length)>0&&(t.payload.turbolinks.forEach((e=>{this.allTurbolinks.add(JSON.stringify(e))})),this.updateTurbolinks()),this.searchInput||e!==this.searchRequestId||(this.searchResults=t.payload))}})}))},checkForAnnouncementBar(){let e=document.querySelector(".announcement__wrapper"),t=document.querySelector(".search-popdown");e&&window.scrollY<33?t.style.top=e.clientHeight+"px":t.style.top=0},getSearchQuery(){let e=new URLSearchParams(window.location.search),t="";return e.get("q")&&(t=e.get("q")),t},setTurbolinkCollectionFlag(e){e.includes("/collections/")&&localStorage.setItem("fromTurboLink","true")},cancelPendingSearch(){var e;null==(e=this.debouncedOnChanger)||e.cancel()},checkDirectSearchNavigation(){const e=this.getSearchQuery();e&&window.location.pathname.includes("/pages/search-results")&&(this.cancelPendingSearch(),this.resolveTurbolink(e,!1))},updateTurbolinks(){this.turbolinks=Array.from(this.allTurbolinks).map((e=>JSON.parse(e)))},syncInputValue(){const e=this.$refs.searchInput;e&&e.value!==this.searchInput&&(this.searchInput=e.value)},onChanger(){if(this.isNavigating)return;if(this.syncInputValue(),!this.searchInput)return this.searchRequestId++,this.searchResults=[],void(this.defaultQueryEnabled?this.loadDefaultResults():(this.suggestions=[],this.categories=[]));const e=++this.searchRequestId,t=this.searchInput.trim();ee((()=>{e===this.searchRequestId&&window.FastSimonSDK.instantSearch({query:t,callback:t=>{e===this.searchRequestId&&(null==t?void 0:t.payload)&&(this.searchResults=t.payload,this.suggestions=t.payload.popularSearches||[],this.categories=t.payload.categories||[])}})}))},resolveTurbolink(e,t){const i=e.trim();if(!i)return;let o=!1;const s=()=>{o||t&&(o=!0,window.location=this.getSearchResultsUrl(i))};ee((()=>{const e=setTimeout(s,4e3);window.FastSimonSDK.fullTextSearch({term:i,callback:t=>{var i,r;if(o)return;const a=null==(r=null==(i=null==t?void 0:t.payload)?void 0:i.turbolink)?void 0:r.u;if(a)return clearTimeout(e),o=!0,this.setTurbolinkCollectionFlag(a),void(window.location.href=a);"facets and products"===(null==t?void 0:t.action)&&(clearTimeout(e),s())}})}
1),{onTimeout:s})},submitSearch(e,t){(null==e?void 0:e.preventDefault)&&e.preventDefault(),(null==e?void 0:e.stopPropagation)&&e.stopPropagation(),this.navigateToSearchResults(t)},navigateToSearchResults(e){const t=(null!=e?String(e):this.searchInput).trim();t&&(this.cancelPendingSearch(),this.isNavigating=!0,this.resolveTurbolink(t,!0))},getSearchResultsUrl(e){return this.getCurrentLocales+"/pages/search-results?q="+encodeURIComponent(String(e).trim())},getSearchLink(e){return this.getSearchResultsUrl(e)},getCategoryDisplayLabel(e,t){if("string"==typeof e){const i=e||"";return i&&i===(this.categoryHandles[t]||"")?i.replace(/-/g," "):i}return e&&e.l?e.l:e||""},trackFastSimon(e){ee((()=>{const t=localStorage.getItem("fromTurboLink");t&&localStorage.removeItem("fromTurboLink"),window.FastSimonSDK.event({eventName:window.FastSimonEventName.AutocompleteProductClicked,data:{query:this.searchInput,productID:e.id,productQuery:e.s,fromTurboLink:"true"===t}})}))},setPriceDisplay(e,t,i){let o='<span class="search-flydown--product-title">'+e+"</span><br />";if(""!=t&&"0.00"!=t){if(o=o+'<span class="price on-sale">'+this.convertToCurrency(i)+"</span>",o=o+'<span class="compare-at gt-p__small">'+this.convertToCurrency(t)+"</span>",this.showCrosssellPercentage){o=o+'<small class="gt-p__small--x"><span class="percentage-off on-sale">('+Math.floor((t-i)/t*100)+"% off)</span></small>"}}else o=o+'<span class="price">'+this.convertToCurrency(i)+"</span>";return o},convertToCurrency(e){let t=Intl.NumberFormat("en-US",{style:"currency",currency:this.currencyCode}).format(e).replace(".00","");return t.includes("CA")&&(t=t.replace("CA",""),t+=" CAD"),t},clearSearchResults(){this.searchInput="",this.searchRequestId++,this.defaultQueryEnabled?(this.searchResults=[],this.loadDefaultResults()):(this.isInputFocused=!0,this.$refs.searchInput&&this.$refs.searchInput.focus(),this.loadDefaultResults())},shouldHideMobile(){const e=document.getElementById("live-search");window.scrollY&&e&&(window.scrollY>200?e.classList.add("mobile-hide"):e.classList.remove("mobile-hide"))},closeSearchResults(){this.searchInput="",this.searchRequestId++,this.searchResults=[],this.resetToDefaultSearchResults()},onTouchStart(){this.$refs.searchInput.focus()},onInputClick(){this.$refs.searchInput.focus()},onDoubleClick(){this.$refs.searchInput.select()},onFocus(){this.isInputFocused=!0,this.isNavigating=!1,this.searchInput||this.loadDefaultResults()},onBlur(e){if(this.isNavigating)return;const t=e.relatedTarget||document.activeElement,i=this.$el.querySelector(".search-flydown");t&&i&&i.contains(t)||setTimeout((()=>{document.activeElement===this.$refs.searchInput||this.isNavigating||(this.isInputFocused=!1)}),150)},onLinkMouseDown(){this.isNavigating=!0},onLinkClick(){setTimeout((()=>{this.isNavigating=!1}),300)},onProductClick(e){this.onLinkClick(),this.trackFastSimon(e)}}},Hr={class:"live-search-form form-fields-inline",method:"get",role:"search","aria-label":"Product"},Rr={class:"form-field no-label"},Nr=["placeholder"],Vr={class:"search-icon search-icon--inactive"},qr={class:"search__predictive__close"},Ur={class:"search-flydown"},Gr={class:"suggestion-wrapper"},Wr={class:"search-flydown--content-items search-suggestions"},Kr={key:0},jr={class:"search-flydown--content-items-list"},Qr=["onClick","href","innerHTML"],Zr=["href","innerHTML"],Jr={class:"search-flydown--content-items search-categories"},Yr={key:0},Xr={class:"search-flydown--content-items-list"},ea=["href","textContent"],ta={class:"search-flydown--content-items search-products"},ia=["onClick","href"],oa={class:"search-flydown--product-image"},sa=["src","alt"],ra={class:"search-flydown--product-text"},aa=["innerHTML"],na={class:"search-flydown--footer-wrapper"},la={key:0,class:"search-flydown--footer"},da=["href"];const ca=fe(zr,[["render",function(e,t,i,o,n,f){var w,y;const v=c("IconSearch"),b=z("click-outside");return O((r(),s("div",Hr,[a("div",Rr,[O(a("input",{class:"form-field-input live-search-form-field gt-p",type:"text",name:"q","aria-label":"Search",placeholder:this.placeHolder,autocomplete:"off",onInput:t[0]||(t[0]=(...t)=>e.debouncedOnChanger&&e.debouncedOnChanger(...t)),onCompositionend:t[1]||(t[1]=(...t)=>e.debouncedOnChanger&&e.debouncedOnChanger(...t)),"onUpdate:modelValue":t[2]||(t[2]=e=>n.searchInput=e),onKeydown:t[3]||(t[3]=x(u(((...e)=>f.submitSearch&&f.submitSearch(...e)),["prevent","stop"]),["enter"])),onTouchstart:t[4]||(t[4]=(...e)=>f.onTouchStart&&f.onTouchStart(...e)),onClick:t[5]||(t[5]=(...e)=>f.onInputClick&&f.onInputClick(...e)),onFocus:t[6]||(t[6]=(...e)=>f.onFocus&&f.onFocus(...e)),onBlur:t[7]||(t[7]=(...e)=>f.onBlur&&f.onBlur(...e)),onDblclick:t[8]||(t[8]=(...e)=>f.onDoubleClick&&f.onDoubleClick(...e)),ref:"searchInput"},null,40,Nr),[[F,n.searchInput]]),a("button",{type:"button",onClick:t[9]||(t[9]=u(((...e)=>f.submitSearch&&f.submitSearch(...e)),["prevent"])),class:"live-search-button","aria-label":"Search"}
1,[a("span",Vr,[g(v)])]),n.searchInput?(r(),s("div",{key:0,class:"search__predictive__clear",onClick:t[10]||(t[10]=(...e)=>f.clearSearchResults&&f.clearSearchResults(...e))},[...t[25]||(t[25]=[a("button",{type:"reset",class:"search__predictive__close__inner search-reset","aria-label":"Reset"},"Clear",-1)])])):l("",!0),a("div",qr,[a("button",{type:"button",class:"search__predictive__close__inner","data-close-popdown":"","aria-label":"Close",onClick:t[11]||(t[11]=(...e)=>f.closeSearchResults&&f.closeSearchResults(...e))},[...t[26]||(t[26]=[a("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-close",viewBox:"0 0 15 15"},[a("g",{"fill-rule":"evenodd"},[a("path",{d:"m2.06 1 12.02 12.021-1.06 1.061L1 2.062z"}),a("path",{d:"M1 13.02 13.022 1l1.061 1.06-12.02 12.02z"})])],-1)])])])]),O(a("div",Ur,[a("div",Gr,[a("div",Wr,[n.suggestions&&n.suggestions.length>0?(r(),s("div",Kr,[t[27]||(t[27]=a("div",{class:"fs_autocomplete_links_title"},"Suggestions:",-1)),a("ul",jr,[(r(!0),s(d,null,h(n.suggestions,((e,i)=>(r(),s("li",{class:"search-flydown--content-item",key:i},[a("a",{onMousedown:t[12]||(t[12]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onTouchstart:t[13]||(t[13]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onClick:u((t=>f.submitSearch(t,"string"==typeof e?e:e.label)),["prevent"]),href:f.getSearchLink("string"==typeof e?e:e.label),innerHTML:"string"==typeof e?e:e.label},null,40,Qr)])))),128))])])):l("",!0)]),n.searchInput&&n.searchInput.length>0?(r(),s("a",{key:0,class:"see-all-results",href:f.getSearchLink(n.searchInput),onMousedown:t[14]||(t[14]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onTouchstart:t[15]||(t[15]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onClick:t[16]||(t[16]=u(((...e)=>f.submitSearch&&f.submitSearch(...e)),["prevent"])),innerHTML:f.mobileSearchSeeAll},null,40,Zr)):l("",!0),a("div",Jr,[n.categories&&n.categories.length>0?(r(),s("div",Yr,[t[28]||(t[28]=a("div",{class:"fs_autocomplete_links_title"},"Categories:",-1)),a("ul",Xr,[(r(!0),s(d,null,h(n.categories,((e,i)=>(r(),s("li",{class:"search-flydown--content-item",key:i},[a("a",{onMousedown:t[17]||(t[17]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onTouchstart:t[18]||(t[18]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onClick:t[19]||(t[19]=(...e)=>f.onLinkClick&&f.onLinkClick(...e)),href:f.getCurrentLocales+("string"==typeof e?"/collections/"+(n.categoryHandles[i]||""):e&&e.u?e.u:""),class:p({capitalize:"string"==typeof e}),textContent:m(f.getCategoryDisplayLabel(e,i))},null,42,ea)])))),128))])])):l("",!0)])]),a("div",ta,[(r(!0),s(d,null,h(n.searchResults.products,((e,i)=>(r(),s("div",{class:"search-flydown--product-items",key:i},[a("a",{class:"search-flydown--product",onMousedown:t[20]||(t[20]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onTouchstart:t[21]||(t[21]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onClick:t=>f.onProductClick(e),href:f.getCurrentLocales+e.u},[a("div",oa,[a("img",{src:e.t,alt:e.l},null,8,sa)]),a("div",ra,[a("div",{innerHTML:f.setPriceDisplay(e.l,e.p_c,e.p)},null,8,aa)])],40,ia)])))),128))])],512),[[B,(n.defaultQueryEnabled||n.searchInput)&&(!n.isMobile||n.isInputFocused||!!n.searchInput||n.defaultQueryEnabled)]]),a("div",na,[(null==(y=null==(w=n.searchResults)?void 0:w.products)?void 0:y.length)>0&&n.searchInput?(r(),s("div",la,[a("a",{class:"see-all-results gt-btn btn--outline btn--full btn--primary",href:f.getSearchLink(n.searchInput),onMousedown:t[22]||(t[22]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onTouchstart:t[23]||(t[23]=(...e)=>f.onLinkMouseDown&&f.onLinkMouseDown(...e)),onClick:t[24]||(t[24]=u(((...e)=>f.submitSearch&&f.submitSearch(...e)),["prevent"])),innerHTML:"See all results"},null,40,da)])):l("",!0)])])),[[b,f.closeSearchResults]])}],["__file","LiveSearch.vue"]]),ua={key:0},ha=["src"],pa={key:1};const ma=fe({name:"EndlessScroll",props:{triggerDistance:{type:Number,default:500},loadingImage:{type:String,default:null}},data:()=>({pageCount:0,page:0,hasLoaded:!1,justLoadedNewResults:!1,loadingTimeout:null,observer:null,triggerElement:null,visibilityCheckInterval:null,lastObserverTrigger:null,isPageRestored:!1,pageshowHandler:null,isContentRendering:!1,contentRenderingTimeout:null,comparePidBlocksScroll:!1}),computed:{shouldShowLoading(){return this.page<this.pageCount||this.isContentRendering}}
1,watch:{pageCount(e){e>0&&!this.observer&&this.$nextTick((()=>{this.setupIntersectionObserver()}))}},mounted(){this.triggerElement=this.$el||document.querySelector("#fs-collection-endlessScroll"),fp.on("fs-update-pager",this.handlePagerUpdate),fp.on("fs-new-search-reset",this.handleNewSearchReset),this.handleFilterReset=()=>{this.page=0,this.pageCount=0,this.hasLoaded=!0,this.justLoadedNewResults=!0,this.isContentRendering=!1,this.contentRenderingTimeout&&(clearTimeout(this.contentRenderingTimeout),this.contentRenderingTimeout=null),this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null)},fp.on("fs-filter-reset",this.handleFilterReset),this.comparePidActiveHandler=e=>{this.comparePidBlocksScroll=!0===e},fp.on("plp-compare-pid-active",this.comparePidActiveHandler),this.pageshowHandler=e=>{try{e&&e.persisted&&(this.isPageRestored=!0,requestAnimationFrame((()=>{this.$el&&this.$nextTick((()=>{this.checkAndLoadIfNeeded()}))})))}catch(t){console.debug("[EndlessScroll] pageshow handler error:",t)}},"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("pageshow",this.pageshowHandler,{passive:!0}),this.$nextTick((()=>{if(this.setupIntersectionObserver(),this.isPageRestored)this.startVisibilityCheck(),this.checkAndLoadIfNeeded();else{const e=window.scrollY||window.pageYOffset,t=document.documentElement.scrollHeight;e+(window.innerHeight||document.documentElement.clientHeight)>=t-2*this.triggerDistance?(this.startVisibilityCheck(),this.checkAndLoadIfNeeded()):setTimeout((()=>{this.startVisibilityCheck()}),2e3)}}))},beforeUnmount(){this.loadingTimeout&&clearTimeout(this.loadingTimeout),this.contentRenderingTimeout&&clearTimeout(this.contentRenderingTimeout),this.visibilityCheckInterval&&(clearInterval(this.visibilityCheckInterval),this.visibilityCheckInterval=null),this.observer&&(this.observer.disconnect(),this.observer=null),this.pageshowHandler&&window.removeEventListener("pageshow",this.pageshowHandler),fp.off("fs-update-pager",this.handlePagerUpdate),fp.off("fs-new-search-reset",this.handleNewSearchReset),this.handleFilterReset&&fp.off("fs-filter-reset",this.handleFilterReset),this.comparePidActiveHandler&&fp.off("plp-compare-pid-active",this.comparePidActiveHandler)},methods:{handlePagerUpdate(e){this.pageCount=e.pageCount,this.page=e.page,this.hasLoaded=!1,this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.contentRenderingTimeout&&clearTimeout(this.contentRenderingTimeout),this.page>=this.pageCount?this.isContentRendering=!1:this.contentRenderingTimeout=setTimeout((()=>{this.isContentRendering=!1,this.contentRenderingTimeout=null}),1e3),this.pageCount>0&&!this.observer&&this.$nextTick((()=>{this.setupIntersectionObserver()})),this.justLoadedNewResults=!0;const t=this.isPageRestored?100:500;setTimeout((()=>{this.justLoadedNewResults=!1,this.$nextTick((()=>{const e=this.$el||document.querySelector("#fs-collection-endlessScroll");e&&e!==this.triggerElement&&(this.triggerElement=e),this.observer?e&&e!==this.triggerElement?(this.observer.disconnect(),this.triggerElement=e,this.observer.observe(this.triggerElement)):e&&!this.observer&&this.setupIntersectionObserver():e&&this.pageCount>0&&this.setupIntersectionObserver(),this.shouldShowLoading&&this.isElementVisible()&&!this.hasLoaded&&this.page<this.pageCount&&this.setPage()}))}),t)},handleNewSearchReset(e){this.page=e.page,this.hasLoaded=!1,this.justLoadedNewResults=!0},setupIntersectionObserver(){if(this.triggerElement||(this.triggerElement=this.$el||document.querySelector("#fs-collection-endlessScroll")),!this.triggerElement)return void console.warn("[EndlessScroll] Trigger element not found, observer not created");this.isElementVisible()&&this.shouldShowLoading&&!this.hasLoaded&&!this.justLoadedNewResults&&(this.lastObserverTrigger=Date.now(),this.setPage()),this.observer&&this.observer.disconnect();const e=`${this.triggerDistance}px 0px ${this.triggerDistance}px 0px`;this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(this.lastObserverTrigger=Date.now(),this.setPage())}))}),{root:null,rootMargin:e,threshold:0}),this.observer.observe(this.triggerElement)},isElementVisible(){const e=this.$el||this.triggerElement||document.querySelector("#fs-collection-endlessScroll");
1if(!e)return!1;const t=e.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth;return t.top<i+this.triggerDistance&&t.bottom>-this.triggerDistance&&t.left<o&&t.right>0},startVisibilityCheck(){this.visibilityCheckInterval&&clearInterval(this.visibilityCheckInterval),this.visibilityCheckInterval=setInterval((()=>{if(this.shouldShowLoading&&this.isElementVisible()){const e=this.lastObserverTrigger&&Date.now()-this.lastObserverTrigger<2e3;!this.hasLoaded&&!this.justLoadedNewResults&&this.page<this.pageCount&&!e&&this.setPage()}}),1e3)},setPage(){if(!this.comparePidBlocksScroll&&this.page<this.pageCount&&!1===this.hasLoaded&&!this.justLoadedNewResults){const e=this.page+1,t=document.getElementById("fs-collection-pagination");this.isContentRendering=!0,fp.emit("fs-update-page",e),this.loadingTimeout=setTimeout((()=>{this.hasLoaded&&(this.hasLoaded=!1,this.loadingTimeout=null)}),3e3),this.hasLoaded=!0,t&&(t.style.opacity=0)}},checkAndLoadIfNeeded(){this.shouldShowLoading&&this.isElementVisible()&&!this.hasLoaded&&!this.justLoadedNewResults&&this.page<this.pageCount&&this.setPage(),this.pageCount>0&&!this.observer&&this.setupIntersectionObserver()}}},[["render",function(e,t,i,o,a,d){return r(),s("div",{class:"endless-scroll-loading",style:n({minHeight:a.page<a.pageCount?"auto":"1px"})},[a.page<a.pageCount?(r(),s("div",ua,[i.loadingImage?(r(),s("img",{key:0,src:i.loadingImage,alt:"Loading more products...",class:"endless-scroll-loading-image"},null,8,ha)):(r(),s("span",pa,"Loading..."))])):l("",!0)],4)}],["__scopeId","data-v-8c088a73"],["__file","EndlessScroll.vue"]]),ga={key:0,class:"collection-see-more"},fa=["disabled"];const wa=fe({name:"CollectionSeeMore",data:()=>({page:0,pageCount:0,loading:!1,buttonText:"",loadingText:"",buttonStyle:"",buttonColor:"",buttonTextColor:"",outlineBlur:0,enableGlow:!1,glowLevel:0,glowColor:"",glowHoverColor:"",isHovered:!1}),computed:{hasMorePages(){return this.page<this.pageCount},buttonClasses(){return`${this.buttonStyle} gt-btn`},buttonStyles(){const e={};if(this.buttonTextColor&&(e.color=this.buttonTextColor,e["text-decoration-color"]=this.buttonTextColor),"btn"===this.buttonStyle||"btn--soft"===this.buttonStyle?(e["background-color"]=this.buttonColor,e["border-color"]=this.buttonColor):"btn--outline"===this.buttonStyle&&(e["border-color"]=this.buttonColor,e["backdrop-filter"]=`blur(${this.outlineBlur}px)`,e["-webkit-backdrop-filter"]=`blur(${this.outlineBlur}px)`),this.enableGlow&&("btn"===this.buttonStyle||"btn--outline"===this.buttonStyle)){const t=this.isHovered?this.glowHoverColor:this.glowColor,i=this.isHovered?this.glowLevel+4:this.glowLevel;e["box-shadow"]=`0 0 ${i}px ${t}`}return e}},mounted(){const e=this.$el.parentElement;this.buttonText=e.getAttribute("data-see-more-text"),this.loadingText=e.getAttribute("data-see-more-loading-text"),this.buttonStyle=e.getAttribute("data-button-style"),this.buttonColor=e.getAttribute("data-button-color"),this.buttonTextColor=e.getAttribute("data-button-text-color"),this.outlineBlur=parseInt(e.getAttribute("data-outline-blur")),this.enableGlow="true"===e.getAttribute("data-enable-glow"),this.glowLevel=parseInt(e.getAttribute("data-glow-level")),this.glowColor=e.getAttribute("data-glow-color"),this.glowHoverColor=e.getAttribute("data-glow-hover-color"),this.pagerHandler=e=>{this.pageCount=e.pageCount,this.page=e.page,this.loading=!1},fp.on("fs-update-pager",this.pagerHandler)},beforeUnmount(){fp.off("fs-update-pager",this.pagerHandler)},methods:{loadMore(){!this.loading&&this.hasMorePages&&(this.loading=!0,fp.emit("fs-update-page",this.page+1))}}},[["render",function(e,t,i,o,d,c){return c.hasMorePages?(r(),s("div",ga,[a("button",{class:p(c.buttonClasses),style:n(c.buttonStyles),disabled:d.loading,onClick:t[0]||(t[0]=(...e)=>
1c.loadMore&&c.loadMore(...e)),onMouseenter:t[1]||(t[1]=e=>d.isHovered=!0),onMouseleave:t[2]||(t[2]=e=>d.isHovered=!1)},m(d.loading?d.loadingText:d.buttonText),47,fa)])):l("",!0)}],["__scopeId","data-v-486e0cbd"],["__file","CollectionSeeMore.vue"]]),ya={name:"ProductRecommendations",components:{ProductListItem:Ei,ProductListPromo:Oi,Carousel:P,Slide:C,Navigation:S},props:{pid:{type:String,required:!0}},data(){return{localPid:this.pid,carouselCount:0,carouselCountMatch:!1,currentSlide:0,isGrid:!1,maxProductsForGrid:0,gridDesktop:5,gridMobile:1.2,gridTablet:3,product_type:"",holderItems:[],itemsToScroll:1,itemsToShow:1.2,productImageName:"",productReommendationProducts:[],productsOnDisplay:[],scrollbar:"",scrollbarHide:"hide",scrollbarNumLoaded:0,scrollbarTrack:"",scrollbarWidth:"",selectedFilter:"product-recommendation",slideNextBtn:"",slidePrevBtn:"",slidesCount:0,titleHeading:"",trackWidth:"",default_title:"",arrow_left_image:"",arrow_left_image_alt:"",arrow_left_image_width:"",arrow_left_image_height:"",arrow_left_image_disabled:"",arrow_left_image_disabled_alt:"",arrow_left_image_disabled_width:"",arrow_left_image_disabled_height:"",arrow_custom_on:!1,arrow_custom_off:!1,onScreen:!1,productCategoryMetafieldOneAttr:"",productCategoryMetafieldTwoAttr:"",productCategoryMetafieldOneCollectionAttr:"",productCategoryMetafieldTwoCollectionAttr:"",productReminderMetafieldEmbedAttr:"",setReminderLinkText:window.siteGlobals.set_reminder_link_text,FS_Widget_Id_Placement_1:"",FS_Widget_Title_1:"",FS_Widget_Id_Placement_2:"",FS_Widget_Title_2:"",FS_Widget_Id_Placement_3:"",FS_Widget_Title_3:"",FS_Widget_Id_Placement_4:"",FS_Widget_Title_4:"",FS_Widget_Id_Placement_5:"",FS_Widget_Title_5:"",FS_Product_Data:{},defaultFSWidgetId:"",showWidget:!1,showTabs:!1,minProductsToShow:"",showCrosssellPercentage:"false",useFsProductData:"",hideSwatches:!0,disableSlider:!1,isLoadingTab:!1,bottomPillBadgePadding:0,tabsPill:!1,stackedOnLeft:!1}},computed:{hasWidgetsWithProducts(){return Object.values(this.FS_Product_Data).some((e=>e.products&&e.products.length>0))},isMobile:()=>window.innerWidth<=window.theme.sizes.medium},mounted(){this.handleViewportSize=ge(this),this.gridDesktop=this.$el.parentElement.getAttribute("data-grid-desktop"),this.gridMobile=this.$el.parentElement.getAttribute("data-grid-mobile"),this.minProductsToShow=this.$el.parentElement.getAttribute("data-min-products-to-show"),this.gridTablet=this.$el.parentElement.getAttribute("data-grid-tablet")?this.$el.parentElement.getAttribute("data-grid-tablet"):this.gridTablet,this.productCategoryMetafieldOneAttr=window.siteGlobals.product_cat_metafield_one||"",this.productCategoryMetafieldTwoAttr=window.siteGlobals.product_cat_metafield_two||"",this.productCategoryMetafieldOneCollectionAttr=window.siteGlobals.product_cat_metafield_one_collection||"",this.productCategoryMetafieldTwoCollectionAttr=window.siteGlobals.product_cat_metafield_two_collection||"",this.productReminderMetafieldEmbedAttr=window.siteGlobals.set_reminder_metafield,this.productImageName=this.$el.parentElement.getAttribute("data-product_swatch_name"),this.product_type=this.$el.parentElement.getAttribute("data-product_type"),this.titleHeading=this.$el.parentElement.getAttribute("data-title"),this.default_title=this.$el.parentElement.getAttribute("data-default_title"),this.arrow_custom_on="true"===this.$el.parentElement.getAttribute("data-arrow_custom_on"),this.arrow_custom_off=this.$el.parentElement.getAttribute("data-arrow_custom_off"),this.showTabs="true"===this.$el.parentElement.dataset.showTabs,this.isGrid="true"===this.$el.parentElement.dataset.isGrid,this.maxProductsForGrid=parseInt(this.$el.parentElement.dataset.maxProductsForGrid),this.tabsPill="true"===this.$el.parentElement.dataset.tabsPill,this.stackedOnLeft="true"===this.$el.parentElement.dataset.stackedOnLeft,this.showCrosssellPercentage=this.$el.parentElement.getAttribute("data-show-crosssell-percentage")||"false";const e=this.$el.parentElement.getAttribute("data-use-fs-product-data")||this.$el.parentElement.getAttribute("data-use_fs_product_data");this.useFsProductData="true"===e?"true":"";const t=this.$el.parentElement.getAttribute("data-hide-swatches");this.hideSwatches="false"!==t;const i=this.$el.parentElement.getAttribute("data-disable-slider");this.disableSlider="true"===i,this.currentSlide=0,this.slidesCount=0;["arrow_left_image","arrow_left_image_alt","arrow_left_image_width","arrow_left_image_height","arrow_left_image_disabled","arrow_left_image_disabled_alt","arrow_left_image_disabled_width","arrow_left_image_disabled_height"].forEach((e=>{this[e]=this.$el.parentElement.getAttribute(`data-${e}`)}));for(let o=1;o<=5;o++){this[`FS_Widget_Id_Placement_${o}`]=this.$el.parentElement.getAttribute(`data-FS_Widget_Id_Placement_${o}`),this[`FS_Widget_Title_${o}`]=this.$el.parentElement.getAttribute(`data-FS_Widget_Title_${o}`);let e=this[`FS_Widget_Id_Placement_${o}`],t=this[`FS_Widget_Title_${o}`];""!=e&&null!=e&&(this.FS_Product_Data[e]={title:t,products:[]})}this.delayGetProductRecs(),fp.on("pdp-tags-updated",(e=>{this.localPid!=e.pid&&(this.localPid=e.pid,this.productsOnDisplay=[],this.delayGetProductRecs())})),fp.on("bundle-child-handle-updated",(({handle:e})=>{this.resetRecommendations(),this.fetchProductIdFromHandle(e)})),fp.on("bundled-product-selected",(({handle:e})=>{this.resetRecommendations(),this.fetchProductIdFromHandle(e)})),window.addEventListener("resize",(()=>{G(this.getClientWidth())})),this.getClientWidth()},unmounted(){this.handleViewportSize&&this.handleViewportSize()},methods:{delayGetProductRecs(){setTimeout((()=>{this.getProductRecs()}),1e3),this.getClientWidth()}
1,resetFsProductData(){Object.keys(this.FS_Product_Data).forEach((e=>{const t=this.FS_Product_Data[e];t&&t.products&&(t.products=[])}))},resetRecommendations(){this.productsOnDisplay=[],this.productReommendationProducts=[],this.scrollbarNumLoaded=0,this.showWidget=!1,this.isLoadingTab=!0,this.resetSlideShow(),this.resetFsProductData()},resetSlideShow(){var e,t,i,o;this.currentSlide=0,""!==this.slidePrevBtn&&(null==(e=this.slidePrevBtn)||e.setAttribute("disabled","disabled"),null==(t=this.slidePrevBtnCustom)||t.setAttribute("disabled","disabled")),""!==this.slideNextBtn&&(null==(i=this.slideNextBtn)||i.removeAttribute("disabled"),null==(o=this.slideNextBtnCustom)||o.removeAttribute("disabled"))},async fetchProductIdFromHandle(e){var t;if(e)try{const i=await fetch(`/products/${e}.json`);if(!i.ok)throw new Error(`Failed to fetch product for handle ${e}`);const o=await i.json(),s=(null==(t=null==o?void 0:o.product)?void 0:t.id)?o.product.id.toString():null;s&&(this.localPid=s,this.productsOnDisplay=[],this.delayGetProductRecs())}catch(i){te(`Error fetching product ID for handle: ${e}`,i),this.showWidget=!1,this.productsOnDisplay=[],this.productReommendationProducts=[],this.isLoadingTab=!1}},isSelected(e){return e===this.selectedFilter?"current tab-link gt-p__bold":"tab-link gt-p"},getClientWidth(){const e=window.innerWidth;e<=window.theme.sizes.medium?(this.itemsToShow=Number(this.gridMobile),this.itemsToScroll=Number(this.gridDesktop)):e>window.theme.sizes.medium&&e<=window.theme.sizes.large?(this.itemsToShow=Number(this.gridTablet),this.itemsToScroll=Number(this.gridTablet)):e>window.theme.sizes.large&&(this.itemsToShow=Number(this.gridDesktop),this.itemsToScroll=Number(this.gridDesktop))},slidePrev(){const e=this.$refs.recommendationCarousel;if(!e)return;e.data.currentSlide>0&&e.prev(),this.updateNavigationButtons(e)},slideNext(){const e=this.$refs.recommendationCarousel;if(!e)return;e.data.currentSlide<e.data.maxSlide&&e.next(),this.updateNavigationButtons(e)},updateNavigationButtons(e){if(!e)return;const t=e.data.currentSlide,i=e.data.maxSlide;this.slidePrevBtn.disabled=0===t,this.slideNextBtn.disabled=t===i,this.slidePrevBtnCustom.disabled=0===t,this.slideNextBtnCustom.disabled=t===i},getRecommendationTitleLabel(e){if(!e)return null;const t=e=>Array.isArray(e)?e[0]:e,i=["Plytix.color family","Custom.color family","Isp-color-family","Color","Isp-tag-Color ( tags)","Isp-tag-Color","Type","Collection"];for(const s of i){const i=t(e[s]);if(i)return this.formatRecommendationTitle(i)}const o=Object.keys(e)[0];return o?this.formatRecommendationTitle(t(e[o])):null},formatRecommendationTitle:e=>"string"==typeof e&&/^collection-/i.test(e)?e.replace(/^collection-(\w)/i,((e,t)=>t.toUpperCase())):e,setNavigationButtonContainer(){this.$nextTick((()=>{this.slidePrevBtn=this.$el.parentElement.querySelector(".carousel__prev"),this.slideNextBtn=this.$el.parentElement.querySelector(".carousel__next"),this.slidePrevBtnCustom=this.$el.parentElement.querySelector(".custom__arrow--prev"),this.slideNextBtnCustom=this.$el.parentElement.querySelector(".custom__arrow--next")}))},getProductRecs(){this.isLoadingTab=!0;let e=[];for(let i=1;i<=5;i++)this[`FS_Widget_Id_Placement_${i}`]&&e.push(this[`FS_Widget_Id_Placement_${i}`]);let t="";ee((()=>{window.FastSimonSDK.productRecommendationByWidget({productID:this.localPid,withAttributes:!0,widgetsIDS:e,callback:e=>{const i=e.payload;for(let o=0;o<i.length;o++)if(i[o].payload.length>this.minProductsToShow){""==t&&(t=i[o].widgetID),this.FS_Product_Data[i[o].widgetID].products=i[o].payload;const e=this.getRecommendationTitleLabel(i[o].similarByAttributesTiers);e&&(this.FS_Product_Data[i[o].widgetID].title=`More ${e}`)}this.FS_Product_Data[this.FS_Widget_Id_Placement_1]&&this.FS_Product_Data[this.FS_Widget_Id_Placement_1].products.length>0?this.defaultFSWidgetId=this.FS_Widget_Id_Placement_1:this.defaultFSWidgetId=t,""!=this.defaultFSWidgetId?(this.productsOnDisplay=this.FS_Product_Data[this.defaultFSWidgetId].products,this.showWidget=!0,this.selectedFilter=this.defaultFSWidgetId,this.setNavigationButtonContainer(),this.$nextTick((()=>{this.resetSlideShow(),this.getClientWidth(),this.isLoadingTab=!1,de(this.productsOnDisplay,this.defaultFSWidgetId)}))):(this.showWidget=!1,this.isLoadingTab=!1)}})}))},updateCarouselCount(){this.carouselCount++,this.carouselCount===this.productsOnDisplay.length&&(this.carouselCountMatch=!0,this.holderItems=this.$el.parentElement.querySelector("[data-custom-scrollbar-items-free]"),this.scrollbar=this.$el.parentElement.querySelector("[data-custom-scrollbar-free]"),this.scrollbarTrack=this.$el.parentElement.querySelector("[data-custom-scrollbar-track-free]"),this.scrollbar&&this.holderItems&&(this.children=this.holderItems.children,this.sliderEvents(),this.sliderCalculateTrackWidth()))},sliderEvents(){this.holderItems.addEventListener("scroll",this.sliderCalculatePosition.bind(this)),this.holderItems.addEventListener("theme:carou
1sel:scroll",this.sliderCalculatePosition.bind(this)),document.addEventListener("theme:resize:width",this.sliderCalculateTrackWidth.bind(this)),document.addEventListener("theme:resize:width",this.sliderCalculatePosition.bind(this))},sliderCalculateTrackWidth(){const e=document.createElement("div");this.holderItems.prepend(e),e.style.display="none",e.style.width=getComputedStyle(this.holderItems).getPropertyValue("--outer");const t=parseInt(getComputedStyle(e).getPropertyValue("width"));this.holderItems.firstChild.remove(),this.scrollbarWidth=0===this.scrollbar.clientWidth?this.scrollbar.parentNode.getBoundingClientRect().width:this.scrollbar.clientWidth;const i=this.children[0].clientWidth,o=Number(getComputedStyle(this.children[0]).marginRight.replace("px","")),s=Number(getComputedStyle(this.children[0]).marginLeft.replace("px",""));this.scrollWidth=this.children.length*(i+o+s)+t-o,this.trackWidth=(this.scrollbarWidth+t)/this.scrollWidth*100,this.trackWidth=this.trackWidth<5?5:this.trackWidth,this.scrollbar.style.setProperty("--track-width",`${this.trackWidth}%`);const r=Math.ceil(this.trackWidth)>=100;this.scrollbar.classList.toggle(this.scrollbarHide.hide,r)},sliderCalculatePosition(){let e=this.holderItems.scrollLeft/(this.holderItems.scrollWidth-this.holderItems.clientWidth);e*=this.scrollbar.clientWidth-this.scrollbarTrack.clientWidth,e=e<0?0:e,e=isNaN(e)?0:e,this.scrollbar.style.setProperty("--position",`${Math.round(e)}px`),document.dispatchEvent(new CustomEvent("theme:scrollbar:scroll",{bubbles:!0,detail:{holder:this.holderItems}}))},handleSlideEnd(){const e=this.$refs.recommendationCarousel;if(!e)return;const t=e.data.slidesCount-this.currentSlide<=this.itemsToShow,i=0===this.currentSlide;this.slidePrevBtn.disabled=i,this.slidePrevBtnCustom.disabled=i,this.slideNextBtn.disabled=t,this.slideNextBtnCustom.disabled=t},showWidgetProducts(e){this.isLoadingTab=!0,this.productsOnDisplay=[],this.selectedFilter=e,requestAnimationFrame((()=>{this.$nextTick((()=>{this.productsOnDisplay=this.FS_Product_Data[e].products,de(this.productsOnDisplay,e),this.$nextTick((()=>{setTimeout((()=>{this.isLoadingTab=!1,this.resetSlideShow(),this.getClientWidth()}),50)}))}))}))},reportProductViewRecommendation(e,t,i,o){ee((()=>{window.FastSimonSDK.event({eventName:window.FastSimonEventName.RecommendationProductClicked,data:{productID:e,position:t,sourceProductID:i,widget_id:o||""}}),window.setFindingMethod("PDP Recommendation:"+this.selectedFilter)}))},localGetProductMetafieldOneFromFS:(e,t,i)=>J(e,t,i),localGetProductMetafieldTwoFromFS:(e,t,i)=>J(e,t,i),localGetProductCategoryMetafieldOneCollectionFromFS:(e,t,i)=>Y(e,t,i),localGetProductCategoryMetafieldTwoCollectionFromFS:(e,t,i)=>Y(e,t,i),localGetProductReminderEmbedFromFS:(e,t,i)=>J(e,t,i)}},va=()=>{H((e=>({a63b6f62:e.gridDesktop,v28e333d3:e.gridTablet,v1db6860f:e.gridMobile})))},ba=ya.setup;ya.setup=ba?(e,t)=>(va(),ba(e,t)):va;const Sa={class:"collection-tabs__column"},_a=["innerHTML"],Ca={key:0,class:"tab__scroll display-inline-block"},Pa=["onClick","innerHTML"],ka=["pid"],Ta={class:"custom-scrollbar-free small-down--show small-up--hide","data-custom-scrollbar-free":""},Ia={key:3,class:"recommendation-carousel-custom-btns"},Aa=["src","alt","width","height"],La=["src","alt","width","height"],Ea=["src","alt","width","height"],Ma=["src","alt","width","height"];const xa=fe(ya,[["render",function(e,t,i,o,n,u){const m=c("slide"),f=c("carousel"),w=c("Navigation"),y=c("ProductListItem"),v=c("ProductListPromo");return!0===n.showWidget?(r(),s(d,{key:0},[a("div",{class:p(["recommendation-carousel-tabs collection-tabs",[n.isGrid?"recommendation-carousel-grid-tabs":"",n.tabsPill?"collection-tabs--pill":"",n.stackedOnLeft?"collection-tabs--stacked-left":""]])},[a("div",Sa,[a("h2",{innerHTML:n.titleHeading,class:"gt-h2 display-inline-block collection-tabs__heading"},null,8,_a),Object.keys(n.FS_Product_Data).length>0&&u.hasWidgetsWithProducts&&n.showTabs?(r(),s("div",Ca,[a("div",{class:p(["tabs tabs--center",n.tabsPill?"tabs--pill":""])},[(r(!0),s(d,null,h(n.FS_Product_Data,((e,t)=>(r(),s(d,{key:t},[e.products&&e.products.length>0?(r(),s("p",{key:0,class:p(u.isSelected(t)),onClick:e=>u.showWidgetProducts(t),innerHTML:e.title},null,10,Pa)):l("",!0)],64)))),128))],2)])):l("",!0)])],2),n.isGrid||u.isMobile||!n.isLoadingTab?l("",!0):(r(),k(f,{key:0,"items-to-scroll":n.itemsToScroll,"items-to-show":n.itemsToShow,class:"recommendation-carousel placeholder-carousel",snapAlign:"start"},{default:T((()=>[(r(!0),s(d,null,h(Math.ceil(n.itemsToShow),(e=>(r(),k(m,{key:"loading-"+e,class:"loading-slide"},{default:T((()=>[...t[5]||(t[5]=[a("div",{class:"product-grid-item loading-placeholder"},[a("div",{class:"product-image-placeholder"}),a("div",{class:"product-title-placeholder"}),a("div",{class:"product-price-placeholder"})],-1)])])),_:1})))),128))])),_:1},8,["items-to-scroll","items-to-show"])),n.productsOnDisplay.length&&!n.isGrid?(r(),k(f,{key:1,"items-to-scroll":n.itemsToScroll,"items-to-show":n.itemsToShow,onSlideEnd:u.handleSlideEnd,class:p(["recommendation-carousel product-carou
1sel",{"is-visible":!n.isLoadingTab}]),id:"pdp-recommendations-carousel",ref:"recommendationCarousel",snapAlign:"start",modelValue:n.currentSlide,"onUpdate:modelValue":t[0]||(t[0]=e=>n.currentSlide=e)},{addons:T((()=>[g(w)])),default:T((()=>[(r(!0),s(d,null,h(n.productsOnDisplay,((e,t)=>(r(),k(m,{key:e+"-"+t+e.id,pid:e.id},{default:T((()=>[e.l?(r(),k(y,{hideSwatches:n.hideSwatches,disableSlider:n.disableSlider,key:"grid"+e+"-"+t+"-"+n.useFsProductData,fsData:"true"===n.useFsProductData?e:null,useFsProductData:n.useFsProductData,pid:e.id,productImageName:n.productImageName,productTitle:e.l,productCategoryMetafieldOne:u.localGetProductMetafieldOneFromFS(n.productsOnDisplay,t,n.productCategoryMetafieldOneAttr),productCategoryMetafieldTwo:u.localGetProductMetafieldTwoFromFS(n.productsOnDisplay,t,n.productCategoryMetafieldTwoAttr),productCategoryMetafieldOneCollection:u.localGetProductCategoryMetafieldOneCollectionFromFS(n.productsOnDisplay,t,n.productCategoryMetafieldOneCollectionAttr),productCategoryMetafieldTwoCollection:u.localGetProductCategoryMetafieldTwoCollectionFromFS(n.productsOnDisplay,t,n.productCategoryMetafieldTwoCollectionAttr),productReminderMetafieldEmbed:u.localGetProductReminderEmbedFromFS(n.productsOnDisplay,t,n.productReminderMetafieldEmbedAttr),onClick:i=>u.reportProductViewRecommendation(e.id,t,n.localPid,n.selectedFilter||""),setReminderLinkText:n.setReminderLinkText,showSalePercentage:"true"===n.showCrosssellPercentage,fsWidgetId:n.selectedFilter,fsProductPosition:t+1},null,8,["hideSwatches","disableSlider","fsData","useFsProductData","pid","productImageName","productTitle","productCategoryMetafieldOne","productCategoryMetafieldTwo","productCategoryMetafieldOneCollection","productCategoryMetafieldTwoCollection","productReminderMetafieldEmbed","onClick","setReminderLinkText","showSalePercentage","fsWidgetId","fsProductPosition"])):l("",!0),e.promotile?(r(),k(v,{key:1,Image:e.image,Link:e.link,Title:e.title},null,8,["Image","Link","Title"])):l("",!0)])),_:2},1032,["pid"])))),128))])),_:1},8,["items-to-scroll","items-to-show","onSlideEnd","class","modelValue"])):l("",!0),n.isLoadingTab&&(u.isMobile||n.isGrid)?(r(),s("div",{key:2,class:p(["recommendation-freescroll loading-placeholder-container",{"recommendation-grid":n.isGrid}])},[a("div",{class:p(["freescroll-track loading-freescroll-track",{"grid-list-items":n.isGrid}]),"data-custom-scrollbar-items-free":""},[(r(!0),s(d,null,h(Math.ceil(n.itemsToShow),(e=>(r(),s("div",{key:"loading-freescroll-"+e,class:p(["freescroll__slide",n.isGrid?"product-grid-item-wrapper":""])},[...t[6]||(t[6]=[a("div",{class:"product-grid-item loading-placeholder"},[a("div",{class:"product-image-placeholder"}),a("div",{class:"product-title-placeholder"}),a("div",{class:"product-price-placeholder"})],-1)])],2)))),128))],2)],2)):l("",!0),O(a("div",{class:p(n.isGrid?"recommendation-grid":"recommendation-freescroll")},[a("div",{class:p(n.isGrid?"grid-list-items":"freescroll-track"),"data-custom-scrollbar-items-free":""},[(r(!0),s(d,null,h(n.productsOnDisplay,((e,t)=>(r(),s("div",{key:e+"-"+t+e.id+"-freescroll",pid:e.id+"-freescroll",class:p(["freescroll__slide",n.isGrid?"product-grid-item-wrapper":""])},[e.l?(r(),k(y,{hideSwatches:n.hideSwatches,disableSlider:n.disableSlider,key:"grid"+e+"-"+t+"-"+n.useFsProductData,fsData:"true"===n.useFsProductData?e:null,useFsProductData:n.useFsProductData,pid:e.id,productImageName:n.productImageName,productTitle:e.l,productCategoryMetafieldOne:u.localGetProductMetafieldOneFromFS(n.productsOnDisplay,t,n.productCategoryMetafieldOneAttr),productCategoryMetafieldTwo:u.localGetProductMetafieldTwoFromFS(n.productsOnDisplay,t,n.productCategoryMetafieldTwoAttr),productCategoryMetafieldOneCollection:u.localGetProductCategoryMetafieldOneCollectionFromFS(n.productsOnDisplay,t,n.productCategoryMetafieldOneCollectionAttr),productCategoryMetafieldTwoCollection:u.localGetProductCategoryMetafieldTwoCollectionFromFS(n.productsOnDisplay,t,n.productCategoryMetafieldTwoCollectionAttr),isGrid:n.isGrid,onClick:i=>u.reportProductViewRecommendation(e.id,t,n.localPid,n.selectedFilter||""),onCountCarouselsLoaded:u.updateCarouselCount,setReminderLinkText:n.setReminderLinkText,showSalePercentage:"true"===n.showCrosssellPercentage,fsWidgetId:n.selectedFilter,fsProductPosition:t+1},null,8,["hideSwatches","disableSlider","fsData","useFsProductData","pid","productImageName","productTitle","productCategoryMetafieldOne","productCategoryMetafieldTwo","productCategoryMetafieldOneCollection","productCategoryMetafieldTwoCollection","isGrid","onClick","onCountCarouselsLoaded","setReminderLinkText","showSalePercentage","fsWidgetId","fsProductPosition"])):l("",!0),e.promotile?(r(),k(v,{key:1,Title:e.title,Image:e.image,Link:e.link},null,8,["Title","Image","Link"])):l("",!0)],10,ka)))),128))],2)],2),[[B,!n.isLoadingTab]]),O(a("div",Ta,[...t[7]||(t[7]=[a("div",{class:"custom-scrollbar-free__track","data-custom-scrollbar-track-free":""},null,-1)])],512),[[B,n.carouselCountMatch&&!n.isLoadingTab]]),n.isGrid||n.isLoadingTab?l("",!0):(r(),s("div",Ia,[a("button",{onClick:t[1]||(t[1]=(...e)=>u.slidePrev&&u.slidePrev(...e)),class:p(["carousel__prev",n.arrow_custom_on?"is-hidden":""]),type:"button","aria-label":"Previous",disabled:"disabled"},[...t[8]||(t[8]=[a("svg",{class:"flickity-button-icon",viewBox:"0 0 100 100"},[a("title",null,"Previous"),a("path",{d:"M 10, 50\n          L 60, 100\n          L 75, 90\n          L 35, 50\n          L 75, 10\n          L 60, 0\n          Z",class:"arrow"})],-1)])],2),a("button",{onClick:t[2]||(t[2]=(...e)=>u.slideNext&&u.slideNext(...e)),class:p(["carousel__next",n.arrow_custom_on?"is-hidden":""]),type:"button","aria-label":"Next"},[...t[9]||(t[9]=[a("svg",{class:"flickity-button-icon",viewBox:"0 0 100 100"},[a("title",null,"Next"),a("path",{d:"M 10, 50\n          L 60, 100\n          L 75, 90\n          L 35, 50\n          L 75, 10\n          L 60, 0\n          Z",class:"arrow",transform:"translate(100, 100) rotate(180)"})],-1)])],2),a("button",{onClick:t[3]||(t[3]=(...e)=>u.slidePrev&&u.slidePrev(...e)),class:p(["tabs__arrow--custom custom__arrow--prev",n.arrow_custom_on?""
1:"is-hidden"]),"aria-label":"Previous"},[a("img",{class:"enabled",src:n.arrow_left_image,alt:n.arrow_left_image_alt,width:n.arrow_left_image_width,height:n.arrow_left_image_height},null,8,Aa),a("img",{class:"disabled",src:n.arrow_left_image_disabled,alt:n.arrow_left_image_disabled_alt,width:n.arrow_left_image_disabled_width,height:n.arrow_left_image_disabled_height},null,8,La)],2),a("button",{onClick:t[4]||(t[4]=(...e)=>u.slideNext&&u.slideNext(...e)),class:p(["tabs__arrow--custom custom__arrow--next",n.arrow_custom_on?"":"is-hidden"]),"aria-label":"Next"},[a("img",{class:"enabled",src:n.arrow_left_image,alt:n.arrow_left_image_alt,width:n.arrow_left_image_width,height:n.arrow_left_image_height},null,8,Ea),a("img",{class:"disabled",src:n.arrow_left_image_disabled,alt:n.arrow_left_image_disabled_alt,width:n.arrow_left_image_disabled_width,height:n.arrow_left_image_disabled_height},null,8,Ma)],2)]))],64)):l("",!0)}],["__file","ProductRecommendations.vue"]]),Oa={class:"pdp-video-player"},Ba=["src","type"],Fa=["data-is-playing"];const Da=fe({name:"PDPVideoPlayer",props:{sources:{type:Array,required:!0},productID:{type:String,required:!0},handleVideoSize:{type:Function,required:!0}},data:()=>({isPlaying:!1}),methods:{playVideo(){this.$refs.video.play(),this.isPlaying=!0},pauseVideo(){this.$refs.video.pause(),this.isPlaying=!1},setVideoPlaying(){this.handleVideoSize(),this.playVideo()}},mounted(){document.addEventListener("theme:resize",(()=>{setTimeout((()=>{this.handleVideoSize()}),100)})),this.handleVideoSize(),this.handleViewportSize=ge(this)},beforeUnmount(){this.handleViewportSize&&this.handleViewportSize()}},[["render",function(e,t,i,o,n,c){return r(),s("div",Oa,[i.sources?(r(),s("video",{key:0,ref:"video",width:"100%",height:"100%",autoplay:"",muted:"",loop:"",playsinline:"",onLoadeddata:t[0]||(t[0]=e=>c.setVideoPlaying())},[(r(!0),s(d,null,h(i.sources,(e=>(r(),s("source",{key:e.url,src:e.url,type:e.mimeType},null,8,Ba)))),128))],544)):l("",!0),i.sources?(r(),s("div",{key:1,class:"video-controls","data-is-playing":n.isPlaying},[a("button",{class:"video-control-button play-button",onClick:t[1]||(t[1]=e=>c.playVideo())},[...t[3]||(t[3]=[a("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M20 37.5C29.665 37.5 37.5 29.665 37.5 20C37.5 10.335 29.665 2.5 20 2.5C10.335 2.5 2.5 10.335 2.5 20C2.5 29.665 10.335 37.5 20 37.5Z",fill:"white",stroke:"#737373","stroke-width":"1.5","stroke-miterlimit":"10"}),a("path",{d:"M15.2332 26.3661V13.6328L26.3665 19.9995L15.2332 26.3661Z",fill:"#737373"})],-1),a("span",{class:"visually-hidden"},"Play",-1)])]),a("button",{class:"video-control-button pause-button",onClick:t[2]||(t[2]=e=>c.pauseVideo())},[...t[4]||(t[4]=[R('<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 37.5C29.665 37.5 37.5 29.665 37.5 20C37.5 10.335 29.665 2.5 20 2.5C10.335 2.5 2.5 10.335 2.5 20C2.5 29.665 10.335 37.5 20 37.5Z" fill="white" stroke="#737373" stroke-width="1.5" stroke-miterlimit="10"></path><path d="M24.7668 12.0508V27.9508" stroke="#737373" stroke-width="3" stroke-miterlimit="10"></path><path d="M15.2332 27.9508V12.0508" stroke="#737373" stroke-width="3" stroke-miterlimit="10"></path></svg><span class="visually-hidden">Pause</span>',2)])])],8,Fa)):l("",!0)])}],["__file","PDPVideoPlayer.vue"]]),$a='[data-flickity-intersection-aria="true"]';let za=!1;function Ha(e){if(!e||!e.element||"true"===e.element.getAttribute("data-flickity-skip-inert"))return;const t="undefined"!=typeof HTMLElement&&"inert"in HTMLElement.prototype,i="true"===e.element.getAttribute("data-flickity-intersection-aria"),o=e.viewport&&1===e.viewport.nodeType?e.viewport:null;i&&(!function(e){if(za)return;const t=e.cells;if(!t||!t.length)return;const i=Object.getPrototypeOf(t[0]);if(!i||"function"!=typeof i.select||"function"!=typeof i.unselect)return;za=!0;const o=i.select,s=i.unselect;i.select=function(){const e=this.element;e&&"function"==typeof e.closest&&e.closest($a)?e.classList.add("is-selected"):o.call(this)},i.unselect=function(){const e=this.element;e&&"function"==typeof e.closest&&e.closest($a)?e.classList.remove("is-selected"):s.call(this)}}
1(e),(e.cells||[]).forEach((e=>{e&&e.element&&e.element.removeAttribute("aria-hidden")})));const s=()=>{(e.cells||[]).forEach((e=>{const i=e.element;if(!i)return;const o="true"===i.getAttribute("aria-hidden");t?i.inert=o:o?i.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])').forEach((e=>{if(!e.hasAttribute("data-flickity-inert-tabindex")){const t=e.hasAttribute("tabindex")?e.getAttribute("tabindex"):"";e.setAttribute("data-flickity-inert-tabindex",t)}e.setAttribute("tabindex","-1")})):i.querySelectorAll("[data-flickity-inert-tabindex]").forEach((e=>{const t=e.getAttribute("data-flickity-inert-tabindex");e.removeAttribute("data-flickity-inert-tabindex"),""===t?e.removeAttribute("tabindex"):e.setAttribute("tabindex",t)}))}))},r=()=>{(e.cells||[]).forEach((e=>{const t=e.element;t&&function(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}(t,!function(e,t){const i=e.getBoundingClientRect();if(!i.width||!i.height)return!1;if(!t||"function"!=typeof t.getBoundingClientRect){const e=document.documentElement.clientWidth,t=document.documentElement.clientHeight;return i.right>.5&&i.bottom>.5&&i.left<e-.5&&i.top<t-.5}const o=t.getBoundingClientRect();return i.right>o.left+.5&&i.bottom>o.top+.5&&i.left<o.right-.5&&i.top<o.bottom-.5}(t,o))}))},a=()=>{i&&r(),s()};if(i){a();const t=()=>requestAnimationFrame(a);e.on("ready",t),e.on("change",t),e.on("resize",t),e.on("settle",t),document.addEventListener("theme:resize:width",t);const i=()=>document.removeEventListener("theme:resize:width",t);return e.on("destroy",i),void e.on("deactivate",i)}const n=()=>requestAnimationFrame(s);e.on("ready",n),e.on("change",n),e.on("settle",n),s()}const Ra={name:"PDPFreescroll",components:{PDPVideoPlayer:Da},props:{index:{type:Number,default:0},nonActiveImageOverlayColor:{type:String,default:null},nonActiveImageOverlayOpacity:{type:Number,default:null},mobileImageSpacing:{type:Number,default:10},mobileNonActiveSlideWidth:{type:Number,default:80},media:{type:Array,required:!0},isMobile:{type:Boolean,default:!0},isOutfitPicker:{type:Boolean,default:!1},zoomEnabled:{type:Boolean,default:!1},mobileImageWidth:{type:Number,default:800},mobileMaxHeight:{type:Number,default:600},itemsToShow:{type:Number,default:1.1},itemsToShowMobile:{type:Number,default:null},arrowGap:{type:Number,default:null},showArrows:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!1},imagePadding:{type:Number,default:5},handleVideoSize:{type:Function,default:()=>{}},isMiniPdp:{type:Boolean,default:!1},useCustomArrows:{type:Boolean,default:!1},arrowLeftImage:{type:String,default:""},arrowLeftImageAlt:{type:String,default:""},arrowLeftImageWidth:{type:[String,Number],default:""},arrowLeftImageHeight:{type:[String,Number],default:""},arrowLeftImageDisabled:{type:String,default:""},arrowLeftImageDisabledAlt:{type:String,default:""},arrowLeftImageDisabledWidth:{type:[String,Number],default:""},arrowLeftImageDisabledHeight:{type:[String,Number],default:""},nonActiveSlideWidth:{type:Number,default:80},desktopImageWidth:{type:Number},tabletImageWidth:{type:Number},imageBackgroundColor:{type:String,default:""}},emits:["zoom","slide-change","carousel-ready"],data:()=>({flickityInstance:null,currentSlide:0,repositionArrowsRaf:null,tallestRetry:0,hasEmittedReady:!1,galleryImageZoomClickSuppressUntil:0}),computed:{shouldShowArrows(){return!(this.media.length<=1)&&(this.showArrows||this.showArrows&&this.useCustomArrows&&(this.isMiniPdp||this.isOutfitPicker))},shouldUseCustomArrows(){return this.useCustomArrows&&(this.isMiniPdp||this.isOutfitPicker)&&this.arrowLeftImage},slideWidth(){if(this.isMobile){return 100/(this.isOutfitPicker&&this.itemsToShowMobile?this.itemsToShowMobile:this.itemsToShow)+"%"}return this.isOutfitPicker?100/this.itemsToShow+"%":"100%"},slideMargin(){return this.isMobile?`${this.mobileImageSpacing||0}px`:`${this.imagePadding||0}px`},imageMaxHeight(){if(this.isMiniPdp||this.isOutfitPicker)return"none";return`var(--pdp-mobile-max-h, ${Number(this.mobileMaxHeight)||600}px)`},effectiveImageWidth(){return this.mobileImageWidth&&!this.isMiniPdp&&!this.isOutfitPicker||this.mobileImageWidth&&(this.isMiniPdp||this.isOutfitPicker)&&this.isMobile?`${this.mobileImageWidth}px`:"none"},paginationMinHeight(){if(!this.showPagination||!this.media||this.media.length<=1||this.media.length>=10)return"0px";return this.media.length<=5?"22px":"44px"},paginationDots(){return!this.showPagination||!this.media||this.media.length<=1||this.media.length>=10?[]:this.media},imageViewportVars(){const e={};return this.mobileImageWidth&&(e["--img-mobile-w"]=`${this.mobileImageWidth}px`),this.tabletImageWidth&&(e["--img-tablet-w"]=`${this.tabletImageWidth}px`),this.desktopImageWidth&&(e["--img-desktop-w"]=`${this.desktopImageWidth}px`),e},slideShowObjectFitClass(){return this.isMiniPdp||this.isOutfitPicker?"tw-object-cover":this.isMobile?"tw-object-contain":"tw-object-cover"}},mounted(){var e,t;"pdp-freescroll-target"===(null==(t=null==(e=this.$el)?void 0:e.parentElement)?void 0:t.id)?this.$el.parentElement.classList.add("is-mobile"):this.handleViewportSize=ge(this),this.isScrolling=!1,this.debouncedResize=G((()=>{this.flickityInstance&&!this.isScrolling&&this.flickityInstance.resize()}),250,!1),this.$refs.freescrollTrack?this.initFlickity():this.$nextTick((()=>{this.initFlickity()})),fp.on("variant-updated",this.handleVariantUpdate),fp.on("pdp-color-updated",this.bumpGalleryImageZoomClickSuppress),this.isOutfitPicker&&this.$nextTick((()=>{this.setupArrowRepositioningListener(),this.calculateTallestSlide()}))},beforeUnmount(){this.handleViewportSize&&this.handleViewportSize(),this.destroyFlickity(),fp.off("variant-updated",this.handleVariantUpdate),fp.off("pdp-color-updated",this.bumpGalleryImageZoomClickSuppress),this.repositionArrowsHandler&&(window.removeEventListener("resize",this.repositionArrowsHandler),this.repositionArrowsHandler=null),this.repositionArrowsRaf&&(cancelAnimationFrame(this.repositionArrowsRaf),this.repositionArrowsRaf=null)},watch:{media:{handler(e){e&&e.length&&(this.bumpGalleryImageZoomClickSuppress(),this.$nextTick((()=>{this.destroyFlickity(),this.initFlickity()})))}},itemsToShow:{handler(e,t){void 0!==t&&e!==t&&this.$nextTick((()=>{this.destroyFlickity(),this.initFlickity()}))}},itemsToShowMobile:{handler(e,t){void 0!==t&&e!==t&&this.$nextTick((()=>{this.destroyFlickity(),this.initFlickity()}))}},showArrows:{handler(e,t){void 0!==t&&e!==t&&this.$nextTick((()=>{this.destroyFlickity(),this.initFlickity()}))}},shouldShowArrows:{handler(e,t){void 0!==t&&e!==t&&this.$nextTick((()=>{this.destroyFlickity(),this.initFlickity()}))}},imagePadding:{handler(){this.isOutfitPicker&&this.$nextTick((()=>{this.calculateTallestSlide()}))}}},methods:{getMediaAlt:K,setImageMobileSize(e){return pe(e,this.mobileImageWidth)},slideImgIntrinsicDims(e){if(!(null==e?void 0:e.width)||!(null==e?void 0:e.he
1ight))return null;if(!this.isMobile||this.isMiniPdp||this.isOutfitPicker)return{w:e.width,h:e.height};const t=2*(Number(this.mobileImageWidth)||400);return{w:t,h:Math.round(t*e.height/e.width)}},slideImgWidth(e){const t=this.slideImgIntrinsicDims(e);return t?t.w:void 0},slideImgHeight(e){const t=this.slideImgIntrinsicDims(e);return t?t.h:void 0},readPdpMobileHeightBounds(){const e=document.getElementById("product-page");if(!e)return{min:0,max:0};const t=getComputedStyle(e);return{min:parseFloat(t.getPropertyValue("--pdp-mobile-min-h"))||0,max:parseFloat(t.getPropertyValue("--pdp-mobile-max-h"))||0}},getMobileImageSrcset(e){return me(e,this.mobileImageWidth)},handleZoom(e){this.$emit("zoom",e)},bumpGalleryImageZoomClickSuppress(){this.galleryImageZoomClickSuppressUntil=Date.now()+450},handleGalleryImageClick(e,t){Date.now()<this.galleryImageZoomClickSuppressUntil?e&&(e.preventDefault(),e.stopPropagation()):this.handleZoom(t)},setupCustomArrows(){if(!this.$refs.freescrollTrack||!this.shouldUseCustomArrows)return;const e=this.$refs.freescrollTrack.querySelector(".flickity-prev-next-button.previous"),t=this.$refs.freescrollTrack.querySelector(".flickity-prev-next-button.next");e&&(e.innerHTML=this.createCustomArrowHTML("Previous")),t&&(t.innerHTML=this.createCustomArrowHTML("Next"))},handleVariantUpdate(e){var t;if(this.bumpGalleryImageZoomClickSuppress(),this.isOutfitPicker)return;const i=e.image,o=e.width,s=e.resetToFirst,r="true"===(null==(t=document.getElementById("product-families-json-data"))?void 0:t.dataset.speedTracking)||Boolean(window.productFamiliesDataDebug);if(!this.media||!this.media.length)return void(r&&console.log("[SmartTags][Freescroll] No media available",{variantImage:i,variantWidth:o,resetToFirst:s}));const a=s?0:ne(this.media,i,o,e.preferWidthSlug);r&&console.log("[SmartTags][Freescroll] Variant update",{variantImage:i,variantWidth:o,resetToFirst:s,preferWidthSlug:!0===e.preferWidthSlug,slideIndex:a,mediaCount:this.media.length}),-1!==a&&this.goToSlide(a)},createCustomArrowHTML(e){if(!this.arrowLeftImage)return"";const t=this.arrowLeftImage,i=this.arrowLeftImageAlt||e,o=this.arrowLeftImageWidth,s=this.arrowLeftImageHeight,r=this.arrowLeftImageDisabled?{src:this.arrowLeftImageDisabled,alt:this.arrowLeftImageDisabledAlt||`${e} (Disabled)`,width:this.arrowLeftImageDisabledWidth||this.arrowLeftImageWidth,height:this.arrowLeftImageDisabledHeight||this.arrowLeftImageHeight}:null;return`\n          <img\n            src="${t}" \n            alt="${i}"\n            ${o?`width="${o}"`:""}\n            ${s?`height="${s}"`:""}\n          />\n          ${r?`\n            <img\n              src="${r.src}"\n              alt="${r.alt}"\n              ${r.width?`width="${r.width}"`:""}\n              ${r.height?`height="${r.height}"`:""}\n              class="disabled-arrow"\n            />\n          `:""}`},initFlickity(){if(!this.$refs.freescrollTrack)return;const e={wrapAround:!0,pageDots:!1,prevNextButtons:this.shouldShowArrows,cellAlign:"center",draggable:!0,accessibility:!0,adaptiveHeight:!this.isMobile||this.isOutfitPicker,selectedAttraction:.09,freeScroll:!1,dragThreshold:20,friction:.4,contain:this.shouldShowArrows&&!(this.isOutfitPicker&&this.imagePadding<0),setGallerySize:!0,percentPosition:!1,imagesLoaded:!(!this.isMobile||this.isMiniPdp||this.isOutfitPicker),initialIndex:0,groupCells:!!this.shouldShowArrows&&1,on:{ready:()=>{this.handleMediaLoad(),this.$nextTick((()=>{this.flickityInstance&&this.shouldShowArrows&&this.forceProperSlideWidth(),this.ensureViewportHe
1ight(),this.flickityInstance&&(this.flickityInstance.resize(),this.flickityInstance.select(0,!1,!0),this.revealSlideshow()),this.isOutfitPicker&&(this.applyBackgroundColorStyles(),this.scheduleRepositionArrows(),this.calculateTallestSlide()),this.shouldUseCustomArrows&&this.setupCustomArrows()}))},dragStart:()=>{this.isScrolling=!0},dragEnd:()=>{setTimeout((()=>{this.isScrolling=!1}),300)},change:e=>{this.currentSlide=e;const t=this.media&&this.media[e]?this.media[e]:null;this.$emit("slide-change",{index:e,product:t})},settle:()=>{requestAnimationFrame((()=>{this.flickityInstance&&this.flickityInstance.reposition()})),this.isOutfitPicker&&this.$nextTick((()=>{this.scheduleRepositionArrows(),this.calculateTallestSlide()}))}}};this.flickityInstance=new N(this.$refs.freescrollTrack,e),Ha(this.flickityInstance),setTimeout((()=>{this.$refs.freescrollTrack&&this.$refs.freescrollTrack.parentElement&&!this.$refs.freescrollTrack.parentElement.classList.contains("flickity-ready")&&(this.flickityInstance&&this.flickityInstance.select(0,!1,!0),this.revealSlideshow())}),100)},destroyFlickity(){this.flickityInstance&&(this.flickityInstance.destroy(),this.flickityInstance=null,this.currentSlide=0),this.hasEmittedReady=!1},updateFlickitySize(){this.flickityInstance&&(this.flickityInstance.resize(),this.shouldShowArrows&&this.$nextTick((()=>{this.forceProperSlideWidth()})),this.isOutfitPicker&&this.$nextTick((()=>this.calculateTallestSlide())))}
1,ensureViewportHeight(){var e;if(!this.$refs.freescrollTrack)return!1;const t=this.$refs.freescrollTrack.querySelector(".flickity-viewport"),i=(null==(e=this.flickityInstance)?void 0:e.selectedElement)||this.$refs.freescrollTrack.querySelector(".freescroll__slide"),o=null==i?void 0:i.querySelector("img.slideShow");if(!t||!i||!o)return!1;const s=o.naturalWidth||parseFloat(o.getAttribute("width"))||0,r=o.naturalHeight||parseFloat(o.getAttribute("height"))||0,a=i.clientWidth||t.clientWidth||o.clientWidth||0;if(!s||!r||!a)return!1;let n=Math.round(a*(r/s));if(!n)return!1;if(this.isMobile&&!this.isMiniPdp&&!this.isOutfitPicker){const e=this.readPdpMobileHeightBounds();e.min>0&&(n=Math.max(n,e.min)),e.max>0&&(n=Math.min(n,e.max))}const l=`${n}px`;return t.style.height!==l&&(t.style.height=l,!0)},goToSlide(e){if(!this.flickityInstance||e<0||e>=this.media.length)return;if(this.currentSlide===e)return;this.flickityInstance.select(e);const t=this.media&&this.media[e]?this.media[e]:null;this.$emit("slide-change",{index:e,product:t})},handleMediaLoad(){this.handleVideoSize&&"function"==typeof this.handleVideoSize&&this.handleVideoSize(),this.$nextTick((()=>
1{this.ensureViewportHeight(),this.updateFlickitySize(),this.emitReadyIfMeasured()})),!this.isScrolling&&this.debouncedResize&&"function"==typeof this.debouncedResize&&this.debouncedResize(),this.isOutfitPicker&&this.$nextTick((()=>this.calculateTallestSlide()))},emitReadyIfMeasured(){if(this.hasEmittedReady||!this.$refs.freescrollTrack)return;const e=this.$refs.freescrollTrack.querySelector(".flickity-viewport");e&&e.offsetHeight<=0&&this.ensureViewportHeight(),!e||e.offsetHeight<=0||(this.hasEmittedReady=!0,this.$emit("carousel-ready"))},scheduleRepositionArrows(){this.repositionArrowsRaf&&cancelAnimationFrame(this.repositionArrowsRaf),this.repositionArrowsRaf=requestAnimationFrame((()=>{this.repositionArrowsRaf=null,this.repositionArrowsAroundActiveSlide()}))},repositionArrowsAroundActiveSlide(){if(!this.isOutfitPicker||!this.shouldShowArrows)return;if(!this.$refs.freescrollTrack||!this.flickityInstance)return;const e=this.$refs.freescrollTrack,t=e.querySelector(".flickity-prev-next-button.previous"),i=e.querySelector(".flickity-prev-next-button.next"),o=this.flickityInstance.selectedElement;if(!t||!i||!o)return;const s=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=t.getBoundingClientRect(),n=i.getBoundingClientRect(),l=Number(this.arrowGap);let d=Math.max(r.left-s.left-a.width-l,0),c=r.right-s.left+l;d=Math.min(Math.max(d,0),s.width-a.width),c=Math.min(Math.max(c,0),s.width-n.width),t.style.left=`${d}px`,t.style.right="auto",i.style.left=`${c}px`,i.style.right="auto"},setupArrowRepositioningListener(){this.isOutfitPicker&&this.shouldShowArrows&&(this._repositionArrowsHandler||(this._repositionArrowsHandler=()=>{this.scheduleRepositionArrows(),this.calculateTallestSlide()},window.addEventListener("resize",this._repositionArrowsHandler)),this.$nextTick((()=>this.scheduleRepositionArrows())))},calculateTallestSlide(){if(!this.$refs.freescrollTrack)return;const e=this.$refs.freescrollTrack.querySelectorAll(".freescroll__slide");if(!e||!e.length)return;let t=0;e.forEach((e=>{const i=e.offsetHeight;i>t&&(t=i)})),t&&0!==t?(this.tallestRetry=0,e.forEach((e=>{e.style.height=`${t}px`}))):this.tallestRetry<10&&(this.tallestRetry+=1,setTimeout((()=>{this.calculateTallestSlide()}),120))},applyBackgroundColorStyles(e){const t=this.$refs.freescrollTrack;if(!t)return;const i="string"==typeof e?e:this.imageBackgroundColor;i?t.style.setProperty("--slide-bg",i):t.style.removeProperty("--slide-bg"),this.nonActiveImageOverlayColor?t.style.setProperty("--non-active-image-overlay-color",this.nonActiveImageOverlayColor):t.style.removeProperty("--non-active-image-overlay-color"),void 0!==this.nonActiveImageOverlayOpacity&&null!==this.nonActiveImageOverlayOpacity&&""!==this.nonActiveImageOverlayOpacity?t.style.setProperty("--non-active-image-overlay-opacity",String(this.nonActiveImageOverlayOpacity)):t.style.removeProperty("--non-active-image-overlay-opacity")},revealSlideshow(){this.flickityInstance&&(this.flickityInstance.reposition(),0!==this.flickityInstance.selectedIndex&&this.flickityInstance.select(0,!1,!0)),!this.isMobile||this.isMiniPdp||this.isOutfitPicker||(this.ensureViewportHe
1ight(),this.flickityInstance&&this.flickityInstance.resize()),this.$refs.freescrollTrack&&this.$refs.freescrollTrack.parentElement&&this.$refs.freescrollTrack.parentElement.classList.add("flickity-ready");const e=document.getElementById("PDPImages");e&&(e.style.minHeight="");const t=document.querySelector(".product-page .mobile-carousel-block");t&&(t.style.minHeight=""),this.emitReadyIfMeasured()},forceProperSlideWidth(){if(!this.$refs.freescrollTrack||!this.shouldShowArrows)return;if(this.isOutfitPicker)return;const e=this.$refs.freescrollTrack.querySelectorAll(".freescroll__slide"),t=this.$refs.freescrollTrack.querySelector(".flickity-viewport");if(t&&e.length>0){const i=t.offsetWidth;e.forEach((e=>{e.style.width=`${i}px`,e.style.marginRight="0px"}))}}}},Na=()=>{H((e=>({v3bef3c40:e.slideWidth,v4d88d4d4:e.slideMargin,v6b77325b:e.imageMaxHeight,v25f69f47:e.effectiveImageWidth})))},Va=Ra.setup;Ra.setup=Va?(e,t)=>(Na(),Va(e,t)):Na;const qa=["pid"],Ua=["src","srcset","alt","width","height","onClick","loading","fetchpriority"],Ga={key:2,class:"media__buttons__holder"},Wa=["onClick"],Ka={class:"visually-hidden"},ja=["onClick","aria-label"];const Qa=fe(Ra,[["render",function(e,t,i,o,u,g){const f=c("PDPVideoPlayer");return i.media.length?(r(),s("div",{key:0,class:p(["pdp-freescroll",`pdp-freescroll-index-${i.index}`,{"is-mini-pdp":i.isMiniPdp,"is-outfit-picker":i.isOutfitPicker}])},[a("div",{class:p(["freescroll-track",{"has-arrows":g.shouldShowArrows,"has-negative-spacing":i.isOutfitPicker}]),ref:"freescrollTrack"},[(r(!0),s(d,null,h(i.media,((e,o)=>(r(),s("div",{key:"product-"+o+"--freescroll",pid:e.node.id,class:"freescroll__slide",style:n({width:g.slideWidth,marginRight:g.slideMargin,maxWidth:g.effectiveImageWidth})},[e.node.image?(r(),s("img",{key:0,src:g.setImageMobileSize(e.node.image.url),srcset:g.getMobileImageSrcset(e.node.image.url),class:p(["slideShow tw-block tw-w-full",g.slideShowObjectFitClass]),style:n([{width:i.isOutfitPicker&&o!==u.currentSlide?`${this.isMobile?this.mobileNonActiveSlideWidth:this.nonActiveSlideWidth}%`:"100%"},g.imageViewportVars]),alt:g.getMediaAlt(e),width:g.slideImgWidth(e.node.image),height:g.slideImgHeight(e.node.image),onLoad:t[0]||(t[0]=(...e)=>g.handleMediaLoad&&g.handleMediaLoad(...e)),onClick:t=>
1g.handleGalleryImageClick(t,e.node.image.url),loading:0===o?"eager":"lazy",fetchpriority:0===o?"high":"auto",decoding:"async"},null,46,Ua)):l("",!0),e.node.sources?(r(),k(f,{key:1,sources:e.node.sources,productID:e.node.id,handleVideoSize:i.handleVideoSize},null,8,["sources","productID","handleVideoSize"])):l("",!0),i.zoomEnabled&&e.node.image?(r(),s("div",Ga,[a("button",{class:"media__button media__button--zoom","data-zoom-button":"",onClick:t=>g.handleZoom(e.node.image.url)},[t[1]||(t[1]=a("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-search",viewBox:"0 0 16 16"},[a("path",{d:"M16 14.864 14.863 16l-4.24-4.241a6.406 6.406 0 0 1-4.048 1.392 6.61 6.61 0 0 1-4.65-1.925A6.493 6.493 0 0 1 .5 9.098 6.51 6.51 0 0 1 0 6.575a6.536 6.536 0 0 1 1.922-4.652A6.62 6.62 0 0 1 4.062.5 6.52 6.52 0 0 1 6.575 0 6.5 6.5 0 0 1 9.1.5c.8.332 1.51.806 2.129 1.423a6.454 6.454 0 0 1 1.436 2.13 6.54 6.54 0 0 1 .498 2.522c0 1.503-.468 2.853-1.4 4.048L16 14.864zM3.053 10.091c.973.972 2.147 1.461 3.522 1.461 1.378 0 2.551-.489 3.525-1.461.968-.967 1.45-2.138 1.45-3.514 0-1.37-.482-2.545-1.45-3.524-.981-.968-2.154-1.45-3.525-1.45-1.376 0-2.547.483-3.513 1.45-.973.973-1.46 2.146-1.46 3.523 0 1.375.483 2.548 1.45 3.515z"})],-1)),a("span",Ka," Zoom in image "+m(o+1)+" of "+m(i.media.length),1)],8,Wa)])):l("",!0)],12,qa)))),128))],2),a("div",{class:p(["freescroll-pagination",{"is-hidden":!i.showPagination||!i.media||i.media.length<=1||i.media.length>=10}]),style:n({minHeight:g.paginationMinHeight})},[(r(!0),s(d,null,h(g.paginationDots,((e,t)=>
1(r(),s("button",{key:"dot-"+t,class:p(["freescroll-pagination__dot",{"is-selected":u.currentSlide===t}]),onClick:e=>g.goToSlide(t),"aria-label":`Go to slide ${t+1}`},null,10,ja)))),128))],6)],2)):l("",!0)}],["__file","PDPFreescroll.vue"]]),Za=["src","srcset","alt","onClick","loading","fetchpriority"],Ja={key:2,class:"media__buttons__holder"},Ya=["onClick"],Xa={class:"visually-hidden"},en={key:0,class:"pdp-gallery-toggle-container"},tn={key:1,style:{width:"100%","overflow-x":"hidden"}},on=["src","srcset","width","height","alt"];const sn=fe({name:"PDPImages",props:{images:{type:Array,required:!0},media:Array},components:{PDPVideoPlayer:Da,PDPFreescroll:Qa},data(){return{dataZoomEnable:!1,pdp_items_mobile:1,show_pagination:!1,show_arrows:!1,arrow_left_image:"",arrow_left_image_alt:"",arrow_left_image_width:"",arrow_left_image_height:"",arrow_left_image_disabled:"",arrow_left_image_disabled_alt:"",arrow_left_image_disabled_width:"",arrow_left_image_disabled_height:"",arrow_custom_on:!1,carouselKey:0,currentSlide:0,mini_pdp:!1,windowWidth:window.innerWidth,localImages:[],localMedia:this.media||[],pdp_desktop_image_width:window.pdp_desktop_image_width,pdp_mobile_image_width:window.pdp_mobile_image_width,pdp_mobile_max_height:window.pdp_mobile_max_height||600,video_height_grow:!0,upsellImages:[],zoom_gutter_mobile:5,showAllImages:!1,desktopImageLimit:4,tabletImageLimit:2,mobileImageLimit:2,desktopRowNumber:2,tabletRowNumber:1,expandText:"Show More Images",collapseText:"Show Less Images",expandCollapseBtnLineOffset:0,expandCollapseBtnMarginTop:26,desktopPreloadCount:4,mobilePreloadCount:1,miniPdpResetRetryCounter:0,teleportTarget:null,previousImages:[],previousMedia:[],newImagesReady:!0,imageTransitionTimeout:null}},computed:{shouldNotifySingleImageFreescrollReady(){return!!this.teleportTarget&&(1===this.localMedia.length&&(this.isMobile||"true"===this.mini_pdp))},isMobile(){return this.windowWidth<window.theme.sizes.medium},isTablet(){return!this.isMobile&&this.windowWidth<1100},mediaToDisplay(){let e=this.localMedia;return this.isMobile&&"true"===this.mini_pdp&&(e=this.localMedia.slice(0,3)),(this.isMobile||"true"===this.mini_pdp)&&!this.newImagesReady&&this.previousMedia.length>0?"true"===this.mini_pdp?this.previousMedia.slice(0,3):this.previousMedia:e},shouldShowArrows(){return("true"!==this.mini_pdp||!this.isMobile)&&"true"===this.show_arrows},getCurrentImageLimit(){return this.isMobile?this.mobileImageLimit:this.isTablet?this.tabletImageLimit:this.desktopImageLimit},shouldShowExpandButton(){return!this.isMobile&&this.mediaToDisplay.length>this.getCurrentImageLimit},getAllImagesWithToggle(){if(this.isMobile||this.mini_pdp)return this.mediaToDisplay;return this.showAllImages?this.mediaToDisplay:this.mediaToDisplay.slice(0,this.getCurrentImageLimit)}},created(){this.debouncedResize=G((()=>{const e=this.isMobile,t=this.windowWidth;this.windowWidth=window.innerWidth,window.setClientWidthClass&&window.setClientWidthClass();const i=this.windowWidth<window.theme.sizes.medium,o=e!==i;(o||Math.abs(t-this.windowWidth)>100)&&this.reinitializeComponents(i,o),this.$nextTick((()=>{this.initPdpScrollSync(),this.schedulePdpScrollSyncMeasure()}))}),150,!1),this.localImages=[...this.images],this.preloadCriticalImages()},mounted(){this.preloadCriticalImages(),this.handleViewportSize=ge(this),window.setClientWidthClass&&window.setClientWidthClass();const e=this.$el.parentElement;this.dataZoomEnable=e.getAttribute("data-zoomEnable"),this.pdp_items_mobile=parseFloat(e.getAttribute("data-pdp_items_mobile")),this.arrow_custom_on=e.getAttribute("data-arrow_custom_on"),this.arrow_left_image=e.getAttribute("data-arrow_left_image"),this.arrow_left_image_alt=e.getAttribute("data-arrow_left_image_alt"),this.arrow_left_image_width=e.getAttribute("data-arrow_left_image_width"),this.arrow_left_image_height=e.getAttribute("data-arrow_left_image_height"),this.arrow_left_image_disabled=e.getAttribute("data-arrow_left_image_disabled"),this.arrow_left_image_disabled_alt=e.getAttribute("data-arrow_left_image_disabled_alt"),this.arrow_left_image_disabled_width=e.getAttribute("data-arrow_left_image_disabled_width"),this.arrow_left_image_disabled_height=e.getAttribute("data-arrow_left_image_disabled_height"),this.show_arrows=e.getAttribute("data-show_arrows"),this.show_pagination=e.getAttribute("data-show_pagination"),this.mini_pdp=e.dataset.miniPdp,this.pdp_mobile_max_height=e.getAttribute("data-mobile_max_height"),this.video_height_grow=e.getAttribute("data-video_height_grow"),this.zoom_gutter_mobile=e.getAttribute("data-zoom_gutter_mobile")||5,this.handleReplaceVariantImage=e=>{this.isMobile||"true"===this.mini_pdp?this.transitionToNewImages(e,e):(this.localImages=e,this.localMedia=e,this.carouselKey++,this.$nextTick((()=>{this.preloadCriticalImages(),this.updateExpandedLayout()})))};
1const t=e.getAttribute("data-gallery-desktop-limit"),i=e.getAttribute("data-gallery-tablet-limit"),o=e.getAttribute("data-gallery-mobile-limit"),s=e.getAttribute("data-gallery-desktop-row-number"),r=e.getAttribute("data-gallery-tablet-row-number"),a=e.getAttribute("data-gallery-expand-text"),n=e.getAttribute("data-gallery-collapse-text"),l=e.getAttribute("data-gallery-expand-collapse-btn-line-offset"),d=e.getAttribute("data-gallery-expand-collapse-margin-top");t&&(this.desktopImageLimit=parseInt(t)),i&&(this.tabletImageLimit=parseInt(i)),o&&(this.mobileImageLimit=parseInt(o)),s&&(this.desktopRowNumber=parseInt(s)),r&&(this.tabletRowNumber=parseInt(r)),a&&(this.expandText=a),n&&(this.collapseText=n),l&&(this.expandCollapseBtnLineOffset=l),d&&(this.expandCollapseBtnMarginTop=d);const c=document.getElementById("pdp-freescroll-target");c&&(this.teleportTarget="#pdp-freescroll-target",c.classList.remove("pdp-teleport-ready")),this.handleUpsellImagesUpdated=e=>{this.localImages=this.localImages.filter((e=>!this.upsellImages.includes(e))),this.localMedia=this.localMedia.filter((e=>!this.upsellImages.includes(e)));const t=e[0],i=e[1];this.upsellImages.push(t),this.upsellImages.push(i),i&&(this.localImages.unshift(i),this.localMedia.unshift(i)),t&&(this.localImages.unshift(t),this.localMedia.unshift(t)),this.$nextTick((()=>this.updateExpandedLayout())),this.variantRetryCounter=0,this.ispdpCarouselAvailable()&&this.$refs.pdpCarousel.slideTo(0)},fp.on("replace-variant-image",this.handleReplaceVariantImage),fp.on("upsell-images-updated",this.handleUpsellImagesUpdated),fp.on("pdp-color-updated",this.handleColorUpdate),this.handleMiniPdpVariantUpdated=()=>{if("true"===this.mini_pdp)try{const e=(t=5)=>{const i=this.$refs.pdpFreescroll;i&&i.flickityInstance?0!==(i.currentSlide??0)&&i.goToSlide(0):t>0?setTimeout((()=>e(t-1)),60):this.carouselKey++};e(5)}catch(e){this.carouselKey++}},fp.on("variant-updated",this.handleMiniPdpVariantUpdated),document.addEventListener("theme:resize:width",this.debouncedResize),this.updateExpandedLayout(),this.$nextTick((()=>{this.tryNotifySingleImageFreescrollReady(),this.initPdpScrollSync()}))},watch:{shouldNotifySingleImageFreescrollReady(e){e&&this.$nextTick((()=>this.tryNotifySingleImageFreescrollReady()))}},methods:{getMediaAlt:K,handleColorUpdate(e){const t=document.getElementById("PDPImages");t&&(this.isMobile?t.style.minHeight=`${t.offsetHeight}px`:t.style.minHeight=""),this.upsellImages=[],this.variantRetryCounter=0,this.currentSlide=0,this.isMobile||"true"===this.mini_pdp?this.transitionToNewImages(e.images,e.media,this.mobilePreloadCount,2e3):this.transitionToNewImages(e.images,e.media,this.desktopPreloadCount,1e3)},handleVariantUpdate(e){var t;if(this.isMobile||"true"===this.mini_pdp)return;const i=e.image,o=e.width,s=this.currentSlide||0,r=this.localImages[s];if((null==(t=null==r?void 0:r.node)?void 0:t.url)===i)return;const a=ne(this.localImages,i,o);-1!==a&&this.updateSlideByVariant(a)},getDesktopImageHeights(){const e="false"===this.video_height_grow,t=document.getElementById("PDPImages");if(!t)return;const i=t.querySelectorAll(".product__media.desktop-images.desktop-video-height");if(!i.length)return void this.getMobileImageHeights();const o=t.querySelectorAll(".product__media.desktop-images:not(.desktop-video-height) img"),s=[];o.forEach((e=>{e.naturalWidth&&e.naturalHeight&&s.push(e.naturalHeight/e.naturalWidth)}));const r=s.length?e?Math.min(...s):Math.max(...s):null;i.forEach((e=>{const t=e.querySelector("video");let i=t&&t.videoWidth&&t.videoHeight?t.videoHeight/t.videoWidth:r;i&&(e.style.height=Math.round(e.clientWidth*i)+"px")})),this.getMobileImageHeights()},getMobileImageHeights(){let e=this.pdp_mobile_max_height;const t=this.teleportTarget?document.querySelector(this.teleportTarget):document.getElementById("PDPImages");if(!t)return;const i=t.querySelectorAll(".pdp-freescroll .freescroll__slide img.slideShow");if(!Array.from(i).some((e=>e.clientHeight>0)))return;i.forEach((t=>{t.clientHeight<e&&t.clientHeight>0&&(e=t.clientHeight)}));t.querySelectorAll(".pdp-freescroll .pdp-video-player").forEach((t=>{t.style.height=e+"px"}))},updateSlideByVariant(e){try{this.$refs.pdpCarousel&&"function"==typeof this.$refs.pdpCarousel.slideTo?(this.$refs.pdpCarousel.slideTo(e),this.currentSlide=e):this.isMobile||"true"===this.mini_pdp||this.scrollToDesktopImage(e)}catch(t){setTimeout((()=>{this.variantRetryCounter=this.variantRetryCounter+1,this.variantRetryCounter<5&&this.updateSlideByVariant(e)}
1),200)}},scrollToDesktopImage(e){try{const t=document.querySelectorAll(".product__media.desktop-images");t[e]&&(t[e].scrollIntoView({behavior:"smooth",block:"center"}),this.currentSlide=e)}catch(t){}},setImageDesktopSize(e){return he(e,this.pdp_desktop_image_width)},setImageMobileSize(e){return pe(e,this.pdp_mobile_image_width)},getDesktopImageSrcset(e){return me(e,this.pdp_desktop_image_width)},getMobileImageSrcset(e){return me(e,this.pdp_mobile_image_width)},getImageUrl(e){return this.isMobile?this.setImageMobileSize(e):this.setImageDesktopSize(e)},getMobileSingleSlideImageUrl(e){var t,i,o;return(null==(i=null==(t=null==e?void 0:e.node)?void 0:t.image)?void 0:i.url)||(null==(o=null==e?void 0:e.node)?void 0:o.url)||""},slidePrev(){this.$refs.pdpCarousel.prev()},slideNext(){this.$refs.pdpCarousel.next()},handleCarouselSlideEnd(){fp.emit("carousel-slide-end")},notifyFreescrollTeleportReady(){const e=document.getElementById("PDPImages");e&&e.classList.remove("mobile-height-lock");const t=document.querySelector(".product-page .mobile-carousel-block");t&&(t.style.minHeight="");const i=this.teleportTarget?document.querySelector(this.teleportTarget):null;i&&i.classList.add("pdp-teleport-ready"),this.$nextTick((()=>{fp.emit("carousel-ready")}))},tryNotifySingleImageFreescrollReady(){this.shouldNotifySingleImageFreescrollReady&&this.notifyFreescrollTeleportReady()},handleCarouselInit(){this.notifyFreescrollTeleportReady()},handleZoom(e){fp.emit("active-product-slide-for-zoom",e),W()},toggleImageExpansion(){this.showAllImages=!this.showAllImages,this.updateExpandedLayout(),this.$nextTick((()=>this.schedulePdpScrollSyncMeasure())),this.showAllImages||this.scrollToTop()},scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})},reinitializeComponents(e,t){this.$nextTick((()=>{try{e?this.getMobileImageHeights():this.getDesktopImageHeights(),t&&this.$refs.pdpFreescroll&&this.carouselKey++,t&&fp.emit("device-type-changed",{isMobile:e}),this.updateExpandedLayout()}catch(i){console.warn("Error reinitializing components on resize:",i)}}))},updateExpandedLayout(){const e=document.getElementById("PDPImages");if(e)if(this.isMobile&&this.localImages&&1===this.localImages.length?e.classList.add("pdp-single-image-mobile"):e.classList.remove("pdp-single-image-mobile"),this.isMobile)e.classList.remove("pdp-gallery-grid-override"),e.classList.remove("pdp-gallery-expanded"),e.style.removeProperty("--PDP-GALLERY-COLUMNS");else{const t=this.isTablet?this.tabletRowNumber:this.desktopRowNumber,i=this.isTablet?this.tabletImageLimit:this.desktopImageLimit,o=this.getAllImagesWithToggle.length,s=Math.max(1,Math.min(t,i,o)),r=e.classList.contains("product__grid--mosaic"),a=e.classList.contains("product__grid--columns");r||a?(e.classList.add("pdp-gallery-grid-override"),e.style.setProperty("--PDP-GALLERY-COLUMNS",s)):(e.classList.remove("pdp-gallery-grid-override"),e.style.removeProperty("--PDP-GALLERY-COLUMNS")),this.showAllImages?e.classList.add("pdp-gallery-expanded"):e.classList.remove("pdp-gallery-expanded"),e.style.minHeight=""}},transitionToNewImages(e,t,i=1,o=2e3){this.localImages.length>0&&!this.newImagesReady&&(this.previousImages=[...this.localImages],this.previousMedia=[...this.localMedia]);const s=[...e],r=[...t];this.preloadImagesAndSwap(s,r,i),this.imageTransitionTimeout&&clearTimeout(this.imageTransitionTimeout),this.imageTransitionTimeout=setTimeout((()=>{!this.newImagesReady&&s.length>0&&this.completeImageTransition(s,r)}),o)},getPreloadImageUrls(e,t,i){var o,s;const r=null==(s=null==(o=window.theme)?void 0:o.sizes)?void 0:s.medium,a="number"==typeof r&&window.innerWidth<=r,n=Array.isArray(e)&&e.length>0?e:t,l=[];return n.forEach((e=>{var t,o,s;if(l.length>=i)return;const r=(null==(o=null==(t=null==e?void 0:e.node)?void 0:t.image)?void 0:o.url)||(null==(s=null==e?void 0:e.node)?void 0:s.url);if(!r)return;const n=a?this.setImageMobileSize(r):this.setImageDesktopSize(r);l.push(n)})),l},preloadImagesAndSwap(e,t,i=1){this.newImagesReady=!1;const o=this.getPreloadImageUrls(t,e,i);if(0===o.length)return void this.completeImageTransition(e,t);let s=0;const r=()=>{this.newImagesReady||this.completeImageTransition(e,t)};o.forEach((e=>{const t=new Image;t.onload=()=>{s+=1,s>=o.length&&r()},t.onerror=()=>{s+=1,s>=o.length&&r()},t.src=e}))},completeImageTransition(e,t){this.imageTransitionTimeout&&(clearTimeout(this.imageTransitionTimeout),this.imageTransitionTimeout=null),this.localImages=e,this.localMedia=t,this.newImagesReady=!0,this.carouselKey++,this.$nextTick((()=>{this.previousImages=[],this.previousMedia=[],this.preloadCriticalImages(),this.updateExpandedLayout(),this.schedulePdpScrollSyncMeasure(),this.tryNotifySingleImageFreescrollReady()}))},preloadCriticalImages(){var e,t,i,o,s;const r=null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium,a="number"==typeof r&&window.innerWidth<=r;if(this.localImages&&this.localImages.length>0){const e=this.localImages[0],t=(null==(o=null==(i=null==e?void 0:e.node)?void 0:i.image)?void 0:o.url)||(null==(s=null==e?void 0:e.node)?void 0:s.url);if(t){const e=a?this.setImageMobileSize(t):this.setImageDesktopSize(t);if(!document.querySelector(`link[rel="preload"][as="image"][href="${e}"]`)){const t=document.createElement("link");t.rel="preload",t.as="image",t.href=e,t.fetchPriority="high",document.head.appendChild(t)}}}"requestIdleCallback"in window&&this.localImages.length>1&&requestIdleCallback((()=>{var e,t,i,o,s,r;const a=Math.min(3,this.localImages.length),n=null==(t=null==(e=window.theme)?void 0:e.sizes)?void 0:t.medium,l="number"==typeof n&&window.innerWidth<=n;for(let d=1;d<a;d++){const e=this.localImages[d];if((null==(o=null==(i=null==e?void 0:e.node)?void 0:i.image)?void 0:o.url)||(null==(s=null==e?void 0:e.node)?void 0:s.url)){const t=(null==(r=e.node.image)?void 0:r.url)||e.node.url,i=l?this.setImageMobileSize(t):this.setImageDesktopSize(t),o=document.createElement("link");o.rel="preload",o.as="image",o.href=i,o.fetchPriority="low",document.head.appendChild(o)}}}),{timeout:2e3})},handleSlideChange(e){let t=0;"number"==typeof e?t=e:"number"==typeof e.index&&(t=e.index),this.currentSlide=t},initPdpScrollSync(){var e;if("true"===this.mini_pdp)return;if("undefined"==typeof ResizeObserver)return;const t=Number(window.layoutDesktopMinWidth);if(!Number.isFinite(t)||t<=0)return void this.teardownPdpScrollSync();if(!window.matchMedia(`(min-width: ${t}px)`).matches)return void this.teardownPdpScrollSync();if(this._pdpScrollSyncObserver)return;const i=null==(e=this.$el)?void 0:e.parentElement;if(!i)return;const o=i.closest(".product__media__wrapper");if(!o)return;const s=o.closest(".product-single");if(!s)return;if(s.hasAttribute("data-thumbnails-left"))return;const r=s.querySelector(".product__main__content > .product__inner");r&&(this._pdpScrollSyncProductSingle=s,this._pdpScrollSyncTargets=[o,r],this.measurePdpScrollSyncHeights(),this._pdpScrollSyncObserver=new ResizeObserver((()=>{this.schedulePdpScrollSyncMeasure()}
1)),this._pdpScrollSyncTargets.forEach((e=>this._pdpScrollSyncObserver.observe(e))))},schedulePdpScrollSyncMeasure(){this._pdpScrollSyncRaf||(this._pdpScrollSyncRaf=requestAnimationFrame((()=>{this._pdpScrollSyncRaf=null,this.measurePdpScrollSyncHeights()})))},measurePdpScrollSyncHeights(){if(!this._pdpScrollSyncTargets)return;let e=!0;this._pdpScrollSyncTargets.forEach((t=>{const i=t.getBoundingClientRect().height;i<=0?e=!1:t.style.setProperty("--pdp-scroll-sync-height",`${i}px`)})),this._pdpScrollSyncProductSingle&&this._pdpScrollSyncProductSingle.classList.toggle("pdp-scroll-sync-ready",e)},teardownPdpScrollSync(){this._pdpScrollSyncRaf&&(cancelAnimationFrame(this._pdpScrollSyncRaf),this._pdpScrollSyncRaf=null),this._pdpScrollSyncObserver&&(this._pdpScrollSyncObserver.disconnect(),this._pdpScrollSyncObserver=null),this._pdpScrollSyncTargets&&(this._pdpScrollSyncTargets.forEach((e=>{e.style.removeProperty("--pdp-scroll-sync-height")})),this._pdpScrollSyncTargets=null),this._pdpScrollSyncProductSingle&&(this._pdpScrollSyncProductSingle.classList.remove("pdp-scroll-sync-ready"),this._pdpScrollSyncProductSingle=null)}},beforeUnmount(){this.debouncedResize.cancel(),this.teardownPdpScrollSync(),this.handleViewportSize&&this.handleViewportSize(),this.imageTransitionTimeout&&(clearTimeout(this.imageTransitionTimeout),this.imageTransitionTimeout=null),document.removeEventListener("theme:resize:width",this.debouncedResize),fp.off("replace-variant-image",this.handleReplaceVariantImage),fp.off("upsell-images-updated",this.handleUpsellImagesUpdated),fp.off("pdp-color-updated",this.handleColorUpdate),fp.off("variant-updated",this.handleMiniPdpVariantUpdated),this.handleReplaceVariantImage=null,this.handleUpsellImagesUpdated=null,this.handleColorUpdate=null,this.handleMiniPdpVariantUpdated=null}},[["render",function(e,t,i,o,u,g){const f=c("PDPVideoPlayer"),w=c("PDPFreescroll");return r(),s(d,null,[u.localMedia.length?(r(),s(d,{key:0},[u.mini_pdp||g.isMobile?l("",!0):(r(),s(d,{key:0},[(r(!0),s(d,null,h(g.getAllImagesWithToggle,((e,i)=>(r(),s("div",{class:p("product__media desktop-images"+(e.node.sources?" desktop-video-height":"")+(1===g.getAllImagesWithToggle.length?" has-single-image":"")+(i>=g.getCurrentImageLimit&&!u.showAllImages?" pdp-gallery-hidden":"")),key:"unified-"+i+e.id},[e.node.image?(r(),s("img",{key:0,src:g.setImageDesktopSize(e.node.image.url),srcset:g.getDesktopImageSrcset(e.node.image.url),class:"tw-block tw-overflow-hidden tw-object-cover tw-w-full tw-h-full",alt:g.getMediaAlt(e),onClick:t=>g.handleZoom(e.node.image.url),loading:i<u.desktopPreloadCount?"eager":"lazy",fetchpriority:i<u.desktopPreloadCount?"high":"auto",decoding:"async"},null,8,Za)):l("",!0),e.node.sources?(r(),k(f,{key:1,sources:e.node.sources,productID:e.node.id,handleVideoSize:g.getDesktopImageHeights},null,8,["sources","productID","handleVideoSize"])):l("",!0),"true"==u.dataZoomEnable&&e.node.image?(r(),s("div",Ja,[a("button",{class:"media__button media__button--zoom","data-zoom-button":"",onClick:t=>g.handleZoom(e.node.image.url)},[t[1]||(t[1]=a("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-search",viewBox:"0 0 16 16"},[a("path",{d:"M16 14.864 14.863 16l-4.24-4.241a6.406 6.406 0 0 1-4.048 1.392 6.61 6.61 0 0 1-4.65-1.925A6.493 6.493 0 0 1 .5 9.098 6.51 6.51 0 0 1 0 6.575a6.536 6.536 0 0 1 1.922-4.652A6.62 6.62 0 0 1 4.062.5 6.52 6.52 0 0 1 6.575 0 6.5 6.5 0 0 1 9.1.5c.8.332 1.51.806 2.129 1.423a6.454 6.454 0 0 1 1.436 2.13 6.54 6.54 0 0 1 .498 2.522c0 1.503-.468 2.853-1.4 4.048L16 14.864zM3.053 10.091c.973.972 2.147 1.461 3.522 1.461 1.378 0 2.551-.489 3.525-1.461.968-.967 1.45-2.138 1.45-3.514 0-1.37-.482-2.545-1.45-3.524-.981-.968-2.154-1.45-3.525-1.45-1.376 0-2.547.483-3.513 1.45-.973.973-1.46 2.146-1.46 3.523 0 1.375.483 2.548 1.45 3.515z"})],-1)),a("span",Xa,"Zoom in image "+m(i+1)+" of "+m(g.getAllImagesWithToggle.length),1)],8,Ya)])):l("",!0)],2)))),128)),g.shouldShowExpandButton?(r(),s("div",en,[a("button",{class:"pdp-gallery-toggle gt-p__cta",onClick:t[0]||(t[0]=(...e)=>g.toggleImageExpansion&&g.toggleImageExpansion(...e)),style:n({"--expand-collapse-btn-line-offset":u.expandCollapseBtnLineOffset+"px","--expand-collapse-btn-margin-top":u.expandCollapseBtnMarginTop+"px"})},m(u.showAllImages?u.collapseText:u.expandText),5)])):l("",!0)],64))],64)):l("",!0),(r(),k(E,{to:"#pdp-freescroll-target",disabled:!u.teleportTarget},[u.localMedia.length>1&&g.isMobile||u.localMedia.length&&"true"===u.mini_pdp?(r(),k(w,{key:u.carouselKey,media:g.mediaToDisplay,isMobile:g.isMobile,zoomEnabled:"true"===u.dataZoomEnable,mobileImageWidth:u.pdp_mobile_image_width,mobileMaxHeight:u.pdp_mobile_max_height,itemsToShow:u.pdp_items_mobile,showArrows:g.shouldShowArrows,showPagination:"true"===u.show_pagination,imagePadding:u.zoom_gutter_mobile,handleVideoSize:g.getDesktopImageHeights,handleImageSize:g.getMobileImageHeights,useCustomArrows:"true"===u.arrow_custom_on,isMiniPdp:"true"===u.mini_pdp,arrowLeftImage:u.arrow_left_image,arrowLeftImageAlt:u.arrow_left_image_alt,arrowLeftImageWidth:u.arrow_left_image_width,arrowLeftImageHeight:u.arrow_left_image_height,arrowLeftImageDisabled:u.arrow_left_image_disabled,arrowLeftImageDisabledAlt:u.arrow_left_image_disabled_alt,arrowLeftImageDisabledWidth:u.arrow_left_image_disabled_width,arrowLeftImageDisabledHeight:u.arrow_left_image_disabled_height,onZoom:g.handleZoom,onSlideChange:g.handleSlideChange,onCarouselReady:g.handleCarouselInit},null,8,["media","isMobile","zoomEnabled","mobileImageWidth","mobileMaxHeight","itemsToShow","showArrows","showPagination","imagePadding","handleVideoSize","handleImageSize","useCustomArrows","isMiniPdp","arrowLeftImage","arrowLeftImageAlt","arrowLeftImageWidth","arrowLeftImageHeight","arrowLeftImageDisabled","arrowLeftImageDisabledAlt","arrowLeftImageDisabledWidth","arrowLeftImageDisabledHeight","onZoom","onSlideChange","onCarouselReady"])):l("",!0),(1===u.localImages.length||1===u.previousImages.length&&!u.newImagesReady)&&g.isMobile&&"true"!==u.mini_pdp?(r(),s("div",tn,[(r(!0),s(d,null,h(u.newImagesReady||u.localImages.length>0?u.localImages:u.previousImages,((e,t)=>{var i,o,a;return r(),s("div",{class:"product__media mobile-images",key:"mobile-"+t+((null==(i=e.node)?void 0:i.id)||t)},[g.getMobileSingleSlideImageUrl(e)?(r(),s("img",{key:0,src:g.setImageMobileSize(g.getMobileSingleSlideImageUrl(e)),srcset:g.getMobileImageSrcset(g.getMobileSingleSlideImageUrl(e)),loading:"eager",fetchpriority:"high",decoding:"async",class:"tw-block tw-overflow-hidden tw-object-cover tw-w-full",width:(null==(o=e.node.image)?void 0:o.width)||e.node.width,height:(null==(a=e.node.image)?void 0:a.height)||e.node.height,alt:g.getMediaAlt(e)},null,8,on)):l("",!0)])})),128))])):l("",!0)],8,["disabled"]))],64)}],["__file","PDPImages.vue"]]),rn={name:"CompleteTheLookDisplay",props:{ctlIds:String,addToCartText:String,SoldOutText:String,notavail:{type:Boolean,required:!0},comingsoon_tag:{type:String,required:!1},comingsoonText:{type:String,required:!0},unavailableText:{type:String,required:!0},optiontwoorder:{type:String,required:!1},optiontwoorderoverride:{type:String,required:!1},optiontwoorderoverridetag:{type:String,required:!1},optionthreeorder:{type:String,required:!1},hideOption3TitleTags:{type:String,required:!1},reactiveCtlTags:{type:String,required:!1},showImage2:{type:Boolean,default:!1},showImage3:{type:Boolean,default:!1}},mounted(){this.handleViewportSize=ge(this),this.setTag(),fp.on("ctl-products-updated",(e=>{this.hasProducts=e.hasProducts}))},beforeUnmount(){this.handleViewportSize&&this.handleViewportSize()},data:()=>({CTLPids:[],fullProducts:[],cleanProducts:[],products:[],masterProductTitle:"",masterProductId:"",bagMessage:"",activeVariant:"",activeComparePrice:"",activePrice:"",percentage:"",collectionTitle:"",sizes:[],stones:[],currentSize:"",currentStone:"",currentColor:"",optOneName:"",optTwoName:"",selectedProduct:null,hasProducts:!0,currentVariantAvailable:!0,isLoading:!1}),computed:{isComingSoonProduct(){return!(!this.selectedProduct||!this.comingsoon_tag)&&this.selectedProduct.tags.includes(this.comingsoon_tag)},checkSoldOutMessage(){return this.activeVariant||this.isComingSoonProduct?this.SoldOutText:this.unavailableText},isCurrentVariantAvailable(){if(!this.activeVariant)return!1;for(const e of this.products)for(const t of e.variants.edges)if(t.node.id===this.activeVariant)return t.node.availableForSale;return!1}},methods:{hasColorOption:e=>e.variants.edges.some((e=>e.node.selectedOptions.some((e=>"color"===e.name.toLowerCase())))),hasSizeOption:e=>e.variants.edges.some((e=>e.node.selectedOptions.some((e=>"size"===e.name.toLowerCase())))),setOptionTwoWidth(){var e=0;[...document.querySelectorAll("#CompleteTheLook .option2")].forEac
1h((t=>{t.style.width="auto";var i=t.offsetWidth;i>e&&(e=i)})),[...document.querySelectorAll("#CompleteTheLook .option2")].forEach((t=>{t.style.width=e+"px"}))},setOptionThreeWidth(){var e=0;[...document.querySelectorAll("#CompleteTheLook .option2")].forEach((t=>{t.style.width="auto";var i=t.offsetWidth;i>e&&(e=i)})),[...document.querySelectorAll("#CompleteTheLook .option2")].forEach((t=>{t.style.width=e+"px"}))},clickDetails(e){window.setFindingMethod("Complete The Look"),window.location.href="/products/"+e},setImageSize:e=>e?e.includes("?")&&void 0!==e?e+"&width=200":e+"?width=200":"",configImageUrl:e=>window.cdn+e.toLowerCase().replace(/\./gim,"").replace(/[/|\s|&|\\]/gim,"-")+".png",setTag(){if(!this.ctlIds)return this.CTLPids=[],void this.requestProductsData();let e=[];if(Array.isArray(this.ctlIds))e=this.ctlIds;else if("string"==typeof this.ctlIds)try{const t=JSON.parse(this.ctlIds);Array.isArray(t)&&(e=t)}catch(t){console.error("CompleteTheLookDisplay: Invalid ctlIds JSON",{ctlIds:this.ctlIds,error:(null==t?void 0:t.message)||t})}this.CTLPids=e,this.requestProductsData()},requestProductsData(){this.CTLPids.length>0?it.request(lt,{variables:{ids:this.CTLPids.map((e=>e))}}).then((e=>{var t,i,o,s;this.products=e.data.nodes;const r=[];for(let a=0;a<this.products.length;a++)(null==(t=this.products[a])?void 0:t.handle.length)>0&&!0===(null==(i=this.products[a])?void 0:i.availableForSale)&&(null==(s=null==(o=this.products[a])?void 0:o.title)?void 0:s.replace(/\s+/g," ").trim())&&this.products[a]&&r.push(this.setOptionsDisplays(this.products[a]));if(this.products=r,fp.emit("ctl-products-updated",{hasProducts:r.length>0}),r.length>0&&(this.$nextTick((()=>{var e;
1this.showDetails(null==(e=this.products[0])?void 0:e.handle)})),this.reactiveCtlTags)){const e=(this.reactiveCtlTags||"").split(",").map((e=>e.trim())).filter(Boolean);this.products.forEach((t=>{e.some((e=>{var i;return null==(i=t.tags)?void 0:i.includes(e)}))&&fp.on("reactive-ctl-image-updated",(e=>{e.handle===t.handle&&e.sku&&t.variants.edges.forEach((i=>{var o;if(i.node.sku===e.sku){const e=null==(o=i.node.image)?void 0:o.url;e&&(t.displayImageUrl=e)}}))}))}))}})).catch((e=>{console.error("CompleteTheLookDisplay: failed to load CTL products",{error:(null==e?void 0:e.message)||e}),fp.emit("ctl-products-updated",{hasProducts:!1})})):fp.emit("ctl-products-updated",{hasProducts:!1})},setOptionsDisplays(e){var t,i,o,s;return e.variants.edges.forEach((e=>{e.node.selectedOptions[1]&&(this.optOneName=e.node.selectedOptions[1].name,this.handleSize(e.node.selectedOptions[1].value)),e.node.selectedOptions[2]&&(this.optTwoName=e.node.selectedOptions[2].name,this.handleRhinestone(e.node.selectedOptions[2].value))})),e.sizes=this.sortOptionTwoData(y(this.sizes),e.tags),e.stones=this.sortOptionThreeData(y(this.stones)),e.optOneName=this.optOneName,e.optTwoName=this.optTwoName,e.displayImageUrl=null==(s=null==(o=null==(i=null==(t=null==e?void 0:e.images)?void 0:t.edges)?void 0:i[0])?void 0:o.node)?void 0:s.url,this.sizes=[],this.stones=[],e},handleSize(e){this.sizes.includes(e)||this.sizes.push(e)},handleRhinestone(e){this.stones.includes(e)||this.stones.push(e)},cleanPassCSVData:e=>e?e.split(",").map((function(e){return e.trim()})):[],sortOptionTwoData(e,t){let i=this.cleanPassCSVData(this.optiontwoorder);return t&&this.optiontwoorderoverridetag&&t.includes(this.optiontwoorderoverridetag)&&(i=this.cleanPassCSVData(this.optiontwoorderoverride)),e.sort(((e,t)=>i.indexOf(e)-i.indexOf(t)))},sortOptionThreeData(e){const t=this.cleanPassCSVData(this.optionthreeorder);return e.sort(((e,i)=>t.indexOf(e)-t.indexOf(i)))},selectDefaultsByHandle(e){this.products.forEach((t=>
1{t.handle===e&&t.variants.edges.forEach((e=>{e.node.selectedOptions.some((e=>"default title"===e.value.toLowerCase()))&&(this.currentSize=null),""===this.currentSize&&e.node.selectedOptions[0]&&e.node.selectedOptions[0].name.toLowerCase().includes("size")&&(this.currentSize=e.node.selectedOptions[0].value),""===this.currentSize&&e.node.selectedOptions[1]&&(this.currentSize=e.node.selectedOptions[1].value),""===this.currentStone&&e.node.selectedOptions[2]&&(this.currentStone=e.node.selectedOptions[2].value)}))})),this.resetStones(e),this.resetSizes(e),this.$nextTick((()=>{this.selectFirstOptions(e)})),this.setOptionTwoWidth(),this.setOptionThreeWidth()},selectFirstOptions(e){const t=document.getElementById(e+"_stones");if(t){const e=t.querySelectorAll("[data-stone-id]")[0];e&&e.click()}const i=document.getElementById(e+"_sizes");if(i){const e=i.querySelectorAll("[data-size-id]")[0];e&&e.click()}},showDetails(e){var t,i,o,s,r;this.currentSize="",this.currentStone="";[...document.querySelectorAll(".ctl-parent")].forEach((e=>{e.classList.remove("selected")}));const a=document.getElementById(e+"_parent");a&&a.classList.add("selected");[...document.querySelectorAll(".ctl-details")].forEach((e=>{e.classList.remove("selected")}));const n=document.getElementById(e+"_details");if(n&&n.classList.add("selected"),this.selectedProduct=this.products.find((t=>t.handle===e)),this.selectedProduct){this.optOneName=this.selectedProduct.optOneName||"",this.optTwoName=this.selectedProduct.optTwoName||"";const e=null==(r=null==(s=null==(o=null==(i=null==(t=this.selectedProduct.variants)?void 0:t.edges)?void 0:i[0])?void 0:o.node)?void 0:s.selectedOptions)?void 0:r.find((e=>"color"===e.name.toLowerCase()));this.currentColor=(null==e?void 0:e.value)||""}this.selectDefaultsByHandle(e),this.setBagButtons(e)},isOnSalePrice(){return""===this.activeComparePrice?"price":"compare on-sale"},getPriceClass(){return""===this.percentage?"price":"price strike"},isExcludedDefaultOption(e){var t,i;return(window.pdpIncludedProductType.split(",")||[]).includes(e)?this.hideOption3TitleTags&&(null==(i=null==(t=this.selectedProduct)?void 0:t.tags)?void 0:i.includes(this.hideOption3TitleTags))?"option p-options option3 hide-title":"option p-options option3":"option p-options option2"},getAddBagClass(){return this.bagMessage===this.addToCartText?(this.checkSelected(),"ctl-add-bag gt-p"):"ctl-add-bag gt-p oos"},getProductMasterIDfromBase:e=>e.replace("gid://shopify/Product/",""),addToBag(){if(!this.isLoading){window.setFindingMethod("Complete The Look:PDP");var e=this;if(this.activeVariant){const t=this.activeVariant.replace("gid://shopify/ProductVariant/","");if(this.bagMessage===this.addToCartText){this.isLoading=!0;const i={items:[{id:t,quantity:1}]};(window.theme&&window.theme.fetchWithRetry?window.theme.fetchWithRetry:window.fetch).call(window,window.Shopify.routes.root+"cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}).then((e=>e.json())).then((function(t){422===t.status?this.error(t):e.reloadCart()})).finally((()=>{e.isLoading=!1}))}}}},setBagButtons(e){let t,i=!1;this.activeVariant="",this.products.forEach((o=>{if(o.handle===e){let e=!1,s=!1;
1o.variants.edges.forEach((o=>{const r=o.node.selectedOptions[0].name.toLowerCase().includes("size");e=r?this.currentSize===o.node.selectedOptions[0].value:!o.node.selectedOptions[1]||this.currentSize===o.node.selectedOptions[1].value,s=!o.node.selectedOptions[2]||this.currentStone===o.node.selectedOptions[2].value,e&&s&&(t=o.node.id,i=o.node.availableForSale)}))}})),this.activeVariant=t,this.currentVariantAvailable=i,i?this.bagMessage=this.addToCartText:(this.bagMessage=this.SoldOutText,this.setSizeAvail(e,this.currentSize,!1),this.setStoneAvail(e,this.currentStone,!1)),this.checkInventoryAndPrice(e)},checkInventoryAndPrice(e){let t,i;this.resetStones(e),this.resetSizes(e),this.percentage="",this.activeComparePrice="",this.activePrice="";var o=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});this.products.forEach((o=>{o.handle===e&&o.variants.edges.forEach((o=>{var s,r;o.node.id===this.activeVariant&&(t=o.node.price.amount,i=(null==(r=null==(s=o.node)?void 0:s.compareAtPrice)?void 0:r.amount)||"");const a=o.node.selectedOptions[0].name.toLowerCase().includes("size");if((a||o.node.selectedOptions[1])&&!o.node.selectedOptions[2]){const t=o.node.availableForSale;a?this.setSizeAvail(e,o.node.selectedOptions[0].value,t):this.setSizeAvail(e,o.node.selectedOptions[1].value,t)}if((a&&o.node.selectedOptions[0].value===this.currentSize||o.node.selectedOptions[1]&&o.node.selectedOptions[1].value===this.currentSize)&&o.node.selectedOptions[2]){const t=o.node.availableForSale;this.setStoneAvail(e,o.node.selectedOptions[2].value,t)}if(o.node.selectedOptions[2]&&o.node.selectedOptions[2].value===this.currentStone){const t=o.node.availableForSale;a?this.setSizeAvail(e,o.node.selectedOptions[0].value,t):this.setSizeAvail(e,o.node.selectedOptions[1].value,t)}}))}));const s=parseFloat(i)||0,r=parseFloat(t)||0;if(r>0&&(this.activePrice=o.format(r)),s>0&&s>r){this.activeComparePrice=o.format(s);const e=Math.round(100*(s-r)/s);this.percentage="("+e+"% off)"}},setStone(e,t){const i=document.getElementById(t+"_stones");[...i.querySelectorAll(".stone")].forEach((e=>{e.classList.remove("selected")}));i.querySelectorAll(`[data-stone-id='${CSS.escape(e)}']`)[0].classList.add("selected"),this.currentStone=e,this.setBagButtons(t);const o=this.products.find((e=>e.handle===t));let s=null;
1o&&o.variants.edges.forEach((e=>{e.node.id===this.activeVariant&&(s=e.node.sku)}));const r=(this.reactiveCtlTags||"").split(",").map((e=>e.trim())).filter(Boolean);r.length&&r.some((e=>{var t;return null==(t=null==o?void 0:o.tags)?void 0:t.includes(e)}))&&fp.emit("reactive-ctl-image-updated",{handle:t,sku:s})},setSize(e,t){const i=document.getElementById(t+"_sizes");[...i.querySelectorAll(".option.p-options.option2")].forEach((e=>{e.classList.remove("selected")}));i.querySelectorAll(`[data-size-id='${CSS.escape(e)}']`)[0].classList.add("selected"),this.currentSize=e,this.setBagButtons(t);const o=this.products.find((e=>e.handle===t));let s=null;o&&o.variants.edges.forEach((e=>{e.node.id===this.activeVariant&&(s=e.node.sku)}));const r=(this.reactiveCtlTags||"").split(",").map((e=>e.trim())).filter(Boolean);r.length&&r.some((e=>{var t;return null==(t=null==o?void 0:o.tags)?void 0:t.includes(e)}))&&fp.emit("reactive-ctl-image-updated",{handle:t,sku:s})},ctlOptionAriaLabel(e,t,i,o,s){const r=[];this.currentColor&&r.push(`color ${this.currentColor}`),s&&this.currentSize&&r.push(`size ${this.currentSize}`);return`${e}${r.length?` in ${r.join(" ")}`:""} ${t} option: ${i} is ${o?"available":"currently unavailable"}`},setSizeAvail(e,t,i){var o;const s=document.getElementById(e+"_sizes");if(s){const r=s.querySelectorAll(`[data-size-id='${CSS.escape(t)}']`)[0];if(r){i?r.classList.remove("disabled","unavailable"):r.classList.add("disabled","unavailable");const s=(null==(o=this.products.find((t=>t.handle===e))||this.selectedProduct)?void 0:o.title)||"";r.setAttribute("aria-label",this.ctlOptionAriaLabel(s,"size",t,i,!1))}}},resetStones(e){var t;const i=document.getElementById(e+"_stones");if(i){const o=(null==(t=this.products.find((t=>t.handle===e))||this.selectedProduct)?void 0:t.title)||"",s=(this.optTwoName||"width").toLowerCase();[...i.querySelectorAll("a")].forEach((e=>{e.classList.add("disabled","unavailable"),e.setAttribute("aria-label",this.ctlOptionAriaLabel(o,s,e.getAttribute("data-stone-id"),!1,!0))}))}},resetSizes(e){var t;const i=document.getElementById(e+"_sizes");if(i){const o=(null==(t=this.products.find((t=>t.handle===e))||this.selectedProduct)?void 0:t.title)||"";[...i.querySelectorAll("a")].forEach((e=>{e.classList.add("disabled","unavailable"),e.setAttribute("aria-label",this.ctlOptionAriaLabel(o,"size",e.getAttribute("data-size-id"),!1,!1))}))}},setStoneAvail(e,t,i){var o;const s=document.getElementById(e+"_stones"),r=null==s?void 0:s.querySelectorAll(`[data-stone-id='${CSS.escape(t)}']`)[0];if(i?null==r||r.classList.remove("disabled","unavailable"):null==r||r.classList.add("disabled","unavailable"),r){const s=(null==(o=this.products.find((t=>t.handle===e))||this.selectedProduct)?void 0:o.title)||"",a=(this.optTwoName||"width").toLowerCase();r.setAttribute("aria-label",this.ctlOptionAriaLabel(s,a,t,i,!0))}},checkSelected(){var e;const t=document.getElementById("extended-ctl"),i=(null==(e=this.selectedProduct)?void 0:e.title)||"",o=(this.optTwoName||"width").toLowerCase();if(""!=this.currentStone){const e=t.querySelectorAll(`[data-stone-id='${CSS.escape(this.currentStone)}']`)[0];e&&(e.classList.remove("disabled","unavailable"),e.setAttribute("aria-label",this.ctlOptionAriaLabel(i,o,this.currentStone,!0,!0)))}if(""!=this.currentSize){const e=t.querySelectorAll(`[data-size-id='${CSS.escape(this.currentSize)}']`)[0];e&&(e.classList.remove("disabled","unavailable"),e.setAttribute("aria-label",this.ctlOptionAriaLabel(i,"size",this.currentSize,!0,!1)))}},reloadCart(){var e=this;(window.theme&&window.theme.getCart?window.theme.getCart(!0):er.get(`${window.theme.routes.cart}.js`).then((e=>e.json()))).then((t=>{document.dispatchEvent(new CustomEvent("theme:cart:change",{detail:{cart:t},bubbles:!0})),document.dispatchEvent(new CustomEvent("theme:cart:reload",{bubbles:!0})),setTimeout((()=>{[...document.querySelectorAll("[ data-drawer-toggle='drawer-cart']")].forEach((function(e){e.click()})),e.loading=!1}),300)})).catch((t=>{console.error("CompleteTheLookDisplay: Error loading widget:",{error:(null==t?void 0:t.message)||t,stack:null==t?void 0:t.stack,response:null==t?void 0:t.response,fullError:t}),e.showWidget=!1,e.error=!0}))}}},an={id:"extended-ctl"},nn={key:0},ln={class:"f fw flex-row"},dn=["onClick","id"],cn=["src","alt"],un={key:0},hn=["id"],pn={class:"topInfo"},mn=["innerHTML"],gn={class:"price-details gt-p__small"},fn=["innerHTML"],wn=["innerHTML"],yn=["innerHTML"],vn={class:"topInfo"},bn=["innerHTML"],Sn=["onClick"],_n={key:0,class:"topInfo"},Cn=["innerHTML"],Pn=["onClick"],kn=["id"],Tn=["innerHTML","data-size-id","onClick"],In={key:2,class:"topInfo",style:{"margin-top":"0px"}},An=["innerHTML"],Ln=["id"],En=["data-stone-id","innerHTML","onClick"],Mn={id:"add-to-bag-buttons"},xn=["innerHTML"],On=["disabled"],Bn=["innerHTML"],Fn=["innerHTML"];const Dn={key:0},$n={key:0},zn=["innerHTML"],Hn=["innerHTML"],Rn={class:"bundle-ctl__child-title gt-p__bold"},Nn={key:0},Vn={key:0},qn=["innerHTML"],Un=["innerHTML"],Gn={key:0,class:"ctl-space-reservation"},Wn=["id"],Kn=["innerHTML"],jn=["id"],Qn=["innerHTML"],Zn={class:"accordion accordion__body gt-p"},Jn={class:"bundle-ctl__child-title gt-p__bold"},Yn=["id"],Xn=["innerHTML","aria-controls","aria-expanded"],el=["id"],tl={class:"pdp-bar-ratings"},il=["aria-label"],ol={class:"pdp-bar-rating-label"},sl={class:"pdp-bar-rating-blocks"},rl=["id"],al=["innerHTML"],nl={class:"accordion accordion__body gt-p"},ll={key:0},dl={key:0},cl=["innerHTML"],ul=["innerHTML"],hl={key:1},pl=["innerHTML"],ml=["innerHTML"],gl={key:0,class:"bundle-ctl__panel-group"},fl={class:"bundle-ctl__child-title gt-p__bold"},wl={key:0},yl={key:0},vl=["innerHTML"],bl=["innerHTML"],Sl={key:1},_l=["innerHTML"],Cl=["innerHTML"],Pl=["id"],kl=["innerHTML"],Tl={class:"accordion accordion__body gt-p"},Il={key:0},Al={key:0},Ll=["innerHTML"],El=["innerHTML"],Ml={key:1},xl=["innerHTML"],Ol=["innerHTML"],Bl={key:0,class:"bundle-ctl__panel-group"},Fl={class:"bundle-ctl__child-title gt-p__bold"},Dl={key:0},$l={key:0},zl=["innerHTML"],Hl=["innerHTML"],Rl={key:1},Nl=["innerHTML"],Vl=["innerHTML"],ql=["id"],Ul=["innerHTML"],Gl={class:"accordion accordion__body gt-p"},Wl={key:0},Kl={key:0},jl=["innerHTML"],Ql=["innerHTML"],Zl={key:1},Jl=["innerHTML"],Yl=["innerHTML"],Xl={key:0,class:"bundle-ctl__panel-group"},ed={class:"bundle-ctl__child-title gt-p__bold"},td={key:0},id={key:0}
1,od=["innerHTML"],sd=["innerHTML"],rd={key:1},ad=["innerHTML"],nd=["innerHTML"],ld=["id"],dd=["innerHTML"],cd={class:"accordion accordion__body gt-p"},ud={key:0},hd={key:0},pd=["innerHTML"],md=["innerHTML"],gd={key:1},fd=["innerHTML"],wd=["innerHTML"],yd={key:0,class:"bundle-ctl__panel-group"},vd={class:"bundle-ctl__child-title gt-p__bold"},bd={key:0},Sd={key:0},_d=["innerHTML"],Cd=["innerHTML"],Pd={key:1},kd=["innerHTML"],Td=["innerHTML"],Id=["id"],Ad=["innerHTML"],Ld={class:"accordion accordion__body gt-p"},Ed={key:0},Md={key:0},xd=["innerHTML"],Od=["innerHTML"],Bd={key:1},Fd=["innerHTML"],Dd=["innerHTML"],$d={key:0,class:"bundle-ctl__panel-group"},zd={class:"bundle-ctl__child-title gt-p__bold"},Hd={key:0},Rd={key:0},Nd=["innerHTML"],Vd=["innerHTML"],qd={key:1},Ud=["innerHTML"],Gd=["innerHTML"],Wd={key:0,class:"ctl-space-reservation"},Kd=["id"],jd=["innerHTML"],Qd=["id"],Zd=["innerHTML"],Jd={class:"accordion accordion__body gt-p"},Yd={class:"bundle-ctl__child-title gt-p__bold"},Xd=["id"],ec=["innerHTML","aria-controls","aria-expanded"],tc=["id"],ic={class:"pdp-bar-ratings"},oc=["aria-label"],sc={class:"pdp-bar-rating-label"},rc={class:"pdp-bar-rating-blocks"},ac=["id"],nc=["innerHTML"],lc=["innerHTML"];const dc=fe({name:"CompleteTheLook",components:{CompleteTheLookDisplay:fe(rn,[["render",function(e,t,i,o,c,u){return r(),s("div",an,[c.hasProducts?(r(),s("div",nn,[a("div",ln,[(r(!0),s(d,null,h(c.products,((e,i)=>(r(),s("div",{class:"product__complete-look",key:e.handle+"_"+i},[a("a",{onClick:t=>u.showDetails(e.handle),class:p(0==i?"selected ctl-parent":"ctl-parent"),id:e.handle+"_parent",tabindex:"0"},[t[1]||(t[1]=a("span",{class:"helper"}
1,null,-1)),a("img",{src:u.setImageSize(e.displayImageUrl),alt:e.title},null,8,cn),t[2]||(t[2]=a("span",{class:"helper hider"},null,-1))],10,dn)])))),128))]),c.products.length>0?(r(),s("div",un,[(r(!0),s(d,null,h(c.products,((e,t)=>(r(),s("div",{class:p(0==t?"selected ctl-details":"ctl-details"),id:e.handle+"_details",key:e.handle+"__"+t},[a("div",pn,[a("p",{class:"black-title details-topper gt-p__small",innerHTML:e.title},null,8,mn),a("p",gn,[a("span",{class:p(u.isOnSalePrice()),innerHTML:c.activePrice},null,10,fn),a("span",{class:p(u.getPriceClass()),innerHTML:c.activeComparePrice},null,10,wn),a("span",{class:"percentage on-sale gt-p__small",innerHTML:c.percentage},null,8,yn)])]),a("div",vn,[(r(!0),s(d,null,h(e.variants.edges,((e,t)=>(r(),s(d,null,[(r(!0),s(d,null,h(e.node.selectedOptions,((e,i)=>(r(),s(d,null,["Color"==e.name?(r(),s("p",{innerHTML:"Color: "+e.value,class:p(0==t?"selected ctl-color gt-p__small":"ctl-color gt-p__small"),key:e.name+"_"+i},null,10,bn)):l("",!0)],64)))),256))],64)))),256)),u.hasColorOption(e)?(r(),s("a",{key:0,onClick:t=>u.clickDetails(e.handle),class:"full-details gt-p__small",tabindex:"0"},"Full Details",8,Sn)):l("",!0)]),u.isComingSoonProduct?l("",!0):(r(),s("div",_n,[c.currentSize?(r(),s("p",{key:0,innerHTML:c.optOneName+": "+c.currentSize,class:"selected ctl-color gt-p__small"},null,8,Cn)):l("",!0),u.hasColorOption(e)?l("",!0):(r(),s("a",{key:1,onClick:t=>u.clickDetails(e.handle),class:"full-details gt-p__small",tabindex:"0"},"Full Details",8,Pn))])),u.isComingSoonProduct?l("",!0):(r(),s("div",{key:1,class:"f fw flex-row flex-wrap flex-wrap-size",id:e.handle+"_sizes"},[(r(!0),s(d,null,h(e.sizes,((t,o)=>(r(),s("a",{key:o+"_"+e.handle,innerHTML:t,class:p(u.isExcludedDefaultOption(c.optOneName)),"data-size-id":t,onClick:i=>u.setSize(t,e.handle),style:n(i.showImage2?"background-image:url("+u.configImageUrl(t)+")":""),tabindex:"0"},null,14,Tn)))),128))],8,kn)),c.currentStone&&!u.isComingSoonProduct?(r(),s("div",In,[a("p",{innerHTML:c.optTwoName+": "+c.currentStone,class:"selected ctl-color gt-p__small"},null,8,An)])):l("",!0),u.isComingSoonProduct?l("",!0):(r(),s("div",{key:3,class:"f fw flex-row flex-wrap flex-wrap-stone",id:e.handle+"_stones"},[(r(!0),s(d,null,h(e.stones,((t,o)=>(r(),s("a",{key:o+"_"+e.handle,class:p([u.isExcludedDefaultOption(c.optTwoName),"stone"]),"data-stone-id":t,innerHTML:t,style:n(i.showImage3?"background-image:url("+u.configImageUrl(t)+")":""),onClick:i=>u.setStone(t,e.handle),tabindex:"0"},null,14,En)))),128))],8,Ln))],10,hn)))),128)),a("div",Mn,[u.isComingSoonProduct?(r(),s("div",{key:0,class:"ctl-add-bag gt-p coming-soon-true","data-add-to-cart-text":"",innerHTML:i.comingsoonText},null,8,xn)):c.currentVariantAvailable&&!u.isComingSoonProduct?(r(),s("div",{key:1,"data-add-to-cart":"",class:p([u.getAddBagClass(),{loading:c.isLoading}]),onClick:t[0]||(t[0]=e=>u.addToBag()),disabled:c.isLoading},[a("span",{innerHTML:c.bagMessage,"data-add-to-cart-text":"",class:"btn-state-ready"},null,8,Bn),t[3]||(t[3]=a("span",{class:"btn-state-loading",role:"button"},[a("svg",{height:"18",width:"18",class:"svg-loader"},[a("circle",{r:"7",cx:"9",cy:"9"}),a("circle",{"stroke-dasharray":"87.96459430051421 87.96459430051421",r:"7",cx:"9",cy:"9"})])],-1)),t[4]||(t[4]=a("span",{class:"btn-state-complete",role:"button"}," ",-1))],10,On)):c.currentVariantAvailable||u.isComingSoonProduct?l("",!0):(r(),s("div",{key:2,class:"ctl-add-bag gt-p oos","data-add-to-cart-text":"",innerHTML:u.checkSoldOutMessage},null,8,Fn))])])):l("",!0)])):l("",!0)])}],["__file","CompleteTheLookDisplay.vue"]])},props:{handle:{type:String,required:!0},tags:{type:Array,required:!0},pid:{type:String,required:!0}},data(){var e;return{hasProducts:!1,ctlFinalEmpty:!1,serverIsBundle:"true"===(null==(e=document.getElementById("CompleteTheLook"))?void 0:e.getAttribute("data-is-bundle")),raw_description:"",displayDataList:"",reactiveCtlImageTags:"",raw_accordian_1:"",raw_accordian_2:"",raw_accordian_3:"",raw_accordian_4:"",raw_accordian_5:"",accordian_title_1:"",accordian_title_2:"",accordian_title_3:"",accordian_title_4:"",accordian_title_5:"",displayAccordianData_1:"",displayAccordianData_2:"",displayAccordianData_3:"",displayAccordianData_4:"",displayAccordianData_5:"",accordian_list_1_li:"",accordian_list_2_li:"",accordian_list_3_li:"",accordian_list_4_li:"",accordian_list_5_li:"",title_5:"",raw_content_5:"",title_5_int:"",raw_content_5_override_tag:"",raw_content_5_override:"",raw_content_5_override_canada:"",ctl_title:"",upsell_product_list:"",upsell_product_list_value:"",upsell_list_limit:"",countryCode:"",localHandle:this.handle,localPid:this.pid,ctlFsWidgetId:"",ctlFsExcludeTag:"",localTags:[],openClass:"accordion-is-open",loading:!0,currentVariantMetafields:{}
1,metafieldResponseCache:{},variantMetafieldMapHandle:"",variantMetafieldRequest:null,ctl_position:!1,SoldOutText:"",addToCartText:"",comingsoonText:"",comingsoon_tag:"",UnavailableText:"",optiontwoorder:"",optiontwoorderoverride:"",optiontwoorderoverridetag:"",optionthreeorder:"",isBundle:!1,lineItemsStandalone:!1,bundleHandles:[],bundleChildren:[],bundlePanels:[],show_image_2:!1,show_image_3:!1,ctlSource:"",barRatingTitle:"",bar_rating_position:!1,barRatingFilled:"",barRatingUnfilled:"",barRatingTextColor:"",barRatingLineHeight:"",barRatingLineGap:"",barRatingOpen:!1,rawBarRatings:["","","","",""]}},mounted(){this.localTags=this.tags,this.countryCode=window.Shopify.country,this.optiontwoorder=this.$el.parentElement.getAttribute("data-optiontwoorder"),this.optiontwoorderoverride=this.$el.parentElement.getAttribute("data-optiontwoorderoverride"),this.optiontwoorderoverridetag=this.$el.parentElement.getAttribute("data-optiontwoorderoverridetag"),this.optionthreeorder=this.$el.parentElement.getAttribute("data-optionthreeorder"),this.show_image_2="true"===this.$el.parentElement.getAttribute("data-show-image-2"),this.show_image_3="true"===this.$el.parentElement.getAttribute("data-show-image-3"),this.raw_description=this.$el.parentElement.getAttribute("data-description_list"),this.lineItemsStandalone="true"===this.$el.parentElement.getAttribute("data-line_items_standalone"),this.reactiveCtlImageTags=this.$el.parentElement.dataset.reactiveCtlImageTags,this.raw_accordian_1=this.$el.parentElement.getAttribute("data-accordian_list_1"),this.raw_accordian_2=this.$el.parentElement.getAttribute("data-accordian_list_2"),this.raw_accordian_3=this.$el.parentElement.getAttribute("data-accordian_list_3"),this.raw_accordian_4=this.$el.parentElement.getAttribute("data-accordian_list_4"),this.raw_accordian_5=this.$el.parentElement.getAttribute("data-accordian_list_5"),this.accordian_title_1=this.$el.parentElement.getAttribute("data-accordian_title_1"),this.accordian_title_2=this.$el.parentElement.getAttribute("data-accordian_title_2"),this.accordian_title_3=this.$el.parentElement.getAttribute("data-accordian_title_3"),this.accordian_title_4=this.$el.parentElement.getAttribute("data-accordian_title_4"),this.accordian_title_5=this.$el.parentElement.getAttribute("data-accordian_title_5"),this.accordian_list_1_li=this.$el.parentElement.getAttribute("data-accordian_list_1_li"),this.accordian_list_2_li=this.$el.parentElement.getAttribute("data-accordian_list_2_li"),this.accordian_list_3_li=this.$el.parentElement.getAttribute("data-accordian_list_3_li"),this.accordian_list_4_li=this.$el.parentElement.getAttribute("data-accordian_list_4_li"),this.accordian_list_5_li=this.$el.parentElement.getAttribute("data-accordian_list_5_li"),this.title_5=this.$el.parentElement.getAttribute("data-title_5"),this.raw_content_5=this.$el.parentElement.getAttribute("data-raw_content_5"),this.title_5_int=this.$el.parentElement.getAttribute("data-title_5_int"),this.raw_content_5_override_tag=this.$el.parentElement.getAttribute("data-raw_content_5_override_tag"),this.raw_content_5_override=this.$el.parentElement.getAttribute("data-raw_content_5_override"),this.raw_content_5_override_canada=this.$el.parentElement.getAttribute("data-raw_content_5_override_canada"),this.ctl_title=this.$el.parentElement.getAttribute("data-ctl_title"),this.upsell_product_list=this.$el.parentElement.getAttribute("data-upsell_product_list"),this.upsell_list_limit=this.$el.parentElement.getAttribute("data-upsell_list_limit"),this.ctl_position=this.$el.parentElement.getAttribute("data-ctl_position"),this.addToCartText=this.$el.parentElement.getAttribute("data-addToCartText"),this.SoldOutText=this.$el.parentElement.getAttribute("data-SoldOutText"),this.comingsoon_tag=this.$el.parentElement.getAttribute("data-comingsoon_tag"),this.comingsoonText=this.$el.parentElement.getAttribute("data-comingsoonText"),this.UnavailableText=this.$el.parentElement.getAttribute("data-UnavailableText"),this.ctlFsWidgetId=this.$el.parentElement.getAttribute("data-ctl-fs-widget-id")||"",this.ctlFsExcludeTag=this.$el.parentElement.getAttribute("data-ctl-fs-exclude-tag")||"",this.barRatingTitle=this.$el.parentElement.getAttribute("data-bar_rating_title")||"Best For",this.bar_rating_position=this.$el.parentElement.getAttribute("data-bar_rating_position"),this.barRatingFilled=this.$el.parentElement.getAttribute("data-bar_rating_filled")||"#151515",this.barRatingUnfilled=this.$el.parentElement.getAttribute("data-bar_rating_unfilled")||"#cacaca",this.barRatingTextColor=this.$el.parentElement.getAttribute("data-bar_rating_text_color")||"#151515",this.barRatingLineHeight=this.$el.parentElement.getAttribute("data-bar_rating_line_height")||"10",this.barRatingLineGap=this.$el.parentElement.getAttribute("data-bar_rating_line_gap")||"16",this.rawBarRatings=[this.$el.parentElement.getAttribute("data-bar_rating_1")||"",this.$el.parentElement.getAttribute("data-bar_rating_2")||"",this.$el.parentElement.getAttribute("data-bar_rating_3")||"",this.$el.parentElement.getAttribute("data-bar_rating_4")||"",this.$el.parentElement.getAttribute("data-bar_rating_5")||""],this.loading=!0,this.cleanRawSettings(this.raw_description,"list"),this.cleanRawSettings(this.raw_accordian_1,"accordian_1"),this.cleanRawSettings(this.raw_accordian_2,"accordian_2"),this.cleanRawSettings(this.raw_accordian_3,"accordian_3"),this.cleanRawSettings(this.raw_accordian_4,"accordian_4"),this.cleanRawSettings(this.raw_accordian_5,"accordian_5"),this.cleanRawSettings(this.upsell_product_list,"CTL"),fp.on("pdp-handle-updated",(e=>{this.isBundle||e.handle!==this.localHandle&&(this.loading=!0,this.ctlSource="",this.ctlFinalEmpty=!1,this.localHandle=e.handle,this.variantMetafieldMapHandle="",this.variantMetafieldRequest=null,this.metafieldResponseCac
1he={},this.currentVariantMetafields={},this.cleanRawSettings(this.raw_description,"list"),this.cleanRawSettings(this.raw_accordian_1,"accordian_1"),this.cleanRawSettings(this.raw_accordian_2,"accordian_2"),this.cleanRawSettings(this.raw_accordian_3,"accordian_3"),this.cleanRawSettings(this.raw_accordian_4,"accordian_4"),this.cleanRawSettings(this.raw_accordian_5,"accordian_5"),this.cleanRawSettings(this.upsell_product_list,"CTL"))})),fp.on("pdp-tags-updated",(e=>{this.localTags=e.tags,e.pid&&(this.localPid=e.pid)})),fp.on("bundle-children-meta-updated",this.handleBundleChildrenMetaUpdated),fp.on("variant-color-selected",this.handleVariantColorSelected),fp.on("updateAddButton",this.handleVariantMetafieldSelection),fp.emit("ctl-request-bundle-children")},beforeUnmount(){fp.off("bundle-children-meta-updated",this.handleBundleChildrenMetaUpdated),fp.off("variant-color-selected",this.handleVariantColorSelected),fp.off("updateAddButton",this.handleVariantMetafieldSelection)},methods:{handleVariantColorSelected(e){if(this.isBundle)return;if(void 0===e.description)return;const t=document.querySelector("#product-description-pdp");t&&(t.innerHTML=e.description)},syncStandaloneLineItems(){if(!this.lineItemsStandalone)return;const e=document.querySelector(".additional-details--standalone");e&&this.isBundle&&e.classList.add("hide-me")},handleBundleChildrenMetaUpdated(e){const t=Array.isArray(null==e?void 0:e.children)&&e.children.length?e.children.map((e=>null==e?void 0:e.handle)).filter((e=>"string"==typeof e&&e.length)):[];this.bundleChildren=Array.isArray(null==e?void 0:e.children)&&e.children.length?e.children.filter((e=>e&&e.handle)):[],this.bundleHandles=t,this.isBundle=t.length>0,this.syncStandaloneLineItems(),this.isBundle&&(this.loadBundlePanels(),this.cleanRawSettings(this.raw_description,"list"),this.cleanRawSettings(this.raw_accordian_1,"accordian_1"),this.cleanRawSettings(this.raw_accordian_2,"accordian_2"),this.cleanRawSettings(this.raw_accordian_3,"accordian_3"),this.cleanRawSettings(this.raw_accordian_4,"accordian_4"),this.cleanRawSettings(this.raw_accordian_5,"accordian_5"),this.cleanRawSettings(this.upsell_product_list,"CTL"))},firstBundlePanel(){return Array.isArray(this.bundlePanels)&&this.bundlePanels.length?this.bundlePanels[0]:null},ctlHasWidget(){return this.showMetafieldValue(this.upsell_product_list_value)&&this.hasProducts},ctlShowPlaceholder(){return!this.isBundle&&!this.serverIsBundle&&(!this.ctlHasWidget()&&!this.ctlFinalEmpty)},cleanRawSettings(e,t){if(null==e||"string"!=typeof e)return;const i=[];e.split(/\r?\n/).forEach((e=>{let t=e.split(",");this.isValueMetafiledKey(t[0])&&i.push(this.splitMetaFieldTextSetting(t[0])),this.isValueMetafiledKey(t[1])&&i.push(this.splitMetaFieldTextSetting(t[1]))})),fp.on("pdp-tags-updated",(e=>{this.localTags=e.tags})),fp.on("updateAddButton",(e=>{this.instock=e.instock,this.notavail=e.notavail})),fp.on("ctl-products-updated",(e=>{this.hasProducts=e.hasProducts,e.hasProducts||(this.ctlFinalEmpty=!0)})),this.getMetafields(i,t)},getRawByType(e,t={}){const i=t[e];return"string"==typeof i?i:"list"===e?this.raw_description:"accordian_1"===e?this.raw_accordian_1:"accordian_2"===e?this.raw_accordian_2:"accordian_3"===e?this.raw_accordian_3:"accordian_4"===e?this.raw_accordian_4:"accordian_5"===e?this.raw_accordian_5:""},handleResponse(e,t,i=this,o={}){var s,r;"CTL"!==t&&(e=Array.isArray(e)?e:[]);const a=[],n=this.getRawByType(t,o),l=n?n.split(/\r?\n/):[];if("CTL"===t){if(i!==this)i.upsell_product_list_value=(null==(s=null==e?void 0:e[0])?void 0:s.value)||"";else{const t=null==(r=null==e?void 0:e[0])?void 0:r.value;t&&(!Array.isArray(t)||t.length>0)?(JSON.stringify(t)!==JSON.stringify(this.upsell_product_list_value||[])&&(this.hasProducts=!1),this.upsell_product_list_value=t,this.ctlSource="metafield"):(this.upsell_product_list_value=[],this.fetchCTLFromFS())}return}i===this&&(this.metafieldResponseCache[t]=e);let d=0;l.forEach((t=>{var i,o,s=[];let r=t.split(",");this.isVariantMetafieldKey(r[0])?s[0]=this.variantMetafieldValue(r[0]):this.isValueMetafiledKey(r[0])?(s[0]=(null==(i=e[d])?void 0:i.value)||"",d++):s[0]=r[0],this.isVariantMetafieldKey(r[1])?s[1]=this.variantMetafieldValue(r[1]):this.isValueMetafiledKey(r[1])?(s[1]=(null==(o=e[d])?void 0:o.value)||"",d++):s[1]=r[1],""!==s[0]&&""!==s[1]&&a.push(s)})),"list"===t&&(i.displayDataList=a),"accordian_1"===t&&(i.displayAccordianData_1=a),"accordian_2"===t&&(i.displayAccordianData_2=a),"accordian_3"===t&&(i.displayAccordianData_3=a),"accordian_4"===t&&(i.displayAccordianData_4=a),"accordian_5"===t&&(i.displayAccordianData_5=a)},buildMetaIdentifiersFromRaw(e){const t=[];if(!e)return t;
1return e.split(/\r?\n/).forEach((e=>{const i=e.split(",");this.isValueMetafiledKey(i[0])&&t.push(this.splitMetaFieldTextSetting(i[0])),this.isValueMetafiledKey(i[1])&&t.push(this.splitMetaFieldTextSetting(i[1]))})),t},async loadBundlePanels(){if(!this.bundleChildren.length)return;const e=await Promise.all(this.bundleChildren.map((e=>this.fetchBundlePanel(e))));this.bundlePanels=e.filter(Boolean)},async fetchBundlePanel(e={}){var t,i;const o=null==e?void 0:e.handle,s={handle:o,title:(null==e?void 0:e.title)||o||"",displayDataList:[],displayAccordianData_1:[],displayAccordianData_2:[],displayAccordianData_3:[],displayAccordianData_4:[],displayAccordianData_5:[],upsell_product_list_value:""},r=[{type:"list",raw:this.raw_description},{type:"accordian_1",raw:this.raw_accordian_1},{type:"accordian_2",raw:this.raw_accordian_2},{type:"accordian_3",raw:this.raw_accordian_3},{type:"accordian_4",raw:this.raw_accordian_4},{type:"accordian_5",raw:this.raw_accordian_5},{type:"CTL",raw:this.upsell_product_list}],a=[],n=[];for(const d of r){const e=this.buildMetaIdentifiersFromRaw(d.raw);e.length&&(n.push({type:d.type,raw:d.raw,start:a.length,count:e.length}),a.push(...e))}if(!a.length)return s;try{const e=await it.request(ot,{variables:{handle:o,countryIso2:this.countryCode,metaIdentifier:a}}),r=(null==(i=null==(t=null==e?void 0:e.data)?void 0:t.product)?void 0:i.metafields)||[];for(const t of n){const e=r.slice(t.start,t.start+t.count);this.handleResponse(e,t.type,s,{[t.type]:t.raw})}}catch(l){console.error("[CompleteTheLook] Error fetching bundle metafields",{handle:o,error:l})}return Array.isArray(s.upsell_product_list_value)&&(s.upsell_product_list_value=JSON.stringify(s.upsell_product_list_value)),s},isValueMetafiledKey:e=>!(void 0===e||!(e.startsWith("custom.")||e.startsWith("my_fields.")||e.startsWith("plytix."))),isVariantMetafieldKey:e=>"string"==typeof e&&e.trim().startsWith("variant."),variantMetafieldKey(e){return this.isVariantMetafieldKey(e)?e.trim().replace("variant.",""):""},variantMetafieldValue(e){const t=this.variantMetafieldKey(e);if(!t)return"";const i=this.currentVariantMetafields[t];return null==i?"":i},variantMetafieldIdentifiers(){const e=[],t=[];return[this.raw_description,this.raw_accordian_1,this.raw_accordian_2,this.raw_accordian_3,this.raw_accordian_4,this.raw_accordian_5].forEach((i=>{i&&i.split(/\r?\n/).forEach((i=>{i.split(",").forEach((i=>{const o=this.variantMetafieldKey(i);if(!o||t.includes(o))return;const s=o.split(".")[0],r=o.split(".").slice(1).join(".");s&&r&&(t.push(o),e.push({namespace:s,key:r}))}))}))})),e},normalizeVariantId:e=>null==e?"":String(e).split("/").pop(),async handleVariantMetafieldSelection(e){if(!e)return;if(!this.variantMetafieldIdentifiers().length)return;let t=e.variantMetafields;if(void 0===t)return;const i=this.normalizeVariantId(e.variantId);if(null===t&&i){const e=this.localHandle;if(t=await this.fetchVariantMetafieldValues(i),this.localHandle!==e)return;if(null===t)return}this.currentVariantMetafields=t||{},this.refreshVariantAccordions()},refreshVariantAccordions(){Object.keys(this.metafieldResponseCache).forEach((e=>{this.handleResponse(this.metafieldResponseCache[e],e)}))},async fetchVariantMetafieldValues(e){const t=await this.ensureVariantMetafieldMap();return t&&t[e]||null},ensureVariantMetafieldMap(){const e=this.localHandle;if(!e)return Promise.resolve(null);if(this.variantMetafieldMapHandle===e&&this.variantMetafieldRequest)return this.variantMetafieldRequest;const t=this.variantMetafieldIdentifiers();return t.length?(this.variantMetafieldMapHandle=e,this.variantMetafieldRequest=it.request(st,{variables:{handle:e,countryIso2:this.countryCode,metaIdentifier:t}}).then((e=>{var t,i,o;const s=(null==(o=null==(i=null==(t=null==e?void 0:e.data)?void 0:t.product)?void 0:i.variants)?void 0:o.edges)||[],r={};return s.forEach((e=>{const t=null==e?void 0:e.node;if(!(null==t?void 0:t.id))return;const i={};(t.metafields||[]).forEach((e=>{(null==e?void 0:e.namespace)&&(null==e?void 0:e.key)&&null!==e.value&&void 0!==e.value&&""!==e.value&&(i[`${e.namespace}.${e.key}`]=e.value)})),r[this.normalizeVariantId(t.id)]=i})),r})).catch((()=>({}
1))),this.variantMetafieldRequest):Promise.resolve(null)},splitMetaFieldTextSetting(e){let t={};if(e){const i=e.split(".");return t={namespace:i[0].trim(),key:i[1].trim()},t}return""},checkForLIValues(e){if(e)return e.startsWith("<li>")?"<ul>"+e+"</ul>":e},checkForSpaceValues(e){if(e)return e.startsWith(":")?e.trim():" "+e.trim()},checkForQuote:e=>e.replaceAll('"',""),showMetafieldValue:e=>Array.isArray(e)?e.length>0:""!==e&&void 0!==e,getMetafields(e,t){const i=this.isBundle?this.handle:this.localHandle;i&&it.request(ot,{variables:{handle:i,countryIso2:this.countryCode,metaIdentifier:e}}).then((e=>{var o,s;i===(this.isBundle?this.handle:this.localHandle)&&(this.handleResponse(null==(s=null==(o=null==e?void 0:e.data)?void 0:o.product)?void 0:s.metafields,t),this.loading=!1)})).catch((()=>{i===(this.isBundle?this.handle:this.localHandle)&&(this.loading=!1,"CTL"===t&&fp.emit("ctl-products-updated",{hasProducts:!1}))}))},handleReturnMessage(){let e="",t=this.localTags.includes(this.raw_content_5_override_tag);return e="CA"===window.Shopify.country?t?this.raw_content_5_override_canada:this.title_5_int:t?this.raw_content_5_override:this.raw_content_5,e},handleCTLTitle(){return this.ctl_title},triggerDrawerClasses(e){document.getElementById(e).classList.toggle(this.openClass)},toggleBarRatingAccordion(){this.barRatingOpen=!this.barRatingOpen,this.triggerDrawerClasses(this.handleize(this.barRatingTitle))},handleize:e=>e.replaceAll(" ","-").toLowerCase(),hasAccordionData(e){const t=`displayAccordianData_${e}`;return this.isBundle?this.bundlePanels.some((e=>e[t]&&e[t].length>0)):this.showMetafieldValue(this[t])},parsedBarRatings(){const e=[];for(const t of this.rawBarRatings){if(!t||!t.trim())continue;const i=t.split("|");if(i.length<2)continue;const o=i[0].trim(),s=Math.min(5,Math.max(0,parseInt(i[1].trim(),10)));if(o&&!isNaN(s)&&(e.push({label:o,value:s}),e.length>=5))break}return e},showBarRatings(){return this.parsedBarRatings().length>=3},barRatingCSSVars(){return{"--bar-filled":this.barRatingFilled,"--bar-unfilled":this.barRatingUnfilled,"--bar-text-color":this.barRatingTextColor,"--bar-line-height":`${this.barRatingLineHeight}px`,"--bar-line-gap":`${this.barRatingLineGap}px`}},checkForDetailsDisplayClass(e){let t="additional-details gt-p";return e&&e.length||(t=t+=" hide-me"),t},fetchCTLFromFS(){this.ctlFsExcludeTag&&this.localTags.includes(this.ctlFsExcludeTag)?fp.emit("ctl-products-updated",{hasProducts:!1}):this.ctlFsWidgetId?ee((()=>{window.FastSimonSDK.productRecommendationByWidget({productID:this.localPid,withAttributes:!1,widgetsIDS:[this.ctlFsWidgetId],callback:e=>{var t,i;const o=(null==(i=null==(t=null==e?void 0:e.payload)?void 0:t[0])?void 0:i.payload)||[];if(o.length>0){const e=o.map((e=>`gid://shopify/Product/${e.id}`));this.upsell_product_list_value=e,this.ctlSource="fs"}else this.upsell_product_list_value=[],fp.emit("ctl-products-updated",{hasProducts:!1})}})}),{onTimeout:()=>fp.emit("ctl-products-updated",{hasProducts:!1})}):fp.emit("ctl-products-updated",{hasProducts:!1})}}},[["render",function(e,t,i,o,f,w){const y=c("CompleteTheLookDisplay");return r(),s(d,null,[a("div",{class:p(w.checkForDetailsDisplayClass(f.isBundle?f.bundlePanels.flatMap((e=>e.displayDataList)):f.lineItemsStandalone?[]:f.displayDataList))},[f.isBundle||f.lineItemsStandalone?(r(!0),s(d,{key:1},h(f.bundlePanels,(e=>(r(),s(d,{key:e.handle+"-bundle-display-list"},[a("p",Rn,m(e.title),1),e.displayDataList&&e.displayDataList.length?(r(),s("ul",Nn,[(r(!0),s(d,null,h(e.displayDataList,((t,i)=>(r(),s(d,{key:e.handle+"-product-"+i},[""!=t[0]&&""!=t[1]?(r(),s("li",Vn,[a("b",{innerHTML:this.checkForQuote(t[0])},null,8,qn),a("span",{innerHTML:this.checkForSpaceValues(t[1])},null,8,Un)])):l("",!0)],64)))),128))])):l("",!0)],64)))),128)):(r(),s("ul",Dn,[(r(!0),s(d,null,h(f.displayDataList,((e,t)=>(r(),s(d,{key:t+"-product"},[""!=e[0]&&""!=e[1]?(r(),s("li",$n,[a("b",{innerHTML:this.checkForQuote(e[0])},null,8,zn),a("span",{innerHTML:this.checkForSpaceValues(e[1])},null,8,Hn)])):l("",!0)],64)))),128))]))],2),"true"==f.ctl_position?(r(),s(d,{key:0},[w.ctlShowPlaceholder()?(r(),s("div",Gn)):l("",!0),!f.isBundle&&this.showMetafieldValue(f.upsell_product_list_value)?(r(),s("div",{key:1,class:p("accordion accordion__wrapper "+f.openClass+("fs"===f.ctlSource?" ctl--fs-powered":"")),id:w.handleize(w.handleCTLTitle()),style:n({dis
1play:f.hasProducts?"block":"none"})},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:w.handleCTLTitle(),onClick:t[0]||(t[0]=u((e=>w.triggerDrawerClasses(w.handleize(w.handleCTLTitle()))),["prevent"]))},null,8,Kn),(r(),s("div",{class:"accordion accordion__body gt-p",key:f.upsell_product_list_value+"-top"},[g(y,{SoldOutText:f.SoldOutText,addToCartText:f.addToCartText,unavailableText:f.UnavailableText,comingsoonText:f.comingsoonText,comingsoon_tag:f.comingsoon_tag,ctlIds:f.upsell_product_list_value||"[]",optiontwoorder:f.optiontwoorder,optiontwoorderoverride:f.optiontwoorderoverride,optiontwoorderoverridetag:f.optiontwoorderoverridetag,optionthreeorder:f.optionthreeorder,"reactive-ctl-tags":f.reactiveCtlImageTags,"show-image-2":f.show_image_2,"show-image-3":f.show_image_3},null,8,["SoldOutText","addToCartText","unavailableText","comingsoonText","comingsoon_tag","ctlIds","optiontwoorder","optiontwoorderoverride","optiontwoorderoverridetag","optionthreeorder","reactive-ctl-tags","show-image-2","show-image-3"])]))],14,Wn)):(r(),s(d,{key:2},[w.firstBundlePanel()&&this.showMetafieldValue(w.firstBundlePanel().upsell_product_list_value)?(r(),s("div",{key:0,class:p("accordion accordion__wrapper "+f.openClass+("fs"===f.ctlSource?" ctl--fs-powered":"")),id:w.handleize(w.handleCTLTitle())+"-"+w.firstBundlePanel().handle,style:n({display:f.hasProducts?"block":"none"})},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:w.handleCTLTitle(),onClick:t[1]||(t[1]=u((e=>w.triggerDrawerClasses(w.handleize(w.handleCTLTitle())+"-"+w.firstBundlePanel().handle)),["prevent"]))},null,8,Qn),a("div",Zn,[a("p",Jn,m(w.firstBundlePanel().title),1),g(y,{SoldOutText:f.SoldOutText,addToCartText:f.addToCartText,unavailableText:f.UnavailableText,comingsoonText:f.comingsoonText,comingsoon_tag:f.comingsoon_tag,ctlIds:w.firstBundlePanel().upsell_product_list_value||"[]",optiontwoorder:f.optiontwoorder,optiontwoorderoverride:f.optiontwoorderoverride,optiontwoorderoverridetag:f.optiontwoorderoverridetag,optionthreeorder:f.optionthreeorder,"reactive-ctl-tags":f.reactiveCtlImageTags},null,8,["SoldOutText","addToCartText","unavailableText","comingsoonText","comingsoon_tag","ctlIds","optiontwoorder","optiontwoorderoverride","optiontwoorderoverridetag","optionthreeorder","reactive-ctl-tags"])])],14,jn)):l("",!0)],64))],64)):l("",!0),"true"==f.bar_rating_position&&w.showBarRatings()?(r(),s("div",{key:1,class:"accordion accordion__wrapper",id:w.handleize(f.barRatingTitle),style:n(w.barRatingCSSVars())},[a("button",{type:"button",class:"accordion accordion__title gt-p__bold",innerHTML:f.barRatingTitle,"aria-controls":w.handleize(f.barRatingTitle)+"-body","aria-expanded":f.barRatingOpen.toString(),onClick:t[2]||(t[2]=u((e=>w.toggleBarRatingAccordion()),["prevent"]))},null,8,Xn),a("div",{class:"accordion accordion__body gt-p",id:w.handleize(f.barRatingTitle)+"-body"},[a("div",tl,[(r(!0),s(d,null,h(w.parsedBarRatings(),((e,t)=>(r(),s("div",{class:"pdp-bar-rating-row",key:"bar-rating-top-"+t,role:"img","aria-label":`${e.label}: ${e.value} out of 5`},[a("span",ol,m(e.label),1),a("div",sl,[(r(),s(d,null,h(5,(i=>a("span",{key:"bar-top-"+t+"-"+i,class:p(["pdp-bar-rating-block",i<=e.value?"pdp-bar-rating-block--filled":"pdp-bar-rating-block--empty"])},null,2))),64))])],8,il)))),128))])],8,el)],12,Yn)):l("",!0),""!=f.accordian_title_1&&w.hasAccordionData(1)?(r(),s("div",{key:2,class:"accordion accordion__wrapper",id:w.handleize(f.accordian_title_1)},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:f.accordian_title_1,onClick:t[3]||(t[3]=u((e=>w.triggerDrawerClasses(w.handleize(f.accordian_title_1))),["prevent"]))},null,8,al),a("div",nl,[f.isBundle?(r(!0),s(d,{key:1},h(f.bundlePanels,(e=>(r(),s(d,{key:e.handle+"-acc1-section"},[e.displayAccordianData_1&&e.displayAccordianData_1.length?(r(),s("div",gl,[a("p",fl,m(e.title),1),"true"!=f.accordian_list_1_li?(r(),s("ul",wl,[(r(!0),s(d,null,h(e.displayAccordianData_1,((t,i)=>(r(),s(d,{key:e.handle+"-acc1-item-"+i},[""!=t[0]&&""!=t[1]?(r(),s("li",yl,[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,vl)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,bl)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",Sl,[(r(!0),s(d,null,h(e.displayAccordianData_1,((t,i)=>(r(),s(d,{key:e.handle+"-acc1-inline-"+i},[""!=t[0]&&""!=t[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,_l)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,Cl)):l("",!0)],64)):l("",!0)],64)))),128))]))])):l("",!0)],64)))),128)):(r(),s(d,{key:0},["true"!=f.accordian_list_1_li?(r(),s("ul",ll,[(r(!0),s(d,null,h(f.displayAccordianData_1,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s("li",dl,[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,cl)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,ul)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",hl,[(r(!0),s(d,null,h(f.displayAccordianData_1,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,pl)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,ml)):l("",!0)],64)):l("",!0)],64)))),128))]))],64))])],8,rl)):l("",!0),""!=f.accordian_title_2&&w.hasAccordionData(2)?(r(),s("div",{key:3,class:"accordion accordion__wrapper",id:w.handleize(f.accordian_title_2)},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:f.accordian_title_2,onClick:t[4]||(t[4]=u((e=>w.triggerDrawerClasses(w.handleize(f.accordian_title_2))),["prevent"]))},null,8,kl),a("div",Tl,[f.isBundle?(r(!0),s(d,{key:1},h(f.bundlePanels,(e=>(r(),s(d,{key:e.handle+"-acc2-section"},[e.displayAccordianData_2&&e.displayAccordianData_2.length?(r(),s("div",Bl,[a("p",Fl,m(e.title),
11),"true"!=f.accordian_list_2_li?(r(),s("ul",Dl,[(r(!0),s(d,null,h(e.displayAccordianData_2,((t,i)=>(r(),s(d,{key:e.handle+"-acc2-item-"+i},[""!=t[0]&&""!=t[1]?(r(),s("li",$l,[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,zl)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,Hl)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",Rl,[(r(!0),s(d,null,h(e.displayAccordianData_2,((t,i)=>(r(),s(d,{key:e.handle+"-acc2-inline-"+i},[""!=t[0]&&""!=t[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,Nl)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,Vl)):l("",!0)],64)):l("",!0)],64)))),128))]))])):l("",!0)],64)))),128)):(r(),s(d,{key:0},["true"!=f.accordian_list_2_li?(r(),s("ul",Il,[(r(!0),s(d,null,h(f.displayAccordianData_2,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s("li",Al,[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,Ll)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,El)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",Ml,[(r(!0),s(d,null,h(f.displayAccordianData_2,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,xl)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,Ol)):l("",!0)],64)):l("",!0)],64)))),128))]))],64))])],8,Pl)):l("",!0),""!=f.accordian_title_3&&w.hasAccordionData(3)?(r(),s("div",{key:4,class:"accordion accordion__wrapper",id:w.handleize(f.accordian_title_3)},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:f.accordian_title_3,onClick:t[5]||(t[5]=u((e=>w.triggerDrawerClasses(w.handleize(f.accordian_title_3))),["prevent"]))},null,8,Ul),a("div",Gl,[f.isBundle?(r(!0),s(d,{key:1},h(f.bundlePanels,(e=>(r(),s(d,{key:e.handle+"-acc3-section"},[e.displayAccordianData_3&&e.displayAccordianData_3.length?(r(),s("div",Xl,[a("p",ed,m(e.title),1),"true"!=f.accordian_list_3_li?(r(),s("ul",td,[(r(!0),s(d,null,h(e.displayAccordianData_3,((t,i)=>(r(),s(d,{key:e.handle+"-acc3-item-"+i},[""!=t[0]&&""!=t[1]?(r(),s("li",id,[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,od)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,sd)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",rd,[(r(!0),s(d,null,h(e.displayAccordianData_3,((t,i)=>(r(),s(d,{key:e.handle+"-acc3-inline-"+i},[""!=t[0]&&""!=t[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,ad)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,nd)):l("",!0)],64)):l("",!0)],64)))),128))]))])):l("",!0)],64)))),128)):(r(),s(d,{key:0},["true"!=f.accordian_list_3_li?(r(),s("ul",Wl,[(r(!0),s(d,null,h(f.displayAccordianData_3,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s("li",Kl,[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,jl)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,Ql)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",Zl,[(r(!0),s(d,null,h(f.displayAccordianData_3,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,Jl)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,Yl)):l("",!0)],64)):l("",!0)],64)))),128))]))],64))])],8,ql)):l("",!0),""!=f.accordian_title_4&&w.hasAccordionData(4)?(r(),s("div",{key:5,class:"accordion accordion__wrapper",id:w.handleize(f.accordian_title_4)},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:f.accordian_title_4,onClick:t[6]||(t[6]=u((e=>w.triggerDrawerClasses(w.handleize(f.accordian_title_4))),["prevent"]))},null,8,dd),a("div",cd,[f.isBundle?(r(!0),s(d,{key:1},h(f.bundlePanels,(e=>(r(),s(d,{key:e.handle+"-acc4-section"},[e.displayAccordianData_4&&e.displayAccordianData_4.length?(r(),s("div",yd,[a("p",vd,m(e.title),
11),"true"!=f.accordian_list_4_li?(r(),s("ul",bd,[(r(!0),s(d,null,h(e.displayAccordianData_4,((t,i)=>(r(),s(d,{key:e.handle+"-acc4-item-"+i},[""!=t[0]&&""!=t[1]?(r(),s("li",Sd,[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,_d)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,Cd)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",Pd,[(r(!0),s(d,null,h(e.displayAccordianData_4,((t,i)=>(r(),s(d,{key:e.handle+"-acc4-inline-"+i},[""!=t[0]&&""!=t[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,kd)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,Td)):l("",!0)],64)):l("",!0)],64)))),128))]))])):l("",!0)],64)))),128)):(r(),s(d,{key:0},["true"!=f.accordian_list_4_li?(r(),s("ul",ud,[(r(!0),s(d,null,h(f.displayAccordianData_4,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s("li",hd,[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,pd)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,md)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",gd,[(r(!0),s(d,null,h(f.displayAccordianData_4,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,fd)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,wd)):l("",!0)],64)):l("",!0)],64)))),128))]))],64))])],8,ld)):l("",!0),""!=f.accordian_title_5&&w.hasAccordionData(5)?(r(),s("div",{key:6,class:"accordion accordion__wrapper",id:w.handleize(f.accordian_title_5)},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:f.accordian_title_5,onClick:t[7]||(t[7]=u((e=>w.triggerDrawerClasses(w.handleize(f.accordian_title_5))),["prevent"]))},null,8,Ad),a("div",Ld,[f.isBundle?(r(!0),s(d,{key:1},h(f.bundlePanels,(e=>(r(),s(d,{key:e.handle+"-acc5-section"},[e.displayAccordianData_5&&e.displayAccordianData_5.length?(r(),s("div",$d,[a("p",zd,m(e.title),1),"true"!=f.accordian_list_5_li?(r(),s("ul",Hd,[(r(!0),s(d,null,h(e.displayAccordianData_5,((t,i)=>(r(),s(d,{key:e.handle+"-acc5-item-"+i},[""!=t[0]&&""!=t[1]?(r(),s("li",Rd,[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,Nd)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,Vd)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",qd,[(r(!0),s(d,null,h(e.displayAccordianData_5,((t,i)=>(r(),s(d,{key:e.handle+"-acc5-inline-"+i},[""!=t[0]&&""!=t[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(t[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(t[0])},null,8,Ud)):l("",!0),this.checkForSpaceValues(t[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(t[1])},null,8,Gd)):l("",!0)],64)):l("",!0)],64)))),128))]))])):l("",!0)],64)))),128)):(r(),s(d,{key:0},["true"!=f.accordian_list_5_li?(r(),s("ul",Ed,[(r(!0),s(d,null,h(f.displayAccordianData_5,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s("li",Md,[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,xd)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,Od)):l("",!0)])):l("",!0)],64)))),128))])):(r(),s("ul",Bd,[(r(!0),s(d,null,h(f.displayAccordianData_5,((e,t)=>(r(),s(d,{key:t+"-items"},[""!=e[0]&&""!=e[1]?(r(),s(d,{key:0},[""!=this.checkForQuote(e[0])?(r(),s("span",{key:0,innerHTML:this.checkForQuote(e[0])},null,8,Fd)):l("",!0),this.checkForSpaceValues(e[1])?(r(),s("span",{key:1,innerHTML:this.checkForSpaceValues(e[1])},null,8,Dd)):l("",!0)],64)):l("",!0)],64)))),128))]))],64))])],8,Id)):l("",!0),"false"==f.ctl_position?(r(),s(d,{key:7},[w.ctlShowPlaceholder()?(r(),s("div",Wd)):l("",!0),!f.isBundle&&this.showMetafieldValue(f.upsell_product_list_value)?(r(),s("div",{key:1,class:p("accordion accordion__wrapper "+f.openClass+("fs"===f.ctlSource?" ctl--fs-powered":"")),id:w.handleize(w.handleCTLTitle()),style:n({dis
1play:f.hasProducts?"block":"none"})},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:w.handleCTLTitle(),onClick:t[8]||(t[8]=u((e=>w.triggerDrawerClasses(w.handleize(w.handleCTLTitle()))),["prevent"]))},null,8,jd),(r(),s("div",{class:"accordion accordion__body gt-p",key:f.upsell_product_list_value+"-bottom"},[g(y,{SoldOutText:f.SoldOutText,addToCartText:f.addToCartText,unavailableText:f.UnavailableText,comingsoonText:f.comingsoonText,comingsoon_tag:f.comingsoon_tag,ctlIds:f.upsell_product_list_value||"[]",optiontwoorder:f.optiontwoorder,optiontwoorderoverride:f.optiontwoorderoverride,optiontwoorderoverridetag:f.optiontwoorderoverridetag,optionthreeorder:f.optionthreeorder,"reactive-ctl-tags":f.reactiveCtlImageTags,"show-image-2":f.show_image_2,"show-image-3":f.show_image_3},null,8,["SoldOutText","addToCartText","unavailableText","comingsoonText","comingsoon_tag","ctlIds","optiontwoorder","optiontwoorderoverride","optiontwoorderoverridetag","optionthreeorder","reactive-ctl-tags","show-image-2","show-image-3"])]))],14,Kd)):(r(),s(d,{key:2},[w.firstBundlePanel()&&this.showMetafieldValue(w.firstBundlePanel().upsell_product_list_value)?(r(),s("div",{key:0,class:p("accordion accordion__wrapper "+f.openClass+("fs"===f.ctlSource?" ctl--fs-powered":"")),id:w.handleize(w.handleCTLTitle())+"-"+w.firstBundlePanel().handle+"-bottom"},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:w.handleCTLTitle(),onClick:t[9]||(t[9]=u((e=>w.triggerDrawerClasses(w.handleize(w.handleCTLTitle())+"-"+w.firstBundlePanel().handle+"-bottom")),["prevent"]))},null,8,Zd),a("div",Jd,[a("p",Yd,m(w.firstBundlePanel().title),1),g(y,{SoldOutText:f.SoldOutText,addToCartText:f.addToCartText,unavailableText:f.UnavailableText,comingsoonText:f.comingsoonText,comingsoon_tag:f.comingsoon_tag,ctlIds:w.firstBundlePanel().upsell_product_list_value||"[]",optiontwoorder:f.optiontwoorder,optiontwoorderoverride:f.optiontwoorderoverride,optiontwoorderoverridetag:f.optiontwoorderoverridetag,optionthreeorder:f.optionthreeorder,"reactive-ctl-tags":f.reactiveCtlImageTags},null,8,["SoldOutText","addToCartText","unavailableText","comingsoonText","comingsoon_tag","ctlIds","optiontwoorder","optiontwoorderoverride","optiontwoorderoverridetag","optionthreeorder","reactive-ctl-tags"])])],10,Qd)):l("",!0)],64))],64)):l("",!0),"false"==f.bar_rating_position&&w.showBarRatings()?(r(),s("div",{key:8,class:"accordion accordion__wrapper",id:w.handleize(f.barRatingTitle),style:n(w.barRatingCSSVars())},[a("button",{type:"button",class:"accordion accordion__title gt-p__bold",innerHTML:f.barRatingTitle,"aria-controls":w.handleize(f.barRatingTitle)+"-body","aria-expanded":f.barRatingOpen.toString(),onClick:t[10]||(t[10]=u((e=>w.toggleBarRatingAccordion()),["prevent"]))},null,8,ec),a("div",{class:"accordion accordion__body gt-p",id:w.handleize(f.barRatingTitle)+"-body"},[a("div",ic,[(r(!0),s(d,null,h(w.parsedBarRatings(),((e,t)=>(r(),s("div",{class:"pdp-bar-rating-row",key:"bar-rating-bottom-"+t,role:"img","aria-label":`${e.label}: ${e.value} out of 5`},[a("span",sc,m(e.label),1),a("div",rc,[(r(),s(d,null,h(5,(i=>a("span",{key:"bar-bottom-"+t+"-"+i,class:p(["pdp-bar-rating-block",i<=e.value?"pdp-bar-rating-block--filled":"pdp-bar-rating-block--empty"])},null,2))),64))])],8,oc)))),128))])],8,tc)],12,Xd)):l("",!0),a("div",{class:"accordion accordion__wrapper",id:w.handleize(this.title_5)},[a("label",{class:"accordion accordion__title gt-p__bold",innerHTML:this.title_5,onClick:t[11]||(t[11]=u((e=>w.triggerDrawerClasses(w.handleize(this.title_5))),["prevent"]))},null,8,nc),a("div",{class:"accordion accordion__body gt-p",innerHTML:w.handleReturnMessage()},null,8,lc)],8,ac)],64)}],["__file","CompleteTheLook.vue"]]);function cc(){let e={scale:1,translate:{x:0,y:0},isZooming:!1,isDragging:!1,initialDistance:0,lastTouch:{x:0,y:0},zoomCenter:{x:.5,y:.5},lastTapTime:0,tapTimeout:null};const t=(e,t)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY),i=(e,t)=>e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom;function o(e){const t=e.querySelector(".carousel__slide--active");return null==t?void 0:t.querySelector("img")}function s(t){const{scale:i,translate:o,zoomCenter:s}=e;t.style.transformOrigin=`${100*s.x}% ${100*s.y}%`,t.style.transform=`scale(${i}) translate(${o.x/i}px, ${o.y/i}px)`}function r(t){e.scale=1,e.translate={x:0,y:0},t.style.transform="scale(1)",t.style.transformOrigin="center center"}return{touchstart:function(a){const n=o(a.currentTarget);if(!n)return;const l=n.getBoundingClientRect(),d=Array.from(a.touches);if(2===d.length){if(e.tapTimeout&&(clearTimeout(e.tapTimeout),e.tapTimeout=null),!d.every((e=>i(e,l))))return;a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation(),e.isZooming=!0,e.isDragging=!1;const o=t(d[0],d[1]);if(e.initialDistance=o/e.scale,1===e.scale){const t=(c=d[0],u=d[1],{x:(c.clientX+u.clientX)/2,y:(c.clientY+u.clientY)/2});e.zoomCenter={x:(t.x-l.left)/l.width,y:(t.y-l.top)/l.height}}}else if(1===d.length){const t=d[0];if(!i(t,l))return;const o=Date.now();if(o-e.lastTapTime<300)return e.tapTimeout&&(clearTimeout(e.tapTimeout),e.tapTimeout=null),a.preventDefault(),function(t,i){const o=i.getBoundingClientRect();if(1===e.scale)e.scale=2,e.zoomCenter={x:(t.clientX-o.left)/o.width,y:(t.clientY-o.top)/o.height};else{if(!(e.scale<3))return void r(i);e.scale=3}i.style.transition="transform 0.3s ease-out",s(i)}(t,n),void(e.lastTapTime=0);e.lastTapTime=o,e.scale>1?(a.preventDefault(),e.isDragging=!0,e.lastTouch={x:t.clientX,y:t.clientY}):e.tapTimeout=setTimeout((()=>{e.tapTimeout=null}),300)}var c,u},touchmove:function(i){const r=o(i.currentTarget);if(!r)return;const a=Array.from(i.touches);if(2===a.length&&e.isZooming){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation();const o=t(a[0],a[1]);e.scale=Math.min(Math.max(o/e.initialDistance,1),3),r.style.transition="none",s(r)}else if(1===a.length&&e.isDragging&&e.scale>1){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation();const t=a[0],o=1.5,n=(t.clientX-e.lastTouch.x)*o,l=(t.clientY-e.lastTouch.y)*o,d=200*(e.scale-1);e.translate.x=Math.max(-d,Math.min(d,e.translate.x+n)),e.translate.y=Math.max(-d,Math.min(d,e.translate.y+l)),e.lastTouch={x:t.clientX,y:t.clientY},s(r)}},touchend:function(t){const i=o(t.currentTarget);i&&((e.scale>1||e.isZooming)&&(i.style.transition="transform 0.3s ease-out"),0===t.touches.length?(e.scale<1.2&&r(i),e.isZooming=!1,e.isDragging=!1):1===t.touches.length&&e.isZooming&&(e.isZooming=!1,e.scale>1&&(e.isDragging=!0,e.lastTouch={x:t.touches[0].clientX,y:t.touches[0].clientY})))}}}const uc={class:"close-wrapper"},hc={key:0,"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-close",width:"50",height:"50",viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pc={key:1,"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-close",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mc={class:"zoom-image-wrapper"}
1,gc=["src","alt"],fc={key:0,class:"zoom-controls"},wc={class:"gt-p__small",style:{color:"#151515"}};const yc=fe({name:"PDPZoom",components:{Carousel:P,Slide:C},data:()=>({images:[],activeSlide:0,isMobileSize:!1,pinchHandlers:null,viewportPinRaf:null,carouselConfig:{transition:0,wrapAround:!0,mouseDrag:!1,breakpoints:{786:{wrapAround:!1,dir:"ttb",gap:20}}}}),computed:{showPaginationAndNavigation(){return this.isMobileSize&&this.images.length>1},deviceType(){var e;return null==(e=window.siteGlobals)?void 0:e.device}},mounted(){this.isMobileSize="mobile-size"===this.deviceType,this.pinchHandlers=cc(),this.setupEventListeners(),this.$nextTick((()=>{this.setupPinchZoom()}))},beforeUnmount(){this.cleanup()},methods:{getMediaAlt:K,setupEventListeners(){document.addEventListener("theme:resize",this.handleResize);const e=document.getElementById("vue-zoom-wrapper");e&&e.addEventListener("click",this.handleBackgroundClick),document.addEventListener("pdp-zoom:open",this.startViewportPin),document.addEventListener("pdp-zoom:close",this.stopViewportPin),fp.on("pdp-color-updated",this.handleColorUpdate),fp.on("active-product-slide-for-zoom",this.handleActiveProductSlide)},handleColorUpdate(e){this.images=e.images,this.activeSlide=0,this.$nextTick((()=>{this.setupPinchZoom()}))},handleActiveProductSlide(e){if(!e)return;const t=e=>(null==e?void 0:e.split("?")[0])||"",i=t(e),o=this.images.findIndex((e=>t(e.node.url)===i));-1!==o&&(this.activeSlide=o,this.$refs.pdpZoomCarousel&&(this.isMobileSize?this.$refs.pdpZoomCarousel.slideTo(o):this.$nextTick((()=>{this.scrollToSlide(o)}))))},scrollToSlide(e){var t;const i=null==(t=this.$refs.pdpZoomCarousel)?void 0:t.$el,o=null==i?void 0:i.querySelectorAll(".carousel__slide");i&&(null==o?void 0:o[e])&&o[e].scrollIntoView({behavior:"instant",block:"start"})},handleZoom(){W()},handleActiveSlideIndex(e){this.isMobileSize?"prev"===e?0===this.activeSlide?this.activeSlide=this.images.length-1:this.activeSlide=this.activeSlide-1:"next"===e&&(this.activeSlide===this.images.length-1?this.activeSlide=0:this.activeSlide=this.activeSlide+1):"prev"===e?this.activeSlide=Math.max(0,this.activeSlide-1):"next"===e&&(this.activeSlide=Math.min(this.images.length-1,this.activeSlide+1))},handleDoubleZoom(e){if(this.isMobileSize)return;e.stopPropagation();const t=e.currentTarget.closest(".carousel__slide");null==t||t.classList.toggle("zoomed")},handleResize(){const e=this.deviceType,t=this.isMobileSize;this.isMobileSize="mobile-size"===e,t!==this.isMobileSize&&this.$nextTick((()=>{this.$refs.pdpZoomCarousel&&(this.$refs.pdpZoomCarousel.restartCarousel(),this.setupPinchZoom())}))},handleBackgroundClick(e){if("vue-zoom-wrapper"!==e.target.id)return;const t=document.getElementById("vue-zoom");t&&!t.contains(e.target)&&this.handleZoom()},setupPinchZoom(){const e=this.isMobileSize&&this.$refs.pdpZoomCarousel&&this.pinchHandlers;this.managePinchListeners(e?"add":"remove")},managePinchListeners(e){if(!this.$refs.pdpZoomCarousel||!this.pinchHandlers)return;const t=this.$refs.pdpZoomCarousel.$el;["touchstart","touchmove","touchend"].forEach((i=>{t[`${e}EventListener`](i,this.pinchHandlers[i])}))},startViewportPin(){this.isMobileSize&&window.visualViewport&&(window.visualViewport.addEventListener("resize",this.scheduleViewportPin),window.visualViewport.addEventListener("scroll",this.scheduleViewportPin),this.syncViewportPin())},scheduleViewportPin(){this.viewportPinRaf||(this.viewportPinRaf=window.requestAnimationFrame((()=>{this.viewportPinRaf=null,this.syncViewportPin()})))},syncViewportPin(){const e=document.getElementById("vue-zoom-wrapper"),t=window.visualViewport;e&&t&&(e.style.width=t.width*t.scale+"px",e.style.height=t.height*t.scale+"px",e.style.transformOrigin="0 0",e.style.transform=`translate(${t.offsetLeft}px, ${t.offsetTop}px) scale(${1/t.scale})`)},stopViewportPin(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.scheduleViewportPin),window.visualViewport.removeEventListener("scroll",this.scheduleViewportPin)),this.viewportPinRaf&&(window.cancelAnimationFrame(this.viewportPinRaf),this.viewportPinRaf=null);const e=document.getElementById("vue-zoom-wrapper");e&&(e.style.width="",e.style.height="",e.style.transform="",e.style.transformOrigin="")},cleanup(){document.removeEventListener("theme:resize",this.handleResize),document.removeEventListener("pdp-zoom:open",this.startViewportPin),document.removeEventListener("pdp-zoom:close",this.stopViewportPin);const e=document.getElementById("vue-zoom-wrapper");
1e&&e.removeEventListener("click",this.handleBackgroundClick),this.stopViewportPin(),this.$refs.pdpZoomCarousel&&this.pinchHandlers&&this.managePinchListeners("remove"),fp.off("pdp-color-updated",this.handleColorUpdate),fp.off("active-product-slide-for-zoom",this.handleActiveProductSlide)}}},[["render",function(e,t,i,o,n,u){const p=c("slide"),f=c("carousel");return n.images.length?(r(),s(d,{key:0},[a("div",uc,[a("button",{class:"pswp__button pswp__button--close",title:"Close (Esc)",onClick:t[0]||(t[0]=(...e)=>u.handleZoom&&u.handleZoom(...e))},[n.isMobileSize?(r(),s("svg",pc,[...t[5]||(t[5]=[a("rect",{x:"0.625",y:"0.625",width:"38.75",height:"38.75",rx:"19.375",fill:"white","fill-opacity":"0.75"},null,-1),a("rect",{x:"0.625",y:"0.625",width:"38.75",height:"38.75",rx:"19.375",stroke:"#E0E0E0","stroke-width":"1.25"},null,-1),a("path",{d:"M10 10L30 30M10 30L30 10",stroke:"#737373","stroke-width":"1.25"},null,-1)])])):(r(),s("svg",hc,[...t[4]||(t[4]=[a("rect",{x:"0.625",y:"0.625",width:"48.75",height:"48.75",rx:"24.375",fill:"white","fill-opacity":"0.75"},null,-1),a("rect",{x:"0.625",y:"0.625",width:"48.75",height:"48.75",rx:"24.375",stroke:"#E0E0E0","stroke-width":"1.25"},null,-1),a("path",{d:"M12.5 12.5L37.5 37.5M12.5 37.5L37.5 12.5",stroke:"#737373","stroke-width":"1.25"},null,-1)])]))])]),g(f,V({ref:"pdpZoomCarousel"},n.carouselConfig,{modelValue:n.activeSlide,"onUpdate:modelValue":t[1]||(t[1]=e=>n.activeSlide=e)}),{default:T((()=>[(r(!0),s(d,null,h(n.images,((e,t)=>(r(),k(p,{key:"zoom-pics-"+t,onClick:u.handleDoubleZoom},{default:T((()=>[a("div",mc,[a("img",{src:e.node.url,class:"slideShow",alt:u.getMediaAlt(e)},null,8,gc)])])),_:2},1032,["onClick"])))),128))])),_:1},16,["modelValue"]),u.showPaginationAndNavigation?(r(),s("div",fc,[a("button",{onClick:t[2]||(t[2]=e=>u.handleActiveSlideIndex("prev"))},[...t[6]||(t[6]=[a("svg",{"aria-label":"Show Previous Slide",width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M6.5 0.5L1 6L6.5 11.5",stroke:"#151515","stroke-width":"1.25"})],-1)])]),a("span",wc,m(n.activeSlide+1)+" / "+m(n.images.length),1),a("button",{onClick:t[3]||(t[3]=e=>u.handleActiveSlideIndex("next"))},[...t[7]||(t[7]=[a("svg",{"aria-label":"Show Next Slide",width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("path",{d:"M0.5 11.5L6 6L0.5 0.5",stroke:"#151515","stroke-width":"1.25"})],-1)])])])):l("",!0)],64)):l("",!0)}],["__file","PDPZoom.vue"]]),vc={style:{display:"none"}};const bc=fe({name:"PDPYotpoUGC",data:()=>({pid:""}),mounted(){fp.on("pdp-tags-updated",(e=>{const t=document.getElementById("UGCContent");t.getAttribute("data-product-id")!==e.pid&&(this.pid=e.pid,t.innerHTML="",t.setAttribute("data-product-id",this.pid),setTimeout((()=>{window.yotpo.refreshWidgets()}),250))}))}},[["render",function(e,t,i,o,a,n){return r(),s("div",vc)}],["__file","PDPYotpoUGC.vue"]]),Sc={style:{display:"none"}};const _c=fe({name:"PDPSectionDoubleRefresh",data:()=>({handle:"",refreshId:"",blockId:"",isColumnsSection:null,useWindowPdpHandle:!1,boundPdpHandleUpdated:null}),mounted(){const e=this.$el.parentElement;this.blockId=e.getAttribute("data-block-id"),this.handle=e.getAttribute("data-handle"),this.isColumnsSection=e.closest("[data-columns-refresh-id]"),this.useWindowPdpHandle=Boolean(e.closest(".mini-product-single"))&&!e.getAttribute("data-block-id"),this.isColumnsSection?this.refreshId=e.getAttribute("data-columns-refresh-id"):this.refreshId=e.getAttribute("data-refresh-id"),this.boundPdpHandleUpdated=this.useWindowPdpHandle?e=>{const t=e.detail||{};this.handleProductUpdate({handle:t.handle,...t})}:e=>{this.handleProductUpdate(e)},this.useWindowPdpHandle?window.addEventListener("pdp-handle-updated",this.boundPdpHandleUpdated):fp.on("pdp-handle-updated",this.boundPdpHandleUpdated)},beforeUnmount(){this.boundPdpHandleUpdated&&(this.useWindowPdpHandle?window.removeEventListener("pdp-handle-updated",this.boundPdpHandleUpdated):fp.off("pdp-handle-updated",this.boundPdpHandleUpdated),this.boundPdpHandleUpdated=null)},methods:{handleProductUpdate(e){e&&e.handle&&this.handle!==e.handle&&(this.handle=e.handle,this.updateSectionContent(this.handle,e))},updateSectionContent(e,t){const i=e=>{const i=(new DOMParser).parseFromString(e.result,"text/html");this.updateDOMElements(i,e,t)};this.refreshId&&er.getProductSectionContent(this.refreshId,this.blockId,e,i)},updateDOMElements(e,t,i){const o=t.blockId?`block-refresh-${t.blockId}`:"block-refresh",s=`#${CSS.escape(o)}`,r=e.querySelector(s),a=e.getElementById("section-refresh"),n=document.getElementById(t.sectionId),l=document.getElementById("section-refresh"),d=e.getElementById("section-refresh-columns"),c=document.getElementById(t.sectionId),u=document.getElementById("section-refresh-columns"),h=e.querySelector(".mini-product-single"),p=`shopify-section-${t.sectionId}`,m=document.querySelector(`#${p} .mini-product-single`),g=Boolean(t.blockId);if(h&&m&&!g&&(m.innerHTML=h.innerHTML,this.remountVariantOptions(i,p)),t.blockId){const e=document.getElementById(p),i=e?[...e.querySelectorAll(`#${CSS.escape(t.blockId)}`)]:[];if(!i.length){const e=document.getElementById(t.blockId);e&&i.push(e)}i.forEach((e=>{var t;null==(t=e.querySelector(s))||t.remove(),r&&e.appendChild(r.cloneNode(!0))}))}!this.isColumnsSection&&n&&(null==l||l.remove(),a&&n.appendChild(a)),this.isColumnsSection&&c&&(null==u||u.remove(),d&&
1c.appendChild(d)),requestAnimationFrame((()=>{setTimeout((()=>{try{const e=new CustomEvent("pdp:section:updated",{detail:{sectionId:this.refreshId},bubbles:!0});document.dispatchEvent(e),window.dispatchEvent(new Event("resize")),document.dispatchEvent(new Event("theme:resize"))}catch(e){}}),100)}))},remountVariantOptions(e,t){const i=document.getElementById(t);if(!i)return;const o=e?{color:e.color,name:e.color,handle:e.handle}:{};i.querySelectorAll(".pdp-badge-router").forEach((e=>{let t=e.getAttribute("id");U(So).mount("#"+t)})),i.querySelectorAll(".color-variant-options").forEach((e=>{let t=e.getAttribute("id");t&&U(Bs,{previouslySelectedProduct:o}).mount(`#${t}`)})),i.querySelectorAll(".size-variant-options").forEach((e=>{let t=e.getAttribute("id");t&&U(Gs).mount(`#${t}`)})),i.querySelectorAll(".width-variant-options").forEach((e=>{let t=e.getAttribute("id");t&&U(Xs).mount(`#${t}`)})),fp.on("start-full-pdp",(e=>{i.querySelectorAll(".PDPPriceBlock").forEach((e=>{let t=e.getAttribute("id");U(Fr).mount(`#${t}`)}));if(i.querySelector("#PDPImages")){const t={images:e.images,media:e.media,pid:e.pid};U(sn,t).mount("#PDPImages")}const t=i.querySelectorAll(".PDPaddToCart");t&&t.forEach((e=>{U(wr).mount(e)})),fp.off("start-full-pdp")}))}}},[["render",function(e,t,i,o,a,n){return r(),s("div",Sc,"PDPSectionDoubleRefresh")}],["__file","PDPSectionDoubleRefresh.vue"]]);let Cc=!1;const Pc=fe({components:{ProductListTopLeftBadge:bt,ProductListBottomPillBadge:Ct,ProductListTextUnderBadge:It},name:"ProductGridItemBadges",data:()=>({tags:[],badgeType:"",price:0}),mounted(){this.initializeBadges()},methods:{initializeBadges(){var e;const t=null==(e=this.$el)?void 0:e.parentElement;if(!t)return;this.badgeType=t.getAttribute("data-badge-type")||"";const i=t.getAttribute("data-product-tags");this.tags=i?JSON.parse(i):[];const o=t.getAttribute("data-product-price");if(this.price=o?parseFloat(o):0,document.body.classList.contains("template-product")){const e=document.querySelector(".recent__content");e&&e.children.length&&!Cc&&(this.$nextTick((()=>{const t=e.querySelector(".flickity-viewport"),i=e.querySelectorAll(".promo-badge")[0];if(!i)return;const o=`${parseFloat(window.getComputedStyle(t).height)+i.offsetHeight}px`;t.style.height=o})),Cc=!0)}}}},[["render",function(e,t,i,o,s,a){return""!==s.badgeType?(r(),k(A(s.badgeType),{key:0,tags:s.tags,price:s.price},null,8,["tags","price"])):l("",!0)}],["__file","ProductGridItemBadges.vue"]]),kc={key:0,class:"section-carousel__header"},Tc=["innerHTML"],Ic=["inert","aria-hidden"],Ac={class:"product-grid-item loading-placeholder"},Lc={class:"collection-slider-freescroll"},Ec={class:"freescroll-track","data-custom-scrollbar-items-free":""},Mc=["pid"],xc={class:"product-grid-item loading-placeholder"},Oc={class:"col-slider-custom-btns"},Bc=["src","alt","width","height"],Fc=["src","alt","width","height"],Dc=["src","alt","width","height"],$c=["src","alt","width","height"];const zc=fe({name:"CollectionSlider",components:{ProductListItem:Ei,Carousel:P,Navigation:S,Slide:C},data:()=>({collectionId:"",collectionHandle:"",pids:"",recPid:"",itemsToScroll:2,itemsToShow:4,productImageName:"",productsOnDisplay:[],maxProducts:0,arrow_left_image:"",arrow_left_image_alt:"",arrow_left_image_width:"",arrow_left_image_height:"",arrow_left_image_disabled:"",arrow_left_image_disabled_alt:"",arrow_left_image_disabled_width:"",arrow_left_image_disabled_height:"",arrow_custom_on:!1,arrow_custom_off:!1,slideNextBtn:"",slidePrevBtn:"",gridDesktop:4,gridMobile:1.2,gridTablet:3,titleHeading:"",hideHeader:!1,useFsWidgetRecs:!1,useFsSmartCollection:!1,useFsRecs:!1,widgetId:"",useFsProductData:"",isTab:!1,isDefaultTab:!1,hasLoadedProducts:!1,currentSlide:0,loadedCollections:new Map,productCategoryMetafieldOneAttr:"",productCategoryMetafieldTwoAttr:"",productCategoryMetafieldOneCollectionAttr:"",productCategoryMetafieldTwoCollectionAttr:"",productReminderMetafieldEmbedAttr:"",setReminderLinkText:"",loadedSlides:new Set,showCrosssellPercentage:"false",carouselHeightRefreshTimeout:null}),mounted(){this.handleViewportSize=ge(this),this.productCategoryMetafieldOneAttr=window.siteGlobals.product_cat_metafield_one||"",this.productCategoryMetafieldTwoAttr=window.siteGlobals.product_cat_metafield_two||"",this.productCategoryMetafieldOneCollectionAttr=window.siteGlobals.product_cat_metafield_one_collection||"",this.productCategoryMetafieldTwoCollectionAttr=window.siteGlobals.product_cat_metafield_two_collection||"",this.productReminderMetafieldEmbedAttr=window.siteGlobals.set_reminder_metafield,this.setReminderLinkText=window.siteGlobals.set_reminder_link_text,this.collectionId=this.$el.parentElement.getAttribute("data-collection-id"),this.collectionHandle=this.$el.parentElement.getAttribute("data-collection-handle"),this.maxProducts=this.$el.parentElement.getAttribute("data-product-limit"),this.pids=JSON.parse(this.$el.parentElement.getAttribute("data-pids")),this.titleHeading=this.$el.parentElement.getAttribute("data-title"),this.hideHeader=this.$el.parentElement.getAttribute("data-hide-header"),this.productImageName=this.$el.parentElement.getAttribute("data-product-swatch-name"),this.gridDesktop=this.$el.parentElement.getAttribute("data-grid-desktop"),this.gridMobile=this.$el.parentElement.getAttribute("data-grid-mobile"),this.gridTablet=this.$el.parentElement.getAttribute("data-grid-tablet"),this.widgetId=this.$el.parentElement.getAttribute("data-fs-widget-id"),this.useFsWidgetRecs="true"===this.$el.parentElement.getAttribute("data-use-fs-widget-recs")||!0===this.$el.parentElement.getAttribute("data-use-fs-widget-recs"),this.useFsSmartCollection="true"===this.$el.parentElement.getAttribute("data-use-fs-smart-collection")||!0===this.$el.parentElement.getAttribute("data-use-fs-smart-collection"),this.useFsRecs="true"===this.$el.parentElement.getAttribute("data-use-fs-recs")||!0===this.$el.parentElement.getAttribute("data-use-fs-recs");const e=this.$el.parentElement.getAttribute("data-use-fs-product-data")||this.$el.parentElement.getAttribute("data-use_fs_product_data");if(this.useFsProductData="true"===e?"true":"",this.arrow_custom_on="true"===this.$el.parentElement.getAttribute("data-arrow-custom-on"),this.slidePrevBtn=this.$el.parentElement.querySelector(".carousel__prev"),this.slideNextBtn=this.$el.parentElement.querySelector(".carousel__next"),this.slidePrevBtnCustom=this.$el.parentElement.querySelector(".custom__arrow--prev"),this.slideNextBtnCustom=this.$el.parentElement.querySelector(".custom__arrow--next"),this.currentSlide=0,this.slidesCount=0,this.slidePrevBtnCustom.setAttribute("disabled","disabled"),this.arrow_left_image=this.$el.parentElement.getAttribute("data-arrow-left-image"),this.arrow_left_image_alt=this.$el.parentElement.getAttribute("data-arrow-left-image-alt"),this.arrow_left_image_width=this.$el.parentElement.getAttribute("data-arrow-left-image-width"),this.arrow_left_image_height=this.$el.parentElement.getAttribute("data-arrow-left-image-height"),this.arrow_left_image_disabled=this.$el.parentElement.getAttribute("data-arrow-left-image-disabled"),this.arrow_left_image_disabled_alt=this.$el.parentElement.getAttribute("data-arrow-left-image-disabled-alt"),this.arrow_left_image_disabled_width=this.$el.parentElement.getAttribute("data-arrow-left-image-disabled-width"),this.arrow_left_image_disabled_height=this.$el.parentElement.getAttribute("data-arrow-left-image-disabled-height"),this.showCrosssellPercentage=this.$el.parentElement.getAttribute("data-show-crosssell-percentage")||"false",this.isTab="true"===this.$el.parentElement.getAttribute("data-is-tab"),this.isDefaultTab="true"===this.$el.parentElement.getAttribute("data-is-default-tab"),this.isTab){let e=this.$el.parentElement;for(;e&&!e.hasAttribute("data-tabs-holder");)e=e.parentElement;if(e){e.querySelectorAll(".js-tab-link").forEach((e=>{e.addEventListener("click",this.handleTabClick)}))}}this.getClientWidth(),this.isTab&&!this.isDefaultTab||this.loadCollectionData(),fp.on("fs-products-loaded",(e=>{this.hasLoadedProducts=e,e&&this.$nextTick((()=>{this.refreshCarouselHeight()}))})),fp.on("product-slide-loaded",(e=>{this.loadedSlides.add(e),this.hasLoadedProducts&&(clearTimeout(this.carouselHeightRefreshTimeout),this.carouselHeightRefreshTimeout=setTimeout((()=>{this.refreshCarouselHeight()}),50))}))},created(){window.addEventListener("resize",this.getClientWidth)},unmounted(){if(this.handleViewportSize&&this.handleViewportSize(),this.isTab){let e=this.$el.parentElement;for(;e&&!e.hasAttribute("data-tabs-holder");)e=e.parentElement;if(e){e.querySelectorAll(".js-tab-link").forEach((e=>{e.removeEventListener("click",this.handleTabClick)}))}}fp.off("fs-products-loaded"),fp.off("product-slide-loaded"),clearTimeout(this.carouselHeightRefreshTimeout),window.removeEventListener("resize",this.getClientWidth),this.loadedCollections.clear()},methods:{async loadCollectionData(){try{if(this.loadedCollections.has(this.collectionHandle))return void(this.productsOnDisplay=this.loadedCollections.get(this.collectionHandle));this.productsOnDisplay=[],this.useFsWidgetRecs&&this.widgetId?await this.getWidgetProductRecs():this.useFsRecs?await this.getProductRecs():this.useFsSmartCollection?await this.get
1SmartCollectionProductData():await this.getShopifyCollectionProducts(),this.productsOnDisplay.length>0&&this.loadedCollections.set(this.collectionHandle,this.productsOnDisplay)}catch(e){te("Error loading collection data",e),this.productsOnDisplay=[]}},getSmartCollectionProductData(){return new Promise(((e,t)=>{try{ee((()=>{window.FastSimonSDK.smartCollections({categoryID:this.collectionId,productsPerPage:this.maxProducts,withAttributes:!0,callback:t=>{const i=t.payload.products,o=[];i.length>0&&o.push(...i.filter((e=>o.length<this.maxProducts&&!e.promotile))),this.productsOnDisplay=o,e()}})}))}catch(i){t(i)}}))},getWidgetProductRecs(){return new Promise(((e,t)=>{try{const t=this.pids.sort((()=>Math.random()-.5));this.recPid=t[0],ee((()=>{window.FastSimonSDK.productRecommendationByWidget({productID:this.recPid,withAttributes:!0,widgetsIDS:[this.widgetId],callback:t=>{var i,o;const s=(null==(o=null==(i=t.payload)?void 0:i[0])?void 0:o.payload)||[];this.productsOnDisplay=s.slice(0,this.maxProducts),e()}})}))}catch(i){t(i)}}))},getProductRecs(){return new Promise(((e,t)=>{try{const t=this.pids.sort((()=>Math.random()-.5));this.recPid=t[0],ee((()=>{window.FastSimonSDK.productRecommendation({productID:this.recPid,withAttributes:!0,specs:[{sources:[window.fastSimonRecSource.toString()],maxSuggestions:this.maxProducts,widgetID:window.fastSimonRecId,collectionIDs:[this.collectionId]}],callback:t=>{const i=t.payload[0].payload;this.productsOnDisplay=i,e()}})}))}catch(i){t(i)}}))},async getShopifyCollectionProducts(){var e;try{const i=this.$el.parentElement,o=`/collections/${this.collectionHandle}/products.json?limit=${this.maxProducts}`,s=await fetch(o),r=await s.json();let a=[];if(null==(e=null==i?void 0:i.dataset)?void 0:e.productMetafields)try{const e=i.dataset.productMetafields.replace(/&quot;/g,'"');a=JSON.parse(e)}catch(t){te("Error parsing product metafields",t)}this.productsOnDisplay=r.products.map((e=>{var t;const i={id:e.id.toString(),l:e.title},o=a.find((t=>t.id.toString()===e.id.toString())),s=[["Tag",e.tags||[]],["Type",[e.product_type||""]],["Vendor",[e.vendor||""]]];if(o){o.gender&&(s.push(["Custom.gender",[o.gender]]),s.push(["custom.gender",[o.gender]])),o.product_label&&(s.push(["Custom.product_label",[o.product_label]]),s.push(["custom.product_label",[o.product_label]]));const e=null==(t=o.gender)?void 0:t.toLowerCase();e&&("men"===e?(s.push(["Custom.category",["Mens"]]),s.push(["custom.category",["Mens"]])):"women"===e?(s.push(["Custom.category",["Womens"]]),s.push(["custom.category",["Womens"]])):"unisex"===e&&(s.push(["Custom.category",["Unisex"]]),s.push(["custom.category",["Unisex"]])))}return i.att=s,i}))}catch(i){return te("Error in getShopifyCollectionProducts",i),this.productsOnDisplay=[],this.productsOnDisplay}},getClientWidth(){const e=window.innerWidth;e<=window.theme.sizes.medium?(this.itemsToShow=Number(this.gridMobile),this.itemsToScroll=Number(this.gridDesktop)):e>window.theme.sizes.medium&&e<=window.theme.sizes.large?(this.itemsToShow=Number(this.gridTablet),this.itemsToScroll=Number(this.gridTablet)):e>window.theme.sizes.large&&(this.itemsToShow=Number(this.gridDesktop),this.itemsToScroll=Number(this.gridDesktop))},handleSlideEnd(){const e=this.$refs.colSliderCarousel;if(!e)return;const t=e.data.slidesCount-this.currentSlide<=this.itemsToShow,i=0===this.currentSlide;this.slidePrevBtn.disabled=i,this.slidePrevBtnCustom.disabled=i,this.slideNextBtn.disabled=t,this.slideNextBtnCustom.disabled=t},clickPrev(){this.slidePrevBtn.click()},clickNext(){this.slideNextBtn.click()},slidePrev(){const e=this.$refs.colSliderCarousel;if(!e)return;e.data.currentSlide>0&&e.prev(),this.updateNavigationButtons(e)},slideNext(){const e=this.$refs.colSliderCarousel;if(!e)return;e.data.currentSlide<e.data.maxSlide&&e.next(),this.updateNavigationButtons(e)},updateNavigationButtons(e){const t=e.data.currentSlide,i=e.data.maxSlide;this.slidePrevBtn.disabled=0===t,this.slideNextBtn.disabled=t===i},reportProductViewRecommendation(e,t,i,o){ee((()=>{window.FastSimonSDK.event({eventName:window.FastSimonEventName.RecommendationProductClicked,data:{productID:e,position:t,sourceProductID:i,widget_id:o||""}}),window.setFindingMethod("Collection Slider Recommendation")}))},handleTabClick(e){var t,i;const o=e.currentTarget.getAttribute("data-tab");let s=this.$el,r=null;for(;s&&!(null==(t=s.classList)?void 0:t.contains("tab-content"))&&(s=s.parentElement,s););r=s,r&&(null==(i=r.classList)?void 0:i.contains(`tab-content-${o}`))&&(this.loadedCollections.has(this.collectionHandle)?this.productsOnDisplay=this.loadedCollections.get(this.collectionHandle):(this.hasLoadedProducts=!1,this.loadCollectionData()))},localGetProductMetafieldOneFromFS:(e,t,i)=>J(e,t,i),localGetProductMetafieldTwoFromFS:(e,t,i)=>J(e,t,i),localGetProductCategoryMetafieldOneCollectionFromFS:(e,t,i)=>Y(e,t,i),localGetProductCategoryMetafieldTwoCollectionFromFS:(e,t,i)=>Y(e,t,i),localGetProductReminderEmbedFromFS:(e,t,i)=>J(e,t,i),isSlideLoaded(e){return this.loadedSlides.has(e)},refreshCarouselHeight(){const e=this.$refs.colSliderCarousel;e&&"function"==typeof e.restartCarousel&&e.restartCarousel()}},computed:{freescrollSlideWidth(){return`calc(100% / ${this.itemsToShow})`}}},[["render",function(e,t,i,o,u,m){const f=c("slide"),w=c("carousel"),y=c("Navigation"),v=c("ProductListItem");return r(),s(d,null,[u.hideHeader?l("",!0):(r(),s("div",kc,[a("p",{innerHTML:u.titleHeading,class:"gt-h2 section-carousel__heading"}
1,null,8,Tc)])),a("div",{class:"collection-slider-placeholder-root",inert:u.hasLoadedProducts,"aria-hidden":u.hasLoadedProducts?"true":void 0},[g(w,{"items-to-show":u.itemsToShow,"items-to-scroll":u.itemsToScroll,class:p(["col-slider-carousel placeholder-carousel",{"is-hidden":u.hasLoadedProducts}]),snapAlign:"start"},{default:T((()=>[(r(!0),s(d,null,h(Math.ceil(u.itemsToShow),(e=>(r(),k(f,{key:"loading-"+e,class:"loading-slide"},{default:T((()=>[...t[5]||(t[5]=[a("div",{class:"product-grid-item loading-placeholder"},[a("div",{class:"product-image-placeholder"}),a("div",{class:"product-title-placeholder"}),a("div",{class:"product-price-placeholder"}),a("div",{class:"product-metafield-placeholder"})],-1)])])),_:1})))),128))])),_:1},8,["items-to-show","items-to-scroll","class"])],8,Ic),g(w,{"items-to-show":u.itemsToShow,"items-to-scroll":u.itemsToScroll,onSlideEnd:m.handleSlideEnd,transition:400,class:p(["col-slider-carousel product-carousel",{"is-visible":u.hasLoadedProducts}]),"mouse-drag":!0,"touch-drag":!0,"snap-align":!1,"wrap-around":!1,ref:"colSliderCarousel",modelValue:u.currentSlide,"onUpdate:modelValue":t[0]||(t[0]=e=>u.currentSlide=e)},{addons:T((()=>[g(y)])),default:T((()=>[(r(!0),s(d,null,h(u.productsOnDisplay,((i,o)=>(r(),k(f,{key:"product-"+i.id+"-"+o,class:p(["product-slide",o===u.productsOnDisplay.length-1?"product-slide--last":""])},{default:T((()=>[i.l?(r(),s(d,{key:0},[O(a("div",Ac,[...t[6]||(t[6]=[a("div",{class:"product-image-placeholder"},null,-1),a("div",{class:"product-title-placeholder"},null,-1),a("div",{class:"product-price-placeholder"},null,-1),a("div",{class:"product-metafield-placeholder"},null,-1)])],512),[[B,!m.isSlideLoaded(o)]]),O((r(),k(v,{fsData:i,useFsProductData:u.useFsProductData,productTitle:i.l,pid:i.id,productImageName:u.productImageName,key:"grid"+i+"-"+o,slideIndex:o,productCategoryMetafieldOne:m.localGetProductMetafieldOneFromFS(this.productsOnDisplay,o,this.productCategoryMetafieldOneAttr),productCategoryMetafieldTwo:m.localGetProductMetafieldTwoFromFS(this.productsOnDisplay,o,this.productCategoryMetafieldTwoAttr),productCategoryMetafieldOneCollection:m.localGetProductCategoryMetafieldOneCollectionFromFS(this.productsOnDisplay,o,this.productCategoryMetafieldOneCollectionAttr),productCategoryMetafieldTwoCollection:m.localGetProductCategoryMetafieldTwoCollectionFromFS(this.productsOnDisplay,o,this.productCategoryMetafieldTwoCollectionAttr),productReminderMetafieldEmbed:m.localGetProductReminderEmbedFromFS(this.productsOnDisplay,o,this.productReminderMetafieldEmbedAttr),setReminderLinkText:u.setReminderLinkText,hideSwatches:!0,showSalePercentage:"true"===u.showCrosssellPercentage,onClick:t=>u.useFsRecs?m.reportProductViewRecommendation(i.id,o,u.recPid,u.widgetId||e.window.fastSimonRecId||""):null},null,8,["fsData","useFsProductData","productTitle","pid","productImageName","slideIndex","productCategoryMetafieldOne","productCategoryMetafieldTwo","productCategoryMetafieldOneCollection","productCategoryMetafieldTwoCollection","productReminderMetafieldEmbed","setReminderLinkText","showSalePercentage","onClick"])),[[B,m.isSlideLoaded(o)]])],64)):l("",!0)])),_:2},1032,["class"])))),128))])),_:1},8,["items-to-show","items-to-scroll","onSlideEnd","class","modelValue"]),a("div",Lc,[a("div",Ec,[(r(!0),s(d,null,h(u.productsOnDisplay,((i,o)=>(r(),s("div",{key:"product-"+i.id+"-"+o+"-freescroll",pid:i.id+"-freescroll",class:"freescroll__slide",style:n({width:m.freescrollSlideWidth})},[O(a("div",xc,[...t[7]||(t[7]=[a("div",{class:"product-image-placeholder"},null,-1),a("div",{class:"product-title-placeholder"},null,-1),a("div",{class:"product-price-placeholder"},null,-1),a("div",{class:"product-metafield-placeholder"},null,-1)])],512),[[B,!m.isSlideLoaded(o)]]),O((r(),k(v,{fsData:i,useFsProductData:u.useFsProductData,productTitle:i.l,pid:i.id,productImageName:u.productImageName,key:"grid"+i+"-"+o,slideIndex:o,productCategoryMetafieldOne:m.localGetProductMetafieldOneFromFS(this.productsOnDisplay,o,this.productCategoryMetafieldOneAttr),productCategoryMetafieldTwo:m.localGetProductMetafieldTwoFromFS(this.productsOnDisplay,o,this.productCategoryMetafieldTwoAttr),productCategoryMetafieldOneCollection:m.localGetProductCategoryMetafieldOneCollectionFromFS(this.productsOnDisplay,o,this.productCategoryMetafieldOneCollectionAttr),productCategoryMetafieldTwoCollection:m.localGetProductCategoryMetafieldTwoCollectionFromFS(this.productsOnDisplay,o,this.productCategoryMetafieldTwoCollectionAttr),productReminderMetafieldEmbed:m.localGetProductReminderEmbedFromFS(this.productsOnDisplay,o,this.productReminderMetafieldEmbedAttr),setReminderLinkText:u.setReminderLinkText,hideSwatches:!0,showSalePercentage:"true"===u.showCrosssellPercentage,onClick:t=>u.useFsRecs?m.reportProductViewRecommendation(i.id,o,u.recPid,u.widgetId||e.window.fastSimonRecId||""):null}
1,null,8,["fsData","useFsProductData","productTitle","pid","productImageName","slideIndex","productCategoryMetafieldOne","productCategoryMetafieldTwo","productCategoryMetafieldOneCollection","productCategoryMetafieldTwoCollection","productReminderMetafieldEmbed","setReminderLinkText","showSalePercentage","onClick"])),[[B,m.isSlideLoaded(o)]])],12,Mc)))),128))])]),a("div",Oc,[a("button",{onClick:t[1]||(t[1]=(...e)=>m.slidePrev&&m.slidePrev(...e)),class:p(["carousel__prev",this.arrow_custom_on?"is-hidden":""]),type:"button","aria-label":"Previous",disabled:"disabled"},[...t[8]||(t[8]=[a("svg",{class:"flickity-button-icon",viewBox:"0 0 100 100"},[a("title",null,"Previous"),a("path",{d:"M 10, 50\n          L 60, 100\n          L 75, 90\n          L 35, 50\n          L 75, 10\n          L 60, 0\n          Z",class:"arrow"})],-1)])],2),a("button",{onClick:t[2]||(t[2]=(...e)=>m.slideNext&&m.slideNext(...e)),class:p(["carousel__next",this.arrow_custom_on?"is-hidden":""]),type:"button","aria-label":"Next"},[...t[9]||(t[9]=[a("svg",{class:"flickity-button-icon",viewBox:"0 0 100 100"},[a("title",null,"Next"),a("path",{d:"M 10, 50\n          L 60, 100\n          L 75, 90\n          L 35, 50\n          L 75, 10\n          L 60, 0\n          Z",class:"arrow",transform:"translate(100, 100) rotate(180)"})],-1)])],2),a("button",{onClick:t[3]||(t[3]=(...e)=>m.clickPrev&&m.clickPrev(...e)),class:p(["tabs__arrow--custom custom__arrow--prev",this.arrow_custom_on?"":"is-hidden"]),"aria-label":"Previous"},[a("img",{class:"enabled",src:u.arrow_left_image,alt:u.arrow_left_image_alt+" Previous",width:u.arrow_left_image_width,height:u.arrow_left_image_height},null,8,Bc),a("img",{class:"disabled",src:u.arrow_left_image_disabled,alt:u.arrow_left_image_disabled_alt+" Previous, Disabled",width:u.arrow_left_image_disabled_width,height:u.arrow_left_image_disabled_height},null,8,Fc)],2),a("button",{onClick:t[4]||(t[4]=(...e)=>m.clickNext&&m.clickNext(...e)),class:p(["tabs__arrow--custom custom__arrow--next",this.arrow_custom_on?"":"is-hidden"]),"aria-label":"Next"},[a("img",{class:"enabled",src:u.arrow_left_image,alt:u.arrow_left_image_alt+" Next",width:u.arrow_left_image_width,height:u.arrow_left_image_height},null,8,Dc),a("img",{class:"disabled",src:u.arrow_left_image_disabled,alt:u.arrow_left_image_disabled_alt+" Next, Disabled",width:u.arrow_left_image_disabled_width,height:u.arrow_left_image_disabled_height},null,8,$c)],2)])],64)}],["__file","CollectionSlider.vue"]]);const Hc=fe({components:{ProductListItem:Ei},data:()=>({productsOnDisplay:[],collectionId:"",limit:0,productImageName:"",showCrosssellPercentage:"false",placeholderId:"",loadedProducts:new Set,hasLoadedProducts:!1}),mounted(){this.collectionId=this.$el.parentElement.getAttribute("data-collection-id");const e=this.$el.parentElement.getAttribute("data-limit");this.limit=e?parseInt(e):4,this.productImageName=this.$el.parentElement.getAttribute("data-product_swatch_name"),this.showCrosssellPercentage=this.$el.parentElement.getAttribute("data-show-crosssell-percentage")||"false",this.placeholderId=this.$el.parentElement.getAttribute("data-placeholder-id")||"",this.getProductData(),fp.on("product-slide-loaded",this.handleProductLoaded)},unmounted(){fp.off("product-slide-loaded",this.handleProductLoaded),this.loadedProducts.clear()},computed:{wrapClass:()=>"collection-split__product grid__item",limitedProducts(){return this.productsOnDisplay.slice(0,this.limit)}},watch:{loadedProducts:{handler(){this.checkAndRemovePlaceholder()},deep:!0},limitedProducts:{handler(){this.loadedProducts.clear(),this.hasLoadedProducts=!1},immediate:!1}},methods:{getProductData(){ee((()=>{window.FastSimonSDK.smartCollections({categoryID:this.collectionId,callback:e=>{const t=e.payload.products,i=[];t.length>0&&i.push(...t.filter((e=>!e.promotile))),this.productsOnDisplay=i}})}))},handleProductLoaded(e){this.loadedProducts.add(e)},checkAndRemovePlaceholder(){this.placeholderId&&this.limitedProducts.length>0&&this.loadedProducts.size===this.limitedProducts.length&&(this.hasLoadedProducts=!0,this.$nextTick((()=>{setTimeout((()=>{const e=document.getElementById(this.placeholderId);e&&e.remove()}),300)})))}}},[["render",function(e,t,i,o,a,n){const u=c("ProductListItem");return r(!0),s(d,null,h(n.limitedProducts,((e,t)=>(r(),s("div",{key:e.id,class:p([n.wrapClass,{"is-hidden":!a.hasLoadedProducts}]),"data-item":""},[e.l?(r(),k(u,{hideSwatches:!0,productImageName:a.productImageName,key:"grid"+e.l+"-"+t,pid:e.id,productTitle:e.l,disableSlider:!0,slideIndex:t,showSalePercentage:"true"===a.showCrosssellPercentage},null,8,["productImageName","pid","productTitle","slideIndex","showSalePercentage"])):l("",!0)],2)))),128)}],["__file","CollectionSplitGrid.vue"]]),Rc=["data-carousel-slide"],Nc=["data-carousel-slide"],Vc={ke
1y:1,class:"product-grid-item loading-placeholder"};const qc=fe({name:"ProductTileGroup",components:{ProductListItem:Ei},data:()=>({pids:[],productsOnDisplay:[],productImageName:"",showCrosssellPercentage:"false",hideSwatches:!1,hideQuickview:!1,disableSlider:!1,hideSkeleton:!1,showSalePercentage:!1,gridLarge:0,gridSmall:0,wrapClass:"",asCarouselSlides:!1,afterMountEvent:"",collectionId:"",collectionHandle:"",fsWidgetId:"",productCategoryMetafieldOneAttr:"",productCategoryMetafieldTwoAttr:"",productCategoryMetafieldOneCollectionAttr:"",productCategoryMetafieldTwoCollectionAttr:"",productReminderMetafieldEmbedAttr:"",setReminderLinkText:"",hasLoaded:!1,loadFailed:!1}),computed:{shouldRender(){return this.hasLoaded&&this.productsOnDisplay.length>0}},mounted(){var e;const t=this.$el.parentElement;if(!t)return;this.handleViewportSize=ge(this);const i=t.getAttribute("data-pids")||"[]";try{const e=JSON.parse(i);this.pids=Array.isArray(e)?e.map((e=>String(e))).filter(Boolean):[]}catch(r){te("ProductTileGroup: invalid data-pids JSON",r),this.pids=[]}this.productImageName=t.getAttribute("data-product-swatch-name")||"",this.showCrosssellPercentage=t.getAttribute("data-show-crosssell-percentage")||"false",this.showSalePercentage="true"===this.showCrosssellPercentage,this.hideSwatches="false"!==t.getAttribute("data-hide-swatches"),this.hideQuickview="true"===t.getAttribute("data-hide-quickview"),this.disableSlider="true"===t.getAttribute("data-disable-slider");const o=!1!==(null==(e=window.siteGlobals)?void 0:e.loading_shimmer_enable);this.hideSkeleton="true"===t.getAttribute("data-hide-skeleton")||!o,this.gridLarge=parseInt(t.getAttribute("data-grid-large"))||0,this.gridSmall=parseInt(t.getAttribute("data-grid-small"))||0,this.asCarouselSlides="true"===t.getAttribute("data-as-carousel-slides"),this.wrapClass=t.getAttribute("data-item-wrap-class")||(this.asCarouselSlides?"product-grid-slide":""),this.afterMountEvent=t.getAttribute("data-after-mount-event")||"",this.collectionId=t.getAttribute("data-collection-id")||"",this.collectionHandle=t.getAttribute("data-collection-handle")||"",this.fsWidgetId=t.getAttribute("data-fs-widget-id")||"";const s=window.siteGlobals||{};this.productCategoryMetafieldOneAttr=s.product_cat_metafield_one||"",this.productCategoryMetafieldTwoAttr=s.product_cat_metafield_two||"",this.productCategoryMetafieldOneCollectionAttr=s.product_cat_metafield_one_collection||"",this.productCategoryMetafieldTwoCollectionAttr=s.product_cat_metafield_two_collection||"",this.productReminderMetafieldEmbedAttr=s.set_reminder_metafield||"",this.setReminderLinkText=s.set_reminder_link_text||"",0!==this.pids.length?this.fetchProducts():this.finalize(0)},unmounted(){this.handleViewportSize&&this.handleViewportSize()},methods:{fetchProducts(){ee((()=>{if(!window.FastSimonSDK||"function"!=typeof window.FastSimonSDK.getProducts)return te("ProductTileGroup: FastSimonSDK.getProducts unavailable"),this.loadFailed=!0,void this.finalize(0);try{window.FastSimonSDK.getProducts({productIds:this.pids,direct:!0,withAttributes:!0,withProductVariants:!0,withSiblings:!0,callback:e=>this.handleProductsResponse(e)})}catch(e){te("ProductTileGroup: getProducts threw",e),this.loadFailed=!0,this.finalize(0)}}),{onTimeout:()=>{this.loadFailed=!0,this.finalize(0)}})},handleProductsResponse(e){const t=Array.isArray(e)?e:[],i=new Map;t.forEach((e=>{e&&null!=e.id&&i.set(String(e.id),e)})),this.productsOnDisplay=this.pids.map((e=>i.get(String(e)))).filter((e=>e&&e.l)),this.finalize(this.productsOnDisplay.length)},finalize(e){var t;this.hasLoaded=!0,fp.emit("product-tile-group:loaded",{count:e});const i=null==(t=this.$el)?void 0:t.parentElement;if(i&&i.dispatchEvent(new CustomEvent("product-tile-group:loaded",{bubbles:!0,detail:{count:e}})),0===e&&this.pids.length>0){const e=(null==i?void 0:i.getAttribute("id"))||"(unknown)";console.warn(`[ProductTileGroup] FS returned 0 products for ${this.pids.length} pids on #${e}`)}this.afterMountEvent&&e>0&&this.$nextTick((()=>{var e;const t=null==(e=this.$el)?void 0:e.parentElement;t&&t.dispatchEvent(new CustomEvent(this.afterMountEvent,{bubbles:!0}))}
1))},metaOne(e){return J(this.productsOnDisplay,e,this.productCategoryMetafieldOneAttr)},metaTwo(e){return J(this.productsOnDisplay,e,this.productCategoryMetafieldTwoAttr)},metaOneCollection(e){return Y(this.productsOnDisplay,e,this.productCategoryMetafieldOneCollectionAttr)},metaTwoCollection(e){return Y(this.productsOnDisplay,e,this.productCategoryMetafieldTwoCollectionAttr)},reminderEmbed(e){return J(this.productsOnDisplay,e,this.productReminderMetafieldEmbedAttr)}}},[["render",function(e,t,i,o,n,u){const m=c("ProductListItem");return u.shouldRender?(r(!0),s(d,{key:0},h(n.productsOnDisplay,((e,t)=>(r(),s(d,{key:e.id},[n.wrapClass?(r(),s("div",{key:0,class:p(n.wrapClass),"data-item":"","data-carousel-slide":n.asCarouselSlides?"":null},[g(m,{fsData:e,useFsProductData:"true",pid:String(e.id),productTitle:e.l,productImageName:n.productImageName,slideIndex:t,productIndex:t,hideSwatches:n.hideSwatches,hideQuickview:n.hideQuickview,disableSlider:n.disableSlider,gridLarge:n.gridLarge||void 0,gridSmall:n.gridSmall||void 0,collectionId:n.collectionId,collectionHandle:n.collectionHandle,fsWidgetId:n.fsWidgetId,productCategoryMetafieldOne:u.metaOne(t),productCategoryMetafieldTwo:u.metaTwo(t),productCategoryMetafieldOneCollection:u.metaOneCollection(t),productCategoryMetafieldTwoCollection:u.metaTwoCollection(t),productReminderMetafieldEmbed:u.reminderEmbed(t),setReminderLinkText:n.setReminderLinkText,showSalePercentage:n.showSalePercentage},null,8,["fsData","pid","productTitle","productImageName","slideIndex","productIndex","hideSwatches","hideQuickview","disableSlider","gridLarge","gridSmall","collectionId","collectionHandle","fsWidgetId","productCategoryMetafieldOne","productCategoryMetafieldTwo","productCategoryMetafieldOneCollection","productCategoryMetafieldTwoCollection","productReminderMetafieldEmbed","setReminderLinkText","showSalePercentage"])],10,Rc)):(r(),k(m,{key:1,fsData:e,useFsProductData:"true",pid:String(e.id),productTitle:e.l,productImageName:n.productImageName,slideIndex:t,productIndex:t,hideSwatches:n.hideSwatches,hideQuickview:n.hideQuickview,disableSlider:n.disableSlider,gridLarge:n.gridLarge||void 0,gridSmall:n.gridSmall||void 0,collectionId:n.collectionId,collectionHandle:n.collectionHandle,fsWidgetId:n.fsWidgetId,productCategoryMetafieldOne:u.metaOne(t),productCategoryMetafieldTwo:u.metaTwo(t),productCategoryMetafieldOneCollection:u.metaOneCollection(t),productCategoryMetafieldTwoCollection:u.metaTwoCollection(t),productReminderMetafieldEmbed:u.reminderEmbed(t),setReminderLinkText:n.setReminderLinkText,showSalePercentage:n.showSalePercentage},null,8,["fsData","pid","productTitle","productImageName","slideIndex","productIndex","hideSwatches","hideQuickview","disableSlider","gridLarge","gridSmall","collectionId","collectionHandle","fsWidgetId","productCategoryMetafieldOne","productCategoryMetafieldTwo","productCategoryMetafieldOneCollection","productCategoryMetafieldTwoCollection","productReminderMetafieldEmbed","setReminderLinkText","showSalePercentage"]))],64)))),128)):!n.hasLoaded&&!n.hideSkeleton&&n.pids.length>0?(r(!0),s(d,{key:1},h(n.pids,((e,i)=>(r(),s(d,{key:"ptg-skel-"+e+"-"+i},[n.wrapClass?(r(),s("div",{key:0,class:p(n.wrapClass),"data-item":"","data-carousel-slide":n.asCarouselSlides?"":null},[...t[0]||(t[0]=[R('<div class="product-grid-item loading-placeholder"><div class="product-image-placeholder"></div><div class="product-title-placeholder"></div><div class="product-price-placeholder"></div><div class="product-metafield-placeholder"></div></div>',1)])],10,Nc)):(r(),s("div",Vc,[...t[1]||(t[1]=[a("div",{class:"product-image-placeholder"},null,-1),a("div",{class:"product-title-placeholder"},null,-1),a("div",{class:"product-price-placeholder"},null,-1),a("div",{class:"product-metafield-placeholder"},null,-1)])]))],64)))),128)):l("",!0)}],["__file","ProductTileGroup.vue"]]),Uc=["innerHTML"];const Gc=fe({name:"ProductFamilyHelper",data:()=>({title:"",alignment:"",hpHandle:""}),mounted(){this.title=this.$el.parentElement.getAttribute("data-title"),this.alignment=this.$el.parentElement.getAttribute("data-alignment"),this.hpHandle=this.$el.parentElement.getAttribute("data-hp-handle"),fp.on("showHelpGuide",(()=>{this.moveHelpGuide()}))},methods:{moveHelpGuide(){const e=document.getElementById("HelpGuideSize"),t=document.getElementById("size-guide-toggle");e&&t&&(t.before(e),e.style.display="block")},getHelpGuide(){er.getPageContent(this.hpHandle,(e=>{const t=(new DOMParser).parseFromString(e.result,"text/html").getElementById("MainContent"),i=document.getElementById("more-info-modal-content");t&&i&&(i.innerHTML=t.innerHTML,document.dispatchEvent(new CustomEvent("theme:accordion:bind",{bubbles:!0,detail:{root:i}}))),window.MicroModal&&window.MicroModal.show("more-info-modal",{disableScroll:!0,onShow:function(){document.documentElement.classList.remove("aos-initialized"),document.dispatchEvent(new CustomEvent("chat:hide",{bubbles:!0}))},onClose:function(){document.documentElement.classList.add("aos-initialized"),document.dispatchEvent(new CustomEvent("chat:show",{bubbles:!0}))}})}))}}},[["render",function(e,t,i,o,a,n){return r(),s("p",{class:p(`help-guide-toggle gt-p__small text-${this.alignment}`),innerHTML:a.title,onClick:t[0]||(t[0]=(...e)=>n.getHelpGuide&&n.getHelpGuide(...e))},null,10,Uc)}],["__file","ProductFamilyHelper.vue"]]),Wc={style:{display:"none"}};const Kc=fe({name:"PDPSetReminderDisplayLogic",data:()=>({pid:"",setReminderTag:"",embedId:"pdp-set-reminder-embed",atcSelector:".PDPaddToCart"}),methods:{setFavoritesVisible(e){if("pdp-set-reminder-embed"!==this.embedId)return;const t=document.getElementById("product-page");t&&t.classList.toggle("pdp-set-reminder-active",!e),document.querySelectorAll("[data-pdp-favorite]").forEach((t=>{t.style.display=e?"":"none"})),document.querySelectorAll(".pdp-cta-row").forEach((t=>{e?t.querySelector("[data-pdp-favorite]")&&t.classList.remove("pdp-cta-row--no-favorite"):t.classList.add("pdp-cta-row--no-favorite")}))},handleSetReminderTagFound(){const e=document.getElementById(this.embedId),t=this.$el.closest(this.atcSelector)||document.querySelector(this.atcSelector);e&&(e.style.display="block"),t&&(t.style.display="none"),this.setFavoritesVisible(!1)},resetDisplay(){const e=document.getElementById(this.embedId),t=this.$el.closest(this.atcSelector)||document.querySelector(this.atcSelector);e&&(e.style.display="none"),t&&(t.style.display="block"),this.setFavoritesVisible(!0)}
1,handlePdpTagsUpdated(e){this.resetDisplay(),e.tags.forEach((e=>{e===this.setReminderTag&&this.handleSetReminderTagFound()}))}},mounted(){const e=this.$el.parentElement;this.setReminderTag=e.getAttribute("data-set-reminder-tag"),this.embedId=e.getAttribute("data-embed-id")||"pdp-set-reminder-embed",this.atcSelector=e.getAttribute("data-atc-selector")||".PDPaddToCart",fp.on("pdp-tags-updated",this.handlePdpTagsUpdated);const t=e.getAttribute("data-product-tags");if(t)try{const e=JSON.parse(t);this.handlePdpTagsUpdated({tags:e})}catch(i){}},unmounted(){fp.off("pdp-tags-updated",this.handlePdpTagsUpdated)}},[["render",function(e,t,i,o,a,n){return r(),s("div",Wc)}],["__file","PDPSetReminderDisplayLogic.vue"]]),jc={class:"add-personalization-text gt-p__small"},Qc={for:"add-personalization-checkbox",class:"checkbox-container"},Zc=["innerHTML"],Jc={class:"upsell-options-container closed-container"},Yc={key:1,class:"upsell-options-container-error"},Xc=["src"],eu={class:"error-text-container"},tu=["innerHTML"],iu=["innerHTML"],ou={class:"option-title gt-p__small"},su=["innerHTML"],ru=["innerHTML"],au=["data-value","onClick"],nu=["src"],lu=["data-upsell-option-value"],du={key:2,class:"upsell-notification-message"},cu=["innerHTML"];const uu=fe({name:"ProductUpsellOptions",mounted(){fp.on("updateAddButton",(e=>{var t,i,o,s;let r=!1;this.colorPid=e.parentId,this.upsellProductParentId!==e.parentId&&null!==(null==(t=e.upsellProductId)?void 0:t.value)&&(this.upsellProductParentId=e.parentId,this.upsellProductId=null==(i=e.upsellProductId)?void 0:i.value,this.pendingEvent=e,this.getProductDataById(this.upsellProductId,1)),this.upsellProductParentId2!==e.parentId&&null!==(null==(o=e.upsellProductId2)?void 0:o.value)&&(this.upsellProductParentId2=e.parentId,this.upsellProductId2=null==(s=e.upsellProductId2)?void 0:s.value,this.getProductDataById(this.upsellProductId2,2)),void 0===this.upsellProductId&&void 0===this.upsellProductId2||(r=!0);const a=e.instock,n=e.variantId;if(!0===r){if(void 0!==n){this.enableUpsellOption=e.enableUpsellOption,this.baseProductPrice=e.variantPrice;const t=1===this.currentUpsellOption&&this.upProdData.length>0||2===this.currentUpsellOption&&this.upProdData2.length>0;t&&(this.setOptionData(this.currentUpsellOption,!1),this.hasUpsellOptions=!0,this.handleAvailableOptions()),this.variantAvailable=a,this.disabled=!1,!1===a&&(this.variantAvailable=!1,this.disabled=!0),t&&this.getSelectedUpsellVariantId(),this.updatedColor&&this.$nextTick((()=>{setTimeout((()=>{this.clickOptionHeader(this.currentUpsellOption),this.updatedColor=!1}),250)}))}}else void 0!==n&&(this.hasUpsellOptions=!1,this.disabled=!0);this.handleErrorPadding()})),fp.on("pdp-color-updated",(e=>{e.pid!==this.colorPid&&(this.defaultImages=e.images,this.updatedColor=!0)}))},data:()=>({colorPid:"",upsellProductParentId:"",upsellProductParentId2:"",upsellProductId:void 0,upsellProductId2:void 0,baseProductPrice:"",upsellProductPrice:"",upsellPriceDifference:null,variantAvailable:"",countryCode:window.Shopify.country,upsellOptionsName:"",variantData:[],upsellOptionValues:[],errorText:window.upsell_option_container_error_text,errorTextHeader:window.upsell_option_container_error_text_header,errorImage:window.upsell_option_container_error_image,hasUpsellOptions:!1,upsellOptionsTitle:window.upsell_option_container_title,hasNotificationMessage:window.upsell_notification_enable,upsellNotificationMessage:window.upsell_notification_message,enableUpsellOption:!1,selectedUpsellVariantId:"",selectedUpsellOptionName:"",imageNS:window.product_upsell_options_variant_ns||null,imageKey:window.product_upsell_options_variant_key||null,showUpsellHeaderButtons:window.show_upsell_header_buttons,upsellOptionsName1:window.product_upsell_options_name||null,upsellOptionsName2:window.product_upsell_options_name_2||null,upProdData:[],upProdData2:[],defaultImages:[],currentUpsellOption:1,disabled:!1,updatedColor:!1,currentVariantId:"",pendingEvent:null}),computed:{computedUpsellPriceMessage(){return this.hasUpsellOptions&&this.variantAvailable&&this.upsellPriceDifference?"+$"+this.upsellPriceDifference:"Unavailable"}},methods:{clickOptionHeader(e){const t=document.querySelector(`[data-header-option="${e}"]`);t&&t.click()},handleErrorPadding(){const e=document.getElementById("product-upsell-options");this.disabled?e.classList.add("unavailable"):e.classList.remove("unavailable")},getUpsellOptionsName(){this.variantData.forEach((e=>{null!==e.node.selectedOptions[2].value&&(this.upsellOptionsName=e.node.selectedOptions[2].name)}))},getSelectedUpsellVariantId(){var e,t;if(this.selectedUpsellOptionName){const i=document.querySelectorAll(".color-variant-options .color-swatches.selected"),o=document.querySelectorAll(".size-variant-options .option2.selected"),s=null==(e=i[0])?void 0:e.getAttribute("data-color"),r=null==(t=o[0])?void 0:t.getAttribute("data-size").replace("s","");let a="";this.variantData.forEach((e=>{e.node.selectedOptions[0].value===s&&e.node.selectedOptions[1].value===r&&e.node.selectedOptions[2].value===this.selectedUpsellOptionName&&(a=e.node.id,this.upsellOptionsName=e.node.selectedOptions[2].name)})),this.selectedUpsellVariantId!==this.getVarinatIDfromBase(a)&&(this.selectedUpsellVariantId=this.getVarinatIDfromBase(a),setTimeout((()=>{this.emitSelectedUpsellVariantId()}),300))}},emitSelectedUpsellVariantId(){fp.emit("updateUpsellVariantId",{upsellVariantId:this.selectedUpsellVariantId,upsellVariantPrice:this.upsellProductPrice})},removeSelectedUpsellOption(){this.selectedUpsellOptionName="",this.selectedUpsellVariantId=""},clickSelectedOption(){if(this.selectedUpsellOptionName){const e=document.querySelector(`.upsell-option-value[data-value="${this.selectedUpsellOptionName}"]`);setTimeout((()=>{e&&e.classList.contains("unavailable")&&this.clickSelectedOption()}),500)}},closePersonalizationTab(){document.querySelectorAll(".upsell-options-container").forEach((e=>{e.classList.add("closed-container")}))},removePersonalizationImages(){fp.emit("replace-variant-image",this.defaultImages)},uncheckCheckbox(){const e=document.getElementById("add-personalization-checkbox"),t=document.getElementById("upsell-checkmark-icon");e&&(e.checked=!1),t&&t.classList.remove("checked")},checkCheckbox(){const e=document.getElementById("add-personalization-checkbox"),t=document.getElementById("upsell-checkmark-icon");e&&(e.checked=!0),t&&t.classList.add("checked")},handleCheckBox(){const e=document.getElementById("add-personalization-checkbox");if(this.hasUpsellOptions)if(e.checked){this.checkCheckbox();document.querySelector(".upsell-options-container").classList.remove("closed-container"),this.selectFirstOption()}else this.uncheckCheckbox(),this.removePersonalizationItem(),this.closePersonalizationTab(),this.removePersonalizationImages(),this.$nextTick((()=>{this.selectFirstColorOption()}));else this.uncheckCheckbox()},selectFirstOption(){const e=document.querySelectorAll(".upsell-option-value");e.length>0&&e[0].click()},selectFirstColorOption(){const e=document.querySelectorAll(".color-variant-options .color-swatches.selected");e.length>0&&e[0].click(),this.setSelectedOptionHeader(this.currentUpsellOption),this.selectDefaultOption(),this.updatedColor=!1},getVarinatIDfromBase:e=>e.replace("gid://shopify/ProductVariant/",""),getProductDataById(e,t){if(e){const i={query:"id:"+e.replace("gid://shopify/Product/",""),countryIso2:this.countryCode};this.imageNS&&this.imageKey&&(i.imageNS=this.imageNS,i.imageKey=this.imageKey),it.request(dt,{variables:i}).then((e=>{this.getOptionValues(e,t),t===this.currentUpsellOption&&(this.setOptionData(t,!1),this.hasUpsellOptions=!0,this.handleAvailableOptions(),this.get
1SelectedUpsellVariantId()),this.pendingEvent&&(this.baseProductPrice=this.pendingEvent.variantPrice,this.variantAvailable=this.pendingEvent.instock,this.disabled=!this.pendingEvent.instock,this.pendingEvent=null),this.handleErrorPadding()})).catch((e=>{console.error("ProductUpsellOptions: Error fetching upsell product data:",{error:(null==e?void 0:e.message)||e,stack:null==e?void 0:e.stack,response:null==e?void 0:e.response,fullError:e})}))}},getOptionValues(e,t){1===t?this.upProdData=e.data.products.edges[0].node.variants.edges:this.upProdData2=e.data.products.edges[0].node.variants.edges},getUpsellProductImages(e){var t,i,o;const s=this.variantData.find((t=>t.node.selectedOptions[2].value===e));return(null==(o=null==(i=null==(t=null==s?void 0:s.node)?void 0:t.upsellImage)?void 0:i.references)?void 0:o.edges)||[]},getColorSwatchImages(e){return window.cdn+this.handleize(e)+".png"},handleize:e=>e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),addPersonalization(e){if(this.hasUpsellOptions){const t=document.querySelectorAll(".upsell-option-value");if(t.length>0){t.forEach((e=>{e.classList.remove("selected")}));document.querySelector(`.upsell-option-value[data-value="${e}"]`).classList.add("selected"),this.checkCheckbox()}this.selectedUpsellOptionName=e,this.getSelectedUpsellVariantId();const i=this.getUpsellProductImages(e);i.length>0&&fp.emit("replace-variant-image",i)}},removePersonalizationItem(){this.removeSelectedUpsellOption();const e=document.querySelectorAll(".upsell-option-value");e.length>0&&e.forEach((e=>{e.classList.remove("selected")}))},setupVariantData(){this.variantData.forEach((e=>{if(e.node.selectedOptions[2]){const t=e.node;this.upsellOptionValues.includes(t.selectedOptions[2].value)||(this.upsellOptionValues.push(t.selectedOptions[2].value),this.upsellProductPrice=t.price.amount,this.upsellPriceDifference=this.upsellProductPrice-this.baseProductPrice)}}))},handleAvailableOptions(){document.querySelectorAll(".upsell-options-container").forEach((e=>{e.classList.remove("unavailable")}))},getPersonalizationText(){const e=this.upsellOptionsTitle.split("|");let t="";return void 0!==e[0]&&(t=e[0]+this.upsellOptionsName),void 0!==e[1]&&(t+=e[1]),t},setSelectedOptionHeader(e){document.querySelectorAll(".upsell-option-name").forEach((e=>{e.classList.remove("selected")}));const t=document.querySelector(`[data-header-option="${e}"]`);t&&t.classList.add("selected")},selectDefaultOption(){const e=document.querySelectorAll(".upsell-option-value");if(this.selectedUpsellOptionName){const t=document.querySelector(`.upsell-option-value[data-value="${this.selectedUpsellOptionName}"]`);t?t.click():e.length>0&&this.$nextTick((()=>{e[0].click()}))}},setOptionData(e,t=!1){this.variantData=[],this.upsellOptionValues=[],this.variantData=1===e?this.upProdData:this.upProdData2,this.currentUpsellOption=e,this.$nextTick((()=>{this.setupVariantData(),this.getUpsellOptionsName(),this.setSelectedOptionHeader(e),t&&this.$nextTick((()=>{this.selectDefaultOption()}))}))}}},[["render",function(e,t,i,o,n,c){return this.enableUpsellOption?(r(),s(d,{key:0},[a("div",{class:"upsell-options-container-add-personalization-container",onClick:t[0]||(t[0]=e=>c.handleCheckBox())},[a("div",{class:p(["upsell-options-container-add-personalization-container-text",this.disabled?"unavailable":""])},[a("p",jc,[a("label",Qc,[t[3]||(t[3]=a("span",{id:"upsell-checkmark-icon"},null,-1)),t[4]||(t[4]=a("input",{type:"checkbox",id:"add-personalization-checkbox"},null,-1)),f(" "+m(c.getPersonalizationText())+" ",1),a("span",{innerHTML:"("+c.computedUpsellPriceMessage+")"},null,8,Zc)])])],2)]),a("div",Jc,[this.showUpsellHeaderButtons?(r(),s("div",{key:0,class:p(["upsell-options-container-header",this.disabled?"unavailable":""])},[a("p",{"data-header-option":"1",class:"gt-p__small upsell-option-name",onClick:t[1]||(t[1]=e=>c.setOptionData(1,!0))},m(this.upsellOptionsName1),1),a("p",{"data-header-option":"2",class:"gt-p__small upsell-option-name",onClick:t[2]||(t[2]=e=>c.setOptionData(2,!0))},m(this.upsellOptionsName2),1)],2)):l("",!0),this.disabled?(r(),s("div",Yc,[a("img",{src:this.errorImage},null,8,Xc),a("div",eu,[a("p",{innerHTML:this.errorTextHeader,class:"error-text-header gt-p__small"},null,8,tu),a("p",{innerHTML:this.errorText,class:"error-text gt-p__small"},null,8,iu)])])):l("",!0),a("div",{class:p(["option-title-container",this.disabled?"unavailable":""])},[a("p",ou,[a("span",{class:"option-name gt-p__small",innerHTML:this.upsellOptionsName},null,8,su),t[5]||(t[5]=f(": ",-1)),a("span",{class:"gt-p__small",innerHTML:this.selectedUpsellOptionName},null,8,ru)])],2),(r(!0),s(d,null,h(this.upsellOptionValues,(e=>(r(),s("div",{key:e,class:p(`upsell-option-value ${e} ${this.selectedUpsellOptionName===e?"selected":""} ${this.disabled?"unavailable":""}`),"data-value":e,onClick:t=>c.addPersonalization(e)},[a("img",{src:c.getColorSwatchImages(e)},null,8,nu),a("div",{class:"upsell-option-value-text gt-p__small","data-upsell-option-value":this.currentUpsellOption},m(e),9,lu)],10,au)))),128)),this.hasNotificationMessage&&!this.disabled?(r(),s("div",du,[a("p",{class:"gt-p__small",innerHTML:this.upsellNotificationMessage},null,8,cu)])):l("",!0)])],64)):l("",!0)}],["__file","ProductUpsellOptions.vue"]]),hu={class:"outfit-picker-wrapper"};const pu=fe({name:"OutfitPicker",components:{PDPFreescroll:Qa},data:()=>({nonActiveImageOverlayColor:null,nonActiveImageOverlayOpacity:null,arrowCustomOn:!1,arrowLeftImage:!1,arrowLeftImageAlt:"",arrowLeftImageWidth:"",arrowLeftImageHeight:"",arrowLeftImageDisabled:!1,arrowLeftImageDisabledAlt:"",arrowLeftImageDisabledWidth:"",arrowLeftImageDisabledHeight:"",collectionOne:[],collectionTwo:[],collectionList:[[],[]],isOutfitPicker:!1,mobileImageSpacing:10,mobileNonActiveSlideWidth:80,nonActiveSlideWidth:80,outfitPickerMetafield:"",pdp_desktop_image_width:window.pdp_desktop_image_width,pdp_tablet_image_width:window.pdp_tablet_image_width,pdp_mobile_image_width:window.pdp_mobile_image_width,windowWidth:window.innerWidth,selectedProducts:{0:null,1:null},titleNodes:[],colorNameNodes:[],pdp_image_spacing:5,pdp_image_bg_color:"",colorNameMonitors:[]}),mounted(){var e,t;this.nonActiveSlideWidth=this.$el.parentElement.dataset.nonActiveSlideWidth,this.nonActiveImageOverlayColor=this.$el.parentElement.dataset.nonActiveImageOverlayColor,this.nonActiveImageOverlayOpacity=this.$el.parentElement.dataset.nonActiveImageOverlayOpacity,this.mobileImageSpacing=this.$el.parentElement.dataset.mobileImageSpacing,this.mobileNonActiveSlideWidth=this.$el.parentElement.dataset.mobileNonActiveSlideWidth,this.arrowCustomOn=this.$el.parentElement.dataset.arrowCustomOn,this.arrowLeftImage=this.$el.parentElement.dataset.arrowLeftImage,this.arrowLeftImageAlt=this.$el.parentElement.dataset.arrowLeftImageAlt,this.arrowLeftImageWidth=this.$el.parentElement.dataset.arrowLeftImageWidth,this.arrowLeftImageHeight=this.$el.parentElement.dataset.arrowLeftImageHeight,this.arrowLeftImageDisabled=this.$el.parentElement.dataset.arrowLeftImageDisabled,this.outfitPickerMetafield=this.$el.parentElement.dataset.outfitPickerMetafield,this.collectionOneId=`gid://shopify/Collection/${this.$el.parentElement.dataset.collectionOne}`,this.collectionTwoId=`gid://shopify/Collection/${this.$el.parentElement.dataset.collectionTwo}`,this.itemsToShow=this.$el.parentElement.dataset.itemsToShow,this.itemsToShowMobile=this.$el.parentElement.dataset.itemsToShowMobile,this.arrowGap=this.$el.parentElement.dataset.arrowGap;const i=this.$el.parentElement.closest(".product-section");if(i){const e=getComputedStyle(i).getPropertyValue("--IMAGE-SPACING"),t=parseFloat(String(e).replace("px","").trim());Number.isNaN(t)||(this.pdp_image_spacing=t);const o=getComputedStyle(i).getPropertyValue("--IMAGE-BG-COLOR"),s=String(o).trim();s&&(this.pdp_image_bg_color=s)}Promise.all([it.request(ut,{variables:{namespace:this.outfitPickerMetafield.split(".").shift(),key:this.outfitPickerMetafield.split(".").pop(),id:this.collectionOneId}}),it.request(ut,{variables:{namespace:this.outfitPickerMetafield.split(".").shift(),key:this.outfitPickerMetafield.split(".").pop(),id:this.collectionTwoId}})]).then((([e,t])=>{this.collectionOne=e.data.collection.products.edges.map((e=>{var t,i,o,s,r,a,n,l;
1return{node:{...e.node,image:{url:(null==(o=null==(i=null==(t=e.node.metafield)?void 0:t.reference)?void 0:i.image)?void 0:o.url)||"",alt:(null==(r=null==(s=e.node.metafield)?void 0:s.reference)?void 0:r.alt)||(null==(l=null==(n=null==(a=e.node.metafield)?void 0:a.reference)?void 0:n.image)?void 0:l.altText)||""}}}})),this.collectionTwo=t.data.collection.products.edges.map((e=>{var t,i,o,s,r,a,n,l;return{node:{...e.node,image:{url:(null==(o=null==(i=null==(t=e.node.metafield)?void 0:t.reference)?void 0:i.image)?void 0:o.url)||"",alt:(null==(r=null==(s=e.node.metafield)?void 0:s.reference)?void 0:r.alt)||(null==(l=null==(n=null==(a=e.node.metafield)?void 0:a.reference)?void 0:n.image)?void 0:l.altText)||""}}}}))})).finally((()=>{var e,t,i,o,s,r,a,n,l,d,c,u,h,p;this.collectionList=[this.collectionOne,this.collectionTwo],this.selectedProducts[0]=this.collectionOne[0]||null,this.selectedProducts[1]=this.collectionTwo[0]||null,this.updateTitle(0),this.updateTitle(1),setTimeout((()=>{this.updateColorName(0),this.updateColorName(1)}),400);const m=null==(e=this.collectionOne[0])?void 0:e.node;if(m){const e=null==(a=null==(r=null==(s=null==(o=null==(i=null==(t=m.variants)?void 0:t.edges)?void 0:i[0])?void 0:o.node)?void 0:s.selectedOptions)?void 0:r.find((e=>{var t;return"color"===(null==(t=e.name)?void 0:t.toLowerCase())})))?void 0:a.value;fp.emit("outfit-picker-product-changed",{blockIndex:1,productTitle:m.title,productHandle:m.handle,productColor:e})}const g=null==(n=this.collectionTwo[0])?void 0:n.node;if(g){const e=null==(p=null==(h=null==(u=null==(c=null==(d=null==(l=g.variants)?void 0:l.edges)?void 0:d[0])?void 0:c.node)?void 0:u.selectedOptions)?void 0:h.find((e=>{var t;return"color"===(null==(t=e.name)?void 0:t.toLowerCase())})))?void 0:p.value;fp.emit("outfit-picker-product-changed",{blockIndex:2,productTitle:g.title,productHandle:g.handle,productColor:e})}m&&this.syncQuickviewForProduct(1,m),g&&this.syncQuickviewForProduct(2,g),this.syncAtcForCollectionIndex(0,0),this.syncAtcForCollectionIndex(1,0),fp.on("outfit-picker-size-changed",(({blockIndex:e,size:t})=>{const i=(e||1)-1;this.updatePriceForSizeChange(i,t),this.syncAtcForCollectionIndex(i,0),this.recalcOptionWidths()})),fp.on("outfit-picker-width-changed",(({blockIndex:e,width:t})=>{const i=(e||1)-1;this.updatePriceForWidthChange(i,t),this.syncAtcForCollectionIndex(i,0),this.recalcOptionWidths()})),this.recalcOptionWidths()})).catch((e=>{console.error("Error fetching collection products",e)})),this.titleNodes=Array.from((null==(e=this.$el.parentElement.closest(".product-page"))?void 0:e.querySelectorAll(".product__title"))||[]),this.colorNameNodes=Array.from((null==(t=this.$el.parentElement.closest(".product-page"))?void 0:t.querySelectorAll(".color-title .gt-p__small:last-of-type"))||[])},computed:{isMobile(){return this.windowWidth<window.theme.sizes.medium}},beforeUnmount(){this.colorNameMonitors&&(this.colorNameMonitors.forEach((e=>{e&&clearInterval(e)})),this.colorNameMonitors=[])},methods:{recalcOptionWidths(){const e=this.$el.parentElement.closest(".product-page");Array.from(e.querySelectorAll(".op-size-options")).forEach((e=>{const t=Array.from(e.querySelectorAll(".variant-spacing.option-size-2 .p-options"));t.forEach((e=>{e.style.width=""}));let i=0;t.forEach((e=>{i=Math.max(i,e.offsetWidth||0)})),i>0&&t.forEach((e=>{e.style.width=i+"px"}))}));Array.from(e.querySelectorAll(".op-width-options")).forEach((e=>{const t=Array.from(e.querySelectorAll(".variant-spacing.option-size-3 .p-options"));t.forEach((e=>{e.style.width=""}));let i=0;t.forEach((e=>{i=Math.max(i,e.offsetWidth||0)})),i>0&&t.forEach((e=>{e.style.width=i+"px"}))}))},syncTitle({mountEl:e,title:t,handle:i}){if(!e)return;const o=e.querySelector(".js-dynamic-product-title")||e.querySelector(".product__title");o&&t&&(o.textContent=t);const s=e.querySelector("a")||o&&o.closest("a");s&&i&&(s.href=`/products/${i}`)},syncProductTemplateLink(e,t){var i;if(!e||!t)return;const o=e.closest(".op-product");if(o){const e=o.querySelector("a.product-template-link");if(e)return void(e.href=`/products/${t}`)}let s=null==(i=e.closest(".op-title"))?void 0:i.nextElementSibling;for(;s;){const e=s.matches&&s.matches("a.product-template-link"),i=!e&&s.querySelector?s.querySelector("a.product-template-link"):null,o=e?s:i;if(o){o.href=`/products/${t}`;break}s=s.nextElementSibling}},onSlideChange(e,t){var i,o,s,r,a,n,l,d,c;this.selectedProducts[e]=t&&t.product?t.product:null,this.updateTitle(e),this.updateColorName(e),this.syncAtcForCollectionIndex(e,(null==t?void 0:t.index)||0);const u=(null==(i=this.selectedProducts[e])?void 0:i.node)||(null==(s=null==(o=this.collectionList[e])?void 0:o[(null==t?void 0:t.index)||0])?void 0:s.node)||null;if(u){const t=null==(c=null==(d=null==(l=null==(n=null==(a=null==(r=u.variants)?void 0:r.edges)?void 0:a[0])?void 0:n.node)?void 0:l.selectedOptions)?void 0:d.find((e=>{var t;return"color"===(null==(t=e.name)?void 0:t.toLowerCase())})))?void 0:c.value;fp.emit("outfit-picker-product-changed",{blockIndex:e+1,productTitle:u.title||"",productHandle:u.handle||"",productC
1olor:t}),this.syncQuickviewForProduct(e+1,u)}this.recalcOptionWidths()},syncAtcForCollectionIndex(e,t){var i,o,s,r,a,n;const l=this.collectionList[e],d=this.selectedProducts[e];let c=null;if(d&&d.node&&(c=d.node),c||(c=(null==(i=l[t])?void 0:i.node)||(null==(o=l[0])?void 0:o.node)||null),!c)return;const u=((null==(s=c.variants)?void 0:s.edges)||[]).map((e=>e.node)),{selectedColor:h,selectedSize:p,selectedWidth:m}=this.getSelectedOptionsForSide(e),g=this.pickVariantForOptions(u,h,p,m)||u[0]||null;if(!g)return;const f=Number(null==(r=g.price)?void 0:r.amount)||0,w=Number(null==(a=g.compareAtPrice)?void 0:a.amount)||0;try{const t=null==(n=this.$el.parentElement.closest(".product-page"))?void 0:n.querySelector(".product__main__content .product__inner");if(t){const i=String(c.id||"").replace(/\D+/g,""),o=t.querySelectorAll(".op-atc .PDPaddToCart");let s=null;o&&o.length&&(s=Array.from(o).find((t=>Number(t.getAttribute("data-outfit-picker-index"))===e+1))||o[e]||o[0]),s&&(i&&s.setAttribute("data-product-id",i),c.handle&&s.setAttribute("data-product-handle",c.handle),s.setAttribute("data-is-outfit-picker","true"),s.setAttribute("data-outfit-picker-index",String(e+1)));const r=document.querySelectorAll("#sticky-PDPaddtocart"),a=r[e]||r[0];a&&(i&&a.setAttribute("data-product-id",i),c.handle&&a.setAttribute("data-product-handle",c.handle),a.setAttribute("data-is-outfit-picker","true"),a.setAttribute("data-outfit-picker-index",String(e+1)))}}catch(y){console.error("Failed to sync outfit picker metadata",y)}this.emitPriceAndAtc(e,c,g,f,w,e+1)},updateTitle(e){var t;const i=null==(t=this.titleNodes[e])?void 0:t.closest(".product__title__wrapper"),o=this.selectedProducts[e],s=o&&o.node&&o.node.title?o.node.title:"",r=o&&o.node&&o.node.handle?o.node.handle:"";i&&s&&(this.syncTitle({mountEl:i,title:s,handle:r}),this.syncProductTemplateLink(i,r))},updateColorName(e){var t,i,o,s,r,a,n,l,d;const c=null==(i=Array.from(null==(t=this.$el.parentElement.closest(".product-page"))?void 0:t.querySelectorAll(".color-title .gt-p__small:last-of-type")))?void 0:i[e];if(!c)return;const u=null==(o=this.selectedProducts[e])?void 0:o.node;if(!u)return;const h=null==(d=null==(l=null==(n=null==(a=null==(r=null==(s=null==u?void 0:u.variants)?void 0:s.edges)?void 0:r[0])?void 0:a.node)?void 0:n.selectedOptions)?void 0:l.find((e=>{var t;return"color"===(null==(t=e.name)?void 0:t.toLowerCase())})))?void 0:d.value;if(!h)return;this.colorNameMonitors&&this.colorNameMonitors[e]&&clearInterval(this.colorNameMonitors[e]),c.textContent=h;const p=setInterval((()=>{var t,i,o,s,r,a,n,l,d,c;const u=null==(i=Array.from(null==(t=this.$el.parentElement.closest(".product-page"))?void 0:t.querySelectorAll(".color-title .gt-p__small:last-of-type")))?void 0:i[e];if(!u)return;const h=null==(o=this.selectedProducts[e])?void 0:o.node;if(!h)return;const p=null==(d=null==(l=null==(n=null==(a=null==(r=null==(s=null==h?void 0:h.variants)?void 0:s.edges)?void 0:r[0])?void 0:a.node)?void 0:n.selectedOptions)?void 0:l.find((e=>{var t;return"color"===(null==(t=e.name)?void 0:t.toLowerCase())})))?void 0:d.value;if(!p)return;const m=null==(c=u.textContent)?void 0:c.trim();m&&m!==p&&(u.textContent=p)}),100);this.colorNameMonitors||(this.colorNameMonitors=[]),this.colorNameMonitors[e]=p},updatePriceForSizeChange(e,t){var i,o,s,r,a;const n=this.collectionList[e]||[],l=this.selectedProducts[e],d=(null==l?void 0:l.node)||(null==(i=n[0])?void 0:i.node);if(!d)return;const c=(null==(s=null==(o=d.variants)?void 0:o.edges)?void 0:s.map((e=>e.node)))||[];if(!c.length)return;const{selectedColor:u,selectedWidth:h}=this.getSelectedOptionsForSide(e),p=(e,t)=>{var i;return null==(i=null==e?void 0:e.selectedOptions)?void 0:i.some((e=>e.value===t))};let m=null;if(t&&(m=c.find((e=>p(e,t)&&(!h||p(e,h))&&(!u||p(e,u)))),m||(m=c.find((e=>p(e,t)&&(!h||p(e,h))))),!m&&u&&(m=c.find((e=>p(e,t)&&p(e,u)))),m||(m=c.find((e=>p(e,t))))),m||(m=c[0]),!m)return;const g=Number(null==(r=m.price)?void 0:r.amount)||0,f=Number(null==(a=m.compareAtPrice)?void 0:a.amount)||0;this.emitPriceAndAtc(e,d,m,g,f,e+1)},updatePriceForWidthChange(e,t){var i,o,s,r,a;const n=this.collectionList[e]||[],l=this.selectedProducts[e],d=(null==l?void 0:l.node)||(null==(i=n[0])?void 0:i.node);
1if(!d)return;const c=(null==(s=null==(o=d.variants)?void 0:o.edges)?void 0:s.map((e=>e.node)))||[];if(!c.length)return;const{selectedColor:u,selectedSize:h}=this.getSelectedOptionsForSide(e),p=(e,t)=>{var i;return null==(i=null==e?void 0:e.selectedOptions)?void 0:i.some((e=>e.value===t))};let m=null;if(t&&(m=c.find((e=>p(e,t)&&(!h||p(e,h))&&(!u||p(e,u)))),!m&&h&&(m=c.find((e=>p(e,t)&&p(e,h)))),!m&&u&&(m=c.find((e=>p(e,t)&&p(e,u)))),m||(m=c.find((e=>p(e,t))))),m||(m=c[0]),!m)return;const g=Number(null==(r=m.price)?void 0:r.amount)||0,f=Number(null==(a=m.compareAtPrice)?void 0:a.amount)||0;this.emitPriceAndAtc(e,d,m,g,f,e+1)},syncQuickviewForProduct(e,t){var i,o,s;try{if(!e||!t)return;const r=t.handle||"",a=(null==(i=t.featuredMedia)?void 0:i.id)||(null==(o=t.featuredImage)?void 0:o.id)||"",n=a?String(a).split("/").pop():"",l=`product-quickview[data-is-outfit-picker="true"][data-outfit-picker-index="${e}"]`,d=null==(s=this.$el.closest(".product-page"))?void 0:s.querySelector(l);if(!d)return;const c=d.querySelector("[data-quickview-holder]");if(!c)return;const u=c.getAttribute("data-quickview-holder");if(!u)return;
1const h=c.querySelector(`[data-popup-${u}]`);h&&(r&&h.setAttribute(`data-popup-${u}`,r),n&&h.setAttribute("data-media-select",n)),r&&(d.handle=r)}catch(r){console.error("Error syncing quickview handle",r)}},getSelectedOptionsForSide(e){let t="",i="",o="";try{const s=this.$el.parentElement.closest(".product-page"),r=s?s.querySelector(".product__main__content .product__inner"):null;if(r){const s=r.querySelectorAll(".op-color-options"),a=r.querySelectorAll(".op-size-options"),n=r.querySelectorAll(".op-width-options"),l=s[e]||r,d=a[e]||r,c=n[e]||r,u=l.querySelector(".color-variant-options [data-color].selected");u&&(t=u.getAttribute("data-color")||"");const h=d.querySelector(".size-variant-options [data-size].selected");if(h){const e=h.getAttribute("data-size")||"";i=e.startsWith("s")?e.slice(1):e}const p=c.querySelector(".width-variant-options [data-width].selected");if(p){const e=p.getAttribute("data-width")||"";o=e.startsWith("w")?e.slice(1):e}}}catch(s){console.error("Failed to read selected options for outfit picker",s)}return{selectedColor:t,selectedSize:i,selectedWidth:o}},pickVariantForOptions(e,t,i,o){const s=(e,t)=>{var i;return null==(i=null==e?void 0:e.selectedOptions)?void 0:i.some((e=>e.value===t))};let r=null;return(t||i||o)&&(r=e.find((e=>(!t||s(e,t))&&(!i||s(e,i))&&(!o||s(e,o))))),!r&&o&&i&&(r=e.find((e=>s(e,o)&&s(e,i)))),!r&&o&&t&&(r=e.find((e=>s(e,o)&&s(e,t)))),!r&&i&&t&&(r=e.find((e=>s(e,i)&&s(e,t)))),!r&&o&&(r=e.find((e=>s(e,o)))),!r&&i&&(r=e.find((e=>s(e,i)))),!r&&t&&(r=e.find((e=>s(e,t)))),r||null},emitPriceAndAtc(e,t,i,o,s,r){fp.emit("updatePriceBlock",{blockIndex:r,variantPrice:o,comparePrice:s,isOutfitPicker:!0});try{const a=String(i.id||"").split("/").pop(),{selectedColor:n,selectedSize:l,selectedWidth:d}=this.getSelectedOptionsForSide(e),c=!!n||!!l||!!d,u=!!(null==i?void 0:i.selectedOptions)&&(!n||i.selectedOptions.some((e=>e.value===n)))&&(!l||i.selectedOptions.some((e=>e.value===l)))&&(!d||i.selectedOptions.some((e=>e.value===d)));let h=!!i.availableForSale,p=!h;c&&!u&&(h=!1,p=!0),fp.emit("updateAddButton",{variantId:a,parentId:t.id,handle:t.handle,variantPrice:o,comparePrice:s,instock:h,notavail:p,isOutfitPicker:!0,blockIndex:r,collectionIndex:e})}catch(a){console.error("Failed to emit outfit picker add-to-cart event",a)}}}},[["render",function(e,t,i,o,a,n){const l=c("PDPFreescroll");return r(),s("section",hu,[(r(!0),s(d,null,h(a.collectionList,((t,i)=>(r(),k(l,{nonActiveImageOverlayColor:a.nonActiveImageOverlayColor,nonActiveImageOverlayOpacity:a.nonActiveImageOverlayOpacity,arrowGap:e.arrowGap,arrowLeftImage:a.arrowLeftImage,arrowLeftImageAlt:a.arrowLeftImageAlt,arrowLeftImageWidth:a.arrowLeftImageWidth,arrowLeftImageHeight:a.arrowLeftImageHeight,arrowLeftImageDisabled:a.arrowLeftImageDisabled,arrowLeftImageDisabledAlt:a.arrowLeftImageDisabledAlt,arrowLeftImageDisabledWidth:a.arrowLeftImageDisabledWidth,arrowLeftImageDisabledHeight:a.arrowLeftImageDisabledHeight,isMobile:n.isMobile,isOutfitPicker:!0,itemsToShow:e.itemsToShow,itemsToShowMobile:e.itemsToShowMobile,key:i,index:i,media:t,desktopImageWidth:a.pdp_desktop_image_width,mobileImageWidth:a.pdp_mobile_image_width,tabletImageWidth:a.pdp_tablet_image_width,imagePadding:a.pdp_image_spacing,mobileImageSpacing:a.mobileImageSpacing,mobileNonActiveSlideWidth:a.mobileNonActiveSlideWidth,showArrows:!0,useCustomArrows:a.arrowCustomOn,imageBackgroundColor:a.pdp_image_bg_color,nonActiveSlideWidth:a.nonActiveSlideWidth,onSlideChange:e=>n.onSlideChange(i,e)},null,8,["nonActiveImageOverlayColor","nonActiveImageOverlayOpacity","arrowGap","arrowLeftImage","arrowLeftImageAlt","arrowLeftImageWidth","arrowLeftImageHeight","arrowLeftImageDisabled","arrowLeftImageDisabledAlt","arrowLeftImageDisabledWidth","arrowLeftImageDisabledHeight","isMobile","itemsToShow","itemsToShowMobile","index","media","desktopImageWidth","mobileImageWidth","tabletImageWidth","imagePadding","mobileImageSpacing","mobileNonActiveSlideWidth","useCustomArrows","imageBackgroundColor","nonActiveSlideWidth","onSlideChange"])))),128))])}],["__file","OutfitPicker.vue"]]);const mu=fe({name:"CartWidget",components:{ProductListItem:Ei,Carousel:P,Navigation:S,Slide:C},mounted(){this.handleViewportSize=ge(this),this.recommendedPids=[],this.productImageName=this.$el.parentElement.getAttribute("data-product_swatch_name"),this.cartRecItemsMobile=this.$el.parentElement.getAttribute("data-cart_recommendation_items_mobile"),this.widgetId=this.$el.parentElement.getAttribute("data-cart-widget-id"),this.cartRecItemsMobileFloat=parseFloat(this.cartRecItemsMobile),this.cartRecItemsDesktop=this.$el.parentElement.getAttribute("data-cart_recommendation_items_desktop"),this.cartRecItemsDesktopFloat=parseFloat(this.cartRecItemsDesktop),this.showCrosssellPercentage=this.$el.parentElement.getAttribute("data-show-crosssell-percentage")||"false";const e=this.$el.parentElement.getAttribute("data-use-fs-product-data")||this.$el.parentElement.getAttribute("data-use_fs_product_data");this.useFsProductData="false"===e?"":"true",window.addEventListener("start-cart-recommendations",(()=>{this.setCartPids()})),document.addEventListener("theme:resize:width",this.getClientWidth)},beforeUnmount(){this.handleViewportSize&&this.handleViewportSize(),document.removeEventListener("theme:resize:width",this.getClientWidth)},data:()=>({itemsToShow:5,productImageName:"",productsOnDisplay:[],maxProducts:9,recommendedPids:[],maxRetry:10,currentRetry:0,widgetId:"",showCrosssellPercentage:"false",useFsProductData:""}),methods:{setClickTrack(){window.setFindingMethod("Cart Recommendations")},reportProductViewRecommendation(e,t,i){this.setClickTrack(),ee((()=>{window.FastSimonSDK.event({eventName:window.FastSimonEventName.RecommendationProductClicked,data:{productID:e,position:t,widget_id:i||""}})}))},setCartPids(){document.querySelectorAll("[data-cart-item]").length>0?([...document.querySelectorAll(".drawer__content .cart__items__row")].forEac
1h((e=>{this.recommendedPids.push(e.getAttribute("data-cart-item"))})),this.getClientWidth(),this.getProductRecs()):this.currentRetry<this.maxRetry&&(this.currentRetry=this.currentRetry+1,setTimeout((()=>{this.setCartPids()}),250))},getProductRecs(){ee((()=>{window.FastSimonSDK.productRecommendationByWidget({withAttributes:!0,widgetsIDS:[this.widgetId],callback:e=>{const t=e.payload[0].payload,i=[];t.length>0&&t.forEach((e=>{i.length<this.maxProducts&&i.push(e)})),de(i,this.widgetId),this.productsOnDisplay=i,document.getElementById("cart-recommendations-wrapper").style.display="block"}})}))},getClientWidth(){document.documentElement.clientWidth<=window.theme.sizes.medium?this.itemsToShow=this.cartRecItemsMobileFloat:this.itemsToShow=this.cartRecItemsDesktopFloat}}},[["render",function(e,t,i,o,a,n){const u=c("Navigation"),p=c("ProductListItem"),m=c("slide"),f=c("carousel");return a.productsOnDisplay.length?(r(),k(f,{key:0,"items-to-show":a.itemsToShow,"items-to-scroll":1,"mouse-drag":!1,class:"recommendation-carousel",snapAlign:"start"},{addons:T((()=>[g(u)])),default:T((()=>[(r(!0),s(d,null,h(a.productsOnDisplay,((e,t)=>(r(),k(m,{key:e+"-"+t+e.id,pid:e.id},{default:T((()=>[e.l?(r(),k(p,{fsData:e,useFsProductData:a.useFsProductData,productTitle:e.l,pid:e.id,productImageName:a.productImageName,onClick:i=>n.reportProductViewRecommendation(e.id,t,a.widgetId||""),key:"grid"+e+"-"+t,hideSwatches:!0,hideQuickview:!0,disableSlider:!0,showSalePercentage:"true"===a.showCrosssellPercentage},null,8,["fsData","useFsProductData","productTitle","pid","productImageName","onClick","showSalePercentage"])):l("",!0)])),_:2},1032,["pid"])))),128))])),_:1},8,["items-to-show"])):l("",!0)}],["__file","CartWidget.vue"]]);let gu=!1,fu=null,wu=null,yu=!1,vu=!1;function bu(){var e;if(vu)return;const t=document.getElementById("product-families-json-data"),i="true"===(null==t?void 0:t.dataset.speedTracking);if(!t)return void(i&&console.log("[Plytix Speed] JSON element not found - Plytix data not enabled"));vu=!0;const o=i?performance.now():null;try{const s=i?performance.now():null,r=JSON.parse(t.textContent),a=i&&null!==s?performance.now()-s:null;if(i&&null!==a&&(console.log(`[Plytix Speed] JSON Parse: ${a.toFixed(2)}ms`),console.log(`[Plytix Speed] Products in JSON: ${(null==r?void 0:r.length)||0}`)),r&&Array.isArray(r)&&r.length>0){const t=null==(e=r[0])?void 0:e.productType;if(t&&"bundles"===t.trim().toLowerCase())return void console.warn("[Plytix] Plytix data is enabled but not used — bundle product type detected");const s=i?performance.now():null,n=ft.processProductFamiliesData(r),l=i&&null!==s?performance.now()-s:null;window.productFamiliesData=n,window.productFamiliesDataSource="plytix-metafield",i&&null!==l&&(console.log(`[Plytix Speed] Data Processing: ${l.toFixed(2)}ms`),console.log(`[Plytix Speed] Products Processed: ${n.length}`),console.log("[Plytix Speed] 📍 Data Source: Plytix PDP Stitch Products Metafield (Liquid-generated JSON)")),window.emitter&&window.emitter.emit("plytix-product-data-ready",n);const d=i&&null!==o?performance.now()-o:null,c=i?performance.now():null;if(i&&null!==d&&(console.log(`[Plytix Speed] ✅ Total Plytix Processing Time: ${d.toFixed(2)}ms`),console.log(`[Plytix Speed] Breakdown: Parse ${null==a?void 0:a.toFixed(2)}ms + Process ${null==l?void 0:l.toFixed(2)}ms`),c)){const e=function(e){if(!gu||!e)return null;try{const t=performance.getEntriesByType("navigation")[0];if(!t)return null;const i=e,o=t.domContentLoadedEventEnd>0?e-t.domContentLoadedEventEnd:null;return{fromNavigationStart:i,fromDOMContentLoaded:o,fromPageLoad:t.loadEventEnd>0?e-t.loadEventEnd:null,domInteractive:t.domInteractive||0,domContentLoaded:t.domContentLoadedEventEnd||0,loadEvent:t.loadEventEnd||0,responseStart:t.responseStart||0,responseEnd:t.responseEnd||0}}catch(t){return null}}(c);e&&(console.log("[Plytix Speed] 📊 Total Page Speed Metrics:"),console.log(`[Plytix Speed] Time from Navigation Start: ${e.fromNavigationStart.toFixed(2)}ms`),null!==e.fromDOMContentLoaded&&console.log(`[Plytix Speed] Time from DOMContentLoaded: ${e.fromDOMContentLoaded.toFixed(2)}ms`),null!==e.fromPageLoad&&console.log(`[Plytix Speed] Time from Page Load: ${e.fromPageLoad.toFixed(2)}ms`),console.log("[Plytix Speed] ─────────────────────────────────────────"),console.log(`[Plytix Speed] Plytix completed at: ${c.toFixed(2)}ms from page start`))}}else if(i&&null!==o){const e=performance.now()-o;console.log(`[Plytix Speed] ⚠️ No data to process: ${e.toFixed(2)}ms (JSON exists but empty)`)}}catch(s){if(console.error("Error parsing Plytix product data JSON:",s),i&&null!==o){const e=performance.now()-o;console.log(`[Plytix Speed] ❌ Parse Error after ${e.toFixed(2)}ms`)}}}const Su="cap.token",_u="cap.state",Cu="cap.verifier",Pu="cap.tried";function ku(){return window.customerAccount||{}}function Tu(e){return"string"==typeof e&&e.length>0&&!e.startsWith("no_")}function Iu(e){const t=e instanceof ArrayBuffer?new Uint8Array(e):e;let i="";for(let o=0;o<t.length;o++)i+=String.fromCharCode(t[o]);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Au(e){const t=new Uint8Array(e);return crypto.getRandomValues(t),Iu(t)}function Lu(){try{const e=sessionStorage.getItem(Su);return e?JSON.parse(e):null}catch{return null}}function Eu(e){try{sessionStorage.setItem(Su,JSON.stringify(e))}catch(t){}}function Mu(){try{sessionStorage.removeItem(Su)}catch(e){}}function xu(e){return{access_token:e.access_token,refresh_token:e.refresh_token,expires_at:Date.now()+1e3*(Number(e.expires_in)||0)}}async function Ou(e){const t=ku(),i=new URLSearchParams({grant_type:"refresh_token",client_id:t.clientId,refresh_token:e}),o=await fetch(t.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:i});if(!o.ok)throw Mu(),new Error(`token refresh failed: ${o.status}`);const s=xu(await o.json());return Eu(s),s}function Bu(){try{const e=new URL(location.href);let t=!1;["cap_code","cap_state","cap_error","cap_error_description"].forEach((i=>{e.searchParams.has(i)&&(e.searchParams.delete(i),t=!0)})),t&&window.history.replaceState({},"",e.pathname+(e.search?e.search:"")+e.hash)}catch(e){}}async function Fu(){const e=new URLSearchParams(location.search),t=e.get("cap_code"),i=e.get("
1cap_state");if(e.get("cap_error"))return sessionStorage.removeItem(_u),sessionStorage.removeItem(Cu),Bu(),null;if(!t||!i)return null;const o=sessionStorage.getItem(_u),s=sessionStorage.getItem(Cu);if(sessionStorage.removeItem(_u),sessionStorage.removeItem(Cu),Bu(),!o||i!==o)return null;if(!s)return null;try{return await async function(e,t){const i=ku(),o=new URLSearchParams({grant_type:"authorization_code",client_id:i.clientId,redirect_uri:`${location.origin}${i.callbackPath}`,code:e,code_verifier:t}),s=await fetch(i.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:o});if(!s.ok){const e=await s.text().catch((()=>""));throw new Error(`token exchange failed: ${s.status} ${e}`)}const r=xu(await s.json());return Eu(r),r}(t,s)}catch(r){return null}}async function Du(){const e=ku(),t=Au(32),i=Iu(await async function(e){const t=(new TextEncoder).encode(e),i=await crypto.subtle.digest("SHA-256",t);return new Uint8Array(i)}(t)),o=Au(16);sessionStorage.setItem(_u,o),sessionStorage.setItem(Cu,t),sessionStorage.setItem("cap.returnUrl",location.href),sessionStorage.setItem(Pu,"1");const s=new URL(e.authorizationEndpoint);return s.searchParams.set("client_id",e.clientId),s.searchParams.set("response_type","code"),s.searchParams.set("redirect_uri",`${location.origin}${e.callbackPath}`),s.searchParams.set("scope","openid email customer-account-api:full"),s.searchParams.set("state",o),s.searchParams.set("code_challenge",i),s.searchParams.set("code_challenge_method","S256"),s.searchParams.set("prompt","none"),location.replace(s.toString()),new Promise((()=>{}))}async function $u(){const e=Lu();if(!e)return null;if(e.expires_at-Date.now()>6e4)return e.access_token;if(!e.refresh_token)return Mu(),null;try{return(await Ou(e.refresh_token)).access_token}catch(t){return null}}async function zu(){const e=await Fu();if(e)return sessionStorage.removeItem(Pu),e;if(!window.isLoggedIn)return null;if(!(ku().allowedOrigins||[]).includes(location.origin))return null;const t=ku();if(!Tu(t.clientId)||!Tu(t.tokenEndpoint)||!Tu(t.authorizationEndpoint))return null;const i=Lu();if(i&&i.expires_at-Date.now()>6e4)return i;if(null==i?void 0:i.refresh_token)try{return await Ou(i.refresh_token)}catch(o){}return sessionStorage.getItem(Pu)||await Du(),null}const Hu="customer_account_access_token",Ru="customer_account_refresh_token",Nu="customer_account_token_expiry_ms",Vu="ca_pkce_verifier",qu="ca_pkce_state",Uu="ca_oauth_return_url",Gu="ca_pending_cookie_opt_in",Wu="ca_oauth_redirect_uri",Ku="ca_bridge_resume_customer_account_oauth",ju="ca_bridge_pending_cookie_opt_in",Qu="abg:customer-account:pending-cookie-opt-in",Zu="CA_MISSING_ACCESS_TOKEN",Ju="2026-04",Yu={Accept:"application/json"},Xu="/pages/customer-account-auth-callback";let eh=null,th=null,ih=null,oh=null,sh=null;function rh(e,t){return Object.assign(new Error(e),{code:t})}function ah(e,t){const i=(e||[]).map((e=>e&&e.message||"")).filter(Boolean).join("; ");return t?i.slice(0,t):i}async function nh(e){try{const t=await fetch(`${window.location.origin}${e}`,{headers:Yu});return t.ok?await t.json():null}catch(t){return null}}function lh(e){const t=String(e).match(/\/customer\/api\/(\d{4}-\d{2})\/graphql/);return t?t[1]:null}async function dh(){if("undefined"==typeof window)return null;if(ih)return ih;if(oh)return oh;oh=(async()=>{const e=await nh("/.well-known/openid-configuration");return e&&"string"==typeof e.authorization_endpoint&&"string"==typeof e.token_endpoint?(ih=e,e):null})();const e=await oh;return oh=null,e}function ch(e){const t=e instanceof Uint8Array?e:new Uint8Array(e);let i="";for(let o=0;o<t.length;o++)i+=String.fromCharCode(t[o]);return btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function uh(){const e=new Uint8Array(32);return crypto.getRandomValues(e),ch(e)}function hh(){if("undefined"==typeof window)return"";const e=window.customerAccount||window.siteGlobals&&window.siteGlobals.customerAccount,t=e&&null!=e.clientId?String(e.clientId).trim():"";return!t||t.startsWith("no_")?"":t}function ph(){if("undefined"==typeof window)return"";const e=window.customerAccount||window.siteGlobals&&window.siteGlobals.customerAccount,t=e&&null!=e.apiEndpoint?String(e.apiEndpoint).trim():"";return t&&!t.startsWith("no_")&&/\/customer\/api\/[^/]+\/graphql$/.test(t)?t:""}function mh(){if("undefined"==typeof window)return!1;const e=function(){if("undefined"==typeof window)return"";const e=window.customerAccount||window.siteGlobals&&window.siteGlobals.customerAccount,t=e&&null!=e.oauthOrigin?String(e.oauthOrigin).trim():"";return t?t.replace(/\/+$/,""):""}();if(!e)return!1;let t="";try{t=new URL(e).origin}catch(o){return!1}if(!t||t===window.location.origin)return!1;let i=null;try{i=sessionStorage.getItem(Gu)}catch(o){}if("true"!==i&&"false"!==i)return!1;try{localStorage.setItem(Ku,"1"),localStorage.setItem(ju,i),sessionStorage.removeItem(Gu)}catch(o){return!1}return window.location.replace(t+window.location.pathname+window.location.search+window.location.hash),!0}async function gh(e){if("undefined"==typeof window||!e)return String(e||"");let t;try{t=new URL(String(e).trim())}catch(s){return String(e)}if(!/\/customer\/api\/[^/]+\/graphql/.test(t.pathname))return t.toString();const i=await dh();if(!i||"string"!=typeof i.token_endpoint)return t.toString();let o;try{o=new URL(i.token_endpoint).origin}catch(s){return t.toString()}return o===t.origin||t.origin!==window.location.origin?t.toString():`${o}${t.pathname}${t.search}`}function fh(e){if("undefined"==typeof window||!e||!e.access_token)return;const t=String(e.access_token).trim();try{localStorage.setItem(Hu,t),e.refresh_token&&localStorage.setItem(Ru,String(e.refresh_token).trim());const i=Number(e.expires_in);Number.isFinite(i)&&i>0&&localStorage.setItem(Nu,String(Date.now()+1e3*i))}catch(i){}window.__CUSTOMER_ACCOUNT_ACCESS_TOKEN__=t}function wh(){if("undefined"!=typeof window){try{localStorage.removeItem(Hu),localStorage.removeItem(Ru),localStorage.removeItem(Nu)}catch(e){}try{delete window.__CUSTOMER_ACCOUNT_ACCESS_TOKEN__,delete window.__DEV_CUSTOMER_ACCOUNT_ACCESS_TOKEN__}catch(e){window.__CUSTOMER_ACCOUNT_ACCESS_TOKEN__="",window.__DEV_CUSTOMER_ACCOUNT_ACCESS_TOKEN__=""}}}async function yh(){if("undefined"==typeof window)return;const e=hh();if(!e)return void console.warn("Customer Account OAuth: set customer_account_client_id in theme settings.");if(mh())return;const t=await dh();if(!t)return void console.warn("Customer Account OAuth: could not load /.well-known/openid-configuration.");const i=function(){if("undefined"==typeof window)return Xu;const e=window.customerAccount||window.siteGlobals&&window.siteGlobals.customerAccount,t=e&&null!=e.cookieOAuthCallbackPath?String(e.cookieOAuthCallbackPath).trim():"";return t?t.startsWith("/")?t:`/${t}`:Xu}(),o=i.startsWith("/")?i:`/${i}`,s=`${window.location.origin}${o}`,r=uh(),a=await async function(e){const t=await crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e));return ch(new Uint8Array(t))}(r),n=uh().slice(0,43);
1try{sessionStorage.setItem(Vu,r),sessionStorage.setItem(qu,n),sessionStorage.setItem(Uu,window.location.href),sessionStorage.setItem(Wu,s)}catch(d){}const l=new URL(t.authorization_endpoint);l.searchParams.set("client_id",e),l.searchParams.set("redirect_uri",s),l.searchParams.set("response_type","code"),l.searchParams.set("scope","openid email customer-account-api:full"),l.searchParams.set("state",n),l.searchParams.set("code_challenge",a),l.searchParams.set("code_challenge_method","S256"),window.location.assign(l.toString())}async function vh(){const e=function(){if("undefined"==typeof window)return"";const e=window.__CUSTOMER_ACCOUNT_ACCESS_TOKEN__||window.__DEV_CUSTOMER_ACCOUNT_ACCESS_TOKEN__;if(e)return String(e).trim();try{const e=localStorage.getItem(Hu);if(e)return e.trim()}catch(t){}return""}();if(e)return e;if("undefined"==typeof window)return"";if(!window.customerAccountEnabled||!window.isLoggedIn)return"";try{const e=await $u();return e&&String(e).trim()?String(e).trim():""}catch(t){return""}}async function bh(){if("undefined"==typeof window)return!1;if(sh)return sh;const e=(async()=>{const e=hh(),t=function(){if("undefined"==typeof window)return"";try{const e=localStorage.getItem(Ru);return e?String(e).trim():""}catch(e){}return""}();if(!e||!t)return!1;const i=await dh();if(!i||"string"!=typeof i.token_endpoint)return!1;const o=new URLSearchParams;o.set("grant_type","refresh_token"),o.set("client_id",e),o.set("refresh_token",t);try{const e=await fetch(i.token_endpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:o.toString()}),t=await e.json().catch((()=>null));if(e.ok&&t&&t.access_token)return fh(t),!0;t&&"invalid_grant"===t.error&&wh()}catch(s){}return!1})();sh=e;try{return await e}finally{sh===e&&(sh=null)}}async function Sh(e){let t=await vh();if(!t)throw rh("Customer Account access token required. Sign in via Headless Customer Account OAuth.",Zu);const i=await async function(){if("undefined"!=typeof window&&window.__CA_API_GRAPHQL_URL__)return gh(String(window.__CA_API_GRAPHQL_URL__).trim());const e=ph();if(e){const t=lh(e);return t&&(th=t),eh=e,e}if(eh)return eh;const t=await nh("/.well-known/customer-account-api");if(t&&"string"==typeof t.graphql_api){const e=lh(t.graphql_api);return e&&(th=e),eh=await gh(t.graphql_api),eh}const i=await dh();if(i&&"string"==typeof i.token_endpoint){const e=th||Ju;return eh=`${window.location.origin}/customer/api/${e}/graphql`,eh}return eh=`${window.location.origin}/customer/api/${Ju}/graphql`,eh}(),o=t=>fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Authorization:t},body:JSON.stringify(e)});let s=await o(t);401===s.status&&(await bh(),t=await vh(),t&&(s=await o(t)));const r=await async function(e){try{return await e.json()}catch(t){return null}}(s);if(!s.ok)throw rh(`Customer Account API request failed (${s.status}).`,"CA_HTTP_ERROR");if(r&&r.errors&&r.errors.length)throw rh(ah(r.errors,400)||"Customer Account GraphQL error.","CA_GRAPHQL_ERROR");return r}async function _h(e){if("undefined"!=typeof window&&(!window.customerAccountEnabled||!0!==window.isLoggedIn))return null;const t=await Sh({query:pt}),i=t&&t.data&&t.data.customer&&t.data.customer.id;if(!i||"string"!=typeof i)throw rh("Could not resolve customer id for Customer Account API.","CA_CUSTOMER_ID_UNAVAILABLE");const o=[{ownerId:i,namespace:"custom",key:"cookie_opt_in",type:"boolean",value:e?"true":"false"},{ownerId:i,namespace:"custom",key:"cookie_opt_date",type:"date_time",value:(new Date).toISOString()}],s=await Sh({query:mt,variables:{metafields:o}}),r=s&&s.data&&s.data.metafieldsSet,a=r&&r.userErrors?r.userErrors:null;if(a&&a.length)throw rh(ah(a,400)||"Metafield update was rejected.","CA_METAFIELD_USER_ERROR");return r&&r.metafields?r.metafields:null}function Ch(e,t){if("undefined"!=typeof document)try{document.dispatchEvent(new CustomEvent(Qu,{detail:e?{success:!0}:{success:!1,error:t}}))}catch(i){}}async function Ph(){if("undefined"==typeof window)return;if(!window.customerAccountEnabled||!0!==window.isLoggedIn)return;let e=null;try{e=sessionStorage.getItem(Gu)}catch(t){return}if(null!=e&&await vh())try{await _h("true"===e);try{sessionStorage.removeItem(Gu)}catch(t){}Ch(!0)}catch(t){Ch(!1,t&&"object"==typeof t&&"message"in t?String(t.message).slice(0,240):"sync_failed")}}const kh="gid://shopify/Product/",Th=/^(custom|my_fields|plytix)\./,Ih=["href"],Ah={class:"product-comparison__content"},Lh={key:0,class:"product-comparison__error gt-p"},Eh={key:1,class:"product-comparison__empty-state gt-p"},Mh=["href"],xh={key:2,class:"product-comparison__products-stack"},Oh=["onClick"],Bh={key:0,class:"product-comparison__compare-metafields"}
1,Fh={key:0,class:"product-comparison__compare-controls"},Dh={class:"product-comparison__rows-stack"},$h={class:"product-comparison__compare-label gt-p__bold"},zh={key:1,class:"product-comparison__no-fields gt-p"};const Hh=fe({name:"ProductComparison",components:{ProductListItem:Ei},data:()=>({error:"",loading:!1,metafieldsLoading:!1,metafieldsToCompare:"",colGap:null,rowGap:null,imageHeightDesktop:320,imageHeightMobile:180,bg:"#f0f0f0",colBg:"#ffffff",headerColor:"#000000",textOnBg:"#000000",backLinkFontSize:null,parsedCompareLines:[],compareDisplayByProduct:{},products:[],hideSimilar:!1,rows:[],isSticky:!1,enableSticky:!0,originalOffsetTop:0,urlParams:null,fetchRequestId:0,cachedAspectRatio:null,productsReady:!1,stickyTransitioning:!1,emptyStateText:"No products selected for comparison."}),computed:{themeStyleVars(){return{"--pc-col-gap":`${Number(this.colGap)}px`,"--pc-row-gap":`${Number(this.rowGap)}px`,"--pc-image-height-desktop":`${Number(this.imageHeightDesktop)}px`,"--pc-image-height-mobile":`${Number(this.imageHeightMobile)}px`,"--pc-sticky-image-width":`${this.stickyImageWidth}px`,"--pc-sticky-image-width-mobile":`${this.stickyImageWidthMobile}px`,"--pc-bg":this.bg,"--pc-col-bg":this.colBg,"--pc-header-color":this.headerColor,"--pc-text-on-bg":this.textOnBg,"--pc-back-link-font-size":this.backLinkFontSize?`${Number(this.backLinkFontSize)}px`:null,"--pc-shimmer-base":this.shimmerColors.base,"--pc-shimmer-sweep":this.shimmerColors.sweep,"--pc-shimmer-sweep-transparent":this.shimmerColors.sweepTransparent}},productsLength(){return this.products.length},skeletonCount(){return this.productPids.length||3},aspectRatioParts(){const e=this.cachedAspectRatio||"3 / 4",[t,i]=e.includes("/")?e.split("/").map((e=>parseFloat(e.trim()))):[parseFloat(e)||.75,1];return{w:t,h:i}},cardWidth(){const e=Number(this.imageHeightDesktop);return Math.round(e*(this.aspectRatioParts.w/this.aspectRatioParts.h))},stickyImageWidth(){const e=Math.round(.5*Number(this.imageHeightDesktop));return Math.round(e*(this.aspectRatioParts.w/this.aspectRatioParts.h))},stickyImageWidthMobile(){const e=Number(this.imageHeightMobile);return Math.round(e*(this.aspectRatioParts.w/this.aspectRatioParts.h))},skeletonGridStyle(){return{gridTemplateColumns:`repeat(${this.skeletonCount}, ${this.cardWidth}px)`}},expectedRowCount(){return this.parsedCompareLines.length||4},hasSimilarities(){return this.rows.some((({values:e})=>{const t=e.map((e=>(e||"").trim())),i=t.filter(Boolean);return!(i.length>0&&(t.includes("")||new Set(i).size>1))}))},visibleRows(){return this.hideSimilar?this.rows.filter((({values:e})=>{const t=e.map((e=>(e||"").trim())),i=t.filter(Boolean);return i.length>0&&(t.includes("")||new Set(i).size>1)})):this.rows},productPids(){if(!this.urlParams)return[];try{const e=[this.urlParams.get("products"),...this.urlParams.getAll("product")].filter(Boolean).map((e=>this.normalizeProductId(e))).filter(Boolean);return Array.from(new Set(e)).slice(0,3)}catch(e){return console.error("Error getting product pids",e),[]}},collectionHandle(){var e;
1return(null==(e=this.urlParams)?void 0:e.get("collection_handle"))||""},collectionTitle(){var e;return(null==(e=this.urlParams)?void 0:e.get("collection_title"))||""},safeCollectionUrl(){if(!this.collectionHandle)return null;const e=this.sanitizeCollectionHandle(this.collectionHandle);return e?`/collections/${e}`:null},compareGridStyle(){return{gridTemplateColumns:`repeat(${this.productsLength}, ${this.cardWidth}px)`}},shimmerColors(){const e=(this.colBg||"#ffffff").replace("#",""),t=parseInt(e.substring(0,2),16)||0,i=parseInt(e.substring(2,4),16)||0,o=parseInt(e.substring(4,6),16)||0,s=(.299*t+.587*i+.114*o)/255>.5?-20:20,r=e=>Math.max(0,Math.min(255,e));return{base:`rgb(${r(t+s)}, ${r(i+s)}, ${r(o+s)})`,sweep:this.colBg||"#ffffff",sweepTransparent:`rgba(${t}, ${i}, ${o}, 0)`}},hasNoProducts(){return this.productsReady&&!this.products.length&&!this.loading&&!this.error}},watch:{visibleRows(){this.$nextTick((()=>{var e;null==(e=this.cleanupScrollSync)||e.call(this),this.setupScrollSync()}))},isSticky(){this.enableSticky&&this.$nextTick((()=>{var e;null==(e=this.cleanupScrollSync)||e.call(this),this.cleanupScrollSync=null,requestAnimationFrame((()=>{this.setupScrollSync()}))}))},stickyImageWidthMobile(){this.$nextTick((()=>{requestAnimationFrame((()=>{var e;null==(e=this.cleanupScrollSync)||e.call(this),this.setupScrollSync()}))}))}},mounted(){var e,t,i,o,s,r,a,n,l,d,c,u,h,p,m,g,f,w,y,v,b,S,_,C,P,k,T,I,A,L,E,M,x,O,B,F,D,$,z;this.handleViewportSize=ge(this);const H=getComputedStyle(document.documentElement).getPropertyValue("--PRODUCT-GRID-ASPECT-RATIO-DECIMAL").trim();H&&(this.cachedAspectRatio=H);try{this.urlParams=new URLSearchParams(window.location.search||"")}catch(N){console.error("Error initializing URL params",N),this.urlParams=new URLSearchParams}this.metafieldsToCompare=null==(i=null==(t=null==(e=this.$el)?void 0:e.parentElement)?void 0:t.dataset)?void 0:i.metafieldsToCompare,this.colGap=Number(null==(r=null==(s=null==(o=this.$el)?void 0:o.parentElement)?void 0:s.dataset)?void 0:r.colGap)||this.colGap,this.rowGap=Number(null==(l=null==(n=null==(a=this.$el)?void 0:a.parentElement)?void 0:n.dataset)?void 0:l.rowGap)||this.rowGap,this.imageHeightDesktop=Number(null==(u=null==(c=null==(d=this.$el)?void 0:d.parentElement)?void 0:c.dataset)?void 0:u.imageHeightDesktop)||this.imageHeightDesktop,this.imageHeightMobile=Number(null==(m=null==(p=null==(h=this.$el)?void 0:h.parentElement)?void 0:p.dataset)?void 0:m.imageHeightMobile)||this.imageHeightMobile,this.bg=(null==(w=null==(f=null==(g=this.$el)?void 0:g.parentElement)?void 0:f.dataset)?void 0:w.bg)||this.bg,this.colBg=(null==(b=null==(v=null==(y=this.$el)?void 0:y.parentElement)?void 0:v.dataset)?void 0:b.colBg)||this.colBg,this.headerColor=(null==(C=null==(_=null==(S=this.$el)?void 0:S.parentElement)?void 0:_.dataset)?void 0:C.headerColor)||this.headerColor,this.textOnBg=(null==(T=null==(k=null==(P=this.$el)?void 0:P.parentElement)?void 0:k.dataset)?void 0:T.textOnBg)||this.textOnBg,this.backLinkFontSize=(null==(L=null==(A=null==(I=this.$el)?void 0:I.parentElement)?void 0:A.dataset)?void 0:L.backLinkFontSize)?Number(null==(x=null==(M=null==(E=this.$el)?void 0:E.parentElement)?void 0:M.dataset)?void 0:x.backLinkFontSize):null,this.emptyStateText=(null==(F=null==(B=null==(O=this.$el)?void 0:O.parentElement)?void 0:B.dataset)?void 0:F.emptyStateText)||this.emptyStateText;const R=null==(z=null==($=null==(D=this.$el)?void 0:D.parentElement)?void 0:$.dataset)?void 0:z.enableSticky;this.enableSticky=void 0===R||"true"===R,this.handlePopstate=()=>{try{this.urlParams=new URLSearchParams(window.location.search)}catch(N){console.error("Error updating URL params",N),this.urlParams=new URLSearchParams}this.fetchProducts()},this._imageLoadCount=0,this._onProductImageLoaded=()=>{this._imageLoadCount++,this._imageLoadCount>=this.products.length&&this.products.length>0&&!this.productsReady&&(this.productsReady=!0,clearTimeout(this._readyTimeout))},fp.on("product-slide-loaded",this._onProductImageLoaded),window.addEventListener("popstate",this.handlePopstate),this.fetchProducts(),this.$nextTick((()=>{this.enableSticky&&this.setupStickyScroll(),this.setupScrollSync()}))},beforeUnmount(){var e,t;null==(e=this.handleViewportSize)||e.call(this),this.enableSticky&&this.cleanupStickyScroll(),null==(t=this.cleanupScrollSync)||t.call(this),this.handlePopstate&&(window.removeEventListener("popstate",this.handlePopstate),this.handlePopstate=null),this._onProductImageLoaded&&fp.off("product-slide-loaded",this._onProductImageLoaded),clearTimeout(this._readyTimeout),clearTimeout(this._stickyTransitionTimer)},methods:{sanitizeCollectionHandle(e){if(!e||"string"!=typeof e)return null;const t=e.replace(/[^a-zA-Z0-9_-]/g,"");return t.length>0&&t===e?t:null},normalizeProductId:e=>e&&"string"==typeof e?e.startsWith(kh)?e.replace(kh,""):/^\d+$/.test(e)?e:null:null,getNormalizedProductId(e){return this.normalizeProductId(e)||""},setupStickyScroll(){var e;if(!this.enableSticky)return;const t=null==(e=this.$el)?void 0:e.querySelector(".product-comparison__sticky-container");t&&(this.originalOffsetTop=t.offsetTop,this.handleScroll=e=>{var t;if(!this.enableSticky)return void(this.isSticky=!1);const i=((null==(t=null==e?void 0:e.detail)?void 0:t.position)??window.scrollY??window.pageYOffset)>this.originalOffsetTop;i!==this.isSticky&&(this.stickyTransitioning=!0,clearTimeout(this._stickyTransitionTimer),this._stickyTransitionTimer=setTimeout((()=>{this.stickyTransitioning=!1}),80)),this.isSticky=i},document.addEventListener("theme:scroll",this.handleScroll),this.handleScroll({detail
1:{position:window.scrollY??window.pageYOffset}}))},cleanupStickyScroll(){this.handleScroll&&(document.removeEventListener("theme:scroll",this.handleScroll),this.handleScroll=null)},setupScrollSync(){this.$nextTick((()=>{var e;const t=null==(e=this.$el)?void 0:e.querySelector(".product-comparison__content");t&&(this.cleanupScrollSync=function(e,t,i="horizontal"){if(!e||!t)return()=>{};const o="horizontal"===i?"scrollLeft":"scrollTop",s="horizontal"===i?"scrollWidth":"scrollHeight",r="horizontal"===i?"clientWidth":"clientHeight",a=new WeakSet;let n=[],l=!1,d=new Map;const c=({target:e})=>{var i;const c=n.includes(e)?e:null==(i=e.closest)?void 0:i.call(e,t);if(!c||!n.includes(c)||a.has(c))return;const u=c[o];d.get(c),d.set(c,u),l||(l=!0,requestAnimationFrame((()=>{for(let e=0,t=n.length;e<t;e++){const t=n[e];if(t===c||a.has(t))continue;a.add(t);const i=t[s]-t[r];t[o]=u>i?i:u,requestAnimationFrame((()=>a.delete(t)))}l=!1})))},u=a=>{const l=a&&n[0]?n[0][o]:0;n.forEach((e=>{e.removeEventListener("scroll",c)})),n=Array.from(e.querySelectorAll(t)).filter((e=>e[s]>e[r])),n.forEach((e=>{var t,o;"horizontal"===i&&(e.dataset.horizontalScroll="",null==(o=null==(t=window.theme)?void 0:t.setupHorizontalScroll)||o.call(t,e)),e.addEventListener("scroll",c,{passive:!0})})),l&&n.forEach((e=>{const t=e[s]-e[r];e[o]=l>t?t:l}))},h=()=>requestAnimationFrame((()=>u(!0)));return u(),document.addEventListener("theme:resize:width",h),()=>{n.forEach((e=>{e.removeEventListener("scroll",c)})),document.removeEventListener("theme:resize:width",h),n=[]}}(t,".product-comparison__products, .product-comparison__compare-metafields, .product-comparison__compare-values","horizontal"))}))},removeProduct(e){const t=this.normalizeProductId(e);this.products=this.products.filter((t=>t.id!==e));const i=this.products.map((e=>this.normalizeProductId(e.id))).filter(Boolean),o=new URLSearchParams,s=this.collectionHandle,r=this.collectionTitle;if(s&&o.set("collection_handle",s),r&&o.set("collection_title",r),i.length){o.set("products",i[0]);for(let e=1;e<i.length;e++)o.append("product",i[e])}const a=`${window.location.pathname}${o.toString()?"?"+o.toString():""}`;a!==window.location.pathname+window.location.search&&(window.history.pushState({},"",a),this.urlParams=o);try{const i=`plp_compare_products_${window.location.hostname}`,o=sessionStorage.getItem(i);if(o){const s=JSON.parse(o);if(Array.isArray(s)){const o=s.filter((i=>{const o=String((null==i?void 0:i.pid)||(null==i?void 0:i.id)||"");return o!==t&&o!==String(e)}));o.length?sessionStorage.setItem(i,JSON.stringify(o)):sessionStorage.removeItem(i)}}}catch(n){console.error("Error updating sessionStorage:",n)}this.rebuildRows(),this.$nextTick((()=>{var e;null==(e=this.cleanupScrollSync)||e.call(this),this.setupScrollSync()}))},extractRowLabel(e,t){return this.isMetafieldKey(e)?this.isMetafieldKey(t)?"":String(t||"").trim():String(e||"").trim()},rebuildRows(){this.parsedCompareLines.length?this.rows=this.parsedCompareLines.map(((e,t)=>{const[i,o]=e||[];return{label:this.extractRowLabel(i,o),values:this.products.map((e=>{var i,o;const s=null==(o=null==(i=this.compareDisplayByProduct)?void 0:i[e.id])?void 0:o[t];return Array.isArray(s)&&"string"==typeof s[1]?s[1].trim():""}))}})).filter((e=>e.values.some((e=>""!==e.trim())))):this.rows=[]},isMetafieldKey:e=>Th.test(String(e||"").trim()),parseMetafieldKey(e){if(!e)return null;const[t,i]=String(e).trim().split(".");return t&&i?{namespace:t.trim(),key:i.trim()}:null},parseMetafieldsSetting(e){if(!e)return{identifiers:[],lines:[]};const t=new Map,i=e.split(/\r?\n/).map((e=>null==e?void 0:e.trim())).filter(Boolean).map((e=>{const[i="",o=""]=e.split(",").map((e=>(e||"").trim()));return[i,o].forEach((e=>{if(this.isMetafieldKey(e)){const i=this.parseMetafieldKey(e);i&&t.set(`${i.namespace}.${i.key}`,i)}})),[i,o]}));return{identifiers:Array.from(t.values()),lines:i}},formatCompareValue(e){if(!e||"string"!=typeof e)return"";const t=e.trim();if(!t)return"";if(t.startsWith("[")||t.startsWith("{"))try{const e=JSON.parse(t);if(Array.isArray(e))return e.map((e=>
1String(e??"").trim())).filter(Boolean).join(", ");if(e&&"object"==typeof e)return"root"===e.type&&Array.isArray(e.children)?this.extractRichText(e):"amount"in e?[e.amount,e.currency_code].filter(Boolean).join(" "):"value"in e&&"unit"in e?`${e.value} ${e.unit}`:"value"in e&&"scale_max"in e?`${e.value}/${e.scale_max}`:"text"in e&&"url"in e?String(e.text||e.url||""):Object.values(e).filter((e=>null!=e&&""!==e)).join(", ")}catch(i){}return/<[a-z][\s\S]*>/i.test(t)?this.stripHtmlToText(t):t.includes("\n")?t.split("\n").map((e=>e.trim())).filter(Boolean).join(" | "):t},extractRichText(e){if(!e)return"";if("text"===e.type)return e.value||"";if(!Array.isArray(e.children))return"";const t=new Set(["paragraph","heading","list-item","list"]),i=e.children.map((e=>"list"===e.type?(e.children||[]).map((e=>this.extractRichText(e).trim())).filter(Boolean).join(" | "):this.extractRichText(e))),o=t.has(e.type)||"root"===e.type?" | ":"";return i.filter(Boolean).join(o).replace(/\s{2,}/g," ").trim()},stripHtmlToText(e){const t=document.createElement("div");t.innerHTML=e;const i=t.querySelectorAll("li");return i.length?Array.from(i).map((e=>e.textContent.trim())).filter(Boolean).join(" | "):(t.textContent||"").replace(/\s{2,}/g," ").trim()},buildDisplayLines(e,t){const i=Array.isArray(t)?t.reduce(((e,t)=>((null==t?void 0:t.namespace)&&(null==t?void 0:t.key)&&(e[`${t.namespace}.${t.key}`]=t.value??""),e)),{}):{},o=e=>{if(!this.isMetafieldKey(e))return"";const t=this.parseMetafieldKey(e);return t&&i[`${t.namespace}.${t.key}`]||""};return e.map((([e,t])=>{const i=this.isMetafieldKey(e),s=this.isMetafieldKey(t),r=i?e:s?t:"";return[i?s?"":String(t||"").trim():String(e||"").trim(),this.formatCompareValue(o(r))]}))},async fetchProductMetafields(e,t,i,o){var s,r;try{const a=null==e?void 0:e.handle;if(!a)return void console.warn("Product missing handle:",null==e?void 0:e.id);const n=await it.request(ot,{variables:{handle:a,countryIso2:i,metaIdentifier:t}});if(o!==this.fetchRequestId)return;const l=(null==(r=null==(s=null==n?void 0:n.data)?void 0:s.product)?void 0:r.metafields)||[],d=this.buildDisplayLines(this.parsedCompareLines,l);d.length&&d.every((([,e])=>!e))&&console.warn(`[ProductComparison] No metafield values found for product: ${a} — check that configured keys exist on this product`),this.compareDisplayByProduct={...this.compareDisplayByProduct,[e.id]:d}}catch(a){console.error(`Failed to fetch metafields for product ${null==e?void 0:e.id}:`,a),o===this.fetchRequestId&&(this.compareDisplayByProduct={...this.compareDisplayByProduct,[e.id]:[]})}},async fetchProducts(){var e,t,i,o;if(!this.productPids.length)return void(this.productsReady=!0);const s=++this.fetchRequestId;this.loading=!0,this.productsReady=!1,this._imageLoadCount=0,clearTimeout(this._readyTimeout),this.error="";try{const{identifiers:r,lines:a}=this.parseMetafieldsSetting(this.metafieldsToCompare);this.parsedCompareLines=a,r.length||console.warn('[ProductComparison] No metafields configured for comparison. Add metafield keys to the "Compare Metafields" section setting.');const n=this.productPids.map((e=>`id:${e}`)).join(" OR "),l=null==(e=null==window?void 0:window.Shopify)?void 0:e.country,d=await it.request(dt,{variables:{query:n,countryIso2:l}});if(s!==this.fetchRequestId)return;const c=(null==(i=null==(t=null==d?void 0:d.data)?void 0:t.products)?void 0:i.edges)||[],u=new Map(c.map((({node:e})=>{const t=this.normalizeProductId(null==e?void 0:e.id);return t?[t,e]:null})).filter(Boolean));if(this.products=this.productPids.map((e=>u.get(String(e)))).filter(Boolean),r.length&&this.products.length){this.metafieldsLoading=!0;const e=null==(o=null==window?void 0:window.Shopify)?void 0:o.country;try{await Promise.all(this.products.map((t=>this.fetchProductMetafields(t,r,e,s))))}finally{s===this.fetchRequestId&&(this.metafieldsLoading=!1)}s===this.fetchRequestId&&(this.rebuildRows(),!this.rows.length&&this.parsedCompareLines.length&&console.warn("[ProductComparison] All comparison rows are empty. Configured keys:",r.map((e=>`${e.namespace}.${e.key}`))))}s===this.fetchRequestId&&this.products.length&&this.$nextTick((()=>{var e;null==(e=this.cleanupScrollSync)||e.call(this),this.setupScrollSync()}))}catch(r){s===this.fetchRequestId&&(this.error=(null==r?void 0:r.message)||"Failed to load products.",this.productsReady=!0,console.error("Error fetching products:",r))}finally{s===this.fetchRequestId&&(this.loading=!1,this.products.length?this._readyTimeout=setTimeout((()=>{this.productsReady||(this.productsReady=!0)}),5e3):this.productsReady=!0)}}}},[["render",function(e,t,i,o,u,g){const f=c("ProductListItem");return r(),s("section",{class:"product-comparison section-padding wrapper--full",style:n(g.themeStyleVars)},[g.safeCollectionUrl&&g.collectionTitle?(r(),s("a",{key:0,class:"gt-p product-comparison__back-link",href:g.safeCollectionUrl}," < Back to "+m(g.collectionTitle),9,Ih)):l("",!0),a("div",Ah,[a("div",{class:p(["product-comparison__sticky-container",{"is-sticky":u.enableSticky&&u.isSticky}])},[t[2]||(t[2]=a("h1",{class:"product-comparison__title gt-h2"},"Compare Products",-1)),a("div",{class:p(["product-comparison__products-section",{"product-comparison__products-section--transitioning":u.stickyTransitioning}])},[u.error?(r(),s("div",Lh,m(u.error),1)):g.hasNoProducts?(r(),s("div",Eh,[a("p",null,m(u.emptyStateText),1),g.safeCollectionUrl&&g.collectionTitle?(r(),s("a",{key:0,href:g.safeCollectionUrl,class:"product-comparison__back-link gt-p"},"< Back to "+m(g.collectionTitle),9,Mh)):l("",!0)])):(r(),s("div",xh,[a("div",{class:p(["product-comparison__skeleton-grid",{"product-comparison__skeleton--hidden":u.productsReady}]),style:n(g.skeletonGridStyle)},[(r(!0),s(d,null,h(g.skeletonCount,(e=>(r(),s("div",{key:"skeleton-"+e,class:"product-comparison__item product-comparison__skeleton-card"},[...t[1]||(t[1]=[R('<div class="product-comparison__skeleton-image"></div><div class="product-comparison__skeleton-info"><div class="product-comparison__skeleton-title"></div><div class="product-comparison__skeleton-price"></div><div class="product-comparison__skeleton-link"></div></div>',2)])])))),128))],6),u.products.length?(r(),s("div",{key:0,class:p(["product-comparison__products",{"product-comparison__products--ready":u.productsReady}]),style:n(g.compareGridStyle)},[(r(!0),s(d,null,h(u.products,(e=>(r(),s("div",{key:e.id,class:"product-comparison__item"},[u.products.length>
12?(r(),s("button",{key:0,type:"button",class:"product-comparison__remove","aria-label":"Remove product from comparison",onClick:t=>g.removeProduct(e.id)},"X",8,Oh)):l("",!0),(null==e?void 0:e.title)?(r(),k(f,{productTitle:null==e?void 0:e.title,pid:g.getNormalizedProductId(null==e?void 0:e.id),productImageName:"product-grid",key:"grid"+e.id,hideSwatches:!0,disableCompare:!0,disableSlider:!0,showSalePercentage:"false",showFullDetailsLink:!0,showRating:!0},null,8,["productTitle","pid"])):l("",!0)])))),128))],6)):l("",!0)]))],2)],2),u.products.length?(r(),s("div",Bh,[a("div",{class:"product-comparison__compare-head",style:n(g.compareGridStyle)},[g.hasSimilarities?(r(),s("div",Fh,[O(a("input",{id:"hide-similar-checkbox",type:"checkbox","onUpdate:modelValue":t[0]||(t[0]=e=>u.hideSimilar=e)},null,512),[[D,u.hideSimilar]]),t[3]||(t[3]=a("label",{for:"hide-similar-checkbox",class:"gt-p__small"},"Hide similarities",-1))])):l("",!0)],4),a("div",Dh,[a("div",{class:p(["product-comparison__compare-rows product-comparison__skeleton-rows",{"product-comparison__skeleton-rows--hidden":!u.metafieldsLoading}])},[(r(!0),s(d,null,h(g.expectedRowCount,(e=>(r(),s("div",{key:"skel-row-"+e,class:"product-comparison__compare-row"},[t[4]||(t[4]=a("div",{class:"product-comparison__skeleton-row-label"},null,-1)),a("div",{class:"product-comparison__compare-values",style:n(g.skeletonGridStyle)},[(r(!0),s(d,null,h(g.skeletonCount,(t=>(r(),s("div",{key:"skel-val-"+e+"-"+t,class:"product-comparison__skeleton-row-value"})))),128))],4)])))),128))],2),u.rows.length?(r(),s("div",{key:0,class:p(["product-comparison__compare-rows product-comparison__compare-rows--real",{"product-comparison__compare-rows--visible":!u.metafieldsLoading}])},[(r(!0),s(d,null,h(g.visibleRows,((e,t)=>(r(),s("div",{class:"product-comparison__compare-row",key:"row-"+t},[a("div",$h,m(e.label.toUpperCase()),1),a("div",{class:"product-comparison__compare-values",style:n(g.compareGridStyle)},[(r(!0),s(d,null,h(e.values,((e,t)=>(r(),s("div",{class:"product-comparison__compare-value gt-p__small",key:"val-"+t},m(e||"—"),1)))),128))],4)])))),128))],2)):u.loading||u.metafieldsLoading||!u.products.length?l("",!0):(r(),s("div",zh," No comparable fields found for the selected products. "))])])):l("",!0)])],4)}],["__file","ProductComparison.vue"]]);let Rh=null;async function Nh(){Rh||(Rh=async function(){var e;const t=null==(e=window.customerAccount)?void 0:e.apiEndpoint;if(t&&/\/customer\/api\/[^/]+\/graphql$/.test(t))return t;try{const e=await fetch(`${location.origin}/.well-known/customer-account-api`,{headers:{Accept:"application/json"}});if(!e.ok)return null;const t=await e.json();return(null==t?void 0:t.graphql_api)||null}catch(i){return console.warn("[CustomerAccount] Failed to discover API endpoint:",i),null}}());const e=await Rh;return e||(Rh=null),e}const Vh={class:"ada-validator-issue-list"},qh={key:0,class:"ada-validator-tab-empty-msg"},Uh=["onClick"],Gh=["src"],Wh={class:"ada-validator-meta"},Kh={class:"ada-validator-file-name"};const jh="ada-validator__anchor--issue",Qh="data-ada-validator-issue",Zh="Alt text attribute is empty.",Jh="Missing alt attribute.",Yh={class:"ada-validator-panel"},Xh={class:"ada-validator-panel-header"},ep=["aria-expanded","aria-label","innerHTML"],tp=["aria-hidden","inert"],ip={class:"ada-validator-expand-inner"},op={class:"ada-validator-count"},sp={key:0,class:"ada-validator-scanning",role:"status","aria-live":"polite"},rp={key:1},ap={key:2},np={key:3},lp={key:0,class:"ada-validator-issue-tabs"},dp={class:"ada-validator-tablist",role:"tablist","aria-label":"Alt issue categories"},cp=["aria-selected"],up=["aria-selected"],hp=["hidden"],pp=["hidden"],mp={key:1,class:"ada-validator-actions"};const gp=fe({name:"AdaValidator",components:{AdaValidatorIssueList:fe({name:"AdaValidatorIssueList",props:{rows:{type:Array,required:!0},variant:{type:String,required:!0,validator:e=>"empty"===e||"missing"===e}},emits:["select"],computed:{emptyMessage(){return"empty"===this.variant?"No empty alt issues.":"No missing alt attribute issues."},introText(){return"empty"===this.variant?"Please add alt text in Shopify's image editor for the following files.":"Please submit a bug ticket for dev to address the following files."}},methods:{onSelect(e){this.$emit("select",e)}}}
1,[["render",function(e,t,i,o,n,c){return r(),s("div",Vh,[0===i.rows.length?(r(),s("p",qh,m(c.emptyMessage),1)):(r(),s(d,{key:1},[a("p",{class:p({"ada-validator-please-add":"empty"===i.variant})},m(c.introText),3),(r(!0),s(d,null,h(i.rows,(e=>(r(),s("button",{key:e.id,type:"button",class:"ada-validator-row",onClick:u((t=>c.onSelect(e.id)),["stop"])},[a("img",{class:"ada-validator-thumb",src:e.src,width:"50",height:"50",alt:"","data-ada-validator-ignore":"1",loading:"lazy",decoding:"async"},null,8,Gh),a("div",Wh,[a("span",null,[t[0]||(t[0]=f("File: ",-1)),a("span",Kh,m(e.fileName),1)]),"missing"===i.variant?(r(),s(d,{key:0},[a("span",null,"Parent Element: "+m(e.parentHint),1),a("span",null,"Section: "+m(e.sectionHint),1)],64)):l("",!0),t[1]||(t[1]=a("span",{class:"ada-validator-hint"},"Click to scroll to section",-1))])],8,Uh)))),128))],64))])}],["__scopeId","data-v-78646b7e"],["__file","AdaValidatorIssueList.vue"]])},data:()=>({issues:[],issuesTab:"empty",overlaysVisible:!0,nextIssueId:1,panelExpanded:!0,scanComplete:!1}),computed:{panelToggleIconHtml(){return this.panelExpanded?'<svg\n  aria-hidden="true"\n  focusable="false"\n  role="presentation"\n  class="icon icon-close"\n  version="1.1"\n  baseProfile="tiny"\n  id="Layer_1"\n  xmlns="http://www.w3.org/2000/svg"\n  xmlns:xlink="http://www.w3.org/1999/xlink"\n  x="0px"\n  y="0px"\n  viewBox="0 0 9.9 9.9"\n  overflow="visible"\n  xml:space="preserve"\n>\n  <g><polygon fill="{{settings.header_icon_color}}" points="8.6,9.9 5,6.2 1.3,9.9 0,8.6 3.7,5 0,1.3 1.3,0 5,3.7 8.6,0 9.9,1.3 6.2,5 9.9,8.6 "/></g>\n</svg>\n':'<svg\n  aria-hidden="true"\n  focusable="false"\n  role="presentation"\n  class="icon icon-open"\n  version="1.1"\n  baseProfile="tiny"\n  id="Layer_1"\n  xmlns="http://www.w3.org/2000/svg"\n  xmlns:xlink="http://www.w3.org/1999/xlink"\n  x="0px"\n  y="0px"\n  viewBox="0 0 9.9 9.9"\n  overflow="visible"\n  xml:space="preserve"\n>\n  <path\n    d="M 1.35 6.75 L 4.95 2.35 L 8.55 6.75"\n    fill="none"\n    stroke="{{settings.header_icon_color}}"\n    stroke-width="1.25"\n    stroke-linecap="round"\n    stroke-linejoin="round"\n  />\n</svg>\n'},panelToggleAriaLabel(){return this.panelExpanded?"Collapse accessibility error details":"Expand accessibility error details"},issuesEmptyAlt(){return this.issues.filter((e=>e.reason===Zh))},issuesMissingAlt(){return this.issues.filter((e=>e.reason===Jh))}},mounted(){this.debouncedScan=this.debounce(this.runScan,400),this.debouncedMarkSettled=this.debounce((()=>{this.scanComplete=!0}),800),this.onDomChurn=()=>{this.debouncedScan(),this.debouncedMarkSettled()},this.$nextTick((()=>{window.setTimeout((()=>this.runScan()),0)})),document.addEventListener("shopify:section:load",this.onDomChurn),document.addEventListener("shopify:section:unload",this.onDomChurn),document.addEventListener("shopify:section:reorder",this.onDomChurn),window.addEventListener("load",this.onDomChurn),this.domObserver=new MutationObserver((()=>this.onDomChurn())),this.domObserver.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["src","srcset","alt"]}),this.debouncedMarkSettled()},beforeUnmount(){this.clearIssueMarkers(),this.domObserver&&(this.domObserver.disconnect(),this.domObserver=null),this.debouncedScan&&this.debouncedScan.cancel(),this.debouncedMarkSettled&&this.debouncedMarkSettled.cancel(),this.onDomChurn&&(document.removeEventListener("shopify:section:load",this.onDomChurn),document.removeEventListener("shopify:section:unload",this.onDomChurn),document.removeEventListener("shopify:section:reorder",this.onDomChurn),window.removeEventListener("load",this.onDomChurn))},methods:{debounce(e,t){let i;const o=()=>{clearTimeout(i),i=setTimeout((()=>e.call(this)),t)};return o.cancel=()=>{clearTimeout(i),i=null},o},isValidatorExcludedImg:e=>!!e.classList.contains("ada-validator-thumb")||("1"===e.getAttribute("data-ada-validator-ignore")||!!e.closest("#ada-validator-ui")),isInvalidImgAlt(e){if("presentation"===e.getAttribute("role"))return{invalid:!1};if(!e.hasAttribute("alt"))return{invalid:!0,reason:Jh};const t=e.getAttribute("alt");return null==t||""===t.trim()?{invalid:!0,reason:Zh}:{invalid:!1}},getAnchor(e){const t=e.closest("[data-block-id]")||e.closest('[id^="shopify-section-"]');if(!t)return null;const i=document.getElementById("ada-validator-ui");return i&&t.contains(i)?null:t},clearIssueMarkers(){document.querySelectorAll(`img[${Qh}]`).forEach((e=>{e.removeAttribute(Qh),e.classList.remove("ada-validator-img")}
1)),document.querySelectorAll("."+jh).forEach((e=>e.classList.remove(jh)))},clearHighlightVisualOnly(){document.querySelectorAll("."+jh).forEach((e=>e.classList.remove(jh))),document.querySelectorAll(`img[${Qh}]`).forEach((e=>e.classList.remove("ada-validator-img")))},applyHighlightVisual(){const e=new Set;document.querySelectorAll(`img[${Qh}]`).forEach((t=>{t.classList.add("ada-validator-img");const i=this.getAnchor(t);i&&!e.has(i)&&(e.add(i),i.classList.add(jh))}))},getValidatorUiRoot:()=>document.getElementById("ada-validator-ui"),getFlaggedImageDebugInfo(e,t,i){const o=e.currentSrc||e.src||"",s=e.closest('[id^="shopify-section-"]'),r=s?s.id:null;let a="";try{a=new URL(o,window.location.href).pathname.split("/").pop()||o}catch{a=o||"(no src)"}const n=e.parentElement;return{issueId:t,reason:i,fileName:a,src:o,parentHint:n?`${n.tagName.toLowerCase()}${n.id?"#"+n.id:""}${n.className&&String(n.className).trim()?"."+String(n.className).trim().split(/\s+/).slice(0,3).join("."):""}`:null,sectionHint:r}},runScan(){const e=this.getValidatorUiRoot();this.clearIssueMarkers(),this.nextIssueId=1;const t=[];document.querySelectorAll("img").forEach((i=>{if(e&&e.contains(i))return;if(this.isValidatorExcludedImg(i))return;const{invalid:o,reason:s}=this.isInvalidImgAlt(i);if(!o)return;const r=String(this.nextIssueId++);i.setAttribute(Qh,r);const a=this.getFlaggedImageDebugInfo(i,r,s||"Alt issue");t.push({id:a.issueId,src:a.src,reason:a.reason,parentHint:a.parentHint,sectionHint:a.sectionHint,fileName:a.fileName})})),this.issues=t,this.overlaysVisible&&this.applyHighlightVisual()},onRescan(){this.runScan(),this.scanComplete=!1},toggleOverlays(){this.overlaysVisible=!this.overlaysVisible,this.overlaysVisible?this.applyHighlightVisual():this.clearHighlightVisualOnly()},scrollToIssue(e){const t=document.querySelector(`img[${Qh}="${e}"]`);let i=null;if(t&&(i=this.getAnchor(t)||t.closest('[id^="shopify-section-"]')),!i){const t=this.issues.find((t=>String(t.id)===String(e))),o=t&&t.sectionHint?t.sectionHint:null;o&&(i=document.getElementById(o))}!i&&t&&(i=t),i?i.scrollIntoView({behavior:"smooth",block:"center"}):console.warn("[ADA Validator] no scroll target for issue id",e)},toggleModal(){this.panelExpanded=!this.panelExpanded},setIssuesTab(e){this.issuesTab=e}}},[["render",function(e,t,i,o,n,d){const h=c("AdaValidatorIssueList");return r(),k(E,{to:"body"},[a("div",{id:"ada-validator-ui",class:"ada-validator-app",role:"region","aria-label":"ADA validator theme editor tools",onMousedown:t[5]||(t[5]=u((()=>{}),["stop"])),onPointerdown:t[6]||(t[6]=u((()=>{}),["stop"])),onClick:t[7]||(t[7]=u((()=>{}),["stop"]))},[a("div",Yh,[a("div",Xh,[t[8]||(t[8]=a("span",{class:"ada-validator-title",id:"ada-validator-panel-title"},"Accessibility Checker",-1)),a("button",{type:"button",class:"ada-validator-icon","aria-controls":"ada-validator-panel-details","aria-expanded":n.panelExpanded,"aria-label":d.panelToggleAriaLabel,onClick:t[0]||(t[0]=u(((...e)=>d.toggleModal&&d.toggleModal(...e)),["stop"])),innerHTML:d.panelToggleIconHtml},null,8,ep)]),a("div",{id:"ada-validator-panel-details",class:p(["ada-validator-expand",{"ada-validator-expand--open":n.panelExpanded}]),role:"region","aria-labelledby":"ada-validator-panel-title","aria-hidden":!n.panelExpanded,inert:!n.panelExpanded},[a("div",ip,[a("div",op,[n.scanComplete?l("",!0):(r(),s("div",sp,[...t[9]||(t[9]=[a("span",{class:"ada-validator-scanning__glass"},[a("span",{class:"ada-validator-scanning__shimmer","aria-hidden":"true"}),a("span",{class:"ada-validator-scanning__label"},"Checking for Accessibility Errors"),a("span",{class:"ada-validator-scanning__dots","aria-hidden":"true"},[a("span",{class:"ada-validator-scanning__dot"}),a("span",{class:"ada-validator-scanning__dot"}),a("span",{class:"ada-validator-scanning__dot"})])],-1)])])),0===n.issues.length&&n.scanComplete?(r(),s("p",rp,"No alt text issues found.")):1===n.issues.length&&n.scanComplete?(r(),s("p",ap,"This page has 1 alt text issue.")):n.scanComplete?(r(),s("p",np,"This page has "+m(n.issues.length)+" alt text issues ("+m(d.issuesEmptyAlt.length)+" empty alt attributes, "+m(d.issuesMissingAlt.length)+" missing alt attributes).",1)):l("",!0)]),n.scanComplete&&n.issues.length?(r(),s("div",lp,[a("div",dp,[a("button",{type:"button",id:"ada-validator-tab-empty",class:"ada-validator-tab",role:"tab","aria-selected":"empty"===n.issuesTab,"aria-controls":"ada-validator-panel-empty",onClick:t[1]||(t[1]=u((e=>d.setIssuesTab("empty")),["stop"]))},"Empty Alt Text ("+m(d.issuesEmptyAlt.length)+")",9,cp),a("button",{type:"button",id:"ada-validator-tab-missing",class:"ada-validator-tab",role:"tab","aria-selected":"missing"===n.issuesTab,"aria-controls":"ada-validator-panel-missing",onClick:t[2]||(t[2]=u((e=>d.setIssuesTab("missing")),["stop"]))},"Dev Issues ("+m(d.issuesMissingAlt.length)+")",9,up)]),a("div",{id:"ada-validator-panel-empty",class:"ada-validator-tabpanel",role:"tabpanel","aria-labelledby":"ada-validator-tab-empty",hidden:"empty"!==n.issuesTab},[g(h,{variant:"empty",rows:d.issuesEmptyAlt,onSelect:d.scrollToIssue},null,8,["rows","onSelect"])],8,hp),a("div",{id:"ada-validator-panel-missing",class:"ada-validator-tabpanel",role:"tabpanel","aria-labelledby":"ada-validator-tab-missing",hidden:"missing"!==n.issuesTab},[g(h,{variant:"missing",rows:d.issuesMissingAlt,onSelect:d.scrollToIssue},null,8,["rows","onSelect"])],8,pp)])):l("",!0),n.scanComplete?(r(),s("div",mp,[a("button",{type:"button",class:"ada-validator-btn",onClick:t[3]||(t[3]=u(((...e)=>d.onRescan&&d.onRescan(...e)),["stop"]))},"Rescan page"),a("button",{type:"button",class:"ada-validator-btn ada-validator-btn--ghost",onClick:t[4]||(t[4]=u(((...e)=>d.toggleOverlays&&d.toggleOverlays(...e)),["stop"]))},m(n.overlaysVisible?"Hide overlay":"Show overlay"),1)])):l("",!0)])],10,tp)])],32)])}],["__scopeId","data-v-c8544feb"],["__file","AdaValidator.vue"]]),fp=q();(async()=>{const e=window.customerAccount,t=Tu(null==e?void 0:e.clientId)&&Tu(null==e?void 0:e.tokenEndpoint)&&Tu(null==e?void 0:e.authorizationEndpoint);var i;if(window.customerAccountEnabled&&window.isLoggedIn&&t)try{const t=await zu();if(!t)return void Xe();if(!window.b2bContextEnabled||!window.isB2B)return void Xe();let o=e.companyLocationId||null;o||(o=await async function(){var e,t,i,o,s,r,a,n,l;const d=await $u();if(!d)return null;const c=await Nh();if(!c)return null;try{const u=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${d}`},body:JSON.stringify({query:"query firstCompanyLocation {\n  customer {\n    companyContacts(first: 1) {\n      nodes {\n        company {\n          locations(first: 1) {\n            nodes { id }\n          }\n        }\n      }\n    }\n  }\n}"})});if(!u.ok)return null;const h=await u.json();return(null==(l=null==(n=null==(a=null==(r=null==(s=null==(o=null==(i=null==(t=null==(e=null==h?void 0:h.data)?void 0:e.customer)?void 0:t.companyContacts)?void 0:i.nodes)?void 0:o[0])?void 0:s.company)?void 0:r.locations)?void 0:a.nodes)?void 0:n[0])?void 0:l.id)||null}catch(u){return console.warn("[CustomerAccount] Failed to fetch first company location:",u),null}}()),i={customerAccessToken:t.access_token,...o?{companyLocationId:o}:{}}
1,Ze=i&&i.customerAccessToken?i:null,Je||(Je=!0,Qe(Ze))}catch(o){Xe()}else Xe()})(),window.setClientWidthClass&&!(null==(e=window.siteGlobals)?void 0:e.device)&&window.setClientWidthClass(),document.addEventListener("kameleoon:sdk:ready",(e=>{console.log("Vue heard kameleoon:sdk:ready event.",e.detail||{})})),document.getElementById("product-upsell-options")&&U(uu).mount("#product-upsell-options"),[...document.querySelectorAll(".pdp-section-refresh")].forEach((e=>{let t=e.getAttribute("id");U(_c).mount(`#${t}`)})),document.getElementById("PDPSetReminderDisplayLogic")&&U(Kc).mount("#PDPSetReminderDisplayLogic"),document.querySelectorAll('[id^="OpSetReminderDisplayLogic"]').forEach((e=>{e.__vue_app__||U(Kc).mount(`#${e.id}`)})),document.getElementById("ProductFamilyHelper")&&U(Gc).mount("#ProductFamilyHelper"),document.getElementById("HelpGuideSize")&&U(Gc).mount("#HelpGuideSize"),document.getElementById("sticky-PDPaddtocart")&&U(Sr).mount("#sticky-PDPaddtocart"),document.getElementById("PDPYotpoUGC")&&U(bc).mount("#PDPYotpoUGC"),document.getElementById("vue-zoom")&&U(yc).mount("#vue-zoom"),fp.on("variant-color-selected",(e=>{const t=document.querySelector(".product__compare-plp-link");if(!t||!e.pid)return;const i=t.dataset.compareCollectionUrl;if(!i)return;const o=new URL(i,window.location.origin);o.searchParams.set("compare_pid",e.pid),e.color&&o.searchParams.set("compare_color",e.color),t.href=o.toString()})),fp.on("start-full-pdp",(e=>{const t=document.getElementById("PDPImages");if(t){t.style.minHeight=t.offsetHeight+"px";const i={images:e.images,media:e.media,pid:e.pid};U(sn,i).mount("#PDPImages")}if(document.getElementById("CompleteTheLook")){const t={handle:e.handle,tags:e.tags,pid:e.pid};U(dc,t).mount("#CompleteTheLook")}if(document.getElementById("pdp-recommendations")){const t={pid:e.pid};U(xa,t).mount("#pdp-recommendations")}fp.off("start-full-pdp")})),document.getElementById("cart-recommendations")&&U(mu).mount("#cart-recommendations"),document.getElementById("live-search-fs")&&U(ca).mount("#live-search-fs"),document.getElementById("live-search-fs-mobile")&&U(ca).mount("#live-search-fs-mobile"),function(){const e=document.getElementById("fs-collection-see-more"),t=document.getElementById("fs-collection-endlessScroll");if(!e&&!t)return;const i=function(){var t;const i=document.documentElement;if(i.classList.contains("kam-plp-see-more"))return!0;if(i.classList.contains("kam-plp-endless-scroll"))return!1;const o=null==(t=window.theme)?void 0:t.kameleoonSeeMorePlpEnabled;return void 0!==o?o:"true"===(null==e?void 0:e.getAttribute("data-default-enabled"))}();if(i&&e)U(wa).mount("#fs-collection-see-more");else if(!i&&t){const e=t.getAttribute("data-trigger-distance"),i=t.getAttribute("data-loading-image");U(ma,{triggerDistance:e?parseInt(e):500,loadingImage:i||null}).mount("#fs-collection-endlessScroll")}}(),document.getElementById("fs-collection-filters")&&U(je).mount("#fs-collection-filters"),document.getElementById("fs-search-field")&&U(bo).mount("#fs-search-field"),document.getElementById("fs-collection-filter-buttons")&&U(wo).mount("#fs-collection-filter-buttons"),[...document.querySelectorAll(".pdp-badge-router")].forEach((e=>{let t=e.getAttribute("id");U(So).mount(`#${t}`)}));function wp(){[...document.querySelectorAll(".product-item-badge-router")].forEach((e=>{const t=e.getAttribute("id");U(Pc).mount(`#${t}`)}))}function yp(e){e.__vue_app__||U(wr).mount(e)}function vp(e){if(!e||"true"===e.dataset.ptgMounted)return;const t=e.getAttribute("id");t&&(e.dataset.ptgMounted="true",U(qc).mount(`#${t}`))}document.body.classList.contains("template-product")?window.addEventListener("theme:recent-products:added",(()=>{wp()})):wp(),document.getElementById("fs-collection-products")&&U(Qi).mount("#fs-collection-products"),document.getElementById("fs-collection-sorting")&&U(io).mount("#fs-collection-sorting"),document.getElementById("collection-grid-size")&&U(lo).mount("#collection-grid-size"),function(e){function t(){if(vu)return!0;return!!document.getElementById("product-families-json-data")&&(gu||function(){try{const e=document.getElementById("product-families-json-data");if(gu="true"===(null==e?void 0:e.dataset.speedTracking),gu){const e=performance.getEntriesByType("navigation")[0];if(e){fu=0,"loading"!==document.readyState?wu=e.domContentLoadedEventEnd||0:document.addEventListener("DOMContentLoaded",(()=>{const e=performance.getEntriesByType("navigation")[0];wu=(null==e?void 0:e.domContentLoadedEventEnd)||performance.now()}));const t=e.domInteractive||0,i=e.domContentLoadedEventEnd||0,o=e.loadEventEnd||0,s=e.responseStart||0,r=e.responseEnd||0;console.log("[Plytix Speed] 📊 Page Performance Metrics:"),console.log(`[Plytix Speed] Response Start: ${s.toFixed(2)}ms`),console.log(`[Plytix Speed] Response End: ${r.toFixed(2)}ms`),t>0&&console.log(`[Plytix Speed] DOM Interactive: ${t.toFixed(2)}ms`),i>0&&console.log(`[Plytix Speed] DOMContentLoaded: ${i.toFixed(2)}ms`),o>0&&console.log(`[Plytix Speed] Load Event: ${o.toFixed(2)}ms`)}}}catch(e){console.error("Error initializing page speed tracking:",e)}}(),"loading"===document.readyState?document.hasAttribute("data-plytix-listener-added")||(document.setAttribute("data-plytix-listener-added","true"),document.addEventListener("DOMContentLoaded",bu)):bu(),!0)}e&&(window.emitter=e),yu||(yu=!0,t()||"loading"===document.readyState&&document.addEventListener("DOMContentLoaded",t))}(fp),[...document.querySelectorAll(".color-variant-options")].forEac
1h((e=>{let t=e.getAttribute("id");U(Bs).mount(`#${t}`)})),[...document.querySelectorAll(".size-variant-options")].forEach((e=>{let t=e.getAttribute("id");U(Gs).mount(`#${t}`)})),[...document.querySelectorAll(".width-variant-options")].forEach((e=>{let t=e.getAttribute("id");U(Xs).mount(`#${t}`)})),document.getElementById("OutfitPicker")&&U(pu).mount("#OutfitPicker"),[...document.querySelectorAll(".PDPaddToCart")].forEach(yp),document.addEventListener("theme:quickview:loaded",(()=>{document.querySelectorAll(".PDPaddToCart").forEach(yp);const e=document.getElementById("QuickviewSetReminderDisplayLogic");e&&!e.__vue_app__&&U(Kc).mount("#QuickviewSetReminderDisplayLogic")})),[...document.querySelectorAll(".PDPinventory")].forEach((e=>{let t=e.getAttribute("id");U(Ar).mount(`#${t}`)})),[...document.querySelectorAll(".PDPPriceBlock")].forEach((e=>{let t=e.getAttribute("id");U(Fr).mount(`#${t}`)})),[...document.querySelectorAll(".fs-collection-slider")].forEach((e=>{let t=e.getAttribute("id");U(zc).mount(`#${t}`)})),[...document.querySelectorAll(".fs-collection-split")].forEach((e=>{let t=e.getAttribute("id");U(Hc).mount(`#${t}`)})),window.mountProductTileGroup=vp,function(){const e=[...document.querySelectorAll(".product-tile-group")];if(!e.length)return;if("undefined"==typeof IntersectionObserver)return void e.forEach(vp);const t=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(vp(e.target),t.unobserve(e.target))}))}),{rootMargin:"300px"});e.forEach((e=>t.observe(e)))}(),(null==(t=window.Shopify)?void 0:t.designMode)&&document.addEventListener("shopify:section:load",(e=>{[...e.target.querySelectorAll(".product-tile-group")].forEach(vp)})),document.getElementById("product-comparison")&&U(Hh).mount("#product-comparison");document.getElementById("ada-validator-root")&&U(gp).mount("#ada-validator-root"),(null==(i=window.Shopify)?void 0:i.designMode)&&document.addEventListener("shopify:section:load",(e=>{e.target.querySelector("#product-comparison")&&U(Hh).mount("#product-comparison")})),"undefined"!=typeof window&&(function(){if("undefined"==typeof window)return;let e="";try{e=localStorage.getItem(Ku)||""}catch(i){return}if("1"!==e)return;let t=null;try{t=localStorage.getItem(ju),localStorage.removeItem(Ku),localStorage.removeItem(ju)}catch(i){}if("true"===t||"false"===t){try{sessionStorage.setItem(Gu,t)}catch(i){}yh()}}(),window.__customerAccountCookieOAuth={setCookieOptInMetafield:_h,persistCustomerAccountTokens:fh,clearCustomerAccountSession:wh,getCustomerAccountClientId:hh,getCustomerAccountApiEndpoint:ph,startCustomerAccountOAuth:yh,tryFinishPendingCookieOptIn:Ph,refreshCustomerAccountAccessToken:bh,CA_ERROR_MISSING_ACCESS_TOKEN:Zu,EVENT_CUSTOMER_ACCOUNT_PENDING_COOKIE_OPT_IN:Qu},"undefined"!=typeof document&&function(){const e=()=>{Ph()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e(),window.addEventListener("load",e,{once:!0})}()),console.log("gm.js v2.4.4 loaded");
2//# sourceMappingURL=gm.js.map?v=c86ddf0e74e7

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.