@anker-in/headless-ui 1.3.86 → 1.3.88

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 (157) hide show
  1. package/CONTRIBUTING.md +57 -0
  2. package/dist/cjs/biz-components/ActiveShelf/ProductCard.d.ts +4 -1
  3. package/dist/cjs/biz-components/ActiveShelf/ProductCard.js +1 -1
  4. package/dist/cjs/biz-components/ActiveShelf/index.d.ts +2 -2
  5. package/dist/cjs/biz-components/ActiveShelf/index.js +1 -1
  6. package/dist/cjs/biz-components/ActiveShelf/types.d.ts +12 -1
  7. package/dist/cjs/biz-components/ActiveShelf/types.js +1 -1
  8. package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
  9. package/dist/cjs/biz-components/AiuiProvider/index.d.ts +28 -0
  10. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  11. package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +2 -0
  12. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  13. package/dist/cjs/biz-components/BrandEquity/types.d.ts +2 -0
  14. package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
  15. package/dist/cjs/biz-components/Chat/button.js +1 -1
  16. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  17. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  18. package/dist/cjs/biz-components/HeroBanner/types.d.ts +12 -6
  19. package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
  20. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  21. package/dist/cjs/biz-components/ImageWithText/types.d.ts +8 -2
  22. package/dist/cjs/biz-components/ImageWithText/types.js +1 -1
  23. package/dist/cjs/biz-components/Ksp/index.d.ts +2 -0
  24. package/dist/cjs/biz-components/Ksp/index.js +1 -1
  25. package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +8 -2
  26. package/dist/cjs/biz-components/Listing/BizProductProvider.js +1 -1
  27. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  28. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  29. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +1 -1
  30. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +1 -1
  31. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  32. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  33. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  34. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  35. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  36. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +1 -1
  37. package/dist/cjs/biz-components/Listing/types/product.d.ts +9 -0
  38. package/dist/cjs/biz-components/Listing/types/product.js +1 -1
  39. package/dist/cjs/biz-components/Listing/types.d.ts +19 -0
  40. package/dist/cjs/biz-components/Listing/types.js +1 -1
  41. package/dist/cjs/biz-components/Listing/utils/priceCalc.d.ts +28 -0
  42. package/dist/cjs/biz-components/Listing/utils/priceCalc.js +1 -0
  43. package/dist/cjs/biz-components/MarqueeReview/index.js +1 -1
  44. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  45. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  46. package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
  47. package/dist/cjs/biz-components/ProductCompare/index.js +1 -1
  48. package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
  49. package/dist/cjs/biz-components/ProductHero/types.d.ts +2 -0
  50. package/dist/cjs/biz-components/ProductHero/types.js +1 -1
  51. package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
  52. package/dist/cjs/biz-components/ProductNav/types.d.ts +5 -2
  53. package/dist/cjs/biz-components/ProductNav/types.js +1 -1
  54. package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +5 -4
  55. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  56. package/dist/cjs/biz-components/Specs/dropdown.js +1 -2
  57. package/dist/cjs/biz-components/Specs/index.js +1 -1
  58. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  59. package/dist/cjs/biz-components/index.d.ts +3 -0
  60. package/dist/cjs/biz-components/index.js +1 -1
  61. package/dist/cjs/components/link.js +1 -1
  62. package/dist/cjs/hooks/useBoaButton.d.ts +27 -0
  63. package/dist/cjs/hooks/useBoaButton.js +1 -0
  64. package/dist/cjs/hooks/useDraggableScroll.js +1 -1
  65. package/dist/cjs/hooks/useExposure.d.ts +1 -1
  66. package/dist/cjs/hooks/useExposure.js +1 -1
  67. package/dist/cjs/hooks/useViewItemList.d.ts +1 -1
  68. package/dist/cjs/index.d.ts +10 -2
  69. package/dist/cjs/index.js +1 -1
  70. package/dist/cjs/shared/ContainerGridContext.d.ts +20 -0
  71. package/dist/cjs/shared/ContainerGridContext.js +1 -0
  72. package/dist/cjs/shared/Styles.d.ts +2 -0
  73. package/dist/cjs/shared/Styles.js +1 -1
  74. package/dist/cjs/shared/adTrack.d.ts +38 -0
  75. package/dist/cjs/shared/adTrack.js +1 -0
  76. package/dist/cjs/shared/amazonAttribution.d.ts +31 -0
  77. package/dist/cjs/shared/amazonAttribution.js +1 -0
  78. package/dist/cjs/shared/mediaGridSpec.d.ts +87 -0
  79. package/dist/cjs/shared/mediaGridSpec.js +1 -0
  80. package/dist/cjs/stories/BoaStoryProvider.d.ts +10 -0
  81. package/dist/cjs/stories/BoaStoryProvider.js +1 -0
  82. package/dist/esm/biz-components/ActiveShelf/ProductCard.d.ts +4 -1
  83. package/dist/esm/biz-components/ActiveShelf/ProductCard.js +1 -1
  84. package/dist/esm/biz-components/ActiveShelf/index.d.ts +2 -2
  85. package/dist/esm/biz-components/ActiveShelf/index.js +1 -1
  86. package/dist/esm/biz-components/ActiveShelf/types.d.ts +12 -1
  87. package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
  88. package/dist/esm/biz-components/AiuiProvider/index.d.ts +28 -0
  89. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  90. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +2 -0
  91. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  92. package/dist/esm/biz-components/BrandEquity/types.d.ts +2 -0
  93. package/dist/esm/biz-components/Chat/button.js +1 -1
  94. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  95. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  96. package/dist/esm/biz-components/HeroBanner/types.d.ts +12 -6
  97. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  98. package/dist/esm/biz-components/ImageWithText/types.d.ts +8 -2
  99. package/dist/esm/biz-components/Ksp/index.d.ts +2 -0
  100. package/dist/esm/biz-components/Ksp/index.js +1 -1
  101. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +8 -2
  102. package/dist/esm/biz-components/Listing/BizProductProvider.js +1 -1
  103. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  104. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  105. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +1 -1
  106. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +1 -1
  107. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  108. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  109. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  110. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  111. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  112. package/dist/esm/biz-components/Listing/hooks/useBenefits.js +1 -1
  113. package/dist/esm/biz-components/Listing/types/product.d.ts +9 -0
  114. package/dist/esm/biz-components/Listing/types.d.ts +19 -0
  115. package/dist/esm/biz-components/Listing/utils/priceCalc.d.ts +28 -0
  116. package/dist/esm/biz-components/Listing/utils/priceCalc.js +1 -0
  117. package/dist/esm/biz-components/MarqueeReview/index.js +1 -1
  118. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  119. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  120. package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
  121. package/dist/esm/biz-components/ProductCompare/index.js +1 -1
  122. package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
  123. package/dist/esm/biz-components/ProductHero/types.d.ts +2 -0
  124. package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
  125. package/dist/esm/biz-components/ProductNav/types.d.ts +5 -2
  126. package/dist/esm/biz-components/SecondaryBanner/index.d.ts +5 -4
  127. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  128. package/dist/esm/biz-components/Specs/dropdown.js +1 -2
  129. package/dist/esm/biz-components/Specs/index.js +1 -1
  130. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  131. package/dist/esm/biz-components/index.d.ts +3 -0
  132. package/dist/esm/biz-components/index.js +1 -1
  133. package/dist/esm/components/link.js +1 -1
  134. package/dist/esm/hooks/useBoaButton.d.ts +27 -0
  135. package/dist/esm/hooks/useBoaButton.js +1 -0
  136. package/dist/esm/hooks/useDraggableScroll.js +1 -1
  137. package/dist/esm/hooks/useExposure.d.ts +1 -1
  138. package/dist/esm/hooks/useExposure.js +1 -1
  139. package/dist/esm/hooks/useViewItemList.d.ts +1 -1
  140. package/dist/esm/index.d.ts +10 -2
  141. package/dist/esm/index.js +1 -1
  142. package/dist/esm/shared/ContainerGridContext.d.ts +20 -0
  143. package/dist/esm/shared/ContainerGridContext.js +1 -0
  144. package/dist/esm/shared/Styles.d.ts +2 -0
  145. package/dist/esm/shared/Styles.js +1 -1
  146. package/dist/esm/shared/adTrack.d.ts +38 -0
  147. package/dist/esm/shared/adTrack.js +1 -0
  148. package/dist/esm/shared/amazonAttribution.d.ts +31 -0
  149. package/dist/esm/shared/amazonAttribution.js +1 -0
  150. package/dist/esm/shared/mediaGridSpec.d.ts +87 -0
  151. package/dist/esm/shared/mediaGridSpec.js +1 -0
  152. package/dist/esm/stories/BoaStoryProvider.d.ts +10 -0
  153. package/dist/esm/stories/BoaStoryProvider.js +1 -0
  154. package/dist/tokens/base.css +22 -1
  155. package/package.json +5 -2
  156. package/style.css +250 -136
  157. package/tailwind.config.js +5 -0
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { CurrencyDisplayType } from '../../types/props.js';
3
+ import type { OnAdTrackCallback } from '../../shared/adTrack.js';
3
4
  /**
4
5
  * Exposure tracking parameters
5
6
  */
