@trafilea/afrodita-components 7.9.4 → 7.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/build/es/components/collection/product/mobile/ProductItemMobile.js +1 -1
  2. package/build/es/components/filtering/Filters.js +1 -1
  3. package/build/es/components/gallery/ProductGallery.js +1 -1
  4. package/build/es/components/gallery/components/ImagePreviewList/ImagePreviewList.js +1 -1
  5. package/build/es/components/gallery/components/ImagePreviewList/styled.js +1 -1
  6. package/build/es/components/gallery/components/ImageProductSlide/ImageProductSlide.js +1 -1
  7. package/build/es/components/molecules/Video/Video.js +1 -1
  8. package/build/es/components/organisms/AutoshipPdpCard/AutoshipPdpCard.js +1 -1
  9. package/build/es/components/organisms/OfferAtCartV2/OfferAtCartV2.js +1 -1
  10. package/build/es/components/organisms/OfferAtCartV4/OfferAtCartV4.js +1 -1
  11. package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ImageProductSlide.js +1 -1
  12. package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js +1 -1
  13. package/build/es/components/organisms/ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/index.js +1 -1
  14. package/build/es/components/organisms/SubscriptionPlanSelector/SubscriptionPlanSelector.js +1 -1
  15. package/build/es/components/organisms/TwoCtasAtCart/TwoCtasAtCart.js +1 -1
  16. package/build/index.d.ts +10 -0
  17. package/build/lib/components/collection/product/mobile/ProductItemMobile.js +1 -1
  18. package/build/lib/components/filtering/Filters.js +1 -1
  19. package/build/lib/components/gallery/ProductGallery.js +1 -1
  20. package/build/lib/components/gallery/components/ImagePreviewList/ImagePreviewList.js +1 -1
  21. package/build/lib/components/gallery/components/ImagePreviewList/styled.js +1 -1
  22. package/build/lib/components/gallery/components/ImageProductSlide/ImageProductSlide.js +1 -1
  23. package/build/lib/components/molecules/Video/Video.js +1 -1
  24. package/build/lib/components/organisms/AutoshipPdpCard/AutoshipPdpCard.js +1 -1
  25. package/build/lib/components/organisms/OfferAtCartV2/OfferAtCartV2.js +1 -1
  26. package/build/lib/components/organisms/OfferAtCartV4/OfferAtCartV4.js +1 -1
  27. package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ImageProductSlide.js +1 -1
  28. package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js +1 -1
  29. package/build/lib/components/organisms/ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/index.js +1 -1
  30. package/build/lib/components/organisms/SubscriptionPlanSelector/SubscriptionPlanSelector.js +1 -1
  31. package/build/lib/components/organisms/TwoCtasAtCart/TwoCtasAtCart.js +1 -1
  32. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import i from"@ant-design/react-slick";import{useRef as s,useState as l,useEffect as a,useLayoutEffect as m}from"react";import"../../../../PackSelectorV2/PackSelectoV2.js";import"../../../../absorbency-level/AbsorbencyLevel.js";import"../../../../accordion-options/AccordionOptions.js";import"../../../../accordion/Accordion.js";import"../../../../../types/enums.js";import"../../../../../core/theme/Theme.js";import"../../../../../utils/constants/offerAtCart.js";import{debounce as p}from"../../../../../utils/debounce/index.js";import"../../../../../utils/media.js";import"../../../../../utils/mock-content/CancellationFlowAccordion.js";import"../../../../dropdown/variants/simple/SimpleDropdown.js";import"../../../../pricing/clubOffer/ClubOfferTag.js";import"../../../../pricing/discount/styled.js";import"../../../../pricing/styles.js";import"../../../../tooltip/Styled.js";import"../../../../atoms/PriceLabel/PriceLabel.js";import"../../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../../../atoms/HorizontalDivider/HorizontalDivider.js";import"../../../../atoms/Icon/Icon.js";import{Image as d}from"../../../../atoms/Image/Image.js";import"../../../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../../../atoms/Toggle/toggle.styled.js";import"../../../../radio/input/styles.js";import"../../../../autoship/styled.js";import"../../../../autoshipV2/styled.js";import"../../../../before-after/BeforeAfter.js";import"../../../../pricing/priceLabelV3/PriceLabelV3.js";import"../../../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../../../shared/card/Card.js";import"../../../../bundle/minimalistic/styled.js";import"../../../../text/Text.js";import"../../../../bundle/motivator/styled.js";import"../../../../bundle/simple/Simple.js";import"../../../../buynowpaylater/BuyNowPayLater.js";import"../../../../offer-banner/OfferBanner.js";import"../../../../cartProductItem/CloseIcon/CloseButton.js";import"../../../../cartProductItem/Description/Description.js";import"../../../../cartProductItem/Promo/Promo.js";import"../../../../cartProductItem/Title/Title.js";import"../../../../cartProductItem/TrashIcon/styled.js";import"../../../../checkbox/Checkbox.js";import"../../../../collection/grid/WithProductGrid.js";import"@emotion/react/jsx-runtime";import"../../../../SkeletonBox/SkeletonBox.js";import"../../../../club-price-label/ClubPriceLabel.js";import"../../../../strength-bars/StrengthBars.js";import"../../../../pricing/priceLabelV4/PriceLabelV4.js";import"../../../../rating/starList/StarList.js";import"../../../../rating/styles.js";import"../../../../collection/product/mobile/styled.js";import"../../../../icon-button/IconButton.js";import"../../../../tag/variants/product/styled.js";import"../../../../collection/product/truekind/styled.js";import"../../../../color/ColorRadioGroup.js";import"../../../../color/selector/PatternSelector.js";import"../../../../color/styles/ColorPickerwithTootip.styled.js";import"../../../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../../../cta/styled.js";import"../../../../delivery-details/DeliveryDetails.js";import"../../../../delivery-details/Note/Note.js";import"../../../../drawer/style.js";import"../../../../dropdown-list-icons/Styled.js";import"../../../../dropdown/size-dropdown/Styled.js";import"../../../../dropdown/variants/dialog/DropdownDialog.js";import"../../../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../../../input/base/Error.js";import"../../../../shared/select/BaseSelect.js";import"../../../../dropdown/variants/smart/styled.js";import"../../../../filtering/Accordion.js";import"../../../../filtering/FiltersStyled.js";import"../../../../filtering/Tags/Tags.js";import"../../../../fit-guarantee/FitGuarantee.js";import"../../../../fit/FitPredictor.js";import"../../../../slider/ArrowButton.js";import"../../../../slider/StyledSlider.js";import"../../../../gallery/components/ImageSmallPreview/styled.js";import"../../../../gallery/components/ImagePreviewList/styled.js";import{Video as n}from"../../../../molecules/Video/Video.js";import"../../../../gallery/components/ImageProductSlide/styled.js";import"../../../../gallery/styled.js";import"../../../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js";import"../../../../iconsWithTitle/index.js";import"../../../../image-card/ImageCard.js";import"../../../../input/label/Label.js";import"../../../../input/base/Styled.js";import"../../../../input/custom/Custom.js";import"../../../../input/basePlusButton/BasePlusButton.js";import"../../../../input/basePlusIcon/BasePlusIcon.js";import"../../../../modal/Modal.js";import"../../../../motivator-progress-bar/MotivatorProgressBar.js";import"../../../../order-bar/OrderBar.js";import"../../../../packs/selector/PackSelector.js";import"../../../../pagination/styles.js";import"../../../../payment-methods/PaymentMethod.js";import"../../../../product/order/item/SimpleOrderItem.js";import"../../../../progress-bar/ProgressBar.js";import"../../../../quantityPicker/styled.js";import"../../../../radio/RadioPrimary/radioPrimary.js";import"../../../../radio/clubRadioInput/clubRadio.js";import"../../../../review-detail/ReviewDetail.js";import"../../../../review/Review.js";import"../../../../reviews-header/ReviewsHeader.js";import"../../../../scroll-to-top/ScrollToTop.js";import"../../../../search-bar/components/ClearButton/styled.js";import"../../../../search-bar/components/Footer/styled.js";import"../../../../search-bar/components/ProductItem/styled.js";import"../../../../search-bar/components/ResultsPanel/styled.js";import"../../../../search-bar/components/SearchControl/styled.js";import"../../../../search-bar/styled.js";import"../../../../search-navigation/styled.js";import"react-dom";import"../../../../short-banner/ShortBanner.js";import"../../../../size-chart/styled.js";import"../../../../size-table/SizeTable.js";import"../../../../size/guide/SizeFitGuide.js";import"../../../../size/selector/styled.js";import"../../../../tabs/Tab.js";import"../../../../tabs/Tabs.js";import"../../../../tag/Tag.js";import"@emotion/react";import"../../../../textWithImage/index.js";import"../../../../timer/styled.js";import"../../../../toast/Toast.js";import"../../../../totals/total/styled.js";import"../../../../totals/subtotal/Subtotal.js";import"../../../../tracking-progress-v2/TrackingProgressV2.js";import"../../../../tracking-progress/TrackingProgress.js";import"../../../AutoshipOfferCard/AutoshipOfferCardItem.styled.js";import"../../../AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js";import"../../../AutoshipPdpCard/AutoshipPdpCard.styled.js";import"../../../BasicAccordion/BasicAccordion.js";import"../../../CartItemCard/CartItem.js";import"../../../ClubOfferSelector/styled.js";import"../../../ClubOfferSelector2/styled.js";import"../../../JoinClubCard/joinClubCard.js";import"../../../OfferAtCart/styled.js";import"../../../OfferAtCartV2/styled.js";import"../../../OfferAtCartV3/styled.js";import"../../../OfferAtCartV4/styled.js";import"../../../OfferAtPDP/styled.js";import"../../../OfferAtPDP/types.js";import"../../../ProductCard/ProductCardV1/ProductCard.js";import"../../../ProductCard/ProductCardV2/styled.js";import"../../../ProductCard/ProductCardV3/styled.js";import"../../ProductGalleryMobileV1/ProductGalleryMobile.js";import"../../ProductGalleryMobileV2/ProductGalleryMobileV2.js";import"../../ProductGalleryMobileV3/ProductGalleryMobileV3.js";import"../../ProductGalleryMobileV4/ContentGallery/styled.js";import"react-inner-image-zoom";import"../../ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js";import"../../ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js";import"../../ProductGalleryMobileV4/GalleryDetailed/styled.js";import"../../ProductGalleryMobileV5/styled.js";import"../ColorVariantsGallery/styled.js";import{MainGalleryContainer as c,TopTag as j,BottomTag as u,TopRightTag as y}from"./styled.js";import"../styled.js";import"../../../SizeCharTable/SizeChartTableV2/styled.js";import"../../../SizeCharTable/SizeChartTableV3/styled.js";import"../../../../molecules/ArrowTip/ArrowTip.styled.js";import"../../../SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js";import"../../../SubscriptionPlanSelector/styled.js";import"../../../TwoCtasAtCart/Greeting.styled.js";import"../../../TwoCtasAtCart/Card.styled.js";import"../../../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js";import"../../../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js";import"../../../../molecules/CouponCard/styled.js";import"../../../../molecules/BenefitsList/styled.js";import"../../../../molecules/HurryUp/styled.js";import"../../../../molecules/Spinner/styled.js";import"../../../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js";import"../../../../molecules/LikeButton/styled.js";import"../../../../molecules/ScarcityTag/ScarcityTag.styled.js";var b={dots:!1,infinite:!1,speed:200,slidesToScroll:1,initialSlide:0},f=function(t){if(!(null==t?void 0:t.current))return 1.1;return(t.current.offsetWidth-15)/312-1e-4},g=function(g){var P,C,h,v=g.contents,S=g.topTag,T=g.topRightTag,V=g.bottomTag,w=g.containerRef,A=s(null),I=s(null),B=l(null!==(P=f(w))&&void 0!==P?P:1),L=B[0],k=B[1],G=null===(C=null==v?void 0:v[0])||void 0===C?void 0:C.key;return a((function(){var t;null===(t=A.current)||void 0===t||t.slickGoTo(0,!0)}),[G]),m((function(){if(null==w?void 0:w.current){var t=p((function(){var t;k(null!==(t=f(w))&&void 0!==t?t:1)}),300);return t(),window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}}),[w,null===(h=null==w?void 0:w.current)||void 0===h?void 0:h.offsetWidth]),r(c,t({ref:I},{children:r(i,t({},b,{slidesToShow:L,ref:A,centerPadding:"80"},{children:v.map((function(i,s){var l,a=null==i?void 0:i.url,m=null!==(l=null==i?void 0:i.isVideo)&&void 0!==l&&l;return r("div",t({"data-testid":"main-gallery-div-content-".concat(s)},{children:m?r(n,{source:a,thumbnail:null==i?void 0:i.thumbnailUrl},void 0):o(e,{children:[r(d,{src:a,alt:i.alt,width:"".concat(312,"px"),loading:"eager"},void 0),r(j,t({"data-testid":"topTag"},{children:S}),void 0),r(u,t({"data-testid":"bottomTag"},{children:V}),void 0),!!T&&r(y,{children:T},void 0)]},void 0)}),i.key)}))}),void 0)}),void 0)};export{g as MainGallery};
