@anker-in/headless-ui 1.1.9-alpha.1764084619241 → 1.1.9-alpha.1764141671439

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 (613) 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/BrandEquity/BrandEquity.js +1 -1
  5. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  6. package/dist/cjs/biz-components/BrandEquity/types.d.ts +0 -1
  7. package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
  8. package/dist/cjs/biz-components/BrandEquity/types.js.map +1 -1
  9. package/dist/cjs/biz-components/Category/index.d.ts +2 -2
  10. package/dist/cjs/biz-components/CreativeModule/index.d.ts +3 -2
  11. package/dist/cjs/biz-components/DownLoad/index.d.ts +3 -2
  12. package/dist/cjs/biz-components/Evaluate/index.d.ts +2 -2
  13. package/dist/cjs/biz-components/Faq/Faq.d.ts +2 -2
  14. package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
  15. package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +7 -0
  16. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +2 -0
  17. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +7 -0
  18. package/dist/cjs/biz-components/FeatureCards/index.d.ts +2 -0
  19. package/dist/cjs/biz-components/FeatureCards/index.js +2 -0
  20. package/dist/cjs/biz-components/FeatureCards/index.js.map +7 -0
  21. package/dist/cjs/biz-components/FeatureCards/types.d.ts +27 -0
  22. package/dist/cjs/biz-components/FeatureCards/types.js +2 -0
  23. package/dist/cjs/biz-components/FeatureCards/types.js.map +7 -0
  24. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +7 -0
  25. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js +2 -0
  26. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js.map +7 -0
  27. package/dist/cjs/biz-components/FeatureShowcase/index.d.ts +2 -0
  28. package/dist/cjs/biz-components/FeatureShowcase/index.js +2 -0
  29. package/dist/cjs/biz-components/FeatureShowcase/index.js.map +7 -0
  30. package/dist/cjs/biz-components/FeatureShowcase/types.d.ts +23 -0
  31. package/dist/cjs/biz-components/FeatureShowcase/types.js +2 -0
  32. package/dist/cjs/biz-components/FeatureShowcase/types.js.map +7 -0
  33. package/dist/cjs/biz-components/Features/index.d.ts +3 -2
  34. package/dist/cjs/biz-components/FootCharger/index.d.ts +3 -2
  35. package/dist/cjs/biz-components/FooterNavigation/index.d.ts +3 -2
  36. package/dist/cjs/biz-components/GiftBox/index.d.ts +3 -2
  37. package/dist/cjs/biz-components/Graphic/index.d.ts +2 -2
  38. package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
  39. package/dist/cjs/biz-components/GraphicMore/index.d.ts +3 -2
  40. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  41. package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +2 -2
  42. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +2 -2
  43. package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
  44. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  45. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  46. package/dist/cjs/biz-components/HeroBanner/types.d.ts +2 -0
  47. package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
  48. package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
  49. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +7 -0
  50. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js +2 -0
  51. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js.map +7 -0
  52. package/dist/cjs/biz-components/ImageTextFeature/index.d.ts +2 -0
  53. package/dist/cjs/biz-components/ImageTextFeature/index.js +2 -0
  54. package/dist/cjs/biz-components/ImageTextFeature/index.js.map +7 -0
  55. package/dist/cjs/biz-components/ImageTextFeature/types.d.ts +31 -0
  56. package/dist/cjs/biz-components/ImageTextFeature/types.js +2 -0
  57. package/dist/cjs/biz-components/ImageTextFeature/types.js.map +7 -0
  58. package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +7 -0
  59. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +2 -0
  60. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +7 -0
  61. package/dist/cjs/biz-components/ImageWithText/index.d.ts +3 -0
  62. package/dist/cjs/biz-components/ImageWithText/index.js +2 -0
  63. package/dist/cjs/biz-components/ImageWithText/index.js.map +7 -0
  64. package/dist/cjs/biz-components/ImageWithText/types.d.ts +110 -0
  65. package/dist/cjs/biz-components/ImageWithText/types.js +2 -0
  66. package/dist/cjs/biz-components/ImageWithText/types.js.map +7 -0
  67. package/dist/cjs/biz-components/InlineVideo/index.d.ts +16 -0
  68. package/dist/cjs/biz-components/InlineVideo/index.js +2 -0
  69. package/dist/cjs/biz-components/InlineVideo/index.js.map +7 -0
  70. package/dist/cjs/biz-components/Ksp/index.d.ts +44 -0
  71. package/dist/cjs/biz-components/Ksp/index.js +2 -0
  72. package/dist/cjs/biz-components/Ksp/index.js.map +7 -0
  73. package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +1 -1
  74. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
  75. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
  76. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +19 -6
  77. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
  78. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
  79. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
  80. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
  81. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  82. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +2 -2
  83. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
  84. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
  85. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  86. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +1 -1
  87. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
  88. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  89. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  90. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
  91. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
  92. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
  93. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +2 -2
  94. package/dist/cjs/biz-components/MarqueeReview/index.d.ts +42 -0
  95. package/dist/cjs/biz-components/MarqueeReview/index.js +2 -0
  96. package/dist/cjs/biz-components/MarqueeReview/index.js.map +7 -0
  97. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
  98. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js +2 -0
  99. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
  100. package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +3 -2
  101. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  102. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
  103. package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  104. package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  105. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
  106. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
  107. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
  108. package/dist/cjs/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
  109. package/dist/cjs/biz-components/MediaSceneSwitcher/index.js +2 -0
  110. package/dist/cjs/biz-components/MediaSceneSwitcher/index.js.map +7 -0
  111. package/dist/cjs/biz-components/MediaSceneSwitcher/types.d.ts +19 -0
  112. package/dist/cjs/biz-components/MediaSceneSwitcher/types.js +2 -0
  113. package/dist/cjs/biz-components/MediaSceneSwitcher/types.js.map +7 -0
  114. package/dist/cjs/biz-components/MemberEquity/index.d.ts +2 -2
  115. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  116. package/dist/cjs/biz-components/NavigationSearch/index.d.ts +1 -0
  117. package/dist/cjs/biz-components/ProductCompare/index.d.ts +54 -0
  118. package/dist/cjs/biz-components/ProductCompare/index.js +2 -0
  119. package/dist/cjs/biz-components/ProductCompare/index.js.map +7 -0
  120. package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +7 -0
  121. package/dist/cjs/biz-components/ProductHero/ProductHero.js +2 -0
  122. package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +7 -0
  123. package/dist/cjs/biz-components/ProductHero/index.d.ts +2 -0
  124. package/dist/cjs/biz-components/ProductHero/index.js +2 -0
  125. package/dist/cjs/biz-components/ProductHero/index.js.map +7 -0
  126. package/dist/cjs/biz-components/ProductHero/types.d.ts +23 -0
  127. package/dist/cjs/biz-components/ProductHero/types.js +2 -0
  128. package/dist/cjs/biz-components/ProductHero/types.js.map +7 -0
  129. package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +7 -0
  130. package/dist/cjs/biz-components/ProductNav/ProductNav.js +2 -0
  131. package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +7 -0
  132. package/dist/cjs/biz-components/ProductNav/index.d.ts +2 -0
  133. package/dist/cjs/biz-components/ProductNav/index.js +2 -0
  134. package/dist/cjs/biz-components/ProductNav/index.js.map +7 -0
  135. package/dist/cjs/biz-components/ProductNav/types.d.ts +35 -0
  136. package/dist/cjs/biz-components/ProductNav/types.js +2 -0
  137. package/dist/cjs/biz-components/ProductNav/types.js.map +7 -0
  138. package/dist/cjs/biz-components/SelectStore/index.d.ts +3 -2
  139. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +2 -2
  140. package/dist/cjs/biz-components/Slogan/index.d.ts +2 -2
  141. package/dist/cjs/biz-components/Spacer/index.d.ts +2 -2
  142. package/dist/cjs/biz-components/Spacer/index.js +1 -1
  143. package/dist/cjs/biz-components/Spacer/index.js.map +2 -2
  144. package/dist/cjs/biz-components/Specs/index.d.ts +2 -2
  145. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
  146. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js +2 -0
  147. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
  148. package/dist/cjs/biz-components/SpecsComparison/index.d.ts +2 -0
  149. package/dist/cjs/biz-components/SpecsComparison/index.js +2 -0
  150. package/dist/cjs/biz-components/SpecsComparison/index.js.map +7 -0
  151. package/dist/cjs/biz-components/SpecsComparison/types.d.ts +34 -0
  152. package/dist/cjs/biz-components/SpecsComparison/types.js +2 -0
  153. package/dist/cjs/biz-components/SpecsComparison/types.js.map +7 -0
  154. package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
  155. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js +2 -0
  156. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js.map +7 -0
  157. package/dist/cjs/biz-components/TabWithImage/index.d.ts +2 -0
  158. package/dist/cjs/biz-components/TabWithImage/index.js +2 -0
  159. package/dist/cjs/biz-components/TabWithImage/index.js.map +7 -0
  160. package/dist/cjs/biz-components/TabWithImage/types.d.ts +29 -0
  161. package/dist/cjs/biz-components/TabWithImage/types.js +2 -0
  162. package/dist/cjs/biz-components/TabWithImage/types.js.map +7 -0
  163. package/dist/cjs/biz-components/Tabs/Tabs.d.ts +2 -2
  164. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  165. package/dist/cjs/biz-components/Tabs/Tabs.js.map +1 -1
  166. package/dist/cjs/biz-components/Tabs/types.d.ts +11 -0
  167. package/dist/cjs/biz-components/Tabs/types.js +1 -1
  168. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  169. package/dist/cjs/biz-components/TabsGroup/index.d.ts +2 -2
  170. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
  171. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
  172. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
  173. package/dist/cjs/biz-components/TabsWithMedia/index.d.ts +2 -0
  174. package/dist/cjs/biz-components/TabsWithMedia/index.js +2 -0
  175. package/dist/cjs/biz-components/TabsWithMedia/index.js.map +7 -0
  176. package/dist/cjs/biz-components/TabsWithMedia/types.d.ts +43 -0
  177. package/dist/cjs/biz-components/TabsWithMedia/types.js +2 -0
  178. package/dist/cjs/biz-components/TabsWithMedia/types.js.map +7 -0
  179. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
  180. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
  181. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
  182. package/dist/cjs/biz-components/ThreeDCarousel/index.d.ts +2 -0
  183. package/dist/cjs/biz-components/ThreeDCarousel/index.js +2 -0
  184. package/dist/cjs/biz-components/ThreeDCarousel/index.js.map +7 -0
  185. package/dist/cjs/biz-components/ThreeDCarousel/types.d.ts +26 -0
  186. package/dist/cjs/biz-components/ThreeDCarousel/types.js +2 -0
  187. package/dist/cjs/biz-components/ThreeDCarousel/types.js.map +7 -0
  188. package/dist/cjs/biz-components/Title/index.d.ts +2 -2
  189. package/dist/cjs/biz-components/Title/types.js +1 -1
  190. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  191. package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
  192. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js +2 -0
  193. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js.map +7 -0
  194. package/dist/cjs/biz-components/VideoFeature/index.d.ts +2 -0
  195. package/dist/cjs/biz-components/VideoFeature/index.js +2 -0
  196. package/dist/cjs/biz-components/VideoFeature/index.js.map +7 -0
  197. package/dist/cjs/biz-components/VideoFeature/types.d.ts +19 -0
  198. package/dist/cjs/biz-components/VideoFeature/types.js +2 -0
  199. package/dist/cjs/biz-components/VideoFeature/types.js.map +7 -0
  200. package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  201. package/dist/cjs/biz-components/index.d.ts +33 -0
  202. package/dist/cjs/biz-components/index.js +1 -1
  203. package/dist/cjs/biz-components/index.js.map +3 -3
  204. package/dist/cjs/components/alert.d.ts +2 -2
  205. package/dist/cjs/components/avatar.d.ts +8 -8
  206. package/dist/cjs/components/container.d.ts +7 -7
  207. package/dist/cjs/components/container.js +1 -1
  208. package/dist/cjs/components/container.js.map +2 -2
  209. package/dist/cjs/components/dialog.d.ts +1 -1
  210. package/dist/cjs/components/drop-down.d.ts +3 -3
  211. package/dist/cjs/components/heading.d.ts +1 -0
  212. package/dist/cjs/components/heading.js +1 -1
  213. package/dist/cjs/components/heading.js.map +3 -3
  214. package/dist/cjs/components/input-number.d.ts +15 -15
  215. package/dist/cjs/components/link.d.ts +6 -6
  216. package/dist/cjs/components/tabs.d.ts +2 -2
  217. package/dist/cjs/components/tabs.js +1 -1
  218. package/dist/cjs/components/tabs.js.map +2 -2
  219. package/dist/cjs/cpn-components/CpnNavigation/index.js +1 -1
  220. package/dist/cjs/cpn-components/CpnNavigation/index.js.map +3 -3
  221. package/dist/cjs/helpers/ScrollLoadVideo.js.map +2 -2
  222. package/dist/cjs/shared/ErrorBoundary.d.ts +18 -0
  223. package/dist/cjs/shared/ErrorBoundary.js +2 -0
  224. package/dist/cjs/shared/ErrorBoundary.js.map +7 -0
  225. package/dist/cjs/shared/Styles.d.ts +2 -2
  226. package/dist/cjs/shared/Styles.js +1 -1
  227. package/dist/cjs/shared/Styles.js.map +3 -3
  228. package/dist/cjs/stories/InlineVideo.stories.js +164 -0
  229. package/dist/cjs/stories/InlineVideo.stories.js.map +7 -0
  230. package/dist/cjs/stories/MarqueeReview.stories.js +19 -0
  231. package/dist/cjs/stories/MarqueeReview.stories.js.map +7 -0
  232. package/dist/cjs/stories/MediaSceneSwitcher.stories.js +2 -0
  233. package/dist/cjs/stories/MediaSceneSwitcher.stories.js.map +7 -0
  234. package/dist/cjs/stories/ProductNav.stories.js +2 -0
  235. package/dist/cjs/stories/ProductNav.stories.js.map +7 -0
  236. package/dist/cjs/stories/ThreeDCarousel.stories.js +118 -0
  237. package/dist/cjs/stories/ThreeDCarousel.stories.js.map +7 -0
  238. package/dist/cjs/stories/featureCards.stories.js +61 -0
  239. package/dist/cjs/stories/featureCards.stories.js.map +7 -0
  240. package/dist/cjs/stories/featureShowcase.stories.js +44 -0
  241. package/dist/cjs/stories/featureShowcase.stories.js.map +7 -0
  242. package/dist/cjs/stories/imageTextFeature.stories.js +50 -0
  243. package/dist/cjs/stories/imageTextFeature.stories.js.map +7 -0
  244. package/dist/cjs/stories/imageWithText.stories.js +84 -0
  245. package/dist/cjs/stories/imageWithText.stories.js.map +7 -0
  246. package/dist/cjs/stories/ksp.stories.js +128 -0
  247. package/dist/cjs/stories/ksp.stories.js.map +7 -0
  248. package/dist/cjs/stories/productCompare.stories.js +54 -0
  249. package/dist/cjs/stories/productCompare.stories.js.map +7 -0
  250. package/dist/cjs/stories/productHero.stories.js +50 -0
  251. package/dist/cjs/stories/productHero.stories.js.map +7 -0
  252. package/dist/cjs/stories/specsComparison.stories.js +105 -0
  253. package/dist/cjs/stories/specsComparison.stories.js.map +7 -0
  254. package/dist/cjs/stories/tabWithImage.stories.js +53 -0
  255. package/dist/cjs/stories/tabWithImage.stories.js.map +7 -0
  256. package/dist/cjs/stories/tabsWithMedia.stories.js +68 -0
  257. package/dist/cjs/stories/tabsWithMedia.stories.js.map +7 -0
  258. package/dist/cjs/stories/videoFeature.stories.js +56 -0
  259. package/dist/cjs/stories/videoFeature.stories.js.map +7 -0
  260. package/dist/cjs/types/props.d.ts +9 -2
  261. package/dist/cjs/types/props.js +1 -1
  262. package/dist/cjs/types/props.js.map +1 -1
  263. package/dist/esm/biz-components/AccordionCards/index.d.ts +2 -2
  264. package/dist/esm/biz-components/AplusDesc/index.d.ts +3 -2
  265. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
  266. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  267. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  268. package/dist/esm/biz-components/BrandEquity/types.d.ts +0 -1
  269. package/dist/esm/biz-components/Category/index.d.ts +2 -2
  270. package/dist/esm/biz-components/CreativeModule/index.d.ts +3 -2
  271. package/dist/esm/biz-components/DownLoad/index.d.ts +3 -2
  272. package/dist/esm/biz-components/Evaluate/index.d.ts +2 -2
  273. package/dist/esm/biz-components/Faq/Faq.d.ts +2 -2
  274. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  275. package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
  276. package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +7 -0
  277. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +2 -0
  278. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +7 -0
  279. package/dist/esm/biz-components/FeatureCards/index.d.ts +2 -0
  280. package/dist/esm/biz-components/FeatureCards/index.js +2 -0
  281. package/dist/esm/biz-components/FeatureCards/index.js.map +7 -0
  282. package/dist/esm/biz-components/FeatureCards/types.d.ts +27 -0
  283. package/dist/esm/biz-components/FeatureCards/types.js +1 -0
  284. package/dist/esm/biz-components/FeatureCards/types.js.map +7 -0
  285. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +7 -0
  286. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js +2 -0
  287. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js.map +7 -0
  288. package/dist/esm/biz-components/FeatureShowcase/index.d.ts +2 -0
  289. package/dist/esm/biz-components/FeatureShowcase/index.js +2 -0
  290. package/dist/esm/biz-components/FeatureShowcase/index.js.map +7 -0
  291. package/dist/esm/biz-components/FeatureShowcase/types.d.ts +23 -0
  292. package/dist/esm/biz-components/FeatureShowcase/types.js +1 -0
  293. package/dist/esm/biz-components/FeatureShowcase/types.js.map +7 -0
  294. package/dist/esm/biz-components/Features/index.d.ts +3 -2
  295. package/dist/esm/biz-components/FootCharger/index.d.ts +3 -2
  296. package/dist/esm/biz-components/FooterNavigation/index.d.ts +3 -2
  297. package/dist/esm/biz-components/GiftBox/index.d.ts +3 -2
  298. package/dist/esm/biz-components/Graphic/index.d.ts +2 -2
  299. package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
  300. package/dist/esm/biz-components/GraphicMore/index.d.ts +3 -2
  301. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  302. package/dist/esm/biz-components/HeaderNavigation/index.d.ts +2 -2
  303. package/dist/esm/biz-components/HeaderNavigation/index.js.map +2 -2
  304. package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
  305. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  306. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  307. package/dist/esm/biz-components/HeroBanner/types.d.ts +2 -0
  308. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +7 -0
  309. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js +2 -0
  310. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js.map +7 -0
  311. package/dist/esm/biz-components/ImageTextFeature/index.d.ts +2 -0
  312. package/dist/esm/biz-components/ImageTextFeature/index.js +2 -0
  313. package/dist/esm/biz-components/ImageTextFeature/index.js.map +7 -0
  314. package/dist/esm/biz-components/ImageTextFeature/types.d.ts +31 -0
  315. package/dist/esm/biz-components/ImageTextFeature/types.js +1 -0
  316. package/dist/esm/biz-components/ImageTextFeature/types.js.map +7 -0
  317. package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +7 -0
  318. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +2 -0
  319. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +7 -0
  320. package/dist/esm/biz-components/ImageWithText/index.d.ts +3 -0
  321. package/dist/esm/biz-components/ImageWithText/index.js +2 -0
  322. package/dist/esm/biz-components/ImageWithText/index.js.map +7 -0
  323. package/dist/esm/biz-components/ImageWithText/types.d.ts +110 -0
  324. package/dist/esm/biz-components/ImageWithText/types.js +2 -0
  325. package/dist/esm/biz-components/ImageWithText/types.js.map +7 -0
  326. package/dist/esm/biz-components/InlineVideo/index.d.ts +16 -0
  327. package/dist/esm/biz-components/InlineVideo/index.js +2 -0
  328. package/dist/esm/biz-components/InlineVideo/index.js.map +7 -0
  329. package/dist/esm/biz-components/Ksp/index.d.ts +44 -0
  330. package/dist/esm/biz-components/Ksp/index.js +2 -0
  331. package/dist/esm/biz-components/Ksp/index.js.map +7 -0
  332. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +1 -1
  333. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
  334. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
  335. package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +19 -6
  336. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
  337. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
  338. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
  339. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
  340. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  341. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +3 -3
  342. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
  343. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
  344. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  345. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +1 -1
  346. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
  347. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  348. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +3 -3
  349. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
  350. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
  351. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
  352. package/dist/esm/biz-components/Marquee/Marquee.d.ts +2 -2
  353. package/dist/esm/biz-components/MarqueeReview/index.d.ts +42 -0
  354. package/dist/esm/biz-components/MarqueeReview/index.js +2 -0
  355. package/dist/esm/biz-components/MarqueeReview/index.js.map +7 -0
  356. package/dist/esm/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
  357. package/dist/esm/biz-components/MediaPlayerBase/index.backup.js +2 -0
  358. package/dist/esm/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
  359. package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +3 -2
  360. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  361. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
  362. package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  363. package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  364. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
  365. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
  366. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
  367. package/dist/esm/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
  368. package/dist/esm/biz-components/MediaSceneSwitcher/index.js +2 -0
  369. package/dist/esm/biz-components/MediaSceneSwitcher/index.js.map +7 -0
  370. package/dist/esm/biz-components/MediaSceneSwitcher/types.d.ts +19 -0
  371. package/dist/esm/biz-components/MediaSceneSwitcher/types.js +1 -0
  372. package/dist/esm/biz-components/MediaSceneSwitcher/types.js.map +7 -0
  373. package/dist/esm/biz-components/MemberEquity/index.d.ts +2 -2
  374. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  375. package/dist/esm/biz-components/NavigationSearch/index.d.ts +1 -0
  376. package/dist/esm/biz-components/ProductCompare/index.d.ts +54 -0
  377. package/dist/esm/biz-components/ProductCompare/index.js +2 -0
  378. package/dist/esm/biz-components/ProductCompare/index.js.map +7 -0
  379. package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +7 -0
  380. package/dist/esm/biz-components/ProductHero/ProductHero.js +2 -0
  381. package/dist/esm/biz-components/ProductHero/ProductHero.js.map +7 -0
  382. package/dist/esm/biz-components/ProductHero/index.d.ts +2 -0
  383. package/dist/esm/biz-components/ProductHero/index.js +2 -0
  384. package/dist/esm/biz-components/ProductHero/index.js.map +7 -0
  385. package/dist/esm/biz-components/ProductHero/types.d.ts +23 -0
  386. package/dist/esm/biz-components/ProductHero/types.js +1 -0
  387. package/dist/esm/biz-components/ProductHero/types.js.map +7 -0
  388. package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +7 -0
  389. package/dist/esm/biz-components/ProductNav/ProductNav.js +2 -0
  390. package/dist/esm/biz-components/ProductNav/ProductNav.js.map +7 -0
  391. package/dist/esm/biz-components/ProductNav/index.d.ts +2 -0
  392. package/dist/esm/biz-components/ProductNav/index.js +2 -0
  393. package/dist/esm/biz-components/ProductNav/index.js.map +7 -0
  394. package/dist/esm/biz-components/ProductNav/types.d.ts +35 -0
  395. package/dist/esm/biz-components/ProductNav/types.js +1 -0
  396. package/dist/esm/biz-components/ProductNav/types.js.map +7 -0
  397. package/dist/esm/biz-components/SelectStore/index.d.ts +3 -2
  398. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +2 -2
  399. package/dist/esm/biz-components/Slogan/index.d.ts +2 -2
  400. package/dist/esm/biz-components/Spacer/index.d.ts +2 -2
  401. package/dist/esm/biz-components/Spacer/index.js +1 -1
  402. package/dist/esm/biz-components/Spacer/index.js.map +2 -2
  403. package/dist/esm/biz-components/Specs/index.d.ts +2 -2
  404. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
  405. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js +2 -0
  406. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
  407. package/dist/esm/biz-components/SpecsComparison/index.d.ts +2 -0
  408. package/dist/esm/biz-components/SpecsComparison/index.js +2 -0
  409. package/dist/esm/biz-components/SpecsComparison/index.js.map +7 -0
  410. package/dist/esm/biz-components/SpecsComparison/types.d.ts +34 -0
  411. package/dist/esm/biz-components/SpecsComparison/types.js +1 -0
  412. package/dist/esm/biz-components/SpecsComparison/types.js.map +7 -0
  413. package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
  414. package/dist/esm/biz-components/TabWithImage/TabWithImage.js +2 -0
  415. package/dist/esm/biz-components/TabWithImage/TabWithImage.js.map +7 -0
  416. package/dist/esm/biz-components/TabWithImage/index.d.ts +2 -0
  417. package/dist/esm/biz-components/TabWithImage/index.js +2 -0
  418. package/dist/esm/biz-components/TabWithImage/index.js.map +7 -0
  419. package/dist/esm/biz-components/TabWithImage/types.d.ts +29 -0
  420. package/dist/esm/biz-components/TabWithImage/types.js +1 -0
  421. package/dist/esm/biz-components/TabWithImage/types.js.map +7 -0
  422. package/dist/esm/biz-components/Tabs/Tabs.d.ts +2 -2
  423. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  424. package/dist/esm/biz-components/Tabs/Tabs.js.map +1 -1
  425. package/dist/esm/biz-components/Tabs/types.d.ts +11 -0
  426. package/dist/esm/biz-components/TabsGroup/index.d.ts +2 -2
  427. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
  428. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
  429. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
  430. package/dist/esm/biz-components/TabsWithMedia/index.d.ts +2 -0
  431. package/dist/esm/biz-components/TabsWithMedia/index.js +2 -0
  432. package/dist/esm/biz-components/TabsWithMedia/index.js.map +7 -0
  433. package/dist/esm/biz-components/TabsWithMedia/types.d.ts +43 -0
  434. package/dist/esm/biz-components/TabsWithMedia/types.js +1 -0
  435. package/dist/esm/biz-components/TabsWithMedia/types.js.map +7 -0
  436. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
  437. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
  438. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
  439. package/dist/esm/biz-components/ThreeDCarousel/index.d.ts +2 -0
  440. package/dist/esm/biz-components/ThreeDCarousel/index.js +2 -0
  441. package/dist/esm/biz-components/ThreeDCarousel/index.js.map +7 -0
  442. package/dist/esm/biz-components/ThreeDCarousel/types.d.ts +26 -0
  443. package/dist/esm/biz-components/ThreeDCarousel/types.js +1 -0
  444. package/dist/esm/biz-components/ThreeDCarousel/types.js.map +7 -0
  445. package/dist/esm/biz-components/Title/index.d.ts +2 -2
  446. package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
  447. package/dist/esm/biz-components/VideoFeature/VideoFeature.js +2 -0
  448. package/dist/esm/biz-components/VideoFeature/VideoFeature.js.map +7 -0
  449. package/dist/esm/biz-components/VideoFeature/index.d.ts +2 -0
  450. package/dist/esm/biz-components/VideoFeature/index.js +2 -0
  451. package/dist/esm/biz-components/VideoFeature/index.js.map +7 -0
  452. package/dist/esm/biz-components/VideoFeature/types.d.ts +19 -0
  453. package/dist/esm/biz-components/VideoFeature/types.js +1 -0
  454. package/dist/esm/biz-components/VideoFeature/types.js.map +7 -0
  455. package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  456. package/dist/esm/biz-components/index.d.ts +33 -0
  457. package/dist/esm/biz-components/index.js +1 -1
  458. package/dist/esm/biz-components/index.js.map +2 -2
  459. package/dist/esm/components/alert.d.ts +2 -2
  460. package/dist/esm/components/avatar.d.ts +8 -8
  461. package/dist/esm/components/container.d.ts +7 -7
  462. package/dist/esm/components/container.js +1 -1
  463. package/dist/esm/components/container.js.map +2 -2
  464. package/dist/esm/components/dialog.d.ts +1 -1
  465. package/dist/esm/components/drop-down.d.ts +3 -3
  466. package/dist/esm/components/heading.d.ts +1 -0
  467. package/dist/esm/components/heading.js +1 -1
  468. package/dist/esm/components/heading.js.map +3 -3
  469. package/dist/esm/components/input-number.d.ts +15 -15
  470. package/dist/esm/components/link.d.ts +6 -6
  471. package/dist/esm/components/tabs.d.ts +2 -2
  472. package/dist/esm/components/tabs.js +1 -1
  473. package/dist/esm/components/tabs.js.map +2 -2
  474. package/dist/esm/cpn-components/CpnNavigation/index.js +1 -1
  475. package/dist/esm/cpn-components/CpnNavigation/index.js.map +2 -2
  476. package/dist/esm/helpers/ScrollLoadVideo.js.map +2 -2
  477. package/dist/esm/shared/ErrorBoundary.d.ts +18 -0
  478. package/dist/esm/shared/ErrorBoundary.js +2 -0
  479. package/dist/esm/shared/ErrorBoundary.js.map +7 -0
  480. package/dist/esm/shared/Styles.d.ts +2 -2
  481. package/dist/esm/shared/Styles.js +1 -1
  482. package/dist/esm/shared/Styles.js.map +3 -3
  483. package/dist/esm/stories/InlineVideo.stories.js +164 -0
  484. package/dist/esm/stories/InlineVideo.stories.js.map +7 -0
  485. package/dist/esm/stories/MarqueeReview.stories.js +19 -0
  486. package/dist/esm/stories/MarqueeReview.stories.js.map +7 -0
  487. package/dist/esm/stories/MediaSceneSwitcher.stories.js +2 -0
  488. package/dist/esm/stories/MediaSceneSwitcher.stories.js.map +7 -0
  489. package/dist/esm/stories/ProductNav.stories.js +2 -0
  490. package/dist/esm/stories/ProductNav.stories.js.map +7 -0
  491. package/dist/esm/stories/ThreeDCarousel.stories.js +118 -0
  492. package/dist/esm/stories/ThreeDCarousel.stories.js.map +7 -0
  493. package/dist/esm/stories/featureCards.stories.js +61 -0
  494. package/dist/esm/stories/featureCards.stories.js.map +7 -0
  495. package/dist/esm/stories/featureShowcase.stories.js +44 -0
  496. package/dist/esm/stories/featureShowcase.stories.js.map +7 -0
  497. package/dist/esm/stories/imageTextFeature.stories.js +50 -0
  498. package/dist/esm/stories/imageTextFeature.stories.js.map +7 -0
  499. package/dist/esm/stories/imageWithText.stories.js +84 -0
  500. package/dist/esm/stories/imageWithText.stories.js.map +7 -0
  501. package/dist/esm/stories/ksp.stories.js +128 -0
  502. package/dist/esm/stories/ksp.stories.js.map +7 -0
  503. package/dist/esm/stories/productCompare.stories.js +54 -0
  504. package/dist/esm/stories/productCompare.stories.js.map +7 -0
  505. package/dist/esm/stories/productHero.stories.js +50 -0
  506. package/dist/esm/stories/productHero.stories.js.map +7 -0
  507. package/dist/esm/stories/specsComparison.stories.js +105 -0
  508. package/dist/esm/stories/specsComparison.stories.js.map +7 -0
  509. package/dist/esm/stories/tabWithImage.stories.js +53 -0
  510. package/dist/esm/stories/tabWithImage.stories.js.map +7 -0
  511. package/dist/esm/stories/tabsWithMedia.stories.js +68 -0
  512. package/dist/esm/stories/tabsWithMedia.stories.js.map +7 -0
  513. package/dist/esm/stories/videoFeature.stories.js +56 -0
  514. package/dist/esm/stories/videoFeature.stories.js.map +7 -0
  515. package/dist/esm/types/props.d.ts +9 -2
  516. package/dist/tokens/base.css +3 -0
  517. package/package.json +18 -13
  518. package/style.css +11 -2
  519. package/tailwind.config.js +24 -0
  520. package/dist/cjs/stories/HeroBanner.stories.d.ts +0 -27
  521. package/dist/cjs/stories/MemberEquity.stories.d.ts +0 -9
  522. package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
  523. package/dist/cjs/stories/accordionCards.stories.d.ts +0 -17
  524. package/dist/cjs/stories/alert.stories.d.ts +0 -27
  525. package/dist/cjs/stories/avatar.stories.d.ts +0 -39
  526. package/dist/cjs/stories/badge.stories.d.ts +0 -31
  527. package/dist/cjs/stories/bizTabs.stories.d.ts +0 -7
  528. package/dist/cjs/stories/board.stories.d.ts +0 -6
  529. package/dist/cjs/stories/brandEquity.stories.d.ts +0 -16
  530. package/dist/cjs/stories/button.stories.d.ts +0 -56
  531. package/dist/cjs/stories/card.stories.d.ts +0 -27
  532. package/dist/cjs/stories/carousel.stories.d.ts +0 -8
  533. package/dist/cjs/stories/category.stories.d.ts +0 -17
  534. package/dist/cjs/stories/checkbox.stories.d.ts +0 -46
  535. package/dist/cjs/stories/container.stories.d.ts +0 -28
  536. package/dist/cjs/stories/cpnBanner.stories.d.ts +0 -14
  537. package/dist/cjs/stories/cpnCountdown.stories.d.ts +0 -12
  538. package/dist/cjs/stories/cpnNavigation.stories.d.ts +0 -14
  539. package/dist/cjs/stories/cpnProductcard.stories.d.ts +0 -14
  540. package/dist/cjs/stories/cpnTitle.stories.d.ts +0 -14
  541. package/dist/cjs/stories/creativeModule.stories.d.ts +0 -19
  542. package/dist/cjs/stories/dialog.stories.d.ts +0 -20
  543. package/dist/cjs/stories/drawer.stories.d.ts +0 -20
  544. package/dist/cjs/stories/drop-down.stories.d.ts +0 -16
  545. package/dist/cjs/stories/evaluate.stories.d.ts +0 -16
  546. package/dist/cjs/stories/faq.stories.d.ts +0 -21
  547. package/dist/cjs/stories/graphic.stories.d.ts +0 -64
  548. package/dist/cjs/stories/graphicAttractionBlock.stories.d.ts +0 -6
  549. package/dist/cjs/stories/grid.stories.d.ts +0 -22
  550. package/dist/cjs/stories/heading.stories.d.ts +0 -84
  551. package/dist/cjs/stories/input-number.stories.d.ts +0 -39
  552. package/dist/cjs/stories/input.stories.d.ts +0 -35
  553. package/dist/cjs/stories/link.stories.d.ts +0 -69
  554. package/dist/cjs/stories/marquee.stories.d.ts +0 -30
  555. package/dist/cjs/stories/mediaplayerBase.stories.d.ts +0 -6
  556. package/dist/cjs/stories/mediaplayerMulti.stories.d.ts +0 -16
  557. package/dist/cjs/stories/picture.stories.d.ts +0 -22
  558. package/dist/cjs/stories/popover.stories.d.ts +0 -17
  559. package/dist/cjs/stories/radio.stories.d.ts +0 -39
  560. package/dist/cjs/stories/shelfDisplay.stories.d.ts +0 -16
  561. package/dist/cjs/stories/skeleton.stories.d.ts +0 -20
  562. package/dist/cjs/stories/slogan.stories.d.ts +0 -20
  563. package/dist/cjs/stories/specs.stories.d.ts +0 -13
  564. package/dist/cjs/stories/tabs.stories.d.ts +0 -373
  565. package/dist/cjs/stories/text.stories.d.ts +0 -86
  566. package/dist/cjs/stories/whychoose.stories.d.ts +0 -21
  567. package/dist/esm/stories/HeroBanner.stories.d.ts +0 -27
  568. package/dist/esm/stories/MemberEquity.stories.d.ts +0 -9
  569. package/dist/esm/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
  570. package/dist/esm/stories/accordionCards.stories.d.ts +0 -17
  571. package/dist/esm/stories/alert.stories.d.ts +0 -27
  572. package/dist/esm/stories/avatar.stories.d.ts +0 -39
  573. package/dist/esm/stories/badge.stories.d.ts +0 -31
  574. package/dist/esm/stories/bizTabs.stories.d.ts +0 -7
  575. package/dist/esm/stories/board.stories.d.ts +0 -6
  576. package/dist/esm/stories/brandEquity.stories.d.ts +0 -16
  577. package/dist/esm/stories/button.stories.d.ts +0 -56
  578. package/dist/esm/stories/card.stories.d.ts +0 -27
  579. package/dist/esm/stories/carousel.stories.d.ts +0 -8
  580. package/dist/esm/stories/category.stories.d.ts +0 -17
  581. package/dist/esm/stories/checkbox.stories.d.ts +0 -46
  582. package/dist/esm/stories/container.stories.d.ts +0 -28
  583. package/dist/esm/stories/cpnBanner.stories.d.ts +0 -14
  584. package/dist/esm/stories/cpnCountdown.stories.d.ts +0 -12
  585. package/dist/esm/stories/cpnNavigation.stories.d.ts +0 -14
  586. package/dist/esm/stories/cpnProductcard.stories.d.ts +0 -14
  587. package/dist/esm/stories/cpnTitle.stories.d.ts +0 -14
  588. package/dist/esm/stories/creativeModule.stories.d.ts +0 -19
  589. package/dist/esm/stories/dialog.stories.d.ts +0 -20
  590. package/dist/esm/stories/drawer.stories.d.ts +0 -20
  591. package/dist/esm/stories/drop-down.stories.d.ts +0 -16
  592. package/dist/esm/stories/evaluate.stories.d.ts +0 -16
  593. package/dist/esm/stories/faq.stories.d.ts +0 -21
  594. package/dist/esm/stories/graphic.stories.d.ts +0 -64
  595. package/dist/esm/stories/graphicAttractionBlock.stories.d.ts +0 -6
  596. package/dist/esm/stories/grid.stories.d.ts +0 -22
  597. package/dist/esm/stories/heading.stories.d.ts +0 -84
  598. package/dist/esm/stories/input-number.stories.d.ts +0 -39
  599. package/dist/esm/stories/input.stories.d.ts +0 -35
  600. package/dist/esm/stories/link.stories.d.ts +0 -69
  601. package/dist/esm/stories/marquee.stories.d.ts +0 -30
  602. package/dist/esm/stories/mediaplayerBase.stories.d.ts +0 -6
  603. package/dist/esm/stories/mediaplayerMulti.stories.d.ts +0 -16
  604. package/dist/esm/stories/picture.stories.d.ts +0 -22
  605. package/dist/esm/stories/popover.stories.d.ts +0 -17
  606. package/dist/esm/stories/radio.stories.d.ts +0 -39
  607. package/dist/esm/stories/shelfDisplay.stories.d.ts +0 -16
  608. package/dist/esm/stories/skeleton.stories.d.ts +0 -20
  609. package/dist/esm/stories/slogan.stories.d.ts +0 -20
  610. package/dist/esm/stories/specs.stories.d.ts +0 -13
  611. package/dist/esm/stories/tabs.stories.d.ts +0 -373
  612. package/dist/esm/stories/text.stories.d.ts +0 -86
  613. package/dist/esm/stories/whychoose.stories.d.ts +0 -21
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/biz-components/Listing/components/ProductCard/ProductGallery/index.tsx"],
4
- "sourcesContent": ["import { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { Text, Picture, Button, Badge } from '../../../../../components/index.js'\nimport {\n useCallback,\n useMemo,\n useState,\n forwardRef,\n useRef,\n type RefObject,\n useEffect,\n type Dispatch,\n type SetStateAction,\n useImperativeHandle,\n} from 'react'\nimport { Swiper, SwiperSlide, type SwiperRef } from 'swiper/react'\nimport { Navigation, Mousewheel, Thumbs, Pagination } from 'swiper/modules'\nimport { cn } from '../../../../../helpers/index.js'\nimport { GalleryTabType } from './types.js'\nimport { Content, List, Root, Trigger } from '@radix-ui/react-tabs'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useVariantMedia } from '../../../hooks/use-variant-media.js'\nimport { SpecsModal } from './components/SpecsModal.js'\nimport CompareModal from './components/CompareModal.js'\nimport { formatPrice } from '../../../utils/index.js'\nimport { withLayout } from '../../../../../shared/Styles.js'\nimport { gaTrack } from '../../../../../shared/track.js'\nimport { ExposureDetector } from '../../../../../components/index.js'\n\nimport type { Swiper as SwiperType } from 'swiper'\nimport type { ImageMedia, VideoMedia } from '../../../hooks/use-variant-media.js'\nimport type { ProductGalleryProps, ProductGalleryTabItemProps, GalleryTabItemProps } from './types.js'\n\nconst SwiperLeftButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect x=\"48\" y=\"48\" width=\"48\" height=\"48\" rx=\"24\" transform=\"rotate(-180 48 48)\" fill=\"white\" />\n <path\n d=\"M25.1035 16.8545C25.5372 16.3818 26.246 16.3818 26.6797 16.8545C27.1067 17.3201 27.1067 18.0706 26.6797 18.5361L21.668 24L26.6797 29.4639C27.1067 29.9294 27.1067 30.6799 26.6797 31.1455C26.246 31.6182 25.5372 31.6182 25.1035 31.1455L19.3203 24.8408C18.8933 24.3752 18.8933 23.6248 19.3203 23.1592L25.1035 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst SwiperRightButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect width=\"48\" height=\"48\" rx=\"24\" transform=\"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 48)\" fill=\"white\" />\n <path\n d=\"M22.8965 16.8545C22.4628 16.3818 21.754 16.3818 21.3203 16.8545C20.8933 17.3201 20.8933 18.0706 21.3203 18.5361L26.332 24L21.3203 29.4639C20.8933 29.9294 20.8933 30.6799 21.3203 31.1455C21.754 31.6182 22.4628 31.6182 22.8965 31.1455L28.6797 24.8408C29.1067 24.3752 29.1067 23.6248 28.6797 23.1592L22.8965 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst ProductGallery = () => {\n const { copyWriting } = useAiuiContext()\n const { product, variant, selectedOptions } = useBizProductContext()\n const defaultMediaData = useVariantMedia({ product, variant })\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const productGalleryTabRef = useRef<ProductGalleryTabRef>(null)\n\n const customMediaList = variant?.metafields?.component?.custom_media_list\n let productList: ImageMedia[], sceneList: ImageMedia[], keyFeaturesList: ImageMedia[], videoList: VideoMedia[]\n\n if (customMediaList && customMediaList?.available) {\n productList = customMediaList?.product || []\n sceneList = customMediaList?.scenarios || []\n keyFeaturesList = customMediaList?.keyFeatures || []\n videoList = customMediaList?.video || []\n } else {\n productList = defaultMediaData?.productList\n sceneList = defaultMediaData?.sceneList\n keyFeaturesList = defaultMediaData?.keyFeaturesList\n videoList = defaultMediaData?.videoList\n }\n\n const allMedia = useMemo(() => [...productList, ...sceneList, ...videoList], [productList, sceneList, videoList])\n\n const galleryMap: Record<string, ImageMedia[] | VideoMedia[]> = {\n productList: productList,\n sceneList: sceneList,\n keyFeaturesList: keyFeaturesList,\n videoList: videoList,\n }\n\n const galleryTabs = useMemo(() => {\n const productTab: ProductGalleryProps =\n product?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n const variantProductGallery =\n variant?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n\n return productTab\n ?.map((item: any) => {\n // \u5982\u679C\u5B58\u5728 images \u6570\u7EC4\u4E14\u6709\u6709\u6548\u503C\uFF0C\u4F18\u5148\u4F7F\u7528 images \u521B\u5EFA\u54CD\u5E94\u5F0F\u56FE\u7247\u6570\u636E\n const variantProductGalleryItem = variantProductGallery?.find(\n (variantItem: any) => item?.galleries === variantItem?.galleries\n )\n let galleries = galleryMap[item?.galleries] || []\n\n if (\n variantProductGalleryItem?.images &&\n Array.isArray(variantProductGalleryItem.images) &&\n variantProductGalleryItem.images.length > 0\n ) {\n // \u5904\u7406 images \u6570\u7EC4\uFF0C\u4E3A\u6BCF\u5F20\u56FE\u7247\u751F\u6210\u54CD\u5E94\u5F0F source\n const imageGalleries = variantProductGalleryItem.images\n .map((imageItem: any) => {\n // \u4ECE\u5355\u4E2A\u56FE\u7247\u5BF9\u8C61\u751F\u6210\u54CD\u5E94\u5F0F\u56FE\u7247\u7684 source \u5B57\u7B26\u4E32\n const imageSourceParts: string[] = []\n if (imageItem.image_1920 && imageItem.image_1920.trim()) {\n imageSourceParts.push(`${imageItem.image_1920} 1920`)\n }\n if (imageItem.image_1440 && imageItem.image_1440.trim()) {\n imageSourceParts.push(`${imageItem.image_1440} 1440`)\n }\n if (imageItem.image_1024 && imageItem.image_1024.trim()) {\n imageSourceParts.push(`${imageItem.image_1024} 1024`)\n }\n if (imageItem.image_768 && imageItem.image_768.trim()) {\n imageSourceParts.push(`${imageItem.image_768} 767`)\n }\n if (imageItem.image_390 && imageItem.image_390.trim()) {\n imageSourceParts.push(`${imageItem.image_390} 390`)\n }\n\n // \u5982\u679C\u751F\u6210\u4E86\u6709\u6548\u7684\u54CD\u5E94\u5F0F source\uFF0C\u8FD4\u56DE\u56FE\u7247\u5BF9\u8C61\n if (imageSourceParts.length > 0) {\n const responsiveSource = imageSourceParts.join(', ')\n return {\n image: {\n url: responsiveSource,\n altText: item.comment?.content || '',\n },\n // \u6807\u8BB0\u8FD9\u662F\u4ECE images \u751F\u6210\u7684\uFF0C\u7528\u4E8E\u540E\u7EED\u5904\u7406\n _fromImages: true,\n _responsiveSource: responsiveSource,\n } as any\n }\n return null\n })\n .filter((gallery: any) => gallery !== null) // \u8FC7\u6EE4\u6389\u65E0\u6548\u7684\u56FE\u7247\n\n // \u5982\u679C\u4ECE images \u6570\u7EC4\u751F\u6210\u4E86\u6709\u6548\u7684\u56FE\u7247\uFF0C\u4F7F\u7528\u5B83\u4EEC\uFF1B\u5426\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries\n if (imageGalleries.length > 0) {\n galleries = imageGalleries\n }\n // \u5982\u679C images \u5B58\u5728\u4F46\u90FD\u662F\u7A7A\u503C\uFF0C\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries \u903B\u8F91\n }\n\n return {\n ...item,\n galleries,\n }\n })\n .filter((item: any) => item.galleries.length > 0)\n }, [variant?.payload, galleryMap, product?.payload])\n\n const [activeGalleryTab, setActiveGalleryTab] = useState<GalleryTabItemProps>(galleryTabs?.[0])\n const [activeTabIndex, setActiveTabIndex] = useState(0)\n const [targetSlideIndex, setTargetSlideIndex] = useState<number | null>(null)\n\n // \u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\uFF09\n const handleNextTab = useCallback(() => {\n const nextIndex = (activeTabIndex + 1) % galleryTabs.length\n setActiveTabIndex(nextIndex)\n setActiveGalleryTab(galleryTabs[nextIndex])\n setTargetSlideIndex(0) // \u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n }, [activeTabIndex, galleryTabs])\n\n // \u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u6700\u540E\u4E00\u5F20\uFF09\n const handlePrevTab = useCallback(() => {\n const prevIndex = activeTabIndex === 0 ? galleryTabs.length - 1 : activeTabIndex - 1\n setActiveTabIndex(prevIndex)\n setActiveGalleryTab(galleryTabs[prevIndex])\n // \u8DF3\u8F6C\u5230\u4E0A\u4E00\u4E2A tab \u7684\u6700\u540E\u4E00\u5F20\n const prevTabGalleries = galleryTabs[prevIndex]?.galleries || []\n setTargetSlideIndex(prevTabGalleries.length - 1)\n }, [activeTabIndex, galleryTabs])\n\n // \u5F53 activeTabIndex \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5230\u5BF9\u5E94\u7684 tab\n useEffect(() => {\n if (activeTabIndex !== null && activeTabIndex !== undefined) {\n // \u4F7F\u7528 requestAnimationFrame \u786E\u4FDD DOM \u5DF2\u66F4\u65B0\n requestAnimationFrame(() => {\n productGalleryTabRef.current?.scrollToTab(activeTabIndex)\n })\n }\n }, [activeTabIndex])\n\n useEffect(() => {\n // \u5F53 variant \u53D8\u5316\u65F6\uFF0C\u5207\u6362\u5230\u7B2C\u4E00\u4E2A tab\n setActiveGalleryTab(galleryTabs[0])\n setActiveTabIndex(0)\n }, [variant?.id])\n\n // \u4E3A\u6BCF\u4E2A tab \u6E32\u67D3\u5BF9\u5E94\u7684\u7EC4\u4EF6\n const renderGalleryForTab = (tab: any, index: number) => {\n switch (tab?.galleryTabType) {\n case GalleryTabType.GALLERY_IMAGE_MAIN:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_FEATURES:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_SCENE:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_VIDEO:\n return (\n <ProductGalleryTabVideo\n {...tab}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n default:\n return null\n }\n }\n\n return (\n <div id=\"ipc-product-gallery\">\n <Root className=\"relative\" value={activeGalleryTab?.tabValue} defaultValue={galleryTabs?.[0]?.tabValue}>\n <div className=\"tablet:h-[620px] desktop:rounded-2xl desktop:h-[560px] lg-desktop:h-[700px] desktop:relative h-[420px] overflow-hidden bg-[#EAEAEC] \">\n {galleryTabs.map((item: any, index: number) => {\n return (\n <Content key={item.tabValue} className=\"h-full\" value={item.tabValue}>\n {renderGalleryForTab(item, index)}\n </Content>\n )\n })}\n </div>\n <ProductGalleryTab\n ref={productGalleryTabRef}\n galleryTabs={galleryTabs}\n activeGalleryTab={activeGalleryTab}\n setActiveGalleryTab={setActiveGalleryTab}\n setActiveTabIndex={setActiveTabIndex}\n setTargetSlideIndex={setTargetSlideIndex}\n />\n </Root>\n </div>\n )\n}\n\nexport interface ProductGalleryTabRef {\n scrollToTab: (index: number) => void\n}\n\nconst ProductGalleryTab = forwardRef<\n ProductGalleryTabRef,\n {\n galleryTabs: GalleryTabItemProps[]\n activeGalleryTab: GalleryTabItemProps\n setActiveGalleryTab: Dispatch<SetStateAction<GalleryTabItemProps>>\n setActiveTabIndex: Dispatch<SetStateAction<number>>\n setTargetSlideIndex: Dispatch<SetStateAction<number | null>>\n }\n>((props, ref) => {\n const { galleryTabs, activeGalleryTab, setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex } = props\n const { product } = useBizProductContext()\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const triggerRefs = useRef<Map<string, HTMLButtonElement>>(new Map())\n\n const scrollToEvent = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n if (scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const button = event.currentTarget\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }, [])\n\n const handleGalleryTabClick = useCallback(\n (el: React.MouseEvent<HTMLButtonElement>, item: GalleryTabItemProps, index: number) => {\n setActiveGalleryTab(item)\n setActiveTabIndex(index)\n setTargetSlideIndex(0) // \u624B\u52A8\u70B9\u51FB tab \u65F6\uFF0C\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n scrollToEvent(el)\n },\n [setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex, scrollToEvent]\n )\n\n // \u6EDA\u52A8\u5230\u6307\u5B9A\u7D22\u5F15\u7684 tab\n const scrollToTab = useCallback(\n (index: number) => {\n if (scrollContainerRef.current && galleryTabs[index]) {\n const container = scrollContainerRef.current\n const tabItem = galleryTabs[index]\n const button = triggerRefs.current.get(tabItem.tabValue)\n\n if (button) {\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n },\n [galleryTabs]\n )\n\n useImperativeHandle(ref, () => ({\n scrollToTab,\n }))\n\n return (\n <div className=\"laptop:inset-x-16 tablet:mt-3 desktop:static absolute inset-x-4 bottom-4 z-[2] flex items-center justify-between\">\n <List\n ref={scrollContainerRef}\n className=\"laptop:p-0 desktop:p-1 overflow-x-auto rounded-full bg-[#EAEAEC] p-1\"\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n >\n <div className=\"whitespace-nowrap\">\n {galleryTabs?.map((item, index) => {\n return (\n <Trigger\n ref={el => {\n if (el) {\n triggerRefs.current.set(item.tabValue, el)\n } else {\n triggerRefs.current.delete(item.tabValue)\n }\n }}\n className={cn(\n 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px] rounded-full px-5 pb-[10px] pt-[11px] text-[14px] font-bold leading-tight',\n item.tabValue === activeGalleryTab?.tabValue && 'bg-white'\n )}\n onClick={el => handleGalleryTabClick(el, item, index)}\n key={item.tabValue + index}\n value={item.tabValue}\n >\n {item.tabLabel}\n </Trigger>\n )\n })}\n </div>\n </List>\n <div className=\"laptop:gap-2 laptop:flex hidden\">\n {product.metafields?.global?.specifications && (\n <>\n <SpecsModal /> | <CompareModal />\n </>\n )}\n </div>\n </div>\n )\n})\n\nconst ProductGalleryTabImage = forwardRef<SwiperRef, ProductGalleryTabItemProps>((props, ref) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { variant, totalSavings } = useBizProductContext()\n const paginationRef = useRef<HTMLDivElement>(null)\n const [thumbsSwiper, setThumbsSwiper] = useState<SwiperType | null>(null)\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const commentRef = useRef<HTMLDivElement>(null)\n const [shouldScroll, setShouldScroll] = useState(false)\n\n const imageClassName = useMemo(() => {\n if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_MAIN) {\n return 'size-[240px] mx-auto mt-[42px] tablet:mt-16 tablet:size-[420px] lg-desktop:size-[560px]'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_FEATURES) {\n // return '420px'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_SCENE) {\n // return '560px'\n }\n }, [props?.galleryTabType])\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && !!props.targetSlideIndex) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n // \u68C0\u6D4B\u6587\u672C\u5185\u5BB9\u662F\u5426\u8D85\u8FC7\u5BB9\u5668\u9AD8\u5EA6\uFF0C\u51B3\u5B9A\u662F\u5426\u9700\u8981\u6EDA\u52A8\n // useEffect(() => {\n // if (commentRef.current) {\n // const container = commentRef.current\n // const contentHeight = container.scrollHeight\n // const containerHeight = container.clientHeight\n // const needsScroll = contentHeight > containerHeight\n // setShouldScroll(needsScroll)\n // }\n // }, [])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n ref={ref}\n className=\"h-full\"\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n thumbs={{ swiper: thumbsSwiper }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n // \u751F\u6210\u552F\u4E00\u7684\u66DD\u5149 key\uFF08tabId + index\uFF09\n const exposureKey = `${props.tabValue}-${jIndex}`\n\n // \u66DD\u5149\u68C0\u6D4B\u56DE\u8C03\n const handleExposure = () => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_impression',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n component_type: 'image',\n component_name: props?.tabLabel || '',\n position: jIndex + 1,\n creative_id: '',\n component_title: '',\n component_description: '',\n navigation: '',\n },\n })\n }\n\n // \u4F18\u5148\u4F7F\u7528\u4ECE images \u751F\u6210\u7684\u54CD\u5E94\u5F0F source\uFF0C\u5426\u5219\u4F7F\u7528\u539F\u6709\u7684 image.url\n const pictureSource = (item as any)?._responsiveSource || item?.image?.url || ''\n\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <ExposureDetector\n onExposure={handleExposure}\n exposureKey={exposureKey}\n threshold={0.5}\n duration={2000}\n className=\"h-full\"\n >\n <Picture\n source={pictureSource}\n alt={item?.image?.altText}\n className={cn('h-full', imageClassName)}\n imgClassName=\"object-cover h-full\"\n />\n </ExposureDetector>\n </SwiperSlide>\n )\n })}\n </Swiper>\n {variant.availableForSale && !!totalSavings && !props.index && (\n <Badge\n size=\"lg\"\n className=\"bg-brand laptop:left-16 laptop:top-5 desktop:left-6 desktop:top-6 absolute left-4 top-3 z-[2] text-white\"\n >\n {`${formatPrice({\n amount: totalSavings,\n currencyCode: variant?.price?.currencyCode,\n locale: locale,\n })} ${copyWriting?.off}`}\n </Badge>\n )}\n <div\n className={cn(\n 'tablet:opacity-0 tablet:block tablet:absolute tablet:top-1/2 laptop:left-16 tablet:left-6 desktop:left-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n `swiper-button`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n <div\n className={cn(\n 'tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 laptop:right-16 tablet:right-6 desktop:right-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n `swiper-button`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n {/* {props?.galleries?.map((item, jIndex) => {\n return (\n <Picture\n key={props?.id + 'SwiperSlideItem' + jIndex}\n source={item?.image?.url}\n alt={item?.image?.altText}\n className=\"h-full\"\n imgClassName=\"object-cover h-full\"\n />\n )\n })} */}\n <div className=\"tablet:bottom-[70px] tablet:flex laptop:inset-x-16 desktop:bottom-[20px] desktop:inset-x-6 absolute inset-x-4 bottom-[94px] z-10 items-center justify-between\">\n <div className=\"tablet:block hidden\">\n <Swiper\n className=\"flex items-center justify-between\"\n onSwiper={setThumbsSwiper}\n spaceBetween={12}\n slidesPerView={6}\n freeMode={true}\n watchSlidesProgress={true}\n modules={[Navigation, Thumbs]}\n >\n {props?.galleries?.map((item, jIndex) => (\n <SwiperSlide\n key={props?.id + 'SwiperSlideThumbItem' + jIndex}\n className=\"[&.swiper-slide-thumb-active]:border-brand !w-auto cursor-pointer border border-transparent [&.swiper-slide-thumb-active]:rounded\"\n >\n <Picture\n source={item.image?.url}\n alt={item.image?.altText}\n className=\"lg-desktop:size-12 size-10 overflow-hidden rounded bg-white\"\n imgClassName=\"object-cover h-full\"\n />\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n {!props?.index && (\n <div className=\"flex items-center gap-2\">\n <Picture\n source={props?.comment?.avatar?.url}\n className=\"laptop:size-10 size-8 shrink-0 rounded-full\"\n imgClassName=\"object-cover \"\n />\n <div className=\"relative max-w-[528px] overflow-hidden\">\n <div\n ref={commentRef}\n className={cn('line-clamp-2')}\n style={\n {\n // animationDuration: `3s`,\n }\n }\n >\n <Text\n html={props?.comment?.content}\n className=\"lg-desktop:text-base text-sm font-bold text-[#1D1D1F]\"\n />\n </div>\n </div>\n </div>\n )}\n </div>\n <div\n ref={paginationRef}\n className=\"tablet:hidden absolute inset-x-4 !bottom-[70px] z-10 text-center [&_.swiper-pagination-bullet-active]:!bg-[#1D1D1F] [&_.swiper-pagination-bullet]:bg-white [&_.swiper-pagination-bullet]:opacity-100\"\n />\n </div>\n )\n})\n\nconst ProductGalleryTabVideo = (props: ProductGalleryTabItemProps) => {\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && props.targetSlideIndex !== null && props.targetSlideIndex !== undefined) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n className=\"h-full\"\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <video controls className=\"size-full object-cover\">\n <track kind=\"captions\" />\n <source src={item?.sources?.[0]?.url} type=\"video/mp4\" />\n <source src={item?.sources?.[0]?.url} type=\"video/webm\" />\n <source src={item?.sources?.[0]?.url} type=\"video/ogg\" />\n </video>\n </SwiperSlide>\n )\n })}\n </Swiper>\n <div\n className={cn(\n 'swiper-button tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:left-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n <div\n className={cn(\n 'tablet:block swiper-button tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:right-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n </div>\n )\n}\n\nconst ProductGalleryTab3DView = (props: ProductGalleryTabItemProps) => {\n return <div>3D View</div>\n}\n\nexport default withLayout(ProductGallery)\n"],
5
- "mappings": "ukBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAkCI,IAAAI,EAAA,6BAlCJC,EAA+B,6CAC/BC,EAA6C,8CAC7CC,EAWO,iBACPA,EAAoD,wBACpDC,EAA2D,0BAC3DC,EAAmB,2CACnBC,EAA+B,sBAC/BC,EAA6C,gCAC7CC,EAAqC,0CACrCC,EAAgC,+CAChCC,EAA2B,sCAC3BC,EAAyB,4CACzBC,EAA4B,mCAC5BC,EAA2B,2CAC3BC,EAAwB,0CACxBZ,GAAiC,8CAMjC,MAAMa,EAAwBC,MAE1B,QAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,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../../../../AiuiProvider/index.js'\nimport { Text, Picture, Button, Badge } from '../../../../../components/index.js'\nimport {\n useCallback,\n useMemo,\n useState,\n forwardRef,\n useRef,\n type RefObject,\n useEffect,\n type Dispatch,\n type SetStateAction,\n useImperativeHandle,\n} from 'react'\nimport { Swiper, SwiperSlide, type SwiperRef } from 'swiper/react'\nimport { Navigation, Mousewheel, Thumbs, Pagination, Autoplay } from 'swiper/modules'\nimport { cn } from '../../../../../helpers/index.js'\nimport { GalleryTabType } from './types.js'\nimport { Content, List, Root, Trigger } from '@radix-ui/react-tabs'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useVariantMedia } from '../../../hooks/use-variant-media.js'\nimport { SpecsModal } from './components/SpecsModal.js'\nimport CompareModal from './components/CompareModal.js'\nimport { formatPrice } from '../../../utils/index.js'\nimport { withLayout } from '../../../../../shared/Styles.js'\nimport { gaTrack } from '../../../../../shared/track.js'\nimport { ExposureDetector } from '../../../../../components/index.js'\n\nimport type { Swiper as SwiperType } from 'swiper'\nimport type { ImageMedia, VideoMedia } from '../../../hooks/use-variant-media.js'\nimport type { ProductGalleryProps, ProductGalleryTabItemProps, GalleryTabItemProps } from './types.js'\n\nconst SwiperLeftButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect x=\"48\" y=\"48\" width=\"48\" height=\"48\" rx=\"24\" transform=\"rotate(-180 48 48)\" fill=\"white\" />\n <path\n d=\"M25.1035 16.8545C25.5372 16.3818 26.246 16.3818 26.6797 16.8545C27.1067 17.3201 27.1067 18.0706 26.6797 18.5361L21.668 24L26.6797 29.4639C27.1067 29.9294 27.1067 30.6799 26.6797 31.1455C26.246 31.6182 25.5372 31.6182 25.1035 31.1455L19.3203 24.8408C18.8933 24.3752 18.8933 23.6248 19.3203 23.1592L25.1035 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst SwiperRightButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect width=\"48\" height=\"48\" rx=\"24\" transform=\"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 48)\" fill=\"white\" />\n <path\n d=\"M22.8965 16.8545C22.4628 16.3818 21.754 16.3818 21.3203 16.8545C20.8933 17.3201 20.8933 18.0706 21.3203 18.5361L26.332 24L21.3203 29.4639C20.8933 29.9294 20.8933 30.6799 21.3203 31.1455C21.754 31.6182 22.4628 31.6182 22.8965 31.1455L28.6797 24.8408C29.1067 24.3752 29.1067 23.6248 28.6797 23.1592L22.8965 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst ProductGallery = () => {\n const { copyWriting } = useAiuiContext()\n const { product, variant, selectedOptions } = useBizProductContext()\n const defaultMediaData = useVariantMedia({ product, variant })\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const productGalleryTabRef = useRef<ProductGalleryTabRef>(null)\n\n const customMediaList = variant?.metafields?.component?.custom_media_list\n let productList: ImageMedia[], sceneList: ImageMedia[], keyFeaturesList: ImageMedia[], videoList: VideoMedia[]\n\n if (customMediaList && customMediaList?.available) {\n productList = customMediaList?.product || []\n sceneList = customMediaList?.scenarios || []\n keyFeaturesList = customMediaList?.keyFeatures || []\n videoList = customMediaList?.video || []\n } else {\n productList = defaultMediaData?.productList\n sceneList = defaultMediaData?.sceneList\n keyFeaturesList = defaultMediaData?.keyFeaturesList\n videoList = defaultMediaData?.videoList\n }\n\n const allMedia = useMemo(() => [...productList, ...sceneList, ...videoList], [productList, sceneList, videoList])\n\n const galleryMap: Record<string, ImageMedia[] | VideoMedia[]> = {\n productList: productList,\n sceneList: sceneList,\n keyFeaturesList: keyFeaturesList,\n videoList: videoList,\n }\n\n const galleryTabs = useMemo(() => {\n const productTab: ProductGalleryProps =\n product?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n const variantProductGallery =\n variant?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n\n return productTab\n ?.map((item: any) => {\n // \u5982\u679C\u5B58\u5728 images \u6570\u7EC4\u4E14\u6709\u6709\u6548\u503C\uFF0C\u4F18\u5148\u4F7F\u7528 images \u521B\u5EFA\u54CD\u5E94\u5F0F\u56FE\u7247\u6570\u636E\n const variantProductGalleryItem = variantProductGallery?.find(\n (variantItem: any) => item?.galleries === variantItem?.galleries\n )\n let galleries = galleryMap[item?.galleries] || []\n\n if (\n variantProductGalleryItem?.images &&\n Array.isArray(variantProductGalleryItem.images) &&\n variantProductGalleryItem.images.length > 0\n ) {\n // \u5904\u7406 images \u6570\u7EC4\uFF0C\u4E3A\u6BCF\u5F20\u56FE\u7247\u751F\u6210\u54CD\u5E94\u5F0F source\n const imageGalleries = variantProductGalleryItem.images\n .map((imageItem: any) => {\n // \u4ECE\u5355\u4E2A\u56FE\u7247\u5BF9\u8C61\u751F\u6210\u54CD\u5E94\u5F0F\u56FE\u7247\u7684 source \u5B57\u7B26\u4E32\n const imageSourceParts: string[] = []\n if (imageItem.image_1920 && imageItem.image_1920.trim()) {\n imageSourceParts.push(`${imageItem.image_1920} 1920`)\n }\n if (imageItem.image_1440 && imageItem.image_1440.trim()) {\n imageSourceParts.push(`${imageItem.image_1440} 1440`)\n }\n if (imageItem.image_1024 && imageItem.image_1024.trim()) {\n imageSourceParts.push(`${imageItem.image_1024} 1024`)\n }\n if (imageItem.image_768 && imageItem.image_768.trim()) {\n imageSourceParts.push(`${imageItem.image_768} 767`)\n }\n if (imageItem.image_390 && imageItem.image_390.trim()) {\n imageSourceParts.push(`${imageItem.image_390} 390`)\n }\n\n // \u5982\u679C\u751F\u6210\u4E86\u6709\u6548\u7684\u54CD\u5E94\u5F0F source\uFF0C\u8FD4\u56DE\u56FE\u7247\u5BF9\u8C61\n if (imageSourceParts.length > 0) {\n const responsiveSource = imageSourceParts.join(', ')\n return {\n image: {\n url: responsiveSource,\n altText: item.comment?.content || '',\n },\n // \u6807\u8BB0\u8FD9\u662F\u4ECE images \u751F\u6210\u7684\uFF0C\u7528\u4E8E\u540E\u7EED\u5904\u7406\n _fromImages: true,\n _responsiveSource: responsiveSource,\n } as any\n }\n return null\n })\n .filter((gallery: any) => gallery !== null) // \u8FC7\u6EE4\u6389\u65E0\u6548\u7684\u56FE\u7247\n\n // \u5982\u679C\u4ECE images \u6570\u7EC4\u751F\u6210\u4E86\u6709\u6548\u7684\u56FE\u7247\uFF0C\u4F7F\u7528\u5B83\u4EEC\uFF1B\u5426\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries\n if (imageGalleries.length > 0) {\n galleries = imageGalleries\n }\n // \u5982\u679C images \u5B58\u5728\u4F46\u90FD\u662F\u7A7A\u503C\uFF0C\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries \u903B\u8F91\n }\n\n return {\n ...item,\n galleries,\n }\n })\n .filter((item: any) => item.galleries.length > 0)\n }, [variant?.payload, galleryMap, product?.payload])\n\n const [activeGalleryTab, setActiveGalleryTab] = useState<GalleryTabItemProps>(galleryTabs?.[0])\n const [activeTabIndex, setActiveTabIndex] = useState(0)\n const [targetSlideIndex, setTargetSlideIndex] = useState<number | null>(null)\n\n // \u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\uFF09\n const handleNextTab = useCallback(() => {\n const nextIndex = (activeTabIndex + 1) % galleryTabs.length\n setActiveTabIndex(nextIndex)\n setActiveGalleryTab(galleryTabs[nextIndex])\n setTargetSlideIndex(0) // \u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n }, [activeTabIndex, galleryTabs])\n\n // \u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u6700\u540E\u4E00\u5F20\uFF09\n const handlePrevTab = useCallback(() => {\n const prevIndex = activeTabIndex === 0 ? galleryTabs.length - 1 : activeTabIndex - 1\n setActiveTabIndex(prevIndex)\n setActiveGalleryTab(galleryTabs[prevIndex])\n // \u8DF3\u8F6C\u5230\u4E0A\u4E00\u4E2A tab \u7684\u6700\u540E\u4E00\u5F20\n const prevTabGalleries = galleryTabs[prevIndex]?.galleries || []\n setTargetSlideIndex(prevTabGalleries.length - 1)\n }, [activeTabIndex, galleryTabs])\n\n // \u5F53 activeTabIndex \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5230\u5BF9\u5E94\u7684 tab\n useEffect(() => {\n if (activeTabIndex !== null && activeTabIndex !== undefined) {\n // \u4F7F\u7528 requestAnimationFrame \u786E\u4FDD DOM \u5DF2\u66F4\u65B0\n requestAnimationFrame(() => {\n productGalleryTabRef.current?.scrollToTab(activeTabIndex)\n })\n }\n }, [activeTabIndex])\n\n useEffect(() => {\n // \u5F53 variant \u53D8\u5316\u65F6\uFF0C\u5207\u6362\u5230\u7B2C\u4E00\u4E2A tab\n setActiveGalleryTab(galleryTabs[0])\n setActiveTabIndex(0)\n }, [variant?.id])\n\n // \u4E3A\u6BCF\u4E2A tab \u6E32\u67D3\u5BF9\u5E94\u7684\u7EC4\u4EF6\n const renderGalleryForTab = (tab: any, index: number) => {\n switch (tab?.galleryTabType) {\n case GalleryTabType.GALLERY_IMAGE_MAIN:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_FEATURES:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_SCENE:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_VIDEO:\n return (\n <ProductGalleryTabVideo\n {...tab}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n default:\n return null\n }\n }\n\n return (\n <div id=\"ipc-product-gallery\">\n <Root className=\"relative\" value={activeGalleryTab?.tabValue} defaultValue={galleryTabs?.[0]?.tabValue}>\n <div className=\"tablet:h-[620px] desktop:rounded-2xl desktop:h-[560px] lg-desktop:h-[700px] desktop:relative h-[420px] overflow-hidden bg-[#EAEAEC] \">\n {galleryTabs.map((item: any, index: number) => {\n return (\n <Content key={item.tabValue} className=\"h-full\" value={item.tabValue}>\n {renderGalleryForTab(item, index)}\n </Content>\n )\n })}\n </div>\n <ProductGalleryTab\n ref={productGalleryTabRef}\n galleryTabs={galleryTabs}\n activeGalleryTab={activeGalleryTab}\n setActiveGalleryTab={setActiveGalleryTab}\n setActiveTabIndex={setActiveTabIndex}\n setTargetSlideIndex={setTargetSlideIndex}\n />\n </Root>\n </div>\n )\n}\n\nexport interface ProductGalleryTabRef {\n scrollToTab: (index: number) => void\n}\n\nconst ProductGalleryTab = forwardRef<\n ProductGalleryTabRef,\n {\n galleryTabs: GalleryTabItemProps[]\n activeGalleryTab: GalleryTabItemProps\n setActiveGalleryTab: Dispatch<SetStateAction<GalleryTabItemProps>>\n setActiveTabIndex: Dispatch<SetStateAction<number>>\n setTargetSlideIndex: Dispatch<SetStateAction<number | null>>\n }\n>((props, ref) => {\n const { galleryTabs, activeGalleryTab, setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex } = props\n const { product } = useBizProductContext()\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const triggerRefs = useRef<Map<string, HTMLButtonElement>>(new Map())\n\n const scrollToEvent = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n if (scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const button = event.currentTarget\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }, [])\n\n const handleGalleryTabClick = useCallback(\n (el: React.MouseEvent<HTMLButtonElement>, item: GalleryTabItemProps, index: number) => {\n setActiveGalleryTab(item)\n setActiveTabIndex(index)\n setTargetSlideIndex(0) // \u624B\u52A8\u70B9\u51FB tab \u65F6\uFF0C\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n scrollToEvent(el)\n },\n [setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex, scrollToEvent]\n )\n\n // \u6EDA\u52A8\u5230\u6307\u5B9A\u7D22\u5F15\u7684 tab\n const scrollToTab = useCallback(\n (index: number) => {\n if (scrollContainerRef.current && galleryTabs[index]) {\n const container = scrollContainerRef.current\n const tabItem = galleryTabs[index]\n const button = triggerRefs.current.get(tabItem.tabValue)\n\n if (button) {\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n },\n [galleryTabs]\n )\n\n useImperativeHandle(ref, () => ({\n scrollToTab,\n }))\n\n return (\n <div className=\"laptop:inset-x-16 tablet:mt-3 desktop:static absolute inset-x-4 bottom-4 z-[2] flex items-center justify-between\">\n <List\n ref={scrollContainerRef}\n className=\"laptop:p-0 desktop:p-1 overflow-x-auto rounded-full bg-[#EAEAEC] p-1\"\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n >\n <div className=\"whitespace-nowrap\">\n {galleryTabs?.map((item, index) => {\n return (\n <Trigger\n ref={el => {\n if (el) {\n triggerRefs.current.set(item.tabValue, el)\n } else {\n triggerRefs.current.delete(item.tabValue)\n }\n }}\n className={cn(\n 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px] rounded-full px-5 pb-[10px] pt-[11px] text-[14px] font-bold leading-tight',\n item.tabValue === activeGalleryTab?.tabValue && 'bg-white'\n )}\n onClick={el => handleGalleryTabClick(el, item, index)}\n key={item.tabValue + index}\n value={item.tabValue}\n >\n {item.tabLabel}\n </Trigger>\n )\n })}\n </div>\n </List>\n <div className=\"laptop:gap-2 laptop:flex hidden\">\n {product.metafields?.global?.specifications && (\n <>\n <SpecsModal /> | <CompareModal />\n </>\n )}\n </div>\n </div>\n )\n})\n\nconst ProductGalleryTabImage = forwardRef<SwiperRef, ProductGalleryTabItemProps>((props, ref) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { variant, totalSavings } = useBizProductContext()\n const paginationRef = useRef<HTMLDivElement>(null)\n const [thumbsSwiper, setThumbsSwiper] = useState<SwiperType | null>(null)\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const commentRef = useRef<HTMLDivElement>(null)\n const [shouldScroll, setShouldScroll] = useState(false)\n\n const imageClassName = useMemo(() => {\n if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_MAIN) {\n return 'size-[240px] mx-auto mt-[42px] tablet:mt-16 tablet:size-[420px] lg-desktop:size-[560px]'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_FEATURES) {\n // return '420px'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_SCENE) {\n // return '560px'\n }\n }, [props?.galleryTabType])\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && !!props.targetSlideIndex) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n // \u68C0\u6D4B\u6587\u672C\u5185\u5BB9\u662F\u5426\u8D85\u8FC7\u5BB9\u5668\u9AD8\u5EA6\uFF0C\u51B3\u5B9A\u662F\u5426\u9700\u8981\u6EDA\u52A8\n // useEffect(() => {\n // if (commentRef.current) {\n // const container = commentRef.current\n // const contentHeight = container.scrollHeight\n // const containerHeight = container.clientHeight\n // const needsScroll = contentHeight > containerHeight\n // setShouldScroll(needsScroll)\n // }\n // }, [])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n ref={ref}\n className=\"h-full\"\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n thumbs={{ swiper: thumbsSwiper }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n // \u751F\u6210\u552F\u4E00\u7684\u66DD\u5149 key\uFF08tabId + index\uFF09\n const exposureKey = `${props.tabValue}-${jIndex}`\n\n // \u66DD\u5149\u68C0\u6D4B\u56DE\u8C03\n const handleExposure = () => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_impression',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n component_type: 'image',\n component_name: props?.tabLabel || '',\n position: jIndex + 1,\n creative_id: '',\n component_title: '',\n component_description: '',\n navigation: '',\n },\n })\n }\n\n // \u4F18\u5148\u4F7F\u7528\u4ECE images \u751F\u6210\u7684\u54CD\u5E94\u5F0F source\uFF0C\u5426\u5219\u4F7F\u7528\u539F\u6709\u7684 image.url\n const pictureSource = (item as any)?._responsiveSource || item?.image?.url || ''\n\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <ExposureDetector\n onExposure={handleExposure}\n exposureKey={exposureKey}\n threshold={0.5}\n duration={2000}\n className=\"h-full\"\n >\n <Picture\n source={pictureSource}\n alt={item?.image?.altText}\n className={cn('h-full', imageClassName)}\n imgClassName=\"object-cover h-full\"\n />\n </ExposureDetector>\n </SwiperSlide>\n )\n })}\n </Swiper>\n {variant.availableForSale && !!totalSavings && !props.index && (\n <Badge\n size=\"lg\"\n className=\"bg-brand laptop:left-16 laptop:top-5 desktop:left-6 desktop:top-6 absolute left-4 top-3 z-[2] text-white\"\n >\n {`${formatPrice({\n amount: totalSavings,\n currencyCode: variant?.price?.currencyCode,\n locale: locale,\n })} ${copyWriting?.off}`}\n </Badge>\n )}\n <div\n className={cn(\n 'tablet:opacity-0 tablet:block tablet:absolute tablet:top-1/2 laptop:left-16 tablet:left-6 desktop:left-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n `swiper-button`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n <div\n className={cn(\n 'tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 laptop:right-16 tablet:right-6 desktop:right-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n `swiper-button`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n {/* {props?.galleries?.map((item, jIndex) => {\n return (\n <Picture\n key={props?.id + 'SwiperSlideItem' + jIndex}\n source={item?.image?.url}\n alt={item?.image?.altText}\n className=\"h-full\"\n imgClassName=\"object-cover h-full\"\n />\n )\n })} */}\n <div className=\"tablet:bottom-[70px] tablet:flex laptop:inset-x-16 desktop:bottom-[20px] desktop:inset-x-6 absolute inset-x-4 bottom-[94px] z-10 items-center justify-between\">\n <div className=\"tablet:block hidden\">\n <Swiper\n className=\"flex items-center justify-between\"\n onSwiper={setThumbsSwiper}\n spaceBetween={12}\n slidesPerView={6}\n freeMode={true}\n watchSlidesProgress={true}\n modules={[Navigation, Thumbs]}\n >\n {props?.galleries?.map((item, jIndex) => (\n <SwiperSlide\n key={props?.id + 'SwiperSlideThumbItem' + jIndex}\n className=\"[&.swiper-slide-thumb-active]:border-brand !w-auto cursor-pointer border border-transparent [&.swiper-slide-thumb-active]:rounded\"\n >\n <Picture\n source={item.image?.url}\n alt={item.image?.altText}\n className=\"lg-desktop:size-12 size-10 overflow-hidden rounded bg-white\"\n imgClassName=\"object-cover h-full\"\n />\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n {!props?.index && (\n <div className=\"flex items-center gap-2\">\n <Picture\n source={props?.comment?.avatar?.url}\n className=\"laptop:size-10 size-8 shrink-0 rounded-full\"\n imgClassName=\"object-cover \"\n />\n <div className=\"relative max-w-[528px] overflow-hidden\">\n <Swiper\n modules={[Autoplay]}\n loop\n className=\"lg-desktop:h-11 h-10\"\n direction=\"vertical\"\n autoplay={{ delay: 2000, disableOnInteraction: false }}\n >\n <SwiperSlide>\n <Text\n html={props?.comment?.content}\n className=\"lg-desktop:text-base line-clamp-2 text-sm font-bold text-[#1D1D1F]\"\n />\n </SwiperSlide>\n <SwiperSlide>\n <Text\n html={props?.comment?.content}\n className=\"lg-desktop:text-base line-clamp-2 text-sm font-bold text-[#1D1D1F]\"\n />\n </SwiperSlide>\n </Swiper>\n {/* <div\n ref={commentRef}\n className={cn('h-10', shouldScroll && 'animate-scroll-text')}\n >\n <Text\n html={props?.comment?.content}\n className=\"lg-desktop:text-base text-sm font-bold text-[#1D1D1F]\"\n />\n </div> */}\n </div>\n </div>\n )}\n </div>\n <div\n ref={paginationRef}\n className=\"tablet:hidden absolute inset-x-4 !bottom-[70px] z-10 text-center [&_.swiper-pagination-bullet-active]:!bg-[#1D1D1F] [&_.swiper-pagination-bullet]:bg-white [&_.swiper-pagination-bullet]:opacity-100\"\n />\n </div>\n )\n})\n\nconst ProductGalleryTabVideo = (props: ProductGalleryTabItemProps) => {\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && props.targetSlideIndex !== null && props.targetSlideIndex !== undefined) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n className=\"h-full\"\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <video controls className=\"size-full object-cover\">\n <track kind=\"captions\" />\n <source src={item?.sources?.[0]?.url} type=\"video/mp4\" />\n <source src={item?.sources?.[0]?.url} type=\"video/webm\" />\n <source src={item?.sources?.[0]?.url} type=\"video/ogg\" />\n </video>\n </SwiperSlide>\n )\n })}\n </Swiper>\n <div\n className={cn(\n 'swiper-button tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:left-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n <div\n className={cn(\n 'tablet:block swiper-button tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:right-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n </div>\n )\n}\n\nconst ProductGalleryTab3DView = (props: ProductGalleryTabItemProps) => {\n return <div>3D View</div>\n}\n\nexport default withLayout(ProductGallery)\n"],
5
+ "mappings": "ukBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAkCI,IAAAI,EAAA,6BAlCJC,EAA+B,6CAC/BC,EAA6C,8CAC7CC,EAWO,iBACPA,EAAoD,wBACpDC,EAAqE,0BACrEC,EAAmB,2CACnBC,EAA+B,sBAC/BC,EAA6C,gCAC7CC,EAAqC,0CACrCC,EAAgC,+CAChCC,EAA2B,sCAC3BC,EAAyB,4CACzBC,EAA4B,mCAC5BC,EAA2B,2CAC3BC,EAAwB,0CACxBZ,GAAiC,8CAMjC,MAAMa,EAAwBC,MAE1B,QAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA8B,GAAGA,EACjG,oBAAC,QAAK,EAAE,KAAK,EAAE,KAAK,MAAM,KAAK,OAAO,KAAK,GAAG,KAAK,UAAU,qBAAqB,KAAK,QAAQ,KAC/F,OAAC,QACC,EAAE,4TACF,KAAK,eACP,GACF,EAIEC,EAAyBD,MAE3B,QAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAA8B,G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,EAAG,CAACQ,EAAQR,EAAM,iBAAkBA,CAAK,CAAC,KAGxC,QAAC,OAAI,UAAU,8CACb,oBAAC,UACC,UAAU,SACV,SAAUS,EACV,WAAY,CAACD,EAAQ2C,IAAU,CACzB3C,EAAO,aAAeA,EAAO,iBAAmB,OAClD6D,EAAgB,EACP7D,EAAO,OAASA,EAAO,iBAAmB,QACnD8D,EAAgB,CAEpB,EAKA,QAAS,CAAC,aAAY,SAAQ,aAAY,YAAU,EACpD,WAAY,CACV,YAAa,EACf,EACA,YAAa,CACX,EAAG,CACD,cAAe,EACf,SAAU,EACZ,CACF,EAEC,SAAAtE,GAAO,WAAW,IAAI,CAACoB,EAAMmD,OAE1B,OAAC,eAAY,UAAU,SACrB,oBAAC,SAAM,SAAQ,GAAC,UAAU,yBACxB,oBAAC,SAAM,KAAK,WAAW,KACvB,OAAC,UAAO,IAAKnD,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,YAAY,KACvD,OAAC,UAAO,IAAKA,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,aAAa,KACxD,OAAC,UAAO,IAAKA,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,YAAY,GACzD,GANmCpB,GAAO,GAAK,kBAAoBuE,CAOrE,CAEH,EACH,KACA,OAAC,OACC,aAAW,MACT,sIAEF,EACA,QAASF,EAET,mBAACtE,EAAA,CAAqB,UAAU,oCAAoC,EACtE,KACA,OAAC,OACC,aAAW,MACT,uIAEF,EACA,QAASuE,EAET,mBAACrE,EAAA,CAAsB,UAAU,oCAAoC,EACvE,GACF,CAEJ,EAEM0E,GAA2B3E,MACxB,OAAC,OAAI,mBAAO,EAGrB,IAAOlB,MAAQ,cAAWoB,EAAc",
6
6
  "names": ["ProductGallery_exports", "__export", "ProductGallery_default", "__toCommonJS", "import_jsx_runtime", "import_AiuiProvider", "import_components", "import_react", "import_modules", "import_helpers", "import_types", "import_react_tabs", "import_BizProductProvider", "import_use_variant_media", "import_SpecsModal", "import_CompareModal", "import_utils", "import_Styles", "import_track", "SwiperLeftButtonIcon", "props", "SwiperRightButtonIcon", "ProductGallery", "copyWriting", "product", "variant", "selectedOptions", "defaultMediaData", "swiper", "setSwiper", "productGalleryTabRef", "customMediaList", "productList", "sceneList", "keyFeaturesList", "videoList", "allMedia", "galleryMap", "galleryTabs", "productTab", "item", "variantProductGallery", "variantProductGalleryItem", "variantItem", "galleries", "imageGalleries", "imageItem", "imageSourceParts", "responsiveSource", "gallery", "activeGalleryTab", "setActiveGalleryTab", "activeTabIndex", "setActiveTabIndex", "targetSlideIndex", "setTargetSlideIndex", "handleNextTab", "nextIndex", "handlePrevTab", "prevIndex", "prevTabGalleries", "renderGalleryForTab", "tab", "index", "ProductGalleryTabImage", "ProductGalleryTabVideo", "ProductGalleryTab", "ref", "scrollContainerRef", "triggerRefs", "scrollToEvent", "event", "container", "button", "scrollLeft", "handleGalleryTabClick", "el", "scrollToTab", "tabItem", "CompareModal", "locale", "totalSavings", "paginationRef", "thumbsSwiper", "setThumbsSwiper", "commentRef", "shouldScroll", "setShouldScroll", "imageClassName", "handlePrevClick", "handleNextClick", "jIndex", "exposureKey", "handleExposure", "pictureSource", "ProductGalleryTab3DView"]