@@ -77,6 +78,33 @@ interface AiuiContextType {
77
78
  * </AiuiProvider>
78
79
  */
79
80
  onExposure?: OnExposureCallback;
81
+ /**
82
+ * 页面级开关:是否启用组件化 BOA 链接处理。
83
+ * 关闭(默认)时,页面保持原逻辑,按钮上的亚马逊链接字段不生效。
84
+ */
85
+ componentBoaEnabled?: boolean;
86
+ /**
87
+ * 页面级亚马逊归因配置。maas 由业务端按「页面级 > 店铺级 > 内置映射」算好后传入,
88
+ * 没有值时不生成 maas 参数。
89
+ */
90
+ amazonAttribution?: {
91
+ /** 广告活动 ID,与商品编号直接相连;需要分隔符请在末尾自行写下划线 */
92
+ adCampaign?: string;
93
+ /** MAAS 广告平台 ID */
94
+ maas?: string;
95
+ };
96
+ /**
97
+ * 广告埋点交接回调:按钮被点击时,把按钮上配置的 Meta、Google 事件交给业务端。
98
+ * 三方脚本的初始化与上报由业务端实现;未传入时埋点静默不生效,不会报错。
99
+ *
100
+ * @example
101
+ * <AiuiProvider
102
+ * onAdTrack={(events, context) => {
103
+ * events.forEach(e => (e.channel === 'meta' ? fbq('trackCustom', e.name) : gtag('event', 'conversion', { send_to: `${ID}/${e.googleLabel}` })))
104
+ * }}
105
+ * />
106
+ */
107
+ onAdTrack?: OnAdTrackCallback;
80
108
  /**
81
109
  * 自定义 locale → BCP47 语言标签映射,会与内置 map merge(外部优先级更高)。
82
110
  * 消费方无需修改 headless-ui 源码即可支持新 locale 的价格格式化。
@@ -1 +1 @@
1
- "use client";import{jsx as h}from"react/jsx-runtime";import{gaTrack as P}from"../../shared/track.js";import{buildPageGroup as R}from"../../shared/trackUrlRef.js";import{createContext as N,useContext as H,useEffect as i,useMemo as G,useRef as u,useState as L}from"react";import{extendLocaleMap as w}from"../../helpers/index.js";const x=N({trackingData:{},locale:void 0,copyWriting:{}}),K=()=>{const o=H(x);if(!o)throw new Error("useAiui must be used in <AiuiProvider>");return o},O=({children:o,...e})=>{const d=u(null),l=u(e?.trackingData),g=u(e?.pageHandle),[m,C]=L(void 0);i(()=>{e.localeMap&&Object.keys(e.localeMap).length>0&&w(e.localeMap)},[e.localeMap]),i(()=>{l.current=e?.trackingData},[e?.trackingData]),i(()=>{g.current=e?.pageHandle},[e?.pageHandle]),i(()=>{const r=d.current;if(!r)return;const v=()=>{r.querySelectorAll("[data-headless-type-name]").forEach(n=>{n.closest("[data-aiui-provider-root]")===r&&(n.hasAttribute("data-headless-track-bound")||(n.addEventListener("click",a=>E(a,n)),n.setAttribute("data-headless-track-bound","true")))})},E=(n,a)=>{const t={};if(!a||!a.attributes)return t;for(const M of Array.from(a.attributes)){const p=M?.name;p?.startsWith("data-headless-")&&(t[p]=a.getAttribute(p))}const D=t?.["data-headless-sku"],T=t?.["data-headless-creative-id"],b=t?.["data-headless-type-name"]?.split?.("#"),s=t?.["data-headless-title-desc-button"]?.split?.("#"),y=t?.["data-headless-nav-position"]?.split?.("#"),_=R({pageHandle:g.current,pageGroup:l.current?.pageGroup}),c=y?.[1],k=c===void 0||c===""?"":Number(c);P({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:_,component_type:b?.[0]||"",component_name:b?.[1]||"",position:Number.isNaN(k)?"":k,navigation:y?.[0]||"",button_name:s?.[2]||"",SKU:D||"",creative_id:T||"",component_title:s?.[0]||"",component_description:s?.[1]||""}})},f=new MutationObserver(v);return f.observe(r,{childList:!0,subtree:!0}),v(),()=>f.disconnect()},[]);const A=G(()=>({...e,navCollapsed:m,setNavCollapsed:C}),[e,m]);return h(x.Provider,{value:A,children:h("div",{ref:d,"data-aiui-provider-root":"",children:o})})};var U=O;export{x as AiuiContext,U as default,K as useAiuiContext};
1
+ "use client";import{jsx as h}from"react/jsx-runtime";import{gaTrack as P}from"../../shared/track.js";import{buildPageGroup as R}from"../../shared/trackUrlRef.js";import{createContext as N,useContext as H,useEffect as i,useMemo as O,useRef as d,useState as G}from"react";import{extendLocaleMap as L}from"../../helpers/index.js";const C=N({trackingData:{},locale:void 0,copyWriting:{}}),z=()=>{const o=H(C);if(!o)throw new Error("useAiui must be used in <AiuiProvider>");return o},w=({children:o,...e})=>{const l=d(null),u=d(e?.trackingData),g=d(e?.pageHandle),[m,x]=G(void 0);i(()=>{e.localeMap&&Object.keys(e.localeMap).length>0&&L(e.localeMap)},[e.localeMap]),i(()=>{u.current=e?.trackingData},[e?.trackingData]),i(()=>{g.current=e?.pageHandle},[e?.pageHandle]),i(()=>{const r=l.current;if(!r)return;const v=()=>{r.querySelectorAll("[data-headless-type-name]").forEach(n=>{n.closest("[data-aiui-provider-root]")===r&&(n.hasAttribute("data-headless-track-bound")||(n.addEventListener("click",a=>T(a,n)),n.setAttribute("data-headless-track-bound","true")))})},T=(n,a)=>{const t={};if(!a||!a.attributes)return t;for(const M of Array.from(a.attributes)){const p=M?.name;p?.startsWith("data-headless-")&&(t[p]=a.getAttribute(p))}const E=t?.["data-headless-sku"],D=t?.["data-headless-creative-id"],f=t?.["data-headless-type-name"]?.split?.("#"),s=t?.["data-headless-title-desc-button"]?.split?.("#"),y=t?.["data-headless-nav-position"]?.split?.("#"),_=R({pageHandle:g.current,pageGroup:u.current?.pageGroup}),c=y?.[1],k=c===void 0||c===""?"":Number(c);P({event:"ga4Event",event_name:"component_click",event_parameters:{page_group:_,component_type:f?.[0]||"",component_name:f?.[1]||"",position:Number.isNaN(k)?"":k,navigation:y?.[0]||"",button_name:s?.[2]||"",SKU:E||"",creative_id:D||"",component_title:s?.[0]||"",component_description:s?.[1]||""}})},b=new MutationObserver(v);return b.observe(r,{childList:!0,subtree:!0}),v(),()=>b.disconnect()},[]);const A=O(()=>({...e,navCollapsed:m,setNavCollapsed:x}),[e,m]);return h(C.Provider,{value:A,children:h("div",{ref:l,"data-aiui-provider-root":"",children:o})})};var B=w;export{C as AiuiContext,B as default,z as useAiuiContext};
@@ -1,4 +1,6 @@
1
1
  import type { BrandEquityProps } from './types.js';
2
+ import 'swiper/css';
3
+ import 'swiper/css/pagination';
2
4
  declare const _default: import("react").ForwardRefExoticComponent<Omit<BrandEquityProps & import("react").RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../index.js").ContainerProps & import("react").RefAttributes<unknown>> & {
3
5
  readonly $$typeof: symbol;
4
6
  };
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{forwardRef as w,useEffect as q,useRef as x,useState as E,useImperativeHandle as S}from"react";import{cn as s}from"../../helpers/utils.js";import v from"../../components/picture.js";import{withLayout as M}from"../../shared/Styles.js";import{useMediaQuery as B}from"react-responsive";import{useExposure as T}from"../../hooks/useExposure.js";import{Swiper as I,SwiperSlide as j}from"swiper/react";import{Pagination as P,FreeMode as L,Mousewheel as z}from"swiper/modules";import A from"../Title/index.js";const H="copy",D="store_benefits",R=(e,a)=>{const i=[];for(let r=0;r<e.length;r+=a)i.push(e.slice(r,r+a));return i},b=w(({data:{items:e=[],itemShape:a,title:i,theme:r},className:o},m)=>{const[c,h]=E(!1),u=B({query:"(max-width: 768px)"}),f=x(null),d=x(null);S(m,()=>d.current),T(d,{componentType:H,componentName:D}),q(()=>{h(u)},[u]);const k=c?R(e,3):e;return n("div",{ref:d,className:s("brand-equity-wrapper w-full",{"aiui-dark":r==="dark"},o),children:[i&&t(A,{data:{title:i}}),c?n(I,{className:s(o),modules:[L,z,P],freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:f.current},breakpoints:{0:{spaceBetween:12}},children:[k?.map((l,p)=>t(j,{className:"!flex flex-col gap-3",children:Array.isArray(l)&&l?.map((N,y)=>t(g,{data:N,itemShape:a,index:y,theme:r},y))},"SwiperSlide"+p)),t("div",{ref:f,className:"mt-3 flex justify-center"})]}):t("div",{className:s("grid grid-cols-1 gap-3","tablet:grid-cols-2","laptop:gap-4 laptop:grid-cols-10"),children:e.map((l,p)=>t(g,{data:l,itemShape:a,index:p,theme:r},p))})]})}),g=({data:e,itemShape:a,index:i,theme:r})=>n("div",{className:s("brand-equity-item",`brand-equity-item-${i+1}`,e.containerName?`brand-equity-item--${e.containerName}`:void 0,"bg-container-secondary-1 box-border flex w-full flex-col p-4","desktop:p-6 justify-between","laptop:col-span-3 lg-desktop:p-8","laptop:h-[192px] lg-desktop:h-[240px] h-[160px]",{"laptop:col-span-4":[0,5,6,11].includes(i),"bg-container-primary":r==="dark"},"rounded-box",e.className),children:[n("div",{className:"lg-desktop:h-[36px] flex h-[30px] items-center justify-between gap-3",children:[t("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary text-[14px] font-bold leading-[1.2] tracking-[-0.02em]",children:e.title}),e.type==="avatar"?t("div",{className:"flex shrink-0 -space-x-2",children:e?.avatarList?.map((o,m)=>t("div",{className:s("border-container-primary size-[30px] overflow-hidden rounded-full border-2","relative inline-block shrink-0","lg-desktop:size-[36px]"),children:t(v,{source:o.avatar?.url,alt:o.avatar?.alt,className:"size-full object-cover"})},m))}):t("div",{className:"lg-desktop:size-[36px] size-[30px] shrink-0",children:t(v,{className:"size-full object-cover",source:e.icon?.url,alt:e.icon?.alt,imgClassName:"w-full h-full object-cover"})})]}),t("p",{className:"lg-desktop:text-[24px] text-info-primary line-clamp-3 text-[20px] font-bold leading-[1.2] tracking-[-0.04em]",children:e.description})]});b.displayName="BrandEquity";var U=M(b);export{U as default};
1
+ "use client";import{Fragment as $,jsx as t,jsxs as c}from"react/jsx-runtime";import{forwardRef as E,useEffect as q,useRef as S,useState as x,useImperativeHandle as I}from"react";import{cn as l}from"../../helpers/utils.js";import g from"../../components/picture.js";import{withLayout as M}from"../../shared/Styles.js";import{useMediaQuery as B}from"react-responsive";import{useExposure as T}from"../../hooks/useExposure.js";import{Swiper as P,SwiperSlide as j}from"swiper/react";import{Pagination as L,FreeMode as z,Mousewheel as A}from"swiper/modules";import"swiper/css";import"swiper/css/pagination";import H from"../Title/index.js";const D="copy",R="store_benefits",Q=(e,a)=>{const i=[];for(let r=0;r<e.length;r+=a)i.push(e.slice(r,r+a));return i},v=E(({data:{items:e=[],itemShape:a,title:i,theme:r},className:o},n)=>{const[p,h]=x(!1),u=B({query:"(max-width: 767px)"}),[k,N]=x(null),d=S(null);I(n,()=>d.current),T(d,{componentType:D,componentName:R}),q(()=>{h(u)},[u]);const w=p?Q(e,3):e;return c("div",{ref:d,className:l("brand-equity-wrapper w-full",{"aiui-dark":r==="dark"},o),children:[i&&t(H,{data:{title:i}}),p?c($,{children:[t(P,{className:l(o),modules:[z,A,L],freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:k},breakpoints:{0:{spaceBetween:12}},children:w?.map((s,m)=>t(j,{className:"!flex flex-col gap-3",children:Array.isArray(s)&&s?.map((f,y)=>t(b,{data:f,itemShape:a,index:y,theme:f.theme??r},y))},"SwiperSlide"+m))}),t("div",{ref:N,className:"brand-equity-pagination !static mt-[20px] flex justify-center"})]}):t("div",{className:l("grid grid-cols-1 gap-3","tablet:grid-cols-2","laptop:gap-4 laptop:grid-cols-10"),children:e.map((s,m)=>t(b,{data:s,itemShape:a,index:m,theme:s.theme??r},m))})]})}),b=({data:e,itemShape:a,index:i,theme:r})=>{const o=r==="dark"&&e.iconImage?e.iconImage:e.icon;return c("div",{className:l("brand-equity-item",`brand-equity-item-${i+1}`,e.containerName?`brand-equity-item--${e.containerName}`:void 0,"bg-container-secondary-1 box-border flex w-full flex-col p-4","desktop:p-6 justify-between","laptop:col-span-3 lg-desktop:p-8","laptop:h-[192px] lg-desktop:h-[240px] h-[160px]",{"laptop:col-span-4":[0,5,6,11].includes(i),"bg-container-primary":r==="dark"},"rounded-box",e.className),children:[c("div",{className:"lg-desktop:h-[36px] flex h-[32px] items-center justify-between gap-3",children:[t("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary text-[14px] font-bold leading-[1.2] tracking-[-0.02em]",children:e.title}),e.type==="avatar"?t("div",{className:"flex shrink-0 -space-x-2",children:e?.avatarList?.map((n,p)=>t("div",{className:l("border-container-primary size-[32px] overflow-hidden rounded-full border-2","relative inline-block shrink-0","lg-desktop:size-[36px]"),children:t(g,{source:n.avatar?.url,alt:n.avatar?.alt,className:"size-full object-cover"})},p))}):t("div",{className:"lg-desktop:size-[36px] size-[32px] shrink-0",children:t(g,{className:"size-full object-cover",source:o?.url,alt:o?.alt,imgClassName:"w-full h-full object-cover"})})]}),t("p",{className:"lg-desktop:text-[24px] text-info-primary line-clamp-3 text-[20px] font-bold leading-[1.2] tracking-[-0.04em]",children:e.description})]})};v.displayName="BrandEquity";var Y=M(v);export{Y as default};
@@ -1,6 +1,8 @@
1
1
  import type { ComponentCommonProps, Img } from '../../types/props.js';
2
2
  export interface BrandEquityItemProps {
3
3
  icon?: Img;
4
+ /** 暗色主题专用图标:item 或全局 theme 为 dark 时优先于 icon 渲染(semantic-media 命名遵循 ADR 0010) */
5
+ iconImage?: Img;
4
6
  type?: 'icon' | 'avatar';
5
7
  title: string;
6
8
  description: string;
@@ -1 +1 @@
1
- import{jsx as t,jsxs as p}from"react/jsx-runtime";import{useChatContext as c}from"@copilotkit/react-ui";const i=({setOpen:n})=>{const o=c();return p("button",{onClick:()=>n(),className:"copilotKitButton ","aria-label":"Open Chat",children:[t("div",{className:"copilotKitButtonIcon copilotKitButtonIconOpen",children:o.icons.openIcon}),t("div",{className:"copilotKitButtonIcon copilotKitButtonIconClose",children:o.icons.closeIcon})]})};var e=i;export{e as default};
1
+ import{jsx as t,jsxs as p}from"react/jsx-runtime";import"react";import{useChatContext as c}from"@copilotkit/react-ui";const i=({setOpen:n})=>{const o=c();return p("button",{onClick:()=>n(),className:"copilotKitButton ","aria-label":"Open Chat",children:[t("div",{className:"copilotKitButtonIcon copilotKitButtonIconOpen",children:o.icons.openIcon}),t("div",{className:"copilotKitButtonIcon copilotKitButtonIconClose",children:o.icons.closeIcon})]})};var a=i;export{a as default};
@@ -1 +1 @@
1
- "use client";import{Fragment as rt,jsx as t,jsxs as u}from"react/jsx-runtime";import ce,{useImperativeHandle as Ee,useRef as k,useState as Me,useEffect as Pe}from"react";import N from"gsap";import{ScrollTrigger as C}from"gsap/dist/ScrollTrigger";import O from"jump.js";import{buildPictureSource as Re,resolveTierMedia as L,useMediaTier as De}from"./mediaResolver.js";import{useInView as je}from"react-intersection-observer";import Ae from"../../helpers/ScrollLoadVideo.js";import{Button as V,Heading as Oe,Picture as U,Text as G,Countdown as Ue}from"../../components/index.js";import{cn as c}from"../../helpers/index.js";import{cva as S}from"class-variance-authority";import{withLayout as Ge}from"../../shared/Styles.js";import{useExposure as Je}from"../../hooks/useExposure.js";import{buildTrackingRef as _e,trackUrlRef as z}from"../../shared/trackUrlRef.js";import{buildClickTrackingProps as h,resolveComponentMediaType as qe}from"../../shared/track.js";import{getLocalizedPath as Fe}from"../../helpers/utils.js";import{useAiuiContext as We}from"../AiuiProvider/index.js";import{sizeMap as Ye}from"../../components/button.js";import{VideoModal as Ze}from"../VideoModal/index.js";import Ke from"./HeroBannerCarousel.js";const f="hero_banner",Qe=S("hero-banner-content lg-desktop:gap-[32px] pointer-events-none absolute top-24 z-10 flex w-full flex-col gap-[24px]",{variants:{align:{left:"laptop:top-1/2 px-grid laptop:-translate-y-1/2 left-0",center:"tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center"}},defaultVariants:{align:"left"}}),Xe=S("hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]",{variants:{align:{left:"laptop:text-left",center:"text-center"}},defaultVariants:{align:"left"}}),$e=S("hero-banner-button-group lg-desktop:gap-x-3 pointer-events-auto flex flex-wrap items-center gap-x-2 gap-y-3",{variants:{align:{left:"laptop:justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),et=S("hero-banner-icon-group flex items-center gap-2",{variants:{align:{left:"justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),tt=({size:s="base"})=>{const{width:T,height:p}=Ye[s];return t("svg",{width:T,height:p,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",children:t("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},pe=ce.forwardRef(({data:s,className:T,classNames:p={},onSecondaryClick:J,onPrimaryClick:_,onTertiaryClick:q,jumpOptions:ue={},a11yLabels:me,...F},W)=>{const{locale:Y,pageHandle:de}=We(),Z=s.mode!=="single"&&!!s.items&&s.items.length>0,I={...{duration:500,offset:0},...ue},w=e=>!e||!Y?e:Fe(e,Y),{label:K,title:l,subtitle:o,endDate:Q,endDate_tz:fe,dateFormat:ge,pcImage:E,isShowVideo:X,isVideoLoop:be=!0,primaryButton:a,secondaryButton:r,tertiaryButton:i,theme:ve="light",size:M="default",titleSize:P,caption:$=[],blockLink:B,iconArray:ee,align:b="left",enableParallax:te=!0}=s,R=Array.isArray($)?$:[],ye=Array.isArray(ee)?ee:void 0,re=De(),ne=Re(s),xe=L(s,re,"video")?.url||"",[oe,ae]=Me(!1),{ref:ke,inView:ie}=je(),D=k(null),j=k(null),A=k(null),v=k(null),d=k(null),m=qe(X),H=_e(de??"",m,f),g=L(s,re,m==="video"?"video":"image")?.id||E?.id||"",he=l?.trim()||o?.trim()||E?.alt?.trim()||void 0,Te=l!==void 0?l?.trim()||o?.trim()||E?.alt?.trim()||void 0:o&&o.trim()||"",we=o&&o.trim()||"";Je(d,{componentType:m,componentName:f,componentTitle:Te,componentDescription:we,creativeId:g,position:1});const Be=B?z(w(B),H):void 0,He=r?.link?z(w(r.link),H):void 0,Ne=a?.link?z(w(a.link),H):void 0,Ce=i?.link?z(w(i.link),H):void 0,Le=h({interactive:!!B,componentType:m,componentName:f,title:l,description:o,position:1,creativeId:g}),Ve=h({interactive:!0,componentType:m,componentName:f,title:l,description:o,buttonName:"video play",position:1,creativeId:g}),Se=h({interactive:!!(r?.link||r?.isCustomSecondaryButton),componentType:m,componentName:f,title:l,description:o,buttonName:r?.text,position:1,creativeId:g}),ze=h({interactive:!!(a?.link||a?.isCustomPrimaryButton),componentType:m,componentName:f,title:l,description:o,buttonName:a?.text,position:1,creativeId:g}),Ie=h({interactive:!!(i?.link||i?.isCustomTertiaryButton),componentType:m,componentName:f,title:l,description:o,buttonName:i?.text,position:1,creativeId:g});return Ee(W,()=>d.current),Pe(()=>{if(Z||!te)return;N.registerPlugin(C);function e(){if(!v.current)return;const n=d.current?.clientHeight||100;window.innerHeight<=n?D.current=C.create({trigger:d.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:y=>{const x=y.progress*40-20;N.set(v.current,{yPercent:x})}}):(A.current=C.create({trigger:d.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:y=>{const x=y.progress*20-20;N.set(v.current,{yPercent:x})}}),j.current=C.create({trigger:d.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:y=>{const x=y.progress*20;N.set(v.current,{yPercent:x})}}))}return ie&&e(),()=>{D.current&&D.current.kill(),A.current&&A.current.kill(),j.current&&j.current.kill()}},[ie,s.items,te]),Z?t(Ke,{data:s,className:T,classNames:p,onPrimaryClick:_,onSecondaryClick:J,onTertiaryClick:q,a11yLabels:me,ref:W,...F}):t("div",{...F,ref:ke,"data-ui-component-id":"HeroBanner",className:c(p.root),children:u("div",{ref:d,className:c(ve==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden",{"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":M==="default","lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]":M==="sm"},T),children:[B&&t("a",{className:"absolute inset-0 z-10",href:Be,tabIndex:-1,"aria-hidden":"true","aria-label":he,...Le}),t("div",{ref:v,className:c("absolute left-0 top-0 size-full"),children:X?u(rt,{children:[t(Ae,{poster:void 0,src:xe,className:"laptop:w-full absolute inset-0 h-full transition-opacity duration-500",videoLayerClassName:"opacity-0",videoClassName:"h-full object-cover",muted:!0,loop:be,playsInline:!0,onPlaying:e=>{const n=e.currentTarget;n.parentElement?.classList.remove("opacity-0"),n.closest('[data-ui-component-id="HeroBanner"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")},onWaiting:e=>{const n=e.currentTarget;if(n.currentTime>=.5)return;n.parentElement?.classList.add("opacity-0"),n.closest('[data-ui-component-id="HeroBanner"]')?.querySelector('[data-video-poster="true"]')?.classList.remove("opacity-0")}}),t("div",{"data-video-poster":"true",className:"laptop:w-full bg-container-primary pointer-events-none absolute inset-0 h-full transition-opacity duration-500",children:t(U,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:L(s,"lgDesktop","image")?.alt||"",source:ne})})]}):t(U,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",alt:L(s,"lgDesktop","image")?.alt||"",source:ne})}),u("div",{className:Qe({align:b}),children:[u("div",{className:Xe({align:b}),children:[K&&t(G,{size:2,as:"p",className:c("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:K}),l&&t(Oe,{as:P==="4"?"h1":"h2",html:l,className:c("hero-banner-title",p.title),size:P?Number(P||"5"):M==="sm"?4:5}),o&&t(G,{as:"p",size:2,className:c("hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",p.subtitle),html:o}),Q&&t("div",{className:"mt-3",children:t(Ue,{endDate:Q,endDate_tz:fe,dateFormat:ge,variant:"spacious",align:b})})]}),u("div",{className:c($e({align:b}),p.buttonGroup),children:[u("div",{className:"lg-desktop:gap-3 flex items-center gap-2",children:[r?.isShowPlayVideoButton&&r?.playVideoButtonText?u(V,{onClick:()=>ae(!0),size:"lg",variant:"secondary",className:"hero-banner-play-video-button",...Ve,children:[r?.playVideoButtonText," ",t(tt,{size:"lg"})]}):r?.text?u(V,{"aria-label":l??o,size:"lg",variant:"secondary",className:c("hero-banner-secondary-button",p.secondaryButton),as:r?.isCustomSecondaryButton?"button":"a",href:He,target:r?.target,rel:r?.target==="_blank"?r?.rel??"noopener noreferrer":r?.rel,onClick:e=>{if(r.link?.startsWith("#")){e.preventDefault();const n=document.querySelector(r.link);n&&O(n,I)}r?.isCustomSecondaryButton&&J?.(s,e,r?.customSecondaryEventId)},...Se,children:[r?.text,t("span",{className:"sr-only",children:l??o})]}):null,a&&a.text&&t(V,{"aria-label":l??o,size:"lg",variant:"primary",className:c("hero-banner-primary-button",p.primaryButton),as:a?.isCustomPrimaryButton?"button":"a",href:Ne,target:a?.target,rel:a?.target==="_blank"?a?.rel??"noopener noreferrer":a?.rel,onClick:e=>{if(a.link?.startsWith("#")){e.preventDefault();const n=document.querySelector(a.link);n&&O(n,I)}a?.isCustomPrimaryButton&&_?.(s,e,a?.customPrimaryEventId)},...ze,children:a.text})]}),i&&i.text&&u(V,{"aria-label":l??o,size:"lg",variant:"link",className:c("hero-banner-tertiary-button w-auto p-0",p.tertiaryButton),as:i?.isCustomTertiaryButton?"button":"a",href:Ce,target:i?.target,rel:i?.target==="_blank"?i?.rel??"noopener noreferrer":i?.rel,onClick:e=>{if(i.link?.startsWith("#")){e.preventDefault();const n=document.querySelector(i.link);n&&O(n,I)}i?.isCustomTertiaryButton&&q?.(s,e,i?.customTertiaryEventId)},...Ie,children:[i.text,t("span",{className:"sr-only",children:l??o})]})]}),t("div",{className:et({align:b}),children:ye?.map(e=>t("div",{className:"h-12",children:t(U,{className:"!inline-block h-full !w-auto",imgClassName:"!w-auto h-full object-contain",loading:"eager",alt:e?.pcImage?.alt||"",source:e?.pcImage?.url})},e?.pcImage?.url||e?.pcImage?.alt))})]}),R.length>0&&t("div",{className:c("hero-banner-caption-group laptop:gap-3 px-grid desktop:pb-[24px] pointer-events-none absolute bottom-0 z-10 flex items-stretch gap-2 pb-[16px]",p.captionGroup),children:R.map((e,n)=>u(ce.Fragment,{children:[t(G,{size:2,className:c("hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]"),html:e.title}),n<R.length-1&&t("div",{className:c("bg-info-primary w-px")})]},e.title))}),oe&&t(Ze,{visible:oe,videoUrl:r?.isYoutubeVideo?void 0:r?.videoUrl?.url,youTubeId:r?.isYoutubeVideo?r?.youtubeId:void 0,onCloseModal:()=>ae(!1)})]})})});pe.displayName="HeroBanner";var wt=Ge(pe);export{wt as default};
1
+ "use client";import{Fragment as gt,jsx as n,jsxs as u}from"react/jsx-runtime";import Be,{useImperativeHandle as Je,useRef as w,useState as qe,useEffect as We}from"react";import N from"gsap";import{ScrollTrigger as V}from"gsap/dist/ScrollTrigger";import Y from"jump.js";import{buildPictureSource as Ye,resolveTierMedia as S,useMediaTier as Ze}from"./mediaResolver.js";import{useInView as Ke}from"react-intersection-observer";import Qe from"../../helpers/ScrollLoadVideo.js";import{Button as I,Heading as Xe,Picture as Z,Text as K,Countdown as $e}from"../../components/index.js";import{cn as c}from"../../helpers/index.js";import{cva as E}from"class-variance-authority";import{withLayout as et}from"../../shared/Styles.js";import{useExposure as tt}from"../../hooks/useExposure.js";import{useBoaButton as nt}from"../../hooks/useBoaButton.js";import{buildTrackingRef as rt,trackUrlRef as we}from"../../shared/trackUrlRef.js";import{buildClickTrackingProps as L,resolveComponentMediaType as at}from"../../shared/track.js";import{getLocalizedPath as ot}from"../../helpers/utils.js";import{useAiuiContext as it}from"../AiuiProvider/index.js";import{sizeMap as st}from"../../components/button.js";import{VideoModal as lt}from"../VideoModal/index.js";import ct from"./HeroBannerCarousel.js";const d="hero_banner",pt=E("hero-banner-content lg-desktop:gap-[32px] pointer-events-none absolute top-24 z-10 flex w-full flex-col gap-[24px]",{variants:{align:{left:"laptop:top-1/2 px-grid laptop:-translate-y-1/2 left-0",center:"tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center"}},defaultVariants:{align:"left"}}),ut=E("hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]",{variants:{align:{left:"laptop:text-left",center:"text-center"}},defaultVariants:{align:"left"}}),dt=E("hero-banner-button-group lg-desktop:gap-x-3 pointer-events-auto flex flex-wrap items-center gap-x-2 gap-y-3",{variants:{align:{left:"laptop:justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),mt=E("hero-banner-icon-group flex items-center gap-2",{variants:{align:{left:"justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),ft=({size:s="base"})=>{const{width:z,height:p}=st[s];return n("svg",{width:z,height:p,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",children:n("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},Le=Be.forwardRef(({data:s,className:z,classNames:p={},onSecondaryClick:Q,onPrimaryClick:X,onTertiaryClick:$,jumpOptions:ze={},a11yLabels:Ce,...ee},te)=>{const{locale:ne,pageHandle:He}=it(),{resolveLink:g,hasAdTrack:y,trackAd:re}=nt(),ae=s.mode!=="single"&&!!s.items&&s.items.length>0,M={...{duration:500,offset:0},...ze},oe=e=>!e||!ne?e:ot(e,ne),{label:ie,title:l,subtitle:i,endDate:se,endDate_tz:Ne,dateFormat:Ve,pcImage:P,isShowVideo:le,isVideoLoop:Se=!0,primaryButton:o,secondaryButton:r,tertiaryButton:a,theme:Ie="light",size:A="default",titleSize:R,caption:ce=[],blockLink:v,blockLinkConfig:k,iconArray:pe,align:h="left",enableParallax:ue=!0}=s,D=Array.isArray(ce)?ce:[],Ee=Array.isArray(pe)?pe:void 0,de=Ze(),me=Ye(s),Me=S(s,de,"video")?.url||"",[fe,ge]=qe(!1),{ref:Pe,inView:be}=Ke(),j=w(null),F=w(null),_=w(null),x=w(null),f=w(null),m=at(le),ye=rt(He??"",m,d),b=S(s,de,m==="video"?"video":"image")?.id||P?.id||"",Ae=l?.trim()||i?.trim()||P?.alt?.trim()||void 0,Re=l!==void 0?l?.trim()||i?.trim()||P?.alt?.trim()||void 0:i&&i.trim()||"",De=i&&i.trim()||"";tt(f,{componentType:m,componentName:d,componentTitle:Re,componentDescription:De,creativeId:b,position:1});const O=e=>{if(!e?.link)return{href:void 0,target:e?.target};const t=g(e.link,e);return t.isAmazon?{href:t.href,target:e.target??"_blank"}:{href:we(oe(e.link),ye),target:e.target}},U=O(r),G=O(o),J=O(a),C=g(v,k),ve=C.isAmazon?C.href:v?we(oe(v),ye):void 0,je=C.isAmazon?k?.target??"_blank":k?.target,ke=U.href,he=G.href,xe=J.href,q=(e,t)=>!!e&&!(t?.link&&y(t)),W=(e,t,H)=>re(e,{componentName:d,buttonPosition:t,buttonText:e?.text,href:H}),Fe=L({interactive:!!v,componentType:m,componentName:d,title:l,description:i,position:1,creativeId:b}),_e=L({interactive:!0,componentType:m,componentName:d,title:l,description:i,buttonName:"video play",position:1,creativeId:b}),Oe=L({interactive:!!(r?.link||r?.isCustomSecondaryButton),componentType:m,componentName:d,title:l,description:i,buttonName:r?.text,position:1,creativeId:b}),Ue=L({interactive:!!(o?.link||o?.isCustomPrimaryButton),componentType:m,componentName:d,title:l,description:i,buttonName:o?.text,position:1,creativeId:b}),Ge=L({interactive:!!(a?.link||a?.isCustomTertiaryButton),componentType:m,componentName:d,title:l,description:i,buttonName:a?.text,position:1,creativeId:b});return Je(te,()=>f.current),We(()=>{if(ae||!ue)return;N.registerPlugin(V);function e(){if(!x.current)return;const t=f.current?.clientHeight||100;window.innerHeight<=t?j.current=V.create({trigger:f.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:T=>{const B=T.progress*40-20;N.set(x.current,{yPercent:B})}}):(_.current=V.create({trigger:f.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:T=>{const B=T.progress*20-20;N.set(x.current,{yPercent:B})}}),F.current=V.create({trigger:f.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:T=>{const B=T.progress*20;N.set(x.current,{yPercent:B})}}))}return be&&e(),()=>{j.current&&j.current.kill(),_.current&&_.current.kill(),F.current&&F.current.kill()}},[be,s.items,ue]),ae?n(ct,{data:s,className:z,classNames:p,onPrimaryClick:X,onSecondaryClick:Q,onTertiaryClick:$,a11yLabels:Ce,ref:te,...ee}):n("div",{...ee,ref:Pe,"data-ui-component-id":"HeroBanner",className:c(p.root),children:u("div",{ref:f,className:c(Ie==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden",{"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":A==="default","lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]":A==="sm"},z),children:[v&&n("a",{className:"absolute inset-0 z-10 !bg-transparent hover:!bg-transparent",href:ve,target:je,"data-headless-ad-track":y(k)?"true":void 0,"data-headless-amazon":C.isAmazon?"true":void 0,onClick:()=>re(k,{componentName:d,buttonPosition:"block",href:ve}),tabIndex:-1,"aria-hidden":"true","aria-label":Ae,...Fe}),n("div",{ref:x,className:c("absolute left-0 top-0 size-full"),children:le?u(gt,{children:[n(Qe,{poster:void 0,src:Me,className:"laptop:w-full absolute inset-0 h-full transition-opacity duration-500",videoLayerClassName:"opacity-0",videoClassName:"h-full object-cover",muted:!0,loop:Se,playsInline:!0,onPlaying:e=>{const t=e.currentTarget;t.parentElement?.classList.remove("opacity-0"),t.closest('[data-ui-component-id="HeroBanner"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")},onWaiting:e=>{const t=e.currentTarget;if(t.currentTime>=.5)return;t.parentElement?.classList.add("opacity-0"),t.closest('[data-ui-component-id="HeroBanner"]')?.querySelector('[data-video-poster="true"]')?.classList.remove("opacity-0")}}),n("div",{"data-video-poster":"true",className:"laptop:w-full bg-container-primary pointer-events-none absolute inset-0 h-full transition-opacity duration-500",children:n(Z,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:S(s,"lgDesktop","image")?.alt||"",source:me})})]}):n(Z,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",alt:S(s,"lgDesktop","image")?.alt||"",source:me})}),u("div",{className:pt({align:h}),children:[u("div",{className:ut({align:h}),children:[ie&&n(K,{size:2,as:"p",className:c("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:ie}),l&&n(Xe,{as:R==="4"?"h1":"h2",html:l,className:c("hero-banner-title",p.title),size:R?Number(R||"5"):A==="sm"?4:5}),i&&n(K,{as:"p",size:2,className:c("hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",p.subtitle),html:i}),se&&n("div",{className:"mt-3",children:n($e,{endDate:se,endDate_tz:Ne,dateFormat:Ve,variant:"spacious",align:h})})]}),u("div",{className:c(dt({align:h}),p.buttonGroup),children:[u("div",{className:"lg-desktop:gap-3 flex items-center gap-2",children:[r?.isShowPlayVideoButton&&r?.playVideoButtonText?u(I,{onClick:()=>ge(!0),size:"lg",variant:"secondary",className:"hero-banner-play-video-button",..._e,children:[r?.playVideoButtonText," ",n(ft,{size:"lg"})]}):r?.text?u(I,{"aria-label":l??i,size:"lg",variant:"secondary",className:c("hero-banner-secondary-button",p.secondaryButton),as:q(r?.isCustomSecondaryButton,r)?"button":"a",href:ke,"data-headless-ad-track":y(r)?"true":void 0,"data-headless-amazon":g(r.link,r).isAmazon?"true":void 0,target:U.target,rel:U.target==="_blank"?r?.rel??"noopener noreferrer":r?.rel,onClick:e=>{if(W(r,"secondary",ke),r.link?.startsWith("#")){e.preventDefault();const t=document.querySelector(r.link);t&&Y(t,M)}r?.isCustomSecondaryButton&&Q?.(s,e,r?.customSecondaryEventId)},...Oe,children:[r?.text,n("span",{className:"sr-only",children:l??i})]}):null,o&&o.text&&n(I,{"aria-label":l??i,size:"lg",variant:"primary",className:c("hero-banner-primary-button",p.primaryButton),as:q(o?.isCustomPrimaryButton,o)?"button":"a",href:he,"data-headless-ad-track":y(o)?"true":void 0,"data-headless-amazon":g(o.link,o).isAmazon?"true":void 0,target:G.target,rel:G.target==="_blank"?o?.rel??"noopener noreferrer":o?.rel,onClick:e=>{if(W(o,"primary",he),o.link?.startsWith("#")){e.preventDefault();const t=document.querySelector(o.link);t&&Y(t,M)}o?.isCustomPrimaryButton&&X?.(s,e,o?.customPrimaryEventId)},...Ue,children:o.text})]}),a&&a.text&&u(I,{"aria-label":l??i,size:"lg",variant:"link",className:c("hero-banner-tertiary-button w-auto p-0",p.tertiaryButton),as:q(a?.isCustomTertiaryButton,a)?"button":"a",href:xe,"data-headless-ad-track":y(a)?"true":void 0,"data-headless-amazon":g(a.link,a).isAmazon?"true":void 0,"data-headless-amazon-style":g(a.link,a).isAmazon?"link":void 0,target:J.target,rel:J.target==="_blank"?a?.rel??"noopener noreferrer":a?.rel,onClick:e=>{if(W(a,"tertiary",xe),a.link?.startsWith("#")){e.preventDefault();const t=document.querySelector(a.link);t&&Y(t,M)}a?.isCustomTertiaryButton&&$?.(s,e,a?.customTertiaryEventId)},...Ge,children:[a.text,n("span",{className:"sr-only",children:l??i})]})]}),n("div",{className:mt({align:h}),children:Ee?.map(e=>n("div",{className:"h-12",children:n(Z,{className:"!inline-block h-full !w-auto",imgClassName:"!w-auto h-full object-contain",loading:"eager",alt:e?.pcImage?.alt||"",source:e?.pcImage?.url})},e?.pcImage?.url||e?.pcImage?.alt))})]}),D.length>0&&n("div",{className:c("hero-banner-caption-group laptop:gap-3 px-grid desktop:pb-[24px] pointer-events-none absolute bottom-0 z-10 flex items-stretch gap-2 pb-[16px]",p.captionGroup),children:D.map((e,t)=>u(Be.Fragment,{children:[n(K,{size:2,className:c("hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]"),html:e.title}),t<D.length-1&&n("div",{className:c("bg-info-primary w-px")})]},e.title))}),fe&&n(lt,{visible:fe,videoUrl:r?.isYoutubeVideo?void 0:r?.videoUrl?.url,youTubeId:r?.isYoutubeVideo?r?.youtubeId:void 0,onCloseModal:()=>ge(!1)})]})})});Le.displayName="HeroBanner";var Rt=et(Le);export{Rt as default};
@@ -1 +1 @@
1
- "use client";import{Fragment as St,jsx as a,jsxs as h}from"react/jsx-runtime";import he,{useRef as Se,useEffect as G,useCallback as E,useState as re}from"react";import{Swiper as Ke,SwiperSlide as Qe}from"swiper/react";import Xe from"../../helpers/ScrollLoadVideo.js";import{cn as V,getLocalizedPath as et}from"../../helpers/index.js";import{buildPictureSource as tt,resolveTierMedia as U,useMediaTier as Be}from"./mediaResolver.js";import{Button as ie,Heading as nt,Text as Te,Countdown as ot,Picture as xe}from"../../components/index.js";import{useCarouselPlayback as at}from"../../hooks/useCarouselPlayback.js";import{CarouselArrows as rt,CarouselCornerToggle as it,CarouselProgressControls as st}from"../../shared/CarouselControls.js";import{buildClickTrackingProps as lt,gaTrack as dt,resolveComponentMediaType as Pe,trackComponentClick as ct}from"../../shared/track.js";import{buildPageGroup as ut,buildTrackingRef as pt,trackUrlRef as mt}from"../../shared/trackUrlRef.js";import{useExposure as gt}from"../../hooks/useExposure.js";import{useAiuiContext as vt}from"../AiuiProvider/index.js";import{VideoModal as ft}from"../VideoModal/index.js";import"swiper/css";const yt=({size:d="base"})=>{const I=d==="lg"?"20":d==="sm"?"16":"18";return a("svg",{width:I,height:I,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:a("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},se="hero_banner",bt=({data:d,isActive:I,isAdjacent:le=!1,videoRef:de,slideIndex:Y,containerSize:W="default",theme:ce="light",slideLabel:ue,position:T,locale:r,pageHandle:R,onPlayVideo:Z,onPrimaryClick:m,onSecondaryClick:pe,onTertiaryClick:J})=>{const{pcImage:K,isVideoLoop:M=!0,isShowVideo:B,title:x,subtitle:b,label:z,endDate:F,endDate_tz:Q,dateFormat:k,iconArray:P,caption:f,blockLink:D,primaryButton:i,secondaryButton:s,tertiaryButton:l,align:C="left",titleSize:N}=d,_=Be(),p=tt(d),j=U(d,"lgDesktop","image")?.alt||K?.alt||"",y=U(d,_,"video")?.url||"",w=!!p&&!/\.(mp4|mov|webm|m4v)(\?|$)/i.test(p),X=Pe(B),me=U(d,_,B?"video":"image")?.id||K?.id||"",ee=`${pt(R??"",X,se)}_${T}`,ge=n=>n&&r?et(n,r):n,H=n=>n?mt(ge(n),ee):void 0,S=(n,g)=>lt({interactive:n,componentType:X,componentName:se,title:x,description:b,buttonName:g,position:T,creativeId:me});return h("div",{"data-ui-component-id":"HeroBannerSlide",role:"group","aria-roledescription":"slide","aria-label":ue,className:V("text-info-primary relative w-full overflow-hidden transition-colors duration-500",ce==="dark"&&"aiui-dark",W==="default"?"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]"),children:[D&&a("a",{className:"absolute inset-0 z-10",href:H(D),tabIndex:-1,"aria-hidden":"true","aria-label":x?.trim()||b?.trim()||j||void 0,...S(!0)}),B?h(St,{children:[a(Xe,{videoRef:de,src:y,poster:void 0,className:"absolute inset-0 size-full transition-opacity duration-500",videoClassName:"size-full object-cover",videoLayerClassName:"opacity-0",muted:!0,loop:M,playsInline:!0,onPlaying:n=>{const g=n.currentTarget;g.parentElement?.classList.remove("opacity-0"),g.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")},onWaiting:n=>{const g=n.currentTarget;if(g.currentTime>=.5)return;g.parentElement?.classList.add("opacity-0"),g.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.remove("opacity-0")}}),w&&a("div",{"data-video-poster":"true",className:"bg-container-primary pointer-events-none absolute inset-0 size-full transition-opacity duration-500",children:a(xe,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:Y===0||le?"eager":"lazy",fetchPriority:Y===0?"high":"auto",alt:j,source:p})})]}):a(xe,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:j,source:p}),h("div",{className:V("laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] pointer-events-none absolute top-24 z-10 flex w-full flex-col gap-[24px] transition-colors duration-500",C==="center"?"left-1/2 -translate-x-1/2 items-center text-center":"px-grid left-0"),children:[h("div",{className:V("tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px] transition-colors duration-500",C==="center"?"text-center":"laptop:text-left"),children:[z&&a(Te,{size:2,as:"p",className:V("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:z}),x&&a(nt,{as:N==="4"?"h1":"h2",html:x,size:N?Number(N||"5"):W==="sm"?4:5}),b&&a(Te,{as:"p",size:2,className:"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",html:b}),F&&a("div",{className:"mt-3",children:a(ot,{endDate:F,endDate_tz:Q,dateFormat:k,variant:"spacious",align:C})})]}),(i?.text||s?.text||l?.text)&&h("div",{className:V("lg-desktop:gap-3 pointer-events-auto flex flex-wrap items-center gap-2",C==="center"?"justify-center":"laptop:justify-start"),children:[s?.isShowPlayVideoButton&&s?.playVideoButtonText?h(ie,{size:"lg",variant:"secondary",className:"hero-banner-play-video-button",onClick:()=>Z?.(),...S(!0,"video play"),children:[s.playVideoButtonText," ",a(yt,{size:"lg"})]}):s?.text?h(ie,{size:"lg",variant:"secondary",as:s?.isCustomSecondaryButton?"button":"a",href:H(s.link),target:s?.target,rel:s?.target==="_blank"?s?.rel??"noopener noreferrer":s?.rel,onClick:n=>s?.isCustomSecondaryButton&&pe?.(d,n,s?.customSecondaryEventId),...S(!!(s.link||s.isCustomSecondaryButton),s.text),children:[s.text,a("span",{className:"sr-only",children:x??b})]}):null,i?.text&&a(ie,{size:"lg",variant:"primary",as:i?.isCustomPrimaryButton?"button":"a",href:H(i.link),target:i?.target,rel:i?.target==="_blank"?i?.rel??"noopener noreferrer":i?.rel,onClick:n=>i?.isCustomPrimaryButton&&m?.(d,n,i?.customPrimaryEventId),...S(!!(i.link||i.isCustomPrimaryButton),i.text),children:i.text}),l?.text&&h(ie,{size:"lg",variant:"link",className:"tablet:basis-auto basis-full",as:l?.isCustomTertiaryButton?"button":"a",href:H(l.link),target:l?.target,rel:l?.target==="_blank"?l?.rel??"noopener noreferrer":l?.rel,onClick:n=>l?.isCustomTertiaryButton&&J?.(d,n,l?.customTertiaryEventId),...S(!!(l.link||l.isCustomTertiaryButton),l.text),children:[l.text,a("span",{className:"sr-only",children:x??b})]})]}),P&&P.length>0&&a("div",{className:V("flex items-center gap-2",C==="center"?"justify-center":"justify-start"),children:P.map(n=>a("div",{className:"h-12",children:a(xe,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:n?.pcImage?.alt||"",source:n?.pcImage?.url})},n?.pcImage?.url||n?.pcImage?.alt))})]}),f&&f.length>0&&a("div",{className:"hero-banner-caption-group laptop:gap-3 px-grid desktop:pb-[24px] pointer-events-none absolute bottom-0 z-10 flex items-stretch gap-2 pb-[16px]",children:f.map((n,g)=>h(he.Fragment,{children:[a(Te,{size:2,className:"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]",html:n.title}),g<f.length-1&&a("div",{className:"bg-info-primary w-px"})]},n.title))})]})},ht={prevSlide:"Previous slide",nextSlide:"Next slide",pauseAutoplay:"Pause autoplay",playAutoplay:"Play autoplay",pauseVideo:"Pause video",playVideo:"Play video",slideStatus:"Slide",carouselLabel:"Banner carousel"},Ne=he.forwardRef(({data:d,className:I,classNames:le={},a11yLabels:de,onPrimaryClick:Y,onSecondaryClick:W,onTertiaryClick:ce,...ue},T)=>{const r=d.items||[],R=d.carousel,Z=R?.size??d.size??"default",m={...ht,...de},{locale:pe,pageHandle:J,trackingData:K}=vt(),M=Be(),B=ut({pageHandle:J,pageGroup:K?.pageGroup}),x=Se(null),[b,z]=re(null),[F,Q]=re(null),[k,P]=re(null),[f,D]=re(null),i=Se(r);G(()=>{i.current=r});const s=e=>e!==void 0&&e!==999&&e>=5,l=e=>e!==void 0&&e!==999&&e>=1&&e<=30,C=R?.autoplaySeconds,N=e=>{const t=e?.autoplaySeconds;return l(t)?t:s(C)?C:void 0},_=r.length>1&&r.some(e=>N(e)!==void 0),p=Se(r.map(()=>he.createRef())),j=(R?.showArrows??!0)&&r.length>1,y=E((e,t)=>{dt({event:"ga4Event",event_name:e,event_parameters:t})},[]),w=E(e=>i.current[e]?.isShowVideo?"video":"image",[]),X=E((e,t)=>{t==="swipe"&&y("hero_banner_swipe",{to_index:e}),y("hero_banner_slide_view",{index:e,total:i.current.length,media_type:w(e),trigger:t})},[y,w]),me=E((e,t,o,u="arrow")=>{y("hero_banner_arrow_click",{direction:e,from_index:t,to_index:o,source:u})},[y]),ee=E((e,t)=>{y(e?"hero_banner_pause":"hero_banner_resume",{index:t,media_type:w(t)})},[y,w]),ge=E((e,t)=>{const o=i.current[t];o&&ct({pageGroup:B,componentType:"video",componentName:se,position:t+1,buttonName:e?"video pause":"video play",componentTitle:o.title,componentDescription:o.subtitle,creativeId:U(o,M,"video")?.id||o.pcImage?.id||""})},[B,M]),H=E(e=>{p.current.forEach((o,u)=>{u!==e&&o.current&&(o.current.pause(),o.current.currentTime=0)});const t=p.current[e];t?.current&&(t.current.currentTime=0,t.current.play()?.catch(()=>{}))},[]),{rootRef:S,activeIndex:n,playbackState:g,resetNonce:ve,announcement:_e,activeFrameIntervalSec:ke,isTimerRunning:He,handleSwiperInit:Ae,handleSlideChange:Ie,handleTransitionEnd:Re,handleSliderFirstMove:Me,goToSlide:Ce,goToSlideIndex:ze,handlePausePlayClick:Fe,notifyVideoPlaying:we,handleFocus:De,handleBlur:je}=at({frameCount:r.length,resolveFrameIntervalSec:e=>N(r[e]),isAutoplayEnabled:_,swiperRef:x,slideStatusLabel:m.slideStatus,onSlideMediaSync:H,onSlideChange:X,onArrowNavigate:me,delaysCountdownForVideo:e=>!!i.current[e]?.isShowVideo,onPauseToggle:(e,t)=>{ee(e,t);const o=p.current[t]?.current;o&&(e?o.pause():o.ended||o.play()?.catch(()=>{}))}}),qe=E(e=>{S.current=e,typeof T=="function"?T(e):T&&(T.current=e)},[T,S]),v=r[n]??r[0],$e=Pe(v?.isShowVideo),Oe=v?.title!==void 0?v?.title?.trim()||v?.subtitle?.trim()||v?.pcImage?.alt?.trim()||void 0:v?.subtitle&&v.subtitle.trim()||"",Ge=v&&(U(v,M,v.isShowVideo?"video":"image")?.id||v.pcImage?.id)||"";gt(S,{componentType:$e,componentName:se,componentTitle:Oe,componentDescription:v?.subtitle?.trim()||"",creativeId:Ge,position:1}),G(()=>{z(null),Q(null);const e=i.current[n],t=p.current[n]?.current;if(!e?.isShowVideo||!t)return;const o=()=>z(t.ended?"ended":t.paused?"paused":"playing"),u=()=>Q(Number.isFinite(t.duration)?t.duration:null),A=()=>{o(),we(n)};return o(),u(),t.addEventListener("playing",A),t.addEventListener("pause",o),t.addEventListener("ended",o),t.addEventListener("loadedmetadata",u),()=>{t.removeEventListener("playing",A),t.removeEventListener("pause",o),t.removeEventListener("ended",o),t.removeEventListener("loadedmetadata",u)}},[n,we]),G(()=>{const e=i.current[n];if(!e?.isShowVideo||!e?.isMultiThemeEnabled)return;const t=p.current[n]?.current;if(!t)return;const o=(c,L,ae,be)=>{if(!(!c||typeof L!="number"||typeof ae!="number"||typeof be!="number"))return be>=L&&be<ae?c:void 0};let u=null;const A=c=>{u=c,P(L=>L&&L.index===n&&L.theme===c?L:{index:n,theme:c})},te=c=>{A(o(e.theme_1,e.star_time_1,e.end_time_1,c)??o(e.theme_2,e.star_time_2,e.end_time_2,c)??e.theme??"light")},ne=t;let $=0,O=0;const fe=typeof ne.requestVideoFrameCallback=="function",Je=()=>fe?O!==0:$!==0,ye=()=>{if(!Je())if(fe){const c=(L,ae)=>{te(ae.mediaTime),O=ne.requestVideoFrameCallback(c)};O=ne.requestVideoFrameCallback(c)}else{const c=()=>{te(t.currentTime),$=requestAnimationFrame(c)};$=requestAnimationFrame(c)}},oe=()=>{fe?(ne.cancelVideoFrameCallback?.(O),O=0):(cancelAnimationFrame($),$=0)},Ve=()=>{oe(),u&&P({index:n,theme:u})};return t.addEventListener("play",ye),t.addEventListener("pause",oe),t.addEventListener("ended",Ve),!t.paused&&!t.ended&&ye(),()=>{oe(),t.removeEventListener("play",ye),t.removeEventListener("pause",oe),t.removeEventListener("ended",Ve)}},[n]),G(()=>{p.current.forEach((e,t)=>{t!==0&&e.current&&(e.current.pause(),e.current.currentTime=0)})},[]),G(()=>{i.current.length!==0&&y("hero_banner_slide_view",{index:0,total:i.current.length,media_type:w(0),trigger:"initial"})},[y,w]);const Ue=!!r[n]?.isShowVideo,Le=ke!==void 0,q=!Le&&Ue&&F!==null&&F>5&&b!=="ended"&&b!==null,Ye=Le||q,We=q?b==="paused":g==="STOPPED",Ze=()=>{if(!q){Fe();return}const e=p.current[n]?.current;if(!e)return;const t=!e.paused;t?e.pause():e.play()?.catch(()=>{}),ee(t,n),ge(t,n)},Ee=k&&k.index===n?k.theme:r[n]?.theme;return h("div",{ref:qe,role:"region","aria-roledescription":"carousel","aria-label":m.carouselLabel,"data-ui-component-id":"HeroBanner",onFocus:De,onBlur:je,className:V("hero-banner-carousel group relative w-full overflow-hidden",Z==="default"?"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]",le.root,I),...ue,children:[a(Ke,{onSwiper:Ae,onSlideChange:Ie,onSlideChangeTransitionEnd:Re,onSliderFirstMove:Me,slidesPerView:1,loop:!0,initialSlide:0,allowTouchMove:!0,children:r.map((e,t)=>{const o=k&&k.index===t?k.theme:e.theme??"light";return a(Qe,{children:({isActive:u,isPrev:A,isNext:te})=>a(bt,{data:e,isActive:u,isAdjacent:A||te,slideIndex:t,slideLabel:`${m.slideStatus} ${t+1} / ${r.length}`,videoRef:p.current[t],containerSize:Z,theme:o,position:t+1,locale:pe,pageHandle:J,onPlayVideo:()=>D(t),onPrimaryClick:Y,onSecondaryClick:W,onTertiaryClick:ce})},t)})}),j&&a(rt,{onPrev:()=>Ce("prev"),onNext:()=>Ce("next"),prevLabel:m.prevSlide,nextLabel:m.nextSlide}),_&&a(st,{frameCount:r.length,activeIndex:n,resetNonce:ve,activeFrameIntervalSec:ke,isAutoplayEnabled:_,isTimerRunning:He,onSegmentClick:ze,segmentLabel:e=>`${m.slideStatus} ${e+1} / ${r.length}`,classPrefix:"hero-banner",theme:Ee}),Ye&&a(it,{isPaused:We,onToggle:Ze,pausedLabel:q?m.playVideo:m.playAutoplay,playingLabel:q?m.pauseVideo:m.pauseAutoplay,classPrefix:"hero-banner",theme:Ee}),a("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:_e}),f!==null&&r[f]?.secondaryButton&&a(ft,{visible:!0,videoUrl:r[f].secondaryButton?.isYoutubeVideo?void 0:r[f].secondaryButton?.videoUrl?.url,youTubeId:r[f].secondaryButton?.isYoutubeVideo?r[f].secondaryButton?.youtubeId:void 0,onCloseModal:()=>D(null)})]})});Ne.displayName="HeroBannerCarousel";var It=Ne;export{It as default};
1
+ "use client";import{Fragment as Tt,jsx as o,jsxs as T}from"react/jsx-runtime";import _e,{useRef as Ae,useEffect as ne,useCallback as E,useState as be}from"react";import{Swiper as Ke,SwiperSlide as Qe}from"swiper/react";import Xe from"../../helpers/ScrollLoadVideo.js";import{cn as A,getLocalizedPath as et}from"../../helpers/index.js";import{buildPictureSource as tt,resolveTierMedia as ae,useMediaTier as Me}from"./mediaResolver.js";import{Button as he,Heading as nt,Text as ze,Countdown as at,Picture as He}from"../../components/index.js";import{useCarouselPlayback as ot}from"../../hooks/useCarouselPlayback.js";import{CarouselArrows as rt,CarouselCornerToggle as it,CarouselProgressControls as st}from"../../shared/CarouselControls.js";import{buildClickTrackingProps as lt,gaTrack as dt,resolveComponentMediaType as De,trackComponentClick as ct}from"../../shared/track.js";import{buildPageGroup as ut,buildTrackingRef as mt,trackUrlRef as pt}from"../../shared/trackUrlRef.js";import{useExposure as gt}from"../../hooks/useExposure.js";import{useBoaButton as ft}from"../../hooks/useBoaButton.js";import{useAiuiContext as vt}from"../AiuiProvider/index.js";import{VideoModal as yt}from"../VideoModal/index.js";import"swiper/css";const bt=({size:u="base"})=>{const G=u==="lg"?"20":u==="sm"?"16":"18";return o("svg",{width:G,height:G,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:o("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},O="hero_banner",ht=({data:u,isActive:G,isAdjacent:ke=!1,videoRef:Te,slideIndex:oe,containerSize:re="default",theme:Se="light",slideLabel:xe,position:S,locale:i,pageHandle:U,onPlayVideo:ie,onPrimaryClick:v,onSecondaryClick:Ce,onTertiaryClick:se})=>{const{pcImage:le,isVideoLoop:Y=!0,isShowVideo:z,title:x,subtitle:k,label:W,endDate:Z,endDate_tz:de,dateFormat:C,iconArray:H,caption:b,blockLink:I,blockLinkConfig:m,primaryButton:c,secondaryButton:s,tertiaryButton:l,align:w="left",titleSize:V}=u,h=Me(),R=tt(u),f=ae(u,"lgDesktop","image")?.alt||le?.alt||"",L=ae(u,h,"video")?.url||"",we=!!R&&!/\.(mp4|mov|webm|m4v)(\?|$)/i.test(R),ce=De(z),ue=ae(u,h,z?"video":"image")?.id||le?.id||"",Le=`${mt(U??"",ce,O)}_${S}`,Be=n=>n&&i?et(n,i):n,F=n=>n?pt(Be(n),Le):void 0,{resolveLink:r,hasAdTrack:P,trackAd:me}=ft(),J=n=>{if(!n?.link)return{href:void 0,target:n?.target};const d=r(n.link,n);return d.isAmazon?{href:d.href,target:n.target??"_blank"}:{href:F(n.link),target:n.target}},N=J(s),M=J(c),D=J(l),j=r(I,m),pe=j.isAmazon?j.href:F(I),Ee=j.isAmazon?m?.target??"_blank":m?.target,q=(n,d)=>!!n&&!(d?.link&&P(d)),K=(n,d,Q)=>me(n,{componentName:O,buttonPosition:d,buttonText:n?.text,href:Q}),_=(n,d)=>lt({interactive:n,componentType:ce,componentName:O,title:x,description:k,buttonName:d,position:S,creativeId:ue});return T("div",{"data-ui-component-id":"HeroBannerSlide",role:"group","aria-roledescription":"slide","aria-label":xe,className:A("text-info-primary relative w-full overflow-hidden transition-colors duration-500",Se==="dark"&&"aiui-dark",re==="default"?"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]"),children:[I&&o("a",{className:"absolute inset-0 z-10 !bg-transparent hover:!bg-transparent",href:pe,target:Ee,"data-headless-ad-track":P(m)?"true":void 0,"data-headless-amazon":j.isAmazon?"true":void 0,onClick:()=>me(m,{componentName:O,buttonPosition:"block",href:pe}),tabIndex:-1,"aria-hidden":"true","aria-label":x?.trim()||k?.trim()||f||void 0,..._(!0)}),z?T(Tt,{children:[o(Xe,{videoRef:Te,src:L,poster:void 0,className:"absolute inset-0 size-full transition-opacity duration-500",videoClassName:"size-full object-cover",videoLayerClassName:"opacity-0",muted:!0,loop:Y,playsInline:!0,onPlaying:n=>{const d=n.currentTarget;d.parentElement?.classList.remove("opacity-0"),d.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")},onWaiting:n=>{const d=n.currentTarget;if(d.currentTime>=.5)return;d.parentElement?.classList.add("opacity-0"),d.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.remove("opacity-0")}}),we&&o("div",{"data-video-poster":"true",className:"bg-container-primary pointer-events-none absolute inset-0 size-full transition-opacity duration-500",children:o(He,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:oe===0||ke?"eager":"lazy",fetchPriority:oe===0?"high":"auto",alt:f,source:R})})]}):o(He,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:f,source:R}),T("div",{className:A("laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] pointer-events-none absolute top-24 z-10 flex w-full flex-col gap-[24px] transition-colors duration-500",w==="center"?"left-1/2 -translate-x-1/2 items-center text-center":"px-grid left-0"),children:[T("div",{className:A("tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px] transition-colors duration-500",w==="center"?"text-center":"laptop:text-left"),children:[W&&o(ze,{size:2,as:"p",className:A("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:W}),x&&o(nt,{as:V==="4"?"h1":"h2",html:x,size:V?Number(V||"5"):re==="sm"?4:5}),k&&o(ze,{as:"p",size:2,className:"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",html:k}),Z&&o("div",{className:"mt-3",children:o(at,{endDate:Z,endDate_tz:de,dateFormat:C,variant:"spacious",align:w})})]}),(c?.text||s?.text||l?.text)&&T("div",{className:A("lg-desktop:gap-3 pointer-events-auto flex flex-wrap items-center gap-2",w==="center"?"justify-center":"laptop:justify-start"),children:[s?.isShowPlayVideoButton&&s?.playVideoButtonText?T(he,{size:"lg",variant:"secondary",className:"hero-banner-play-video-button",onClick:()=>ie?.(),..._(!0,"video play"),children:[s.playVideoButtonText," ",o(bt,{size:"lg"})]}):s?.text?T(he,{size:"lg",variant:"secondary",as:q(s?.isCustomSecondaryButton,s)?"button":"a",href:N.href,"data-headless-ad-track":P(s)?"true":void 0,"data-headless-amazon":r(s.link,s).isAmazon?"true":void 0,target:N.target,rel:N.target==="_blank"?s?.rel??"noopener noreferrer":s?.rel,onClick:n=>{K(s,"secondary",N.href),s?.isCustomSecondaryButton&&Ce?.(u,n,s?.customSecondaryEventId)},..._(!!(s.link||s.isCustomSecondaryButton),s.text),children:[s.text,o("span",{className:"sr-only",children:x??k})]}):null,c?.text&&o(he,{size:"lg",variant:"primary",as:q(c?.isCustomPrimaryButton,c)?"button":"a",href:M.href,"data-headless-ad-track":P(c)?"true":void 0,"data-headless-amazon":r(c.link,c).isAmazon?"true":void 0,target:M.target,rel:M.target==="_blank"?c?.rel??"noopener noreferrer":c?.rel,onClick:n=>{K(c,"primary",M.href),c?.isCustomPrimaryButton&&v?.(u,n,c?.customPrimaryEventId)},..._(!!(c.link||c.isCustomPrimaryButton),c.text),children:c.text}),l?.text&&T(he,{size:"lg",variant:"link",className:"tablet:basis-auto basis-full",as:q(l?.isCustomTertiaryButton,l)?"button":"a",href:D.href,"data-headless-ad-track":P(l)?"true":void 0,"data-headless-amazon":r(l.link,l).isAmazon?"true":void 0,"data-headless-amazon-style":r(l.link,l).isAmazon?"link":void 0,target:D.target,rel:D.target==="_blank"?l?.rel??"noopener noreferrer":l?.rel,onClick:n=>{K(l,"tertiary",D.href),l?.isCustomTertiaryButton&&se?.(u,n,l?.customTertiaryEventId)},..._(!!(l.link||l.isCustomTertiaryButton),l.text),children:[l.text,o("span",{className:"sr-only",children:x??k})]})]}),H&&H.length>0&&o("div",{className:A("flex items-center gap-2",w==="center"?"justify-center":"justify-start"),children:H.map(n=>o("div",{className:"h-12",children:o(He,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:n?.pcImage?.alt||"",source:n?.pcImage?.url})},n?.pcImage?.url||n?.pcImage?.alt))})]}),b&&b.length>0&&o("div",{className:"hero-banner-caption-group laptop:gap-3 px-grid desktop:pb-[24px] pointer-events-none absolute bottom-0 z-10 flex items-stretch gap-2 pb-[16px]",children:b.map((n,d)=>T(_e.Fragment,{children:[o(ze,{size:2,className:"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]",html:n.title}),d<b.length-1&&o("div",{className:"bg-info-primary w-px"})]},n.title))})]})},kt={prevSlide:"Previous slide",nextSlide:"Next slide",pauseAutoplay:"Pause autoplay",playAutoplay:"Play autoplay",pauseVideo:"Pause video",playVideo:"Play video",slideStatus:"Slide",carouselLabel:"Banner carousel"},je=_e.forwardRef(({data:u,className:G,classNames:ke={},a11yLabels:Te,onPrimaryClick:oe,onSecondaryClick:re,onTertiaryClick:Se,...xe},S)=>{const i=u.items||[],U=u.carousel,ie=U?.size??u.size??"default",v={...kt,...Te},{locale:Ce,pageHandle:se,trackingData:le}=vt(),Y=Me(),z=ut({pageHandle:se,pageGroup:le?.pageGroup}),x=Ae(null),[k,W]=be(null),[Z,de]=be(null),[C,H]=be(null),[b,I]=be(null),m=Ae(i);ne(()=>{m.current=i});const c=e=>e!==void 0&&e!==999&&e>=5,s=e=>e!==void 0&&e!==999&&e>=1&&e<=30,l=U?.autoplaySeconds,w=e=>{const t=e?.autoplaySeconds;return s(t)?t:c(l)?l:void 0},V=i.length>1&&i.some(e=>w(e)!==void 0),h=Ae(i.map(()=>_e.createRef())),R=(U?.showArrows??!0)&&i.length>1,f=E((e,t)=>{dt({event:"ga4Event",event_name:e,event_parameters:t})},[]),L=E(e=>m.current[e]?.isShowVideo?"video":"image",[]),we=E((e,t)=>{t==="swipe"&&f("hero_banner_swipe",{to_index:e}),f("hero_banner_slide_view",{index:e,total:m.current.length,media_type:L(e),trigger:t})},[f,L]),ce=E((e,t,a,g="arrow")=>{f("hero_banner_arrow_click",{direction:e,from_index:t,to_index:a,source:g})},[f]),ue=E((e,t)=>{f(e?"hero_banner_pause":"hero_banner_resume",{index:t,media_type:L(t)})},[f,L]),Le=E((e,t)=>{const a=m.current[t];a&&ct({pageGroup:z,componentType:"video",componentName:O,position:t+1,buttonName:e?"video pause":"video play",componentTitle:a.title,componentDescription:a.subtitle,creativeId:ae(a,Y,"video")?.id||a.pcImage?.id||""})},[z,Y]),Be=E(e=>{h.current.forEach((a,g)=>{g!==e&&a.current&&(a.current.pause(),a.current.currentTime=0)});const t=h.current[e];t?.current&&(t.current.currentTime=0,t.current.play()?.catch(()=>{}))},[]),{rootRef:F,activeIndex:r,playbackState:P,resetNonce:me,announcement:J,activeFrameIntervalSec:N,isTimerRunning:M,handleSwiperInit:D,handleSlideChange:j,handleTransitionEnd:pe,handleSliderFirstMove:Ee,goToSlide:q,goToSlideIndex:K,handlePausePlayClick:_,notifyVideoPlaying:n,handleFocus:d,handleBlur:Q}=ot({frameCount:i.length,resolveFrameIntervalSec:e=>w(i[e]),isAutoplayEnabled:V,swiperRef:x,slideStatusLabel:v.slideStatus,onSlideMediaSync:Be,onSlideChange:we,onArrowNavigate:ce,delaysCountdownForVideo:e=>!!m.current[e]?.isShowVideo,onPauseToggle:(e,t)=>{ue(e,t);const a=h.current[t]?.current;a&&(e?a.pause():a.ended||a.play()?.catch(()=>{}))}}),qe=E(e=>{F.current=e,typeof S=="function"?S(e):S&&(S.current=e)},[S,F]),y=i[r]??i[0],$e=De(y?.isShowVideo),Oe=y?.title!==void 0?y?.title?.trim()||y?.subtitle?.trim()||y?.pcImage?.alt?.trim()||void 0:y?.subtitle&&y.subtitle.trim()||"",Ge=y&&(ae(y,Y,y.isShowVideo?"video":"image")?.id||y.pcImage?.id)||"";gt(F,{componentType:$e,componentName:O,componentTitle:Oe,componentDescription:y?.subtitle?.trim()||"",creativeId:Ge,position:1}),ne(()=>{W(null),de(null);const e=m.current[r],t=h.current[r]?.current;if(!e?.isShowVideo||!t)return;const a=()=>W(t.ended?"ended":t.paused?"paused":"playing"),g=()=>de(Number.isFinite(t.duration)?t.duration:null),$=()=>{a(),n(r)};return a(),g(),t.addEventListener("playing",$),t.addEventListener("pause",a),t.addEventListener("ended",a),t.addEventListener("loadedmetadata",g),()=>{t.removeEventListener("playing",$),t.removeEventListener("pause",a),t.removeEventListener("ended",a),t.removeEventListener("loadedmetadata",g)}},[r,n]),ne(()=>{const e=m.current[r];if(!e?.isShowVideo||!e?.isMultiThemeEnabled)return;const t=h.current[r]?.current;if(!t)return;const a=(p,B,ye,Ne)=>{if(!(!p||typeof B!="number"||typeof ye!="number"||typeof Ne!="number"))return Ne>=B&&Ne<ye?p:void 0};let g=null;const $=p=>{g=p,H(B=>B&&B.index===r&&B.theme===p?B:{index:r,theme:p})},ge=p=>{$(a(e.theme_1,e.star_time_1,e.end_time_1,p)??a(e.theme_2,e.star_time_2,e.end_time_2,p)??e.theme??"light")},fe=t;let ee=0,te=0;const Ve=typeof fe.requestVideoFrameCallback=="function",Je=()=>Ve?te!==0:ee!==0,Pe=()=>{if(!Je())if(Ve){const p=(B,ye)=>{ge(ye.mediaTime),te=fe.requestVideoFrameCallback(p)};te=fe.requestVideoFrameCallback(p)}else{const p=()=>{ge(t.currentTime),ee=requestAnimationFrame(p)};ee=requestAnimationFrame(p)}},ve=()=>{Ve?(fe.cancelVideoFrameCallback?.(te),te=0):(cancelAnimationFrame(ee),ee=0)},Fe=()=>{ve(),g&&H({index:r,theme:g})};return t.addEventListener("play",Pe),t.addEventListener("pause",ve),t.addEventListener("ended",Fe),!t.paused&&!t.ended&&Pe(),()=>{ve(),t.removeEventListener("play",Pe),t.removeEventListener("pause",ve),t.removeEventListener("ended",Fe)}},[r]),ne(()=>{h.current.forEach((e,t)=>{t!==0&&e.current&&(e.current.pause(),e.current.currentTime=0)})},[]),ne(()=>{m.current.length!==0&&f("hero_banner_slide_view",{index:0,total:m.current.length,media_type:L(0),trigger:"initial"})},[f,L]);const Ue=!!i[r]?.isShowVideo,Ie=N!==void 0,X=!Ie&&Ue&&Z!==null&&Z>5&&k!=="ended"&&k!==null,Ye=Ie||X,We=X?k==="paused":P==="STOPPED",Ze=()=>{if(!X){_();return}const e=h.current[r]?.current;if(!e)return;const t=!e.paused;t?e.pause():e.play()?.catch(()=>{}),ue(t,r),Le(t,r)},Re=C&&C.index===r?C.theme:i[r]?.theme;return T("div",{ref:qe,role:"region","aria-roledescription":"carousel","aria-label":v.carouselLabel,"data-ui-component-id":"HeroBanner",onFocus:d,onBlur:Q,className:A("hero-banner-carousel group relative w-full overflow-hidden",ie==="default"?"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]",ke.root,G),...xe,children:[o(Ke,{onSwiper:D,onSlideChange:j,onSlideChangeTransitionEnd:pe,onSliderFirstMove:Ee,slidesPerView:1,loop:!0,initialSlide:0,allowTouchMove:!0,children:i.map((e,t)=>{const a=C&&C.index===t?C.theme:e.theme??"light";return o(Qe,{children:({isActive:g,isPrev:$,isNext:ge})=>o(ht,{data:e,isActive:g,isAdjacent:$||ge,slideIndex:t,slideLabel:`${v.slideStatus} ${t+1} / ${i.length}`,videoRef:h.current[t],containerSize:ie,theme:a,position:t+1,locale:Ce,pageHandle:se,onPlayVideo:()=>I(t),onPrimaryClick:oe,onSecondaryClick:re,onTertiaryClick:Se})},t)})}),R&&o(rt,{onPrev:()=>q("prev"),onNext:()=>q("next"),prevLabel:v.prevSlide,nextLabel:v.nextSlide}),V&&o(st,{frameCount:i.length,activeIndex:r,resetNonce:me,activeFrameIntervalSec:N,isAutoplayEnabled:V,isTimerRunning:M,onSegmentClick:K,segmentLabel:e=>`${v.slideStatus} ${e+1} / ${i.length}`,classPrefix:"hero-banner",theme:Re}),Ye&&o(it,{isPaused:We,onToggle:Ze,pausedLabel:X?v.playVideo:v.playAutoplay,playingLabel:X?v.pauseVideo:v.pauseAutoplay,classPrefix:"hero-banner",theme:Re}),o("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:J}),b!==null&&i[b]?.secondaryButton&&o(yt,{visible:!0,videoUrl:i[b].secondaryButton?.isYoutubeVideo?void 0:i[b].secondaryButton?.videoUrl?.url,youTubeId:i[b].secondaryButton?.isYoutubeVideo?i[b].secondaryButton?.youtubeId:void 0,onCloseModal:()=>I(null)})]})});je.displayName="HeroBannerCarousel";var Rt=je;export{Rt as default};
@@ -1,6 +1,10 @@
1
1
  import type { ButtonProps } from '../../components/button.js';
