@anker-in/headless-ui 1.0.26-temp-111002 → 1.0.26-temp-111005

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 (216) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.d.ts +2 -2
  2. package/dist/cjs/biz-components/AplusDesc/index.d.ts +3 -2
  3. package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
  4. package/dist/cjs/biz-components/Category/index.d.ts +2 -2
  5. package/dist/cjs/biz-components/CollectionShelves/index.d.ts +3 -2
  6. package/dist/cjs/biz-components/CollectionsBanner/index.d.ts +2 -2
  7. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.d.ts +2 -0
  8. package/dist/cjs/biz-components/CollectionsFilters/index.d.ts +4 -2
  9. package/dist/cjs/biz-components/CreativeModule/index.d.ts +3 -2
  10. package/dist/cjs/biz-components/DownLoad/index.d.ts +3 -2
  11. package/dist/cjs/biz-components/Evaluate/index.d.ts +2 -2
  12. package/dist/cjs/biz-components/Faq/Faq.d.ts +2 -2
  13. package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +2 -2
  14. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +1 -1
  15. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +2 -2
  16. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +2 -2
  17. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js +1 -1
  18. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js.map +2 -2
  19. package/dist/cjs/biz-components/Features/index.d.ts +3 -2
  20. package/dist/cjs/biz-components/FootCharger/index.d.ts +3 -2
  21. package/dist/cjs/biz-components/FooterNavigation/index.d.ts +3 -2
  22. package/dist/cjs/biz-components/GiftBox/index.d.ts +3 -2
  23. package/dist/cjs/biz-components/Graphic/index.d.ts +2 -2
  24. package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
  25. package/dist/cjs/biz-components/GraphicMore/index.d.ts +3 -2
  26. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  27. package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +2 -2
  28. package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
  29. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
  30. package/dist/cjs/biz-components/HeroBanner/Countdown.d.ts +1 -1
  31. package/dist/cjs/biz-components/HeroBanner/Countdown.js +1 -1
  32. package/dist/cjs/biz-components/HeroBanner/Countdown.js.map +3 -3
  33. package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
  34. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +2 -2
  35. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js +1 -1
  36. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js.map +2 -2
  37. package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +2 -2
  38. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  39. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +2 -2
  40. package/dist/cjs/biz-components/Ksp/index.d.ts +3 -2
  41. package/dist/cjs/biz-components/Ksp/index.js +1 -1
  42. package/dist/cjs/biz-components/Ksp/index.js.map +3 -3
  43. package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +2 -4
  44. package/dist/cjs/biz-components/Listing/BizProductProvider.js +1 -1
  45. package/dist/cjs/biz-components/Listing/BizProductProvider.js.map +3 -3
  46. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  47. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  48. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  49. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +2 -2
  50. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
  51. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +2 -2
  52. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  53. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +2 -2
  54. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  55. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  56. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  57. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  58. package/dist/cjs/biz-components/Listing/index.d.ts +1 -0
  59. package/dist/cjs/biz-components/Listing/index.js +1 -1
  60. package/dist/cjs/biz-components/Listing/index.js.map +3 -3
  61. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +2 -2
  62. package/dist/cjs/biz-components/MarqueeReview/index.d.ts +3 -2
  63. package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +3 -2
  64. package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  65. package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  66. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +3 -2
  67. package/dist/cjs/biz-components/MemberEquity/index.d.ts +2 -2
  68. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  69. package/dist/cjs/biz-components/NavigationSearch/index.d.ts +1 -0
  70. package/dist/cjs/biz-components/ProductCompare/index.d.ts +3 -2
  71. package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +2 -2
  72. package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
  73. package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +2 -2
  74. package/dist/cjs/biz-components/SelectStore/index.d.ts +3 -2
  75. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +2 -2
  76. package/dist/cjs/biz-components/Slogan/index.d.ts +2 -2
  77. package/dist/cjs/biz-components/Spacer/index.d.ts +2 -2
  78. package/dist/cjs/biz-components/Specs/dropdown.js +2 -2
  79. package/dist/cjs/biz-components/Specs/dropdown.js.map +2 -2
  80. package/dist/cjs/biz-components/Specs/index.d.ts +2 -2
  81. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +2 -2
  82. package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +2 -2
  83. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js +1 -1
  84. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js.map +2 -2
  85. package/dist/cjs/biz-components/Tabs/Tabs.d.ts +2 -2
  86. package/dist/cjs/biz-components/TabsGroup/index.d.ts +2 -2
  87. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +2 -2
  88. package/dist/cjs/biz-components/TextMarquee/index.d.ts +3 -2
  89. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +2 -2
  90. package/dist/cjs/biz-components/Title/index.d.ts +2 -2
  91. package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +2 -2
  92. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js +1 -1
  93. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js.map +2 -2
  94. package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  95. package/dist/cjs/components/alert.d.ts +2 -2
  96. package/dist/cjs/components/avatar.d.ts +8 -8
  97. package/dist/cjs/components/container.d.ts +7 -7
  98. package/dist/cjs/components/dialog.d.ts +1 -1
  99. package/dist/cjs/components/drop-down.d.ts +3 -3
  100. package/dist/cjs/components/input-number.d.ts +15 -15
  101. package/dist/cjs/components/link.d.ts +6 -6
  102. package/dist/cjs/components/tabs.d.ts +2 -2
  103. package/dist/cjs/cpn-components/CpnNavigation/types.d.ts +1 -0
  104. package/dist/cjs/shared/Styles.d.ts +2 -2
  105. package/dist/cjs/stories/HeroBanner.stories.js +2 -2
  106. package/dist/cjs/stories/HeroBanner.stories.js.map +3 -3
  107. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  108. package/dist/esm/biz-components/AccordionCards/index.d.ts +2 -2
  109. package/dist/esm/biz-components/AplusDesc/index.d.ts +3 -2
  110. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
  111. package/dist/esm/biz-components/Category/index.d.ts +2 -2
  112. package/dist/esm/biz-components/CollectionShelves/index.d.ts +3 -2
  113. package/dist/esm/biz-components/CollectionsBanner/index.d.ts +2 -2
  114. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.d.ts +2 -0
  115. package/dist/esm/biz-components/CollectionsFilters/index.d.ts +4 -2
  116. package/dist/esm/biz-components/CreativeModule/index.d.ts +3 -2
  117. package/dist/esm/biz-components/DownLoad/index.d.ts +3 -2
  118. package/dist/esm/biz-components/Evaluate/index.d.ts +2 -2
  119. package/dist/esm/biz-components/Faq/Faq.d.ts +2 -2
  120. package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +2 -2
  121. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +1 -1
  122. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +2 -2
  123. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +2 -2
  124. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js +1 -1
  125. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js.map +2 -2
  126. package/dist/esm/biz-components/Features/index.d.ts +3 -2
  127. package/dist/esm/biz-components/FootCharger/index.d.ts +3 -2
  128. package/dist/esm/biz-components/FooterNavigation/index.d.ts +3 -2
  129. package/dist/esm/biz-components/GiftBox/index.d.ts +3 -2
  130. package/dist/esm/biz-components/Graphic/index.d.ts +2 -2
  131. package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
  132. package/dist/esm/biz-components/GraphicMore/index.d.ts +3 -2
  133. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  134. package/dist/esm/biz-components/HeaderNavigation/index.d.ts +2 -2
  135. package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
  136. package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
  137. package/dist/esm/biz-components/HeroBanner/Countdown.d.ts +1 -1
  138. package/dist/esm/biz-components/HeroBanner/Countdown.js +1 -1
  139. package/dist/esm/biz-components/HeroBanner/Countdown.js.map +3 -3
  140. package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
  141. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +2 -2
  142. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js +1 -1
  143. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js.map +2 -2
  144. package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +2 -2
  145. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  146. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +2 -2
  147. package/dist/esm/biz-components/Ksp/index.d.ts +3 -2
  148. package/dist/esm/biz-components/Ksp/index.js +1 -1
  149. package/dist/esm/biz-components/Ksp/index.js.map +3 -3
  150. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +2 -4
  151. package/dist/esm/biz-components/Listing/BizProductProvider.js +1 -1
  152. package/dist/esm/biz-components/Listing/BizProductProvider.js.map +3 -3
  153. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  154. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  155. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  156. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +2 -2
  157. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
  158. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +2 -2
  159. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  160. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +2 -2
  161. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  162. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  163. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  164. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  165. package/dist/esm/biz-components/Listing/index.d.ts +1 -0
  166. package/dist/esm/biz-components/Listing/index.js +1 -1
  167. package/dist/esm/biz-components/Listing/index.js.map +3 -3
  168. package/dist/esm/biz-components/Marquee/Marquee.d.ts +2 -2
  169. package/dist/esm/biz-components/MarqueeReview/index.d.ts +3 -2
  170. package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +3 -2
  171. package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  172. package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  173. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +3 -2
  174. package/dist/esm/biz-components/MemberEquity/index.d.ts +2 -2
  175. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  176. package/dist/esm/biz-components/NavigationSearch/index.d.ts +1 -0
  177. package/dist/esm/biz-components/ProductCompare/index.d.ts +3 -2
  178. package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +2 -2
  179. package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
  180. package/dist/esm/biz-components/ProductHero/ProductHero.js.map +2 -2
  181. package/dist/esm/biz-components/SelectStore/index.d.ts +3 -2
  182. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +2 -2
  183. package/dist/esm/biz-components/Slogan/index.d.ts +2 -2
  184. package/dist/esm/biz-components/Spacer/index.d.ts +2 -2
  185. package/dist/esm/biz-components/Specs/dropdown.js +1 -1
  186. package/dist/esm/biz-components/Specs/dropdown.js.map +2 -2
  187. package/dist/esm/biz-components/Specs/index.d.ts +2 -2
  188. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +2 -2
  189. package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +2 -2
  190. package/dist/esm/biz-components/TabWithImage/TabWithImage.js +1 -1
  191. package/dist/esm/biz-components/TabWithImage/TabWithImage.js.map +2 -2
  192. package/dist/esm/biz-components/Tabs/Tabs.d.ts +2 -2
  193. package/dist/esm/biz-components/TabsGroup/index.d.ts +2 -2
  194. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +2 -2
  195. package/dist/esm/biz-components/TextMarquee/index.d.ts +3 -2
  196. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +2 -2
  197. package/dist/esm/biz-components/Title/index.d.ts +2 -2
  198. package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +2 -2
  199. package/dist/esm/biz-components/VideoFeature/VideoFeature.js +1 -1
  200. package/dist/esm/biz-components/VideoFeature/VideoFeature.js.map +2 -2
  201. package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  202. package/dist/esm/components/alert.d.ts +2 -2
  203. package/dist/esm/components/avatar.d.ts +8 -8
  204. package/dist/esm/components/container.d.ts +7 -7
  205. package/dist/esm/components/dialog.d.ts +1 -1
  206. package/dist/esm/components/drop-down.d.ts +3 -3
  207. package/dist/esm/components/input-number.d.ts +15 -15
  208. package/dist/esm/components/link.d.ts +6 -6
  209. package/dist/esm/components/tabs.d.ts +2 -2
  210. package/dist/esm/cpn-components/CpnNavigation/types.d.ts +1 -0
  211. package/dist/esm/shared/Styles.d.ts +2 -2
  212. package/dist/esm/stories/HeroBanner.stories.js +2 -2
  213. package/dist/esm/stories/HeroBanner.stories.js.map +2 -2
  214. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  215. package/package.json +1 -1
  216. package/style.css +1 -2
