@anker-in/headless-ui 1.1.73 → 1.1.74

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 (220) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.d.ts +1 -39
  2. package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
  3. package/dist/cjs/biz-components/AccordionCards/index.js.map +2 -2
  4. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  5. package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
  6. package/dist/cjs/biz-components/AplusDesc/index.d.ts +1 -20
  7. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.d.ts +1 -5
  8. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  9. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  10. package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +1 -5
  11. package/dist/cjs/biz-components/Category/index.d.ts +1 -4
  12. package/dist/cjs/biz-components/Category/index.js +1 -1
  13. package/dist/cjs/biz-components/Category/index.js.map +2 -2
  14. package/dist/cjs/biz-components/CreativeModule/index.d.ts +1 -10
  15. package/dist/cjs/biz-components/DownLoad/index.d.ts +1 -9
  16. package/dist/cjs/biz-components/Evaluate/index.d.ts +1 -4
  17. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  18. package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
  19. package/dist/cjs/biz-components/Faq/Faq.d.ts +2 -6
  20. package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +1 -6
  21. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +1 -6
  22. package/dist/cjs/biz-components/FeaturedBlogPosts/index.js +1 -1
  23. package/dist/cjs/biz-components/FeaturedBlogPosts/index.js.map +2 -2
  24. package/dist/cjs/biz-components/Features/index.d.ts +1 -11
  25. package/dist/cjs/biz-components/FootCharger/index.d.ts +1 -10
  26. package/dist/cjs/biz-components/FooterNavigation/index.d.ts +1 -5
  27. package/dist/cjs/biz-components/GiftBox/index.d.ts +1 -10
  28. package/dist/cjs/biz-components/Graphic/index.d.ts +1 -4
  29. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  30. package/dist/cjs/biz-components/Graphic/index.js.map +3 -3
  31. package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +1 -4
  32. package/dist/cjs/biz-components/GraphicMore/index.d.ts +1 -10
  33. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -13
  34. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  35. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  36. package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +1 -6
  37. package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +1 -8
  38. package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
  39. package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js.map +2 -2
  40. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +1 -6
  41. package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +1 -6
  42. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  43. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  44. package/dist/cjs/biz-components/Ksp/index.d.ts +1 -4
  45. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +1 -14
  46. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -29
  47. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -4
  48. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -4
  49. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -4
  50. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -4
  51. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -4
  52. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -4
  53. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -4
  54. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +1 -5
  55. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +2 -6
  56. package/dist/cjs/biz-components/MarqueeReview/index.d.ts +1 -4
  57. package/dist/cjs/biz-components/MediaEndorsement/index.js +3 -3
  58. package/dist/cjs/biz-components/MediaEndorsement/index.js.map +2 -2
  59. package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +1 -5
  60. package/dist/cjs/biz-components/MediaPlayerBase/types.d.ts +1 -1
  61. package/dist/cjs/biz-components/MediaPlayerBase/types.js.map +1 -1
  62. package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +1 -5
  63. package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
  64. package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
  65. package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +1 -8
  66. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +1 -5
  67. package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.d.ts +2 -2
  68. package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js +1 -1
  69. package/dist/cjs/biz-components/MediaSceneSwitcherV2/index.js.map +3 -3
  70. package/dist/cjs/biz-components/MemberEquity/index.d.ts +1 -6
  71. package/dist/cjs/biz-components/MemberEquity/index.js +2 -2
  72. package/dist/cjs/biz-components/MemberEquity/index.js.map +3 -3
  73. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -20
  74. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  75. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  76. package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -4
  77. package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +1 -6
  78. package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +1 -5
  79. package/dist/cjs/biz-components/PromotionalBar/index.d.ts +1 -4
  80. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  81. package/dist/cjs/biz-components/SecondaryBanner/index.js.map +3 -3
  82. package/dist/cjs/biz-components/SelectStore/index.d.ts +1 -10
  83. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +1 -6
  84. package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
  85. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +3 -3
  86. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +10 -1
  87. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  88. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +1 -1
  89. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  90. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  91. package/dist/cjs/biz-components/Slogan/index.d.ts +1 -6
  92. package/dist/cjs/biz-components/Spacer/index.d.ts +1 -6
  93. package/dist/cjs/biz-components/Specs/index.d.ts +1 -4
  94. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +1 -6
  95. package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +1 -6
  96. package/dist/cjs/biz-components/Tabs/Tabs.d.ts +1 -6
  97. package/dist/cjs/biz-components/TabsGroup/index.d.ts +1 -6
  98. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +1 -6
  99. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +1 -6
  100. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  101. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  102. package/dist/cjs/biz-components/Title/index.d.ts +1 -4
  103. package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +1 -6
  104. package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +2 -6
  105. package/dist/cjs/helpers/utils.d.ts +44 -2
  106. package/dist/cjs/helpers/utils.js +1 -1
  107. package/dist/cjs/helpers/utils.js.map +3 -3
  108. package/dist/cjs/shared/Styles.d.ts +1 -4
  109. package/dist/cjs/shared/Styles.js +1 -1
  110. package/dist/cjs/shared/Styles.js.map +3 -3
  111. package/dist/esm/biz-components/AccordionCards/index.d.ts +1 -39
  112. package/dist/esm/biz-components/AccordionCards/index.js +1 -1
  113. package/dist/esm/biz-components/AccordionCards/index.js.map +2 -2
  114. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  115. package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
  116. package/dist/esm/biz-components/AplusDesc/index.d.ts +1 -20
  117. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.d.ts +1 -5
  118. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  119. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  120. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +1 -5
  121. package/dist/esm/biz-components/Category/index.d.ts +1 -4
  122. package/dist/esm/biz-components/Category/index.js +1 -1
  123. package/dist/esm/biz-components/Category/index.js.map +2 -2
  124. package/dist/esm/biz-components/CreativeModule/index.d.ts +1 -10
  125. package/dist/esm/biz-components/DownLoad/index.d.ts +1 -9
  126. package/dist/esm/biz-components/Evaluate/index.d.ts +1 -4
  127. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  128. package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
  129. package/dist/esm/biz-components/Faq/Faq.d.ts +2 -6
  130. package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +1 -6
  131. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +1 -6
  132. package/dist/esm/biz-components/FeaturedBlogPosts/index.js +1 -1
  133. package/dist/esm/biz-components/FeaturedBlogPosts/index.js.map +2 -2
  134. package/dist/esm/biz-components/Features/index.d.ts +1 -11
  135. package/dist/esm/biz-components/FootCharger/index.d.ts +1 -10
  136. package/dist/esm/biz-components/FooterNavigation/index.d.ts +1 -5
  137. package/dist/esm/biz-components/GiftBox/index.d.ts +1 -10
  138. package/dist/esm/biz-components/Graphic/index.d.ts +1 -4
  139. package/dist/esm/biz-components/Graphic/index.js +1 -1
  140. package/dist/esm/biz-components/Graphic/index.js.map +3 -3
  141. package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +1 -4
  142. package/dist/esm/biz-components/GraphicMore/index.d.ts +1 -10
  143. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -13
  144. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  145. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  146. package/dist/esm/biz-components/HeaderNavigation/index.d.ts +1 -6
  147. package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +1 -8
  148. package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
  149. package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js.map +2 -2
  150. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +1 -6
  151. package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +1 -6
  152. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  153. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  154. package/dist/esm/biz-components/Ksp/index.d.ts +1 -4
  155. package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +1 -14
  156. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +1 -29
  157. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -4
  158. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +1 -4
  159. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +1 -4
  160. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +1 -4
  161. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +1 -4
  162. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +1 -4
  163. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +1 -4
  164. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +1 -5
  165. package/dist/esm/biz-components/Marquee/Marquee.d.ts +2 -6
  166. package/dist/esm/biz-components/MarqueeReview/index.d.ts +1 -4
  167. package/dist/esm/biz-components/MediaEndorsement/index.js +3 -3
  168. package/dist/esm/biz-components/MediaEndorsement/index.js.map +2 -2
  169. package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +1 -5
  170. package/dist/esm/biz-components/MediaPlayerBase/types.d.ts +1 -1
  171. package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +1 -5
  172. package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
  173. package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
  174. package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +1 -8
  175. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +1 -5
  176. package/dist/esm/biz-components/MediaSceneSwitcherV2/index.d.ts +2 -2
  177. package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js +1 -1
  178. package/dist/esm/biz-components/MediaSceneSwitcherV2/index.js.map +3 -3
  179. package/dist/esm/biz-components/MemberEquity/index.d.ts +1 -6
  180. package/dist/esm/biz-components/MemberEquity/index.js +2 -2
  181. package/dist/esm/biz-components/MemberEquity/index.js.map +3 -3
  182. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -20
  183. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  184. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  185. package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -4
  186. package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +1 -6
  187. package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +1 -5
  188. package/dist/esm/biz-components/PromotionalBar/index.d.ts +1 -4
  189. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  190. package/dist/esm/biz-components/SecondaryBanner/index.js.map +3 -3
  191. package/dist/esm/biz-components/SelectStore/index.d.ts +1 -10
  192. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +1 -6
  193. package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
  194. package/dist/esm/biz-components/ShelfDisplay/index.js.map +3 -3
  195. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +10 -1
  196. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  197. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +1 -1
  198. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  199. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  200. package/dist/esm/biz-components/Slogan/index.d.ts +1 -6
  201. package/dist/esm/biz-components/Spacer/index.d.ts +1 -6
  202. package/dist/esm/biz-components/Specs/index.d.ts +1 -4
  203. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +1 -6
  204. package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +1 -6
  205. package/dist/esm/biz-components/Tabs/Tabs.d.ts +1 -6
  206. package/dist/esm/biz-components/TabsGroup/index.d.ts +1 -6
  207. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +1 -6
  208. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +1 -6
  209. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  210. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  211. package/dist/esm/biz-components/Title/index.d.ts +1 -4
  212. package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +1 -6
  213. package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +2 -6
  214. package/dist/esm/helpers/utils.d.ts +44 -2
  215. package/dist/esm/helpers/utils.js +1 -1
  216. package/dist/esm/helpers/utils.js.map +3 -3
  217. package/dist/esm/shared/Styles.d.ts +1 -4
  218. package/dist/esm/shared/Styles.js +1 -1
  219. package/dist/esm/shared/Styles.js.map +3 -3
  220. package/package.json +1 -1
@@ -1,5 +1,2 @@
1
- declare const _default: import("react").ForwardRefExoticComponent<{
2
- style?: string | React.CSSProperties;
3
- container?: import("../../../../../../shared/Styles.js").ContainerProps["container"];
4
- } & import("react").RefAttributes<any>>;
1
+ declare const _default: any;
5
2
  export default _default;
@@ -1,5 +1,2 @@
1
- declare const _default: import("react").ForwardRefExoticComponent<{
2
- style?: string | React.CSSProperties;
3
- container?: import("../../../../../../shared/Styles.js").ContainerProps["container"];
4
- } & import("react").RefAttributes<any>>;
1
+ declare const _default: any;
5
2
  export default _default;
@@ -1,5 +1,2 @@
1
- declare const _default: import("react").ForwardRefExoticComponent<{
2
- style?: string | React.CSSProperties;
3
- container?: import("../../../../../../shared/Styles.js").ContainerProps["container"];
4
- } & import("react").RefAttributes<any>>;
1
+ declare const _default: any;
5
2
  export default _default;
@@ -1,5 +1,2 @@
1
- declare const _default: import("react").ForwardRefExoticComponent<{
2
- style?: string | React.CSSProperties;
3
- container?: import("../../../../../../shared/Styles.js").ContainerProps["container"];
4
- } & import("react").RefAttributes<any>>;
1
+ declare const _default: any;
5
2
  export default _default;
@@ -1,8 +1,5 @@
1
1
  export interface ProductGalleryTabRef {
2
2
  scrollToTab: (index: number) => void;
3
3
  }
4
- declare const _default: import("react").ForwardRefExoticComponent<{
5
- style?: string | React.CSSProperties;
6
- container?: import("../../../../../shared/Styles.js").ContainerProps["container"];
7
- } & import("react").RefAttributes<any>>;
4
+ declare const _default: any;
8
5
  export default _default;
@@ -1,5 +1,2 @@
1
- declare const _default: import("react").ForwardRefExoticComponent<{
2
- style?: string | React.CSSProperties;
3
- container?: import("../../../../../shared/Styles.js").ContainerProps["container"];
4
- } & import("react").RefAttributes<any>>;
1
+ declare const _default: any;
5
2
  export default _default;
@@ -1,6 +1,2 @@
1
- import type { PurchaseBarProps } from './types.js';
2
- declare const _default: import("react").ForwardRefExoticComponent<PurchaseBarProps & {
3
- style?: string | React.CSSProperties;
4
- container?: import("../../../../shared/Styles.js").ContainerProps["container"];
5
- } & import("react").RefAttributes<any>>;
1
+ declare const _default: any;
6
2
  export default _default;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import type { MarqueeProps, MarqueeItemProps, MarqueeImageContentProps, MarqueeTextContentProps } from './type.js';