2
2
  import type { Media, Theme } from '../../types/props.js';
3
+ import type { BoaButtonFields } from '../../hooks/useBoaButton.js';
3
4
  type TitleSizeType = '5' | '4' | '3' | '2' | '1';
5
+ export type HeroBannerBlockLinkConfig = BoaButtonFields & {
6
+ target?: '_self' | '_blank';
7
+ };
4
8
  /** 5-breakpoint media tier keys (Tailwind preset boundaries). */
5
9
  export type HeroBannerMediaTier = 'lgDesktop' | 'desktop' | 'laptop' | 'tablet' | 'mobile';
6
10
  /**
@@ -115,12 +119,13 @@ export interface HeroBannerSlideData extends HeroBannerTieredMediaFields, HeroBa
115
119
  isShowVideo?: boolean;
116
120
  isVideoLoop?: boolean;
117
121
  blockLink?: string;
122
+ blockLinkConfig?: HeroBannerBlockLinkConfig;
118
123
  primaryButton?: {
119
124
  text: string;
120
125
  link?: string;
121
126
  isCustomPrimaryButton?: boolean;
122
127
  customPrimaryEventId?: string;
123
- } & Omit<ButtonProps, 'children'>;
128
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
124
129
  secondaryButton?: {
125
130
  text: string;
126
131
  link?: string;
@@ -132,13 +137,13 @@ export interface HeroBannerSlideData extends HeroBannerTieredMediaFields, HeroBa
132
137
  isYoutubeVideo?: boolean;
133
138
  isCustomSecondaryButton?: boolean;
134
139
  customSecondaryEventId?: string;
135
- } & Omit<ButtonProps, 'children'>;
140
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
136
141
  tertiaryButton?: {
137
142
  text: string;
138
143
  link?: string;
139
144
  isCustomTertiaryButton?: boolean;
140
145
  customTertiaryEventId?: string;
141
- } & Omit<ButtonProps, 'children'>;
146
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
142
147
  theme?: Theme;
143
148
  /**
144
149
  * 单帧轮播间隔(秒),覆盖全局默认间隔。可选范围 1-30 秒,不允许 999;
@@ -187,6 +192,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
187
192
  /** 视频是否循环播放 */
