@anker-in/headless-ui 1.3.87 → 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.
- package/CONTRIBUTING.md +57 -0
- package/dist/cjs/biz-components/ActiveShelf/ProductCard.d.ts +4 -1
- package/dist/cjs/biz-components/ActiveShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/ActiveShelf/index.d.ts +2 -2
- package/dist/cjs/biz-components/ActiveShelf/index.js +1 -1
- package/dist/cjs/biz-components/ActiveShelf/types.d.ts +12 -1
- package/dist/cjs/biz-components/ActiveShelf/types.js +1 -1
- package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.d.ts +28 -0
- package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +2 -0
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/types.d.ts +2 -0
- package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
- package/dist/cjs/biz-components/Chat/button.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/types.d.ts +12 -6
- package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/cjs/biz-components/ImageWithText/types.d.ts +8 -2
- package/dist/cjs/biz-components/ImageWithText/types.js +1 -1
- package/dist/cjs/biz-components/Ksp/index.d.ts +2 -0
- package/dist/cjs/biz-components/Ksp/index.js +1 -1
- package/dist/cjs/biz-components/MarqueeReview/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
- package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/cjs/biz-components/ProductCompare/index.js +1 -1
- package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/cjs/biz-components/ProductHero/types.d.ts +2 -0
- package/dist/cjs/biz-components/ProductHero/types.js +1 -1
- package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
- package/dist/cjs/biz-components/ProductNav/types.d.ts +5 -2
- package/dist/cjs/biz-components/ProductNav/types.js +1 -1
- package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +5 -4
- package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/cjs/biz-components/Specs/dropdown.js +1 -2
- package/dist/cjs/biz-components/Specs/index.js +1 -1
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/cjs/biz-components/index.d.ts +1 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/hooks/useBoaButton.d.ts +27 -0
- package/dist/cjs/hooks/useBoaButton.js +1 -0
- package/dist/cjs/hooks/useDraggableScroll.js +1 -1
- package/dist/cjs/hooks/useExposure.d.ts +1 -1
- package/dist/cjs/hooks/useExposure.js +1 -1
- package/dist/cjs/hooks/useViewItemList.d.ts +1 -1
- package/dist/cjs/index.d.ts +10 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/shared/ContainerGridContext.d.ts +20 -0
- package/dist/cjs/shared/ContainerGridContext.js +1 -0
- package/dist/cjs/shared/Styles.d.ts +2 -0
- package/dist/cjs/shared/Styles.js +1 -1
- package/dist/cjs/shared/adTrack.d.ts +38 -0
- package/dist/cjs/shared/adTrack.js +1 -0
- package/dist/cjs/shared/amazonAttribution.d.ts +31 -0
- package/dist/cjs/shared/amazonAttribution.js +1 -0
- package/dist/cjs/shared/mediaGridSpec.d.ts +87 -0
- package/dist/cjs/shared/mediaGridSpec.js +1 -0
- package/dist/cjs/stories/BoaStoryProvider.d.ts +10 -0
- package/dist/cjs/stories/BoaStoryProvider.js +1 -0
- package/dist/esm/biz-components/ActiveShelf/ProductCard.d.ts +4 -1
- package/dist/esm/biz-components/ActiveShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/ActiveShelf/index.d.ts +2 -2
- package/dist/esm/biz-components/ActiveShelf/index.js +1 -1
- package/dist/esm/biz-components/ActiveShelf/types.d.ts +12 -1
- package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +28 -0
- package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +2 -0
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/esm/biz-components/BrandEquity/types.d.ts +2 -0
- package/dist/esm/biz-components/Chat/button.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
- package/dist/esm/biz-components/HeroBanner/types.d.ts +12 -6
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/esm/biz-components/ImageWithText/types.d.ts +8 -2
- package/dist/esm/biz-components/Ksp/index.d.ts +2 -0
- package/dist/esm/biz-components/Ksp/index.js +1 -1
- package/dist/esm/biz-components/MarqueeReview/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
- package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/esm/biz-components/ProductCompare/index.js +1 -1
- package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/esm/biz-components/ProductHero/types.d.ts +2 -0
- package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
- package/dist/esm/biz-components/ProductNav/types.d.ts +5 -2
- package/dist/esm/biz-components/SecondaryBanner/index.d.ts +5 -4
- package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/esm/biz-components/Specs/dropdown.js +1 -2
- package/dist/esm/biz-components/Specs/index.js +1 -1
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/esm/biz-components/index.d.ts +1 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/hooks/useBoaButton.d.ts +27 -0
- package/dist/esm/hooks/useBoaButton.js +1 -0
- package/dist/esm/hooks/useDraggableScroll.js +1 -1
- package/dist/esm/hooks/useExposure.d.ts +1 -1
- package/dist/esm/hooks/useExposure.js +1 -1
- package/dist/esm/hooks/useViewItemList.d.ts +1 -1
- package/dist/esm/index.d.ts +10 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/shared/ContainerGridContext.d.ts +20 -0
- package/dist/esm/shared/ContainerGridContext.js +1 -0
- package/dist/esm/shared/Styles.d.ts +2 -0
- package/dist/esm/shared/Styles.js +1 -1
- package/dist/esm/shared/adTrack.d.ts +38 -0
- package/dist/esm/shared/adTrack.js +1 -0
- package/dist/esm/shared/amazonAttribution.d.ts +31 -0
- package/dist/esm/shared/amazonAttribution.js +1 -0
- package/dist/esm/shared/mediaGridSpec.d.ts +87 -0
- package/dist/esm/shared/mediaGridSpec.js +1 -0
- package/dist/esm/stories/BoaStoryProvider.d.ts +10 -0
- package/dist/esm/stories/BoaStoryProvider.js +1 -0
- package/dist/tokens/base.css +22 -1
- package/package.json +5 -2
- package/style.css +250 -136
- package/tailwind.config.js +5 -0
|
@@ -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 strict";var n=Object.defineProperty;var
|
|
1
|
+
"use strict";var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var l=(t,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s(e))!d.call(t,i)&&i!==a&&n(t,i,{get:()=>e[i],enumerable:!(o=r(e,i))||o.enumerable});return t};var u=t=>l(n({},"__esModule",{value:!0}),t);var m={};module.exports=u(m);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";"use client";var Ne=Object.create;var S=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var Ie=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var Ve=(n,c)=>{for(var v in c)S(n,v,{get:c[v],enumerable:!0})},te=(n,c,v,w)=>{if(c&&typeof c=="object"||typeof c=="function")for(let u of Ie(c))!Pe.call(n,u)&&u!==v&&S(n,u,{get:()=>c[u],enumerable:!(w=Te(c,u))||w.enumerable});return n};var Se=(n,c,v)=>(v=n!=null?Ne(Le(n)):{},te(c||!n||!n.__esModule?S(v,"default",{value:n,enumerable:!0}):v,n)),Me=n=>te(S({},"__esModule",{value:!0}),n);var ze={};Ve(ze,{default:()=>De});module.exports=Me(ze);var e=require("react/jsx-runtime"),o=Se(require("react")),r=require("../../components/index.js"),l=require("../../helpers/utils.js"),ae=require("../../shared/Styles.js"),le=require("../../hooks/useExposure.js"),se=require("../../hooks/useIntersectionObserver.js"),re=require("../AiuiProvider/index.js"),ne=require("../../hooks/useTracking.js"),me=require("../../shared/trackUrlRef.js"),de=require("../../shared/track.js"),y=require("framer-motion");const z="image",H="image_with_text",ie=(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,e.jsx)("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"})}),oe=o.default.forwardRef(({data:n,className:c},v)=>{const{title:w,subtitle:u,desc:_,descIcon:M,image:N,padImage:E,mobileImage:R,theme:ce="dark",items:j=[],layout:pe="left",mediaType:xe="image",datalist:d=[],video:C,padVideo:W,mobVideo:A,button:b,textAlign:m="left",titleTag:ue}=n,i=pe,{locale:fe="us"}=(0,re.useAiuiContext)(),{buildRef:ge}=(0,ne.useTracking)(),D=(0,o.useRef)(null),I=(0,o.useRef)(null),L=(0,o.useRef)(null),P=(0,o.useRef)(null),q=(0,o.useRef)(null),[f,he]=(0,o.useState)(0),B=(0,o.useRef)([]),[$,ve]=(0,o.useState)({left:0,width:0}),[k,F]=(0,o.useState)(""),[O,U]=(0,o.useState)(""),[Z,G]=(0,o.useState)(""),p=d.length>0,T=xe==="video";(0,le.useExposure)(D,{componentType:z,componentName:H,componentTitle:w,componentDescription:u}),(0,o.useImperativeHandle)(v,()=>D.current),(0,o.useEffect)(()=>{if(d.length>0){const t=B.current[f];if(t){const{offsetLeft:s,offsetWidth:a}=t;ve({left:s,width:a})}}},[f,d.length]);const[J,be]=(0,o.useState)(!1);(0,se.useIntersectionObserverDelay)(q,{once:!0,threshold:.01,callback:()=>{be(!0)}}),(0,o.useEffect)(()=>{if(!J||!T)return;let t="",s="",a="";if(p&&d[f]){const g=d[f];t=g.video?.url||"",s=g.padVideo?.url||t,a=g.mobVideo?.url||t}else t=C?.url||"",s=W?.url||t,a=A?.url||t;t&&F(t),s&&U(s),a&&G(a),setTimeout(()=>{[I.current?.querySelector("video"),L.current?.querySelector("video"),P.current?.querySelector("video")].forEach(h=>{h&&(h.load(),h.play().catch(()=>{}))})},200)},[J,T,p,f,d,C?.url,W?.url,A?.url]);const we=(t,s)=>{if(he(t),s.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),T&&p&&d[t]){const a=d[t];a.video?.url&&F(a.video.url),a.padVideo?.url&&U(a.padVideo.url),a.mobVideo?.url&&G(a.mobVideo.url),setTimeout(()=>{[I.current?.querySelector("video"),L.current?.querySelector("video"),P.current?.querySelector("video")].forEach(h=>{h&&(h.load(),h.play().catch(()=>{}))})},300)}},K=(0,l.getLocalizedPath)(b?.link||"",fe),Q=b?.link?(0,me.trackUrlRef)(K,ge(z,H)):K,X=(0,de.buildClickTrackingProps)({interactive:!!b?.link,componentType:z,componentName:H,title:w,description:u,buttonName:b?.text}),_e=()=>!V||!b?.text||i==="top"||i==="bottom"?null:(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__button-wrapper laptop:mt-[32px] mt-[24px]",{"flex justify-center":m==="center","flex justify-start":m==="left"}),children:(0,e.jsx)(r.Link,{href:Q,...X,className:"image-with-text__button whitespace-nowrap no-underline",suffixIcon:ie,children:b.text})}),x=j.length>0,V=!!b,Y=()=>{if(p&&d[f]){const t=d[f];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return N?`${N?.url},${E?.url||N?.url} 1024, ${R?.url||N?.url} 768`:""},ee=()=>{if(p){const g=d[f],h=g.image?.url,ke=g.imgPad?.url||h,ye=g.imageMob?.url||h;return(0,e.jsx)(y.AnimatePresence,{mode:"wait",children:(0,e.jsx)(y.motion.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:(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:I,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:h,src:k,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:L,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:ke,src:O||k,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:ye,src:Z||k,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},g.video?.url||g.image?.url)})}const t=N?.url,s=E?.url||t,a=R?.url||t;return(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:I,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:k,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:L,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:s,src:O||k,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:a,src:Z||k,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return(0,e.jsxs)("section",{ref:D,"data-ui-component-id":"ImageWithText",className:(0,l.cn)("image-with-text text-info-primary",{"flex gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!p,"flex-col":!p&&(i==="top"||i==="bottom"),"items-center":i==="left"||i==="right","flex-col laptop:flex-row":!p&&(i==="left"||i==="right"),"flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]":p,"aiui-dark":ce==="dark"},c),children:[p&&(w||_||d.length>0)&&(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":m==="left","text-center":m==="center"}),children:[(0,e.jsxs)("div",{className:"image-with-text__header",children:[(0,e.jsx)(r.Heading,{as:"h3",size:4,html:w,className:"image-with-text__title"}),(0,e.jsx)(r.Text,{as:"p",size:1,html:_,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":m==="center"}),children:(0,e.jsxs)("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[(0,e.jsx)("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:$.left,width:$.width}}),d.map((t,s)=>(0,e.jsx)("div",{ref:a=>{B.current[s]=a},onClick:a=>we(s,a),className:(0,l.cn)("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]",f===s?"image-with-text__tab--active text-black":"text-white"),children:(0,e.jsx)(r.Heading,{as:ue??"h3",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},s))]})})]}),!p&&(w||u||_)&&(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__content flex w-full flex-col",{"justify-center":!V,"justify-between":V,"items-start":m==="left"&&x,"items-center":m==="center"&&x,"text-left":m==="left","text-center":m==="center","laptop:order-1":i==="left"}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__main-content",{"flex flex-col":V}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":(i==="top"||i==="bottom")&&b?.text}),children:[(0,e.jsxs)("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[(0,e.jsx)(r.Heading,{as:"h2",size:4,html:w,className:(0,l.cn)("image-with-text__title",{"text-left":x&&m==="left","text-center":x&&m==="center"})}),u&&(0,e.jsx)(r.Text,{as:"p",size:x?4:3,html:u,className:(0,l.cn)("image-with-text__subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",{"laptop:mt-[16px]":!x,"min-xxl:mt-[8px] laptop:text-[16px] lg-desktop:text-[18px]":x,"text-left":x&&m==="left","text-center":x&&m==="center"})})]}),(i==="top"||i==="bottom")&&b?.text&&(0,e.jsx)(r.Link,{href:Q,...X,className:"laptop:flex hidden whitespace-nowrap no-underline",suffixIcon:ie,children:b.text})]}),!x&&(_||M)&&(0,e.jsxs)("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[M&&(0,e.jsx)("img",{src:M,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),_&&(0,e.jsx)(r.Heading,{as:"h4",size:5,html:_,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]"})]}),x&&(0,e.jsx)("div",{className:(0,l.cn)("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:j.map((t,s)=>(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__item",{"text-center":m==="center"}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":m==="center","justify-start":m==="left"}),children:[t.icon?.url&&(0,e.jsx)(r.Picture,{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"}),(0,e.jsx)(r.Heading,{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})]}),(0,e.jsx)(r.Text,{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]"})]},s))})]}),_e()]}),(0,e.jsx)("div",{ref:q,className:(0,l.cn)("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":x,"laptop:basis-[63%] desktop:basis-[57%]":x&&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]":p,"!max-w-none !max-h-none aspect-auto":i==="top"||i==="bottom"}),children:p?T?ee():(0,e.jsx)(y.AnimatePresence,{mode:"wait",children:(0,e.jsx)(y.motion.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:(0,e.jsx)(r.Picture,{source:Y(),alt:d[f].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]"})},d[f].image?.url)}):T?ee():(0,e.jsx)(r.Picture,{source:Y(),className:(0,l.cn)("image-with-text__image rounded-box laptop:rounded-box")})})]})});oe.displayName="ImageWithText";var De=(0,ae.withLayout)(oe);
|
|
1
|
+
"use strict";"use client";var ze=Object.create;var E=Object.defineProperty;var De=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty;var Ae=(d,p)=>{for(var v in p)E(d,v,{get:p[v],enumerable:!0})},se=(d,p,v,w)=>{if(p&&typeof p=="object"||typeof p=="function")for(let x of Re(p))!je.call(d,x)&&x!==v&&E(d,x,{get:()=>p[x],enumerable:!(w=De(p,x))||w.enumerable});return d};var We=(d,p,v)=>(v=d!=null?ze(He(d)):{},se(p||!d||!d.__esModule?E(v,"default",{value:d,enumerable:!0}):v,d)),$e=d=>se(E({},"__esModule",{value:!0}),d);var Ge={};Ae(Ge,{default:()=>Fe});module.exports=$e(Ge);var e=require("react/jsx-runtime"),a=We(require("react")),s=require("../../components/index.js"),o=require("../../helpers/utils.js"),me=require("../../shared/Styles.js"),z=require("../../shared/mediaGridSpec.js"),de=require("../../shared/ContainerGridContext.js"),ce=require("../../hooks/useExposure.js"),pe=require("../../hooks/useIntersectionObserver.js"),xe=require("../AiuiProvider/index.js"),ue=require("../../hooks/useTracking.js"),he=require("../../shared/trackUrlRef.js"),fe=require("../../shared/track.js"),N=require("framer-motion");const H="image",j="image_with_text",Be={1:"grid-cols-1",2:"grid-cols-2"},qe={1:"tablet:grid-cols-1",2:"tablet:grid-cols-2",3:"tablet:grid-cols-3",4:"tablet:grid-cols-4"},Oe={1:"laptop:grid-cols-1",2:"laptop:grid-cols-2"},re=(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,e.jsx)("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"})}),ne=a.default.forwardRef(({data:d,className:p},v)=>{const{title:w,subtitle:x,desc:_,descIcon:D,image:T,padImage:A,mobileImage:W,theme:ge="dark",items:I=[],layout:ve="left",mediaType:be="image",datalist:c=[],video:$,padVideo:B,mobVideo:q,button:b,textAlign:r="left",titleTag:we,caption:L}=d,i=ve,{locale:_e="us"}=(0,xe.useAiuiContext)(),{buildRef:ke}=(0,ue.useTracking)(),R=(0,a.useRef)(null),M=(0,a.useRef)(null),P=(0,a.useRef)(null),C=(0,a.useRef)(null),O=(0,a.useRef)(null),[u,ye]=(0,a.useState)(0),F=(0,a.useRef)([]),[G,Ne]=(0,a.useState)({left:0,width:0}),[k,U]=(0,a.useState)(""),[Z,J]=(0,a.useState)(""),[K,Q]=(0,a.useState)(""),n=c.length>0,S=be==="video",X=(0,de.useContainerGrid)(),Y=i==="bottom"?"bottom":"left-right",y=!n&&X?(0,z.resolveMediaGridSpec)(X.gridColumns,Y):void 0,Te=y?{...(0,z.mediaGridSpecToCssVars)(y),"--mw-l":`${y.laptop.w}px`,"--mw-d":`${y.desktop.w}px`,"--mw-x":`${y.lgDesktop.w}px`}:void 0,Ie=Be[Math.min(I.length,2)],Se=qe[Math.min(I.length,4)],Le=Oe[Math.min(I.length,2)];(0,ce.useExposure)(R,{componentType:H,componentName:j,componentTitle:w,componentDescription:x}),(0,a.useImperativeHandle)(v,()=>R.current),(0,a.useEffect)(()=>{if(c.length>0){const t=F.current[u];if(t){const{offsetLeft:m,offsetWidth:l}=t;Ne({left:m,width:l})}}},[u,c.length]);const[ee,Me]=(0,a.useState)(!1);(0,pe.useIntersectionObserverDelay)(O,{once:!0,threshold:.01,callback:()=>{Me(!0)}}),(0,a.useEffect)(()=>{if(!ee||!S)return;let t="",m="",l="";if(n&&c[u]){const f=c[u];t=f.video?.url||"",m=f.padVideo?.url||t,l=f.mobVideo?.url||t}else t=$?.url||"",m=B?.url||t,l=q?.url||t;t&&U(t),m&&J(m),l&&Q(l),setTimeout(()=>{[M.current?.querySelector("video"),P.current?.querySelector("video"),C.current?.querySelector("video")].forEach(g=>{g&&(g.load(),g.play().catch(()=>{}))})},200)},[ee,S,n,u,c,$?.url,B?.url,q?.url]);const Pe=(t,m)=>{if(ye(t),m.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),S&&n&&c[t]){const l=c[t];l.video?.url&&U(l.video.url),l.padVideo?.url&&J(l.padVideo.url),l.mobVideo?.url&&Q(l.mobVideo.url),setTimeout(()=>{[M.current?.querySelector("video"),P.current?.querySelector("video"),C.current?.querySelector("video")].forEach(g=>{g&&(g.load(),g.play().catch(()=>{}))})},300)}},te=(0,o.getLocalizedPath)(b?.link||"",_e),ie=b?.link?(0,he.trackUrlRef)(te,ke(H,j)):te,ae=(0,fe.buildClickTrackingProps)({interactive:!!b?.link,componentType:H,componentName:j,title:w,description:x,buttonName:b?.text}),Ce=()=>!V||!b?.text||i==="bottom"?null:(0,e.jsx)("div",{className:(0,o.cn)("image-with-text__button-wrapper mt-[24px]",{"flex justify-center":r==="center","flex justify-start":r==="left"}),children:(0,e.jsx)(s.Link,{href:ie,...ae,className:"image-with-text__button lg-desktop:text-[16px] whitespace-nowrap text-[14px] no-underline",suffixIcon:re,children:b.text})}),h=I.length>0,V=!!b,oe=()=>{if(n&&c[u]){const t=c[u];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return T?`${T?.url},${A?.url||T?.url} 1024, ${W?.url||T?.url} 768`:""},le=()=>{if(n){const f=c[u],g=f.image?.url,Ve=f.imgPad?.url||g,Ee=f.imageMob?.url||g;return(0,e.jsx)(N.AnimatePresence,{mode:"wait",children:(0,e.jsx)(N.motion.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:(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:M,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:g,src:k,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:Ve,src:Z||k,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:C,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:Ee,src:K||k,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},f.video?.url||f.image?.url)})}const t=T?.url,m=A?.url||t,l=W?.url||t;return(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:M,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:k,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:m,src:Z||k,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:C,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:l,src:K||k,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return(0,e.jsxs)("section",{ref:R,"data-ui-component-id":"ImageWithText",className:(0,o.cn)("image-with-text text-info-primary",{flex:!n,"gap-[24px]":!n&&i==="bottom","gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!n&&i!=="bottom","flex-col":!n&&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":ge==="dark"},p),children:[n&&(w||_||c.length>0)&&(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":r==="left","text-center":r==="center"}),children:[(0,e.jsxs)("div",{className:"image-with-text__header",children:[(0,e.jsx)(s.Heading,{as:"h3",size:4,html:w,className:"image-with-text__title"}),(0,e.jsx)(s.Text,{as:"p",size:1,html:_,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),(0,e.jsx)("div",{className:(0,o.cn)("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":r==="center"}),children:(0,e.jsxs)("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[(0,e.jsx)("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:G.left,width:G.width}}),c.map((t,m)=>(0,e.jsx)("div",{ref:l=>{F.current[m]=l},onClick:l=>Pe(m,l),className:(0,o.cn)("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]",u===m?"image-with-text__tab--active text-black":"text-white"),children:(0,e.jsx)(s.Heading,{as:we??"h3",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},m))]})})]}),!n&&(w||x||_)&&(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__content flex w-full flex-col",{"justify-center":!V,"justify-between":V,"items-start":r==="left"&&h,"items-center":r==="center"&&h,"text-left":r==="left","text-center":r==="center","laptop:order-1":i==="left"}),children:[(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__main-content",{"flex flex-col":V}),children:[(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":i==="bottom"&&b?.text}),children:[(0,e.jsxs)("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[(0,e.jsx)(s.Heading,{as:"h2",size:4,html:w,className:(0,o.cn)("image-with-text__title",{"text-left":h&&r==="left","text-center":h&&r==="center"})}),x&&(0,e.jsx)(s.Text,{as:"p",size:h?4:3,html:x,className:(0,o.cn)("image-with-text__subtitle tablet:mt-[8px] lg-desktop:text-[16px] mt-[4px] text-[14px]",{"text-left":h&&r==="left","text-center":h&&r==="center"})})]}),i==="bottom"&&b?.text&&(0,e.jsx)(s.Link,{href:ie,...ae,className:"laptop:flex lg-desktop:text-[16px] hidden whitespace-nowrap text-[14px] no-underline",suffixIcon:re,children:b.text})]}),!h&&(_||D)&&(0,e.jsxs)("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[D&&(0,e.jsx)("img",{src:D,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),_&&(0,e.jsx)(s.Heading,{as:"h4",size:5,html:_,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]"})]}),h&&(0,e.jsx)("div",{className:(0,o.cn)("image-with-text__items laptop:mt-[32px] desktop:mt-[24px] mt-[16px] grid w-full gap-6",Ie,Se,{"!mt-6":i==="bottom",[Le]:i==="left"||i==="right"}),children:I.map((t,m)=>(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__item",{"text-center":r==="center"}),children:[(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":r==="center","justify-start":r==="left"}),children:[t.icon?.url&&(0,e.jsx)(s.Picture,{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"}),(0,e.jsx)(s.Heading,{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})]}),(0,e.jsx)(s.Text,{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]"})]},m))}),L&&(i==="left"||i==="right")&&(0,e.jsx)(s.Text,{as:"p",size:1,weight:"medium",html:L,className:(0,o.cn)("image-with-text__caption tablet:block text-info-secondary mt-[24px] hidden",{"text-center":r==="center"})})]}),Ce()]}),(0,e.jsx)("div",{ref:O,style:Te,className:(0,o.cn)("image-with-text__media-wrapper",y?Y==="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":h&&i!=="bottom","laptop:basis-[63%] desktop:basis-[57%]":h&&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==="bottom"}),children:n?S?le():(0,e.jsx)(N.AnimatePresence,{mode:"wait",children:(0,e.jsx)(N.motion.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:(0,e.jsx)(s.Picture,{source:oe(),alt:c[u].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]"})},c[u].image?.url)}):S?le():(0,e.jsx)(s.Picture,{source:oe(),className:(0,o.cn)("image-with-text__image rounded-box laptop:rounded-box size-full"),imgClassName:"h-full object-cover"})}),L&&!n&&(0,e.jsx)(s.Text,{as:"p",size:1,weight:"medium",html:L,className:(0,o.cn)("image-with-text__caption text-info-secondary mt-[-16px] w-full",{"tablet:hidden":i==="left"||i==="right","text-center":r==="center"})})]})});ne.displayName="ImageWithText";var Fe=(0,me.withLayout)(ne);
|
|
@@ -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' | '
|
|
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
|
|
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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(i,t)=>{for(var a in t)o(i,a,{get:t[a],enumerable:!0})},s=(i,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of g(t))!m.call(i,e)&&e!==a&&o(i,e,{get:()=>t[e],enumerable:!(r=n(t,e))||r.enumerable});return i};var x=i=>s(o({},"__esModule",{value:!0}),i);var M={};p(M,{Cols:()=>d});module.exports=x(M);var d=(e=>(e.One="1",e.Two="2",e.Three="3",e.Four="4",e))(d||{});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";"use client";var N=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var H=(a,t)=>{for(var p in t)N(a,p,{get:t[p],enumerable:!0})},V=(a,t,p,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of $(t))!q.call(a,e)&&e!==p&&N(a,e,{get:()=>t[e],enumerable:!(n=_(t,e))||n.enumerable});return a};var F=a=>V(N({},"__esModule",{value:!0}),a);var B={};H(B,{default:()=>S});module.exports=F(B);var s=require("react/jsx-runtime"),C=require("react-responsive"),k=require("../../components/index.js"),c=require("../../helpers/utils.js"),z=require("../../shared/Styles.js");const G=({title:a,desc:t,mobImage:p,mobVideo:n,tabletImage:e,tabletVideo:f,laptopImage:d,laptopVideo:r,desktopImage:o,desktopVideo:w,image:l,video:b,className:x,theme:I,classNames:h})=>{const T=(0,C.useMediaQuery)({query:"(max-width: 767px)"}),K=(0,C.useMediaQuery)({query:"(min-width: 768px) and (max-width: 1024px)"}),v=(0,C.useMediaQuery)({query:"(min-width: 1025px) and (max-width: 1439px)"}),j=()=>T?n||f||r||w||b:K?f||r||w||b:v?r||w||b:w||b,D=()=>T?p||e||d||o||l:K?e||d||o||l:v?d||o||l:o||l,P=j(),L=D(),O=()=>{const g=[],y=l?.url||o?.url,i=o?.url||l?.url,u=d?.url||i,m=e?.url||u,M=p?.url||m;return y&&g.push(y),i&&i!==y&&g.push(`${i} 1920`),u&&u!==i&&g.push(`${u} 1440`),m&&m!==u&&g.push(`${m} 1025`),M&&M!==m&&g.push(`${M} 768`),g.length>0?g.join(", "):void 0},R=!!P?.url,A=!!(p?.url||e?.url||d?.url||o?.url||l?.url);return(0,s.jsxs)("div",{className:(0,c.cn)("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":I==="dark"},x,h?.card),children:[R?(0,s.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:P?.url,poster:L?.url,className:(0,c.cn)("ksp-card-video absolute bottom-0 w-full object-cover",h?.cardVideo)}):A&&(0,s.jsx)(k.Picture,{source:O(),alt:L?.alt||"",className:(0,c.cn)("ksp-card-image size-full",h?.cardImage),imgClassName:(0,c.cn)("size-full object-cover object-bottom",h?.cardImageImg)}),(0,s.jsxs)("div",{className:(0,c.cn)("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",h?.cardContent),children:[(0,s.jsx)(k.Heading,{size:3,html:a,className:(0,c.cn)("ksp-card-title tablet:block hidden w-full",h?.cardTitle)}),(0,s.jsx)(k.Heading,{size:2,html:a,className:(0,c.cn)("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",h?.cardTitle)}),(0,s.jsx)(k.Text,{size:2,html:t,className:(0,c.cn)("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]",h?.cardDesc)})]})]})},U={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]"}},Y={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]"}},E=(a,t,p)=>(p===12?Y:U)[t]?.[a]||"";function Q({data:a,className:t,classNames:p,...n}){const{title:e,titleTag:f,items:d,theme:r="light",gridColumns:o}=a,w=o?Number(o):10,l=w===12;return(0,s.jsxs)("section",{...n,"data-ui-component-id":"ksp",className:(0,c.cn)("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":r==="dark"},t,p?.root),children:[(0,s.jsx)(k.Heading,{as:f??"h2",size:4,html:e,className:(0,c.cn)("ksp-title laptop:text-center text-left",p?.title)}),(0,s.jsx)("div",{className:(0,c.cn)("ksp-layout tablet:grid-cols-3 laptop:gap-4 mt-[24px] grid grid-cols-2 gap-3",l?"laptop:grid-cols-12":"laptop:grid-cols-10",p?.layout),children:d.map((b,x)=>(0,s.jsx)(G,{...b,className:E(x,d.length,w),classNames:p},x))})]})}var S=(0,z.withLayout)(Q);
|
|
1
|
+
"use strict";"use client";var T=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var H=(s,p)=>{for(var t in p)T(s,t,{get:p[t],enumerable:!0})},V=(s,p,t,w)=>{if(p&&typeof p=="object"||typeof p=="function")for(let e of $(p))!q.call(s,e)&&e!==t&&T(s,e,{get:()=>p[e],enumerable:!(w=_(p,e))||w.enumerable});return s};var F=s=>V(T({},"__esModule",{value:!0}),s);var B={};H(B,{default:()=>S});module.exports=F(B);var a=require("react/jsx-runtime"),C=require("react-responsive"),h=require("../../components/index.js"),c=require("../../helpers/utils.js"),z=require("../../shared/Styles.js");const G=({title:s,desc:p,mobImage:t,mobVideo:w,tabletImage:e,tabletVideo:x,laptopImage:d,laptopVideo:i,desktopImage:o,desktopVideo:n,image:l,video:r,className:b,theme:I,classNames:k})=>{const N=(0,C.useMediaQuery)({query:"(max-width: 767px)"}),K=(0,C.useMediaQuery)({query:"(min-width: 768px) and (max-width: 1024px)"}),v=(0,C.useMediaQuery)({query:"(min-width: 1025px) and (max-width: 1439px)"}),j=()=>N?w||x||i||n||r:K?x||i||n||r:v?i||n||r:n||r,D=()=>N?t||e||d||o||l:K?e||d||o||l:v?d||o||l:o||l,P=j(),L=D(),O=()=>{const g=[],y=l?.url||o?.url,u=o?.url||l?.url,m=d?.url||u,f=e?.url||m,M=t?.url||f;return y&&g.push(y),u&&u!==y&&g.push(`${u} 1920`),m&&m!==u&&g.push(`${m} 1440`),f&&f!==m&&g.push(`${f} 1025`),M&&M!==f&&g.push(`${M} 768`),g.length>0?g.join(", "):void 0},R=!!P?.url,A=!!(t?.url||e?.url||d?.url||o?.url||l?.url);return(0,a.jsxs)("div",{className:(0,c.cn)("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":I==="dark"},b,k?.card),children:[R?(0,a.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:P?.url,poster:L?.url,className:(0,c.cn)("ksp-card-video absolute bottom-0 w-full object-cover",k?.cardVideo)}):A&&(0,a.jsx)(h.Picture,{source:O(),alt:L?.alt||"",className:(0,c.cn)("ksp-card-image size-full",k?.cardImage),imgClassName:(0,c.cn)("size-full object-cover object-bottom",k?.cardImageImg)}),(0,a.jsxs)("div",{className:(0,c.cn)("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",k?.cardContent),children:[(0,a.jsx)(h.Heading,{size:3,html:s,className:(0,c.cn)("ksp-card-title tablet:block hidden w-full",k?.cardTitle)}),(0,a.jsx)(h.Heading,{size:2,html:s,className:(0,c.cn)("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",k?.cardTitle)}),(0,a.jsx)(h.Text,{size:2,html:p,className:(0,c.cn)("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]",k?.cardDesc)})]})]})},U={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]"}},Y={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]"}},E=(s,p,t)=>(t===12?Y:U)[p]?.[s]||"";function Q({data:s,className:p,classNames:t,...w}){const{title:e,titleTag:x,items:d,theme:i="light",gridColumns:o}=s,n=o?Number(o):10,l=n===12;return(0,a.jsxs)("section",{...w,"data-ui-component-id":"ksp",className:(0,c.cn)("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":i==="dark"},p,t?.root),children:[(0,a.jsx)(h.Heading,{as:x??"h2",size:4,html:e,className:(0,c.cn)("ksp-title laptop:text-center text-left",t?.title)}),(0,a.jsx)("div",{className:(0,c.cn)("ksp-layout tablet:grid-cols-2 laptop:gap-4 mt-[24px] grid grid-cols-1 gap-3",l?"laptop:grid-cols-12":"laptop:grid-cols-10",t?.layout),children:d.map((r,b)=>(0,a.jsx)(G,{...r,className:E(b,d.length,n),classNames:t},b))})]})}var S=(0,z.withLayout)(Q);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var L=(t,a)=>{for(var s in a)c(t,s,{get:a[s],enumerable:!0})},b=(t,a,s,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let p of k(a))!C.call(t,p)&&p!==s&&c(t,p,{get:()=>a[p],enumerable:!(i=u(a,p))||i.enumerable});return t};var y=t=>b(c({},"__esModule",{value:!0}),t);var z={};L(z,{default:()=>q});module.exports=y(z);var e=require("react/jsx-runtime"),F=require("react"),l=require("../../components/index.js"),m=require("../../helpers/utils.js"),h=require("../../shared/Styles.js");const x=9,N=3,M=(t,a)=>Array.from({length:Math.ceil(t.length/a)},(s,i)=>t.slice(i*a,(i+1)*a)),T=()=>(0,e.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})}),R=()=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"13",viewBox:"0 0 14 13",fill:"none",children:(0,e.jsx)("path",{d:"M6.07501 0.418036C6.35012 -0.139398 7.145 -0.139397 7.42011 0.418037L8.9242 3.46565C9.03344 3.68701 9.24462 3.84043 9.4889 3.87593L12.8521 4.36464C13.4673 4.45403 13.7129 5.21 13.2678 5.64391L10.8341 8.01614C10.6574 8.18844 10.5767 8.43669 10.6184 8.67999L11.1929 12.0296C11.298 12.6423 10.655 13.1095 10.1047 12.8203L7.09656 11.2388C6.87807 11.1239 6.61705 11.1239 6.39855 11.2388L3.39038 12.8203C2.84016 13.1095 2.19709 12.6423 2.30217 12.0296L2.87668 8.67999C2.91841 8.43669 2.83775 8.18844 2.66098 8.01614L0.227318 5.64391C-0.21782 5.21 0.0278133 4.45403 0.642979 4.36464L4.00622 3.87593C4.2505 3.84043 4.46167 3.68701 4.57092 3.46565L6.07501 0.418036Z",fill:"#75787F"})}),A=({item:t})=>(0,e.jsxs)("div",{className:"rounded-box bg-container-primary text-info-primary laptop:p-[24px] laptop:h-[192px] desktop:h-[192px] lg-desktop:h-[240px] flex h-[176px] grow flex-col justify-between p-[16px]",children:[(0,e.jsxs)("div",{className:"flex justify-between",children:[(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsx)(l.Text,{size:4,html:t.name,className:"desktop:block hidden"}),(0,e.jsx)(l.Text,{size:2,html:t.name,className:"desktop:hidden block"}),(0,e.jsxs)("div",{className:"mt-2 flex gap-1",children:[new Array(t.rating||5).fill(0).map((a,s)=>(0,e.jsx)(T,{},s)),new Array(5-(t.rating||5)).fill(0).map((a,s)=>(0,e.jsx)("span",{children:R()},s))]})]}),(0,e.jsxs)(l.Avatar,{size:"small",className:" desktop:size-[48px] size-[40px]",children:[(0,e.jsx)(l.AvatarImage,{src:t.avatar?.url,alt:t.avatar?.alt||""}),(0,e.jsx)(l.AvatarFallback,{children:(t.name??"").slice(0,2).toUpperCase()})]})]}),(0,e.jsx)("div",{children:(0,e.jsx)(l.Heading,{as:"h6",size:2,html:`${t.comment}`,className:"line-clamp-3 text-wrap"})})]});function I({data:t,className:a,...s}){const{title:i,subtitle:p,items:r=[],theme:d="light",titleTag:f}=t,v=M(r.length<x?[...r,...r.slice(x-r.length)]:r,N).slice(0,3).map(n=>[...n,...n]);return(0,e.jsxs)("section",{...s,className:(0,m.cn)("text-info-primary flex flex-col items-center justify-center py-3",a,{"aiui-dark":d==="dark"}),children:[(0,e.jsx)(l.Heading,{as:f??"h2",size:4,html:i,className:"laptop:text-center w-full text-left"}),(0,e.jsx)(l.Text,{size:2,html:p,className:"tablet:mt-[16px] tablet:text-[14px] laptop:text-center laptop:text-[14px] desktop:mt-[8px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] w-full text-left text-[14px]"}),(0,e.jsx)("div",{className:(0,m.cn)("mask-fade-vertical laptop:h-[384px] desktop:h-[512px] lg-desktop:h-[640px] mt-[24px] flex h-[480px] gap-4 overflow-hidden"),children:v.map((n,o)=>(0,e.jsx)("div",{className:(0,m.cn)("animate-marquee-scroll relative flex h-fit flex-1 flex-col gap-4",{"desktop:top-10":o===0,"top-10":o===2,"hidden desktop:flex":o===1,"hidden tablet:flex":o===2}),children:n.map((g,w)=>(0,e.jsx)(A,{item:g},w))},o))})]})}var q=(0,h.withLayout)(I);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";"use client";var ze=Object.create;var R=Object.defineProperty;var Me=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var Ee=(
|
|
1
|
+
"use strict";"use client";var ze=Object.create;var R=Object.defineProperty;var Me=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var Ee=(s,o)=>{for(var l in o)R(s,l,{get:o[l],enumerable:!0})},oe=(s,o,l,d)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of Le(o))!Ie.call(s,n)&&n!==l&&R(s,n,{get:()=>o[n],enumerable:!(d=Me(o,n))||d.enumerable});return s};var ae=(s,o,l)=>(l=s!=null?ze(Re(s)):{},oe(o||!s||!s.__esModule?R(l,"default",{value:s,enumerable:!0}):l,s)),Pe=s=>oe(R({},"__esModule",{value:!0}),s);var Be={};Ee(Be,{default:()=>$e});module.exports=Pe(Be);var e=require("react/jsx-runtime"),t=require("react"),ie=require("lodash"),r=require("../../helpers/utils.js"),ce=require("../../shared/Styles.js"),F=ae(require("../../components/button.js")),k=require("../../components/index.js"),pe=require("../VideoModal/index.js"),q=require("@payloadcms/richtext-lexical/html"),de=require("react-intersection-observer"),ue=require("../../hooks/useExposure.js"),h=ae(require("../../helpers/ScrollLoadVideo.js")),f=require("gsap"),U=require("gsap/dist/SplitText"),I=require("gsap/dist/ScrollTrigger");const _e="media_player_base",Se="video";f.gsap.registerPlugin(I.ScrollTrigger,U.SplitText);const re=({defaultConverters:s})=>({...s,text:o=>{const{node:l}=o;return l.$&&l.$.color?`<span class="lexical-${l.$.color}">${l.text}</span>`:l.text}}),ne=(0,t.forwardRef)(({className:s="",id:o,onBtnClick:l,data:{title:d,videoTitle:n,btnText:w,youtubeId:Y,video:N,mobileVideo:O,theme:E,img:H,shape:Ce,titleAnimation:T="fade-in",variant:me,headline:G,paragraphs:P,metrics:_,...fe},...S},ge)=>{const{sticky:p}=fe,[J,K]=(0,t.useState)(!1),[Q,xe]=(0,t.useState)(0),[ve,ye]=(0,t.useState)(0),[z,be]=(0,t.useState)(0),[W,$]=(0,t.useState)(!1),g=(0,t.useRef)(null),X=(0,t.useRef)(null),c=(0,t.useRef)(null),M=(0,t.useRef)(null),Z=(0,t.useRef)(null),L=(0,t.useRef)(null),v=(0,t.useRef)(null),B=(0,t.useRef)(null),C=(0,t.useRef)(null),{ref:A,inView:u}=(0,de.useInView)();(0,t.useImperativeHandle)(ge,()=>c.current);const y=typeof d=="string"?d:d&&(0,q.convertLexicalToHTML)({data:d,converters:re}),ee=typeof n=="string"?n:n&&(0,q.convertLexicalToHTML)({data:n,converters:re});(0,t.useEffect)(()=>{u?(g.current?.play(),K(!0)):(g.current?.pause(),K(!1))},[u]);const V=(0,ie.debounce)(()=>{if(c.current){const a=c.current.getBoundingClientRect(),i=window.innerHeight,b=window.scrollY||window.pageYOffset,m=a.bottom+b,x=document.documentElement.scrollHeight-m;xe(x>i?i:x)}if(c.current){const a=c.current.clientHeight,i=window.innerHeight;ye(a+i)}},600);(0,t.useEffect)(()=>(V(),window.addEventListener("resize",V),()=>{window.removeEventListener("resize",V)}),[]),(0,t.useEffect)(()=>{function a(){if(!M.current||T!=="fade-in")return;const b=M.current?.clientHeight||80;L.current=new U.SplitText(M.current,{type:"words",wordsClass:"word"});const m=L.current.words;f.gsap.set(m,{opacity:0}),v.current&&f.gsap.set(v.current,{opacity:0}),B.current=I.ScrollTrigger.create({trigger:c.current,start:"top center-=10%",end:`top+=${b*1.5+80}px center-=10%`,scrub:!0,onUpdate:te=>{const x=te.progress,se=m.length,ke=1/se,le=.5;m.forEach((we,Ne)=>{const He=Ne/se*(1-le),Te=ke*(1+le);let D=(x-He)/Te;D=Math.max(0,Math.min(D,1)),f.gsap.set(we,{opacity:D})}),f.gsap.set(X.current,{opacity:x}),v.current&&f.gsap.set(v.current,{opacity:x>=.6?1:0})}})}function i(){C.current=I.ScrollTrigger.create({trigger:c.current,start:"bottom bottom",end:"bottom top",scrub:!0,onUpdate:b=>{const m=b.progress;be(m)}})}return u&&(a(),i()),()=>{L.current&&L.current.revert(),B.current&&B.current.kill(),C.current&&C.current.kill()}},[T,u]),(0,ue.useExposure)(Z,{componentType:Se,componentName:_e,componentTitle:y});const he=(0,t.useMemo)(()=>u&&z>0&&z<.9?3:u?2:1,[z,u]);if(me==="text-layout")return(0,e.jsxs)("div",{...S,ref:c,className:(0,r.cn)("relative flex w-full items-center overflow-hidden","aspect-w-[390] aspect-h-[660] tablet:aspect-w-[768] tablet:aspect-h-[660]","laptop:aspect-w-[1024] laptop:aspect-h-[520] desktop:aspect-w-[1440] desktop:aspect-h-[700]","lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930]",{"aiui-dark":E==="dark"},s),children:[(0,e.jsx)("div",{ref:A,className:"pointer-events-none absolute inset-0"}),(0,e.jsxs)("div",{className:"absolute inset-0 z-0",children:[(0,e.jsx)(h.default,{videoRef:g,poster:H?.url||"",src:N?.url,className:"tablet:block hidden size-full",videoClassName:"size-full object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,e.jsx)(h.default,{videoRef:g,poster:H?.url||"",src:O?.url||N?.url,className:"tablet:hidden block size-full",videoClassName:"size-full object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,e.jsx)("div",{className:"absolute inset-0 bg-black/30"})]}),(0,e.jsxs)("div",{className:(0,r.cn)("relative z-10 mx-auto flex w-full max-w-[1920px] flex-col","gap-6 p-4","tablet:gap-8 tablet:px-8","laptop:grid laptop:grid-cols-[837fr_960fr] laptop:gap-12 laptop:px-16","desktop:gap-16 desktop:px-20 desktop:py-8","lg-desktop:py-12"),children:[(0,e.jsx)("div",{className:"w-full",children:G&&(0,e.jsx)(k.Heading,{as:"h2",size:4,className:"text-info-primary",children:G})}),(0,e.jsxs)("div",{className:(0,r.cn)("flex w-full flex-col justify-start","desktop:gap-8 lg-desktop:gap-12 gap-4"),children:[P&&P.length>0&&(0,e.jsx)("div",{className:"tablet:gap-4 flex flex-col gap-3",children:P.map((a,i)=>(0,e.jsx)(k.Text,{as:"p",size:2,className:"text-info-primary desktop:text-[16px] lg-desktop:text-[18px] opacity-90",children:typeof a=="string"?a:a.text},i))}),_&&_.length>0&&(0,e.jsx)("div",{className:(0,r.cn)("tablet:grid-cols-3 grid grid-cols-2","desktop:gap-8 lg-desktop:gap-12 gap-4"),children:_.map((a,i)=>(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)("span",{className:"text-info-primary desktop:text-[56px] lg-desktop:text-[64px] text-balance text-[40px] font-bold leading-[100%] tracking-[-0.04em]",children:a.value}),(0,e.jsx)(k.Text,{as:"span",size:2,className:"text-info-primary desktop:text-[16px] lg-desktop:text-[18px] opacity-80",children:a.label})]},i))})]})]})]});const j="lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]";return(0,e.jsxs)(e.Fragment,{children:[p&&(0,e.jsx)("div",{...S,ref:c,className:(0,r.cn)("pointer-events-none relative z-10",j,{"aiui-dark":E==="dark"},s),children:(0,e.jsx)("div",{ref:A,children:!T&&(0,e.jsxs)("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[y&&!J&&(0,e.jsx)("div",{className:"lg-desktop:text-[64px] text-info-primary text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:y}}),ee&&J&&(0,e.jsx)("div",{className:"lg-desktop:text-[64px] text-info-primary text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:ee}}),w&&(0,e.jsx)(F.default,{variant:"link",className:(0,r.cn)("member-equity-button-secondary text-info-primary"),onClick:()=>{$(!0),l&&l?.()},children:w})]})})}),(0,e.jsxs)("div",{...p?{}:S,style:p?{marginBottom:`-${Q}px`,marginTop:`-${ve}px`,zIndex:he}:{zIndex:5},className:(0,r.cn)("relative",s),children:[(0,e.jsx)("div",{className:"sticky top-0 ",children:(0,e.jsxs)("div",{id:o,className:(0,r.cn)("relative overflow-hidden",p?"h-screen w-full":j,{"aiui-dark":E==="dark"}),children:[T==="fade-in"&&(0,e.jsxs)("div",{className:(0,r.cn)("absolute z-30 flex w-full flex-col items-center justify-center gap-4 px-4 text-center",p?"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2":"left-0 top-0"),children:[y&&(0,e.jsx)("div",{ref:M,className:"media-player-base-title lg-desktop:text-[64px] text-info-primary text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:y}}),w&&(0,e.jsx)(F.default,{ref:v,variant:"link",className:(0,r.cn)("media-player-base-button member-equity-button-secondary text-info-primary"),onClick:()=>{$(!0),l&&l?.()},children:w})]}),(0,e.jsxs)("div",{className:"media-cover left-0 top-0 h-screen w-screen overflow-hidden",style:{height:`${102-z*100}vh`},children:[(0,e.jsx)(h.default,{videoRef:g,poster:H?.url||"",src:N?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,e.jsx)(h.default,{videoRef:g,poster:H?.url||"",src:O?.url||N?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),(0,e.jsx)("div",{ref:X,className:"absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"rgba(0, 0, 0, 0.2)"}})]})]})}),p&&(0,e.jsx)("div",{className:(0,r.cn)(p&&"pointer-events-none relative box-content block",j),style:p?{height:`${Q}px`}:{},ref:Z})]}),W&&Y&&(0,e.jsx)(pe.VideoModal,{visible:W,youTubeId:Y,onCloseModal:()=>$(!1)})]})});ne.displayName="MediaPlayerBase";var $e=(0,ce.withLayout)(ne);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";"use client";var T=Object.defineProperty;var
|
|
1
|
+
"use strict";"use client";var T=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var V=Object.prototype.hasOwnProperty;var _=(t,i)=>{for(var a in i)T(t,a,{get:i[a],enumerable:!0})},q=(t,i,a,d)=>{if(i&&typeof i=="object"||typeof i=="function")for(let s of j(i))!V.call(t,s)&&s!==a&&T(t,s,{get:()=>i[s],enumerable:!(d=H(i,s))||d.enumerable});return t};var O=t=>q(T({},"__esModule",{value:!0}),t);var Q={};_(Q,{default:()=>K});module.exports=O(Q);var e=require("react/jsx-runtime"),r=require("react"),M=require("react-responsive"),x=require("../../helpers/utils.js"),L=require("../../shared/Styles.js"),l=require("../../components/index.js"),k=require("../../hooks/useExposure.js"),y=require("swiper/react"),B=require("swiper/modules"),J=require("swiper/css");const I="media",A="media_scene_switcher",g=3e3,$=({data:t,configuration:i,theme:a})=>{const d=(0,r.useRef)(null),s=i?.isActive||!1;return(0,k.useExposure)(d,{componentType:I,componentName:A,componentTitle:t?.title,position:(i?.index??0)+1}),(0,e.jsxs)("div",{ref:d,className:(0,x.cn)("media-scene-switcher-item rounded-box flex cursor-pointer flex-col overflow-hidden transition-colors","relative text-[#4A4C56]",s?"opacity-100":"opacity-60",{"bg-[#1E2024] text-white":s&&a==="dark","bg-[#EAEAEC] text-[#080A0F]":s&&a==="light"}),onClick:()=>i?.onItemClick?.(i?.index??0),children:[(0,e.jsxs)("div",{className:"media-scene-switcher-item-content laptop:p-[12px] desktop:p-[24px] flex flex-1 items-center justify-between gap-[24px]",children:[(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-[4px]",children:[(0,e.jsx)(l.Heading,{as:"h6",size:2,className:"text-inherit",html:t?.title}),s&&t?.description&&(0,e.jsx)(l.Text,{size:2,className:"media-scene-switcher-item-description laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 font-bold leading-[1.4]",html:t.description})]}),(0,e.jsx)("div",{className:(0,x.cn)("media-scene-switcher-item-badge border-[1.6px] text-center","laptop:min-w-[36px] desktop:min-w-[42px] laptop:rounded-[16px] desktop:rounded-[14px] laptop:px-[6px] desktop:px-[8px] laptop:pt-[3px] laptop:pb-[4px] desktop:pt-[5px] desktop:pb-[4px]","laptop:text-[14px] desktop:text-[16px] font-bold leading-[1.2]",a==="dark"?"border-[#B5B7BB]":"border-[#4A4C56]",{"!border-[#F5F6F7]":a==="dark"&&s}),children:t?.tag})]}),(0,e.jsx)("div",{className:(0,x.cn)("media-scene-switcher-progress absolute bottom-0 left-0 h-[2px] w-full",{"media-scene-switcher-progress-active":s}),style:{transform:"translate3d(-100%, 0, 0)",background:"#00BEFA",animation:s?`progress-bar ${g}ms ease-out`:"none"}})]})},G=({data:t,configuration:i,theme:a})=>{const d=(0,r.useRef)(null),s=i?.isActive||!1,c=(0,M.useMediaQuery)({query:"(max-width: 768px)"});(0,k.useExposure)(d,{componentType:I,componentName:A,componentTitle:t?.title,position:(i?.index??0)+1});const f=c&&t?.mobVideoUrl?.url?t.mobVideoUrl.url:t?.videoUrl?.url,n=c&&t?.mobImageUrl?.url?t.mobImageUrl.url:t?.imageUrl?.url,u=n||t?.videoUrl?.thumbnailURL||"";return(0,e.jsxs)("div",{ref:d,className:(0,x.cn)("media-scene-switcher-mobile-item rounded-box flex h-full max-w-full flex-col overflow-hidden",{"aiui-dark":a==="dark","bg-[#EAEAEC]":s&&a==="light","bg-[#1E2024]":s&&a==="dark"}),children:[(0,e.jsx)("div",{className:"media-scene-switcher-mobile-media relative h-[258px] w-full shrink-0 overflow-hidden",children:f?(0,e.jsx)("video",{src:f,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,poster:u,className:"size-full object-cover"}):n?(0,e.jsx)(l.Picture,{className:"size-full",imgClassName:"size-full object-cover",source:n,alt:t?.title||""}):null}),(0,e.jsxs)("div",{className:(0,x.cn)("media-scene-switcher-mobile-bottom text-info-primary flex flex-1 items-start justify-between gap-[8px] p-[16px]",!s&&"bg-container-primary"),children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"media-scene-switcher-mobile-title line-clamp-3",children:(0,e.jsx)(l.Heading,{as:"h6",size:2,className:"text-inherit",html:t?.title})}),t?.description&&(0,e.jsx)(l.Text,{size:2,className:"media-scene-switcher-item-description mt-[4px] line-clamp-2 text-[14px] font-bold leading-[1.4]",html:t.description})]}),(0,e.jsx)("div",{className:(0,x.cn)("media-scene-switcher-mobile-badge min-w-[36px] shrink-0 border-[1.6px] text-center","rounded-[16px] px-[6px] pb-[4px] pt-[3px] text-[14px] font-bold leading-[1.2]",a==="dark"?"border-[#B5B7BB]":"border-[#4A4C56]",{"!border-[#F5F6F7]":a==="dark"&&s}),children:t?.tag})]}),(0,e.jsx)("div",{className:(0,x.cn)("media-scene-switcher-progress h-[2px] w-full",{"media-scene-switcher-progress-active":s}),style:{transform:"translate3d(-100%, 0, 0)",background:"#00BEFA",animation:s?`progress-bar ${g}ms ease-out`:"none"}})]})},E=(0,r.forwardRef)(({sectionData:t,id:i,className:a="",tabId:d},s)=>{const{title:c,subtitle:f,items:n=[],theme:u="light",layout:h,titleIcon:v}=t,[N,b]=(0,r.useState)(0),[m,D]=(0,r.useState)(0),C=(0,r.useRef)(null),w=(0,r.useRef)(0),U=(0,M.useMediaQuery)({query:"(max-width: 1023px)"});(0,r.useImperativeHandle)(s,()=>C.current),(0,r.useEffect)(()=>{if(!(U||n.length===0))return w.current=window.setInterval(()=>{b(o=>(o+1)%n.length)},g),()=>{w.current&&window.clearInterval(w.current)}},[U,n.length]);const F=o=>{b(o),w.current&&window.clearInterval(w.current),w.current=window.setInterval(()=>{b(p=>(p+1)%n.length)},g)};return(0,e.jsxs)("section",{id:i,ref:C,className:(0,x.cn)("media-scene-switcher text-info-primary w-full",{"aiui-dark":u==="dark"},a),children:[(0,e.jsxs)("div",{className:"media-scene-switcher-desktop laptop:gap-[40px] laptop:flex hidden w-full items-stretch overflow-hidden",children:[(0,e.jsx)("div",{className:(0,x.cn)("media-scene-switcher-preview rounded-box laptop:h-[560px] relative min-w-0 shrink-0 overflow-hidden","laptop:w-[824px] laptop:flex-none",{"order-1":h==="right"}),children:n.map((o,p)=>{const z=o?.videoUrl?.url,S=o?.imageUrl?.url,R=S||o?.videoUrl?.thumbnailURL||"";return(0,e.jsx)("div",{className:(0,x.cn)("media-scene-switcher-media rounded-box absolute inset-0 hidden size-full overflow-hidden",{"inline-block":p===N}),children:z?(0,e.jsx)("video",{src:z,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,poster:R,className:"size-full object-cover"}):S?(0,e.jsx)(l.Picture,{className:"size-full",imgClassName:"size-full object-cover",source:S,alt:o?.title||""}):null},o.id||p)})}),(0,e.jsxs)("div",{className:"media-scene-switcher-sidebar laptop:flex-1 flex min-w-0 shrink-0 flex-col justify-between",children:[(0,e.jsx)("div",{className:"media-scene-switcher-header flex flex-col gap-[16px]",children:(0,e.jsxs)("div",{className:"flex flex-col gap-[4px]",children:[(0,e.jsxs)("div",{className:"flex items-center gap-[8px]",children:[v&&(0,e.jsx)(l.Picture,{source:v.url,alt:v.alt||"title icon",className:"laptop:size-[40px] h-6 shrink-0",imgClassName:"!size-full !object-contain"}),c&&(0,e.jsx)(l.Heading,{as:"h3",html:c,size:4,className:"media-scene-switcher-title text-info-primary text-[#00BEFA]"})]}),f&&(0,e.jsx)(l.Text,{as:"span",html:f,className:"media-scene-switcher-subtitle laptop:text-[18px] text-[14px] font-bold leading-[1.4] text-[#080A0F]"})]})}),(0,e.jsx)("div",{className:"media-scene-switcher-list laptop:gap-[24px] flex flex-col",children:n.map((o,p)=>(0,e.jsx)($,{data:o,configuration:{index:p,isActive:p===N,onItemClick:F},theme:u},o.id||p))})]})]}),(0,e.jsxs)("div",{className:"media-scene-switcher-mobile laptop:hidden flex flex-col overflow-visible",children:[(0,e.jsx)("div",{className:"media-scene-switcher-mobile-header flex flex-col gap-[8px]",children:(0,e.jsxs)("div",{className:"flex flex-col gap-[4px]",children:[(0,e.jsxs)("div",{className:"flex items-center gap-[4px]",children:[v&&(0,e.jsx)(l.Picture,{source:v.url,alt:v.alt||"title icon",className:"size-[24px] shrink-0",imgClassName:"!size-full !object-contain"}),c&&(0,e.jsx)(l.Heading,{as:"h2",html:c,size:4,className:"media-scene-switcher-title text-[#00BEFA]"})]}),f&&(0,e.jsx)(l.Text,{as:"span",html:f,className:"media-scene-switcher-subtitle text-[14px] font-bold leading-[1.4] text-[#080A0F]"})]})}),(0,e.jsx)("div",{className:"media-scene-switcher-mobile-swiper mt-[24px] overflow-visible",children:(0,e.jsx)(y.Swiper,{onSlideChange:o=>D(o.realIndex),initialSlide:0,modules:[B.Autoplay],loop:n.length>1,autoplay:n.length>1?{delay:g,disableOnInteraction:!1}:!1,spaceBetween:12,breakpoints:{0:{slidesPerView:1},374:{slidesPerView:1.2},768:{slidesPerView:2.3}},watchSlidesProgress:!0,className:"w-full !overflow-visible",children:n.map((o,p)=>(0,e.jsx)(y.SwiperSlide,{className:"!h-auto max-w-full",children:(0,e.jsx)(G,{data:o,configuration:{index:p,isActive:p===m},theme:u})},o.id||p))},d)})]})]})});E.displayName="SceneSection";const P=(0,r.forwardRef)(({className:t="",data:i,id:a},d)=>{const s=i?.isShowTab??!1,c=i?.tabs,f=i?.tabAlign??"left",[n,u]=(0,r.useState)(c?.[0]?.id??""),h=(0,r.useRef)(null);(0,r.useImperativeHandle)(d,()=>h.current);const N=c?.find(m=>m.id===n)??i;(0,k.useExposure)(h,{componentType:I,componentName:A,componentTitle:N?.title});const b=`
|
|
2
2
|
@keyframes progress-bar {
|
|
3
3
|
from {
|
|
4
4
|
transform: translate3d(-100%, 0, 0);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
transform: translate3d(0, 0, 0);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
`;return!
|
|
10
|
+
`;return!s||!c||c.length===0?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("style",{children:b}),(0,e.jsx)(E,{ref:h,sectionData:i,id:a,className:t})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("style",{children:b}),(0,e.jsx)("div",{ref:h,children:(0,e.jsxs)(l.Tabs,{value:n,onValueChange:u,align:f,children:[(0,e.jsx)("div",{className:"media-scene-switcher-tabs mb-6",children:(0,e.jsx)(l.TabsList,{children:c.map(m=>(0,e.jsx)(l.TabsTrigger,{value:m.id,children:m.label},m.id))})}),c.map(m=>(0,e.jsx)(l.TabsContent,{value:m.id,children:(0,e.jsx)(E,{sectionData:m,className:t,tabId:m.id})},m.id))]})})]})});P.displayName="MediaSceneSwitcher";var K=(0,L.withLayout)(P,{style:"overflow: hidden;"});
|
|
@@ -16,7 +16,7 @@ export type TitleType = 'selling-point' | 'primary' | 'secondary';
|
|
|
16
16
|
/** 文本对齐方式 */
|
|
17
17
|
export type TextAlign = 'left' | 'center';
|
|
18
18
|
/** 图片宽度比例(2张图片时) */
|
|
19
|
-
export type TwoImageRatio = '2:3' | '1:1';
|
|
19
|
+
export type TwoImageRatio = '2:3' | '4:6' | '1:1';
|
|
20
20
|
/** 图片宽度比例(3张图片时) */
|
|
21
21
|
export type ThreeImageRatio = '1:1:1';
|
|
22
22
|
export interface ProductCompareProps extends React.HTMLAttributes<HTMLElement> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var
|
|
1
|
+
"use strict";var g=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var A=(e,r)=>{for(var o in r)g(e,o,{get:r[o],enumerable:!0})},H=(e,r,o,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of C(r))!L.call(e,a)&&a!==o&&g(e,a,{get:()=>r[a],enumerable:!(i=k(r,a))||i.enumerable});return e};var E=e=>H(g({},"__esModule",{value:!0}),e);var V={};A(V,{default:()=>S});module.exports=E(V);var t=require("react/jsx-runtime"),c=require("react"),n=require("../../components/index.js"),p=require("../../helpers/index.js"),y=require("../../shared/Styles.js"),v=require("../../shared/ContainerGridContext.js");function j({children:e,offset:r=800}){const[o,i]=(0,c.useState)(!1),a=(0,c.useRef)(null);return(0,c.useEffect)(()=>{const s=new IntersectionObserver(([x])=>x.isIntersecting&&i(!0),{rootMargin:`${r}px`});return a.current&&s.observe(a.current),()=>s.disconnect()},[r]),(0,t.jsx)("div",{ref:a,className:"size-full",children:o&&e})}function b({media:e,poster:r,className:o}){return e?.url?e.mimeType?.startsWith("video/")?(0,t.jsx)("video",{src:e.url,playsInline:!0,autoPlay:!0,muted:!0,loop:!0,poster:r?.url||"",preload:"metadata",disablePictureInPicture:!0,disableRemotePlayback:!0,className:o,width:e.width,height:e.height}):(0,t.jsx)("img",{src:e.url,alt:e.alt||"",className:o,width:e.width,height:e.height}):null}function D(e,r,o){return r===2?o==="1:1"?"laptop:flex-[1]":o==="4:6"?e===0?"laptop:flex-[4]":"laptop:flex-[6]":e===0?"laptop:flex-[2]":"laptop:flex-[3]":"laptop:flex-[1]"}function B({data:e,className:r,...o}){const{title:i,titleType:a="primary",titleIcon:s,subtitle:x,subtitleImage:m,textAlign:T="left",products:d=[],twoImageRatio:I="2:3",threeImageRatio:F="1:1:1",theme:M="light"}=e,w=(0,v.useContainerGrid)()?.gridColumns===12,f=T==="center"?"text-center":"text-left laptop:text-left",h=()=>a==="secondary"?3:4,N=()=>i?a==="selling-point"&&s?(0,t.jsxs)("div",{className:(0,p.cn)("product-compare-title-wrapper flex items-center gap-[8px]",f==="text-center"?"justify-center":""),children:[(0,t.jsx)("img",{src:s.url,alt:s.alt||"",className:"product-compare-title-icon laptop:size-[32px] size-[24px]"}),(0,t.jsx)(n.Heading,{as:"h2",size:h(),html:i,className:"product-compare-title",style:{color:"#00BEFA"}})]}):(0,t.jsx)(n.Heading,{as:"h2",size:h(),html:i,className:(0,p.cn)("product-compare-title",f)}):null;return(0,t.jsxs)("section",{...o,className:(0,p.cn)("product-compare text-info-primary",r,{"aiui-dark":M==="dark"}),children:[N(),x&&(0,t.jsx)(n.Text,{as:"p",size:2,html:x,className:(0,p.cn)("product-compare-subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",f)}),m&&(0,t.jsx)("div",{className:(0,p.cn)("product-compare-subtitle-image laptop:mt-[24px] mt-[16px]",f==="text-center"?"flex justify-center":""),children:(0,t.jsx)("img",{src:m.url,alt:m.alt||"",className:"max-w-full",width:m.width,height:m.height})}),(0,t.jsx)("div",{className:"product-compare-container tablet:flex-row tablet:flex-nowrap laptop:mt-[32px] mt-[24px] flex w-full flex-col items-stretch gap-[16px]",children:d.map((l,u)=>{const P=u===d.length-1,z=D(u,d.length,I),R=P?"bg-brand-0":"bg-[rgba(0,0,0,0.2)]";return(0,t.jsxs)("div",{className:(0,p.cn)("product-compare-item rounded-box relative shrink overflow-hidden",w&&"laptop:h-[560px] h-[240px]",z,{"order-2 tablet:order-1":u===0&&d.length===2,"order-1 tablet:order-2":u===1&&d.length===2}),children:[l.text&&(0,t.jsx)("div",{className:(0,p.cn)("product-compare-label rounded-btn laptop:left-[28px] laptop:top-[28px] laptop:px-[28px] laptop:pb-[14px] laptop:pt-[15px] desktop:left-[32px] desktop:top-[32px] text-badge-foreground absolute left-[16px] top-[16px] z-10 px-[20px] pb-[10px] pt-[11px] font-bold",R),children:(0,t.jsx)(n.Heading,{as:"h6",className:"font-bold",size:1,children:l.text})}),(0,t.jsxs)(j,{offset:1500,children:[(0,t.jsx)(b,{media:l.media,poster:l.poster,className:"product-compare-media laptop:block hidden size-full object-cover"}),(0,t.jsx)(b,{media:l.mobMedia?l.mobMedia:l.media,poster:l.mobPoster?l.mobPoster:l.poster,className:"product-compare-media-mobile laptop:hidden block size-full object-cover"})]})]},u)})})]})}var S=(0,y.withLayout)(B);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";"use client";var
|
|
1
|
+
"use strict";"use client";var L=Object.create;var l=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var B=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},x=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of D(e))!z.call(t,p)&&p!==r&&l(t,p,{get:()=>e[p],enumerable:!(a=C(e,p))||a.enumerable});return t};var M=(t,e,r)=>(r=t!=null?L(E(t)):{},x(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),j=t=>x(l({},"__esModule",{value:!0}),t);var V={};B(V,{default:()=>I});module.exports=j(V);var o=require("react/jsx-runtime"),i=M(require("react")),s=require("../../components/index.js"),c=require("../../helpers/utils.js"),_=require("../../shared/Styles.js"),g=require("../../shared/ContainerGridContext.js"),k=require("../../hooks/useExposure.js"),N=require("../../hooks/useTracking.js"),v=require("../../shared/trackUrlRef.js"),H=require("../../shared/track.js");const d="image",f="product_hero",b=i.default.forwardRef(({data:t,className:e},r)=>{const{title:a,subtitle:p,ctaText:m,poster:P,mobPoster:T,ctaLink:n,theme:w="light"}=t,u=(0,i.useRef)(null),{buildRef:y}=(0,N.useTracking)(),R=(0,g.useContainerGrid)(),h=t.gridVariant??(R?.gridColumns===12?"12":"10");return(0,k.useExposure)(u,{componentType:d,componentName:f,componentTitle:a,componentDescription:p}),(0,i.useImperativeHandle)(r,()=>u.current),(0,o.jsxs)("section",{ref:u,"data-ui-component-id":"ProductHero",className:(0,c.cn)("product-hero text-info-primary laptop:flex-row desktop:gap-[48px] lg-desktop:gap-[64px] flex w-full flex-col items-center justify-between gap-[32px]",{"aiui-dark":w==="dark"},e),children:[(0,o.jsxs)("div",{className:(0,c.cn)("product-hero__content lg-desktop:gap-[32px] flex w-full flex-col items-start gap-[24px]",h==="12"?"laptop:basis-5/12":"laptop:basis-2/5"),children:[(0,o.jsxs)("div",{className:"product-hero__text",children:[(0,o.jsx)(s.Heading,{as:"h3",size:4,html:a,className:"product-hero__title"}),(0,o.jsx)(s.Heading,{as:"h4",size:2,html:p,className:"product-hero__subtitle product-hero__subtitle--desktop desktop:mt-[8px] laptop:block mt-[4px] hidden"}),(0,o.jsx)(s.Text,{as:"p",size:2,html:p,className:"product-hero__subtitle product-hero__subtitle--mobile desktop:mt-[8px] laptop:hidden mt-[4px] block"})]}),m&&(0,o.jsx)("a",{href:n?(0,v.trackUrlRef)(n,y(d,f)):void 0,className:"product-hero__cta-link",...(0,H.buildClickTrackingProps)({interactive:!!n,componentType:d,componentName:f,title:a,description:p,buttonName:m}),children:(0,o.jsx)(s.Button,{className:"product-hero__cta-button w-fit",children:m})})]}),(0,o.jsx)(s.Picture,{className:(0,c.cn)("product-hero__image rounded-box laptop:h-auto laptop:aspect-[824/640] h-[360px] w-full shrink",h==="12"?"laptop:basis-7/12 lg-desktop:aspect-[964/640]":"laptop:basis-3/5 lg-desktop:aspect-[824/560]"),source:`${P?.url}, ${T?.url} 768`,imgClassName:"h-full object-cover"})]})});b.displayName="ProductHero";var I=(0,_.withLayout)(b);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of n(t))!m.call(e,r)&&r!==a&&s(e,r,{get:()=>t[r],enumerable:!(i=o(t,r))||i.enumerable});return e};var d=e=>p(s({},"__esModule",{value:!0}),e);var g={};module.exports=d(g);
|