3
- import { type SwiperRef } from 'swiper/react';
2
+ import type { MarqueeItemProps, MarqueeImageContentProps, MarqueeTextContentProps } from './type.js';
4
3
  declare const MarqueeItem: {
5
4
  ({ data, configuration }: MarqueeItemProps): import("react/jsx-runtime").JSX.Element;
6
5
  displayName: string;
@@ -10,9 +9,6 @@ declare const MarqueeImageContent: {
10
9
  displayName: string;
11
10
  };
12
11
  declare const MarqueeTextContent: React.ForwardRefExoticComponent<MarqueeTextContentProps & React.RefAttributes<HTMLDivElement>>;
13
- declare const _default: React.ForwardRefExoticComponent<Omit<MarqueeProps & React.RefAttributes<SwiperRef> & {
14
- style?: string | React.CSSProperties;
15
- container?: import("../../shared/Styles.js").ContainerProps["container"];
16
- }, "ref"> & React.RefAttributes<any>>;
12
+ declare const _default: any;
17
13
  export default _default;
18
14
  export { MarqueeItem, MarqueeImageContent, MarqueeTextContent };
@@ -33,8 +33,5 @@ export interface MarqueeReviewProps extends React.HTMLAttributes<HTMLElement> {
33
33
  /** 评论数据 */
34
34
  data: MarqueeReviewData;
35
35
  }
36
- declare const _default: React.ForwardRefExoticComponent<MarqueeReviewProps & {
37
- style?: string | React.CSSProperties;
38
- container?: import("../../shared/Styles.js").ContainerProps["container"];
39
- } & React.RefAttributes<any>>;
36
+ declare const _default: any;
40
37
  export default _default;
@@ -1,4 +1,4 @@
1
- "use strict";"use client";var R=Object.create;var u=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var L=(t,e)=>{for(var a in e)u(t,a,{get:e[a],enumerable:!0})},v=(t,e,a,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of j(e))!H.call(t,s)&&s!==a&&u(t,s,{get:()=>e[s],enumerable:!(n=V(e,s))||n.enumerable});return t};var _=(t,e,a)=>(a=t!=null?R(A(t)):{},v(e||!t||!t.__esModule?u(a,"default",{value:t,enumerable:!0}):a,t)),q=t=>v(u({},"__esModule",{value:!0}),t);var O={};L(O,{default:()=>G});module.exports=q(O);var r=require("react/jsx-runtime"),x=_(require("react")),y=require("class-variance-authority"),l=require("swiper/react"),m=require("swiper/modules"),E=require("react-responsive"),J=require("swiper/css/pagination"),d=require("../../helpers/index.js"),p=require("../../index.js");const M=3;function Q(t,e){const a=[];for(let n=0;n<t.length;n+=e)a.push(t.slice(n,n+e));return a}const F=(0,y.cva)("rounded-box lg-desktop:h-[240px] desktop:px-6 bg-container-secondary-0 flex h-[200px] flex-col justify-start gap-[28px] p-4",{variants:{theme:{light:"",dark:""},rounded:{true:"rounded-card",false:""}},defaultVariants:{theme:"light",rounded:!1}}),k=x.forwardRef(({className:t,classNames:e={},data:a,onItemClick:n,...s},S)=>{const{title:f,subtitle:b,items:g,theme:h="light",rounded:N=!1,layout:I="grid"}=a,T=(0,E.useMediaQuery)({query:"(max-width: 767px)"}),D=x.useCallback((i,o)=>c=>{n?.(i,o,c)},[n]),w=(i,o)=>(0,r.jsxs)("div",{className:(0,d.cn)("media-endorsement-card text-info-primary",F({theme:h,rounded:N}),e.card),onClick:D(i,o),"aria-label":i.mediaName?`${i.mediaName} endorsement`:void 0,children:[(0,r.jsx)("div",{className:(0,d.cn)("media-endorsement-card-icon rounded-full","lg-desktop::size-14 flex size-12 items-center justify-center overflow-hidden",e.cardIcon),children:(0,r.jsx)("img",{src:i.icon.url,alt:i.icon.alt||i.mediaName||"Media logo",className:"size-full object-contain",loading:"lazy"})}),(0,r.jsx)(p.Heading,{size:2,as:"h6",className:(0,d.cn)("media-endorsement-card-quote line-clamp-4",e.cardQuote),children:i.text})]},o),P=()=>{const i=Q(g,M);return(0,r.jsx)(l.Swiper,{className:(0,d.cn)("media-endorsement-mobile-swiper","w-full !overflow-visible pb-8",e.carousel),modules:[m.Pagination],slidesPerView:1,spaceBetween:12,pagination:{clickable:!0,bulletClass:"media-endorsement-bullet",bulletActiveClass:"media-endorsement-bullet-active"},children:i.map((o,c)=>(0,r.jsx)(l.SwiperSlide,{className:"!h-auto",children:(0,r.jsx)("div",{className:"flex flex-col gap-3",children:o.map((z,C)=>{const B=c*M+C;return w(z,B)})})},c))})};return(0,r.jsxs)("div",{ref:S,className:(0,d.cn)("media-endorsement-root text-info-primary overflow-y-visible","w-full",t,e.root,{"aiui-dark":h==="dark"}),...s,children:[(0,r.jsx)("style",{children:`
1
+ "use strict";"use client";var R=Object.create;var u=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var L=(t,e)=>{for(var i in e)u(t,i,{get:e[i],enumerable:!0})},v=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of j(e))!H.call(t,s)&&s!==i&&u(t,s,{get:()=>e[s],enumerable:!(n=V(e,s))||n.enumerable});return t};var _=(t,e,i)=>(i=t!=null?R(A(t)):{},v(e||!t||!t.__esModule?u(i,"default",{value:t,enumerable:!0}):i,t)),q=t=>v(u({},"__esModule",{value:!0}),t);var O={};L(O,{default:()=>G});module.exports=q(O);var r=require("react/jsx-runtime"),x=_(require("react")),y=require("class-variance-authority"),l=require("swiper/react"),m=require("swiper/modules"),E=require("react-responsive"),J=require("swiper/css/pagination"),d=require("../../helpers/index.js"),p=require("../../index.js");const M=3;function Q(t,e){const i=[];for(let n=0;n<t.length;n+=e)i.push(t.slice(n,n+e));return i}const F=(0,y.cva)("rounded-box lg-desktop:h-[240px] desktop:px-6 bg-container-secondary-0 flex h-[200px] flex-col justify-start gap-[26px] p-4",{variants:{theme:{light:"",dark:""},rounded:{true:"rounded-card",false:""}},defaultVariants:{theme:"light",rounded:!1}}),k=x.forwardRef(({className:t,classNames:e={},data:i,onItemClick:n,...s},S)=>{const{title:f,subtitle:b,items:g,theme:h="light",rounded:N=!1,layout:I="grid"}=i,T=(0,E.useMediaQuery)({query:"(max-width: 767px)"}),D=x.useCallback((a,o)=>c=>{n?.(a,o,c)},[n]),w=(a,o)=>(0,r.jsxs)("div",{className:(0,d.cn)("media-endorsement-card text-info-primary",F({theme:h,rounded:N}),e.card),onClick:D(a,o),"aria-label":a.mediaName?`${a.mediaName} endorsement`:void 0,children:[(0,r.jsx)("div",{className:(0,d.cn)("media-endorsement-card-icon rounded-full","lg-desktop::size-14 flex size-12 items-center justify-center overflow-hidden",e.cardIcon),children:(0,r.jsx)("img",{src:a.icon.url,alt:a.icon.alt||a.mediaName||"Media logo",className:"size-full object-contain",loading:"lazy"})}),(0,r.jsx)(p.Heading,{size:2,as:"h6",className:(0,d.cn)("media-endorsement-card-quote line-clamp-4",e.cardQuote),children:a.text})]},o),P=()=>{const a=Q(g,M);return(0,r.jsx)(l.Swiper,{className:(0,d.cn)("media-endorsement-mobile-swiper","w-full !overflow-visible pb-8",e.carousel),modules:[m.Pagination],slidesPerView:1,spaceBetween:12,pagination:{clickable:!0,bulletClass:"media-endorsement-bullet",bulletActiveClass:"media-endorsement-bullet-active"},children:a.map((o,c)=>(0,r.jsx)(l.SwiperSlide,{className:"!h-auto",children:(0,r.jsx)("div",{className:"flex flex-col gap-3",children:o.map((z,C)=>{const B=c*M+C;return w(z,B)})})},c))})};return(0,r.jsxs)("div",{ref:S,className:(0,d.cn)("media-endorsement-root text-info-primary","w-full",t,e.root,{"aiui-dark":h==="dark"}),...s,children:[(0,r.jsx)("style",{children:`
2
2
  .media-endorsement-bullet {
3
3
  display: inline-block;
4
4
  width: 8px;
@@ -14,10 +14,10 @@
14
14
  }
15
15
  .media-endorsement-mobile-swiper .swiper-pagination {
16
16
  position: absolute;
17
- bottom: -32px;
17
+ bottom: -28px;
18
18
  left: 0;
19
19
  right: 0;
20
20
  text-align: center;
21
21
  }
22
- `}),(f||b)&&(0,r.jsxs)("div",{className:(0,d.cn)("media-endorsement-header mb-6",e.header),children:[f&&(0,r.jsx)(p.Heading,{as:"h2",size:4,html:f,className:(0,d.cn)("media-endorsement-title",e.title)}),b&&(0,r.jsx)(p.Text,{as:"p",size:3,className:(0,d.cn)("",e?.subtitle),html:b})]}),I==="carousel"?(0,r.jsx)(l.Swiper,{className:(0,d.cn)("media-endorsement-carousel","w-full !overflow-visible",e.carousel),modules:[m.FreeMode,m.Mousewheel],freeMode:!0,mousewheel:{forceToAxis:!0},slidesPerView:"auto",spaceBetween:12,breakpoints:{768:{spaceBetween:16}},children:g.map((i,o)=>(0,r.jsx)(l.SwiperSlide,{className:"tablet:!w-[320px] laptop:!w-[360px] desktop:!w-[404px] !w-[280px]",children:w(i,o)},o))}):T?P():(0,r.jsx)("div",{className:(0,d.cn)("media-endorsement-grid","laptop:grid-cols-2 laptop:gap-4 desktop:grid-cols-3 grid grid-cols-1 gap-3",e.grid),children:g.map((i,o)=>w(i,o))})]})});k.displayName="MediaEndorsement";var G=k;
22
+ `}),(f||b)&&(0,r.jsxs)("div",{className:(0,d.cn)("media-endorsement-header mb-6",e.header),children:[f&&(0,r.jsx)(p.Heading,{as:"h2",size:4,html:f,className:(0,d.cn)("media-endorsement-title",e.title)}),b&&(0,r.jsx)(p.Text,{as:"p",size:3,className:(0,d.cn)("",e?.subtitle),html:b})]}),I==="carousel"?(0,r.jsx)(l.Swiper,{className:(0,d.cn)("media-endorsement-carousel","w-full !overflow-visible",e.carousel),modules:[m.FreeMode,m.Mousewheel],freeMode:!0,mousewheel:{forceToAxis:!0},slidesPerView:"auto",spaceBetween:12,breakpoints:{768:{spaceBetween:16}},children:g.map((a,o)=>(0,r.jsx)(l.SwiperSlide,{className:"tablet:!w-[320px] laptop:!w-[360px] desktop:!w-[404px] !w-[280px]",children:w(a,o)},o))}):T?P():(0,r.jsx)("div",{className:(0,d.cn)("media-endorsement-grid","laptop:grid-cols-2 laptop:gap-4 desktop:grid-cols-3 tablet:grid-cols-2 grid grid-cols-1 gap-3",e.grid),children:g.map((a,o)=>w(a,o))})]})});k.displayName="MediaEndorsement";var G=k;
23
23
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MediaEndorsement/index.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cva } from 'class-variance-authority'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { FreeMode, Mousewheel, Pagination } from 'swiper/modules'\nimport { useMediaQuery } from 'react-responsive'\nimport 'swiper/css/pagination'\nimport { cn } from '../../helpers/index.js'\nimport type {\n MediaEndorsementProps,\n MediaEndorsementData,\n MediaEndorsementItem,\n MediaEndorsementSemanticName,\n} from './types.js'\nimport { Heading, Text } from '../../index.js'\n\nconst MOBILE_ITEMS_PER_SLIDE = 3\n\n// Helper to chunk array into groups\nfunction chunkArray<T>(array: T[], size: number): T[][] {\n const result: T[][] = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\n/**\n * \u5361\u7247\u5BB9\u5668\u53D8\u4F53\n */\nconst cardVariants = cva(\n 'rounded-box lg-desktop:h-[240px] desktop:px-6 bg-container-secondary-0 flex h-[200px] flex-col justify-start gap-[28px] p-4',\n {\n variants: {\n theme: {\n light: '',\n dark: '',\n },\n rounded: {\n true: 'rounded-card',\n false: '',\n },\n },\n defaultVariants: {\n theme: 'light',\n rounded: false,\n },\n }\n)\n\n/**\n * MediaEndorsement - \u5A92\u4F53\u80CC\u4E66\n *\n * @description \u5A92\u4F53\u80CC\u4E66\u7EC4\u4EF6\u7684\u4F5C\u7528\u662F\u901A\u8FC7\u5C55\u793A\u7B2C\u4E09\u65B9\u5A92\u4F53\u7684\u8BC4\u4EF7\u6216\u62A5\u9053\uFF0C\u63D0\u5347\u54C1\u724C\u6216\u4EA7\u54C1\u7684\u53EF\u4FE1\u5EA6\u548C\u5F71\u54CD\u529B\n */\nconst MediaEndorsement = React.forwardRef<HTMLDivElement, MediaEndorsementProps>(\n ({ className, classNames = {}, data, onItemClick, ...props }, ref) => {\n const { title, subtitle, items, theme = 'light', rounded = false, layout = 'grid' } = data\n const isMobile = useMediaQuery({ query: '(max-width: 767px)' })\n\n const handleCardClick = React.useCallback(\n (item: MediaEndorsementItem, index: number) => (event: React.MouseEvent) => {\n onItemClick?.(item, index, event)\n },\n [onItemClick]\n )\n\n const renderCard = (item: MediaEndorsementItem, index: number) => (\n <div\n key={index}\n className={cn('media-endorsement-card text-info-primary', cardVariants({ theme, rounded }), classNames.card)}\n onClick={handleCardClick(item, index)}\n aria-label={item.mediaName ? `${item.mediaName} endorsement` : undefined}\n >\n {/* \u5A92\u4F53 Logo */}\n <div\n className={cn(\n 'media-endorsement-card-icon rounded-full',\n 'lg-desktop::size-14 flex size-12 items-center justify-center overflow-hidden',\n classNames.cardIcon\n )}\n >\n <img\n src={item.icon.url}\n alt={item.icon.alt || item.mediaName || 'Media logo'}\n className=\"size-full object-contain\"\n loading=\"lazy\"\n />\n </div>\n\n {/* \u5F15\u7528\u6587\u6848 */}\n <Heading size={2} as={'h6'} className={cn('media-endorsement-card-quote line-clamp-4', classNames.cardQuote)}>\n {item.text}\n </Heading>\n </div>\n )\n\n // Mobile swiper for grid layout\n const renderMobileGridSwiper = () => {\n const chunkedItems = chunkArray(items, MOBILE_ITEMS_PER_SLIDE)\n return (\n <Swiper\n className={cn('media-endorsement-mobile-swiper', 'w-full !overflow-visible pb-8', classNames.carousel)}\n modules={[Pagination]}\n slidesPerView={1}\n spaceBetween={12}\n pagination={{\n clickable: true,\n bulletClass: 'media-endorsement-bullet',\n bulletActiveClass: 'media-endorsement-bullet-active',\n }}\n >\n {chunkedItems.map((group, slideIndex) => (\n <SwiperSlide key={slideIndex} className=\"!h-auto\">\n <div className=\"flex flex-col gap-3\">\n {group.map((item, itemIndex) => {\n const globalIndex = slideIndex * MOBILE_ITEMS_PER_SLIDE + itemIndex\n return renderCard(item, globalIndex)\n })}\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n )\n }\n\n return (\n <div\n ref={ref}\n className={cn(\n 'media-endorsement-root text-info-primary overflow-y-visible',\n 'w-full',\n className,\n classNames.root,\n {\n 'aiui-dark': theme === 'dark',\n }\n )}\n {...props}\n >\n <style>{`\n .media-endorsement-bullet {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: #D9D9D9;\n margin: 0 4px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n .media-endorsement-bullet-active {\n background: var(--info-primary-color);\n }\n .media-endorsement-mobile-swiper .swiper-pagination {\n position: absolute;\n bottom: -32px;\n left: 0;\n right: 0;\n text-align: center;\n }\n `}</style>\n {/* \u6807\u9898\u533A\u57DF */}\n {(title || subtitle) && (\n <div className={cn('media-endorsement-header mb-6', classNames.header)}>\n {title && (\n <Heading as=\"h2\" size={4} html={title} className={cn('media-endorsement-title', classNames.title)} />\n )}\n {subtitle && <Text as=\"p\" size={3} className={cn('', classNames?.subtitle)} html={subtitle} />}\n </div>\n )}\n {layout === 'carousel' ? (\n <Swiper\n className={cn('media-endorsement-carousel', 'w-full !overflow-visible', classNames.carousel)}\n modules={[FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{ forceToAxis: true }}\n slidesPerView=\"auto\"\n spaceBetween={12}\n breakpoints={{\n 768: { spaceBetween: 16 },\n }}\n >\n {items.map((item, index) => (\n <SwiperSlide key={index} className=\"tablet:!w-[320px] laptop:!w-[360px] desktop:!w-[404px] !w-[280px]\">\n {renderCard(item, index)}\n </SwiperSlide>\n ))}\n </Swiper>\n ) : isMobile ? (\n renderMobileGridSwiper()\n ) : (\n <div\n className={cn(\n 'media-endorsement-grid',\n 'laptop:grid-cols-2 laptop:gap-4 desktop:grid-cols-3 grid grid-cols-1 gap-3',\n classNames.grid\n )}\n >\n {items.map((item, index) => renderCard(item, index))}\n </div>\n )}\n </div>\n )\n }\n)\n\nMediaEndorsement.displayName = 'MediaEndorsement'\n\nexport default MediaEndorsement\nexport type { MediaEndorsementProps, MediaEndorsementData, MediaEndorsementItem, MediaEndorsementSemanticName }\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAqEM,IAAAI,EAAA,6BAnENC,EAAuB,oBACvBC,EAAoB,oCACpBC,EAAoC,wBACpCC,EAAiD,0BACjDC,EAA8B,4BAC9BC,EAAO,iCACPC,EAAmB,kCAOnBC,EAA8B,0BAE9B,MAAMC,EAAyB,EAG/B,SAASC,EAAcC,EAAYC,EAAqB,CACtD,MAAMC,EAAgB,CAAC,EACvB,QAASC,EAAI,EAAGA,EAAIH,EAAM,OAAQG,GAAKF,EACrCC,EAAO,KAAKF,EAAM,MAAMG,EAAGA,EAAIF,CAAI,CAAC,EAEtC,OAAOC,CACT,CAKA,MAAME,KAAe,OACnB,8HACA,CACE,SAAU,CACR,MAAO,CACL,MAAO,GACP,KAAM,EACR,EACA,QAAS,CACP,KAAM,eACN,MAAO,EACT,CACF,EACA,gBAAiB,CACf,MAAO,QACP,QAAS,EACX,CACF,CACF,EAOMC,EAAmBf,EAAM,WAC7B,CAA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AhB,EAAiB,YAAc,mBAE/B,IAAOlB,EAAQkB",
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cva } from 'class-variance-authority'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { FreeMode, Mousewheel, Pagination } from 'swiper/modules'\nimport { useMediaQuery } from 'react-responsive'\nimport 'swiper/css/pagination'\nimport { cn } from '../../helpers/index.js'\nimport type {\n MediaEndorsementProps,\n MediaEndorsementData,\n MediaEndorsementItem,\n MediaEndorsementSemanticName,\n} from './types.js'\nimport { Heading, Text } from '../../index.js'\n\nconst MOBILE_ITEMS_PER_SLIDE = 3\n\n// Helper to chunk array into groups\nfunction chunkArray<T>(array: T[], size: number): T[][] {\n const result: T[][] = []\n for (let i = 0; i < array.length; i += size) {\n result.push(array.slice(i, i + size))\n }\n return result\n}\n\n/**\n * \u5361\u7247\u5BB9\u5668\u53D8\u4F53\n */\nconst cardVariants = cva(\n 'rounded-box lg-desktop:h-[240px] desktop:px-6 bg-container-secondary-0 flex h-[200px] flex-col justify-start gap-[26px] p-4',\n {\n variants: {\n theme: {\n light: '',\n dark: '',\n },\n rounded: {\n true: 'rounded-card',\n false: '',\n },\n },\n defaultVariants: {\n theme: 'light',\n rounded: false,\n },\n }\n)\n\n/**\n * MediaEndorsement - \u5A92\u4F53\u80CC\u4E66\n *\n * @description \u5A92\u4F53\u80CC\u4E66\u7EC4\u4EF6\u7684\u4F5C\u7528\u662F\u901A\u8FC7\u5C55\u793A\u7B2C\u4E09\u65B9\u5A92\u4F53\u7684\u8BC4\u4EF7\u6216\u62A5\u9053\uFF0C\u63D0\u5347\u54C1\u724C\u6216\u4EA7\u54C1\u7684\u53EF\u4FE1\u5EA6\u548C\u5F71\u54CD\u529B\n */\nconst MediaEndorsement = React.forwardRef<HTMLDivElement, MediaEndorsementProps>(\n ({ className, classNames = {}, data, onItemClick, ...props }, ref) => {\n const { title, subtitle, items, theme = 'light', rounded = false, layout = 'grid' } = data\n const isMobile = useMediaQuery({ query: '(max-width: 767px)' })\n\n const handleCardClick = React.useCallback(\n (item: MediaEndorsementItem, index: number) => (event: React.MouseEvent) => {\n onItemClick?.(item, index, event)\n },\n [onItemClick]\n )\n\n const renderCard = (item: MediaEndorsementItem, index: number) => (\n <div\n key={index}\n className={cn('media-endorsement-card text-info-primary', cardVariants({ theme, rounded }), classNames.card)}\n onClick={handleCardClick(item, index)}\n aria-label={item.mediaName ? `${item.mediaName} endorsement` : undefined}\n >\n {/* \u5A92\u4F53 Logo */}\n <div\n className={cn(\n 'media-endorsement-card-icon rounded-full',\n 'lg-desktop::size-14 flex size-12 items-center justify-center overflow-hidden',\n classNames.cardIcon\n )}\n >\n <img\n src={item.icon.url}\n alt={item.icon.alt || item.mediaName || 'Media logo'}\n className=\"size-full object-contain\"\n loading=\"lazy\"\n />\n </div>\n\n {/* \u5F15\u7528\u6587\u6848 */}\n <Heading size={2} as={'h6'} className={cn('media-endorsement-card-quote line-clamp-4', classNames.cardQuote)}>\n {item.text}\n </Heading>\n </div>\n )\n\n // Mobile swiper for grid layout\n const renderMobileGridSwiper = () => {\n const chunkedItems = chunkArray(items, MOBILE_ITEMS_PER_SLIDE)\n return (\n <Swiper\n className={cn('media-endorsement-mobile-swiper', 'w-full !overflow-visible pb-8', classNames.carousel)}\n modules={[Pagination]}\n slidesPerView={1}\n spaceBetween={12}\n pagination={{\n clickable: true,\n bulletClass: 'media-endorsement-bullet',\n bulletActiveClass: 'media-endorsement-bullet-active',\n }}\n >\n {chunkedItems.map((group, slideIndex) => (\n <SwiperSlide key={slideIndex} className=\"!h-auto\">\n <div className=\"flex flex-col gap-3\">\n {group.map((item, itemIndex) => {\n const globalIndex = slideIndex * MOBILE_ITEMS_PER_SLIDE + itemIndex\n return renderCard(item, globalIndex)\n })}\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n )\n }\n\n return (\n <div\n ref={ref}\n className={cn('media-endorsement-root text-info-primary', 'w-full', className, classNames.root, {\n 'aiui-dark': theme === 'dark',\n })}\n {...props}\n >\n <style>{`\n .media-endorsement-bullet {\n display: inline-block;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: #D9D9D9;\n margin: 0 4px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n }\n .media-endorsement-bullet-active {\n background: var(--info-primary-color);\n }\n .media-endorsement-mobile-swiper .swiper-pagination {\n position: absolute;\n bottom: -28px;\n left: 0;\n right: 0;\n text-align: center;\n }\n `}</style>\n {/* \u6807\u9898\u533A\u57DF */}\n {(title || subtitle) && (\n <div className={cn('media-endorsement-header mb-6', classNames.header)}>\n {title && (\n <Heading as=\"h2\" size={4} html={title} className={cn('media-endorsement-title', classNames.title)} />\n )}\n {subtitle && <Text as=\"p\" size={3} className={cn('', classNames?.subtitle)} html={subtitle} />}\n </div>\n )}\n {layout === 'carousel' ? (\n <Swiper\n className={cn('media-endorsement-carousel', 'w-full !overflow-visible', classNames.carousel)}\n modules={[FreeMode, Mousewheel]}\n freeMode={true}\n mousewheel={{ forceToAxis: true }}\n slidesPerView=\"auto\"\n spaceBetween={12}\n breakpoints={{\n 768: { spaceBetween: 16 },\n }}\n >\n {items.map((item, index) => (\n <SwiperSlide key={index} className=\"tablet:!w-[320px] laptop:!w-[360px] desktop:!w-[404px] !w-[280px]\">\n {renderCard(item, index)}\n </SwiperSlide>\n ))}\n </Swiper>\n ) : isMobile ? (\n renderMobileGridSwiper()\n ) : (\n <div\n className={cn(\n 'media-endorsement-grid',\n 'laptop:grid-cols-2 laptop:gap-4 desktop:grid-cols-3 tablet:grid-cols-2 grid grid-cols-1 gap-3',\n classNames.grid\n )}\n >\n {items.map((item, index) => renderCard(item, index))}\n </div>\n )}\n </div>\n )\n }\n)\n\nMediaEndorsement.displayName = 'MediaEndorsement'\n\nexport default MediaEndorsement\nexport type { MediaEndorsementProps, MediaEndorsementData, MediaEndorsementItem, MediaEndorsementSemanticName }\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eA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IAAI,KAAM,EAAG,aAAW,MAAG,GAAIN,GAAY,QAAQ,EAAG,KAAMM,EAAU,GAC9F,EAEDI,IAAW,cACV,OAAC,UACC,aAAW,MAAG,6BAA8B,2BAA4BV,EAAW,QAAQ,EAC3F,QAAS,CAAC,WAAU,YAAU,EAC9B,SAAU,GACV,WAAY,CAAE,YAAa,EAAK,EAChC,cAAc,OACd,aAAc,GACd,YAAa,CACX,IAAK,CAAE,aAAc,EAAG,CAC1B,EAEC,SAAAO,EAAM,IAAI,CAACM,EAAMC,OAChB,OAAC,eAAwB,UAAU,oEAChC,SAAAE,EAAWH,EAAMC,CAAK,GADPA,CAElB,CACD,EACH,EACEH,EACFM,EAAuB,KAEvB,OAAC,OACC,aAAW,MACT,yBACA,gGACAjB,EAAW,IACb,EAEC,SAAAO,EAAM,IAAI,CAACM,EAAMC,IAAUE,EAAWH,EAAMC,CAAK,CAAC,EACrD,GAEJ,CAEJ,CACF,EAEAhB,EAAiB,YAAc,mBAE/B,IAAOlB,EAAQkB",
6
6
  "names": ["MediaEndorsement_exports", "__export", "MediaEndorsement_default", "__toCommonJS", "import_jsx_runtime", "React", "import_class_variance_authority", "import_react", "import_modules", "import_react_responsive", "import_pagination", "import_helpers", "import__", "MOBILE_ITEMS_PER_SLIDE", "chunkArray", "array", "size", "result", "i", "cardVariants", "MediaEndorsement", "className", "classNames", "data", "onItemClick", "props", "ref", "title", "subtitle", "items", "theme", "rounded", "layout", "isMobile", "handleCardClick", "item", "index", "event", "renderCard", "renderMobileGridSwiper", "chunkedItems", "group", "slideIndex", "itemIndex", "globalIndex"]