188
193
  isVideoLoop?: boolean;
189
194
  blockLink?: string;
195
+ blockLinkConfig?: HeroBannerBlockLinkConfig;
190
196
  /** 主按钮文本和配置 */
191
197
  primaryButton?: {
192
198
  text: string;
@@ -194,7 +200,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
194
200
  isCustomPrimaryButton?: boolean;
195
201
  /** 自定义事件ID,传递给 onPrimaryClick */
196
202
  customPrimaryEventId?: string;
197
- } & Omit<ButtonProps, 'children'>;
203
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
198
204
  /** 次要按钮文本和配置 */
199
205
  secondaryButton?: {
200
206
  text: string;
@@ -209,7 +215,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
209
215
  isCustomSecondaryButton?: boolean;
210
216
  /** 自定义事件ID,传递给 onSecondaryClick */
211
217
  customSecondaryEventId?: string;
212
- } & Omit<ButtonProps, 'children'>;
218
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
213
219
  /** 第三按钮文本和配置 */
214
220
  tertiaryButton?: {
215
221
  text: string;
@@ -217,7 +223,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
217
223
  isCustomTertiaryButton?: boolean;
218
224
  /** 自定义事件ID,传递给 onTertiaryClick */
219
225
  customTertiaryEventId?: string;
220
- } & Omit<ButtonProps, 'children'>;
226
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
221
227
  /** 主题 */
