1import{j as t}from"./jsx-runtime-CWbFWY2M.js";import{c}from"./index-6VkcFi5Q.js";import{a7 as M,i as j,t as h,ac as T}from"./app-D9_mHf2z.js";import{r as o}from"./react-CydE4nCL.js";import"./vendor-BrssnT-E.js";import"./sendbird-haQy8H9b.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"a156a80817bcc286d094871909811f8803ba8360"};var n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="012bd1b4-549d-43bb-a1f1-c7f05b24b8a0",e._sentryDebugIdIdentifier="sentry-dbid-012bd1b4-549d-43bb-a1f1-c7f05b24b8a0")}catch(l){}})();const K=()=>{const[e,n]=o.useState(()=>M());return o.useEffect(()=>{if(e)return;const l=()=>{M()&&n(!0)},m=d=>{let i=null;try{i=JSON.parse(d.data)}catch(a){return}(i==null?void 0:i.source)==="preference_manager"&&(i==null?void 0:i.message)==="submit_preferences"&&l()};return window.addEventListener("message",m),()=>{window.removeEventListener("message",m)}},[e]),e},D=({cta:e,className:n,underline:l})=>e?t.jsxs("a",{href:e.url,target:e.newTab?"_blank":void 0,className:n,rel:"noreferrer",children:[t.jsx("span",{className:c({"underline underline-offset-4 group-hover/cta:no-underline":l}),children:e.text}),t.jsx("span",{className:"group-hover/cta:translate-x-0.75 transition-all duration-200","aria-hidden":"true",children:"â"})]}):null,W=1,Q="power3.out",Z=50,J=.4,ee="h-[420px] sm:h-[520px] lg:min-h-[580px]",te=e=>e<640?{expanded:Math.min(e-48,380),collapsed:56,gap:6}:e<1024?{expanded:460,collapsed:88,gap:8}:{expanded:620,collapsed:132,gap:10},ne=e=>{if(!e)return e;const n=e.includes("?")?"&":"?";return e.includes("youtube.com")||e.includes("youtu.be")?"".concat(e).concat(n,"autoplay=1&mute=1"):e.includes("vimeo.com")?"".concat(e).concat(n,"autoplay=1&muted=1"):e},se=e=>e&&(e.includes("youtube.com")||e.includes("youtu.be"))?{termsLink:"https://www.youtube.com/t/terms",siteName:"www.youtube.com"}:e&&e.includes("vimeo.com")?{termsLink:"https://vimeo.com/cookie_policy",siteName:"www.vimeo.com"}:null,ae=({heading:e,headingId:n,description:l,style:m,total:d,activeIndex:i})=>{const a=m==="dark",x=String(i+1).padStart(2,"0"),w=String(d).padStart(2,"0"),p=100/d,b=i/d*100;return t.jsxs("div",{className:"flex items-start justify-between gap-6 sgx",children:[t.jsxs("div",{className:"flex max-w-155 flex-col gap-2",children:[e&&t.jsx("h2",{id:n,className:"text-3xl font-black leading-tight sm:text-4xl",children:e}),l&&t.jsx("p",{className:c({"text-white/60":a,"text-black/60":!a}),children:l})]}),d>1&&t.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-3 pt-1.5",children:[t.jsxs("div",{className:"flex items-baseline gap-1.5 font-mono text-lg",children:[t.jsx("span",{children:x}),t.jsxs("span",{className:c("flex items-baseline gap-1",{"text-white/35":a,"text-black/35":!a}),children:[t.jsx("span",{children:"/"}),t.jsx("span",{children:w})]})]}),t.jsx("div",{className:c("relative h-0.5 w-16 overflow-hidden rounded-full sm:w-21",{"bg-white/20":a,"bg-dark/20":!a}),children:t.jsx("div",{className:c("absolute top-0 h-full rounded-full transition-all duration-300",{"bg-white":a,"bg-dark":!a}),style:{width:"".concat(p,"%"),left:"".concat(b,"%")}})})]})]})},re=({style:e,total:n,onPrev:l,onNext:m})=>{if(n<=1)return null;const d=c("grid h-12 w-12 place-items-center border transition-colors",{"rounded-md":j(),"border-white/15 bg-white/5 hover:bg-white/15":e==="dark","border-dark/15 bg-dark/5 hover:bg-dark/15":e!=="dark"});return t.jsx("div",{className:"mt-8 flex sgx",children:t.jsxs("div",{className:"flex w-full items-center justify-between gap-3",children:[t.jsx("button",{type:"button",onClick:l,title:h("translations.previousLabel","Previous"),className:d,children:t.jsx("i",{className:"fa-regular fa-arrow-left","aria-hidden":"true"})}),t.jsx("button",{type:"button",onClick:m,title:h("translations.nextLabel","Next"),className:d,children:t.jsx("i",{className:"fa-regular fa-arrow-right","aria-hidden":"true"})})]})})},oe=({slide:e,isActive:n,isTextVisible:l,isRevealed:m,onReveal:d,onSelect:i,style:a,registerRef:x})=>{const w=ne(e.videoUrl),p=se(e.videoUrl),b=typeof e.quote=="string"?e.quote.trim():e.quote;return t.jsxs("div",{ref:x,className:c("relative shrink-0 overflow-hidden border text-white",ee,{"rounded-[20px]":j(),"border-white/10":a==="dark","hover:border-secondary/80":a==="dark"&&!n,"border-dark/10":a!=="dark","hover:border-dark/20":a!=="dark"&&!n}),children:[t.jsx("button",{type:"button",disabled:n,inert:n||void 0,onClick:i,"aria-label":"".concat(h("translations.selectVideoLabel","View")," ").concat(e.name),className:c("absolute inset-0 flex flex-col items-center justify-end gap-4 pb-6 transition-opacity duration-300",a==="dark"?"bg-white/10":"bg-cream hover:bg-[#9a9bb2c2]",n?"opacity-0":"opacity-100 delay-150"),children:t.jsxs("div",{className:"relative flex flex-col items-start",style:{writingMode:"vertical-rl",transform:"rotate(180deg)"},children:[t.jsx("span",{className:c("whitespace-nowrap text-base font-bold",{"text-dark":a!=="dark"}),children:e.name}),t.jsx("span",{className:c("whitespace-nowrap text-sm font-semibold",a==="dark"?"text-white/55":"text-dark/55"),children:e.role})]})}),t.jsxs("div",{inert:!n||void 0,className:c("absolute inset-0 grid grid-rows-[auto_1fr] bg-dark transition-opacity duration-300",n?"opacity-100 delay-150":"opacity-0"),children:[n&&t.jsxs("div",{className:"relative aspect-video bg-black bg-cover bg-center",style:e.thumbnail?{backgroundImage:"url(".concat(e.thumbnail,")")}:void 0,children:[e.videoUrl&&m&&t.jsx("iframe",{title:e.name,src:w,className:"absolute inset-0 h-full w-full border-0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}
1),e.videoUrl&&!m&&t.jsxs("div",{className:"youtube_cookiePopup font-medium absolute z-1 inset-0 overflow-y-auto bg-black/70 p-4 sm:p-8",children:[t.jsxs("div",{className:"mb-2",children:[t.jsxs("button",{type:"button",onClick:d,className:c("playButton mb-4 flex items-center bg-primary px-4 py-2 text-sm font-medium text-white! uppercase hover:opacity-75",{"rounded-md":j()}),children:[h("translations.playButtonText","Play")," ",t.jsx("i",{className:"fa fa-play ml-2","aria-hidden":"true"})]}),t.jsx("span",{className:"mb-2 text-sm font-medium inline-block text-white",children:h("translations.videoPreviewCookieText","Video preview - enable cookies to play full video.")})]}),p&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-white",children:h("translations.videoConsentIntro","This content is hosted by a third party. By showing the external content you accept the")})," ",t.jsx("a",{href:p.termsLink,target:"_blank",rel:"noreferrer",className:"text-xs font-bold text-white! underline hover:no-underline",children:h("translations.videoConsentTermsLinkText","terms and conditions")})," ",t.jsxs("span",{className:"text-xs text-white",children:["of ",p.siteName]})]})]})]}),t.jsxs("div",{className:"relative row-start-2 flex min-h-0 flex-col justify-end gap-4 px-4 pt-4 pb-4 md:px-6 md:pb-6",children:[b&&t.jsxs("blockquote",{className:c("min-h-0 max-w-130 touch-pan-y overflow-y-auto text-sm font-medium transition-opacity duration-300 sm:text-lg sm:font-bold",n&&l?"opacity-100":"opacity-0"),children:[e.messageStyle==="quote"&&t.jsx("span",{className:"text-primary text-2xl leading-0",children:"â"}),t.jsx("span",{dangerouslySetInnerHTML:{__html:b}}),e.messageStyle==="quote"&&t.jsx("span",{className:"text-primary text-2xl leading-0",children:"â"})]}),t.jsxs("div",{className:"flex items-center gap-3",children:[(e.company||e.logo)&&t.jsxs("div",{children:[e.logo&&t.jsx("img",{src:e.logo,alt:e.company,className:"max-h-10"}),!e.logo&&t.jsx("span",{className:"rounded-md border border-white/15 bg-white/10 px-2.5 py-2 font-mono text-xs tracking-wide text-white/90",children:e.company})]}),t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{className:"text-sm font-bold",children:e.name}),t.jsx("span",{className:"text-xs font-semibold text-white/60",children:e.role})]})]}),t.jsx(D,{cta:e.cta,className:c("inline-flex w-fit items-center gap-2.5 bg-white px-4 py-2 text-sm font-semibold text-dark transition-transform hover:opacity-80",{"rounded-full":j()})})]})]})]})},ie=1440,fe=({style:e,heading:n,headingId:l,description:m,gateVideo:d=!1,exploreAllCta:i,slides:a=[]})=>{const x=a.length,w=K(),[p,b]=o.useState(()=>new Set),[u,H]=o.useState(0),[R,q]=o.useState(typeof window<"u"?window.innerWidth:1440),[z,O]=o.useState(0),C=o.useRef(null),N=o.useRef([]),I=o.useRef(!1),v=o.useRef(null),L=o.useRef(u);o.useEffect(()=>{L.current=u},[u]);const[U,_]=o.useState(0),{expanded:y,collapsed:g,gap:k}=te(R);if(o.useEffect(()=>{const s=C.current;if(!s)return;const r=new ResizeObserver(f=>{O(f[0].contentRect.width)});return r.observe(s),()=>r.disconnect()},[]),o.useEffect(()=>{const s=()=>q(window.innerWidth);return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),o.useEffect(()=>{N.current.forEach((s,r)=>{s&&T.set(s,{width:r===L.current?y:g})})},[y,g]),o.useEffect(()=>{if(!I.current){I.current=!0,_(u);return}N.current.forEach((r,f)=>{if(!r)return;const E=f===u?y:g;T.killTweensOf(r),T.to(r,{width:E,duration:W,ease:Q})});const s=setTimeout(()=>_(u),W*1e3*J);return()=>clearTimeout(s)},[u]),!x)return null;const S=s=>{H((s%x+x)%x)},P=()=>S(u-1),V=()=>S(u+1),X=s=>{s.pointerType==="touch"&&(v.current={x:s.clientX,y:s.clientY})},A=s=>{const r=v.current;if(v.current=null,!r)return;const f=s.clientX-r.x,E=s.clientY-r.y;Math.abs(f)<Z||Math.abs(f)<Math.abs(E)||(f<0?V():P())},B=()=>{v.current=null},F=y+Math.max(x-1,0)*(g+k),Y=Math.max(0,F-z),G=-Math.min(u*(g+k),Y),$=Math.max(0,(R-ie)/2);return t.jsxs("div",{className:c("container mx-auto",{"text-white":e==="dark"}),children:[t.jsx(ae,{heading:n,headingId:l,description:m,style:e,total:x,activeIndex:u}),t.jsx("div",{className:"relative mt-6",children:t.jsx("div",{ref:C,className:"w-screen touch-pan-y overflow-hidden ps-[calc(var(--bleed-inset)+var(--site-gutter))] pr-2 sm:pl-[calc(var(--bleed-inset)+2rem)]",style:{marginLeft:"-".concat($,"px"),"--bleed-inset":"".concat($,"px")},onPointerDown:X,onPointerUp:A,onPointerCancel:B,children:t.jsx("div",{className:"flex items-stretch",style:{gap:"".concat(k,"px"),transform:"translateX(".concat(G,"px)"),transition:"transform 620ms cubic-bezier(0.36, 0.1, 0.2, 1)"},children:a.map((s,r)=>t.jsx(oe,{slide:s,isActive:r===u,isTextVisible:r===U,isRevealed:!d||w||p.has(s.id),onReveal:()=>b(f=>new Set(f).add(s.id)),onSelect:()=>S(r),style:e,registerRef:f=>{N.current[r]=f}},s.id))})})}),t.jsx(re,{style:e,total:x,onPrev:P,onNext:V}),i&&t.jsx("div",{className:"flex w-full justify-end sgx mt-6",children:t.jsx(D,{cta:{...i,text:i.text||h("translations.exploreAllLabel","Explore all")},className:"inline-flex items-center gap-2 text-sm group/cta",underline:!0})})]})};export{fe as default}; 2//# sourceMappingURL=VideoCarousel-Bg5Tmyc6.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.