"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[18],{134:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DisruptorCard=function({disruptor:e}){var t;return(0,a.jsxs)("div",{class:l.default.card,style:{color:e.text_color},children:[(0,a.jsx)(n,{media:e.media}),(0,a.jsx)("div",{class:l.default.title,dangerouslySetInnerHTML:{__html:e.title}}),(0,a.jsx)("div",{class:l.default.body,dangerouslySetInnerHTML:{__html:null!==(t=e.body_text)&&void 0!==t?t:""}}),(0,a.jsx)(d,{disruptor:e})]})};const a=r(0),o=r(2),l=i(r(53)),s=r(4);function n({media:e}){var t;const r=null===(t=(0,s.convertImageMedia)(e))||void 0===t?void 0:t.url;if(r){const e={"background-image":`url(${r});`};return(0,a.jsx)("div",{class:l.default.media,style:e})}return"video"===e.type&&e.sources.length>0?(0,a.jsx)("div",{class:l.default.media,children:(0,a.jsx)("video",{loop:!0,autoplay:!0,playsinline:!0,muted:!0,children:e.sources.map((e=>(0,a.jsx)("source",{src:e.url,type:e.mimeType})))})}):(0,a.jsx)(o.Fragment,{})}function d({disruptor:e}){var t;return e.cta_url?(0,a.jsx)("a",{href:e.cta_url,children:null!==(t=e.cta_label)&&void 0!==t?t:"Shop Now"}):(0,a.jsx)(o.Fragment,{})}},45:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProductCard=function({product:e,sharedStateStore:t,collectionHandle:r}){return"type"in(i=e)&&"disruptor"===i.type?(0,a.jsx)(f.DisruptorCard,{disruptor:e}):(0,a.jsx)(x,{product:e,sharedStateStore:t,collectionHandle:r});var i};const a=r(0),o=(r(2),i(r(19))),l=r(3),s=r(5),n=r(29),d=r(15),c=r(16),u=r(20),p=r(1),h=r(48),f=r(134),m=r(187);function x({product:e,sharedStateStore:t,collectionHandle:r}){const{getHexForOptionColor:i,findProductVariantWithOption:f,EXCLUDE_TAGS:x,product_image_height:g,product_image_width:v,disable_color_swatches:_,showVendor:P}=t((e=>({getHexForOptionColor:e.getHexForOptionColor,findProductVariantWithOption:e.findProductVariantWithOption,EXCLUDE_TAGS:e.config.exclude_tags,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}))),j=e.options.find((e=>"Color"===e.name)),{priceText:b,showCompareAtPrice:S,isOnSale:O,compareAtPriceRange:y}=function(e){const t=(0,m.getCompareAtPrice)(e);if(e.priceTextOverride)return{priceText:e.priceTextOverride,showCompareAtPrice:!0,isOnSale:!0,compareAtPriceRange:t};const{minPrice:r,maxPrice:i}=(0,m.getPriceRange)(p.getAssignment,e);return{priceText:r!==i?`From $${(0,c.formatPrice)(r)}`:`$${(0,c.formatPrice)(r)}`,showCompareAtPrice:t.maxPrice&&t.maxPrice>r,isOnSale:t.maxPrice&&rt.variantId===e.defaultVariantId)),[w,I]=(0,l.useState)(null!=C?C:e.variants[0]),A=(0,d.getImagesForVariant)(e.imageMap,w)[0],V=(0,h.useProductUrl)(e,w);if(!A)return null;const T=(0,l.useMemo)((()=>{var t,r;return x&&(null==x?void 0:x.length)>0?e.tags.find((e=>!(null==x?void 0:x.includes(e)))):(null===(t=e.promoInfo)||void 0===t?void 0:t.badgeOverride)?e.promoInfo.badgeOverride:(null===(r=e.promoInfo)||void 0===r?void 0:r.badgeLabel)?e.promoInfo.badgeLabel:w.oos&&!w.preorderVariant?"Sold Out":w.compareAtPrice&&parseFloat(w.price)f(t,e,C),setSelectedVariantId:t=>{const r=e.variants.find((e=>e.variantId===t));r&&I(r)}})})]})}}}]);