222
228
  theme?: Theme;
223
229
  /**
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as d}from"react/jsx-runtime";import ke,{useImperativeHandle as ye,useRef as v,useState as b,useEffect as ee}from"react";import{Heading as y,Picture as S,Text as M,Link as te}from"../../components/index.js";import{cn as r,getLocalizedPath as Ne}from"../../helpers/utils.js";import{withLayout as Te}from"../../shared/Styles.js";import{useExposure as Ie}from"../../hooks/useExposure.js";import{useIntersectionObserverDelay as Le}from"../../hooks/useIntersectionObserver.js";import{useAiuiContext as Pe}from"../AiuiProvider/index.js";import{useTracking as Ve}from"../../hooks/useTracking.js";import{trackUrlRef as Se}from"../../shared/trackUrlRef.js";import{buildClickTrackingProps as Me}from"../../shared/track.js";import{motion as ie,AnimatePresence as oe}from"framer-motion";const D="image",z="image_with_text",ae=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e("path",{d:"M6.91009 4.41058C7.23553 4.08514 7.76304 4.08514 8.08848 4.41058L13.0885 9.41058C13.4139 9.73602 13.4139 10.2635 13.0885 10.589L8.08848 15.589C7.76304 15.9144 7.23553 15.9144 6.91009 15.589C6.58466 15.2635 6.58466 14.736 6.91009 14.4106L11.3209 9.99977L6.91009 5.58897C6.58466 5.26353 6.58466 4.73602 6.91009 4.41058Z",fill:"currentColor"})}),le=ke.forwardRef(({data:se,className:re},ne)=>{const{title:f,subtitle:w,desc:g,descIcon:P,image:_,padImage:H,mobileImage:E,theme:me="dark",items:R=[],layout:de="left",mediaType:ce="image",datalist:s=[],video:j,padVideo:C,mobVideo:W,button:u,textAlign:l="left",titleTag:pe}=se,i=de,{locale:xe="us"}=Pe(),{buildRef:ue}=Ve(),V=v(null),N=v(null),T=v(null),I=v(null),A=v(null),[c,fe]=b(0),q=v([]),[B,ge]=b({left:0,width:0}),[h,$]=b(""),[F,O]=b(""),[U,Z]=b(""),n=s.length>0,k=ce==="video";Ie(V,{componentType:D,componentName:z,componentTitle:f,componentDescription:w}),ye(ne,()=>V.current),ee(()=>{if(s.length>0){const t=q.current[c];if(t){const{offsetLeft:a,offsetWidth:o}=t;ge({left:a,width:o})}}},[c,s.length]);const[G,he]=b(!1);Le(A,{once:!0,threshold:.01,callback:()=>{he(!0)}}),ee(()=>{if(!G||!k)return;let t="",a="",o="";if(n&&s[c]){const p=s[c];t=p.video?.url||"",a=p.padVideo?.url||t,o=p.mobVideo?.url||t}else t=j?.url||"",a=C?.url||t,o=W?.url||t;t&&$(t),a&&O(a),o&&Z(o),setTimeout(()=>{[N.current?.querySelector("video"),T.current?.querySelector("video"),I.current?.querySelector("video")].forEach(x=>{x&&(x.load(),x.play().catch(()=>{}))})},200)},[G,k,n,c,s,j?.url,C?.url,W?.url]);const ve=(t,a)=>{if(fe(t),a.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),k&&n&&s[t]){const o=s[t];o.video?.url&&$(o.video.url),o.padVideo?.url&&O(o.padVideo.url),o.mobVideo?.url&&Z(o.mobVideo.url),setTimeout(()=>{[N.current?.querySelector("video"),T.current?.querySelector("video"),I.current?.querySelector("video")].forEach(x=>{x&&(x.load(),x.play().catch(()=>{}))})},300)}},J=Ne(u?.link||"",xe),K=u?.link?Se(J,ue(D,z)):J,Q=Me({interactive:!!u?.link,componentType:D,componentName:z,title:f,description:w,buttonName:u?.text}),be=()=>!L||!u?.text||i==="top"||i==="bottom"?null:e("div",{className:r("image-with-text__button-wrapper laptop:mt-[32px] mt-[24px]",{"flex justify-center":l==="center","flex justify-start":l==="left"}),children:e(te,{href:K,...Q,className:"image-with-text__button whitespace-nowrap no-underline",suffixIcon:ae,children:u.text})}),m=R.length>0,L=!!u,X=()=>{if(n&&s[c]){const t=s[c];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return _?`${_?.url},${H?.url||_?.url} 1024, ${E?.url||_?.url} 768`:""},Y=()=>{if(n){const p=s[c],x=p.image?.url,we=p.imgPad?.url||x,_e=p.imageMob?.url||x;return e(oe,{mode:"wait",children:e(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__video-motion absolute left-0 top-0 w-full",children:d("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[e("div",{ref:N,className:"image-with-text__desktop-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:x,src:h,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),e("div",{ref:T,className:"image-with-text__tablet-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:we,src:F||h,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),e("div",{ref:I,className:"image-with-text__mobile-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:_e,src:U||h,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},p.video?.url||p.image?.url)})}const t=_?.url,a=H?.url||t,o=E?.url||t;return d("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[e("div",{ref:N,className:"image-with-text__desktop-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:h,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),e("div",{ref:T,className:"image-with-text__tablet-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:a,src:F||h,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),e("div",{ref:I,className:"image-with-text__mobile-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:o,src:U||h,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return d("section",{ref:V,"data-ui-component-id":"ImageWithText",className:r("image-with-text text-info-primary",{"flex gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!n,"flex-col":!n&&(i==="top"||i==="bottom"),"items-center":i==="left"||i==="right","flex-col laptop:flex-row":!n&&(i==="left"||i==="right"),"flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]":n,"aiui-dark":me==="dark"},re),children:[n&&(f||g||s.length>0)&&d("div",{className:r("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":l==="left","text-center":l==="center"}),children:[d("div",{className:"image-with-text__header",children:[e(y,{as:"h3",size:4,html:f,className:"image-with-text__title"}),e(M,{as:"p",size:1,html:g,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),e("div",{className:r("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":l==="center"}),children:d("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[e("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:B.left,width:B.width}}),s.map((t,a)=>e("div",{ref:o=>{q.current[a]=o},onClick:o=>ve(a,o),className:r("image-with-text__tab rounded-btn min-xxl:px-[28px] min-xxl:py-[15px] relative z-10 cursor-pointer px-[20px] py-[10px] text-center text-[12px] font-medium transition-colors duration-300 md:px-[20px] md:py-[10px]",c===a?"image-with-text__tab--active text-black":"text-white"),children:e(y,{as:pe??"h3",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},a))]})})]}),!n&&(f||w||g)&&d("div",{className:r("image-with-text__content flex w-full flex-col",{"justify-center":!L,"justify-between":L,"items-start":l==="left"&&m,"items-center":l==="center"&&m,"text-left":l==="left","text-center":l==="center","laptop:order-1":i==="left"}),children:[d("div",{className:r("image-with-text__main-content",{"flex flex-col":L}),children:[d("div",{className:r("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":(i==="top"||i==="bottom")&&u?.text}),children:[d("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[e(y,{as:"h2",size:4,html:f,className:r("image-with-text__title",{"text-left":m&&l==="left","text-center":m&&l==="center"})}),w&&e(M,{as:"p",size:m?4:3,html:w,className:r("image-with-text__subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",{"laptop:mt-[16px]":!m,"min-xxl:mt-[8px] laptop:text-[16px] lg-desktop:text-[18px]":m,"text-left":m&&l==="left","text-center":m&&l==="center"})})]}),(i==="top"||i==="bottom")&&u?.text&&e(te,{href:K,...Q,className:"laptop:flex hidden whitespace-nowrap no-underline",suffixIcon:ae,children:u.text})]}),!m&&(g||P)&&d("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[P&&e("img",{src:P,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),g&&e(y,{as:"h4",size:5,html:g,className:"image-with-text__description-text min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] text-[#3AD1FF] md:text-[40px]"})]}),m&&e("div",{className:r("image-with-text__items laptop:mt-[32px] desktop:mt-[48px] mt-[24px] grid w-full gap-6",{"!mt-6":i==="top"||i==="bottom","grid-cols-2 tablet:grid-cols-4":i==="top"||i==="bottom","grid-cols-2 tablet:grid-cols-4 laptop:grid-cols-2":i==="left"||i==="right"}),children:R.map((t,a)=>d("div",{className:r("image-with-text__item",{"text-center":l==="center"}),children:[d("div",{className:r("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":l==="center","justify-start":l==="left"}),children:[t.icon?.url&&e(S,{source:t.icon.url,alt:t.icon?.alt,className:"image-with-text__item-icon min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] desktop:h-[44px] lg-desktop:h-[52px] h-[28px] translate-y-[-12%] md:text-[40px]",imgClassName:"h-full !w-full"}),e(y,{size:4,as:"h6",className:"image-with-text__item-text bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent",children:t.text})]}),e(M,{size:4,as:"p",html:t.desc,className:"image-with-text__item-desc tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[-2px] text-[14px]"})]},a))})]}),be()]}),e("div",{ref:A,className:r("image-with-text__media-wrapper",{"laptop:w-[60%] w-full shrink-0":i==="left"||i==="right","aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560] shrink-0":m,"laptop:basis-[63%] desktop:basis-[57%]":m&&i==="left","relative w-full shrink md:aspect-[358/360] min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] laptop:basis-[64%] desktop:aspect-[648/448]":n,"!max-w-none !max-h-none aspect-auto":i==="top"||i==="bottom"}),children:n?k?Y():e(oe,{mode:"wait",children:e(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__image-motion absolute left-0 top-0 w-full",children:e(S,{source:X(),alt:s[c].image?.alt,className:"image-with-text__image rounded-box min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] desktop:aspect-[648/448] md:aspect-[358/360]"})},s[c].image?.url)}):k?Y():e(S,{source:X(),className:r("image-with-text__image rounded-box laptop:rounded-box")})})]})});le.displayName="ImageWithText";var $e=Te(le);export{$e as default};
1
+ "use client";import{jsx as e,jsxs as m}from"react/jsx-runtime";import Pe,{useImperativeHandle as Ce,useRef as b,useState as w,useEffect as oe}from"react";import{Heading as T,Picture as z,Text as I,Link as le}from"../../components/index.js";import{cn as r,getLocalizedPath as Ve}from"../../helpers/utils.js";import{withLayout as Ee}from"../../shared/Styles.js";import{resolveMediaGridSpec as ze,mediaGridSpecToCssVars as De}from"../../shared/mediaGridSpec.js";import{useContainerGrid as Re}from"../../shared/ContainerGridContext.js";import{useExposure as He}from"../../hooks/useExposure.js";import{useIntersectionObserverDelay as je}from"../../hooks/useIntersectionObserver.js";import{useAiuiContext as Ae}from"../AiuiProvider/index.js";import{useTracking as We}from"../../hooks/useTracking.js";import{trackUrlRef as $e}from"../../shared/trackUrlRef.js";import{buildClickTrackingProps as Be}from"../../shared/track.js";import{motion as se,AnimatePresence as re}from"framer-motion";const D="image",R="image_with_text",qe={1:"grid-cols-1",2:"grid-cols-2"},Oe={1:"tablet:grid-cols-1",2:"tablet:grid-cols-2",3:"tablet:grid-cols-3",4:"tablet:grid-cols-4"},Fe={1:"laptop:grid-cols-1",2:"laptop:grid-cols-2"},ne=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e("path",{d:"M6.91009 4.41058C7.23553 4.08514 7.76304 4.08514 8.08848 4.41058L13.0885 9.41058C13.4139 9.73602 13.4139 10.2635 13.0885 10.589L8.08848 15.589C7.76304 15.9144 7.23553 15.9144 6.91009 15.589C6.58466 15.2635 6.58466 14.736 6.91009 14.4106L11.3209 9.99977L6.91009 5.58897C6.58466 5.26353 6.58466 4.73602 6.91009 4.41058Z",fill:"currentColor"})}),me=Pe.forwardRef(({data:de,className:ce},pe)=>{const{title:h,subtitle:_,desc:f,descIcon:V,image:k,padImage:H,mobileImage:j,theme:xe="dark",items:y=[],layout:ue="left",mediaType:he="image",datalist:n=[],video:A,padVideo:W,mobVideo:$,button:u,textAlign:o="left",titleTag:fe,caption:S}=de,i=ue,{locale:ge="us"}=Ae(),{buildRef:ve}=We(),E=b(null),L=b(null),M=b(null),P=b(null),B=b(null),[d,be]=w(0),q=b([]),[O,we]=w({left:0,width:0}),[g,F]=w(""),[G,U]=w(""),[Z,J]=w(""),l=n.length>0,N=he==="video",K=Re(),Q=i==="bottom"?"bottom":"left-right",v=!l&&K?ze(K.gridColumns,Q):void 0,_e=v?{...De(v),"--mw-l":`${v.laptop.w}px`,"--mw-d":`${v.desktop.w}px`,"--mw-x":`${v.lgDesktop.w}px`}:void 0,ke=qe[Math.min(y.length,2)],ye=Oe[Math.min(y.length,4)],Ne=Fe[Math.min(y.length,2)];He(E,{componentType:D,componentName:R,componentTitle:h,componentDescription:_}),Ce(pe,()=>E.current),oe(()=>{if(n.length>0){const t=q.current[d];if(t){const{offsetLeft:s,offsetWidth:a}=t;we({left:s,width:a})}}},[d,n.length]);const[X,Te]=w(!1);je(B,{once:!0,threshold:.01,callback:()=>{Te(!0)}}),oe(()=>{if(!X||!N)return;let t="",s="",a="";if(l&&n[d]){const p=n[d];t=p.video?.url||"",s=p.padVideo?.url||t,a=p.mobVideo?.url||t}else t=A?.url||"",s=W?.url||t,a=$?.url||t;t&&F(t),s&&U(s),a&&J(a),setTimeout(()=>{[L.current?.querySelector("video"),M.current?.querySelector("video"),P.current?.querySelector("video")].forEach(x=>{x&&(x.load(),x.play().catch(()=>{}))})},200)},[X,N,l,d,n,A?.url,W?.url,$?.url]);const Ie=(t,s)=>{if(be(t),s.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),N&&l&&n[t]){const a=n[t];a.video?.url&&F(a.video.url),a.padVideo?.url&&U(a.padVideo.url),a.mobVideo?.url&&J(a.mobVideo.url),setTimeout(()=>{[L.current?.querySelector("video"),M.current?.querySelector("video"),P.current?.querySelector("video")].forEach(x=>{x&&(x.load(),x.play().catch(()=>{}))})},300)}},Y=Ve(u?.link||"",ge),ee=u?.link?$e(Y,ve(D,R)):Y,te=Be({interactive:!!u?.link,componentType:D,componentName:R,title:h,description:_,buttonName:u?.text}),Se=()=>!C||!u?.text||i==="bottom"?null:e("div",{className:r("image-with-text__button-wrapper mt-[24px]",{"flex justify-center":o==="center","flex justify-start":o==="left"}),children:e(le,{href:ee,...te,className:"image-with-text__button lg-desktop:text-[16px] whitespace-nowrap text-[14px] no-underline",suffixIcon:ne,children:u.text})}),c=y.length>0,C=!!u,ie=()=>{if(l&&n[d]){const t=n[d];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return k?`${k?.url},${H?.url||k?.url} 1024, ${j?.url||k?.url} 768`:""},ae=()=>{if(l){const p=n[d],x=p.image?.url,Le=p.imgPad?.url||x,Me=p.imageMob?.url||x;return e(re,{mode:"wait",children:e(se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__video-motion absolute left-0 top-0 w-full",children:m("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[e("div",{ref:L,className:"image-with-text__desktop-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:x,src:g,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),e("div",{ref:M,className:"image-with-text__tablet-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:Le,src:G||g,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),e("div",{ref:P,className:"image-with-text__mobile-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:Me,src:Z||g,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},p.video?.url||p.image?.url)})}const t=k?.url,s=H?.url||t,a=j?.url||t;return m("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[e("div",{ref:L,className:"image-with-text__desktop-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:g,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),e("div",{ref:M,className:"image-with-text__tablet-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:s,src:G||g,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),e("div",{ref:P,className:"image-with-text__mobile-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:a,src:Z||g,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return m("section",{ref:E,"data-ui-component-id":"ImageWithText",className:r("image-with-text text-info-primary",{flex:!l,"gap-[24px]":!l&&i==="bottom","gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!l&&i!=="bottom","flex-col":!l&&i==="bottom","items-center":i==="left"||i==="right","flex-col laptop:flex-row":!l&&(i==="left"||i==="right"),"flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]":l,"aiui-dark":xe==="dark"},ce),children:[l&&(h||f||n.length>0)&&m("div",{className:r("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":o==="left","text-center":o==="center"}),children:[m("div",{className:"image-with-text__header",children:[e(T,{as:"h3",size:4,html:h,className:"image-with-text__title"}),e(I,{as:"p",size:1,html:f,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),e("div",{className:r("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":o==="center"}),children:m("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[e("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:O.left,width:O.width}}),n.map((t,s)=>e("div",{ref:a=>{q.current[s]=a},onClick:a=>Ie(s,a),className:r("image-with-text__tab rounded-btn min-xxl:px-[28px] min-xxl:py-[15px] relative z-10 cursor-pointer px-[20px] py-[10px] text-center text-[12px] font-medium transition-colors duration-300 md:px-[20px] md:py-[10px]",d===s?"image-with-text__tab--active text-black":"text-white"),children:e(T,{as:fe??"h3",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},s))]})})]}),!l&&(h||_||f)&&m("div",{className:r("image-with-text__content flex w-full flex-col",{"justify-center":!C,"justify-between":C,"items-start":o==="left"&&c,"items-center":o==="center"&&c,"text-left":o==="left","text-center":o==="center","laptop:order-1":i==="left"}),children:[m("div",{className:r("image-with-text__main-content",{"flex flex-col":C}),children:[m("div",{className:r("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":i==="bottom"&&u?.text}),children:[m("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[e(T,{as:"h2",size:4,html:h,className:r("image-with-text__title",{"text-left":c&&o==="left","text-center":c&&o==="center"})}),_&&e(I,{as:"p",size:c?4:3,html:_,className:r("image-with-text__subtitle tablet:mt-[8px] lg-desktop:text-[16px] mt-[4px] text-[14px]",{"text-left":c&&o==="left","text-center":c&&o==="center"})})]}),i==="bottom"&&u?.text&&e(le,{href:ee,...te,className:"laptop:flex lg-desktop:text-[16px] hidden whitespace-nowrap text-[14px] no-underline",suffixIcon:ne,children:u.text})]}),!c&&(f||V)&&m("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[V&&e("img",{src:V,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),f&&e(T,{as:"h4",size:5,html:f,className:"image-with-text__description-text min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] text-[#3AD1FF] md:text-[40px]"})]}),c&&e("div",{className:r("image-with-text__items laptop:mt-[32px] desktop:mt-[24px] mt-[16px] grid w-full gap-6",ke,ye,{"!mt-6":i==="bottom",[Ne]:i==="left"||i==="right"}),children:y.map((t,s)=>m("div",{className:r("image-with-text__item",{"text-center":o==="center"}),children:[m("div",{className:r("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":o==="center","justify-start":o==="left"}),children:[t.icon?.url&&e(z,{source:t.icon.url,alt:t.icon?.alt,className:"image-with-text__item-icon desktop:h-[32px] lg-desktop:h-[40px] h-[24px]",imgClassName:"h-full !w-full"}),e(T,{size:4,as:"h6",className:"image-with-text__item-text bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent",children:t.text})]}),e(I,{size:4,as:"p",html:t.desc,className:"image-with-text__item-desc laptop:mt-[16px] lg-desktop:text-[16px] mt-[16px] line-clamp-2 text-[14px]"})]},s))}),S&&(i==="left"||i==="right")&&e(I,{as:"p",size:1,weight:"medium",html:S,className:r("image-with-text__caption tablet:block text-info-secondary mt-[24px] hidden",{"text-center":o==="center"})})]}),Se()]}),e("div",{ref:B,style:_e,className:r("image-with-text__media-wrapper",v?Q==="bottom"?"tablet:h-[360px] laptop:h-auto laptop:aspect-[var(--ar-l)] desktop:aspect-[var(--ar-d)] lg-desktop:aspect-[var(--ar-x)] h-[var(--mh-m)] w-full shrink-0":"tablet:h-[360px] laptop:h-auto laptop:w-[var(--mw-l)] laptop:aspect-[var(--ar-l)] desktop:w-[var(--mw-d)] desktop:aspect-[var(--ar-d)] lg-desktop:w-[var(--mw-x)] lg-desktop:aspect-[var(--ar-x)] h-[var(--mh-m)] w-full shrink-0":{"laptop:w-[60%] w-full shrink-0":i==="left"||i==="right","aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560] shrink-0":c&&i!=="bottom","laptop:basis-[63%] desktop:basis-[57%]":c&&i==="left","relative w-full shrink md:aspect-[358/360] min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] laptop:basis-[64%] desktop:aspect-[648/448]":l,"!max-w-none !max-h-none aspect-auto":i==="bottom"}),children:l?N?ae():e(re,{mode:"wait",children:e(se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__image-motion absolute left-0 top-0 w-full",children:e(z,{source:ie(),alt:n[d].image?.alt,className:"image-with-text__image rounded-box min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] desktop:aspect-[648/448] md:aspect-[358/360]"})},n[d].image?.url)}):N?ae():e(z,{source:ie(),className:r("image-with-text__image rounded-box laptop:rounded-box size-full"),imgClassName:"h-full object-cover"})}),S&&!l&&e(I,{as:"p",size:1,weight:"medium",html:S,className:r("image-with-text__caption text-info-secondary mt-[-16px] w-full",{"tablet:hidden":i==="left"||i==="right","text-center":o==="center"})})]})});me.displayName="ImageWithText";var lt=Ee(me);export{lt as default};
@@ -45,7 +45,7 @@ export interface ImageWithTextTabItem {
45
45
  title: string;
46
46
  }
47
47
  export type MediaType = 'image' | 'video';
48
- export type LayoutPosition = 'left' | 'right' | 'top' | 'bottom';
48
+ export type LayoutPosition = 'left' | 'right' | 'bottom';
49
49
  export type TextAlign = 'left' | 'center';
50
50
  /** 列数枚举类型 */