7
7
  }
@@ -1,6 +1,2 @@
1
- import type { MediaPlayerBaseProps } from './types.js';
2
- declare const _default: import("react").ForwardRefExoticComponent<Omit<MediaPlayerBaseProps & import("react").RefAttributes<HTMLDivElement> & {
3
- style?: string | React.CSSProperties;
4
- container?: import("../../shared/Styles.js").ContainerProps["container"];
5
- }, "ref"> & import("react").RefAttributes<any>>;
1
+ declare const _default: any;
6
2
  export default _default;
@@ -12,7 +12,7 @@ export interface MediaPlayerBaseProps extends ComponentCommonProps, React.HTMLAt
12
12
  video?: Video;
13
13
  mobileVideo?: Video;
14
14
  youtubeId?: string;
15
- titleAnimation?: 'fade-in';
15
+ titleAnimation?: 'fade-in' | null;
16
16
  };
17
17
  onBtnClick?: () => void;
18
18
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MediaPlayerBase/types.ts"],
4
- "sourcesContent": ["import type { ComponentCommonProps, Shape, Theme, Video, Img } from '../../types/props.js'\n\nexport interface MediaPlayerBaseProps extends ComponentCommonProps, React.HTMLAttributes<HTMLDivElement> {\n data: {\n sticky?: boolean\n shape?: Shape\n theme?: Theme\n title?: string\n videoTitle?: string\n btnText?: string\n img?: Img\n isYouTube?: boolean\n video?: Video\n mobileVideo?: Video\n youtubeId?: string\n titleAnimation?: 'fade-in'\n }\n onBtnClick?: () => void\n}\n"],
4
+ "sourcesContent": ["import type { ComponentCommonProps, Shape, Theme, Video, Img } from '../../types/props.js'\n\nexport interface MediaPlayerBaseProps extends ComponentCommonProps, React.HTMLAttributes<HTMLDivElement> {\n data: {\n sticky?: boolean\n shape?: Shape\n theme?: Theme\n title?: string\n videoTitle?: string\n btnText?: string\n img?: Img\n isYouTube?: boolean\n video?: Video\n mobileVideo?: Video\n youtubeId?: string\n titleAnimation?: 'fade-in' | null\n }\n onBtnClick?: () => void\n}\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
6
  "names": ["types_exports", "__toCommonJS"]
7
7
  }
