"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[11],{30:(e,s,r)=>{r.d(s,{a:()=>O});var a=r(0),l=r(1),t=r(146),o=r(31),i=r(2),c=r(73);const{wrapper:n,wrapperBottomFooter:d,wrapperBottom:u,wrapperBottomHeading:h,wrapperBottomTitle:p,wrapperBottomSubtitle:b,wrapperBottomPrice:m,wrapperLink:j,wrapperImg:P}=o.a,g=({product:e,currencySymbol:s,isPickerHoverDisabled:r,colorLabel:o,colorsLabel:g})=>{const{currentProduct:x,currentVariant:v,isCarousel:k,colorPickerContainerRef:S,isPickerOpen:C,formattedTitle:f,otherColorsProducts:N,handleActiveProductChange:O,handlePickerState:w,handleMouseEnter:T,handleMouseLeave:L}=((e,s)=>{const[r,a]=(0,i.useState)(""),[l,t]=(0,i.useState)(s),o=(0,i.useMemo)((()=>{if(""===r)return e[0];const s=e.findIndex((({handle:e})=>e===r));return-1===s?e[0]:e[s]}),[r,e.length]),{colorPickerContainerRef:n,isCarousel:d}=(0,c.b)(o.otherColorsProducts.length),u=(0,i.useCallback)(((e,r)=>{s||(r&&r.preventDefault(),t(e))}),[s]),h=(e=>""===e.selectedValues.color?e.title.replace(e.selectedValues.brand,"").trim():e.title.replace(` - ${e.selectedValues.colorName}`,"").replace(e.selectedValues.brand,"").trim())(o),{variants:p}=o,b=p[0],m=(0,i.useCallback)((e=>{s||u(!0,e)}),[s]),j=(0,i.useCallback)((e=>{s||u(!1,e)}),[s]),P=e.map((({handle:e,selectedValues:s})=>({handle:e,color:s.color,colorName:s.colorName,status:""})));return{handleActiveProductChange:(e,s)=>{s&&s.preventDefault(),a(e)},handlePickerState:u,handleMouseEnter:m,handleMouseLeave:j,isPickerOpen:l,currentProduct:o,formattedTitle:h,currentVariant:b,otherColorsProducts:P,colorPickerContainerRef:n,isCarousel:d}})(e,r),{handle:D,image:{url:M,altText:y},selectedValues:R,compareAtPrice:V}=x;return x?(0,a.jsx)("a",Object.assign({className:j,href:`/products/${D}?variant=${v.id}`},{children:(0,a.jsxs)("div",Object.assign({className:n,onMouseEnter:T,onMouseLeave:L},{children:[(0,a.jsx)("div",Object.assign({className:P},{children:(0,a.jsx)("img",{src:M,alt:y})})),(0,a.jsxs)("div",Object.assign({className:u},{children:[(0,a.jsxs)("div",Object.assign({className:h},{children:[(0,a.jsx)("p",Object.assign({className:p},{children:R.brand})),(0,a.jsxs)("p",Object.assign({className:b},{children:[(0,a.jsx)("span",{children:f}),` | ${R.color} `,(0,a.jsx)("span",{children:" "})]}))]})),(0,a.jsxs)("div",Object.assign({className:d,ref:S},{children:[(0,a.jsx)("div",{children:(0,a.jsx)(t.a,{handlePickerState:w,isCarousel:k,isPickerOpen:C,selectedProduct:D,toggleColorPicker:O,values:N,colorsLabel:g,colorLabel:o,showsInitialThreeColors:!1})}),(0,a.jsx)("p",Object.assign({className:m},{children:`${s}${V}`}))]}))]}))]}))})):(0,a.jsx)(l.Fragment,{})};var x=r(145),v=r(21),k=r(270),S=r(32);const{wrapper:C,wrapperSlider:f,wrapperMaxWidth:N}=S.a,O=({currencySymbol:e,subtitle:s,isPickerHoverDisabled:r,leftUpsellProductsHandles:l,title:t,upsellProducts:o,hasMaxWidth:i=!1,colorLabel:c,colorsLabel:n})=>{const{jsDisabled:d,lazyRelatedProducts:u,goToNextSlide:h,handleGoToPreviousSlide:p,mainSliderRef:b}=function(e,s){const{handleGoToNextSlide:r,handleGoToPreviousSlide:a,jsDisabled:l,mainSliderRef:t}=(0,x.a)(e.length);return{lazyRelatedProducts:e,jsDisabled:l,goToNextSlide:e=>{r(e)},handleGoToPreviousSlide:a,mainSliderRef:t}}(o),m=1===u.length?"noJsForOneSlideCarousel":"noJsForUpsellCarouselDesktop";return(0,a.jsxs)("section",Object.assign({className:(0,k.a)(C,d&&m,i&&N)},{children:[(0,a.jsx)(v.a,{handleGoToNextSlide:h,handleGoToPrevSlide:p,subtitle:s,title:t}),(0,a.jsx)("div",Object.assign({ref:b,className:`keen-slider upsellSliderDesktop ${f}`},{children:u.map(((s,l)=>(0,a.jsx)("div",Object.assign({className:"keen-slider__slide"},{children:(0,a.jsx)(g,{currencySymbol:e,isPickerHoverDisabled:r,product:s,colorLabel:c,colorsLabel:n})}),s[0].image.url+l)))}))]}))}}}]);