51
51
  export declare enum Cols {
@@ -68,7 +68,7 @@ export interface ImageWithTextProps {
68
68
  descIcon?: string;
69
69
  /** 主题,默认 dark */
70
70
  theme?: Theme;
71
- /** 布局位置,默认 left。支持上下左右布局(left/right/top/bottom) */
71
+ /** 布局位置,默认 left。支持左右布局(left/right)和上下布局(bottom,图下文上) */
72
72
  layout?: LayoutPosition;
73
73
  /** 媒体类型,默认 image。所有模式都支持 image 和 video */
74
74
  mediaType?: MediaType;
@@ -104,6 +104,12 @@ export interface ImageWithTextProps {
104
104
  datalist?: ImageWithTextTabItem[];
105
105
  /** 按钮配置 */
106
106
  button?: ButtonConfig;
107
+ /**
108
+ * 媒体说明文字(12px,可选,缺省不渲染)
109
+ * - bottom 布局:全断点位于图片下方,上方间距 8px
110
+ * - left/right 布局:≥768px 位于功能列表(图标组)下方(上方间距 24px),<768px 位于图片下方(上方间距 8px)
111
+ */
112
+ caption?: string;
107
113
  };
108
114
  /** 自定义类名 */
109
115
  className?: string;
@@ -7,6 +7,8 @@ export interface KspCardItem {
7
7
  title?: string;
8
8
  /** 描述 */
9
9
  desc?: string;
10
+ /** 主题(逐项独立设置,跟随该卡片物料背景色系;不影响组件顶层 theme),默认 light */
11
+ theme?: Theme;
10
12
  /** 移动端图片 */
11
13
  mobImage?: Media;
12
14
  /** 移动端视频 */
@@ -1 +1 @@
1
- "use client";import{jsx as o,jsxs as N}from"react/jsx-runtime";import{useMediaQuery as y}from"react-responsive";import{Heading as M,Picture as A,Text as _}from"../../components/index.js";import{cn as t}from"../../helpers/utils.js";import{withLayout as $}from"../../shared/Styles.js";const q=({title:h,desc:w,mobImage:p,mobVideo:u,tabletImage:k,tabletVideo:m,laptopImage:e,laptopVideo:g,desktopImage:a,desktopVideo:l,image:s,video:n,className:f,theme:z,classNames:c})=>{const T=y({query:"(max-width: 767px)"}),K=y({query:"(min-width: 768px) and (max-width: 1024px)"}),v=y({query:"(min-width: 1025px) and (max-width: 1439px)"}),I=()=>T?u||m||g||l||n:K?m||g||l||n:v?g||l||n:l||n,j=()=>T?p||k||e||a||s:K?k||e||a||s:v?e||a||s:a||s,P=I(),L=j(),D=()=>{const d=[],x=s?.url||a?.url,b=a?.url||s?.url,r=e?.url||b,i=k?.url||r,C=p?.url||i;return x&&d.push(x),b&&b!==x&&d.push(`${b} 1920`),r&&r!==b&&d.push(`${r} 1440`),i&&i!==r&&d.push(`${i} 1025`),C&&C!==i&&d.push(`${C} 768`),d.length>0?d.join(", "):void 0},O=!!P?.url,R=!!(p?.url||k?.url||e?.url||a?.url||s?.url);return N("div",{className:t("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":z==="dark"},f,c?.card),children:[O?o("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:P?.url,poster:L?.url,className:t("ksp-card-video absolute bottom-0 w-full object-cover",c?.cardVideo)}):R&&o(A,{source:D(),alt:L?.alt||"",className:t("ksp-card-image size-full",c?.cardImage),imgClassName:t("size-full object-cover object-bottom",c?.cardImageImg)}),N("div",{className:t("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",c?.cardContent),children:[o(M,{size:3,html:h,className:t("ksp-card-title tablet:block hidden w-full",c?.cardTitle)}),o(M,{size:2,html:h,className:t("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",c?.cardTitle)}),o(_,{size:2,html:w,className:t("ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",c?.cardDesc)})]})]})},H={4:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},5:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]"},6:{0:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},7:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},8:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-2 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",8:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"}},V={4:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]"},5:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},6:{0:"col-span-2 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"},7:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-2 tablet:col-span-2 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},8:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-2 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",8:"col-span-2 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"}},F=(h,w,p)=>(p===12?V:H)[w]?.[h]||"";function G({data:h,className:w,classNames:p,...u}){const{title:k,titleTag:m,items:e,theme:g="light",gridColumns:a}=h,l=a?Number(a):10,s=l===12;return N("section",{...u,"data-ui-component-id":"ksp",className:t("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":g==="dark"},w,p?.root),children:[o(M,{as:m??"h2",size:4,html:k,className:t("ksp-title laptop:text-center text-left",p?.title)}),o("div",{className:t("ksp-layout tablet:grid-cols-3 laptop:gap-4 mt-[24px] grid grid-cols-2 gap-3",s?"laptop:grid-cols-12":"laptop:grid-cols-10",p?.layout),children:e.map((n,f)=>o(q,{...n,className:F(f,e.length,l),classNames:p},f))})]})}var S=$(G);export{S as default};
1
+ "use client";import{jsx as o,jsxs as T}from"react/jsx-runtime";import{useMediaQuery as y}from"react-responsive";import{Heading as M,Picture as A,Text as _}from"../../components/index.js";import{cn as p}from"../../helpers/utils.js";import{withLayout as $}from"../../shared/Styles.js";const q=({title:k,desc:n,mobImage:t,mobVideo:m,tabletImage:h,tabletVideo:f,laptopImage:e,laptopVideo:g,desktopImage:s,desktopVideo:l,image:a,video:w,className:x,theme:z,classNames:c})=>{const N=y({query:"(max-width: 767px)"}),K=y({query:"(min-width: 768px) and (max-width: 1024px)"}),v=y({query:"(min-width: 1025px) and (max-width: 1439px)"}),I=()=>N?m||f||g||l||w:K?f||g||l||w:v?g||l||w:l||w,j=()=>N?t||h||e||s||a:K?h||e||s||a:v?e||s||a:s||a,P=I(),L=j(),D=()=>{const d=[],b=a?.url||s?.url,r=s?.url||a?.url,i=e?.url||r,u=h?.url||i,C=t?.url||u;return b&&d.push(b),r&&r!==b&&d.push(`${r} 1920`),i&&i!==r&&d.push(`${i} 1440`),u&&u!==i&&d.push(`${u} 1025`),C&&C!==u&&d.push(`${C} 768`),d.length>0?d.join(", "):void 0},O=!!P?.url,R=!!(t?.url||h?.url||e?.url||s?.url||a?.url);return T("div",{className:p("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":z==="dark"},x,c?.card),children:[O?o("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:P?.url,poster:L?.url,className:p("ksp-card-video absolute bottom-0 w-full object-cover",c?.cardVideo)}):R&&o(A,{source:D(),alt:L?.alt||"",className:p("ksp-card-image size-full",c?.cardImage),imgClassName:p("size-full object-cover object-bottom",c?.cardImageImg)}),T("div",{className:p("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",c?.cardContent),children:[o(M,{size:3,html:k,className:p("ksp-card-title tablet:block hidden w-full",c?.cardTitle)}),o(M,{size:2,html:k,className:p("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",c?.cardTitle)}),o(_,{size:2,html:n,className:p("ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",c?.cardDesc)})]})]})},H={4:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},5:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]"},6:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},7:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},8:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",8:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"}},V={4:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]"},5:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},6:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"},7:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-5 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-7 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-4 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-4 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},8:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",8:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"}},F=(k,n,t)=>(t===12?V:H)[n]?.[k]||"";function G({data:k,className:n,classNames:t,...m}){const{title:h,titleTag:f,items:e,theme:g="light",gridColumns:s}=k,l=s?Number(s):10,a=l===12;return T("section",{...m,"data-ui-component-id":"ksp",className:p("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":g==="dark"},n,t?.root),children:[o(M,{as:f??"h2",size:4,html:h,className:p("ksp-title laptop:text-center text-left",t?.title)}),o("div",{className:p("ksp-layout tablet:grid-cols-2 laptop:gap-4 mt-[24px] grid grid-cols-1 gap-3",a?"laptop:grid-cols-12":"laptop:grid-cols-10",t?.layout),children:e.map((w,x)=>o(q,{...w,className:F(x,e.length,l),classNames:t},x))})]})}var S=$(G);export{S as default};
@@ -2,7 +2,7 @@ import React, { type Dispatch, type SetStateAction, type PropsWithChildren } fro
2
2
  import type { Product, ProductPrice, ProductVariant, VariantCoupon, Options, FreeGift } from './types/product';