1
+ import{__assign as t}from"tslib";import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import i from"@ant-design/react-slick";import{useRef as s,useState as l,useEffect as a,useLayoutEffect as m}from"react";import"../../../../PackSelectorV2/PackSelectoV2.js";import"../../../../absorbency-level/AbsorbencyLevel.js";import"../../../../accordion-options/AccordionOptions.js";import"../../../../accordion/Accordion.js";import"../../../../../types/enums.js";import"../../../../../core/theme/Theme.js";import"../../../../../utils/constants/offerAtCart.js";import{debounce as p}from"../../../../../utils/debounce/index.js";import"../../../../../utils/media.js";import"../../../../../utils/mock-content/CancellationFlowAccordion.js";import"../../../../dropdown/variants/simple/SimpleDropdown.js";import"../../../../pricing/clubOffer/ClubOfferTag.js";import"../../../../pricing/discount/styled.js";import"../../../../pricing/styles.js";import"../../../../tooltip/Styled.js";import"../../../../atoms/PriceLabel/PriceLabel.js";import"../../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../../../atoms/HorizontalDivider/HorizontalDivider.js";import"../../../../atoms/Icon/Icon.js";import{Image as d}from"../../../../atoms/Image/Image.js";import"../../../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../../../atoms/Toggle/toggle.styled.js";import"../../../../radio/input/styles.js";import"../../../../autoship/styled.js";import"../../../../autoshipV2/styled.js";import"../../../../before-after/BeforeAfter.js";import"../../../../pricing/priceLabelV3/PriceLabelV3.js";import"../../../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../../../shared/card/Card.js";import"../../../../bundle/minimalistic/styled.js";import"../../../../text/Text.js";import"../../../../bundle/motivator/styled.js";import"../../../../bundle/simple/Simple.js";import"../../../../buynowpaylater/BuyNowPayLater.js";import"../../../../offer-banner/OfferBanner.js";import"../../../../cartProductItem/CloseIcon/CloseButton.js";import"../../../../cartProductItem/Description/Description.js";import"../../../../cartProductItem/Promo/Promo.js";import"../../../../cartProductItem/Title/Title.js";import"../../../../cartProductItem/TrashIcon/styled.js";import"../../../../checkbox/Checkbox.js";import"../../../../collection/grid/WithProductGrid.js";import"@emotion/react/jsx-runtime";import"../../../../SkeletonBox/SkeletonBox.js";import"../../../../club-price-label/ClubPriceLabel.js";import"../../../../strength-bars/StrengthBars.js";import"../../../../pricing/priceLabelV4/PriceLabelV4.js";import"../../../../rating/starList/StarList.js";import"../../../../rating/styles.js";import"../../../../collection/product/mobile/styled.js";import"../../../../icon-button/IconButton.js";import"../../../../tag/variants/product/styled.js";import"../../../../collection/product/truekind/styled.js";import"../../../../color/ColorRadioGroup.js";import"../../../../color/selector/PatternSelector.js";import"../../../../color/styles/ColorPickerwithTootip.styled.js";import"../../../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../../../cta/styled.js";import"../../../../delivery-details/DeliveryDetails.js";import"../../../../delivery-details/Note/Note.js";import"../../../../drawer/style.js";import"../../../../dropdown-list-icons/Styled.js";import"../../../../dropdown/size-dropdown/Styled.js";import"../../../../dropdown/variants/dialog/DropdownDialog.js";import"../../../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../../../input/base/Error.js";import"../../../../shared/select/BaseSelect.js";import"../../../../dropdown/variants/smart/styled.js";import"../../../../filtering/Accordion.js";import"../../../../filtering/FiltersStyled.js";import"../../../../filtering/Tags/Tags.js";import"../../../../fit-guarantee/FitGuarantee.js";import"../../../../fit/FitPredictor.js";import{Video as n}from"../../../../molecules/Video/Video.js";import"../../../../slider/ArrowButton.js";import"../../../../slider/StyledSlider.js";import"../../../../gallery/components/ImageSmallPreview/styled.js";import"../../../../gallery/components/ImagePreviewList/styled.js";import"../../../../gallery/components/ImageProductSlide/styled.js";import"../../../../gallery/styled.js";import"../../../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js";import"../../../../iconsWithTitle/index.js";import"../../../../image-card/ImageCard.js";import"../../../../input/label/Label.js";import"../../../../input/base/Styled.js";import"../../../../input/custom/Custom.js";import"../../../../input/basePlusButton/BasePlusButton.js";import"../../../../input/basePlusIcon/BasePlusIcon.js";import"../../../../modal/Modal.js";import"../../../../motivator-progress-bar/MotivatorProgressBar.js";import"../../../../order-bar/OrderBar.js";import"../../../../packs/selector/PackSelector.js";import"../../../../pagination/styles.js";import"../../../../payment-methods/PaymentMethod.js";import"../../../../product/order/item/SimpleOrderItem.js";import"../../../../progress-bar/ProgressBar.js";import"../../../../quantityPicker/styled.js";import"../../../../radio/RadioPrimary/radioPrimary.js";import"../../../../radio/clubRadioInput/clubRadio.js";import"../../../../review-detail/ReviewDetail.js";import"../../../../review/Review.js";import"../../../../reviews-header/ReviewsHeader.js";import"../../../../scroll-to-top/ScrollToTop.js";import"../../../../search-bar/components/ClearButton/styled.js";import"../../../../search-bar/components/Footer/styled.js";import"../../../../search-bar/components/ProductItem/styled.js";import"../../../../search-bar/components/ResultsPanel/styled.js";import"../../../../search-bar/components/SearchControl/styled.js";import"../../../../search-bar/styled.js";import"../../../../search-navigation/styled.js";import"react-dom";import"../../../../short-banner/ShortBanner.js";import"../../../../size-chart/styled.js";import"../../../../size-table/SizeTable.js";import"../../../../size/guide/SizeFitGuide.js";import"../../../../size/selector/styled.js";import"../../../../tabs/Tab.js";import"../../../../tabs/Tabs.js";import"../../../../tag/Tag.js";import"@emotion/react";import"../../../../textWithImage/index.js";import"../../../../timer/styled.js";import"../../../../toast/Toast.js";import"../../../../totals/total/styled.js";import"../../../../totals/subtotal/Subtotal.js";import"../../../../tracking-progress-v2/TrackingProgressV2.js";import"../../../../tracking-progress/TrackingProgress.js";import"../../../AutoshipOfferCard/AutoshipOfferCardItem.styled.js";import"../../../AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js";import"../../../AutoshipPdpCard/AutoshipPdpCard.styled.js";import"../../../BasicAccordion/BasicAccordion.js";import"../../../CartItemCard/CartItem.js";import"../../../ClubOfferSelector/styled.js";import"../../../ClubOfferSelector2/styled.js";import"../../../JoinClubCard/joinClubCard.js";import"../../../OfferAtCart/styled.js";import"../../../OfferAtCartV2/styled.js";import"../../../OfferAtCartV3/styled.js";import"../../../OfferAtCartV4/styled.js";import"../../../OfferAtPDP/styled.js";import"../../../OfferAtPDP/types.js";import"../../../ProductCard/ProductCardV1/ProductCard.js";import"../../../ProductCard/ProductCardV2/styled.js";import"../../../ProductCard/ProductCardV3/styled.js";import"../../ProductGalleryMobileV1/ProductGalleryMobile.js";import"../../ProductGalleryMobileV2/ProductGalleryMobileV2.js";import"../../ProductGalleryMobileV3/ProductGalleryMobileV3.js";import"../../ProductGalleryMobileV4/ContentGallery/styled.js";import"react-inner-image-zoom";import"../../ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js";import"../../ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js";import"../../ProductGalleryMobileV4/GalleryDetailed/styled.js";import"../../ProductGalleryMobileV5/styled.js";import"../ColorVariantsGallery/styled.js";import{MainGalleryContainer as c,TopTag as j,BottomTag as u,TopRightTag as y}from"./styled.js";import"../styled.js";import"../../../SizeCharTable/SizeChartTableV2/styled.js";import"../../../SizeCharTable/SizeChartTableV3/styled.js";import"../../../../molecules/ArrowTip/ArrowTip.styled.js";import"../../../SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js";import"../../../SubscriptionPlanSelector/styled.js";import"../../../TwoCtasAtCart/Greeting.styled.js";import"../../../TwoCtasAtCart/Card.styled.js";import"../../../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js";import"../../../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js";import"../../../../molecules/CouponCard/styled.js";import"../../../../molecules/BenefitsList/styled.js";import"../../../../molecules/HurryUp/styled.js";import"../../../../molecules/Spinner/styled.js";import"../../../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js";import"../../../../molecules/LikeButton/styled.js";import"../../../../molecules/ScarcityTag/ScarcityTag.styled.js";var b={dots:!1,infinite:!1,speed:200,slidesToScroll:1,initialSlide:0},f=function(t){if(!(null==t?void 0:t.current))return 1.1;return(t.current.offsetWidth-15)/312-1e-4},g=function(g){var P,C,h,v=g.contents,S=g.topTag,T=g.topRightTag,V=g.bottomTag,w=g.containerRef,A=s(null),I=s(null),B=l(null!==(P=f(w))&&void 0!==P?P:1),L=B[0],k=B[1],G=null===(C=null==v?void 0:v[0])||void 0===C?void 0:C.key;return a((function(){var t;null===(t=A.current)||void 0===t||t.slickGoTo(0,!0)}),[G]),m((function(){if(null==w?void 0:w.current){var t=p((function(){var t;k(null!==(t=f(w))&&void 0!==t?t:1)}),300);return t(),window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}}),[w,null===(h=null==w?void 0:w.current)||void 0===h?void 0:h.offsetWidth]),r(c,t({ref:I},{children:r(i,t({},b,{slidesToShow:L,ref:A,centerPadding:"80"},{children:v.map((function(i,s){var l,a=null==i?void 0:i.url,m=null!==(l=null==i?void 0:i.isVideo)&&void 0!==l&&l;return r("div",t({"data-testid":"main-gallery-div-content-".concat(s)},{children:m?r(n,{source:a,thumbnail:null==i?void 0:i.thumbnailUrl},void 0):o(e,{children:[r(d,{src:a,alt:i.alt,width:"".concat(312,"px"),loading:"eager"},void 0),r(j,t({"data-testid":"topTag"},{children:S}),void 0),r(u,t({"data-testid":"bottomTag"},{children:V}),void 0),!!T&&r(y,{children:T},void 0)]},void 0)}),i.key)}))}),void 0)}),void 0)};export{g as MainGallery};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as t,jsx as i,Fragment as r}from"react/jsx-runtime";import{useState as o,useEffect as s,useCallback as l,useMemo as c,Children as a,isValidElement as n,cloneElement as d}from"react";import{ComponentSize as m}from"../../../types/enums.js";import"../../../utils/constants/offerAtCart.js";import{decimalFormat as p}from"../../../utils/decimalParser/decimalParser.js";import"../../../utils/media.js";import"../../../utils/mock-content/CancellationFlowAccordion.js";import{Text as u}from"../../text/Text.js";import{Icon as b}from"../../icons/index.js";import{RadioInput as j}from"../../radio/input/radio.js";import{Tooltip as y}from"../../tooltip/Tooltip.js";import"../../PackSelectorV2/PackSelectoV2.js";import"../../absorbency-level/AbsorbencyLevel.js";import"../../accordion-options/AccordionOptions.js";import"../../accordion/Accordion.js";import"../../../core/theme/Theme.js";import"../../dropdown/variants/simple/SimpleDropdown.js";import"../../autoship/styled.js";import"../../autoshipV2/styled.js";import"../../before-after/BeforeAfter.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../shared/card/Card.js";import"../../bundle/minimalistic/styled.js";import"../../bundle/motivator/styled.js";import"../../bundle/simple/Simple.js";import"../../buynowpaylater/BuyNowPayLater.js";import"../../offer-banner/OfferBanner.js";import"../../cartProductItem/CloseIcon/CloseButton.js";import"../../cartProductItem/Description/Description.js";import"../../cartProductItem/Promo/Promo.js";import"../../cartProductItem/Title/Title.js";import"../../cartProductItem/TrashIcon/styled.js";import"../../checkbox/Checkbox.js";import"../../collection/grid/WithProductGrid.js";import"@emotion/react/jsx-runtime";import"../../SkeletonBox/SkeletonBox.js";import"../../club-price-label/ClubPriceLabel.js";import"../../strength-bars/StrengthBars.js";import"../../pricing/priceLabelV4/PriceLabelV4.js";import"../../rating/starList/StarList.js";import"../../rating/styles.js";import"../../collection/product/mobile/styled.js";import"../../icon-button/IconButton.js";import"../../tag/variants/product/styled.js";import"../../collection/product/truekind/styled.js";import"../../color/ColorRadioGroup.js";import"../../color/selector/PatternSelector.js";import"../../color/styles/ColorPickerwithTootip.styled.js";import"../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../cta/styled.js";import"../../delivery-details/DeliveryDetails.js";import"../../delivery-details/Note/Note.js";import"../../drawer/style.js";import"../../dropdown-list-icons/Styled.js";import"../../dropdown/size-dropdown/Styled.js";import"../../dropdown/variants/dialog/DropdownDialog.js";import"../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../input/base/Error.js";import"../../shared/select/BaseSelect.js";import"../../dropdown/variants/smart/styled.js";import"../../filtering/Accordion.js";import"../../filtering/FiltersStyled.js";import"../../filtering/Tags/Tags.js";import"../../fit-guarantee/FitGuarantee.js";import"../../fit/FitPredictor.js";import"../../slider/ArrowButton.js";import"../../slider/StyledSlider.js";import"../../gallery/components/ImageSmallPreview/styled.js";import"../../gallery/components/ImagePreviewList/styled.js";import"../../molecules/Video/components/styled.js";import"../../molecules/Video/styled.js";import"../../gallery/components/ImageProductSlide/styled.js";import"../../gallery/styled.js";import"../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js";import"../../iconsWithTitle/index.js";import"../../image-card/ImageCard.js";import"../../input/label/Label.js";import"../../input/base/Styled.js";import"../../input/custom/Custom.js";import"../../input/basePlusButton/BasePlusButton.js";import"../../input/basePlusIcon/BasePlusIcon.js";import"../../modal/Modal.js";import"../../motivator-progress-bar/MotivatorProgressBar.js";import"../../order-bar/OrderBar.js";import"../../packs/selector/PackSelector.js";import"../../pagination/styles.js";import"../../payment-methods/PaymentMethod.js";import"../../product/order/item/SimpleOrderItem.js";import"../../progress-bar/ProgressBar.js";import"../../quantityPicker/styled.js";import"../../radio/RadioPrimary/radioPrimary.js";import"../../radio/clubRadioInput/clubRadio.js";import"../../review-detail/ReviewDetail.js";import"../../review/Review.js";import"../../reviews-header/ReviewsHeader.js";import"../../scroll-to-top/ScrollToTop.js";import"../../search-bar/components/ClearButton/styled.js";import"../../search-bar/components/Footer/styled.js";import"../../search-bar/components/ProductItem/styled.js";import"../../search-bar/components/ResultsPanel/styled.js";import"../../search-bar/components/SearchControl/styled.js";import"../../search-bar/styled.js";import"../../search-navigation/styled.js";import"react-dom";import"../../short-banner/ShortBanner.js";import"../../size-chart/styled.js";import"../../size-table/SizeTable.js";import"../../size/guide/SizeFitGuide.js";import"../../size/selector/styled.js";import"../../tabs/Tab.js";import"../../tabs/Tabs.js";import"../../tag/Tag.js";import"@emotion/react";import"../../textWithImage/index.js";import"../../timer/styled.js";import"../../toast/Toast.js";import"../../totals/total/styled.js";import"../../totals/subtotal/Subtotal.js";import"../../tracking-progress-v2/TrackingProgressV2.js";import"../../tracking-progress/TrackingProgress.js";import"../AutoshipOfferCard/AutoshipOfferCardItem.styled.js";import"../AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js";import"../AutoshipPdpCard/AutoshipPdpCard.styled.js";import"../BasicAccordion/BasicAccordion.js";import"../CartItemCard/CartItem.js";import"../ClubOfferSelector/styled.js";import"../ClubOfferSelector2/styled.js";import"../JoinClubCard/joinClubCard.js";import"../OfferAtCart/styled.js";import"../OfferAtCartV2/styled.js";import"../OfferAtCartV3/styled.js";import"../OfferAtCartV4/styled.js";import"../OfferAtPDP/styled.js";import"../OfferAtPDP/types.js";import"../ProductCard/ProductCardV1/ProductCard.js";import"../ProductCard/ProductCardV2/styled.js";import"../ProductCard/ProductCardV3/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js";import"../ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js";import"../ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js";import"@ant-design/react-slick";import"../ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js";import"react-inner-image-zoom";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV5/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/styled.js";import"../SizeCharTable/SizeChartTableV2/styled.js";import"../SizeCharTable/SizeChartTableV3/styled.js";import"../../molecules/ArrowTip/ArrowTip.styled.js";import"../SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js";import{Container as h,SubscriptionContainer as P,DiscountTag as f,SubscriptionHeader as g,FlexContainer as C,TooltipWrapper as T,StyledPrice as v,BenefitsContainer as k,SinglePurchaseContainer as S}from"./styled.js";import"../TwoCtasAtCart/Greeting.styled.js";import"../TwoCtasAtCart/Card.styled.js";import"../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js";import"../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js";import"../../molecules/CouponCard/styled.js";import{AutoshipFrequencyDropdown as V}from"../../molecules/AutoshipFrequencyDropdown/AutoshipFrequencyDropdown.js";import{BenefitsList as A}from"../../molecules/BenefitsList/BenefitsList.js";import"../../molecules/HurryUp/styled.js";import"../../molecules/Spinner/styled.js";import"../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js";import"../../molecules/LikeButton/styled.js";import"../../molecules/ScarcityTag/ScarcityTag.styled.js";var G=function(G){var M=G.children,w=G.benefits,I=G.tooltip,B=G.pricing,L=G.frequency,z=G.onChange,x=G.className,O=G.discountTagClassName,D=G.closeIcon,F=G.currencySymbol,N=G.discountLabel,R=G.radios,q=G.termsAndConditions,W=o({oneTime:R.oneTime,subscription:R.subscription}),H=W[0],$=W[1];s((function(){$((function(t){return e(e({},t),{oneTime:e(e({},t.oneTime),{checked:!t.oneTime.disabled&&t.oneTime.checked}),subscription:e(e({},t.subscription),{checked:!t.subscription.disabled&&t.subscription.checked})})}))}),[H.oneTime.disabled,H.subscription.disabled]);var E=o(null==L?void 0:L.values[0]),J=E[0],Q=E[1],U=B.listPrice,_=B.discountedPrice,K=B.subscriptionDiscountPercentage,X=Number((_-_*(K/100)).toFixed(2)),Y=Math.floor(U-X),Z=Y/U*100,ee=5*Math.round(Z/5),te=l((function(){return H.subscription.checked?Number((_-_*(K/100)).toFixed(2)):_}),[_,H.subscription.checked,K]),ie=c((function(){return{subscriptionPeriod:J,withSubscription:H.subscription.checked,originalPrice:U,discountedPrice:te()}}),[J,H.subscription.checked,U,te]);s((function(){ie&&z(ie)}),[ie,z]);var re=function(t){var i;"subscription"===(i=t)&&H.subscription.disabled||"oneTime"===i&&H.oneTime.disabled||($((function(i){return e(e({},i),{oneTime:e(e({},i.oneTime),{checked:"oneTime"===t}),subscription:e(e({},i.subscription),{checked:"subscription"===t})})})),"oneTime"===t?Q(void 0):"subscription"===t&&L&&Q(L.values[0]))};return t(h,e({className:x},{children:[t(P,e({highlighted:H.subscription.checked,onClick:function(){return re("subscription")},"data-testid":"subscription-purchase-block",disabled:H.subscription.disabled},{children:[i(f,e({className:O,selected:H.subscription.checked},{children:null!=N?N:"".concat(ee,"% OFF - SAVE ").concat(F).concat(Y.toFixed(2))}),void 0),t(g,e({showBorder:H.subscription.checked},{children:[t(C,e({"data-testid":"subscription-block",onClick:function(){return re("subscription")}},{children:[i(j,{label:R.subscription.label,icon:R.subscription.icon,name:"subscription",id:"subscription",value:"subscription",size:m.Medium,style:{marginRight:"10px"},useV2Style:!0,onChange:function(){$((function(t){return{subscription:e(e({},t.subscription),{checked:!0}),oneTime:e(e({},t.oneTime),{checked:!1})}}))},checked:!H.subscription.disabled&&H.subscription.checked,disabled:H.subscription.disabled},void 0),I&&i(T,{children:i(y,e({position:0,content:I.content,header:I.header,maxWidth:"248px",showCloseIcon:D,closeBtnSize:.7},{children:i(b.Actions.CircleQuestion,{width:1},void 0)}),void 0)},void 0)]}),void 0),i(v,{testId:"subscription",finalPrice:"$".concat(p(Number(X))),disabled:H.subscription.disabled,highlighted:!H.subscription.disabled&&H.subscription.highlighted,size:m.Large,originalPrice:"$".concat(p(Number(U)))},void 0)]}),void 0),H.subscription.checked&&t(r,{children:[i(k,e({disabled:H.subscription.disabled},{children:function(){var t=H.subscription.disabled;if(M){var r=t?{opacity:.5,pointerEvents:"none"}:{};return a.map(M,(function(t){return n(t)?d(t,{style:e(e({},t.props.style),r)}):t}))}return w?i(A,{benefits:w,disabled:t},void 0):null}()}),void 0),q&&i(u,e({variant:"link",underline:!0,href:q.url,size:"regular",target:"_blank"},{children:q.text}),void 0),(null==L?void 0:L.showFrequencyText)&&i(V,{frequency:L,onChange:function(e){Q(H.subscription.checked?e.value:void 0)}},void 0)]},void 0)]}),void 0),t(S,e({"data-testid":"single-purchase-block",highlighted:H.oneTime.checked,disabled:H.oneTime.disabled,onClick:function(){return re("oneTime")}},{children:[i(j,{label:R.oneTime.label,icon:R.oneTime.icon,name:"oneTime",id:"oneTime",value:"oneTime",size:m.Medium,onChange:function(){$((function(t){return{subscription:e(e({},t.subscription),{checked:!1}),oneTime:e(e({},t.oneTime),{checked:!0})}}))},useV2Style:!0,checked:!H.oneTime.disabled&&H.oneTime.checked,disabled:H.oneTime.disabled},void 0),i(v,{testId:"single-purchase",finalPrice:"$".concat(p(Number(_))),disabled:H.oneTime.disabled,highlighted:!H.oneTime.disabled&&H.oneTime.highlighted,size:m.Large,originalPrice:"$".concat(p(Number(U)))},void 0)]}),void 0)]}),void 0)};export{G as SubscriptionPlanSelector};
1
+ import{__assign as e}from"tslib";import{jsxs as t,jsx as i,Fragment as r}from"react/jsx-runtime";import{useState as o,useEffect as s,useCallback as l,useMemo as c,Children as a,isValidElement as n,cloneElement as d}from"react";import{ComponentSize as m}from"../../../types/enums.js";import"../../../utils/constants/offerAtCart.js";import{decimalFormat as p}from"../../../utils/decimalParser/decimalParser.js";import"../../../utils/media.js";import"../../../utils/mock-content/CancellationFlowAccordion.js";import{Text as u}from"../../text/Text.js";import{Icon as b}from"../../icons/index.js";import{RadioInput as j}from"../../radio/input/radio.js";import{Tooltip as y}from"../../tooltip/Tooltip.js";import"../../PackSelectorV2/PackSelectoV2.js";import"../../absorbency-level/AbsorbencyLevel.js";import"../../accordion-options/AccordionOptions.js";import"../../accordion/Accordion.js";import"../../../core/theme/Theme.js";import"../../dropdown/variants/simple/SimpleDropdown.js";import"../../autoship/styled.js";import"../../autoshipV2/styled.js";import"../../before-after/BeforeAfter.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../shared/card/Card.js";import"../../bundle/minimalistic/styled.js";import"../../bundle/motivator/styled.js";import"../../bundle/simple/Simple.js";import"../../buynowpaylater/BuyNowPayLater.js";import"../../offer-banner/OfferBanner.js";import"../../cartProductItem/CloseIcon/CloseButton.js";import"../../cartProductItem/Description/Description.js";import"../../cartProductItem/Promo/Promo.js";import"../../cartProductItem/Title/Title.js";import"../../cartProductItem/TrashIcon/styled.js";import"../../checkbox/Checkbox.js";import"../../collection/grid/WithProductGrid.js";import"@emotion/react/jsx-runtime";import"../../SkeletonBox/SkeletonBox.js";import"../../club-price-label/ClubPriceLabel.js";import"../../strength-bars/StrengthBars.js";import"../../pricing/priceLabelV4/PriceLabelV4.js";import"../../rating/starList/StarList.js";import"../../rating/styles.js";import"../../collection/product/mobile/styled.js";import"../../icon-button/IconButton.js";import"../../tag/variants/product/styled.js";import"../../collection/product/truekind/styled.js";import"../../color/ColorRadioGroup.js";import"../../color/selector/PatternSelector.js";import"../../color/styles/ColorPickerwithTootip.styled.js";import"../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../cta/styled.js";import"../../delivery-details/DeliveryDetails.js";import"../../delivery-details/Note/Note.js";import"../../drawer/style.js";import"../../dropdown-list-icons/Styled.js";import"../../dropdown/size-dropdown/Styled.js";import"../../dropdown/variants/dialog/DropdownDialog.js";import"../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../input/base/Error.js";import"../../shared/select/BaseSelect.js";import"../../dropdown/variants/smart/styled.js";import"../../filtering/Accordion.js";import"../../filtering/FiltersStyled.js";import"../../filtering/Tags/Tags.js";import"../../fit-guarantee/FitGuarantee.js";import"../../fit/FitPredictor.js";import"../../molecules/Video/components/styled.js";import"../../molecules/Video/styled.js";import"../../slider/ArrowButton.js";import"../../slider/StyledSlider.js";import"../../gallery/components/ImageSmallPreview/styled.js";import"../../gallery/components/ImagePreviewList/styled.js";import"../../gallery/components/ImageProductSlide/styled.js";import"../../gallery/styled.js";import"../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js";import"../../iconsWithTitle/index.js";import"../../image-card/ImageCard.js";import"../../input/label/Label.js";import"../../input/base/Styled.js";import"../../input/custom/Custom.js";import"../../input/basePlusButton/BasePlusButton.js";import"../../input/basePlusIcon/BasePlusIcon.js";import"../../modal/Modal.js";import"../../motivator-progress-bar/MotivatorProgressBar.js";import"../../order-bar/OrderBar.js";import"../../packs/selector/PackSelector.js";import"../../pagination/styles.js";import"../../payment-methods/PaymentMethod.js";import"../../product/order/item/SimpleOrderItem.js";import"../../progress-bar/ProgressBar.js";import"../../quantityPicker/styled.js";import"../../radio/RadioPrimary/radioPrimary.js";import"../../radio/clubRadioInput/clubRadio.js";import"../../review-detail/ReviewDetail.js";import"../../review/Review.js";import"../../reviews-header/ReviewsHeader.js";import"../../scroll-to-top/ScrollToTop.js";import"../../search-bar/components/ClearButton/styled.js";import"../../search-bar/components/Footer/styled.js";import"../../search-bar/components/ProductItem/styled.js";import"../../search-bar/components/ResultsPanel/styled.js";import"../../search-bar/components/SearchControl/styled.js";import"../../search-bar/styled.js";import"../../search-navigation/styled.js";import"react-dom";import"../../short-banner/ShortBanner.js";import"../../size-chart/styled.js";import"../../size-table/SizeTable.js";import"../../size/guide/SizeFitGuide.js";import"../../size/selector/styled.js";import"../../tabs/Tab.js";import"../../tabs/Tabs.js";import"../../tag/Tag.js";import"@emotion/react";import"../../textWithImage/index.js";import"../../timer/styled.js";import"../../toast/Toast.js";import"../../totals/total/styled.js";import"../../totals/subtotal/Subtotal.js";import"../../tracking-progress-v2/TrackingProgressV2.js";import"../../tracking-progress/TrackingProgress.js";import"../AutoshipOfferCard/AutoshipOfferCardItem.styled.js";import"../AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js";import"../AutoshipPdpCard/AutoshipPdpCard.styled.js";import"../BasicAccordion/BasicAccordion.js";import"../CartItemCard/CartItem.js";import"../ClubOfferSelector/styled.js";import"../ClubOfferSelector2/styled.js";import"../JoinClubCard/joinClubCard.js";import"../OfferAtCart/styled.js";import"../OfferAtCartV2/styled.js";import"../OfferAtCartV3/styled.js";import"../OfferAtCartV4/styled.js";import"../OfferAtPDP/styled.js";import"../OfferAtPDP/types.js";import"../ProductCard/ProductCardV1/ProductCard.js";import"../ProductCard/ProductCardV2/styled.js";import"../ProductCard/ProductCardV3/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js";import"../ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js";import"../ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js";import"@ant-design/react-slick";import"../ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js";import"react-inner-image-zoom";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV5/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/styled.js";import"../SizeCharTable/SizeChartTableV2/styled.js";import"../SizeCharTable/SizeChartTableV3/styled.js";import"../../molecules/ArrowTip/ArrowTip.styled.js";import"../SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js";import{Container as h,SubscriptionContainer as P,DiscountTag as f,SubscriptionHeader as g,FlexContainer as C,TooltipWrapper as T,StyledPrice as v,BenefitsContainer as k,SinglePurchaseContainer as S}from"./styled.js";import"../TwoCtasAtCart/Greeting.styled.js";import"../TwoCtasAtCart/Card.styled.js";import"../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js";import"../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js";import"../../molecules/CouponCard/styled.js";import{AutoshipFrequencyDropdown as V}from"../../molecules/AutoshipFrequencyDropdown/AutoshipFrequencyDropdown.js";import{BenefitsList as A}from"../../molecules/BenefitsList/BenefitsList.js";import"../../molecules/HurryUp/styled.js";import"../../molecules/Spinner/styled.js";import"../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js";import"../../molecules/LikeButton/styled.js";import"../../molecules/ScarcityTag/ScarcityTag.styled.js";var G=function(G){var M=G.children,w=G.benefits,I=G.tooltip,B=G.pricing,L=G.frequency,z=G.onChange,x=G.className,O=G.discountTagClassName,D=G.closeIcon,F=G.currencySymbol,N=G.discountLabel,R=G.radios,q=G.termsAndConditions,W=o({oneTime:R.oneTime,subscription:R.subscription}),H=W[0],$=W[1];s((function(){$((function(t){return e(e({},t),{oneTime:e(e({},t.oneTime),{checked:!t.oneTime.disabled&&t.oneTime.checked}),subscription:e(e({},t.subscription),{checked:!t.subscription.disabled&&t.subscription.checked})})}))}),[H.oneTime.disabled,H.subscription.disabled]);var E=o(null==L?void 0:L.values[0]),J=E[0],Q=E[1],U=B.listPrice,_=B.discountedPrice,K=B.subscriptionDiscountPercentage,X=Number((_-_*(K/100)).toFixed(2)),Y=Math.floor(U-X),Z=Y/U*100,ee=5*Math.round(Z/5),te=l((function(){return H.subscription.checked?Number((_-_*(K/100)).toFixed(2)):_}),[_,H.subscription.checked,K]),ie=c((function(){return{subscriptionPeriod:J,withSubscription:H.subscription.checked,originalPrice:U,discountedPrice:te()}}),[J,H.subscription.checked,U,te]);s((function(){ie&&z(ie)}),[ie,z]);var re=function(t){var i;"subscription"===(i=t)&&H.subscription.disabled||"oneTime"===i&&H.oneTime.disabled||($((function(i){return e(e({},i),{oneTime:e(e({},i.oneTime),{checked:"oneTime"===t}),subscription:e(e({},i.subscription),{checked:"subscription"===t})})})),"oneTime"===t?Q(void 0):"subscription"===t&&L&&Q(L.values[0]))};return t(h,e({className:x},{children:[t(P,e({highlighted:H.subscription.checked,onClick:function(){return re("subscription")},"data-testid":"subscription-purchase-block",disabled:H.subscription.disabled},{children:[i(f,e({className:O,selected:H.subscription.checked},{children:null!=N?N:"".concat(ee,"% OFF - SAVE ").concat(F).concat(Y.toFixed(2))}),void 0),t(g,e({showBorder:H.subscription.checked},{children:[t(C,e({"data-testid":"subscription-block",onClick:function(){return re("subscription")}},{children:[i(j,{label:R.subscription.label,icon:R.subscription.icon,name:"subscription",id:"subscription",value:"subscription",size:m.Medium,style:{marginRight:"10px"},useV2Style:!0,onChange:function(){$((function(t){return{subscription:e(e({},t.subscription),{checked:!0}),oneTime:e(e({},t.oneTime),{checked:!1})}}))},checked:!H.subscription.disabled&&H.subscription.checked,disabled:H.subscription.disabled},void 0),I&&i(T,{children:i(y,e({position:0,content:I.content,header:I.header,maxWidth:"248px",showCloseIcon:D,closeBtnSize:.7},{children:i(b.Actions.CircleQuestion,{width:1},void 0)}),void 0)},void 0)]}),void 0),i(v,{testId:"subscription",finalPrice:"$".concat(p(Number(X))),disabled:H.subscription.disabled,highlighted:!H.subscription.disabled&&H.subscription.highlighted,size:m.Large,originalPrice:"$".concat(p(Number(U)))},void 0)]}),void 0),H.subscription.checked&&t(r,{children:[i(k,e({disabled:H.subscription.disabled},{children:function(){var t=H.subscription.disabled;if(M){var r=t?{opacity:.5,pointerEvents:"none"}:{};return a.map(M,(function(t){return n(t)?d(t,{style:e(e({},t.props.style),r)}):t}))}return w?i(A,{benefits:w,disabled:t},void 0):null}()}),void 0),q&&i(u,e({variant:"link",underline:!0,href:q.url,size:"regular",target:"_blank"},{children:q.text}),void 0),(null==L?void 0:L.showFrequencyText)&&i(V,{frequency:L,onChange:function(e){Q(H.subscription.checked?e.value:void 0)}},void 0)]},void 0)]}),void 0),t(S,e({"data-testid":"single-purchase-block",highlighted:H.oneTime.checked,disabled:H.oneTime.disabled,onClick:function(){return re("oneTime")}},{children:[i(j,{label:R.oneTime.label,icon:R.oneTime.icon,name:"oneTime",id:"oneTime",value:"oneTime",size:m.Medium,onChange:function(){$((function(t){return{subscription:e(e({},t.subscription),{checked:!1}),oneTime:e(e({},t.oneTime),{checked:!0})}}))},useV2Style:!0,checked:!H.oneTime.disabled&&H.oneTime.checked,disabled:H.oneTime.disabled},void 0),i(v,{testId:"single-purchase",finalPrice:"$".concat(p(Number(_))),disabled:H.oneTime.disabled,highlighted:!H.oneTime.disabled&&H.oneTime.highlighted,size:m.Large,originalPrice:"$".concat(p(Number(U)))},void 0)]}),void 0)]}),void 0)};export{G as SubscriptionPlanSelector};
2
2
  //# sourceMappingURL=SubscriptionPlanSelector.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import e from"../../cta/primary/ButtonPrimary.js";import"@emotion/react/jsx-runtime";import"../../../core/theme/Theme.js";import"../../../types/enums.js";import"../../cta/styled.js";import"../../PackSelectorV2/PackSelectoV2.js";import"../../absorbency-level/AbsorbencyLevel.js";import"../../accordion-options/AccordionOptions.js";import"../../accordion/Accordion.js";import"react";import"../../../utils/constants/offerAtCart.js";import"../../../utils/media.js";import"../../../utils/mock-content/CancellationFlowAccordion.js";import"../../dropdown/variants/simple/SimpleDropdown.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../tooltip/Styled.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import"../../radio/input/styles.js";import"../../autoship/styled.js";import"../../autoshipV2/styled.js";import"../../before-after/BeforeAfter.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../shared/card/Card.js";import"../../bundle/minimalistic/styled.js";import"../../text/Text.js";import"../../bundle/motivator/styled.js";import"../../bundle/simple/Simple.js";import"../../buynowpaylater/BuyNowPayLater.js";import"../../offer-banner/OfferBanner.js";import"../../cartProductItem/CloseIcon/CloseButton.js";import"../../cartProductItem/Description/Description.js";import"../../cartProductItem/Promo/Promo.js";import"../../cartProductItem/Title/Title.js";import"../../cartProductItem/TrashIcon/styled.js";import"../../checkbox/Checkbox.js";import"../../collection/grid/WithProductGrid.js";import"../../SkeletonBox/SkeletonBox.js";import"../../club-price-label/ClubPriceLabel.js";import"../../strength-bars/StrengthBars.js";import"../../pricing/priceLabelV4/PriceLabelV4.js";import"../../rating/starList/StarList.js";import"../../rating/styles.js";import"../../collection/product/mobile/styled.js";import"../../icon-button/IconButton.js";import"../../tag/variants/product/styled.js";import"../../collection/product/truekind/styled.js";import"../../color/ColorRadioGroup.js";import"../../color/selector/PatternSelector.js";import"../../color/styles/ColorPickerwithTootip.styled.js";import"../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../delivery-details/DeliveryDetails.js";import"../../delivery-details/Note/Note.js";import"../../drawer/style.js";import"../../dropdown-list-icons/Styled.js";import"../../dropdown/size-dropdown/Styled.js";import"../../dropdown/variants/dialog/DropdownDialog.js";import"../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../input/base/Error.js";import"../../shared/select/BaseSelect.js";import"../../dropdown/variants/smart/styled.js";import"../../filtering/Accordion.js";import"../../filtering/FiltersStyled.js";import"../../filtering/Tags/Tags.js";import"../../fit-guarantee/FitGuarantee.js";import"../../fit/FitPredictor.js";import"../../slider/ArrowButton.js";import"../../slider/StyledSlider.js";import"../../gallery/components/ImageSmallPreview/styled.js";import"../../gallery/components/ImagePreviewList/styled.js";import"../../molecules/Video/components/styled.js";import"../../molecules/Video/styled.js";import"../../gallery/components/ImageProductSlide/styled.js";import"../../gallery/styled.js";import"../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js";import"../../iconsWithTitle/index.js";import"../../image-card/ImageCard.js";import"../../input/label/Label.js";import"../../input/base/Styled.js";import"../../input/custom/Custom.js";import"../../input/basePlusButton/BasePlusButton.js";import"../../input/basePlusIcon/BasePlusIcon.js";import"../../modal/Modal.js";import"../../motivator-progress-bar/MotivatorProgressBar.js";import"../../order-bar/OrderBar.js";import"../../packs/selector/PackSelector.js";import"../../pagination/styles.js";import"../../payment-methods/PaymentMethod.js";import"../../product/order/item/SimpleOrderItem.js";import"../../progress-bar/ProgressBar.js";import"../../quantityPicker/styled.js";import"../../radio/RadioPrimary/radioPrimary.js";import"../../radio/clubRadioInput/clubRadio.js";import"../../review-detail/ReviewDetail.js";import"../../review/Review.js";import"../../reviews-header/ReviewsHeader.js";import"../../scroll-to-top/ScrollToTop.js";import"../../search-bar/components/ClearButton/styled.js";import"../../search-bar/components/Footer/styled.js";import"../../search-bar/components/ProductItem/styled.js";import"../../search-bar/components/ResultsPanel/styled.js";import"../../search-bar/components/SearchControl/styled.js";import"../../search-bar/styled.js";import"../../search-navigation/styled.js";import"react-dom";import"../../short-banner/ShortBanner.js";import"../../size-chart/styled.js";import"../../size-table/SizeTable.js";import"../../size/guide/SizeFitGuide.js";import"../../size/selector/styled.js";import"../../tabs/Tab.js";import"../../tabs/Tabs.js";import"../../tag/Tag.js";import"@emotion/react";import"../../textWithImage/index.js";import"../../timer/styled.js";import"../../toast/Toast.js";import"../../totals/total/styled.js";import"../../totals/subtotal/Subtotal.js";import"../../tracking-progress-v2/TrackingProgressV2.js";import"../../tracking-progress/TrackingProgress.js";import"../AutoshipOfferCard/AutoshipOfferCardItem.styled.js";import"../AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js";import"../AutoshipPdpCard/AutoshipPdpCard.styled.js";import"../BasicAccordion/BasicAccordion.js";import"../CartItemCard/CartItem.js";import"../ClubOfferSelector/styled.js";import"../ClubOfferSelector2/styled.js";import"../JoinClubCard/joinClubCard.js";import"../OfferAtCart/styled.js";import"../OfferAtCartV2/styled.js";import"../OfferAtCartV3/styled.js";import"../OfferAtCartV4/styled.js";import"../OfferAtPDP/styled.js";import"../OfferAtPDP/types.js";import"../ProductCard/ProductCardV1/ProductCard.js";import"../ProductCard/ProductCardV2/styled.js";import"../ProductCard/ProductCardV3/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js";import"../ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js";import"../ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js";import"@ant-design/react-slick";import"../ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js";import"react-inner-image-zoom";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV5/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/styled.js";import"../SizeCharTable/SizeChartTableV2/styled.js";import"../SizeCharTable/SizeChartTableV3/styled.js";import"../../molecules/ArrowTip/ArrowTip.styled.js";import"../SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js";import"../SubscriptionPlanSelector/styled.js";import"./Greeting.styled.js";import{Container as i,TitleWrapper as s,BodyContainer as l,GridContainer as a,BottomCopyWrapper as m,OutLineButtonContainer as p,SaveLessLinkButton as d,BtnOutlineWrapper as c}from"./Card.styled.js";import{DescriptionItem as n}from"./DescriptionItem.js";import{BottomButtonVersionsTypes as j}from"./types.js";import"../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js";import"../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js";import"../../molecules/CouponCard/styled.js";import"../../molecules/BenefitsList/styled.js";import"../../molecules/HurryUp/styled.js";import"../../molecules/Spinner/styled.js";import"../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js";import"../../molecules/LikeButton/styled.js";import{ScarcityTag as y}from"../../molecules/ScarcityTag/ScarcityTag.js";function u(u){var b=u.title,P=u.saveLessButtonAction,C=u.saveLessButtonLabel,f=u.saveMoreButtonAction,g=u.saveMoreButtonLabel,h=u.descriptions,v=u.version,S=u.bottomCopy,V=u.titleBackgroundColor,T=u.scarcityText,G=u.scarcityTextColor;return r(i,t({id:"twoCtasAtCart"},{children:[o(s,t({id:"twoCtasAtCartTitle",backgroundColor:null!=V?V:void 0},{children:b}),void 0),o(e,{onClick:f,text:g,wide:!0},void 0),T&&o(y,{text:T,color:G},void 0),r(l,{children:[o(a,{children:h.map((function(t,r){return o(n,{text:t.text,smallerText:t.smallerText,iconName:null==t?void 0:t.iconName,type:null==t?void 0:t.type,link:null==t?void 0:t.link},"".concat(t.text,"-").concat(r))}))},void 0),S&&o(m,{dangerouslySetInnerHTML:{__html:S}},void 0)]},void 0),o(p,{children:v===j.link?o(d,t({href:"#",onClick:P},{children:C}),void 0):o(c,{wide:!0,onClick:P,text:C},void 0)},void 0)]}),void 0)}export{u as TwoCtasAtCart};
