"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9487],{"DOR+":function(e,t,a){a.d(t,{Y:function(){return RiskScreenerEmbed}});var i=a("BGKE"),n=a("q1tI"),r=a("Eso5"),l=a("p46w"),o=a.n(l),s=a("o6HM"),d=a("HdVw"),c=a("JuOI"),m=a("csLd"),h=a("hXNO"),g=a("P5LW"),p=a("rIrU"),u=a("/npG"),f=(0,u.k)((e,t)=>{let{loading:a}=t;return{root:{position:"relative",...a&&{backgroundColor:e.colors.blue[0]},[e.fn.largerThan("sm")]:{'&[data-type-form="true"]':{".si-revamp-left":{paddingTop:0}}}}}}),x=a("OAL+"),v=a("0D4Z"),b=a("SPK5"),y=a("gHFm"),Z=(0,u.k)(e=>({root:{position:"relative",[e.fn.smallerThan("sm")]:{paddingTop:40,paddingBottom:40},[e.fn.largerThan("sm")]:{height:"calc(654px + 160px)",paddingTop:80,paddingBottom:80}},inner:{display:"flex",[e.fn.smallerThan("sm")]:{flexDirection:"column",gap:24},[e.fn.largerThan("sm")]:{gap:30}},subotIframe:{position:"absolute",inset:0},colLeft:{width:"100%",maxWidth:490},colLeftInner:{[e.fn.smallerThan("sm")]:{gap:12},[e.fn.largerThan("sm")]:{paddingTop:48}},colRight:{backgroundColor:"#fff",borderRadius:12,padding:12,[e.fn.smallerThan("sm")]:{height:"80vh",maxHeight:480},[e.fn.largerThan("sm")]:{width:720,height:654,padding:48,borderRadius:20}},header:{[e.fn.smallerThan("sm")]:{flexDirection:"row",gap:16}},heading:{[e.fn.smallerThan("sm")]:{width:"calc(100% - 48px)"}},icon:{[e.fn.smallerThan("sm")]:{width:48,height:48}},form:{position:"absolute",inset:0}}));let SubotSkeleton=e=>{let{children:t,loading:a}=e,{classes:n}=Z(void 0,{name:"RiskScreenerEmbed__SubotSkeleton"});return(0,i.BX)(r.x,{className:n.root,children:[(0,i.BX)(y.W,{className:n.inner,style:{opacity:Number(a)},children:[(0,i.BX)(x.K,{spacing:24,justify:"space-between",className:n.colLeft,children:[(0,i.BX)(x.K,{spacing:24,className:n.header,children:[(0,i.tZ)(v.O,{height:64,width:64,radius:"100%",className:n.icon}),(0,i.BX)(x.K,{spacing:16,className:n.heading,children:[(0,i.tZ)(v.O,{height:24,width:"100%",radius:12}),(0,i.tZ)(v.O,{height:24,width:"70%",radius:12})]})]}),(0,i.BX)(b.k,{gap:12,align:"center",children:[(0,i.tZ)(v.O,{height:40,width:40,radius:"100%",sx:{flexShrink:0}}),(0,i.BX)(x.K,{spacing:8,sx:{width:"100%"},children:[(0,i.tZ)(v.O,{height:12,width:"100%",radius:4}),(0,i.tZ)(v.O,{height:12,width:"70%",radius:4})]})]})]}),(0,i.tZ)(b.k,{align:"center",justify:"center",className:n.colRight,children:(0,i.BX)(x.K,{spacing:16,sx:{width:"100%"},children:[(0,i.tZ)(v.O,{height:32,width:"80%",radius:8}),(0,i.BX)(x.K,{spacing:8,children:[(0,i.tZ)(v.O,{height:16,width:"100%",radius:4}),(0,i.tZ)(v.O,{height:16,width:"100%",radius:4}),(0,i.tZ)(v.O,{height:16,width:"40%",radius:4})]}),(0,i.tZ)(v.O,{height:40,width:130,radius:8})]})}),(0,i.BX)(b.k,{gap:8,align:"center",sx:e=>({[e.fn.largerThan("sm")]:{display:"none"}}),children:[(0,i.tZ)(v.O,{height:20,width:20,radius:"100%"}),(0,i.tZ)(v.O,{height:16,width:300,radius:4})]})]}),(0,i.tZ)(r.x,{className:n.form,sx:{opacity:Number(!a)},children:t})]})};var k=(0,u.k)(e=>({root:{position:"relative",[e.fn.smallerThan("sm")]:{paddingTop:40,paddingBottom:40},[e.fn.largerThan("sm")]:{paddingTop:80,paddingBottom:80}},inner:{display:"flex",flexDirection:"column",[e.fn.smallerThan("sm")]:{gap:24},[e.fn.largerThan("sm")]:{gap:30}},subotIframe:{position:"absolute",inset:0},colLeft:{width:"100%",maxWidth:900},colRight:{backgroundColor:"#fff",borderRadius:12,padding:12,width:"100%",[e.fn.smallerThan("sm")]:{height:"80vh"},[e.fn.largerThan("sm")]:{height:550,padding:48,borderRadius:20}},header:{flexDirection:"row",gap:16},heading:{width:"calc(100% - 80px)",[e.fn.smallerThan("sm")]:{width:"calc(100% - 48px)"}},icon:{[e.fn.smallerThan("sm")]:{width:48,height:48}},form:{position:"absolute",inset:0}}));let TypeFormSkeleton=e=>{let{children:t,loading:a}=e,{classes:n}=k(void 0,{name:"RiskScreenerEmbed__TypeFormSkeleton"}),l=(0,h.d)();return(0,i.BX)(r.x,{className:n.root,children:[(0,i.BX)(y.W,{className:n.inner,style:{opacity:Number(a)},children:[(0,i.BX)(x.K,{spacing:24,justify:"space-between",className:n.colLeft,children:[(0,i.BX)(x.K,{spacing:12,className:n.header,children:[(0,i.tZ)(v.O,{height:64,width:64,radius:"100%",className:n.icon}),(0,i.tZ)(x.K,{spacing:8,className:n.heading,children:(0,i.tZ)(v.O,{height:l?24:36,width:"100%",radius:12})})]}),(0,i.BX)(b.k,{gap:12,align:"center",sx:e=>({[e.fn.largerThan("sm")]:{marginLeft:60,marginTop:-20}}),children:[(0,i.tZ)(v.O,{height:40,width:40,radius:"100%",sx:{flexShrink:0}}),(0,i.BX)(x.K,{spacing:8,sx:{width:"100%"},children:[(0,i.tZ)(v.O,{height:12,width:"80%",radius:4}),(0,i.tZ)(v.O,{height:12,width:"30%",radius:4})]})]})]}),(0,i.tZ)(b.k,{align:"center",justify:"center",className:n.colRight,children:(0,i.BX)(x.K,{spacing:16,sx:{width:"100%"},children:[(0,i.tZ)(v.O,{height:32,width:"80%",radius:8}),(0,i.BX)(x.K,{spacing:8,children:[(0,i.tZ)(v.O,{height:16,width:"100%",radius:4}),(0,i.tZ)(v.O,{height:16,width:"100%",radius:4}),(0,i.tZ)(v.O,{height:16,width:"40%",radius:4})]}),(0,i.tZ)(v.O,{height:40,width:130,radius:8})]})}),(0,i.BX)(b.k,{gap:8,align:"center",children:[(0,i.tZ)(v.O,{height:20,width:20,radius:"100%"}),(0,i.tZ)(v.O,{height:16,width:300,radius:4})]})]}),(0,i.tZ)(r.x,{className:n.form,sx:{opacity:Number(!a)},children:t})]})},RiskScreenerEmbed=e=>{let{data:t,primaryColor:a,onLoad:l,isFullContainer:u,isDisabledAnimationOnMobile:x,handleOnCloseMobile:v,typeoformId:b,className:y,classNames:Z,styles:k,withoutSkeleton:S,...T}=e,{asPath:w,locale:C,query:N}=(0,g.h)(),{state:I}=(0,m.b)(),{selectSubot:B=[],backgroundColor:L}=t,D=(0,h.d)(),[M,W]=(0,n.useState)(),V=!S&&void 0===M,[E,X]=(0,n.useState)(!1),{classes:z,cx:R}=f({loading:V},{name:"RiskScreenerEmbed",classNames:Z,styles:k}),F=(0,n.useMemo)(()=>{let e={...N};return delete e.slug,e},[N]),_=b?{id:b||"",params:{ga_client:o().get(p.ch),page_path:w,...F}}:void 0,G=!!_,O=G?TypeFormSkeleton:SubotSkeleton;return((0,n.useEffect)(()=>{setTimeout(()=>{X(!0)},1e3),(L||a)&&console.warn("[Warning] Please remove the setting primaryColor and backgroundColor in the CMS. All these fields will be configured in SubotAdmin.")},[]),B[0])?(0,i.tZ)(r.x,{...T,className:R(y,z.root),"data-type-form":G,children:(0,i.tZ)(O,{loading:V,children:E&&(0,i.BX)(c.Z,{children:[(0,i.tZ)(s.a,{}),(0,i.tZ)(d.oh,{id:Number(B[0]),isFullContainer:u,isDisabledAnimationOnMobile:x,onCloseMobile:v,articleLink:w,userInfo:I.userInfo,typeFormProps:_,isMobile:D,locale:C,onLoadFirstNode:e=>{setTimeout(()=>W(e),600)}})]})})}):null}},"4aBO":function(e,t,a){a.d(t,{B:function(){return RiskScreenerLayout}});var i=a("BGKE"),n=a("XDLp"),r=a("oZWv"),l=a("StZb"),o=a("Eso5"),s=a("SPK5"),d=a("mYVa"),c=a("RZSM"),m=a("dDsW"),h=a("gHFm"),g=a("hXNO"),p=a("P5LW"),u=a("rIrU"),f=a("tQmg"),x=a("q1tI"),v=a("f8uB"),b=a("vaps"),y=a("ItJP"),Z=a("/npG"),k=(0,Z.k)((e,t)=>{let{opened:a}=t;return{root:{display:"flex",flexDirection:"column",gap:(0,d.h)(8)},targetBtn:{display:"flex",alignItems:"center",gap:(0,d.h)(8),cursor:"pointer"},dropdown:{display:a?"block":"none"},icon:{},arrowIcon:{},targetText:{},scrollThumb:{backgroundColor:"#D9D9D9"}}});let Disclaimer=e=>{let{heading:t,description:a,maxHeight:n,styles:l,className:s,classNames:d}=e,{formatMessage:c}=(0,m.Z)(),[h,g]=(0,x.useState)(!1),{cx:p,classes:u}=k({opened:h},{name:"ClickableSingleBanner__Disclaimer",styles:l,classNames:d});return(0,i.BX)(o.x,{className:p(u.root,s),children:[(0,i.BX)(o.x,{className:u.targetBtn,onClick:()=>g(e=>!e),children:[(0,i.tZ)(v.Z,{size:18,className:u.icon}),(0,i.tZ)(r.T,{size:"s4",className:u.targetText,children:t||c({id:"clickableSingleBanner.disclaimer.heading"})}),(0,i.tZ)(y.Z,{size:18,className:u.arrowIcon})]}),n?(0,i.tZ)(b.x,{mah:n,scrollbarSize:4,classNames:{thumb:u.scrollThumb},children:(0,i.tZ)(r.T,{size:"p5",className:u.dropdown,children:a||c({id:"clickableSingleBanner.disclaimer.description"})})}):(0,i.tZ)(r.T,{size:"p5",className:u.dropdown,children:a||c({id:"clickableSingleBanner.disclaimer.description"})})]})};var S=(0,Z.k)(e=>({root:{backgroundColor:e.colors.blue[0],paddingTop:(0,d.h)(80),paddingBottom:(0,d.h)(80),[e.fn.smallerThan("sm")]:{paddingTop:(0,d.h)(40),paddingBottom:(0,d.h)(40)}},container:{display:"flex",[e.fn.smallerThan("sm")]:{flexDirection:"column",gap:(0,d.h)(24)},[e.fn.largerThan("sm")]:{gap:(0,d.h)(48),justifyContent:"space-between"}},icon:{width:(0,d.h)(64)},iconWrapper:{flexShrink:0},heading:{},info:{display:"flex",gap:(0,d.h)(16),alignItems:"center",[e.fn.largerThan("sm")]:{flexDirection:"column",gap:(0,d.h)(24),alignItems:"flex-start"}},infoTop:{display:"flex",flexDirection:"column",gap:(0,d.h)(24)},infoCol:{display:"flex",flexDirection:"column",gap:(0,d.h)(24),maxWidth:(0,d.h)(360),justifyContent:"space-between"},imgCol:{[e.fn.largerThan("sm")]:{width:"100%",maxWidth:(0,d.h)(648)}},boxFrame:{borderRadius:(0,d.h)(12),[e.fn.largerThan("sm")]:{borderRadius:(0,d.h)(24)}},boxFrameInner:{borderRadius:"inherit"},imgHref:{display:"block"},img:{borderRadius:"inherit"},ctaBtn:{minWidth:(0,d.h)(180)},disclaimerRoot:{},disclaimerTargetBtn:{},disclaimerDropdown:{},disclaimerIcon:{}}));let RiskScreenerLayout=e=>{let{icon:t,title:a,description:x,disclaimer:v,reviewedBy:b,url:y,ctaTitle:Z,ctaFn:k,ctaBtnProps:T,bodyRatio:w=648/486,children:C,styles:N,classNames:I,applyH1:B,...L}=e,D=(0,g.d)(),{locale:M}=(0,p.h)(),{formatMessage:W}=(0,m.Z)(),{classes:V}=S(void 0,{name:"RiskScreenerLayout",styles:N,classNames:I}),E=y&&Z?(0,i.tZ)(o.x,{className:V.ctaBtn,children:(0,i.tZ)(n.B,{fullWidth:!0,variant:"primary",onClick:k,...T,children:Z})}):null,X={heading:(null==v?void 0:v.heading)||"",description:(null==v?void 0:v.description)||"",classNames:{root:V.disclaimerRoot,targetBtn:V.disclaimerTargetBtn,dropdown:V.disclaimerDropdown,icon:V.disclaimerIcon}};return(0,i.tZ)(o.x,{className:V.root,styles:N,...L,children:(0,i.BX)(h.W,{className:V.container,children:[(0,i.BX)(o.x,{className:V.infoCol,children:[(0,i.BX)(o.x,{className:V.infoTop,children:[(0,i.BX)(o.x,{className:V.info,children:[t&&(0,i.tZ)(o.x,{className:V.iconWrapper,children:(0,i.tZ)("img",{src:t,alt:a,loading:"lazy",className:V.icon,onError:e=>{e.currentTarget.style.display="none"}})}),a&&(0,i.tZ)(r.T,{size:"h1",as:B?"h1":"h2",className:V.heading,children:a})]}),x&&(0,i.tZ)(r.T,{size:"p3",children:x}),!D&&E,(null==b?void 0:b.reviewer)&&(0,i.BX)(s.k,{gap:12,sx:e=>({alignItems:"center",[e.fn.smallerThan("sm")]:{position:"relative",zIndex:1,alignItems:"flex-start"}}),children:[(0,i.tZ)(o.x,{children:(0,i.tZ)(l.A,{size:32,src:b.avatar,withIndicator:!0,indicatorConfig:{size:18,label:(0,i.tZ)("img",{loading:"lazy",width:"16",src:"".concat(u.Nr,"/reviewer-medical.svg"),alt:""})},styles:{root:{".mantine-Indicator-indicator":{bottom:"7px",right:"5px"},".mantine-Avatar-placeholder":{border:0}}}})}),(0,i.BX)(r.T,{size:D?"p3":"p4",color:"gray.6",as:"div",sx:e=>({lineHeight:"".concat((0,d.h)(24),"!important"),[e.fn.largerThan("sm")]:{div:{display:"inline"}}}),children:[(0,i.BX)("div",{children:[W({id:"articlePage.reviewed.factCheck"},{name:(0,i.BX)("div",{children:[(0,i.tZ)("a",{href:b.link||"#",style:{color:"#262626"},children:b.reviewer}),!D&&b.date&&" • "]})})," "]}),b.date&&(0,i.tZ)("div",{children:(0,f.m)(b.date,M)})]})]})]}),!D&&(null==v?void 0:v.heading)&&(null==v?void 0:v.description)&&(0,i.tZ)(Disclaimer,{maxHeight:90,...X})]}),(0,i.tZ)(o.x,{className:V.imgCol,children:"none"===w?(0,i.tZ)(o.x,{className:V.boxFrame,children:(0,i.tZ)(o.x,{className:V.boxFrameInner,children:C})}):(0,i.tZ)(c.o,{ratio:w,className:V.boxFrame,children:(0,i.tZ)(o.x,{className:V.boxFrameInner,children:C})})}),D&&(null==v?void 0:v.heading)&&(null==v?void 0:v.description)&&(0,i.BX)(i.HY,{children:[E,(0,i.tZ)(Disclaimer,{...X})]})]})})}},iI4N:function(e,t,a){a.d(t,{_:function(){return ScheduleEvent}});var i,n,r=a("BGKE"),l=a("q1tI"),o=a("0TCZ"),s=a("P5LW");(i=n||(n={})).LIVED="lived",i.LIVE="live",i.COMMING_SOON="comming",i.NOT_YET="notyet",i.NEAREST_COMMING="nearest_comming";let d="YYYY-MM-DD HH:mm:ss",c=(0,l.createContext)({});var m=a("hXNO"),h=a("NGsg"),g=a("oZWv"),p=a("R3fp"),u=a("Eso5"),f=a("25AQ"),x=a("Wgwc"),v=a.n(x),b=a("/npG"),y=(0,b.k)(e=>({root:{},body:{overflow:"hidden",paddingLeft:80,paddingTop:40},bodyInner:{display:"flex",flexDirection:"column",gap:40,backgroundColor:"#EDF4FF",borderRadius:24,padding:24,position:"relative","&:before, &:after":{content:'""',position:"absolute",left:42,top:40,bottom:30,width:4,backgroundColor:e.colors.neutral[1],transition:"height .3s ease"}},title:{textTransform:"capitalize",paddingLeft:64},group:{display:"flex",flexDirection:"column",gap:40,position:"relative",zIndex:1},header:{display:"flex",gap:24,alignItems:"center",justifyContent:"space-between"},headerLeft:{display:"flex",gap:24,alignItems:"center"},heading:{textTransform:"capitalize"},icon:{position:"relative",width:40,height:40,borderRadius:"100%",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",backgroundImage:"linear-gradient(139.59deg, #FFE16B 2.87%, #FFBA0F 58.46%, #FB8908 89.05%)"},cardWrapper:{position:"relative",paddingLeft:64},card:{position:"relative","&:before, &:after":{content:'""',position:"absolute",top:24,left:-51,width:12,height:12,borderRadius:"100%",backgroundImage:"linear-gradient(139.59deg, #FFE16B 2.87%, #FFBA0F 33.47%, #FB8908 89.05%)"}},desc:{position:"sticky",paddingTop:40,paddingBottom:40,top:56,left:0,display:"flex",flexDirection:"column",gap:24,width:256,float:"left"},listing:{display:"flex",flexDirection:"column",gap:40},info:{display:"flex",flexDirection:"column",gap:8},maskcot:{display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",backgroundColor:"#EDF4FF",width:120,height:120,img:{maxWidth:96,maxHeight:96}}})),Z=a("RZSM"),k=a("S3OL"),S=(0,b.k)(e=>({root:{borderRadius:8,border:"1px solid ".concat(e.colors.neutral[1]),boxShadow:e.shadows.sm,backgroundColor:"#fff"},info:{display:"flex",flexDirection:"column",padding:16,gap:12,[e.fn.smallerThan("sm")]:{},[e.fn.largerThan("sm")]:{width:320,flexShrink:0,justifyContent:"space-between",borderTopLeftRadius:"inherit",borderBottomLeftRadius:"inherit"}},topInfo:{display:"flex",flexDirection:"column",gap:8,alignItems:"flex-start"},countdown:{width:"100%",[e.fn.largerThan("sm")]:{order:2}},title:{[e.fn.smallerThan("sm")]:{textAlign:"center"},[e.fn.largerThan("sm")]:{order:1}},thumbFrame:{"&, *, img":{borderRadius:"inherit"}},thumbImg:{borderRadius:"inherit",display:"block"},action:{[e.fn.largerThan("sm")]:{display:"flex",alignItems:"center",justifyContent:"space-between"}}}));let EventCard=e=>{let{startCountdown:t,className:a,classNames:i,styles:n,item:l,...o}=e,{title:s,state:d,bannersDesktop:c,bannersMobile:h}=l,g=(0,m.d)(),{classes:p,cx:f}=S(void 0,{name:"ScheduleEvent__EventCard",styles:n,classNames:i});return(0,r.tZ)(u.x,{"data-status":d,className:f(a,p.root,"event-card"),...o,children:(0,r.tZ)(Z.o,{ratio:g?1:664/206,className:f("thumb-frame",p.thumbFrame),children:(0,r.tZ)(k.R,{src:g?h:c,alt:s||"",loading:"lazy",className:p.thumbImg,fill:!0})})})},DesktopLayout=e=>{let{groupByMothList:t,styles:a,classNames:i,className:n}=e,{maskcot:o,wrapperProps:d}=(0,l.useContext)(c),{locale:m}=(0,s.h)(),{classes:x,cx:b}=y(void 0,{name:"ScheduleEvent__EventList-GroupByStatus--Desktop",styles:a,classNames:i});return(0,r.BX)(u.x,{className:b(n,x.root),children:[(0,r.BX)(u.x,{className:x.desc,children:[(0,r.tZ)(u.x,{className:b(x.maskcot),children:(0,r.tZ)("img",{src:o,alt:"maskcot",loading:"lazy"})}),(0,r.BX)(u.x,{className:x.info,children:[(0,r.tZ)(g.T,{size:"h2",children:d.title}),(0,r.tZ)(g.T,{size:"p3",children:d.description})]})]}),(0,r.tZ)(u.x,{className:x.body,children:(0,r.tZ)(u.x,{className:x.bodyInner,children:t.monthArr.map(e=>{let a=t.listing[e]||[];return(0,r.BX)(u.x,{className:b(x.group),children:[(0,r.tZ)(u.x,{className:x.header,children:(0,r.BX)(u.x,{className:x.headerLeft,children:[(0,r.tZ)(u.x,{className:b(x.icon),children:(0,r.tZ)(p.Z,{size:24,color:"currentColor"})}),(0,r.tZ)(g.T,{size:"h2",as:"h2",className:x.heading,children:(0,f.Z)(new Date(2020,v()(e,"MM-YYYY").month(),1),"MMMM",{locale:h.j[m]})})]})}),(0,r.tZ)(u.x,{className:x.listing,children:a.map((e,t)=>(0,r.tZ)(u.x,{className:b(x.cardWrapper),children:(0,r.tZ)(EventCard,{item:e,className:b(x.card)})},t))})]},e)})})})]})};var T=a("rlLN"),w=(0,b.k)(e=>({root:{display:"flex",flexDirection:"column",gap:24},body:{},bodyInner:{},title:{textTransform:"capitalize",paddingLeft:64},group:{},heading:{textTransform:"capitalize"},card:{},listing:{display:"flex",flexDirection:"column",gap:40},info:{display:"flex",flexDirection:"column",gap:8},calendarImg:{display:"block"},monthGroup:{},monthList:{display:"flex"},monthItem:{flexGrow:1,backgroundColor:e.colors.neutral[0],height:52,borderRadius:0,paddingLeft:4,paddingRight:4,".text":{color:e.colors.neutral[5],textTransform:"capitalize"},"&,&:active":{border:"1px solid ".concat(e.colors.neutral[1]),borderTop:0},"&[data-active]":{"&,&:active":{backgroundColor:"#FFF5DC",borderLeftColor:"#FFE299",borderBottomColor:"#FFE299",borderRightColor:e.colors.neutral[1],".text":{color:"#262626"}}}}})),C=a("Y5X8");function hasCommingCountdown(e){if(!e||!e.countdownStart)return!1;let t=v()(e.countdownStart,d).toDate();return e.state===n.NOT_YET&&v()().isAfter(t)}var N=a("raAP"),I=a("SjA+"),B=a("TYy9"),L=a.n(B);let MobileLayout=e=>{let{groupByMothList:t,styles:a,classNames:i,className:n}=e,{wrapperProps:o}=(0,l.useContext)(c),{locale:d}=(0,s.h)(),{classes:m,cx:p}=w(void 0,{name:"ScheduleEvent__EventList-GroupByStatus--Desktop",styles:a,classNames:i}),[x,b]=(0,l.useState)(t.monthArr[0]),[y,Z]=(0,l.useState)(null),k=(0,N.U)(),S=(0,l.useMemo)(()=>{let e=t.monthArr.slice(0,3),a=0,i={},n=L()(e.map((e,n)=>{i[e]=n+a;let r=t.listing[e]||[];return a=a+r.length-1,r}));return{monthList:e,listing:n,indexOfMonth:i}},[t]);return console.log({formatedList:S}),(0,r.BX)(u.x,{className:p(n,m.root),children:[(0,r.BX)(u.x,{className:m.info,children:[(0,r.tZ)(g.T,{size:"h2",children:o.title}),(0,r.tZ)(g.T,{size:"p3",children:o.description})]}),(0,r.tZ)(u.x,{className:m.body,children:(0,r.tZ)(u.x,{className:m.bodyInner,children:(0,r.BX)(T.m,{classNames:{tab:m.monthItem},value:x,keepMounted:!0,onTabChange:e=>{b(e),e&&(null==y||y.scrollTo(S.indexOfMonth[e])),e&&console.log({v:e,index:S.indexOfMonth[e]})},styles:{root:{position:"relative",display:"flex",flexDirection:"column",gap:24},tabsList:{borderBottom:0},tab:{"&[data-active],&:focus":{borderColor:"transparent",outline:0}},panel:{display:"block !important",transition:"opacity 0.2s ease","&.inactive":{position:"absolute",top:0,left:0,right:0,opacity:0,zIndex:0},"&.active":{position:"relative",zIndex:1}}},children:[(0,r.tZ)(T.m.List,{children:(0,r.BX)(u.x,{className:m.monthGroup,children:[(0,r.tZ)("img",{src:C.C.getAssetPath("tiki/calendar-bar.png"),className:m.calendarImg,alt:"calendar",loading:"lazy"}),(0,r.tZ)(u.x,{className:m.monthList,children:S.monthList.map((e,t)=>{let a=(0,f.Z)(new Date(2020,v()(e,"MM-YYYY").month(),1),"MMMM",{locale:h.j[d]});return(0,r.tZ)(T.m.Tab,{value:e,className:p(Number(e)===Number(v()().format("MM"))?"active":"",m.monthItem),"data-event-category":"Service Connection","data-event-action":"Livestream Schedule - ".concat(a),"data-event-label":k,children:(0,r.tZ)(g.T,{size:"s1",className:"text",children:a})},t)})})]})}),(0,r.tZ)(u.x,{sx:{position:"relative"},children:(0,r.BX)(u.x,{className:p(m.group),children:[(0,r.tZ)(I.Y,{percentOfEndSlideMobile:85,onSlideChange:e=>{var t;return b((null===(t=S.listing[e])||void 0===t?void 0:t.monthKey)||null)},carouselSetting:{getEmblaApi:Z},children:(0,r.tZ)(I.Y.Slider,{styles:()=>({progressRoot:{display:"none"}}),children:S.listing.map((e,t)=>(0,r.tZ)(EventCard,{item:e,classNames:{root:m.card}},t))})}),(0,r.tZ)(u.x,{className:m.listing})]})})]})})})]})},GroupByStatus=e=>{let{listEvent:t=[],...a}=e,i=(0,m.d)(),n=(0,l.useMemo)(()=>{let e=function(e){let t={};return e.map(e=>{let a=v()(e.startDate,d).format("MM-YYYY"),i={...e,monthKey:a};if(Object.keys(t).includes(a)){let e=t[a]||[];t[a]=[...e,i]}else t[a]=[i]}),t}(t);return{listing:e,monthArr:Object.keys(e),monthLength:Object.keys(e).length}},[t]);return i?(0,r.tZ)(MobileLayout,{groupByMothList:n,...a}):(0,r.tZ)(DesktopLayout,{groupByMothList:n,...a})};var D=(0,b.k)(e=>({root:{[e.fn.largerThan("sm")]:{paddingTop:0}}})),M=a("kZvb");let EventList=e=>{let{className:t,classNames:a,styles:i}=e,{listEvent:o=[],wrapperProps:s}=(0,l.useContext)(c),{classes:d,cx:m}=D(void 0,{name:"ScheduleEvent__EventList",styles:i,classNames:a}),h=(0,l.useMemo)(()=>o.filter(e=>e.state===n.NOT_YET),[o]);return h.length>0?(0,r.tZ)(M.Z,{className:m(t,d.root),...s,title:"",description:"",children:(0,r.tZ)(GroupByStatus,{listEvent:h})}):null};var W=a("XDLp"),V=a("SPK5"),E=a("dDsW"),X=a("eDIe"),z=a("5SlL"),R=a("nYOs"),F=a("UcrG"),_=a("rIrU"),G=(0,b.k)(e=>({thumbFrame:{cursor:"pointer",[e.fn.smallerThan("sm")]:{width:"100%"},flexGrow:1,"&, img":{borderRadius:8}},img:{display:"block"}}));let Banner=e=>{let{event:t,status:a,handleOnClick:i,...n}=e,l=(0,m.d)(),{classes:o}=G(void 0,{name:"ScheduleEvent__UpcommingBanner__Banner"});return(0,r.tZ)(u.x,{component:"a",href:"live"===a?t.ctaUrl:"#",target:"_blank",className:o.thumbFrame,...n,onClick:e=>{e.preventDefault(),i(t,a)},children:(0,r.tZ)(Z.o,{ratio:l?1:3.25,children:(0,r.tZ)(k.R,{alt:t.title||"",src:l?t.bannersMobile:t.bannersDesktop,loading:"lazy",className:o.img,fill:!0})})})};var O=a("mYVa");let A={fontSize:40,fontWeight:750,color:"#fff",textShadow:"rgb(43, 191, 255) 0px 0px 0px, 0.5px 1px 2px #663C1D"};var Y=(0,b.k)((e,t)=>{let{isLiveEvent:a,isEndLive:i}=t;return{root:{display:"flex",gap:40,alignItems:"center",[e.fn.smallerThan("sm")]:{flexDirection:"column",justifyContent:"center",gap:16}},heading:{fontSize:24,lineHeight:(0,O.h)(32),fontWeight:700,textAlign:"center",marginBottom:8,color:e.colors.gray[7],[e.fn.largerThan("sm")]:{fontSize:26,lineHeight:(0,O.h)(36)}},info:{display:"flex",flexDirection:"column",justifyContent:"center",gap:24,[e.fn.largerThan("sm")]:{width:360},[e.fn.smallerThan("sm")]:{width:"100%"}},topInfo:{display:"flex",flexDirection:"column",justifyContent:"center"},thumbFrame:{cursor:"pointer",[e.fn.smallerThan("sm")]:{width:"100%"},flexGrow:1,"&, img":{borderRadius:8}},statusBar:{display:"flex",alignItems:"center",backgroundImage:i?"linear-gradient(139.59deg, #BFC5CC 2.87%, #87909C 89.05%)":a?"linear-gradient(271.93deg, #E64728 25.89%, #FC8A09 131.8%)":"linear-gradient(139.59deg, #FFE16B 2.87%, #FFBA0F 58.46%, #FB8908 89.05%)",justifyContent:"center",height:76,marginTop:-10,borderRadius:12},liveBar:{display:"flex",alignItems:"center",gap:16},liveText:{color:"#fff",textTransform:"uppercase",fontSize:24,fontWeight:700,textShadow:"rgb(43, 191, 255) 0px 0px 0px, 0.5px 1px 2px #663C1D",[e.fn.largerThan("sm")]:{fontSize:32}},timer:{background:"transparent"},timerItem:{background:"transparent",width:50,height:"auto"},timerText:{...A},timerDivider:{...A,padding:"0 5px",marginTop:-5},timerUnit:{textTransform:"uppercase",fontSize:(0,O.h)(12),color:"#fff",fontWeight:700},announceText:{color:"#fff",fontWeight:800,fontSize:18,textTransform:"uppercase"},action:{display:"flex",justifyContent:"center",[e.fn.smallerThan("sm")]:{display:"none"}},btn:{backgroundColor:"#FB8908 !important",height:48,[e.fn.smallerThan("sm")]:{fontSize:14,paddingLeft:0,paddingRight:0,textAlign:"center"}},sticky:{position:"fixed",bottom:0,left:0,right:0,zIndex:3,backgroundColor:"rgba(255,255,255,0.95)",backdropFilter:"blur(8px)",padding:16,display:"flex",gap:8,".action-btn":{width:"100%"}},share:{width:48,flexShrink:0}}});let j=["lived","about-lived"],HighlightEvent=e=>{var t,i;let{className:o,styles:g,classNames:p}=e,{locale:x}=(0,s.h)(),{formatMessage:b}=(0,E.Z)(),{applyH1:y,listEvent:k,openLeadModal:S,setCampaign:T,setHighlightEvent:w}=(0,l.useContext)(c),I=(0,m.d)(),B=(0,N.U)(),[L,D]=(0,l.useState)(null),G=(0,l.useMemo)(()=>k.filter(e=>e.state===n.LIVE||e.state===n.NOT_YET),[]),[O,A]=(0,l.useState)((()=>{let e=null==G?void 0:G[0];return{event:e,isLive:(null==e?void 0:e.state)===n.LIVE,isComming:(null==e?void 0:e.state)===n.NOT_YET,hasCountdownNow:hasCommingCountdown(e)}})()),[H,P]=(0,l.useState)(O.isLive?"live":O.isComming&&O.hasCountdownNow?"commingWithCountDown":O.isComming?"comming":"lived"),{classes:K,cx:U}=Y({isLiveEvent:"live"===H,isEndLive:j.includes(H)},{name:"ScheduleEvent__HighlightEvent",styles:g,classNames:p});(0,l.useEffect)(()=>{Promise.all([a.e(4846),a.e(2233),a.e(1058),a.e(3295),a.e(1538),a.e(6629),a.e(7152),a.e(5684),a.e(2574),a.e(9884),a.e(7644),a.e(6962),a.e(4050),a.e(6638),a.e(7741),a.e(1137),a.e(2433),a.e(9689),a.e(5385),a.e(3564),a.e(7082),a.e(3158),a.e(8320),a.e(5641),a.e(7454),a.e(7004),a.e(4758),a.e(6219),a.e(17),a.e(8990),a.e(4067),a.e(9487),a.e(9083),a.e(1520),a.e(270),a.e(7596),a.e(8217),a.e(7543),a.e(2835),a.e(2507),a.e(6885),a.e(7859),a.e(5970),a.e(2730),a.e(6287),a.e(7682),a.e(1551),a.e(4870),a.e(9922),a.e(3133),a.e(612),a.e(2002),a.e(1880),a.e(7471),a.e(7165),a.e(5451),a.e(8612)]).then(a.t.bind(a,"S4a3",19)).then(e=>{D(e.default)})},[]);let q=(0,l.useCallback)((e,t)=>{"live"===t||"lived"===t?e.ctaUrl&&window.open(e.ctaUrl):S()},[]),J=(0,l.useMemo)(()=>{var e,t;return(0,r.tZ)(W.B,{size:"lg",variant:"primary",className:"action-btn",classNames:{root:K.btn},rightIcon:(0,r.tZ)(z.Z,{size:18,color:"#FB8908"}),"data-event-category":"Service Connection","data-event-action":"live"===H?"Watch Livestream Button":"Leadgen Livestream Button","data-event-label":B,onClick:()=>q(O.event,H),children:b({id:"live"===H||"lived"===H?(null===(e=O.event)||void 0===e?void 0:e.ctaTitle)||"common.clickToPlay":(null===(t=O.event)||void 0===t?void 0:t.leadgenCampaign.ctaTitle)||"common.registerToPlayNow"})})},[H]);return((0,l.useEffect)(()=>{(O.isLive||O.isComming)&&w(O.event)},[]),(0,l.useEffect)(()=>{if("comming"===H||"commingWithCountDown"===H)fetch(_.ENV.NEXT_PUBLIC_LEAD_API+"api/campaign/"+String(_.CX[x].SITE_ID||1),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{var t;T(((null===(t=e._data)||void 0===t?void 0:t.campaigns)||[]).find(e=>e.code===O.event.leadgenCampaign.code))});else if("about-lived"===H){let e=function(e,t){let a=t.findIndex(t=>t.id===e.id);return t[a]}(O.event,k);e?(P(hasCommingCountdown(e)?"commingWithCountDown":"comming"),A({event:e,isLive:e.state===n.LIVE,isComming:e.state===n.NOT_YET,hasCountdownNow:hasCommingCountdown(e)})):P("lived")}},[H]),O.event)?(0,r.BX)(r.HY,{children:[(0,r.tZ)(M.Z,{title:"",description:"",styles:e=>({root:{background:j.includes(H)?e.colors.neutral[0]:"#FFFAED",[e.fn.smallerThan("sm")]:{paddingTop:24}}}),children:(0,r.BX)(u.x,{className:U(o,K.root),children:[(0,r.BX)(u.x,{className:K.info,children:[(0,r.BX)(u.x,{className:K.topInfo,children:[("commingWithCountDown"===H||"comming"===H)&&(0,r.tZ)(u.x,{component:y?"h1":"div",className:K.heading,children:"Đ\xf3n xem livestream"}),(0,r.BX)(Z.o,{ratio:512/68,children:[(0,r.tZ)("img",{src:C.C.getAssetPath("tiki/annouce-bar.png"),alt:O.event.title,loading:"lazy"}),(0,r.tZ)(V.k,{align:"center",justify:"center",sx:{paddingBottom:8},children:(0,r.tZ)(u.x,{className:K.announceText,children:(0,f.Z)(v()(null===(t=O.event)||void 0===t?void 0:t.startDate,"YYYY-MM-DD HH:mm").toDate(),"eeee, dd.MM.yyyy",{locale:h.j[x]})})})]}),(0,r.tZ)(u.x,{className:K.statusBar,sx:{position:"relative"},children:"comming"===H?(0,r.BX)(r.HY,{children:[(0,r.tZ)(u.x,{className:K.liveBar,children:(0,r.tZ)(u.x,{className:K.liveText,children:b({id:"common.livestreamIsComming"})})}),(0,r.tZ)(F.W,{endDate:v()(O.event.countdownStart||O.event.startDate,d).toDate(),onEnd:()=>{P(O.event.countdownStart?"commingWithCountDown":"live"),w(O.event)},styles:{root:{display:"none"}}})]}):"commingWithCountDown"===H?(0,r.tZ)(F.W,{hasUnit:!0,endDate:v()(null===(i=O.event)||void 0===i?void 0:i.startDate,d).toDate(),classNames:{root:K.timer,item:K.timerItem,divider:K.timerDivider,text:K.timerText,unit:K.timerUnit},onEnd:()=>P("live"),styles:{root:{height:62},heading:{display:"none"}}}):"live"===H?(0,r.BX)(r.HY,{children:[(0,r.BX)(u.x,{className:K.liveBar,children:[L&&(0,r.tZ)(R.Z,{animationData:L,style:{width:24,height:24},loop:!0}),(0,r.tZ)(u.x,{className:K.liveText,children:b({id:"common.livestreamIsLive"})})]}),(0,r.tZ)(F.W,{endDate:v()(O.event.endDate,d).toDate(),onEnd:()=>P("about-lived"),styles:{root:{display:"none"}}})]}):"lived"===H?(0,r.tZ)(r.HY,{children:(0,r.tZ)(u.x,{className:K.liveBar,children:(0,r.tZ)(u.x,{className:K.liveText,children:b({id:"common.ended"})})})}):null})]}),(0,r.tZ)(u.x,{className:K.action,children:J})]}),(0,r.tZ)(Banner,{status:H,event:O.event,handleOnClick:q,"data-event-category":"Service Connection","data-event-action":O.isLive?"Watch Livestream Banner":"Leadgen Livestream Banner","data-event-label":B})]})}),I&&(0,r.BX)(u.x,{className:K.sticky,children:[(0,r.tZ)(W.B,{size:"lg",variant:"tertiary",leftIcon:(0,r.tZ)(X.Z,{size:18,isOutline:!0}),className:K.share,"data-event-category":"Service Connection","data-event-action":"Share Livestream Button","data-event-label":B,onClick:()=>{var e;return navigator.share({url:B,title:"Đ\xf3n xem livestream ".concat(v()(null===(e=O.event)||void 0===e?void 0:e.startDate,"YYYY-MM-DD HH:mm").format("DD.MM.YYYY"))})}}),J]})]}):null};var H=a("k8Y/"),P=a.n(H),K=a("OB5W"),U=a("HC7W"),q=(0,b.k)(e=>({leadWrapper:{[e.fn.smallerThan("sm")]:{padding:0},[e.fn.largerThan("sm")]:{padding:"60px 0",backgroundImage:"linear-gradient(139.59deg, #182EF3 2.87%, #021575 89.05%)",position:"relative","&:before,&:after":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:0,backgroundRepeat:"no-repeat",backgroundPosition:"top"},"&:before":{backgroundImage:"url(".concat(C.C.getAssetPath("tiki/top-bg.png"),")"),backgroundSize:"contain"},"&:after":{backgroundImage:"url(".concat(C.C.getAssetPath("tiki/icon-bg.png"),")"),backgroundSize:"95%"}},".mantine-LeadgenWithBanner-root":{position:"relative",zIndex:1}},leadRoot:{backgroundColor:"#fff !important",[e.fn.largerThan("sm")]:{paddingBottom:0,backgroundColor:"transparent !important"}},leadModalRoot:{ref:(0,U.A)("leadModalRoot"),".form-wrapper":{},".action-list":{display:"flex",justifyContent:"flex-end"},".banner-img":{[e.fn.largerThan("sm")]:{maxHeight:600}},".banner-wrapper,.form-wrapper":{flex:"none"},".mantine-Form-container":{justifyContent:"space-evenly"}},leadModalWrapper:{".banner-img":{maxHeight:500,maxWidth:450},".mantine-Form-container":{height:560},".mantine-Form-formFrame":{maxWidth:416},".mantine-Form-formSubmitBtnWrapper":{},".mantine-SuccessBox-description":{textAlign:"left"},".mantine-SuccessBox-img":{height:120}},leadInlineRoot:{backgroundColor:"#fff !important",[e.fn.smallerThan("sm")]:{padding:"0 !important",".banner-wrapper":{marginLeft:-16,marginRight:-16}},[e.fn.largerThan("sm")]:{backgroundColor:"transparent !important",padding:0},".banner-wrapper,.form-wrapper":{flex:"none"},".action-list":{display:"flex",justifyContent:"flex-end"},".banner-img":{[e.fn.largerThan("sm")]:{}},".mantine-SuccessBox-description":{textAlign:"left"}},leadFormFrame:{[e.fn.smallerThan("sm")]:{background:"#fff",padding:0,paddingBottom:16},[e.fn.largerThan("sm")]:{maxWidth:456}}})),J=(0,b.k)(e=>({root:{padding:60,[e.fn.smallerThan("sm")]:{padding:0}},wrapper:{display:"flex",flexDirection:"column",alignItems:"center",gap:24,position:"relative",padding:"0 0 24px 0",[e.fn.largerThan("sm")]:{padding:"0 80px",backgroundImage:"linear-gradient(90deg, rgba(180, 214, 249, 0) 0%, rgba(180, 214, 249, 0.25) 50.5%, rgba(180, 214, 249, 0) 100%)"}},border:{[e.fn.smallerThan("sm")]:{display:"none"},[e.fn.largerThan("sm")]:{position:"relative",width:"100%","&:before":{content:'""',position:"absolute",left:0,right:0,height:2,top:1,backgroundImage:"linear-gradient(90deg, rgba(32, 202, 255, 0) 0%, #20CAFF 54.74%, rgba(32, 202, 255, 0) 110.59%)"},"&:after":{content:'""',height:4,width:"100%",filter:"blur(8px)",display:"block",backgroundImage:"linear-gradient(90deg, rgba(32, 202, 255, 0) 0%, #20CAFF 54.74%, rgba(32, 202, 255, 0) 110.59%)"}}},ruleBoxTitle:{color:"#fff"},header:{textAlign:"center",padding:"12px 24px",boxShadow:"2px 4px 8px 0px #031676",borderRadius:24,position:"relative",backgroundImage:"linear-gradient(162.6deg, #20CAFF -3.27%, #4297FC 113.89%)","&:before":{content:'""',position:"absolute",borderRadius:"inherit",top:1,left:1,right:1,bottom:1,zIndex:0,backgroundColor:"#0C2498"}},heading:{position:"relative",fontSize:32,lineHeight:"40px",textTransform:"uppercase",color:"#fff",backgroundImage:"linear-gradient(350.43deg, #FFE16B -30.23%, #FFFFFF 90.17%)",backgroundClip:"text","-webkit-text-fill-color":"transparent",textShadow:"1px 2px 4px 0px #000622"},listing:{display:"flex",[e.fn.smallerThan("sm")]:{flexDirection:"column",gap:16},[e.fn.largerThan("sm")]:{gap:80}},item:{display:"flex",flexDirection:"column",gap:8,position:"relative",color:"#fff",p:{margin:"10px 0"},[e.fn.smallerThan("sm")]:{paddingLeft:24,"&:before":{content:'""',position:"absolute",top:18,left:0,width:8,height:8,borderRadius:"50%",backgroundImage:"linear-gradient(139.59deg, #FFE16B 2.87%, #FFBA0F 58.46%, #FB8908 89.05%)"}},[e.fn.largerThan("sm")]:{"&:before":{content:'""',position:"absolute",top:"50%",transform:"translate(0, -50%)",left:-40,height:"50%",maxHeight:80,width:1,background:e.colors.neutral[1]},"&:first-child":{"&:before":{content:"none"}}}},bannerWrapper:{[e.fn.smallerThan("sm")]:{margin:"0 -10px 0 -16px"},[e.fn.largerThan("sm")]:{display:"none"}},banner:{display:"block"}}));let GameRules=e=>{let{className:t,classNames:a,styles:i,...n}=e,{wrapperProps:o}=(0,l.useContext)(c),{classes:s}=J(void 0,{name:"ScheduleEvent__GameRules",styles:i,classNames:a});return(0,r.tZ)(M.Z.Wrapper,{className:t,classNames:{root:s.root},...o,children:(0,r.BX)(u.x,{className:s.wrapper,...n,children:[(0,r.tZ)(u.x,{className:s.border}),(0,r.tZ)(u.x,{className:s.bannerWrapper,children:(0,r.tZ)("img",{src:C.C.getAssetPath("tiki/game-rules.png"),loading:"lazy",className:s.banner,alt:"THỂ LỆ MINI GAME"})}),(0,r.tZ)(u.x,{className:s.header,children:(0,r.tZ)("h3",{className:s.heading,children:"THỂ LỆ MINIGAME"})}),(0,r.BX)(u.x,{className:s.listing,children:[(0,r.tZ)(g.T,{size:"p3",className:s.item,as:"div",children:(0,r.tZ)("div",{dangerouslySetInnerHTML:{__html:"