@@ -1,6 +1,2 @@
1
- import type { MediaPlayerMultiProps } from './types.js';
2
- declare const _default: import("react").ForwardRefExoticComponent<Omit<MediaPlayerMultiProps & import("react").RefAttributes<HTMLDivElement> & {
3
- style?: string | React.CSSProperties;
4
- container?: import("../../shared/Styles.js").ContainerProps["container"];
5
- }, "ref"> & import("react").RefAttributes<any>>;
1
+ declare const _default: any;
6
2
  export default _default;
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var S=Object.create;var p=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var Y=(e,t)=>{for(var i in t)p(e,i,{get:t[i],enumerable:!0})},b=(e,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _(t))!q.call(e,s)&&s!==i&&p(e,s,{get:()=>t[s],enumerable:!(a=U(t,s))||a.enumerable});return e};var g=(e,t,i)=>(i=e!=null?S(j(e)):{},b(t||!e||!e.__esModule?p(i,"default",{value:e,enumerable:!0}):i,e)),Z=e=>b(p({},"__esModule",{value:!0}),e);var G={};Y(G,{default:()=>F});module.exports=Z(G);var l=require("react/jsx-runtime"),o=require("react"),y=require("../../helpers/utils.js"),M=require("../../shared/Styles.js"),r=require("../../components/index.js"),k=g(require("../Title/index.js")),P=g(require("../SwiperBox/index.js")),N=require("../../components/container.js"),T=require("../VideoModal/index.js"),L=require("@payloadcms/richtext-lexical/html"),I=require("../../hooks/useExposure.js"),V=require("../../shared/trackUrlRef.js");const m="video",d="media_player_multi",A=({data:e,configuration:t})=>{const i=(0,o.useRef)(null);return(0,I.useExposure)(i,{componentType:m,componentName:d,componentTitle:e?.title,position:t?.index+1,componentDescription:e?.description}),(0,l.jsxs)("div",{ref:i,className:(0,y.cn)("laptop:max-w-full w-full overflow-hidden","laptop:flex-row flex shrink-0 flex-col","lg-desktop:h-[480px] desktop:h-[384px] laptop:h-[360px] h-auto",t.shape==="round"?"rounded-2xl":""),children:[(0,l.jsxs)("div",{className:"laptop:w-[49%] laptop:h-full tablet:h-[18.22vw] relative h-[35.9vw] w-full flex-none",children:[(0,l.jsx)(r.Picture,{source:e.img?.url,alt:e.img?.alt||"",className:"tablet:block hidden size-full",imgClassName:"w-full h-full object-cover tablet:hover:scale-110 transition-all duration-300"}),(0,l.jsx)(r.Picture,{source:e.mobileImg?.url||e.img?.url,alt:e.mobileImg?.alt||e.img?.alt||"",className:"tablet:hidden block size-full",imgClassName:"w-full h-full object-cover"}),(0,l.jsx)("div",{className:"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4",children:(e?.video?.url||e?.youtubeId)&&(0,l.jsx)("button",{onClick:()=>{t?.onVideoPlayBtnClick?.(t?.index||0,e)},className:"laptop:size-14 bg-opacity/20 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:(0,l.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})]}),(0,l.jsxs)("div",{className:"laptop:gap-[60px] lg-desktop:p-8 tablet:p-6 bg-container-secondary-1 flex min-h-[200px] flex-1 flex-col gap-4 overflow-hidden p-4",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary mb-2 text-[14px] font-bold leading-[1.2] tracking-[-0.02em]",children:e.title}),e.quote&&(0,l.jsx)(r.Link,{asChild:!e?.href,href:(0,V.trackUrlRef)(e?.href,`${m}_${d}`),"data-headless-type-name":`${m}#${d}`,"data-headless-title-desc-button":`${e?.title}#${e?.description}`,children:(0,l.jsx)(r.Text,{html:e.quote,weight:"bold",className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary text-sm"})})]}),(0,l.jsx)("p",{className:"lg-desktop:text-2xl lg-desktop:leading-[1.2] text-info-primary desktop:max-h-[186px] line-clamp-6 max-h-[144px] min-h-[100px] text-xl font-bold leading-[1.2] tracking-[-0.04em]",children:e.description})]})]})},w=(0,o.forwardRef)(({data:{items:e=[],shape:t="square",title:i,containerProps:a},className:s="",key:B,onVideoPlayBtnClick:C,...$},z)=>{const[f,c]=(0,o.useState)(!1),[D,u]=(0,o.useState)(""),[E,x]=(0,o.useState)(""),h=typeof i=="string"?i:i&&(0,L.convertLexicalToHTML)({data:i}),H=(0,o.useRef)(null),v=e.length===2;return(0,l.jsxs)("div",{...$,ref:H,className:s,children:[(0,l.jsx)("div",{className:"mediaplayermulti-box",children:(0,l.jsx)(N.Container,{...a||{},className:"overflow-hidden",children:(0,l.jsxs)("div",{className:s,ref:z,children:[i&&(0,l.jsx)(k.default,{className:"mediaplayermulti-title",data:{title:h||""}}),(0,l.jsx)(P.default,{className:"!overflow-visible",id:"MediaPlayerMultiSwiper"+B,data:{list:e,configuration:{shape:t,onVideoPlayBtnClick:(R,n)=>{c(!0),n?.isYouTube?(x(n?.youtubeId||""),u("")):(u(n?.video?.url||""),x("")),C?.(R)},title:h}},Slide:A,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:v?2:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:v?2:1.5},1440:{spaceBetween:16,freeMode:!1,slidesPerView:2}}})]})})}),f&&(0,l.jsx)(T.VideoModal,{visible:f,youTubeId:E,videoUrl:D,onCloseModal:()=>c(!1)})]})});w.displayName="MediaPlayerMulti";var F=(0,M.withLayout)(w);
1
+ "use strict";"use client";var _=Object.create;var p=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var Y=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var Z=(e,t)=>{for(var o in t)p(e,o,{get:t[o],enumerable:!0})},g=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of q(t))!A.call(e,s)&&s!==o&&p(e,s,{get:()=>t[s],enumerable:!(a=j(t,s))||a.enumerable});return e};var w=(e,t,o)=>(o=e!=null?_(Y(e)):{},g(t||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),F=e=>g(p({},"__esModule",{value:!0}),e);var K={};Z(K,{default:()=>J});module.exports=F(K);var l=require("react/jsx-runtime"),i=require("react"),n=require("../../helpers/utils.js"),M=require("../../shared/Styles.js"),r=require("../../components/index.js"),k=w(require("../Title/index.js")),P=w(require("../SwiperBox/index.js")),N=require("../../components/container.js"),L=require("../VideoModal/index.js"),T=require("@payloadcms/richtext-lexical/html"),I=require("../../hooks/useExposure.js"),C=require("../AiuiProvider/index.js"),V=require("../../shared/trackUrlRef.js");const d="video",c="media_player_multi",G=({data:e,configuration:t})=>{const o=(0,i.useRef)(null);return(0,I.useExposure)(o,{componentType:d,componentName:c,componentTitle:e?.title,position:t?.index+1,componentDescription:e?.description}),(0,l.jsxs)("div",{ref:o,className:(0,n.cn)("laptop:max-w-full w-full overflow-hidden","laptop:flex-row flex shrink-0 flex-col","lg-desktop:h-[480px] desktop:h-[384px] laptop:h-[360px] h-auto",t.shape==="round"?"rounded-2xl":""),children:[(0,l.jsxs)("div",{className:"laptop:w-[49%] laptop:h-full tablet:h-[18.22vw] relative h-[35.9vw] w-full flex-none",children:[(0,l.jsx)(r.Picture,{source:e.img?.url,alt:e.img?.alt||"",className:"tablet:block hidden size-full",imgClassName:"w-full h-full object-cover tablet:hover:scale-110 transition-all duration-300"}),(0,l.jsx)(r.Picture,{source:e.mobileImg?.url||e.img?.url,alt:e.mobileImg?.alt||e.img?.alt||"",className:"tablet:hidden block size-full",imgClassName:"w-full h-full object-cover"}),(0,l.jsx)("div",{className:"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4",children:(e?.video?.url||e?.youtubeId)&&(0,l.jsx)("button",{onClick:()=>{t?.onVideoPlayBtnClick?.(t?.index||0,e)},className:"laptop:size-14 bg-opacity/20 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75",children:(0,l.jsx)("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M12 7L0 14L0 0L12 7Z",fill:"white"})})})})]}),(0,l.jsxs)("div",{className:"laptop:gap-[60px] lg-desktop:p-8 tablet:p-6 bg-container-secondary-1 flex min-h-[200px] flex-1 flex-col gap-4 overflow-hidden p-4",children:[(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary mb-2 text-[14px] font-bold leading-[1.2] tracking-[-0.02em]",children:e.title}),e.quote&&(0,l.jsx)(r.Link,{asChild:!e?.href,href:(0,V.trackUrlRef)((0,n.getLocalizedPath)(e?.href||"",t?.locale||"us"),`${d}_${c}`),"data-headless-type-name":`${d}#${c}`,"data-headless-title-desc-button":`${e?.title}#${e?.description}`,children:(0,l.jsx)(r.Text,{html:e.quote,weight:"bold",className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary text-sm"})})]}),(0,l.jsx)("p",{className:"lg-desktop:text-2xl lg-desktop:leading-[1.2] text-info-primary desktop:max-h-[186px] line-clamp-6 max-h-[144px] min-h-[100px] text-xl font-bold leading-[1.2] tracking-[-0.04em]",children:e.description})]})]})},y=(0,i.forwardRef)(({data:{items:e=[],shape:t="square",title:o,containerProps:a},className:s="",key:B,onVideoPlayBtnClick:$,...z},D)=>{const[f,u]=(0,i.useState)(!1),[E,x]=(0,i.useState)(""),[H,h]=(0,i.useState)(""),{locale:R="us"}=(0,C.useAiuiContext)(),v=typeof o=="string"?o:o&&(0,T.convertLexicalToHTML)({data:o}),S=(0,i.useRef)(null),b=e.length===2;return(0,l.jsxs)("div",{...z,ref:S,className:s,children:[(0,l.jsx)("div",{className:"mediaplayermulti-box",children:(0,l.jsx)(N.Container,{...a||{},className:"overflow-hidden",children:(0,l.jsxs)("div",{className:s,ref:D,children:[o&&(0,l.jsx)(k.default,{className:"mediaplayermulti-title",data:{title:v||""}}),(0,l.jsx)(P.default,{className:"!overflow-visible",id:"MediaPlayerMultiSwiper"+B,data:{list:e,configuration:{shape:t,locale:R,onVideoPlayBtnClick:(U,m)=>{u(!0),m?.isYouTube?(h(m?.youtubeId||""),x("")):(x(m?.video?.url||""),h("")),$?.(U)},title:v}},Slide:G,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:1.2},768:{spaceBetween:16,freeMode:!1,slidesPerView:b?2:2.3},1024:{spaceBetween:16,freeMode:!1,slidesPerView:b?2:1.5},1440:{spaceBetween:16,freeMode:!1,slidesPerView:2}}})]})})}),f&&(0,l.jsx)(L.VideoModal,{visible:f,youTubeId:H,videoUrl:E,onCloseModal:()=>u(!1)})]})});y.displayName="MediaPlayerMulti";var J=(0,M.withLayout)(y);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MediaPlayerMulti/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport { useState, forwardRef, useRef } from 'react'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Link, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Container } from '../../components/container.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { MediaPlayerMultiProps, MediaPlayerItemProps } from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\n\nconst componentType = 'video'\nconst componentName = 'media_player_multi'\n\nconst MediaPlayerItem = ({ data, configuration }: { data: MediaPlayerItemProps; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n position: configuration?.index + 1,\n componentDescription: data?.description,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:max-w-full w-full overflow-hidden',\n 'laptop:flex-row flex shrink-0 flex-col',\n 'lg-desktop:h-[480px] desktop:h-[384px] laptop:h-[360px] h-auto',\n configuration.shape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n <div className=\"laptop:w-[49%] laptop:h-full tablet:h-[18.22vw] relative h-[35.9vw] w-full flex-none\">\n <Picture\n source={data.img?.url}\n alt={data.img?.alt || ''}\n className=\"tablet:block hidden size-full\"\n imgClassName=\"w-full h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n />\n <Picture\n source={data.mobileImg?.url || data.img?.url}\n alt={data.mobileImg?.alt || data.img?.alt || ''}\n className=\"tablet:hidden block size-full\"\n imgClassName=\"w-full h-full object-cover\"\n />\n <div className=\"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4\">\n {(data?.video?.url || data?.youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(configuration?.index || 0, data)\n }}\n className=\"laptop:size-14 bg-opacity/20 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n\n <div className=\"laptop:gap-[60px] lg-desktop:p-8 tablet:p-6 bg-container-secondary-1 flex min-h-[200px] flex-1 flex-col gap-4 overflow-hidden p-4\">\n <div className=\"flex flex-col\">\n <h3 className=\"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary mb-2 text-[14px] font-bold leading-[1.2] tracking-[-0.02em]\">\n {data.title}\n </h3>\n {data.quote && (\n <Link\n asChild={!data?.href}\n href={trackUrlRef(data?.href, `${componentType}_${componentName}`)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description}`}\n >\n <Text\n html={data.quote}\n weight=\"bold\"\n className=\"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary text-sm\"\n />\n </Link>\n )}\n </div>\n\n <p className=\"lg-desktop:text-2xl lg-desktop:leading-[1.2] text-info-primary desktop:max-h-[186px] line-clamp-6 max-h-[144px] min-h-[100px] text-xl font-bold leading-[1.2] tracking-[-0.04em]\">\n {data.description}\n </p>\n </div>\n </div>\n )\n}\n\nconst MediaPlayerMulti = forwardRef<HTMLDivElement, MediaPlayerMultiProps>(\n (\n {\n data: { items = [], shape = 'square', title, containerProps },\n className = '',\n key,\n onVideoPlayBtnClick,\n ...rest\n },\n ref\n ) => {\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n const title_html = typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title })\n const wrapperRef = useRef<HTMLDivElement>(null)\n\n // \u5982\u679C\u53EA\u6709\u4E24\u4E2Aitem, \u5219\u5E73\u5747\u5206\u914D\u7A7A\u95F4\n const itemsLength = items.length === 2\n\n return (\n <div {...rest} ref={wrapperRef} className={className}>\n <div className=\"mediaplayermulti-box\">\n <Container {...(containerProps || {})} className=\"overflow-hidden\">\n <div className={className} ref={ref}>\n {title && <Title className=\"mediaplayermulti-title\" data={{ title: title_html || '' }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MediaPlayerMultiSwiper' + key}\n data={{\n list: items,\n configuration: {\n shape,\n onVideoPlayBtnClick: (_: number, data: MediaPlayerItemProps) => {\n setVisible(true)\n if (data?.isYouTube) {\n setYouTubeId(data?.youtubeId || '')\n setVideoUrl('')\n } else {\n setVideoUrl(data?.video?.url || '')\n setYouTubeId('')\n }\n onVideoPlayBtnClick?.(_)\n },\n title: title_html,\n },\n }}\n Slide={MediaPlayerItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: itemsLength ? 2 : 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: itemsLength ? 2 : 1.5,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2,\n },\n }}\n />\n </div>\n </Container>\n </div>\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </div>\n )\n }\n)\n\nMediaPlayerMulti.displayName = 'MediaPlayerMulti'\nexport default withLayout(MediaPlayerMulti)\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAsCM,IAAAI,EAAA,6BArCNC,EAA6C,iBAC7CC,EAAmB,kCACnBC,EAA2B,kCAC3BC,EAAoC,qCACpCC,EAAkB,gCAClBC,EAAsB,oCACtBC,EAA0B,yCAC1BC,EAA2B,kCAC3BC,EAAqC,6CAErCC,EAA4B,sCAC5BC,EAA4B,uCAE5B,MAAMC,EAAgB,QAChBC,EAAgB,qBAEhBC,EAAkB,CAAC,CAAE,KAAAC,EAAM,cAAAC,CAAc,IAA2D,CACxG,MAAMC,KAAM,UAAuB,IAAI,EAEvC,wBAAYA,EAAK,CACf,cAAAL,EACA,cAAAC,EACA,eAAgBE,GAAM,MACtB,SAAUC,GAAe,MAAQ,EACjC,qBAAsBD,GAAM,WAC9B,CAAC,KAGC,QAAC,OACC,IAAKE,EACL,aAAW,MACT,2CACA,yCACA,iEACAD,EAAc,QAAU,QAAU,cAAgB,EACpD,EAEA,qBAAC,OAAI,UAAU,uFACb,oBAAC,WACC,OAAQD,EAAK,KAAK,IAClB,IAAKA,EAAK,KAAK,KAAO,GACtB,UAAU,gCACV,aAAa,gFACf,KACA,OAAC,WACC,OAAQA,EAAK,WAAW,KAAOA,EAAK,KAAK,IACzC,IAAKA,EAAK,WAAW,KAAOA,EAAK,KAAK,KAAO,GAC7C,UAAU,gCACV,aAAa,6BACf,KACA,OAAC,OAAI,UAAU,2DACX,UAAAA,GAAM,OAAO,KAAOA,GAAM,eAC1B,OAAC,UACC,QAAS,IAAM,CACbC,GAAe,sBAAsBA,GAAe,OAAS,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oBAAC,OAAI,UAAWC,EAAW,IAAKN,EAC7B,UAAAI,MAAS,OAAC,EAAAe,QAAA,CAAM,UAAU,yBAAyB,KAAM,CAAE,MAAOH,GAAc,EAAG,EAAG,KACvF,OAAC,EAAAI,QAAA,CACC,UAAU,oBACV,GAAI,yBAA2Bb,EAC/B,KAAM,CACJ,KAAML,EACN,cAAe,CACb,MAAAC,EACA,oBAAqB,CAACkB,EAAWvB,IAA+B,CAC9Da,EAAW,EAAI,EACXb,GAAM,WACRiB,EAAajB,GAAM,WAAa,EAAE,EAClCe,EAAY,EAAE,IAEdA,EAAYf,GAAM,OAAO,KAAO,EAAE,EAClCiB,EAAa,EAAE,GAEjBP,IAAsBa,CAAC,CACzB,EACA,MAAOL,CACT,CACF,EACA,MAAOnB,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeqB,EAAc,EAAI,GACnC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAc,EAAI,GACnC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,EACF,EACF,EACCR,MACC,OAAC,cACC,QAASA,EACT,UAAWI,EACX,SAAUF,EACV,aAAc,IAAMD,EAAW,EAAK,EACtC,GAEJ,CAEJ,CACF,EAEAV,EAAiB,YAAc,mBAC/B,IAAOpB,KAAQ,cAAWoB,CAAgB",
6
- "names": ["MediaPlayerMulti_exports", "__export", "MediaPlayerMulti_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_Styles", "import_components", "import_Title", "import_SwiperBox", "import_container", "import_VideoModal", "import_html", "import_useExposure", "import_trackUrlRef", "componentType", "componentName", "MediaPlayerItem", "data", "configuration", "ref", "MediaPlayerMulti", "items", "shape", "title", "containerProps", "className", "key", "onVideoPlayBtnClick", "rest", "visible", "setVisible", "videoUrl", "setVideoUrl", "youTubeId", "setYouTubeId", "title_html", "wrapperRef", "itemsLength", "Title", "SwiperBox", "_"]
4
+ "sourcesContent": ["'use client'\nimport { useState, forwardRef, useRef } from 'react'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport { Picture, Link, Text } from '../../components/index.js'\nimport Title from '../Title/index.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { Container } from '../../components/container.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { MediaPlayerMultiProps, MediaPlayerItemProps } from './types.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\n\nconst componentType = 'video'\nconst componentName = 'media_player_multi'\n\nconst MediaPlayerItem = ({ data, configuration }: { data: MediaPlayerItemProps; configuration?: any }) => {\n const ref = useRef<HTMLDivElement>(null)\n\n useExposure(ref, {\n componentType,\n componentName,\n componentTitle: data?.title,\n position: configuration?.index + 1,\n componentDescription: data?.description,\n })\n\n return (\n <div\n ref={ref}\n className={cn(\n 'laptop:max-w-full w-full overflow-hidden',\n 'laptop:flex-row flex shrink-0 flex-col',\n 'lg-desktop:h-[480px] desktop:h-[384px] laptop:h-[360px] h-auto',\n configuration.shape === 'round' ? 'rounded-2xl' : ''\n )}\n >\n <div className=\"laptop:w-[49%] laptop:h-full tablet:h-[18.22vw] relative h-[35.9vw] w-full flex-none\">\n <Picture\n source={data.img?.url}\n alt={data.img?.alt || ''}\n className=\"tablet:block hidden size-full\"\n imgClassName=\"w-full h-full object-cover tablet:hover:scale-110 transition-all duration-300\"\n />\n <Picture\n source={data.mobileImg?.url || data.img?.url}\n alt={data.mobileImg?.alt || data.img?.alt || ''}\n className=\"tablet:hidden block size-full\"\n imgClassName=\"w-full h-full object-cover\"\n />\n <div className=\"laptop:bottom-6 laptop:right-6 absolute bottom-4 right-4\">\n {(data?.video?.url || data?.youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(configuration?.index || 0, data)\n }}\n className=\"laptop:size-14 bg-opacity/20 flex size-8 items-center justify-center rounded-full bg-white bg-opacity-20 hover:bg-black/75\"\n >\n <svg width=\"12\" height=\"14\" viewBox=\"0 0 12 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L0 14L0 0L12 7Z\" fill=\"white\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n\n <div className=\"laptop:gap-[60px] lg-desktop:p-8 tablet:p-6 bg-container-secondary-1 flex min-h-[200px] flex-1 flex-col gap-4 overflow-hidden p-4\">\n <div className=\"flex flex-col\">\n <h3 className=\"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary mb-2 text-[14px] font-bold leading-[1.2] tracking-[-0.02em]\">\n {data.title}\n </h3>\n {data.quote && (\n <Link\n asChild={!data?.href}\n href={trackUrlRef(\n getLocalizedPath(data?.href || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${data?.title}#${data?.description}`}\n >\n <Text\n html={data.quote}\n weight=\"bold\"\n className=\"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary text-sm\"\n />\n </Link>\n )}\n </div>\n\n <p className=\"lg-desktop:text-2xl lg-desktop:leading-[1.2] text-info-primary desktop:max-h-[186px] line-clamp-6 max-h-[144px] min-h-[100px] text-xl font-bold leading-[1.2] tracking-[-0.04em]\">\n {data.description}\n </p>\n </div>\n </div>\n )\n}\n\nconst MediaPlayerMulti = forwardRef<HTMLDivElement, MediaPlayerMultiProps>(\n (\n {\n data: { items = [], shape = 'square', title, containerProps },\n className = '',\n key,\n onVideoPlayBtnClick,\n ...rest\n },\n ref\n ) => {\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n const { locale = 'us' } = useAiuiContext()\n const title_html = typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title })\n const wrapperRef = useRef<HTMLDivElement>(null)\n\n // \u5982\u679C\u53EA\u6709\u4E24\u4E2Aitem, \u5219\u5E73\u5747\u5206\u914D\u7A7A\u95F4\n const itemsLength = items.length === 2\n\n return (\n <div {...rest} ref={wrapperRef} className={className}>\n <div className=\"mediaplayermulti-box\">\n <Container {...(containerProps || {})} className=\"overflow-hidden\">\n <div className={className} ref={ref}>\n {title && <Title className=\"mediaplayermulti-title\" data={{ title: title_html || '' }} />}\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MediaPlayerMultiSwiper' + key}\n data={{\n list: items,\n configuration: {\n shape,\n locale,\n onVideoPlayBtnClick: (_: number, data: MediaPlayerItemProps) => {\n setVisible(true)\n if (data?.isYouTube) {\n setYouTubeId(data?.youtubeId || '')\n setVideoUrl('')\n } else {\n setVideoUrl(data?.video?.url || '')\n setYouTubeId('')\n }\n onVideoPlayBtnClick?.(_)\n },\n title: title_html,\n },\n }}\n Slide={MediaPlayerItem}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1.2,\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: itemsLength ? 2 : 2.3,\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: itemsLength ? 2 : 1.5,\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: 2,\n },\n }}\n />\n </div>\n </Container>\n </div>\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </div>\n )\n }\n)\n\nMediaPlayerMulti.displayName = 'MediaPlayerMulti'\nexport default withLayout(MediaPlayerMulti)\n"],
5
+ "mappings": "ukBAAA,IA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F,OAAC,EAAAI,QAAA,CACC,UAAU,oBACV,GAAI,yBAA2Bd,EAC/B,KAAM,CACJ,KAAML,EACN,cAAe,CACb,MAAAC,EACA,OAAAa,EACA,oBAAqB,CAACM,EAAWxB,IAA+B,CAC9Da,EAAW,EAAI,EACXb,GAAM,WACRiB,EAAajB,GAAM,WAAa,EAAE,EAClCe,EAAY,EAAE,IAEdA,EAAYf,GAAM,OAAO,KAAO,EAAE,EAClCiB,EAAa,EAAE,GAEjBP,IAAsBc,CAAC,CACzB,EACA,MAAOL,CACT,CACF,EACA,MAAOpB,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAe,GACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAesB,EAAc,EAAI,GACnC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAc,EAAI,GACnC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAe,CACjB,CACF,EACF,GACF,EACF,EACF,EACCT,MACC,OAAC,cACC,QAASA,EACT,UAAWI,EACX,SAAUF,EACV,aAAc,IAAMD,EAAW,EAAK,EACtC,GAEJ,CAEJ,CACF,EAEAV,EAAiB,YAAc,mBAC/B,IAAOrB,KAAQ,cAAWqB,CAAgB",
6
+ "names": ["MediaPlayerMulti_exports", "__export", "MediaPlayerMulti_default", "__toCommonJS", "import_jsx_runtime", "import_react", "import_utils", "import_Styles", "import_components", "import_Title", "import_SwiperBox", "import_container", "import_VideoModal", "import_html", "import_useExposure", "import_AiuiProvider", "import_trackUrlRef", "componentType", "componentName", "MediaPlayerItem", "data", "configuration", "ref", "MediaPlayerMulti", "items", "shape", "title", "containerProps", "className", "key", "onVideoPlayBtnClick", "rest", "visible", "setVisible", "videoUrl", "setVideoUrl", "youTubeId", "setYouTubeId", "locale", "title_html", "wrapperRef", "itemsLength", "Title", "SwiperBox", "_"]
7
7
  }