@@ -1,2 +1,2 @@
1
- "use strict";var M=Object.create;var E=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var U=(n,t)=>{for(var o in t)E(n,o,{get:t[o],enumerable:!0})},G=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of q(t))!Q.call(n,s)&&s!==o&&E(n,s,{get:()=>t[s],enumerable:!(i=W(t,s))||i.enumerable});return n};var X=(n,t,o)=>(o=n!=null?M(K(n)):{},G(t||!n||!n.__esModule?E(o,"default",{value:n,enumerable:!0}):o,n)),Y=n=>G(E({},"__esModule",{value:!0}),n);var te={};U(te,{default:()=>ee});module.exports=Y(te);var e=require("react/jsx-runtime"),a=require("../../../../../components"),k=require("../../../BizProductProvider"),g=require("react"),m=require("../../../utils"),P=require("../../../../AiuiProvider"),ie=require("../../../../../helpers"),B=X(require("decimal.js")),R=require("../../../utils/textFormat");const Z=({})=>{const{locale:n="us",copyWriting:t}=(0,P.useAiuiContext)(),{product:o,variant:i,finalPrice:s,comparePrice:u,coupon:b,selectedOptions:p,selectedVariants:r,totalSavings:h,onAddToCart:D,onBuyNow:z,savingDetail:N,checkedBundle:C,joinedRecommendBuyProducts:l,setJoinedRecommendBuyProducts:f,setCheckedGift:O,setCheckedExchangePurchase:x,setCheckedBundle:y,setSavingDetail:I,addToCartLoading:T,buyNowLoading:$}=(0,k.useBizProductContext)(),[w]=r,J=(0,g.useMemo)(()=>{const[d]=C?.variants||[],H=new B.default(w?.price?.amount||0).minus(d?.price||w?.price?.amount).toNumber();return new B.default(w?.price?.amount||0).minus(N?.coupon).minus(H).toNumber()},[w,h,C]);if(!i.availableForSale)return null;const{bundleVariant:A,giftVariant:F,exchangeVariant:j}=_()||{},[c,v]=(0,g.useState)();(0,g.useEffect)(()=>{v({bundle:l.bundle?.value?void 0:A,gift:l.gift?.value?void 0:F,exchange:l.exchange?.value?void 0:j})},[A,F,j,l]);const ne=(0,g.useMemo)(()=>new B.default(u).minus(N.freeGift).toNumber(),[u,N]);return(0,e.jsx)("div",{className:"ipc-product-summary laptop:px-16 desktop:px-0 mt-16 desktop:mt-[96px] lg-desktop:mt-[128px]",children:(0,e.jsx)("div",{className:"bg-[#F5F5F7] laptop:rounded-2xl",children:(0,e.jsxs)(a.Grid,{className:"px-4 pt-6 tablet:p-8 tablet:!pb-0",children:[(0,e.jsxs)(a.GridItem,{className:"col-span-12 laptop:col-start-1 laptop:col-span-5 gap-4 flex flex-col justify-between",children:[(0,e.jsx)(a.Heading,{className:"font-bold text-[24px] lg-desktop:text-[48px] laptop:text-[32px] desktop:text-[40px] leading-[1] mb-4 [&>span]:text-[#D1D1D1]",html:`${o.title} is ready <br/><span>Just the way you want it.</span>`}),(0,e.jsx)("div",{className:"",children:(0,e.jsx)(a.Picture,{source:i.image?.url||o?.images?.[0]?.url,className:"lg-desktop:aspect-[644/368] desktop:aspect-[503/272] laptop:aspect-[331/191] tablet:aspect-[704/380] aspect-[358/192]",imgClassName:"object-cover h-full"})})]}),(0,e.jsxs)(a.GridItem,{className:"col-span-12 mt-8 pb-6 tablet:pb-8 laptop:col-start-7 laptop:mt-0 laptop:col-span-6 flex flex-col gap-6 justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"shrink-0 flex items-center gap-4",children:[(0,e.jsx)(a.Picture,{source:i.image?.url||o?.images?.[0]?.url,className:"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg"}),(0,e.jsxs)("div",{className:"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none",children:[(0,e.jsx)(a.Text,{className:"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]",html:o.title}),(0,e.jsx)(a.Text,{className:"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]",html:`x1 | ${p.color||p.colour||p.couleur}`})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold",html:(0,m.formatPrice)({amount:J,currencyCode:i.price.currencyCode,locale:n})}),h>0&&(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl laptop:text-xl font-bold line-through text-[#6D6D6F]",html:(0,m.formatPrice)({amount:i?.price?.amount,currencyCode:i.price.currencyCode,locale:n})})]})]}),l?.gift?.value&&(0,e.jsx)(L,{giftOperation:d=>{O?.(void 0),f?.({...l,gift:{value:void 0,canOperate:!0}}),v?.({...c,gift:d})},status:!!l?.gift,gift:l?.gift?.value,canOperate:l?.gift?.canOperate}),l?.bundle?.value&&(0,e.jsx)(S,{bundleOperation:d=>{y?.(void 0),f?.({...l,bundle:{value:void 0,canOperate:!0}}),v?.({...c,bundle:d})},status:!!l?.bundle,bundleListItem:l?.bundle?.value,canOperate:l?.bundle?.canOperate}),l?.exchange?.value&&(0,e.jsx)(V,{exchangeOperation:d=>{x?.(void 0),f?.({...l,exchange:{value:void 0,canOperate:!0}}),v?.({...c,exchange:d})},status:!!l?.exchange,canOperate:l?.exchange?.canOperate,exchange:l?.exchange?.value})]}),(c?.bundle||c?.gift||c?.exchange)&&(0,e.jsxs)("div",{className:"mt-6",children:[(0,e.jsx)(a.Text,{className:"text-sm desktop:text-[18px] font-bold",html:"Recommend Buy"}),(0,e.jsxs)("div",{className:"flex flex-col gap-6 mt-6",children:[c?.exchange&&(0,e.jsx)(V,{exchangeOperation:d=>{y?.(void 0),f?.({bundle:{value:void 0,canOperate:!0},gift:{value:l?.gift?.value,canOperate:!0},exchange:{value:d,canOperate:!0}}),v?.({...c,exchange:void 0})},canOperate:l?.exchange?.canOperate,status:!c?.exchange,exchange:c?.exchange}),c?.bundle&&(0,e.jsx)(S,{bundleOperation:d=>{O?.(void 0),x?.(void 0),I?.({...N,exchangePurchase:0}),f?.({gift:{value:void 0,canOperate:!0},exchange:{value:void 0,canOperate:!0},bundle:{value:d,canOperate:!0}}),v?.({...c,bundle:void 0})},canOperate:l?.bundle?.canOperate,status:!c?.bundle,bundleListItem:c?.bundle}),c?.gift&&(0,e.jsx)(L,{giftOperation:d=>{y?.(void 0),f?.({bundle:{value:void 0,canOperate:!0},exchange:{value:l?.exchange?.value,canOperate:!0},gift:{value:d,canOperate:!0}}),v?.({...c,gift:void 0})},canOperate:l?.gift?.canOperate,status:!c?.gift,gift:c?.gift})]})]})]}),(0,e.jsxs)("div",{className:"text-right",children:[(0,e.jsx)(a.Text,{className:"laptop:text-xl desktop:text-2xl font-bold text-right",html:`${(0,R.replaceTemplate)(t?.totalPrice||"",{amount:(0,m.formatPrice)({amount:s,currencyCode:i.price.currencyCode,locale:n})})}`}),h>0&&(0,e.jsx)(a.Text,{className:"text-base laptop:text-xl desktop:text-2xl ml-1 font-bold line-through text-[#6D6D6F]",html:(0,m.formatPrice)({amount:u,currencyCode:i.price.currencyCode,locale:n})}),(0,e.jsxs)("div",{className:"flex gap-3 mt-2 justify-end",children:[(0,e.jsx)(a.Button,{size:"lg",variant:"secondary",loading:T,className:"w-1/2 tablet:w-auto laptop:w-1/2 desktop:w-auto",onClick:()=>D?.(),children:t?.addToCart}),(0,e.jsx)(a.Button,{size:"lg",loading:$,variant:"primary",className:"w-1/2 tablet:w-auto laptop:w-1/2 desktop:w-auto",onClick:()=>z?.(),children:t?.shopNow})]})]})]})]})})})},_=()=>{const{bundle:n,variant:t,checkedBundle:o,freeGift:i,checkedGift:s,exchangePurchase:u,checkedExchangePurchase:b}=(0,k.useBizProductContext)();let p,r,h;const{bundleList:D}=n||{},{giftList:z=[]}=i||{},{giftList:N=[]}=u||{},C=D?.filter(x=>x.variants.slice(1,x.variants.length).every(y=>y.variant.availableForSale))||[],[l]=C;p=o||l;const[f]=z?.filter(x=>x.availableForSale);r=s||f;const[O]=N?.filter(x=>x.availableForSale);return h=b||O,{bundleVariant:p,giftVariant:r,exchangeVariant:h}},S=({bundleOperation:n,bundleListItem:t,canOperate:o,status:i})=>{const{locale:s="us"}=(0,P.useAiuiContext)(),{variant:u,setCheckedBundle:b}=(0,k.useBizProductContext)(),p=t?.variants.filter(r=>r.variant.sku!==u.sku);return(0,e.jsx)("div",{className:"",children:p?.map(r=>(0,e.jsxs)("div",{className:"flex items-center gap-4 justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)(a.Picture,{source:r?.variant?.image?.url,className:"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg"}),(0,e.jsx)("div",{className:"flex flex-col gap-[6px] line-clamp-2 max-w-[178px] tablet:max-w-none",children:(0,e.jsx)(a.Text,{className:"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]",html:r.variant.product.title})})]}),(0,e.jsxs)("div",{className:"flex flex-col items-end gap-1 justify-center",children:[!!t&&(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold",html:(0,m.formatPrice)({amount:r?.price||0,locale:s,currencyCode:r.variant?.price?.currencyCode||""})}),(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]",html:(0,m.formatPrice)({amount:r.variant.price.amount||0,locale:s,currencyCode:r.variant?.price?.currencyCode||""})})]}),o&&(0,e.jsx)(a.Button,{size:"icon",variant:"link",onClick:()=>{b?.(i?void 0:t),n?.(t)},className:"shrink-0 size-auto underline",children:i?"Remove":"Add"})]})]},r.variant.id))})},L=({giftOperation:n,gift:t,status:o,canOperate:i})=>{const{locale:s="us"}=(0,P.useAiuiContext)(),{freeGift:u,setCheckedGift:b}=(0,k.useBizProductContext)(),{freeLabel:p,count:r}=u||{};return(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)(a.Picture,{source:t?.image?.url,className:"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg"}),(0,e.jsxs)("div",{className:"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none",children:[(0,e.jsx)(a.Text,{className:"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]",html:t?.product?.title}),(0,e.jsx)(a.Text,{className:"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]",html:`x${r} | ${p}`})]})]}),(0,e.jsxs)("div",{className:"flex flex-col items-end gap-2 justify-center",children:[!!t&&(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold",html:p}),(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]",html:(0,m.formatPrice)({amount:t.price.amount,locale:s,currencyCode:t.price.currencyCode})})]}),i&&(0,e.jsx)(a.Button,{size:"icon",variant:"link",onClick:()=>{b?.(o?void 0:t),n(t)},className:"shrink-0 size-auto underline",children:o?"Remove":"Add"})]})]})},V=({exchangeOperation:n,exchange:t,canOperate:o,status:i})=>{const{locale:s="us"}=(0,P.useAiuiContext)(),{setCheckedExchangePurchase:u}=(0,k.useBizProductContext)();return(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)(a.Picture,{source:t?.image?.url,className:"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg"}),(0,e.jsxs)("div",{className:"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none",children:[(0,e.jsx)(a.Text,{className:"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]",html:t?.product?.title}),(0,e.jsx)(a.Text,{className:"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]"})]})]}),(0,e.jsxs)("div",{className:"flex flex-col items-end gap-2 justify-center",children:[!!t&&(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold",html:(0,m.formatPrice)({amount:t.finalPrice?.amount||0,locale:s,currencyCode:t.price.currencyCode})}),(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]",html:(0,m.formatPrice)({amount:t.price?.amount||0,locale:s,currencyCode:t.price.currencyCode})})]}),o&&(0,e.jsx)(a.Button,{size:"icon",variant:"link",onClick:()=>{u?.(i?void 0:t),n(t)},className:"shrink-0 size-auto underline",children:i?"Remove":"Add"})]})]})};var ee=Z;
1
+ "use strict";var K=Object.create;var B=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var Z=(n,t)=>{for(var o in t)B(n,o,{get:t[o],enumerable:!0})},L=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of U(t))!Y.call(n,s)&&s!==o&&B(n,s,{get:()=>t[s],enumerable:!(i=Q(t,s))||i.enumerable});return n};var _=(n,t,o)=>(o=n!=null?K(X(n)):{},L(t||!n||!n.__esModule?B(o,"default",{value:n,enumerable:!0}):o,n)),ee=n=>L(B({},"__esModule",{value:!0}),n);var le={};Z(le,{default:()=>ne});module.exports=ee(le);var e=require("react/jsx-runtime"),a=require("../../../../../components"),h=require("../../../BizProductProvider"),N=require("react"),p=require("../../../utils"),C=require("../../../../AiuiProvider"),se=require("../../../../../helpers"),A=_(require("decimal.js")),T=require("../../../utils/textFormat");const te=({})=>{const{locale:n="us",copyWriting:t}=(0,C.useAiuiContext)(),{product:o,variant:i,finalPrice:s,comparePrice:m,coupon:g,selectedOptions:u,selectedVariants:r,totalSavings:b,onAddToCart:D,onBuyNow:z,savingDetail:k,checkedBundle:O,joinedRecommendBuyProducts:l,setJoinedRecommendBuyProducts:f,setCheckedGift:E,setCheckedExchangePurchase:x,setCheckedBundle:y,setSavingDetail:$,addToCartLoading:J,buyNowLoading:H,profile:F}=(0,h.useBizProductContext)(),[P]=r,M=(0,N.useMemo)(()=>{const d=O?.variants.find(q=>q.variant.sku===P?.sku),W=new A.default(P?.price?.amount||0).minus(d?.price||P?.price?.amount).toNumber();let w=new A.default(P?.price?.amount||0);return F?.email&&(w=w.minus(k?.member||0)),w.minus(k?.coupon).minus(W).toNumber(),w.toNumber()},[P,b,O,F]);if(!i.availableForSale)return null;const{bundleVariant:j,giftVariant:S,exchangeVariant:G}=ae()||{},[c,v]=(0,N.useState)();return(0,N.useEffect)(()=>{v({bundle:l.bundle?.value?void 0:j,gift:l.gift?.value?void 0:S,exchange:l.exchange?.value?void 0:G})},[j,S,G,l]),(0,e.jsx)("div",{className:"ipc-product-summary laptop:px-16 desktop:px-0 mt-16 desktop:mt-[96px] lg-desktop:mt-[128px]",children:(0,e.jsx)("div",{className:"bg-[#F5F5F7] laptop:rounded-2xl",children:(0,e.jsxs)(a.Grid,{className:"px-4 pt-6 tablet:p-8 tablet:!pb-0",children:[(0,e.jsxs)(a.GridItem,{className:"col-span-12 laptop:col-start-1 laptop:col-span-5 gap-4 flex flex-col justify-between",children:[(0,e.jsx)(a.Heading,{className:"font-bold text-[24px] lg-desktop:text-[48px] laptop:text-[32px] desktop:text-[40px] leading-[1] mb-4 [&>span]:text-[#D1D1D1]",html:`${o.title} is ready <br/><span>Just the way you want it.</span>`}),(0,e.jsx)("div",{className:"",children:(0,e.jsx)(a.Picture,{source:i.image?.url||o?.images?.[0]?.url,className:"lg-desktop:aspect-[644/368] desktop:aspect-[503/272] laptop:aspect-[331/191] tablet:aspect-[704/380] aspect-[358/192]",imgClassName:"object-cover h-full"})})]}),(0,e.jsxs)(a.GridItem,{className:"col-span-12 mt-8 pb-6 tablet:pb-8 laptop:col-start-7 laptop:mt-0 laptop:col-span-6 flex flex-col gap-6 justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"shrink-0 flex items-center gap-4",children:[(0,e.jsx)(a.Picture,{source:i.image?.url||o?.images?.[0]?.url,className:"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg"}),(0,e.jsxs)("div",{className:"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none",children:[(0,e.jsx)(a.Text,{className:"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]",html:o.title}),(0,e.jsx)(a.Text,{className:"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]",html:`x1 | ${u.color||u.colour||u.couleur}`})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold",html:(0,p.formatPrice)({amount:M,currencyCode:i.price.currencyCode,locale:n})}),b>0&&(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl laptop:text-xl font-bold line-through text-[#6D6D6F]",html:(0,p.formatPrice)({amount:i?.price?.amount,currencyCode:i.price.currencyCode,locale:n})})]})]}),l?.gift?.value&&(0,e.jsx)(R,{giftOperation:d=>{E?.(void 0),f?.({...l,gift:{value:void 0,canOperate:!0}}),v?.({...c,gift:d})},status:!!l?.gift,gift:l?.gift?.value,canOperate:l?.gift?.canOperate}),l?.bundle?.value&&(0,e.jsx)(V,{bundleOperation:d=>{y?.(void 0),f?.({...l,bundle:{value:void 0,canOperate:!0}}),v?.({...c,bundle:d})},status:!!l?.bundle,bundleListItem:l?.bundle?.value,canOperate:l?.bundle?.canOperate}),l?.exchange?.value&&(0,e.jsx)(I,{exchangeOperation:d=>{x?.(void 0),f?.({...l,exchange:{value:void 0,canOperate:!0}}),v?.({...c,exchange:d})},status:!!l?.exchange,canOperate:l?.exchange?.canOperate,exchange:l?.exchange?.value})]}),(c?.bundle||c?.gift||c?.exchange)&&(0,e.jsxs)("div",{className:"mt-6",children:[(0,e.jsx)(a.Text,{className:"text-sm desktop:text-[18px] font-bold",html:"Recommend Buy"}),(0,e.jsxs)("div",{className:"flex flex-col gap-6 mt-6",children:[c?.exchange&&(0,e.jsx)(I,{exchangeOperation:d=>{y?.(void 0),f?.({bundle:{value:void 0,canOperate:!0},gift:{value:l?.gift?.value,canOperate:!0},exchange:{value:d,canOperate:!0}}),v?.({...c,exchange:void 0})},canOperate:l?.exchange?.canOperate,status:!c?.exchange,exchange:c?.exchange}),c?.bundle&&(0,e.jsx)(V,{bundleOperation:d=>{E?.(void 0),x?.(void 0),$?.({...k,exchangePurchase:0}),f?.({gift:{value:void 0,canOperate:!0},exchange:{value:void 0,canOperate:!0},bundle:{value:d,canOperate:!0}}),v?.({...c,bundle:void 0})},canOperate:l?.bundle?.canOperate,status:!c?.bundle,bundleListItem:c?.bundle}),c?.gift&&(0,e.jsx)(R,{giftOperation:d=>{y?.(void 0),f?.({bundle:{value:void 0,canOperate:!0},exchange:{value:l?.exchange?.value,canOperate:!0},gift:{value:d,canOperate:!0}}),v?.({...c,gift:void 0})},canOperate:l?.gift?.canOperate,status:!c?.gift,gift:c?.gift})]})]})]}),(0,e.jsxs)("div",{className:"text-right",children:[(0,e.jsx)(a.Text,{className:"laptop:text-xl desktop:text-2xl font-bold text-right",html:`${(0,T.replaceTemplate)(t?.totalPrice||"",{amount:(0,p.formatPrice)({amount:s,currencyCode:i.price.currencyCode,locale:n})})}`}),b>0&&(0,e.jsx)(a.Text,{className:"text-base laptop:text-xl desktop:text-2xl ml-1 font-bold line-through text-[#6D6D6F]",html:(0,p.formatPrice)({amount:m,currencyCode:i.price.currencyCode,locale:n})}),(0,e.jsxs)("div",{className:"flex gap-3 mt-2 justify-end",children:[(0,e.jsx)(a.Button,{size:"lg",variant:"secondary",loading:J,className:"w-1/2 tablet:w-auto laptop:w-1/2 desktop:w-auto",onClick:()=>D?.(),children:t?.addToCart}),(0,e.jsx)(a.Button,{size:"lg",loading:H,variant:"primary",className:"w-1/2 tablet:w-auto laptop:w-1/2 desktop:w-auto",onClick:()=>z?.(),children:t?.shopNow})]})]})]})]})})})},ae=()=>{const{bundle:n,variant:t,checkedBundle:o,freeGift:i,checkedGift:s,exchangePurchase:m,checkedExchangePurchase:g}=(0,h.useBizProductContext)();let u,r,b;const{bundleList:D}=n||{},{giftList:z=[]}=i||{},{giftList:k=[]}=m||{},O=D?.filter(x=>x.variants.slice(1,x.variants.length).every(y=>y.variant.availableForSale))||[],[l]=O;u=o||l;const[f]=z?.filter(x=>x.availableForSale);r=s||f;const[E]=k?.filter(x=>x.availableForSale);return b=g||E,{bundleVariant:u,giftVariant:r,exchangeVariant:b}},V=({bundleOperation:n,bundleListItem:t,canOperate:o,status:i})=>{const{locale:s="us"}=(0,C.useAiuiContext)(),{variant:m,setCheckedBundle:g}=(0,h.useBizProductContext)(),u=t?.variants.filter(r=>r.variant.sku!==m.sku);return(0,e.jsx)("div",{className:"",children:u?.map(r=>(0,e.jsxs)("div",{className:"flex items-center gap-4 justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)(a.Picture,{source:r?.variant?.image?.url,className:"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg"}),(0,e.jsx)("div",{className:"flex flex-col gap-[6px] line-clamp-2 max-w-[178px] tablet:max-w-none",children:(0,e.jsx)(a.Text,{className:"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]",html:r.variant.product.title})})]}),(0,e.jsxs)("div",{className:"flex flex-col items-end gap-1 justify-center",children:[!!t&&(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold",html:(0,p.formatPrice)({amount:r?.price||0,locale:s,currencyCode:r.variant?.price?.currencyCode||""})}),(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]",html:(0,p.formatPrice)({amount:r.variant.price.amount||0,locale:s,currencyCode:r.variant?.price?.currencyCode||""})})]}),o&&(0,e.jsx)(a.Button,{size:"icon",variant:"link",onClick:()=>{g?.(i?void 0:t),n?.(t)},className:"shrink-0 size-auto underline",children:i?"Remove":"Add"})]})]},r.variant.id))})},R=({giftOperation:n,gift:t,status:o,canOperate:i})=>{const{locale:s="us"}=(0,C.useAiuiContext)(),{freeGift:m,setCheckedGift:g}=(0,h.useBizProductContext)(),{freeLabel:u,count:r}=m||{};return(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)(a.Picture,{source:t?.image?.url,className:"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg"}),(0,e.jsxs)("div",{className:"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none",children:[(0,e.jsx)(a.Text,{className:"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]",html:t?.product?.title}),(0,e.jsx)(a.Text,{className:"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]",html:`x${r} | ${u}`})]})]}),(0,e.jsxs)("div",{className:"flex flex-col items-end gap-2 justify-center",children:[!!t&&(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold",html:u}),(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]",html:(0,p.formatPrice)({amount:t.price.amount,locale:s,currencyCode:t.price.currencyCode})})]}),i&&(0,e.jsx)(a.Button,{size:"icon",variant:"link",onClick:()=>{g?.(o?void 0:t),n(t)},className:"shrink-0 size-auto underline",children:o?"Remove":"Add"})]})]})},I=({exchangeOperation:n,exchange:t,canOperate:o,status:i})=>{const{locale:s="us"}=(0,C.useAiuiContext)(),{setCheckedExchangePurchase:m}=(0,h.useBizProductContext)();return(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)(a.Picture,{source:t?.image?.url,className:"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg"}),(0,e.jsxs)("div",{className:"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none",children:[(0,e.jsx)(a.Text,{className:"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]",html:t?.product?.title}),(0,e.jsx)(a.Text,{className:"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]"})]})]}),(0,e.jsxs)("div",{className:"flex flex-col items-end gap-2 justify-center",children:[!!t&&(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold",html:(0,p.formatPrice)({amount:t.finalPrice?.amount||0,locale:s,currencyCode:t.price.currencyCode})}),(0,e.jsx)(a.Text,{className:"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]",html:(0,p.formatPrice)({amount:t.price?.amount||0,locale:s,currencyCode:t.price.currencyCode})})]}),o&&(0,e.jsx)(a.Button,{size:"icon",variant:"link",onClick:()=>{m?.(i?void 0:t),n(t)},className:"shrink-0 size-auto underline",children:i?"Remove":"Add"})]})]})};var ne=te;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/biz-components/Listing/components/ProductCard/ProductSummary/index.tsx"],
4
- "sourcesContent": ["import { Text, Button, Container, Grid, GridItem, Picture, Heading } from '../../../../../components'\nimport type { ProductSummaryProps } from './types'\nimport { useBizProductContext } from '../../../BizProductProvider'\nimport { useEffect, useMemo, useState } from 'react'\nimport { formatPrice } from '../../../utils'\nimport { useAiuiContext } from '../../../../AiuiProvider'\nimport type { BundleListItem, ProductVariant, ProductPrice } from '../../../types/product'\nimport { cn } from '../../../../../helpers'\nimport Decimal from 'decimal.js'\nimport { replaceTemplate } from '../../../utils/textFormat'\n\nconst ProductSummary = ({}: ProductSummaryProps) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const {\n product,\n variant,\n finalPrice,\n comparePrice,\n coupon,\n selectedOptions,\n selectedVariants,\n totalSavings,\n onAddToCart,\n onBuyNow,\n savingDetail,\n checkedBundle,\n joinedRecommendBuyProducts,\n setJoinedRecommendBuyProducts,\n setCheckedGift,\n setCheckedExchangePurchase,\n setCheckedBundle,\n setSavingDetail,\n addToCartLoading,\n buyNowLoading,\n } = useBizProductContext()\n\n const [currentProductVariant] = selectedVariants\n\n const summaryFinalPrice = useMemo(() => {\n const [currentBundleVariant] = checkedBundle?.variants || []\n const currentBundlePrice = new Decimal(currentProductVariant?.price?.amount || 0)\n .minus(currentBundleVariant?.price || currentProductVariant?.price?.amount)\n .toNumber()\n return new Decimal(currentProductVariant?.price?.amount || 0)\n .minus(savingDetail?.coupon)\n .minus(currentBundlePrice)\n .toNumber()\n }, [currentProductVariant, totalSavings, checkedBundle])\n\n const isAvailable = variant.availableForSale\n if (!isAvailable) return null\n\n const { bundleVariant, giftVariant, exchangeVariant } = useRecommendBuyProducts() || {}\n const [initialRecommendBuyProducts, setInitialRecommendBuyProducts] = useState<{\n bundle?: BundleListItem\n gift?: ProductVariant\n exchange?: ProductVariant\n }>()\n\n useEffect(() => {\n setInitialRecommendBuyProducts({\n bundle: joinedRecommendBuyProducts.bundle?.value ? undefined : bundleVariant,\n gift: joinedRecommendBuyProducts.gift?.value ? undefined : giftVariant,\n exchange: joinedRecommendBuyProducts.exchange?.value ? undefined : exchangeVariant,\n })\n }, [bundleVariant, giftVariant, exchangeVariant, joinedRecommendBuyProducts])\n\n const comparePriceRemovedFreeGift = useMemo(\n () => new Decimal(comparePrice).minus(savingDetail.freeGift).toNumber(),\n [comparePrice, savingDetail]\n )\n\n return (\n <div className=\"ipc-product-summary laptop:px-16 desktop:px-0 mt-16 desktop:mt-[96px] lg-desktop:mt-[128px]\">\n <div className=\"bg-[#F5F5F7] laptop:rounded-2xl\">\n <Grid className=\"px-4 pt-6 tablet:p-8 tablet:!pb-0\">\n <GridItem className=\"col-span-12 laptop:col-start-1 laptop:col-span-5 gap-4 flex flex-col justify-between\">\n <Heading\n className=\"font-bold text-[24px] lg-desktop:text-[48px] laptop:text-[32px] desktop:text-[40px] leading-[1] mb-4 [&>span]:text-[#D1D1D1]\"\n html={`${product.title} is ready <br/><span>Just the way you want it.</span>`}\n />\n <div className=\"\">\n <Picture\n source={variant.image?.url || product?.images?.[0]?.url}\n className=\"lg-desktop:aspect-[644/368] desktop:aspect-[503/272] laptop:aspect-[331/191] tablet:aspect-[704/380] aspect-[358/192]\"\n imgClassName=\"object-cover h-full\"\n />\n </div>\n </GridItem>\n <GridItem className=\"col-span-12 mt-8 pb-6 tablet:pb-8 laptop:col-start-7 laptop:mt-0 laptop:col-span-6 flex flex-col gap-6 justify-between\">\n <div>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"shrink-0 flex items-center gap-4\">\n <Picture\n source={variant.image?.url || product?.images?.[0]?.url}\n className=\"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg\"\n />\n <div className=\"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]\"\n html={product.title}\n />\n <Text\n className=\"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]\"\n html={`x1 | ${selectedOptions.color || selectedOptions.colour || selectedOptions.couleur}`}\n />\n </div>\n </div>\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-base desktop:text-2xl font-bold\"\n html={formatPrice({\n amount: summaryFinalPrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n {totalSavings > 0 && (\n <Text\n className=\"text-base desktop:text-2xl laptop:text-xl font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: variant?.price?.amount,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n </div>\n </div>\n {joinedRecommendBuyProducts?.gift?.value && (\n <ProductGiftSummary\n giftOperation={gift => {\n setCheckedGift?.(undefined)\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n gift: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, gift })\n }}\n status={!!joinedRecommendBuyProducts?.gift}\n gift={joinedRecommendBuyProducts?.gift?.value}\n canOperate={joinedRecommendBuyProducts?.gift?.canOperate}\n />\n )}\n {joinedRecommendBuyProducts?.bundle?.value && (\n <ProductBundleSummary\n bundleOperation={bundle => {\n setCheckedBundle?.(undefined)\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n bundle: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, bundle })\n }}\n status={!!joinedRecommendBuyProducts?.bundle}\n bundleListItem={joinedRecommendBuyProducts?.bundle?.value}\n canOperate={joinedRecommendBuyProducts?.bundle?.canOperate}\n />\n )}\n {joinedRecommendBuyProducts?.exchange?.value && (\n <ProductExchangeSummary\n exchangeOperation={exchange => {\n setCheckedExchangePurchase?.(undefined)\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n exchange: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, exchange })\n }}\n status={!!joinedRecommendBuyProducts?.exchange}\n canOperate={joinedRecommendBuyProducts?.exchange?.canOperate}\n exchange={joinedRecommendBuyProducts?.exchange?.value}\n />\n )}\n </div>\n {(initialRecommendBuyProducts?.bundle ||\n initialRecommendBuyProducts?.gift ||\n initialRecommendBuyProducts?.exchange) && (\n <div className=\"mt-6\">\n <Text className=\"text-sm desktop:text-[18px] font-bold\" html={'Recommend Buy'} />\n <div className=\"flex flex-col gap-6 mt-6\">\n {initialRecommendBuyProducts?.exchange && (\n <ProductExchangeSummary\n exchangeOperation={exchange => {\n setCheckedBundle?.(undefined)\n setJoinedRecommendBuyProducts?.({\n bundle: {\n value: undefined,\n canOperate: true,\n },\n gift: {\n value: joinedRecommendBuyProducts?.gift?.value,\n canOperate: true,\n },\n exchange: {\n value: exchange,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, exchange: undefined })\n }}\n canOperate={joinedRecommendBuyProducts?.exchange?.canOperate}\n status={!initialRecommendBuyProducts?.exchange}\n exchange={initialRecommendBuyProducts?.exchange}\n />\n )}\n {initialRecommendBuyProducts?.bundle && (\n <ProductBundleSummary\n bundleOperation={bundle => {\n setCheckedGift?.(undefined)\n setCheckedExchangePurchase?.(undefined)\n setSavingDetail?.({ ...savingDetail, exchangePurchase: 0 })\n setJoinedRecommendBuyProducts?.({\n gift: {\n value: undefined,\n canOperate: true,\n },\n exchange: {\n value: undefined,\n canOperate: true,\n },\n bundle: {\n value: bundle,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, bundle: undefined })\n }}\n canOperate={joinedRecommendBuyProducts?.bundle?.canOperate}\n status={!initialRecommendBuyProducts?.bundle}\n bundleListItem={initialRecommendBuyProducts?.bundle}\n />\n )}\n {initialRecommendBuyProducts?.gift && (\n <ProductGiftSummary\n giftOperation={gift => {\n setCheckedBundle?.(undefined)\n setJoinedRecommendBuyProducts?.({\n bundle: {\n value: undefined,\n canOperate: true,\n },\n exchange: {\n value: joinedRecommendBuyProducts?.exchange?.value,\n canOperate: true,\n },\n gift: {\n value: gift,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, gift: undefined })\n }}\n canOperate={joinedRecommendBuyProducts?.gift?.canOperate}\n status={!initialRecommendBuyProducts?.gift}\n gift={initialRecommendBuyProducts?.gift}\n />\n )}\n </div>\n </div>\n )}\n </div>\n <div className=\"text-right\">\n <Text\n className=\"laptop:text-xl desktop:text-2xl font-bold text-right\"\n html={`${replaceTemplate(copyWriting?.totalPrice || '', { amount: formatPrice({ amount: finalPrice, currencyCode: variant.price.currencyCode, locale }) })}`}\n />\n\n {totalSavings > 0 && (\n <Text\n className=\"text-base laptop:text-xl desktop:text-2xl ml-1 font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n <div className=\"flex gap-3 mt-2 justify-end\">\n <Button\n size=\"lg\"\n variant=\"secondary\"\n loading={addToCartLoading}\n className=\"w-1/2 tablet:w-auto laptop:w-1/2 desktop:w-auto\"\n onClick={() => onAddToCart?.()}\n >\n {copyWriting?.addToCart}\n </Button>\n <Button\n size=\"lg\"\n loading={buyNowLoading}\n variant=\"primary\"\n className=\"w-1/2 tablet:w-auto laptop:w-1/2 desktop:w-auto\"\n onClick={() => onBuyNow?.()}\n >\n {copyWriting?.shopNow}\n </Button>\n </div>\n </div>\n </GridItem>\n </Grid>\n </div>\n </div>\n )\n}\n\nconst useRecommendBuyProducts = () => {\n const { bundle, variant, checkedBundle, freeGift, checkedGift, exchangePurchase, checkedExchangePurchase } =\n useBizProductContext()\n let bundleVariant = undefined\n let giftVariant = undefined\n let exchangeVariant = undefined\n const { bundleList } = bundle || {}\n\n const { giftList = [] } = freeGift || {}\n const { giftList: exchangeList = [] } = exchangePurchase || {}\n\n const availableBundleList =\n bundleList?.filter(bundle =>\n bundle.variants.slice(1, bundle.variants.length).every(v => v.variant.availableForSale)\n ) || []\n\n const [firstAvailableBundle] = availableBundleList\n bundleVariant = checkedBundle || firstAvailableBundle\n\n const [firstAvailableGift] = giftList?.filter(gift => gift.availableForSale)\n giftVariant = checkedGift || firstAvailableGift\n\n const [firstAvailableExchange] = exchangeList?.filter(exchange => exchange.availableForSale)\n exchangeVariant = checkedExchangePurchase || firstAvailableExchange\n\n return { bundleVariant, giftVariant, exchangeVariant }\n}\n\nconst ProductBundleSummary = ({\n bundleOperation,\n bundleListItem,\n canOperate,\n status,\n}: {\n bundleOperation: (bundle?: BundleListItem) => void\n bundleListItem?: BundleListItem\n canOperate?: boolean\n status?: boolean\n}) => {\n const { locale = 'us' } = useAiuiContext()\n const { variant, setCheckedBundle } = useBizProductContext()\n const bundleVariants = bundleListItem?.variants.filter(v => v.variant.sku !== variant.sku)\n\n return (\n <div className=\"\">\n {bundleVariants?.map(bundleVariant => {\n return (\n <div className=\"flex items-center gap-4 justify-between\" key={bundleVariant.variant.id}>\n <div className=\"flex items-center gap-4\">\n <Picture\n source={bundleVariant?.variant?.image?.url}\n className=\"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg\"\n />\n <div className=\"flex flex-col gap-[6px] line-clamp-2 max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]\"\n html={bundleVariant.variant.product.title}\n />\n </div>\n </div>\n <div className=\"flex flex-col items-end gap-1 justify-center\">\n {!!bundleListItem && (\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-base desktop:text-2xl font-bold\"\n html={formatPrice({\n amount: bundleVariant?.price || 0,\n locale,\n currencyCode: bundleVariant.variant?.price?.currencyCode || '',\n })}\n />\n <Text\n className=\"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: bundleVariant.variant.price.amount || 0,\n locale,\n currencyCode: bundleVariant.variant?.price?.currencyCode || '',\n })}\n />\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedBundle?.(status ? undefined : bundleListItem)\n bundleOperation?.(bundleListItem)\n }}\n className=\"shrink-0 size-auto underline\"\n >\n {!!status ? 'Remove' : 'Add'}\n </Button>\n )}\n </div>\n </div>\n )\n })}\n </div>\n )\n}\n\nconst ProductGiftSummary = ({\n giftOperation,\n gift,\n status,\n canOperate,\n}: {\n giftOperation: (gift?: ProductVariant) => void\n gift?: ProductVariant\n status?: boolean\n canOperate?: boolean\n}) => {\n const { locale = 'us' } = useAiuiContext()\n const { freeGift, setCheckedGift } = useBizProductContext()\n const { freeLabel, count } = freeGift || {}\n\n return (\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <Picture\n source={gift?.image?.url}\n className=\"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg\"\n />\n <div className=\"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]\"\n html={gift?.product?.title}\n />\n <Text\n className=\"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]\"\n html={`x${count} | ${freeLabel}`}\n />\n </div>\n </div>\n <div className=\"flex flex-col items-end gap-2 justify-center\">\n {!!gift && (\n <div className=\"flex items-center gap-1\">\n <Text className=\"text-base desktop:text-2xl font-bold\" html={freeLabel} />\n <Text\n className=\"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: gift.price.amount,\n locale,\n currencyCode: gift.price.currencyCode,\n })}\n />\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedGift?.(status ? undefined : gift)\n giftOperation(gift)\n }}\n className=\"shrink-0 size-auto underline\"\n >\n {status ? 'Remove' : 'Add'}\n </Button>\n )}\n </div>\n </div>\n )\n}\n\nconst ProductExchangeSummary = ({\n exchangeOperation,\n exchange,\n canOperate,\n status,\n}: {\n exchangeOperation: (exchange?: ProductVariant) => void\n exchange?: ProductVariant & { finalPrice?: ProductPrice }\n canOperate?: boolean\n status?: boolean\n}) => {\n const { locale = 'us' } = useAiuiContext()\n const { setCheckedExchangePurchase } = useBizProductContext()\n\n return (\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <Picture\n source={exchange?.image?.url}\n className=\"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg\"\n />\n <div className=\"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]\"\n html={exchange?.product?.title}\n />\n <Text className=\"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]\" />\n </div>\n </div>\n <div className=\"flex flex-col items-end gap-2 justify-center\">\n {!!exchange && (\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-base desktop:text-2xl font-bold\"\n html={formatPrice({\n amount: exchange.finalPrice?.amount || 0,\n locale,\n currencyCode: exchange.price.currencyCode,\n })}\n />\n <Text\n className=\"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: exchange.price?.amount || 0,\n locale,\n currencyCode: exchange.price.currencyCode,\n })}\n />\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedExchangePurchase?.(status ? undefined : exchange)\n exchangeOperation(exchange)\n }}\n className=\"shrink-0 size-auto underline\"\n >\n {status ? 'Remove' : 'Add'}\n </Button>\n )}\n </div>\n </div>\n )\n}\n\nexport default ProductSummary\n"],
5
- "mappings": "0jBAAA,IAAAA,GA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OAAC,QAAK,UAAU,8EAA8E,GAChG,GACF,KACA,QAAC,OAAI,UAAU,+CACZ,WAAC,CAACA,MACD,QAAC,OAAI,UAAU,0BACb,oBAAC,QACC,UAAU,uCACV,QAAM,eAAY,CAChB,OAAQA,EAAS,YAAY,QAAU,EACvC,OAAAvC,EACA,aAAcuC,EAAS,MAAM,YAC/B,CAAC,EACH,KACA,OAAC,QACC,UAAU,mEACV,QAAM,eAAY,CAChB,OAAQA,EAAS,OAAO,QAAU,EAClC,OAAAvC,EACA,aAAcuC,EAAS,MAAM,YAC/B,CAAC,EACH,GACF,EAEDe,MACC,OAAC,UACC,KAAK,OACL,QAAQ,OACR,QAAS,IAAM,CACbrC,IAA6BsC,EAAS,OAAYhB,CAAQ,EAC1DqB,EAAkBrB,CAAQ,CAC5B,EACA,UAAU,+BAET,SAAAgB,EAAS,SAAW,MACvB,GAEJ,GACF,CAEJ,EAEA,IAAOnE,GAAQW",
6
- "names": ["ProductSummary_exports", "__export", "ProductSummary_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_BizProductProvider", "import_react", "import_utils", "import_AiuiProvider", "import_helpers", "import_decimal", "import_textFormat", "ProductSummary", "locale", "copyWriting", "product", "variant", "finalPrice", "comparePrice", "coupon", "selectedOptions", "selectedVariants", "totalSavings", "onAddToCart", "onBuyNow", "savingDetail", "checkedBundle", "joinedRecommendBuyProducts", "setJoinedRecommendBuyProducts", "setCheckedGift", "setCheckedExchangePurchase", "setCheckedBundle", "setSavingDetail", "addToCartLoading", "buyNowLoading", "currentProductVariant", "summaryFinalPrice", "currentBundleVariant", "currentBundlePrice", "Decimal", "bundleVariant", "giftVariant", "exchangeVariant", "useRecommendBuyProducts", "initialRecommendBuyProducts", "setInitialRecommendBuyProducts", "comparePriceRemovedFreeGift", "ProductGiftSummary", "gift", "ProductBundleSummary", "bundle", "ProductExchangeSummary", "exchange", "freeGift", "checkedGift", "exchangePurchase", "checkedExchangePurchase", "bundleList", "giftList", "exchangeList", "availableBundleList", "v", "firstAvailableBundle", "firstAvailableGift", "firstAvailableExchange", "bundleOperation", "bundleListItem", "canOperate", "status", "bundleVariants", "giftOperation", "freeLabel", "count", "exchangeOperation"]
4
+ "sourcesContent": ["import { Text, Button, Container, Grid, GridItem, Picture, Heading } from '../../../../../components'\nimport type { ProductSummaryProps } from './types'\nimport { useBizProductContext } from '../../../BizProductProvider'\nimport { useEffect, useMemo, useState } from 'react'\nimport { formatPrice } from '../../../utils'\nimport { useAiuiContext } from '../../../../AiuiProvider'\nimport type { BundleListItem, ProductVariant, ProductPrice } from '../../../types/product'\nimport { cn } from '../../../../../helpers'\nimport Decimal from 'decimal.js'\nimport { replaceTemplate } from '../../../utils/textFormat'\n\nconst ProductSummary = ({}: ProductSummaryProps) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const {\n product,\n variant,\n finalPrice,\n comparePrice,\n coupon,\n selectedOptions,\n selectedVariants,\n totalSavings,\n onAddToCart,\n onBuyNow,\n savingDetail,\n checkedBundle,\n joinedRecommendBuyProducts,\n setJoinedRecommendBuyProducts,\n setCheckedGift,\n setCheckedExchangePurchase,\n setCheckedBundle,\n setSavingDetail,\n addToCartLoading,\n buyNowLoading,\n profile,\n } = useBizProductContext()\n\n const [currentProductVariant] = selectedVariants\n\n const summaryFinalPrice = useMemo(() => {\n const currentBundleVariant = checkedBundle?.variants.find(v => v.variant.sku === currentProductVariant?.sku)\n const currentBundlePrice = new Decimal(currentProductVariant?.price?.amount || 0)\n .minus(currentBundleVariant?.price || currentProductVariant?.price?.amount)\n .toNumber()\n let currentProductPrice = new Decimal(currentProductVariant?.price?.amount || 0)\n if (!!profile?.email) {\n currentProductPrice = currentProductPrice.minus(savingDetail?.member || 0)\n }\n currentProductPrice.minus(savingDetail?.coupon).minus(currentBundlePrice).toNumber()\n return currentProductPrice.toNumber()\n }, [currentProductVariant, totalSavings, checkedBundle, profile])\n\n const isAvailable = variant.availableForSale\n if (!isAvailable) return null\n\n const { bundleVariant, giftVariant, exchangeVariant } = useRecommendBuyProducts() || {}\n const [initialRecommendBuyProducts, setInitialRecommendBuyProducts] = useState<{\n bundle?: BundleListItem\n gift?: ProductVariant\n exchange?: ProductVariant\n }>()\n\n useEffect(() => {\n setInitialRecommendBuyProducts({\n bundle: joinedRecommendBuyProducts.bundle?.value ? undefined : bundleVariant,\n gift: joinedRecommendBuyProducts.gift?.value ? undefined : giftVariant,\n exchange: joinedRecommendBuyProducts.exchange?.value ? undefined : exchangeVariant,\n })\n }, [bundleVariant, giftVariant, exchangeVariant, joinedRecommendBuyProducts])\n\n return (\n <div className=\"ipc-product-summary laptop:px-16 desktop:px-0 mt-16 desktop:mt-[96px] lg-desktop:mt-[128px]\">\n <div className=\"bg-[#F5F5F7] laptop:rounded-2xl\">\n <Grid className=\"px-4 pt-6 tablet:p-8 tablet:!pb-0\">\n <GridItem className=\"col-span-12 laptop:col-start-1 laptop:col-span-5 gap-4 flex flex-col justify-between\">\n <Heading\n className=\"font-bold text-[24px] lg-desktop:text-[48px] laptop:text-[32px] desktop:text-[40px] leading-[1] mb-4 [&>span]:text-[#D1D1D1]\"\n html={`${product.title} is ready <br/><span>Just the way you want it.</span>`}\n />\n <div className=\"\">\n <Picture\n source={variant.image?.url || product?.images?.[0]?.url}\n className=\"lg-desktop:aspect-[644/368] desktop:aspect-[503/272] laptop:aspect-[331/191] tablet:aspect-[704/380] aspect-[358/192]\"\n imgClassName=\"object-cover h-full\"\n />\n </div>\n </GridItem>\n <GridItem className=\"col-span-12 mt-8 pb-6 tablet:pb-8 laptop:col-start-7 laptop:mt-0 laptop:col-span-6 flex flex-col gap-6 justify-between\">\n <div>\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"shrink-0 flex items-center gap-4\">\n <Picture\n source={variant.image?.url || product?.images?.[0]?.url}\n className=\"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg\"\n />\n <div className=\"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]\"\n html={product.title}\n />\n <Text\n className=\"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]\"\n html={`x1 | ${selectedOptions.color || selectedOptions.colour || selectedOptions.couleur}`}\n />\n </div>\n </div>\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-base desktop:text-2xl font-bold\"\n html={formatPrice({\n amount: summaryFinalPrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n {totalSavings > 0 && (\n <Text\n className=\"text-base desktop:text-2xl laptop:text-xl font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: variant?.price?.amount,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n </div>\n </div>\n {joinedRecommendBuyProducts?.gift?.value && (\n <ProductGiftSummary\n giftOperation={gift => {\n setCheckedGift?.(undefined)\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n gift: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, gift })\n }}\n status={!!joinedRecommendBuyProducts?.gift}\n gift={joinedRecommendBuyProducts?.gift?.value}\n canOperate={joinedRecommendBuyProducts?.gift?.canOperate}\n />\n )}\n {joinedRecommendBuyProducts?.bundle?.value && (\n <ProductBundleSummary\n bundleOperation={bundle => {\n setCheckedBundle?.(undefined)\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n bundle: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, bundle })\n }}\n status={!!joinedRecommendBuyProducts?.bundle}\n bundleListItem={joinedRecommendBuyProducts?.bundle?.value}\n canOperate={joinedRecommendBuyProducts?.bundle?.canOperate}\n />\n )}\n {joinedRecommendBuyProducts?.exchange?.value && (\n <ProductExchangeSummary\n exchangeOperation={exchange => {\n setCheckedExchangePurchase?.(undefined)\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n exchange: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, exchange })\n }}\n status={!!joinedRecommendBuyProducts?.exchange}\n canOperate={joinedRecommendBuyProducts?.exchange?.canOperate}\n exchange={joinedRecommendBuyProducts?.exchange?.value}\n />\n )}\n </div>\n {(initialRecommendBuyProducts?.bundle ||\n initialRecommendBuyProducts?.gift ||\n initialRecommendBuyProducts?.exchange) && (\n <div className=\"mt-6\">\n <Text className=\"text-sm desktop:text-[18px] font-bold\" html={'Recommend Buy'} />\n <div className=\"flex flex-col gap-6 mt-6\">\n {initialRecommendBuyProducts?.exchange && (\n <ProductExchangeSummary\n exchangeOperation={exchange => {\n setCheckedBundle?.(undefined)\n setJoinedRecommendBuyProducts?.({\n bundle: {\n value: undefined,\n canOperate: true,\n },\n gift: {\n value: joinedRecommendBuyProducts?.gift?.value,\n canOperate: true,\n },\n exchange: {\n value: exchange,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, exchange: undefined })\n }}\n canOperate={joinedRecommendBuyProducts?.exchange?.canOperate}\n status={!initialRecommendBuyProducts?.exchange}\n exchange={initialRecommendBuyProducts?.exchange}\n />\n )}\n {initialRecommendBuyProducts?.bundle && (\n <ProductBundleSummary\n bundleOperation={bundle => {\n setCheckedGift?.(undefined)\n setCheckedExchangePurchase?.(undefined)\n setSavingDetail?.({ ...savingDetail, exchangePurchase: 0 })\n setJoinedRecommendBuyProducts?.({\n gift: {\n value: undefined,\n canOperate: true,\n },\n exchange: {\n value: undefined,\n canOperate: true,\n },\n bundle: {\n value: bundle,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, bundle: undefined })\n }}\n canOperate={joinedRecommendBuyProducts?.bundle?.canOperate}\n status={!initialRecommendBuyProducts?.bundle}\n bundleListItem={initialRecommendBuyProducts?.bundle}\n />\n )}\n {initialRecommendBuyProducts?.gift && (\n <ProductGiftSummary\n giftOperation={gift => {\n setCheckedBundle?.(undefined)\n setJoinedRecommendBuyProducts?.({\n bundle: {\n value: undefined,\n canOperate: true,\n },\n exchange: {\n value: joinedRecommendBuyProducts?.exchange?.value,\n canOperate: true,\n },\n gift: {\n value: gift,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, gift: undefined })\n }}\n canOperate={joinedRecommendBuyProducts?.gift?.canOperate}\n status={!initialRecommendBuyProducts?.gift}\n gift={initialRecommendBuyProducts?.gift}\n />\n )}\n </div>\n </div>\n )}\n </div>\n <div className=\"text-right\">\n <Text\n className=\"laptop:text-xl desktop:text-2xl font-bold text-right\"\n html={`${replaceTemplate(copyWriting?.totalPrice || '', { amount: formatPrice({ amount: finalPrice, currencyCode: variant.price.currencyCode, locale }) })}`}\n />\n\n {totalSavings > 0 && (\n <Text\n className=\"text-base laptop:text-xl desktop:text-2xl ml-1 font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n <div className=\"flex gap-3 mt-2 justify-end\">\n <Button\n size=\"lg\"\n variant=\"secondary\"\n loading={addToCartLoading}\n className=\"w-1/2 tablet:w-auto laptop:w-1/2 desktop:w-auto\"\n onClick={() => onAddToCart?.()}\n >\n {copyWriting?.addToCart}\n </Button>\n <Button\n size=\"lg\"\n loading={buyNowLoading}\n variant=\"primary\"\n className=\"w-1/2 tablet:w-auto laptop:w-1/2 desktop:w-auto\"\n onClick={() => onBuyNow?.()}\n >\n {copyWriting?.shopNow}\n </Button>\n </div>\n </div>\n </GridItem>\n </Grid>\n </div>\n </div>\n )\n}\n\nconst useRecommendBuyProducts = () => {\n const { bundle, variant, checkedBundle, freeGift, checkedGift, exchangePurchase, checkedExchangePurchase } =\n useBizProductContext()\n let bundleVariant = undefined\n let giftVariant = undefined\n let exchangeVariant = undefined\n const { bundleList } = bundle || {}\n\n const { giftList = [] } = freeGift || {}\n const { giftList: exchangeList = [] } = exchangePurchase || {}\n\n const availableBundleList =\n bundleList?.filter(bundle =>\n bundle.variants.slice(1, bundle.variants.length).every(v => v.variant.availableForSale)\n ) || []\n\n const [firstAvailableBundle] = availableBundleList\n bundleVariant = checkedBundle || firstAvailableBundle\n\n const [firstAvailableGift] = giftList?.filter(gift => gift.availableForSale)\n giftVariant = checkedGift || firstAvailableGift\n\n const [firstAvailableExchange] = exchangeList?.filter(exchange => exchange.availableForSale)\n exchangeVariant = checkedExchangePurchase || firstAvailableExchange\n\n return { bundleVariant, giftVariant, exchangeVariant }\n}\n\nconst ProductBundleSummary = ({\n bundleOperation,\n bundleListItem,\n canOperate,\n status,\n}: {\n bundleOperation: (bundle?: BundleListItem) => void\n bundleListItem?: BundleListItem\n canOperate?: boolean\n status?: boolean\n}) => {\n const { locale = 'us' } = useAiuiContext()\n const { variant, setCheckedBundle } = useBizProductContext()\n const bundleVariants = bundleListItem?.variants.filter(v => v.variant.sku !== variant.sku)\n\n return (\n <div className=\"\">\n {bundleVariants?.map(bundleVariant => {\n return (\n <div className=\"flex items-center gap-4 justify-between\" key={bundleVariant.variant.id}>\n <div className=\"flex items-center gap-4\">\n <Picture\n source={bundleVariant?.variant?.image?.url}\n className=\"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg\"\n />\n <div className=\"flex flex-col gap-[6px] line-clamp-2 max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] desktop:text-[16px] lg-desktop:text-[18px]\"\n html={bundleVariant.variant.product.title}\n />\n </div>\n </div>\n <div className=\"flex flex-col items-end gap-1 justify-center\">\n {!!bundleListItem && (\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-base desktop:text-2xl font-bold\"\n html={formatPrice({\n amount: bundleVariant?.price || 0,\n locale,\n currencyCode: bundleVariant.variant?.price?.currencyCode || '',\n })}\n />\n <Text\n className=\"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: bundleVariant.variant.price.amount || 0,\n locale,\n currencyCode: bundleVariant.variant?.price?.currencyCode || '',\n })}\n />\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedBundle?.(status ? undefined : bundleListItem)\n bundleOperation?.(bundleListItem)\n }}\n className=\"shrink-0 size-auto underline\"\n >\n {!!status ? 'Remove' : 'Add'}\n </Button>\n )}\n </div>\n </div>\n )\n })}\n </div>\n )\n}\n\nconst ProductGiftSummary = ({\n giftOperation,\n gift,\n status,\n canOperate,\n}: {\n giftOperation: (gift?: ProductVariant) => void\n gift?: ProductVariant\n status?: boolean\n canOperate?: boolean\n}) => {\n const { locale = 'us' } = useAiuiContext()\n const { freeGift, setCheckedGift } = useBizProductContext()\n const { freeLabel, count } = freeGift || {}\n\n return (\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <Picture\n source={gift?.image?.url}\n className=\"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg\"\n />\n <div className=\"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]\"\n html={gift?.product?.title}\n />\n <Text\n className=\"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]\"\n html={`x${count} | ${freeLabel}`}\n />\n </div>\n </div>\n <div className=\"flex flex-col items-end gap-2 justify-center\">\n {!!gift && (\n <div className=\"flex items-center gap-1\">\n <Text className=\"text-base desktop:text-2xl font-bold\" html={freeLabel} />\n <Text\n className=\"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: gift.price.amount,\n locale,\n currencyCode: gift.price.currencyCode,\n })}\n />\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedGift?.(status ? undefined : gift)\n giftOperation(gift)\n }}\n className=\"shrink-0 size-auto underline\"\n >\n {status ? 'Remove' : 'Add'}\n </Button>\n )}\n </div>\n </div>\n )\n}\n\nconst ProductExchangeSummary = ({\n exchangeOperation,\n exchange,\n canOperate,\n status,\n}: {\n exchangeOperation: (exchange?: ProductVariant) => void\n exchange?: ProductVariant & { finalPrice?: ProductPrice }\n canOperate?: boolean\n status?: boolean\n}) => {\n const { locale = 'us' } = useAiuiContext()\n const { setCheckedExchangePurchase } = useBizProductContext()\n\n return (\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-4\">\n <Picture\n source={exchange?.image?.url}\n className=\"size-10 laptop:size-12 p-2 lg-desktop:size-16 object-cover border-1 border-[#E4E5E6] bg-[#EAEAEC] rounded-[5px] rounded-lg\"\n />\n <div className=\"flex flex-col gap-[6px] max-w-[178px] tablet:max-w-none\">\n <Text\n className=\"font-bold text-[14px] line-clamp-2 desktop:text-[16px] lg-desktop:text-[18px]\"\n html={exchange?.product?.title}\n />\n <Text className=\"text-[12px] laptop:text-[14px] desktop:text-[18px] font-bold text-[#6D6D6F]\" />\n </div>\n </div>\n <div className=\"flex flex-col items-end gap-2 justify-center\">\n {!!exchange && (\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-base desktop:text-2xl font-bold\"\n html={formatPrice({\n amount: exchange.finalPrice?.amount || 0,\n locale,\n currencyCode: exchange.price.currencyCode,\n })}\n />\n <Text\n className=\"text-base desktop:text-2xl font-bold line-through text-[#6D6D6F]\"\n html={formatPrice({\n amount: exchange.price?.amount || 0,\n locale,\n currencyCode: exchange.price.currencyCode,\n })}\n />\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedExchangePurchase?.(status ? undefined : exchange)\n exchangeOperation(exchange)\n }}\n className=\"shrink-0 size-auto underline\"\n >\n {status ? 'Remove' : 'Add'}\n </Button>\n )}\n </div>\n </div>\n )\n}\n\nexport default ProductSummary\n"],
5
+ "mappings": "2jBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IA0EU,IAAAI,EAAA,6BA1EVC,EAA0E,qCAE1EC,EAAqC,uCACrCC,EAA6C,iBAC7CC,EAA4B,0BAC5BC,EAA+B,oCAE/BC,GAAmB,kCACnBC,EAAoB,yBACpBC,EAAgC,qCAEhC,MAAMC,GAAiB,CAAC,CAAC,IAA2B,CAClD,KAAM,CAAE,OAAAC,EAAS,KAAM,YAAAC,CAAY,KAAI,kBAAe,EAChD,CACJ,QAAAC,EACA,QAAAC,EACA,WAAAC,EACA,aAAAC,EACA,OAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,aAAAC,EACA,cAAAC,EACA,2BAAAC,EACA,8BAAAC,EACA,eAAAC,EACA,2BAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,cAAAC,EACA,QAAAC,CACF,KAAI,wBAAqB,EAEnB,CAACC,CAAqB,EAAIf,EAE1BgB,KAAoB,WAAQ,IAAM,CACtC,MAAMC,EAAuBZ,GAAe,SAAS,KAAKa,GAAKA,EAAE,QAAQ,MAAQH,GAAuB,GAAG,EACrGI,EAAqB,IAAI,EAAAC,QAAQL,GAAuB,OAAO,QAAU,CAAC,EAC7E,MAAME,GAAsB,OAASF,GAAuB,OAAO,MAAM,EACzE,SAAS,EACZ,IAAIM,EAAsB,IAAI,EAAAD,QAAQL,GAAuB,OAAO,QAAU,CAAC,EAC/E,OAAMD,GAAS,QACbO,EAAsBA,EAAoB,MAAMjB,GAAc,QAAU,CAAC,GAE3EiB,EAAoB,MAAMjB,GAAc,MAAM,EAAE,MAAMe,CAAkB,EAAE,SAAS,EAC5EE,EAAoB,SAAS,CACtC,E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C,OAAI,UAAU,oCACb,qBAAC,OAAI,UAAU,0BACb,oBAAC,WACC,OAAQwB,GAAU,OAAO,IACzB,UAAU,6HACZ,KACA,QAAC,OAAI,UAAU,0DACb,oBAAC,QACC,UAAU,gFACV,KAAMA,GAAU,SAAS,MAC3B,KACA,OAAC,QAAK,UAAU,8EAA8E,GAChG,GACF,KACA,QAAC,OAAI,UAAU,+CACZ,WAAC,CAACA,MACD,QAAC,OAAI,UAAU,0BACb,oBAAC,QACC,UAAU,uCACV,QAAM,eAAY,CAChB,OAAQA,EAAS,YAAY,QAAU,EACvC,OAAAzC,EACA,aAAcyC,EAAS,MAAM,YAC/B,CAAC,EACH,KACA,OAAC,QACC,UAAU,mEACV,QAAM,eAAY,CAChB,OAAQA,EAAS,OAAO,QAAU,EAClC,OAAAzC,EACA,aAAcyC,EAAS,MAAM,YAC/B,CAAC,EACH,GACF,EAEDc,MACC,OAAC,UACC,KAAK,OACL,QAAQ,OACR,QAAS,IAAM,CACbtC,IAA6BuC,EAAS,OAAYf,CAAQ,EAC1DoB,EAAkBpB,CAAQ,CAC5B,EACA,UAAU,+BAET,SAAAe,EAAS,SAAW,MACvB,GAEJ,GACF,CAEJ,EAEA,IAAOpE,GAAQW",
6
+ "names": ["ProductSummary_exports", "__export", "ProductSummary_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_BizProductProvider", "import_react", "import_utils", "import_AiuiProvider", "import_helpers", "import_decimal", "import_textFormat", "ProductSummary", "locale", "copyWriting", "product", "variant", "finalPrice", "comparePrice", "coupon", "selectedOptions", "selectedVariants", "totalSavings", "onAddToCart", "onBuyNow", "savingDetail", "checkedBundle", "joinedRecommendBuyProducts", "setJoinedRecommendBuyProducts", "setCheckedGift", "setCheckedExchangePurchase", "setCheckedBundle", "setSavingDetail", "addToCartLoading", "buyNowLoading", "profile", "currentProductVariant", "summaryFinalPrice", "currentBundleVariant", "v", "currentBundlePrice", "Decimal", "currentProductPrice", "bundleVariant", "giftVariant", "exchangeVariant", "useRecommendBuyProducts", "initialRecommendBuyProducts", "setInitialRecommendBuyProducts", "ProductGiftSummary", "gift", "ProductBundleSummary", "bundle", "ProductExchangeSummary", "exchange", "freeGift", "checkedGift", "exchangePurchase", "checkedExchangePurchase", "bundleList", "giftList", "exchangeList", "availableBundleList", "firstAvailableBundle", "firstAvailableGift", "firstAvailableExchange", "bundleOperation", "bundleListItem", "canOperate", "status", "bundleVariants", "giftOperation", "freeLabel", "count", "exchangeOperation"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";var T=Object.create;var m=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var A=(e,t)=>{for(var o in t)m(e,o,{get:t[o],enumerable:!0})},g=(e,t,o,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of B(t))!M.call(e,r)&&r!==o&&m(e,r,{get:()=>t[r],enumerable:!(c=P(t,r))||c.enumerable});return e};var z=(e,t,o)=>(o=e!=null?T(F(e)):{},g(t||!e||!e.__esModule?m(o,"default",{value:e,enumerable:!0}):o,e)),L=e=>g(m({},"__esModule",{value:!0}),e);var O={};A(O,{default:()=>G});module.exports=L(O);var a=require("react/jsx-runtime"),l=require("../../../../../components"),v=require("../../../../AiuiProvider/index.js"),f=require("../../../BizProductProvider.js"),s=require("react"),n=require("../../../utils"),C=z(require("decimal.js")),p=require("../../../utils/textFormat");const D=()=>{const{copyWriting:e,locale:t="us"}=(0,v.useAiuiContext)(),{variant:o,finalPrice:c,totalSavings:r,memberFunctionResult:x,isLogin:d,comparePrice:u,onAddToCart:y,onBuyNow:N,savingDetail:b,coupon:R,addToCartLoading:S,buyNowLoading:w}=(0,f.useBizProductContext)(),W=(0,s.useMemo)(()=>new C.default(u).minus(b.freeGift).toNumber(),[u,b]),i=Math.max(x?.withCouponMemberTotalSave??0,x?.withoutCouponMaxMemberTotalSave??0),h=(0,s.useMemo)(()=>(0,p.replaceTemplate)(e?.totalSavings||"",{amount:(0,n.formatPrice)({amount:r,currencyCode:o.price.currencyCode,locale:t})}),[e?.totalSavings,r,o.price.currencyCode,t]),k=(0,s.useMemo)(()=>(0,p.replaceTemplate)(e?.memberSaving||"",{amount:(0,n.formatPrice)({amount:i,currencyCode:o.price.currencyCode,locale:t})}),[e?.memberSaving,i,o.price.currencyCode,t]);return(0,a.jsxs)("div",{className:"bg-white py-3 px-4 tablet:p-0 tablet:flex tablet:items-center tablet:gap-4",children:[o.availableForSale?(0,a.jsxs)("div",{className:"flex items-center justify-between tablet:flex-col desktop:items-end",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(l.Text,{className:"text-xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:(0,n.formatPrice)({amount:c,currencyCode:o.price.currencyCode,locale:t})}),(r>0||i>0&&d)&&(0,a.jsx)(l.Text,{className:"text-xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:(0,n.formatPrice)({amount:u,currencyCode:o.price.currencyCode,locale:t})})]}),(r>0||i>0&&d)&&(0,a.jsx)(l.Text,{className:"text-brand-0 text-base !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl",html:`${i>0&&d?k:h}`})]}):(0,a.jsx)(l.Text,{className:"text-[20px] font-bold text-[#999999]",html:e?.soldOut??"Sold Out"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-2 tablet:mt-0",children:[(0,a.jsx)(l.Button,{variant:"secondary",disabled:!o.availableForSale,size:"lg",className:"w-1/2 tablet:w-auto",onClick:()=>y?.(),loading:S,children:e?.addToCart??"Add to Cart"}),(0,a.jsx)(l.Button,{variant:"primary",disabled:!o.availableForSale,size:"lg",loading:w,className:"w-1/2 tablet:w-auto",onClick:()=>N?.(),children:e?.buyNow??"Buy Now"})]})]})};var G=D;
1
+ "use strict";var s=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},P=(t,e,o,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of h(e))!k.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(c=w(e,r))||c.enumerable});return t};var B=t=>P(s({},"__esModule",{value:!0}),t);var F={};T(F,{default:()=>A});module.exports=B(F);var a=require("react/jsx-runtime"),l=require("../../../../../components"),x=require("../../../../AiuiProvider/index.js"),b=require("../../../BizProductProvider.js"),d=require("react"),n=require("../../../utils"),O=require("decimal.js"),u=require("../../../utils/textFormat");const M=()=>{const{copyWriting:t,locale:e="us"}=(0,x.useAiuiContext)(),{variant:o,finalPrice:c,totalSavings:r,memberFunctionResult:p,isLogin:m,comparePrice:g,onAddToCart:v,onBuyNow:f,savingDetail:z,coupon:L,addToCartLoading:C,buyNowLoading:y}=(0,b.useBizProductContext)(),i=Math.max(p?.withCouponMemberTotalSave??0,p?.withoutCouponMaxMemberTotalSave??0),N=(0,d.useMemo)(()=>(0,u.replaceTemplate)(t?.totalSavings||"",{amount:(0,n.formatPrice)({amount:r,currencyCode:o.price.currencyCode,locale:e})}),[t?.totalSavings,r,o.price.currencyCode,e]),S=(0,d.useMemo)(()=>(0,u.replaceTemplate)(t?.memberSaving||"",{amount:(0,n.formatPrice)({amount:i,currencyCode:o.price.currencyCode,locale:e})}),[t?.memberSaving,i,o.price.currencyCode,e]);return(0,a.jsxs)("div",{className:"bg-white py-3 px-4 tablet:p-0 tablet:flex tablet:items-center tablet:gap-4",children:[o.availableForSale?(0,a.jsxs)("div",{className:"flex items-center justify-between tablet:flex-col desktop:items-end",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(l.Text,{className:"text-xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:(0,n.formatPrice)({amount:c,currencyCode:o.price.currencyCode,locale:e})}),(r>0||i>0&&m)&&(0,a.jsx)(l.Text,{className:"text-xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl",html:(0,n.formatPrice)({amount:g,currencyCode:o.price.currencyCode,locale:e})})]}),(r>0||i>0&&m)&&(0,a.jsx)(l.Text,{className:"text-brand-0 text-base !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl",html:`${i>0&&m?S:N}`})]}):(0,a.jsx)(l.Text,{className:"text-[20px] font-bold text-[#999999]",html:t?.soldOut??"Sold Out"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-2 tablet:mt-0",children:[(0,a.jsx)(l.Button,{variant:"secondary",disabled:!o.availableForSale,size:"lg",className:"w-1/2 tablet:w-auto",onClick:()=>v?.(),loading:C,children:t?.addToCart??"Add to Cart"}),(0,a.jsx)(l.Button,{variant:"primary",disabled:!o.availableForSale,size:"lg",loading:y,className:"w-1/2 tablet:w-auto",onClick:()=>f?.(),children:t?.buyNow??"Buy Now"})]})]})};var A=M;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/biz-components/Listing/components/PurchaseBar/ProductActions/index.tsx"],
4
- "sourcesContent": ["import { Text, Button } from '../../../../../components'\nimport { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useMemo } from 'react'\nimport { formatPrice } from '../../../utils'\nimport Decimal from 'decimal.js'\nimport { replaceTemplate } from '../../../utils/textFormat'\n\nconst ProductActions = () => {\n const { copyWriting, locale = 'us' } = useAiuiContext()\n const {\n variant,\n finalPrice,\n totalSavings,\n memberFunctionResult,\n isLogin,\n comparePrice,\n onAddToCart,\n onBuyNow,\n savingDetail,\n coupon,\n addToCartLoading,\n buyNowLoading,\n } = useBizProductContext()\n\n const comparePriceRemovedFreeGift = useMemo(\n () => new Decimal(comparePrice).minus(savingDetail.freeGift).toNumber(),\n [comparePrice, savingDetail]\n )\n\n const memberPriceSave = Math.max(\n memberFunctionResult?.withCouponMemberTotalSave ?? 0,\n memberFunctionResult?.withoutCouponMaxMemberTotalSave ?? 0\n )\n\n const totalSavingsText = useMemo(() => {\n return replaceTemplate(copyWriting?.totalSavings || '', {\n amount: formatPrice({ amount: totalSavings, currencyCode: variant.price.currencyCode, locale }),\n })\n }, [copyWriting?.totalSavings, totalSavings, variant.price.currencyCode, locale])\n\n const memberPriceSaveText = useMemo(() => {\n return replaceTemplate(copyWriting?.memberSaving || '', {\n amount: formatPrice({ amount: memberPriceSave, currencyCode: variant.price.currencyCode, locale }),\n })\n }, [copyWriting?.memberSaving, memberPriceSave, variant.price.currencyCode, locale])\n\n return (\n <div className=\"bg-white py-3 px-4 tablet:p-0 tablet:flex tablet:items-center tablet:gap-4\">\n {variant.availableForSale ? (\n <div className=\"flex items-center justify-between tablet:flex-col desktop:items-end\">\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({ amount: finalPrice, currencyCode: variant.price.currencyCode, locale })}\n />\n {(totalSavings > 0 || memberPriceSave > 0 && isLogin ) && (\n <Text\n className=\"text-xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n </div>\n {(totalSavings > 0 || (memberPriceSave > 0 && isLogin)) && (\n <Text\n className=\"text-brand-0 text-base !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl\"\n html={`${memberPriceSave > 0 && isLogin ? memberPriceSaveText : totalSavingsText}`}\n />\n )}\n </div>\n ) : (\n <Text className=\"text-[20px] font-bold text-[#999999]\" html={copyWriting?.soldOut ?? 'Sold Out'} />\n )}\n <div className=\"flex items-center gap-2 mt-2 tablet:mt-0\">\n <Button\n variant=\"secondary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onAddToCart?.()}\n loading={addToCartLoading}\n >\n {copyWriting?.addToCart ?? 'Add to Cart'}\n </Button>\n <Button\n variant=\"primary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n loading={buyNowLoading}\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onBuyNow?.()}\n >\n {copyWriting?.buyNow ?? 'Buy Now'}\n </Button>\n </div>\n </div>\n )\n}\n\nexport default ProductActions\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmDU,IAAAI,EAAA,6BAnDVC,EAA6B,qCAC7BC,EAA+B,6CAC/BC,EAAqC,0CACrCC,EAAwB,iBACxBC,EAA4B,0BAC5BC,EAAoB,yBACpBC,EAAgC,qCAEhC,MAAMC,EAAiB,IAAM,CAC3B,KAAM,CAAE,YAAAC,EAAa,OAAAC,EAAS,IAAK,KAAI,kBAAe,EAChD,CACJ,QAAAC,EACA,WAAAC,EACA,aAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,aAAAC,EACA,OAAAC,EACA,iBAAAC,EACA,cAAAC,CACF,KAAI,wBAAqB,EAEnBC,KAA8B,WAClC,IAAM,IAAI,EAAAC,QAAQR,CAAY,EAAE,MAAMG,EAAa,QAAQ,EAAE,SAAS,EACtE,CAACH,EAAcG,CAAY,CAC7B,EAEMM,EAAkB,KAAK,IAC3BX,GAAsB,2BAA6B,EACnDA,GAAsB,iCAAmC,CAC3D,EAEMY,KAAmB,WAAQ,OACxB,mBAAgBjB,GAAa,cAAgB,GAAI,CACtD,UAAQ,eAAY,CAAE,OAAQI,EAAc,aAAcF,EAAQ,MAAM,aAAc,OAAAD,CAAO,CAAC,CAChG,CAAC,EACA,CAACD,GAAa,aAAcI,EAAcF,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAE1EiB,KAAsB,WAAQ,OAC3B,mBAAgBlB,GAAa,cAAgB,GAAI,CACtD,UAAQ,eAAY,CAAE,OAAQgB,EAAiB,aAAcd,EAAQ,MAAM,aAAc,OAAAD,CAAO,CAAC,CACnG,CAAC,EACA,CAACD,GAAa,aAAcgB,EAAiBd,EAAQ,MAAM,aAAcD,CAAM,CAAC,EAEnF,SACE,QAAC,OAAI,UAAU,6EACZ,UAAAC,EAAQ,oBACP,QAAC,OAAI,UAAU,sEACb,qBAAC,OAAI,UAAU,0BACb,oBAAC,QACC,UAAU,uEACV,QAAM,eAAY,CAAE,OAAQC,EAAY,aAAcD,EAAQ,MAAM,aAAc,OAAAD,CAAO,CAAC,EAC5F,GACEG,EAAe,GAAKY,EAAkB,GAAKV,OAC3C,OAAC,QACC,UAAU,gGACV,QAAM,eAAY,CAChB,OAAQC,EACR,aAAcL,EAAQ,MAAM,aAC5B,OAAAD,CACF,CAAC,EACH,GAEJ,GACEG,EAAe,GAAMY,EAAkB,GAAKV,OAC5C,OAAC,QACC,UAAU,sFACV,KAAM,GAAGU,EAAkB,GAAKV,EAAUY,EAAsBD,CAAgB,GAClF,GAEJ,KAEA,OAAC,QAAK,UAAU,uCAAuC,KAAMjB,GAAa,SAAW,WAAY,KAEnG,QAAC,OAAI,UAAU,2CACb,oBAAC,UACC,QAAQ,YACR,SAAU,CAACE,EAAQ,iBACnB,KAAK,KACL,UAAU,sBACV,QAAS,IAAMM,IAAc,EAC7B,QAASI,EAER,SAAAZ,GAAa,WAAa,cAC7B,KACA,OAAC,UACC,QAAQ,UACR,SAAU,CAACE,EAAQ,iBACnB,KAAK,KACL,QAASW,EACT,UAAU,sBACV,QAAS,IAAMJ,IAAW,EAEzB,SAAAT,GAAa,QAAU,UAC1B,GACF,GACF,CAEJ,EAEA,IAAOX,EAAQU",
6
- "names": ["ProductActions_exports", "__export", "ProductActions_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_AiuiProvider", "import_BizProductProvider", "import_react", "import_utils", "import_decimal", "import_textFormat", "ProductActions", "copyWriting", "locale", "variant", "finalPrice", "totalSavings", "memberFunctionResult", "isLogin", "comparePrice", "onAddToCart", "onBuyNow", "savingDetail", "coupon", "addToCartLoading", "buyNowLoading", "comparePriceRemovedFreeGift", "Decimal", "memberPriceSave", "totalSavingsText", "memberPriceSaveText"]
4
+ "sourcesContent": ["import { Text, Button } from '../../../../../components'\nimport { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useMemo } from 'react'\nimport { formatPrice } from '../../../utils'\nimport Decimal from 'decimal.js'\nimport { replaceTemplate } from '../../../utils/textFormat'\n\nconst ProductActions = () => {\n const { copyWriting, locale = 'us' } = useAiuiContext()\n const {\n variant,\n finalPrice,\n totalSavings,\n memberFunctionResult,\n isLogin,\n comparePrice,\n onAddToCart,\n onBuyNow,\n savingDetail,\n coupon,\n addToCartLoading,\n buyNowLoading,\n } = useBizProductContext()\n\n const memberPriceSave = Math.max(\n memberFunctionResult?.withCouponMemberTotalSave ?? 0,\n memberFunctionResult?.withoutCouponMaxMemberTotalSave ?? 0\n )\n\n const totalSavingsText = useMemo(() => {\n return replaceTemplate(copyWriting?.totalSavings || '', {\n amount: formatPrice({ amount: totalSavings, currencyCode: variant.price.currencyCode, locale }),\n })\n }, [copyWriting?.totalSavings, totalSavings, variant.price.currencyCode, locale])\n\n const memberPriceSaveText = useMemo(() => {\n return replaceTemplate(copyWriting?.memberSaving || '', {\n amount: formatPrice({ amount: memberPriceSave, currencyCode: variant.price.currencyCode, locale }),\n })\n }, [copyWriting?.memberSaving, memberPriceSave, variant.price.currencyCode, locale])\n\n return (\n <div className=\"bg-white py-3 px-4 tablet:p-0 tablet:flex tablet:items-center tablet:gap-4\">\n {variant.availableForSale ? (\n <div className=\"flex items-center justify-between tablet:flex-col desktop:items-end\">\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"text-xl font-bold !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({ amount: finalPrice, currencyCode: variant.price.currencyCode, locale })}\n />\n {(totalSavings > 0 || memberPriceSave > 0 && isLogin ) && (\n <Text\n className=\"text-xl font-bold line-through text-[#999] !leading-[1.2] desktop:text-xl lg-desktop:text-2xl\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n </div>\n {(totalSavings > 0 || (memberPriceSave > 0 && isLogin)) && (\n <Text\n className=\"text-brand-0 text-base !leading-[1.2] font-bold desktop:text-xl lg-desktop:text-2xl\"\n html={`${memberPriceSave > 0 && isLogin ? memberPriceSaveText : totalSavingsText}`}\n />\n )}\n </div>\n ) : (\n <Text className=\"text-[20px] font-bold text-[#999999]\" html={copyWriting?.soldOut ?? 'Sold Out'} />\n )}\n <div className=\"flex items-center gap-2 mt-2 tablet:mt-0\">\n <Button\n variant=\"secondary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onAddToCart?.()}\n loading={addToCartLoading}\n >\n {copyWriting?.addToCart ?? 'Add to Cart'}\n </Button>\n <Button\n variant=\"primary\"\n disabled={!variant.availableForSale}\n size=\"lg\"\n loading={buyNowLoading}\n className=\"w-1/2 tablet:w-auto\"\n onClick={() => onBuyNow?.()}\n >\n {copyWriting?.buyNow ?? 'Buy Now'}\n </Button>\n </div>\n </div>\n )\n}\n\nexport default ProductActions\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA8CU,IAAAI,EAAA,6BA9CVC,EAA6B,qCAC7BC,EAA+B,6CAC/BC,EAAqC,0CACrCC,EAAwB,iBACxBC,EAA4B,0BAC5BC,EAAoB,sBACpBC,EAAgC,qCAEhC,MAAMC,EAAiB,IAAM,CAC3B,KAAM,CAAE,YAAAC,EAAa,OAAAC,EAAS,IAAK,KAAI,kBAAe,EAChD,CACJ,QAAAC,EACA,WAAAC,EACA,aAAAC,EACA,qBAAAC,EACA,QAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,E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UAAU,sBACV,QAAS,IAAMM,IAAc,EAC7B,QAASI,EAER,SAAAZ,GAAa,WAAa,cAC7B,KACA,OAAC,UACC,QAAQ,UACR,SAAU,CAACE,EAAQ,iBACnB,KAAK,KACL,QAASW,EACT,UAAU,sBACV,QAAS,IAAMJ,IAAW,EAEzB,SAAAT,GAAa,QAAU,UAC1B,GACF,GACF,CAEJ,EAEA,IAAOX,EAAQU",
6
+ "names": ["ProductActions_exports", "__export", "ProductActions_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_AiuiProvider", "import_BizProductProvider", "import_react", "import_utils", "import_decimal", "import_textFormat", "ProductActions", "copyWriting", "locale", "variant", "finalPrice", "totalSavings", "memberFunctionResult", "isLogin", "comparePrice", "onAddToCart", "onBuyNow", "savingDetail", "coupon", "addToCartLoading", "buyNowLoading", "memberPriceSave", "totalSavingsText", "memberPriceSaveText"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { type ProductContextType } from './BizProductProvider.js';
2
3
  declare const Listing: React.FC<Omit<ProductContextType, 'joinedRecommendBuyProducts' | 'setJoinedRecommendBuyProducts'>>;
3
4
  export default Listing;
@@ -1,2 +1,2 @@
1
- "use strict";var j=Object.create;var d=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var V=(e,o)=>{for(var t in o)d(e,t,{get:o[t],enumerable:!0})},p=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of J(o))!Q.call(e,r)&&r!==t&&d(e,r,{get:()=>o[r],enumerable:!(n=F(o,r))||n.enumerable});return e};var E=(e,o,t)=>(t=e!=null?j(K(e)):{},p(o||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),H=e=>p(d({},"__esModule",{value:!0}),e);var W={};V(W,{default:()=>U});module.exports=H(W);var i=require("react/jsx-runtime"),m=require("../AiuiProvider/index.js"),c=require("./components/index.js"),u=E(require("./BizProductProvider.js")),y=require("./components/index.js"),a=require("react-responsive");const l=({product:e,renderRating:o,variant:t,selectedOptions:n,setSelectedOptions:r,isLogin:X,finalPrice:f,coupon:P,comparePrice:v,totalSavings:C,savingDetail:S,freeGift:g,bundle:h,checkedBundle:k,checkedGift:B,setCheckedBundle:N,setCheckedGift:x,compareData:I,selectedVariants:A,onAddToCart:D,onBuyNow:b,openModal:w,setSavingDetail:M,openSignInPopup:R,openAuthCodePopup:z,renderAffirm:G,renderKlarna:L,renderPaypal:O})=>{const{locale:Y}=(0,m.useAiuiContext)(),s=(0,a.useMediaQuery)({query:"(max-width: 768px)"}),T=(0,a.useMediaQuery)({query:"(min-width: 1440px)"});return(0,i.jsx)(u.default,{product:e,isMobile:s,isDesktop:T,freeGift:g,renderRating:o,finalPrice:f,comparePrice:v,totalSavings:C,savingDetail:S,variant:t,selectedOptions:n,setSelectedOptions:r,bundle:h,coupon:P,checkedBundle:k,checkedGift:B,setCheckedBundle:N,setCheckedGift:x,compareData:I,selectedVariants:A,onAddToCart:D,onBuyNow:b,openModal:w,setSavingDetail:M,openSignInPopup:R,openAuthCodePopup:z,renderAffirm:G,renderKlarna:L,renderPaypal:O,children:(0,i.jsxs)("div",{id:"ipc-listing",children:[(0,i.jsx)(c.PurchaseBar,{onSpyNavItemClick:q=>{console.log(q)}}),s&&(0,i.jsx)("div",{className:"fixed bottom-0 left-0 w-full z-[60]",children:(0,i.jsx)(c.ProductActions,{})}),(0,i.jsx)(y.ProductCard,{})]})})};l.displayName="Listing";var U=l;
1
+ "use strict";var T=Object.create;var c=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var Q=(e,t)=>{for(var o in t)c(e,o,{get:t[o],enumerable:!0})},p=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of j(t))!J.call(e,n)&&n!==o&&c(e,n,{get:()=>t[n],enumerable:!(r=q(t,n))||r.enumerable});return e};var V=(e,t,o)=>(o=e!=null?T(F(e)):{},p(t||!e||!e.__esModule?c(o,"default",{value:e,enumerable:!0}):o,e)),E=e=>p(c({},"__esModule",{value:!0}),e);var K={};Q(K,{default:()=>H});module.exports=E(K);var i=require("react/jsx-runtime"),m=require("../AiuiProvider/index.js"),d=require("./components/index.js"),u=V(require("./BizProductProvider.js")),y=require("./components/index.js"),s=require("react-responsive");const l=({product:e,renderRating:t,variant:o,selectedOptions:r,setSelectedOptions:n,isLogin:U,finalPrice:P,coupon:f,comparePrice:v,totalSavings:C,savingDetail:S,freeGift:g,bundle:h,checkedBundle:k,checkedGift:B,setCheckedBundle:N,setCheckedGift:x,compareData:I,selectedVariants:D,onAddToCart:b,onBuyNow:w,openModal:A,setSavingDetail:M,openSignInPopup:R,openAuthCodePopup:z,renderInstallments:G})=>{const{locale:W}=(0,m.useAiuiContext)(),a=(0,s.useMediaQuery)({query:"(max-width: 768px)"}),L=(0,s.useMediaQuery)({query:"(min-width: 1440px)"});return(0,i.jsx)(u.default,{product:e,isMobile:a,isDesktop:L,freeGift:g,renderRating:t,finalPrice:P,comparePrice:v,totalSavings:C,savingDetail:S,variant:o,selectedOptions:r,setSelectedOptions:n,bundle:h,coupon:f,checkedBundle:k,checkedGift:B,setCheckedBundle:N,setCheckedGift:x,compareData:I,selectedVariants:D,onAddToCart:b,onBuyNow:w,openModal:A,setSavingDetail:M,openSignInPopup:R,openAuthCodePopup:z,renderInstallments:G,children:(0,i.jsxs)("div",{id:"ipc-listing",children:[(0,i.jsx)(d.PurchaseBar,{onSpyNavItemClick:O=>{console.log(O)}}),a&&(0,i.jsx)("div",{className:"fixed bottom-0 left-0 w-full z-[60]",children:(0,i.jsx)(d.ProductActions,{})}),(0,i.jsx)(y.ProductCard,{})]})})};l.displayName="Listing";var H=l;
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Listing/index.tsx"],
4
- "sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { PurchaseBar, ProductActions } from './components/index.js'\nimport type { ScrollSpyNavItem } from './components/PurchaseBar/types.js'\nimport BizProductProvider, { type ProductContextType } from './BizProductProvider.js'\nimport { ProductCard } from './components/index.js'\n\nimport { useMediaQuery } from 'react-responsive'\n\nconst Listing: React.FC<Omit<ProductContextType, 'joinedRecommendBuyProducts' | 'setJoinedRecommendBuyProducts'>> = ({\n product,\n renderRating,\n variant,\n selectedOptions,\n setSelectedOptions,\n isLogin,\n finalPrice,\n coupon,\n comparePrice,\n totalSavings,\n savingDetail,\n freeGift,\n bundle,\n checkedBundle,\n checkedGift,\n setCheckedBundle,\n setCheckedGift,\n compareData,\n selectedVariants,\n onAddToCart,\n onBuyNow,\n openModal,\n setSavingDetail,\n openSignInPopup,\n openAuthCodePopup,\n renderAffirm,\n renderKlarna,\n renderPaypal,\n}) => {\n const { locale } = useAiuiContext()\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isDesktop = useMediaQuery({ query: '(min-width: 1440px)' })\n\n const onSpyNavItemClick = (tab: ScrollSpyNavItem) => {\n console.log(tab)\n }\n\n return (\n <BizProductProvider\n product={product}\n isMobile={isMobile}\n isDesktop={isDesktop}\n freeGift={freeGift}\n renderRating={renderRating}\n finalPrice={finalPrice}\n comparePrice={comparePrice}\n totalSavings={totalSavings}\n savingDetail={savingDetail}\n variant={variant}\n selectedOptions={selectedOptions}\n setSelectedOptions={setSelectedOptions}\n bundle={bundle}\n coupon={coupon}\n checkedBundle={checkedBundle}\n checkedGift={checkedGift}\n setCheckedBundle={setCheckedBundle}\n setCheckedGift={setCheckedGift}\n compareData={compareData}\n selectedVariants={selectedVariants}\n onAddToCart={onAddToCart}\n onBuyNow={onBuyNow}\n openModal={openModal}\n setSavingDetail={setSavingDetail}\n openSignInPopup={openSignInPopup}\n openAuthCodePopup={openAuthCodePopup}\n renderAffirm={renderAffirm}\n renderKlarna={renderKlarna}\n renderPaypal={renderPaypal}\n >\n <div id=\"ipc-listing\">\n <PurchaseBar onSpyNavItemClick={onSpyNavItemClick} />\n {isMobile && (\n <div className=\"fixed bottom-0 left-0 w-full z-[60]\">\n <ProductActions />\n </div>\n )}\n <ProductCard />\n </div>\n </BizProductProvider>\n )\n}\n\nListing.displayName = 'Listing'\n\nexport default Listing\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA+EM,IAAAI,EAAA,6BA/ENC,EAA+B,oCAC/BC,EAA4C,iCAE5CC,EAA4D,sCAC5DD,EAA4B,iCAE5BE,EAA8B,4BAE9B,MAAMC,EAA8G,CAAC,CACnH,QAAAC,EACA,aAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,QAAAC,EACA,WAAAC,EACA,OAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,SAAAC,EACA,OAAAC,EACA,cAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,YAAAC,EACA,SAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,CACF,IAAM,CACJ,KAAM,CAAE,OAAAC,CAAO,KAAI,kBAAe,EAE5BC,KAAW,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EACxDC,KAAY,iBAAc,CAAE,MAAO,qBAAsB,CAAC,EAMhE,SACE,OAAC,EAAAC,QAAA,CACC,QAAS/B,EACT,SAAU6B,EACV,UAAWC,EACX,SAAUnB,EACV,aAAcV,EACd,WAAYK,EACZ,aAAcE,EACd,aAAcC,EACd,aAAcC,EACd,QAASR,EACT,gBAAiBC,EACjB,mBAAoBC,EACpB,OAAQQ,EACR,OAAQL,EACR,cAAeM,EACf,YAAaC,EACb,iBAAkBC,EAClB,eAAgBC,EAChB,YAAaC,EACb,iBAAkBC,EAClB,YAAaC,EACb,SAAUC,EACV,UAAWC,EACX,gBAAiBC,EACjB,gBAAiBC,EACjB,kBAAmBC,EACnB,aAAcC,EACd,aAAcC,EACd,aAAcC,EAEd,oBAAC,OAAI,GAAG,cACN,oBAAC,eAAY,kBArCQK,GAA0B,CACnD,QAAQ,IAAIA,CAAG,CACjB,EAmCyD,EAClDH,MACC,OAAC,OAAI,UAAU,sCACb,mBAAC,mBAAe,EAClB,KAEF,OAAC,gBAAY,GACf,EACF,CAEJ,EAEA9B,EAAQ,YAAc,UAEtB,IAAOP,EAAQO",
6
- "names": ["Listing_exports", "__export", "Listing_default", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_components", "import_BizProductProvider", "import_react_responsive", "Listing", "product", "renderRating", "variant", "selectedOptions", "setSelectedOptions", "isLogin", "finalPrice", "coupon", "comparePrice", "totalSavings", "savingDetail", "freeGift", "bundle", "checkedBundle", "checkedGift", "setCheckedBundle", "setCheckedGift", "compareData", "selectedVariants", "onAddToCart", "onBuyNow", "openModal", "setSavingDetail", "openSignInPopup", "openAuthCodePopup", "renderAffirm", "renderKlarna", "renderPaypal", "locale", "isMobile", "isDesktop", "BizProductProvider", "tab"]
4
+ "sourcesContent": ["import { useAiuiContext } from '../AiuiProvider/index.js'\nimport { PurchaseBar, ProductActions } from './components/index.js'\nimport type { ScrollSpyNavItem } from './components/PurchaseBar/types.js'\nimport BizProductProvider, { type ProductContextType } from './BizProductProvider.js'\nimport { ProductCard } from './components/index.js'\n\nimport { useMediaQuery } from 'react-responsive'\n\nconst Listing: React.FC<Omit<ProductContextType, 'joinedRecommendBuyProducts' | 'setJoinedRecommendBuyProducts'>> = ({\n product,\n renderRating,\n variant,\n selectedOptions,\n setSelectedOptions,\n isLogin,\n finalPrice,\n coupon,\n comparePrice,\n totalSavings,\n savingDetail,\n freeGift,\n bundle,\n checkedBundle,\n checkedGift,\n setCheckedBundle,\n setCheckedGift,\n compareData,\n selectedVariants,\n onAddToCart,\n onBuyNow,\n openModal,\n setSavingDetail,\n openSignInPopup,\n openAuthCodePopup,\n renderInstallments,\n}) => {\n const { locale } = useAiuiContext()\n\n const isMobile = useMediaQuery({ query: '(max-width: 768px)' })\n const isDesktop = useMediaQuery({ query: '(min-width: 1440px)' })\n\n const onSpyNavItemClick = (tab: ScrollSpyNavItem) => {\n console.log(tab)\n }\n\n return (\n <BizProductProvider\n product={product}\n isMobile={isMobile}\n isDesktop={isDesktop}\n freeGift={freeGift}\n renderRating={renderRating}\n finalPrice={finalPrice}\n comparePrice={comparePrice}\n totalSavings={totalSavings}\n savingDetail={savingDetail}\n variant={variant}\n selectedOptions={selectedOptions}\n setSelectedOptions={setSelectedOptions}\n bundle={bundle}\n coupon={coupon}\n checkedBundle={checkedBundle}\n checkedGift={checkedGift}\n setCheckedBundle={setCheckedBundle}\n setCheckedGift={setCheckedGift}\n compareData={compareData}\n selectedVariants={selectedVariants}\n onAddToCart={onAddToCart}\n onBuyNow={onBuyNow}\n openModal={openModal}\n setSavingDetail={setSavingDetail}\n openSignInPopup={openSignInPopup}\n openAuthCodePopup={openAuthCodePopup}\n renderInstallments={renderInstallments}\n >\n <div id=\"ipc-listing\">\n <PurchaseBar onSpyNavItemClick={onSpyNavItemClick} />\n {isMobile && (\n <div className=\"fixed bottom-0 left-0 w-full z-[60]\">\n <ProductActions />\n </div>\n )}\n <ProductCard />\n </div>\n </BizProductProvider>\n )\n}\n\nListing.displayName = 'Listing'\n\nexport default Listing\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GA2EM,IAAAI,EAAA,6BA3ENC,EAA+B,oCAC/BC,EAA4C,iCAE5CC,EAA4D,sCAC5DD,EAA4B,iCAE5BE,EAA8B,4BAE9B,MAAMC,EAA8G,CAAC,CACnH,QAAAC,EACA,aAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,QAAAC,EACA,WAAAC,EACA,OAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,SAAAC,EACA,OAAAC,EACA,cAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,YAAAC,EACA,SAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,mBAAAC,CACF,IAAM,CACJ,KAAM,CAAE,OAAAC,CAAO,KAAI,kBAAe,EAE5BC,KAAW,iBAAc,CAAE,MAAO,oBAAqB,CAAC,EACxDC,KAAY,iBAAc,CAAE,MAAO,qBAAsB,CAAC,EAMhE,SACE,OAAC,EAAAC,QAAA,CACC,QAAS7B,EACT,SAAU2B,EACV,UAAWC,EACX,SAAUjB,EACV,aAAcV,EACd,WAAYK,EACZ,aAAcE,EACd,aAAcC,EACd,aAAcC,EACd,QAASR,EACT,gBAAiBC,EACjB,mBAAoBC,EACpB,OAAQQ,EACR,OAAQL,EACR,cAAeM,EACf,YAAaC,EACb,iBAAkBC,EAClB,eAAgBC,EAChB,YAAaC,EACb,iBAAkBC,EAClB,YAAaC,EACb,SAAUC,EACV,UAAWC,EACX,gBAAiBC,EACjB,gBAAiBC,EACjB,kBAAmBC,EACnB,mBAAoBC,EAEpB,oBAAC,OAAI,GAAG,cACN,oBAAC,eAAY,kBAnCQK,GAA0B,CACnD,QAAQ,IAAIA,CAAG,CACjB,EAiCyD,EAClDH,MACC,OAAC,OAAI,UAAU,sCACb,mBAAC,mBAAe,EAClB,KAEF,OAAC,gBAAY,GACf,EACF,CAEJ,EAEA5B,EAAQ,YAAc,UAEtB,IAAOP,EAAQO",
6
+ "names": ["Listing_exports", "__export", "Listing_default", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_components", "import_BizProductProvider", "import_react_responsive", "Listing", "product", "renderRating", "variant", "selectedOptions", "setSelectedOptions", "isLogin", "finalPrice", "coupon", "comparePrice", "totalSavings", "savingDetail", "freeGift", "bundle", "checkedBundle", "checkedGift", "setCheckedBundle", "setCheckedGift", "compareData", "selectedVariants", "onAddToCart", "onBuyNow", "openModal", "setSavingDetail", "openSignInPopup", "openAuthCodePopup", "renderInstallments", "locale", "isMobile", "isDesktop", "BizProductProvider", "tab"]
7
7
  }
@@ -11,8 +11,8 @@ declare const MarqueeImageContent: {
11
11
  };
12
12
  declare const MarqueeTextContent: React.ForwardRefExoticComponent<MarqueeTextContentProps & React.RefAttributes<HTMLDivElement>>;
13
13
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<MarqueeProps & React.RefAttributes<SwiperRef>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
14
- className?: string;
15
- data?: Record<string, any>;
14
+ className?: string | undefined;
15
+ data?: Record<string, any> | undefined;
16
16
  }, "ref"> & React.RefAttributes<any>>;
17
17
  export default _default;
18
18
  export { MarqueeItem, MarqueeImageContent, MarqueeTextContent };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Media, Theme } from '../../types/props.js';
2
3
  /**
3
4
  * 评论项数据结构
@@ -35,7 +36,7 @@ export interface MarqueeReviewProps {
35
36
  className?: string;
36
37
  }
37
38
  declare const _default: import("react").ForwardRefExoticComponent<Omit<MarqueeReviewProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
38
- className?: string;
39
- data?: Record<string, any>;
39
+ className?: string | undefined;
40
+ data?: Record<string, any> | undefined;
40
41
  } & import("react").RefAttributes<any>>;
41
42
  export default _default;
@@ -1,6 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import type { MediaPlayerBaseProps } from './types.js';
2
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<MediaPlayerBaseProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
3
- className?: string;
4
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
5
6
  }, "ref"> & import("react").RefAttributes<any>>;
6
7
  export default _default;
@@ -1,6 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import type { MediaPlayerMultiProps } from './types.js';
2
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<MediaPlayerMultiProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
3
- className?: string;
4
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
5
6
  }, "ref"> & import("react").RefAttributes<any>>;
6
7
  export default _default;
@@ -3,7 +3,7 @@ import type { MediaPlayerBaseProps } from './types.js';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<MediaPlayerBaseProps & React.RefAttributes<{
4
4
  mediaPlayerStickyRef: HTMLDivElement;
5
5
  }>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
6
- className?: string;
7
- data?: Record<string, any>;
6
+ className?: string | undefined;
7
+ data?: Record<string, any> | undefined;
8
8
  }, "ref"> & React.RefAttributes<any>>;
9
9
  export default _default;
@@ -1,7 +1,8 @@
1
+ /// <reference types="react" />
1
2
  import type { MediaSceneSwitcherProps } from './types.js';
2
3
  import 'swiper/css';
3
4
  declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<MediaSceneSwitcherProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
- className?: string;
5
- data?: Record<string, any>;
5
+ className?: string | undefined;
6
+ data?: Record<string, any> | undefined;
6
7
  }, "ref"> & import("react").RefAttributes<any>>;
7
8
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { MemberEquityProps } from './types.js';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<MemberEquityProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
- className?: string;
5
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
6
  } & React.RefAttributes<any>>;
7
7
  export default _default;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { MultiLayoutGraphicBlockProps } from './types';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<MultiLayoutGraphicBlockProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
- className?: string;
5
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
6
  }, "ref"> & React.RefAttributes<any>>;
7
7
  export default _default;
8
8
  export type { MultiLayoutGraphicBlockProps };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { NavigationSearchProps } from './types.js';
2
3
  export declare const canSearch: (target: any) => boolean;
3
4
  declare const NavigationSearch: import("react").ForwardRefExoticComponent<NavigationSearchProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Media, Theme, Shape } from '../../types/props.js';
2
3
  export interface ProductItemData {
3
4
  /** 产品标签文本 */
@@ -31,7 +32,7 @@ export interface ProductCompareProps {
31
32
  className?: string;
32
33
  }
33
34
  declare const _default: import("react").ForwardRefExoticComponent<Omit<ProductCompareProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
34
- className?: string;
35
- data?: Record<string, any>;
35
+ className?: string | undefined;
36
+ data?: Record<string, any> | undefined;
36
37
  } & import("react").RefAttributes<any>>;
37
38
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { ProductHeroProps } from './types.js';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<ProductHeroProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
- className?: string;
5
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
6
  }, "ref"> & React.RefAttributes<any>>;
7
7
  export default _default;
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var N=Object.create;var c=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var v=(t,e)=>{for(var s in e)c(t,s,{get:e[s],enumerable:!0})},m=(t,e,s,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of k(e))!g.call(t,r)&&r!==s&&c(t,r,{get:()=>e[r],enumerable:!(l=H(e,r))||l.enumerable});return t};var w=(t,e,s)=>(s=t!=null?N(P(t)):{},m(e||!t||!t.__esModule?c(s,"default",{value:t,enumerable:!0}):s,t)),T=t=>m(c({},"__esModule",{value:!0}),t);var E={};v(E,{default:()=>D});module.exports=T(E);var o=require("react/jsx-runtime"),a=w(require("react")),p=require("../../components/index.js"),n=require("../../helpers/utils.js"),d=require("../../shared/Styles.js"),f=require("../../hooks/useExposure.js");const y="image",L="product_hero",u=a.default.forwardRef(({data:t,className:e},s)=>{const{title:l,subtitle:r,ctaText:h,poster:b,mobPoster:x,ctaLink:_}=t,i=(0,a.useRef)(null);return(0,f.useExposure)(i,{componentType:y,componentName:L,componentTitle:l,componentDescription:r}),(0,a.useImperativeHandle)(s,()=>i.current),(0,o.jsxs)("section",{ref:i,"data-ui-component-id":"ProductHero",className:(0,n.cn)("product-hero flex w-full flex-col items-center justify-between gap-[32px] tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px]",e),children:[(0,o.jsxs)("div",{className:"product-hero__content flex w-full flex-col items-start gap-[24px] tablet:basis-[42%] laptop:basis-[36%]",children:[(0,o.jsxs)("div",{className:"product-hero__text",children:[(0,o.jsx)(p.Heading,{as:"h3",size:4,html:l,className:"product-hero__title"}),(0,o.jsx)(p.Heading,{as:"h4",size:2,html:r,className:"product-hero__subtitle product-hero__subtitle--desktop mt-[4px] hidden laptop:mt-[12px] laptop:block desktop:mt-[16px]"}),(0,o.jsx)(p.Text,{as:"p",size:2,html:r,className:"product-hero__subtitle product-hero__subtitle--mobile mt-[4px] block laptop:mt-[12px] laptop:hidden desktop:mt-[16px]"})]}),(0,o.jsx)("a",{href:_,className:"product-hero__cta-link",children:(0,o.jsx)(p.Button,{className:"product-hero__cta-button w-fit",children:h})})]}),(0,o.jsx)(p.Picture,{className:"product-hero__image aspect-[358/360] flex-shrink tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%]",source:`${b.url}, ${x.url} 768`})]})});u.displayName="ProductHero";var D=(0,d.withLayout)(u);
1
+ "use strict";"use client";var N=Object.create;var c=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var v=(t,e)=>{for(var s in e)c(t,s,{get:e[s],enumerable:!0})},m=(t,e,s,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of k(e))!g.call(t,r)&&r!==s&&c(t,r,{get:()=>e[r],enumerable:!(l=H(e,r))||l.enumerable});return t};var w=(t,e,s)=>(s=t!=null?N(P(t)):{},m(e||!t||!t.__esModule?c(s,"default",{value:t,enumerable:!0}):s,t)),T=t=>m(c({},"__esModule",{value:!0}),t);var E={};v(E,{default:()=>D});module.exports=T(E);var o=require("react/jsx-runtime"),a=w(require("react")),p=require("../../components/index.js"),n=require("../../helpers/utils.js"),d=require("../../shared/Styles.js"),f=require("../../hooks/useExposure.js");const y="image",L="product_hero",u=a.default.forwardRef(({data:t,className:e},s)=>{const{title:l,subtitle:r,ctaText:h,poster:b,mobPoster:x,ctaLink:_}=t,i=(0,a.useRef)(null);return(0,f.useExposure)(i,{componentType:y,componentName:L,componentTitle:l,componentDescription:r}),(0,a.useImperativeHandle)(s,()=>i.current),(0,o.jsxs)("section",{ref:i,"data-ui-component-id":"ProductHero",className:(0,n.cn)("product-hero flex w-full flex-col items-center justify-between gap-[32px] tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px]",e),children:[(0,o.jsxs)("div",{className:"product-hero__content flex w-full flex-col items-start gap-[24px] tablet:basis-[42%] laptop:basis-[36%]",children:[(0,o.jsxs)("div",{className:"product-hero__text",children:[(0,o.jsx)(p.Heading,{as:"h3",size:4,html:l,className:"product-hero__title"}),(0,o.jsx)(p.Heading,{as:"h4",size:2,html:r,className:"product-hero__subtitle product-hero__subtitle--desktop mt-[4px] hidden laptop:mt-[12px] laptop:block desktop:mt-[16px]"}),(0,o.jsx)(p.Text,{as:"p",size:2,html:r,className:"product-hero__subtitle product-hero__subtitle--mobile mt-[4px] block laptop:mt-[12px] laptop:hidden desktop:mt-[16px]"})]}),(0,o.jsx)("a",{href:_,className:"product-hero__cta-link",children:(0,o.jsx)(p.Button,{className:"product-hero__cta-button w-fit",children:h})})]}),(0,o.jsx)(p.Picture,{className:"product-hero__image aspect-[358/360] flex-shrink tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%]",source:`${b?.url}, ${x?.url} 768`})]})});u.displayName="ProductHero";var D=(0,d.withLayout)(u);
2
2
  //# sourceMappingURL=ProductHero.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/ProductHero/ProductHero.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useRef, useImperativeHandle } from 'react'\nimport { Heading, Button, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { ProductHeroProps } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'product_hero'\n\nconst ProductHero = React.forwardRef<HTMLDivElement, ProductHeroProps>(({ data, className }, ref) => {\n const { title, subtitle, ctaText, poster, mobPoster, ctaLink } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ProductHero\"\n className={cn(\n 'product-hero flex w-full flex-col items-center justify-between gap-[32px] tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px]',\n className\n )}\n >\n <div className=\"product-hero__content flex w-full flex-col items-start gap-[24px] tablet:basis-[42%] laptop:basis-[36%]\">\n <div className=\"product-hero__text\">\n <Heading as={'h3'} size={4} html={title} className=\"product-hero__title\" />\n <Heading\n as={'h4'}\n size={2}\n html={subtitle}\n className=\"product-hero__subtitle product-hero__subtitle--desktop mt-[4px] hidden laptop:mt-[12px] laptop:block desktop:mt-[16px]\"\n />\n <Text\n as={'p'}\n size={2}\n html={subtitle}\n className=\"product-hero__subtitle product-hero__subtitle--mobile mt-[4px] block laptop:mt-[12px] laptop:hidden desktop:mt-[16px]\"\n />\n </div>\n <a href={ctaLink} className=\"product-hero__cta-link\">\n <Button className=\"product-hero__cta-button w-fit\">{ctaText}</Button>\n </a>\n </div>\n <Picture\n className=\"product-hero__image aspect-[358/360] flex-shrink tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%]\"\n source={`${poster.url}, ${mobPoster.url} 768`}\n />\n </section>\n )\n})\n\nProductHero.displayName = 'ProductHero'\n\nexport default withLayout(ProductHero)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmCQ,IAAAI,EAAA,6BAlCRC,EAAmD,oBACnDC,EAA+C,qCAC/CC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,eAEhBC,EAAc,EAAAC,QAAM,WAA6C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACnG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,EAAS,OAAAC,EAAQ,UAAAC,EAAW,QAAAC,CAAQ,EAAIR,EAE3DS,KAAS,UAAuB,IAAI,EAE1C,wBAAYA,EAAQ,CAClB,cAAAb,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMO,EAAO,OAAyB,KAG7D,QAAC,WACC,IAAKA,EACL,uBAAqB,cACrB,aAAW,MACT,oIACAR,CACF,EAEA,qBAAC,OAAI,UAAU,0GACb,qBAAC,OAAI,UAAU,qBACb,oBAAC,WAAQ,GAAI,KAAM,KAAM,EAAG,KAAME,EAAO,UAAU,sBAAsB,KACzE,OAAC,WACC,GAAI,KACJ,KAAM,EACN,KAAMC,EACN,UAAU,yHACZ,KACA,OAAC,QACC,GAAI,IACJ,KAAM,EACN,KAAMA,EACN,UAAU,wHACZ,GACF,KACA,OAAC,KAAE,KAAMI,EAAS,UAAU,yBAC1B,mBAAC,UAAO,UAAU,iCAAkC,SAAAH,EAAQ,EAC9D,GACF,KACA,OAAC,WACC,UAAU,iHACV,OAAQ,GAAGC,EAAO,GAAG,KAAKC,EAAU,GAAG,OACzC,GACF,CAEJ,CAAC,EAEDT,EAAY,YAAc,cAE1B,IAAOV,KAAQ,cAAWU,CAAW",
4
+ "sourcesContent": ["'use client'\nimport React, { useRef, useImperativeHandle } from 'react'\nimport { Heading, Button, Picture, Text } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport type { ProductHeroProps } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'product_hero'\n\nconst ProductHero = React.forwardRef<HTMLDivElement, ProductHeroProps>(({ data, className }, ref) => {\n const { title, subtitle, ctaText, poster, mobPoster, ctaLink } = data\n\n const boxRef = useRef<HTMLDivElement>(null)\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ProductHero\"\n className={cn(\n 'product-hero flex w-full flex-col items-center justify-between gap-[32px] tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px]',\n className\n )}\n >\n <div className=\"product-hero__content flex w-full flex-col items-start gap-[24px] tablet:basis-[42%] laptop:basis-[36%]\">\n <div className=\"product-hero__text\">\n <Heading as={'h3'} size={4} html={title} className=\"product-hero__title\" />\n <Heading\n as={'h4'}\n size={2}\n html={subtitle}\n className=\"product-hero__subtitle product-hero__subtitle--desktop mt-[4px] hidden laptop:mt-[12px] laptop:block desktop:mt-[16px]\"\n />\n <Text\n as={'p'}\n size={2}\n html={subtitle}\n className=\"product-hero__subtitle product-hero__subtitle--mobile mt-[4px] block laptop:mt-[12px] laptop:hidden desktop:mt-[16px]\"\n />\n </div>\n <a href={ctaLink} className=\"product-hero__cta-link\">\n <Button className=\"product-hero__cta-button w-fit\">{ctaText}</Button>\n </a>\n </div>\n <Picture\n className=\"product-hero__image aspect-[358/360] flex-shrink tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%]\"\n source={`${poster?.url}, ${mobPoster?.url} 768`}\n />\n </section>\n )\n})\n\nProductHero.displayName = 'ProductHero'\n\nexport default withLayout(ProductHero)\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmCQ,IAAAI,EAAA,6BAlCRC,EAAmD,oBACnDC,EAA+C,qCAC/CC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAA4B,sCAG5B,MAAMC,EAAgB,QAChBC,EAAgB,eAEhBC,EAAc,EAAAC,QAAM,WAA6C,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAGC,IAAQ,CACnG,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,QAAAC,EAAS,OAAAC,EAAQ,UAAAC,EAAW,QAAAC,CAAQ,EAAIR,EAE3DS,KAAS,UAAuB,IAAI,EAE1C,wBAAYA,EAAQ,CAClB,cAAAb,EACA,cAAAC,EACA,eAAgBM,EAChB,qBAAsBC,CACxB,CAAC,KAED,uBAAoBF,EAAK,IAAMO,EAAO,OAAyB,KAG7D,QAAC,WACC,IAAKA,EACL,uBAAqB,cACrB,aAAW,MACT,oIACAR,CACF,EAEA,qBAAC,OAAI,UAAU,0GACb,qBAAC,OAAI,UAAU,qBACb,oBAAC,WAAQ,GAAI,KAAM,KAAM,EAAG,KAAME,EAAO,UAAU,sBAAsB,KACzE,OAAC,WACC,GAAI,KACJ,KAAM,EACN,KAAMC,EACN,UAAU,yHACZ,KACA,OAAC,QACC,GAAI,IACJ,KAAM,EACN,KAAMA,EACN,UAAU,wHACZ,GACF,KACA,OAAC,KAAE,KAAMI,EAAS,UAAU,yBAC1B,mBAAC,UAAO,UAAU,iCAAkC,SAAAH,EAAQ,EAC9D,GACF,KACA,OAAC,WACC,UAAU,iHACV,OAAQ,GAAGC,GAAQ,GAAG,KAAKC,GAAW,GAAG,OAC3C,GACF,CAEJ,CAAC,EAEDT,EAAY,YAAc,cAE1B,IAAOV,KAAQ,cAAWU,CAAW",
6
6
  "names": ["ProductHero_exports", "__export", "ProductHero_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_components", "import_utils", "import_Styles", "import_useExposure", "componentType", "componentName", "ProductHero", "React", "data", "className", "ref", "title", "subtitle", "ctaText", "poster", "mobPoster", "ctaLink", "boxRef"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Img } from '../../types/props.js';
2
3
  export type SelectStoreDataType = {
3
4
  title: string;
@@ -14,7 +15,7 @@ type SelectStoreType = {
14
15
  className?: string;
15
16
  };
16
17
  declare const _default: import("react").ForwardRefExoticComponent<Omit<SelectStoreType, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
17
- className?: string;
18
- data?: Record<string, any>;
18
+ className?: string | undefined;
19
+ data?: Record<string, any> | undefined;
19
20
  } & import("react").RefAttributes<any>>;
20
21
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { ShelfDisplayProps } from './shelfDisplay.js';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<ShelfDisplayProps & React.RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
- className?: string;
5
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
6
  }, "ref"> & React.RefAttributes<any>>;
7
7
  export default _default;