@anker-in/headless-ui 1.3.13 → 1.3.14-alpha.1780978714203

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 (403) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
  2. package/dist/cjs/biz-components/AccordionCards/index.js.map +3 -3
  3. package/dist/cjs/biz-components/ActiveShelf/ProductCard.d.ts +1 -1
  4. package/dist/cjs/biz-components/ActiveShelf/ProductCard.js +1 -1
  5. package/dist/cjs/biz-components/ActiveShelf/ProductCard.js.map +2 -2
  6. package/dist/cjs/biz-components/ActivityMechanism/index.js +1 -1
  7. package/dist/cjs/biz-components/ActivityMechanism/index.js.map +3 -3
  8. package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
  9. package/dist/cjs/biz-components/ActivitySchedule/index.js.map +3 -3
  10. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  11. package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
  12. package/dist/cjs/biz-components/AnchorNavigation/index.js +1 -1
  13. package/dist/cjs/biz-components/AnchorNavigation/index.js.map +3 -3
  14. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  15. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  16. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  17. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  18. package/dist/cjs/biz-components/BuyOneGetOneShelf/PriceAndActions.d.ts +2 -14
  19. package/dist/cjs/biz-components/BuyOneGetOneShelf/PriceAndActions.js +1 -1
  20. package/dist/cjs/biz-components/BuyOneGetOneShelf/PriceAndActions.js.map +3 -3
  21. package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.d.ts +1 -1
  22. package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.js +1 -1
  23. package/dist/cjs/biz-components/BuyOneGetOneShelf/ProductCard.js.map +3 -3
  24. package/dist/cjs/biz-components/BuyOneGetOneShelf/context.d.ts +4 -0
  25. package/dist/cjs/biz-components/BuyOneGetOneShelf/context.js +2 -0
  26. package/dist/cjs/biz-components/BuyOneGetOneShelf/context.js.map +7 -0
  27. package/dist/cjs/biz-components/BuyOneGetOneShelf/types.d.ts +2 -2
  28. package/dist/cjs/biz-components/BuyOneGetOneShelf/types.js.map +1 -1
  29. package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
  30. package/dist/cjs/biz-components/Category/SwiperCategory.js.map +3 -3
  31. package/dist/cjs/biz-components/Category/index.js +1 -1
  32. package/dist/cjs/biz-components/Category/index.js.map +3 -3
  33. package/dist/cjs/biz-components/CreditsShelf/ProductCard.js +1 -1
  34. package/dist/cjs/biz-components/CreditsShelf/ProductCard.js.map +2 -2
  35. package/dist/cjs/biz-components/CreditsShelf/types.d.ts +1 -1
  36. package/dist/cjs/biz-components/CreditsShelf/types.js.map +1 -1
  37. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  38. package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
  39. package/dist/cjs/biz-components/EventSchedule/index.js +1 -1
  40. package/dist/cjs/biz-components/EventSchedule/index.js.map +3 -3
  41. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +1 -1
  42. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  43. package/dist/cjs/biz-components/FeaturedBlogPosts/index.js +1 -1
  44. package/dist/cjs/biz-components/FeaturedBlogPosts/index.js.map +2 -2
  45. package/dist/cjs/biz-components/FooterNavigation/index.js +1 -1
  46. package/dist/cjs/biz-components/FooterNavigation/index.js.map +3 -3
  47. package/dist/cjs/biz-components/GiftShelf/index.js +1 -1
  48. package/dist/cjs/biz-components/GiftShelf/index.js.map +2 -2
  49. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  50. package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
  51. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  52. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  53. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  54. package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +12 -0
  55. package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js +2 -0
  56. package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +7 -0
  57. package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +10 -0
  58. package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js +2 -0
  59. package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js.map +7 -0
  60. package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
  61. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
  62. package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +8 -1
  63. package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
  64. package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
  65. package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -0
  66. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
  67. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  68. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  69. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  70. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  71. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
  72. package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
  73. package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js.map +1 -1
  74. package/dist/cjs/biz-components/ImageOverlayShelf/index.d.ts +11 -3
  75. package/dist/cjs/biz-components/ImageOverlayShelf/index.js +1 -1
  76. package/dist/cjs/biz-components/ImageOverlayShelf/index.js.map +3 -3
  77. package/dist/cjs/biz-components/ImageOverlayShelf/types.d.ts +11 -0
  78. package/dist/cjs/biz-components/ImageOverlayShelf/types.js +1 -1
  79. package/dist/cjs/biz-components/ImageOverlayShelf/types.js.map +1 -1
  80. package/dist/cjs/biz-components/ImageTextOverlay/index.js +2 -2
  81. package/dist/cjs/biz-components/ImageTextOverlay/index.js.map +3 -3
  82. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  83. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  84. package/dist/cjs/biz-components/Ksp/index.js +1 -1
  85. package/dist/cjs/biz-components/Ksp/index.js.map +3 -3
  86. package/dist/cjs/biz-components/LotteryShared/ErrorModal.d.ts +4 -0
  87. package/dist/cjs/biz-components/LotteryShared/ErrorModal.js.map +2 -2
  88. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
  89. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js +1 -1
  90. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
  91. package/dist/cjs/biz-components/LotteryShared/types.d.ts +9 -0
  92. package/dist/cjs/biz-components/LotteryShared/types.js.map +2 -2
  93. package/dist/cjs/biz-components/Media/index.js +1 -1
  94. package/dist/cjs/biz-components/Media/index.js.map +3 -3
  95. package/dist/cjs/biz-components/MediaEndorsement/index.js +2 -2
  96. package/dist/cjs/biz-components/MediaEndorsement/index.js.map +3 -3
  97. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  98. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
  99. package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
  100. package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
  101. package/dist/cjs/biz-components/MediaPlayerSticky/index.js +1 -1
  102. package/dist/cjs/biz-components/MediaPlayerSticky/index.js.map +3 -3
  103. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  104. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +3 -3
  105. package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js +1 -1
  106. package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js.map +3 -3
  107. package/dist/cjs/biz-components/MediaShelf/ProductCard.js +1 -1
  108. package/dist/cjs/biz-components/MediaShelf/ProductCard.js.map +2 -2
  109. package/dist/cjs/biz-components/MediaShelf/types.d.ts +1 -1
  110. package/dist/cjs/biz-components/MediaShelf/types.js +1 -1
  111. package/dist/cjs/biz-components/MediaShelf/types.js.map +1 -1
  112. package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js +1 -1
  113. package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +3 -3
  114. package/dist/cjs/biz-components/MemberEquity/index.js +2 -2
  115. package/dist/cjs/biz-components/MemberEquity/index.js.map +3 -3
  116. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +4 -2
  117. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  118. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  119. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.d.ts +22 -0
  120. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js +2 -0
  121. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js.map +7 -0
  122. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.d.ts +18 -0
  123. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js +1 -1
  124. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/types.js.map +1 -1
  125. package/dist/cjs/biz-components/NavigationSearch/index.js +2 -2
  126. package/dist/cjs/biz-components/NavigationSearch/index.js.map +2 -2
  127. package/dist/cjs/biz-components/ProductCompare/index.js +1 -1
  128. package/dist/cjs/biz-components/ProductCompare/index.js.map +2 -2
  129. package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
  130. package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +3 -3
  131. package/dist/cjs/biz-components/ProductLottery/types.d.ts +62 -5
  132. package/dist/cjs/biz-components/ProductLottery/types.js +1 -1
  133. package/dist/cjs/biz-components/ProductLottery/types.js.map +2 -2
  134. package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
  135. package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +3 -3
  136. package/dist/cjs/biz-components/PromotionalBar/index.js +1 -1
  137. package/dist/cjs/biz-components/PromotionalBar/index.js.map +3 -3
  138. package/dist/cjs/biz-components/SceneShelfV3/ProductCard.d.ts +1 -1
  139. package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js +1 -1
  140. package/dist/cjs/biz-components/SceneShelfV3/ProductCard.js.map +2 -2
  141. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  142. package/dist/cjs/biz-components/SecondaryBanner/index.js.map +2 -2
  143. package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
  144. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
  145. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +11 -1
  146. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  147. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
  148. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  149. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  150. package/dist/cjs/biz-components/Specs/index.js +1 -1
  151. package/dist/cjs/biz-components/Specs/index.js.map +3 -3
  152. package/dist/cjs/biz-components/Subscribe/index.js +1 -1
  153. package/dist/cjs/biz-components/Subscribe/index.js.map +2 -2
  154. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  155. package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
  156. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  157. package/dist/cjs/biz-components/Tabs/Tabs.js.map +3 -3
  158. package/dist/cjs/biz-components/Tabs/types.d.ts +3 -0
  159. package/dist/cjs/biz-components/Tabs/types.js +1 -1
  160. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  161. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js +1 -1
  162. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +3 -3
  163. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  164. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  165. package/dist/cjs/biz-components/Title/index.js +1 -1
  166. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  167. package/dist/cjs/biz-components/VideoModal/index.d.ts +1 -0
  168. package/dist/cjs/biz-components/VideoModal/index.js +1 -1
  169. package/dist/cjs/biz-components/VideoModal/index.js.map +3 -3
  170. package/dist/cjs/biz-components/WheelLottery/index.js +1 -1
  171. package/dist/cjs/biz-components/WheelLottery/index.js.map +3 -3
  172. package/dist/cjs/components/Countdown.js +1 -1
  173. package/dist/cjs/components/Countdown.js.map +3 -3
  174. package/dist/cjs/components/alert.d.ts +1 -0
  175. package/dist/cjs/components/alert.js +1 -1
  176. package/dist/cjs/components/alert.js.map +2 -2
  177. package/dist/cjs/components/badge.js +1 -1
  178. package/dist/cjs/components/badge.js.map +2 -2
  179. package/dist/cjs/components/checkbox.js +1 -1
  180. package/dist/cjs/components/checkbox.js.map +2 -2
  181. package/dist/cjs/components/dialog.js +1 -1
  182. package/dist/cjs/components/dialog.js.map +3 -3
  183. package/dist/cjs/components/index.d.ts +1 -0
  184. package/dist/cjs/components/index.js +1 -1
  185. package/dist/cjs/components/index.js.map +3 -3
  186. package/dist/cjs/components/link.js +1 -1
  187. package/dist/cjs/components/link.js.map +2 -2
  188. package/dist/cjs/components/otp-input.d.ts +18 -0
  189. package/dist/cjs/components/otp-input.js +2 -0
  190. package/dist/cjs/components/otp-input.js.map +7 -0
  191. package/dist/cjs/components/tabs.js +1 -1
  192. package/dist/cjs/components/tabs.js.map +2 -2
  193. package/dist/cjs/helpers/index.d.ts +1 -1
  194. package/dist/cjs/helpers/index.js +1 -1
  195. package/dist/cjs/helpers/index.js.map +2 -2
  196. package/dist/cjs/helpers/isLexicalEmpty.d.ts +5 -0
  197. package/dist/cjs/helpers/isLexicalEmpty.js +1 -1
  198. package/dist/cjs/helpers/isLexicalEmpty.js.map +3 -3
  199. package/dist/cjs/hooks/useIsomorphicMediaQuery.d.ts +14 -0
  200. package/dist/cjs/hooks/useIsomorphicMediaQuery.js +2 -0
  201. package/dist/cjs/hooks/useIsomorphicMediaQuery.js.map +7 -0
  202. package/dist/cjs/hooks/useProductListTrack.d.ts +43 -0
  203. package/dist/cjs/hooks/useProductListTrack.js +2 -0
  204. package/dist/cjs/hooks/useProductListTrack.js.map +7 -0
  205. package/dist/esm/biz-components/AccordionCards/index.js +1 -1
  206. package/dist/esm/biz-components/AccordionCards/index.js.map +3 -3
  207. package/dist/esm/biz-components/ActiveShelf/ProductCard.d.ts +1 -1
  208. package/dist/esm/biz-components/ActiveShelf/ProductCard.js +1 -1
  209. package/dist/esm/biz-components/ActiveShelf/ProductCard.js.map +2 -2
  210. package/dist/esm/biz-components/ActivityMechanism/index.js +1 -1
  211. package/dist/esm/biz-components/ActivityMechanism/index.js.map +3 -3
  212. package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
  213. package/dist/esm/biz-components/ActivitySchedule/index.js.map +3 -3
  214. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  215. package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
  216. package/dist/esm/biz-components/AnchorNavigation/index.js +1 -1
  217. package/dist/esm/biz-components/AnchorNavigation/index.js.map +3 -3
  218. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  219. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  220. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  221. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  222. package/dist/esm/biz-components/BuyOneGetOneShelf/PriceAndActions.d.ts +2 -14
  223. package/dist/esm/biz-components/BuyOneGetOneShelf/PriceAndActions.js +1 -1
  224. package/dist/esm/biz-components/BuyOneGetOneShelf/PriceAndActions.js.map +3 -3
  225. package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.d.ts +1 -1
  226. package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.js +1 -1
  227. package/dist/esm/biz-components/BuyOneGetOneShelf/ProductCard.js.map +3 -3
  228. package/dist/esm/biz-components/BuyOneGetOneShelf/context.d.ts +4 -0
  229. package/dist/esm/biz-components/BuyOneGetOneShelf/context.js +2 -0
  230. package/dist/esm/biz-components/BuyOneGetOneShelf/context.js.map +7 -0
  231. package/dist/esm/biz-components/BuyOneGetOneShelf/types.d.ts +2 -2
  232. package/dist/esm/biz-components/BuyOneGetOneShelf/types.js.map +1 -1
  233. package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
  234. package/dist/esm/biz-components/Category/SwiperCategory.js.map +3 -3
  235. package/dist/esm/biz-components/Category/index.js +1 -1
  236. package/dist/esm/biz-components/Category/index.js.map +3 -3
  237. package/dist/esm/biz-components/CreditsShelf/ProductCard.js +1 -1
  238. package/dist/esm/biz-components/CreditsShelf/ProductCard.js.map +2 -2
  239. package/dist/esm/biz-components/CreditsShelf/types.d.ts +1 -1
  240. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  241. package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
  242. package/dist/esm/biz-components/EventSchedule/index.js +1 -1
  243. package/dist/esm/biz-components/EventSchedule/index.js.map +3 -3
  244. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +1 -1
  245. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  246. package/dist/esm/biz-components/FeaturedBlogPosts/index.js +1 -1
  247. package/dist/esm/biz-components/FeaturedBlogPosts/index.js.map +2 -2
  248. package/dist/esm/biz-components/FooterNavigation/index.js +1 -1
  249. package/dist/esm/biz-components/FooterNavigation/index.js.map +3 -3
  250. package/dist/esm/biz-components/GiftShelf/index.js +1 -1
  251. package/dist/esm/biz-components/GiftShelf/index.js.map +2 -2
  252. package/dist/esm/biz-components/Graphic/index.js +1 -1
  253. package/dist/esm/biz-components/Graphic/index.js.map +3 -3
  254. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  255. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  256. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  257. package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +12 -0
  258. package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js +2 -0
  259. package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +7 -0
  260. package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +10 -0
  261. package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js +2 -0
  262. package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js.map +7 -0
  263. package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
  264. package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
  265. package/dist/esm/biz-components/HeaderNavigation/types.d.ts +8 -1
  266. package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
  267. package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
  268. package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -0
  269. package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
  270. package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  271. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  272. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  273. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  274. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
  275. package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
  276. package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js.map +1 -1
  277. package/dist/esm/biz-components/ImageOverlayShelf/index.d.ts +11 -3
  278. package/dist/esm/biz-components/ImageOverlayShelf/index.js +1 -1
  279. package/dist/esm/biz-components/ImageOverlayShelf/index.js.map +3 -3
  280. package/dist/esm/biz-components/ImageOverlayShelf/types.d.ts +11 -0
  281. package/dist/esm/biz-components/ImageTextOverlay/index.js +2 -2
  282. package/dist/esm/biz-components/ImageTextOverlay/index.js.map +3 -3
  283. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  284. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  285. package/dist/esm/biz-components/Ksp/index.js +1 -1
  286. package/dist/esm/biz-components/Ksp/index.js.map +3 -3
  287. package/dist/esm/biz-components/LotteryShared/ErrorModal.d.ts +4 -0
  288. package/dist/esm/biz-components/LotteryShared/ErrorModal.js.map +2 -2
  289. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
  290. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js +1 -1
  291. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
  292. package/dist/esm/biz-components/LotteryShared/types.d.ts +9 -0
  293. package/dist/esm/biz-components/LotteryShared/types.js.map +2 -2
  294. package/dist/esm/biz-components/Media/index.js +1 -1
  295. package/dist/esm/biz-components/Media/index.js.map +3 -3
  296. package/dist/esm/biz-components/MediaEndorsement/index.js +2 -2
  297. package/dist/esm/biz-components/MediaEndorsement/index.js.map +3 -3
  298. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  299. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
  300. package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
  301. package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
  302. package/dist/esm/biz-components/MediaPlayerSticky/index.js +1 -1
  303. package/dist/esm/biz-components/MediaPlayerSticky/index.js.map +3 -3
  304. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  305. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +3 -3
  306. package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js +1 -1
  307. package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js.map +3 -3
  308. package/dist/esm/biz-components/MediaShelf/ProductCard.js +1 -1
  309. package/dist/esm/biz-components/MediaShelf/ProductCard.js.map +2 -2
  310. package/dist/esm/biz-components/MediaShelf/types.d.ts +1 -1
  311. package/dist/esm/biz-components/MediaShelf/types.js.map +1 -1
  312. package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js +1 -1
  313. package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +3 -3
  314. package/dist/esm/biz-components/MemberEquity/index.js +2 -2
  315. package/dist/esm/biz-components/MemberEquity/index.js.map +3 -3
  316. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +4 -2
  317. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  318. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  319. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.d.ts +22 -0
  320. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js +2 -0
  321. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlockCarousel.js.map +7 -0
  322. package/dist/esm/biz-components/MultiLayoutGraphicBlock/types.d.ts +18 -0
  323. package/dist/esm/biz-components/NavigationSearch/index.js +2 -2
  324. package/dist/esm/biz-components/NavigationSearch/index.js.map +3 -3
  325. package/dist/esm/biz-components/ProductCompare/index.js +1 -1
  326. package/dist/esm/biz-components/ProductCompare/index.js.map +2 -2
  327. package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
  328. package/dist/esm/biz-components/ProductHero/ProductHero.js.map +3 -3
  329. package/dist/esm/biz-components/ProductLottery/types.d.ts +62 -5
  330. package/dist/esm/biz-components/ProductLottery/types.js.map +2 -2
  331. package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
  332. package/dist/esm/biz-components/ProductNav/ProductNav.js.map +3 -3
  333. package/dist/esm/biz-components/PromotionalBar/index.js +1 -1
  334. package/dist/esm/biz-components/PromotionalBar/index.js.map +3 -3
  335. package/dist/esm/biz-components/SceneShelfV3/ProductCard.d.ts +1 -1
  336. package/dist/esm/biz-components/SceneShelfV3/ProductCard.js +1 -1
  337. package/dist/esm/biz-components/SceneShelfV3/ProductCard.js.map +2 -2
  338. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  339. package/dist/esm/biz-components/SecondaryBanner/index.js.map +2 -2
  340. package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
  341. package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
  342. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +11 -1
  343. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  344. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +3 -3
  345. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  346. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  347. package/dist/esm/biz-components/Specs/index.js +1 -1
  348. package/dist/esm/biz-components/Specs/index.js.map +3 -3
  349. package/dist/esm/biz-components/Subscribe/index.js +1 -1
  350. package/dist/esm/biz-components/Subscribe/index.js.map +2 -2
  351. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  352. package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
  353. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  354. package/dist/esm/biz-components/Tabs/Tabs.js.map +3 -3
  355. package/dist/esm/biz-components/Tabs/types.d.ts +3 -0
  356. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js +1 -1
  357. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +3 -3
  358. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  359. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  360. package/dist/esm/biz-components/Title/index.js +1 -1
  361. package/dist/esm/biz-components/Title/index.js.map +3 -3
  362. package/dist/esm/biz-components/VideoModal/index.d.ts +1 -0
  363. package/dist/esm/biz-components/VideoModal/index.js +1 -1
  364. package/dist/esm/biz-components/VideoModal/index.js.map +3 -3
  365. package/dist/esm/biz-components/WheelLottery/index.js +1 -1
  366. package/dist/esm/biz-components/WheelLottery/index.js.map +2 -2
  367. package/dist/esm/components/Countdown.js +1 -1
  368. package/dist/esm/components/Countdown.js.map +3 -3
  369. package/dist/esm/components/alert.d.ts +1 -0
  370. package/dist/esm/components/alert.js +1 -1
  371. package/dist/esm/components/alert.js.map +2 -2
  372. package/dist/esm/components/badge.js +1 -1
  373. package/dist/esm/components/badge.js.map +2 -2
  374. package/dist/esm/components/checkbox.js +1 -1
  375. package/dist/esm/components/checkbox.js.map +2 -2
  376. package/dist/esm/components/dialog.js +1 -1
  377. package/dist/esm/components/dialog.js.map +3 -3
  378. package/dist/esm/components/index.d.ts +1 -0
  379. package/dist/esm/components/index.js +1 -1
  380. package/dist/esm/components/index.js.map +2 -2
  381. package/dist/esm/components/link.js +1 -1
  382. package/dist/esm/components/link.js.map +2 -2
  383. package/dist/esm/components/otp-input.d.ts +18 -0
  384. package/dist/esm/components/otp-input.js +2 -0
  385. package/dist/esm/components/otp-input.js.map +7 -0
  386. package/dist/esm/components/tabs.js +1 -1
  387. package/dist/esm/components/tabs.js.map +2 -2
  388. package/dist/esm/helpers/index.d.ts +1 -1
  389. package/dist/esm/helpers/index.js +1 -1
  390. package/dist/esm/helpers/index.js.map +3 -3
  391. package/dist/esm/helpers/isLexicalEmpty.d.ts +5 -0
  392. package/dist/esm/helpers/isLexicalEmpty.js +1 -1
  393. package/dist/esm/helpers/isLexicalEmpty.js.map +3 -3
  394. package/dist/esm/hooks/useIsomorphicMediaQuery.d.ts +14 -0
  395. package/dist/esm/hooks/useIsomorphicMediaQuery.js +2 -0
  396. package/dist/esm/hooks/useIsomorphicMediaQuery.js.map +7 -0
  397. package/dist/esm/hooks/useProductListTrack.d.ts +43 -0
  398. package/dist/esm/hooks/useProductListTrack.js +2 -0
  399. package/dist/esm/hooks/useProductListTrack.js.map +7 -0
  400. package/dist/tokens/eufyMake.css +3 -2
  401. package/package.json +1 -1
  402. package/style.css +101 -13
  403. package/tailwind.config.js +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/ImageWithText/ImageWithText.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport { Heading, Picture, Text, Link } from '../../components/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useIntersectionObserverDelay } from '../../hooks/useIntersectionObserver.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { motion, AnimatePresence } from 'framer-motion'\nimport type { ImageWithTextProps, ImageWithTextItem, ImageWithTextTabItem } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'image_with_text'\n\nconst ArrowRight = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M6.91009 4.41058C7.23553 4.08514 7.76304 4.08514 8.08848 4.41058L13.0885 9.41058C13.4139 9.73602 13.4139 10.2635 13.0885 10.589L8.08848 15.589C7.76304 15.9144 7.23553 15.9144 6.91009 15.589C6.58466 15.2635 6.58466 14.736 6.91009 14.4106L11.3209 9.99977L6.91009 5.58897C6.58466 5.26353 6.58466 4.73602 6.91009 4.41058Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n\nconst ImageWithText = React.forwardRef<HTMLDivElement, ImageWithTextProps>(({ data, className }, ref) => {\n const {\n title,\n subtitle,\n desc,\n descIcon,\n image,\n padImage,\n mobileImage,\n theme = 'dark',\n items = [],\n layout = 'left',\n mediaType = 'image',\n datalist = [],\n video,\n padVideo,\n mobVideo,\n button,\n textAlign = 'left',\n } = data\n\n const effectiveLayout = layout\n\n const { locale = 'us' } = useAiuiContext()\n const boxRef = useRef<HTMLDivElement>(null)\n const desktopVideoRef = useRef<HTMLDivElement>(null)\n const tabletVideoRef = useRef<HTMLDivElement>(null)\n const mobileVideoRef = useRef<HTMLDivElement>(null)\n const mediaWrapperRef = useRef<HTMLDivElement>(null)\n\n // Tab\u72B6\u6001\u7BA1\u7406\n const [activeIndex, setActiveIndex] = useState(0)\n const tabRefs = useRef<Array<HTMLDivElement | null>>([])\n const [sliderStyle, setSliderStyle] = useState({ left: 0, width: 0 })\n\n // \u89C6\u9891\u61D2\u52A0\u8F7D\u72B6\u6001\n const [loadedDesktopVideoSrc, setLoadedDesktopVideoSrc] = useState('')\n const [loadedTabletVideoSrc, setLoadedTabletVideoSrc] = useState('')\n const [loadedMobileVideoSrc, setLoadedMobileVideoSrc] = useState('')\n\n // \u5224\u65AD\u662F\u5426\u4E3ATabWithImage\u6A21\u5F0F\uFF08\u4F18\u5148\u7EA7\u6700\u9AD8\uFF09\n const isTabMode = datalist.length > 0\n\n // \u5224\u65AD\u5F53\u524D\u662F\u5426\u4E3A\u89C6\u9891\u6A21\u5F0F\n const isVideo = mediaType === 'video'\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n // Tab\u6ED1\u5757\u4F4D\u7F6E\u8BA1\u7B97\n useEffect(() => {\n if (datalist.length > 0) {\n const current = tabRefs.current[activeIndex]\n if (current) {\n const { offsetLeft, offsetWidth } = current\n setSliderStyle({ left: offsetLeft, width: offsetWidth })\n }\n }\n }, [activeIndex, datalist.length])\n\n // \u89C6\u9891\u61D2\u52A0\u8F7D\u903B\u8F91\uFF08\u4F7F\u7528 useEffect \u907F\u514D\u95ED\u5305\u95EE\u9898\uFF09\n const [videoIntersected, setVideoIntersected] = useState(false)\n\n // \u4F7F\u7528 IntersectionObserver \u68C0\u6D4B\u5A92\u4F53\u533A\u57DF\u662F\u5426\u53EF\u89C1\uFF08\u76D1\u542C\u7236\u5BB9\u5668\u907F\u514D\u54CD\u5E94\u5F0F\u9690\u85CF\u95EE\u9898\uFF09\n useIntersectionObserverDelay(mediaWrapperRef, {\n once: true,\n threshold: 0.01,\n callback: () => {\n setVideoIntersected(true)\n },\n })\n\n // \u5F53\u89C6\u9891\u533A\u57DF\u53EF\u89C1\u65F6\uFF0C\u52A0\u8F7D\u5BF9\u5E94\u7684\u89C6\u9891\u6E90\n useEffect(() => {\n if (!videoIntersected || !isVideo) return\n\n // \u786E\u5B9A\u89C6\u9891\u6E90\n let desktopSrc = ''\n let tabletSrc = ''\n let mobileSrc = ''\n\n if (isTabMode && datalist[activeIndex]) {\n const activeTab = datalist[activeIndex]\n desktopSrc = activeTab.video?.url || ''\n tabletSrc = activeTab.padVideo?.url || desktopSrc\n mobileSrc = activeTab.mobVideo?.url || desktopSrc\n } else {\n desktopSrc = video?.url || ''\n tabletSrc = padVideo?.url || desktopSrc\n mobileSrc = mobVideo?.url || desktopSrc\n }\n\n // \u8BBE\u7F6E\u89C6\u9891\u6E90\n if (desktopSrc) setLoadedDesktopVideoSrc(desktopSrc)\n if (tabletSrc) setLoadedTabletVideoSrc(tabletSrc)\n if (mobileSrc) setLoadedMobileVideoSrc(mobileSrc)\n\n // \u5EF6\u8FDF\u89E6\u53D1\u64AD\u653E\n setTimeout(() => {\n const videos = [\n desktopVideoRef.current?.querySelector('video'),\n tabletVideoRef.current?.querySelector('video'),\n mobileVideoRef.current?.querySelector('video'),\n ]\n\n videos.forEach(videoElement => {\n if (videoElement) {\n videoElement.load()\n videoElement.play().catch(() => {\n // \u9759\u9ED8\u5904\u7406\u81EA\u52A8\u64AD\u653E\u5931\u8D25\u7684\u60C5\u51B5\n })\n }\n })\n }, 200)\n }, [videoIntersected, isVideo, isTabMode, activeIndex, datalist, video?.url, padVideo?.url, mobVideo?.url])\n\n const handleTabClick = (index: number, e: React.MouseEvent<HTMLDivElement>) => {\n setActiveIndex(index)\n ;(e.target as HTMLElement).scrollIntoView({\n behavior: 'smooth',\n inline: 'center',\n block: 'nearest',\n })\n\n // \u5982\u679C\u662F\u89C6\u9891\u6A21\u5F0F\u5E76\u4E14\u5207\u6362\u4E86Tab\uFF0C\u9700\u8981\u91CD\u65B0\u52A0\u8F7D\u548C\u64AD\u653E\u89C6\u9891\n if (isVideo && isTabMode && datalist[index]) {\n const activeTab = datalist[index]\n\n // \u66F4\u65B0\u89C6\u9891\u6E90\n if (activeTab.video?.url) {\n setLoadedDesktopVideoSrc(activeTab.video.url)\n }\n if (activeTab.padVideo?.url) {\n setLoadedTabletVideoSrc(activeTab.padVideo.url)\n }\n if (activeTab.mobVideo?.url) {\n setLoadedMobileVideoSrc(activeTab.mobVideo.url)\n }\n\n // \u5EF6\u8FDF\u89E6\u53D1\u64AD\u653E\uFF0C\u786E\u4FDDDOM\u66F4\u65B0\u5B8C\u6210\n setTimeout(() => {\n const videos = [\n desktopVideoRef.current?.querySelector('video'),\n tabletVideoRef.current?.querySelector('video'),\n mobileVideoRef.current?.querySelector('video'),\n ]\n\n videos.forEach(video => {\n if (video) {\n video.load()\n video.play().catch(() => {\n // \u9759\u9ED8\u5904\u7406\u81EA\u52A8\u64AD\u653E\u5931\u8D25\u7684\u60C5\u51B5\n })\n }\n })\n }, 300) // \u7A0D\u5FAE\u5EF6\u957F\u65F6\u95F4\u4EE5\u786E\u4FDDframer-motion\u52A8\u753B\u5B8C\u6210\n }\n }\n\n // \u6E32\u67D3\u6309\u94AE\n const renderButton = () => {\n if (!hasButton || !button?.text) return null\n if (effectiveLayout === 'top' || effectiveLayout === 'bottom') return null\n\n return (\n <div\n className={cn('image-with-text__button-wrapper laptop:mt-[32px] mt-[24px]', {\n 'flex justify-center': textAlign === 'center',\n 'flex justify-start': textAlign === 'left',\n })}\n >\n <Link\n href={getLocalizedPath(button.link || '', locale)}\n className=\"image-with-text__button whitespace-nowrap no-underline\"\n suffixIcon={ArrowRight}\n >\n {button.text}\n </Link>\n </div>\n )\n }\n\n // \u5224\u65AD\u662F\u5426\u6709\u529F\u80FD\u5217\u8868\n const hasItems = items.length > 0\n\n // \u5224\u65AD\u662F\u5426\u6709\u6309\u94AE\uFF08\u5F71\u54CD\u6587\u672C\u533A\u57DF\u7684\u5BF9\u9F50\u65B9\u5F0F\uFF09\n const hasButton = Boolean(button)\n\n // \u83B7\u53D6\u56FE\u7247\u6E90\n const getImageSource = () => {\n if (isTabMode && datalist[activeIndex]) {\n const activeTab = datalist[activeIndex]\n return `${activeTab.image?.url} ,${activeTab.imgPad?.url || activeTab.image?.url} 1440, ${activeTab.imageMob?.url || activeTab.image?.url} 767`\n }\n if (image) {\n return `${image?.url},${padImage?.url || image?.url} 1024, ${mobileImage?.url || image?.url} 768`\n }\n return ''\n }\n\n // \u6E32\u67D3\u89C6\u9891\u5185\u5BB9\uFF08\u652F\u6301\u4E09\u7AEF\uFF09\n const renderVideo = () => {\n if (isTabMode) {\n const activeTab = datalist[activeIndex]\n // Tab\u6A21\u5F0F\u4E0B\u7684\u89C6\u9891\uFF0C\u4F7F\u7528 image/imgPad/imageMob \u4F5C\u4E3A\u5C01\u9762\n const desktopPoster = activeTab.image?.url\n const tabletPoster = activeTab.imgPad?.url || desktopPoster\n const mobilePoster = activeTab.imageMob?.url || desktopPoster\n\n return (\n <AnimatePresence mode=\"wait\">\n <motion.div\n key={activeTab.video?.url || activeTab.image?.url}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n className=\"image-with-text__video-motion absolute left-0 top-0 w-full\"\n >\n <div className=\"image-with-text__video-wrapper rounded-box overflow-hidden\">\n {/* \u684C\u9762\u7AEF\u89C6\u9891 */}\n <div ref={desktopVideoRef} className=\"image-with-text__desktop-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={desktopPoster}\n src={loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover\"\n ></video>\n </div>\n {/* \u5E73\u677F\u7AEF\u89C6\u9891 */}\n <div ref={tabletVideoRef} className=\"image-with-text__tablet-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={tabletPoster}\n src={loadedTabletVideoSrc || loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden\"\n ></video>\n </div>\n {/* \u79FB\u52A8\u7AEF\u89C6\u9891 */}\n <div ref={mobileVideoRef} className=\"image-with-text__mobile-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={mobilePoster}\n src={loadedMobileVideoSrc || loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--mobile tablet:hidden block\"\n ></video>\n </div>\n </div>\n </motion.div>\n </AnimatePresence>\n )\n }\n\n // \u57FA\u7840\u6A21\u5F0F\u4E0B\u7684\u89C6\u9891\uFF08\u652F\u6301\u4E09\u7AEF\uFF09\uFF0C\u4F7F\u7528 image/padImage/mobileImage \u4F5C\u4E3A\u5C01\u9762\n const desktopPoster = image?.url\n const tabletPoster = padImage?.url || desktopPoster\n const mobilePoster = mobileImage?.url || desktopPoster\n\n return (\n <div className=\"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden\">\n {/* \u684C\u9762\u7AEF\u89C6\u9891 */}\n <div ref={desktopVideoRef} className=\"image-with-text__desktop-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={desktopPoster}\n src={loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover\"\n ></video>\n </div>\n {/* \u5E73\u677F\u7AEF\u89C6\u9891 */}\n <div ref={tabletVideoRef} className=\"image-with-text__tablet-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={tabletPoster}\n src={loadedTabletVideoSrc || loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden\"\n ></video>\n </div>\n {/* \u79FB\u52A8\u7AEF\u89C6\u9891 */}\n <div ref={mobileVideoRef} className=\"image-with-text__mobile-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={mobilePoster}\n src={loadedMobileVideoSrc || loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--mobile tablet:hidden block\"\n ></video>\n </div>\n </div>\n )\n }\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ImageWithText\"\n className={cn(\n 'image-with-text text-info-primary',\n {\n // \u57FA\u7840\u6A21\u5F0F\u6837\u5F0F - \u652F\u6301\u4E0A\u4E0B\u5DE6\u53F3\u5E03\u5C40\n 'flex gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]': !isTabMode,\n 'flex-col': !isTabMode && (effectiveLayout === 'top' || effectiveLayout === 'bottom'),\n 'items-center': effectiveLayout === 'left' || effectiveLayout === 'right',\n 'flex-col laptop:flex-row': !isTabMode && (effectiveLayout === 'left' || effectiveLayout === 'right'),\n // TabWithImage\u6A21\u5F0F\u6837\u5F0F\n 'flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]': isTabMode,\n // \u4E3B\u9898\u6837\u5F0F\n 'aiui-dark': theme === 'dark',\n },\n className\n )}\n >\n {/* TabWithImage\u6A21\u5F0F\u7684\u5185\u5BB9\u548CTab\u63A7\u5236 */}\n {isTabMode && (title || desc || datalist.length > 0) && (\n <div\n className={cn(\n 'image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center',\n {\n 'text-left': textAlign === 'left',\n 'text-center': textAlign === 'center',\n }\n )}\n >\n <div className=\"image-with-text__header\">\n <Heading as={'h3'} size={4} html={title} className=\"image-with-text__title\" />\n <Text\n as={'p'}\n size={1}\n html={desc}\n className=\"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]\"\n />\n </div>\n\n <div\n className={cn(\n 'image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll',\n {\n 'flex justify-center': textAlign === 'center',\n }\n )}\n >\n <div className=\"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]\">\n {/* \u6ED1\u52A8\u80CC\u666F */}\n <div\n className=\"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out\"\n style={{\n left: sliderStyle.left,\n width: sliderStyle.width,\n }}\n />\n\n {/* Tab Items */}\n {datalist.map((item: ImageWithTextTabItem, index: number) => (\n <div\n key={index}\n ref={el => {\n tabRefs.current[index] = el\n }}\n onClick={e => handleTabClick(index, e)}\n className={cn(\n 'image-with-text__tab rounded-btn min-xxl:px-[28px] min-xxl:py-[15px] relative z-10 cursor-pointer px-[20px] py-[10px] text-center text-[12px] font-medium transition-colors duration-300 md:px-[20px] md:py-[10px]',\n activeIndex === index ? 'image-with-text__tab--active text-black' : 'text-white'\n )}\n >\n <Heading\n as=\"h1\"\n size={1}\n html={item?.title}\n className=\"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]\"\n />\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n\n {/* \u57FA\u7840\u6A21\u5F0F\u7684\u5185\u5BB9\u533A\u57DF */}\n {!isTabMode && (title || subtitle || desc) && (\n <div\n className={cn('image-with-text__content flex flex-col', {\n // \u5782\u76F4\u5BF9\u9F50\uFF1A\u5982\u679C\u6709\u6309\u94AE\u5219\u4F7F\u7528 justify-between\uFF0C\u5426\u5219\u5C45\u4E2D\u5BF9\u9F50\n 'justify-center': !hasButton,\n 'justify-between': hasButton,\n // \u4F7F\u7528items\u65F6\u7684\u7279\u6B8A\u6837\u5F0F\uFF08\u7C7B\u4F3C\u539FFeature\u6A21\u5F0F\uFF09\n 'w-full laptop:w-fit': hasItems,\n // \u6C34\u5E73\u5BF9\u9F50\u63A7\u5236\uFF1A\u5F53\u6709\u529F\u80FD\u5217\u8868\u65F6\uFF0C\u6839\u636EtextAlign\u51B3\u5B9A\u5BF9\u9F50\u65B9\u5F0F\n 'items-start': textAlign === 'left',\n 'items-center': textAlign === 'center',\n // \u6587\u672C\u5BF9\u9F50\u63A7\u5236\n 'text-left': textAlign === 'left',\n 'text-center': textAlign === 'center',\n // order\u63A7\u5236\n 'laptop:order-1': effectiveLayout === 'left',\n })}\n >\n {/* \u4E3B\u8981\u5185\u5BB9\u533A\u57DF\uFF08\u5F53\u6709\u6309\u94AE\u65F6\uFF0C\u8FD9\u4E2Adiv\u5305\u542B\u9664\u6309\u94AE\u5916\u7684\u6240\u6709\u5185\u5BB9\uFF09 */}\n <div className={cn('image-with-text__main-content', { 'flex flex-col': hasButton })}>\n <div\n className={cn('image-with-text__header', {\n 'laptop:flex laptop:items-end laptop:justify-between laptop:gap-16':\n (effectiveLayout === 'top' || effectiveLayout === 'bottom') && button?.text,\n })}\n >\n <div className=\"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col\">\n <Heading\n as={'h2'}\n size={4}\n html={title}\n className={cn('image-with-text__title', {\n 'text-left': hasItems && textAlign === 'left',\n 'text-center': hasItems && textAlign === 'center',\n })}\n />\n {subtitle && (\n <Text\n as={'p'}\n size={hasItems ? 4 : 3}\n html={subtitle}\n className={cn(\n 'image-with-text__subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]',\n {\n 'laptop:mt-[16px]': !hasItems,\n 'min-xxl:mt-[8px] laptop:text-[16px] lg-desktop:text-[18px]': hasItems,\n 'text-left': hasItems && textAlign === 'left',\n 'text-center': hasItems && textAlign === 'center',\n }\n )}\n />\n )}\n </div>\n {(effectiveLayout === 'top' || effectiveLayout === 'bottom') && button?.text && (\n <Link\n href={getLocalizedPath(button.link || '', locale)}\n className=\"laptop:flex hidden whitespace-nowrap no-underline\"\n suffixIcon={ArrowRight}\n >\n {button.text}\n </Link>\n )}\n </div>\n\n {/* \u57FA\u7840\u6A21\u5F0F\u7684\u63CF\u8FF0\uFF08\u4E0D\u4F7F\u7528items\u65F6\uFF09 */}\n {!hasItems && (desc || descIcon) && (\n <div className=\"image-with-text__description flex flex-row gap-[8px]\">\n {descIcon && (\n <img\n src={descIcon}\n alt=\"icon\"\n className=\"image-with-text__description-icon desktop:size-[48px] size-[36px]\"\n />\n )}\n {desc && (\n <Heading\n as={'h4'}\n size={5}\n html={desc}\n className=\"image-with-text__description-text min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] text-[#3AD1FF] md:text-[40px]\"\n />\n )}\n </div>\n )}\n\n {/* \u529F\u80FD\u5217\u8868\uFF08\u5F53\u6709items\u65F6\u663E\u793A\uFF09 */}\n {hasItems && (\n <div\n className={cn('image-with-text__items laptop:mt-[32px] desktop:mt-[48px] mt-[24px] grid w-full gap-6', {\n '!mt-6': effectiveLayout === 'top' || effectiveLayout === 'bottom',\n // \u5F53 effectiveLayout \u662F top \u6216 bottom \u65F6\uFF1A\u9ED8\u8BA4 cols \u662F 2\uFF0Ctablet \u6216\u4EE5\u4E0A\u5C3A\u5BF8\u662F 4\n 'grid-cols-2 tablet:grid-cols-4': effectiveLayout === 'top' || effectiveLayout === 'bottom',\n // \u5F53 effectiveLayout \u662F left \u6216 right \u65F6\uFF1Acols \u9ED8\u8BA4\u662F 2\uFF0Ctablet \u662F 4\uFF0Claptop \u6216\u4EE5\u4E0A\u5C3A\u5BF8\u662F 2\n 'grid-cols-2 tablet:grid-cols-4 laptop:grid-cols-2':\n effectiveLayout === 'left' || effectiveLayout === 'right',\n })}\n >\n {items.map((item: ImageWithTextItem, index: number) => (\n <div\n key={index}\n className={cn('image-with-text__item', {\n 'text-center': textAlign === 'center',\n })}\n >\n <div\n className={cn('image-with-text__item-header flex flex-row items-center gap-[8px]', {\n 'justify-center': textAlign === 'center',\n 'justify-start': textAlign === 'left',\n })}\n >\n <Picture\n source={item.icon?.url}\n alt={item.icon?.alt}\n className=\"image-with-text__item-icon min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] desktop:h-[44px] lg-desktop:h-[52px] h-[28px] translate-y-[-12%] md:text-[40px]\"\n imgClassName=\"h-full !w-full\"\n />\n <Heading\n size={4}\n as=\"h6\"\n className=\"image-with-text__item-text bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent\"\n >\n {item.text}\n </Heading>\n </div>\n <Text\n size={4}\n as=\"p\"\n html={item.desc}\n className=\"image-with-text__item-desc tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[-2px] text-[14px]\"\n />\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* \u6309\u94AE\uFF08\u653E\u5728\u4E3B\u8981\u5185\u5BB9\u533A\u57DF\u5916\uFF09 */}\n {renderButton()}\n </div>\n )}\n\n {/* \u56FE\u7247/\u89C6\u9891\u533A\u57DF */}\n <div\n ref={mediaWrapperRef}\n className={cn('image-with-text__media-wrapper', {\n 'laptop:w-[60%] w-full shrink-0': effectiveLayout === 'left' || effectiveLayout === 'right',\n // \u4F7F\u7528items\u65F6\u7684\u7279\u6B8A\u6837\u5F0F\uFF08\u7C7B\u4F3C\u539FFeature\u6A21\u5F0F\uFF09\n 'aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560] shrink-0':\n hasItems,\n 'laptop:basis-[63%] desktop:basis-[57%]': hasItems && effectiveLayout === 'left',\n // TabWithImage\u6A21\u5F0F\n 'relative w-full shrink md:aspect-[358/360] min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] laptop:basis-[64%] desktop:aspect-[648/448]':\n isTabMode,\n '!max-w-none !max-h-none aspect-auto': effectiveLayout === 'top' || effectiveLayout === 'bottom',\n })}\n >\n {isTabMode ? (\n // TabWithImage\u6A21\u5F0F - \u652F\u6301\u56FE\u7247\u548C\u89C6\u9891\n isVideo ? (\n renderVideo()\n ) : (\n <AnimatePresence mode=\"wait\">\n <motion.div\n key={datalist[activeIndex].image?.url}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n className=\"image-with-text__image-motion absolute left-0 top-0 w-full\"\n >\n <Picture\n source={getImageSource()}\n alt={datalist[activeIndex].image?.alt}\n className=\"image-with-text__image rounded-box min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] desktop:aspect-[648/448] md:aspect-[358/360]\"\n />\n </motion.div>\n </AnimatePresence>\n )\n ) : isVideo ? (\n // \u57FA\u7840\u6A21\u5F0F - \u89C6\u9891\n renderVideo()\n ) : (\n // \u57FA\u7840\u6A21\u5F0F - \u56FE\u7247\n <Picture source={getImageSource()} className={cn('image-with-text__image rounded-box laptop:rounded-box')} />\n )}\n </div>\n </section>\n )\n})\n\nImageWithText.displayName = 'ImageWithText'\n\nexport default withLayout(ImageWithText)\n"],
5
- "mappings": "aAgBI,cAAAA,EAwOQ,QAAAC,MAxOR,oBAfJ,OAAOC,IAAS,uBAAAC,GAAqB,UAAAC,EAAQ,YAAAC,EAAU,aAAAC,MAAiB,QACxE,OAAS,WAAAC,EAAS,WAAAC,EAAS,QAAAC,EAAM,QAAAC,MAAY,4BAC7C,OAAS,MAAAC,EAAI,oBAAAC,MAAwB,yBAC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,CACC,KAAM,EACN,GAAG,IACH,KAAM2E,EAAK,KACX,UAAU,oIACZ,IA9BKV,CA+BP,CACD,EACH,GAEJ,EAGCE,GAAa,GAChB,EAIF5E,EAAC,OACC,IAAKiD,EACL,UAAWtC,EAAG,iCAAkC,CAC9C,iCAAkCgC,IAAoB,QAAUA,IAAoB,QAEpF,wGACEmC,EACF,yCAA0CA,GAAYnC,IAAoB,OAE1E,wLACEkB,EACF,sCAAuClB,IAAoB,OAASA,IAAoB,QAC1F,CAAC,EAEA,SAAAkB,EAECC,EACEkB,EAAY,EAEZhF,EAACkB,GAAA,CAAgB,KAAK,OACpB,SAAAlB,EAACiB,EAAO,IAAP,CAEC,QAAS,CAAE,QAAS,CAAE,EACtB,QAAS,CAAE,QAAS,CAAE,EACtB,KAAM,CAAE,QAAS,CAAE,EACnB,WAAY,CAAE,SAAU,EAAI,EAC5B,UAAU,6DAEV,SAAAjB,EAACQ,EAAA,CACC,OAAQuE,EAAe,EACvB,IAAK1C,EAASa,CAAW,EAAE,OAAO,IAClC,UAAU,iLACZ,GAXKb,EAASa,CAAW,EAAE,OAAO,GAYpC,EACF,EAEAY,EAEFkB,EAAY,EAGZhF,EAACQ,EAAA,CAAQ,OAAQuE,EAAe,EAAG,UAAWpE,EAAG,uDAAuD,EAAG,EAE/G,GACF,CAEJ,CAAC,EAEDW,GAAc,YAAc,gBAE5B,IAAOgE,GAAQzE,GAAWS,EAAa",
6
- "names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "useState", "useEffect", "Heading", "Picture", "Text", "Link", "cn", "getLocalizedPath", "withLayout", "useExposure", "useIntersectionObserverDelay", "useAiuiContext", "motion", "AnimatePresence", "componentType", "componentName", "ArrowRight", "ImageWithText", "data", "className", "ref", "title", "subtitle", "desc", "descIcon", "image", "padImage", "mobileImage", "theme", "items", "layout", "mediaType", "datalist", "video", "padVideo", "mobVideo", "button", "textAlign", "effectiveLayout", "locale", "boxRef", "desktopVideoRef", "tabletVideoRef", "mobileVideoRef", "mediaWrapperRef", "activeIndex", "setActiveIndex", "tabRefs", "sliderStyle", "setSliderStyle", "loadedDesktopVideoSrc", "setLoadedDesktopVideoSrc", "loadedTabletVideoSrc", "setLoadedTabletVideoSrc", "loadedMobileVideoSrc", "setLoadedMobileVideoSrc", "isTabMode", "isVideo", "current", "offsetLeft", "offsetWidth", "videoIntersected", "setVideoIntersected", "desktopSrc", "tabletSrc", "mobileSrc", "activeTab", "videoElement", "handleTabClick", "index", "e", "renderButton", "hasButton", "hasItems", "getImageSource", "renderVideo", "desktopPoster", "tabletPoster", "mobilePoster", "item", "el", "ImageWithText_default"]
4
+ "sourcesContent": ["'use client'\nimport React, { useImperativeHandle, useRef, useState, useEffect } from 'react'\nimport { Heading, Picture, Text, Link } from '../../components/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useIntersectionObserverDelay } from '../../hooks/useIntersectionObserver.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { motion, AnimatePresence } from 'framer-motion'\nimport type { ImageWithTextProps, ImageWithTextItem, ImageWithTextTabItem } from './types.js'\n\nconst componentType = 'image'\nconst componentName = 'image_with_text'\n\nconst ArrowRight = (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <path\n d=\"M6.91009 4.41058C7.23553 4.08514 7.76304 4.08514 8.08848 4.41058L13.0885 9.41058C13.4139 9.73602 13.4139 10.2635 13.0885 10.589L8.08848 15.589C7.76304 15.9144 7.23553 15.9144 6.91009 15.589C6.58466 15.2635 6.58466 14.736 6.91009 14.4106L11.3209 9.99977L6.91009 5.58897C6.58466 5.26353 6.58466 4.73602 6.91009 4.41058Z\"\n fill=\"currentColor\"\n />\n </svg>\n)\n\nconst ImageWithText = React.forwardRef<HTMLDivElement, ImageWithTextProps>(({ data, className }, ref) => {\n const {\n title,\n subtitle,\n desc,\n descIcon,\n image,\n padImage,\n mobileImage,\n theme = 'dark',\n items = [],\n layout = 'left',\n mediaType = 'image',\n datalist = [],\n video,\n padVideo,\n mobVideo,\n button,\n textAlign = 'left',\n } = data\n\n const effectiveLayout = layout\n\n const { locale = 'us', trackingData } = useAiuiContext()\n const boxRef = useRef<HTMLDivElement>(null)\n const desktopVideoRef = useRef<HTMLDivElement>(null)\n const tabletVideoRef = useRef<HTMLDivElement>(null)\n const mobileVideoRef = useRef<HTMLDivElement>(null)\n const mediaWrapperRef = useRef<HTMLDivElement>(null)\n\n // Tab\u72B6\u6001\u7BA1\u7406\n const [activeIndex, setActiveIndex] = useState(0)\n const tabRefs = useRef<Array<HTMLDivElement | null>>([])\n const [sliderStyle, setSliderStyle] = useState({ left: 0, width: 0 })\n\n // \u89C6\u9891\u61D2\u52A0\u8F7D\u72B6\u6001\n const [loadedDesktopVideoSrc, setLoadedDesktopVideoSrc] = useState('')\n const [loadedTabletVideoSrc, setLoadedTabletVideoSrc] = useState('')\n const [loadedMobileVideoSrc, setLoadedMobileVideoSrc] = useState('')\n\n // \u5224\u65AD\u662F\u5426\u4E3ATabWithImage\u6A21\u5F0F\uFF08\u4F18\u5148\u7EA7\u6700\u9AD8\uFF09\n const isTabMode = datalist.length > 0\n\n // \u5224\u65AD\u5F53\u524D\u662F\u5426\u4E3A\u89C6\u9891\u6A21\u5F0F\n const isVideo = mediaType === 'video'\n\n useExposure(boxRef, {\n componentType,\n componentName,\n componentTitle: title,\n componentDescription: subtitle,\n })\n\n useImperativeHandle(ref, () => boxRef.current as HTMLDivElement)\n\n // Tab\u6ED1\u5757\u4F4D\u7F6E\u8BA1\u7B97\n useEffect(() => {\n if (datalist.length > 0) {\n const current = tabRefs.current[activeIndex]\n if (current) {\n const { offsetLeft, offsetWidth } = current\n setSliderStyle({ left: offsetLeft, width: offsetWidth })\n }\n }\n }, [activeIndex, datalist.length])\n\n // \u89C6\u9891\u61D2\u52A0\u8F7D\u903B\u8F91\uFF08\u4F7F\u7528 useEffect \u907F\u514D\u95ED\u5305\u95EE\u9898\uFF09\n const [videoIntersected, setVideoIntersected] = useState(false)\n\n // \u4F7F\u7528 IntersectionObserver \u68C0\u6D4B\u5A92\u4F53\u533A\u57DF\u662F\u5426\u53EF\u89C1\uFF08\u76D1\u542C\u7236\u5BB9\u5668\u907F\u514D\u54CD\u5E94\u5F0F\u9690\u85CF\u95EE\u9898\uFF09\n useIntersectionObserverDelay(mediaWrapperRef, {\n once: true,\n threshold: 0.01,\n callback: () => {\n setVideoIntersected(true)\n },\n })\n\n // \u5F53\u89C6\u9891\u533A\u57DF\u53EF\u89C1\u65F6\uFF0C\u52A0\u8F7D\u5BF9\u5E94\u7684\u89C6\u9891\u6E90\n useEffect(() => {\n if (!videoIntersected || !isVideo) return\n\n // \u786E\u5B9A\u89C6\u9891\u6E90\n let desktopSrc = ''\n let tabletSrc = ''\n let mobileSrc = ''\n\n if (isTabMode && datalist[activeIndex]) {\n const activeTab = datalist[activeIndex]\n desktopSrc = activeTab.video?.url || ''\n tabletSrc = activeTab.padVideo?.url || desktopSrc\n mobileSrc = activeTab.mobVideo?.url || desktopSrc\n } else {\n desktopSrc = video?.url || ''\n tabletSrc = padVideo?.url || desktopSrc\n mobileSrc = mobVideo?.url || desktopSrc\n }\n\n // \u8BBE\u7F6E\u89C6\u9891\u6E90\n if (desktopSrc) setLoadedDesktopVideoSrc(desktopSrc)\n if (tabletSrc) setLoadedTabletVideoSrc(tabletSrc)\n if (mobileSrc) setLoadedMobileVideoSrc(mobileSrc)\n\n // \u5EF6\u8FDF\u89E6\u53D1\u64AD\u653E\n setTimeout(() => {\n const videos = [\n desktopVideoRef.current?.querySelector('video'),\n tabletVideoRef.current?.querySelector('video'),\n mobileVideoRef.current?.querySelector('video'),\n ]\n\n videos.forEach(videoElement => {\n if (videoElement) {\n videoElement.load()\n videoElement.play().catch(() => {\n // \u9759\u9ED8\u5904\u7406\u81EA\u52A8\u64AD\u653E\u5931\u8D25\u7684\u60C5\u51B5\n })\n }\n })\n }, 200)\n }, [videoIntersected, isVideo, isTabMode, activeIndex, datalist, video?.url, padVideo?.url, mobVideo?.url])\n\n const handleTabClick = (index: number, e: React.MouseEvent<HTMLDivElement>) => {\n setActiveIndex(index)\n ;(e.target as HTMLElement).scrollIntoView({\n behavior: 'smooth',\n inline: 'center',\n block: 'nearest',\n })\n\n // \u5982\u679C\u662F\u89C6\u9891\u6A21\u5F0F\u5E76\u4E14\u5207\u6362\u4E86Tab\uFF0C\u9700\u8981\u91CD\u65B0\u52A0\u8F7D\u548C\u64AD\u653E\u89C6\u9891\n if (isVideo && isTabMode && datalist[index]) {\n const activeTab = datalist[index]\n\n // \u66F4\u65B0\u89C6\u9891\u6E90\n if (activeTab.video?.url) {\n setLoadedDesktopVideoSrc(activeTab.video.url)\n }\n if (activeTab.padVideo?.url) {\n setLoadedTabletVideoSrc(activeTab.padVideo.url)\n }\n if (activeTab.mobVideo?.url) {\n setLoadedMobileVideoSrc(activeTab.mobVideo.url)\n }\n\n // \u5EF6\u8FDF\u89E6\u53D1\u64AD\u653E\uFF0C\u786E\u4FDDDOM\u66F4\u65B0\u5B8C\u6210\n setTimeout(() => {\n const videos = [\n desktopVideoRef.current?.querySelector('video'),\n tabletVideoRef.current?.querySelector('video'),\n mobileVideoRef.current?.querySelector('video'),\n ]\n\n videos.forEach(video => {\n if (video) {\n video.load()\n video.play().catch(() => {\n // \u9759\u9ED8\u5904\u7406\u81EA\u52A8\u64AD\u653E\u5931\u8D25\u7684\u60C5\u51B5\n })\n }\n })\n }, 300) // \u7A0D\u5FAE\u5EF6\u957F\u65F6\u95F4\u4EE5\u786E\u4FDDframer-motion\u52A8\u753B\u5B8C\u6210\n }\n }\n\n // \u6E32\u67D3\u6309\u94AE\n const renderButton = () => {\n if (!hasButton || !button?.text) return null\n if (effectiveLayout === 'top' || effectiveLayout === 'bottom') return null\n\n return (\n <div\n className={cn('image-with-text__button-wrapper laptop:mt-[32px] mt-[24px]', {\n 'flex justify-center': textAlign === 'center',\n 'flex justify-start': textAlign === 'left',\n })}\n >\n <Link\n href={trackUrlRef(\n getLocalizedPath(button.link || '', locale),\n `${trackingData?.contextHandle || ''}_${componentType}_${componentName}`\n )}\n className=\"image-with-text__button whitespace-nowrap no-underline\"\n suffixIcon={ArrowRight}\n >\n {button.text}\n </Link>\n </div>\n )\n }\n\n // \u5224\u65AD\u662F\u5426\u6709\u529F\u80FD\u5217\u8868\n const hasItems = items.length > 0\n\n // \u5224\u65AD\u662F\u5426\u6709\u6309\u94AE\uFF08\u5F71\u54CD\u6587\u672C\u533A\u57DF\u7684\u5BF9\u9F50\u65B9\u5F0F\uFF09\n const hasButton = Boolean(button)\n\n // \u83B7\u53D6\u56FE\u7247\u6E90\n const getImageSource = () => {\n if (isTabMode && datalist[activeIndex]) {\n const activeTab = datalist[activeIndex]\n return `${activeTab.image?.url} ,${activeTab.imgPad?.url || activeTab.image?.url} 1440, ${activeTab.imageMob?.url || activeTab.image?.url} 767`\n }\n if (image) {\n return `${image?.url},${padImage?.url || image?.url} 1024, ${mobileImage?.url || image?.url} 768`\n }\n return ''\n }\n\n // \u6E32\u67D3\u89C6\u9891\u5185\u5BB9\uFF08\u652F\u6301\u4E09\u7AEF\uFF09\n const renderVideo = () => {\n if (isTabMode) {\n const activeTab = datalist[activeIndex]\n // Tab\u6A21\u5F0F\u4E0B\u7684\u89C6\u9891\uFF0C\u4F7F\u7528 image/imgPad/imageMob \u4F5C\u4E3A\u5C01\u9762\n const desktopPoster = activeTab.image?.url\n const tabletPoster = activeTab.imgPad?.url || desktopPoster\n const mobilePoster = activeTab.imageMob?.url || desktopPoster\n\n return (\n <AnimatePresence mode=\"wait\">\n <motion.div\n key={activeTab.video?.url || activeTab.image?.url}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n className=\"image-with-text__video-motion absolute left-0 top-0 w-full\"\n >\n <div className=\"image-with-text__video-wrapper rounded-box overflow-hidden\">\n {/* \u684C\u9762\u7AEF\u89C6\u9891 */}\n <div ref={desktopVideoRef} className=\"image-with-text__desktop-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={desktopPoster}\n src={loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover\"\n ></video>\n </div>\n {/* \u5E73\u677F\u7AEF\u89C6\u9891 */}\n <div ref={tabletVideoRef} className=\"image-with-text__tablet-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={tabletPoster}\n src={loadedTabletVideoSrc || loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden\"\n ></video>\n </div>\n {/* \u79FB\u52A8\u7AEF\u89C6\u9891 */}\n <div ref={mobileVideoRef} className=\"image-with-text__mobile-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={mobilePoster}\n src={loadedMobileVideoSrc || loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--mobile tablet:hidden block\"\n ></video>\n </div>\n </div>\n </motion.div>\n </AnimatePresence>\n )\n }\n\n // \u57FA\u7840\u6A21\u5F0F\u4E0B\u7684\u89C6\u9891\uFF08\u652F\u6301\u4E09\u7AEF\uFF09\uFF0C\u4F7F\u7528 image/padImage/mobileImage \u4F5C\u4E3A\u5C01\u9762\n const desktopPoster = image?.url\n const tabletPoster = padImage?.url || desktopPoster\n const mobilePoster = mobileImage?.url || desktopPoster\n\n return (\n <div className=\"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden\">\n {/* \u684C\u9762\u7AEF\u89C6\u9891 */}\n <div ref={desktopVideoRef} className=\"image-with-text__desktop-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={desktopPoster}\n src={loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover\"\n ></video>\n </div>\n {/* \u5E73\u677F\u7AEF\u89C6\u9891 */}\n <div ref={tabletVideoRef} className=\"image-with-text__tablet-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={tabletPoster}\n src={loadedTabletVideoSrc || loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden\"\n ></video>\n </div>\n {/* \u79FB\u52A8\u7AEF\u89C6\u9891 */}\n <div ref={mobileVideoRef} className=\"image-with-text__mobile-video-container\">\n <video\n playsInline\n autoPlay\n muted\n poster={mobilePoster}\n src={loadedMobileVideoSrc || loadedDesktopVideoSrc}\n loop\n className=\"image-with-text__video image-with-text__video--mobile tablet:hidden block\"\n ></video>\n </div>\n </div>\n )\n }\n\n return (\n <section\n ref={boxRef}\n data-ui-component-id=\"ImageWithText\"\n className={cn(\n 'image-with-text text-info-primary',\n {\n // \u57FA\u7840\u6A21\u5F0F\u6837\u5F0F - \u652F\u6301\u4E0A\u4E0B\u5DE6\u53F3\u5E03\u5C40\n 'flex gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]': !isTabMode,\n 'flex-col': !isTabMode && (effectiveLayout === 'top' || effectiveLayout === 'bottom'),\n 'items-center': effectiveLayout === 'left' || effectiveLayout === 'right',\n 'flex-col laptop:flex-row': !isTabMode && (effectiveLayout === 'left' || effectiveLayout === 'right'),\n // TabWithImage\u6A21\u5F0F\u6837\u5F0F\n 'flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]': isTabMode,\n // \u4E3B\u9898\u6837\u5F0F\n 'aiui-dark': theme === 'dark',\n },\n className\n )}\n >\n {/* TabWithImage\u6A21\u5F0F\u7684\u5185\u5BB9\u548CTab\u63A7\u5236 */}\n {isTabMode && (title || desc || datalist.length > 0) && (\n <div\n className={cn(\n 'image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center',\n {\n 'text-left': textAlign === 'left',\n 'text-center': textAlign === 'center',\n }\n )}\n >\n <div className=\"image-with-text__header\">\n <Heading as={'h3'} size={4} html={title} className=\"image-with-text__title\" />\n <Text\n as={'p'}\n size={1}\n html={desc}\n className=\"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]\"\n />\n </div>\n\n <div\n className={cn(\n 'image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll',\n {\n 'flex justify-center': textAlign === 'center',\n }\n )}\n >\n <div className=\"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]\">\n {/* \u6ED1\u52A8\u80CC\u666F */}\n <div\n className=\"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out\"\n style={{\n left: sliderStyle.left,\n width: sliderStyle.width,\n }}\n />\n\n {/* Tab Items */}\n {datalist.map((item: ImageWithTextTabItem, index: number) => (\n <div\n key={index}\n ref={el => {\n tabRefs.current[index] = el\n }}\n onClick={e => handleTabClick(index, e)}\n className={cn(\n 'image-with-text__tab rounded-btn min-xxl:px-[28px] min-xxl:py-[15px] relative z-10 cursor-pointer px-[20px] py-[10px] text-center text-[12px] font-medium transition-colors duration-300 md:px-[20px] md:py-[10px]',\n activeIndex === index ? 'image-with-text__tab--active text-black' : 'text-white'\n )}\n >\n <Heading\n as=\"h1\"\n size={1}\n html={item?.title}\n className=\"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]\"\n />\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n\n {/* \u57FA\u7840\u6A21\u5F0F\u7684\u5185\u5BB9\u533A\u57DF */}\n {!isTabMode && (title || subtitle || desc) && (\n <div\n className={cn('image-with-text__content flex flex-col', {\n // \u5782\u76F4\u5BF9\u9F50\uFF1A\u5982\u679C\u6709\u6309\u94AE\u5219\u4F7F\u7528 justify-between\uFF0C\u5426\u5219\u5C45\u4E2D\u5BF9\u9F50\n 'justify-center': !hasButton,\n 'justify-between': hasButton,\n // \u4F7F\u7528items\u65F6\u7684\u7279\u6B8A\u6837\u5F0F\uFF08\u7C7B\u4F3C\u539FFeature\u6A21\u5F0F\uFF09\n 'w-full laptop:w-fit': hasItems,\n // \u6C34\u5E73\u5BF9\u9F50\u63A7\u5236\uFF1A\u5F53\u6709\u529F\u80FD\u5217\u8868\u65F6\uFF0C\u6839\u636EtextAlign\u51B3\u5B9A\u5BF9\u9F50\u65B9\u5F0F\n 'items-start': textAlign === 'left',\n 'items-center': textAlign === 'center',\n // \u6587\u672C\u5BF9\u9F50\u63A7\u5236\n 'text-left': textAlign === 'left',\n 'text-center': textAlign === 'center',\n // order\u63A7\u5236\n 'laptop:order-1': effectiveLayout === 'left',\n })}\n >\n {/* \u4E3B\u8981\u5185\u5BB9\u533A\u57DF\uFF08\u5F53\u6709\u6309\u94AE\u65F6\uFF0C\u8FD9\u4E2Adiv\u5305\u542B\u9664\u6309\u94AE\u5916\u7684\u6240\u6709\u5185\u5BB9\uFF09 */}\n <div className={cn('image-with-text__main-content', { 'flex flex-col': hasButton })}>\n <div\n className={cn('image-with-text__header', {\n 'laptop:flex laptop:items-end laptop:justify-between laptop:gap-16':\n (effectiveLayout === 'top' || effectiveLayout === 'bottom') && button?.text,\n })}\n >\n <div className=\"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col\">\n <Heading\n as={'h2'}\n size={4}\n html={title}\n className={cn('image-with-text__title', {\n 'text-left': hasItems && textAlign === 'left',\n 'text-center': hasItems && textAlign === 'center',\n })}\n />\n {subtitle && (\n <Text\n as={'p'}\n size={hasItems ? 4 : 3}\n html={subtitle}\n className={cn(\n 'image-with-text__subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]',\n {\n 'laptop:mt-[16px]': !hasItems,\n 'min-xxl:mt-[8px] laptop:text-[16px] lg-desktop:text-[18px]': hasItems,\n 'text-left': hasItems && textAlign === 'left',\n 'text-center': hasItems && textAlign === 'center',\n }\n )}\n />\n )}\n </div>\n {(effectiveLayout === 'top' || effectiveLayout === 'bottom') && button?.text && (\n <Link\n href={trackUrlRef(\n getLocalizedPath(button.link || '', locale),\n `${trackingData?.contextHandle || ''}_${componentType}_${componentName}`\n )}\n className=\"laptop:flex hidden whitespace-nowrap no-underline\"\n suffixIcon={ArrowRight}\n >\n {button.text}\n </Link>\n )}\n </div>\n\n {/* \u57FA\u7840\u6A21\u5F0F\u7684\u63CF\u8FF0\uFF08\u4E0D\u4F7F\u7528items\u65F6\uFF09 */}\n {!hasItems && (desc || descIcon) && (\n <div className=\"image-with-text__description flex flex-row gap-[8px]\">\n {descIcon && (\n <img\n src={descIcon}\n alt=\"icon\"\n className=\"image-with-text__description-icon desktop:size-[48px] size-[36px]\"\n />\n )}\n {desc && (\n <Heading\n as={'h4'}\n size={5}\n html={desc}\n className=\"image-with-text__description-text min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] text-[#3AD1FF] md:text-[40px]\"\n />\n )}\n </div>\n )}\n\n {/* \u529F\u80FD\u5217\u8868\uFF08\u5F53\u6709items\u65F6\u663E\u793A\uFF09 */}\n {hasItems && (\n <div\n className={cn('image-with-text__items laptop:mt-[32px] desktop:mt-[48px] mt-[24px] grid w-full gap-6', {\n '!mt-6': effectiveLayout === 'top' || effectiveLayout === 'bottom',\n // \u5F53 effectiveLayout \u662F top \u6216 bottom \u65F6\uFF1A\u9ED8\u8BA4 cols \u662F 2\uFF0Ctablet \u6216\u4EE5\u4E0A\u5C3A\u5BF8\u662F 4\n 'grid-cols-2 tablet:grid-cols-4': effectiveLayout === 'top' || effectiveLayout === 'bottom',\n // \u5F53 effectiveLayout \u662F left \u6216 right \u65F6\uFF1Acols \u9ED8\u8BA4\u662F 2\uFF0Ctablet \u662F 4\uFF0Claptop \u6216\u4EE5\u4E0A\u5C3A\u5BF8\u662F 2\n 'grid-cols-2 tablet:grid-cols-4 laptop:grid-cols-2':\n effectiveLayout === 'left' || effectiveLayout === 'right',\n })}\n >\n {items.map((item: ImageWithTextItem, index: number) => (\n <div\n key={index}\n className={cn('image-with-text__item', {\n 'text-center': textAlign === 'center',\n })}\n >\n <div\n className={cn('image-with-text__item-header flex flex-row items-center gap-[8px]', {\n 'justify-center': textAlign === 'center',\n 'justify-start': textAlign === 'left',\n })}\n >\n {item.icon?.url && (\n <Picture\n source={item.icon.url}\n alt={item.icon?.alt}\n className=\"image-with-text__item-icon min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] desktop:h-[44px] lg-desktop:h-[52px] h-[28px] translate-y-[-12%] md:text-[40px]\"\n imgClassName=\"h-full !w-full\"\n />\n )}\n <Heading\n size={4}\n as=\"h6\"\n className=\"image-with-text__item-text bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent\"\n >\n {item.text}\n </Heading>\n </div>\n <Text\n size={4}\n as=\"p\"\n html={item.desc}\n className=\"image-with-text__item-desc tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[-2px] text-[14px]\"\n />\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* \u6309\u94AE\uFF08\u653E\u5728\u4E3B\u8981\u5185\u5BB9\u533A\u57DF\u5916\uFF09 */}\n {renderButton()}\n </div>\n )}\n\n {/* \u56FE\u7247/\u89C6\u9891\u533A\u57DF */}\n <div\n ref={mediaWrapperRef}\n className={cn('image-with-text__media-wrapper', {\n 'laptop:w-[60%] w-full shrink-0': effectiveLayout === 'left' || effectiveLayout === 'right',\n // \u4F7F\u7528items\u65F6\u7684\u7279\u6B8A\u6837\u5F0F\uFF08\u7C7B\u4F3C\u539FFeature\u6A21\u5F0F\uFF09\n 'aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560] shrink-0':\n hasItems,\n 'laptop:basis-[63%] desktop:basis-[57%]': hasItems && effectiveLayout === 'left',\n // TabWithImage\u6A21\u5F0F\n 'relative w-full shrink md:aspect-[358/360] min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] laptop:basis-[64%] desktop:aspect-[648/448]':\n isTabMode,\n '!max-w-none !max-h-none aspect-auto': effectiveLayout === 'top' || effectiveLayout === 'bottom',\n })}\n >\n {isTabMode ? (\n // TabWithImage\u6A21\u5F0F - \u652F\u6301\u56FE\u7247\u548C\u89C6\u9891\n isVideo ? (\n renderVideo()\n ) : (\n <AnimatePresence mode=\"wait\">\n <motion.div\n key={datalist[activeIndex].image?.url}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={{ duration: 0.3 }}\n className=\"image-with-text__image-motion absolute left-0 top-0 w-full\"\n >\n <Picture\n source={getImageSource()}\n alt={datalist[activeIndex].image?.alt}\n className=\"image-with-text__image rounded-box min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] desktop:aspect-[648/448] md:aspect-[358/360]\"\n />\n </motion.div>\n </AnimatePresence>\n )\n ) : isVideo ? (\n // \u57FA\u7840\u6A21\u5F0F - \u89C6\u9891\n renderVideo()\n ) : (\n // \u57FA\u7840\u6A21\u5F0F - \u56FE\u7247\n <Picture source={getImageSource()} className={cn('image-with-text__image rounded-box laptop:rounded-box')} />\n )}\n </div>\n </section>\n )\n})\n\nImageWithText.displayName = 'ImageWithText'\n\nexport default withLayout(ImageWithText)\n"],
5
+ "mappings": "aAiBI,cAAAA,EA2OQ,QAAAC,MA3OR,oBAhBJ,OAAOC,IAAS,uBAAAC,GAAqB,UAAAC,EAAQ,YAAAC,EAAU,aAAAC,MAAiB,QACxE,OAAS,WAAAC,EAAS,WAAAC,EAAS,QAAAC,EAAM,QAAAC,OAAY,4BAC7C,OAAS,MAAAC,EAAI,oBAAAC,OAAwB,yBACrC,OAAS,cAAAC,OAAkB,yBAC3B,OAAS,eAAAC,OAAmB,6BAC5B,OAAS,gCAAAC,OAAoC,yCAC7C,OAAS,kB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BACf,EAEFtF,EAACO,EAAA,CACC,KAAM,EACN,GAAG,KACH,UAAU,wGAET,SAAA+E,EAAK,KACR,GACF,EACAtF,EAACS,EAAA,CACC,KAAM,EACN,GAAG,IACH,KAAM6E,EAAK,KACX,UAAU,oIACZ,IAhCKV,CAiCP,CACD,EACH,GAEJ,EAGCE,GAAa,GAChB,EAIF9E,EAAC,OACC,IAAKmD,EACL,UAAWxC,EAAG,iCAAkC,CAC9C,iCAAkCiC,IAAoB,QAAUA,IAAoB,QAEpF,wGACEoC,EACF,yCAA0CA,GAAYpC,IAAoB,OAE1E,wLACEmB,EACF,sCAAuCnB,IAAoB,OAASA,IAAoB,QAC1F,CAAC,EAEA,SAAAmB,EAECC,EACEkB,EAAY,EAEZlF,EAACmB,GAAA,CAAgB,KAAK,OACpB,SAAAnB,EAACkB,GAAO,IAAP,CAEC,QAAS,CAAE,QAAS,CAAE,EACtB,QAAS,CAAE,QAAS,CAAE,EACtB,KAAM,CAAE,QAAS,CAAE,EACnB,WAAY,CAAE,SAAU,EAAI,EAC5B,UAAU,6DAEV,SAAAlB,EAACQ,EAAA,CACC,OAAQyE,EAAe,EACvB,IAAK3C,EAASc,CAAW,EAAE,OAAO,IAClC,UAAU,iLACZ,GAXKd,EAASc,CAAW,EAAE,OAAO,GAYpC,EACF,EAEAY,EAEFkB,EAAY,EAGZlF,EAACQ,EAAA,CAAQ,OAAQyE,EAAe,EAAG,UAAWtE,EAAG,uDAAuD,EAAG,EAE/G,GACF,CAEJ,CAAC,EAEDY,GAAc,YAAc,gBAE5B,IAAOiE,GAAQ3E,GAAWU,EAAa",
6
+ "names": ["jsx", "jsxs", "React", "useImperativeHandle", "useRef", "useState", "useEffect", "Heading", "Picture", "Text", "Link", "cn", "getLocalizedPath", "withLayout", "useExposure", "useIntersectionObserverDelay", "useAiuiContext", "trackUrlRef", "motion", "AnimatePresence", "componentType", "componentName", "ArrowRight", "ImageWithText", "data", "className", "ref", "title", "subtitle", "desc", "descIcon", "image", "padImage", "mobileImage", "theme", "items", "layout", "mediaType", "datalist", "video", "padVideo", "mobVideo", "button", "textAlign", "effectiveLayout", "locale", "trackingData", "boxRef", "desktopVideoRef", "tabletVideoRef", "mobileVideoRef", "mediaWrapperRef", "activeIndex", "setActiveIndex", "tabRefs", "sliderStyle", "setSliderStyle", "loadedDesktopVideoSrc", "setLoadedDesktopVideoSrc", "loadedTabletVideoSrc", "setLoadedTabletVideoSrc", "loadedMobileVideoSrc", "setLoadedMobileVideoSrc", "isTabMode", "isVideo", "current", "offsetLeft", "offsetWidth", "videoIntersected", "setVideoIntersected", "desktopSrc", "tabletSrc", "mobileSrc", "activeTab", "videoElement", "handleTabClick", "index", "e", "renderButton", "hasButton", "hasItems", "getImageSource", "renderVideo", "desktopPoster", "tabletPoster", "mobilePoster", "item", "el", "ImageWithText_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as s,jsxs as M}from"react/jsx-runtime";import{useMediaQuery as y}from"react-responsive";import{Heading as C,Picture as A,Text as H}from"../../components/index.js";import{cn as t}from"../../helpers/utils.js";import{withLayout as O}from"../../shared/Styles.js";const R=({title:d,desc:w,mobImage:e,mobVideo:m,tabletImage:h,tabletVideo:n,laptopImage:c,laptopVideo:k,desktopImage:p,desktopVideo:g,image:l,video:u,className:z,theme:L,classNames:a})=>{const N=y({query:"(max-width: 767px)"}),K=y({query:"(min-width: 768px) and (max-width: 1024px)"}),T=y({query:"(min-width: 1025px) and (max-width: 1439px)"}),j=()=>N?m||n||k||g||u:K?n||k||g||u:T?k||g||u:g||u,D=()=>N?e||h||c||p||l:K?h||c||p||l:T?c||p||l:p||l,v=j(),P=D(),I=()=>{const o=[],f=l?.url||p?.url,r=p?.url||l?.url,i=c?.url||r,b=h?.url||i,x=e?.url||b;return f&&o.push(f),r&&r!==f&&o.push(`${r} 1920`),i&&i!==r&&o.push(`${i} 1440`),b&&b!==i&&o.push(`${b} 1025`),x&&x!==b&&o.push(`${x} 768`),o.length>0?o.join(", "):void 0},$=!!v?.url,q=!!(e?.url||h?.url||c?.url||p?.url||l?.url);return M("div",{className:t("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":L==="dark"},z,a?.card),children:[$?s("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:v?.url,poster:P?.url,className:t("ksp-card-video absolute bottom-0 w-full object-cover",a?.cardVideo)}):q&&s(A,{source:I(),alt:P?.alt||"",className:t("ksp-card-image size-full",a?.cardImage),imgClassName:t("size-full object-cover object-bottom",a?.cardImageImg)}),M("div",{className:t("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",a?.cardContent),children:[s(C,{size:3,html:d,className:t("ksp-card-title tablet:block hidden w-full",a?.cardTitle)}),s(C,{size:2,html:d,className:t("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",a?.cardTitle)}),s(H,{size:2,html:w,className:t("ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",a?.cardDesc)})]})]})},V={4:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},5:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]"},6:{0:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},7:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},8:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-2 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",8:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"}},E=(d,w)=>V[w]?.[d]||"";function F({data:d,className:w,classNames:e,...m}){const{title:h,items:n,theme:c="light"}=d;return M("section",{...m,"data-ui-component-id":"ksp",className:t("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":c==="dark"},w,e?.root),children:[s(C,{as:"h1",size:4,html:h,className:t("ksp-title laptop:text-center text-left",e?.title)}),s("div",{className:t("ksp-layout tablet:grid-cols-3 laptop:grid-cols-10 laptop:gap-4 mt-[24px] grid grid-cols-2 gap-3",e?.layout),children:n.map((k,p)=>s(R,{...k,className:E(p,n.length),classNames:e},p))})]})}var Y=O(F);export{Y as default};
1
+ "use client";import{jsx as s,jsxs as M}from"react/jsx-runtime";import{useIsomorphicMediaQuery as y}from"../../hooks/useIsomorphicMediaQuery.js";import{Heading as C,Picture as A,Text as H}from"../../components/index.js";import{cn as t}from"../../helpers/utils.js";import{withLayout as O}from"../../shared/Styles.js";const R=({title:d,desc:w,mobImage:e,mobVideo:m,tabletImage:h,tabletVideo:n,laptopImage:c,laptopVideo:k,desktopImage:p,desktopVideo:g,image:l,video:u,className:z,theme:I,classNames:a})=>{const N=y({query:"(max-width: 767px)"}),K=y({query:"(min-width: 768px) and (max-width: 1024px)"}),T=y({query:"(min-width: 1025px) and (max-width: 1439px)"}),L=()=>N?m||n||k||g||u:K?n||k||g||u:T?k||g||u:g||u,j=()=>N?e||h||c||p||l:K?h||c||p||l:T?c||p||l:p||l,v=L(),P=j(),D=()=>{const o=[],f=l?.url||p?.url,r=p?.url||l?.url,i=c?.url||r,b=h?.url||i,x=e?.url||b;return f&&o.push(f),r&&r!==f&&o.push(`${r} 1920`),i&&i!==r&&o.push(`${i} 1440`),b&&b!==i&&o.push(`${b} 1025`),x&&x!==b&&o.push(`${x} 768`),o.length>0?o.join(", "):void 0},$=!!v?.url,q=!!(e?.url||h?.url||c?.url||p?.url||l?.url);return M("div",{className:t("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":I==="dark"},z,a?.card),children:[$?s("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:v?.url,poster:P?.url,className:t("ksp-card-video absolute bottom-0 w-full object-cover",a?.cardVideo)}):q&&s(A,{source:D(),alt:P?.alt||"",className:t("ksp-card-image size-full",a?.cardImage),imgClassName:t("size-full object-cover object-bottom",a?.cardImageImg)}),M("div",{className:t("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",a?.cardContent),children:[s(C,{size:3,html:d,className:t("ksp-card-title tablet:block hidden w-full",a?.cardTitle)}),s(C,{size:2,html:d,className:t("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",a?.cardTitle)}),s(H,{size:2,html:w,className:t("ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",a?.cardDesc)})]})]})},V={4:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},5:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]"},6:{0:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},7:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},8:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-2 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",8:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"}},E=(d,w)=>V[w]?.[d]||"";function F({data:d,className:w,classNames:e,...m}){const{title:h,items:n,theme:c="light"}=d;return M("section",{...m,"data-ui-component-id":"ksp",className:t("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":c==="dark"},w,e?.root),children:[s(C,{as:"h1",size:4,html:h,className:t("ksp-title laptop:text-center text-left",e?.title)}),s("div",{className:t("ksp-layout tablet:grid-cols-3 laptop:grid-cols-10 laptop:gap-4 mt-[24px] grid grid-cols-2 gap-3",e?.layout),children:n.map((k,p)=>s(R,{...k,className:E(p,n.length),classNames:e},p))})]})}var Y=O(F);export{Y as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Ksp/index.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport { useMediaQuery } from 'react-responsive'\nimport { Heading, Picture, Text } 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\n/**\n * KSP \u5361\u7247\u9879\u6570\u636E\u7ED3\u6784\n */\nexport interface KspCardItem {\n /** \u6807\u9898 */\n title?: string\n /** \u63CF\u8FF0 */\n desc?: string\n /** \u79FB\u52A8\u7AEF\u56FE\u7247 */\n mobImage?: Media\n /** \u79FB\u52A8\u7AEF\u89C6\u9891 */\n mobVideo?: Media\n\n /** \u5E73\u677F\u7AEF\u56FE\u7247 (\u2265768px) */\n tabletImage?: Media\n /** \u5E73\u677F\u7AEF\u89C6\u9891 (\u2265768px) */\n tabletVideo?: Media\n\n /** \u5C0F\u684C\u9762\u7AEF\u56FE\u7247 (\u22651025px) */\n laptopImage?: Media\n /** \u5C0F\u684C\u9762\u7AEF\u89C6\u9891 (\u22651025px) */\n laptopVideo?: Media\n\n /** \u684C\u9762\u7AEF\u56FE\u7247 (\u22651440px) */\n desktopImage?: Media\n /** \u684C\u9762\u7AEF\u89C6\u9891 (\u22651440px) */\n desktopVideo?: Media\n /** \u5927\u684C\u9762\u7AEF\u56FE\u7247 */\n image?: Media\n /** \u5927\u684C\u9762\u7AEF\u89C6\u9891 */\n video?: Media\n}\n\n/**\n * KSP \u6570\u636E\u7ED3\u6784\n */\nexport interface KspData {\n /** \u4E3B\u6807\u9898 */\n title?: string\n /** KSP \u5361\u7247\u5217\u8868\uFF08\u9700\u8981 7 \u4E2A\u9879\uFF09 */\n items: KspCardItem[]\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n}\n\n/**\n * Ksp \u7EC4\u4EF6\u8BED\u4E49\u5316\u7C7B\u540D\u914D\u7F6E\n */\nexport interface KspClassNames {\n /** \u6574\u4F53\u5BB9\u5668\u7C7B\u540D */\n root?: string\n /** \u4E3B\u6807\u9898\u7C7B\u540D */\n title?: string\n /** \u5361\u7247\u5E03\u5C40\u5BB9\u5668\u7C7B\u540D */\n layout?: string\n /** \u5355\u4E2A\u5361\u7247\u7C7B\u540D */\n card?: string\n /** \u5361\u7247\u89C6\u9891\u7C7B\u540D */\n cardVideo?: string\n /** \u5361\u7247\u56FE\u7247\u7C7B\u540D */\n cardImage?: string\n /** \u5361\u7247\u56FE\u7247 img \u5143\u7D20\u7C7B\u540D */\n cardImageImg?: string\n /** \u5361\u7247\u5185\u5BB9\u533A\u7C7B\u540D */\n cardContent?: string\n /** \u5361\u7247\u6807\u9898\u7C7B\u540D */\n cardTitle?: string\n /** \u5361\u7247\u63CF\u8FF0\u7C7B\u540D */\n cardDesc?: string\n}\n\n/**\n * Ksp \u7EC4\u4EF6 Props\n */\nexport interface KspProps extends Omit<React.HTMLAttributes<HTMLElement>, 'className'> {\n /** KSP \u6570\u636E */\n data: KspData\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n /** \u8BED\u4E49\u5316\u7C7B\u540D\u914D\u7F6E */\n classNames?: KspClassNames\n}\n\ninterface ImageCardProps extends KspCardItem {\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u8BED\u4E49\u5316\u7C7B\u540D\u914D\u7F6E */\n classNames?: KspClassNames\n}\n\nconst ImageCard = ({\n title,\n desc,\n // \u65B0\u7684\u65AD\u70B9\u5A92\u4F53\u5C5E\u6027\n mobImage,\n mobVideo,\n tabletImage,\n tabletVideo,\n laptopImage,\n laptopVideo,\n desktopImage,\n desktopVideo,\n // \u4FDD\u7559\u65E7\u5C5E\u6027\u4F5C\u4E3A\u5927\u5C4F\u9ED8\u8BA4\u503C\n image,\n video,\n className,\n theme,\n classNames,\n}: ImageCardProps) => {\n // \u54CD\u5E94\u5F0F\u65AD\u70B9\u68C0\u6D4B\n const isMobile = useMediaQuery({ query: '(max-width: 767px)' })\n const isTablet = useMediaQuery({ query: '(min-width: 768px) and (max-width: 1024px)' })\n const isLaptop = useMediaQuery({ query: '(min-width: 1025px) and (max-width: 1439px)' })\n // desktop \u53CA\u4EE5\u4E0A\u4F7F\u7528\u9ED8\u8BA4\n\n // \u83B7\u53D6\u5F53\u524D\u65AD\u70B9\u7684\u89C6\u9891\u6E90\uFF08\u5E26 fallback\uFF09\n const getCurrentVideo = (): Media | undefined => {\n if (isMobile) return mobVideo || tabletVideo || laptopVideo || desktopVideo || video\n if (isTablet) return tabletVideo || laptopVideo || desktopVideo || video\n if (isLaptop) return laptopVideo || desktopVideo || video\n return desktopVideo || video\n }\n\n // \u83B7\u53D6\u5F53\u524D\u65AD\u70B9\u7684\u5C01\u9762\u56FE\n const getCurrentPoster = (): Media | undefined => {\n if (isMobile) return mobImage || tabletImage || laptopImage || desktopImage || image\n if (isTablet) return tabletImage || laptopImage || desktopImage || image\n if (isLaptop) return laptopImage || desktopImage || image\n return desktopImage || image\n }\n\n const currentVideo = getCurrentVideo()\n const currentPoster = getCurrentPoster()\n\n // \u6784\u5EFA\u54CD\u5E94\u5F0F\u56FE\u7247\u6E90\n const buildImageSource = (): string | undefined => {\n const sources: string[] = []\n const lgDesktop = image?.url || desktopImage?.url\n const desktop = desktopImage?.url || image?.url\n const laptop = laptopImage?.url || desktop\n const tablet = tabletImage?.url || laptop\n const mobile = mobImage?.url || tablet\n\n if (lgDesktop) sources.push(lgDesktop)\n if (desktop && desktop !== lgDesktop) sources.push(`${desktop} 1920`)\n if (laptop && laptop !== desktop) sources.push(`${laptop} 1440`)\n if (tablet && tablet !== laptop) sources.push(`${tablet} 1025`)\n if (mobile && mobile !== tablet) sources.push(`${mobile} 768`)\n\n return sources.length > 0 ? sources.join(', ') : undefined\n }\n\n // \u5224\u65AD\u662F\u5426\u6709\u89C6\u9891\n const hasVideo = !!currentVideo?.url\n\n // \u5224\u65AD\u662F\u5426\u6709\u4EFB\u4F55\u56FE\u7247\n const hasAnyImage = !!(mobImage?.url || tabletImage?.url || laptopImage?.url || desktopImage?.url || image?.url)\n\n return (\n <div\n className={cn(\n 'ksp-card rounded-box text-info-primary relative overflow-hidden',\n {\n 'aiui-dark': theme === 'dark',\n },\n className,\n classNames?.card\n )}\n >\n {hasVideo ? (\n <video\n playsInline\n autoPlay\n muted\n loop\n src={currentVideo?.url}\n poster={currentPoster?.url}\n className={cn('ksp-card-video absolute bottom-0 w-full object-cover', classNames?.cardVideo)}\n />\n ) : (\n hasAnyImage && (\n <Picture\n source={buildImageSource()}\n alt={currentPoster?.alt || ''}\n className={cn('ksp-card-image size-full', classNames?.cardImage)}\n imgClassName={cn('size-full object-cover object-bottom', classNames?.cardImageImg)}\n />\n )\n )}\n <div className={cn('ksp-card-content desktop:p-6 lg-desktop:p-8 p-4', classNames?.cardContent)}>\n <Heading\n size={3}\n html={title}\n className={cn('ksp-card-title tablet:block hidden w-full', classNames?.cardTitle)}\n />\n <Heading\n size={2}\n html={title}\n className={cn(\n 'ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full',\n classNames?.cardTitle\n )}\n />\n <Text\n size={2}\n html={desc}\n className={cn(\n 'ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]',\n classNames?.cardDesc\n )}\n />\n </div>\n </div>\n )\n}\n\n/**\n * \u5E03\u5C40\u914D\u7F6E\u6620\u5C04\u8868\n * \u6839\u636E items \u6570\u91CF\u548C\u7D22\u5F15\u4F4D\u7F6E\uFF0C\u5B9A\u4E49\u6BCF\u4E2A\u5361\u7247\u7684\u6805\u683C\u5E03\u5C40\u7C7B\u540D\n */\nconst LAYOUT_CONFIG: Record<number, Record<number, string>> = {\n 4: {\n 0: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 3: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n },\n 5: {\n 0: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n 1: 'col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 3: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 4: 'col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n },\n 6: {\n 0: 'col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 3: 'col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 4: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 5: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n },\n 7: {\n 0: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 3: 'col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 4: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 5: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 6: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n },\n 8: {\n 0: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 3: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 4: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 5: 'col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 6: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 7: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n },\n 9: {\n 0: 'col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 3: 'col-span-1 tablet:col-span-2 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 4: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 5: 'col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 6: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 7: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 8: 'col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n },\n}\n\n/**\n * \u83B7\u53D6\u5361\u7247\u7684\u5E03\u5C40\u7C7B\u540D\n * @param index - \u5361\u7247\u7D22\u5F15\n * @param totalCount - \u5361\u7247\u603B\u6570\n * @returns \u5E03\u5C40\u7C7B\u540D\n */\nconst getCardLayoutClass = (index: number, totalCount: number): string => {\n return LAYOUT_CONFIG[totalCount]?.[index] || ''\n}\n\n/**\n * Ksp - Key Selling Point \u5173\u952E\u5356\u70B9\u7EC4\u4EF6\n *\n * \u5C55\u793A\u4EA7\u54C1\u7684\u5173\u952E\u5356\u70B9\uFF0C\u652F\u6301\u56FE\u7247\u548C\u89C6\u9891\uFF0C\u5177\u6709\u590D\u6742\u7684\u54CD\u5E94\u5F0F\u5E03\u5C40\u3002\n * \u5E03\u5C40\u652F\u6301 4-9 \u4E2A\u5361\u7247\u9879\uFF0C\u5206\u522B\u5BF9\u5E94\u4E0D\u540C\u5C3A\u5BF8\u548C\u4F4D\u7F6E\u3002\n *\n * @example\n * ```tsx\n * <Ksp\n * data={{\n * title: '\u4E3A\u4EC0\u4E48\u9009\u62E9\u6211\u4EEC',\n * items: [\n * {\n * title: '\u9AD8\u6027\u80FD',\n * desc: '\u5F3A\u5927\u7684\u5904\u7406\u80FD\u529B',\n * image: '/desktop.jpg',\n * mobImage: '/mobile.jpg'\n * },\n * // ... \u9700\u8981 4-9 \u4E2A\u9879\n * ]\n * }}\n * />\n * ```\n */\nfunction Ksp({ data, className, classNames, ...rest }: KspProps) {\n const { title, items, theme = 'light' } = data\n return (\n <section\n {...rest}\n data-ui-component-id=\"ksp\"\n className={cn(\n 'ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center',\n {\n 'aiui-dark': theme === 'dark',\n },\n className,\n classNames?.root\n )}\n >\n <Heading\n as=\"h1\"\n size={4}\n html={title}\n className={cn('ksp-title laptop:text-center text-left', classNames?.title)}\n />\n <div\n className={cn(\n 'ksp-layout tablet:grid-cols-3 laptop:grid-cols-10 laptop:gap-4 mt-[24px] grid grid-cols-2 gap-3',\n classNames?.layout\n )}\n >\n {items.map((item, index) => (\n <ImageCard\n key={index}\n {...item}\n className={getCardLayoutClass(index, items.length)}\n classNames={classNames}\n />\n ))}\n </div>\n </section>\n )\n}\n\nexport default withLayout(Ksp)\n"],
5
- "mappings": "aAoLQ,cAAAA,EAmBF,QAAAC,MAnBE,oBAlLR,OAAS,iBAAAC,MAAqB,mBAC9B,OAAS,WAAAC,EAAS,WAAAC,EAAS,QAAAC,MAAY,4BACvC,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBA+F3B,MAAM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EAAG,uPACH,EAAG,uPACH,EAAG,sPACL,EACA,EAAG,CACD,EAAG,uPACH,EAAG,uPACH,EAAG,uPACH,EAAG,uPACH,EAAG,uPACH,EAAG,yQACH,EAAG,uPACH,EAAG,sPACL,EACA,EAAG,CACD,EAAG,uPACH,EAAG,uPACH,EAAG,uPACH,EAAG,yQACH,EAAG,uPACH,EAAG,yQACH,EAAG,uPACH,EAAG,uPACH,EAAG,sPACL,CACF,EAQMC,EAAqB,CAACC,EAAeC,IAClCH,EAAcG,CAAU,IAAID,CAAK,GAAK,GA2B/C,SAASE,EAAI,CAAE,KAAAC,EAAM,UAAAxB,EAAW,WAAAE,EAAY,GAAGuB,CAAK,EAAa,CAC/D,KAAM,CAAE,MAAArC,EAAO,MAAAsC,EAAO,MAAAzB,EAAQ,OAAQ,EAAIuB,EAC1C,OACE5C,EAAC,WACE,GAAG6C,EACJ,uBAAqB,MACrB,UAAWxC,EACT,yGACA,CACE,YAAagB,IAAU,MACzB,EACAD,EACAE,GAAY,IACd,EAEA,UAAAvB,EAACG,EAAA,CACC,GAAG,KACH,KAAM,EACN,KAAMM,EACN,UAAWH,EAAG,yCAA0CiB,GAAY,KAAK,EAC3E,EACAvB,EAAC,OACC,UAAWM,EACT,kGACAiB,GAAY,MACd,EAEC,SAAAwB,EAAM,IAAI,CAACC,EAAMN,IAChB1C,EAACQ,EAAA,CAEE,GAAGwC,EACJ,UAAWP,EAAmBC,EAAOK,EAAM,MAAM,EACjD,WAAYxB,GAHPmB,CAIP,CACD,EACH,GACF,CAEJ,CAEA,IAAOO,EAAQ1C,EAAWqC,CAAG",
6
- "names": ["jsx", "jsxs", "useMediaQuery", "Heading", "Picture", "Text", "cn", "withLayout", "ImageCard", "title", "desc", "mobImage", "mobVideo", "tabletImage", "tabletVideo", "laptopImage", "laptopVideo", "desktopImage", "desktopVideo", "image", "video", "className", "theme", "classNames", "isMobile", "isTablet", "isLaptop", "getCurrentVideo", "getCurrentPoster", "currentVideo", "currentPoster", "buildImageSource", "sources", "lgDesktop", "desktop", "laptop", "tablet", "mobile", "hasVideo", "hasAnyImage", "LAYOUT_CONFIG", "getCardLayoutClass", "index", "totalCount", "Ksp", "data", "rest", "items", "item", "Ksp_default"]
4
+ "sourcesContent": ["'use client'\n\nimport { useIsomorphicMediaQuery } from '../../hooks/useIsomorphicMediaQuery.js'\nimport { Heading, Picture, Text } 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\n/**\n * KSP \u5361\u7247\u9879\u6570\u636E\u7ED3\u6784\n */\nexport interface KspCardItem {\n /** \u6807\u9898 */\n title?: string\n /** \u63CF\u8FF0 */\n desc?: string\n /** \u79FB\u52A8\u7AEF\u56FE\u7247 */\n mobImage?: Media\n /** \u79FB\u52A8\u7AEF\u89C6\u9891 */\n mobVideo?: Media\n\n /** \u5E73\u677F\u7AEF\u56FE\u7247 (\u2265768px) */\n tabletImage?: Media\n /** \u5E73\u677F\u7AEF\u89C6\u9891 (\u2265768px) */\n tabletVideo?: Media\n\n /** \u5C0F\u684C\u9762\u7AEF\u56FE\u7247 (\u22651025px) */\n laptopImage?: Media\n /** \u5C0F\u684C\u9762\u7AEF\u89C6\u9891 (\u22651025px) */\n laptopVideo?: Media\n\n /** \u684C\u9762\u7AEF\u56FE\u7247 (\u22651440px) */\n desktopImage?: Media\n /** \u684C\u9762\u7AEF\u89C6\u9891 (\u22651440px) */\n desktopVideo?: Media\n /** \u5927\u684C\u9762\u7AEF\u56FE\u7247 */\n image?: Media\n /** \u5927\u684C\u9762\u7AEF\u89C6\u9891 */\n video?: Media\n}\n\n/**\n * KSP \u6570\u636E\u7ED3\u6784\n */\nexport interface KspData {\n /** \u4E3B\u6807\u9898 */\n title?: string\n /** KSP \u5361\u7247\u5217\u8868\uFF08\u9700\u8981 7 \u4E2A\u9879\uFF09 */\n items: KspCardItem[]\n /** \u4E3B\u9898\uFF0C\u9ED8\u8BA4 light */\n theme?: Theme\n}\n\n/**\n * Ksp \u7EC4\u4EF6\u8BED\u4E49\u5316\u7C7B\u540D\u914D\u7F6E\n */\nexport interface KspClassNames {\n /** \u6574\u4F53\u5BB9\u5668\u7C7B\u540D */\n root?: string\n /** \u4E3B\u6807\u9898\u7C7B\u540D */\n title?: string\n /** \u5361\u7247\u5E03\u5C40\u5BB9\u5668\u7C7B\u540D */\n layout?: string\n /** \u5355\u4E2A\u5361\u7247\u7C7B\u540D */\n card?: string\n /** \u5361\u7247\u89C6\u9891\u7C7B\u540D */\n cardVideo?: string\n /** \u5361\u7247\u56FE\u7247\u7C7B\u540D */\n cardImage?: string\n /** \u5361\u7247\u56FE\u7247 img \u5143\u7D20\u7C7B\u540D */\n cardImageImg?: string\n /** \u5361\u7247\u5185\u5BB9\u533A\u7C7B\u540D */\n cardContent?: string\n /** \u5361\u7247\u6807\u9898\u7C7B\u540D */\n cardTitle?: string\n /** \u5361\u7247\u63CF\u8FF0\u7C7B\u540D */\n cardDesc?: string\n}\n\n/**\n * Ksp \u7EC4\u4EF6 Props\n */\nexport interface KspProps extends Omit<React.HTMLAttributes<HTMLElement>, 'className'> {\n /** KSP \u6570\u636E */\n data: KspData\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n /** \u8BED\u4E49\u5316\u7C7B\u540D\u914D\u7F6E */\n classNames?: KspClassNames\n}\n\ninterface ImageCardProps extends KspCardItem {\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u8BED\u4E49\u5316\u7C7B\u540D\u914D\u7F6E */\n classNames?: KspClassNames\n}\n\nconst ImageCard = ({\n title,\n desc,\n // \u65B0\u7684\u65AD\u70B9\u5A92\u4F53\u5C5E\u6027\n mobImage,\n mobVideo,\n tabletImage,\n tabletVideo,\n laptopImage,\n laptopVideo,\n desktopImage,\n desktopVideo,\n // \u4FDD\u7559\u65E7\u5C5E\u6027\u4F5C\u4E3A\u5927\u5C4F\u9ED8\u8BA4\u503C\n image,\n video,\n className,\n theme,\n classNames,\n}: ImageCardProps) => {\n // \u54CD\u5E94\u5F0F\u65AD\u70B9\u68C0\u6D4B\n const isMobile = useIsomorphicMediaQuery({ query: '(max-width: 767px)' })\n const isTablet = useIsomorphicMediaQuery({ query: '(min-width: 768px) and (max-width: 1024px)' })\n const isLaptop = useIsomorphicMediaQuery({ query: '(min-width: 1025px) and (max-width: 1439px)' })\n // desktop \u53CA\u4EE5\u4E0A\u4F7F\u7528\u9ED8\u8BA4\n\n // \u83B7\u53D6\u5F53\u524D\u65AD\u70B9\u7684\u89C6\u9891\u6E90\uFF08\u5E26 fallback\uFF09\n const getCurrentVideo = (): Media | undefined => {\n if (isMobile) return mobVideo || tabletVideo || laptopVideo || desktopVideo || video\n if (isTablet) return tabletVideo || laptopVideo || desktopVideo || video\n if (isLaptop) return laptopVideo || desktopVideo || video\n return desktopVideo || video\n }\n\n // \u83B7\u53D6\u5F53\u524D\u65AD\u70B9\u7684\u5C01\u9762\u56FE\n const getCurrentPoster = (): Media | undefined => {\n if (isMobile) return mobImage || tabletImage || laptopImage || desktopImage || image\n if (isTablet) return tabletImage || laptopImage || desktopImage || image\n if (isLaptop) return laptopImage || desktopImage || image\n return desktopImage || image\n }\n\n const currentVideo = getCurrentVideo()\n const currentPoster = getCurrentPoster()\n\n // \u6784\u5EFA\u54CD\u5E94\u5F0F\u56FE\u7247\u6E90\n const buildImageSource = (): string | undefined => {\n const sources: string[] = []\n const lgDesktop = image?.url || desktopImage?.url\n const desktop = desktopImage?.url || image?.url\n const laptop = laptopImage?.url || desktop\n const tablet = tabletImage?.url || laptop\n const mobile = mobImage?.url || tablet\n\n if (lgDesktop) sources.push(lgDesktop)\n if (desktop && desktop !== lgDesktop) sources.push(`${desktop} 1920`)\n if (laptop && laptop !== desktop) sources.push(`${laptop} 1440`)\n if (tablet && tablet !== laptop) sources.push(`${tablet} 1025`)\n if (mobile && mobile !== tablet) sources.push(`${mobile} 768`)\n\n return sources.length > 0 ? sources.join(', ') : undefined\n }\n\n // \u5224\u65AD\u662F\u5426\u6709\u89C6\u9891\n const hasVideo = !!currentVideo?.url\n\n // \u5224\u65AD\u662F\u5426\u6709\u4EFB\u4F55\u56FE\u7247\n const hasAnyImage = !!(mobImage?.url || tabletImage?.url || laptopImage?.url || desktopImage?.url || image?.url)\n\n return (\n <div\n className={cn(\n 'ksp-card rounded-box text-info-primary relative overflow-hidden',\n {\n 'aiui-dark': theme === 'dark',\n },\n className,\n classNames?.card\n )}\n >\n {hasVideo ? (\n <video\n playsInline\n autoPlay\n muted\n loop\n src={currentVideo?.url}\n poster={currentPoster?.url}\n className={cn('ksp-card-video absolute bottom-0 w-full object-cover', classNames?.cardVideo)}\n />\n ) : (\n hasAnyImage && (\n <Picture\n source={buildImageSource()}\n alt={currentPoster?.alt || ''}\n className={cn('ksp-card-image size-full', classNames?.cardImage)}\n imgClassName={cn('size-full object-cover object-bottom', classNames?.cardImageImg)}\n />\n )\n )}\n <div className={cn('ksp-card-content desktop:p-6 lg-desktop:p-8 p-4', classNames?.cardContent)}>\n <Heading\n size={3}\n html={title}\n className={cn('ksp-card-title tablet:block hidden w-full', classNames?.cardTitle)}\n />\n <Heading\n size={2}\n html={title}\n className={cn(\n 'ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full',\n classNames?.cardTitle\n )}\n />\n <Text\n size={2}\n html={desc}\n className={cn(\n 'ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]',\n classNames?.cardDesc\n )}\n />\n </div>\n </div>\n )\n}\n\n/**\n * \u5E03\u5C40\u914D\u7F6E\u6620\u5C04\u8868\n * \u6839\u636E items \u6570\u91CF\u548C\u7D22\u5F15\u4F4D\u7F6E\uFF0C\u5B9A\u4E49\u6BCF\u4E2A\u5361\u7247\u7684\u6805\u683C\u5E03\u5C40\u7C7B\u540D\n */\nconst LAYOUT_CONFIG: Record<number, Record<number, string>> = {\n 4: {\n 0: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 3: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n },\n 5: {\n 0: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n 1: 'col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 3: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 4: 'col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n },\n 6: {\n 0: 'col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 3: 'col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 4: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 5: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n },\n 7: {\n 0: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 3: 'col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 4: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 5: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 6: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n },\n 8: {\n 0: 'col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 3: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 4: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 5: 'col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 6: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 7: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n },\n 9: {\n 0: 'col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 1: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 2: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 3: 'col-span-1 tablet:col-span-2 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 4: 'col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n 5: 'col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 6: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 7: 'col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]',\n 8: 'col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]',\n },\n}\n\n/**\n * \u83B7\u53D6\u5361\u7247\u7684\u5E03\u5C40\u7C7B\u540D\n * @param index - \u5361\u7247\u7D22\u5F15\n * @param totalCount - \u5361\u7247\u603B\u6570\n * @returns \u5E03\u5C40\u7C7B\u540D\n */\nconst getCardLayoutClass = (index: number, totalCount: number): string => {\n return LAYOUT_CONFIG[totalCount]?.[index] || ''\n}\n\n/**\n * Ksp - Key Selling Point \u5173\u952E\u5356\u70B9\u7EC4\u4EF6\n *\n * \u5C55\u793A\u4EA7\u54C1\u7684\u5173\u952E\u5356\u70B9\uFF0C\u652F\u6301\u56FE\u7247\u548C\u89C6\u9891\uFF0C\u5177\u6709\u590D\u6742\u7684\u54CD\u5E94\u5F0F\u5E03\u5C40\u3002\n * \u5E03\u5C40\u652F\u6301 4-9 \u4E2A\u5361\u7247\u9879\uFF0C\u5206\u522B\u5BF9\u5E94\u4E0D\u540C\u5C3A\u5BF8\u548C\u4F4D\u7F6E\u3002\n *\n * @example\n * ```tsx\n * <Ksp\n * data={{\n * title: '\u4E3A\u4EC0\u4E48\u9009\u62E9\u6211\u4EEC',\n * items: [\n * {\n * title: '\u9AD8\u6027\u80FD',\n * desc: '\u5F3A\u5927\u7684\u5904\u7406\u80FD\u529B',\n * image: '/desktop.jpg',\n * mobImage: '/mobile.jpg'\n * },\n * // ... \u9700\u8981 4-9 \u4E2A\u9879\n * ]\n * }}\n * />\n * ```\n */\nfunction Ksp({ data, className, classNames, ...rest }: KspProps) {\n const { title, items, theme = 'light' } = data\n return (\n <section\n {...rest}\n data-ui-component-id=\"ksp\"\n className={cn(\n 'ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center',\n {\n 'aiui-dark': theme === 'dark',\n },\n className,\n classNames?.root\n )}\n >\n <Heading\n as=\"h1\"\n size={4}\n html={title}\n className={cn('ksp-title laptop:text-center text-left', classNames?.title)}\n />\n <div\n className={cn(\n 'ksp-layout tablet:grid-cols-3 laptop:grid-cols-10 laptop:gap-4 mt-[24px] grid grid-cols-2 gap-3',\n classNames?.layout\n )}\n >\n {items.map((item, index) => (\n <ImageCard\n key={index}\n {...item}\n className={getCardLayoutClass(index, items.length)}\n classNames={classNames}\n />\n ))}\n </div>\n </section>\n )\n}\n\nexport default withLayout(Ksp)\n"],
5
+ "mappings": "aAoLQ,cAAAA,EAmBF,QAAAC,MAnBE,oBAlLR,OAAS,2BAAAC,MAA+B,yCACxC,OAAS,WAAAC,EAAS,WAAAC,EAAS,QAAAC,MAAY,4BACvC,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,MAAkB,yBA+F3B,MAAMC,EAAY,CAAC,CACjB,MAAAC,EACA,KAAAC,EAEA,SAAAC,EACA,SAAAC,EACA,YAAAC,EACA,YAAAC,EACA,YAAAC,EACA,YAAAC,EACA,aAAAC,EACA,aAAAC,EAEA,MAAAC,EACA,MAAAC,EACA,UAAAC,EACA,MAAAC,EACA,WAAAC,CACF,IAAsB,CAEpB,MAAMC,EAAWtB,EAAwB,CAAE,MAAO,oBAAqB,CAAC,EAClEuB,EAAWvB,EAAwB,CAAE,MAAO,4CAA6C,CAAC,EAC1FwB,EAAWxB,EAAwB,CAAE,MAAO,6CAA8C,CAAC,EAI3FyB,EAAkB,IAClBH,EAAiBZ,GAAYE,GAAeE,GAAeE,GAAgBE,EAC3EK,EAAiBX,GAAeE,GAAeE,GAAgBE,EAC/DM,EAAiBV,GAAeE,GAAgBE,EAC7CF,GAAgBE,EAInBQ,EAAmB,IACnBJ,EAAiBb,GAAYE,GAAeE,GAAeE,GAAgBE,EAC3EM,EAAiBZ,GAAeE,GAAeE,GAAgBE,EAC/DO,EAAiBX,GAAeE,GAAgBE,EAC7CF,GAAgBE,EAGnBU,EAAeF,EAAgB,EAC/BG,EAAgBF,EAAiB,EAGjCG,EAAmB,IAA0B,CACjD,MAAMC,EAAoB,CAAC,EACrBC,EAAYd,GAAO,KAAOF,GAAc,IACxCiB,EAAUjB,GAAc,KAAOE,GAAO,IACtCgB,EAASpB,GAAa,KAAOmB,EAC7BE,EAASvB,GAAa,KAAOsB,EAC7BE,EAAS1B,GA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B,GAHPmB,CAIP,CACD,EACH,GACF,CAEJ,CAEA,IAAOO,EAAQ1C,EAAWqC,CAAG",
6
+ "names": ["jsx", "jsxs", "useIsomorphicMediaQuery", "Heading", "Picture", "Text", "cn", "withLayout", "ImageCard", "title", "desc", "mobImage", "mobVideo", "tabletImage", "tabletVideo", "laptopImage", "laptopVideo", "desktopImage", "desktopVideo", "image", "video", "className", "theme", "classNames", "isMobile", "isTablet", "isLaptop", "getCurrentVideo", "getCurrentPoster", "currentVideo", "currentPoster", "buildImageSource", "sources", "lgDesktop", "desktop", "laptop", "tablet", "mobile", "hasVideo", "hasAnyImage", "LAYOUT_CONFIG", "getCardLayoutClass", "index", "totalCount", "Ksp", "data", "rest", "items", "item", "Ksp_default"]
7
7
  }
@@ -42,16 +42,20 @@ export interface ErrorModalProps {
42
42
  /**
43
43
  * 兑换失败时显示的弹窗标题(来自 CMS error.exchangeFailedTitle)
44
44
  * 仅当 isExchangeFailed 为 true 时生效
45
+ * @optional
45
46
  */
46
47
  exchangeFailedTitle?: string;
47
48
  /**
48
49
  * 兑换失败时显示的错误消息(来自 CMS error.exchangeFailedMessage)
49
50
  * 仅当 isExchangeFailed 为 true 时生效
51
+ * @optional
50
52
  */
51
53
  exchangeFailedMessage?: string;
52
54
  /**
53
55
  * 是否处于兑换失败状态
56
+ * 为 true 时优先显示 exchangeFailedTitle / exchangeFailedMessage
54
57
  * @default false
58
+ * @optional
55
59
  */
56
60
  isExchangeFailed?: boolean;
57
61
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/LotteryShared/ErrorModal.tsx"],
4
- "sourcesContent": ["/**\n * ErrorModal - \u9519\u8BEF\u63D0\u793A\u5F39\u7A97\u7EC4\u4EF6\n *\n * \u7528\u4E8E\u5C55\u793A\u62BD\u5956\u8FC7\u7A0B\u4E2D\u7684\u9519\u8BEF\u4FE1\u606F\n *\n * @module ErrorModal\n * @date 2026-01-04\n */\n\n'use client'\n\nimport React from 'react'\nimport { BaseModal } from './BaseModal.js'\nimport { Heading, Button } from '../../components/index.js'\n\nexport interface ErrorModalProps {\n /**\n * \u662F\u5426\u663E\u793A\u5F39\u7A97\n */\n isOpen: boolean\n\n /**\n * \u5173\u95ED\u5F39\u7A97\u56DE\u8C03\n */\n onClose: () => void\n\n /**\n * \u9519\u8BEF\u6807\u9898\n * @default \"Oops!\"\n */\n title?: string\n\n /**\n * \u9519\u8BEF\u6D88\u606F\n */\n message?: string\n\n /**\n * \u786E\u8BA4\u6309\u94AE\u6587\u672C\n * @default \"OK, I get\"\n */\n confirmText?: string\n\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n\n /**\n * \u4E3B\u9898\u6A21\u5F0F\n * @default 'light'\n */\n theme?: 'light' | 'dark'\n\n /**\n * \u5151\u6362\u5931\u8D25\u65F6\u663E\u793A\u7684\u5F39\u7A97\u6807\u9898\uFF08\u6765\u81EA CMS error.exchangeFailedTitle\uFF09\n * \u4EC5\u5F53 isExchangeFailed \u4E3A true \u65F6\u751F\u6548\n */\n exchangeFailedTitle?: string\n\n /**\n * \u5151\u6362\u5931\u8D25\u65F6\u663E\u793A\u7684\u9519\u8BEF\u6D88\u606F\uFF08\u6765\u81EA CMS error.exchangeFailedMessage\uFF09\n * \u4EC5\u5F53 isExchangeFailed \u4E3A true \u65F6\u751F\u6548\n */\n exchangeFailedMessage?: string\n\n /**\n * \u662F\u5426\u5904\u4E8E\u5151\u6362\u5931\u8D25\u72B6\u6001\n * @default false\n */\n isExchangeFailed?: boolean\n}\n\n/**\n * ErrorModal \u9519\u8BEF\u63D0\u793A\u5F39\u7A97\u7EC4\u4EF6\n */\nexport const ErrorModal: React.FC<ErrorModalProps> = ({\n isOpen,\n onClose,\n title = \"Sorry, You Didn't Win This Time\",\n message,\n confirmText = 'OK, I get',\n className,\n theme = 'light',\n exchangeFailedTitle,\n exchangeFailedMessage,\n isExchangeFailed = false,\n}) => {\n // \u5151\u6362\u5931\u8D25\u72B6\u6001\u4E0B\uFF0C\u4F18\u5148\u4F7F\u7528\u4E13\u5C5E\u6587\u6848\n const displayTitle = isExchangeFailed && exchangeFailedTitle ? exchangeFailedTitle : title\n const displayMessage = isExchangeFailed && exchangeFailedMessage ? exchangeFailedMessage : message\n return (\n <BaseModal\n isOpen={isOpen}\n onClose={onClose}\n maxWidth=\"max-w-[326px] laptop:max-w-[420px]\"\n background=\"bg-white\"\n // \u9519\u8BEF\u5F39\u7A97\u4F7F\u7528\u66F4\u9AD8\u5C42\u7EA7\uFF0C\u786E\u4FDD\u663E\u793A\u5728\u6240\u6709\u5176\u4ED6\u5F39\u7A97\u4E4B\u4E0A\n className={`${className || ''}`}\n ariaLabelledBy=\"error-modal-title\"\n theme={theme}\n >\n <div className=\"laptop:px-8 laptop:pb-8 px-6 pb-6\">\n {/* \u9519\u8BEF\u56FE\u6807 */}\n <div className=\"mb-6 flex justify-center\">\n <div className=\"flex size-[80px] items-center justify-center rounded-full\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"80\" viewBox=\"0 0 80 80\" fill=\"none\">\n <path\n d=\"M63.5691 63.5727C68.2304 58.9107 71.4047 52.9713 72.6905 46.5054C73.9764 40.0395 73.316 33.3374 70.793 27.2468C68.27 21.1562 63.9975 15.9505 58.516 12.2879C53.0344 8.6254 46.5899 6.67053 39.9974 6.67053C33.4049 6.67053 26.9604 8.6254 21.4788 12.2879C15.9973 15.9505 11.7249 21.1562 9.20182 27.2468C6.67878 33.3374 6.01843 40.0395 7.30427 46.5054C8.59011 52.9713 11.7644 58.9107 16.4257 63.5727C19.5211 66.6684 23.1959 69.1241 27.2404 70.7995C31.2848 72.4749 35.6197 73.3372 39.9974 73.3372C44.3751 73.3372 48.71 72.4749 52.7545 70.7995C56.7989 69.1241 60.4737 66.6684 63.5691 63.5727Z\"\n fill=\"#FFCC66\"\n />\n <path\n d=\"M57.3792 11.5137C61.4604 17.8614 63.2668 25.4062 62.503 32.914C61.7393 40.4218 58.4505 47.4482 53.1746 52.8441C47.8988 58.24 40.9481 61.6859 33.4594 62.6183C25.9706 63.5507 18.3872 61.9144 11.9492 57.977C14.6587 62.1912 18.2833 65.7405 22.5534 68.3609C26.8236 70.9813 31.6296 72.6054 36.6139 73.1125C41.5983 73.6195 46.6329 72.9965 51.3433 71.2897C56.0537 69.5829 60.3187 66.8363 63.8213 63.254C67.3239 59.6717 69.974 55.346 71.5744 50.5984C73.1749 45.8508 73.6845 40.8035 73.0655 35.8318C72.4465 30.8601 70.7147 26.0919 67.9989 21.8817C65.2832 17.6715 61.6533 14.1277 57.3792 11.5137Z\"\n fill=\"#FFC450\"\n />\n <path\n opacity=\"0.4\"\n d=\"M11.204 43.58C11.1862 37.1148 13.1937 30.8063 16.9446 25.5404C20.6955 20.2745 26.0015 16.3156 32.1175 14.2196C38.2336 12.1235 44.8525 11.9956 51.045 13.8538C57.2374 15.712 62.6924 19.4629 66.644 24.58C64.5168 20.9213 61.6618 17.7377 58.2555 15.226C54.8493 12.7143 50.964 10.9279 46.84 9.97716C42.716 9.02646 38.4408 8.93165 34.2787 9.69861C30.1166 10.4656 26.156 12.078 22.6418 14.4362C19.1275 16.7944 16.1342 19.8484 13.8469 23.4092C11.5596 26.9701 10.027 30.9622 9.34361 35.1388C8.66026 39.3155 8.84077 43.5879 9.87398 47.692C10.9072 51.7962 12.7711 55.6448 15.3506 59C12.6353 54.3146 11.2049 48.9954 11.204 43.58Z\"\n fill=\"white\"\n />\n <path\n d=\"M40 58.1469C43.3333 58.1469 46 53.5802 46 47.9436C46 42.3069 43.3067 37.7402 40 37.7402C36.6933 37.7402 34 42.3102 34 47.9436C34 53.5769 36.6667 58.1469 40 58.1469Z\"\n fill=\"#333333\"\n />\n <path\n d=\"M45.0763 53.4168C40.6863 51.0035 37.113 52.3735 35.043 53.7502C36.1296 56.4168 37.943 58.1635 39.9963 58.1635C42.1363 58.1535 43.9996 56.2635 45.0763 53.4168Z\"\n fill=\"#F84D4F\"\n />\n <path\n d=\"M29.6913 33.373L20.918 38.9564L21.1413 67.4864C23.7747 69.2998 26.6568 70.7224 29.698 71.7097L29.6913 33.373ZM50.3313 33.373L59.0913 38.9564L58.8746 67.4864C56.2413 69.2998 53.3591 70.7224 50.318 71.7097L50.3313 33.373Z\"\n fill=\"#21D2C5\"\n />\n <path\n d=\"M22.0217 39.9506C21.7281 39.9495 21.4421 39.8572 21.2032 39.6864C20.9643 39.5156 20.7844 39.2748 20.6884 38.9973C20.5918 38.7187 20.5848 38.4168 20.6684 38.134C20.7531 37.8525 20.9218 37.6037 21.1517 37.4206L25.9617 33.6673L21.0017 30.754C20.7618 30.6135 20.5684 30.4055 20.4459 30.1559C20.3233 29.9063 20.2769 29.6261 20.3124 29.3503C20.3479 29.0745 20.4639 28.8153 20.6457 28.6049C20.8276 28.3946 21.0673 28.2424 21.3351 28.1673C21.6986 28.0738 22.0844 28.1277 22.4084 28.3173L29.1817 32.294C29.3803 32.4109 29.5474 32.5745 29.6684 32.7706C29.7911 32.9687 29.8632 33.1939 29.8784 33.4265C29.8935 33.659 29.8511 33.8917 29.7551 34.104C29.6613 34.3147 29.517 34.499 29.3351 34.6406L22.8851 39.6673C22.6373 39.856 22.3332 39.9558 22.0217 39.9506ZM57.9817 39.9506C57.6662 39.9515 57.3596 39.8458 57.1117 39.6506L50.6684 34.6306C50.4845 34.4879 50.3381 34.3025 50.2417 34.0906C50.0963 33.7713 50.0751 33.4092 50.1824 33.0751C50.2896 32.7411 50.5176 32.459 50.8217 32.284L57.5817 28.304C57.7426 28.1992 57.9228 28.1278 58.1118 28.094C58.3007 28.0602 58.4946 28.0648 58.6817 28.1073C58.869 28.1498 59.0451 28.2316 59.1984 28.3473C59.3536 28.4595 59.4841 28.6025 59.5817 28.7673C59.6787 28.9331 59.741 29.1168 59.7651 29.3073C59.7895 29.4977 59.7749 29.691 59.7222 29.8755C59.6695 30.0601 59.5797 30.2319 59.4584 30.3806C59.3341 30.5324 59.1783 30.6552 59.0017 30.7406L54.0417 33.6673L58.8484 37.414C59.0217 37.5492 59.161 37.7229 59.2554 37.9214C59.3497 38.1199 59.3965 38.3376 59.3919 38.5573C59.3874 38.777 59.3317 38.9927 59.2293 39.1871C59.1268 39.3815 58.9804 39.5494 58.8017 39.6773C58.5626 39.8488 58.2761 39.942 57.9817 39.944V39.9506Z\"\n fill=\"#333333\"\n />\n </svg>\n </div>\n </div>\n\n {/* \u6807\u9898 */}\n <Heading size={2} id=\"error-modal-title\" className=\"text-center tracking-[-0.32px] text-[#1D1D1F]\">\n {displayTitle}\n </Heading>\n\n {/* \u9519\u8BEF\u6D88\u606F */}\n <p className=\"laptop:text-[16px] mb-6 text-wrap break-words text-center text-[14px] font-[700] text-[#1D1D1F]\">\n {displayMessage}\n </p>\n\n {/* \u786E\u8BA4\u6309\u94AE */}\n <Button onClick={onClose} className=\"w-full\">\n {confirmText}\n </Button>\n </div>\n </BaseModal>\n )\n}\n\nexport default ErrorModal\n"],
5
- "mappings": "aA0GY,OACE,OAAAA,EADF,QAAAC,MAAA,oBA/FZ,MAAkB,QAClB,OAAS,aAAAC,MAAiB,iBAC1B,OAAS,WAAAC,EAAS,UAAAC,MAAc,4BA+DzB,MAAMC,EAAwC,CAAC,CACpD,OAAAC,EACA,QAAAC,EACA,MAAAC,EAAQ,kCACR,QAAAC,EACA,YAAAC,EAAc,YACd,UAAAC,EACA,MAAAC,EAAQ,QACR,oBAAAC,EACA,sBAAAC,EACA,iBAAAC,EAAmB,EACrB,IAAM,CAEJ,MAAMC,EAAeD,GAAoBF,EAAsBA,EAAsBL,EAC/ES,EAAiBF,GAAoBD,EAAwBA,EAAwBL,EAC3F,OACET,EAACE,EAAA,CACC,OAAQI,EACR,QAASC,EACT,SAAS,qCACT,WAAW,WAEX,UAAW,GAAGI,GAAa,EAAE,GAC7B,eAAe,oBACf,MAAOC,EAEP,SAAAX,EAAC,OAAI,UAAU,oCAEb,UAAAD,EAAC,OAAI,UAAU,2BACb,SAAAA,EAAC,OAAI,UAAU,4DACb,SAAAC,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,UAAAD,EAAC,QACC,EAAE,2kBACF,KAAK,UACP,EACAA,EAAC,QACC,EAAE,4kBACF,KAAK,UACP,EACAA,EAAC,QACC,QAAQ,MACR,EAAE,2mBACF,KAAK,QACP,EACAA,EAAC,QACC,EAAE,uKACF,KAAK,UACP,EACAA,EAAC,QACC,EAAE,iKACF,KAAK,UACP,EACAA,EAAC,QACC,EAAE,8NACF,KAAK,UACP,EACAA,EAAC,QACC,EAAE,ymDACF,KAAK,UACP,GACF,EACF,EACF,EAGAA,EAACG,EAAA,CAAQ,KAAM,EAAG,GAAG,oBAAoB,UAAU,gDAChD,SAAAa,EACH,EAGAhB,EAAC,KAAE,UAAU,kGACV,SAAAiB,EACH,EAGAjB,EAACI,EAAA,CAAO,QAASG,EAAS,UAAU,SACjC,SAAAG,EACH,GACF,EACF,CAEJ,EAEA,IAAOQ,EAAQb",
4
+ "sourcesContent": ["/**\n * ErrorModal - \u9519\u8BEF\u63D0\u793A\u5F39\u7A97\u7EC4\u4EF6\n *\n * \u7528\u4E8E\u5C55\u793A\u62BD\u5956\u8FC7\u7A0B\u4E2D\u7684\u9519\u8BEF\u4FE1\u606F\n *\n * @module ErrorModal\n * @date 2026-01-04\n */\n\n'use client'\n\nimport React from 'react'\nimport { BaseModal } from './BaseModal.js'\nimport { Heading, Button } from '../../components/index.js'\n\nexport interface ErrorModalProps {\n /**\n * \u662F\u5426\u663E\u793A\u5F39\u7A97\n */\n isOpen: boolean\n\n /**\n * \u5173\u95ED\u5F39\u7A97\u56DE\u8C03\n */\n onClose: () => void\n\n /**\n * \u9519\u8BEF\u6807\u9898\n * @default \"Oops!\"\n */\n title?: string\n\n /**\n * \u9519\u8BEF\u6D88\u606F\n */\n message?: string\n\n /**\n * \u786E\u8BA4\u6309\u94AE\u6587\u672C\n * @default \"OK, I get\"\n */\n confirmText?: string\n\n /**\n * \u81EA\u5B9A\u4E49\u7C7B\u540D\n */\n className?: string\n\n /**\n * \u4E3B\u9898\u6A21\u5F0F\n * @default 'light'\n */\n theme?: 'light' | 'dark'\n\n /**\n * \u5151\u6362\u5931\u8D25\u65F6\u663E\u793A\u7684\u5F39\u7A97\u6807\u9898\uFF08\u6765\u81EA CMS error.exchangeFailedTitle\uFF09\n * \u4EC5\u5F53 isExchangeFailed \u4E3A true \u65F6\u751F\u6548\n * @optional\n */\n exchangeFailedTitle?: string\n\n /**\n * \u5151\u6362\u5931\u8D25\u65F6\u663E\u793A\u7684\u9519\u8BEF\u6D88\u606F\uFF08\u6765\u81EA CMS error.exchangeFailedMessage\uFF09\n * \u4EC5\u5F53 isExchangeFailed \u4E3A true \u65F6\u751F\u6548\n * @optional\n */\n exchangeFailedMessage?: string\n\n /**\n * \u662F\u5426\u5904\u4E8E\u5151\u6362\u5931\u8D25\u72B6\u6001\n * \u4E3A true \u65F6\u4F18\u5148\u663E\u793A exchangeFailedTitle / exchangeFailedMessage\n * @default false\n * @optional\n */\n isExchangeFailed?: boolean\n}\n\n/**\n * ErrorModal \u9519\u8BEF\u63D0\u793A\u5F39\u7A97\u7EC4\u4EF6\n */\nexport const ErrorModal: React.FC<ErrorModalProps> = ({\n isOpen,\n onClose,\n title = \"Sorry, You Didn't Win This Time\",\n message,\n confirmText = 'OK, I get',\n className,\n theme = 'light',\n exchangeFailedTitle,\n exchangeFailedMessage,\n isExchangeFailed = false,\n}) => {\n // \u5151\u6362\u5931\u8D25\u72B6\u6001\u4E0B\uFF0C\u4F18\u5148\u4F7F\u7528\u4E13\u5C5E\u6587\u6848\n const displayTitle = isExchangeFailed && exchangeFailedTitle ? exchangeFailedTitle : title\n const displayMessage = isExchangeFailed && exchangeFailedMessage ? exchangeFailedMessage : message\n return (\n <BaseModal\n isOpen={isOpen}\n onClose={onClose}\n maxWidth=\"max-w-[326px] laptop:max-w-[420px]\"\n background=\"bg-white\"\n // \u9519\u8BEF\u5F39\u7A97\u4F7F\u7528\u66F4\u9AD8\u5C42\u7EA7\uFF0C\u786E\u4FDD\u663E\u793A\u5728\u6240\u6709\u5176\u4ED6\u5F39\u7A97\u4E4B\u4E0A\n className={`${className || ''}`}\n ariaLabelledBy=\"error-modal-title\"\n theme={theme}\n >\n <div className=\"laptop:px-8 laptop:pb-8 px-6 pb-6\">\n {/* \u9519\u8BEF\u56FE\u6807 */}\n <div className=\"mb-6 flex justify-center\">\n <div className=\"flex size-[80px] items-center justify-center rounded-full\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"80\" viewBox=\"0 0 80 80\" fill=\"none\">\n <path\n d=\"M63.5691 63.5727C68.2304 58.9107 71.4047 52.9713 72.6905 46.5054C73.9764 40.0395 73.316 33.3374 70.793 27.2468C68.27 21.1562 63.9975 15.9505 58.516 12.2879C53.0344 8.6254 46.5899 6.67053 39.9974 6.67053C33.4049 6.67053 26.9604 8.6254 21.4788 12.2879C15.9973 15.9505 11.7249 21.1562 9.20182 27.2468C6.67878 33.3374 6.01843 40.0395 7.30427 46.5054C8.59011 52.9713 11.7644 58.9107 16.4257 63.5727C19.5211 66.6684 23.1959 69.1241 27.2404 70.7995C31.2848 72.4749 35.6197 73.3372 39.9974 73.3372C44.3751 73.3372 48.71 72.4749 52.7545 70.7995C56.7989 69.1241 60.4737 66.6684 63.5691 63.5727Z\"\n fill=\"#FFCC66\"\n />\n <path\n d=\"M57.3792 11.5137C61.4604 17.8614 63.2668 25.4062 62.503 32.914C61.7393 40.4218 58.4505 47.4482 53.1746 52.8441C47.8988 58.24 40.9481 61.6859 33.4594 62.6183C25.9706 63.5507 18.3872 61.9144 11.9492 57.977C14.6587 62.1912 18.2833 65.7405 22.5534 68.3609C26.8236 70.9813 31.6296 72.6054 36.6139 73.1125C41.5983 73.6195 46.6329 72.9965 51.3433 71.2897C56.0537 69.5829 60.3187 66.8363 63.8213 63.254C67.3239 59.6717 69.974 55.346 71.5744 50.5984C73.1749 45.8508 73.6845 40.8035 73.0655 35.8318C72.4465 30.8601 70.7147 26.0919 67.9989 21.8817C65.2832 17.6715 61.6533 14.1277 57.3792 11.5137Z\"\n fill=\"#FFC450\"\n />\n <path\n opacity=\"0.4\"\n d=\"M11.204 43.58C11.1862 37.1148 13.1937 30.8063 16.9446 25.5404C20.6955 20.2745 26.0015 16.3156 32.1175 14.2196C38.2336 12.1235 44.8525 11.9956 51.045 13.8538C57.2374 15.712 62.6924 19.4629 66.644 24.58C64.5168 20.9213 61.6618 17.7377 58.2555 15.226C54.8493 12.7143 50.964 10.9279 46.84 9.97716C42.716 9.02646 38.4408 8.93165 34.2787 9.69861C30.1166 10.4656 26.156 12.078 22.6418 14.4362C19.1275 16.7944 16.1342 19.8484 13.8469 23.4092C11.5596 26.9701 10.027 30.9622 9.34361 35.1388C8.66026 39.3155 8.84077 43.5879 9.87398 47.692C10.9072 51.7962 12.7711 55.6448 15.3506 59C12.6353 54.3146 11.2049 48.9954 11.204 43.58Z\"\n fill=\"white\"\n />\n <path\n d=\"M40 58.1469C43.3333 58.1469 46 53.5802 46 47.9436C46 42.3069 43.3067 37.7402 40 37.7402C36.6933 37.7402 34 42.3102 34 47.9436C34 53.5769 36.6667 58.1469 40 58.1469Z\"\n fill=\"#333333\"\n />\n <path\n d=\"M45.0763 53.4168C40.6863 51.0035 37.113 52.3735 35.043 53.7502C36.1296 56.4168 37.943 58.1635 39.9963 58.1635C42.1363 58.1535 43.9996 56.2635 45.0763 53.4168Z\"\n fill=\"#F84D4F\"\n />\n <path\n d=\"M29.6913 33.373L20.918 38.9564L21.1413 67.4864C23.7747 69.2998 26.6568 70.7224 29.698 71.7097L29.6913 33.373ZM50.3313 33.373L59.0913 38.9564L58.8746 67.4864C56.2413 69.2998 53.3591 70.7224 50.318 71.7097L50.3313 33.373Z\"\n fill=\"#21D2C5\"\n />\n <path\n d=\"M22.0217 39.9506C21.7281 39.9495 21.4421 39.8572 21.2032 39.6864C20.9643 39.5156 20.7844 39.2748 20.6884 38.9973C20.5918 38.7187 20.5848 38.4168 20.6684 38.134C20.7531 37.8525 20.9218 37.6037 21.1517 37.4206L25.9617 33.6673L21.0017 30.754C20.7618 30.6135 20.5684 30.4055 20.4459 30.1559C20.3233 29.9063 20.2769 29.6261 20.3124 29.3503C20.3479 29.0745 20.4639 28.8153 20.6457 28.6049C20.8276 28.3946 21.0673 28.2424 21.3351 28.1673C21.6986 28.0738 22.0844 28.1277 22.4084 28.3173L29.1817 32.294C29.3803 32.4109 29.5474 32.5745 29.6684 32.7706C29.7911 32.9687 29.8632 33.1939 29.8784 33.4265C29.8935 33.659 29.8511 33.8917 29.7551 34.104C29.6613 34.3147 29.517 34.499 29.3351 34.6406L22.8851 39.6673C22.6373 39.856 22.3332 39.9558 22.0217 39.9506ZM57.9817 39.9506C57.6662 39.9515 57.3596 39.8458 57.1117 39.6506L50.6684 34.6306C50.4845 34.4879 50.3381 34.3025 50.2417 34.0906C50.0963 33.7713 50.0751 33.4092 50.1824 33.0751C50.2896 32.7411 50.5176 32.459 50.8217 32.284L57.5817 28.304C57.7426 28.1992 57.9228 28.1278 58.1118 28.094C58.3007 28.0602 58.4946 28.0648 58.6817 28.1073C58.869 28.1498 59.0451 28.2316 59.1984 28.3473C59.3536 28.4595 59.4841 28.6025 59.5817 28.7673C59.6787 28.9331 59.741 29.1168 59.7651 29.3073C59.7895 29.4977 59.7749 29.691 59.7222 29.8755C59.6695 30.0601 59.5797 30.2319 59.4584 30.3806C59.3341 30.5324 59.1783 30.6552 59.0017 30.7406L54.0417 33.6673L58.8484 37.414C59.0217 37.5492 59.161 37.7229 59.2554 37.9214C59.3497 38.1199 59.3965 38.3376 59.3919 38.5573C59.3874 38.777 59.3317 38.9927 59.2293 39.1871C59.1268 39.3815 58.9804 39.5494 58.8017 39.6773C58.5626 39.8488 58.2761 39.942 57.9817 39.944V39.9506Z\"\n fill=\"#333333\"\n />\n </svg>\n </div>\n </div>\n\n {/* \u6807\u9898 */}\n <Heading size={2} id=\"error-modal-title\" className=\"text-center tracking-[-0.32px] text-[#1D1D1F]\">\n {displayTitle}\n </Heading>\n\n {/* \u9519\u8BEF\u6D88\u606F */}\n <p className=\"laptop:text-[16px] mb-6 text-wrap break-words text-center text-[14px] font-[700] text-[#1D1D1F]\">\n {displayMessage}\n </p>\n\n {/* \u786E\u8BA4\u6309\u94AE */}\n <Button onClick={onClose} className=\"w-full\">\n {confirmText}\n </Button>\n </div>\n </BaseModal>\n )\n}\n\nexport default ErrorModal\n"],
5
+ "mappings": "aA8GY,OACE,OAAAA,EADF,QAAAC,MAAA,oBAnGZ,MAAkB,QAClB,OAAS,aAAAC,MAAiB,iBAC1B,OAAS,WAAAC,EAAS,UAAAC,MAAc,4BAmEzB,MAAMC,EAAwC,CAAC,CACpD,OAAAC,EACA,QAAAC,EACA,MAAAC,EAAQ,kCACR,QAAAC,EACA,YAAAC,EAAc,YACd,UAAAC,EACA,MAAAC,EAAQ,QACR,oBAAAC,EACA,sBAAAC,EACA,iBAAAC,EAAmB,EACrB,IAAM,CAEJ,MAAMC,EAAeD,GAAoBF,EAAsBA,EAAsBL,EAC/ES,EAAiBF,GAAoBD,EAAwBA,EAAwBL,EAC3F,OACET,EAACE,EAAA,CACC,OAAQI,EACR,QAASC,EACT,SAAS,qCACT,WAAW,WAEX,UAAW,GAAGI,GAAa,EAAE,GAC7B,eAAe,oBACf,MAAOC,EAEP,SAAAX,EAAC,OAAI,UAAU,oCAEb,UAAAD,EAAC,OAAI,UAAU,2BACb,SAAAA,EAAC,OAAI,UAAU,4DACb,SAAAC,EAAC,OAAI,MAAM,6BAA6B,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OACtF,UAAAD,EAAC,QACC,EAAE,2kBACF,KAAK,UACP,EACAA,EAAC,QACC,EAAE,4kBACF,KAAK,UACP,EACAA,EAAC,QACC,QAAQ,MACR,EAAE,2mBACF,KAAK,QACP,EACAA,EAAC,QACC,EAAE,uKACF,KAAK,UACP,EACAA,EAAC,QACC,EAAE,iKACF,KAAK,UACP,EACAA,EAAC,QACC,EAAE,8NACF,KAAK,UACP,EACAA,EAAC,QACC,EAAE,ymDACF,KAAK,UACP,GACF,EACF,EACF,EAGAA,EAACG,EAAA,CAAQ,KAAM,EAAG,GAAG,oBAAoB,UAAU,gDAChD,SAAAa,EACH,EAGAhB,EAAC,KAAE,UAAU,kGACV,SAAAiB,EACH,EAGAjB,EAACI,EAAA,CAAO,QAASG,EAAS,UAAU,SACjC,SAAAG,EACH,GACF,EACF,CAEJ,EAEA,IAAOQ,EAAQb",
6
6
  "names": ["jsx", "jsxs", "BaseModal", "Heading", "Button", "ErrorModal", "isOpen", "onClose", "title", "message", "confirmText", "className", "theme", "exchangeFailedTitle", "exchangeFailedMessage", "isExchangeFailed", "displayTitle", "displayMessage", "ErrorModal_default"]
7
7
  }
@@ -94,38 +94,38 @@ export interface MyRewardsModalProps {
94
94
  */
95
95
  emptyText?: string;
96
96
  /**
97
- * 复制失败提示文案
97
+ * 主题模式
98
+ * @default 'light'
99
+ */
100
+ theme?: 'light' | 'dark';
101
+ /**
102
+ * 复制失败提示文案(来自 CMS myRewardsModalConfig.copyError)
98
103
  * @optional
99
104
  */
100
105
  copyError?: string;
101
106
  /**
102
- * 可用状态文案
103
- * @default "Available"
107
+ * 可用状态标签文案(来自 CMS myRewardsModalConfig.availableText)
108
+ * @default 'Available'
104
109
  * @optional
105
110
  */
106
111
  availableText?: string;
107
112
  /**
108
- * 已使用状态文案
109
- * @default "Used"
113
+ * 已使用状态标签文案(来自 CMS myRewardsModalConfig.usedStatusText)
114
+ * @default 'Used'
110
115
  * @optional
111
116
  */
112
117
  usedStatusText?: string;
113
118
  /**
114
- * 已过期状态文案
115
- * @default "Expired"
119
+ * 已过期状态标签文案(来自 CMS myRewardsModalConfig.expiredText)
120
+ * @default 'Expired'
116
121
  * @optional
117
122
  */
118
123
  expiredText?: string;
119
124
  /**
120
- * 未知状态文案
125
+ * 未找到状态标签文案(来自 CMS myRewardsModalConfig.notFoundText)
121
126
  * @optional
122
127
  */
123
128
  notFoundText?: string;
124
- /**
125
- * 主题模式
126
- * @default 'light'
127
- */
128
- theme?: 'light' | 'dark';
129
129
  }
130
130
  /**
131
131
  * MyRewardsModal 我的奖励弹窗组件
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{useState as c,useRef as P,useEffect as q}from"react";import{cn as i}from"../../helpers/index.js";import{BaseModal as A}from"./BaseModal.js";const B=({isOpen:x,onClose:u,title:d="My Rewards",rewards:r,onCopyCode:m,className:g,codeText:f="CODE:",copyText:b="COPY",copiedText:y="COPIED",prizeText:v="Prize time:",emptyText:T="No rewards yet",copyError:h,availableText:C="Available",usedStatusText:N="Used",expiredText:R="Expired",notFoundText:S,theme:E="light"})=>{const M=e=>{switch(e){case"Available":return C;case"Used":return N;case"Expired":return R;default:return S??e}},[O,n]=c({}),[k,l]=c({}),s=P({});q(()=>()=>{Object.values(s.current).forEach(e=>clearTimeout(e))},[]);const z=async(e,p)=>{s.current[e]&&clearTimeout(s.current[e]);try{await navigator.clipboard.writeText(p),m?.(p),n(t=>({...t,[e]:!0})),l(t=>({...t,[e]:!1})),s.current[e]=setTimeout(()=>{n(t=>({...t,[e]:!1})),delete s.current[e]},3e3)}catch{l(t=>({...t,[e]:!0})),n(t=>({...t,[e]:!1})),s.current[e]=setTimeout(()=>{l(t=>({...t,[e]:!1})),delete s.current[e]},3e3)}};return a(A,{isOpen:x,onClose:u,maxWidth:"max-w-[480px] laptop:max-w-[520px]",background:"bg-white",className:g,title:d,ariaLabelledBy:"rewards-modal-title",theme:E,children:a("div",{className:"laptop:px-8 laptop:pb-8 p-4",children:a("div",{className:"flex max-h-[584px] flex-col gap-2 overflow-y-auto",children:r.length===0?a("p",{className:"py-8 text-center text-[14px] text-gray-500",children:T}):r.map(e=>a("div",{className:i("rounded-box","bg-container-secondary-0 relative flex-none overflow-hidden","px-4 py-6"),children:o("div",{className:"tablet:text-[16px] tablet:flex items-center justify-between gap-2 text-[14px] font-[700]",children:[o("div",{className:"flex-1",children:[a("p",{className:i("mb-1 font-[700]",e?.available?"text-info-primary":"text-info-quaternary"),children:e.name}),e.code&&o("div",{className:i("flex items-center gap-2",e?.available?"text-brand-0":"text-info-quaternary"),children:[o("p",{className:"max-w-[200px] truncate",children:[f," ",e.code]}),e.showCopyCode&&e?.available&&a("button",{onClick:()=>z(e.id,e.code),className:"underline",children:k[e.id]?h??"Copy failed":O[e.id]?y:b})]})]}),e.prizeTime&&o("div",{className:i("tablet:block text-info-quaternary flex gap-1 text-[14px] font-[700]"),children:[a("p",{children:v}),a("p",{children:e.prizeTime})]}),a("span",{className:i("rounded-[0_8px] px-[6px] text-[14px] font-[700]","absolute right-0 top-0",e?.available?"bg-brand-0 text-info-white":"bg-info-quaternary text-info-white"),children:e.statusText??M(e.status)})]})},e.id))})})})};var j=B;export{B as MyRewardsModal,j as default};
1
+ "use client";import{jsx as a,jsxs as s}from"react/jsx-runtime";import{useState as c,useRef as P,useEffect as q}from"react";import{cn as o}from"../../helpers/index.js";import{BaseModal as A}from"./BaseModal.js";const B=({isOpen:x,onClose:u,title:d="My Rewards",rewards:r,onCopyCode:m,className:g,codeText:f="CODE:",copyText:b="COPY",copiedText:y="COPIED",prizeText:v="Prize time:",emptyText:T="No rewards yet",copyError:h,availableText:C="Available",usedStatusText:N="Used",expiredText:R="Expired",notFoundText:S,theme:E="light"})=>{const[M,n]=c({}),[O,l]=c({}),i=P({});q(()=>()=>{Object.values(i.current).forEach(e=>clearTimeout(e))},[]);const k=async(e,p)=>{i.current[e]&&clearTimeout(i.current[e]);try{await navigator.clipboard.writeText(p),m?.(p),n(t=>({...t,[e]:!0})),l(t=>({...t,[e]:!1})),i.current[e]=setTimeout(()=>{n(t=>({...t,[e]:!1})),delete i.current[e]},3e3)}catch{l(t=>({...t,[e]:!0})),n(t=>({...t,[e]:!1})),i.current[e]=setTimeout(()=>{l(t=>({...t,[e]:!1})),delete i.current[e]},3e3)}},z=e=>{switch(e){case"Available":return C??e;case"Used":return N??e;case"Expired":return R??e;default:return S??e}};return a(A,{isOpen:x,onClose:u,maxWidth:"max-w-[480px] laptop:max-w-[520px]",background:"bg-white",className:g,title:d,ariaLabelledBy:"rewards-modal-title",theme:E,children:a("div",{className:"laptop:px-8 laptop:pb-8 p-4",children:a("div",{className:"flex max-h-[584px] flex-col gap-2 overflow-y-auto",children:r.length===0?a("p",{className:"py-8 text-center text-[14px] text-gray-500",children:T}):r.map(e=>a("div",{className:o("rounded-box","bg-container-secondary-0 relative flex-none overflow-hidden","px-4 py-6"),children:s("div",{className:"tablet:text-[16px] tablet:flex items-center justify-between gap-2 text-[14px] font-[700]",children:[s("div",{className:"flex-1",children:[a("p",{className:o("mb-1 font-[700]",e?.available?"text-info-primary":"text-info-quaternary"),children:e.name}),e.code&&s("div",{className:o("flex items-center gap-2",e?.available?"text-brand-0":"text-info-quaternary"),children:[s("p",{className:"max-w-[200px] truncate",children:[f," ",e.code]}),e.showCopyCode&&e?.available&&a("button",{onClick:()=>k(e.id,e.code),className:"underline",children:O[e.id]?h??"Copy failed":M[e.id]?y:b})]})]}),e.prizeTime&&s("div",{className:o("tablet:block text-info-quaternary flex gap-1 text-[14px] font-[700]"),children:[a("p",{children:v}),a("p",{children:e.prizeTime})]}),a("span",{className:o("rounded-[0_8px] px-[6px] text-[14px] font-[700]","absolute right-0 top-0",e?.available?"bg-brand-0 text-info-white":"bg-info-quaternary text-info-white"),children:e.statusText??z(e.status)})]})},e.id))})})})};var j=B;export{B as MyRewardsModal,j as default};
2
2
  //# sourceMappingURL=MyRewardsModal.js.map