"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[17],{127:function(e,t,r){var a=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,i.jsxs)("div",{class:l.default.card,style:{color:e.text_color},children:[(0,i.jsx)(d,{media:e.media}),(0,i.jsx)("div",{class:l.default.title,dangerouslySetInnerHTML:{__html:e.title}}),(0,i.jsx)("div",{class:l.default.body,dangerouslySetInnerHTML:{__html:null!==(t=e.body_text)&&void 0!==t?t:""}}),(0,i.jsx)(s,{disruptor:e})]})};const i=r(0),o=r(1),l=a(r(51)),n=r(9);function d({media:e}){var t;const r=null===(t=(0,n.convertImageMedia)(e))||void 0===t?void 0:t.url;if(r){const e={"background-image":`url(${r});`};return(0,i.jsx)("div",{class:l.default.media,style:e})}return"video"===e.type&&e.sources.length>0?(0,i.jsx)("div",{class:l.default.media,children:(0,i.jsx)("video",{loop:!0,autoplay:!0,playsinline:!0,muted:!0,children:e.sources.map((e=>(0,i.jsx)("source",{src:e.url,type:e.mimeType})))})}):(0,i.jsx)(o.Fragment,{})}function s({disruptor:e}){var t;return e.cta_url?(0,i.jsx)("a",{href:e.cta_url,children:null!==(t=e.cta_label)&&void 0!==t?t:"Shop Now"}):(0,i.jsx)(o.Fragment,{})}},43:function(e,t,r){var a=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(a=e)&&"disruptor"===a.type?(0,i.jsx)(m.DisruptorCard,{disruptor:e}):(0,i.jsx)(f,{product:e,sharedStateStore:t,collectionHandle:r});var a};const i=r(0),o=(r(1),a(r(21))),l=r(3),n=r(4),d=r(27),s=r(41),c=r(15),u=r(17),p=r(2),h=r(46),m=r(127);function f({product:e,sharedStateStore:t,collectionHandle:r}){var a;const{getHexForOptionColor:m,findProductVariantWithOption:f,EXCLUDE_TAGS:g,product_image_height:v,product_image_width:x,disable_color_swatches:_,showVendor:j}=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}))),P=e.options.find((e=>"Color"===e.name)),b=e.priceRange.minPrice,S=b!==(null!==(a=e.priceRange.maxPrice)&&void 0!==a?a:b)?`From $${(0,c.formatPrice)(b)}`:`$${(0,c.formatPrice)(b)}`,y=e.compareAtPriceRange.maxPrice&&e.compareAtPriceRange.maxPrice>b,I=e.compareAtPriceRange.maxPrice&&bt.variantId===e.defaultVariantId)),[O,w]=(0,l.useState)(null!=C?C:e.variants[0]),V=(0,s.getImagesForVariant)(e.imageMap,O,p.getAssignment)[0],A=(0,h.useProductUrl)(e,O);if(!V)return null;const F=(0,l.useMemo)((()=>{var t,r;return g&&(null==g?void 0:g.length)>0?e.tags.find((e=>!(null==g?void 0:g.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:O.availableForSale||O.preorderVariant?O.compareAtPrice&&parseFloat(O.price)f(t,e,C),setSelectedVariantId:t=>{const r=e.variants.find((e=>e.variantId===t));r&&w(r)}})})]})}}}]);