3
3
  import type { BundleOption, ProductBundleProps } from './components/ProductCard/ProductDetail/ProductBundle/types.js';
4
4
  import type { ProductFunctionFreeGiftProps } from './components/ProductCard/ProductDetail/ProductFunctionFreeGift';
5
- import type { CompareData, DiscountData } from './types.js';
5
+ import type { CompareData, DiscountData, ListingFormattedPrices } from './types.js';
6
6
  type Country = {
7
7
  id?: number;
8
8
  name?: string;
@@ -76,6 +76,8 @@ export type JoinedRecommendBuyProducts = {
76
76
  };
77
77
  export type CreditsRedemption = {
78
78
  amount: number;
79
+ /** 宿主已格式化的积分抵现金额(含货币符号)。未传入时回退到内置 formatPrice */
80
+ formattedAmount?: string;
79
81
  availablePoints: number;
80
82
  usedPoints: number;
81
83
  skuDetails?: {
@@ -102,6 +104,10 @@ export interface ProductContextType {
102
104
  finalPrice: number;
103
105
  comparePrice: number;
104
106
  totalSavings: number;
107
+ /**
108
+ * 宿主已格式化好的价格字符串。字段缺失时对应位置回退到内置 formatPrice(已废弃,将在下个大版本移除)。
109
+ */
110
+ formattedPrices?: ListingFormattedPrices;
105
111
  selectedOptions: Options;
106
112
  setSelectedOptions: Dispatch<SetStateAction<Options>>;
107
113
  freeGift?: FreeGift;
@@ -139,5 +145,5 @@ export interface ProductContextType {
139
145
  }
140
146
  export declare const BizProductContext: React.Context<ProductContextType>;
141
147
  export declare const useBizProductContext: () => ProductContextType;
142
- declare const ProductProvider: ({ product, isLogin, profile, isMobile, isDesktop, children, renderRating, freeGift, bundle, checkedBundle, checkedGift, setCheckedBundle, setCheckedGift, functionFreeGift, checkedFunctionGifts, setCheckedFunctionGifts, variant, selectedOptions, setSelectedOptions, compareData, coupon, finalPrice, comparePrice, totalSavings, savingDetail, setSavingDetail, selectedVariants, onAddToCart, onBuyNow, creditsRedemption, memberFunctionResult, openModal, openSignInPopup, openAuthCodePopup, openSignUpPopup, renderInstallments, onUseCouponChange, onUseMemberDiscountChange, discount, buyNowLoading, addToCartLoading, notifyMeMode, onNotifyMeClick, }: PropsWithChildren<Omit<ProductContextType, "joinedRecommendBuyProducts" | "setJoinedRecommendBuyProducts" | "addOrder" | "setAddOrder" | "resolvedPayload">>) => import("react/jsx-runtime").JSX.Element;
148
+ declare const ProductProvider: ({ product, isLogin, profile, isMobile, isDesktop, children, renderRating, freeGift, bundle, checkedBundle, checkedGift, setCheckedBundle, setCheckedGift, functionFreeGift, checkedFunctionGifts, setCheckedFunctionGifts, variant, selectedOptions, setSelectedOptions, compareData, coupon, finalPrice, comparePrice, totalSavings, formattedPrices, savingDetail, setSavingDetail, selectedVariants, onAddToCart, onBuyNow, creditsRedemption, memberFunctionResult, openModal, openSignInPopup, openAuthCodePopup, openSignUpPopup, renderInstallments, onUseCouponChange, onUseMemberDiscountChange, discount, buyNowLoading, addToCartLoading, notifyMeMode, onNotifyMeClick, }: PropsWithChildren<Omit<ProductContextType, "joinedRecommendBuyProducts" | "setJoinedRecommendBuyProducts" | "addOrder" | "setAddOrder" | "resolvedPayload">>) => import("react/jsx-runtime").JSX.Element;
143
149
  export default ProductProvider;