"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1880],{gY3Y:function(e,t,n){n.d(t,{$:function(){return q},d:function(){return VideoPage}});var i,a,o=n("BGKE"),l=n("q1tI"),r=n("2su4"),d=n("P5LW"),s=n("rIrU"),c=n("nGnw"),u=n("fdQd"),p=n("wp0n"),h=n("8wjV"),g=n("OAL+"),m=n("Eso5"),f=n("YFqc"),v=n.n(f),C=n("dDsW"),b=n("gHFm"),y=n("CBW8"),L=n("lXMY"),Z=n("GcFZ"),w=n("9+32"),S=n("xJRM"),I=n("smZU"),T=n("du+H"),E=n("iv2E"),M=n("raAP"),x=n("hXNO"),k=n("FewS"),_=n("VIdu"),B=n("tytH"),P=n("/npG"),A=(0,P.k)((e,t)=>{let{isHighlightTab:n}=t;return{bannerWrapper:{position:"relative"},breadcrumb:{position:"absolute",top:16,left:0,right:0,[e.fn.smallerThan("sm")]:{display:"none"}},filterArea:{...!n&&{display:"flex",gap:16,[e.fn.smallerThan("sm")]:{flexDirection:"column"},[e.fn.largerThan("sm")]:{justifyContent:"space-between",alignItems:"center"}}},filterBar:{display:"flex",gap:8},featureVideo:{display:"flex",flexDirection:"column",gap:16,[e.fn.largerThan("sm")]:{gap:40}},tabList:{display:"flex",gap:24,borderBottom:"1px solid ".concat(e.colors.neutral[1])},tab:{display:"inline-block",paddingBottom:8,color:"#8c8c8c",borderBottom:"2px solid transparent","&:hover":{color:e.fn.primaryColor()},"&.active":{color:e.fn.primaryColor(),borderBottomColor:e.fn.primaryColor()}}}}),O=n("+4HH"),F=n("zPX9"),D=n("EoPH"),N=n("eZo4"),U=n("KeOA"),H=n("SPK5"),R=n("RZSM"),X=n("O/o9"),z=n("09QT"),W=n("AFiN"),G=n("oQBk"),V=(0,P.k)(()=>({root:{},inner:{position:"relative",display:"flex",flexDirection:"column",gap:40}}));let ListingPage=e=>{let{videos:t=[],orderBy:n=a.LATEST,type:i,styles:r,classNames:c,...u}=e,{formatMessage:h}=(0,C.Z)(),{classes:f}=V(void 0,{name:"Videos__ListingPage",styles:r,classNames:c}),{ref:v,inView:y}=(0,X.YD)(),{query:L}=(0,d.h)(),{slug:Z,id:w,...S}=L,[I,T]=(0,l.useState)(t),[E,M]=(0,l.useState)(!1),[k,_]=(0,l.useState)(!1),[P,A]=(0,l.useState)(1),[j,Y]=(0,l.useState)(!1),[q,K]=(0,l.useState)(null),Q=(0,x.d)(),J=(0,l.useCallback)(async(e,t)=>{var n,o,l,r,d;M(!0),t&&_(!0);let s=await (0,z.d)(G.y.VIDEOS.GET_LISTING,{method:"GET",params:{page:1,orderBy:a.LATEST,type:i,...e,pageSize:i!==D.V.SHORTS||Q?20:18}});M(!1),t&&_(!1);let c=(null==s?void 0:null===(n=s.data)||void 0===n?void 0:n.videos)||[];T(e=>[...t?[]:e,...c.map(e=>(0,W.Yj)(e))]),Y(0==c.length||(null==s?void 0:null===(l=s.data)||void 0===l?void 0:null===(o=l.paging)||void 0===o?void 0:o.current_page)===(null==s?void 0:null===(d=s.data)||void 0===d?void 0:null===(r=d.paging)||void 0===r?void 0:r.max_num_pages))},[i,Q]);return(0,l.useEffect)(()=>{let e=JSON.parse(localStorage.getItem(s.tS)||"{}");String(null==e?void 0:e.id)===w&&(K(e),localStorage.removeItem(s.tS))},[]),(0,l.useEffect)(()=>{J({type:i,orderBy:a.LATEST,page:1,...S},!0)},[i]),(0,l.useEffect)(()=>{!y||j||E||A(e=>e+1)},[y]),(0,l.useEffect)(()=>{J({type:i,orderBy:n,page:1,...S},!0),Y(!1)},[n]),(0,l.useEffect)(()=>{P>1&&J({type:i,orderBy:n,page:P,...S})},[P]),(0,o.BX)(o.HY,{children:[(0,o.tZ)(m.x,{...u,children:(0,o.BX)(b.W,{className:f.inner,children:[(0,o.tZ)(N.f,{zIndex:1,keepMounted:!0,visible:k,transitionDuration:300}),I.length>0&&(0,o.tZ)(U.M,{spacing:i===D.V.SHORTS?8:24,verticalSpacing:Q?16:24,cols:i===D.V.SHORTS?Q?2:6:Q?1:4,children:I.map((e,t)=>(0,o.tZ)(O.V,{data:e,dataEventCategory:"".concat((0,B.f)(i)," Video"),dataEventAction:"".concat((0,B.f)(i)," Video Click ").concat(t+1)},String(t)))}),0===I.length&&j?(0,o.tZ)(H.k,{justify:"center",children:(0,o.BX)(g.K,{spacing:24,justify:"center",children:[(0,o.tZ)(R.o,{ratio:247/154,w:400,children:(0,o.tZ)("img",{loading:"lazy",src:"/svg/not-found.svg",alt:"not found"})}),(0,o.tZ)(p.T,{size:"p3",sx:{textAlign:"center"},children:h({id:"videosPage.notFound",defaultMessage:"No Results Found"})})]})}):(0,o.tZ)(m.x,{ref:v,sx:{opacity:Number(!j&&y)},children:(0,o.tZ)(F.L,{})})]})}),q&&(0,o.tZ)(O.a,{opened:!!(null==q?void 0:q.videoId),data:q,onClose:()=>K(null),isMobile:Q})]})};var j=n("iZ8j"),Y=(0,P.k)(e=>({root:{},inner:{display:"flex",flexDirection:"column",gap:16,[e.fn.largerThan("sm")]:{gap:40}},info:{display:"flex",flexDirection:"column",gap:16,maxWidth:552},thumbnail:{},thumbnailImg:{[e.fn.largerThan("sm")]:{maxHeight:280}},desc:{[e.fn.smallerThan("sm")]:{display:"none"}},action:{},seeMoreBtn:{[e.fn.smallerThan("sm")]:{width:"100%"}}}));let SessionWrapper=e=>{let{title:t,actionUrl:n,children:i,dataTrackingName:a,styles:l,classNames:r,className:s,...c}=e,{locale:u}=(0,d.h)(),{classes:g,cx:f}=Y(void 0,{name:"Videos__SessionWrapper",styles:l,classNames:r}),{formatMessage:y}=(0,C.Z)();return(0,o.tZ)(m.x,{className:f(g.root,s),...c,children:(0,o.BX)(b.W,{className:g.inner,children:[t&&(0,o.tZ)(p.T,{size:"h3",as:"h2",children:t}),i,n&&(0,o.tZ)(m.x,{className:g.action,children:(0,o.tZ)(v(),{prefetch:!1,href:n,children:(0,o.tZ)(h.B,{variant:"secondary",rightIcon:(0,o.tZ)(j.Z,{color:"currentColor",size:18}),className:g.seeMoreBtn,dataEventCategory:"Highlight Video",dataEventAction:"See More ".concat(a),dataEventLabel:n.startsWith("https://")?n:"https://".concat(E.domainLocales[u]).concat(n),children:y({id:"home.seeMore"})})})})]})})};(i=a||(a={})).LATEST="latest",i.OLDEST="oldest",i.POPULAR="popular";let VideoLandingPage=e=>{let{videoLandingPage:t,videos:n,styles:i,classNames:a}=e,{formatMessage:r}=(0,C.Z)(),{query:s,locale:f}=(0,d.h)(),{slug:P}=s,O=(0,x.d)(),F=(0,M.U)(),D=(0,l.useMemo)(()=>(null==P?void 0:P[1])||q,[P]),{classes:N,cx:U,theme:H}=A({isHighlightTab:D===q},{name:"VideoLandingPage",styles:i,classNames:a}),R=(0,l.useMemo)(()=>[{name:r({id:"choicePopover.latest"}),type:"latest"},{name:r({id:"choicePopover.oldest"}),type:"oldest"},{name:r({id:"choicePopover.popular"}),type:"popular"}],[]),[X,z]=(0,l.useState)("latest"),W=[{label:t.name||r({id:"videosPage.pageTitle",defaultMessage:"Videos"}),value:"/videos/"}],G=(0,_.od)({countryAdTag:(0,_.Em)(f,{isMobile:O}),contentAdTag:{result:"Videos",redundant:!0}});return(0,o.BX)(o.HY,{children:[!t.disableAd&&(0,o.BX)(y.o,{children:[(0,o.tZ)(T.MastheadAd,{adUnitPath:G,className:"videos-masthead"}),(0,o.tZ)(L.FixedBottomAdBlock,{adUnitPath:G,className:"videos-bottom-ad",isMobile:O})]}),(0,o.BX)(g.K,{sx:e=>({gap:16,paddingBottom:16,[e.fn.largerThan("sm")]:{paddingBottom:48,gap:48}}),children:[t.listSessions.map((e,n)=>(0,o.tZ)(l.Fragment,{children:e.sessionLayout===k.b.HeadingBanner?(0,o.BX)(m.x,{className:N.bannerWrapper,children:[(0,o.tZ)(m.x,{className:N.breadcrumb,children:(0,o.tZ)(b.W,{children:(0,o.tZ)(u.B,{children:(W||[]).map(e=>(0,o.tZ)(u.B.Item,{href:e.value,...e,children:e.label},e.value))})})}),(0,o.tZ)(w.b,{...e})]}):e.sessionLayout===k.b.FeatureVideo?(0,o.BX)(b.W,{className:N.featureVideo,children:[(0,o.BX)(m.x,{className:N.filterArea,children:[(0,o.tZ)(m.x,{className:N.tabList,children:[{name:r({id:"videosPage.highlightTab"}),type:q},...e.tabList].map((e,t)=>(0,o.tZ)(v(),{prefetch:!1,href:e.type===q?"/videos/":"/videos/".concat(e.type,"/"),"data-event-category":"Video Type","data-event-action":e.type,"data-event-label":"https://".concat(E.domainLocales[f]).concat(e.type===q?"/videos/":"/videos/".concat(e.type,"/")),children:(0,o.tZ)(p.T,{size:"s3",className:U(N.tab,D===e.type?"active":""),children:e.name})},String(t)))}),D!==q&&(0,o.tZ)(m.x,{className:N.filterBar,children:R.map(e=>{let t=X===e.type;return(0,o.tZ)(h.B,{variant:t?"secondary":"tertiary",onClick:()=>z(e.type),dataEventCategory:"".concat((0,B.f)(D)," Video"),dataEventAction:(0,B.f)(e.type),dataEventLabel:F,sx:{fontWeight:"normal",...t&&{backgroundColor:H.colors.blue[0]}},children:e.name},e.type)})})]}),D===q&&(0,o.tZ)(Z.h,{...e})]}):D===q?(0,o.tZ)(o.HY,{children:e.videos.length>0&&[k.b.HCPVideo,k.b.CategoriesVideo,k.b.ShortsVideo].includes(e.sessionLayout)?(0,o.tZ)(SessionWrapper,{title:e.sessionLayout===k.b.CategoriesVideo&&!t.disableAd&&O&&"list"===e.layout?void 0:e.title,dataTrackingName:e.sessionLayout===k.b.HCPVideo?"HCP Video":e.sessionId,actionUrl:e.readMore,styles:t=>({root:{[t.fn.smallerThan("sm")]:{paddingTop:10,paddingBottom:10}},...e.sessionLayout===k.b.HCPVideo&&{root:{backgroundImage:"url(".concat(c.C.getAssetPath("video-pages/banner-hpc.jpg"),")"),backgroundRepeat:"no-repeat",backgroundSize:"cover",paddingTop:40,paddingBottom:40,[t.fn.largerThan("sm")]:{paddingTop:80,paddingBottom:80}},action:{[t.fn.largerThan("sm")]:{display:"flex",justifyContent:"center"}},seeMoreBtn:{borderColor:"transparent"}}}),children:e.sessionLayout===k.b.ShortsVideo?(0,o.tZ)(S.e,{slideNumberDesktop:7,videoList:e.videos}):(0,o.tZ)(I.B,{title:e.title,videos:e.videos,adUnitPath:G,showAds:!t.disableAd,dataEventCategory:"Highlight Video",dataTrackingName:e.sessionLayout===k.b.HCPVideo?"HCP Video":e.sessionId,layout:e.sessionLayout===k.b.HCPVideo?"grid":e.layout})}):null}):null},String(n))),D!==q&&(0,o.tZ)(ListingPage,{orderBy:X,videos:n,type:D})]})]})},q="highlight",VideoPage=e=>{let{videoLandingPage:t,footerInfo:n,dataNavMenuContent:i,activeTab:a,videos:c,tags:u}=e,[p,h]=(0,l.useState)(!1),{locale:g,asPath:m}=(0,d.h)();return(0,o.tZ)(r.x,{title:t.name,image:s.CX[g].HOMEPAGE_IMAGE,onTopBarAppears:e=>{h(e)},SEOData:{apiMetaData:t.metaTag,isIndexable:!0},footerInfo:n,dataNavMenuContent:i,languageOptions:(0,r.c)(g,m),activeMenuService:"video",children:(0,o.tZ)(VideoLandingPage,{videoLandingPage:t,activeTab:a,videos:c,tags:u})})}},"95Us":function(e,t,n){n.d(t,{n:function(){return AcquisitionMarketing}});var i=n("BGKE"),a=n("q1tI"),o=n("uuQu"),l=n("fNFL"),r=n("unQi"),d=n("7Ci/"),s=n("Wgwc"),c=n.n(s),u=n("a5vB"),p=n("09QT"),h=n("oQBk"),g=n("P5LW"),m=n("vmu3"),f=n("o0qI"),v=n("SGew"),C=n("DEkF"),b=n("fdQd"),y=n("wp0n"),L=n("8wjV"),Z=n("OAL+"),w=n("SPK5"),S=n("Iblh"),I=n("dDsW");let _ConfirmModal=()=>{let{formatMessage:e}=(0,I.Z)(),{state:{isLoggedIn:t,userInfo:n}}=(0,a.useContext)(f.I),{router:r,query:d}=(0,g.h)(),[s,{open:c,close:u}]=(0,S.q)(!1);return(0,a.useEffect)(()=>{if(null==d?void 0:d.recordId){u();return}t&&(null==n?void 0:n.subscription)===1&&c()},[null==d?void 0:d.recordId,t,null==n?void 0:n.subscription]),(0,i.tZ)(l.M,{opened:s,onClose:u,zIndex:400,styles:{body:{padding:32,[o.M.mbDown]:{padding:16}}},children:(0,i.BX)(Z.K,{spacing:8,align:"center",justify:"center",ta:"center",children:[(0,i.tZ)(b.c,{ratio:1,w:80,children:(0,i.BX)("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",children:[(0,i.tZ)("path",{d:"M33.4982 4.40625C34.7149 4.40625 35.7013 3.41988 35.7013 2.20312C35.7013 0.986372 34.7149 0 33.4982 0C32.2814 0 31.295 0.986372 31.295 2.20312C31.295 3.41988 32.2814 4.40625 33.4982 4.40625Z",fill:"#FFCB37"}),(0,i.tZ)("path",{d:"M72.2031 27.7396C73.4199 27.7396 74.4062 26.7533 74.4062 25.5365C74.4062 24.3197 73.4199 23.3334 72.2031 23.3334C70.9864 23.3334 70 24.3197 70 25.5365C70 26.7533 70.9864 27.7396 72.2031 27.7396Z",fill:"#FFCB37"}),(0,i.tZ)("path",{d:"M60.8287 45.1687C62.0455 45.1687 63.0319 44.1823 63.0319 42.9656C63.0319 41.7488 62.0455 40.7625 60.8287 40.7625C59.612 40.7625 58.6256 41.7488 58.6256 42.9656C58.6256 44.1823 59.612 45.1687 60.8287 45.1687Z",fill:"#FFCB37"}),(0,i.tZ)("path",{d:"M15.7844 44.5032C17.0012 44.5032 17.9875 43.5168 17.9875 42.3C17.9875 41.0833 17.0012 40.0969 15.7844 40.0969C14.5677 40.0969 13.5813 41.0833 13.5813 42.3C13.5813 43.5168 14.5677 44.5032 15.7844 44.5032Z",fill:"#FFCB37"}),(0,i.tZ)("path",{d:"M60.2479 10.4959C62.2257 10.4959 63.8291 8.89249 63.8291 6.91462C63.8291 4.93675 62.2257 3.33337 60.2479 3.33337C58.27 3.33337 56.6666 4.93675 56.6666 6.91462C56.6666 8.89249 58.27 10.4959 60.2479 10.4959Z",fill:"#FFE187"}),(0,i.tZ)("path",{d:"M13.5812 22.5062C15.5591 22.5062 17.1625 20.9029 17.1625 18.925C17.1625 16.9471 15.5591 15.3438 13.5812 15.3438C11.6034 15.3438 10 16.9471 10 18.925C10 20.9029 11.6034 22.5062 13.5812 22.5062Z",fill:"#FFE187"}),(0,i.tZ)("path",{d:"M63.9688 43.6476L71.5135 39.8334H71.5213L69.2091 69.2168C69.1295 70.2288 68.8514 71.2152 68.3905 72.1198C67.9296 73.0243 67.2951 73.8291 66.5231 74.4884C65.7511 75.1476 64.8568 75.6483 63.8913 75.9618C62.9258 76.2754 61.908 76.3957 60.896 76.3158L13.7009 72.6001C12.2428 72.4891 10.8477 71.9601 9.68262 71.0763L37.6513 56.9411L63.9688 43.6476Z",fill:"#91CAFF"}),(0,i.tZ)("path",{d:"M66.5149 34.0487L71.6087 39.8464L64.064 43.6606L66.5149 34.0487Z",fill:"#2743AD"}),(0,i.tZ)("path",{d:"M66.0296 23.4229L66.0297 23.423C66.4077 23.5188 66.7631 23.6882 67.0755 23.9215C67.3879 24.1548 67.6512 24.4475 67.8504 24.7827C68.0495 25.1179 68.1806 25.4891 68.2362 25.8751C68.2917 26.261 68.2706 26.6541 68.174 27.0319L68.174 27.0319L66.3911 34.0175L66.5123 34.0485L66.3911 34.0176L63.9542 43.5744L37.7593 56.8069L16.9718 40.8747L17.0747 40.7429L17.0909 40.7223L17.0973 40.6968L21.0732 25.0675L21.0802 25.0588L21.0869 25.0326L23.4768 15.6423C23.6712 14.8794 24.1608 14.225 24.8378 13.823C25.5148 13.421 26.3237 13.3044 27.0866 13.4988L33.0909 15.033L33.1062 15.0369H33.1141L54.4447 20.4705L66.0296 23.4229Z",fill:"white",stroke:"#E4E8EC","stroke-width":"0.25"}),(0,i.tZ)("path",{d:"M47.6763 12.6251L54.4857 20.3696L33.1364 14.9313L36.9331 11.773C38.484 10.4924 40.4722 9.86523 42.4772 10.0243C44.4822 10.1833 46.3467 11.116 47.6763 12.6251Z",fill:"#2743AD"}),(0,i.tZ)("path",{d:"M37.7458 56.9539L9.77716 71.0891C8.72869 70.3125 7.89523 69.2817 7.35533 68.0939C6.81544 66.9061 6.5869 65.6003 6.69124 64.2997L9.00437 34.9242L16.7959 40.8972L37.7458 56.9539Z",fill:"#65B5FF"}),(0,i.tZ)("path",{d:"M20.9576 25.011L16.975 40.6665L16.7945 40.8976L9.00378 34.9247L20.9576 25.011Z",fill:"#2743AD"}),(0,i.tZ)("path",{d:"M42.3178 26.5789L40.4372 28.756C40.1883 29.044 39.8732 29.2672 39.519 29.4064C39.1648 29.5457 38.782 29.5968 38.4037 29.5555L35.544 29.2402C35.1087 29.1924 34.6687 29.2672 34.2737 29.4564C33.8788 29.6455 33.5446 29.9414 33.309 30.3105C33.0734 30.6797 32.9457 31.1074 32.9405 31.5453C32.9352 31.9832 33.0526 32.4138 33.2793 32.7885L34.77 35.2509C34.9669 35.5763 35.0817 35.9447 35.1045 36.3243C35.1274 36.7039 35.0577 37.0835 34.9014 37.4302L33.7141 40.0525C33.5342 40.4518 33.4695 40.8933 33.5274 41.3274C33.5853 41.7614 33.7635 42.1706 34.0417 42.5087C34.32 42.8468 34.6873 43.1003 35.1022 43.2405C35.517 43.3808 35.9628 43.4022 36.3891 43.3024L39.1913 42.6454C39.5617 42.5586 39.9476 42.5631 40.3158 42.6586C40.684 42.7541 41.0235 42.9377 41.3049 43.1937L43.4345 45.1299C43.7585 45.4244 44.1585 45.6223 44.5892 45.7014C45.0199 45.7805 45.4641 45.7375 45.8717 45.5773C46.2792 45.4171 46.6338 45.1461 46.8954 44.7949C47.157 44.4437 47.3151 44.0264 47.3519 43.59L47.5934 40.7223C47.6249 40.3433 47.7483 39.9776 47.9529 39.6569C48.1575 39.3361 48.437 39.0701 48.7675 38.8817L51.2672 37.4543C51.6474 37.2371 51.9593 36.9178 52.1676 36.5326C52.3758 36.1473 52.4722 35.7115 52.4457 35.2744C52.4192 34.8373 52.271 34.4163 52.0178 34.059C51.7645 33.7017 51.4164 33.4224 51.0127 33.2527L48.3604 32.1381C48.0096 31.9904 47.7 31.7596 47.4582 31.4658C47.2163 31.1719 47.0494 30.8237 46.9719 30.451L46.3866 27.6343C46.2971 27.2065 46.0899 26.8122 45.7883 26.4959C45.4867 26.1796 45.1027 25.9539 44.6797 25.8442C44.2566 25.7344 43.8113 25.7451 43.394 25.8749C42.9767 26.0047 42.604 26.2485 42.3178 26.5789Z",fill:"#FE921D"})]})}),(0,i.tZ)(C.H,{tag:"h4",children:e({id:"newsletter.marketing.confirm.title",defaultMessage:"Premium Newsletter"})}),(0,i.tZ)(y.T,{size:"p2",color:"gray.6",children:e({id:"newsletter.marketing.confirm.message",defaultMessage:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua"})}),(0,i.BX)(w.k,{w:"100%",gap:12,mt:24,direction:{base:"column-reverse",md:"row"},children:[(0,i.tZ)(L.B,{variant:"tertiary",size:"lg",fullWidth:!0,onClick:()=>{r.replace("/")},children:e({id:"newsletter.marketing.confirm.cancel",defaultMessage:"No, thank you"})}),(0,i.tZ)(L.B,{size:"lg",onClick:u,fullWidth:!0,children:e({id:"newsletter.marketing.confirm.ok",defaultMessage:"Yes, I want updating"})})]})]})})};var T=n("iBNF"),E=n("XFb3"),M=n("aDCK"),x=n("cChf"),k=n("Tabs"),_=n("nCpW"),B=n("DzJC"),P=n.n(B),A=n("q0An"),O=n("xIXX"),F=n("iv2E"),D=n("05Ua"),N=n("G/jr"),U=n("2rdL"),H=n("C/sX"),R=n("vaps"),X=n("eito"),z=n("Eso5"),W=n("hXNO"),G=n("rIrU"),V=n("NEaA");let _StepIndicator=e=>{let{currentStep:t,numberOfSteps:n,...a}=e,{steps:o}=(0,m.i)(e=>e,u.X);return(0,i.tZ)(w.k,{gap:2,...a,children:Array.from({length:n}).map((e,n)=>(0,i.tZ)(V.i,{w:32,size:4,color:o.indexOf(t)>=n?E.t.blue[6]:E.t.neutral[3],sx:{borderRadius:2}},String(n)))})},_Desktop=e=>{var t;let{title:n,currentStep:a,children:o,nextButtonProps:l,backButtonProps:r}=e,{locale:s}=(0,g.h)(),{formatMessage:c}=(0,I.Z)(),{numberOfSteps:u}=(0,m.i)(e=>({numberOfSteps:e.numberOfSteps}));return(0,i.BX)(H.r,{justify:"space-between",pos:"relative",h:"100%",children:[(0,i.tZ)(H.r.Col,{span:7,children:(0,i.tZ)(R.x,{h:"100%",offsetScrollbars:!0,scrollbarSize:4,children:(0,i.BX)(Z.K,{h:"100%",sx:{flexGrow:1,flexShrink:0},mah:"100vh",spacing:32,children:[(0,i.BX)(w.k,{align:"center",justify:r&&l?"space-between":"center",w:"100%",children:[r&&(0,i.tZ)(L.B,{size:"sm",variant:"ghost",leftIcon:(0,i.tZ)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,i.tZ)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.16676 5.45261L6.61943 7.99994L9.16676 10.5473C9.44276 10.8233 9.44276 11.2713 9.16676 11.5473C8.89076 11.8233 8.44276 11.8233 8.16676 11.5473L5.09076 8.47127C4.8301 8.21127 4.8301 7.78927 5.09076 7.52861L8.16676 4.45261C8.44276 4.17661 8.89076 4.17661 9.16676 4.45261C9.44276 4.72861 9.44276 5.17661 9.16676 5.45261Z",fill:"#2D87F3"})}),...r,children:c({id:"riskScreener.back",defaultMessage:"Back"})}),(0,i.tZ)(X.e,{href:"/",children:(0,i.tZ)(U.L,{type:(null===(t=G.CX[s])||void 0===t?void 0:t.LOGO_TYPE)||"hellobacsi",width:"auto",height:"32px"})}),l&&(0,i.tZ)(L.B,{size:"sm",variant:"ghost",color:"gray.4",rightIcon:(0,i.tZ)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,i.tZ)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.16647 5.45261L8.71381 7.99994L6.16647 10.5473C5.89047 10.8233 5.89047 11.2713 6.16647 11.5473C6.44247 11.8233 6.89047 11.8233 7.16647 11.5473L10.2425 8.47127C10.5031 8.21127 10.5031 7.78927 10.2425 7.52861L7.16647 4.45261C6.89047 4.17661 6.44247 4.17661 6.16647 4.45261C5.89047 4.72861 5.89047 5.17661 6.16647 5.45261Z",fill:"#2D87F3"})}),...l,children:c({id:"riskScreener.next",defaultMessage:"Next"})})]}),(0,i.tZ)(d.W,{size:"xs",sx:{flexGrow:1},children:(0,i.BX)(Z.K,{spacing:24,p:2,mah:500,children:[a&&(0,i.tZ)(_StepIndicator,{numberOfSteps:u,currentStep:a}),n&&(0,i.tZ)(C.H,{tag:"h2",children:n}),o]})})]})})}),(0,i.tZ)(H.r.Col,{span:5,pos:"relative",children:(0,i.tZ)(z.x,{sx:{position:"fixed",top:0,bottom:0,right:"auto"},children:(0,i.tZ)("img",{src:"".concat(G.Nr,"/acquisition/banner-desktop.png"),alt:"",loading:"lazy"})})})]})},_Mobile=e=>{let{title:t,currentStep:n,children:a,nextButtonProps:o,backButtonProps:l,withBanner:r=!1}=e,{formatMessage:s}=(0,I.Z)(),{numberOfSteps:c}=(0,m.i)(e=>({numberOfSteps:e.numberOfSteps}));return(0,i.BX)(i.HY,{children:[r&&(0,i.tZ)(z.x,{mx:-16,mt:-16,children:(0,i.tZ)("img",{src:"".concat(G.Nr,"/acquisition/banner-mobile.png"),alt:"",loading:"lazy"})}),(0,i.tZ)(d.W,{fluid:!0,p:0,py:24,pos:"relative",children:(0,i.BX)(Z.K,{spacing:24,p:2,children:[n&&(0,i.tZ)(_StepIndicator,{numberOfSteps:c,currentStep:n}),t&&(0,i.tZ)(C.H,{tag:"h2",children:t}),a,l&&o&&(0,i.BX)(w.k,{gap:8,bg:"#ffffff",pos:"sticky",p:16,bottom:0,mx:-16,sx:{zIndex:1,width:"calc(100% + 32px)"},children:[l&&(0,i.tZ)(L.B,{size:"lg",variant:"secondary",fullWidth:!0,...l,children:s({id:"riskScreener.back",defaultMessage:"Back"})}),o&&(0,i.tZ)(L.B,{size:"lg",fullWidth:!0,...o,children:s({id:"riskScreener.next",defaultMessage:"Next"})})]})]})})]})},_AcquisitionContainer=e=>{let{title:t,currentStep:n,children:a,nextButtonProps:o,backButtonProps:l,withBanner:r,...s}=e,c=(0,W.d)();return(0,i.tZ)(d.W,{size:"100%",fluid:!0,p:0,h:"100%",...s,children:c?(0,i.tZ)(_Mobile,{title:t,currentStep:n,children:a,nextButtonProps:o,backButtonProps:l,withBanner:r}):(0,i.tZ)(_Desktop,{title:t,currentStep:n,children:a,nextButtonProps:o,backButtonProps:l})})},otpSchema=e=>A.Ry().shape({otp:A.Z_().required(e({id:"onboarding.otpForm.error"})).length(6,e({id:"onboarding.otpForm.error"})).default("")}),_OtpStep=e=>{let{onBack:t,onSubmit:n,...o}=e,{formatMessage:l}=(0,I.Z)(),{dispatch:r}=(0,a.useContext)(f.I),{locale:d}=(0,g.h)(),[s,c]=(0,a.useState)(30),v=(0,_.Y)(()=>c(e=>e-1),1e3),L=(0,a.useRef)(!0),{acquisitionInfo:w}=(0,m.i)(e=>e,u.X);(0,a.useEffect)(()=>(v.start(),v.stop),[]),(0,a.useEffect)(()=>{0===s&&(v.stop(),L.current=!1)},[s]);let S=(0,x.c)({initialValues:{otp:""},validate:(0,k.X)(otpSchema(l))}),[B,A]=(0,a.useState)();(0,a.useEffect)(()=>{B&&S.setFieldError("otp",B)},[B]);let onSubmit=async()=>{try{var e,t;A(void 0),S.onSubmit(onSubmit,onError);let i=await (0,p.d)(h.y.SSO.POST_VERIFY_CHANGE_EMAIL,{method:"POST",data:{email:w.userInfo.email,code:S.values.otp}},"sso"),a=(null==i?void 0:i._status)===-1&&((null==i?void 0:null===(t=i._data)||void 0===t?void 0:null===(e=t.code)||void 0===e?void 0:e[0])||(null==i?void 0:i._data)||"Internal Error");if(a)A(a);else{let e=await (0,O.Iq)();(null==e?void 0:e.id)?r({type:D.H.LOGIN,payload:e}):r({type:D.H.LOGOUT,payload:{domain:"."+F.domainLocales[d]}}),n()}}catch(e){}},onError=e=>{console.log(e)},U=(0,a.useMemo)(()=>P()(()=>{L.current||(c(30),onResendCode(),v.start(),L.current=!0)},1e3,{trailing:!1}),[v]),onResendCode=async()=>{await (0,p.d)(h.y.SSO.POST_CHANGE_EMAIL,{method:"POST",data:{email:w.userInfo.email}},"sso")};return(0,i.BX)(_AcquisitionContainer,{title:"",currentStep:"otp",nextButtonProps:{onClick:onSubmit},backButtonProps:{onClick:t},...o,children:[(0,i.BX)("div",{className:"header",children:[(0,i.tZ)(C.H,{tag:"h3",children:l({id:"onboarding.otpForm.heading",defaultMessage:""})}),(0,i.tZ)(y.T,{size:"p3",mt:8,color:T.r.colors.gray600,children:(0,i.tZ)("span",{dangerouslySetInnerHTML:{__html:l({id:"onboarding.otpForm.descriptionEmail",defaultMessage:"We have sent a One-Time Password (OTP) to your email {email}"},{email:'').concat((0,N.y)(w.userInfo.email),"")})}})})]}),(0,i.tZ)("form",{onSubmit:S.onSubmit(onSubmit,onError),children:(0,i.BX)(Z.K,{children:[(0,i.BX)(Z.K,{spacing:8,sx:{".otpContainer":{margin:0}},children:[(0,i.tZ)(b.O,{enterKeyHint:void 0,...S.getInputProps("otp")}),(0,i.tZ)(M.I.Error,{children:S.errors.otp})]}),(0,i.BX)("div",{className:"resend",children:[(0,i.tZ)(y.T,{size:"p4",color:E.t.gray[4],children:l({id:"onboarding.otpForm.notReceiveOTP",defaultMessage:""})}),(0,i.tZ)(y.T,{as:"a",size:"p4",color:T.r.colors.primaryBase,sx:{cursor:"pointer"},children:(0,i.tZ)("span",{onClick:U,children:l({id:"onboarding.otpForm.resendCode",defaultMessage:""},{seconds:s})})})]})]})})]})};var j=n("eosF"),Y=n("0TCZ"),q=n("cr+I"),K=n("g/tz"),Q=n("0VOb"),J=n("raAP"),$=n("DknJ"),ee=n("RZSM");let preferTopic_Desktop=e=>{let{topic:t,active:n,onClick:a,withCert:o=!1,...l}=e;return(0,i.BX)(z.x,{...l,sx:{position:"relative",border:"4px solid #ffffff",outline:"1px solid ".concat(n?"#91CAFF":"#ffffff"),borderRadius:4,background:n?"#E3F2FF":"#F7F9FC",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04)"},onClick:()=>{a(t,n)},children:[(0,i.tZ)(z.x,{id:"test",sx:{position:"absolute",top:4,right:4,width:20,height:20,zIndex:1},children:n?(0,i.BX)("svg",{id:"test",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,i.tZ)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.66699 9.99984C1.66699 5.39984 5.40033 1.6665 10.0003 1.6665C14.6003 1.6665 18.3337 5.39984 18.3337 9.99984C18.3337 14.5998 14.6003 18.3332 10.0003 18.3332C5.40033 18.3332 1.66699 14.5998 1.66699 9.99984ZM4.75066 10.5827L7.74232 13.5744C8.06732 13.8994 8.60066 13.8994 8.91732 13.5744L15.2423 7.2494C15.5673 6.9244 15.5673 6.3994 15.2423 6.0744C14.9173 5.7494 14.3923 5.7494 14.0673 6.0744L8.33399 11.8077L5.92566 9.40773C5.60066 9.08273 5.07566 9.08273 4.75066 9.40773C4.59461 9.56342 4.50692 9.7748 4.50692 9.99523C4.50692 10.2157 4.59461 10.427 4.75066 10.5827Z",fill:"#2D87F3"}),(0,i.tZ)("path",{d:"M7.74224 13.5772L4.75057 10.5856C4.59453 10.4299 4.50684 10.2185 4.50684 9.99808C4.50684 9.77765 4.59453 9.56627 4.75057 9.41058C5.07557 9.08558 5.60057 9.08558 5.92557 9.41058L8.33391 11.8106L14.0672 6.07725C14.3922 5.75225 14.9172 5.75225 15.2422 6.07725C15.5672 6.40225 15.5672 6.92725 15.2422 7.25225L8.91724 13.5772C8.60057 13.9022 8.06724 13.9022 7.74224 13.5772Z",fill:"white"})]}):(0,i.tZ)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.tZ)("path",{d:"M17.8337 9.99984C17.8337 14.3261 14.3266 17.8332 10.0003 17.8332C5.67409 17.8332 2.16699 14.3261 2.16699 9.99984C2.16699 5.67361 5.67409 2.1665 10.0003 2.1665C14.3266 2.1665 17.8337 5.67361 17.8337 9.99984Z",fill:"white",stroke:"#D9D9D9","stroke-linecap":"round","stroke-linejoin":"round"})})}),(0,i.BX)(w.k,{justify:"space-between",p:16,gap:24,children:[(0,i.BX)(Z.K,{spacing:4,children:[(0,i.tZ)(y.T,{size:"s2",weight:"semiBold",children:t.title}),(0,i.tZ)(y.T,{size:"n1",color:"gray.6",children:t.description})]}),(0,i.tZ)(ee.o,{ratio:1,w:80,sx:{flexShrink:0,img:{objectFit:"contain"}},children:(0,i.tZ)("img",{src:t.icon,alt:"",loading:"lazy"})})]}),o&&(0,i.tZ)(z.x,{sx:{position:"absolute",bottom:4,right:4},children:(0,i.tZ)(ee.o,{ratio:16/9,w:42,sx:{img:{objectFit:"contain"}},children:(0,i.tZ)("img",{src:"".concat(G.Nr,"/trust.png"),alt:"",loading:"lazy"})})})]})},preferTopic_Mobile=e=>{let{topic:t,active:n,onClick:a,withCert:o=!1,...l}=e;return(0,i.BX)(z.x,{...l,sx:{position:"relative",border:"4px solid #ffffff",outline:"1px solid ".concat(n?"#91CAFF":"#ffffff"),borderRadius:4,background:"#ffffff",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04)"},onClick:()=>{a(t,n)},children:[(0,i.tZ)(z.x,{id:"test",sx:{position:"absolute",top:4,right:4,width:20,height:20,zIndex:1},children:n?(0,i.BX)("svg",{id:"test",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,i.tZ)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.66699 9.99984C1.66699 5.39984 5.40033 1.6665 10.0003 1.6665C14.6003 1.6665 18.3337 5.39984 18.3337 9.99984C18.3337 14.5998 14.6003 18.3332 10.0003 18.3332C5.40033 18.3332 1.66699 14.5998 1.66699 9.99984ZM4.75066 10.5827L7.74232 13.5744C8.06732 13.8994 8.60066 13.8994 8.91732 13.5744L15.2423 7.2494C15.5673 6.9244 15.5673 6.3994 15.2423 6.0744C14.9173 5.7494 14.3923 5.7494 14.0673 6.0744L8.33399 11.8077L5.92566 9.40773C5.60066 9.08273 5.07566 9.08273 4.75066 9.40773C4.59461 9.56342 4.50692 9.7748 4.50692 9.99523C4.50692 10.2157 4.59461 10.427 4.75066 10.5827Z",fill:"#2D87F3"}),(0,i.tZ)("path",{d:"M7.74224 13.5772L4.75057 10.5856C4.59453 10.4299 4.50684 10.2185 4.50684 9.99808C4.50684 9.77765 4.59453 9.56627 4.75057 9.41058C5.07557 9.08558 5.60057 9.08558 5.92557 9.41058L8.33391 11.8106L14.0672 6.07725C14.3922 5.75225 14.9172 5.75225 15.2422 6.07725C15.5672 6.40225 15.5672 6.92725 15.2422 7.25225L8.91724 13.5772C8.60057 13.9022 8.06724 13.9022 7.74224 13.5772Z",fill:"white"})]}):(0,i.tZ)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,i.tZ)("path",{d:"M17.8337 9.99984C17.8337 14.3261 14.3266 17.8332 10.0003 17.8332C5.67409 17.8332 2.16699 14.3261 2.16699 9.99984C2.16699 5.67361 5.67409 2.1665 10.0003 2.1665C14.3266 2.1665 17.8337 5.67361 17.8337 9.99984Z",fill:"white",stroke:"#D9D9D9","stroke-linecap":"round","stroke-linejoin":"round"})})}),(0,i.BX)(Z.K,{spacing:0,children:[(0,i.BX)(w.k,{pos:"relative",justify:"space-between",align:"center",px:16,py:18,bg:n?"#E3F2FF":"#F7F9FC",children:[(0,i.tZ)(y.T,{size:"s2",weight:"semiBold",children:t.title}),(0,i.tZ)(ee.o,{ratio:1,w:65,sx:{flexShrink:0,img:{objectFit:"contain"}},children:(0,i.tZ)("img",{src:t.icon,alt:"",loading:"lazy"})}),o&&(0,i.tZ)(z.x,{sx:{position:"absolute",bottom:4,right:4},children:(0,i.tZ)(ee.o,{ratio:16/9,w:42,sx:{img:{objectFit:"contain"}},children:(0,i.tZ)("img",{src:"".concat(G.Nr,"/trust.png"),alt:"",loading:"lazy"})})})]}),(0,i.tZ)(z.x,{sx:{padding:"12px",background:"#ffffff"},children:(0,i.tZ)(y.T,{size:"n1",color:"gray.6",children:t.description})})]})]})},PreferTopic=e=>{let t=(0,W.d)();return t?(0,i.tZ)(preferTopic_Mobile,{...e}):(0,i.tZ)(preferTopic_Desktop,{...e})},_PreferStep=e=>{let{onSubmit:t,onBack:n,...o}=e,{acquisitionInfo:l,setAcquisitionInfo:r}=(0,m.i)(e=>e,u.X),{state:{isLoggedIn:d}}=(0,a.useContext)(f.I),s=(0,J.U)(),{formatMessage:c}=(0,I.Z)(),{locale:v}=(0,g.h)(),[C,S]=(0,Y.n)($.A),T=C.filter(e=>e.checked),E=C.every(e=>e.checked),M=C.some(e=>e.checked)&&!E,onSubmit=async()=>{try{if(T.length>0){if(d)r({preferredTopics:T}),t();else{let e=await (0,p.d)(h.y.PREMIUM.TEMP_POST_SUBSCRIPTION,{method:"POST",data:{domain:F.domainLocales[v||j.L.Vietnam],category:l.healthTopics,perferred:T.map(e=>{let{id:t}=e;return{id:t}})}},"premium");(0,K.p0)(q.stringifyUrl({url:window.location.href,query:{recordId:null==e?void 0:e.key}}))}}else(0,Q.c)({type:"danger",message:c({id:"newsletter.prefer.error.message",defaultMessage:"Please select preferred topics"}),title:c({id:"notification.comment.somethingWrong",defaultMessage:"Something went wrong."})})}catch(e){(0,Q.c)({type:"danger",message:"",title:c({id:"notification.comment.somethingWrong",defaultMessage:"Something went wrong."})})}},selectAll=()=>{S.setState(e=>e.map(e=>({...e,checked:!E})))},formatPreferTopic=(e,t)=>({...e,title:c({id:"newsletter.prefer.topic.title."+t,defaultMessage:e.title}),description:c({id:"newsletter.prefer.topic.description."+t,defaultMessage:e.description})});return(0,i.BX)(_AcquisitionContainer,{title:c({id:"newsletter.prefer.title",defaultMessage:"Please select your preferred healthcare content:"}),currentStep:"prefer",nextButtonProps:{onClick:onSubmit,dataEventCategory:"Newsletter",dataEventAction:"Save Healthcare Content",dataEventLabel:s},backButtonProps:{onClick:n},...o,children:[(0,i.tZ)(y.T,{size:"p3",color:"gray.6",children:c({id:"newsletter.prefer.description",defaultMessage:"Help us personalize your newsletter by telling us your healthcare content type preference."})}),(0,i.BX)(Z.K,{spacing:16,children:[(0,i.BX)(w.k,{align:"center",justify:"space-between",children:[(0,i.tZ)(b.d,{size:"xs",checked:E,indeterminate:M,label:(0,i.tZ)(y.T,{size:"s5",color:"gray.4",weight:"semiBold",children:c({id:"newsletter.prefer.numbers",defaultMessage:"{selected}/{total} ITEM SELECTED"},{selected:T.length,total:C.length})}),transitionDuration:0,onChange:selectAll,styles:{root:{display:"flex"},body:{alignItems:"center"},input:{borderRadius:50}}}),(0,i.tZ)(L.B,{size:"sm",compact:!0,variant:"ghost",onClick:selectAll,children:T.length!==C.length?c({id:"newsletter.prefer.selectAll",defaultMessage:"Select All"}):c({id:"newsletter.prefer.deselectAll",defaultMessage:"Deselect All"})})]}),C.map((e,t)=>(0,i.tZ)(PreferTopic,{topic:formatPreferTopic(e,t),active:e.checked,onClick:(e,n)=>S.setItemProp(t,"checked",!n),withCert:1===t},e.id))]})]})};var et=n("p46w"),en=n.n(et),ei=n("rEaw");let TempIcon=()=>(0,i.BX)("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none",children:[(0,i.tZ)("mask",{id:"mask0_3412_276528",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160",children:(0,i.tZ)("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_3412_276528)"})}),(0,i.BX)("g",{mask:"url(#mask0_3412_276528)",children:[(0,i.tZ)("path",{d:"M71.5918 0.45906L76.9744 38.1373C77.0096 38.1373 77.0799 38.1373 77.1151 38.102L82.357 75.0033L87.5636 38.0666C87.5988 38.0666 87.634 38.0666 87.634 38.0666L92.8407 1.02406C88.6542 0.353123 84.3622 0 79.9999 0C77.1503 0 74.3359 0.141249 71.5918 0.45906Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M131.152 18.5389C125.735 14.0189 119.684 10.1698 113.175 7.20361L97.8719 41.0681C97.9071 41.0681 97.9422 41.1034 97.9422 41.1034L82.4629 75.2857L131.152 18.5389Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M46.4376 64.8332L82.1104 75.3209H81.9697L82.3215 75.4269H82.3567L82.3919 75.3916L82.427 75.4269H82.3919L82.427 75.4622H82.4622L82.6029 75.5328L82.4974 75.4622L118.346 85.9852C118.346 86.0206 118.346 86.0206 118.311 86.0559L158.1 97.8149C159.331 92.2002 160 86.3384 160 80.3353C160 78.6756 159.929 76.9806 159.859 75.3562H119.824C119.824 75.3916 119.824 75.3916 119.824 75.4269L82.4622 75.4622V75.4269L82.6381 75.3916L82.4974 75.4622L82.814 75.3562H82.6381L155.497 53.6392C153.069 46.718 149.727 40.2205 145.611 34.2881L82.6381 75.2856H82.4974L82.5678 75.215L82.4622 75.2856L82.4974 75.0737L82.427 75.215V75.2503L82.3919 75.2856V75.2503H82.3215V75.215L82.2511 75.0737L82.2863 75.2503L82.216 75.215L82.2511 75.2503H82.1104L15.7604 32.4165C11.2221 38.5255 7.52819 45.3408 4.85449 52.6151L46.4376 64.8332ZM82.3215 75.3916V75.4269L82.216 75.3562L82.3215 75.3916Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M57.8012 46.9301L82.2867 75.2506L66.7722 41.1036L50.5541 5.61475C43.6587 8.33379 37.2559 12.0063 31.4512 16.4556L57.8012 46.9301Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M113.879 95.8023L82.5332 75.5684L106.984 103.854C106.948 103.854 106.948 103.889 106.913 103.889L136.007 137.647C141.531 132.209 146.245 125.994 150.044 119.179L113.879 95.8023Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M82.3213 75.4272V75.463H82.357L82.3213 75.4272H82.357H82.3213Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M82.2876 75.4621L82.3229 75.4268H82.2876L82.1465 75.4974L82.2876 75.4621Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M82.2516 75.7095L47.001 153.467C54.2833 156.786 62.1285 159.011 70.3959 160L82.2516 75.7095Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M82.4629 75.7095L94.3538 159.329C102.375 157.881 109.974 155.233 116.94 151.56L82.4629 75.7095Z",fill:"#E0F8EE"}),(0,i.tZ)("path",{d:"M82.3213 75.5682L82.3566 75.8506L82.4272 75.5682L82.3566 75.4976L82.3213 75.5682Z",fill:"#E0F8EE"})]}),(0,i.tZ)("path",{d:"M124.694 61.1997L124.986 62.1724C125.083 62.6587 125.472 62.9505 125.959 63.145L126.931 63.4368L125.959 63.8258C125.569 63.9231 125.18 64.3122 125.083 64.7012L124.694 65.7711L124.305 64.7012C124.111 64.3122 123.819 64.0204 123.43 63.8258L122.457 63.5341L123.43 63.2423C123.819 63.145 124.111 62.7559 124.305 62.3669L124.694 61.1997Z",fill:"#2D87F3"}),(0,i.tZ)("path",{d:"M104.743 34.2856L104.914 34.8571C104.972 35.1428 105.2 35.3142 105.486 35.4285L106.057 35.5999L105.486 35.8285C105.257 35.8856 105.029 36.1142 104.972 36.3428L104.743 36.9714L104.514 36.3428C104.4 36.1142 104.229 35.9428 104 35.8285L103.429 35.6571L104 35.4856C104.229 35.4285 104.4 35.1999 104.514 34.9714L104.743 34.2856Z",fill:"#00B16A"}),(0,i.tZ)("path",{d:"M118.343 38L119.086 40.4C119.429 41.4857 120.286 42.3429 121.315 42.6286L123.715 43.3714L121.257 44.2286C120.229 44.5714 119.486 45.3714 119.143 46.3429L118.286 48.8L117.315 46.2286C116.972 45.2571 116.172 44.5143 115.2 44.1714L112.857 43.3714L115.143 42.5714C116.115 42.2286 116.857 41.4857 117.257 40.5714L118.343 38Z",fill:"#FFB521"}),(0,i.tZ)("path",{d:"M41.8856 98.8569L42.057 99.4284C42.1141 99.7141 42.3427 99.8855 42.6284 99.9998L43.1999 100.171L42.6284 100.4C42.3999 100.457 42.1713 100.686 42.1141 100.914L41.8856 101.543L41.657 100.914C41.5427 100.686 41.3713 100.514 41.1427 100.4L40.5713 100.228L41.1427 100.057C41.3713 99.9998 41.5427 99.7712 41.657 99.5427L41.8856 98.8569Z",fill:"#00B16A"}),(0,i.tZ)("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.685L67.4859 131.543C66.4574 131.885 65.7145 132.685 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.485L59.0859 130.685L61.3717 129.885C62.3431 129.543 63.0859 128.8 63.4859 127.885L64.5717 125.314Z",fill:"#FFB521"}),(0,i.tZ)("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),(0,i.tZ)("path",{d:"M130.308 98.2856L130.53 99.0426C130.62 99.3988 130.931 99.666 131.243 99.755L132.044 99.9777L131.243 100.245C130.931 100.334 130.664 100.601 130.575 100.913L130.308 101.714L129.996 100.868C129.863 100.557 129.64 100.289 129.328 100.2L128.571 99.9331L129.328 99.666C129.64 99.5769 129.863 99.3098 129.996 99.0426L130.308 98.2856Z",fill:"#00B16A"}),(0,i.tZ)("path",{d:"M36.594 64L36.8166 64.757C36.9057 65.1132 37.2173 65.3803 37.529 65.4694L38.3305 65.692L37.529 65.9592C37.2173 66.0482 36.9502 66.3154 36.8611 66.6271L36.594 67.4286L36.2823 66.5826C36.1487 66.2709 35.9261 66.0037 35.6144 65.9147L34.8574 65.6475L35.6144 65.3803C35.9261 65.2913 36.1487 65.0241 36.2823 64.757L36.594 64Z",fill:"#FFB521"}),(0,i.tZ)("path",{d:"M67.3797 26.8569L67.6715 27.8296C67.7687 28.3159 68.1578 28.6077 68.6441 28.8022L69.6167 29.094L68.6441 29.4831C68.255 29.5803 67.866 29.9694 67.7687 30.3584L67.3797 31.4284L66.9906 30.3584C66.7961 29.9694 66.5043 29.6776 66.1152 29.4831L65.1426 29.1913L66.1152 28.8995C66.5043 28.8022 66.7961 28.4132 66.9906 28.0241L67.3797 26.8569Z",fill:"#2D87F3"}),(0,i.tZ)("path",{d:"M79.9992 108.572C95.7787 108.572 108.571 95.7797 108.571 80.0001C108.571 64.2206 95.7787 51.4287 79.9992 51.4287C64.2196 51.4287 51.4277 64.2206 51.4277 80.0001C51.4277 95.7797 64.2196 108.572 79.9992 108.572Z",fill:"#00B16A"}),(0,i.tZ)("path",{d:"M78.5788 89.1451C77.3578 89.147 76.1483 88.908 75.0198 88.4418C73.8912 87.9757 72.8657 87.2914 72.002 86.4283L68.637 83.0617C68.192 82.6009 67.9457 81.9838 67.9513 81.3432C67.9568 80.7027 68.2138 80.0899 68.6667 79.6369C69.1197 79.1839 69.7325 78.927 70.3731 78.9214C71.0136 78.9159 71.6308 79.1621 72.0916 79.6071L75.4565 82.9738C75.8629 83.3802 76.3454 83.7025 76.8764 83.9225C77.4073 84.1424 77.9764 84.2556 78.5511 84.2556C79.1259 84.2556 79.695 84.1424 80.2259 83.9225C80.7569 83.7025 81.2394 83.3802 81.6458 82.9738L102.982 63.6911C103.466 63.2745 104.093 63.0635 104.73 63.1034C105.367 63.1433 105.963 63.4308 106.391 63.9044C106.818 64.3781 107.044 65.0003 107.018 65.6379C106.993 66.2756 106.72 66.8781 106.256 67.3166L85.0026 86.513C84.1579 87.3531 83.1556 88.0181 82.0533 88.4698C80.9509 88.9215 79.7702 89.151 78.5788 89.1451Z",fill:"white"}),(0,i.tZ)("defs",{children:(0,i.BX)("radialGradient",{id:"paint0_radial_3412_276528",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)",children:[(0,i.tZ)("stop",{"stop-color":"#C4C4C4"}),(0,i.tZ)("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"})]})})]}),_ThankYouStep=e=>{var t,n;let{locale:o,router:l}=(0,g.h)(),{dispatch:r}=(0,a.useContext)(f.I),d=(0,W.d)(),{formatMessage:s}=(0,I.Z)(),{setShouldAcquisitionModalOpen:v,acquisitionInfo:w}=(0,m.i)(e=>e,u.X),continueReading=async()=>{let e=await (0,O.Iq)();(null==e?void 0:e.id)?r({type:D.H.LOGIN,payload:e}):r({type:D.H.LOGOUT,payload:{domain:"."+F.domainLocales[o]}}),v(!1),l.replace("/")},S=(0,a.useRef)(!1),T=(0,a.useCallback)(async()=>{var e,t,n;!S.current&&(null==w?void 0:null===(e=w.userInfo)||void 0===e?void 0:e.name)&&(null==w?void 0:null===(t=w.healthTopics)||void 0===t?void 0:t.length)>0&&(null==w?void 0:null===(n=w.preferredTopics)||void 0===n?void 0:n.length)>0&&(S.current=!0,await (0,p.d)(h.y.SSO.UPDATE_PROFILE,{method:"POST",data:{...w.userInfo,birthday:c()(w.userInfo.birthday).format("YYYY-MM-DD")}},"sso"),console.log("Sub"),await (0,p.d)(h.y.PREMIUM.POST_SUBSCRIPTION,{method:"POST",data:{ga_client_id:en().get(G.ch),client_ip:window.clientIP||"",user_info:w.userInfo,domain:F.domainLocales[o||ei.MV.Vietnam],category:w.healthTopics,perferred:w.preferredTopics.map(e=>{let{id:t}=e;return{id:t}})}},"premium"),await (0,p.d)(h.y.SSO.UPDATE_SUBSCRIPTION,{method:"PUT",data:{subscription:1}},"sso"))},[null==w?void 0:null===(t=w.userInfo)||void 0===t?void 0:t.name,null==w?void 0:w.healthTopics,null==w?void 0:w.preferredTopics]);return(0,a.useEffect)(()=>{T()},[T]),(0,i.tZ)(_AcquisitionContainer,{...e,children:(0,i.BX)(Z.K,{spacing:24,p:{base:22,md:50},py:{md:0},mt:{base:40,md:0},align:"center",children:[d&&(0,i.tZ)(z.x,{sx:{position:"absolute",top:20},children:(0,i.tZ)(U.L,{type:(null===(n=G.CX[o])||void 0===n?void 0:n.LOGO_TYPE)||"hellobacsi"})}),(0,i.tZ)(b.c,{ratio:1.5,w:160,mt:d?void 0:80,children:(0,i.tZ)(TempIcon,{})}),(0,i.tZ)(C.H,{tag:"h2",style:{textAlign:"center"},children:s({id:"newsletter.thanks.title",defaultMessage:"Thank you for signing up!"})}),(0,i.tZ)(y.T,{size:"p1",children:s({id:"newsletter.thanks.description",defaultMessage:"Your first hyper-personalized email is on its way. Get excited to dive into content that’s tailored specifically for you! Check it out now!"})}),(0,i.tZ)(L.B,{size:"lg",fullWidth:!0,onClick:continueReading,children:s({id:"continueReading",defaultMessage:"Continue Reading"})})]})})};var ea=n("JZkZ"),eo=n("qPyV"),el=n.n(eo),er=n("DA0W");let ed=(0,a.forwardRef)(function(e,t){let{label:n,...a}=e;return(0,i.tZ)("div",{ref:t,...a,children:(0,i.BX)(er.Z,{noWrap:!0,children:[(0,i.tZ)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,i.tZ)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.97887 8.15493C2.97887 5.29627 5.29627 2.97887 8.15493 2.97887C11.0136 2.97887 13.331 5.29627 13.331 8.15493C13.331 11.0136 11.0136 13.331 8.15493 13.331C5.29627 13.331 2.97887 11.0136 2.97887 8.15493ZM8.15493 1.5C4.47951 1.5 1.5 4.47951 1.5 8.15493C1.5 11.8303 4.47951 14.8099 8.15493 14.8099C9.72615 14.8099 11.1702 14.2653 12.3086 13.3547L15.2376 16.2837C15.5264 16.5725 15.9946 16.5725 16.2833 16.2837C16.5721 15.9949 16.5721 15.5267 16.2833 15.238L13.3544 12.3091C14.2652 11.1705 14.8099 9.72634 14.8099 8.15493C14.8099 4.47951 11.8303 1.5 8.15493 1.5Z",fill:"#8C8C8C"})}),(0,i.tZ)(y.T,{size:"p3",children:n})]})})}),es=(0,a.forwardRef)(function(e,t){let{label:n,...a}=e;return(0,i.tZ)("div",{ref:t,...a,children:(0,i.tZ)(y.T,{size:"p3",children:n})})});var ec=n("RGvF");let HistorySection=e=>{let{history:t,onDelete:n}=e;return(0,i.tZ)(w.k,{wrap:"wrap",gap:4,children:el()(t,"catId").map(e=>(0,i.tZ)(ec.C,{rightSection:(0,i.tZ)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",onClick:()=>null==n?void 0:n(e),children:(0,i.tZ)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.5 9C1.5 4.8525 4.8525 1.5 9 1.5C13.1475 1.5 16.5 4.8525 16.5 9C16.5 13.1475 13.1475 16.5 9 16.5C4.8525 16.5 1.5 13.1475 1.5 9ZM11.1677 12.2248C11.4602 12.5173 11.9327 12.5173 12.2252 12.2248C12.5101 11.9323 12.5101 11.4523 12.2252 11.1673L10.0577 8.99979L12.2252 6.83229C12.5177 6.53979 12.5177 6.0673 12.2252 5.7748C11.9327 5.4823 11.4602 5.4823 11.1677 5.7748L9.00015 7.9423L6.83265 5.7748C6.54015 5.4823 6.06765 5.4823 5.77515 5.7748C5.63471 5.91492 5.55579 6.10516 5.55579 6.30354C5.55579 6.50193 5.63471 6.69217 5.77515 6.83229L7.94265 8.99979L5.77515 11.1673C5.63471 11.3074 5.55579 11.4977 5.55579 11.696C5.55579 11.8944 5.63471 12.0847 5.77515 12.2248C6.06765 12.5173 6.54015 12.5173 6.83265 12.2248L9.00015 10.0573L11.1677 12.2248Z",fill:"#8C8C8C"})}),styles:{root:{height:32,background:"#ffffff",padding:"5px 12px",border:"1px solid ".concat(E.t.neutral[4]),borderRadius:32,textTransform:"unset"},rightSection:{height:18,cursor:"pointer"}},children:(0,i.tZ)(y.T,{size:"p4",children:e.localName})},e.catId))})};var eu=n("9n+W"),ep=n("YFqc"),eh=n.n(ep);let _NormalTopic=e=>{var t;let{value:n,name:o}=e,l=(0,a.useRef)(null),r=(0,a.useMemo)(()=>{var e;return!!(null===(e=l.current)||void 0===e?void 0:e.checked)},[null===(t=l.current)||void 0===t?void 0:t.checked]);return(0,a.useEffect)(()=>{if(r){var e,t;let n=null===(e=l.current)||void 0===e?void 0:e.querySelector(".mantine-Chip-checkIcon"),i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("width","16"),i.setAttribute("height","16"),i.setAttribute("viewBox","0 0 16 16"),i.setAttribute("fill","none"),i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("class","mantine-Chip-checkIcon");let a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","M13.32 3.99443C13.1468 3.99959 12.9825 4.07198 12.8617 4.19625L5.99973 11.0582L3.80442 8.86292C3.74299 8.79894 3.66941 8.74786 3.58799 8.71267C3.50657 8.67748 3.41895 8.65889 3.33025 8.65798C3.24156 8.65708 3.15358 8.67388 3.07146 8.70741C2.98934 8.74094 2.91474 8.79051 2.85202 8.85323C2.7893 8.91595 2.73973 8.99055 2.7062 9.07267C2.67267 9.15479 2.65587 9.24277 2.65677 9.33146C2.65768 9.42016 2.67627 9.50778 2.71146 9.5892C2.74665 9.67062 2.79773 9.7442 2.86171 9.80563L5.52838 12.4723C5.65341 12.5973 5.82295 12.6675 5.99973 12.6675C6.17651 12.6675 6.34606 12.5973 6.47108 12.4723L13.8044 5.13896C13.9008 5.04532 13.9666 4.92476 13.9932 4.79308C14.0198 4.6614 14.0061 4.52474 13.9537 4.40102C13.9013 4.2773 13.8128 4.17228 13.6998 4.09972C13.5867 4.02717 13.4543 3.99047 13.32 3.99443Z"),a.setAttribute("fill","#2D87F3"),i.appendChild(a),null==n||null===(t=n.parentNode)||void 0===t||t.replaceChild(i,n)}},[r]),(0,i.tZ)(eu.A,{ref:l,value:n,radius:6,styles:{label:{display:"flex",border:"1px solid #DBDFE5 !important",borderRadius:6,padding:"8px 16px",height:"initial",gap:4,position:"relative","&[data-checked='true']":{borderColor:"#2D87F3 !important",backgroundColor:"#E3F2FF !important",color:"#2D87F3 !important",gap:0,padding:"8px 16px"},"&:hover":{color:"initial",backgroundColor:"initial"},"&:not([data-checked])":{paddingLeft:36,"&::before":{top:5,content:'"+"',position:"absolute",left:16,fontSize:20,color:"#262626"}}}},children:(0,i.tZ)(y.T,{size:"p3",color:"gray.7",span:!0,children:o})})},RecentlyViewedSection=e=>{let{topics:t,onTopicChange:n,isBlock:o=!1,selectedTopics:l}=e,[r,d]=(0,a.useState)([]),{formatMessage:s}=(0,I.Z)();return((0,a.useEffect)(()=>{d(l)},[l.length]),(0,a.useEffect)(()=>{n(r)},[r]),t&&0!==t.length)?(0,i.BX)(Z.K,{spacing:12,px:16,mx:-16,children:[(0,i.BX)(w.k,{align:"center",gap:8,children:[(0,i.tZ)(y.T,{size:"s5",color:"gray.4",weight:"semiBold",children:s({id:"newsletter.recently",defaultMessage:"RECENTLY VIEWED"})}),(0,i.tZ)(eh(),{prefetch:!1,href:"/categories/",legacyBehavior:!0,children:(0,i.tZ)(L.B,{variant:"ghost",size:"sm",compact:!0,children:s({id:"viewAll",defaultMessage:"View All"})})})]}),(0,i.tZ)(eu.A.Group,{value:r.map(e=>e.catId),onChange:e=>{if(o&&r.lengtht.filter(t=>e.some(e=>t.catId===e)))},multiple:!0,children:(0,i.tZ)(w.k,{gap:8,wrap:"wrap",children:t.map((e,t)=>(0,i.tZ)(_NormalTopic,{value:e.catId,name:e.localName,isBlock:o},t))})})]}):null},TopicSection=e=>{let{topics:t,onTopicChange:n,isBlock:o=!1,selectedTopics:l}=e,r=(0,W.d)(),{formatMessage:d}=(0,I.Z)(),[s,c]=(0,a.useState)([]);(0,a.useEffect)(()=>{c(l)},[l.length]),(0,a.useEffect)(()=>{n(s)},[s]);let onValueChange=e=>{if(o&&s.lengtht.filter(t=>e.some(e=>t.catId===e)))};return(0,i.BX)(Z.K,{spacing:12,p:16,m:-16,children:[(0,i.tZ)(y.T,{size:"s5",color:"gray.4",weight:"semiBold",children:d({id:"newsletter.interested",defaultMessage:"PEOPLE ARE ALSO INTERESTED"})}),r?(0,i.tZ)(R.x,{w:"100%",offsetScrollbars:!0,scrollbarSize:4,p:16,m:-16,styles:{viewport:{margin:-16,padding:16,width:"initial"}},children:(0,i.tZ)(z.x,{w:800,children:(0,i.tZ)(eu.A.Group,{value:s.map(e=>e.catId),onChange:onValueChange,multiple:!0,children:(0,i.tZ)(w.k,{gap:8,wrap:"wrap",children:t.map(e=>(0,i.tZ)(_NormalTopic,{value:e.catId,name:e.localName,isBlock:o},e.catId))})})})}):(0,i.tZ)(eu.A.Group,{value:s.map(e=>e.catId),onChange:onValueChange,multiple:!0,children:(0,i.tZ)(w.k,{gap:8,wrap:"wrap",children:t.map(e=>(0,i.tZ)(_NormalTopic,{value:e.catId,name:e.localName,isBlock:o},e.catId))})})]})},_TopicSlide=e=>{let{topic:t,active:n,onClick:a,...o}=e;return(0,i.BX)(z.x,{mih:170,sx:{position:"relative",cursor:"pointer",padding:2,borderRadius:8,boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04)"},onClick:()=>a(t,n),...o,children:[n&&(0,i.tZ)(z.x,{id:"test",sx:{position:"absolute",top:2,right:2,width:20,height:20,zIndex:1},children:(0,i.BX)("svg",{id:"test",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,i.tZ)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.66699 9.99984C1.66699 5.39984 5.40033 1.6665 10.0003 1.6665C14.6003 1.6665 18.3337 5.39984 18.3337 9.99984C18.3337 14.5998 14.6003 18.3332 10.0003 18.3332C5.40033 18.3332 1.66699 14.5998 1.66699 9.99984ZM4.75066 10.5827L7.74232 13.5744C8.06732 13.8994 8.60066 13.8994 8.91732 13.5744L15.2423 7.2494C15.5673 6.9244 15.5673 6.3994 15.2423 6.0744C14.9173 5.7494 14.3923 5.7494 14.0673 6.0744L8.33399 11.8077L5.92566 9.40773C5.60066 9.08273 5.07566 9.08273 4.75066 9.40773C4.59461 9.56342 4.50692 9.7748 4.50692 9.99523C4.50692 10.2157 4.59461 10.427 4.75066 10.5827Z",fill:"#2D87F3"}),(0,i.tZ)("path",{d:"M7.74224 13.5772L4.75057 10.5856C4.59453 10.4299 4.50684 10.2185 4.50684 9.99808C4.50684 9.77765 4.59453 9.56627 4.75057 9.41058C5.07557 9.08558 5.60057 9.08558 5.92557 9.41058L8.33391 11.8106L14.0672 6.07725C14.3922 5.75225 14.9172 5.75225 15.2422 6.07725C15.5672 6.40225 15.5672 6.92725 15.2422 7.25225L8.91724 13.5772C8.60057 13.9022 8.06724 13.9022 7.74224 13.5772Z",fill:"white"})]})}),(0,i.tZ)(b.c,{ratio:1.5,mb:10,children:(0,i.tZ)("img",{src:t.guid||"",alt:"cat",loading:"lazy"})}),(0,i.tZ)(y.T,{size:"p3",ta:"center",px:6,children:t.localName||""})]})},TrendingCarousel=e=>{let{topics:t,selectedTopics:n=[],onTopicChange:o,isBlock:l=!1}=e,{formatMessage:r}=(0,I.Z)(),[d,s]=(0,a.useState)([]),onSelect=(e,t)=>{if(t)s(t=>t.filter(t=>t.catId!==e.catId));else{if(l){(0,Q.c)({type:"danger",title:r({id:"newsletter.error.title",defaultMessage:"Maximum 5 topics reached"}),message:r({id:"newsletter.error.message",defaultMessage:"Remove at least 1 selected topic to continue this action"})});return}s(t=>[...t,e])}};(0,a.useEffect)(()=>{s(n)},[n.length]),(0,a.useEffect)(()=>{o(d)},[d]);let[c,u]=(0,a.useState)(!1),[p,h]=(0,a.useState)(0),[g,m]=(0,a.useState)(0),f=(0,a.useRef)(null),handleMouseUp=()=>{u(!1)};return(0,i.BX)(Z.K,{spacing:4,children:[(0,i.tZ)(w.k,{justify:"space-between",align:"center",w:"100%",children:(0,i.tZ)(y.T,{size:"s5",color:"gray.4",weight:"semiBold",span:!0,children:r({id:"newsletter.trending",defaultMessage:"TRENDING"})})}),(0,i.tZ)(R.x,{type:"always",w:"100%",offsetScrollbars:!0,scrollbarSize:4,viewportRef:f,viewportProps:{onMouseDown:e=>{e.preventDefault(),f.current&&(u(!0),h(e.pageX-f.current.offsetLeft),m(f.current.scrollLeft))},onMouseUp:handleMouseUp,onMouseLeave:handleMouseUp,onMouseMove:e=>{if(e.preventDefault(),!c||!f.current)return;let t=e.pageX-f.current.offsetLeft;f.current.scrollLeft=g-(t-p)*2}},styles:{root:{marginInline:-4,padding:0},viewport:{padding:4,paddingBottom:16}},children:(0,i.tZ)(z.x,{w:{base:118*t.length,md:140*t.length},children:(0,i.tZ)(w.k,{gap:8,wrap:"wrap",children:t.map((e,t)=>(0,i.tZ)(_TopicSlide,{topic:e,onClick:onSelect,active:d.some(t=>t.catId===e.catId),w:{base:110,md:132}},t))})})})]})},_TopicStep=e=>{let{onSubmit:t,onBack:n,preventBack:o=!1,...l}=e,[r,d]=(0,a.useState)(""),s=(0,J.U)(),{formatMessage:c}=(0,I.Z)(),{setAcquisitionInfo:g}=(0,m.i)(e=>e,u.X),f=(0,a.useRef)(null),[C,b]=(0,a.useState)([]),[L,Z]=(0,a.useState)([]),[w,S]=(0,a.useState)([]),[T,M]=(0,a.useState)([]),[x,k]=(0,a.useState)(null),[_,B]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{var e,t,n;let[i,a]=await Promise.all([(0,p.d)(h.y.PREMIUM.TEMP_GET_NEWSLETTER_CATEGORIES,void 0,"premium"),(0,p.d)(h.y.PREMIUM.GET_SUBSCRIPTION_CATEGORIES,void 0,"premium")]),o=(null==i?void 0:null===(e=i.data)||void 0===e?void 0:e.interested)||[],l=(null==i?void 0:null===(t=i.data)||void 0===t?void 0:t.trending)||[],r=(null==a?void 0:null===(n=a.data)||void 0===n?void 0:n.subscription)||[],d=el()([...o,...l],"catId"),s=d.map(e=>({...e,value:e.catId||"",label:e.localName||""}));if(B(s||[]),k((null==i?void 0:i.data)||null),r.length>0){let e=r.map(e=>e.catId),t=o.filter(t=>e.includes(t.catId)).map(e=>({...e,template:"interested"})),n=l.filter(t=>e.includes(t.catId)).map(e=>({...e,template:"trending"}));M(t),Z(n)}})()},[]);let P=(0,a.useMemo)(()=>el()([...C,...L,...T,...w],"catId"),[C,L,T,w]),[A,O]=(0,a.useState)(!1);(0,a.useEffect)(()=>{P.length>=5?O(!0):O(!1)},[P]);let onSubmit=async()=>{g({healthTopics:P}),P.length>0?t():(0,Q.c)({type:"danger",message:c({id:"newsletter.topic.select.placeholder",defaultMessage:"Please enter your favorite topics"}),title:c({id:"notification.comment.somethingWrong",defaultMessage:"Something went wrong."})})},onValueChange=async e=>{let t="default";if(A)(0,Q.c)({type:"danger",title:c({id:"newsletter.error.title",defaultMessage:"Maximum 5 topics reached"}),message:c({id:"newsletter.error.message",defaultMessage:"Remove at least 1 selected topic to continue this action"})});else{var n;let i=[{key:"trending",array:null==x?void 0:x.trending},{key:"recently",array:null==x?void 0:x.recently},{key:"interested",array:null==x?void 0:x.interested}],a=i.find(t=>{var n;return null===(n=t.array)||void 0===n?void 0:n.some(t=>t.catId===e[0])});({trending:Z,recently:S,interested:M,default:b})[t=(null==a?void 0:a.key)||"default"](n=>[...n,..._.filter(t=>e.some(e=>t.catId===e))].map(e=>({...e,template:t}))),null===(n=f.current)||void 0===n||n.blur()}return null};return(0,i.BX)(_AcquisitionContainer,{title:c({id:"newsletter.topic.title",defaultMessage:"What health topics are you interested in?"}),currentStep:"topic",nextButtonProps:{onClick:onSubmit,dataEventCategory:"Newsletter",dataEventAction:"Save Interested Topic",dataEventLabel:s},backButtonProps:{onClick:o?v.Z:n,styles:{...o?{root:{visibility:"hidden"}}:{}}},withBanner:!0,...l,children:[(0,i.tZ)(y.T,{size:"p3",mt:-16,children:c({id:"newsletter.topic.header.message",defaultMessage:"Choose maximum {max} topics (/{max})"},{max:5,a:function(){return(0,i.tZ)(y.T,{size:"s3",weight:"semiBold",as:"span",color:"blue.6",children:P.length})}})}),(0,i.tZ)(ea.NU,{ref:f,maxSelectedValues:3,styles:{wrapper:{overflow:"initial !important"},separator:{padding:16},separatorLabel:{fontWeight:600,fontSize:12,lineHeight:"18px",textTransform:"uppercase",color:E.t.gray[4],"&::after":{display:"none"}},searchInput:{fontSize:"inherit"},input:{paddingRight:16}},nothingFound:(0,i.tZ)(y.T,{size:"s4",color:"gray.6",children:c({id:"newsletter.topic.select.notfound",defaultMessage:"Nothing found"})}),itemComponent:""===r?ed:es,size:"lg",placeholder:c({id:"newsletter.topic.select.placeholder",defaultMessage:"Please enter your favorite topics"}),data:_,onSearchChange:d,searchValue:r,icon:(0,i.tZ)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,i.tZ)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.97183 10.8732C3.97183 7.0617 7.0617 3.97183 10.8732 3.97183C14.6848 3.97183 17.7746 7.0617 17.7746 10.8732C17.7746 14.6848 14.6848 17.7746 10.8732 17.7746C7.0617 17.7746 3.97183 14.6848 3.97183 10.8732ZM10.8732 2C5.97268 2 2 5.97268 2 10.8732C2 15.7738 5.97268 19.7465 10.8732 19.7465C12.9682 19.7465 14.8936 19.0205 16.4115 17.8063L20.3168 21.7116C20.7018 22.0966 21.3261 22.0966 21.7111 21.7116C22.0961 21.3266 22.0961 20.7023 21.7111 20.3173L17.8059 16.4121C19.0203 14.894 19.7465 12.9684 19.7465 10.8732C19.7465 5.97268 15.7738 2 10.8732 2Z",fill:"#595959"})}),rightSection:(0,i.tZ)(i.HY,{}),zIndex:500,searchable:!0,withinPortal:!0,onChange:e=>onValueChange(e),value:[]}),P&&P.length>0&&(0,i.tZ)(HistorySection,{history:P,onDelete:e=>{let t={trending:Z,recently:S,interested:M,default:b},n=t[e.template]||t.default;n(t=>{let n=[...t],i=n.findIndex(t=>t.catId===e.catId);return n.splice(i,1),n})}}),(0,i.tZ)(TrendingCarousel,{topics:((null==x?void 0:x.trending)||[]).map(e=>({...e,template:"trending"})),selectedTopics:L,onTopicChange:Z,isBlock:A}),(0,i.tZ)(RecentlyViewedSection,{topics:((null==x?void 0:x.recently)||[]).map(e=>({...e,template:"recently"})),selectedTopics:w,onTopicChange:S,isBlock:A}),(0,i.tZ)(TopicSection,{topics:((null==x?void 0:x.interested)||[]).map(e=>({...e,template:"interested"})),selectedTopics:T,onTopicChange:M,isBlock:A})]})};var eg=n("u7wK");let generateSchema=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i={name:A.Z_().required(e({id:"onboarding.errorMessage.requiredName",defaultMessage:"Please fill your name"})),gender:A.Z_().required().default("0"),birthday:A.hT().default(new Date),email:A.Z_().required(e({id:"onboarding.errorMessage.requiredEmail",defaultMessage:"Please fill your email"})).email(e({id:"onboarding.errorMessage.invalidEmail",defaultMessage:"Invalid email"})).default("")};return(!t||n)&&delete i.email,A.Ry().shape(i)},_WelcomeStep=e=>{var t;let{onSubmit:n,isOtpSuccess:o,...l}=e,{formatMessage:r}=(0,I.Z)(),{locale:d}=(0,g.h)(),s=(0,W.d)(),{state:{userInfo:S}}=(0,a.useContext)(f.I),T=(0,J.U)(),E=!(null==S?void 0:S.email)||((null==S?void 0:S.email)||"").includes("@facebook.com"),M=(0,x.c)({initialValues:{name:"",gender:"0"},validate:(0,k.X)(generateSchema(r,E,o))}),{setAcquisitionInfo:_,acquisitionInfo:B,setNumberOfSteps:P}=(0,m.i)(e=>e,u.X);(0,a.useEffect)(()=>{let e=c()().subtract(18,"year").toDate(),t=B.userInfo;(S&&S.birthday||t&&t.birthday)&&(e=c()(t.birthday||(null==S?void 0:S.birthday)).toDate()),M.setValues({birthday:e,name:t.name||(null==S?void 0:S.name)||"",gender:t.gender||S?(null==S?void 0:S.gender)===-1?"1":String(null==S?void 0:S.gender):"1",email:(null==S?void 0:S.email)&&!S.email.includes("@facebook")?null==S?void 0:S.email:""})},[S,B.userInfo]),(0,a.useEffect)(()=>{E?P(3):P(2)},[E]);let onSubmit=async e=>{try{e.email&&await (0,p.d)(h.y.SSO.POST_CHANGE_EMAIL,{method:"POST",data:{email:e.email}},"sso"),_({userInfo:{...S,...e,gender:Number(e.gender),birthday:c()(e.birthday).format("YYYY-MM-DD")}}),n()}catch(e){}};return(0,i.tZ)(_AcquisitionContainer,{...l,children:(0,i.BX)(Z.K,{spacing:24,p:{base:22,md:0},mt:{base:0,md:0},...l,children:[s&&(0,i.tZ)(z.x,{sx:{position:"absolute",top:20,right:20},children:(0,i.tZ)(U.L,{type:(null===(t=G.CX[d])||void 0===t?void 0:t.LOGO_TYPE)||"hellobacsi"})}),(0,i.BX)(Z.K,{spacing:8,children:[(0,i.tZ)(b.c,{ratio:1,w:160,children:(0,i.tZ)("img",{src:"".concat(G.Nr,"/acquisition-logo.png"),alt:"",loading:"lazy"})}),(0,i.BX)("div",{children:[(0,i.tZ)(C.H,{tag:"h2",children:r({id:"newsletter.welcome.title",defaultMessage:"Hello there!"})}),(0,i.tZ)(C.H,{tag:"h2",children:r({id:"newsletter.welcome.description",defaultMessage:"What name would you prefer to go by?"})})]})]}),(0,i.tZ)("form",{onSubmit:M.onSubmit(onSubmit,v.Z),children:(0,i.BX)(Z.K,{spacing:24,children:[(0,i.tZ)(b.I,{label:(0,i.tZ)(y.T,{size:"s4",weight:"semiBold",color:"gray.6",children:r({id:"onboarding.formEmail.yourName",defaultMessage:"Full name"})}),placeholder:r({id:"subot.landingPage.booking.placeholder.name",defaultMessage:"Enter your name"}),size:"lg",...M.getInputProps("name")}),E&&(0,i.tZ)(b.I,{label:(0,i.tZ)(y.T,{size:"s4",weight:"semiBold",color:"gray.6",children:r({id:"spotlight.landing.workshopForm.email",defaultMessage:"Email"})}),placeholder:r({id:"subot.landingPage.booking.placeholder.email",defaultMessage:"Enter your valid email address"}),size:"lg",...M.getInputProps("email")}),(0,i.tZ)(eg.D,{label:(0,i.tZ)(y.T,{size:"s4",weight:"semiBold",color:"gray.6",children:r({id:"common.form.label.yourBirthday",defaultMessage:"Your birthday"})}),...M.getInputProps("birthday"),size:"lg",disabled:o,excludeDate:e=>c()(e).isAfter(c()())}),(0,i.tZ)(b.R.Group,{className:"radio-group",label:(0,i.tZ)(y.T,{size:"s4",weight:"semiBold",span:!0,children:r({id:"bmi.selectGender",defaultMessage:"Gender"})}),size:"lg",...M.getInputProps("gender"),children:(0,i.BX)(w.k,{gap:58,children:[(0,i.tZ)(b.R,{value:"1",label:r({id:"onboarding.formEmail.genderMale",defaultMessage:"Male"})}),(0,i.tZ)(b.R,{value:"0",label:r({id:"onboarding.formEmail.genderFemale",defaultMessage:"Female"})})]})}),(0,i.tZ)("div",{children:(0,i.tZ)(L.B,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Newsletter","data-event-action":"Save User Info","data-event-label":T,children:r({id:"babyVaccineTool.continue",defaultMessage:"Continue"})})})]})})]})})},AcquisitionMarketing=()=>{let[e,t]=(0,a.useState)(),[n,s]=(0,a.useState)(!1),[C,b]=(0,a.useState)(!1),{query:y}=(0,g.h)(),{state:{userInfo:L,isLoggedIn:Z}}=(0,a.useContext)(f.I),{acquisitionInfo:w,shouldAcquisitionModalOpen:S,setShouldAcquisitionModalOpen:I,setAcquisitionInfo:T,numberOfSteps:E,isMarketing:M}=(0,m.i)(e=>e,u.X);(0,a.useEffect)(()=>{M&&(t("topic"),s(!0))},[M]),(0,a.useEffect)(()=>{if(null==y?void 0:y.recordId){var e;s(!1),void 0!==L&&(Z&&L&&L.birthday&&L.name&&L.email&&!(null===(e=L.email)||void 0===e?void 0:e.includes("@facebook.com"))&&[0,1].includes(Number(L.gender))?(T({userInfo:L}),setTimeout(()=>{t("done"),s(!0)},500)):setTimeout(()=>{t("welcome"),s(!0)},500))}},[null==y?void 0:y.recordId,Z,void 0===L]);let handlePreferSubmit=async()=>{var e;L&&L.birthday&&L.name&&L.email&&!(null===(e=L.email)||void 0===e?void 0:e.includes("@facebook.com"))&&[0,1].includes(Number(L.gender))?(T({userInfo:L}),setTimeout(()=>{t("done"),s(!0)},500)):setTimeout(()=>{t("welcome"),s(!0)},500)};return(0,a.useEffect)(()=>{(async()=>{"done"===e&&(null==y?void 0:y.recordId)&&(null==w?void 0:w.userInfo)&&(await (0,p.d)(h.y.SSO.UPDATE_PROFILE,{method:"POST",data:{...w.userInfo,birthday:c()(w.userInfo.birthday).format("YYYY-MM-DD")}},"sso"),await (0,p.d)(h.y.PREMIUM.TEMP_POST_SUBSCRIPTION_OFFICIAL,{method:"POST",data:{user_info:w.userInfo,key:y.recordId}},"premium"),await (0,p.d)(h.y.SSO.UPDATE_SUBSCRIPTION,{method:"PUT",data:{subscription:1}},"sso"))})()},[e,null==y?void 0:y.recordId,w.userInfo]),(0,i.BX)(l.M,{opened:S,onClose:()=>I(!1),fullScreen:!0,zIndex:305,styles:{body:{height:"100%",minHeight:"100%",backgroundSize:"950px 580px",backgroundPositionY:"-50%",padding:16,background:"linear-gradient(270deg, #E3F2FF 0%, #FFFFFF 58.5%)",[o.M.mbDown]:{padding:0,background:"none"}},content:{[o.M.mbUp]:{overflow:"hidden"}}},children:[(0,i.tZ)(_ConfirmModal,{}),!n&&(0,i.tZ)(r.fz,{visible:n}),(0,i.tZ)(d.W,{fluid:!0,size:"100%",p:{base:"md",md:0},h:"100%",children:n&&(0,i.BX)(i.HY,{children:[(0,i.tZ)(_TopicStep,{onBack:v.Z,onSubmit:()=>t("prefer"),preventBack:!0,sx:{display:"topic"!==e?"none":"block"}}),(0,i.tZ)(_PreferStep,{onBack:()=>t("topic"),onSubmit:handlePreferSubmit,sx:{display:"prefer"!==e?"none":"block"}}),(0,i.tZ)(_WelcomeStep,{onSubmit:()=>t(3===E?"otp":"done"),isOtpSuccess:C,sx:{display:"welcome"!==e?"none":"block"}}),(0,i.tZ)(_OtpStep,{onBack:()=>t("welcome"),onSubmit:()=>{b(!0),t("done")},sx:{display:"otp"!==e?"none":"block"}}),(0,i.tZ)(_ThankYouStep,{sx:{display:"done"!==e?"none":"block"}})]})})]},String(S))}},c4YP:function(e,t,n){n.d(t,{A:function(){return GTMScript}});var i=n("BGKE"),a=n("x+Y2"),o=n.n(a);let GTMScript=e=>{let{servicePageTrackingParams:t}=e;return(0,i.tZ)(o(),{strategy:"lazyOnload",async:!0,id:"gtm-mount-script",dangerouslySetInnerHTML:{__html:"\n window.dataLayer = window.dataLayer || [];\n ".concat((null==t?void 0:t.audienceId)?"\n window.dataLayer.push({\n audience_name: '".concat(t.audienceId||"","',\n user_funnel: '").concat((null==t?void 0:t.funnelId)||"","',\n project_id: '").concat((null==t?void 0:t.pageId)||"","'\n });\n "):"","\n function gtag(){dataLayer.push(arguments);}\n\n (function(w,d,s,l,i){w[l]=w[l]||[];\n w[l].push({'gtm.start':\n new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n 'https://www.googletagmanager.com/gtm.js?id='+i+dl;d.head.appendChild(j);\n })(window,document,'script','dataLayer','").concat("GTM-WDHZFL","');")}},"gtm-mount-script")}},iWOI:function(e,t,n){n.d(t,{D:function(){return MagniteScript}});var i=n("BGKE"),a=n("x+Y2"),o=n.n(a),l=n("P5LW"),r=n("rEaw");let MagniteScript=()=>{let{locale:e}=(0,l.h)();return e!==r.MV.Taiwan?null:(0,i.tZ)(o(),{async:!0,src:"https://micro.rubiconproject.com/prebid/dynamic/22534.js"})}},"mYw+":function(e,t,n){n.r(t),n.d(t,{AppCustomScripts:function(){return AppCustomScripts},LegacyLeadScript:function(){return LegacyLeadScript}});var i=n("BGKE"),a=n("q1tI"),o=n("iBGz"),l=n("Vvt1"),r=n.n(l),d=n("g4pe"),s=n.n(d),c=n("x+Y2"),u=n.n(c),p=n("iv2E"),h=n("67bW"),g=n("P5LW"),m=n("JQDj"),f=n("rIrU"),v=n("rEaw"),C=n("o0qI"),b=n("CJtR"),y=n("VjYe"),L=n("JuOI");let{NEXT_PUBLIC_LEAD_API:Z,NEXT_PUBLIC_SUBOT_API:w}=f.ENV,S=r()(()=>Promise.all([n.e(7034),n.e(2602),n.e(9409),n.e(6259),n.e(1818),n.e(7519),n.e(761),n.e(2189),n.e(5231),n.e(7797),n.e(5454),n.e(5481),n.e(140),n.e(5718),n.e(3684),n.e(5349),n.e(4148),n.e(2509),n.e(1533),n.e(1108),n.e(9124),n.e(4190),n.e(2582),n.e(6509),n.e(5308),n.e(4125),n.e(9715),n.e(7730),n.e(3929),n.e(891),n.e(137),n.e(4414),n.e(1079),n.e(7613),n.e(8098),n.e(3416),n.e(2500),n.e(1570),n.e(3506),n.e(1413),n.e(2138),n.e(9467),n.e(4467),n.e(6966),n.e(5243),n.e(8132),n.e(1375),n.e(4561),n.e(1448),n.e(5465),n.e(1217),n.e(5480),n.e(731),n.e(2050),n.e(2008),n.e(8469),n.e(8214),n.e(1482),n.e(6817),n.e(467),n.e(5951),n.e(9357),n.e(747),n.e(5675),n.e(6753),n.e(4802),n.e(3046),n.e(5745),n.e(3437),n.e(252),n.e(6839),n.e(9424),n.e(5702),n.e(8922),n.e(6399),n.e(553),n.e(2902),n.e(4969),n.e(3257),n.e(6611),n.e(7538),n.e(6894),n.e(5341)]).then(n.bind(n,"6MGn")).then(e=>e.LeadGen),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),LeadV1=()=>{let{locale:e,asPath:t}=(0,g.h)(),{state:n}=(0,a.useContext)(C.I);return e===v.MV.Singapore?null:(0,i.BX)(L.Z,{children:[(0,i.tZ)(y.x,{}),(0,i.tZ)(S,{apiUrl:Z||"https://lead.hellohealthgroup.com/",apiSubotUrl:(w||"https://subot.hellohealthgroup.com/frontend/api/").replace("frontend/api/",""),siteDomain:p.domainLocales[e],siteId:String(f.CX[e].SITE_ID||1),locale:e,DEBUG_URL:"development"===f.ENV.NEXT_PUBLIC_DEPLOY_ENV?(0,b.UC)(e,!0)+t:void 0,userInfo:null==n?void 0:n.userInfo})]})};var I=n("N2Lg");let MoMagicScript=()=>{let{locale:e,asPath:t}=(0,g.h)(),n=(0,a.useMemo)(()=>(I.Oe[e]||[]).find(e=>encodeURIComponent(decodeURIComponent(t)).startsWith(encodeURIComponent(e))),[t]);return((0,a.useEffect)(()=>{var e,t;n&&(null===(e=(t=window).refreshTruereachAd)||void 0===e||e.call(t))},[n,t]),n)?(0,i.BX)(i.HY,{children:[(0,i.tZ)(s(),{children:(0,i.tZ)("script",{defer:!0,type:"text/javascript",id:"interactive_js_adcode",src:"https://1437953666.rsc.cdn77.org/publisher/2bd6293b-9cd4-11ef-b07d-f9f5bfa132e2/truereachAdRender.js"})}),(0,i.tZ)("div",{id:"TR-3520584e-9d88-11ef-9b9c-833c3a33225d"})]}):null},T=r()(()=>Promise.all([n.e(5231),n.e(7797),n.e(5454),n.e(5481),n.e(140),n.e(5718),n.e(3684),n.e(5349),n.e(4148),n.e(2509),n.e(1533),n.e(1108),n.e(9124),n.e(4190),n.e(2582),n.e(6509),n.e(5308),n.e(4125),n.e(9715),n.e(7730),n.e(3929),n.e(891),n.e(137),n.e(4414),n.e(1079),n.e(7613),n.e(8098),n.e(3416),n.e(2500),n.e(1570),n.e(3506),n.e(1413),n.e(4846),n.e(2233),n.e(1058),n.e(3295),n.e(1538),n.e(7152),n.e(5684),n.e(2574),n.e(9884),n.e(7644),n.e(6962),n.e(8767),n.e(6638),n.e(7741),n.e(3434),n.e(2433),n.e(5385),n.e(3564),n.e(7082),n.e(3158),n.e(5641),n.e(7454),n.e(7004),n.e(4758),n.e(6219),n.e(17),n.e(8990),n.e(4067),n.e(9487),n.e(9083),n.e(1520),n.e(270),n.e(7596),n.e(8217),n.e(7543),n.e(2835),n.e(2507),n.e(6885),n.e(7859),n.e(690),n.e(2730),n.e(6287),n.e(7682),n.e(1551),n.e(4870),n.e(9922),n.e(3133),n.e(612),n.e(2002),n.e(1880),n.e(7471),n.e(7165),n.e(5451),n.e(8612),n.e(2819),n.e(7695),n.e(2516)]).then(n.bind(n,"lLDr")).then(e=>e.FirebaseWebPush),{loadableGenerated:{webpack:()=>["lLDr"]},ssr:!1}),{NEXT_PUBLIC_LEAD_API:E}=f.ENV,M=["/hello-sehat-expert/","/health-tools/"],AppCustomScripts=()=>{var e;let{locale:t,query:n,asPath:l}=(0,g.h)(),{state:r}=(0,a.useContext)(C.I);(0,o.u)(null==r?void 0:r.userInfo);let{isParenting:d,isPregnancy:c,isSexualWellness:b}=(0,h.b)(),y=M.some(e=>l.startsWith(e)),L=(0,m.YU)(),Z=(0,m.YU)(5e3);return(0,i.BX)(i.HY,{children:[n.legacyLead?(0,i.tZ)(LegacyLeadScript,{}):!y&&L&&(0,i.tZ)(LeadV1,{}),Z&&t!==v.MV.Singapore&&(0,i.tZ)(u(),{id:"su-script",src:"https://subot.hellobacsi.com/"+"subot.js?v=".concat(1767081243433),defer:!0,"data-api":"https://subot.hellobacsi.com/","data-cookie-domain":p.domainLocales[t],"data-site-id":f.Mw&&(null===(e=f.CX[t])||void 0===e?void 0:e.SITE_ID)||1,strategy:"lazyOnload"},"su-script"),(0,i.tZ)(u(),{strategy:"lazyOnload",async:!0,src:f.CX[t].INSIDER_TAG}),(0,i.tZ)(MoMagicScript,{}),(null==r?void 0:r.userInfo)!==void 0&&(0,i.tZ)(T,{isLogin:!!(null==r?void 0:r.userInfo)}),t===v.MV.Indonesia&&!f.Mw&&(0,i.tZ)(s(),{children:(0,i.tZ)("script",{type:"text/javascript",async:!0,src:"https://adsimg.kompas.com/html5/voyager/hellosehat.js"})}),(0,i.tZ)(s(),{children:!(d||c||b)&&f.GO.includes(t)&&!l.includes("/preview")&&(0,i.tZ)("script",{type:"text/javascript",async:!0,dangerouslySetInnerHTML:{__html:"\n (function(){var o='script',s=top.document,a=s.createElement(o),m=s.getElementsByTagName(o)[0],d=new Date(),timestamp=\"\"+d.getDate()+d.getMonth()+d.getHours();a.async=1;a.src='https://cdn4-hbs.affinitymatrix.com/hvrcnf/".concat(p.domainLocales[t],"/'+ timestamp + '/index?t='+timestamp;m.parentNode.insertBefore(a,m)})();\n ")}})})]})},LegacyLeadScript=()=>{let{locale:e}=(0,g.h)();return(0,i.tZ)(u(),{id:"le-script",src:(E||"https://lead.hellohealthgroup.com/")+"admin/popup-discover.js?v=1.1",defer:!0,strategy:"lazyOnload","data-api":E||"https://lead.hellohealthgroup.com/","data-cookie-domain":p.domainLocales[e],"data-site-id":f.Mw?f.CX[e].SITE_ID:1},"le-script")}},"6HQU":function(e,t,n){var i=n("Wgwc"),a=n("+QaA"),o=n.n(a),l=n("13Ln"),r=n.n(l),d=n("5Bip"),s=n.n(d),c=n("11iF"),u=n.n(c),p=n("s3Wo"),h=n.n(p);i.extend(o()),i.extend(u()),i.extend(h()),i.extend(s()),i.extend(r())},RohI:function(e,t,n){n.r(t),n.d(t,{AppMantineProvider:function(){return AppMantineProvider}});var i=n("BGKE"),a=n("XFb3"),o=n("OUhn"),l=n("fdQd"),r=n("P5LW");let AppMantineProvider=e=>{let{children:t,customComponentTheme:n}=e,{locale:d}=(0,r.h)(),s=(0,a.g)(d,"hb"),c=n&&JSON.parse(n),u={};return Object.keys(c||{}).map(e=>{var t,n,i,a,o,l,r;u[e]={...null===(t=s.components)||void 0===t?void 0:t[e],styles:{...null===(i=s.components)||void 0===i?void 0:null===(n=i[e])||void 0===n?void 0:n.styles,...null==c?void 0:null===(a=c[e])||void 0===a?void 0:a.styles},defaultProps:{...null===(l=s.components)||void 0===l?void 0:null===(o=l[e])||void 0===o?void 0:o.defaultProps,...null==c?void 0:null===(r=c[e])||void 0===r?void 0:r.defaultProps}}}),(0,i.tZ)(o.M,{locale:d,emotionCache:l.m,template:"hb",theme:{...s,colors:{...s.colors,...(null==c?void 0:c.colors)||{}},components:{...s.components,...u}},children:t})}},lLDr:function(e,t,n){n.r(t),n.d(t,{FirebaseWebPush:function(){return FirebaseWebPush},Log:function(){return Log}});var i=n("BGKE"),a=n("q1tI"),o=n("GOBr"),l=n("p46w"),r=n.n(l),d=n("x+Y2"),s=n.n(d),c=n("09QT"),u=n("oQBk"),p=n("xIXX"),h=n("ftPL"),g=n("mu6v"),m=n("raAP"),f=n("OGPO"),v=n("P5LW"),C=n("rIrU"),b=n("rEaw"),y=n("o0qI");let L=o.y?{apiKey:"AIzaSyC9O6DE5wAOF6DMSzmIEzSVmXCoaHsHmc4",authDomain:"hello-bacsi-vn-ga4.firebaseapp.com",projectId:"hello-bacsi-vn-ga4",storageBucket:"hello-bacsi-vn-ga4.appspot.com",messagingSenderId:"26303719081",appId:"1:26303719081:web:aaea66a4d22a6af295ebb8",measurementId:"G-39XDWGS67Q"}:{apiKey:"AIzaSyDn4X1AgwtNimq1WAvGoIBqBSEUaG-un60",authDomain:"hhg-mobile-app.firebaseapp.com",databaseURL:"https://hhg-mobile-app-default-rtdb.asia-southeast1.firebasedatabase.app",projectId:"hhg-mobile-app",storageBucket:"hhg-mobile-app.appspot.com",messagingSenderId:"260545139180",appId:"1:260545139180:web:5f801637ae6ee1294df0c9"},Z=o.y?"BFzHChPKyLbu-ix2QyY4oUDDBePZvGeOxWHoNmMegPuT7JTmvjyOb8IWRnxmZpldx-iZE1IUmhaHre19VoQLoXk":"BOfPnteGbmk4i2LCqoSj5Pu0j-dobbBGmpc0zr2Gwzz6eLXddwio2jJz-yl_Ziwo33Q3QvX53GXISwe60uqCTRA",w=null,S="fcm_token",Log=function(){for(var e=arguments.length,t=Array(e),n=0;n{alert(t.join("|"))},0),console.log(...t))},waitForUntilFinished=e=>{let t=e.condition,n=e.finished,i=e.timeout||1e4,a=new Date().getTime(),o=setInterval(()=>{t&&t()&&(clearInterval(o),n&&n());let e=new Date().getTime();e-a>i&&clearInterval(o)},300)},FirebaseWebPushComponnet=e=>{let{isLogin:t}=e,{locale:n}=(0,v.h)(),[o,l]=(0,a.useState)(!1),[d,I]=(0,a.useState)(!1),[T,E]=(0,a.useState)(!1),M=(0,m.U)(),{state:{userInfo:x}}=(0,a.useContext)(y.I),{trackingGetFcmToken:k}=(0,f.o9)(),_=(0,a.useCallback)(async()=>{try{let e=await fetch("https://api.ipify.org?format=json"),t=await e.json();return t.ip||""}catch(e){return""}},[]),B=(0,a.useCallback)(async function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"active";try{var a;let o=t?u.y.SSO.POST_FCM_TOKEN_AUTH:u.y.SSO.POST_FCM_TOKEN;window.clientIP=await _(),window.fcmToken=e,await (0,c.d)(o,{method:"POST",data:{fcm_token:e,ga_client_id:r().get(C.ch),window_id:(0,p.ZY)(),cookie_id:(0,h.tw)(),client_ip:window.clientIP,client_agent:(null===(a=navigator)||void 0===a?void 0:a.userAgent)||"",status:i,site_name:n===b.MV.PhilippinesTagalog?C.fE[n]+"/fil":C.fE[n]}},"sso")}catch(e){}},[t,_]),P=(0,a.useCallback)(()=>{w&&w.getToken({vapidKey:Z}).then(e=>{Log("[Firebase] Token ",e),localStorage.setItem(S,e),B(e),k(e)}).catch(e=>{Log("[Firebase] An error occurred while retrieving token.",e)})},[B]),A=(0,a.useCallback)(()=>{var e;if(void 0===(null===(e=Notification)||void 0===e?void 0:e.requestPermission))return;let handler=e=>{if("granted"===e){P();return}let t=localStorage.getItem(S);"denied"===e&&t&&(B(t,"inactive"),localStorage.removeItem(S),Log("[Firebase] unsubscribe token:",t)),Log("[Firebase] Unable to get permission to notify.")};try{Notification.requestPermission().then(handler)}catch(e){e instanceof TypeError&&Notification.requestPermission(handler)}},[P]);return((0,a.useEffect)(()=>{setTimeout(()=>{E(!0)},5e3)},[]),(0,a.useEffect)(()=>{T&&waitForUntilFinished({condition:()=>void 0!==window.firebase,finished:()=>{l(!0)},timeout:5e3})},[T]),(0,a.useEffect)(()=>{o&&waitForUntilFinished({condition:()=>!!(window.firebase&&window.firebase.messaging),finished:()=>{I(!0)},timeout:5e3})},[o]),(0,a.useEffect)(()=>{let e=window.firebase;if(o&&d&&e&&e.messaging){if(!e.messaging.isSupported()){Log("[Firebase] Do not support this browser. Access this to read the documentation: https://firebase.google.com/docs/web/environments-js-sdk");return}e.initializeApp(L),(w=e.messaging())&&w.onMessage(e=>{if(Log("[Firebase] Foreground Message received:",e),e.data){var t,i,a,o,l,r,d,s,c;(0,g.H)({currentUrl:M,locale:n,userInfo:x,id:e.messageId,title:(null===(t=e.data)||void 0===t?void 0:t.title)||"",message:(null===(i=e.data)||void 0===i?void 0:i.body)||"",icon:(null===(a=e.data)||void 0===a?void 0:a.icon)||"",image:(null===(o=e.data)||void 0===o?void 0:o.image)||"",meta:{actionUrl:(null===(l=e.data)||void 0===l?void 0:l.action_url)||"",campaignId:(null===(r=e.data)||void 0===r?void 0:r.campaign_id)||"",siteName:(null===(d=e.data)||void 0===d?void 0:d.site_name)||"",email:(null===(s=e.data)||void 0===s?void 0:s.email)||"",token:(null===(c=e.data)||void 0===c?void 0:c.token)||""}})}}),A()}},[o,d]),(0,a.useEffect)(()=>{if(void 0===navigator.serviceWorker)return},[]),T)?(0,i.BX)(i.HY,{children:[(0,i.tZ)(s(),{src:"https://www.gstatic.com/firebasejs/9.14.0/firebase-app-compat.js"}),o&&(0,i.tZ)(s(),{src:"https://www.gstatic.com/firebasejs/9.14.0/firebase-messaging-compat.js"})]}):null},I=[b.MV.Singapore],FirebaseWebPush=e=>{let{locale:t}=(0,v.h)();return I.includes(t)?null:(0,i.tZ)(FirebaseWebPushComponnet,{...e})}},qJ0d:function(e,t,n){n.r(t),n.d(t,{GoogleOneTap:function(){return GoogleOneTap}});var i=n("BGKE"),a=n("q1tI"),o=n("rBCA"),l=n("uuQu"),r=n("p46w"),d=n.n(r),s=n("x+Y2"),c=n.n(s),u=n("dDsW"),p=n("09QT"),h=n("oQBk"),g=n("0VOb"),m=n("iv2E"),f=n("P5LW"),v=n("rIrU"),C=n("05Ua"),b=n("o0qI");let GoogleOneTap=()=>{let{formatMessage:e}=(0,u.Z)(),{locale:t,router:{pathname:n}}=(0,f.h)(),{dispatch:o,state:l}=(0,a.useContext)(b.I),{userInfo:r}=l,s=n.includes("/iframes/"),[L,Z]=(0,a.useState)(!1);return((0,a.useEffect)(()=>{void 0!==r&&setTimeout(()=>{Z(!0)},1e3)},[r]),!L||s)?null:(0,i.BX)(i.HY,{children:[(0,i.tZ)(c(),{strategy:"lazyOnload",async:!0,src:"https://accounts.google.com/gsi/client",onLoad:()=>{if(!/^\/iframes\//.test(n)&&!(null==r?void 0:r.id)&&void 0!==window.google){let handleCredentialResponse=async n=>{if(null==n?void 0:n.credential){let a=await (0,p.d)(h.y.SSO.POST_SSO_VERIFY_TOKEN,{method:"POST",data:{id_token:null==n?void 0:n.credential,returnUrl:window.location.href,ga_client_id:d().get(v.ch)}},"sso");if(a&&(null==a?void 0:a._data)){var i;d().set(v.Ud,a._data,{domain:"localhost"===window.location.hostname?"localhost":".".concat(m.domainLocales[t])});let e=await (0,p.d)(h.y.USER_PROFILE.GET_PROFILE,{method:"POST"},"sso");(null==e?void 0:null===(i=e._data)||void 0===i?void 0:i.id)&&o({type:C.H.LOGIN,payload:null==e?void 0:e._data})}else(0,g.c)({message:e({id:"notification.comment.somethingWrong"})||"Something went wrong.",type:"danger"})}};window.google.accounts.id.initialize({client_id:v.RK,callback:handleCredentialResponse,auto_select:!1,context:"signin",prompt_parent_id:"google-onetap-container",cancel_on_tap_outside:!1}),window.google.accounts.id.prompt()}}}),(0,i.tZ)(y,{id:"google-onetap-container"},"google-one-tap")]})},y=(0,o.Z)("div",{target:"e1o02in40"})("position:fixed;z-index:1000;",l.M.mbUp,"{top:16px;right:0;}",l.M.mbDown,"{bottom:0;}")},CF7p:function(e,t,n){n.r(t),n.d(t,{default:function(){return AppWrapper}});var i=n("BGKE"),a=n("q1tI"),o=n("Vvt1"),l=n.n(o),r=n("2M76"),d=n("P5LW"),s=n("N2Lg"),c=n("ipEg"),u=n("VhOp"),p=n("20a2"),h=n.n(p),g=n("Mj6V"),m=n.n(g),f=n("dDsW"),v=n("CJtR"),C=n("0VOb"),b=n("rIrU"),y=n("o0qI"),L=n("k00F"),Z=n("Mt57"),w=n("GvV+"),S=n("yNk5");function AppContextWrapper(e){let{pageProps:t,children:n}=e,{locale:o,router:l}=(0,d.h)(),{isMobileSsr:r=!1,userInfo:s}=t||{},c={...Z.E,isMobileSsr:r,userInfo:s||void 0,isLoggedIn:!!(null==s?void 0:s.id),newBookmark:[],currentDomain:(0,v.UC)(o)},{formatMessage:p}=(0,f.Z)(),[g,I]=(0,a.useReducer)(L.m,c);return(0,a.useEffect)(()=>{m().configure({showSpinner:!1}),setTimeout(()=>{h().events.on("routeChangeStart",()=>m().start())},100),h().events.on("routeChangeComplete",()=>m().done()),h().events.on("routeChangeError",()=>m().done())},[]),(0,a.useEffect)(()=>{var e;(null===(e=b.P8||[])||void 0===e?void 0:e.includes(o))&&(window.consentListeners=[],window.addConsentListenerExample=e=>{window.consentListeners.push(e)})},[]),(0,i.tZ)(y.I.Provider,{value:{state:g,dispatch:I},children:(0,i.tZ)(u.a,{userInfo:null==g?void 0:g.userInfo,locale:o,router:l,pushNotifications:C.c,sanitizeFunction:w.Nw,env:{togetherBasePath:"/community",publicSSO:"https://id.hellobacsi.com/",togetherBaseApiUrl:"https://together.hellohealthgroup.com/",discoverBaseApiUrl:"https://wp.hellobacsi.com/",discoverBaseProdApiUrl:"https://wp.hellobacsi.com/",marryBabyApiUrl:"https://wp.marrybaby.vn/",marryBabyProdApiUrl:"https://wp.marrybaby.vn/",careBaseApiUrl:"https://health-care.hellohealthgroup.com/",subotApiUrl:"https://subot.hellohealthgroup.com/frontend/api/",leadApiUrl:"https://lead.hellohealthgroup.com/",chatbotAiUrl:S.env.NEXT_PUBLIC_CHATBOT_API_URL},formatMessage:p,children:n})})}var I=n("AeFk"),T=n("TWyU");function AppGlobalStyle(){return(0,i.tZ)(I.xB,{styles:[T.Z]})}var E=n("g4pe"),M=n.n(E);window.anymindTS=window.anymindTS||{que:[]};let x=[],runAts=()=>{window.anymindTS.que.push(function(){window.startAnymindTS()})},disposeAts=()=>{window.anymindTS.que.push(function(){window.anymindTS.dispose()})};var appWrappers_ATSManager=()=>{let{locale:e}=(0,d.h)(),t=(0,a.useRef)(!1),n=(0,a.useRef)(!1);return((0,a.useEffect)(()=>(t.current||(console.log("run ats"),runAts(),t.current=!0),()=>{!n.current&&t.current&&(console.log("dispose ats"),disposeAts())}),[]),x.includes(e))?(0,i.tZ)(M(),{children:(0,i.tZ)("script",{src:"https://anymind360.com/js/14154/ats.js",async:!0})}):null},k=n("srEp"),_=n("UC11"),B=n("bKXh");let P=["en-diabetes","en-weight-management","bmi-calculator-en"],A=["HPV_screen"],O=["test640","shinglesboothquiz"],F=b.Mw?[2745]:[1276],D={"vi-VN":B,"zh-SG":_},DynamicIntlWrapper=e=>{let{children:t,botId:n}=e,{locale:o="en-PH",defaultLocale:l,query:r}=(0,p.useRouter)(),d=(0,a.useMemo)(()=>"hi-IN"===o&&P.some(e=>{var t;return null==r?void 0:null===(t=r.slug)||void 0===t?void 0:t.includes(e)})||"vi-VN"===o&&A.some(e=>{var t;return null==r?void 0:null===(t=r.slug)||void 0===t?void 0:t.includes(e)})||"ms-MY"===o&&O.some(e=>{var t;return null==r?void 0:null===(t=r.slug)||void 0===t?void 0:t.includes(e)})?"en-PH":n&&"number"==typeof n&&F.includes(n)?"zh-SG":o,[o,null==r?void 0:r.slug]),s=D[d];return(0,i.tZ)(k.Z,{locale:o||l||"en-PH",messages:s,defaultLocale:"en-PH",children:t})};var N=n("dtCp"),U=n("LdxM"),H=n("PdEZ");let R={"vi-VN":N.ZP,"zh-SG":U.ZP},X=["en-diabetes","en-weight-management","bmi-calculator-en"],DynamicTranslationsWrapper=e=>{let{children:t}=e,{locale:n="en-PH",query:a}=(0,p.useRouter)(),o="hi-IN"===n&&X.some(e=>{var t;return null==a?void 0:null===(t=a.slug)||void 0===t?void 0:t.includes(e)})?"en-PH":n;return(0,i.tZ)(i.HY,{children:(0,i.tZ)(H.t,{locale:o,values:R[o],children:t})})};var z=n("c4YP"),W=n("Wgwc"),G=n.n(W),V=n("p46w"),j=n.n(V),Y=n("r2Jg"),q=n("z1I/"),K=n("3h3t"),Q=n("ru7g"),J=n("j6je");let $=(0,a.memo)(function(){let{locale:e}=(0,d.h)(),{state:{userInfo:t}}=(0,a.useContext)(y.I),n=JSON.parse(j().get(Y.kO)||"{}");return((0,a.useEffect)(()=>{if(null==t?void 0:t.id){let e=(null==n?void 0:n.cycle_length_days)&&(null==n?void 0:n.period_duration_days)&&!(null==t?void 0:t.is_new)&&(0,J.kw)(new Date,G()(n.menstrual_from_date).toDate(),n.cycle_length_days,n.period_duration_days),i=window.googletag||{cmd:[]};i.cmd.push(function(){(null==t?void 0:t.birthday)&&i.pubads().setTargeting("age",[(0,K.A)(null==t?void 0:t.birthday,"YYYY-MM-DD")]),i.pubads().setTargeting("gender",[(0,Q.I)(null==t?void 0:t.gender)]),i.pubads().setTargeting("ovulation",[e?"yes":"no"])})}},[n,null==t?void 0:t.id,null==t?void 0:t.is_new]),q.d.includes(e))?(0,i.tZ)("script",{id:"inskin-script",dangerouslySetInnerHTML:{__html:'\n var fn_pageskin = "false";\n if (screen.width >= 1280) {\n fn_pageskin = "true";\n }\n window.googletag = window.googletag || { cmd: [] };\n googletag.cmd.push(function () {\n googletag.pubads().setTargeting("inskin_yes",fn_pageskin);\n });'}}):null});var ee=n("eosF"),et=n("iv2E"),en=n("67bW"),ei=n("i6DD"),ea=n("hXNO");let PWTWrapper=e=>{let{testAdpushup:t}=e,n=(0,ea.d)(),{locale:o,query:l}=(0,d.h)(),{gaId:r}=(0,ei.J)(),c=(0,a.useMemo)(()=>{let e=l.pwtv||"",t="//ads.pubmatic.com/AdServer/js/pwt/".concat(s.Gk,"/").concat(n?b.L6[o].mobile:b.L6[o].desktop),i="";return e&&(i="/"+e),t+i+"/pwt.js"},[n,l]);return(0,i.BX)(i.HY,{children:[(0,i.tZ)("script",{async:!0,dangerouslySetInnerHTML:{__html:"\n var getCookie = (name) => document.cookie.split('; ').reduce((r, v) => {\n const parts = v.split('='); return parts[0] === name ? decodeURIComponent(parts[1]) : r\n }, '')\n const gaId = (getCookie(\"".concat(b.ch,"\") || '').replace(/GA1.[123]./g, '')\n\n window.getFpdDataFromPublisher = function() {\n return {\n customFpd: {\n user: {\n ext: {\n eids: [{\n source: \"hellohealthgroup.com\",\n uids: [{\n id: gaId || '',\n atype: 1\n }]\n }]\n }\n }\n }\n };\n };\n\n document.addEventListener('DOMContentLoaded', function() {\n const script = document.createElement('script')\n script.src = \"").concat(c,"\"\n script.async = true\n document.head.appendChild(script)\n\n const preSetupScript = document.createElement('script')\n preSetupScript.type = 'text/javascript'\n preSetupScript.async = true\n preSetupScript.innerHTML = `\n window._mgPubmaticExists = true;\n var PWT={}; //Initialize Namespace\n var googletag = googletag || {};\n googletag.cmd = googletag.cmd || [];\n var gptRan = false;\n PWT.jsLoaded = function(){ //PubMatic pwt.js on load callback is used to load GPT\n loadGPT();\n };\n var loadGPT = function(afterPWTRun) {\n // Check the gptRan flag\n if (!gptRan) {\n gptRan = true;\n var gads = document.createElement('script');\n var useSSL = 'https:' == document.location.protocol;\n gads.src = (useSSL ? 'https:' : 'http:') + '//securepubads.g.doubleclick.net/tag/js/gpt.js'; //render skinner ads\n var node = document.getElementsByTagName('script')[0];\n node.parentNode.insertBefore(gads, node);\n }\n };\n // Failsafe to call gpt\n setTimeout(loadGPT, 500);\n `\n document.head.appendChild(preSetupScript)\n }, false);\n ")}}),(0,i.tZ)(M(),{children:t&&(0,i.BX)(i.HY,{children:[(0,i.tZ)("script",{async:!0,"data-cfasync":"false",type:"text/javascript",dangerouslySetInnerHTML:{__html:"(function(w, d) { var s = d.createElement('script'); s.src = '//cdn.adpushup.com/45367/adpushup.js'; s.crossOrigin='anonymous'; s.type = 'text/javascript'; s.async = true; (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); w.adpushup = w.adpushup || {que:[]}; })(window, document);"}}),(0,i.tZ)("script",{async:!0,type:"text/javascript",dangerouslySetInnerHTML:{__html:"!function(w,d){\n var adpushup = w.adpushup = w.adpushup || {que:[]};\n adpushup.que.push(function(){\n adpushup.init();\n })\n }(window, document);"}})]})}),r&&(0,i.tZ)("iframe",{src:"https://ads.pubmatic.com/AdServer/js/user_sync.html?p=".concat(s.Gt.PUBLISHER_ACCOUNT_ID,"&gdpr=&gdpr_consent=&userIdMacro=(PM_UID)&predirect=").concat(encodeURIComponent("".concat(b.ENV.NEXT_PUBLIC_THE_TRADE_DESK_API,"api/publisher?partner=pubmatic&cookieid=(PM_UID)&hhgGaClientId=").concat(r,"&domain=").concat(et.domainLocales[o]))),title:"iframe_cookie_sync",width:"1",height:"0",className:"block"})]})};var pwtWrapper=e=>{let{testAdpushup:t}=e,{locale:n,asPath:a}=(0,d.h)(),{isPregnancy:o,isParenting:l,isHealth:r}=(0,en.b)();return n===ee.L.Indonesia&&(o||l)||n===ee.L.Taiwan&&r?(0,i.tZ)(M(),{children:(0,i.tZ)("script",{defer:!0,src:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"})}):n===ee.L.Taiwan&&r||(s.Rk[n]||[]).find(e=>a.startsWith(e))||a.startsWith("/health-tools/")&&!(s.rd[n]||[]).find(e=>encodeURIComponent(decodeURIComponent(a)).startsWith(encodeURIComponent(e)))||a.startsWith("/bot/")&&!(s.Iu[n]||[]).find(e=>encodeURIComponent(decodeURIComponent(a)).startsWith(encodeURIComponent(e)))?null:(0,i.tZ)(PWTWrapper,{testAdpushup:t})},eo=n("xIXX"),el=n("05Ua");let er=l()(()=>Promise.all([n.e(5006),n.e(857),n.e(9409),n.e(6259),n.e(1818),n.e(7519),n.e(761),n.e(2189),n.e(5231),n.e(7797),n.e(5454),n.e(5481),n.e(140),n.e(5718),n.e(3684),n.e(5349),n.e(4148),n.e(2509),n.e(1533),n.e(1108),n.e(9124),n.e(4190),n.e(2582),n.e(6509),n.e(5308),n.e(4125),n.e(9715),n.e(7730),n.e(3929),n.e(891),n.e(137),n.e(4414),n.e(1079),n.e(7613),n.e(8098),n.e(3416),n.e(2500),n.e(1570),n.e(3506),n.e(1413),n.e(2138),n.e(9467),n.e(4467),n.e(6966),n.e(5243),n.e(8132),n.e(1375),n.e(4561),n.e(1448),n.e(5465),n.e(1217),n.e(5480),n.e(731),n.e(2050),n.e(2008),n.e(8469),n.e(8214),n.e(1482),n.e(6817),n.e(467),n.e(5951),n.e(9357),n.e(747),n.e(5675),n.e(6753),n.e(4802),n.e(3046),n.e(5745),n.e(3437),n.e(252),n.e(6839),n.e(9424),n.e(5702),n.e(8922),n.e(6399),n.e(553),n.e(2902),n.e(4969),n.e(3257),n.e(6611),n.e(7538),n.e(6894),n.e(5341)]).then(n.bind(n,"g6BO")).then(e=>e.SSOV2),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),SSOV2Wrapper=()=>{let{locale:e}=(0,d.h)(),{state:t,dispatch:n}=(0,a.useContext)(y.I);if(!b.Ew)return null;let{userInfo:o,successLoginFn:l}=t;return(0,i.tZ)(er,{onClose:()=>{!(null==o?void 0:o.id)&&j().get(b.Ud)?(async()=>{let t=await (0,eo.Iq)();(null==t?void 0:t.id)?(n({type:el.H.LOGIN,payload:t}),null==l||l()):n({type:el.H.LOGOUT,payload:{domain:"."+et.domainLocales[e]}})})():(null==o?void 0:o.id)&&!j().get(b.Ud)?n({type:el.H.LOGOUT,payload:{domain:"."+et.domainLocales[e]}}):n({type:el.H.INIT_USER})},locale:e})};var ed=n("OWiU");let es=l()(()=>Promise.all([n.e(5231),n.e(7797),n.e(5454),n.e(5481),n.e(140),n.e(5718),n.e(3684),n.e(5349),n.e(4148),n.e(2509),n.e(1533),n.e(1108),n.e(9124),n.e(4190),n.e(2582),n.e(6509),n.e(5308),n.e(4125),n.e(9715),n.e(7730),n.e(3929),n.e(891),n.e(137),n.e(4414),n.e(1079),n.e(7613),n.e(8098),n.e(3416),n.e(2500),n.e(1570),n.e(3506),n.e(1413),n.e(4846),n.e(2233),n.e(1058),n.e(3295),n.e(1538),n.e(7152),n.e(5684),n.e(2574),n.e(9884),n.e(7644),n.e(6962),n.e(8767),n.e(6638),n.e(7741),n.e(3434),n.e(2433),n.e(5385),n.e(3564),n.e(7082),n.e(3158),n.e(5641),n.e(7454),n.e(7004),n.e(4758),n.e(6219),n.e(17),n.e(8990),n.e(4067),n.e(9487),n.e(9083),n.e(1520),n.e(270),n.e(7596),n.e(8217),n.e(7543),n.e(2835),n.e(2507),n.e(6885),n.e(7859),n.e(690),n.e(2730),n.e(6287),n.e(7682),n.e(1551),n.e(4870),n.e(9922),n.e(3133),n.e(612),n.e(2002),n.e(1880),n.e(7471),n.e(7165),n.e(5451),n.e(8612)]).then(n.bind(n,"mYw+")).then(e=>e.AppCustomScripts),{loadableGenerated:{webpack:()=>["mYw+"]}}),ec=l()(()=>Promise.all([n.e(4846),n.e(2233),n.e(1058),n.e(3295),n.e(1538),n.e(7152),n.e(5684),n.e(2574),n.e(9884),n.e(7644),n.e(6962),n.e(8767),n.e(6638),n.e(7741),n.e(3434),n.e(2433),n.e(5385),n.e(3564),n.e(7082),n.e(3158),n.e(5641),n.e(7454),n.e(7004),n.e(4758),n.e(6219),n.e(17),n.e(8990),n.e(4067),n.e(9487),n.e(9083),n.e(1520),n.e(270),n.e(7596),n.e(8217),n.e(7543),n.e(2835),n.e(2507),n.e(6885),n.e(7859),n.e(690),n.e(2730),n.e(6287),n.e(7682),n.e(1551),n.e(4870),n.e(9922),n.e(3133),n.e(612),n.e(2002),n.e(1880),n.e(7471),n.e(7165),n.e(5451),n.e(8612)]).then(n.bind(n,"JZFV")).then(e=>e.AppCustomHooksWrapper),{loadableGenerated:{webpack:()=>["JZFV"]},ssr:!1}),eu=l()(()=>Promise.all([n.e(4846),n.e(2233),n.e(1058),n.e(3295),n.e(1538),n.e(7152),n.e(5684),n.e(2574),n.e(9884),n.e(7644),n.e(6962),n.e(8767),n.e(6638),n.e(7741),n.e(3434),n.e(2433),n.e(5385),n.e(3564),n.e(7082),n.e(3158),n.e(5641),n.e(7454),n.e(7004),n.e(4758),n.e(6219),n.e(17),n.e(8990),n.e(4067),n.e(9487),n.e(9083),n.e(1520),n.e(270),n.e(7596),n.e(8217),n.e(7543),n.e(2835),n.e(2507),n.e(6885),n.e(7859),n.e(690),n.e(2730),n.e(6287),n.e(7682),n.e(1551),n.e(4870),n.e(9922),n.e(3133),n.e(612),n.e(2002),n.e(1880),n.e(7471),n.e(7165),n.e(5451),n.e(8612)]).then(n.bind(n,"qJ0d")).then(e=>e.GoogleOneTap),{loadableGenerated:{webpack:()=>["qJ0d"]},ssr:!1}),ep=l()(()=>Promise.all([n.e(4846),n.e(2233),n.e(1058),n.e(3295),n.e(1538),n.e(7152),n.e(5684),n.e(2574),n.e(9884),n.e(7644),n.e(6962),n.e(8767),n.e(6638),n.e(7741),n.e(3434),n.e(2433),n.e(5385),n.e(3564),n.e(7082),n.e(3158),n.e(5641),n.e(7454),n.e(7004),n.e(4758),n.e(6219),n.e(17),n.e(8990),n.e(4067),n.e(9487),n.e(9083),n.e(1520),n.e(270),n.e(7596),n.e(8217),n.e(7543),n.e(2835),n.e(2507),n.e(6885),n.e(7859),n.e(690),n.e(2730),n.e(6287),n.e(7682),n.e(1551),n.e(4870),n.e(9922),n.e(3133),n.e(612),n.e(2002),n.e(1880),n.e(7471),n.e(7165),n.e(5451),n.e(8612)]).then(n.bind(n,"p3z+")).then(e=>e.ZaloChat),{loadableGenerated:{webpack:()=>["p3z+"]},ssr:!1}),eh=l()(()=>Promise.all([n.e(4846),n.e(2233),n.e(1058),n.e(3295),n.e(1538),n.e(7152),n.e(5684),n.e(2574),n.e(9884),n.e(7644),n.e(6962),n.e(8767),n.e(6638),n.e(7741),n.e(3434),n.e(2433),n.e(5385),n.e(3564),n.e(7082),n.e(3158),n.e(5641),n.e(7454),n.e(7004),n.e(4758),n.e(6219),n.e(17),n.e(8990),n.e(4067),n.e(9487),n.e(9083),n.e(1520),n.e(270),n.e(7596),n.e(8217),n.e(7543),n.e(2835),n.e(2507),n.e(6885),n.e(7859),n.e(690),n.e(2730),n.e(6287),n.e(7682),n.e(1551),n.e(4870),n.e(9922),n.e(3133),n.e(612),n.e(2002),n.e(1880),n.e(7471),n.e(7165),n.e(5451),n.e(8612)]).then(n.bind(n,"/Q+1")).then(e=>e.PerformanceMonitor),{loadableGenerated:{webpack:()=>["/Q+1"]},ssr:!1}),eg=l()(()=>Promise.all([n.e(4846),n.e(2233),n.e(1058),n.e(3295),n.e(1538),n.e(7152),n.e(5684),n.e(2574),n.e(9884),n.e(7644),n.e(6962),n.e(8767),n.e(6638),n.e(7741),n.e(3434),n.e(2433),n.e(5385),n.e(3564),n.e(7082),n.e(3158),n.e(5641),n.e(7454),n.e(7004),n.e(4758),n.e(6219),n.e(17),n.e(8990),n.e(4067),n.e(9487),n.e(9083),n.e(1520),n.e(270),n.e(7596),n.e(8217),n.e(7543),n.e(2835),n.e(2507),n.e(6885),n.e(7859),n.e(690),n.e(2730),n.e(6287),n.e(7682),n.e(1551),n.e(4870),n.e(9922),n.e(3133),n.e(612),n.e(2002),n.e(1880),n.e(7471),n.e(7165),n.e(5451),n.e(8612)]).then(n.bind(n,"Wkbu")).then(e=>e.default),{loadableGenerated:{webpack:()=>["Wkbu"]},ssr:!1}),em=l()(()=>Promise.all([n.e(9409),n.e(6259),n.e(1818),n.e(7519),n.e(761),n.e(2189),n.e(5231),n.e(7797),n.e(5454),n.e(5481),n.e(140),n.e(5718),n.e(3684),n.e(5349),n.e(4148),n.e(2509),n.e(1533),n.e(1108),n.e(9124),n.e(4190),n.e(2582),n.e(6509),n.e(5308),n.e(4125),n.e(9715),n.e(7730),n.e(3929),n.e(891),n.e(137),n.e(4414),n.e(1079),n.e(7613),n.e(8098),n.e(3416),n.e(2500),n.e(1570),n.e(3506),n.e(1413),n.e(2138),n.e(9467),n.e(4467),n.e(6966),n.e(5243),n.e(8132),n.e(1375),n.e(4561),n.e(1448),n.e(5465),n.e(1217),n.e(5480),n.e(731),n.e(2050),n.e(2008),n.e(8469),n.e(8214),n.e(1482),n.e(6817),n.e(467),n.e(5951),n.e(9357),n.e(747),n.e(5675),n.e(6753),n.e(4802),n.e(3046),n.e(5745),n.e(3437),n.e(252),n.e(6839),n.e(9424),n.e(5702),n.e(8922),n.e(6399),n.e(553),n.e(2902),n.e(4969),n.e(3257),n.e(6611),n.e(7538),n.e(6894),n.e(5341),n.e(4846),n.e(2233),n.e(1058),n.e(3295),n.e(1538),n.e(7152),n.e(5684),n.e(2574),n.e(9884),n.e(7644),n.e(6962),n.e(8767),n.e(6638),n.e(7741),n.e(3434),n.e(2433),n.e(5385),n.e(3564),n.e(7082),n.e(3158),n.e(5641),n.e(7454),n.e(7004),n.e(4758),n.e(6219),n.e(17),n.e(8990),n.e(4067),n.e(9487),n.e(9083),n.e(1520),n.e(270),n.e(7596),n.e(8217),n.e(7543),n.e(2835),n.e(2507),n.e(6885),n.e(7859),n.e(690),n.e(2730),n.e(6287),n.e(7682),n.e(1551),n.e(4870),n.e(9922),n.e(3133),n.e(612),n.e(2002),n.e(1880),n.e(7471),n.e(7165),n.e(5451),n.e(8612)]).then(n.bind(n,"RohI")).then(e=>e.AppMantineProvider),{loadableGenerated:{webpack:()=>["RohI"]}}),ef=l()(()=>Promise.all([n.e(4846),n.e(2233),n.e(1058),n.e(3295),n.e(1538),n.e(7152),n.e(5684),n.e(2574),n.e(9884),n.e(7644),n.e(6962),n.e(8767),n.e(6638),n.e(7741),n.e(3434),n.e(2433),n.e(5385),n.e(3564),n.e(7082),n.e(3158),n.e(5641),n.e(7454),n.e(7004),n.e(4758),n.e(6219),n.e(17),n.e(8990),n.e(4067),n.e(9487),n.e(9083),n.e(1520),n.e(270),n.e(7596),n.e(8217),n.e(7543),n.e(2835),n.e(2507),n.e(6885),n.e(7859),n.e(690),n.e(2730),n.e(6287),n.e(7682),n.e(1551),n.e(4870),n.e(9922),n.e(3133),n.e(612),n.e(2002),n.e(1880),n.e(7471),n.e(7165),n.e(5451),n.e(8612),n.e(7847)]).then(n.bind(n,"tiER")).then(e=>e.QuickBookingDrawerWrapper),{loadableGenerated:{webpack:()=>["tiER"]},ssr:!1});function AppWrapper(e){var t,n;let{pageProps:o,children:l}=e,[u,p]=(0,a.useState)(!1),{disableAds:h}=o||{};(0,a.useEffect)(()=>{p(!(0,c.z)())},[]);let{locale:g,asPath:m,pathname:f}=(0,d.h)(),v="/bot/[slug]"===f?null==o?void 0:null===(n=o.nodes)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.id:null;return(0,i.BX)(DynamicIntlWrapper,{botId:v,children:[(null==o?void 0:o.page)!=="dynamicSpotlight"&&(0,i.tZ)(z.A,{servicePageTrackingParams:(0,ed.PG)()}),(0,i.tZ)(DynamicTranslationsWrapper,{children:(0,i.BX)(AppContextWrapper,{pageProps:o,children:[(0,i.tZ)(ec,{}),(0,i.tZ)($,{}),(0,i.tZ)(appWrappers_ATSManager,{}),u&&(0,i.BX)(i.HY,{children:[(0,i.tZ)(es,{}),(0,i.tZ)(eu,{})]}),(0,i.BX)(em,{customComponentTheme:null==o?void 0:o.customComponentTheme,children:[(0,i.tZ)(AppGlobalStyle,{}),(0,i.tZ)(r.Z,{whenIdle:!0,children:(0,i.tZ)(ef,{})}),l,!h&&(0,i.tZ)(pwtWrapper,{}),(s.Oe[g]||[]).find(e=>encodeURIComponent(decodeURIComponent(m)).startsWith(encodeURIComponent(e)))&&(0,i.tZ)("script",{dangerouslySetInnerHTML:{__html:'\n // Wait for the DOM to load\n document.addEventListener("DOMContentLoaded", function () {\n // Delay of 3 seconds\n setTimeout(function () {\n // Array of IDs for the divs to hide\n const adDivIds = [\n "div-gpt-ad-1731038676058-0",\n "TR-3520584e-9d88-11ef-9b9c-833c3a33225d"\n ];\n // Loop through each ID\n adDivIds.forEach(function (id) {\n const adDiv = document.getElementById(id);\n if (adDiv) {\n // Hide the div\n adDiv.style.display = "none";\n console.log("Ad div with ID " + id + " has been hidden.");\n } else {\n console.log("Ad div with ID " + id + " not found.");\n }\n });\n }, 10000); // 10000ms = 10 seconds\n });\n '}}),(0,i.tZ)(ep,{}),(0,i.tZ)(eg,{}),(0,i.tZ)(eh,{}),(0,i.tZ)(SSOV2Wrapper,{})]})]})})]})}},VjYe:function(e,t,n){n.d(t,{x:function(){return LeadCss}});var i=n("q1tI"),a=n("GZ4s");let LeadCss=()=>((0,i.useEffect)(()=>{let e="lead-css-style";if(!document.getElementById(e)){let t=document.createElement("style");t.id=e,t.innerHTML=a.Z,document.head.appendChild(t)}},[]),null)},JZFV:function(e,t,n){n.r(t),n.d(t,{AppCustomHooksWrapper:function(){return AppCustomHooksWrapper},useAppCustomHooks:function(){return useAppCustomHooks}});var i=n("q1tI"),a=n("p46w"),o=n.n(a),l=n("09QT"),r=n("oQBk"),d=n("xIXX"),s=n("iv2E"),c=n("P5LW"),u=n("rIrU"),p=n("05Ua"),h=n("o0qI");let useAppCustomHooks=()=>{let{locale:e,router:{pathname:t,query:n}}=(0,c.h)(),{state:a,dispatch:g}=(0,i.useContext)(h.I),{userInfo:m}=a;(0,i.useEffect)(()=>{var t;(null===(t=u.P8||[])||void 0===t?void 0:t.includes(e))&&(window.consentListeners=[],window.addConsentListenerExample=e=>{window.consentListeners.push(e)})},[]),(0,i.useEffect)(()=>{"id-ID"===e&&(window.SM_SPLITSIGNAL_READY=!0,setTimeout(()=>{window.dispatchEvent(new Event("splitsignal.initialized"))},1e3))},[t]),(0,i.useEffect)(()=>{if(o().remove("__uid2_advertising_token"),(null==m?void 0:m.id)&&(0,l.d)(r.y.USER_PROFILE.GET_TOKENS_UID2,{method:"POST"},"sso").then(t=>{if((null==t?void 0:t._status)===1&&(null==t?void 0:t._data)){let{unified_id:n,unified_identity_expires:i,unified_refresh:a,unified_refresh_expires:l,unified_refresh_from:r,unified_refresh_response_key:d,unified_user_token:c}=null==t?void 0:t._data;if(null==t?void 0:t._data){o().set(u.DN,JSON.stringify({advertising_token:n||"",refresh_token:a||"",identity_expires:i||0,refresh_from:r||0,refresh_expires:l||0,refresh_response_key:d||""}),{domain:".".concat(s.domainLocales[e])});let t=null;!function setUid2(){t&&clearTimeout(t),void 0!==window.pbjs&&void 0!==window.pbjs.setConfig?window.pbjs.setConfig({userSync:{userIds:[{name:"uid2",params:{uid2ServerCookie:u.DN}}]}}):t=setTimeout(function(){setUid2()},300)}()}o().set(u.dj,a,{domain:".".concat(s.domainLocales[e])}),o().set(u.Pc,c,{domain:".".concat(s.domainLocales[e])})}}),!(null==m?void 0:m.id)&&!o().get(u.Ud)&&"mobile"===n.type&&n.token){(0,l.d)(r.y.SSO.AUTH_APP_TOKEN,{method:"POST",headers:{Authorization:"Bearer ".concat(n.token)}},"sso").then(e=>{var t;(null==e?void 0:null===(t=e._data)||void 0===t?void 0:t.token)&&(o().set(u.Ud,e._data.token),(0,d.Iq)().then(e=>{(null==e?void 0:e.id)&&g({type:p.H.LOGIN,payload:e})}))}).catch(()=>{o().remove(u.Ud)});return}!(null==m?void 0:m.id)&&o().get(u.Ud)?(async()=>{let t=await (0,d.Iq)();(null==t?void 0:t.id)?g({type:p.H.LOGIN,payload:t}):g({type:p.H.LOGOUT,payload:{domain:"."+s.domainLocales[e]}})})():(null==m?void 0:m.id)&&!o().get(u.Ud)?g({type:p.H.LOGOUT,payload:{domain:"."+s.domainLocales[e]}}):g({type:p.H.INIT_USER})},[null==m?void 0:m.id])},AppCustomHooksWrapper=()=>(useAppCustomHooks(),null)}}]);