@@ -1,9 +1,2 @@
1
- import React from 'react';
2
- import type { MediaPlayerBaseProps } from './types.js';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<MediaPlayerBaseProps & React.RefAttributes<{
4
- mediaPlayerStickyRef: HTMLDivElement;
5
- }> & {
6
- style?: string | React.CSSProperties;
7
- container?: import("../../shared/Styles.js").ContainerProps["container"];
8
- }, "ref"> & React.RefAttributes<any>>;
1
+ declare const _default: any;
9
2
  export default _default;
@@ -1,7 +1,3 @@
1
- import type { MediaSceneSwitcherProps } from './types.js';
2
1
  import 'swiper/css';
3
- declare const _default: import("react").ForwardRefExoticComponent<Omit<MediaSceneSwitcherProps & import("react").RefAttributes<HTMLDivElement> & {
4
- style?: string | React.CSSProperties;
5
- container?: import("../../shared/Styles.js").ContainerProps["container"];
6
- }, "ref"> & import("react").RefAttributes<any>>;
2
+ declare const _default: any;
7
3
  export default _default;
@@ -54,5 +54,5 @@ export interface MediaSceneSwitcherV2Props extends React.HTMLAttributes<HTMLDivE
54
54
  /** 场景切换回调 */
55
55
  onSceneChange?: (index: number, scene: MediaSceneSwitcherV2Item) => void;
56
56
  }