1
+ import{__assign as t}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import e from"../../cta/primary/ButtonPrimary.js";import"@emotion/react/jsx-runtime";import"../../../core/theme/Theme.js";import"../../../types/enums.js";import"../../cta/styled.js";import"../../PackSelectorV2/PackSelectoV2.js";import"../../absorbency-level/AbsorbencyLevel.js";import"../../accordion-options/AccordionOptions.js";import"../../accordion/Accordion.js";import"react";import"../../../utils/constants/offerAtCart.js";import"../../../utils/media.js";import"../../../utils/mock-content/CancellationFlowAccordion.js";import"../../dropdown/variants/simple/SimpleDropdown.js";import"../../pricing/clubOffer/ClubOfferTag.js";import"../../pricing/discount/styled.js";import"../../pricing/styles.js";import"../../tooltip/Styled.js";import"../../atoms/PriceLabel/PriceLabel.js";import"../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js";import"../../atoms/HorizontalDivider/HorizontalDivider.js";import"../../atoms/Icon/Icon.js";import"../../atoms/Image/styled.js";import"../../atoms/PriceLabelV2/PriceLabelV2.js";import"../../atoms/Toggle/toggle.styled.js";import"../../radio/input/styles.js";import"../../autoship/styled.js";import"../../autoshipV2/styled.js";import"../../before-after/BeforeAfter.js";import"../../pricing/priceLabelV3/PriceLabelV3.js";import"../../pricing/priceLabelV5/PriceLabelV5.styled.js";import"../../pricing/priceLabelV6/PriceLabelV6.styled.js";import"../../shared/card/Card.js";import"../../bundle/minimalistic/styled.js";import"../../text/Text.js";import"../../bundle/motivator/styled.js";import"../../bundle/simple/Simple.js";import"../../buynowpaylater/BuyNowPayLater.js";import"../../offer-banner/OfferBanner.js";import"../../cartProductItem/CloseIcon/CloseButton.js";import"../../cartProductItem/Description/Description.js";import"../../cartProductItem/Promo/Promo.js";import"../../cartProductItem/Title/Title.js";import"../../cartProductItem/TrashIcon/styled.js";import"../../checkbox/Checkbox.js";import"../../collection/grid/WithProductGrid.js";import"../../SkeletonBox/SkeletonBox.js";import"../../club-price-label/ClubPriceLabel.js";import"../../strength-bars/StrengthBars.js";import"../../pricing/priceLabelV4/PriceLabelV4.js";import"../../rating/starList/StarList.js";import"../../rating/styles.js";import"../../collection/product/mobile/styled.js";import"../../icon-button/IconButton.js";import"../../tag/variants/product/styled.js";import"../../collection/product/truekind/styled.js";import"../../color/ColorRadioGroup.js";import"../../color/selector/PatternSelector.js";import"../../color/styles/ColorPickerwithTootip.styled.js";import"../../cross-sell/Checkbox/CrossSellCheckbox.js";import"../../delivery-details/DeliveryDetails.js";import"../../delivery-details/Note/Note.js";import"../../drawer/style.js";import"../../dropdown-list-icons/Styled.js";import"../../dropdown/size-dropdown/Styled.js";import"../../dropdown/variants/dialog/DropdownDialog.js";import"../../dropdown/base/BaseDropdown.js";import"@headlessui/react";import"../../input/base/Error.js";import"../../shared/select/BaseSelect.js";import"../../dropdown/variants/smart/styled.js";import"../../filtering/Accordion.js";import"../../filtering/FiltersStyled.js";import"../../filtering/Tags/Tags.js";import"../../fit-guarantee/FitGuarantee.js";import"../../fit/FitPredictor.js";import"../../molecules/Video/components/styled.js";import"../../molecules/Video/styled.js";import"../../slider/ArrowButton.js";import"../../slider/StyledSlider.js";import"../../gallery/components/ImageSmallPreview/styled.js";import"../../gallery/components/ImagePreviewList/styled.js";import"../../gallery/components/ImageProductSlide/styled.js";import"../../gallery/styled.js";import"../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js";import"../../iconsWithTitle/index.js";import"../../image-card/ImageCard.js";import"../../input/label/Label.js";import"../../input/base/Styled.js";import"../../input/custom/Custom.js";import"../../input/basePlusButton/BasePlusButton.js";import"../../input/basePlusIcon/BasePlusIcon.js";import"../../modal/Modal.js";import"../../motivator-progress-bar/MotivatorProgressBar.js";import"../../order-bar/OrderBar.js";import"../../packs/selector/PackSelector.js";import"../../pagination/styles.js";import"../../payment-methods/PaymentMethod.js";import"../../product/order/item/SimpleOrderItem.js";import"../../progress-bar/ProgressBar.js";import"../../quantityPicker/styled.js";import"../../radio/RadioPrimary/radioPrimary.js";import"../../radio/clubRadioInput/clubRadio.js";import"../../review-detail/ReviewDetail.js";import"../../review/Review.js";import"../../reviews-header/ReviewsHeader.js";import"../../scroll-to-top/ScrollToTop.js";import"../../search-bar/components/ClearButton/styled.js";import"../../search-bar/components/Footer/styled.js";import"../../search-bar/components/ProductItem/styled.js";import"../../search-bar/components/ResultsPanel/styled.js";import"../../search-bar/components/SearchControl/styled.js";import"../../search-bar/styled.js";import"../../search-navigation/styled.js";import"react-dom";import"../../short-banner/ShortBanner.js";import"../../size-chart/styled.js";import"../../size-table/SizeTable.js";import"../../size/guide/SizeFitGuide.js";import"../../size/selector/styled.js";import"../../tabs/Tab.js";import"../../tabs/Tabs.js";import"../../tag/Tag.js";import"@emotion/react";import"../../textWithImage/index.js";import"../../timer/styled.js";import"../../toast/Toast.js";import"../../totals/total/styled.js";import"../../totals/subtotal/Subtotal.js";import"../../tracking-progress-v2/TrackingProgressV2.js";import"../../tracking-progress/TrackingProgress.js";import"../AutoshipOfferCard/AutoshipOfferCardItem.styled.js";import"../AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js";import"../AutoshipPdpCard/AutoshipPdpCard.styled.js";import"../BasicAccordion/BasicAccordion.js";import"../CartItemCard/CartItem.js";import"../ClubOfferSelector/styled.js";import"../ClubOfferSelector2/styled.js";import"../JoinClubCard/joinClubCard.js";import"../OfferAtCart/styled.js";import"../OfferAtCartV2/styled.js";import"../OfferAtCartV3/styled.js";import"../OfferAtCartV4/styled.js";import"../OfferAtPDP/styled.js";import"../OfferAtPDP/types.js";import"../ProductCard/ProductCardV1/ProductCard.js";import"../ProductCard/ProductCardV2/styled.js";import"../ProductCard/ProductCardV3/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js";import"../ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js";import"../ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js";import"@ant-design/react-slick";import"../ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js";import"react-inner-image-zoom";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV5/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js";import"../ProductGalleryMobile/ProductGalleryMobileV6/styled.js";import"../SizeCharTable/SizeChartTableV2/styled.js";import"../SizeCharTable/SizeChartTableV3/styled.js";import"../../molecules/ArrowTip/ArrowTip.styled.js";import"../SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js";import"../SubscriptionPlanSelector/styled.js";import"./Greeting.styled.js";import{Container as i,TitleWrapper as s,BodyContainer as l,GridContainer as a,BottomCopyWrapper as m,OutLineButtonContainer as p,SaveLessLinkButton as d,BtnOutlineWrapper as c}from"./Card.styled.js";import{DescriptionItem as n}from"./DescriptionItem.js";import{BottomButtonVersionsTypes as j}from"./types.js";import"../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js";import"../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js";import"../../molecules/CouponCard/styled.js";import"../../molecules/BenefitsList/styled.js";import"../../molecules/HurryUp/styled.js";import"../../molecules/Spinner/styled.js";import"../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js";import"../../molecules/LikeButton/styled.js";import{ScarcityTag as y}from"../../molecules/ScarcityTag/ScarcityTag.js";function u(u){var b=u.title,P=u.saveLessButtonAction,C=u.saveLessButtonLabel,f=u.saveMoreButtonAction,g=u.saveMoreButtonLabel,h=u.descriptions,v=u.version,S=u.bottomCopy,V=u.titleBackgroundColor,T=u.scarcityText,G=u.scarcityTextColor;return r(i,t({id:"twoCtasAtCart"},{children:[o(s,t({id:"twoCtasAtCartTitle",backgroundColor:null!=V?V:void 0},{children:b}),void 0),o(e,{onClick:f,text:g,wide:!0},void 0),T&&o(y,{text:T,color:G},void 0),r(l,{children:[o(a,{children:h.map((function(t,r){return o(n,{text:t.text,smallerText:t.smallerText,iconName:null==t?void 0:t.iconName,type:null==t?void 0:t.type,link:null==t?void 0:t.link},"".concat(t.text,"-").concat(r))}))},void 0),S&&o(m,{dangerouslySetInnerHTML:{__html:S}},void 0)]},void 0),o(p,{children:v===j.link?o(d,t({href:"#",onClick:P},{children:C}),void 0):o(c,{wide:!0,onClick:P,text:C},void 0)},void 0)]}),void 0)}export{u as TwoCtasAtCart};
2
2
  //# sourceMappingURL=TwoCtasAtCart.js.map
