1import{O as ae,bz as W,A as a,bd as oe,be as se,bo as p,ec as T,ed as ie,ee as ne,ef as V,eg as re,eh as le,ei as q,cD as H,ej as ue,N as ce,d as N,L as de,T as h,X as L,W as x,u as i,a5 as S,ac as $,M as D,o as v,a7 as I,$ as w,bO as fe,bP as ve,al as me,bk as ge,y as pe,K as he,ek as be,a0 as ye,c as F,a3 as M,a2 as we,a9 as Se}from"./6cw9AFkX.js";import{N as ke}from"./C60olaPs.js";import{a as Ce,I as j,S as G}from"./BDIbgz-N.js";import{_ as Oe}from"./BHGhIZ1Q.js";import Be from"./RXyYf_MD.js";import{_ as Ie}from"./BmWoUrN8.js";function We(t){const e=ce(t),n=oe(se),{getProductDetailRoute:l}=ae(),{t:r}=W(),d=a(()=>p(e.value?.attributes,"brandB2C")?.label??""),o=a(()=>p(e.value?.attributes,"name")?.label??""),c=a(()=>{if(e.value?.advancedAttributes?.shortDescription)return T({product:e.value,property:"shortDescription"})[0]}),m=a(()=>p(e.value?.attributes,"filterColor")?.label??""),k=a(()=>e.value&&T({product:e.value,property:"longDescription"})?.[0]||""),C=a(()=>e.value?.priceRange?.min||void 0),b=a(()=>ie(R.value)),u=a(()=>b.value?.lowestPriorPrice),O=a(()=>e.value?ne(e.value,"color"):void 0),P=a(()=>n?.value?.shopCustomData?.defaultPDPViewType?n.value.shopCustomData.defaultPDPViewType.split(";").reduce((f,g,B)=>(f[g]=B,f),{}):{}),A=a(()=>{const f=P.value;return e.value?.images?Object.keys(f).length?e.value.images.filter(g=>{const B=p(g.attributes,"assetName")?.label;return B&&B in f}).sort((g,B)=>{const ee=p(g.attributes,"assetName")?.label??"",te=p(B.attributes,"assetName")?.label??"";return(f[ee]??0)-(f[te]??0)}):V(e.value.images):[]}),E=a(()=>e.value?V(e.value.images):[]),s=a(()=>{if(e.value)return re(e.value.images)}),y=a(()=>{if(e.value)return le(e.value.images)}),z=a(()=>q(e.value,"colorBase",{sortBySoldOut:!0})),_=a(()=>q(e.value,"filterColor",{omitSoldOut:!0})),U=a(()=>e.value?l(e.value.id,o.value):void 0),K=a(()=>e.value?.categories?.[0]?.at(-1)),Q=a(()=>r("product_image.alt.pdp",{brand:d.value,category:K.value?.categoryName,color:m.value,name:c.value??o.value})),X=a(()=>!e.value||!e.value.categories||e.value.categories.length===0?[]:e.value.categories.reduce((f,g)=>g.length>f.length?g:f,[])),R=a(()=>e.value?H(e.value)||[]:[]),Y=a(()=>R.value.length===1),J=a(()=>ue(e.value)),Z=a(()=>p(e.value?.attributes,"comingSoon")?.value==="true");return{alt:Q,brand:d,name:o,description:k,price:C,lowestPriorPrice:u,colors:O,image:s,images:E,imagesPdpSorted:A,siblings:z,nonSoldOutSiblings:_,link:U,variantWithLowestPrice:b,longestCategoryList:X,variants:R,hasOneVariantOnly:Y,hoverImage:y,colorName:m,shortDescription:c,isGiftCard:J,isComingSoon:Z}}const Pe={key:0,class:"absolute inset-0 flex items-center justify-center z-[1]","data-testid":"product-image-loader"},ze=N({__name:"ProductImage",props:{image:{},sizes:{default:""},fit:{default:"contain"},alt:{default:void 0},imageLoading:{default:"lazy"},preload:{type:Boolean,default:!1},quality:{default:Number(Ce)},load:{type:Function,default:()=>{}},shouldTrim:{type:Boolean,default:!1},isCentered:{type:Boolean,default:!1},withMixBlendDarken:{type:Boolean,default:!1},height:{default:void 0},width:{default:void 0},aspectRatio:{default:"5/7"},withWhiteSpaces:{type:Boolean,default:!1},cardSize:{default:"1x"},crop:{type:Boolean,default:void 0},showLoader:{type:Boolean,default:!1},fadeInOnLoad:{type:Boolean,default:!1}},setup(t){const e=t,n=D(),l=D(),r=()=>{n.value=!1,e.load()},d=a(()=>{const o={format:j};return e.quality!==void 0&&(o.qlt=e.quality),e.cardSize&&(o.cardSize=e.cardSize),e.shouldTrim&&(o.trim=1),e.withWhiteSpaces||(o.scale=G.clamp),e.crop&&(o.scale=G.crop,o.aspectRatio=e.aspectRatio),o});return de(()=>{const o=l.value?.$el?.querySelector("img");if(o?.complete&&o.naturalWidth>0){r();return}n.value===void 0&&(n.value=!0)}),(o,c)=>{const m=ke;return v(),h("div",{class:S(["relative",{"size-full":i(n)}])},[L(i(Oe),{duration:200},{default:x(()=>[t.showLoader&&i(n)?(v(),h("div",Pe,[...c[0]||(c[0]=[I("div",{class:"animate-spin rounded-full w-10 max-w-[50%] aspect-square border-2 border-b-transparent border-black/50"},null,-1)])])):w("",!0)]),_:1}),L(m,{ref_key:"pictureRef",ref:l,alt:t.alt||"product image",quality:t.quality,sizes:t.sizes,modifiers:i(d),format:"IMAGE_FORMAT_MODIFIER"in o?o.IMAGE_FORMAT_MODIFIER:i(j),height:t.height,width:t.width,densities:"x1 x2",src:t.image?.hash,loading:t.imageLoading,preload:t.preload?{fetchPriority:"high"}:!1,class:S([{"picture-contain":t.fit==="contain","picture-cover":t.fit==="cover","m-auto h-[90%]":t.isCentered,"aspect-square":t.aspectRatio==="1/1","aspect-4/3":t.aspectRatio==="4/3","aspect-3/4":t.aspectRatio==="3/4","aspect-video":t.aspectRatio==="16/9","aspect-[5/7]":t.aspectRatio==="5/7","mix-blend-darken":t.withMixBlendDarken,"opacity-0":i(n)&&t.fadeInOnLoad,"opacity-100":!i(n)&&t.fadeInOnLoad,"transition-opacity duration-300":t.fadeInOnLoad},"picture block bg-neutral-25"]),provider:"soliver","data-testid":"product-image",onLoad:r},null,8,["alt","quality","sizes","modifiers","format","height","width","src","loading","preload","class"]),$(o.$slots,"default")],2)}}}
1),He=Object.assign(ze,{__name:"ProductImage"}),xe={class:"flex size-full items-center justify-center"},Ae={key:0,class:"absolute size-4 -top-4 left-1/2 -translate-x-1/2 overflow-hidden before:content-[''] before:absolute before:size-3 before:rotate-45 before:top-2.5 before:left-1/2 before:bg-neutral-25 before:-translate-x-1/2"},Me=N({__name:"Popover",props:{isOpen:{type:Boolean,default:!1},disablePopoverContent:{type:Boolean,default:!1},contentWrapperClass:{default:""},flyoutClass:{default:""},showArrow:{type:Boolean,default:!1},transitionDuration:{default:200},transitionEasing:{default:"ease-in-out"}},emits:["mouseenter","mouseleave"],setup(t,{emit:e}){const n=e;return(l,r)=>(v(),h("div",{class:S(["relative h-full",{"z-50":t.isOpen}]),onMouseenter:r[0]||(r[0]=d=>n("mouseenter")),onMouseleave:r[1]||(r[1]=d=>n("mouseleave"))},[I("div",xe,[$(l.$slots,"action")]),L(i(Ie),{duration:t.transitionDuration,easing:t.transitionEasing},{default:x(()=>[fe(I("div",{class:S(["absolute right-0 z-30 min-w-max overflow-hidden",t.flyoutClass])},[I("div",{class:S(["relative border border-black bg-white",t.contentWrapperClass])},[t.showArrow?(v(),h("div",Ae)):w("",!0),$(l.$slots,"content")],2)],2),[[ve,!t.disablePopoverContent&&t.isOpen]])]),_:3},8,["duration","easing"])],34))}});function _e(t){const e=me(`global-size-selector-sheet-${t}`,()=>({activeVariant:void 0,product:void 0,showAddToCart:!0,showColors:!1,updateOnClick:!1,showSwatches:!1,promotion:void 0,isEditProduct:!1,originalBasketItem:void 0})),{toggle:n,close:l,isOpen:r,updateOnClose:d}=ge(t),o=(s,y,z)=>{z||(e.value.isEditProduct=!1,e.value.originalBasketItem=void 0),n(s,y)},c=s=>{e.value.activeVariant=s},m=(s,y)=>{if(s){const z=y?be(s):H(s);return e.value.product={...s,variants:z}}return e.value.product=s},k=s=>{e.value.showAddToCart=s},C=s=>{e.value.showColors=s},b=s=>{e.value.showSwatches=s},u=s=>{e.value.updateOnClick=s},O=s=>{e.value.promotion=s},P=(s,y)=>{e.value.isEditProduct=s,e.value.originalBasketItem=y},A=()=>{e.value={product:void 0,activeVariant:void 0,showAddToCart:!0,showColors:!1,showSwatches:!1,updateOnClick:!1,promotion:void 0,isEditProduct:!1,originalBasketItem:void 0}},E=pe();return he(()=>E.path,()=>{l()}),{activeVariant:a(()=>e.value.activeVariant),product:a(()=>e.value.product),showAddToCart:a(()=>e.value.showAddToCart),showColors:a(()=>e.value.showColors),showSwatches:a(()=>e.value.showSwatches),updateOnClick:a(()=>e.value.updateOnClick),promotion:a(()=>e.value.promotion),isEditProduct:a(()=>e.value.isEditProduct),originalBasketItem:a(()=>e.value.originalBasketItem),isOpen:r,setActiveVariant:c,setProduct:m,setShowAddToCart:k,setShowColors:C,setShowSwatches:b,setUpdateOnClick:u,setPromotion:O,setEditMode:P,resetState:A,toggleSizeSelector:o,closeSizeSelector:l,updateOnClose:d}}const Le={class:"relative z-10 min-w-4 min-h-4 group-active/button:scale-90 transition-transform flex flex-wrap gap-0.5 items-center justify-center"},Ee={key:1,class:"ml-1 size-2 bg-orange rounded-full"},Re={key:0,class:"sr-only"},$e={key:1,class:"sr-only"},De={key:0,class:"z-1 px-3 py-2 text-2xs bg-neutral-25 whitespace-nowrap"},Ne=N({__name:"SizeButton",props:{variant:{},isSelected:{type:Boolean,default:!1},uppercase:{type:Boolean,default:!1},additionalClasses:{default:""},accessibilityLabel:{default:""},disableOutOfStockBehavior:{type:Boolean,default:!1},isComingSoon:{type:Boolean,default:!1}},emits:["click"],setup(t){const e=t,{smaller:n}=ye(),{t:l}=W(),r=D(!1),d=n("md"),o=a(()=>{if(e.isComingSoon)return!1;const u=e.variant.stock?.quantity??0;return u>0&&u<=5}),c=a(()=>e.disableOutOfStockBehavior?!1:(e.variant.stock?.quantity??0)===0),m=a(()=>o.value&&r.value),k=()=>{r.value=!0},C=a(()=>p(e.variant.attributes,"size")?.label??l("filter.size")),b=()=>{r.value=!1};return(u,O)=>{const P=Be;return v(),F(i(Me),{"show-arrow":"","is-open":i(m)&&!i(d),"content-wrapper-class":"mt-2 relative border-0","flyout-class":"left-1/2 transform -translate-x-1/2",onMouseenter:k,onMouseleave:b},{action:x(()=>[L(i(Se),{size:"xs",inverted:"",type:"raw",class:S(["flex !items-center justify-center group/button bg-transparent hover:bg-neutral-800/5 w-full min-h-7 min-w-16 px-2 py-1 text-sm border-0 box-border relative isolate overflow-hidden transition-colors",[{"!text-gray-60 line-through":i(c),uppercase:t.uppercase},t.additionalClasses]]),accessibility:i(C),onClick:O[0]||(O[0]=A=>u.$emit("click",t.variant)),onMouseenter:k,onMouseleave:b},{default:x(()=>[I("div",Le,[we(M(i(C))+" ",1),i(c)||t.isComingSoon?(v(),F(P,{key:0,class:"size-[15px] text-gray-60"})):w("",!0),i(o)?(v(),h("div",Ee)):w("",!0)]),i(c)?(v(),h("span",Re,M(u.$t("basket.notification.add_to_basket_variant_out_of_stock_error")),1)):w("",!0),i(o)?(v(),h("span",$e,M(u.$t("pdp.size_low_in_stock",{quantity:t.variant.stock?.quantity??0})),1)):w("",!0),I("div",{class:S(["absolute bottom-0 left-1/2 -translate-x-1/2 transition-all duration-300 ease-in-out",{"size-full bg-transparent border border-black":t.isSelected,"w-0 h-px":!t.isSelected}])},null,2)]),_:1},8,["class","accessibility"])]),content:x(()=>[i(o)?(v(),h("div",De,M(u.$t("pdp.size_low_in_stock",{quantity:t.variant.stock?.quantity??0})),1)):w("",!0)]),_:1},8,["is-open"])}}}),Ue=Object.assign(Ne,{__name:"SizeButton"});export{He as _,_e as a,Ue as b,We as u};
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.