57
- declare const MediaSceneSwitcherV2: React.ForwardRefExoticComponent<MediaSceneSwitcherV2Props & React.RefAttributes<HTMLDivElement>>;
58
- export default MediaSceneSwitcherV2;
57
+ declare const _default: any;
58
+ export default _default;
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var j=Object.create;var I=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var O=(e,t)=>{for(var l in t)I(e,l,{get:t[l],enumerable:!0})},A=(e,t,l,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let d of B(t))!F.call(e,d)&&d!==l&&I(e,d,{get:()=>t[d],enumerable:!(n=E(t,d))||n.enumerable});return e};var C=(e,t,l)=>(l=e!=null?j(H(e)):{},A(t||!e||!e.__esModule?I(l,"default",{value:e,enumerable:!0}):l,e)),U=e=>A(I({},"__esModule",{value:!0}),e);var q={};O(q,{default:()=>Q});module.exports=U(q);var i=require("react/jsx-runtime"),m=C(require("react")),R=require("swiper/react"),v=require("swiper/modules"),k=require("react-responsive"),a=require("../../helpers/index.js"),z=C(require("../../components/picture.js")),c=require("../../components/index.js");const N=[{key:"lgDesktop",width:1920},{key:"desktop",width:1440},{key:"laptop",width:1024},{key:"tablet",width:768},{key:"mobile",width:390}],Y=(e,t)=>e[t]?.mimeType==="video/mp4",_=e=>N.filter(({key:l})=>e[l]?.url&&e[l]?.mimeType!=="video/mp4").map(({key:l,width:n})=>`${e[l].url} ${n}`).join(", "),$=(e,t)=>{for(const{key:l}of N)if(e[l]?.alt)return e[l].alt;return t},V=({media:e,alt:t,className:l})=>{const n=(0,k.useMediaQuery)({minWidth:1920}),d=(0,k.useMediaQuery)({minWidth:1440,maxWidth:1919}),g=(0,k.useMediaQuery)({minWidth:1025,maxWidth:1439}),u=(0,k.useMediaQuery)({minWidth:768,maxWidth:1024}),f=m.useMemo(()=>{if(n&&e.lgDesktop?.url)return"lgDesktop";if(d&&e.desktop?.url)return"desktop";if(g&&e.laptop?.url)return"laptop";if(u&&e.tablet?.url)return"tablet";if(e.mobile?.url)return"mobile";for(const{key:y}of N)if(e[y]?.url)return y;return"desktop"},[n,d,g,u,e]),s=e[f];if(!s?.url)return null;if(Y(e,f))return(0,i.jsx)("video",{src:s.url,className:l,autoPlay:!0,loop:!0,muted:!0,playsInline:!0});const S=_(e);return(0,i.jsx)(z.default,{source:S||s.url,alt:$(e,t),className:l,imgClassName:"size-full object-cover"})},K=3e3,W=m.forwardRef(({className:e,classNames:t={},data:l,onSceneChange:n,...d},g)=>{const{title:u,subtitle:f,items:s,defaultActiveIndex:S=0,layout:y="left",autoplay:h=!0,autoplayDelay:x=K}=l,[p,M]=m.useState(S),D=m.useRef(null),w=m.useRef(0);m.useEffect(()=>{if(!(!h||s.length<=1))return w.current=window.setInterval(()=>{M(r=>(r+1)%s.length)},x),()=>{w.current&&window.clearInterval(w.current)}},[h,x,s.length]);const T=m.useCallback(r=>{M(r),n?.(r,s[r]),D.current?.slideTo(r),h&&s.length>1&&(w.current&&window.clearInterval(w.current),w.current=window.setInterval(()=>{M(o=>(o+1)%s.length)},x))},[s,n,h,x]),P=m.useCallback(r=>{const o=r.realIndex;M(o),n?.(o,s[o])},[s,n]),b=s[p],L=y==="top";return(0,i.jsxs)("div",{ref:g,className:(0,a.cn)("scene-switcher-root","text-info-primary w-full",e,t.root,{"aiui-dark":l.theme==="dark"}),...d,children:[(u||f)&&(0,i.jsxs)("div",{className:(0,a.cn)("scene-switcher-header mb-6",t.header),children:[u&&(0,i.jsx)(c.Heading,{as:"h2",size:4,html:u,className:(0,a.cn)("scene-switcher-title",t.title)}),f&&(0,i.jsx)(c.Text,{as:"p",size:3,className:(0,a.cn)("",t?.subtitle),html:f})]}),(0,i.jsx)("div",{className:(0,a.cn)("scene-switcher-swiper","laptop:hidden !overflow-visible",t.swiper),children:(0,i.jsx)(R.Swiper,{modules:[v.FreeMode,v.Mousewheel,v.Autoplay],onSwiper:r=>{D.current=r},className:"!overflow-visible",onSlideChange:P,slidesPerView:"auto",spaceBetween:12,freeMode:!0,mousewheel:{forceToAxis:!0},initialSlide:S,loop:h&&s.length>1,autoplay:h&&s.length>1?{delay:x,disableOnInteraction:!1}:!1,breakpoints:{768:{spaceBetween:16}},children:s.map((r,o)=>(0,i.jsx)(R.SwiperSlide,{className:"h-[462px] !w-[296px]",children:(0,i.jsxs)("div",{className:(0,a.cn)("scene-switcher-slide","flex cursor-pointer flex-col",t.slide),onClick:()=>T(o),children:[(0,i.jsx)("div",{className:(0,a.cn)("scene-switcher-slide-media","relative aspect-[296/320] w-full overflow-hidden",t.slideMedia),children:(0,i.jsx)(V,{media:r.media,alt:r.title,className:"rounded-t-box size-full overflow-hidden object-cover"})}),(0,i.jsxs)("div",{className:(0,a.cn)("scene-switcher-slide-content"," border-t pt-4",p===o?"border-info-primary border-t-4":"border-lines-primary",t.slideContent),children:[(0,i.jsx)(c.Heading,{className:(0,a.cn)("scene-switcher-tab-title ",p===o?"text-info-primary":"text-info-tertiary",r.title),size:3,as:"h3",html:r.title}),r.description&&(0,i.jsx)(c.Text,{className:(0,a.cn)("desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]",p===o?"text-info-primary":"text-info-tertiary"),html:r.description})]})]})},o))})}),L&&(0,i.jsxs)("div",{className:(0,a.cn)("scene-switcher-container","laptop:flex laptop:flex-col hidden","laptop:h-[470px] desktop:h-[628px] lg-desktop:h-[746px] desktop:gap-[32px] gap-[16px]",t.container),children:[(0,i.jsx)("div",{className:(0,a.cn)("scene-switcher-media-wrapper","flex-1 overflow-hidden",t.mediaWrapper),children:b&&(0,i.jsx)(V,{media:b.media,alt:b.title,className:(0,a.cn)("scene-switcher-media","rounded-box size-full object-cover",t.media)})}),(0,i.jsx)("div",{className:(0,a.cn)("scene-switcher-tab-list","border-lines-primary laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex border-t",t.tabList),children:s.map((r,o)=>(0,i.jsxs)("div",{className:(0,a.cn)("scene-switcher-tab-item","desktop:pt-6 -mt-px flex-1 cursor-pointer border-t-2 pt-4 transition-colors",p===o?"border-info-primary border-t-4":"hover:border-lines-primary border-transparent",t.tabItem),onClick:()=>T(o),role:"button","aria-selected":p===o,children:[(0,i.jsx)(c.Heading,{className:(0,a.cn)("scene-switcher-tab-title line-clamp-2",p===o?"text-info-primary":"text-info-tertiary",r.title),size:3,as:"h3",html:r.title}),r.description&&(0,i.jsx)(c.Text,{className:(0,a.cn)("desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]",p===o?"text-info-primary":"text-info-tertiary"),html:r.description})]},o))})]}),!L&&(0,i.jsxs)("div",{className:(0,a.cn)("scene-switcher-container","laptop:flex laptop:gap-6 desktop:gap-8 lg-desktop:gap-10 hidden","laptop:h-[336px] desktop:h-[448px] lg-desktop:h-[560px]",y==="right"&&"flex-row-reverse",t.container),children:[(0,i.jsx)("div",{className:(0,a.cn)("scene-switcher-tab-list","border-lines-primary laptop:w-[320px] desktop:w-[400px] lg-desktop:w-[544px] flex flex-col justify-center border-t",t.tabList),children:s.map((r,o)=>(0,i.jsxs)("div",{className:(0,a.cn)("scene-switcher-tab-item","relative cursor-pointer py-4","before:bg-lines before:absolute before:inset-y-4 before:w-1","pl-6 before:left-0",p===o?"before:bg-info-primary":"hover:before:bg-lines-primary before:bg-lines",t.tabItem),onClick:()=>T(o),role:"button","aria-selected":p===o,children:[(0,i.jsx)(c.Heading,{className:(0,a.cn)("scene-switcher-tab-title",p===o?"text-info-primary":"text-info-tertiary",r.title),size:3,as:"h3",html:r.title}),r.description&&(0,i.jsx)(c.Text,{className:(0,a.cn)("desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]",p===o?"text-info-primary":"text-info-tertiary hidden"),html:r.description})]},o))}),(0,i.jsx)("div",{className:(0,a.cn)("scene-switcher-media-wrapper","flex-1 overflow-hidden",t.mediaWrapper),children:b&&(0,i.jsx)(V,{media:b.media,alt:b.title,className:(0,a.cn)("scene-switcher-media","rounded-box size-full h-full overflow-visible object-cover",t.media)})})]})]})});W.displayName="MediaSceneSwitcherV2";var Q=W;
1
+ "use strict";"use client";var Y=Object.create;var V=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var Q=(t,i)=>{for(var l in i)V(t,l,{get:i[l],enumerable:!0})},H=(t,i,l,p)=>{if(i&&typeof i=="object"||typeof i=="function")for(let d of $(i))!K.call(t,d)&&d!==l&&V(t,d,{get:()=>i[d],enumerable:!(p=_(i,d))||p.enumerable});return t};var P=(t,i,l)=>(l=t!=null?Y(q(t)):{},H(i||!t||!t.__esModule?V(l,"default",{value:t,enumerable:!0}):l,t)),G=t=>H(V({},"__esModule",{value:!0}),t);var ie={};Q(ie,{default:()=>te});module.exports=G(ie);var r=require("react/jsx-runtime"),c=P(require("react")),L=require("swiper/react"),y=require("swiper/modules"),v=require("react-responsive"),a=require("../../helpers/index.js"),B=P(require("../../components/picture.js")),m=require("../../components/index.js"),j=require("../../shared/Styles.js");const C=[{key:"lgDesktop",width:1920},{key:"desktop",width:1440},{key:"laptop",width:1024},{key:"tablet",width:768},{key:"mobile",width:390}],J=(t,i)=>t[i]?.mimeType==="video/mp4",X=t=>C.filter(({key:l})=>t[l]?.url&&t[l]?.mimeType!=="video/mp4").map(({key:l,width:p})=>`${t[l].url} ${p}`).join(", "),Z=(t,i)=>{for(const{key:l}of C)if(t[l]?.alt)return t[l].alt;return i},W=({media:t,alt:i,className:l})=>{const p=(0,v.useMediaQuery)({minWidth:1920}),d=(0,v.useMediaQuery)({minWidth:1440,maxWidth:1919}),S=(0,v.useMediaQuery)({minWidth:1025,maxWidth:1439}),u=(0,v.useMediaQuery)({minWidth:768,maxWidth:1024}),f=c.useMemo(()=>{if(p&&t.lgDesktop?.url)return"lgDesktop";if(d&&t.desktop?.url)return"desktop";if(S&&t.laptop?.url)return"laptop";if(u&&t.tablet?.url)return"tablet";if(t.mobile?.url)return"mobile";for(const{key:x}of C)if(t[x]?.url)return x;return"desktop"},[p,d,S,u,t]),s=t[f];if(!s?.url)return null;if(J(t,f))return(0,r.jsx)("video",{src:s.url,className:l,autoPlay:!0,loop:!0,muted:!0,playsInline:!0});const M=X(t);return(0,r.jsx)(B.default,{source:M||s.url,alt:Z(t,i),className:l,imgClassName:"size-full object-cover"})},ee=3e3,F=c.forwardRef(({className:t,classNames:i={},data:l,onSceneChange:p,...d},S)=>{const{title:u,subtitle:f,items:s,defaultActiveIndex:M=0,layout:x="left",autoplay:h=!0,autoplayDelay:g=ee}=l,[n,R]=c.useState(M),E=c.useRef(null),w=c.useRef(0),T=c.useRef([]),I=(0,v.useMediaQuery)({minWidth:1025});c.useEffect(()=>!h||s.length<=1||!I?void 0:((()=>{w.current=window.setInterval(()=>{R(e=>(e+1)%s.length)},g)})(),()=>{w.current&&window.clearInterval(w.current)}),[h,g,s.length,I]),c.useEffect(()=>{if(!I||!T.current[n])return;const o=T.current[n],e=o?.parentElement;if(!e||e.scrollHeight<=e.clientHeight)return;const k=requestAnimationFrame(()=>{const D=e.getBoundingClientRect(),N=o.getBoundingClientRect();if(N.top>=D.top&&N.bottom<=D.bottom)return;const U=N.top-D.top-e.clientHeight/2+N.height/2;e.scrollTo({top:e.scrollTop+U,behavior:"smooth"})});return()=>cancelAnimationFrame(k)},[n,I]);const A=c.useCallback(o=>{R(o),p?.(o,s[o]),E.current?.slideTo(o),h&&s.length>1&&(w.current&&window.clearInterval(w.current),w.current=window.setInterval(()=>{R(e=>(e+1)%s.length)},g))},[s,p,h,g]),O=c.useCallback(o=>{const e=o.realIndex;R(e),p?.(e,s[e])},[s,p]),b=s[n],z=x==="top";return(0,r.jsxs)("div",{ref:S,className:(0,a.cn)("scene-switcher-root","text-info-primary w-full",t,i.root,{"aiui-dark":l.theme==="dark"}),...d,children:[(u||f)&&(0,r.jsxs)("div",{className:(0,a.cn)("scene-switcher-header mb-6",i.header),children:[u&&(0,r.jsx)(m.Heading,{as:"h2",size:4,html:u,className:(0,a.cn)("scene-switcher-title",i.title)}),f&&(0,r.jsx)(m.Text,{as:"p",size:3,className:(0,a.cn)("",i?.subtitle),html:f})]}),(0,r.jsx)("div",{className:(0,a.cn)("scene-switcher-swiper","laptop:hidden !overflow-visible",i.swiper),children:(0,r.jsx)(L.Swiper,{modules:[y.FreeMode,y.Mousewheel,y.Autoplay],onSwiper:o=>{E.current=o},className:"!overflow-visible",onSlideChange:O,slidesPerView:"auto",spaceBetween:12,freeMode:!0,mousewheel:{forceToAxis:!0},initialSlide:M,loop:h&&s.length>1,autoplay:h&&s.length>1?{delay:g,disableOnInteraction:!1}:!1,breakpoints:{768:{spaceBetween:16}},children:s.map((o,e)=>(0,r.jsx)(L.SwiperSlide,{className:"h-[462px] !w-[296px]",children:(0,r.jsxs)("div",{className:(0,a.cn)("scene-switcher-slide","flex cursor-pointer flex-col",i.slide),onClick:()=>A(e),children:[(0,r.jsx)("div",{className:(0,a.cn)("scene-switcher-slide-media","rounded-box relative aspect-[296/320] w-full overflow-hidden",i.slideMedia),children:(0,r.jsx)(W,{media:o.media,alt:o.title,className:"rounded-t-box size-full overflow-hidden object-cover"})}),(0,r.jsxs)("div",{className:(0,a.cn)("scene-switcher-slide-content"," mt-6 border-t pt-4",n===e?"border-info-primary border-t-4":"border-lines-primary",i.slideContent),children:[(0,r.jsx)(m.Heading,{className:(0,a.cn)("scene-switcher-tab-title ",n===e?"text-info-primary":"text-info-tertiary",o.title),size:3,as:"h3",html:o.title}),o.description&&(0,r.jsx)(m.Text,{className:(0,a.cn)("desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]",n===e?"text-info-primary":"text-info-tertiary"),html:o.description})]})]})},e))})}),z&&(0,r.jsxs)("div",{className:(0,a.cn)("scene-switcher-container","laptop:flex laptop:flex-col hidden","laptop:h-[470px] desktop:h-[628px] lg-desktop:h-[746px] desktop:gap-[32px] gap-[16px]",i.container),children:[(0,r.jsx)("div",{className:(0,a.cn)("scene-switcher-media-wrapper","rounded-box flex-1 overflow-hidden",i.mediaWrapper),children:b&&(0,r.jsx)(W,{media:b.media,alt:b.title,className:(0,a.cn)("scene-switcher-media","rounded-box size-full object-cover",i.media)})}),(0,r.jsx)("div",{className:(0,a.cn)("scene-switcher-tab-list","border-lines-primary laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex border-t",i.tabList),children:s.map((o,e)=>(0,r.jsxs)("div",{ref:k=>{T.current[e]=k},className:(0,a.cn)("scene-switcher-tab-item","desktop:pt-6 -mt-px flex-1 cursor-pointer border-t-2 pt-4 transition-colors",n===e?"border-info-primary border-t-4":"hover:border-lines-primary border-transparent",i.tabItem),onClick:()=>A(e),role:"button","aria-selected":n===e,children:[(0,r.jsx)(m.Heading,{className:(0,a.cn)("scene-switcher-tab-title line-clamp-2",n===e?"text-info-primary":"text-info-tertiary",o.title),size:3,as:"h3",html:o.title}),o.description&&(0,r.jsx)(m.Text,{className:(0,a.cn)("desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]",n===e?"text-info-primary":"text-info-tertiary"),html:o.description})]},e))})]}),!z&&(0,r.jsxs)("div",{className:(0,a.cn)("scene-switcher-container","laptop:flex laptop:gap-6 desktop:gap-8 lg-desktop:gap-10 hidden","laptop:h-[336px] desktop:h-[448px] lg-desktop:h-[560px]",x==="right"&&"flex-row-reverse",i.container),children:[(0,r.jsx)("div",{className:(0,a.cn)("scene-switcher-tab-list","laptop:w-[320px] desktop:w-[400px] lg-desktop:w-[544px] flex items-center",i.tabList),children:(0,r.jsx)("div",{className:"flex max-h-full w-full flex-col overflow-y-auto",children:s.map((o,e)=>(0,r.jsxs)(c.Fragment,{children:[e>0&&(0,r.jsx)("div",{className:"border-lines-primary h-8 shrink-0 border-l-4"}),(0,r.jsxs)("div",{ref:k=>{T.current[e]=k},className:(0,a.cn)("scene-switcher-tab-item","shrink-0 cursor-pointer border-l-4 pl-5",n===e?"border-info-primary border-l-[6px]":"border-lines-primary hover:border-info-tertiary",i.tabItem),onClick:()=>A(e),role:"button","aria-selected":n===e,children:[(0,r.jsx)(m.Heading,{className:(0,a.cn)("scene-switcher-tab-title desktop:line-clamp-3 line-clamp-2",n===e?"text-info-primary":"text-info-tertiary",o.title),size:3,as:"h3",html:o.title}),o.description&&(0,r.jsx)(m.Text,{className:(0,a.cn)("desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]",n===e?"text-info-primary":"text-info-tertiary hidden"),html:o.description})]})]},e))})}),(0,r.jsx)("div",{className:(0,a.cn)("scene-switcher-media-wrapper","rounded-box flex-1 overflow-hidden",i.mediaWrapper),children:b&&(0,r.jsx)(W,{media:b.media,alt:b.title,className:(0,a.cn)("scene-switcher-media","rounded-box size-full h-full overflow-visible object-cover",i.media)})})]})]})});F.displayName="MediaSceneSwitcherV2";var te=(0,j.withLayout)(F);
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/MediaSceneSwitcherV2/index.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { FreeMode, Mousewheel, Autoplay } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\nimport { useMediaQuery } from 'react-responsive'\nimport { cn } from '../../helpers/index.js'\nimport Picture from '../../components/picture.js'\nimport type { Media, Theme } from '../../types/props.js'\nimport { Heading, Text } from '../../components/index.js'\n\nexport type MediaSceneSwitcherV2SemanticName =\n | 'root'\n | 'header'\n | 'title'\n | 'subtitle'\n | 'container'\n | 'tabList'\n | 'tabItem'\n | 'tabTitle'\n | 'tabDescription'\n | 'mediaWrapper'\n | 'media'\n | 'swiper'\n | 'slide'\n | 'slideMedia'\n | 'slideContent'\n\n/**\n * \u573A\u666F\u9879\u6570\u636E\u63A5\u53E3\n */\nexport interface MediaSceneSwitcherV2Item {\n /** \u573A\u666F\u6807\u9898 */\n title: string\n /** \u573A\u666F\u63CF\u8FF0 */\n description?: string\n /** \u573A\u666F\u5A92\u4F53\uFF08\u56FE\u7247/\u89C6\u9891\uFF09 */\n media: {\n mobile?: Media\n tablet?: Media\n laptop?: Media\n desktop?: Media\n lgDesktop?: Media\n }\n}\n\n/**\n * \u5E03\u5C40\u6A21\u5F0F\n * - left: \u5DE6\u6587\u53F3\u56FE\uFF08laptop+ \u9ED8\u8BA4\uFF09\n * - right: \u5DE6\u56FE\u53F3\u6587\n * - top: \u4E0A\u56FE\u4E0B\u6587\uFF08swiper \u5361\u7247\u6A21\u5F0F\uFF09\n */\nexport type MediaSceneSwitcherV2Layout = 'left' | 'right' | 'top'\n\n/**\n * MediaSceneSwitcherV2 \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface MediaSceneSwitcherV2Data {\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u4E3B\u6807\u9898 */\n title?: string\n /** \u526F\u6807\u9898 */\n subtitle?: string\n /** \u573A\u666F\u5217\u8868 */\n items: MediaSceneSwitcherV2Item[]\n /** \u9ED8\u8BA4\u9009\u4E2D\u7684\u573A\u666F\u7D22\u5F15 */\n defaultActiveIndex?: number\n /** \u5E03\u5C40\u6A21\u5F0F\uFF0C\u9ED8\u8BA4 text-left */\n layout?: MediaSceneSwitcherV2Layout\n /** \u662F\u5426\u5F00\u542F\u81EA\u52A8\u8F6E\u64AD\uFF0C\u9ED8\u8BA4 true */\n autoplay?: boolean\n /** \u81EA\u52A8\u8F6E\u64AD\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\uFF0C\u9ED8\u8BA4 3000 */\n autoplayDelay?: number\n}\n\nexport interface MediaSceneSwitcherV2Props extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: MediaSceneSwitcherV2Data\n /** \u8BED\u4E49\u5316\u7C7B\u540D\u8986\u76D6 */\n classNames?: Partial<Record<MediaSceneSwitcherV2SemanticName, string>>\n /** \u573A\u666F\u5207\u6362\u56DE\u8C03 */\n onSceneChange?: (index: number, scene: MediaSceneSwitcherV2Item) => void\n}\n\n/**\n * \u54CD\u5E94\u5F0F\u5A92\u4F53\u7C7B\u578B\n */\ntype ResponsiveMedia = MediaSceneSwitcherV2Item['media']\n\n/** \u65AD\u70B9\u914D\u7F6E */\nconst BREAKPOINTS: { key: keyof ResponsiveMedia; width: number }[] = [\n { key: 'lgDesktop', width: 1920 },\n { key: 'desktop', width: 1440 },\n { key: 'laptop', width: 1024 },\n { key: 'tablet', width: 768 },\n { key: 'mobile', width: 390 },\n]\n\n/**\n * \u68C0\u67E5\u5F53\u524D\u65AD\u70B9\u7684\u5A92\u4F53\u662F\u5426\u4E3A\u89C6\u9891\n */\nconst isCurrentMediaVideo = (media: ResponsiveMedia, currentBreakpoint: keyof ResponsiveMedia): boolean => {\n return media[currentBreakpoint]?.mimeType === 'video/mp4'\n}\n\n/**\n * \u5C06\u54CD\u5E94\u5F0F\u5A92\u4F53\u5BF9\u8C61\u8F6C\u4E3A Picture source \u683C\u5F0F\u5B57\u7B26\u4E32\n * \u683C\u5F0F: \"url1 1920, url2 1440, url3 1024\"\n */\nconst getImageSource = (media: ResponsiveMedia): string => {\n const sources = BREAKPOINTS.filter(({ key }) => media[key]?.url && media[key]?.mimeType !== 'video/mp4').map(\n ({ key, width }) => `${media[key]!.url} ${width}`\n )\n\n return sources.join(', ')\n}\n\n/**\n * \u83B7\u53D6 alt \u6587\u672C\n */\nconst getMediaAlt = (media: ResponsiveMedia, fallback: string): string => {\n for (const { key } of BREAKPOINTS) {\n if (media[key]?.alt) return media[key]!.alt\n }\n return fallback\n}\n\n/**\n * \u5A92\u4F53\u6E32\u67D3\u7EC4\u4EF6 - \u652F\u6301\u56FE\u7247\u548C\u89C6\u9891\uFF0C\u6839\u636E\u65AD\u70B9\u6E32\u67D3\u5BF9\u5E94\u8D44\u6E90\n */\nconst MediaRenderer: React.FC<{\n media: ResponsiveMedia\n alt: string\n className?: string\n}> = ({ media, alt, className }) => {\n const isLgDesktop = useMediaQuery({ minWidth: 1920 })\n const isDesktop = useMediaQuery({ minWidth: 1440, maxWidth: 1919 })\n const isLaptop = useMediaQuery({ minWidth: 1025, maxWidth: 1439 })\n const isTablet = useMediaQuery({ minWidth: 768, maxWidth: 1024 })\n\n // \u83B7\u53D6\u5F53\u524D\u65AD\u70B9 key\n const currentBreakpoint = React.useMemo((): keyof ResponsiveMedia => {\n if (isLgDesktop && media.lgDesktop?.url) return 'lgDesktop'\n if (isDesktop && media.desktop?.url) return 'desktop'\n if (isLaptop && media.laptop?.url) return 'laptop'\n if (isTablet && media.tablet?.url) return 'tablet'\n if (media.mobile?.url) return 'mobile'\n\n // fallback: \u8FD4\u56DE\u7B2C\u4E00\u4E2A\u6709\u6548\u7684\u65AD\u70B9\n for (const { key } of BREAKPOINTS) {\n if (media[key]?.url) return key\n }\n return 'desktop'\n }, [isLgDesktop, isDesktop, isLaptop, isTablet, media])\n\n const currentMedia = media[currentBreakpoint]\n\n if (!currentMedia?.url) return null\n\n // \u5F53\u524D\u65AD\u70B9\u662F\u89C6\u9891\u5219\u6E32\u67D3\u89C6\u9891\n if (isCurrentMediaVideo(media, currentBreakpoint)) {\n return <video src={currentMedia.url} className={className} autoPlay loop muted playsInline />\n }\n\n // \u56FE\u7247\uFF1A\u4F7F\u7528 Picture \u7EC4\u4EF6\u7684\u54CD\u5E94\u5F0F\u683C\u5F0F\n const imageSource = getImageSource(media)\n\n return (\n <Picture\n source={imageSource || currentMedia.url}\n alt={getMediaAlt(media, alt)}\n className={className}\n imgClassName=\"size-full object-cover\"\n />\n )\n}\n\n/**\n * MediaSceneSwitcherV2 - \u591A\u573A\u666F\u5207\u6362\u7EC4\u4EF6\n *\n * @description \u7528\u4E8E\u5C55\u793A\u591A\u4E2A\u573A\u666F\u7684\u5207\u6362\u7EC4\u4EF6\uFF0C\u652F\u6301\u54CD\u5E94\u5F0F\u5E03\u5C40\uFF1A\n * - mobile/tablet: \u6A2A\u5411\u6ED1\u52A8\u5361\u7247\u5E03\u5C40\n * - laptop+: \u5DE6\u6587\u53F3\u56FE / \u5DE6\u56FE\u53F3\u6587\u5E03\u5C40\n */\nconst DEFAULT_AUTOPLAY_DELAY = 3000\n\nconst MediaSceneSwitcherV2 = React.forwardRef<HTMLDivElement, MediaSceneSwitcherV2Props>(\n ({ className, classNames = {}, data, onSceneChange, ...props }, ref) => {\n const {\n title,\n subtitle,\n items: scenes,\n defaultActiveIndex = 0,\n layout = 'left',\n autoplay = true,\n autoplayDelay = DEFAULT_AUTOPLAY_DELAY,\n } = data\n const [activeIndex, setActiveIndex] = React.useState(defaultActiveIndex)\n const swiperRef = React.useRef<SwiperType | null>(null)\n const intervalRef = React.useRef<number>(0)\n\n // \u684C\u9762\u7AEF\u81EA\u52A8\u8F6E\u64AD\n React.useEffect(() => {\n if (!autoplay || scenes.length <= 1) return\n\n intervalRef.current = window.setInterval(() => {\n setActiveIndex(prev => (prev + 1) % scenes.length)\n }, autoplayDelay)\n\n return () => {\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n }\n }, [autoplay, autoplayDelay, scenes.length])\n\n const handleSceneClick = React.useCallback(\n (index: number) => {\n setActiveIndex(index)\n onSceneChange?.(index, scenes[index])\n // \u540C\u6B65 swiper \u4F4D\u7F6E\n swiperRef.current?.slideTo(index)\n\n // \u91CD\u7F6E\u81EA\u52A8\u8F6E\u64AD\u8BA1\u65F6\u5668\n if (autoplay && scenes.length > 1) {\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n intervalRef.current = window.setInterval(() => {\n setActiveIndex(prev => (prev + 1) % scenes.length)\n }, autoplayDelay)\n }\n },\n [scenes, onSceneChange, autoplay, autoplayDelay]\n )\n\n const handleSlideChange = React.useCallback(\n (swiper: SwiperType) => {\n // \u4F7F\u7528 realIndex \u4EE5\u6B63\u786E\u5904\u7406 loop \u6A21\u5F0F\n const index = swiper.realIndex\n setActiveIndex(index)\n onSceneChange?.(index, scenes[index])\n },\n [scenes, onSceneChange]\n )\n\n const activeScene = scenes[activeIndex]\n\n const isMediaTop = layout === 'top'\n\n return (\n <div\n ref={ref}\n className={cn('scene-switcher-root', 'text-info-primary w-full', className, classNames.root, {\n 'aiui-dark': data.theme === 'dark',\n })}\n {...props}\n >\n {/* \u6807\u9898\u533A\u57DF */}\n {(title || subtitle) && (\n <div className={cn('scene-switcher-header mb-6', classNames.header)}>\n {title && (\n <Heading as=\"h2\" size={4} html={title} className={cn('scene-switcher-title', classNames.title)} />\n )}\n {subtitle && <Text as=\"p\" size={3} className={cn('', classNames?.subtitle)} html={subtitle} />}\n </div>\n )}\n {/* Mobile/Tablet: \u6A2A\u5411\u6ED1\u52A8\u5361\u7247\u5E03\u5C40 */}\n <div className={cn('scene-switcher-swiper', 'laptop:hidden !overflow-visible', classNames.swiper)}>\n <Swiper\n modules={[FreeMode, Mousewheel, Autoplay]}\n onSwiper={swiper => {\n swiperRef.current = swiper\n }}\n className=\"!overflow-visible\"\n onSlideChange={handleSlideChange}\n slidesPerView=\"auto\"\n spaceBetween={12}\n freeMode={true}\n mousewheel={{ forceToAxis: true }}\n initialSlide={defaultActiveIndex}\n loop={autoplay && scenes.length > 1}\n autoplay={autoplay && scenes.length > 1 ? { delay: autoplayDelay, disableOnInteraction: false } : false}\n breakpoints={{\n 768: { spaceBetween: 16 },\n }}\n >\n {scenes.map((scene, index) => (\n <SwiperSlide key={index} className=\"h-[462px] !w-[296px]\">\n <div\n className={cn('scene-switcher-slide', 'flex cursor-pointer flex-col', classNames.slide)}\n onClick={() => handleSceneClick(index)}\n >\n {/* \u5A92\u4F53 */}\n <div\n className={cn(\n 'scene-switcher-slide-media',\n 'relative aspect-[296/320] w-full overflow-hidden',\n classNames.slideMedia\n )}\n >\n <MediaRenderer\n media={scene.media}\n alt={scene.title}\n className=\"rounded-t-box size-full overflow-hidden object-cover\"\n />\n </div>\n {/* \u6587\u5B57\u5185\u5BB9 */}\n <div\n className={cn(\n 'scene-switcher-slide-content',\n ' border-t pt-4',\n activeIndex === index ? 'border-info-primary border-t-4' : 'border-lines-primary',\n classNames.slideContent\n )}\n >\n <Heading\n className={cn(\n 'scene-switcher-tab-title ',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary',\n scene.title\n )}\n size={3}\n as={'h3'}\n html={scene.title}\n />\n {scene.description && (\n <Text\n className={cn(\n 'desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary'\n )}\n html={scene.description}\n />\n )}\n </div>\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n\n {/* Laptop+: media-top \u5E03\u5C40 (\u4E0A\u56FE\u4E0B\u6587) */}\n {isMediaTop && (\n <div\n className={cn(\n 'scene-switcher-container',\n 'laptop:flex laptop:flex-col hidden',\n 'laptop:h-[470px] desktop:h-[628px] lg-desktop:h-[746px] desktop:gap-[32px] gap-[16px]',\n classNames.container\n )}\n >\n {/* \u5A92\u4F53\u533A\u57DF - \u663E\u793A\u5F53\u524D\u9009\u4E2D */}\n <div className={cn('scene-switcher-media-wrapper', 'flex-1 overflow-hidden', classNames.mediaWrapper)}>\n {activeScene && (\n <MediaRenderer\n media={activeScene.media}\n alt={activeScene.title}\n className={cn('scene-switcher-media', 'rounded-box size-full object-cover', classNames.media)}\n />\n )}\n </div>\n\n {/* Tab \u5217\u8868 - \u6A2A\u5411\u6392\u5217 */}\n <div\n className={cn(\n 'scene-switcher-tab-list',\n 'border-lines-primary laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex border-t',\n classNames.tabList\n )}\n >\n {scenes.map((scene, index) => (\n <div\n key={index}\n className={cn(\n 'scene-switcher-tab-item',\n 'desktop:pt-6 -mt-px flex-1 cursor-pointer border-t-2 pt-4 transition-colors',\n activeIndex === index\n ? 'border-info-primary border-t-4'\n : 'hover:border-lines-primary border-transparent',\n classNames.tabItem\n )}\n onClick={() => handleSceneClick(index)}\n role=\"button\"\n aria-selected={activeIndex === index}\n >\n <Heading\n className={cn(\n 'scene-switcher-tab-title line-clamp-2',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary',\n scene.title\n )}\n size={3}\n as={'h3'}\n html={scene.title}\n />\n {scene.description && (\n <Text\n className={cn(\n 'desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary'\n )}\n html={scene.description}\n />\n )}\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Laptop+: \u5DE6\u6587\u53F3\u56FE / \u5DE6\u56FE\u53F3\u6587\u5E03\u5C40 */}\n {!isMediaTop && (\n <div\n className={cn(\n 'scene-switcher-container',\n 'laptop:flex laptop:gap-6 desktop:gap-8 lg-desktop:gap-10 hidden',\n 'laptop:h-[336px] desktop:h-[448px] lg-desktop:h-[560px]',\n layout === 'right' && 'flex-row-reverse',\n classNames.container\n )}\n >\n {/* Tab \u5217\u8868 */}\n <div\n className={cn(\n 'scene-switcher-tab-list',\n 'border-lines-primary laptop:w-[320px] desktop:w-[400px] lg-desktop:w-[544px] flex flex-col justify-center border-t',\n classNames.tabList\n )}\n >\n {scenes.map((scene, index) => (\n <div\n key={index}\n className={cn(\n 'scene-switcher-tab-item',\n 'relative cursor-pointer py-4',\n 'before:bg-lines before:absolute before:inset-y-4 before:w-1',\n 'pl-6 before:left-0',\n activeIndex === index ? 'before:bg-info-primary' : 'hover:before:bg-lines-primary before:bg-lines',\n classNames.tabItem\n )}\n onClick={() => handleSceneClick(index)}\n role=\"button\"\n aria-selected={activeIndex === index}\n >\n <Heading\n className={cn(\n 'scene-switcher-tab-title',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary',\n scene.title\n )}\n size={3}\n as={'h3'}\n html={scene.title}\n />\n {scene.description && (\n <Text\n className={cn(\n 'desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary hidden'\n )}\n html={scene.description}\n />\n )}\n </div>\n ))}\n </div>\n\n {/* \u5A92\u4F53\u533A\u57DF */}\n <div className={cn('scene-switcher-media-wrapper', 'flex-1 overflow-hidden', classNames.mediaWrapper)}>\n {activeScene && (\n <MediaRenderer\n media={activeScene.media}\n alt={activeScene.title}\n className={cn(\n 'scene-switcher-media',\n 'rounded-box size-full h-full overflow-visible object-cover',\n classNames.media\n )}\n />\n )}\n </div>\n </div>\n )}\n </div>\n )\n }\n)\n\nMediaSceneSwitcherV2.displayName = 'MediaSceneSwitcherV2'\nexport default MediaSceneSwitcherV2\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAmKW,IAAAI,EAAA,6BAjKXC,EAAuB,oBACvBC,EAAoC,wBACpCC,EAA+C,0BAE/CC,EAA8B,4BAC9BC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GACF,GAEJ,CAEJ,CACF,EAEAD,EAAqB,YAAc,uBACnC,IAAO9B,EAAQ8B",
6
- "names": ["MediaSceneSwitcherV2_exports", "__export", "MediaSceneSwitcherV2_default", "__toCommonJS", "import_jsx_runtime", "React", "import_react", "import_modules", "import_react_responsive", "import_helpers", "import_picture", "import_components", "BREAKPOINTS", "isCurrentMediaVideo", "media", "currentBreakpoint", "getImageSource", "key", "width", "getMediaAlt", "fallback", "MediaRenderer", "alt", "className", "isLgDesktop", "isDesktop", "isLaptop", "isTablet", "currentMedia", "imageSource", "Picture", "DEFAULT_AUTOPLAY_DELAY", "MediaSceneSwitcherV2", "classNames", "data", "onSceneChange", "props", "ref", "title", "subtitle", "scenes", "defaultActiveIndex", "layout", "autoplay", "autoplayDelay", "activeIndex", "setActiveIndex", "swiperRef", "intervalRef", "prev", "handleSceneClick", "index", "handleSlideChange", "swiper", "activeScene", "isMediaTop", "scene"]
4
+ "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { Swiper, SwiperSlide } from 'swiper/react'\nimport { FreeMode, Mousewheel, Autoplay } from 'swiper/modules'\nimport type { Swiper as SwiperType } from 'swiper'\nimport { useMediaQuery } from 'react-responsive'\nimport { cn } from '../../helpers/index.js'\nimport Picture from '../../components/picture.js'\nimport type { Media, Theme } from '../../types/props.js'\nimport { Heading, Text } from '../../components/index.js'\nimport { withLayout } from '../../shared/Styles.js'\n\nexport type MediaSceneSwitcherV2SemanticName =\n | 'root'\n | 'header'\n | 'title'\n | 'subtitle'\n | 'container'\n | 'tabList'\n | 'tabItem'\n | 'tabTitle'\n | 'tabDescription'\n | 'mediaWrapper'\n | 'media'\n | 'swiper'\n | 'slide'\n | 'slideMedia'\n | 'slideContent'\n\n/**\n * \u573A\u666F\u9879\u6570\u636E\u63A5\u53E3\n */\nexport interface MediaSceneSwitcherV2Item {\n /** \u573A\u666F\u6807\u9898 */\n title: string\n /** \u573A\u666F\u63CF\u8FF0 */\n description?: string\n /** \u573A\u666F\u5A92\u4F53\uFF08\u56FE\u7247/\u89C6\u9891\uFF09 */\n media: {\n mobile?: Media\n tablet?: Media\n laptop?: Media\n desktop?: Media\n lgDesktop?: Media\n }\n}\n\n/**\n * \u5E03\u5C40\u6A21\u5F0F\n * - left: \u5DE6\u6587\u53F3\u56FE\uFF08laptop+ \u9ED8\u8BA4\uFF09\n * - right: \u5DE6\u56FE\u53F3\u6587\n * - top: \u4E0A\u56FE\u4E0B\u6587\uFF08swiper \u5361\u7247\u6A21\u5F0F\uFF09\n */\nexport type MediaSceneSwitcherV2Layout = 'left' | 'right' | 'top'\n\n/**\n * MediaSceneSwitcherV2 \u4E1A\u52A1\u7EC4\u4EF6\u6570\u636E\u63A5\u53E3\n */\nexport interface MediaSceneSwitcherV2Data {\n /** \u4E3B\u9898 */\n theme?: Theme\n /** \u4E3B\u6807\u9898 */\n title?: string\n /** \u526F\u6807\u9898 */\n subtitle?: string\n /** \u573A\u666F\u5217\u8868 */\n items: MediaSceneSwitcherV2Item[]\n /** \u9ED8\u8BA4\u9009\u4E2D\u7684\u573A\u666F\u7D22\u5F15 */\n defaultActiveIndex?: number\n /** \u5E03\u5C40\u6A21\u5F0F\uFF0C\u9ED8\u8BA4 text-left */\n layout?: MediaSceneSwitcherV2Layout\n /** \u662F\u5426\u5F00\u542F\u81EA\u52A8\u8F6E\u64AD\uFF0C\u9ED8\u8BA4 true */\n autoplay?: boolean\n /** \u81EA\u52A8\u8F6E\u64AD\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09\uFF0C\u9ED8\u8BA4 3000 */\n autoplayDelay?: number\n}\n\nexport interface MediaSceneSwitcherV2Props extends React.HTMLAttributes<HTMLDivElement> {\n /** \u4E1A\u52A1\u6570\u636E */\n data: MediaSceneSwitcherV2Data\n /** \u8BED\u4E49\u5316\u7C7B\u540D\u8986\u76D6 */\n classNames?: Partial<Record<MediaSceneSwitcherV2SemanticName, string>>\n /** \u573A\u666F\u5207\u6362\u56DE\u8C03 */\n onSceneChange?: (index: number, scene: MediaSceneSwitcherV2Item) => void\n}\n\n/**\n * \u54CD\u5E94\u5F0F\u5A92\u4F53\u7C7B\u578B\n */\ntype ResponsiveMedia = MediaSceneSwitcherV2Item['media']\n\n/** \u65AD\u70B9\u914D\u7F6E */\nconst BREAKPOINTS: { key: keyof ResponsiveMedia; width: number }[] = [\n { key: 'lgDesktop', width: 1920 },\n { key: 'desktop', width: 1440 },\n { key: 'laptop', width: 1024 },\n { key: 'tablet', width: 768 },\n { key: 'mobile', width: 390 },\n]\n\n/**\n * \u68C0\u67E5\u5F53\u524D\u65AD\u70B9\u7684\u5A92\u4F53\u662F\u5426\u4E3A\u89C6\u9891\n */\nconst isCurrentMediaVideo = (media: ResponsiveMedia, currentBreakpoint: keyof ResponsiveMedia): boolean => {\n return media[currentBreakpoint]?.mimeType === 'video/mp4'\n}\n\n/**\n * \u5C06\u54CD\u5E94\u5F0F\u5A92\u4F53\u5BF9\u8C61\u8F6C\u4E3A Picture source \u683C\u5F0F\u5B57\u7B26\u4E32\n * \u683C\u5F0F: \"url1 1920, url2 1440, url3 1024\"\n */\nconst getImageSource = (media: ResponsiveMedia): string => {\n const sources = BREAKPOINTS.filter(({ key }) => media[key]?.url && media[key]?.mimeType !== 'video/mp4').map(\n ({ key, width }) => `${media[key]!.url} ${width}`\n )\n\n return sources.join(', ')\n}\n\n/**\n * \u83B7\u53D6 alt \u6587\u672C\n */\nconst getMediaAlt = (media: ResponsiveMedia, fallback: string): string => {\n for (const { key } of BREAKPOINTS) {\n if (media[key]?.alt) return media[key]!.alt\n }\n return fallback\n}\n\n/**\n * \u5A92\u4F53\u6E32\u67D3\u7EC4\u4EF6 - \u652F\u6301\u56FE\u7247\u548C\u89C6\u9891\uFF0C\u6839\u636E\u65AD\u70B9\u6E32\u67D3\u5BF9\u5E94\u8D44\u6E90\n */\nconst MediaRenderer: React.FC<{\n media: ResponsiveMedia\n alt: string\n className?: string\n}> = ({ media, alt, className }) => {\n const isLgDesktop = useMediaQuery({ minWidth: 1920 })\n const isDesktop = useMediaQuery({ minWidth: 1440, maxWidth: 1919 })\n const isLaptop = useMediaQuery({ minWidth: 1025, maxWidth: 1439 })\n const isTablet = useMediaQuery({ minWidth: 768, maxWidth: 1024 })\n\n // \u83B7\u53D6\u5F53\u524D\u65AD\u70B9 key\n const currentBreakpoint = React.useMemo((): keyof ResponsiveMedia => {\n if (isLgDesktop && media.lgDesktop?.url) return 'lgDesktop'\n if (isDesktop && media.desktop?.url) return 'desktop'\n if (isLaptop && media.laptop?.url) return 'laptop'\n if (isTablet && media.tablet?.url) return 'tablet'\n if (media.mobile?.url) return 'mobile'\n\n // fallback: \u8FD4\u56DE\u7B2C\u4E00\u4E2A\u6709\u6548\u7684\u65AD\u70B9\n for (const { key } of BREAKPOINTS) {\n if (media[key]?.url) return key\n }\n return 'desktop'\n }, [isLgDesktop, isDesktop, isLaptop, isTablet, media])\n\n const currentMedia = media[currentBreakpoint]\n\n if (!currentMedia?.url) return null\n\n // \u5F53\u524D\u65AD\u70B9\u662F\u89C6\u9891\u5219\u6E32\u67D3\u89C6\u9891\n if (isCurrentMediaVideo(media, currentBreakpoint)) {\n return <video src={currentMedia.url} className={className} autoPlay loop muted playsInline />\n }\n\n // \u56FE\u7247\uFF1A\u4F7F\u7528 Picture \u7EC4\u4EF6\u7684\u54CD\u5E94\u5F0F\u683C\u5F0F\n const imageSource = getImageSource(media)\n\n return (\n <Picture\n source={imageSource || currentMedia.url}\n alt={getMediaAlt(media, alt)}\n className={className}\n imgClassName=\"size-full object-cover\"\n />\n )\n}\n\n/**\n * MediaSceneSwitcherV2 - \u591A\u573A\u666F\u5207\u6362\u7EC4\u4EF6\n *\n * @description \u7528\u4E8E\u5C55\u793A\u591A\u4E2A\u573A\u666F\u7684\u5207\u6362\u7EC4\u4EF6\uFF0C\u652F\u6301\u54CD\u5E94\u5F0F\u5E03\u5C40\uFF1A\n * - mobile/tablet: \u6A2A\u5411\u6ED1\u52A8\u5361\u7247\u5E03\u5C40\n * - laptop+: \u5DE6\u6587\u53F3\u56FE / \u5DE6\u56FE\u53F3\u6587\u5E03\u5C40\n */\nconst DEFAULT_AUTOPLAY_DELAY = 3000\n\nconst MediaSceneSwitcherV2 = React.forwardRef<HTMLDivElement, MediaSceneSwitcherV2Props>(\n ({ className, classNames = {}, data, onSceneChange, ...props }, ref) => {\n const {\n title,\n subtitle,\n items: scenes,\n defaultActiveIndex = 0,\n layout = 'left',\n autoplay = true,\n autoplayDelay = DEFAULT_AUTOPLAY_DELAY,\n } = data\n const [activeIndex, setActiveIndex] = React.useState(defaultActiveIndex)\n const swiperRef = React.useRef<SwiperType | null>(null)\n const intervalRef = React.useRef<number>(0)\n const tabRefs = React.useRef<(HTMLDivElement | null)[]>([])\n\n // \u5224\u65AD\u662F\u5426\u662F\u684C\u9762\u7AEF\n const isLaptopOrLarger = useMediaQuery({ minWidth: 1025 })\n\n // \u684C\u9762\u7AEF\u81EA\u52A8\u8F6E\u64AD\uFF08\u53EA\u5728 laptop+ \u751F\u6548\uFF0C\u624B\u673A\u7AEF\u7531 Swiper \u7684 onSlideChange \u540C\u6B65\uFF09\n React.useEffect(() => {\n if (!autoplay || scenes.length <= 1 || !isLaptopOrLarger) return\n\n const startAutoplay = () => {\n intervalRef.current = window.setInterval(() => {\n setActiveIndex(prev => (prev + 1) % scenes.length)\n }, autoplayDelay)\n }\n\n startAutoplay()\n\n return () => {\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n }\n }, [autoplay, autoplayDelay, scenes.length, isLaptopOrLarger])\n\n // \u5F53 activeIndex \u53D8\u5316\u65F6\u81EA\u52A8\u6EDA\u52A8\u5230\u5BF9\u5E94\u7684 tab\uFF08\u4EC5\u5F53\u7236\u5BB9\u5668\u53EF\u6EDA\u52A8\u65F6\uFF09\n React.useEffect(() => {\n if (!isLaptopOrLarger || !tabRefs.current[activeIndex]) return\n\n const tabElement = tabRefs.current[activeIndex]\n const parentContainer = tabElement?.parentElement\n\n // \u68C0\u67E5\u7236\u5BB9\u5668\u662F\u5426\u53EF\u6EDA\u52A8\n if (!parentContainer || parentContainer.scrollHeight <= parentContainer.clientHeight) return\n\n // \u4F7F\u7528 requestAnimationFrame \u907F\u514D\u963B\u585E\u4E3B\u7EBF\u7A0B\n const rafId = requestAnimationFrame(() => {\n const containerRect = parentContainer.getBoundingClientRect()\n const tabRect = tabElement.getBoundingClientRect()\n\n // \u68C0\u67E5\u5143\u7D20\u662F\u5426\u5DF2\u5728\u53EF\u89C6\u533A\u57DF\u5185\n const isVisible = tabRect.top >= containerRect.top && tabRect.bottom <= containerRect.bottom\n\n // \u5982\u679C\u5DF2\u7ECF\u53EF\u89C1\uFF0C\u4E0D\u9700\u8981\u6EDA\u52A8\n if (isVisible) return\n\n // \u8BA1\u7B97\u6EDA\u52A8\u8DDD\u79BB\uFF0C\u8BA9 tab \u5C3D\u91CF\u5C45\u4E2D\u663E\u793A\n const scrollOffset = tabRect.top - containerRect.top - parentContainer.clientHeight / 2 + tabRect.height / 2\n\n parentContainer.scrollTo({\n top: parentContainer.scrollTop + scrollOffset,\n behavior: 'smooth',\n })\n })\n\n return () => cancelAnimationFrame(rafId)\n }, [activeIndex, isLaptopOrLarger])\n\n const handleSceneClick = React.useCallback(\n (index: number) => {\n setActiveIndex(index)\n onSceneChange?.(index, scenes[index])\n // \u540C\u6B65 swiper \u4F4D\u7F6E\n swiperRef.current?.slideTo(index)\n\n // \u91CD\u7F6E\u81EA\u52A8\u8F6E\u64AD\u8BA1\u65F6\u5668\n if (autoplay && scenes.length > 1) {\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n intervalRef.current = window.setInterval(() => {\n setActiveIndex(prev => (prev + 1) % scenes.length)\n }, autoplayDelay)\n }\n },\n [scenes, onSceneChange, autoplay, autoplayDelay]\n )\n\n const handleSlideChange = React.useCallback(\n (swiper: SwiperType) => {\n // \u4F7F\u7528 realIndex \u4EE5\u6B63\u786E\u5904\u7406 loop \u6A21\u5F0F\n const index = swiper.realIndex\n setActiveIndex(index)\n onSceneChange?.(index, scenes[index])\n },\n [scenes, onSceneChange]\n )\n\n const activeScene = scenes[activeIndex]\n\n const isMediaTop = layout === 'top'\n\n return (\n <div\n ref={ref}\n className={cn('scene-switcher-root', 'text-info-primary w-full', className, classNames.root, {\n 'aiui-dark': data.theme === 'dark',\n })}\n {...props}\n >\n {/* \u6807\u9898\u533A\u57DF */}\n {(title || subtitle) && (\n <div className={cn('scene-switcher-header mb-6', classNames.header)}>\n {title && (\n <Heading as=\"h2\" size={4} html={title} className={cn('scene-switcher-title', classNames.title)} />\n )}\n {subtitle && <Text as=\"p\" size={3} className={cn('', classNames?.subtitle)} html={subtitle} />}\n </div>\n )}\n {/* Mobile/Tablet: \u6A2A\u5411\u6ED1\u52A8\u5361\u7247\u5E03\u5C40 */}\n <div className={cn('scene-switcher-swiper', 'laptop:hidden !overflow-visible', classNames.swiper)}>\n <Swiper\n modules={[FreeMode, Mousewheel, Autoplay]}\n onSwiper={swiper => {\n swiperRef.current = swiper\n }}\n className=\"!overflow-visible\"\n onSlideChange={handleSlideChange}\n slidesPerView=\"auto\"\n spaceBetween={12}\n freeMode={true}\n mousewheel={{ forceToAxis: true }}\n initialSlide={defaultActiveIndex}\n loop={autoplay && scenes.length > 1}\n autoplay={autoplay && scenes.length > 1 ? { delay: autoplayDelay, disableOnInteraction: false } : false}\n breakpoints={{\n 768: { spaceBetween: 16 },\n }}\n >\n {scenes.map((scene, index) => (\n <SwiperSlide key={index} className=\"h-[462px] !w-[296px]\">\n <div\n className={cn('scene-switcher-slide', 'flex cursor-pointer flex-col', classNames.slide)}\n onClick={() => handleSceneClick(index)}\n >\n {/* \u5A92\u4F53 */}\n <div\n className={cn(\n 'scene-switcher-slide-media',\n 'rounded-box relative aspect-[296/320] w-full overflow-hidden',\n classNames.slideMedia\n )}\n >\n <MediaRenderer\n media={scene.media}\n alt={scene.title}\n className=\"rounded-t-box size-full overflow-hidden object-cover\"\n />\n </div>\n {/* \u6587\u5B57\u5185\u5BB9 */}\n <div\n className={cn(\n 'scene-switcher-slide-content',\n ' mt-6 border-t pt-4',\n activeIndex === index ? 'border-info-primary border-t-4' : 'border-lines-primary',\n classNames.slideContent\n )}\n >\n <Heading\n className={cn(\n 'scene-switcher-tab-title ',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary',\n scene.title\n )}\n size={3}\n as={'h3'}\n html={scene.title}\n />\n {scene.description && (\n <Text\n className={cn(\n 'desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary'\n )}\n html={scene.description}\n />\n )}\n </div>\n </div>\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n\n {/* Laptop+: media-top \u5E03\u5C40 (\u4E0A\u56FE\u4E0B\u6587) */}\n {isMediaTop && (\n <div\n className={cn(\n 'scene-switcher-container',\n 'laptop:flex laptop:flex-col hidden',\n 'laptop:h-[470px] desktop:h-[628px] lg-desktop:h-[746px] desktop:gap-[32px] gap-[16px]',\n classNames.container\n )}\n >\n {/* \u5A92\u4F53\u533A\u57DF - \u663E\u793A\u5F53\u524D\u9009\u4E2D */}\n <div\n className={cn(\n 'scene-switcher-media-wrapper',\n 'rounded-box flex-1 overflow-hidden',\n classNames.mediaWrapper\n )}\n >\n {activeScene && (\n <MediaRenderer\n media={activeScene.media}\n alt={activeScene.title}\n className={cn('scene-switcher-media', 'rounded-box size-full object-cover', classNames.media)}\n />\n )}\n </div>\n\n {/* Tab \u5217\u8868 - \u6A2A\u5411\u6392\u5217 */}\n <div\n className={cn(\n 'scene-switcher-tab-list',\n 'border-lines-primary laptop:gap-4 desktop:gap-4 lg-desktop:gap-4 flex border-t',\n classNames.tabList\n )}\n >\n {scenes.map((scene, index) => (\n <div\n key={index}\n ref={el => {\n tabRefs.current[index] = el\n }}\n className={cn(\n 'scene-switcher-tab-item',\n 'desktop:pt-6 -mt-px flex-1 cursor-pointer border-t-2 pt-4 transition-colors',\n activeIndex === index\n ? 'border-info-primary border-t-4'\n : 'hover:border-lines-primary border-transparent',\n classNames.tabItem\n )}\n onClick={() => handleSceneClick(index)}\n role=\"button\"\n aria-selected={activeIndex === index}\n >\n <Heading\n className={cn(\n 'scene-switcher-tab-title line-clamp-2',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary',\n scene.title\n )}\n size={3}\n as={'h3'}\n html={scene.title}\n />\n {scene.description && (\n <Text\n className={cn(\n 'desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary'\n )}\n html={scene.description}\n />\n )}\n </div>\n ))}\n </div>\n </div>\n )}\n\n {/* Laptop+: \u5DE6\u6587\u53F3\u56FE / \u5DE6\u56FE\u53F3\u6587\u5E03\u5C40 */}\n {!isMediaTop && (\n <div\n className={cn(\n 'scene-switcher-container',\n 'laptop:flex laptop:gap-6 desktop:gap-8 lg-desktop:gap-10 hidden',\n 'laptop:h-[336px] desktop:h-[448px] lg-desktop:h-[560px]',\n layout === 'right' && 'flex-row-reverse',\n classNames.container\n )}\n >\n {/* Tab \u5217\u8868 - \u5916\u5C42\u5C45\u4E2D */}\n <div\n className={cn(\n 'scene-switcher-tab-list',\n 'laptop:w-[320px] desktop:w-[400px] lg-desktop:w-[544px] flex items-center',\n classNames.tabList\n )}\n >\n {/* \u5185\u5C42\u6EDA\u52A8 */}\n <div className=\"flex max-h-full w-full flex-col overflow-y-auto\">\n {scenes.map((scene, index) => (\n <React.Fragment key={index}>\n {index > 0 && <div className=\"border-lines-primary h-8 shrink-0 border-l-4\" />}\n <div\n ref={el => {\n tabRefs.current[index] = el\n }}\n className={cn(\n 'scene-switcher-tab-item',\n 'shrink-0 cursor-pointer border-l-4 pl-5',\n activeIndex === index\n ? 'border-info-primary border-l-[6px]'\n : 'border-lines-primary hover:border-info-tertiary',\n classNames.tabItem\n )}\n onClick={() => handleSceneClick(index)}\n role=\"button\"\n aria-selected={activeIndex === index}\n >\n <Heading\n className={cn(\n 'scene-switcher-tab-title desktop:line-clamp-3 line-clamp-2',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary',\n scene.title\n )}\n size={3}\n as={'h3'}\n html={scene.title}\n />\n {scene.description && (\n <Text\n className={cn(\n 'desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px]',\n activeIndex === index ? 'text-info-primary' : 'text-info-tertiary hidden'\n )}\n html={scene.description}\n />\n )}\n </div>\n </React.Fragment>\n ))}\n </div>\n </div>\n\n {/* \u5A92\u4F53\u533A\u57DF */}\n <div\n className={cn(\n 'scene-switcher-media-wrapper',\n 'rounded-box flex-1 overflow-hidden',\n classNames.mediaWrapper\n )}\n >\n {activeScene && (\n <MediaRenderer\n media={activeScene.media}\n alt={activeScene.title}\n className={cn(\n 'scene-switcher-media',\n 'rounded-box size-full h-full overflow-visible object-cover',\n classNames.media\n )}\n />\n )}\n </div>\n </div>\n )}\n </div>\n )\n }\n)\n\nMediaSceneSwitcherV2.displayName = 'MediaSceneSwitcherV2'\nexport default withLayout(MediaSceneSwitcherV2)\n"],
5
+ "mappings": "ukBAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,aAAAE,KAAA,eAAAC,EAAAH,IAoKW,IAAAI,EAAA,6BAlKXC,EAAuB,oBACvBC,EAAoC,wBACpCC,EAA+C,0BAE/CC,EAA8B,4BAC9BC,EAAmB,kCACnBC,EAAoB,0CAEpBC,EAA8B,qCAC9BC,EAA2B,kCAkF3B,MAAMC,EAA+D,CACnE,CAAE,IAAK,YAAa,MAAO,IAAK,EAChC,CAAE,IAAK,UAAW,MAAO,IAAK,EAC9B,CAAE,IAAK,SAAU,MAAO,IAAK,EAC7B,CAAE,IAAK,SAAU,MAAO,GAAI,EAC5B,CAAE,IAAK,SAAU,MAAO,GAAI,CAC9B,EAKMC,EAAsB,CAACC,EAAwBC,IAC5CD,EAAMC,CAAiB,GAAG,WAAa,YAO1CC,EAAkBF,GACNF,EAAY,OAAO,CAAC,CAAE,IAAAK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3B,EACA,aAAW,MACT,0BACA,0CACApB,IAAgBc,EACZ,qCACA,kDACJ1B,EAAW,OACb,EACA,QAAS,IAAMyB,EAAiBC,CAAK,EACrC,KAAK,SACL,gBAAed,IAAgBc,EAE/B,oBAAC,WACC,aAAW,MACT,6DACAd,IAAgBc,EAAQ,oBAAsB,qBAC9CK,EAAM,KACR,EACA,KAAM,EACN,GAAI,KACJ,KAAMA,EAAM,MACd,EACCA,EAAM,gBACL,OAAC,QACC,aAAW,MACT,sEACAnB,IAAgBc,EAAQ,oBAAsB,2BAChD,EACA,KAAMK,EAAM,YACd,GAEJ,IArCmBL,CAsCrB,CACD,EACH,EACF,KAGA,OAAC,OACC,aAAW,MACT,+BACA,qCACA1B,EAAW,YACb,EAEC,SAAA6B,MACC,OAACzC,EAAA,CACC,MAAOyC,EAAY,MACnB,IAAKA,EAAY,MACjB,aAAW,MACT,uBACA,6DACA7B,EAAW,KACb,EACF,EAEJ,GACF,GAEJ,CAEJ,CACF,EAEAD,EAAqB,YAAc,uBACnC,IAAO/B,MAAQ,cAAW+B,CAAoB",
6
+ "names": ["MediaSceneSwitcherV2_exports", "__export", "MediaSceneSwitcherV2_default", "__toCommonJS", "import_jsx_runtime", "React", "import_react", "import_modules", "import_react_responsive", "import_helpers", "import_picture", "import_components", "import_Styles", "BREAKPOINTS", "isCurrentMediaVideo", "media", "currentBreakpoint", "getImageSource", "key", "width", "getMediaAlt", "fallback", "MediaRenderer", "alt", "className", "isLgDesktop", "isDesktop", "isLaptop", "isTablet", "currentMedia", "imageSource", "Picture", "DEFAULT_AUTOPLAY_DELAY", "MediaSceneSwitcherV2", "classNames", "data", "onSceneChange", "props", "ref", "title", "subtitle", "scenes", "defaultActiveIndex", "layout", "autoplay", "autoplayDelay", "activeIndex", "setActiveIndex", "swiperRef", "intervalRef", "tabRefs", "isLaptopOrLarger", "prev", "tabElement", "parentContainer", "rafId", "containerRect", "tabRect", "scrollOffset", "handleSceneClick", "index", "handleSlideChange", "swiper", "activeScene", "isMediaTop", "scene", "el"]
7
7
  }