200 bạn may mắn đăng k\xfd đầu ti\xean sẽ được nhận m\xe3 Coupon th\xf4ng qua tin nhắn của HelloBACSI.

Ngo\xe0i ra, HelloBACSI sẽ gửi tin nhắn SMS nhắc nhở k\xe8m đường dẫn xem livestream 15 ph\xfat trước khi chương tr\xecnh bắt đầu cho c\xe1c bạn đăng k\xfd th\xe0nh c\xf4ng.

"}})}),(0,r.tZ)(g.T,{size:"p3",className:s.item,as:"div",children:(0,r.tZ)("div",{dangerouslySetInnerHTML:{__html:"

Trị gi\xe1 coupon: Giảm 50% tối đa 100K \xe1p dụng cho to\xe0n bộ sản phẩm tại Tiki.vn. Mỗi bạn c\xf3 1 m\xe3 ri\xeang, 1 số điện thoại chỉ nhận được 1 m\xe3 duy nhất.

\n

Thời hạn sử dụng coupon: 01.11.2024 - 14.11.2024.

"}})})]}),(0,r.tZ)(u.x,{className:s.border})]})})};var Q=(0,l.forwardRef)((e,t)=>{let{campaign:a,event:i,styles:n,classNames:l}=e,{classes:o,theme:s}=q(void 0,{name:"ScheduleEvent___LeadgenSection",styles:n,classNames:l}),d={isSkippable:!0,campaignCode:a.code,banner:{desktop:(null==i?void 0:i.leadgenCampaign.bannerDesktop)||"",mobile:(null==i?void 0:i.leadgenCampaign.bannerMobile)||""},thankYouMessage:(()=>{var e,t,i,n,r;let l=JSON.parse((null===(e=a.extra_fields)||void 0===e?void 0:e.listBlockThankyou)||null);return{title:(null==l?void 0:null===(i=l.find(e=>"TitleBlock"==e.name))||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.value)||"",description:(null==l?void 0:null===(r=l.find(e=>"SubtitleBlock"==e.name))||void 0===r?void 0:null===(n=r.data)||void 0===n?void 0:n.value)||""}})(),campaigns:a};return(0,r.BX)(r.HY,{children:[i.leadgenCampaign.enableLeadgenInline&&(0,r.BX)(u.x,{className:o.leadWrapper,children:[(0,r.tZ)(K.Z,{classNames:{root:o.leadInlineRoot,formFrame:o.leadFormFrame},scrollable:!0,data:d}),(0,r.tZ)(GameRules,{styles:{root:{[s.fn.smallerThan("sm")]:{backgroundImage:"linear-gradient(139.59deg, #2338F7 2.87%, #021575 89.05%)"},[s.fn.largerThan("sm")]:{paddingBottom:0}}}})]}),(0,r.tZ)(K.Z,{isModal:!0,scrollable:!0,desktopModalType:"normal",mobileModalType:"drawer",ref:t,classNames:{root:o.leadModalRoot,formFrame:o.leadFormFrame,wrapper:o.leadModalWrapper},data:d})]})});let ScheduleEvent=e=>{let{locale:t}=(0,s.h)(),{listEvent:a,wrapperProps:i}=e,m=(0,l.useMemo)(()=>{let e=a.map(e=>({...e,timestamp:v()(e.startDate,d).unix()}));return P()(e,["timestamp"],["asc"])},[a]),[g,p]=(0,o.n)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.map((e,a)=>{var i,r;let l=(i=v()(e.startDate,d).toDate(),r=v()(e.endDate,d).toDate(),v()().isAfter(r)?n.LIVED:v()().isBetween(i,r)?n.LIVE:n.NOT_YET),o={...e,state:l,title:(0,f.Z)(v()(e.startDate,d).toDate(),"HH:mm - eeee, dd.MM.YYY",{locale:h.j[t]}),episode:a+1};return o})}(m,t)),[u,x]=(0,l.useState)(),[b,y]=(0,l.useState)(null),Z=(0,l.useRef)(),k=(0,l.useCallback)(()=>{var e;null==Z||null===(e=Z.current)||void 0===e||e.openModal()},[]),S=(0,l.useCallback)(e=>{let t=a.findIndex(t=>t.id===e.id);t>-1&&p.setItemProp(t,"state",n.LIVED)},[g]),T=(0,l.useCallback)(e=>{let t=a.findIndex(t=>t.id===e.id);t>-1&&p.setItemProp(t,"state",n.LIVE)},[g]);return(0,l.useEffect)(()=>{setTimeout(()=>k(),1e3)},[]),(0,l.useEffect)(()=>{p.filter(e=>e.id!==(null==b?void 0:b.id)),x(null)},[b]),(0,r.BX)(c.Provider,{value:{...e,listEvent:g,wrapperProps:i,changeToLivedEvent:S,changeToLiveEvent:T,openLeadModal:k,campaign:u,setCampaign:x,highlightEvent:b,setHighlightEvent:y},children:[(0,r.tZ)(HighlightEvent,{}),(0,r.tZ)(EventList,{}),u&&b&&(0,r.tZ)(Q,{ref:Z,event:b,campaign:u})]})}},kZvb:function(e,t,a){a.d(t,{Z:function(){return u}});var i=a("BGKE"),n=a("oZWv"),r=a("Eso5"),l=a("RZSM"),o=a("SPK5"),s=a("hXNO"),d=a("/npG"),c=(0,d.k)(e=>({root:{"&.with-icon-style":{display:"flex",gap:16,[e.fn.smallerThan("sm")]:{gap:8,flexDirection:"column"},".inner":{display:"flex",gap:16,alignItems:"flex-start",[e.fn.smallerThan("sm")]:{alignItems:"center"}},".info":{display:"flex",flexDirection:"column",gap:4,[e.fn.largerThan("sm")]:{"&.no-desc":{minHeight:80,justifyContent:"center"}}},".desc-mobile":{[e.fn.largerThan("sm")]:{display:"none"}},".desc-desktop":{[e.fn.smallerThan("sm")]:{display:"none"}},".icon":{flexGrow:0},".icon-wrapper":{background:"#fff",borderRadius:"100%",border:"1px solid ".concat(e.colors.neutral[1]),img:{maxWidth:"80%"}}}}}));let Header=e=>{let{title:t,titleAs:a,description:d,icon:m,layout:h="normal",children:g,className:p,styles:u,classNames:f,...x}=e,v=(0,s.d)(),{classes:b,cx:y,theme:Z}=c(void 0,{name:"ServiceConnections__SectionWrapper",styles:u,classNames:f});return"normal"===h?(0,i.BX)(r.x,{className:y(p,b.root,"normal-style","header"),...x,children:[t&&(0,i.tZ)(n.T,{size:"h1",as:a||"h2",className:"heading-title title",children:t}),d&&(0,i.tZ)(n.T,{size:"s3",className:"description",children:d}),g]}):"withIcon"===h?(0,i.BX)(r.x,{className:y(p,b.root,"with-icon-style"),...x,children:[(0,i.BX)(r.x,{className:"inner",children:[m&&(0,i.tZ)(r.x,{className:"icon",children:(0,i.tZ)(l.o,{ratio:1,sx:{width:40,[Z.fn.largerThan("sm")]:{width:80}},children:(0,i.tZ)(o.k,{justify:"center",align:"center",className:"icon-wrapper",children:(0,i.tZ)("img",{src:m,alt:t,loading:"lazy"})})})}),(t||d)&&(0,i.BX)(r.x,{className:"info ".concat(d?"":"no-desc"),children:[t&&(0,i.tZ)(n.T,{size:"h3",as:a||"h2",className:"heading-title title",children:t}),!v&&d&&(0,i.tZ)(n.T,{size:"p3",className:"desc desc-desktop",children:d})]})]}),v&&d&&(0,i.tZ)(n.T,{size:"p3",className:"desc desc-mobile",children:d})]}):null};var m=(0,d.k)(()=>({root:{},header:{},innerClass:{}})),h=a("OAL+"),g=(0,d.k)((e,t)=>{let{hasColor:a,bgColor:i,noPadding:n}=t;return{root:{backgroundColor:i,...!n&&{paddingTop:a?80:40,paddingBottom:a?80:40,[e.fn.smallerThan("sm")]:{paddingTop:32,paddingBottom:32}}},innerClass:{gap:16,[e.fn.largerThan("sm")]:{gap:24}},withIconLayout:{display:"flex",gap:16,[e.fn.smallerThan("sm")]:{gap:8,flexDirection:"column"},".inner":{display:"flex",gap:16,[e.fn.smallerThan("sm")]:{alignItems:"center"}},".info":{display:"flex",flexDirection:"column",gap:4},".desc-mobile":{[e.fn.largerThan("sm")]:{display:"none"}},".desc-desktop":{[e.fn.smallerThan("sm")]:{display:"none"}}}}}),p=a("q1tI");let Wrapper=e=>{let{title:t,titleAs:a,description:n,icon:l,children:o,bgColor:s,className:d,classNames:c,layout:m,styles:u,innerClass:f="hhg-page-container",noPadding:x,defaultColor:v="transparent",...b}=e,y=(0,p.useMemo)(()=>s||v,[]),Z=0===["","#fff","#fff","transparent"].filter(e=>e===y.toLowerCase()).length,{classes:k,cx:S}=g({bgColor:y,noPadding:x,hasColor:Z},{name:"ServiceConnections__SectionWrapper-Wrapper",styles:u,classNames:c});return(0,i.tZ)(r.x,{className:S(k.root,d),"data-has-color":Z,...Z&&{"data-color":y},...b,children:(0,i.tZ)(h.K,{className:S(f,k.innerClass),children:o})})},SectionWrapper=e=>{let{title:t,titleAs:a,description:n,icon:r,children:l,layout:o="normal",innerClass:s,styles:d,className:c,classNames:h,applyH1:g,...p}=e,{classes:u,cx:f}=m(void 0,{name:"ServiceConnections__SectionWrapper",styles:d,classNames:h});return(0,i.BX)(Wrapper,{classNames:{root:f(c,"section-wrapper",u.root),innerClass:u.innerClass},...p,children:[(t||n)&&(0,i.tZ)(Header,{className:u.header,title:t,description:n,icon:r,titleAs:a||(g?"h1":void 0),layout:o}),l||l]})};SectionWrapper.Header=Header,SectionWrapper.Wrapper=Wrapper;var u=SectionWrapper},E7r1:function(e,t,a){a.r(t),a.d(t,{default:function(){return StickyNavWrapper}});var i=a("BGKE"),n=a("q1tI"),r=a("mYVa"),l=a("Gwuz"),o=a("5fZt"),s=a("mU93"),d=a("77u+"),c=a("ZpEA"),m=a("hXNO"),h=a("GwGV"),g=a("e0pn"),p=a("Eso5"),u=a("SPK5"),f=a("/npG"),x=(0,f.k)(e=>({dropdown:{padding:"".concat((0,r.h)(10)," ").concat((0,r.h)(12)),backgroundColor:"#fff",cursor:"pointer",width:(0,r.h)(250),[e.fn.smallerThan("sm")]:{width:"100%"}},selectedItem:{padding:0,width:"90%"},selectedItemTitle:{fontWeight:600},navigatorRoot:{paddingTop:(0,r.h)(4),flexDirection:"column",gap:(0,r.h)(4)},item:{paddingTop:(0,r.h)(10),paddingBottom:(0,r.h)(10),borderRadius:0,"&.active":{backgroundColor:e.colors.gray[1]}},app:{borderRadius:8,overflow:"hidden"},appImg:{height:40,display:"block"}})),v=a("uzt2"),b=a("/ch6"),y=a("+9w5"),Z=a("Y5X8");let Dropdown=e=>{var t,a;let{navigating:l=[],mappingIconList:o,colorArr:s,onNavClick:c,selectedSection:m,hideIcon:f,isApp:k,logo:S,...T}=e,{classes:w,cx:C}=x(void 0,{name:"CarePathHeroBannerNavigator__Dropdown"}),[N,I]=(0,n.useState)(0),[B,L]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=l.findIndex(e=>m===e.idScroll);-1!==e&&I(e)},[m]),(0,i.BX)(p.x,{sx:{position:"relative",userSelect:"none"},...T,children:[(0,i.BX)(u.k,{className:w.dropdown,align:"center",justify:"space-between",onClick:()=>L(!B),children:[(0,i.tZ)(y.h,{hideIcon:f,icon:(null==o?void 0:o[null==l?void 0:null===(t=l[N])||void 0===t?void 0:t.sessionLayout])||(0,i.tZ)(h.Z,{}),title:null==l?void 0:null===(a=l[N])||void 0===a?void 0:a.title,bgColor:null==s?void 0:s[N%4],classNames:{root:w.selectedItem,title:w.selectedItemTitle}}),(0,i.tZ)(g.Z,{size:18})]}),(0,i.BX)(p.x,{sx:e=>({display:B?"block":"none",position:"absolute",top:(0,r.h)(39),width:"100%",background:"#fff",border:"1px solid ".concat(e.colors.gray[1]),zIndex:1}),children:[(0,i.tZ)(v.C3,{mappingIconList:o,classNames:{root:w.navigatorRoot},colorArr:s,navigating:l,onNavClick:c,dataActionBySession:(()=>{let e={};return Object.keys(d.e).map(t=>{e[t]="".concat(d.e[t]," - Header Navigate")}),e})(),children:l.map((e,t)=>(0,i.tZ)(b.j,{className:C(w.item,N===t?"active":""),displayAs:e=>(0,i.tZ)(y.h,{...e,hideIcon:f,isActive:N===t}),onClick:()=>{I(t),L(!1)}},String(t)))}),k&&(0,i.BX)(u.k,{align:"center",gap:16,sx:{padding:14},children:[(0,i.tZ)("a",{href:null==S?void 0:S.url,target:"_blank",children:(0,i.tZ)("div",{className:w.app,children:(0,i.tZ)("img",{src:Z.C.getAssetPath("appIntro/app-store.png"),className:w.appImg,loading:"lazy",alt:"App Store"})})}),(0,i.tZ)("a",{href:null==S?void 0:S.url,target:"_blank",children:(0,i.tZ)("div",{className:w.app,children:(0,i.tZ)("img",{src:Z.C.getAssetPath("appIntro/google-play.png"),className:w.appImg,loading:"lazy",alt:"Google Play"})})})]})]})]})};var k=(0,f.k)((e,t)=>{let{hasSponsor:a}=t;return{root:{},wrapper:{display:"flex",[e.fn.smallerThan("sm")]:{flexDirection:"column"},[e.fn.largerThan("sm")]:{gap:(0,r.h)(24)}},sponsor:{},navigator:{gap:(0,r.h)(8)},navigatorItem:{img:{height:18}},buttonItemTitle:{...a&&{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:(0,r.h)(180)}}}}),S=a("d9F/"),T=(0,n.forwardRef)((e,t)=>{let{sponsoredBy:a=[],onNavClick:h,children:g,styles:p,classNames:u,isAppPage:f,logo:x,...y}=e,{colorArr:Z,navigating:T=[],mappingIconList:w}=(0,n.useContext)(s.F),C=(a||[]).length>0,{classes:N}=k({hasSponsor:C},{name:"StickyNavigator",classNames:u,styles:p}),I=(0,m.d)(),[B,L]=(0,n.useState)(""),D=(0,n.useMemo)(()=>T.filter(e=>"comming_soon"!==e.type),[T]);(0,n.useImperativeHandle)(t,()=>({setSelectedSection:L}));let M=(0,c.t)(D.map(e=>e.url)),W={};return D.map((e,t)=>{W[e.idScroll]=M[t]}),D.length>0?(0,i.BX)(o.b,{className:N.wrapper,sx:e=>({position:"absolute",width:"100%",borderBottom:"1px solid ".concat(e.colors.neutral[1]),transform:"translateY(".concat(""!==B?0:"-100%",")"),transition:"transform .3s ease",[e.fn.largerThan("sm")]:{padding:"".concat((0,r.h)(8)," 0"),display:"flex",justifyContent:"center"}}),children:["function"==typeof g?null==g?void 0:g(h,B):I?(0,i.tZ)(Dropdown,{navigating:D,mappingIconList:w,colorArr:Z,selectedSection:B,onNavClick:h,hideIcon:f,logo:x,isApp:f}):(0,i.tZ)(v.C3,{colorArr:Z,navigating:D,iconSize:24,selectedSection:B,mappingIconList:w,dataActionBySession:(()=>{let e={};return Object.keys(d.e).map(t=>{e[t]="".concat(d.e[t]," - Header Navigate")}),e})(),onNavClick:h,...y,children:D.map((e,t)=>{var a,n;return(0,i.tZ)(b.j,{classNames:{root:N.navigatorItem},displayAs:S.y,iconSize:18,isExternalUrl:null===(a=W[e.idScroll])||void 0===a?void 0:a.isExternalSite,target:(null===(n=W[e.idScroll])||void 0===n?void 0:n.isExternalUrl)?"_blank":"_self"},String(t))})}),C&&!I&&(0,i.tZ)(l.StickySponsoredBy,{className:N.sponsor,isCollapsed:!1,sponsoredType:"content",sponsoredBy:a,isMobile:I,styles:e=>({root:{position:"relative",zIndex:1,backgroundColor:"transparent",border:0,[e.fn.largerThan("sm")]:{padding:0}},logoWrapper:{marginLeft:(0,r.h)(12)},logo:{[e.fn.largerThan("sm")]:{height:(0,r.h)(32)}},container:{[e.fn.largerThan("sm")]:{padding:0}}})})]}):null});function StickyNavWrapper(e){let{stickyRef:t,...a}=e;return(0,i.tZ)(T,{...a,ref:t})}},lYwf:function(e,t,a){a.d(t,{i:function(){return TypeFormInline}});var i=a("BGKE"),n=a("q1tI"),r=a("p46w"),l=a.n(r),o=a("P5LW"),s=a("rIrU"),d=a("Eso5");let TypeformEmbed=e=>{let{url:t,...a}=e;return(0,i.tZ)(d.x,{component:"iframe",src:t,...a,allow:"camera; microphone; autoplay; encrypted-media;",loading:"lazy",title:"Typeform"})},FullScreen=e=>{let{url:t}=e;return(0,i.tZ)(d.x,{sx:{height:"calc(100vh - 53px)",minHeight:500},children:(0,i.tZ)(TypeformEmbed,{url:t,style:{width:"100%",height:"100%",border:"none"}})})};var c=a("hDz7"),m=a("oZWv"),h=a("J+gj"),g=a("RZSM"),p=a("SPK5"),u=a("OAL+"),f=a("0D4Z"),x=a("gHFm"),v=a("usqR"),b=a("/npG"),y=a("mYVa"),Z=(0,b.k)(e=>({root:{position:"relative",padding:"".concat((0,y.h)(40)," 0"),[e.fn.largerThan("sm")]:{padding:"".concat((0,y.h)(80)," 0")}},inner:{display:"flex",flexDirection:"column",gap:30,position:"relative"},header:{display:"flex",flexWrap:"wrap",gap:"10px 0"},headerIcon:{flexShrink:0,width:48,[e.fn.largerThan("sm")]:{width:64}},heading:{fontWeight:400,fontSize:(0,y.h)(28),lineHeight:1.2,[e.fn.largerThan("sm")]:{fontSize:(0,y.h)(40),lineHeight:(0,y.h)(48),letterSpacing:"-0.88px"}},headingWrapper:{width:"calc(100% - 68px)",paddingLeft:12,[e.fn.largerThan("sm")]:{width:"calc(100% - 88px)",paddingLeft:24,minHeight:64,display:"flex",alignItems:"center"}},headerInfo:{},medicalAvatar:{flexShrink:0,width:32,[e.fn.largerThan("sm")]:{width:40}},medicalReview:{marginLeft:16,[e.fn.largerThan("sm")]:{marginLeft:88}},medicalTitle:{fontSize:(0,y.h)(14),lineHeight:"150%",letterSpacing:"-0.07px",color:"#595959"},medicalSubTitle:{fontSize:(0,y.h)(12),lineHeight:"140%",letterSpacing:"-0.07px",color:"#595959"},iframeWrapper:{height:"80vh",backgroundColor:"#fff",position:"relative",[e.fn.smallerThan("sm")]:{marginLeft:-16,marginRight:-16},[e.fn.largerThan("sm")]:{height:550,borderRadius:20}},iframe:{position:"relative",width:"100%",height:"100%",borderRadius:"inherit"},disclaimer:{},skeleton:{position:"absolute",inset:0,zIndex:0,borderRadius:0,[e.fn.largerThan("sm")]:{borderRadius:20}}}));let InlineScreen=e=>{let{data:t,url:a}=e,{headline:n,headlineIcon:r,disclaimer:l,backgroundColor:o,medicalInfo:s}=t||{},{classes:b}=Z(void 0,{name:"TypeFormInlineInlineScreen"});return(0,i.tZ)(c.T,{variant:c.C.LEADGEN,children:(0,i.tZ)(d.x,{bg:o,className:b.root,children:(0,i.BX)(x.W,{className:b.inner,children:[(r||r)&&(0,i.BX)(d.x,{className:b.header,children:[r&&(0,i.tZ)(d.x,{className:b.headerIcon,children:(0,i.tZ)(g.o,{ratio:1,children:(0,i.tZ)("img",{loading:"lazy",src:r,alt:n})})}),(n||s)&&(0,i.BX)(i.HY,{children:[n&&(0,i.tZ)("div",{className:b.headingWrapper,children:(0,i.tZ)("h2",{className:b.heading,children:n})}),s&&(0,i.BX)(p.k,{gap:12,align:"center",className:b.medicalReview,children:[(0,i.tZ)(d.x,{className:b.medicalAvatar,children:(0,i.tZ)(g.o,{ratio:1,children:(0,i.tZ)("img",{loading:"lazy",src:s.icon,alt:s.doctorInfo})})}),(0,i.BX)(u.K,{spacing:4,children:[(0,i.tZ)(d.x,{...s.url&&{component:"a",href:s.url,target:"_blank"},"data-event-category":"Reviewer Name","data-event-action":"Click text","data-event-label":s.url,className:b.medicalTitle,children:s.doctorInfo}),(0,i.tZ)(d.x,{className:b.medicalSubTitle,children:s.subText})]})]})]})]}),(0,i.BX)(d.x,{className:b.iframeWrapper,children:[(0,i.tZ)(f.O,{visible:!0,className:b.skeleton}),(0,i.tZ)(TypeformEmbed,{url:a,className:b.iframe})]}),l&&(0,i.tZ)(d.x,{className:b.disclaimer,children:(0,i.tZ)(v.E,{contentSize:"n1",bordered:!1,description:l,HeadingWrapper:e=>(0,i.tZ)(m.T,{...e,size:"p2",sx:{textTransform:"none"}}),ContentWrapper:e=>(0,i.tZ)(m.T,{...e,size:"p3"}),icon:(0,i.tZ)(h.Z,{color:"#FE921D",size:20}),expand:!1})})]})})})},TypeFormInline=e=>{var t;let a,{data:r}=e,{formId:d,displayFull:c,utmParams:m}=r||{},{query:h,asPath:g}=(0,o.h)(),p=(0,n.useMemo)(()=>{let e={...h};return delete e.slug,e},[h]);if(!d)return null;let u=m.split("&").filter(Boolean),f=u.reduce((e,t)=>{let[a,i]=t.split("=");return a&&(e[a]=i),e},{}),x="https://form.typeform.com/to/".concat(d,"?").concat((t={ga_client:l().get(s.ch),page_path:g,...p,...f},a="",t&&(a=Object.keys(t).map(e=>e+"="+t[e]).join("&")),a));return c?(0,i.tZ)(FullScreen,{url:x}):(0,i.tZ)(InlineScreen,{data:r,url:x})}},MAiV:function(e,t,a){a.d(t,{y:function(){return VideoLibrary}});var i=a("BGKE"),n=a("q1tI"),r=a("rEaw");let l=(0,n.createContext)({});var o=a("StZb"),s=a("mYVa"),d=a("Eso5"),c=a("KeOA"),m=a("dDsW"),h=a("hXNO"),g=a("/npG"),p=(0,g.k)(e=>({root:{[e.fn.smallerThan("sm")]:{marginLeft:-16,marginRight:-16}}}));let CarouselProgress=e=>{let{currentSlide:t,totalSlides:a,show:n,sideSpacing:r=0}=e;if(!n||a<=1)return null;let l=(Math.min(Math.max(t,0),a-1)+1)/a*100;return(0,i.tZ)(d.x,{mt:24,h:4,sx:e=>({backgroundColor:e.colors.neutral[1],borderRadius:0,marginLeft:r,marginRight:r}),children:(0,i.tZ)(d.x,{h:"100%",sx:e=>({width:"".concat(l,"%"),backgroundColor:e.colors.neutral[4],borderRadius:0,transition:"width .2s ease"})})})};var u=a("XDLp"),f=a("iZ8j");let SeeMoreBtnWrapper=e=>{let{onClick:t,children:a,wrapperClassName:r="flex justify-center md:justify-start",color:o}=e,{primaryColor:s}=(0,n.useContext)(l),d=(0,h.d)();return(0,i.tZ)("div",{className:r,children:(0,i.tZ)(u.B,{variant:"secondary",className:"w-full sm:w-auto",fullWidth:d,rightIcon:(0,i.tZ)(f.Z,{color:"currentColor",size:18}),onClick:t,color:null!=o?o:s,children:a})})};var x=a("BKNC");let toVideoItemData=(e,t)=>({...e,image:e.image,imageMedium:e.image,imageThumbnail:e.image,url:e.url,title:e.title,type:t?x.V.SHORTS:x.V.VIDEO}),useVideoLibraryLoadMore=e=>{let{totalItems:t,initialVisible:a,loadMoreStep:i,resetKey:r,desktopOnly:l=!0}=e,o=(0,h.d)(),s=(0,n.useMemo)(()=>Math.min(a,t),[a,t]),[d,c]=(0,n.useState)(s);(0,n.useEffect)(()=>{if(l&&o){c(t);return}c(s)},[l,o,t,s,r]);let m=(0,n.useCallback)(()=>{c(e=>Math.min(e+i,t))},[i,t]),g=t>a&&d({url:e.urlVideo,title:e.videoTitle||""}),useVideoLibraryRows=()=>{let{loading:e,videoData:t,videoList:a}=(0,n.useContext)(l);return(0,n.useMemo)(()=>e&&0===t.length&&(null==a?void 0:a.length)?a.map(spotlightToVideoItemDataStub):t,[e,t,a])};var v=a("nLF+");let VideoItemWrapper=e=>{let{loading:t}=(0,n.useContext)(l);return(0,i.tZ)(v.V,{...e,loading:t})},FeatureShorts=e=>{let{styles:t,...a}=e,{applyCarousel:r,loading:g,primaryColor:u}=(0,n.useContext)(l),f=useVideoLibraryRows(),x=(0,h.d)(),{formatMessage:v}=(0,m.Z)(),[b,y]=(0,n.useState)(0),{classes:Z}=p(void 0,{name:"ShortReelList",styles:t}),k=(0,n.useMemo)(()=>f.map(e=>e.url).join("\x00"),[f]),S=(0,n.useMemo)(()=>f.map(e=>e.image?"1":"0").join(""),[f]),T="feature-shorts-carousel-".concat(g?"loading":"loaded","-").concat(f.length,"-").concat(k,"-").concat(S),{visibleCount:w,loadMore:C,showSeeMore:N}=useVideoLibraryLoadMore({totalItems:f.length,initialVisible:12,loadMoreStep:12,resetKey:k,desktopOnly:!0}),I=f.slice(0,w),B=N&&(0,i.tZ)(SeeMoreBtnWrapper,{onClick:C,children:v({id:"videoLibrary.featureShorts.seeMore",defaultMessage:"Xem th\xeam"})}),L=!x&&!g&&f.length>6,shortsRootSx=e=>({marginTop:(0,s.h)(-16),[e.fn.largerThan("sm")]:{marginTop:0}});return r?(0,i.tZ)(d.x,{className:"flex flex-col gap-6",sx:shortsRootSx,children:(0,i.BX)(d.x,{className:Z.root,...a,children:[(0,i.tZ)(o.a,{slideSize:"16.67%",slideGap:8,breakpoints:[{maxWidth:"sm",slideSize:"16.67%",slideGap:8}],withControls:L,withIndicators:!1,loop:!0,align:"start",onSlideChange:y,styles:e=>({indicators:{bottom:"auto",top:"calc(100% + 30px - 8px)"},indicator:{width:"8px",height:"8px",opacity:1,backgroundColor:e.colors.neutral[5],"&[data-active]":{backgroundColor:e.colors.blue[7]},".mantine-Carousel-control[data-inactive]":{opacity:0,cursor:"default"}},control:{width:40,height:40,opacity:1,borderColor:u,transition:"all .2s ease",svg:{width:"18px !important",height:"18px !important",color:u},"&:hover":{backgroundColor:u,svg:{color:"#fff"}}},controls:{padding:0,marginLeft:-60,marginRight:-60,top:"50%",transform:"translateY(-50%)"},viewport:{[e.fn.smallerThan("sm")]:{paddingLeft:8,paddingRight:8}}}),children:f.map((e,t)=>(0,i.tZ)(o.a.Slide,{children:(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,!0)})},"".concat(e.url,"-").concat(t)))},T),(0,i.tZ)(CarouselProgress,{currentSlide:b,totalSlides:f.length,show:x})]})}):(0,i.BX)(d.x,{className:"flex flex-col gap-6",sx:shortsRootSx,children:[(0,i.tZ)(c.M,{spacing:8,verticalSpacing:24,cols:x?2:6,children:I.map((e,t)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,!0)},"".concat(e.url,"-").concat(t)))}),B]})};var b=a("MJ9g"),y=a("ake8"),Z=a("oZWv"),k=a("8vDj"),S=a("SPK5"),T=a("RZSM"),w=a("0D4Z"),C=a("OAL+"),N=a("vaps"),I=a("4wSK"),B=(0,g.k)((e,t)=>{let{bgColor:a,hasOtherList:i}=t;return{root:{backgroundColor:a||e.colors.neutral[0],padding:"".concat((0,s.h)(24)," 0"),[e.fn.largerThan("sm")]:{padding:"".concat((0,s.h)(80)," 0")}},heading:{},playerListing:{gap:24,[e.fn.smallerThan("sm")]:{flexDirection:"column",gap:8}},heroVideo:{[e.fn.largerThan("sm")]:{width:i?"65%":"100%"}},otherListDesktop:{position:"relative",display:"flex",[e.fn.smallerThan("sm")]:{gap:8,".video-item-skeleton":{width:"45%",display:"none","&:nth-child(1),&:nth-child(2)":{display:"flex"}}},[e.fn.largerThan("sm")]:{width:"35%",flexDirection:"column",gap:24}},otherListMobile:{},videoItemSkeleton:{}}});let getTotalVideoNumber=e=>{let{totalVideos:t,applyCarousel:a,visibleCount:i,currentSlide:n,itemsPerSlide:r}=e;return t?a?Math.min((n+1)*Math.max(1,r),t):Math.min(i,t):0},renderTotalVideoText=(e,t,a)=>e({id:"common.currentOnTotalVideo",defaultMessage:"Total video {number}/{count}"},{number:t,count:a}),renderVideoTotalText=(e,t)=>{let{applyCarousel:a,showLoadMore:i,totalVideos:n,number:r,itemsPerSlide:l}=t,o=a&&"number"==typeof l&&1>=Math.ceil(n/Math.max(1,l));return(a||i)&&!o?renderTotalVideoText(e,r,n):e({id:"common.currentTotalVideo",defaultMessage:"Total video {count}"},{count:n})};var L=a("Y5X8"),D=a("rIrU"),M=a("bflR");let VideoItem=e=>{let{title:t,image:a,active:n,url:r,indexNumber:l,showIndex:o,...c}=e,{formatMessage:h}=(0,m.Z)();return(0,i.tZ)(d.x,{...c,children:(0,i.BX)(S.k,{className:"pointer-event-child-none","data-event-category":"Service Connection","data-event-action":"Video List Click","data-event-label":r,gap:(0,s.h)(8),align:"center",sx:e=>({[e.fn.smallerThan("sm")]:{flexDirection:"column",alignItems:"stretch"}}),children:[o&&(0,i.tZ)(d.x,{children:(0,i.tZ)(Z.T,{sx:{width:16},size:"s4",weight:"semiBold",children:l})}),(0,i.BX)(d.x,{sx:e=>({position:"relative",[e.fn.largerThan("sm")]:{width:(0,s.h)(120)}}),children:[(0,i.tZ)(T.o,{ratio:120/68,children:(0,i.tZ)("img",{loading:"lazy",src:a,alt:t,onError:e=>{e.currentTarget.src="".concat(D.Nr,"/default-image.jpg")}})}),(0,i.tZ)(S.k,{align:"center",justify:"center",sx:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:n?"rgba(0, 0, 0, .5)":"transparent",transition:"all .2s ease"},children:n?(0,i.tZ)(Z.T,{size:"s4",weight:"semiBold",color:"#fff",children:h({id:"common.playing",defaultMessage:"Playing ..."})}):(0,i.tZ)("img",{src:L.C.getAssetPath("play-circle-bg.svg"),alt:"play",loading:"lazy"})})]}),(0,i.tZ)(d.x,{sx:e=>({[e.fn.largerThan("sm")]:{width:"calc(100% - 128px)"}}),children:(0,i.tZ)(Z.T,{size:"s3",weight:"semiBold",color:n?"blue.6":void 0,sx:e=>({display:"-webkit-box","-webkit-line-clamp":"2","-webkit-box-orient":"vertical",overflow:"hidden",[e.fn.largerThan("sm")]:{fontSize:(0,s.h)(14)}}),children:t})})]})})},VideoItemSkeleton=()=>(0,i.BX)(S.k,{align:"center",gap:8,className:"video-item-skeleton",sx:e=>({[e.fn.smallerThan("sm")]:{flexDirection:"column"}}),children:[(0,i.tZ)(d.x,{sx:e=>({flexShrink:0,width:"100%",[e.fn.largerThan("sm")]:{width:120}}),children:(0,i.tZ)(T.o,{ratio:16/9,children:(0,i.tZ)(w.O,{})})}),(0,i.BX)(C.K,{spacing:4,w:"100%",children:[(0,i.tZ)(w.O,{width:"100%",height:12}),(0,i.tZ)(w.O,{width:"100%",height:12}),(0,i.tZ)(w.O,{width:"70%",height:12})]})]}),FeatureVideos=e=>{let{styles:t}=e,{autoplay:a,videoList:r,loading:g,backgroundColor:p,applyShortVideo:u,applyCarousel:f,primaryColor:x}=(0,n.useContext)(l),v=useVideoLibraryRows(),{formatMessage:L}=(0,m.Z)(),D=v.length>1,{classes:M}=B({bgColor:p,hasOtherList:D},{name:"VideoLibrary",styles:t}),[W,V]=(0,n.useState)([]),[E,X]=(0,n.useState)(null),[z,R]=(0,n.useState)(a),[F,_]=(0,n.useState)(1),[G,O]=(0,n.useState)(0),A=(0,h.d)(),Y=(0,k.rZ)(),{ref:j,entry:H}=(0,I.s)({threshold:1});(0,n.useEffect)(()=>{X((null==v?void 0:v[0])?{title:r[0].videoTitle,url:r[0].urlVideo}:null),V(v)},[v,r]),(0,n.useEffect)(()=>{if(H&&z){var e,t,a;null==H||null===(a=H.target)||void 0===a||null===(t=a.querySelector("iframe"))||void 0===t||null===(e=t.contentWindow)||void 0===e||e.postMessage('{"event":"command","func":"'.concat(H.isIntersecting?"playVideo":"pauseVideo",'","args":""}'),"*")}},[H]);let P={slidesToScroll:1,slideSize:"45%",slideGap:(0,s.h)(8),withIndicators:!1,withControls:!1,align:"start",loop:!0,styles:()=>({indicators:{bottom:"auto",top:"calc(100% + 30px - 8px)"},indicator:{width:"8px",height:"8px",opacity:1,backgroundColor:Y.colors.neutral[5],"&[data-active]":{backgroundColor:Y.colors.blue[7]},".mantine-Carousel-control[data-inactive]":{opacity:0,cursor:"default"}}})},K=W.length>1,U=W.length>1&&(0,i.tZ)(Z.T,{size:"s4",children:renderVideoTotalText(L,{applyCarousel:!1,showLoadMore:!1,totalVideos:W.length,number:getTotalVideoNumber({totalVideos:W.length,applyCarousel:!1,visibleCount:F,currentSlide:0,itemsPerSlide:1}),itemsPerSlide:1})});if(0===v.length)return null;if(u){let e=v.map(e=>e.url).join("\x00"),t=v.map(e=>e.image?"1":"0").join(""),a="feature-videos-short-carousel-".concat(g?"loading":"loaded","-").concat(v.length,"-").concat(e,"-").concat(t),n=!A&&!g&&v.length>6;return f?(0,i.tZ)(d.x,{sx:{paddingBottom:(0,s.h)(30)},children:(0,i.tZ)(o.a,{slideSize:"16.67%",slideGap:8,breakpoints:[{maxWidth:"sm",slideSize:"16.67%",slideGap:8}],withControls:n,withIndicators:!1,loop:!0,align:"start",styles:e=>({indicators:{bottom:"auto",top:"calc(100% + 30px - 8px)"},indicator:{width:"8px",height:"8px",opacity:1,backgroundColor:e.colors.neutral[5],"&[data-active]":{backgroundColor:e.colors.blue[7]},".mantine-Carousel-control[data-inactive]":{opacity:0,cursor:"default"}},control:{width:40,height:40,opacity:1,borderColor:x,transition:"all .2s ease",svg:{width:"18px !important",height:"18px !important",color:x},"&:hover":{backgroundColor:x,svg:{color:"#fff"}}},controls:{padding:0,marginLeft:-60,marginRight:-60,top:"50%",transform:"translateY(-50%)"},viewport:{[e.fn.smallerThan("sm")]:{paddingLeft:8,paddingRight:8}}}),children:v.map((e,t)=>(0,i.tZ)(o.a.Slide,{children:(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,!0)})},"".concat(e.url,"-").concat(t)))},a)}):(0,i.tZ)(c.M,{spacing:8,verticalSpacing:24,cols:A?2:6,children:v.map((e,t)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,!0)},"".concat(e.url,"-").concat(t)))})}let q=(0,i.BX)(S.k,{className:M.playerListing,children:[(0,i.tZ)(d.x,{className:M.heroVideo,children:(0,i.tZ)(T.o,{ratio:16/9,children:(0,i.tZ)(w.O,{})})}),D&&(0,i.tZ)(d.x,{className:M.otherListDesktop,children:[,,,,].fill("").map((e,t)=>(0,i.tZ)(VideoItemSkeleton,{},String(t)))})]}),J=W.length>0?(0,i.BX)(S.k,{className:M.playerListing,ref:j,children:[E&&(0,i.BX)(C.K,{className:M.heroVideo,spacing:(0,s.h)(16),children:[(0,i.tZ)(b.S,{url:E.url||"",autoPlay:z},E.url),!K&&(0,i.tZ)(y.H,{tag:"h3",children:E.title})]}),K&&(A?(0,i.BX)(d.x,{sx:{paddingBottom:(0,s.h)(30)},children:[(0,i.tZ)(o.a,{...P,onSlideChange:O,children:W.map((e,t)=>(0,i.tZ)(o.a.Slide,{children:(0,i.tZ)(VideoItem,{title:e.title,url:e.url,image:e.image,active:e.url===(null==E?void 0:E.url),onClick:()=>{R(!0),X(e)},sx:{cursor:"pointer"}})},String(t)))}),(0,i.tZ)(CarouselProgress,{currentSlide:G,totalSlides:W.length,show:A})]}):(0,i.BX)(d.x,{className:M.otherListDesktop,children:[U,(0,i.tZ)(d.x,{sx:e=>({[e.fn.largerThan("sm")]:{position:"absolute",top:(0,s.h)(30),left:0,right:0,bottom:0}}),children:(0,i.tZ)(N.x,{h:"100%",type:"always",offsetScrollbars:!0,scrollbarSize:8,children:(0,i.tZ)(S.k,{sx:{flexDirection:"column",gap:(0,s.h)(24)},children:W.map((e,t)=>(0,i.tZ)(VideoItem,{indexNumber:t+1,showIndex:!A,title:e.title,url:e.url,image:e.image,active:e.url===(null==E?void 0:E.url),onClick:()=>{_(t+1),R(!0),X(e)},sx:{cursor:"pointer"}},String(t)))})})})]}))]}):null;return g?q:J};var W=a("gHFm"),V=(0,g.k)((e,t)=>{let{bgColor:a}=t;return{root:{backgroundColor:a||e.colors.neutral[0],padding:"".concat((0,s.h)(24)," 0"),".mantine-VideoItem__VideoItem-title,.mantine-VideoItem__ShortsItem-title":{[e.fn.largerThan("sm")]:{fontSize:(0,s.h)(14)}},[e.fn.largerThan("sm")]:{padding:"".concat((0,s.h)(80)," 0")}},heading:{}}});let videoLibraryGapClass=e=>e?"gap-y-4 md:gap-y-6 gap-x-2":"gap-6",videoLibraryGapRem=e=>(0,s.h)(24),WrapperSection=e=>{let{styles:t,className:a,children:r,...o}=e,{applyH1:c,title:m,description:h,backgroundColor:g,applyShortVideo:p}=(0,n.useContext)(l),{classes:u,cx:f}=V({bgColor:g},{name:"VideoLibrary",styles:t});return(0,i.tZ)(d.x,{...o,className:f(a,u.root),children:(0,i.tZ)(W.W,{children:(0,i.BX)(C.K,{spacing:8,sx:e=>({gap:videoLibraryGapRem(p),[e.fn.largerThan("sm")]:{gap:(0,s.h)(40)}}),children:[(m||h)&&(0,i.BX)(C.K,{sx:{gap:(0,s.h)(8)},children:[m&&(0,i.tZ)(Z.T,{size:"h2",as:c?"h1":"h2",className:u.heading,children:m}),h&&(0,i.tZ)(Z.T,{size:"p3",c:"gray.6",children:h})]}),r]})})})},FeatureLayout=()=>{let{applyShortVideo:e,videoList:t}=(0,n.useContext)(l);return 0===t.length?null:(0,i.tZ)(WrapperSection,{children:e?(0,i.tZ)(FeatureShorts,{}):(0,i.tZ)(FeatureVideos,{})})};var E=a("iuhU");let GridLayout=()=>{let{applyShortVideo:e,applyCarousel:t,loading:a,primaryColor:r}=(0,n.useContext)(l),s=useVideoLibraryRows(),c=(0,h.d)(),g=!t&&c?4:t?s.length:e?12:8,p=!t&&c?4:t?s.length:e?12:8,{formatMessage:u}=(0,m.Z)(),[f,x]=(0,n.useState)(0),v=(0,n.useMemo)(()=>s.map(e=>e.url).join("\x00"),[s]),b=(0,n.useMemo)(()=>s.map(e=>e.image?"1":"0").join(""),[s]),y="grid-carousel-".concat(e?"short":"long","-").concat(a?"loading":"loaded","-").concat(s.length,"-").concat(v,"-").concat(b),{visibleCount:Z,loadMore:k,showSeeMore:S}=useVideoLibraryLoadMore({totalItems:s.length,initialVisible:g,loadMoreStep:p,resetKey:v,desktopOnly:!1});if(!s.length)return null;let T=s.slice(0,Z),w=videoLibraryGapClass(e),C=S&&(0,i.tZ)(SeeMoreBtnWrapper,{onClick:k,children:u({id:"videoLibrary.grid.seeMore",defaultMessage:"Xem th\xeam"})});if(t&&e){let e=c?T.reduce((e,t,a,i)=>(a%2==0&&e.push(i.slice(a,a+2)),e),[]):T.map(e=>[e]),t=!c&&!a&&e.length>6;return(0,i.BX)(WrapperSection,{children:[(0,i.BX)(d.x,{sx:e=>({[e.fn.smallerThan("sm")]:{marginLeft:-16,marginRight:-16}}),children:[(0,i.tZ)(o.a,{slideSize:"16.67%",slideGap:8,breakpoints:[{maxWidth:"sm",slideSize:e.length<=1?"100%":"45%",slideGap:8}],withControls:t,withIndicators:!1,loop:!0,align:"start",onSlideChange:x,styles:e=>({indicators:{bottom:"auto",top:"calc(100% + 30px - 8px)"},indicator:{width:"8px",height:"8px",opacity:1,backgroundColor:e.colors.neutral[5],"&[data-active]":{backgroundColor:e.colors.blue[7]},".mantine-Carousel-control[data-inactive]":{opacity:0,cursor:"default"}},control:{width:40,height:40,opacity:1,borderColor:r,transition:"all .2s ease",svg:{width:"18px !important",height:"18px !important",color:r},"&:hover":{backgroundColor:r,svg:{color:"#fff"}}},controls:{padding:0,marginLeft:-60,marginRight:-60,top:"50%",transform:"translateY(-50%)"},viewport:{[e.fn.smallerThan("sm")]:{paddingLeft:16,paddingRight:16}}}),children:e.map((e,t)=>(0,i.tZ)(o.a.Slide,{children:(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1",w),children:e.map((e,a)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,!0)},"".concat(e.url,"-").concat(t,"-").concat(a)))})},String(t)))},y),(0,i.tZ)(CarouselProgress,{currentSlide:f,totalSlides:e.length,show:c,sideSpacing:16})]}),C]})}if(t&&!e){let e=T.length<=1?"100%":"85%",t=!c&&!a&&T.length>4;return(0,i.BX)(WrapperSection,{children:[(0,i.BX)(d.x,{sx:e=>({[e.fn.smallerThan("sm")]:{marginLeft:-16,marginRight:-16}}),children:[(0,i.tZ)(o.a,{slideSize:"25%",slideGap:24,breakpoints:[{maxWidth:"sm",slideSize:e,slideGap:16}],withControls:t,withIndicators:!1,loop:!0,align:"start",onSlideChange:x,styles:e=>({indicators:{bottom:"auto",top:"calc(100% + 30px - 8px)"},indicator:{width:"8px",height:"8px",opacity:1,backgroundColor:e.colors.neutral[5],"&[data-active]":{backgroundColor:e.colors.blue[7]},".mantine-Carousel-control[data-inactive]":{opacity:0,cursor:"default"}},control:{width:40,height:40,opacity:1,borderColor:r,transition:"all .2s ease",svg:{width:"18px !important",height:"18px !important",color:r},"&:hover":{backgroundColor:r,svg:{color:"#fff"}}},controls:{padding:0,marginLeft:-60,marginRight:-60,top:"50%",transform:"translateY(-50%)"},viewport:{[e.fn.smallerThan("sm")]:{paddingLeft:16,paddingRight:16}}}),children:T.map((e,t)=>(0,i.tZ)(o.a.Slide,{children:(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,!1)})},"".concat(e.url,"-").concat(t)))},y),(0,i.tZ)(CarouselProgress,{currentSlide:f,totalSlides:T.length,show:c,sideSpacing:16})]}),C]})}return(0,i.BX)(WrapperSection,{children:[(0,i.tZ)("div",{className:(0,E.default)(e?"grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-6":"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",w),children:T.map((t,a)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(t,e)},"".concat(t.url,"-").concat(a)))}),C]})};var X=a("NXds");let ListLayout=()=>{let{applyCarousel:e,loading:t,adUnitPath:a,primaryColor:r}=(0,n.useContext)(l),s=useVideoLibraryRows(),c=(0,h.d)(),g=!!a,p=e?s.length:c?6:g?6:12,u=e?s.length:c?6:g?6:12,{formatMessage:f}=(0,m.Z)(),[x,v]=(0,n.useState)(0),b=c?4:6,y=(0,n.useMemo)(()=>s.map(e=>e.url).join("\x00"),[s]),Z=(0,n.useMemo)(()=>s.map(e=>"".concat(e.url,"|").concat(e.image?"1":"0","|").concat(e.title)).join("\x00"),[s]),[k,S]=(0,n.useState)(()=>Math.min(p,s.length));(0,n.useEffect)(()=>{S(Math.min(p,s.length))},[y,s.length,p]),(0,n.useEffect)(()=>{v(0)},[Z,b]);let T=(0,n.useCallback)(()=>{S(e=>Math.min(e+u,s.length))},[u,s.length]);if(!s.length)return null;let w=s.slice(0,k),C=!e&&s.length>p&&k({".video-info":{justifyContent:"center"},".mantine-VideoItem__VideoItem-inner":{gap:8},".mantine-VideoItem__VideoItem-thumb":{width:120},".mantine-VideoItem__VideoItem-overlay":{svg:{width:32,height:32}},[e.fn.smallerThan("sm")]:{marginLeft:0,marginRight:0}})};if(e){let e=function(e,t){let a=[];for(let i=0;i1:e.length>2),carouselStyles=e=>{var t,a;let i=e.colors,n=null!==(a=null===(t=i.neutral)||void 0===t?void 0:t[5])&&void 0!==a?a:e.colors.gray[5];return{indicators:{bottom:"auto",top:"calc(100% + 30px - 8px)"},indicator:{width:"8px",height:"8px",opacity:1,backgroundColor:n,"&[data-active]":{backgroundColor:e.colors.blue[7]},".mantine-Carousel-control[data-inactive]":{opacity:0,cursor:"default"}},control:{width:40,height:40,opacity:1,borderColor:r,transition:"all .2s ease",svg:{width:"18px !important",height:"18px !important",color:r},"&:hover":{backgroundColor:r,svg:{color:"#fff"}}},controls:{padding:0,marginLeft:-60,marginRight:-60,top:"50%",transform:"translateY(-50%)"},viewport:{[e.fn.smallerThan("sm")]:{paddingLeft:16,paddingRight:16}}}};return(0,i.BX)(WrapperSection,{...D,children:[g?(0,i.BX)("div",{className:(0,E.default)("grid grid-cols-1 lg:grid-cols-[1fr_300px]",N),children:[(0,i.BX)(d.x,{sx:e=>({[e.fn.smallerThan("sm")]:{marginLeft:-16,marginRight:-16}}),children:[(0,i.tZ)(o.a,{slideSize:"100%",slideGap:24,breakpoints:[{maxWidth:"sm",slideSize:n,slideGap:24}],withControls:l,withIndicators:!1,loop:!0,align:"start",onSlideChange:v,styles:carouselStyles,children:e.map((e,t)=>(0,i.tZ)(o.a.Slide,{children:(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1",N),children:e.map((e,a)=>(0,i.tZ)(VideoItemWrapper,{...I,data:toVideoItemData(e,!1)},"".concat(e.url,"-").concat(t,"-").concat(a)))})},String(t)))}),(0,i.tZ)(CarouselProgress,{currentSlide:x,totalSlides:e.length,show:c,sideSpacing:16})]}),L&&B,(0,i.tZ)(X.A,{adUnitPath:a,size:[[300,250],[300,600]],divId:"article-top-banner-desktop",pos:["TopBanner"]})]}):(0,i.BX)(d.x,{sx:e=>({[e.fn.smallerThan("sm")]:{marginLeft:-16,marginRight:-16}}),children:[(0,i.tZ)(o.a,{slideSize:"50%",slideGap:24,breakpoints:[{maxWidth:"sm",slideSize:n,slideGap:24}],withControls:l,withIndicators:!1,loop:!0,align:"start",onSlideChange:v,styles:carouselStyles,children:e.map((e,t)=>(0,i.tZ)(o.a.Slide,{children:(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1",N),children:e.map((e,a)=>(0,i.tZ)(VideoItemWrapper,{...I,data:toVideoItemData(e,!1)},"".concat(e.url,"-").concat(t,"-").concat(a)))})},String(t)))}),(0,i.tZ)(CarouselProgress,{currentSlide:x,totalSlides:e.length,show:c,sideSpacing:16})]}),!L&&B]})}return(0,i.BX)(WrapperSection,{...D,children:[g?(0,i.BX)("div",{className:(0,E.default)("grid grid-cols-1 lg:grid-cols-[1fr_300px]",N),children:[(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1",N),children:w.map((e,t)=>(0,i.tZ)(VideoItemWrapper,{...I,data:toVideoItemData(e,!1)},"".concat(e.url,"-").concat(t)))}),L&&B,(0,i.tZ)(X.A,{adUnitPath:a,size:[[300,250],[300,600]],divId:"article-top-banner-desktop",pos:["TopBanner"]})]}):(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1 sm:grid-cols-2",N),children:w.map((e,t)=>(0,i.tZ)(VideoItemWrapper,{...I,data:toVideoItemData(e,!1)},"".concat(e.url,"-").concat(t)))}),!L&&B]})};function SplitGridLayout_chunkVideos(e,t){let a=[];for(let i=0;i{let{title:e,description:t,applyH1:a,backgroundColor:r,applyShortVideo:c,applyCarousel:g,loading:p,primaryColor:u}=(0,n.useContext)(l),f=useVideoLibraryRows(),x=(0,h.d)(),v=x?g?f.length:4:g?f.length:c?9:12,b=x?g?f.length:4:g?f.length:c?12:8,{formatMessage:y}=(0,m.Z)(),[k,S]=(0,n.useState)(0),T=(0,n.useMemo)(()=>f.map(e=>e.url).join("\x00"),[f]),w=(0,n.useMemo)(()=>f.map(e=>e.image?"1":"0").join(""),[f]),C="split-grid-carousel-".concat(c?"short":"long","-").concat(p?"loading":"loaded","-").concat(f.length,"-").concat(T,"-").concat(w),{visibleCount:N,loadMore:I,showSeeMore:B}=useVideoLibraryLoadMore({totalItems:f.length,initialVisible:v,loadMoreStep:b,resetKey:T,desktopOnly:!1});if(!f.length)return null;let L=a?"h1":"h2",D=f.slice(0,N),M=D.slice(0,4),V=D.slice(4),X=D.slice(0,3),z=D.slice(3),R=videoLibraryGapClass(c);if(g){let carouselCommonStyles=e=>({indicators:{bottom:"auto",top:"calc(100% + 30px - 8px)"},indicator:{width:"8px",height:"8px",opacity:1,backgroundColor:e.colors.neutral[5],"&[data-active]":{backgroundColor:e.colors.blue[7]},".mantine-Carousel-control[data-inactive]":{opacity:0,cursor:"default"}},control:{width:40,height:40,opacity:1,borderColor:u,transition:"all .2s ease",svg:{width:"18px !important",height:"18px !important",color:u},"&:hover":{backgroundColor:u,svg:{color:"#fff"}}},controls:{padding:0,marginLeft:-60,marginRight:-60,top:"50%",transform:"translateY(-50%)"},viewport:{[e.fn.smallerThan("sm")]:{paddingLeft:16,paddingRight:16}}}),n=!x&&!p&&D.length>3,l=!x&&!p&&SplitGridLayout_chunkVideos(D,4).length>1,carouselWrapperSx=e=>({[e.fn.smallerThan("sm")]:{marginLeft:-16,marginRight:-16},".mantine-VideoItem__VideoItem-title,.mantine-VideoItem__ShortsItem-title":{[e.fn.largerThan("sm")]:{fontSize:(0,s.h)(14)}}});return(0,i.tZ)(d.x,{className:"py-6 md:py-20",style:{backgroundColor:r||"#f5f5f5"},sx:e=>({".mantine-VideoItem__VideoItem-title,.mantine-VideoItem__ShortsItem-title":{[e.fn.largerThan("sm")]:{fontSize:(0,s.h)(14)}}}),children:(0,i.tZ)(W.W,{children:(0,i.BX)("div",{className:(0,E.default)("grid grid-cols-1 lg:grid-cols-2","gap-y-6 lg:gap-x-10"),children:[(0,i.BX)("div",{className:(0,E.default)("flex flex-col gap-2","lg:pr-10"),children:[(0,i.tZ)("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:e&&(0,i.tZ)(Z.T,{as:a?"h1":"h2",size:"h2",className:(0,E.default)("text-[32px] leading-[42px] md:text-[40px] md:leading-[52px]"),children:e})}),t&&(0,i.tZ)(Z.T,{size:"p3",c:"gray.6",children:t})]}),c?(0,i.BX)(d.x,{sx:carouselWrapperSx,children:[(0,i.tZ)(o.a,{slideSize:"33.33%",slideGap:8,breakpoints:[{maxWidth:"sm",slideSize:"45%",slideGap:8}],withControls:n,withIndicators:!1,loop:!0,align:"start",onSlideChange:S,styles:carouselCommonStyles,children:(x?SplitGridLayout_chunkVideos(D,2):D.map(e=>[e])).map((e,t)=>(0,i.tZ)(o.a.Slide,{children:(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1",R),children:e.map((e,a)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,!0)},"".concat(e.url,"-").concat(t,"-").concat(a)))})},String(t)))},C),(0,i.tZ)(CarouselProgress,{currentSlide:k,totalSlides:x?SplitGridLayout_chunkVideos(D,2).length:D.length,show:x,sideSpacing:16})]}):(0,i.tZ)(d.x,{sx:carouselWrapperSx,children:(()=>{let e=D.length<=1?"100%":"85%";return(0,i.BX)(i.HY,{children:[(0,i.tZ)(o.a,{slideSize:"100%",slideGap:16,breakpoints:[{maxWidth:"sm",slideSize:e,slideGap:16}],withControls:l,withIndicators:!1,loop:!0,align:"start",onSlideChange:S,styles:carouselCommonStyles,children:(x?D.map(e=>[e]):SplitGridLayout_chunkVideos(D,4)).map((e,t)=>(0,i.tZ)(o.a.Slide,{children:(0,i.tZ)("div",{className:(0,E.default)(x?"grid grid-cols-1 gap-4":"grid grid-cols-2 grid-rows-2",!x&&R),children:e.map((e,a)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,!1)},"".concat(e.url,"-").concat(t,"-").concat(a)))})},String(t)))},C),(0,i.tZ)(CarouselProgress,{currentSlide:k,totalSlides:x?D.length:SplitGridLayout_chunkVideos(D,4).length,show:x,sideSpacing:16})]})})()})]})})})}let F=(e||t)&&(0,i.BX)("div",{className:(0,E.default)("flex flex-col gap-2","lg:col-span-3"),children:[(0,i.tZ)("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:e&&(0,i.tZ)(Z.T,{as:L,size:"h2",className:(0,E.default)("text-[32px] leading-[42px] md:text-[40px] md:leading-[52px]"),children:e})}),t&&(0,i.tZ)(Z.T,{size:"p3",c:"gray.6",children:t})]});return x&&!g?(0,i.tZ)("section",{className:"py-6 md:py-20",style:{backgroundColor:r||"#f5f5f5"},children:(0,i.tZ)(W.W,{children:(0,i.BX)("div",{className:(0,E.default)("flex flex-col",R),children:[F,(0,i.tZ)("div",{className:(0,E.default)(c?"grid grid-cols-2":"grid grid-cols-1",R),children:D.map((e,t)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,c)},"".concat(e.url,"-").concat(t)))}),B&&(0,i.tZ)(SeeMoreBtnWrapper,{onClick:I,children:y({id:"videoLibrary.splitGrid.seeMore",defaultMessage:"Xem th\xeam"})})]})})}):(0,i.tZ)(d.x,{className:"py-6 md:py-20",style:{backgroundColor:r||"#f5f5f5"},sx:e=>({".mantine-VideoItem__VideoItem-title,.mantine-VideoItem__ShortsItem-title":{[e.fn.largerThan("sm")]:{fontSize:(0,s.h)(14)}}}),children:(0,i.tZ)(W.W,{children:(0,i.BX)("div",{className:(0,E.default)("flex flex-col",R),children:[c?(0,i.BX)(i.HY,{children:[(0,i.BX)("div",{className:(0,E.default)("grid grid-cols-1 gap-y-4 md:gap-y-6 lg:grid-cols-6 lg:gap-x-10"),children:[F,(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1 sm:grid-cols-2","gap-y-4 md:gap-y-6 gap-x-2","lg:col-span-3 lg:grid-cols-3"),children:X.map((e,t)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,c)},"".concat(e.url,"-").concat(t)))})]}),z.length>0&&(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-6",R),children:z.map((e,t)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,c)},"".concat(e.url,"-").concat(t+3)))})]}):(0,i.BX)(i.HY,{children:[(0,i.BX)("div",{className:(0,E.default)("grid grid-cols-1 gap-y-6 lg:grid-cols-2 lg:gap-x-10"),children:[(0,i.BX)("div",{className:(0,E.default)("flex flex-col gap-2"),children:[(0,i.tZ)("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:e&&(0,i.tZ)(Z.T,{as:L,size:"h2",className:(0,E.default)("text-[32px] leading-[42px] md:text-[40px] md:leading-[52px]"),children:e})}),t&&(0,i.tZ)(Z.T,{size:"p3",c:"gray.6",children:t})]}),(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1 sm:grid-cols-2",R),children:M.map((e,t)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,c)},"".concat(e.url,"-").concat(t)))})]}),V.length>0&&(0,i.tZ)("div",{className:(0,E.default)("grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",R),children:V.map((e,t)=>(0,i.tZ)(VideoItemWrapper,{data:toVideoItemData(e,c)},"".concat(e.url,"-").concat(t+4)))})]}),B&&(0,i.tZ)(SeeMoreBtnWrapper,{onClick:I,children:y({id:"videoLibrary.splitGrid.seeMore",defaultMessage:"Xem th\xeam"})})]})})})},VideoLibrary=e=>{let{sessionProps:t,autoPlay:a=!1,applyH1:o,adUnitPath:s,primaryColor:d}=e,{title:c,description:m,videoLayout:h,videoList:g,applyShortVideo:p,applyCarousel:u,backgroundColor:f}=t,[x,v]=(0,n.useState)(!0),[b,y]=(0,n.useState)(g.map(e=>({title:e.videoTitle,url:e.urlVideo}))),Z=(0,n.useCallback)(async()=>{try{v(!0);let e=await (0,M.$W)(g);y(e||[])}catch(e){console.log(e),y([])}finally{v(!1)}},[g]);return(0,n.useEffect)(()=>{g.length>0&&Z()},[g.length,Z]),(0,i.tZ)(l.Provider,{value:{applyH1:o,title:c,description:m,autoplay:a,videoList:g,videoData:b,applyShortVideo:p,applyCarousel:u,backgroundColor:f,loading:x,adUnitPath:s,primaryColor:d},children:h===r.CY.Feature?(0,i.tZ)(FeatureLayout,{}):h===r.CY.SplitVideoGrid?(0,i.tZ)(SplitGridLayout,{}):h===r.CY.Grid?(0,i.tZ)(GridLayout,{}):h===r.CY.List?(0,i.tZ)(ListLayout,{}):null})}},S4a3:function(e){e.exports=JSON.parse('{"nm":"Group 38793 (1)","ddd":0,"h":512,"w":512,"meta":{"g":"LottieFiles AE 3.5.9"},"layers":[{"ty":4,"nm":"Shape Layer 2","sr":1,"st":0,"op":1800,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[252,248,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":0,"k":100,"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0],"ix":3},"s":{"a":0,"k":[462,462],"ix":2}},{"ty":"gs","bm":0,"hd":false,"mn":"ADBE Vector Graphic - G-Stroke","nm":"Gradient Stroke 1","e":{"a":0,"k":[234,-227],"ix":5},"g":{"p":3,"k":{"a":0,"k":[0,1,1,1,0.5,1,1,1,1,1,1,1],"ix":8}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[-230,237],"ix":4},"lc":1,"lj":1,"ml":4,"o":{"a":0,"k":100,"ix":9},"w":{"a":0,"k":50,"ix":10}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[4,8],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":1800,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6},"sk":{"a":0,"k":0},"p":{"a":0,"k":[252,248,0],"ix":2},"r":{"a":0,"k":0,"ix":10},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[100],"t":0},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[0],"t":15},{"s":[100],"t":30}],"ix":11}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0],"ix":3},"s":{"a":0,"k":[205,205],"ix":2}},{"ty":"gf","bm":0,"hd":false,"mn":"ADBE Vector Graphic - G-Fill","nm":"Gradient Fill 1","e":{"a":0,"k":[253,-255],"ix":6},"g":{"p":3,"k":{"a":0,"k":[0,1,1,1,0.5,1,1,1,1,1,1,1],"ix":9}},"t":1,"a":{"a":0,"k":0},"h":{"a":0,"k":0},"s":{"a":0,"k":[-253,253],"ix":5},"r":1,"o":{"a":0,"k":100,"ix":10}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[4,8],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":2}],"v":"4.8.0","fr":30,"op":31,"ip":0,"assets":[]}')}}]);