7
7
  }
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: import("react").ForwardRefExoticComponent<Omit<object, keyof import("../../../../../shared/Styles.js").StylesProps> & Partial<import("../../../../../shared/Styles.js").StylesProps & import("../../../../../shared/Styles.js").ContainerProps> & {
2
- className?: string;
3
- data?: Record<string, any>;
3
+ className?: string | undefined;
4
+ data?: Record<string, any> | undefined;
4
5
  } & import("react").RefAttributes<any>>;
5
6
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface ScrollSpyNavItem {
2
3
  label: string;
3
4
  href: string;
@@ -1,6 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import type { PurchaseBarProps } from './types.js';
2
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<PurchaseBarProps, 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
  } & import("react").RefAttributes<any>>;
6
7
  export default _default;
@@ -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 };
@@ -0,0 +1,42 @@
1
+ /// <reference types="react" />
2
+ import type { Media, Theme } from '../../types/props.js';
3
+ /**
4
+ * 评论项数据结构
5
+ */
6
+ export interface ReviewItem {
7
+ /** 评论者名称 */
8
+ name: string;
9
+ /** 评论者头像 URL */
10
+ avatar: Media;
11
+ /** 评论内容 */
12
+ comment: string;
13
+ /** 评分(1-5星) */
14
+ rating?: number;
15
+ }
16
+ /**
17
+ * 轮播评论数据结构
18
+ */
19
+ export interface MarqueeReviewData {
20
+ /** 主标题 */
21
+ title: string;
22
+ /** 副标题 */
23
+ subtitle: string;
24
+ /** 评论列表 */
25
+ items: ReviewItem[];
26
+ /** 主题:light 或 dark */
27
+ theme?: Theme;
28
+ }
29
+ /**
30
+ * MarqueeReview 组件 Props
31
+ */
32
+ export interface MarqueeReviewProps {
33
+ /** 评论数据 */
34
+ data: MarqueeReviewData;
35
+ /** 自定义类名 */
36
+ className?: string;
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> & {
39
+ className?: string | undefined;
40
+ data?: Record<string, any> | undefined;
41
+ } & import("react").RefAttributes<any>>;
42
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use strict";var n=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var k=(t,a)=>{for(var p in a)n(t,p,{get:a[p],enumerable:!0})},N=(t,a,p,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of u(a))!w.call(t,s)&&s!==p&&n(t,s,{get:()=>a[s],enumerable:!(i=g(a,s))||i.enumerable});return t};var b=t=>N(n({},"__esModule",{value:!0}),t);var R={};k(R,{default:()=>I});module.exports=b(R);var e=require("react/jsx-runtime"),l=require("../../components/index.js"),m=require("../../helpers/utils.js"),x=require("../../shared/Styles.js");const c=9,C=3,y=(t,a)=>Array.from({length:Math.ceil(t.length/a)},(p,i)=>t.slice(i*a,(i+1)*a)),L=()=>(0,e.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})}),M=({item:t})=>(0,e.jsxs)("div",{className:"rounded-box bg-container-primary text-info-primary min-l:p-[24px] laptop:h-[240px] desktop:h-[240px] lg-desktop:h-[240px] flex h-[240px] grow flex-col justify-between p-[16px]",children:[(0,e.jsxs)("div",{className:"flex justify-between",children:[(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsx)(l.Text,{size:4,html:t.name,className:"laptop:block hidden"}),(0,e.jsx)(l.Text,{size:2,html:t.name,className:"laptop:hidden block"}),(0,e.jsx)("div",{className:"mt-2 flex gap-1",children:new Array(t.rating||5).fill(0).map((a,p)=>(0,e.jsx)(L,{},p))})]}),(0,e.jsxs)(l.Avatar,{size:"small",className:" laptop:size-[48px] size-[40px]",children:[(0,e.jsx)(l.AvatarImage,{src:t.avatar?.url,alt:t.avatar?.alt||""}),(0,e.jsx)(l.AvatarFallback,{children:(t.name??"").slice(0,2).toUpperCase()})]})]}),(0,e.jsx)("div",{children:(0,e.jsx)(l.Heading,{as:"h6",size:2,html:`"${t.comment}`,className:"line-clamp-5 min-h-[120px] text-wrap"})})]});function T({data:t,className:a}){const{title:p,subtitle:i,items:s=[],theme:d="light"}=t,f=y(s.length<c?[...s,...s.slice(c-s.length)]:s,C).slice(0,3).map(o=>[...o,...o]);return(0,e.jsxs)("section",{className:(0,m.cn)("text-info-primary flex flex-col items-center justify-center py-3",a,{"aiui-dark":d==="dark"}),children:[(0,e.jsx)(l.Heading,{as:"h1",size:4,html:p,className:"laptop:text-center w-full text-left"}),(0,e.jsx)(l.Text,{size:2,html:i,className:"tablet:mt-[16px] tablet:text-[14px] laptop:text-center laptop:text-[14px] desktop:mt-[8px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] w-full text-left text-[14px]"}),(0,e.jsx)("div",{className:(0,m.cn)("mask-fade-vertical laptop:h-[384px] desktop:h-[512px] lg-desktop:h-[640px] mt-[24px] flex h-[480px] gap-4 overflow-hidden"),children:f.map((o,r)=>(0,e.jsx)("div",{className:(0,m.cn)("animate-marquee-scroll relative flex h-fit flex-1 flex-col gap-4",{"top-10":r===0||r===2,"hidden desktop:flex":r===1,"hidden tablet:flex":r===2}),children:o.map((h,v)=>(0,e.jsx)(M,{item:h},v))},r))})]})}var I=(0,x.withLayout)(T);
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/MarqueeReview/index.tsx"],
4
+ "sourcesContent": ["import { Text, Heading, Avatar, AvatarImage, AvatarFallback } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { Media, Theme } from '../../types/props.js'\n\nconst FIX_ITEMS_LENGTH = 9\nconst COUNT = 3\n\n/**\n * \u8BC4\u8BBA\u9879\u6570\u636E\u7ED3\u6784\n */\nexport interface ReviewItem {\n /** \u8BC4\u8BBA\u8005\u540D\u79F0 */\n name: string\n /** \u8BC4\u8BBA\u8005\u5934\u50CF URL */\n avatar: Media\n /** \u8BC4\u8BBA\u5185\u5BB9 */\n comment: string\n /** \u8BC4\u5206(1-5\u661F) */\n rating?: number\n}\n\n/**\n * \u8F6E\u64AD\u8BC4\u8BBA\u6570\u636E\u7ED3\u6784\n */\nexport interface MarqueeReviewData {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898 */\n subtitle: string\n /** \u8BC4\u8BBA\u5217\u8868 */\n items: ReviewItem[]\n /** \u4E3B\u9898\uFF1Alight \u6216 dark */\n theme?: Theme\n}\n\n/**\n * MarqueeReview \u7EC4\u4EF6 Props\n */\nexport interface MarqueeReviewProps {\n /** \u8BC4\u8BBA\u6570\u636E */\n data: MarqueeReviewData\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n\nconst _chunk = <T,>(array: T[], size: number): T[][] => {\n return Array.from({ length: Math.ceil(array.length / size) }, (_, index) =>\n array.slice(index * size, (index + 1) * size)\n )\n}\n\nconst StarIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z\"\n fill=\"#F77234\"\n />\n </svg>\n)\n\ninterface CardProps {\n item: ReviewItem\n}\n\nconst Card = ({ item }: CardProps) => {\n return (\n <div className=\"rounded-box bg-container-primary text-info-primary min-l:p-[24px] laptop:h-[240px] desktop:h-[240px] lg-desktop:h-[240px] flex h-[240px] grow flex-col justify-between p-[16px]\">\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col\">\n <Text size={4} html={item.name} className=\"laptop:block hidden\" />\n <Text size={2} html={item.name} className=\"laptop:hidden block\" />\n <div className=\"mt-2 flex gap-1\">\n {new Array(item.rating || 5).fill(0).map((_, index) => (\n <StarIcon key={index} />\n ))}\n </div>\n </div>\n <Avatar size=\"small\" className=\" laptop:size-[48px] size-[40px]\">\n <AvatarImage src={item.avatar?.url} alt={item.avatar?.alt || ''} />\n <AvatarFallback>{(item.name ?? '').slice(0, 2).toUpperCase()}</AvatarFallback>\n </Avatar>\n </div>\n <div>\n <Heading as=\"h6\" size={2} html={`\"${item.comment}`} className=\"line-clamp-5 min-h-[120px] text-wrap\" />\n </div>\n </div>\n )\n}\n\n/**\n * MarqueeReview - \u5782\u76F4\u6EDA\u52A8\u7684\u8BC4\u8BBA\u8F6E\u64AD\u7EC4\u4EF6\n *\n * \u7528\u4E8E\u5C55\u793A\u7528\u6237\u8BC4\u8BBA,\u652F\u6301\u591A\u5217\u5782\u76F4\u65E0\u9650\u6EDA\u52A8\u6548\u679C\u3002\n *\n * @example\n * ```tsx\n * <MarqueeReview\n * data={{\n * title: \"\u5BA2\u6237\u8BC4\u4EF7\",\n * subtitle: \"\u770B\u770B\u7528\u6237\u600E\u4E48\u8BF4\",\n * items: [\n * {\n * name: \"\u5F20\u4E09\",\n * avatar: \"/avatar1.jpg\",\n * comment: \"\u975E\u5E38\u597D\u7528\u7684\u4EA7\u54C1!\",\n * rating: 5\n * }\n * ]\n * }}\n * />\n * ```\n */\nfunction MarqueeReview({ data, className }: MarqueeReviewProps) {\n const { title, subtitle, items = [], theme = 'light' } = data\n\n const chunkItems = _chunk(\n items.length < FIX_ITEMS_LENGTH ? [...items, ...items.slice(FIX_ITEMS_LENGTH - items.length)] : items,\n COUNT\n )\n .slice(0, 3)\n .map(item => [...item, ...item])\n\n return (\n <section\n className={cn('text-info-primary flex flex-col items-center justify-center py-3', className, {\n 'aiui-dark': theme === 'dark',\n })}\n >\n <Heading as=\"h1\" size={4} html={title} className=\"laptop:text-center w-full text-left\" />\n <Text\n size={2}\n html={subtitle}\n className=\"tablet:mt-[16px] tablet:text-[14px] laptop:text-center laptop:text-[14px] desktop:mt-[8px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] w-full text-left text-[14px]\"\n />\n <div\n className={cn(\n 'mask-fade-vertical laptop:h-[384px] desktop:h-[512px] lg-desktop:h-[640px] mt-[24px] flex h-[480px] gap-4 overflow-hidden'\n )}\n >\n {chunkItems.map((items, index) => (\n <div\n key={index}\n className={cn('animate-marquee-scroll relative flex h-fit flex-1 flex-col gap-4', {\n 'top-10': index === 0 || index === 2,\n 'hidden desktop:flex': index === 1,\n 'hidden tablet:flex': index === 2,\n })}\n >\n {items.map((item, innerIndex) => (\n <Card key={innerIndex} item={item} />\n ))}\n </div>\n ))}\n </div>\n </section>\n )\n}\n\nexport default withLayout(MarqueeReview)\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsDI,IAAAI,EAAA,6BAtDJC,EAAmE,qCACnEC,EAAmB,kCACnBC,EAA2B,kCAG3B,MAAMC,EAAmB,EACnBC,EAAQ,EAwCRC,EAAS,CAAKC,EAAYC,IACvB,MAAM,KAAK,CAAE,OAAQ,KAAK,KAAKD,EAAM,OAASC,CAAI,CAAE,EAAG,CAACC,EAAGC,IAChEH,EAAM,MAAMG,EAAQF,GAAOE,EAAQ,GAAKF,CAAI,CAC9C,EAGIG,EAAW,OACf,OAAC,OAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,mBAAC,QACC,EAAE,6oBACF,KAAK,UACP,EACF,EAOIC,EAAO,CAAC,CAAE,KAAAC,CAAK,OAEjB,QAAC,OAAI,UAAU,kLACb,qBAAC,OAAI,UAAU,uBACb,qBAAC,OAAI,UAAU,gBACb,oBAAC,QAAK,KAAM,EAAG,KAAMA,EAAK,KAAM,UAAU,sBAAsB,KAChE,OAAC,QAAK,KAAM,EAAG,KAAMA,EAAK,KAAM,UAAU,sBAAsB,KAChE,OAAC,OAAI,UAAU,kBACZ,aAAI,MAAMA,EAAK,QAAU,CAAC,EAAE,KAAK,CAAC,EAAE,IAAI,CAACJ,EAAGC,OAC3C,OAACC,EAAA,GAAcD,CAAO,CACvB,EACH,GACF,KACA,QAAC,UAAO,KAAK,QAAQ,UAAU,mCAC7B,oBAAC,eAAY,IAAKG,EAAK,QAAQ,IAAK,IAAKA,EAAK,QAAQ,KAAO,GAAI,KACjE,OAAC,kBAAiB,UAAAA,EAAK,MAAQ,IAAI,MAAM,EAAG,CAAC,EAAE,YAAY,EAAE,GAC/D,GACF,KACA,OAAC,OACC,mBAAC,WAAQ,GAAG,KAAK,KAAM,EAAG,KAAM,IAAIA,EAAK,OAAO,GAAI,UAAU,uCAAuC,EACvG,GACF,EA2BJ,SAASC,EAAc,CAAE,KAAAC,EAAM,UAAAC,CAAU,EAAuB,CAC9D,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,MAAAC,EAAQ,CAAC,EAAG,MAAAC,EAAQ,OAAQ,EAAIL,EAEnDM,EAAaf,EACjBa,EAAM,OAASf,EAAmB,CAAC,GAAGe,EAAO,GAAGA,EAAM,MAAMf,EAAmBe,EAAM,MAAM,CAAC,EAAIA,EAChGd,CACF,EACG,MAAM,EAAG,CAAC,EACV,IAAIQ,GAAQ,CAAC,GAAGA,EAAM,GAAGA,CAAI,CAAC,EAEjC,SACE,QAAC,WACC,aAAW,MAAG,mEAAoEG,EAAW,CAC3F,YAAaI,IAAU,MACzB,CAAC,EAED,oBAAC,WAAQ,GAAG,KAAK,KAAM,EAAG,KAAMH,EAAO,UAAU,sCAAsC,KACvF,OAAC,QACC,KAAM,EACN,KAAMC,EACN,UAAU,8KACZ,KACA,OAAC,OACC,aAAW,MACT,2HACF,EAEC,SAAAG,EAAW,IAAI,CAACF,EAAOT,OACtB,OAAC,OAEC,aAAW,MAAG,mEAAoE,CAChF,SAAUA,IAAU,GAAKA,IAAU,EACnC,sBAAuBA,IAAU,EACjC,qBAAsBA,IAAU,CAClC,CAAC,EAEA,SAAAS,EAAM,IAAI,CAACN,EAAMS,OAChB,OAACV,EAAA,CAAsB,KAAMC,GAAlBS,CAAwB,CACpC,GATIZ,CAUP,CACD,EACH,GACF,CAEJ,CAEA,IAAOZ,KAAQ,cAAWgB,CAAa",
6
+ "names": ["MarqueeReview_exports", "__export", "MarqueeReview_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_utils", "import_Styles", "FIX_ITEMS_LENGTH", "COUNT", "_chunk", "array", "size", "_", "index", "StarIcon", "Card", "item", "MarqueeReview", "data", "className", "title", "subtitle", "items", "theme", "chunkItems", "innerIndex"]
7
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import type { MediaPlayerBaseProps } from './types.js';
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> & {
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
+ }, "ref"> & import("react").RefAttributes<any>>;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";var be=Object.create;var H=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var ke=(r,n)=>{for(var o in n)H(r,o,{get:n[o],enumerable:!0})},Q=(r,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of we(n))!Te.call(r,s)&&s!==o&&H(r,s,{get:()=>n[s],enumerable:!(a=he(n,s))||a.enumerable});return r};var W=(r,n,o)=>(o=r!=null?be(He(r)):{},Q(n||!r||!r.__esModule?H(o,"default",{value:r,enumerable:!0}):o,r)),Me=r=>Q(H({},"__esModule",{value:!0}),r);var Ee={};ke(Ee,{default:()=>ze});module.exports=Me(Ee);var t=require("react/jsx-runtime"),e=require("react"),Z=require("lodash"),f=require("../../helpers/utils.js"),A=require("../../shared/Styles.js"),ee=W(require("../../components/button.js")),te=require("../VideoModal/index.js"),E=require("@payloadcms/richtext-lexical/html"),re=require("react-intersection-observer"),oe=require("../../hooks/useExposure.js"),I=W(require("../../helpers/ScrollLoadVideo.js")),T=require("gsap"),ne=require("gsap/dist/SplitText"),_=require("gsap/dist/ScrollTrigger");const Le="media_player_base",Ne="video",X=({defaultConverters:r})=>({...r,text:n=>{const{node:o}=n;return o.$&&o.$.color?`<span class="lexical-${o.$.color}">${o.text}</span>`:o.text}}),Re=(0,e.forwardRef)(({className:r="",id:n,onBtnClick:o,data:{title:a,videoTitle:s,btnText:P,youtubeId:S,video:V,mobileVideo:se,theme:$,img:B,shape:C,titleAnimation:v,...le}},ie)=>{const{sticky:p}=le,[D,F]=(0,e.useState)(!1),[j,ae]=(0,e.useState)(0),[ce,de]=(0,e.useState)(0),[x,pe]=(0,e.useState)(0),[U,Y]=(0,e.useState)(!1),y=(0,e.useRef)(null),q=(0,e.useRef)(null),l=(0,e.useRef)(null),b=(0,e.useRef)(null),O=(0,e.useRef)(null),h=(0,e.useRef)(null),k=(0,e.useRef)(null),M=(0,e.useRef)(null),{ref:ue,inView:c}=(0,re.useInView)();(0,e.useImperativeHandle)(ie,()=>l.current);const w=typeof a=="string"?a:a&&(0,E.convertLexicalToHTML)({data:a,converters:X}),L=typeof s=="string"?s:s&&(0,E.convertLexicalToHTML)({data:s,converters:X});(0,e.useEffect)(()=>{c?(y.current?.play(),F(!0)):(y.current?.pause(),F(!1))},[c]);const N=(0,Z.debounce)(()=>{if(l.current){const u=l.current.getBoundingClientRect(),d=window.innerHeight,m=window.scrollY||window.pageYOffset,i=u.bottom+m,g=document.documentElement.scrollHeight-i;ae(g>d?d:g)}if(l.current){const u=l.current.clientHeight,d=window.innerHeight;de(u+d)}},600);(0,e.useEffect)(()=>(N(),window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[]),(0,e.useEffect)(()=>{function u(){if(!b.current||v!=="fade-in")return;const m=b.current?.clientHeight||80;h.current=new ne.SplitText(b.current,{type:"words",wordsClass:"word"});const i=h.current.words;T.gsap.set(i,{opacity:0}),k.current=_.ScrollTrigger.create({trigger:l.current,start:"top center-=10%",end:`top+=${m*1.5+80}px center-=10%`,scrub:!0,onUpdate:G=>{const g=G.progress,J=i.length,ge=1/J,K=.5;i.forEach((fe,ve)=>{const xe=ve/J*(1-K),ye=ge*(1+K);let z=(g-xe)/ye;z=Math.max(0,Math.min(z,1)),T.gsap.set(fe,{opacity:z})}),T.gsap.set(q.current,{opacity:g})}})}function d(){M.current=_.ScrollTrigger.create({trigger:l.current,start:"bottom bottom",end:"bottom top",scrub:!0,onUpdate:m=>{const i=m.progress;console.log("progress__",i),pe(i)}})}return c&&(u(),d()),()=>{h.current&&h.current.revert(),k.current&&k.current.kill(),M.current&&M.current.kill()}},[v,c]),(0,oe.useExposure)(O,{componentType:Ne,componentName:Le,componentTitle:L});const me=(0,e.useMemo)(()=>c&&x>0&&x<.9?3:c?2:1,[x,c]),R="lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]";return(0,t.jsxs)(t.Fragment,{children:[p&&(0,t.jsx)("div",{ref:l,className:(0,f.cn)("relative z-10",R,{"aiui-dark":$==="dark","rounded-box":C==="rounded"},r),children:(0,t.jsx)("div",{ref:ue,children:!v&&(0,t.jsxs)("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[w&&!D&&(0,t.jsx)("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:w}}),L&&D&&(0,t.jsx)("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:L}}),P&&(0,t.jsx)(ee.default,{variant:"link",className:(0,f.cn)("member-equity-button-secondary text-btn-primary-foreground"),onClick:()=>{Y(!0),o&&o?.()},children:P})]})})}),(0,t.jsxs)("div",{style:p?{marginBottom:`-${j}px`,marginTop:`-${ce}px`,zIndex:me}:{},className:"relative",children:[(0,t.jsx)("div",{className:"sticky top-0 ",children:(0,t.jsxs)("div",{id:n,className:(0,f.cn)("relative overflow-hidden",p?"h-screen w-full":R,{"aiui-dark":$==="dark","rounded-box":C==="rounded"}),children:[v==="fade-in"&&w&&(0,t.jsx)("div",{ref:b,className:"lg-desktop:text-[64px] text-btn-primary-foreground absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:w}}),(0,t.jsxs)("div",{className:"media-cover left-0 top-0 h-screen w-screen",style:{height:`${102-x*100}vh`},children:[(0,t.jsx)(I.default,{videoRef:y,poster:B?.url||"",src:V?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,t.jsx)(I.default,{videoRef:y,poster:B?.url||"",src:se?.url||V?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,t.jsx)("div",{ref:q,className:"absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"rgba(0, 0, 0, 0.2)"}})]})]})}),(0,t.jsx)("div",{className:(0,f.cn)(p&&"relative box-content block",R),style:p?{height:`${j}px`}:{},ref:O})]}),U&&S&&(0,t.jsx)(te.VideoModal,{visible:U,youTubeId:S,onCloseModal:()=>Y(!1)})]})});var ze=(0,A.withLayout)(Re);
2
+ //# sourceMappingURL=index.backup.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/MediaPlayerBase/index.backup.tsx"],
4
+ "sourcesContent": ["'use client'\nimport { useState, useRef, useMemo, useEffect, forwardRef, useImperativeHandle } from 'react'\nimport { debounce } from 'lodash'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Button from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { MediaPlayerBaseProps } from './types.js'\n// import { Right } from './right.js'\nimport { useInView } from 'react-intersection-observer'\nimport type { HTMLConvertersFunction } from '@payloadcms/richtext-lexical/html'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\n\nconst componentName = 'media_player_base'\nconst componentType = 'video'\n\nconst htmlConverters: HTMLConvertersFunction = ({ defaultConverters }) => ({\n ...defaultConverters,\n text: args => {\n const { node } = args\n // \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49 color\n if (node.$ && node.$.color) {\n return `<span class=\"lexical-${node.$.color}\">${node.text}</span>`\n }\n return node.text\n },\n})\n\nconst MediaPlayerBase = forwardRef<HTMLDivElement, MediaPlayerBaseProps>(\n (\n {\n className = '',\n id,\n onBtnClick,\n data: { title, videoTitle, btnText, youtubeId, video, mobileVideo, theme, img, shape, titleAnimation, ...rest },\n },\n ref\n ) => {\n const { sticky } = rest\n const [isPlaying, setIsPlaying] = useState(false)\n const [btb, setbtb] = useState(0)\n const [titleHeight, setTitleHeight] = useState(0)\n const [videoHeightProgress, setVideoHeightProgress] = useState(0)\n const [visible, setVisible] = useState<boolean>(false)\n\n const videoRef = useRef<HTMLVideoElement>(null)\n const bgRef = useRef<HTMLImageElement>(null)\n const titleRef = useRef<HTMLDivElement>(null)\n const titleFadeInRef = useRef<HTMLDivElement>(null)\n const trackRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const heightTriggerRef = useRef<ScrollTrigger | null>(null)\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => titleRef.current as HTMLDivElement)\n\n const title_html =\n typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title, converters: htmlConverters })\n const videoTitle_html =\n typeof videoTitle === 'string'\n ? videoTitle\n : videoTitle && convertLexicalToHTML({ data: videoTitle, converters: htmlConverters })\n\n useEffect(() => {\n if (inView) {\n videoRef.current?.play()\n setIsPlaying(true)\n } else {\n videoRef.current?.pause()\n setIsPlaying(false)\n }\n }, [inView])\n\n const debouncedHandleResize = debounce(() => {\n if (titleRef.current) {\n const rect = titleRef.current.getBoundingClientRect()\n const screenHeight = window.innerHeight\n const scrollTop = window.scrollY || window.pageYOffset\n const elementBottomToPageTop = rect.bottom + scrollTop\n const pageHeight = document.documentElement.scrollHeight\n const distanceToPageBottom = pageHeight - elementBottomToPageTop\n setbtb(distanceToPageBottom > screenHeight ? screenHeight : distanceToPageBottom)\n }\n if (titleRef.current) {\n const titleHeight = titleRef.current.clientHeight\n const screenHeight = window.innerHeight\n setTitleHeight(titleHeight + screenHeight)\n }\n }, 600)\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [])\n\n useEffect(() => {\n function gsapResize() {\n if (!titleFadeInRef.current || titleAnimation !== 'fade-in') return\n const height = titleFadeInRef.current?.clientHeight || 80\n splitTextInstance.current = new SplitText(titleFadeInRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'top center-=10%',\n end: `top+=${height * 1.5 + 80}px center-=10%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n gsap.set(bgRef.current, { opacity: progress })\n },\n })\n }\n\n function gsapVideoHeightResize() {\n heightTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom',\n end: `bottom top`,\n // markers: true,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n console.log('progress__', progress)\n setVideoHeightProgress(progress)\n },\n })\n }\n\n if (inView) {\n gsapResize()\n gsapVideoHeightResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n heightTriggerRef.current && heightTriggerRef.current.kill()\n }\n }, [titleAnimation, inView])\n\n useExposure(trackRef, {\n componentType,\n componentName,\n componentTitle: videoTitle_html,\n })\n\n const zIndexVideo = useMemo(() => {\n if (inView && videoHeightProgress > 0 && videoHeightProgress < 0.9) return 3\n if (inView) return 2\n return 1\n }, [videoHeightProgress, inView])\n\n const aspect =\n 'lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]'\n return (\n <>\n {sticky && (\n <div\n ref={titleRef}\n className={cn(\n 'relative z-10',\n aspect,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n },\n className\n )}\n >\n <div ref={inViewRef}>\n {!titleAnimation && (\n <div className=\"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center\">\n {title_html && !isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n {videoTitle_html && isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: videoTitle_html }}\n />\n )}\n {btnText && (\n <Button\n variant=\"link\"\n className={cn('member-equity-button-secondary text-btn-primary-foreground')}\n onClick={() => {\n setVisible(true)\n // if (isPlaying) {\n // if (videoRef.current) {\n // videoRef.current.pause()\n // }\n // setIsPlaying(false)\n // } else {\n // if (videoRef.current) {\n // videoRef.current.play()\n // }\n // setIsPlaying(true)\n // }\n onBtnClick && onBtnClick?.()\n }}\n >\n {btnText}\n {/* <Right /> */}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n <div\n style={\n sticky\n ? {\n marginBottom: `-${btb}px`,\n marginTop: `-${titleHeight}px`,\n zIndex: zIndexVideo,\n }\n : {}\n }\n className=\"relative\"\n >\n <div className=\"sticky top-0 \">\n <div\n id={id}\n className={cn('relative overflow-hidden', sticky ? 'h-screen w-full' : aspect, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n >\n {titleAnimation === 'fade-in' && title_html && (\n <div\n ref={titleFadeInRef}\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n <div\n className=\"media-cover left-0 top-0 h-screen w-screen\"\n style={{ height: `${102 - videoHeightProgress * 100}vh` }}\n >\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={video?.url!}\n className=\"tablet:block hidden size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={mobileVideo?.url || video?.url!}\n className=\"tablet:hidden block size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <div\n ref={bgRef}\n className=\"absolute left-0 top-0 z-10 size-full opacity-0\"\n style={{\n background: 'rgba(0, 0, 0, 0.2)',\n }}\n />\n </div>\n </div>\n </div>\n <div\n className={cn(sticky && 'relative box-content block', aspect)}\n style={sticky ? { height: `${btb}px` } : {}}\n ref={trackRef}\n />\n </div>\n {visible && youtubeId && (\n <VideoModal visible={visible} youTubeId={youtubeId} onCloseModal={() => setVisible(false)} />\n )}\n </>\n )\n }\n)\n\nexport default withLayout(MediaPlayerBase)\n"],
5
+ "mappings": "mlBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAmLM,IAAAI,EAAA,6BAlLNC,EAAsF,iBACtFC,EAAyB,kBACzBC,EAAmB,kCACnBC,EAA2B,kCAC3BC,GAAmB,yCACnBC,GAA2B,kCAC3BC,EAAqC,6CAGrCC,GAA0B,uCAE1BC,GAA4B,sCAC5BC,EAA4B,+CAC5BC,EAAqB,gBACrBC,GAA0B,+BAC1BC,EAA8B,mCAE9B,MAAMC,GAAgB,oBAChBC,GAAgB,QAEhBC,EAAyC,CAAC,CAAE,kBAAAC,CAAkB,KAAO,CACzE,GAAGA,EACH,KAAMC,GAAQ,CACZ,KAAM,CAAE,KAAAC,CAAK,EAAID,EAEjB,OAAIC,EAAK,GAAKA,EAAK,EAAE,MACZ,wBAAwBA,EAAK,EAAE,KAAK,KAAKA,EAAK,IAAI,UAEpDA,EAAK,IACd,CACF,GAEMC,MAAkB,cACtB,CACE,CACE,UAAAC,EAAY,GACZ,GAAAC,EACA,WAAAC,EACA,KAAM,CAAE,MAAAC,EAAO,WAAAC,EAAY,QAAAC,EAAS,UAAAC,EAAW,MAAAC,EAAO,YAAAC,GAAa,MAAAC,EAAO,IAAAC,EAAK,MAAAC,EAAO,eAAAC,EAAgB,GAAGC,EAAK,CAChH,EACAC,KACG,CACH,KAAM,CAAE,OAAAC,CAAO,EAAIF,GACb,CAACG,EAAWC,CAAY,KAAI,YAAS,EAAK,EAC1C,CAACC,EAAKC,EAAM,KAAI,YAAS,CAAC,EAC1B,CAACC,GAAaC,EAAc,KAAI,YAAS,CAAC,EAC1C,CAACC,EA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AyB,CAAE,OAAQO,CAAW,EAChD,KAEF,QAAC,OACC,UAAU,6CACV,MAAO,CAAE,OAAQ,GAAG,IAAMd,EAAsB,GAAG,IAAK,EAExD,oBAAC,EAAAuC,QAAA,CACC,SAAUnC,EACV,OAAQhB,GAAK,KAAO,GACpB,IAAKH,GAAO,IACZ,UAAU,gCACV,eAAe,eACf,MAAK,GACL,KAAI,GACJ,YAAW,GACX,SAAQ,GACR,qBAAkB,GAClB,iBAAc,GAChB,KACA,OAAC,EAAAsD,QAAA,CACC,SAAUnC,EACV,OAAQhB,GAAK,KAAO,GACpB,IAAKF,IAAa,KAAOD,GAAO,IAChC,UAAU,gCACV,eAAe,eACf,MAAK,GACL,KAAI,GACJ,YAAW,GACX,SAAQ,GACR,qBAAkB,GAClB,iBAAc,GAChB,KACA,OAAC,OACC,IAAKoB,EACL,UAAU,iDACV,MAAO,CACL,WAAY,oBACd,EACF,GACF,GACF,EACF,KACA,OAAC,OACC,aAAW,MAAGZ,GAAU,6BAA8B4C,CAAM,EAC5D,MAAO5C,EAAS,CAAE,OAAQ,GAAGG,CAAG,IAAK,EAAI,CAAC,EAC1C,IAAKY,EACP,GACF,EACCN,GAAWlB,MACV,OAAC,eAAW,QAASkB,EAAS,UAAWlB,EAAW,aAAc,IAAMmB,EAAW,EAAK,EAAG,GAE/F,CAEJ,CACF,EAEA,IAAOhD,MAAQ,cAAWsB,EAAe",
6
+ "names": ["index_backup_exports", "__export", "index_backup_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_lodash", "import_utils", "import_Styles", "import_button", "import_VideoModal", "import_html", "import_react_intersection_observer", "import_useExposure", "import_ScrollLoadVideo", "import_gsap", "import_SplitText", "import_ScrollTrigger", "componentName", "componentType", "htmlConverters", "defaultConverters", "args", "node", "MediaPlayerBase", "className", "id", "onBtnClick", "title", "videoTitle", "btnText", "youtubeId", "video", "mobileVideo", "theme", "img", "shape", "titleAnimation", "rest", "ref", "sticky", "isPlaying", "setIsPlaying", "btb", "setbtb", "titleHeight", "setTitleHeight", "videoHeightProgress", "setVideoHeightProgress", "visible", "setVisible", "videoRef", "bgRef", "titleRef", "titleFadeInRef", "trackRef", "splitTextInstance", "scrollTriggerRef", "heightTriggerRef", "inViewRef", "inView", "title_html", "videoTitle_html", "debouncedHandleResize", "rect", "screenHeight", "scrollTop", "elementBottomToPageTop", "distanceToPageBottom", "gsapResize", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "i", "start", "width", "opacity", "gsapVideoHeightResize", "zIndexVideo", "aspect", "Button", "ScrollLoadVideo"]
7
+ }
@@ -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,2 +1,2 @@
1
- "use strict";"use client";var be=Object.create;var H=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var ke=(r,n)=>{for(var o in n)H(r,o,{get:n[o],enumerable:!0})},Q=(r,n,o,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of we(n))!Te.call(r,s)&&s!==o&&H(r,s,{get:()=>n[s],enumerable:!(a=he(n,s))||a.enumerable});return r};var W=(r,n,o)=>(o=r!=null?be(He(r)):{},Q(n||!r||!r.__esModule?H(o,"default",{value:r,enumerable:!0}):o,r)),Me=r=>Q(H({},"__esModule",{value:!0}),r);var Ee={};ke(Ee,{default:()=>ze});module.exports=Me(Ee);var t=require("react/jsx-runtime"),e=require("react"),Z=require("lodash"),f=require("../../helpers/utils.js"),A=require("../../shared/Styles.js"),ee=W(require("../../components/button.js")),te=require("../VideoModal/index.js"),E=require("@payloadcms/richtext-lexical/html"),re=require("react-intersection-observer"),oe=require("../../hooks/useExposure.js"),I=W(require("../../helpers/ScrollLoadVideo.js")),T=require("gsap"),ne=require("gsap/dist/SplitText"),_=require("gsap/dist/ScrollTrigger");const Le="media_player_base",Ne="video",X=({defaultConverters:r})=>({...r,text:n=>{const{node:o}=n;return o.$&&o.$.color?`<span class="lexical-${o.$.color}">${o.text}</span>`:o.text}}),Re=(0,e.forwardRef)(({className:r="",id:n,onBtnClick:o,data:{title:a,videoTitle:s,btnText:P,youtubeId:S,video:V,mobileVideo:se,theme:$,img:B,shape:C,titleAnimation:v,...le}},ie)=>{const{sticky:p}=le,[D,F]=(0,e.useState)(!1),[j,ae]=(0,e.useState)(0),[ce,de]=(0,e.useState)(0),[x,pe]=(0,e.useState)(0),[U,Y]=(0,e.useState)(!1),y=(0,e.useRef)(null),q=(0,e.useRef)(null),l=(0,e.useRef)(null),b=(0,e.useRef)(null),O=(0,e.useRef)(null),h=(0,e.useRef)(null),k=(0,e.useRef)(null),M=(0,e.useRef)(null),{ref:ue,inView:c}=(0,re.useInView)();(0,e.useImperativeHandle)(ie,()=>l.current);const w=typeof a=="string"?a:a&&(0,E.convertLexicalToHTML)({data:a,converters:X}),L=typeof s=="string"?s:s&&(0,E.convertLexicalToHTML)({data:s,converters:X});(0,e.useEffect)(()=>{c?(y.current?.play(),F(!0)):(y.current?.pause(),F(!1))},[c]);const N=(0,Z.debounce)(()=>{if(l.current){const u=l.current.getBoundingClientRect(),d=window.innerHeight,m=window.scrollY||window.pageYOffset,i=u.bottom+m,g=document.documentElement.scrollHeight-i;ae(g>d?d:g)}if(l.current){const u=l.current.clientHeight,d=window.innerHeight;de(u+d)}},600);(0,e.useEffect)(()=>(N(),window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[]),(0,e.useEffect)(()=>{function u(){if(!b.current||v!=="fade-in")return;const m=b.current?.clientHeight||80;h.current=new ne.SplitText(b.current,{type:"words",wordsClass:"word"});const i=h.current.words;T.gsap.set(i,{opacity:0}),k.current=_.ScrollTrigger.create({trigger:l.current,start:"top center-=10%",end:`top+=${m*1.5+80}px center-=10%`,scrub:!0,onUpdate:G=>{const g=G.progress,J=i.length,ge=1/J,K=.5;i.forEach((fe,ve)=>{const xe=ve/J*(1-K),ye=ge*(1+K);let z=(g-xe)/ye;z=Math.max(0,Math.min(z,1)),T.gsap.set(fe,{opacity:z})}),T.gsap.set(q.current,{opacity:g})}})}function d(){M.current=_.ScrollTrigger.create({trigger:l.current,start:"bottom bottom",end:"bottom top",scrub:!0,onUpdate:m=>{const i=m.progress;console.log("progress__",i),pe(i)}})}return c&&(u(),d()),()=>{h.current&&h.current.revert(),k.current&&k.current.kill(),M.current&&M.current.kill()}},[v,c]),(0,oe.useExposure)(O,{componentType:Ne,componentName:Le,componentTitle:L});const me=(0,e.useMemo)(()=>c&&x>0&&x<.9?3:c?2:1,[x,c]),R="lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]";return(0,t.jsxs)(t.Fragment,{children:[p&&(0,t.jsx)("div",{ref:l,className:(0,f.cn)("relative z-10",R,{"aiui-dark":$==="dark","rounded-box":C==="rounded"},r),children:(0,t.jsx)("div",{ref:ue,children:!v&&(0,t.jsxs)("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[w&&!D&&(0,t.jsx)("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:w}}),L&&D&&(0,t.jsx)("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:L}}),P&&(0,t.jsx)(ee.default,{variant:"link",className:(0,f.cn)("member-equity-button-secondary text-btn-primary-foreground"),onClick:()=>{Y(!0),o&&o?.()},children:P})]})})}),(0,t.jsxs)("div",{style:p?{marginBottom:`-${j}px`,marginTop:`-${ce}px`,zIndex:me}:{},className:"relative",children:[(0,t.jsx)("div",{className:"sticky top-0 ",children:(0,t.jsxs)("div",{id:n,className:(0,f.cn)("relative overflow-hidden",p?"h-screen w-full":R,{"aiui-dark":$==="dark","rounded-box":C==="rounded"}),children:[v==="fade-in"&&w&&(0,t.jsx)("div",{ref:b,className:"lg-desktop:text-[64px] text-btn-primary-foreground absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:w}}),(0,t.jsxs)("div",{className:"media-cover left-0 top-0 h-screen w-screen",style:{height:`${102-x*100}vh`},children:[(0,t.jsx)(I.default,{videoRef:y,poster:B?.url||"",src:V?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,t.jsx)(I.default,{videoRef:y,poster:B?.url||"",src:se?.url||V?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,t.jsx)("div",{ref:q,className:"absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"rgba(0, 0, 0, 0.2)"}})]})]})}),(0,t.jsx)("div",{className:(0,f.cn)(p&&"relative box-content block",R),style:p?{height:`${j}px`}:{},ref:O})]}),U&&S&&(0,t.jsx)(te.VideoModal,{visible:U,youTubeId:S,onCloseModal:()=>Y(!1)})]})});var ze=(0,A.withLayout)(Re);
1
+ "use strict";"use client";var ye=Object.create;var F=Object.defineProperty;var Ee=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,_e=Object.prototype.hasOwnProperty;var Ie=(r,l)=>{for(var o in l)F(r,o,{get:l[o],enumerable:!0})},ne=(r,l,o,u)=>{if(l&&typeof l=="object"||typeof l=="function")for(let n of he(l))!_e.call(r,n)&&n!==o&&F(r,n,{get:()=>l[n],enumerable:!(u=Ee(l,n))||u.enumerable});return r};var se=(r,l,o)=>(o=r!=null?ye(He(r)):{},ne(l||!r||!r.__esModule?F(o,"default",{value:r,enumerable:!0}):o,r)),we=r=>ne(F({},"__esModule",{value:!0}),r);var Re={};Ie(Re,{default:()=>ke});module.exports=we(Re);var e=require("react/jsx-runtime"),t=require("react"),p=require("../../helpers/utils.js"),ce=require("../../shared/Styles.js"),Y=se(require("../../components/button.js")),J=require("../VideoModal/index.js"),K=require("@payloadcms/richtext-lexical/html"),de=require("react-intersection-observer"),ue=require("../../hooks/useExposure.js"),H=se(require("../../helpers/ScrollLoadVideo.js")),P=require("gsap"),pe=require("gsap/dist/SplitText"),Q=require("gsap/dist/ScrollTrigger");const Ne="media_player_base",Se="video",a={TEXT_START_OFFSET:"10%",TEXT_ANIMATION_MULTIPLIER:1.5,TEXT_ANIMATION_OFFSET:80,VIDEO_HEIGHT_BASE:102,OVERLAP_FACTOR:.5,VIDEO_PROGRESS_THRESHOLD:.9,HEIGHT_CHANGE_THRESHOLD:5},ae=({defaultConverters:r})=>({...r,text:l=>{const{node:o}=l;return o.$&&o.$.color?`<span class="lexical-${o.$.color}">${o.text}</span>`:o.text}}),ie=(0,t.forwardRef)(({className:r="",id:l,onBtnClick:o,data:{title:u,videoTitle:n,btnText:_,youtubeId:I,video:w,mobileVideo:W,theme:z,img:N,shape:D,titleAnimation:m,...me}},fe)=>{const{sticky:V}=me,[S,Z]=(0,t.useState)(!1),[ee,Te]=(0,t.useState)(0),[ge,ve]=(0,t.useState)(0),[k,xe]=(0,t.useState)(0),[R,B]=(0,t.useState)(!1),f=(0,t.useRef)(null),$=(0,t.useRef)(null),s=(0,t.useRef)(null),G=(0,t.useRef)(null),X=(0,t.useRef)(null),j=(0,t.useRef)(null),te=(0,t.useRef)(null),re=(0,t.useRef)(null),{ref:oe,inView:i}=(0,de.useInView)();(0,t.useImperativeHandle)(fe,()=>s.current);const T=typeof u=="string"?u:u&&(0,K.convertLexicalToHTML)({data:u,converters:ae}),y=typeof n=="string"?n:n&&(0,K.convertLexicalToHTML)({data:n,converters:ae});(0,t.useEffect)(()=>{i?(f.current?.play(),Z(!0)):(f.current?.pause(),Z(!1))},[i]),(0,t.useEffect)(()=>{if(!s.current||!V)return;const c=()=>{if(!s.current)return;const U=s.current.getBoundingClientRect(),v=window.innerHeight,x=window.scrollY||window.pageYOffset,E=U.bottom+x,A=document.documentElement.scrollHeight-E,C=A>v?v:A,b=s.current.clientHeight+v;Te(h=>Math.abs(C-h)>a.HEIGHT_CHANGE_THRESHOLD?C:h),ve(h=>Math.abs(b-h)>a.HEIGHT_CHANGE_THRESHOLD?b:h)};c();const M=new ResizeObserver(()=>{requestAnimationFrame(()=>{c()})});M.observe(s.current);const g=()=>{requestAnimationFrame(()=>{c()})};let d;const L=()=>{d||(d=setTimeout(()=>{g(),d=null},100))};return window.addEventListener("scroll",L,{passive:!0}),()=>{M.disconnect(),window.removeEventListener("scroll",L),d&&clearTimeout(d)}},[V]),(0,t.useEffect)(()=>{if(!i||!m||m!=="fade-in"||!G.current)return;const c=G.current,M=c.clientHeight||80;j.current=new pe.SplitText(c,{type:"words",wordsClass:"word"});const g=j.current.words,d=g.length,L=1/d,U=g.map((v,x)=>{const E=x/d*(1-a.OVERLAP_FACTOR),O=L*(1+a.OVERLAP_FACTOR);return{start:E,width:O}});return P.gsap.set(g,{opacity:0}),te.current=Q.ScrollTrigger.create({trigger:s.current,start:`top center-=${a.TEXT_START_OFFSET}`,end:`top+=${M*a.TEXT_ANIMATION_MULTIPLIER+a.TEXT_ANIMATION_OFFSET}px center-=${a.TEXT_START_OFFSET}`,scrub:!0,onUpdate:v=>{const x=v.progress;g.forEach((E,O)=>{const{start:A,width:C}=U[O];let b=(x-A)/C;b=Math.max(0,Math.min(b,1)),P.gsap.set(E,{opacity:b})}),$.current&&P.gsap.set($.current,{opacity:x})}}),()=>{j.current?.revert(),te.current?.kill()}},[m,i]),(0,t.useEffect)(()=>{if(!(!i||!s.current))return re.current=Q.ScrollTrigger.create({trigger:s.current,start:"bottom bottom",end:"bottom top",scrub:!0,onUpdate:c=>{xe(c.progress)}}),()=>{re.current?.kill()}},[i]),(0,ue.useExposure)(X,{componentType:Se,componentName:Ne,componentTitle:y});const be=(0,t.useMemo)(()=>i&&k>0&&k<a.VIDEO_PROGRESS_THRESHOLD?3:i?2:1,[k,i]),le=(0,t.useCallback)(()=>{B(!0),o?.()},[o]),q="lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]";return V?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{ref:s,className:(0,p.cn)("relative z-10",q,{"aiui-dark":z==="dark","rounded-box":D==="rounded"},r),children:(0,e.jsx)("div",{ref:oe,children:!m&&(0,e.jsxs)("div",{className:"media-content text-info-primary absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[T&&!S&&(0,e.jsx)("div",{className:"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:T}}),y&&S&&(0,e.jsx)("div",{className:"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:y}}),_&&(0,e.jsx)(Y.default,{variant:"link",className:(0,p.cn)("member-equity-button-secondary "),onClick:le,children:_})]})})}),(0,e.jsxs)("div",{style:{marginBottom:`-${ee}px`,marginTop:`-${ge}px`,zIndex:be},className:"relative",children:[(0,e.jsx)("div",{className:"sticky top-0",children:(0,e.jsxs)("div",{id:l,className:(0,p.cn)("relative h-screen w-full overflow-hidden",{"aiui-dark":z==="dark","rounded-box":D==="rounded"}),children:[m==="fade-in"&&T&&(0,e.jsx)("div",{ref:G,className:"lg-desktop:text-[64px] absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:T}}),(0,e.jsxs)("div",{className:"media-cover absolute left-0 top-0 size-full",style:{height:`${a.VIDEO_HEIGHT_BASE-k*100}vh`},children:[(0,e.jsx)(H.default,{videoRef:f,poster:N?.url||"",src:w?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,e.jsx)(H.default,{videoRef:f,poster:N?.url||"",src:W?.url||w?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,e.jsx)("div",{ref:$,className:"absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"rgba(0, 0, 0, 0.2)"}})]})]})}),(0,e.jsx)("div",{className:(0,p.cn)("relative box-content block",q),style:{height:`${ee}px`},ref:X})]}),R&&I&&(0,e.jsx)(J.VideoModal,{visible:R,youTubeId:I,onCloseModal:()=>B(!1)})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{id:l,className:(0,p.cn)("relative overflow-hidden",q,{"aiui-dark":z==="dark","rounded-box":D==="rounded"},r),children:[(0,e.jsxs)("div",{ref:oe,children:[!m&&(0,e.jsxs)("div",{className:"media-content text-info-primary absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[T&&!S&&(0,e.jsx)("div",{className:"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:T}}),y&&S&&(0,e.jsx)("div",{className:"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:y}}),_&&(0,e.jsx)(Y.default,{variant:"link",className:(0,p.cn)("member-equity-button-secondary"),onClick:le,children:_})]}),(0,e.jsx)(H.default,{videoRef:f,poster:N?.url||"",src:w?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,e.jsx)(H.default,{videoRef:f,poster:N?.url||"",src:W?.url||w?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0})]}),(0,e.jsx)("div",{ref:X,className:"absolute bottom-0 left-0 h-px w-full"})]}),R&&I&&(0,e.jsx)(J.VideoModal,{visible:R,youTubeId:I,onCloseModal:()=>B(!1)})]})});ie.displayName="MediaPlayerBase";var ke=(0,ce.withLayout)(ie);
2
2
  //# sourceMappingURL=index.js.map