package/build/index.d.ts CHANGED
@@ -2870,6 +2870,7 @@ declare type DropdownListIconsSubItem = {
2870
2870
  };
2871
2871
  declare type Filter = {
2872
2872
  title: string;
2873
+ translatedTitle?: string;
2873
2874
  columns: number;
2874
2875
  isOpenByDefault?: boolean;
2875
2876
  isLinkOption?: boolean;
@@ -2879,6 +2880,7 @@ declare type Filter = {
2879
2880
  type?: string;
2880
2881
  items: Array<{
2881
2882
  label: string;
2883
+ translatedLabel?: string;
2882
2884
  checked?: boolean;
2883
2885
  isLinkItem?: boolean;
2884
2886
  link?: string;
@@ -3408,6 +3410,10 @@ declare type ProductGalleryProps = {
3408
3410
  hasToPreserveOrder?: boolean;
3409
3411
  isRatioSquare?: boolean;
3410
3412
  itemsOnViewport?: number;
3413
+ videoAutoplay?: boolean;
3414
+ videoInPreview?: boolean;
3415
+ hideVideoControls?: boolean;
3416
+ alwaysPlayInPreview?: boolean;
3411
3417
  };
3412
3418
  declare const ProductGallery: FC<ProductGalleryProps>;
3413
3419
 
@@ -4590,6 +4596,10 @@ interface ProductGalleryMobileProps$3 {
4590
4596
  selectedValue?: ContentType;
4591
4597
  hasToPreserveOrder?: boolean;
4592
4598
  itemsOnViewport?: number;
4599
+ videoAutoplay?: boolean;
4600
+ hideVideoControls?: boolean;
4601
+ videoMuted?: boolean;
4602
+ videoLoop?: boolean;
4593
4603
  }
4594
4604
  declare const ProductGalleryMobile: react__default.FC<ProductGalleryMobileProps$3>;
4595
4605
 
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),r=require("@emotion/react/jsx-runtime"),i=require("react"),o=require("../../../SkeletonBox/SkeletonBox.js"),s=require("../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.js");require("../../../atoms/HorizontalDivider/HorizontalDivider.js"),require("../../../atoms/Icon/Icon.js");var t=require("../../../atoms/Image/Image.js");require("../../../atoms/PriceLabel/PriceLabel.js"),require("../../../atoms/PriceLabelV2/PriceLabelV2.js"),require("react/jsx-runtime"),require("../../../atoms/Toggle/toggle.styled.js");var l=require("../../../buynowpaylater/BuyNowPayLater.js"),n=require("../../../club-price-label/ClubPriceLabel.js"),a=require("../../../shared/spacing/Spacing.js"),d=require("../../../strength-bars/StrengthBars.js"),c=require("../../../../core/theme/Theme.js"),u=require("../../../../hooks/WindowDimensions.js");require("../../../../utils/constants/offerAtCart.js");var g=require("../../../../utils/getSrcSet/getSrcSet.js");require("../../../../utils/media.js"),require("../../../../utils/mock-content/CancellationFlowAccordion.js");var j=require("../../../../types/enums.js");require("../../../PackSelectorV2/PackSelectoV2.js"),require("../../../absorbency-level/AbsorbencyLevel.js"),require("../../../accordion-options/AccordionOptions.js"),require("../../../accordion/Accordion.js"),require("../../../dropdown/variants/simple/SimpleDropdown.js");var m=require("../../../icons/index.js");require("../../../radio/input/styles.js"),require("../../../tooltip/Styled.js"),require("../../../autoship/styled.js"),require("../../../autoshipV2/styled.js"),require("../../../before-after/BeforeAfter.js"),require("../../../pricing/clubOffer/ClubOfferTag.js");var v=require("../../../pricing/discount/DiscountTag.js"),p=require("../../../pricing/price/PriceLabel.js"),q=require("../../../pricing/priceLabelV2/PriceLabelV2.js");require("../../../pricing/priceLabelV3/PriceLabelV3.js"),require("../../../pricing/priceLabelV5/PriceLabelV5.styled.js");var y=require("../../../pricing/styles.js");require("../../../pricing/priceLabelV6/PriceLabelV6.styled.js"),require("../../../shared/card/Card.js"),require("../../../bundle/minimalistic/styled.js"),require("../../../text/Text.js"),require("../../../bundle/motivator/styled.js"),require("../../../bundle/simple/Simple.js"),require("../../../offer-banner/OfferBanner.js"),require("../../../cartProductItem/CloseIcon/CloseButton.js"),require("../../../cartProductItem/Description/Description.js"),require("../../../cartProductItem/Promo/Promo.js"),require("../../../cartProductItem/Title/Title.js"),require("../../../cartProductItem/TrashIcon/styled.js"),require("../../../checkbox/Checkbox.js"),require("../../grid/WithProductGrid.js");var b=require("../../../pricing/priceLabelV4/PriceLabelV4.js"),h=require("../../../rating/Rating.js"),P=require("./constants.js"),S=require("./styled.js"),f=require("../../../icon-button/IconButton.js");require("../../../tag/variants/product/styled.js"),require("../truekind/styled.js"),require("../../../color/ColorRadioGroup.js"),require("../../../color/selector/PatternSelector.js"),require("../../../color/styles/ColorPickerwithTootip.styled.js"),require("../../../cross-sell/Checkbox/CrossSellCheckbox.js"),require("../../../cta/styled.js"),require("../../../delivery-details/DeliveryDetails.js"),require("../../../delivery-details/Note/Note.js"),require("../../../drawer/style.js"),require("../../../dropdown-list-icons/Styled.js"),require("../../../dropdown/size-dropdown/Styled.js"),require("../../../dropdown/variants/dialog/DropdownDialog.js"),require("../../../dropdown/base/BaseDropdown.js"),require("@headlessui/react"),require("../../../input/base/Error.js"),require("../../../shared/select/BaseSelect.js"),require("../../../dropdown/variants/smart/styled.js"),require("../../../filtering/Accordion.js"),require("../../../filtering/FiltersStyled.js"),require("../../../filtering/Tags/Tags.js"),require("../../../fit-guarantee/FitGuarantee.js"),require("../../../fit/FitPredictor.js"),require("../../../slider/ArrowButton.js"),require("../../../slider/StyledSlider.js"),require("../../../gallery/components/ImageSmallPreview/styled.js"),require("../../../gallery/components/ImagePreviewList/styled.js"),require("../../../molecules/Video/components/styled.js"),require("../../../molecules/Video/styled.js"),require("../../../gallery/components/ImageProductSlide/styled.js"),require("../../../gallery/styled.js"),require("../../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js"),require("../../../iconsWithTitle/index.js"),require("../../../image-card/ImageCard.js"),require("../../../input/label/Label.js"),require("../../../input/base/Styled.js"),require("../../../input/custom/Custom.js"),require("../../../input/basePlusButton/BasePlusButton.js"),require("../../../input/basePlusIcon/BasePlusIcon.js"),require("../../../modal/Modal.js"),require("../../../motivator-progress-bar/MotivatorProgressBar.js"),require("../../../order-bar/OrderBar.js"),require("../../../packs/selector/PackSelector.js"),require("../../../pagination/styles.js"),require("../../../payment-methods/PaymentMethod.js"),require("../../../product/order/item/SimpleOrderItem.js"),require("../../../progress-bar/ProgressBar.js"),require("../../../quantityPicker/styled.js"),require("../../../radio/RadioPrimary/radioPrimary.js"),require("../../../radio/clubRadioInput/clubRadio.js"),require("../../../rating/starList/StarList.js"),require("../../../review-detail/ReviewDetail.js"),require("../../../review/Review.js"),require("../../../reviews-header/ReviewsHeader.js"),require("../../../scroll-to-top/ScrollToTop.js"),require("../../../search-bar/components/ClearButton/styled.js"),require("../../../search-bar/components/Footer/styled.js"),require("../../../search-bar/components/ProductItem/styled.js"),require("../../../search-bar/components/ResultsPanel/styled.js"),require("../../../search-bar/components/SearchControl/styled.js"),require("../../../search-bar/styled.js"),require("../../../search-navigation/styled.js"),require("react-dom"),require("../../../short-banner/ShortBanner.js"),require("../../../size-chart/styled.js"),require("../../../size-table/SizeTable.js"),require("../../../size/guide/SizeFitGuide.js"),require("../../../size/selector/styled.js"),require("../../../tabs/Tab.js"),require("../../../tabs/Tabs.js"),require("../../../tag/Tag.js"),require("@emotion/react"),require("../../../textWithImage/index.js"),require("../../../timer/styled.js"),require("../../../toast/Toast.js"),require("../../../totals/total/styled.js"),require("../../../totals/subtotal/Subtotal.js"),require("../../../tracking-progress-v2/TrackingProgressV2.js"),require("../../../tracking-progress/TrackingProgress.js"),require("../../../organisms/AutoshipOfferCard/AutoshipOfferCardItem.styled.js"),require("../../../organisms/AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js"),require("../../../organisms/AutoshipPdpCard/AutoshipPdpCard.styled.js"),require("../../../organisms/BasicAccordion/BasicAccordion.js"),require("../../../organisms/CartItemCard/CartItem.js"),require("../../../organisms/ClubOfferSelector/styled.js"),require("../../../organisms/ClubOfferSelector2/styled.js"),require("../../../organisms/JoinClubCard/joinClubCard.js"),require("../../../organisms/OfferAtCart/styled.js"),require("../../../organisms/OfferAtCartV2/styled.js"),require("../../../organisms/OfferAtCartV3/styled.js"),require("../../../organisms/OfferAtCartV4/styled.js"),require("../../../organisms/OfferAtPDP/styled.js"),require("../../../organisms/OfferAtPDP/types.js"),require("../../../organisms/ProductCard/ProductCardV1/ProductCard.js"),require("../../../organisms/ProductCard/ProductCardV2/styled.js"),require("../../../organisms/ProductCard/ProductCardV3/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js"),require("@ant-design/react-slick"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js"),require("react-inner-image-zoom"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV5/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV2/styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV3/styled.js"),require("../../../molecules/ArrowTip/ArrowTip.styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js"),require("../../../organisms/SubscriptionPlanSelector/styled.js"),require("../../../organisms/TwoCtasAtCart/Greeting.styled.js"),require("../../../organisms/TwoCtasAtCart/Card.styled.js"),require("../../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js"),require("../../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js"),require("../../../molecules/CouponCard/styled.js"),require("../../../molecules/BenefitsList/styled.js"),require("../../../molecules/HurryUp/styled.js"),require("../../../molecules/Spinner/styled.js"),require("../../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js");var C=require("../../../molecules/LikeButton/LikeButton.js");require("../../../molecules/ScarcityTag/ScarcityTag.styled.js");module.exports=function(x){var z,w,T,L,k,I,V,M,B,D,G,A=x.title,_=x.image,O=x.imageHover,F=x.price,R=x.rating,N=x.hideRating,W=void 0!==N&&N,E=x.size,H=x.alignName,Y=void 0===H?"center":H,J=x.url,K=x.className,Q=x.topTag,U=x.bottomTag,X=x.onClick,Z=x.priceDisplayType,$=void 0===Z?"default":Z,ee=x.priceAtBottom,re=x.ratingOnTop,ie=x.priceLoading,oe=x.noFollow,se=void 0!==oe&&oe,te=x.colorPicker,le=void 0===te?{display:!1,position:"top",component:void 0,componentContainerProps:{position:"absolute",top:"4px",right:"4px",padding:"0px",boxSizing:"border-box",zIndex:1}}:te,ne=x.isBNPL,ae=void 0===ne?{displayBNPL:!1,installments:4,installmentPrice:"",iconFolder:"PDP",iconName:"Klarna",showLogo:!0,iconColor:"#292929",fontSize:"12px"}:ne,de=x.hasStrength,ce=void 0===de?{strength:-1,description:""}:de,ue=x.clubPrice,ge=void 0===ue?"":ue,je=x.showClubPriceLabel,me=void 0!==je&&je,ve=x.isRatingLoading,pe=x.version,qe=void 0===pe?1:pe,ye=x.showDiscountPercentageTag,be=void 0!==ye&&ye,he=x.discountTagLoading,Pe=x.discountTag,Se=x.isOnViewport,fe=void 0!==Se&&Se,Ce=x.hasDefaultSize,xe=void 0!==Ce&&Ce,ze=x.clubOffer,we=x.likeBtn,Te=x.onClickBottomButton,Le=x.showDecimals,ke=void 0===Le||Le,Ie=x.showDivider,Ve=void 0!==Ie&&Ie,Me=x.invertPriceDirection,Be=void 0!==Me&&Me,De=x.priceAndReviewInOneLine,Ge=void 0!==De&&De,Ae=x.priceAndDiscountTagInOneLine,_e=void 0!==Ae&&Ae,Oe=c.useTheme(),Fe=S.getStylesBySize(E),Re=u.useWindowDimensions().isMobile,Ne=i.useMemo((function(){var e;return(e={},e[j.ComponentSize.Large]=8,e[j.ComponentSize.Medium]=4,e[j.ComponentSize.Small]=2,e)[E]}),[E]),We=function(i){var o,t,l,n,a,d;if(void 0===i&&(i=qe),"hidden"===$)return null;switch(i){case 4:return"styled"===$?r.jsx(b.PriceLabelV4,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,clubPrice:ge,styledPrice:!0,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700,color:null===(t=Oe.colors.pallete.brickRed)||void 0===t?void 0:t.color}:{fontSize:"16px",fontWeight:700,color:null===(o=Oe.colors.pallete.brickRed)||void 0===o?void 0:o.color}:void 0},void 0):r.jsx(b.PriceLabelV4,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,clubPrice:ge,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700,color:null===(n=Oe.colors.pallete.brickRed)||void 0===n?void 0:n.color}:{fontSize:"16px",fontWeight:700,color:null===(l=Oe.colors.pallete.brickRed)||void 0===l?void 0:l.color}:void 0},void 0);case 5:return r.jsx(S.ClubOfferPriceLabelWrapper,e.__assign({style:null==ze?void 0:ze.wrapperStyle},{children:r.jsx(s.ClubPriceMemberLabel,{isClub:!0,isPDP:!0,finalPrice:null===(a=null==ze?void 0:ze.price)||void 0===a?void 0:a.finalPrice,originalPrice:null===(d=null==ze?void 0:ze.price)||void 0===d?void 0:d.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,icon:null==ze?void 0:ze.clubOfferIcon,isCollections:null==ze?void 0:ze.isCollections},void 0)}),void 0);default:return"styled"===$?r.jsx(q.PriceLabelV2,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Large,testId:"volume-discount",showDecimals:ke},void 0):r.jsx(p.PriceLabel,{invertDirection:Be,finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount",clubStyle:me,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700}:{fontSize:"16px",fontWeight:700}:void 0},void 0)}},Ee=function(){return W||!R.reviews&&!R.rating?r.jsx(r.Fragment,{},void 0):ve?r.jsx(o,{height:"20px",width:"80px"},void 0):r.jsx(h.Rating,{size:E===j.ComponentSize.Large?j.ComponentSize.Small:j.ComponentSize.XSmall,rating:R.rating,reviews:null==R?void 0:R.reviews,reviewsText:"",wrapWithParenthesis:!0},void 0)},He=i.useState(null!==(z=null==we?void 0:we.isLiked)&&void 0!==z&&z),Ye=He[0],Je=He[1],Ke=i.useState(null!==(w=null==we?void 0:we.likes)&&void 0!==w?w:0),Qe=Ke[0],Ue=Ke[1],Xe=_e?S.InlineContainer:i.Fragment;return r.jsxs(S.ProdCardContainer,e.__assign({className:K,"data-testid":"product-card-container-div"},{children:["corner"===le.position&&r.jsx(S.CornerContainer,e.__assign({},le.componentContainerProps,{children:le.component}),void 0),r.jsxs(S.Container,e.__assign({as:J?"a":"div",href:J,rel:se?"nofollow":"",className:"picContainer",onClick:X},{children:[!!we&&r.jsx(C.LikeButton,{isLiked:Ye,likes:Qe,onClick:function(e){e.stopPropagation(),Ue(Ye?function(e){return e-1}:function(e){return e+1}),Je((function(e){return!e})),null==we||we.onClick(e)},colors:{background:{active:null!==(k=null===(L=null===(T=we.colors)||void 0===T?void 0:T.background)||void 0===L?void 0:L.active)&&void 0!==k?k:Oe.colors.shades.white.color,hover:null!==(G=null!==(M=null===(V=null===(I=we.colors)||void 0===I?void 0:I.background)||void 0===V?void 0:V.hover)&&void 0!==M?M:null===(D=null===(B=we.colors)||void 0===B?void 0:B.background)||void 0===D?void 0:D.active)&&void 0!==G?G:Oe.colors.shades.white.color}}},void 0),Q||U?r.jsxs(S.ImageContainer,e.__assign({width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height,"data-testid":"tags-image-container"},{children:[r.jsx(t.Image,{src:_.src,srcSet:g.getSrcSet(_.src,180,360,720,960),alt:_.alt,width:xe?null==Fe?void 0:Fe.width:"100%",height:xe?null==Fe?void 0:Fe.height:"100%",loading:fe?"eager":"lazy",decoding:fe?"sync":"async",borderRadius:P.STYLES_BY_THEME[Oe.name].image.borderRadius},void 0),r.jsx(S.TopTagContainer,e.__assign({style:{width:le.display?"100%":"inherit"}},{children:Q}),void 0),r.jsx(S.BottomTagContainer,e.__assign({style:{width:le.display?"100%":"inherit"}},{children:U}),void 0)]}),void 0):r.jsx(t.Image,{src:_.src,srcSet:g.getSrcSet(_.src,180,360,720,960),alt:_.alt,width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height,loading:fe?"eager":"lazy",decoding:fe?"sync":"async",borderRadius:P.STYLES_BY_THEME[Oe.name].image.borderRadius},void 0),O?r.jsx(S.ImageHoverContainer,{className:"hover__image",src:O.src,srcSet:g.getSrcSet(O.src,180,360,720,960),loading:"lazy",decoding:"async",alt:O.alt,width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height},void 0):null]}),void 0),le.display&&"top"===le.position&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),le.component]},void 0),re&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(Ee,{},void 0)]},void 0),r.jsxs(S.Container,e.__assign({as:J?"a":"div",href:J,rel:se?"nofollow":"",onClick:X,className:"textContainer",style:{alignItems:me?"flex-start":"center"}},{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(S.Title,e.__assign({theme:Oe,align:me?"left":Y,"data-testid":"product-card-title"},{children:A}),void 0),r.jsx(a.Spacing,{size:Ne},void 0),Ve&&r.jsxs(r.Fragment,{children:[r.jsx(S.Divider,{theme:Oe},void 0),r.jsx(a.Spacing,{size:Ne},void 0)]},void 0),ce&&-1!==ce.strength&&r.jsxs(r.Fragment,{children:[r.jsx(d.StrengthBars,{barsFilled:ce.strength,supportText:ce.description},void 0),r.jsx(a.Spacing,{size:10},void 0)]},void 0),ee&&!re?r.jsxs(r.Fragment,{children:[r.jsx(Ee,{},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsxs(S.MarginTopContainer,e.__assign({style:{marginTop:(null==ze?void 0:ze.isClubOffer)?0:8}},{children:[ie?r.jsx(o,{height:"20px",width:"140px"},void 0):We(),(null==ze?void 0:ze.isClubOffer)&&We(5)]}),void 0)]},void 0):r.jsxs(r.Fragment,{children:[r.jsxs(Xe,{children:[ie?r.jsx(o,{height:"20px",width:"140px"},void 0):Ge&&!re?r.jsxs(S.OneLineInfoWrapper,{children:[We(),r.jsx(Ee,{},void 0)]},void 0):r.jsxs(r.Fragment,{children:[!(null==ze?void 0:ze.isClubMember)&&We(),(null==ze?void 0:ze.isClubOffer)&&We(5),r.jsx(l.BuyNowPayLater,{displayBNPL:null==ae?void 0:ae.displayBNPL,installments:(null==ae?void 0:ae.installments)||0,installmentPrice:(null==ae?void 0:ae.installmentPrice)||"",iconFolder:null==ae?void 0:ae.iconFolder,iconName:(null==ae?void 0:ae.iconName)||"",showLogo:null==ae?void 0:ae.showLogo,iconColor:null==ae?void 0:ae.iconColor,fontSize:null==ae?void 0:ae.fontSize},void 0)]},void 0),me&&r.jsx(n.ClubPriceLabel,{clubPrice:ge},void 0),he?r.jsx(o,{height:"22px",width:"75px"},void 0):be&&r.jsx(y.TagContainer,e.__assign({size:j.ComponentSize.Small},{children:Pe&&r.jsx(v.DiscountTag,e.__assign({},Pe,{size:j.ComponentSize.Medium,style:{letterSpacing:"-0.05rem"}}),void 0)}),void 0)]},void 0),r.jsx(a.Spacing,{size:Ne},void 0),!re&&!Ge&&r.jsx(Ee,{},void 0)]},void 0),!!Te&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsxs(f.IconButton,e.__assign({size:j.ComponentSize.Small,width:"100%",onClick:function(e){e.preventDefault(),e.stopPropagation(),null==Te||Te(e)},backgroundColor:{active:"transparent",hover:"transparent"},hasText:!0,rounded:!1,border:"1px solid #D1D1D1"},{children:[r.jsx(m.Icon.Custom.Eye,{fill:"black",width:"16px",height:"16px"},void 0),r.jsx("span",e.__assign({style:{color:"black",fontSize:"14px"}},{children:"Quick View"}),void 0)]}),void 0)]},void 0)]}),void 0),le.display&&"bottom"===le.position&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),le.component]},void 0)]}),void 0)};
1
+ "use strict";var e=require("tslib"),r=require("@emotion/react/jsx-runtime"),i=require("react"),o=require("../../../SkeletonBox/SkeletonBox.js"),s=require("../../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.js");require("../../../atoms/HorizontalDivider/HorizontalDivider.js"),require("../../../atoms/Icon/Icon.js");var t=require("../../../atoms/Image/Image.js");require("../../../atoms/PriceLabel/PriceLabel.js"),require("../../../atoms/PriceLabelV2/PriceLabelV2.js"),require("react/jsx-runtime"),require("../../../atoms/Toggle/toggle.styled.js");var l=require("../../../buynowpaylater/BuyNowPayLater.js"),n=require("../../../club-price-label/ClubPriceLabel.js"),a=require("../../../shared/spacing/Spacing.js"),d=require("../../../strength-bars/StrengthBars.js"),c=require("../../../../core/theme/Theme.js"),u=require("../../../../hooks/WindowDimensions.js");require("../../../../utils/constants/offerAtCart.js");var g=require("../../../../utils/getSrcSet/getSrcSet.js");require("../../../../utils/media.js"),require("../../../../utils/mock-content/CancellationFlowAccordion.js");var j=require("../../../../types/enums.js");require("../../../PackSelectorV2/PackSelectoV2.js"),require("../../../absorbency-level/AbsorbencyLevel.js"),require("../../../accordion-options/AccordionOptions.js"),require("../../../accordion/Accordion.js"),require("../../../dropdown/variants/simple/SimpleDropdown.js");var m=require("../../../icons/index.js");require("../../../radio/input/styles.js"),require("../../../tooltip/Styled.js"),require("../../../autoship/styled.js"),require("../../../autoshipV2/styled.js"),require("../../../before-after/BeforeAfter.js"),require("../../../pricing/clubOffer/ClubOfferTag.js");var v=require("../../../pricing/discount/DiscountTag.js"),p=require("../../../pricing/price/PriceLabel.js"),q=require("../../../pricing/priceLabelV2/PriceLabelV2.js");require("../../../pricing/priceLabelV3/PriceLabelV3.js"),require("../../../pricing/priceLabelV5/PriceLabelV5.styled.js");var y=require("../../../pricing/styles.js");require("../../../pricing/priceLabelV6/PriceLabelV6.styled.js"),require("../../../shared/card/Card.js"),require("../../../bundle/minimalistic/styled.js"),require("../../../text/Text.js"),require("../../../bundle/motivator/styled.js"),require("../../../bundle/simple/Simple.js"),require("../../../offer-banner/OfferBanner.js"),require("../../../cartProductItem/CloseIcon/CloseButton.js"),require("../../../cartProductItem/Description/Description.js"),require("../../../cartProductItem/Promo/Promo.js"),require("../../../cartProductItem/Title/Title.js"),require("../../../cartProductItem/TrashIcon/styled.js"),require("../../../checkbox/Checkbox.js"),require("../../grid/WithProductGrid.js");var b=require("../../../pricing/priceLabelV4/PriceLabelV4.js"),h=require("../../../rating/Rating.js"),P=require("./constants.js"),S=require("./styled.js"),f=require("../../../icon-button/IconButton.js");require("../../../tag/variants/product/styled.js"),require("../truekind/styled.js"),require("../../../color/ColorRadioGroup.js"),require("../../../color/selector/PatternSelector.js"),require("../../../color/styles/ColorPickerwithTootip.styled.js"),require("../../../cross-sell/Checkbox/CrossSellCheckbox.js"),require("../../../cta/styled.js"),require("../../../delivery-details/DeliveryDetails.js"),require("../../../delivery-details/Note/Note.js"),require("../../../drawer/style.js"),require("../../../dropdown-list-icons/Styled.js"),require("../../../dropdown/size-dropdown/Styled.js"),require("../../../dropdown/variants/dialog/DropdownDialog.js"),require("../../../dropdown/base/BaseDropdown.js"),require("@headlessui/react"),require("../../../input/base/Error.js"),require("../../../shared/select/BaseSelect.js"),require("../../../dropdown/variants/smart/styled.js"),require("../../../filtering/Accordion.js"),require("../../../filtering/FiltersStyled.js"),require("../../../filtering/Tags/Tags.js"),require("../../../fit-guarantee/FitGuarantee.js"),require("../../../fit/FitPredictor.js"),require("../../../molecules/Video/components/styled.js"),require("../../../molecules/Video/styled.js"),require("../../../slider/ArrowButton.js"),require("../../../slider/StyledSlider.js"),require("../../../gallery/components/ImageSmallPreview/styled.js"),require("../../../gallery/components/ImagePreviewList/styled.js"),require("../../../gallery/components/ImageProductSlide/styled.js"),require("../../../gallery/styled.js"),require("../../../icon-button/amazonAndPaypal/AmazonPaypalButtons.js"),require("../../../iconsWithTitle/index.js"),require("../../../image-card/ImageCard.js"),require("../../../input/label/Label.js"),require("../../../input/base/Styled.js"),require("../../../input/custom/Custom.js"),require("../../../input/basePlusButton/BasePlusButton.js"),require("../../../input/basePlusIcon/BasePlusIcon.js"),require("../../../modal/Modal.js"),require("../../../motivator-progress-bar/MotivatorProgressBar.js"),require("../../../order-bar/OrderBar.js"),require("../../../packs/selector/PackSelector.js"),require("../../../pagination/styles.js"),require("../../../payment-methods/PaymentMethod.js"),require("../../../product/order/item/SimpleOrderItem.js"),require("../../../progress-bar/ProgressBar.js"),require("../../../quantityPicker/styled.js"),require("../../../radio/RadioPrimary/radioPrimary.js"),require("../../../radio/clubRadioInput/clubRadio.js"),require("../../../rating/starList/StarList.js"),require("../../../review-detail/ReviewDetail.js"),require("../../../review/Review.js"),require("../../../reviews-header/ReviewsHeader.js"),require("../../../scroll-to-top/ScrollToTop.js"),require("../../../search-bar/components/ClearButton/styled.js"),require("../../../search-bar/components/Footer/styled.js"),require("../../../search-bar/components/ProductItem/styled.js"),require("../../../search-bar/components/ResultsPanel/styled.js"),require("../../../search-bar/components/SearchControl/styled.js"),require("../../../search-bar/styled.js"),require("../../../search-navigation/styled.js"),require("react-dom"),require("../../../short-banner/ShortBanner.js"),require("../../../size-chart/styled.js"),require("../../../size-table/SizeTable.js"),require("../../../size/guide/SizeFitGuide.js"),require("../../../size/selector/styled.js"),require("../../../tabs/Tab.js"),require("../../../tabs/Tabs.js"),require("../../../tag/Tag.js"),require("@emotion/react"),require("../../../textWithImage/index.js"),require("../../../timer/styled.js"),require("../../../toast/Toast.js"),require("../../../totals/total/styled.js"),require("../../../totals/subtotal/Subtotal.js"),require("../../../tracking-progress-v2/TrackingProgressV2.js"),require("../../../tracking-progress/TrackingProgress.js"),require("../../../organisms/AutoshipOfferCard/AutoshipOfferCardItem.styled.js"),require("../../../organisms/AutoshipOfferCardCta/AutoshipOfferCardItem.styled.js"),require("../../../organisms/AutoshipPdpCard/AutoshipPdpCard.styled.js"),require("../../../organisms/BasicAccordion/BasicAccordion.js"),require("../../../organisms/CartItemCard/CartItem.js"),require("../../../organisms/ClubOfferSelector/styled.js"),require("../../../organisms/ClubOfferSelector2/styled.js"),require("../../../organisms/JoinClubCard/joinClubCard.js"),require("../../../organisms/OfferAtCart/styled.js"),require("../../../organisms/OfferAtCartV2/styled.js"),require("../../../organisms/OfferAtCartV3/styled.js"),require("../../../organisms/OfferAtCartV4/styled.js"),require("../../../organisms/OfferAtPDP/styled.js"),require("../../../organisms/OfferAtPDP/types.js"),require("../../../organisms/ProductCard/ProductCardV1/ProductCard.js"),require("../../../organisms/ProductCard/ProductCardV2/styled.js"),require("../../../organisms/ProductCard/ProductCardV3/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV1/ProductGalleryMobile.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV2/ProductGalleryMobileV2.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV3/ProductGalleryMobileV3.js"),require("@ant-design/react-slick"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/ContentGallery/styled.js"),require("react-inner-image-zoom"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/MainContent/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/Slider/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV4/GalleryDetailed/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV5/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/ColorVariantsGallery/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/MainGallery/styled.js"),require("../../../organisms/ProductGalleryMobile/ProductGalleryMobileV6/styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV2/styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV3/styled.js"),require("../../../molecules/ArrowTip/ArrowTip.styled.js"),require("../../../organisms/SizeCharTable/SizeChartTableV4/SizeChartTableV4.styled.js"),require("../../../organisms/SubscriptionPlanSelector/styled.js"),require("../../../organisms/TwoCtasAtCart/Greeting.styled.js"),require("../../../organisms/TwoCtasAtCart/Card.styled.js"),require("../../../molecules/OfferAtCartBenefits/OfferAtCartBenefits.styled.js"),require("../../../molecules/OfferAtCartImage/OfferAtCartImage.styled.js"),require("../../../molecules/CouponCard/styled.js"),require("../../../molecules/BenefitsList/styled.js"),require("../../../molecules/HurryUp/styled.js"),require("../../../molecules/Spinner/styled.js"),require("../../../molecules/IconsWithTitleList/IconsWithTitleList.styled.js");var C=require("../../../molecules/LikeButton/LikeButton.js");require("../../../molecules/ScarcityTag/ScarcityTag.styled.js");module.exports=function(x){var z,w,T,L,k,I,V,M,B,D,G,A=x.title,_=x.image,O=x.imageHover,F=x.price,R=x.rating,N=x.hideRating,W=void 0!==N&&N,E=x.size,H=x.alignName,Y=void 0===H?"center":H,J=x.url,K=x.className,Q=x.topTag,U=x.bottomTag,X=x.onClick,Z=x.priceDisplayType,$=void 0===Z?"default":Z,ee=x.priceAtBottom,re=x.ratingOnTop,ie=x.priceLoading,oe=x.noFollow,se=void 0!==oe&&oe,te=x.colorPicker,le=void 0===te?{display:!1,position:"top",component:void 0,componentContainerProps:{position:"absolute",top:"4px",right:"4px",padding:"0px",boxSizing:"border-box",zIndex:1}}:te,ne=x.isBNPL,ae=void 0===ne?{displayBNPL:!1,installments:4,installmentPrice:"",iconFolder:"PDP",iconName:"Klarna",showLogo:!0,iconColor:"#292929",fontSize:"12px"}:ne,de=x.hasStrength,ce=void 0===de?{strength:-1,description:""}:de,ue=x.clubPrice,ge=void 0===ue?"":ue,je=x.showClubPriceLabel,me=void 0!==je&&je,ve=x.isRatingLoading,pe=x.version,qe=void 0===pe?1:pe,ye=x.showDiscountPercentageTag,be=void 0!==ye&&ye,he=x.discountTagLoading,Pe=x.discountTag,Se=x.isOnViewport,fe=void 0!==Se&&Se,Ce=x.hasDefaultSize,xe=void 0!==Ce&&Ce,ze=x.clubOffer,we=x.likeBtn,Te=x.onClickBottomButton,Le=x.showDecimals,ke=void 0===Le||Le,Ie=x.showDivider,Ve=void 0!==Ie&&Ie,Me=x.invertPriceDirection,Be=void 0!==Me&&Me,De=x.priceAndReviewInOneLine,Ge=void 0!==De&&De,Ae=x.priceAndDiscountTagInOneLine,_e=void 0!==Ae&&Ae,Oe=c.useTheme(),Fe=S.getStylesBySize(E),Re=u.useWindowDimensions().isMobile,Ne=i.useMemo((function(){var e;return(e={},e[j.ComponentSize.Large]=8,e[j.ComponentSize.Medium]=4,e[j.ComponentSize.Small]=2,e)[E]}),[E]),We=function(i){var o,t,l,n,a,d;if(void 0===i&&(i=qe),"hidden"===$)return null;switch(i){case 4:return"styled"===$?r.jsx(b.PriceLabelV4,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,clubPrice:ge,styledPrice:!0,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700,color:null===(t=Oe.colors.pallete.brickRed)||void 0===t?void 0:t.color}:{fontSize:"16px",fontWeight:700,color:null===(o=Oe.colors.pallete.brickRed)||void 0===o?void 0:o.color}:void 0},void 0):r.jsx(b.PriceLabelV4,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,clubPrice:ge,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700,color:null===(n=Oe.colors.pallete.brickRed)||void 0===n?void 0:n.color}:{fontSize:"16px",fontWeight:700,color:null===(l=Oe.colors.pallete.brickRed)||void 0===l?void 0:l.color}:void 0},void 0);case 5:return r.jsx(S.ClubOfferPriceLabelWrapper,e.__assign({style:null==ze?void 0:ze.wrapperStyle},{children:r.jsx(s.ClubPriceMemberLabel,{isClub:!0,isPDP:!0,finalPrice:null===(a=null==ze?void 0:ze.price)||void 0===a?void 0:a.finalPrice,originalPrice:null===(d=null==ze?void 0:ze.price)||void 0===d?void 0:d.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount-v4",clubStyle:me,icon:null==ze?void 0:ze.clubOfferIcon,isCollections:null==ze?void 0:ze.isCollections},void 0)}),void 0);default:return"styled"===$?r.jsx(q.PriceLabelV2,{finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Large,testId:"volume-discount",showDecimals:ke},void 0):r.jsx(p.PriceLabel,{invertDirection:Be,finalPrice:F.finalPrice,originalPrice:F.originalPrice,finalPriceStyled:!1,color:F.color,size:j.ComponentSize.Medium,testId:"volume-discount",clubStyle:me,finalPriceStyle:me?Re?{fontSize:"12px",fontWeight:700}:{fontSize:"16px",fontWeight:700}:void 0},void 0)}},Ee=function(){return W||!R.reviews&&!R.rating?r.jsx(r.Fragment,{},void 0):ve?r.jsx(o,{height:"20px",width:"80px"},void 0):r.jsx(h.Rating,{size:E===j.ComponentSize.Large?j.ComponentSize.Small:j.ComponentSize.XSmall,rating:R.rating,reviews:null==R?void 0:R.reviews,reviewsText:"",wrapWithParenthesis:!0},void 0)},He=i.useState(null!==(z=null==we?void 0:we.isLiked)&&void 0!==z&&z),Ye=He[0],Je=He[1],Ke=i.useState(null!==(w=null==we?void 0:we.likes)&&void 0!==w?w:0),Qe=Ke[0],Ue=Ke[1],Xe=_e?S.InlineContainer:i.Fragment;return r.jsxs(S.ProdCardContainer,e.__assign({className:K,"data-testid":"product-card-container-div"},{children:["corner"===le.position&&r.jsx(S.CornerContainer,e.__assign({},le.componentContainerProps,{children:le.component}),void 0),r.jsxs(S.Container,e.__assign({as:J?"a":"div",href:J,rel:se?"nofollow":"",className:"picContainer",onClick:X},{children:[!!we&&r.jsx(C.LikeButton,{isLiked:Ye,likes:Qe,onClick:function(e){e.stopPropagation(),Ue(Ye?function(e){return e-1}:function(e){return e+1}),Je((function(e){return!e})),null==we||we.onClick(e)},colors:{background:{active:null!==(k=null===(L=null===(T=we.colors)||void 0===T?void 0:T.background)||void 0===L?void 0:L.active)&&void 0!==k?k:Oe.colors.shades.white.color,hover:null!==(G=null!==(M=null===(V=null===(I=we.colors)||void 0===I?void 0:I.background)||void 0===V?void 0:V.hover)&&void 0!==M?M:null===(D=null===(B=we.colors)||void 0===B?void 0:B.background)||void 0===D?void 0:D.active)&&void 0!==G?G:Oe.colors.shades.white.color}}},void 0),Q||U?r.jsxs(S.ImageContainer,e.__assign({width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height,"data-testid":"tags-image-container"},{children:[r.jsx(t.Image,{src:_.src,srcSet:g.getSrcSet(_.src,180,360,720,960),alt:_.alt,width:xe?null==Fe?void 0:Fe.width:"100%",height:xe?null==Fe?void 0:Fe.height:"100%",loading:fe?"eager":"lazy",decoding:fe?"sync":"async",borderRadius:P.STYLES_BY_THEME[Oe.name].image.borderRadius},void 0),r.jsx(S.TopTagContainer,e.__assign({style:{width:le.display?"100%":"inherit"}},{children:Q}),void 0),r.jsx(S.BottomTagContainer,e.__assign({style:{width:le.display?"100%":"inherit"}},{children:U}),void 0)]}),void 0):r.jsx(t.Image,{src:_.src,srcSet:g.getSrcSet(_.src,180,360,720,960),alt:_.alt,width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height,loading:fe?"eager":"lazy",decoding:fe?"sync":"async",borderRadius:P.STYLES_BY_THEME[Oe.name].image.borderRadius},void 0),O?r.jsx(S.ImageHoverContainer,{className:"hover__image",src:O.src,srcSet:g.getSrcSet(O.src,180,360,720,960),loading:"lazy",decoding:"async",alt:O.alt,width:null==Fe?void 0:Fe.width,height:null==Fe?void 0:Fe.height},void 0):null]}),void 0),le.display&&"top"===le.position&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),le.component]},void 0),re&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(Ee,{},void 0)]},void 0),r.jsxs(S.Container,e.__assign({as:J?"a":"div",href:J,rel:se?"nofollow":"",onClick:X,className:"textContainer",style:{alignItems:me?"flex-start":"center"}},{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(S.Title,e.__assign({theme:Oe,align:me?"left":Y,"data-testid":"product-card-title"},{children:A}),void 0),r.jsx(a.Spacing,{size:Ne},void 0),Ve&&r.jsxs(r.Fragment,{children:[r.jsx(S.Divider,{theme:Oe},void 0),r.jsx(a.Spacing,{size:Ne},void 0)]},void 0),ce&&-1!==ce.strength&&r.jsxs(r.Fragment,{children:[r.jsx(d.StrengthBars,{barsFilled:ce.strength,supportText:ce.description},void 0),r.jsx(a.Spacing,{size:10},void 0)]},void 0),ee&&!re?r.jsxs(r.Fragment,{children:[r.jsx(Ee,{},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsxs(S.MarginTopContainer,e.__assign({style:{marginTop:(null==ze?void 0:ze.isClubOffer)?0:8}},{children:[ie?r.jsx(o,{height:"20px",width:"140px"},void 0):We(),(null==ze?void 0:ze.isClubOffer)&&We(5)]}),void 0)]},void 0):r.jsxs(r.Fragment,{children:[r.jsxs(Xe,{children:[ie?r.jsx(o,{height:"20px",width:"140px"},void 0):Ge&&!re?r.jsxs(S.OneLineInfoWrapper,{children:[We(),r.jsx(Ee,{},void 0)]},void 0):r.jsxs(r.Fragment,{children:[!(null==ze?void 0:ze.isClubMember)&&We(),(null==ze?void 0:ze.isClubOffer)&&We(5),r.jsx(l.BuyNowPayLater,{displayBNPL:null==ae?void 0:ae.displayBNPL,installments:(null==ae?void 0:ae.installments)||0,installmentPrice:(null==ae?void 0:ae.installmentPrice)||"",iconFolder:null==ae?void 0:ae.iconFolder,iconName:(null==ae?void 0:ae.iconName)||"",showLogo:null==ae?void 0:ae.showLogo,iconColor:null==ae?void 0:ae.iconColor,fontSize:null==ae?void 0:ae.fontSize},void 0)]},void 0),me&&r.jsx(n.ClubPriceLabel,{clubPrice:ge},void 0),he?r.jsx(o,{height:"22px",width:"75px"},void 0):be&&r.jsx(y.TagContainer,e.__assign({size:j.ComponentSize.Small},{children:Pe&&r.jsx(v.DiscountTag,e.__assign({},Pe,{size:j.ComponentSize.Medium,style:{letterSpacing:"-0.05rem"}}),void 0)}),void 0)]},void 0),r.jsx(a.Spacing,{size:Ne},void 0),!re&&!Ge&&r.jsx(Ee,{},void 0)]},void 0),!!Te&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),r.jsx(a.Spacing,{size:Ne},void 0),r.jsxs(f.IconButton,e.__assign({size:j.ComponentSize.Small,width:"100%",onClick:function(e){e.preventDefault(),e.stopPropagation(),null==Te||Te(e)},backgroundColor:{active:"transparent",hover:"transparent"},hasText:!0,rounded:!1,border:"1px solid #D1D1D1"},{children:[r.jsx(m.Icon.Custom.Eye,{fill:"black",width:"16px",height:"16px"},void 0),r.jsx("span",e.__assign({style:{color:"black",fontSize:"14px"}},{children:"Quick View"}),void 0)]}),void 0)]},void 0)]}),void 0),le.display&&"bottom"===le.position&&r.jsxs(r.Fragment,{children:[r.jsx(a.Spacing,{size:Ne},void 0),le.component]},void 0)]}),void 0)};
2
2
  //# sourceMappingURL=ProductItemMobile.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("../../core/theme/Theme.js"),c=require("../../types/enums.js");require("../../utils/constants/offerAtCart.js"),require("../../utils/media.js"),require("../../utils/mock-content/CancellationFlowAccordion.js");var o=require("../../utils/simulateClick/simulateClick.js"),r=require("../checkbox/Checkbox.js");require("@emotion/react/jsx-runtime"),require("../cta/styled.js");var s=require("../cta/secondary/ButtonSecondary.js"),l=require("../icons/index.js"),a=require("../selector/simple/SelectorSecondary.js"),d=require("./Accordion.js"),u=require("./FiltersStyled.js"),h=require("./Tags/Tags.js"),x=function(e){var i=e.sectionIndex,o=e.text,s=e.itemIndex,l=e.onChange,a=e.checked,d=e.blockUncheck,u=t.useCallback((function(e){l({sectionIndex:i,itemIndex:s,checked:e})}),[l,i,s]);return n.jsx(r.Checkbox,{onChange:u,checked:a,text:o,id:"filter[".concat(i,",").concat(s,"]"),size:c.ComponentSize.Small,variant:"secondary",blockUncheck:d},s)},k=function(e){var i=e.sectionIndex,o=e.text,s=e.itemIndex,l=e.onChange,a=e.checked,d=e.blockUncheck,u=e.color,h=e.backgroundImage,x=t.useCallback((function(e){l({sectionIndex:i,itemIndex:s,checked:e})}),[l,i,s]);return n.jsx(r.Checkbox,{onChange:x,checked:a,text:o,id:"filter[".concat(i,",").concat(s,"]"),size:c.ComponentSize.Medium,variant:"color",blockUncheck:d,backgroundColor:u,backgroundImage:h},s)};exports.Filters=function(r){var f=r.values,m=r.onChange,b=r.tagsColor,g=void 0===b?"#fff6ef":b,I=r.filterByText,v=r.clearAllText,_=r.isMobile,j=r.filtersSelectText,C=r.showSelectedNumberInSection,p=void 0!==C&&C,y=r.applyText,M=r.mobileApplyButtonClick,q=r.mobileBackArrowClick,A=r.onResetValues,S=i.useTheme(),T=t.useState(f),w=T[0],U=T[1],B=t.useState(function(){var e=[];return f.forEach((function(n,t){n.items.forEach((function(n,i){n.checked&&!n.blockUncheck&&e.push({sectionIndex:t,sectionTitle:n.label,itemIndex:i,label:n.label})}))})),e}()),F=B[0],z=B[1],O=t.useState(),H=O[0],E=O[1];t.useEffect((function(){w.length&&H&&m(w,H)}),[H,w,m]);var L=t.useCallback((function(e){e.forEach((function(e){var n=e.sectionIndex,t=e.itemIndex;D({sectionIndex:n,itemIndex:t})}))}),[]),$=t.useCallback((function(n){var t=n.sectionIndex,i=n.itemIndex,c=n.checked;E({sectionIndex:t,itemIndex:i,checked:c});var o=w[t],r=null==o?void 0:o.items[i];(null==r?void 0:r.isLinkItem)&&(null==r?void 0:r.link)?c&&window.location.assign(r.link):(z((function(n){return o.isMultiselect||n.length>0&&L([]),c?e.__spreadArray(e.__spreadArray([],o.isMultiselect?n:n.filter((function(e){return e.sectionIndex!==t})),!0),[{sectionIndex:t,itemIndex:i,label:w[t].items[i].label,sectionTitle:w[t].title}],!1):n.filter((function(e){return e.sectionIndex!==t||e.itemIndex!==i}))})),U((function(n){return n.map((function(n,o){return t!==o?n:e.__assign(e.__assign({},n),{items:n.items.map((function(t,o){return e.__assign(e.__assign({},t),{label:t.label,checked:i===o?c:!!n.isMultiselect&&t.checked})}))})}))})))}),[w,L]),D=function(e){var n=e.sectionIndex,t=e.itemIndex,i=document.getElementById("filter[".concat(n,",").concat(t,"]"));o.simulateMouseClick(i)},R=function(){L(F),z([]),U((function(n){return n.map((function(n){return e.__assign(e.__assign({},n),{items:n.items.map((function(n){return e.__assign(e.__assign({},n),{checked:!!n.blockUncheck&&n.checked})}))})}))})),A()};return n.jsxs(n.Fragment,{children:[_?n.jsxs(u.MobileHeader,e.__assign({"data-testid":"MobileHeader"},{children:[n.jsx(u.MobileIconsContainer,e.__assign({onClick:q,"data-testid":"mobileBackArrow"},{children:n.jsx(l.Icon.Arrows.ChevronRightVariant,{fill:S.colors.shades[700].color},void 0)}),void 0),!!F.length&&n.jsxs(u.H4,e.__assign({color:S.colors.shades[700].color},{children:[j," (",F.length,")"]}),void 0)]}),void 0):n.jsx("div",e.__assign({"data-testid":"DesktopHeader"},{children:!!F.length&&n.jsxs(n.Fragment,{children:[n.jsxs(u.Header,{children:[n.jsxs(u.H4,e.__assign({color:S.colors.shades[700].color},{children:[I," (",F.length,")"]}),void 0),n.jsx(u.ClearAll,e.__assign({onClick:R,color:S.colors.shades[700].color,"data-testid":"desktop-clear-all"},{children:v}),void 0)]},void 0),n.jsx(h.Tags,{color:g,items:F.map((function(e){return"$75 And Above"===e.label?"+$75":e.label})),onCloseClick:function(e){return D(F[e])}},void 0)]},void 0)}),void 0),w.filter((function(e){return e.isLinkOption})).map((function(t,i){return n.jsx(u.OptionContainer,e.__assign({showInMobile:t.showInMobile,showInTablet:t.showInTablet,"data-testid":"linkOption"},{children:n.jsx(u.FilterLink,e.__assign({color:t.color||S.colors.shades[550].color,href:t.link},{children:t.title}),void 0)}),"option-container-".concat(i))})),w.filter((function(e){return!e.isLinkOption})).map((function(t){var i=function(e){var n=0,t="";return p&&(t=(n=F.filter((function(n){return n.sectionTitle==e.title})).length)>0&&p?"(".concat(n,")"):""),t}(t);return n.jsx(d.Accordion,e.__assign({title:"".concat(t.title," ").concat(i),isOpenByDefault:t.isOpenByDefault,showInMobile:t.showInMobile},{children:n.jsxs(u.SectionContent,e.__assign({cols:t.columns},{children:["size"===t.type&&t.items.map((function(e,i){var o=w.findIndex((function(e){return e.title===t.title}));return n.jsx(a,{size:c.ComponentSize.Medium,text:e.label,active:e.checked,disabled:e.blockUncheck,onClick:function(){return $({sectionIndex:o,itemIndex:i,checked:!e.checked})},width:"50px",id:"filter[".concat(o,",").concat(i,"]")},e.label)})),"color"===t.type&&t.items.map((function(e,i){var c;return n.jsx(k,{onChange:$,text:e.label,checked:e.checked,itemIndex:i,sectionIndex:w.findIndex((function(e){return e.title===t.title})),blockUncheck:e.blockUncheck,color:null!==(c=e.value)&&void 0!==c?c:"",backgroundImage:e.backgroundImage},"".concat(e.checked,"-").concat(e.label))})),!t.type&&t.items.map((function(e,i){return n.jsx(x,{onChange:$,text:"$75 And Above"===e.label?"+$75":e.label,checked:e.checked,itemIndex:i,sectionIndex:w.findIndex((function(e){return e.title===t.title})),blockUncheck:e.blockUncheck},"".concat(e.checked,"-").concat(e.label))}))]}),void 0)}),w.findIndex((function(e){return e.title===t.title})))})),_&&n.jsxs(u.MobileFooter,e.__assign({"data-testid":"MobileFooter"},{children:[n.jsxs(u.MobileClearContainer,e.__assign({onClick:R},{children:[n.jsx(u.MobileIconsContainer,{children:n.jsx(l.Icon.Actions.Trash,{fill:S.colors.shades[700].color},void 0)},void 0),n.jsx(u.ClearAll,e.__assign({color:S.colors.shades[700].color},{children:v}),void 0)]}),void 0),n.jsx(s,{text:y,onClick:M},void 0)]}),void 0)]},void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("../../core/theme/Theme.js"),c=require("../../types/enums.js");require("../../utils/constants/offerAtCart.js"),require("../../utils/media.js"),require("../../utils/mock-content/CancellationFlowAccordion.js");var o=require("../../utils/simulateClick/simulateClick.js"),l=require("../checkbox/Checkbox.js");require("@emotion/react/jsx-runtime"),require("../cta/styled.js");var r=require("../cta/secondary/ButtonSecondary.js"),s=require("../icons/index.js"),a=require("../selector/simple/SelectorSecondary.js"),d=require("./Accordion.js"),u=require("./FiltersStyled.js"),h=require("./Tags/Tags.js"),x=function(e){var i=e.sectionIndex,o=e.text,r=e.itemIndex,s=e.onChange,a=e.checked,d=e.blockUncheck,u=t.useCallback((function(e){s({sectionIndex:i,itemIndex:r,checked:e})}),[s,i,r]);return n.jsx(l.Checkbox,{onChange:u,checked:a,text:o,id:"filter[".concat(i,",").concat(r,"]"),size:c.ComponentSize.Small,variant:"secondary",blockUncheck:d},r)},k=function(e){var i=e.sectionIndex,o=e.text,r=e.itemIndex,s=e.onChange,a=e.checked,d=e.blockUncheck,u=e.color,h=e.backgroundImage,x=t.useCallback((function(e){s({sectionIndex:i,itemIndex:r,checked:e})}),[s,i,r]);return n.jsx(l.Checkbox,{onChange:x,checked:a,text:o,id:"filter[".concat(i,",").concat(r,"]"),size:c.ComponentSize.Medium,variant:"color",blockUncheck:d,backgroundColor:u,backgroundImage:h},r)};exports.Filters=function(l){var f=l.values,b=l.onChange,m=l.tagsColor,g=void 0===m?"#fff6ef":m,v=l.filterByText,I=l.clearAllText,_=l.isMobile,j=l.filtersSelectText,C=l.showSelectedNumberInSection,p=void 0!==C&&C,y=l.applyText,M=l.mobileApplyButtonClick,q=l.mobileBackArrowClick,A=l.onResetValues,T=i.useTheme(),S=t.useState(f),w=S[0],L=S[1],U=t.useState(function(){var e=[];return f.forEach((function(n,t){n.items.forEach((function(n,i){n.checked&&!n.blockUncheck&&e.push({sectionIndex:t,sectionTitle:n.label,itemIndex:i,label:n.label,translatedLabel:n.translatedLabel})}))})),e}()),B=U[0],F=U[1],z=t.useState(),O=z[0],H=z[1];t.useEffect((function(){w.length&&O&&b(w,O)}),[O,w,b]);var E=t.useCallback((function(e){e.forEach((function(e){var n=e.sectionIndex,t=e.itemIndex;D({sectionIndex:n,itemIndex:t})}))}),[]),$=t.useCallback((function(n){var t=n.sectionIndex,i=n.itemIndex,c=n.checked;H({sectionIndex:t,itemIndex:i,checked:c});var o=w[t],l=null==o?void 0:o.items[i];(null==l?void 0:l.isLinkItem)&&(null==l?void 0:l.link)?c&&window.location.assign(l.link):(F((function(n){return o.isMultiselect||n.length>0&&E([]),c?e.__spreadArray(e.__spreadArray([],o.isMultiselect?n:n.filter((function(e){return e.sectionIndex!==t})),!0),[{sectionIndex:t,itemIndex:i,label:w[t].items[i].label,translatedLabel:w[t].items[i].translatedLabel,sectionTitle:w[t].title}],!1):n.filter((function(e){return e.sectionIndex!==t||e.itemIndex!==i}))})),L((function(n){return n.map((function(n,o){return t!==o?n:e.__assign(e.__assign({},n),{items:n.items.map((function(t,o){return e.__assign(e.__assign({},t),{label:t.label,checked:i===o?c:!!n.isMultiselect&&t.checked})}))})}))})))}),[w,E]),D=function(e){var n=e.sectionIndex,t=e.itemIndex,i=document.getElementById("filter[".concat(n,",").concat(t,"]"));o.simulateMouseClick(i)},R=function(){E(B),F([]),L((function(n){return n.map((function(n){return e.__assign(e.__assign({},n),{items:n.items.map((function(n){return e.__assign(e.__assign({},n),{checked:!!n.blockUncheck&&n.checked})}))})}))})),A()};return n.jsxs(n.Fragment,{children:[_?n.jsxs(u.MobileHeader,e.__assign({"data-testid":"MobileHeader"},{children:[n.jsx(u.MobileIconsContainer,e.__assign({onClick:q,"data-testid":"mobileBackArrow"},{children:n.jsx(s.Icon.Arrows.ChevronRightVariant,{fill:T.colors.shades[700].color},void 0)}),void 0),!!B.length&&n.jsxs(u.H4,e.__assign({color:T.colors.shades[700].color},{children:[j," (",B.length,")"]}),void 0)]}),void 0):n.jsx("div",e.__assign({"data-testid":"DesktopHeader"},{children:!!B.length&&n.jsxs(n.Fragment,{children:[n.jsxs(u.Header,{children:[n.jsxs(u.H4,e.__assign({color:T.colors.shades[700].color},{children:[v," (",B.length,")"]}),void 0),n.jsx(u.ClearAll,e.__assign({onClick:R,color:T.colors.shades[700].color,"data-testid":"desktop-clear-all"},{children:I}),void 0)]},void 0),n.jsx(h.Tags,{color:g,items:B.map((function(e){var n=e.translatedLabel||e.label;return"$75 And Above"===n?"+$75":n})),onCloseClick:function(e){return D(B[e])}},void 0)]},void 0)}),void 0),w.filter((function(e){return e.isLinkOption})).map((function(t,i){return n.jsx(u.OptionContainer,e.__assign({showInMobile:t.showInMobile,showInTablet:t.showInTablet,"data-testid":"linkOption"},{children:n.jsx(u.FilterLink,e.__assign({color:t.color||T.colors.shades[550].color,href:t.link},{children:t.translatedTitle||t.title}),void 0)}),"option-container-".concat(i))})),w.filter((function(e){return!e.isLinkOption})).map((function(t){var i=function(e){var n=0,t="";return p&&(t=(n=B.filter((function(n){return n.sectionTitle==e.title})).length)>0&&p?"(".concat(n,")"):""),t}(t);return n.jsx(d.Accordion,e.__assign({title:"".concat(t.translatedTitle||t.title," ").concat(i),isOpenByDefault:t.isOpenByDefault,showInMobile:t.showInMobile},{children:n.jsxs(u.SectionContent,e.__assign({cols:t.columns},{children:["size"===t.type&&t.items.map((function(e,i){var o=w.findIndex((function(e){return e.title===t.title}));return n.jsx(a,{size:c.ComponentSize.Medium,text:e.translatedLabel||e.label,active:e.checked,disabled:e.blockUncheck,onClick:function(){return $({sectionIndex:o,itemIndex:i,checked:!e.checked})},width:"50px",id:"filter[".concat(o,",").concat(i,"]")},e.label)})),"color"===t.type&&t.items.map((function(e,i){var c;return n.jsx(k,{onChange:$,text:e.translatedLabel||e.label,checked:e.checked,itemIndex:i,sectionIndex:w.findIndex((function(e){return e.title===t.title})),blockUncheck:e.blockUncheck,color:null!==(c=e.value)&&void 0!==c?c:"",backgroundImage:e.backgroundImage},"".concat(e.checked,"-").concat(e.label))})),!t.type&&t.items.map((function(e,i){return n.jsx(x,{onChange:$,text:e.translatedLabel||("$75 And Above"===e.label?"+$75":e.label),checked:e.checked,itemIndex:i,sectionIndex:w.findIndex((function(e){return e.title===t.title})),blockUncheck:e.blockUncheck},"".concat(e.checked,"-").concat(e.label))}))]}),void 0)}),w.findIndex((function(e){return e.title===t.title})))})),_&&n.jsxs(u.MobileFooter,e.__assign({"data-testid":"MobileFooter"},{children:[n.jsxs(u.MobileClearContainer,e.__assign({onClick:R},{children:[n.jsx(u.MobileIconsContainer,{children:n.jsx(s.Icon.Actions.Trash,{fill:T.colors.shades[700].color},void 0)},void 0),n.jsx(u.ClearAll,e.__assign({color:T.colors.shades[700].color},{children:I}),void 0)]}),void 0),n.jsx(r,{text:y,onClick:M},void 0)]}),void 0)]},void 0)};
2
2
  //# sourceMappingURL=Filters.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),r=require("./components/ImagePreviewList/ImagePreviewList.js"),o=require("./components/ImageProductSlide/ImageProductSlide.js"),a=require("./styled.js");exports.ProductGallery=function(s){var n=s.images,d=s.selectedValue,u=s.topTag,c=s.topRightTag,v=s.bottomTag,l=s.productImageDataTestId,m=s.previewListDataTestId,g=s.thumbnailPosition,p=s.borderRadiusVariant,f=void 0!==p&&p,w=s.previewImgBorderColor,I=s.ctaText,T=s.ctaAction,h=s.hideCTA,P=void 0===h||h,x=s.hasOverflowArrows,b=void 0!==x&&x,q=s.withZoom,j=void 0===q||q,O=s.hasToPreserveOrder,R=void 0!==O&&O,S=s.isRatioSquare,A=s.itemsOnViewport,C=void 0===A?6:A,V=i.useState(function(e,t){if(t){var i=e.indexOf(t);return i>-1?i:0}return 0}(n,d)),L=V[0],_=V[1];if(i.useEffect((function(){if(d&&!R){var e=n.indexOf(d);e>-1&&_(e)}}),[d,R]),0===n.length)return null;var y=n[L];return t.jsxs(a.Container,e.__assign({thumbnailPosition:g},{children:[t.jsx(r.ImagePreviewList,{images:n,selectedImage:y,dataTestId:m,onClick:function(e){_(e)},position:g,borderRadiusVariant:f,previewImgBorderColor:w,hasOverflowArrows:b,isRatioSquare:S,itemsOnViewport:C},void 0),t.jsx(o.ImageProductSlide,{content:y,topTag:u,topRightTag:c,bottomTag:v,testId:l,position:g,borderRadiusVariant:f,ctaText:I,ctaAction:T,hideCTA:P,withZoom:j,isRatioSquare:S},void 0)]}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),o=require("./components/ImagePreviewList/ImagePreviewList.js"),r=require("./components/ImageProductSlide/ImageProductSlide.js"),a=require("./styled.js");exports.ProductGallery=function(s){var d=s.images,n=s.selectedValue,u=s.topTag,v=s.topRightTag,l=s.bottomTag,c=s.productImageDataTestId,m=s.previewListDataTestId,g=s.thumbnailPosition,w=s.borderRadiusVariant,p=void 0!==w&&w,I=s.previewImgBorderColor,P=s.ctaText,h=s.ctaAction,f=s.hideCTA,T=void 0===f||f,x=s.hasOverflowArrows,b=void 0!==x&&x,q=s.withZoom,y=void 0===q||q,j=s.hasToPreserveOrder,A=void 0!==j&&j,C=s.isRatioSquare,O=s.itemsOnViewport,R=void 0===O?6:O,V=s.videoAutoplay,S=void 0!==V&&V,L=s.videoInPreview,_=void 0!==L&&L,B=s.hideVideoControls,D=void 0!==B&&B,Z=s.alwaysPlayInPreview,k=void 0!==Z&&Z,E=t.useState(function(e,i){if(i){var t=e.indexOf(i);return t>-1?t:0}return 0}(d,n)),G=E[0],M=E[1];if(t.useEffect((function(){if(n&&!A){var e=d.indexOf(n);e>-1&&M(e)}}),[n,A]),0===d.length)return null;var z=d[G];return i.jsxs(a.Container,e.__assign({thumbnailPosition:g},{children:[i.jsx(o.ImagePreviewList,{images:d,selectedImage:z,dataTestId:m,onClick:function(e){M(e)},position:g,borderRadiusVariant:p,previewImgBorderColor:I,hasOverflowArrows:b,isRatioSquare:C,itemsOnViewport:R,videoInPreview:_,alwaysPlayInPreview:k},void 0),i.jsx(r.ImageProductSlide,{content:z,topTag:u,topRightTag:v,bottomTag:l,testId:c,position:g,borderRadiusVariant:p,ctaText:P,ctaAction:h,hideCTA:T,withZoom:y,isRatioSquare:C,videoAutoplay:S,hideVideoControls:D},void 0)]}),void 0)};
2
2
  //# sourceMappingURL=ProductGallery.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("../../../slider/SliderNavigation.js"),o=require("../ImageSmallPreview/ImageSmallPreview.js"),n=require("./styled.js"),a=function(e,i){var r="eager";i&&(r=e<i?"eager":"lazy");return r},t=function(e,i){var r="auto";i&&(r=e<i?"sync":"async");return r};exports.ImagePreviewList=function(l){var s=l.images,d=l.selectedImage,u=l.onClick,c=l.dataTestId,v=l.position,g=l.borderRadiusVariant,m=l.previewImgBorderColor,w=l.hasOverflowArrows,x=l.isRatioSquare,j=l.itemsOnViewport,y=void 0===j?0:j;return i.jsxs(i.Fragment,{children:[i.jsx(n.Container,e.__assign({role:"list","data-testid":c,position:v,className:w?"imageListContainer":v,hasOverflowArrows:w,isRatioSquare:x},{children:"horizontal"==v?i.jsx("div",e.__assign({style:{maxWidth:"360px"}},{children:i.jsx(r,e.__assign({speed:200,infinite:!1,adaptiveHeight:!0,dots:!1,slidesToShow:4.2},{children:s.map((function(r,l){return i.jsx(n.Button,e.__assign({onClick:function(){return u(l)}},{children:i.jsx(o.ImageSmallPreview,{imageUrl:(null==r?void 0:r.alt.includes("-video"))?null==r?void 0:r.thumbnailUrl:null==r?void 0:r.url,alt:r.alt,selected:r.key===d.key,borderRadiusVariant:g,previewImgBorderColor:m,isRatioSquare:x,loading:a(l,y),decoding:t(l,y)},void 0)}),r.key)}))}),void 0)}),void 0):s.map((function(r,l){return i.jsx(n.Button,e.__assign({onClick:function(){return u(l)}},{children:i.jsx(o.ImageSmallPreview,{imageUrl:(null==r?void 0:r.alt.includes("-video"))?null==r?void 0:r.thumbnailUrl:null==r?void 0:r.url,alt:r.alt,selected:r.key===d.key,borderRadiusVariant:g,previewImgBorderColor:m,isRatioSquare:x,loading:a(l,y),decoding:t(l,y)},void 0)}),r.key)}))}),void 0),w&&i.jsxs(n.ArrowsContainer,e.__assign({role:"navigation"},{children:[i.jsx(n.ArrowPrev,{onClick:function(){document.querySelector(".imageListContainer").scrollBy(0,-200)}},void 0),i.jsx(n.ArrowNext,{onClick:function(){document.querySelector(".imageListContainer").scrollBy(0,200)}},void 0)]}),void 0)]},void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("../../../molecules/Video/Video.js"),o=require("../../../slider/SliderNavigation.js"),a=require("../ImageSmallPreview/ImageSmallPreview.js"),t=require("./styled.js"),n=function(e,i){var r="eager";i&&(r=e<i?"eager":"lazy");return r},s=function(e,i){var r="auto";i&&(r=e<i?"sync":"async");return r},l=function(o){var l=o.item,d=o.index,u=o.selectedImage,v=o.onClick,c=o.borderRadiusVariant,m=o.previewImgBorderColor,w=o.isRatioSquare,g=o.itemsOnViewport,y=void 0===g?0:g,I=o.videoInPreview,p=void 0!==I&&I,x=o.alwaysPlayInPreview,P=void 0!==x&&x,C=o.isHorizontal,j=void 0!==C&&C,h=l.isVideo&&p&&(P||l.key===u.key);return i.jsx(t.Button,e.__assign({onClick:function(){return v(d)}},{children:h?i.jsx(t.VideoContainer,e.__assign({isRatioSquare:w,isHorizontal:j},{children:i.jsx(r.Video,{source:l.url,thumbnail:void 0,autoPlay:!0,muted:!0,loop:!0,style:{objectFit:"cover"},withProgressBar:!1,controls:!1,hasAudioControl:!1,preload:"auto"},void 0)}),void 0):i.jsx(a.ImageSmallPreview,{imageUrl:(null==l?void 0:l.alt.includes("-video"))?null==l?void 0:l.thumbnailUrl:null==l?void 0:l.url,alt:l.alt,selected:l.key===u.key,borderRadiusVariant:c,previewImgBorderColor:m,isRatioSquare:w,loading:n(d,y),decoding:s(d,y)},void 0)}),l.key)};exports.ImagePreviewList=function(r){var a=r.images,n=r.selectedImage,s=r.onClick,d=r.dataTestId,u=r.position,v=r.borderRadiusVariant,c=r.previewImgBorderColor,m=r.hasOverflowArrows,w=r.isRatioSquare,g=r.itemsOnViewport,y=void 0===g?0:g,I=r.videoInPreview,p=void 0!==I&&I,x=r.alwaysPlayInPreview,P=void 0!==x&&x;return i.jsxs(i.Fragment,{children:[i.jsx(t.Container,e.__assign({role:"list","data-testid":d,position:u,className:m?"imageListContainer":u,hasOverflowArrows:m,isRatioSquare:w},{children:"horizontal"==u?i.jsx("div",e.__assign({style:{maxWidth:"360px"}},{children:i.jsx(o,e.__assign({speed:200,infinite:!1,adaptiveHeight:!0,dots:!1,slidesToShow:4.2},{children:a.map((function(e,i){return l({item:e,index:i,selectedImage:n,onClick:s,borderRadiusVariant:v,previewImgBorderColor:c,isRatioSquare:w,itemsOnViewport:y,videoInPreview:p,alwaysPlayInPreview:P,isHorizontal:!0})}))}),void 0)}),void 0):a.map((function(e,i){return l({item:e,index:i,selectedImage:n,onClick:s,borderRadiusVariant:v,previewImgBorderColor:c,isRatioSquare:w,itemsOnViewport:y,videoInPreview:p,alwaysPlayInPreview:P,isHorizontal:!1})}))}),void 0),m&&i.jsxs(t.ArrowsContainer,e.__assign({role:"navigation"},{children:[i.jsx(t.ArrowPrev,{onClick:function(){document.querySelector(".imageListContainer").scrollBy(0,-200)}},void 0),i.jsx(t.ArrowNext,{onClick:function(){document.querySelector(".imageListContainer").scrollBy(0,200)}},void 0)]}),void 0)]},void 0)};
2
2
  //# sourceMappingURL=ImagePreviewList.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("@emotion/react");function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var r,o,i,a,d,s,l,p,c=t(require("@emotion/styled")),u=e.css(r||(r=n.__makeTemplateObject(["\n grid-row: 2;\n grid-auto-flow: column;\n grid-column-gap: 6px;\n margin-top: 20px;\n max-width: 360px;\n overflow: auto;\n"],["\n grid-row: 2;\n grid-auto-flow: column;\n grid-column-gap: 6px;\n margin-top: 20px;\n max-width: 360px;\n overflow: auto;\n"]))),g=e.css(o||(o=n.__makeTemplateObject(["\n grid-row-gap: 20px;\n overflow: auto;\n grid-area: 1/1;\n"],["\n grid-row-gap: 20px;\n overflow: auto;\n grid-area: 1/1;\n"]))),b=c.default.div(i||(i=n.__makeTemplateObject(["\n display: grid;\n max-height: ",";\n height: min-content;\n align-items: flex-start;\n ","\n\n ","\n"],["\n display: grid;\n max-height: ",";\n height: min-content;\n align-items: flex-start;\n ","\n\n ","\n"])),(function(n){var e=n.isRatioSquare,t=n.theme;return e?"530px":"calc(530px / (".concat(t.component.gallery.aspectRatio,"))")}),(function(n){return"horizontal"==n.position?u:g}),(function(n){return n.hasOverflowArrows&&"\n scroll-behavior: smooth;\n &::-webkit-scrollbar {\n visibility: hidden;\n }\n "})),h=c.default.button(a||(a=n.__makeTemplateObject(["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n outline: none;\n"],["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n outline: none;\n"]))),m=c.default.div(d||(d=n.__makeTemplateObject(["\n display: flex;\n width: 65px;\n position: relative;\n left: 6px;\n"],["\n display: flex;\n width: 65px;\n position: relative;\n left: 6px;\n"]))),x=c.default.div(s||(s=n.__makeTemplateObject(["\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n color: #2a2a2a;\n border: 0;\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n background-color: #ececea;\n box-sizing: border-box;\n cursor: pointer;\n float: left;\n height: 20px;\n position: relative;\n width: 50%;\n background-position: 50%;\n background-repeat: no-repeat;\n background-size: 11px;\n display: block;\n"],["\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n color: #2a2a2a;\n border: 0;\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n background-color: #ececea;\n box-sizing: border-box;\n cursor: pointer;\n float: left;\n height: 20px;\n position: relative;\n width: 50%;\n background-position: 50%;\n background-repeat: no-repeat;\n background-size: 11px;\n display: block;\n"]))),f=c.default(x)(l||(l=n.__makeTemplateObject(["\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/up-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 0 4px;\n"],["\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/up-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 0 4px;\n"]))),w=c.default(x)(p||(p=n.__makeTemplateObject(["\n grid-column: 1;\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/down-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 4px 0;\n border-left: 1px solid rgba(42, 42, 42, 0.1);\n"],["\n grid-column: 1;\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/down-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 4px 0;\n border-left: 1px solid rgba(42, 42, 42, 0.1);\n"])));exports.ArrowBaseStyles=x,exports.ArrowNext=w,exports.ArrowPrev=f,exports.ArrowsContainer=m,exports.Button=h,exports.Container=b;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),t=require("@emotion/react");function e(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var o,i,r,a,d,l,s,p,u,c=e(require("@emotion/styled")),g=t.css(o||(o=n.__makeTemplateObject(["\n grid-row: 2;\n grid-auto-flow: column;\n grid-column-gap: 6px;\n margin-top: 20px;\n max-width: 360px;\n overflow: auto;\n"],["\n grid-row: 2;\n grid-auto-flow: column;\n grid-column-gap: 6px;\n margin-top: 20px;\n max-width: 360px;\n overflow: auto;\n"]))),h=t.css(i||(i=n.__makeTemplateObject(["\n grid-row-gap: 20px;\n overflow: auto;\n grid-area: 1/1;\n"],["\n grid-row-gap: 20px;\n overflow: auto;\n grid-area: 1/1;\n"]))),m=c.default.div(r||(r=n.__makeTemplateObject(["\n display: grid;\n max-height: ",";\n height: min-content;\n align-items: flex-start;\n ","\n\n ","\n"],["\n display: grid;\n max-height: ",";\n height: min-content;\n align-items: flex-start;\n ","\n\n ","\n"])),(function(n){var t=n.isRatioSquare,e=n.theme;return t?"530px":"calc(530px / (".concat(e.component.gallery.aspectRatio,"))")}),(function(n){return"horizontal"==n.position?g:h}),(function(n){return n.hasOverflowArrows&&"\n scroll-behavior: smooth;\n &::-webkit-scrollbar {\n visibility: hidden;\n }\n "})),b=c.default.button(a||(a=n.__makeTemplateObject(["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n outline: none;\n"],["\n padding: 0;\n border: none;\n text-decoration: none;\n background: transparent;\n outline: none;\n"]))),f=c.default.div(d||(d=n.__makeTemplateObject(["\n display: flex;\n width: 65px;\n position: relative;\n left: 6px;\n"],["\n display: flex;\n width: 65px;\n position: relative;\n left: 6px;\n"]))),x=c.default.div(l||(l=n.__makeTemplateObject(["\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n color: #2a2a2a;\n border: 0;\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n background-color: #ececea;\n box-sizing: border-box;\n cursor: pointer;\n float: left;\n height: 20px;\n position: relative;\n width: 50%;\n background-position: 50%;\n background-repeat: no-repeat;\n background-size: 11px;\n display: block;\n"],["\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n color: #2a2a2a;\n border: 0;\n font-family: inherit;\n font-size: 100%;\n font-style: inherit;\n font-variant: inherit;\n font-weight: inherit;\n line-height: inherit;\n margin: 0;\n padding: 0;\n vertical-align: inherit;\n background-color: #ececea;\n box-sizing: border-box;\n cursor: pointer;\n float: left;\n height: 20px;\n position: relative;\n width: 50%;\n background-position: 50%;\n background-repeat: no-repeat;\n background-size: 11px;\n display: block;\n"]))),w=c.default(x)(s||(s=n.__makeTemplateObject(["\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/up-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 0 4px;\n"],["\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/up-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 0 4px;\n"]))),k=c.default(x)(p||(p=n.__makeTemplateObject(["\n grid-column: 1;\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/down-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 4px 0;\n border-left: 1px solid rgba(42, 42, 42, 0.1);\n"],["\n grid-column: 1;\n background-image: url(https://truekind.com/cdn/shop/t/340/assets/down-arrow.svg?v=48788596234827096911690908673);\n border-radius: 0 0 4px 0;\n border-left: 1px solid rgba(42, 42, 42, 0.1);\n"]))),v=c.default.div(u||(u=n.__makeTemplateObject(["\n width: ",";\n height: ",";\n overflow: hidden;\n ","\n position: relative;\n cursor: pointer;\n\n & button,\n & [data-testid='play'],\n & [data-testid='pause'],\n & [role='button'] {\n display: none !important;\n }\n"],["\n width: ",";\n height: ",";\n overflow: hidden;\n ","\n position: relative;\n cursor: pointer;\n\n & button,\n & [data-testid='play'],\n & [data-testid='pause'],\n & [role='button'] {\n display: none !important;\n }\n"])),(function(n){return n.theme.component.gallery.thumbnail.desktop.width}),(function(n){var t=n.isRatioSquare,e=n.theme;return t?e.component.gallery.thumbnail.desktop.width:e.component.gallery.thumbnail.desktop.height}),(function(n){return!n.isHorizontal&&"margin: 0 auto;"}));exports.ArrowBaseStyles=x,exports.ArrowNext=k,exports.ArrowPrev=w,exports.ArrowsContainer=f,exports.Button=b,exports.Container=m,exports.VideoContainer=v;
2
2
  //# sourceMappingURL=styled.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),e=require("react/jsx-runtime"),o=require("../../../molecules/Video/Video.js"),t=require("./styled.js");exports.ImageProductSlide=function(r){var a,n=r.content,d=r.topTag,s=r.topRightTag,l=r.bottomTag,c=r.testId,u=r.position,g=void 0===u?"vertical":u,h=r.borderRadiusVariant,v=r.ctaText,j=r.ctaAction,p=r.hideCTA,x=r.withZoom,m=r.isRatioSquare,T=null==n?void 0:n.url,b=null!==(a=null==n?void 0:n.isVideo)&&void 0!==a&&a;return e.jsxs(t.Container,i.__assign({"data-testid":c,className:"stylefor".concat(g),borderRadiusVariant:h,position:g},{children:[!b&&e.jsxs(e.Fragment,{children:[x?e.jsx(t.InnerImageZoomStyled,{src:T,zoomSrc:T,zoomType:"hover",imgAttributes:{alt:n.alt,style:{objectFit:"cover",objectPosition:"center"},loading:"eager",decoding:"sync"},width:"horizontal"==g?360:530,height:"horizontal"==g?480:720,hideHint:!0,isRatioSquare:m},void 0):e.jsx(t.ImageStyled,{width:"horizontal"==g?"360px":"530px",height:"auto",src:T,alt:n.alt,objectFit:"cover",loading:"eager",decoding:"sync",isRatioSquare:m},void 0),e.jsx(t.TopTagContainer,i.__assign({borderRadiusVariant:h},{children:d}),void 0),e.jsx(t.BottomTagContainer,i.__assign({isCTAHidden:p},{children:l}),void 0),!!s&&e.jsx(t.TopRightTagWrapper,{children:e.jsx(t.TopRightTagContainer,{children:s},void 0)},void 0)]},void 0),b&&e.jsx(o.Video,{source:T,thumbnail:null==n?void 0:n.thumbnailUrl},void 0),v&&j&&e.jsx("div",i.__assign({style:{display:p?"none":"block"}},{children:e.jsx(t.ButtonSecondaryOutlineWrapper,{wide:!0,onClick:j,text:v},void 0)}),void 0)]}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("tslib"),o=require("react/jsx-runtime"),e=require("../../../molecules/Video/Video.js"),t=require("./styled.js");exports.ImageProductSlide=function(r){var a,d=r.content,n=r.topTag,s=r.topRightTag,l=r.bottomTag,c=r.testId,u=r.position,v=void 0===u?"vertical":u,g=r.borderRadiusVariant,h=r.ctaText,p=r.ctaAction,j=r.hideCTA,x=r.withZoom,m=r.isRatioSquare,y=r.videoAutoplay,T=void 0!==y&&y,b=r.hideVideoControls,_=void 0!==b&&b,R=null==d?void 0:d.url,C=null!==(a=null==d?void 0:d.isVideo)&&void 0!==a&&a,S=T||null==d?void 0:d.thumbnailUrl,V=_?{pointerEvents:"none"}:void 0;return o.jsxs(t.Container,i.__assign({"data-testid":c,className:"stylefor".concat(v),borderRadiusVariant:g,position:v},{children:[!C&&o.jsxs(o.Fragment,{children:[x?o.jsx(t.InnerImageZoomStyled,{src:R,zoomSrc:R,zoomType:"hover",imgAttributes:{alt:d.alt,style:{objectFit:"cover",objectPosition:"center"},loading:"eager",decoding:"sync"},width:"horizontal"==v?360:530,height:"horizontal"==v?480:720,hideHint:!0,isRatioSquare:m},void 0):o.jsx(t.ImageStyled,{width:"horizontal"==v?"360px":"530px",height:"auto",src:R,alt:d.alt,objectFit:"cover",loading:"eager",decoding:"sync",isRatioSquare:m},void 0),o.jsx(t.TopTagContainer,i.__assign({borderRadiusVariant:g},{children:n}),void 0),o.jsx(t.BottomTagContainer,i.__assign({isCTAHidden:j},{children:l}),void 0),!!s&&o.jsx(t.TopRightTagWrapper,{children:o.jsx(t.TopRightTagContainer,{children:s},void 0)},void 0)]},void 0),C&&o.jsx(e.Video,{source:R,thumbnail:S,autoPlay:T,muted:!0,loop:!0,withProgressBar:!_,style:V,preload:"auto"},void 0),h&&p&&o.jsx("div",i.__assign({style:{display:j?"none":"block"}},{children:o.jsx(t.ButtonSecondaryOutlineWrapper,{wide:!0,onClick:p,text:h},void 0)}),void 0)]}),void 0)};
2
2
  //# sourceMappingURL=ImageProductSlide.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react");require("../../../core/theme/Theme.js"),require("../../../types/enums.js"),require("../../pricing/clubOffer/ClubOfferTag.js"),require("../../pricing/discount/styled.js"),require("../../pricing/styles.js"),require("../../tooltip/Styled.js"),require("../../atoms/PriceLabel/PriceLabel.js"),require("../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../atoms/HorizontalDivider/HorizontalDivider.js");var i=require("../../atoms/Icon/Icon.js");require("../../atoms/Image/styled.js"),require("../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../atoms/Toggle/toggle.styled.js");var n=require("./components/ProgressBar.js"),o=require("./styled.js");exports.Video=function(s){var u,a,c=s.source,d=s.thumbnail,l=s.height,m=s.className,j=s.withProgressBar,f=void 0===j||j,v=s.hasAudioControl,g=s.muted,h=s.onLoadedData,p=e.__rest(s,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData"]),q=t.useRef(null),y=t.useState(!0),P=y[0],b=y[1],x=t.useState(!1),_=x[0],C=x[1],L=t.useState(g),I=L[0],S=L[1],T=t.useState(0),k=T[0],B=T[1],D=t.useState(!1),M=D[0],V=D[1],A=k>0,H=(null===(u=q.current)||void 0===u?void 0:u.duration)?k/q.current.duration:0,N=k===(null===(a=null==q?void 0:q.current)||void 0===a?void 0:a.duration)||0===k;return r.jsxs(o.Container,e.__assign({className:m},{children:[!P&&f&&r.jsx(n.ProgressBar,{progress:H,hide:N},void 0),_?r.jsx(o.PauseContainer,{"data-testid":"pause",onClick:function(){q.current&&_&&(q.current.pause(),C(!1))}},void 0):r.jsx(o.PlayContainer,e.__assign({"data-testid":"play",onClick:function(){q.current&&!M&&(V(!0),q.current.play().then((function(){C(!0)})).catch((function(e){console.error("Error playing video:",e)})).finally((function(){return V(!1)})))}},{children:A&&r.jsx(o.PlayIcon,{},void 0)}),void 0),v&&r.jsxs(o.MuteButton,e.__assign({onClick:function(){q.current&&S((function(e){return!e}))}},{children:[I&&r.jsx(i.Icon,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!I&&r.jsx(i.Icon,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),r.jsxs(o.HTMLVideo,e.__assign({},p,{muted:I,"data-testid":"video",poster:d,playsInline:!0,ref:q,onTimeUpdate:function(){if(q.current){var e=q.current.currentTime;requestAnimationFrame((function(){return B(e)}))}},onCanPlay:function(){return b(!1)},onLoadedData:function(e){h&&h(e),b(!1)},onPause:function(){return C(!1)},onPlaying:function(){return C(!0)},height:l||"auto"},{children:[r.jsx("track",{kind:"captions"},void 0),r.jsx("source",{src:c},void 0)]}),void 0)]}),void 0)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("react");require("../../../core/theme/Theme.js"),require("../../../types/enums.js"),require("../../pricing/clubOffer/ClubOfferTag.js"),require("../../pricing/discount/styled.js"),require("../../pricing/styles.js"),require("../../tooltip/Styled.js"),require("../../atoms/PriceLabel/PriceLabel.js"),require("../../atoms/ClubPriceMemberLabel/ClubPriceMemberLabel.styled.js"),require("../../atoms/HorizontalDivider/HorizontalDivider.js");var n=require("../../atoms/Icon/Icon.js");require("../../atoms/Image/styled.js"),require("../../atoms/PriceLabelV2/PriceLabelV2.js"),require("../../atoms/Toggle/toggle.styled.js");var o=require("./components/ProgressBar.js"),i=require("./styled.js");exports.Video=function(s){var u,a,c=s.source,d=s.thumbnail,l=s.height,m=s.className,f=s.withProgressBar,v=void 0===f||f,j=s.hasAudioControl,g=s.muted,h=s.onLoadedData,y=e.__rest(s,["source","thumbnail","height","className","withProgressBar","hasAudioControl","muted","onLoadedData"]),p=t.useRef(null),q=t.useState(!0),P=q[0],b=q[1],x=t.useState(!1),_=x[0],C=x[1],L=t.useState(g),I=L[0],S=L[1],T=t.useState(0),k=T[0],B=T[1],D=t.useState(!1),M=D[0],V=D[1],A=k>0,H=(null===(u=p.current)||void 0===u?void 0:u.duration)?k/p.current.duration:0,N=k===(null===(a=null==p?void 0:p.current)||void 0===a?void 0:a.duration)||0===k,O=y.autoPlay?void 0:d;return r.jsxs(i.Container,e.__assign({className:m},{children:[!P&&v&&r.jsx(o.ProgressBar,{progress:H,hide:N},void 0),_?r.jsx(i.PauseContainer,{"data-testid":"pause",onClick:function(){p.current&&_&&(p.current.pause(),C(!1))}},void 0):r.jsx(i.PlayContainer,e.__assign({"data-testid":"play",onClick:function(){p.current&&!M&&(V(!0),p.current.play().then((function(){C(!0)})).catch((function(e){console.error("Error playing video:",e)})).finally((function(){return V(!1)})))}},{children:A&&r.jsx(i.PlayIcon,{},void 0)}),void 0),j&&r.jsxs(i.MuteButton,e.__assign({onClick:function(){p.current&&S((function(e){return!e}))}},{children:[I&&r.jsx(n.Icon,{name:"custom/sound_off",testId:"sound-off-icon"},void 0),!I&&r.jsx(n.Icon,{name:"custom/sound_on",testId:"sound-on-icon"},void 0)]}),void 0),r.jsxs(i.HTMLVideo,e.__assign({},y,{muted:I,"data-testid":"video",poster:O,playsInline:!0,ref:p,onTimeUpdate:function(){if(p.current){var e=p.current.currentTime;requestAnimationFrame((function(){return B(e)}))}},onCanPlay:function(){return b(!1)},onLoadedData:function(e){h&&h(e),b(!1),y.autoPlay&&p.current&&p.current.play().then((function(){C(!0)})).catch((function(e){console.error("Error auto-playing video:",e)}))},onPause:function(){return C(!1)},onPlaying:function(){return C(!0)},height:l||"auto"},{children:[r.jsx("track",{kind:"captions"},void 0),r.jsx("source",{src:c},void 0)]}),void 0)]}),void 0)};
2
2
  //# sourceMappingURL=Video.js.map