"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[14],{58:(e,a,r)=>{r.d(a,{a:()=>S});var t=r(0),i=r(21),n=r(2),s=r(5),o=r(4),l=r(32),c=r(25),d=r(10),p=r(22),u=r(37),h=r(3),x=r(29),m=r(6);function v({disruptor:e}){var a;return(0,t.jsxs)("div",{class:x.a.card,style:{color:e.text_color},children:[(0,t.jsx)(g,{media:e.media}),(0,t.jsx)("div",{class:x.a.title,dangerouslySetInnerHTML:{__html:e.title}}),(0,t.jsx)("div",{class:x.a.body,dangerouslySetInnerHTML:{__html:null!==(a=e.body_text)&&void 0!==a?a:""}}),(0,t.jsx)(f,{disruptor:e})]})}function g({media:e}){var a;const r=null===(a=(0,m.a)(e))||void 0===a?void 0:a.url;if(r){const e={"background-image":`url(${r});`};return(0,t.jsx)("div",{class:x.a.media,style:e})}return"video"===e.type&&e.sources.length>0?(0,t.jsx)("div",{class:x.a.media,children:(0,t.jsx)("video",{loop:!0,autoplay:!0,playsinline:!0,muted:!0,children:e.sources.map((e=>(0,t.jsx)("source",{src:e.url,type:e.mimeType})))})}):(0,t.jsx)(h.Fragment,{})}function f({disruptor:e}){var a;return e.cta_url?(0,t.jsx)("a",{href:e.cta_url,children:null!==(a=e.cta_label)&&void 0!==a?a:"Shop Now"}):(0,t.jsx)(h.Fragment,{})}var j=r(92),_=r(30);function b(e){const a=Math.round(2*e)/2;return Array.from({length:5},((e,r)=>{const i=r+1,n=`star-${r}`;return i<=a?(0,t.jsx)("span",{className:_.a.star,children:"★"},n):i-.5===a?(0,t.jsxs)("span",{className:_.a.starContainer,children:[(0,t.jsx)("span",{className:_.a.starEmpty,children:"★"}),(0,t.jsx)("span",{className:_.a.starHalf,children:"★"})]},n):(0,t.jsx)("span",{className:_.a.starEmpty,children:"★"},n)}))}function w({reviewCount:e,reviewRating:a}){return(0,o.c)((e=>e.showStars))&&e&&a?(0,t.jsxs)("div",{class:_.a.cardReviews,children:[(0,t.jsxs)("span",{class:_.a.reviewStars,children:[b(a)," ",a.toFixed(1)]})," ",(0,t.jsxs)("span",{class:_.a.reviewCountParenthesized,children:["(",e,")"]})]}):(0,t.jsx)(t.Fragment,{})}var P=r(44);function S({product:e,collectionHandle:a,replaceStateEnabled:r}){return(null==e?void 0:e.handle)?"type"in(i=e)&&"disruptor"===i.type?(0,t.jsx)(v,{disruptor:e}):(0,t.jsx)(C,{product:e,collectionHandle:a,replaceStateEnabled:r}):null;var i}function C({product:e,collectionHandle:a,replaceStateEnabled:r}){const{getHexForOptionColor:h,findProductVariantWithOption:x,EXCLUDE_TAGS:m,promo_prefix_tag:v,product_image_height:g,product_image_width:f,disable_color_swatches:_,showVendor:b}=(0,o.c)((e=>({getHexForOptionColor:e.getHexForOptionColor,findProductVariantWithOption:e.findProductVariantWithOption,EXCLUDE_TAGS:e.config.exclude_tags,promo_prefix_tag:e.config.promo_prefix_tag,product_image_width:e.config.product_image_width,product_image_height:e.config.product_image_height,disable_color_swatches:e.config.disable_color_swatches,showVendor:e.showVendor}))),S=e.options.find((e=>"Color"===e.name)),{pricePrefix:C,priceText:y,showCompareAtPrice:A,onSaleDataAttribute:I,compareAtPriceRange:O}=function(e){const a=e.compareAtRange;if(e.priceTextOverride)return{priceText:e.priceTextOverride,showCompareAtPrice:!1,onSaleDataAttribute:{},compareAtPriceRange:a};const{minPrice:r,maxPrice:t}=e.priceRange,i=r!==t?"From ":"",n=`$${(0,d.c)(r)}`,s=a.maxPrice&&a.maxPrice>r,o=a.maxPrice&&ra.variantId===e.defaultVariantId)),[F,V]=(0,n.useState)(null!=T?T:e.variants[0]),H=(0,c.a)(e.imageMap,F)[0],N=(0,u.b)(e,F);if(!H)return null;const E=(0,n.useMemo)((()=>{var a,r,t,i;const n=null!==(a=F.tags)&&void 0!==a?a:[],s=[...null!==(r=e.tags)&&void 0!==r?r:[],...n];return m&&(null==m?void 0:m.length)>0?s.find((e=>!(null==m?void 0:m.includes(e)))):F.oos&&!F.preorderVariant?v?"":"Sold Out":F.compareAtPrice&&parseFloat(F.price){r&&(e.preventDefault(),location.replace(N))},class:i.a.link,"data-orly-type":a,"data-orly-handle":e.handle,children:[(0,t.jsxs)("div",{className:i.a.heroImageContainer,children:[E&&(0,t.jsx)("div",{class:i.a.bestSeller,children:E}),(0,t.jsx)(s.a,{src:H.src,initialWidth:300,cssClass:i.a.heroImage,alt:`${e.title}: ${H.model}`,height:g,width:f,fullSizeWidth:k})]}),(0,t.jsxs)("div",{class:i.a.textWrapper,children:[b&&(0,t.jsx)("div",{class:i.a.vendor,children:e.vendor}),(0,t.jsx)("div",{class:i.a.title,children:R}),W&&(0,t.jsx)("div",{class:i.a.subtitle,children:W}),(0,t.jsxs)("div",{class:i.a.price,children:[A&&O.maxPrice&&(0,t.jsxs)("span",{class:i.a.originalPrice,children:["$",(0,d.c)(O.maxPrice)]}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{children:C}),(0,t.jsx)("span",Object.assign({},I,{children:y}))]})]}),(0,t.jsx)(w,{reviewCount:e.reviewCount,reviewRating:e.reviewRating}),v&&e.plpPromoText&&(0,t.jsx)("div",{class:i.a.plpPromoText,children:e.plpPromoText})]})]}),(0,t.jsx)("div",{class:i.a.colorSwatchContainer,children:!_&&S&&(0,t.jsx)(l.a,{product:e,small:!0,maxItems:12,hideLabel:!0,option:S,getHexForOptionColor:h,selectedVariant:F,findProductVariantWithOption:a=>x(a,e,T),setSelectedVariantId:a=>{const r=e.variants.find((e=>e.variantId===a));r&&V(r)}})})]})}},92:(e,a,r)=>{r.d(a,{a:()=>n});var t=r(1),i=r(2);function n(){return(0,i.useMemo)((()=>{const e=(0,t.getAssignment)("maxFullSizeWidth");if(e)try{const a=parseInt(e);if(Number.isNaN(a))return;return a}catch(e){return}}),[])}}}]);