"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[15],{68:(e,r,a)=>{a.d(r,{a:()=>L});var s=a(0),i=a(1),l=a(2),o=a(39),n=a(369),t=a(10);const{wrapper:c,wrapperColorTileOutfit:u,wrapperColorTile:d,circle:p,circleOutfit:b,circleInput:v,active:w,activeOutfit:C,wrapperColors:j,wrapperColorsOutfit:m,crossLine:f,crossLineOutfit:N,color:g,colorColorOutfit:h,circleActive:x,wrapperPrice:O,wrapperPriceRed:k,wrapperNewColor:y,wrapperNewColorGrey:S,wrapperNewColorValid:z,wrapperColorsNewColor:P,wrapperColorsQuickAdd:V}=t.a,L=({currentVariant:e,currentColor:r,colors:a,variants:t,ref:L,onChangeHandler:D,currency:$,isDiscounted:E,showPrice:F,isOutfit:I,isNewColorLabelEnabled:A,PDPNewColorVariantColor:M,isQuickAddModal:B,unavailableColorsBySize:K})=>{const Q=r.replace("/"," "),T=(0,l.useMemo)((()=>((e,r,a)=>{var s,i,l,n;const t=e.map((e=>e.colorName)),c=r.filter((e=>{var r;const[a,s]=(0,o.b)(e.optionMap),i=null!==(r=null==s?void 0:s.replace("/"," "))&&void 0!==r?r:"";if(t.includes(i))return e})),u=null!==(s=c.filter((e=>{if(e.id===a.id)return e})))&&void 0!==s?s:[],d=null!==(l=null===(i=c[0])||void 0===i?void 0:i.priceV2.amount)&&void 0!==l?l:"";return(null===(n=u[0])||void 0===n?void 0:n.priceV2.amount)||d})(a,t,e)),[e.id]),G="gray"===M,H=e=>{e.stopPropagation(),D(e)};return(0,s.jsx)(i.Fragment,{children:a.length>0&&(0,s.jsxs)("div",Object.assign({ref:L,className:c},{children:[F&&(0,s.jsxs)("span",Object.assign({className:(0,n.b)(O,E&&k)},{children:[$,T]})),(0,s.jsx)("div",Object.assign({className:(0,n.b)(j,I&&m,A&&P,B&&V)},{children:a.map((({colorUrl:e,colorName:r,isValid:a,availableForSale:l,newColor:o,newColorLabel:t})=>{var c;const j=A&&o&&l,m=null!==(c=null==K?void 0:K.includes(r))&&void 0!==c&&c,O=!l||m;return(0,s.jsxs)("div",Object.assign({className:(0,n.b)(d,I&&u)},{children:[(0,s.jsxs)("label",{children:[a?(0,s.jsx)(i.Fragment,{children:(0,s.jsxs)("div",Object.assign({className:(0,n.b)(I?(0,n.b)(g,h):g,r===Q&&I?(0,n.b)(w,C):r===Q?w:"")},{children:[O&&(0,s.jsx)("span",{className:(0,n.b)(f,I&&N)}),(0,s.jsx)("img",{src:e,alt:r,className:(0,n.b)(I?(0,n.b)(p,b):p,r===Q&&x)})]}))}):(0,s.jsx)("div",Object.assign({style:`background: ${e}`,className:(0,n.b)(g,I?(0,n.b)(p,b):p,r===Q&&I?(0,n.b)(w,C):r===Q?w:"")},{children:O&&(0,s.jsx)("span",{className:(0,n.b)(f,I&&N)})})),(0,s.jsx)("input",{name:"colorPick",value:r,type:"radio",onChange:H,className:`${p} ${v}`})]}),j&&(0,s.jsx)("span",Object.assign({className:(0,n.b)(y,G&&S,!a&&z)},{children:null!=t?t:"New"}))]}),e)}))}))]}))})}},95:(e,r,a)=>{a.d(r,{a:()=>p});var s=a(0),i=a(1),l=a(2),o=a(369),n=a(11);const{wrapper:t,active:c,disabled:u,wrapperOutfit:d}=n.a,p=({actualSize:e,sizeLabel:r,unavailableSizes:a,setCurrentVariantBySize:n,isOutfit:p,sizesNotExistInCurrentVariant:b,setCurrentSize:v})=>{const[w,C]=(0,l.useState)(!1);(0,l.useEffect)((()=>{if(e.toLowerCase()===r.toLowerCase())return C(!0);C(!1)}),[e,r]);const j=()=>{(null==b?void 0:b.includes(r))||n(r),v&&v(r)},m=e=>{e.stopPropagation(),e.preventDefault(),j()},f=e=>{"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),e.stopPropagation(),j())},N=a.includes(r);return(0,s.jsx)(i.Fragment,{children:N?(0,s.jsx)("div",Object.assign({role:"button",tabIndex:0,"aria-pressed":!1,"aria-disabled":!0,"aria-label":`Size ${r}, out of stock`,className:(0,o.b)(p?(0,o.b)(d,t):t,u,w?c:""),onClick:m,onKeyDown:f},{children:r})):(0,s.jsx)("div",Object.assign({role:"button",tabIndex:0,"aria-pressed":w,"aria-label":`Size ${r}`,onClick:m,onKeyDown:f,className:w?(0,o.b)(p?(0,o.b)(t,d):t,c):(0,o.b)(p?(0,o.b)(t,d):t)},{children:r}))})}}}]);