"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8674],{"pi/9":function(e,t,n){n.d(t,{M:function(){return ei},S:function(){return SurveyOrPremiumBanner},a:function(){return er},b:function(){return SideBannerModal}});var a,i,r,o,l,s,c,d=n("q1tI"),u=n("mYVa"),p=n("7Ci/"),g=n("/npG"),h=n("Eso5"),m=n("OAL+"),b=n("SPK5"),E=n("RZSM"),v=n("vaps"),T=n("9n+W"),S=n("DA0W"),C=n("RGvF"),f=n("JZkZ"),I=n("MkcP"),_=n("Ejk3"),O=n("gLxU"),y=n("UqOp"),x=n("5VfW"),B=n("UIg8"),w=n("SwpR"),k=n("PnmO"),R=n("9S3P"),N=n("0coF"),A=n("5DIC"),L=n("cChf"),M=n("ZFu2"),P=n("Biuj"),U=n("9s1y"),D=n("2YCo"),j=n("4cu0"),H=n("jD9D"),W=n("IQVP"),z=n("nq2p"),F=n("Yflq"),G=n("e0y4"),V=n("xrdX"),$=n("GOBr"),Y=n("q9DY"),K=n("oTwY"),Z=n("OW+O"),X=n("YED8"),q=n("JIJ2"),J=n("TYy9"),Q=n.n(J),ee=n("qPyV"),et=n.n(ee),en=n("XgXa");let ea=[{title:"Health News & Current Affairs",description:"Covering the latest happenings in the health field, including medical breakthroughs, policies, and disease outbreaks",icon:_.C.getAssetPath("newsletter-prefer/newsletter-health.svg"),checked:!1,id:1},{title:"Educational Medical Hello Bacsi Content",description:"Covering the latest happenings in the health field, including medical breakthroughs, policies, and disease outbreaks",icon:_.C.getAssetPath("newsletter-prefer/newsletter-education.svg"),checked:!1,id:2},{title:"Hello Health Community Feed",description:"Covering the latest happenings in the health field, including medical breakthroughs, policies, and disease outbreaks",icon:_.C.getAssetPath("newsletter-prefer/newsletter-community.svg"),checked:!1,id:3}];(a=o||(o={})).Pregnant="pregnant",a.Parenting="parenting",(l||(l={})).Option="option",(i=s||(s={})).Button="button",i.Checkbox="checkbox",(r=c||(c={})).ShowTool="showTool",r.ShowPremiumModal="showPremiumModal",r.ShowOptionBanner="showOptionBanner",r.Hide="hide";let ei={pregnancy:o.Pregnant,parenting:o.Parenting},er={[o.Pregnant]:"pregnant",[o.Parenting]:"parent"},FLOW=(e,t)=>({[o.Pregnant]:{action:c.ShowOptionBanner,props:{heading:e("pnBanner.pregnancy.heading"),description:e("pnBanner.pregnancy.desc"),styleType:s.Button,thumbnail:{desktop:_.C.getAssetPath("newsletter/banner-option-pregnancy-desktop.png"),mobile:_.C.getAssetPath("newsletter/banner-option-pregnancy-mobile.png")},buttonProps:{variant:"white",styles:e=>({minWidth:(0,u.h)(80),[e.fn.largerThan("sm")]:{minWidth:(0,u.h)(120)}})},items:[{label:e("switchBtn.yes"),value:"yes",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Are you navigating the world of pregnancy - Yes Click",dataEventLabel:t}},{label:e("switchBtn.no"),value:"no",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Are you navigating the world of pregnancy - No Click",dataEventLabel:t}}]},submitHandler:{yes:{action:c.ShowTool,props:{value:x.H.DUE_DATE}},no:{action:c.ShowPremiumModal}}},[o.Parenting]:{action:c.ShowOptionBanner,props:{heading:e("pnBanner.parenting.heading"),description:e("pnBanner.parenting.desc"),thumbnail:{desktop:_.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:_.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},hideDescOnMobile:!0,styleType:s.Checkbox,items:[{label:e("pnBanner.toddlers"),value:"todders"},{label:e("pnBanner.teenager"),value:"teenager"}],submitBtnTracking:{dataEventCategory:"Focused Audience",dataEventAction:"What is the age range of your kids Click",dataEventLabel:t}},submitHandler:{todders:{action:c.ShowTool,props:{value:x.H.BABY_VACCINE}},teenager:{action:c.ShowOptionBanner,props:{styleType:s.Button,heading:e("pnBanner.teenager.heading"),description:e("pnBanner.parenting.desc"),thumbnail:{desktop:_.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:_.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},buttonProps:{variant:"white"},items:[{label:e("childCard.boy"),value:"teenager.boy",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"What is the gender of your kids - Boy Click",dataEventLabel:t}},{label:e("childCard.girl"),value:"teenager.girl",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"What is the gender of your kids - Girl Click",dataEventLabel:t}}]}},"teenager.boy":{action:c.ShowPremiumModal},"teenager.girl":{action:c.ShowTool,activeTool:B.t.HPV,props:{value:B.t.HPV}},"todders|teenager":{action:c.ShowOptionBanner,props:{styleType:s.Button,heading:e("pnBanner.both.heading"),description:e("pnBanner.both.desc"),thumbnail:{desktop:_.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:_.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},hideDescOnMobile:!0,buttonProps:{variant:"secondary"},styles:e=>({wrapper:{[e.fn.smallerThan("sm")]:{flexDirection:"column"}},button:{background:e.colors.blue[0]}}),items:[{label:e("pnBanner.vaccine.btnLabel"),activeTool:x.H.BABY_VACCINE,isLink:!0,tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Experience our tools for parent - Baby Vaccine Click",dataEventLabel:t}},{label:e("pnBanner.pn.btnLabel"),value:"todders|teenager.showPN",isPNBtn:!0,tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Experience our tools for parent - Premium Newsletter Click",dataEventLabel:t}}]}},"todders|teenager.showPN":{action:c.ShowOptionBanner,props:{styleType:s.Button,heading:e("pnBanner.both.heading"),description:e("pnBanner.both.desc"),thumbnail:{desktop:_.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:_.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},hideDescOnMobile:!0,buttonProps:{variant:"secondary"},styles:e=>({wrapper:{[e.fn.smallerThan("sm")]:{flexDirection:"column"}},button:{background:e.colors.blue[0]}}),items:[{label:e("pnBanner.vaccine.btnLabel"),activeTool:x.H.BABY_VACCINE,isLink:!0,tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Experience our tools for parent - Baby Vaccine Click",dataEventLabel:t}}]}}}}}),TOOL_BANNERS_PROPS=e=>({[x.H.DUE_DATE]:{heading:e("pnBanner.dueDateTool.heading"),description:e("pnBanner.dueDateTool.desc"),btnLabel:e("pnBanner.caclNow"),value:x.H.DUE_DATE,dataEventAction:"Try our Due Date Calculator Click"},[x.H.BABY_VACCINE]:{heading:e("pnBanner.vaccination.heading"),description:e("pnBanner.vaccination.desc"),btnLabel:e("pnBanner.caclNow"),value:x.H.BABY_VACCINE,dataEventAction:"Try our Baby Vaccine Scheduler Click"},[x.H.BABY_GROWTH]:{heading:"Baby Growth",description:e("pnBanner.vaccination.desc"),btnLabel:e("pnBanner.caclNow"),value:x.H.BABY_GROWTH},[B.t.HPV]:{heading:e("pnBanner.hpv.heading"),description:e("pnBanner.hpv.desc"),thumbnail:{desktop:_.C.getAssetPath("newsletter/banner-option-hpv-desktop.png"),mobile:_.C.getAssetPath("newsletter/banner-option-hpv-mobile.png")},isRiskScreener:!0,btnLabel:e("pnBanner.checkNow"),value:B.t.HPV,hideDescOnMobile:!0,dataEventAction:"Keep safe from HPV virus Click"}}),eo=(0,d.createContext)({}),PnBannerEle=e=>{var t=(0,w._)(e,[]);let{locale:n}=(0,A.u)(),{type:a,isMobile:i,currentUrl:r,isMarketing:o,isLoggedIn:l,setShouldAcquisitionModalOpen:s}=(0,d.useContext)(eo),{triggerLogin:c}=(0,k.u)();return d.createElement(p.W,Object.assign({mih:{base:144,md:160},fluid:!0,p:0,sx:{borderRadius:4,cursor:"pointer"},onClick:()=>(0,w.a)(void 0,void 0,void 0,function*(){let e=o?(0,N.g)(n)+"/dang-ky-nhan-tin/":`${window.location.href}?source=acquisition`;l?null==s||s():(0,k.I)(n)?c({returnUrl:o?e:void 0,source:o?void 0:"acquisition"}):window.location.href=`${(0,N.a)(n)}/?returnUrl=${encodeURIComponent(e)}`}),"data-event-category":"Newsletter","data-event-action":"Banner Click","data-event-label":r,className:"pointer-event-child-none"},t),d.createElement(R.I,{src:o?_.C.getAssetPath(`newsletter/${i?"Mobile":"Desktop"}_Marketing.png`):_.C.getAssetPath(`newsletter/${i?"Mobile":"Desktop"}_${a}.png`),style:{maxWidth:"100%"},alt:"newsletter banner"}))},el={GET_NEWSLETTER_CATEGORIES:"api/v1/categories?site={website_url}",POST_SUBSCRIPTION:"api/v1/subscription?site={website_url}",GET_SUBSCRIPTION_CATEGORIES:"api/v1/categories?site={website_url}"};var es=(0,g.k)(e=>({root:{},wrapper:{[e.fn.smallerThan("sm")]:{width:"70%"}},button:{[e.fn.smallerThan("sm")]:{height:"auto",minHeight:(0,u.h)(32),padding:`${(0,u.h)(6)} ${(0,u.h)(16)}`,textAlign:"center",width:"100%"}},buttonLabel:{whiteSpace:"normal"}}));let BannerLayout=({heading:e,description:t,thumbnail:n={desktop:"",mobile:""},hideDescOnMobile:a,children:i})=>{let{isMobile:r,minHeight:o}=(0,d.useContext)(eo);return d.createElement(h.x,{sx:()=>({borderRadius:(0,u.h)(8),background:"linear-gradient(180deg, #FAFDFF 0%, #E3F2FF 100%)"})},d.createElement(h.x,{sx:e=>({minHeight:(0,u.h)(o),borderRadius:"inherit",background:`url(${r?n.mobile:n.desktop})`,backgroundPosition:"center right",backgroundRepeat:"no-repeat",backgroundSize:"contain",padding:`${(0,u.h)(24)} ${(0,u.h)(16)}`,display:"flex",flexDirection:"column",justifyContent:"center",[e.fn.largerThan("sm")]:{padding:`${(0,u.h)(22)} ${(0,u.h)(32)}`}})},d.createElement(m.K,{spacing:(0,u.h)(16)},d.createElement(m.K,{spacing:(0,u.h)(4),sx:e=>({maxWidth:"60%",[e.fn.largerThan("sm")]:{maxWidth:"70%"}})},e&&d.createElement(z.H,{tag:"h4"},e),!(a&&r)&&t&&d.createElement(D.T,{size:"p4"},t)),d.createElement(h.x,null,i))))},BannerWithOptions=e=>{let{styleType:t=s.Button,items:n=[],buttonProps:a,styles:i,submitBtnTracking:r}=e,{classes:o}=es(void 0,{name:"PremiumBannerWithOptions",styles:i}),{t:l,locale:c}=(0,A.u)(),{surveyType:p,articleId:g,handleClickOption:m,hasPremiumBanner:E,source:v,isMobile:T,setShowPNModal:S}=(0,d.useContext)(eo),C=(0,d.useMemo)(()=>E?n:n.filter(e=>!e.isPNBtn).filter(Boolean),[n]),{getHealthToolLink:f}=(0,F.u)(c),I=(0,L.c)({initialValues:{bannerOptions:[]}}),saveStep=e=>(0,w.a)(void 0,void 0,void 0,function*(){return yield(0,O.e)((0,O.f)(W.yy.HEALTH_TOOL.CREATE,{_locale:c,type:er[p]}),"POST",{headers:{"Content-Type":"application/json"},data:{value:e,article:g,source:v}})}),_=(0,d.useCallback)(()=>d.createElement(b.k,{gap:(0,u.h)(8),className:o.wrapper},C.map((e,t)=>d.createElement(h.x,{key:String(t),component:e.isLink?"a":"div",href:e.isRiskScreener?`https://${V.v[c]}/bot/${B.n[c][e.activeTool]}/`:e.isLink?f(e.activeTool):void 0},d.createElement(j.B,Object.assign({className:o.button,classNames:{label:o.buttonLabel},size:"sm"},e.tracking,a,{onClick:()=>{e.isLink||(e.isPNBtn&&S(!0),saveStep(e.value),m(e.value))}}),e.label)))),[C,I]),y=(0,d.useCallback)(()=>d.createElement(b.k,null,d.createElement(b.k,{align:"center",gap:(0,u.h)(24),sx:e=>({background:"white",borderRadius:(0,u.h)(8),padding:(0,u.h)(4),[e.fn.largerThan("sm")]:{paddingLeft:(0,u.h)(16)}})},d.createElement(P.d.Group,Object.assign({},I.getInputProps("bannerOptions",{type:"checkbox"})),d.createElement(b.k,{gap:(0,u.h)(16)},C.map((e,t)=>d.createElement(P.d,{key:String(t),value:e.value,label:e.label,styles:{label:{cursor:"pointer"}}})))),d.createElement(j.B,Object.assign({size:"sm"},r,a,{disabled:0===I.getInputProps("bannerOptions").value.length,leftIcon:T?d.createElement(G.I.ArrowRightTail,{size:18,useCurrentColor:!0}):void 0,onClick:()=>{let e=I.getInputProps("bannerOptions").value;saveStep(e.join("|")),m(e.join("|"))},styles:e=>({root:{[e.fn.smallerThan("sm")]:{width:(0,u.h)(38),minWidth:"auto",padding:0}}})}),!T&&l("pnBanner.submit")))),[C,I]);return d.createElement(BannerLayout,Object.assign({},e),t===s.Button?_():t===s.Checkbox?y():null)},ToolBanner=e=>{var t,n;let{t:a}=(0,A.u)(),{heading:i,description:r,thumbnail:o,btnLabel:l,value:s,isRiskScreener:c,hideDescOnMobile:p,dataEventAction:g}=e,{locale:h}=(0,A.u)(),{isMobile:E}=(0,d.useContext)(eo),{getHealthToolLink:v,allTools:T}=(0,F.u)(h),S=(0,d.useMemo)(()=>{let e=c?`https://${$.y?"":"discover."}${V.v[h]}/bot/${B.n[h][s]}`:v(s);return d.createElement("a",{href:e},d.createElement(j.B,{size:"sm","data-event-category":"Focused Audience","data-event-action":g,"data-event-label":e},l||a("pnBanner.caclNow")))},[T]);return"mainBanner"==(c?"mainBanner":"toolBanner")?d.createElement(BannerLayout,Object.assign({},Object.assign(Object.assign({},e),{thumbnail:e.thumbnail})),S):d.createElement(b.k,{gap:(0,u.h)(7),align:"center",justify:"space-between",sx:e=>({borderRadius:(0,u.h)(8),background:e.colors.blue[0],minHeight:(0,u.h)(180),padding:`${(0,u.h)(24)} ${(0,u.h)(16)}`,[e.fn.largerThan("sm")]:{padding:`${(0,u.h)(34)} ${(0,u.h)(32)}`}})},d.createElement(m.K,{spacing:(0,u.h)(12)},d.createElement(m.K,{spacing:(0,u.h)(4)},i&&d.createElement(z.H,{tag:"h4"},i),!(E&&p)&&r&&d.createElement(D.T,{size:"p4"},r)),d.createElement(b.k,{gap:(0,u.h)(8),sx:{button:{minWidth:(0,u.h)(120)}}},S)),d.createElement(b.k,{align:"center",justify:"center",sx:e=>({width:(0,u.h)(96),height:(0,u.h)(96),borderRadius:"50%",background:"white",flexShrink:0,[e.fn.largerThan("sm")]:{width:(0,u.h)(112),height:(0,u.h)(112)},img:{maxWidth:(0,u.h)(64),[e.fn.largerThan("sm")]:{maxWidth:(0,u.h)(73)}}})},d.createElement("img",{alt:"health-tool-icon",src:o||(null===(n=null===(t=T.filter(e=>e.template===s))||void 0===t?void 0:t[0])||void 0===n?void 0:n.icon)||x.a[s]||"",loading:"lazy"})))},HandlerBanner=()=>{var e,t,n;let{t:a}=(0,A.u)(),{state:i,Outside:r}=(0,d.useContext)(eo);return(null==i?void 0:i.action)===c.ShowTool?d.createElement(r,null,TOOL_BANNERS_PROPS(a)[null===(e=null==i?void 0:i.props)||void 0===e?void 0:e.value]?d.createElement(ToolBanner,Object.assign({},TOOL_BANNERS_PROPS(a)[null===(t=null==i?void 0:i.props)||void 0===t?void 0:t.value],{value:null===(n=null==i?void 0:i.props)||void 0===n?void 0:n.value})):null):(null==i?void 0:i.action)===c.ShowOptionBanner?d.createElement(r,null,d.createElement(BannerWithOptions,Object.assign({},null==i?void 0:i.props))):null},SideBannerModal=e=>{var{isMobile:t,children:n,desktopBanner:a=_.C.getAssetPath("friso/onboarding-banner.jpg"),mobileBanner:i=_.C.getAssetPath("friso/onboarding-banner-mobile.jpg"),modalRatio:r={width:937,height:536},mobileBannerRatio:o={width:750,height:480},desktopBannerRatio:l={width:420,height:536},closeProps:s}=e,c=(0,w._)(e,["isMobile","children","desktopBanner","mobileBanner","modalRatio","mobileBannerRatio","desktopBannerRatio","closeProps"]);let{width:p,height:g}=(0,H.n)(),m=p*o.height/o.width,[b,v]=(0,d.useState)(!1);return d.createElement(X.M,Object.assign({styles:e=>({header:{display:"none"},content:{flex:"auto",background:"transparent",[e.fn.smallerThan("sm")]:{maxHeight:"100%",height:"100%",position:"relative",borderRadius:0},[e.fn.largerThan("sm")]:{maxWidth:(0,u.h)(r.width),width:"100%",height:"100%",maxHeight:(0,u.h)(r.height),boxShadow:"none"}},body:{padding:0,width:"100%",height:"100%",[e.fn.largerThan("sm")]:{display:"flex",alignItems:"center"}},inner:{padding:0,[e.fn.smallerThan("sm")]:{display:"flex",alignItems:"flex-end"}}})},c),t?d.createElement(h.x,{sx:{position:"relative",width:"100%",height:"100%"},onTouchStart:()=>v(!0)},d.createElement(h.x,{className:"mobile-template",sx:{position:"absolute",height:`${(b?1:((g<=667?190:265)+m+74)/g)*100}%`,left:0,bottom:0,right:0,transition:"height 0.4s ease"}},d.createElement(h.x,{className:"mobile-template-wrapper",sx:{height:"100%",backgroundColor:"white",borderTopLeftRadius:b?0:(0,u.h)(12),borderTopRightRadius:b?0:(0,u.h)(12)}},d.createElement(h.x,{sx:{height:"100%",background:`url(${i})`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"top center",overflowY:"auto",borderRadius:"inherit"}},(0,Z.i)(i)&&d.createElement("video",{loop:!0,muted:!0,autoPlay:!0,style:{width:"100%",position:"absolute",top:0,left:0}},d.createElement("source",{src:i})),d.createElement(j.B,Object.assign({variant:"white",leftIcon:d.createElement(Y.Z,null),sx:{position:"absolute",right:0,top:0,zIndex:1,padding:(0,u.h)(10)}},s,{onClick:()=>null==c?void 0:c.onClose()})),d.createElement(E.o,{ratio:(null==o?void 0:o.width)/(null==o?void 0:o.height),w:"100%"}),d.createElement(h.x,{className:"inner",sx:{padding:`${(0,u.h)(28)} ${(0,u.h)(16)} ${(0,u.h)(16)}`,background:"white",position:"relative"}},n))))):d.createElement(E.o,{className:"desktop-template",ratio:r.width/r.height,w:"100%",sx:{position:"relative","& > div":{justifyContent:"flex-end"}}},d.createElement(h.x,{sx:{width:"100%",height:"100%",justifyContent:"flex-end",alignItems:"stretch",borderRadius:(0,u.h)(8),background:"white",boxShadow:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"}},(0,Z.i)(a)?d.createElement("video",{loop:!0,muted:!0,autoPlay:!0,style:{borderTopLeftRadius:(0,u.h)(8),borderBottomLeftRadius:(0,u.h)(8),height:"100%",display:"block"}},d.createElement("source",{src:a})):d.createElement("img",{alt:"",src:a,loading:"lazy",style:{borderTopLeftRadius:(0,u.h)(8),borderBottomLeftRadius:(0,u.h)(8),height:"100%",display:"block"}}),d.createElement(h.x,{sx:{position:"relative",height:"100%",width:`${(r.width-l.width)/r.width*100}%`}},d.createElement(j.B,Object.assign({variant:"white",leftIcon:d.createElement(Y.Z,null)},s,{onClick:()=>null==c?void 0:c.onClose(),sx:{position:"absolute",right:0,top:0,backgroundColor:"transparent"}})),d.createElement(h.x,{className:"side-banner-modal-container",sx:{height:"100%",padding:`${(0,u.h)(40)} ${(0,u.h)(24)} 0`}},n)))))},ec={UPDATE_SUBSCRIPTION:"user/subscription"},ed=(0,d.createContext)({}),_NormalTopic=e=>{var{value:t,name:n}=e,a=(0,w._)(e,["value","name"]);return d.createElement(P.g,Object.assign({value:t,withIcon:!0},a,{buttonProps:{styles:()=>({leftIcon:{marginRight:(0,u.h)(6)},root:{paddingLeft:(0,u.h)(10),paddingRight:(0,u.h)(10)}})}}),n)},TopicSection=({topicsGroup:e,onTopicChange:t,isBlock:n=!1,selectedTopics:a=[],inputProps:i,labelProps:r,maxSelect:o=5,hasScroll:l,readonly:s})=>{let{action:{pushNotifications:c}}=(0,d.useContext)(O.T),u=Q()(e.map(e=>e.topics||[])),{t:p}=(0,A.u)(),[g,E]=(0,d.useState)([]);(0,d.useEffect)(()=>{E(a)},[a.length]),(0,d.useEffect)(()=>{null==t||t(g)},[g]);let onValueChange=e=>{if(e.length>5){c({type:"danger",title:p("pnTopicSection.maxSelectError.title",{maxSelect:o}),message:p("pnTopicSection.maxSelectError.desc")});return}s||E(()=>u.filter(t=>e.some(e=>t.catId===e)))};return d.createElement(m.K,{spacing:12},e.map((e,t)=>d.createElement(m.K,{key:String(t),spacing:12},e.label&&d.createElement(D.T,Object.assign({size:"s5",color:"gray.4",weight:"semiBold"},r),e.label),l?d.createElement(v.x,{w:"100%",offsetScrollbars:!0,scrollbarSize:4,p:16,m:-16,styles:{viewport:{margin:-16,padding:16}}},d.createElement(h.x,{w:800},d.createElement(T.A.Group,Object.assign({value:g.map(e=>e.catId),multiple:!0},i,{onChange:onValueChange}),d.createElement(b.k,{gap:8,wrap:"wrap"},e.topics.map(t=>d.createElement(_NormalTopic,Object.assign({key:t.catId,value:t.catId,name:t.localName,isBlock:n},e.tracking))))))):d.createElement(T.A.Group,Object.assign({value:g.map(e=>e.catId),multiple:!0},i,{onChange:onValueChange}),d.createElement(b.k,{gap:8,wrap:"wrap"},e.topics.map(t=>t.catId?d.createElement(_NormalTopic,Object.assign({key:t.catId,value:t.catId,name:t.localName,isBlock:n},e.tracking)):d.isValidElement(t.component)?t.component:null))))))},Layout=e=>{var{heading:t,children:n,stickyActions:a}=e,i=(0,w._)(e,["heading","children","stickyActions"]);let{isMobile:r}=(0,d.useContext)(ed),o=d.createElement(m.K,{spacing:(0,u.h)(24),sx:{height:"100%"}},d.createElement(z.H,{tag:"h4",style:{textAlign:"center"}},t),d.createElement(h.x,null,n));return d.createElement(h.x,{sx:e=>({[e.fn.largerThan("sm")]:{position:"relative",height:"100%"}})},r?o:d.createElement(v.x,Object.assign({className:"layout-body",h:a?"calc(100% - 90px)":"100%"},i),o),a&&d.createElement(b.k,{gap:(0,u.h)(8),sx:e=>({position:"absolute",left:0,right:0,bottom:0,padding:(0,u.h)(16),button:{flexGrow:1},justifyContent:"center",[e.fn.largerThan("sm")]:{padding:`${(0,u.h)(24)} 0`}})},a))},MainForm=()=>{let{t:e,locale:t}=(0,A.u)(),{data:{userInfo:n},action:{pushNotifications:a}}=(0,d.useContext)(O.T),i=null==n?void 0:n.id,{currentUrl:r,isMobile:o,pnSuggestCategory:l=[],nextStep:s,formValues:c,setFormValues:p,onSubmit:g,submitLoading:h,selectCategory:b,setCategoryLibs:E,setSelectCategory:v,maxSelectCategory:T}=(0,d.useContext)(ed),S=l.map(e=>e.catId),C=(0,L.c)({validate:{name:(0,M.U)(e("healthToolPNModal.mainForm.requireName"))},initialValues:Object.assign(Object.assign({},c),{fitnessTopics:S})}),[f,I]=(0,d.useState)([]),[_,y]=(0,d.useState)([]);(0,d.useEffect)(()=>{(0,w.a)(void 0,void 0,void 0,function*(){var e;try{let n=yield(0,O.e)((0,O.h)(el.GET_SUBSCRIPTION_CATEGORIES,{_locale:t}),"get"),a=((null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.subscription)||[]).filter(e=>!S.includes(e.catId));I(l),y(a),E([...l,...a])}catch(e){console.log(e)}})},[]),(0,d.useEffect)(()=>{i&&C.setFieldValue("name",(null==n?void 0:n.name)||"")},[i]);let onMore=()=>{""!==C.getInputProps("name").value?(p(C.getTransformedValues()),s()):C.validateField("name")},x=(0,d.useMemo)(()=>d.createElement(j.B,{variant:"tertiary",dataEventCategory:"Newsletter",dataEventAction:"More Category Click",dataEventLabel:r,leftIcon:d.createElement(K.Z,{size:16,color:"currentColor"}),onClick:onMore,styles:e=>({root:{borderRadius:(0,u.h)(6),padding:"2px 15px",height:(0,u.h)(40)},label:{fontSize:(0,u.h)(14),fontWeight:400,[e.fn.smallerThan("sm")]:{fontSize:(0,u.h)(12),lineHeight:(0,u.h)(16),height:(0,u.h)(40)}},leftIcon:{marginRight:"5px"}})},d.createElement(D.T,{size:o?"p3":"p4"},e("home.seeMore"))),[C]);return(0,d.useEffect)(()=>{C.setFieldValue("fitnessTopics",b.map(e=>e.catId))},[b]),d.createElement("form",{style:{height:"100%"},onSubmit:C.onSubmit(t=>{if(0===b.length)return a({type:"danger",title:e("newsletter.error.minTitle"),message:e("newsletter.error.minCotennt")}),!1;p(t),null==g||g(t.name)})},d.createElement(Layout,{heading:e("healthToolPNModal.heading"),stickyActions:d.createElement(d.Fragment,null,d.createElement(j.B,{fullWidth:!0,type:"submit",dataEventCategory:"Newsletter",dataEventAction:"Register Click",dataEventLabel:r,loading:h,sx:{maxWidth:(0,u.h)(240)}},e("healthToolPNModal.register")))},d.createElement(m.K,{spacing:(0,u.h)(16)},d.createElement(P.I,Object.assign({label:e("newsletter.welcome.description")},C.getInputProps("name"))),d.createElement(TopicSection,{topicsGroup:[...0===l.length&&0===_.length?[{topics:[{component:x}]}]:[],...l.length>0?[{label:e("healthToolPNModal.mainForm.tailorTopicsHeading"),topics:[...l,...0===_.length?[{component:x}]:[]]}]:[],..._.length>0?[{label:e("healthToolPNModal.findMore.chooseFav"),topics:[..._,..._.length>0?[{component:x}]:[]]}]:[]],selectedTopics:[...f],labelProps:{size:o?"p3":"p4",color:"gray.6"},onTopicChange:v,maxSelect:T}))))},eu=(0,d.forwardRef)(function(e,t){var{label:n}=e,a=(0,w._)(e,["label"]);return d.createElement("div",Object.assign({ref:t},a),d.createElement(S.Z,{noWrap:!0},d.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},d.createElement("path",{fillRule:"evenodd",clipRule:"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"})),d.createElement(D.T,{size:"p3"},n)))}),ep=(0,d.forwardRef)(function(e,t){var{label:n}=e,a=(0,w._)(e,["label"]);return d.createElement("div",Object.assign({ref:t},a),d.createElement(D.T,{size:"p3"},n))}),HistorySection=({history:e,onDelete:t})=>d.createElement(b.k,{wrap:"wrap",gap:8},et()(e,"catId").map(e=>d.createElement(C.C,{key:e.catId,rightSection:d.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",onClick:()=>null==t?void 0:t(e)},d.createElement("path",{fillRule:"evenodd",clipRule:"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 ${U.t.neutral[4]}`,borderRadius:32,textTransform:"unset"},rightSection:{height:18,cursor:"pointer"}}},d.createElement(D.T,{size:"p4"},e.localName)))),RecentlyViewedSection=({topics:e,onTopicChange:t,isBlock:n=!1,selectedTopics:a,labelProps:i,maxSelect:r=5})=>{let{action:{pushNotifications:o}}=(0,d.useContext)(O.T),[l,s]=(0,d.useState)([]),{t:c}=(0,A.u)();return((0,d.useEffect)(()=>{s(a)},[a.length]),(0,d.useEffect)(()=>{t(l)},[l]),e&&0!==e.length)?d.createElement(m.K,{spacing:12,px:16,mx:-16},d.createElement(D.T,Object.assign({size:"s5",color:"gray.4",weight:"semiBold"},i),c("pnTopicSection.recentView")),d.createElement(T.A.Group,{value:l.map(e=>e.catId),onChange:t=>{if(n&&l.lengthe.filter(e=>t.some(t=>e.catId===t)))},multiple:!0},d.createElement(b.k,{gap:8,wrap:"wrap"},e.map((e,t)=>d.createElement(_NormalTopic,{key:t,value:e.catId,name:e.localName,isBlock:n}))))):null},_TopicSlide=e=>{var{topic:t,active:n,onClick:a}=e,i=(0,w._)(e,["topic","active","onClick"]);return d.createElement(h.x,Object.assign({sx:e=>({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)",minHeight:(0,u.h)(130),[e.fn.largerThan("sm")]:{minHeight:(0,u.h)(138)}}),onClick:()=>a(t,n)},i),n&&d.createElement(h.x,{id:"test",sx:{position:"absolute",top:2,right:2,width:20,height:20,zIndex:1}},d.createElement("svg",{id:"test",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},d.createElement("path",{fillRule:"evenodd",clipRule:"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"}),d.createElement("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"}))),d.createElement(h.x,{sx:{borderRadius:"8px"}},d.createElement(P.c,{ratio:1.5,mb:10,sx:e=>({background:e.colors.neutral[0]})},d.createElement(h.x,null,d.createElement("img",{src:t.guid||"",alt:"cat",loading:"lazy",style:{maxHeight:"63px"}})))),d.createElement(D.T,{size:"p4",ta:"center",px:6,sx:{display:"-webkit-box","-webkit-line-clamp":"2","-webkit-box-orient":"vertical",overflow:"hidden"}},t.localName||""))},TrendingCarousel=({topics:e,selectedTopics:t=[],onTopicChange:n,isBlock:a=!1,labelProps:i,pushNotifications:r,maxSelect:o=5})=>{let{t:l}=(0,A.u)(),[s,c]=(0,d.useState)([]),onSelect=(e,t)=>{if(t)c(t=>t.filter(t=>t.catId!==e.catId));else{if(a){r({type:"danger",title:l("pnTopicSection.maxSelectError.title",{maxSelect:o}),message:l("pnTopicSection.maxSelectError.desc")});return}c(t=>[...t,e])}};(0,d.useEffect)(()=>{c(t)},[t.length]),(0,d.useEffect)(()=>{n(s)},[s]);let[u,p]=(0,d.useState)(!1),[g,E]=(0,d.useState)(0),[T,S]=(0,d.useState)(0),C=(0,d.useRef)(null),handleMouseUp=()=>{p(!1)};return d.createElement(m.K,{spacing:10},d.createElement(b.k,{justify:"space-between",align:"center",w:"100%"},d.createElement(D.T,Object.assign({size:"s5",color:"gray.4",weight:"semiBold",span:!0},i),l("pnTopicSection.trending"))),d.createElement(h.x,null,d.createElement(v.x,{type:"always",w:"100%",offsetScrollbars:!0,scrollbarSize:4,px:4,viewportRef:C,viewportProps:{onMouseDown:e=>{e.preventDefault(),C.current&&(p(!0),E(e.pageX-C.current.offsetLeft),S(C.current.scrollLeft))},onMouseUp:handleMouseUp,onMouseLeave:handleMouseUp,onMouseMove:e=>{if(e.preventDefault(),!u||!C.current)return;let t=e.pageX-C.current.offsetLeft;C.current.scrollLeft=T-(t-g)*2}},styles:{viewport:{paddingBottom:16}}},d.createElement(h.x,{w:{base:112*e.length+8*(e.length-1)+10}},d.createElement(b.k,{gap:8},e.map((e,t)=>d.createElement(_TopicSlide,{key:t,topic:e,onClick:onSelect,active:s.some(t=>t.catId===e.catId),w:{base:112}})))))))},PremiumTopicSelect=e=>{var{isLoggedIn:t,maxSelect:n=5,values:a=[],labelProps:i,onChange:r}=e,o=(0,w._)(e,["isLoggedIn","maxSelect","values","labelProps","onChange"]);let{action:{pushNotifications:l}}=(0,d.useContext)(O.T),[s,c]=(0,d.useState)(""),{t:p,locale:g}=(0,A.u)(),b=(0,d.useRef)(null),[E,v]=(0,d.useState)([]),[T,S]=(0,d.useState)([]),[C,I]=(0,d.useState)([]),[_,y]=(0,d.useState)([]),[x,B]=(0,d.useState)(null),[k,R]=(0,d.useState)([]);(0,d.useEffect)(()=>{(0,w.a)(void 0,void 0,void 0,function*(){var e,t;let n=yield(0,O.e)((0,O.h)(el.GET_NEWSLETTER_CATEGORIES,{_locale:g}),"get"),i=(null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.interested)||[],r=(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.trending)||[],o=et()([...i,...r],"catId"),l=o.map(e=>Object.assign(Object.assign({},e),{value:e.catId||"",label:e.localName||""}));if(R(l||[]),B((null==n?void 0:n.data)||null),a.length>0){let e=i.filter(e=>a.includes(e.catId)).map(e=>Object.assign(Object.assign({},e),{template:"interested"})),t=r.filter(e=>a.includes(e.catId)).map(e=>Object.assign(Object.assign({},e),{template:"trending"}));y(e),S(t)}})},[t]);let N=(0,d.useMemo)(()=>et()([...E,...T,..._,...C],"catId"),[E,T,_,C]),[L,M]=(0,d.useState)(!1);(0,d.useEffect)(()=>{N.length>=n?M(!0):M(!1),null==r||r(N)},[N]);let onValueChange=e=>(0,w.a)(void 0,void 0,void 0,function*(){var t;let a="default";if(L)l({type:"danger",title:p("pnTopicSection.maxSelectError.title",{maxSelect:n}),message:p("pnTopicSection.maxSelectError.desc")});else{let n=[{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}],i=n.find(t=>{var n;return null===(n=t.array)||void 0===n?void 0:n.some(t=>t.catId===e[0])});({trending:S,recently:I,interested:y,default:v})[a=(null==i?void 0:i.key)||"default"](t=>[...t,...k.filter(t=>e.some(e=>t.catId===e))].map(e=>Object.assign(Object.assign({},e),{template:a}))),null===(t=b.current)||void 0===t||t.blur()}return null});return d.createElement(m.K,Object.assign({spacing:(0,u.h)(16)},o),d.createElement(m.K,{spacing:(0,u.h)(8)},d.createElement(D.T,{size:"p3"},p("pnTopicSection.maxSelectError.detail",{max:n,maxTopic:N.length})),d.createElement(f.NU,{ref:b,maxSelectedValues:3,styles:{wrapper:{overflow:"initial !important"},separator:{padding:16},separatorLabel:{fontWeight:600,fontSize:12,lineHeight:"18px",textTransform:"uppercase",color:U.t.gray[4],"&::after":{display:"none"}},searchInput:{fontSize:"inherit"},input:{paddingRight:16}},nothingFound:d.createElement(D.T,{size:"s4",color:"gray.6"},p("pnTopicSection.notFound")),itemComponent:""===s?eu:ep,size:"lg",placeholder:p("pnTopicSection.plsEnterFavTopics"),data:k,onSearchChange:c,searchValue:s,icon:d.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},d.createElement("path",{fillRule:"evenodd",clipRule:"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:d.createElement(d.Fragment,null),zIndex:500,searchable:!0,withinPortal:!0,onChange:e=>onValueChange(e),value:[]}),N&&N.length>0&&d.createElement(HistorySection,{history:N,onDelete:e=>{let t={trending:S,recently:I,interested:y,default:v},n=t[e.template]||t.default;n(t=>{let n=[...t],a=n.findIndex(t=>t.catId===e.catId);return n.splice(a,1),n})}})),d.createElement(h.x,{sx:e=>({position:"relative",height:(0,u.h)(175),[e.fn.largerThan("sm")]:{height:(0,u.h)(190)}})},d.createElement(h.x,{sx:{position:"absolute",top:0,right:0,left:0}},d.createElement(TrendingCarousel,{topics:((null==x?void 0:x.trending)||[]).map(e=>Object.assign(Object.assign({},e),{template:"trending"})),selectedTopics:T,onTopicChange:S,isBlock:L,labelProps:i}))),d.createElement(RecentlyViewedSection,{topics:((null==x?void 0:x.recently)||[]).map(e=>Object.assign(Object.assign({},e),{template:"recently"})),selectedTopics:C,onTopicChange:I,isBlock:L,labelProps:i}),d.createElement(TopicSection,{labelProps:i,topicsGroup:[{label:p("pnTopicSection.ppAlsoInterested"),topics:((null==x?void 0:x.interested)||[]).map(e=>Object.assign(Object.assign({},e),{template:"interested"}))}],selectedTopics:_,onTopicChange:y,isBlock:L}))},MoreTopics=()=>{let{t:e}=(0,A.u)(),{action:{pushNotifications:t}}=(0,d.useContext)(O.T),{prevStep:n,formValues:a,submitLoading:i,onSubmit:r,selectCategory:o,maxSelectCategory:l,setSelectCategory:s,currentUrl:c,isLoggedIn:p}=(0,d.useContext)(ed);return d.createElement(Layout,{heading:e("newsletter.topic.title"),type:"always",styles:{root:{paddingRight:(0,u.h)(25)}},stickyActions:d.createElement(d.Fragment,null,d.createElement(j.B,{fullWidth:!0,variant:"secondary",dataEventCategory:"Newsletter",dataEventAction:"Back Click",dataEventLabel:c,onClick:n},e("healthToolPNModal.back")),d.createElement(j.B,{fullWidth:!0,type:"submit",dataEventCategory:"Newsletter",dataEventAction:"Next Click",dataEventLabel:c,onClick:()=>{if(0===o.length)return t({type:"danger",title:e("newsletter.error.minTitle"),message:e("newsletter.error.minCotennt")}),!1;null==r||r(a.name)},loading:i},e("healthToolPNModal.next")))},d.createElement(PremiumTopicSelect,{isLoggedIn:p,maxSelect:l,values:a.fitnessTopics,onChange:s,labelProps:{size:"s5",sx:{textTransform:"uppercase"}}}))},Result=()=>{let{t:e}=(0,A.u)(),{close:t,selectCategory:n,onRegisterSuccess:a,currentUrl:i,finishLabelOnResult:r,disclaimerText:o}=(0,d.useContext)(ed);return(0,d.useEffect)(()=>()=>{setTimeout(()=>{null==a||a()},400)},[]),d.createElement(Layout,{heading:e("healthToolPNModal.heading"),stickyActions:d.createElement(j.B,{fullWidth:!0,sx:{maxWidth:(0,u.h)(300)},dataEventCategory:"Newsletter",dataEventAction:"Continue Reading Click",dataEventLabel:i,onClick:()=>{t()}},r||e("healthToolPNModal.finish"))},d.createElement(m.K,null,d.createElement(b.k,{gap:(0,u.h)(8),sx:e=>({background:e.colors.green[0],border:`1px solid ${e.colors.green[1]}`,borderRadius:(0,u.h)(8),padding:(0,u.h)(8)})},d.createElement(h.x,null,d.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},d.createElement("path",{d:"M9.99984 18.3334C14.6022 18.3334 18.3332 14.6025 18.3332 10.0001C18.3332 5.39771 14.6022 1.66675 9.99984 1.66675C5.39746 1.66675 1.6665 5.39771 1.6665 10.0001C1.6665 14.6025 5.39746 18.3334 9.99984 18.3334Z",fill:"#00B16A"}),d.createElement("path",{d:"M9.58558 12.6674C9.22944 12.668 8.87668 12.5983 8.54752 12.4623C8.21835 12.3264 7.91925 12.1268 7.66732 11.8751L6.68587 10.8931C6.55607 10.7587 6.48424 10.5787 6.48587 10.3919C6.48749 10.2051 6.56243 10.0263 6.69455 9.89422C6.82667 9.7621 7.00539 9.68716 7.19222 9.68554C7.37906 9.68391 7.55906 9.75574 7.69345 9.88554L8.67491 10.8675C8.79344 10.986 8.93415 11.08 9.08902 11.1442C9.24389 11.2083 9.40987 11.2413 9.5775 11.2413C9.74513 11.2413 9.91111 11.2083 10.066 11.1442C10.2208 11.08 10.3616 10.986 10.4801 10.8675L16.7033 5.24335C16.8443 5.12184 17.0272 5.06032 17.213 5.07195C17.3987 5.08358 17.5726 5.16744 17.6973 5.30558C17.8221 5.44373 17.8878 5.6252 17.8805 5.81118C17.8731 5.99717 17.7933 6.17291 17.6581 6.30081L11.4592 11.8998C11.2128 12.1448 10.9205 12.3387 10.5989 12.4705C10.2774 12.6022 9.93304 12.6692 9.58558 12.6674Z",fill:"white"}))),d.createElement(D.T,{size:"p3"},o||e("pnModal.disclaimer"))),d.createElement(z.H,{tag:"h5"},e("healthToolPNModal.yourPre")),n.length>0&&d.createElement(TopicSection,{topicsGroup:[{label:"",topics:n}],selectedTopics:n,readonly:!0})))},PremiumNewsletterModal=({isMobile:e,isLoggedIn:t,pnSuggestCategory:n=[],acquisitionInfo:a,currentUrl:i,opened:r,close:o,finishLabelOnResult:l,onRegisterSuccess:s,disclaimerText:c})=>{let{t:u,locale:p}=(0,A.u)(),{action:{pushNotifications:g}}=(0,d.useContext)(O.T),h=_.C.getAssetPath("premiumNewsletter/side-banner-desktop.jpg"),m=_.C.getAssetPath("premiumNewsletter/side-banner-mobile.jpg"),[b,E]=(0,d.useState)([]),[v,T]=(0,d.useState)([]),[S,C]=(0,d.useState)(0),[f,x]=(0,d.useState)({name:"",fitnessTopics:[]}),[B,k]=(0,d.useState)(!1),lastStep=()=>C(2),R=(0,d.useCallback)(e=>(0,w.a)(void 0,void 0,void 0,function*(){try{k(!0),yield(0,O.e)((0,O.h)(el.POST_SUBSCRIPTION,{website_url:(0,O.i)(p)}),"post",{headers:{"Content-Type":"application/json"},method:"POST",data:{ga_client_id:q.Z.get(y.G),client_ip:window.clientIP||"",user_info:Object.assign(Object.assign({},a.userInfo),{name:e||f.name,type_subscription:1}),domain:V.v[p||en.L.Vietnam],category:v,perferred:a.preferredTopics.map(({id:e})=>({id:e}))}}),k(!1),yield(0,O.e)((0,O.j)(ec.UPDATE_SUBSCRIPTION),"post",{headers:{"Content-Type":"application/json"},method:"PUT",data:{subscription:1}}),lastStep()}catch(e){console.log({err:e}),k(!1),g({title:u("notification.comment.somethingWrong"),message:"",type:"danger"})}}),[f,v]);return(0,d.useEffect)(()=>{[h,m].forEach(e=>{let t=new Image;t.src=e})},[]),d.createElement(ed.Provider,{value:{currentUrl:i,isMobile:e,isLoggedIn:t,opened:r,close:o,pnSuggestCategory:n,nextStep:()=>C(e=>e<3?e+1:e),prevStep:()=>C(e=>e>0?e-1:e),lastStep,categoryLibs:b,setCategoryLibs:E,selectCategory:v,setSelectCategory:T,formValues:f,setFormValues:x,maxSelectCategory:5,submitLoading:B,onSubmit:R,onRegisterSuccess:s,finishLabelOnResult:l,disclaimerText:c}},d.createElement(SideBannerModal,{isMobile:e,desktopBanner:_.C.getAssetPath("premiumNewsletter/side-banner-desktop.jpg"),mobileBanner:_.C.getAssetPath("premiumNewsletter/side-banner-mobile.jpg"),modalRatio:{width:960,height:588},desktopBannerRatio:{width:384,height:588},opened:r,onClose:o,zIndex:305,closeProps:{dataEventCategory:"Newsletter",dataEventAction:"Close Click",dataEventLabel:i}},d.createElement(I.v,{active:S,onStepClick:C,styles:{root:{height:"100%"},content:{padding:0,height:"100%",width:"100%"},steps:{display:"none"}}},d.createElement(I.v.Step,null,d.createElement(MainForm,null)),d.createElement(I.v.Step,null,d.createElement(MoreTopics,null)),d.createElement(I.v.Step,null,d.createElement(Result,null)))))},SurveyBanner=()=>{let{locale:e}=(0,A.u)(),{isMobile:t,isLoggedIn:n,currentUrl:a,acquisitionInfo:i,categoryIds:r,state:o,setState:l,settings:s,submitHandler:u,subcribeHealthStatus:p,showPNModal:g,setShowPNModal:h,setIsBack:m}=(0,d.useContext)(eo),[b,E]=(0,d.useState)([]),[v,T]=(0,d.useState)(g);(0,d.useEffect)(()=>{(0,w.a)(void 0,void 0,void 0,function*(){var t,n;let a=yield(0,O.e)((0,O.h)(el.GET_NEWSLETTER_CATEGORIES,{_locale:e}),"get"),i=(null===(t=null==a?void 0:a.data)||void 0===t?void 0:t.interested)||[],o=(null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.trending)||[],l=[...i,...o];E(l.filter(e=>r.includes(Number(e.catId))))})},[]);let S=(0,d.useRef)([]);return(0,d.useEffect)(()=>{let e=(null==p?void 0:p.value)||"",t=e.split("|").filter(Boolean),n=e;S.current.push(p),t.length>1&&(null!==S.current[0]&&m(!0),Object.keys(u).map(e=>{let a=e.split("|");if(t.length===a.length){let i=0;t.map(e=>{a.includes(String(e))&&(i+=1)}),i===t.length&&(n=e)}}));let a=t.length>0?u[n]:s;l(a)},[p]),(0,d.useEffect)(()=>{T(g)},[g]),(null==o?void 0:o.action)!==c.Hide?d.createElement(d.Fragment,null,d.createElement(HandlerBanner,Object.assign({},s.props)),d.createElement(PremiumNewsletterModal,{acquisitionInfo:i,isMobile:t,isLoggedIn:n,currentUrl:a,pnSuggestCategory:b,opened:v,close:()=>{var e;T(!1),h(!1),setTimeout(()=>{var e;(null===(e=o.actionParams)||void 0===e?void 0:e.hideBannerWhenClose)&&l({action:c.Hide})},400),(null===(e=o.actionParams)||void 0===e?void 0:e.hideBannerWhenClose)&&l({action:c.Hide})},onRegisterSuccess:()=>T(!1)})):null},SurveyOrPremiumBanner=({type:e,articleId:t=0,categoryIds:n=[],isMarketing:a,isSurveyType:i,hasPremiumBanner:r,currentUrl:o,isMobile:l,subcribeHealthStatus:s,setShouldAcquisitionModalOpen:u,onValueChange:p,source:g="discover",Wrapper:m})=>{let{t:b}=(0,A.u)(),{data:{userInfo:E}}=(0,d.useContext)(O.T),v=!!(null==E?void 0:E.id),[T,S]=(0,d.useState)(null),[C,f]=(0,d.useState)(),[I,_]=(0,d.useState)(""),[y,x]=(0,d.useState)(!1),[B,w]=(0,d.useState)(!1),k=(0,d.useMemo)(()=>ei[e],[]),R=FLOW(b,o)[k],N=null==R?void 0:R.submitHandler,getMappingMultiValue=e=>{let t="",n=e.split("|");return 1===n.length?e:(Object.keys(N).map(e=>{let a=e.split("|");if(n.length===a.length){let i=0;n.map(e=>{a.includes(String(e))&&(i+=1)}),i===n.length&&(t=e)}}),t)},L=m||h.x,handleShowPNBannerFlowWhenLogin=()=>r&&(null==E?void 0:E.subscription)!==1?d.createElement(PnBannerEle,null):null;return(0,d.useEffect)(()=>{v&&S({userInfo:E,preferredTopics:ea,healthTopics:[]})},[v]),d.createElement(eo.Provider,{value:{settings:R,submitHandler:N,type:e,surveyType:k,value:I,setValue:_,isMobile:l,isLoggedIn:v,isMarketing:a,hasPremiumBanner:r,currentUrl:o,acquisitionInfo:T,categoryIds:n,subcribeHealthStatus:s,articleId:t,onValueChange:p,state:C,setState:f,handleClickOption:e=>{let t=getMappingMultiValue(e);if(t){let n=N[t];n.action===c.ShowPremiumModal?r?(x(!0),f(Object.assign(Object.assign({},C),{actionParams:{hideBannerWhenClose:n.action===c.ShowPremiumModal}}))):(f({action:c.Hide}),null==p||p(e)):(f(n),null==p||p(e))}},showPNModal:y,setShowPNModal:x,source:g,Outside:L,isBack:B,setIsBack:w,minHeight:180,setShouldAcquisitionModalOpen:u}},void 0!==s?v?i&&R?(()=>{let e=N[(null==s?void 0:s.value)||""];return(null==e?void 0:e.action)===c.ShowPremiumModal?handleShowPNBannerFlowWhenLogin():d.createElement(SurveyBanner,null)})():handleShowPNBannerFlowWhenLogin():r?d.createElement(PnBannerEle,null):null:null)}},"4cu0":function(e,t,n){n.d(t,{B:function(){return g}});var a=n("SwpR"),i=n("q1tI"),r=n("/npG"),o=n("HC7W"),l=n("8vDj"),s=n("mAfZ"),c=n("uvtd"),d=n("pfEW"),u=(0,r.k)((e,t)=>{var n,a,i,r,l,s;let{other:u}=e,{template:p}=u,{size:g,variant:h,skipHover:m,withColorHover:b,isError:E,isSuccess:v,color:T,gradient:S,children:C,theme:f,customStylesType:I}=t,_="mb"===p||"marryBaby"===f,O=T||(f&&_?"mb":e.primaryColor),y=O.startsWith("#"),x=y?e.fn.lighten(T,.9):(null===(a=null===(n=e.colors)||void 0===n?void 0:n[O])||void 0===a?void 0:a[0])||"",B=y?O:null===(r=null===(i=e.colors)||void 0===i?void 0:i[O])||void 0===r?void 0:r[e.fn.primaryShade()],w=y?e.fn.darken(T,.05):null===(s=null===(l=e.colors)||void 0===l?void 0:l[O])||void 0===s?void 0:s[e.fn.primaryShade()+1],k=I===d.C.LEADGEN;return{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({transition:`all ${c.A} ease-in-out`},S&&Object.assign({border:0,position:"relative"},"secondary"===h&&{"&:before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"#fff",borderRadius:"inherit"}})),{"&:focus":{outline:"none"}}),k&&{borderRadius:12}),!C&&{paddingLeft:"10px",paddingRight:"10px",".mantine-Button-icon":{margin:0}}),(()=>{switch(g){case"xl":return Object.assign({height:56,fontWeight:k?d.F.halfBold:d.F.semiBold,fontSize:k?"15px":_?"14px":"16px",lineHeight:"24px"},k&&{letterSpacing:"-0.3px"});case"lg":return Object.assign({height:48,fontWeight:k?d.F.halfBold:d.F.semiBold,fontSize:k?"15px":_?"14px":"16px",lineHeight:"24px"},k&&{letterSpacing:"-0.3px"});case"md":return Object.assign({height:40,fontWeight:k?d.F.halfBold:d.F.semiBold,fontSize:k?"13px":"14px",lineHeight:k?"20px":"22px"},k&&{letterSpacing:"-0.3px"});case"sm":return Object.assign(Object.assign({height:32,fontWeight:k?d.F.halfBold:d.F.semiBold,fontSize:k?"11px":_?"12px":"14px",lineHeight:k?"16px":"22px"},k&&{letterSpacing:"-0.2px"}),{paddingLeft:"16px",paddingRight:"16px"});case"xs":return Object.assign({height:24,fontWeight:k?d.F.halfBold:d.F.semiBold,fontSize:k?"11px":"12px",lineHeight:k?"16px":"18px",paddingLeft:"8px",paddingRight:"8px"},k&&{letterSpacing:"-0.2px"})}})()),(()=>{switch(h){case"primary":return Object.assign(Object.assign({color:e.white},S?{backgroundImage:S,backgroundColor:"initial"}:{backgroundColor:B}),!m&&{"&:hover":{backgroundColor:S?"initial":w}});case"secondary":return Object.assign(Object.assign(Object.assign({color:B,backgroundColor:"transparent",border:`1px solid ${B}`},S&&{backgroundImage:S,borderColor:"transparent"}),!m&&!S&&{"&:hover":{backgroundColor:x,border:`1px solid ${B}`}}),b&&!S&&{"&:hover":{backgroundColor:B,border:`1px solid ${B}`,color:"#fff"}});case"white":return{color:B,backgroundColor:"transparent",border:"1px solid transparent","&:hover":{backgroundColor:"transparent",borderColor:"transparent"}};case"tertiary":return{color:e.colors.gray[8],backgroundColor:e.white,border:`1px solid ${e.colors.neutral[2]}`,"&:hover":Object.assign({},m?{backgroundColor:e.white,border:`1px solid ${e.colors.neutral[2]}`}:{backgroundColor:e.colors.neutral[0],border:`1px solid ${e.colors.neutral[0]}`})};case"light":return{color:B,backgroundColor:x,border:"1px solid transparent","&:hover":Object.assign({},m?{backgroundColor:x,border:"1px solid transparent"}:{backgroundColor:e.white,border:`1px solid ${x}`})};case"ghost":return Object.assign({color:B,backgroundColor:"transparent",border:"1px solid transparent"},!m&&{"&:hover":{backgroundColor:x,border:"1px solid transparent"}})}})()),{"&[data-disabled]":{backgroundColor:e.colors.gray[1],color:e.colors.gray[4]}}),E?Object.assign({color:e.colors.red[6],backgroundColor:e.white,border:`1px solid ${e.colors.red[6]}`},!m&&{"&:hover":{backgroundColor:e.colors.red[0],border:`1px solid ${e.colors.red[6]}`}}):{}),v?Object.assign({color:e.colors.green[8],backgroundColor:e.colors.green[0]},!m&&{"&:hover":{backgroundColor:e.colors.green[0]}}):{}),inner:Object.assign({ref:(0,o.A)("inner")},S&&{position:"relative"}),leftIcon:{marginRight:8},rightIcon:{},label:Object.assign({},S&&"secondary"===h&&{background:S,"-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"})}});let p={primary:"filled",secondary:"outline",tertiary:"default",light:"light",ghost:"subtle",error:"outline",white:"white",success:"subtle"},g=(0,i.forwardRef)((e,t)=>{var n,r;let o=(0,l.rZ)(),c=Object.assign(Object.assign({},null===(r=null===(n=o.components)||void 0===n?void 0:n.Button)||void 0===r?void 0:r.defaultProps),function(e){let t={};return Object.keys(e).filter(t=>void 0!==e[t]).forEach(n=>t[n]=e[n]),t}(e)),{variant:g,size:h,color:m,gradient:b,skipHover:E,withColorHover:v,className:T,dataEventCategory:S,dataEventAction:C,dataEventLabel:f,children:I,theme:_,component:O,styles:y,classNames:x}=c,B=(0,a._)(c,["variant","size","color","gradient","skipHover","withColorHover","className","dataEventCategory","dataEventAction","dataEventLabel","children","theme","component","styles","classNames"]),w="error"===g,k=(0,d.u)(),{classes:R,cx:N}=u({variant:g,size:h,color:m,gradient:b,skipHover:E,withColorHover:v,isError:w,isSuccess:"success"===g,children:I,theme:_,customStylesType:k},{name:"ButtonMantine",styles:y,classNames:x});return i.createElement(s.z,Object.assign({component:O,className:N(T,g),classNames:{root:R.root,inner:R.inner,leftIcon:R.leftIcon,rightIcon:R.rightIcon,label:R.label},variant:p[g],"data-variant":g,"data-event-category":S,"data-event-action":C,"data-event-label":f,ref:t,loaderProps:B.disabled?{color:"currentColor"}:void 0},B),I)})},x0JV:function(e,t,n){n.d(t,{B:function(){return b},C:function(){return N},E:function(){return k},F:function(){return w},G:function(){return m},N:function(){return f},S:function(){return y},V:function(){return O},a:function(){return E},c:function(){return S},d:function(){return C},e:function(){return B},f:function(){return I},g:function(){return _},h:function(){return R},i:function(){return A}});var a,i,r,o,l,s,c,d,u,p,g,h,m,b,E,v,T,S,C,f,I,_,O,y,x=n("XgXa");(a=m||(m={})).Boy="boy",a.Girl="girl",(i=b||(b={}))[i.Height=0]="Height",i[i.Weight=1]="Weight",i[i.Head=2]="Head",i[i.BMI=3]="BMI",(r=E||(E={}))[r.Weekly=0]="Weekly",r[r.Monthly=1]="Monthly",r[r.Yearly=2]="Yearly",(o=v||(v={}))[o.Height=0]="Height",o[o.Weight=1]="Weight",o[o.Head=2]="Head",o[o.BMI=3]="BMI",o[o.Record=4]="Record",(l=T||(T={}))[l.Phone=0]="Phone",l[l.OTP=1]="OTP",l[l.OTPEmail=2]="OTPEmail",l[l.PersonalInfo=3]="PersonalInfo",l[l.UpdatePassword=4]="UpdatePassword",l[l.Result=5]="Result",l[l.DynamicForm=6]="DynamicForm",(s=S||(S={}))[s.HEAD=0]="HEAD",s[s.TAIL=1]="TAIL",s[s.MIDDLE=2]="MIDDLE",s[s.CONNECT=3]="CONNECT",s[s.SSO=4]="SSO",s[s.MULTIPLE=5]="MULTIPLE",(c=C||(C={}))[c.UNDEFINED=-1]="UNDEFINED",c[c.TEXT=0]="TEXT",c[c.IMAGE=1]="IMAGE",c[c.FORM=2]="FORM",c[c.CONDITION=3]="CONDITION",c[c.POLL=4]="POLL",c[c.FINAL_STANDARD=5]="FINAL_STANDARD",c[c.FINAL=6]="FINAL",c[c.FINAL_THANK_YOU=7]="FINAL_THANK_YOU",c[c.RATING=8]="RATING",c[c.REACTION=9]="REACTION",c[c.REVIEW=10]="REVIEW",c[c.RESULT_POLL=11]="RESULT_POLL",c[c.RESULT_RATING=12]="RESULT_RATING",c[c.RESULT_REACTION=13]="RESULT_REACTION",c[c.OTP=14]="OTP";let B=[C.FINAL,C.FINAL_STANDARD,C.FINAL_THANK_YOU];(d=f||(f={})).BOT_TEXT="bot-text",d.BOT_IMAGE="bot-image",d.BOT_BACKGROUND_IMAGE="bot-background-image",d.BOT_BUTTON="bot-button",d.BOT_URL="bot-url",d.BOT_RECALCULATE="bot-recalculate",d.BOT_BOOKING="bot-booking",d.BOT_MAIN_TITLE="bot-main-title",d.BOT_MAIN_IMAGE="bot-main-image",d.BOT_MAIN_BODY="bot-main-body",d.BOT_MAIN_BUTTON="bot-main-button",d.BOT_SUB_TITLE="bot-sub-title",d.BOT_SUB_BODY="bot-sub-body",d.BOT_LANDING_PAGE_URL="bot-landing-page-url",d.BOT_LANDING_PAGE_BUTTON="bot-landing-page-button",d.BOT_RISK_SCREEN="bot-risk-screen",d.BOT_RELATED_ARTICLE="bot-related-article",d.THANK_YOU_IMAGE="thank-you-image",d.THANK_YOU_TITLE="thank-you-title",d.THANK_YOU_BODY="thank-you-body",d.TOTAL_LINE="total-line",d.BOT_SUBMISSION="bot-submission",d.BOT_EVENT_SUBMISSION="bot-event-submission",d.BOT_SUGGESTED_SERVICE="bot-suggested-service",d.SSO_INTENT="sso-intent",(u=I||(I={})).ACTION_CONDITION="action-condition",u.ACTION_INTERNAL="action-internal",u.ACTION_EXTERNAL="action-external",u.ACTION_SSO_REDIRECT="action-sso-redirect",u.ACTION_MULTIPLE_BUTTON="action-multiple-button",u.USER_CHOICE_TEXT="user-choice-text",u.USER_CHOICE_TEXT_BY_INPUT="user-choice-text-by-input",u.USER_CHOICE_NEXT="user-choice-next",u.USER_CHOICE_IMAGE="user-choice-image",u.USER_SUBMIT_TEXT="user-submit-text",u.USER_SUBMIT_NUMBER="user-submit-number",u.USER_SUBMIT_NAME="user-submit-name",u.USER_SUBMIT_PHONE="user-submit-phone",u.USER_SUBMIT_EMAIL="user-submit-email",u.USER_SUBMIT_DROPDOWN="user-submit-dropdown",u.USER_SUBMIT_DATE="user-submit-date",u.USER_SUBMIT_DOB="user-submit-dob",u.USER_SUBMIT_CONFIRM="user-submit-confirm",u.USER_SUBMIT_SEND="user-submit-send",u.USER_SUBMIT_RESEND="user-submit-resend",u.USER_SUBMIT_ADDRESS="user-submit-address",u.USER_SUBMIT_ADDRESS_PROVINCE="user-submit-address-province",u.USER_SUBMIT_ADDRESS_DISTRICT="user-submit-address-district",u.USER_SUBMIT_ADDRESS_COMMUNE="user-submit-address-commune",u.USER_SUBMIT_BMI="user-submit-bmi",u.USER_SUBMIT_BMI_HIDDEN="user-submit-bmi-hidden",u.USER_SUBMIT_TERMS="user-submit-terms",u.USER_SUBMIT_GENDER="user-submit-gender",u.USER_SUBMIT_OTP="user-submit-otp",u.USER_SUBMIT_WHATSAPP="user-submit-whatsapp",u.POLL_CHOICE="poll-choice",u.POLL_CHOICE_TEXT_BY_INPUT="poll-choice-text-by-input",u.POLL_CHOICE_IMAGE="poll-choice-image",u.POLL_BUTTON="poll-button",u.RATING_STAR="rating-star",u.RATING_DESCRIPTION="rating-description",u.RATING_BUTTON="rating-button",u.LIKE_CHOICE="like-choice",u.DISLIKE_CHOICE="dislike-choice",u.REVIEW_CHOICE="review-choice",u.REVIEW_DESCRIPTION="review-description",u.REVIEW_BUTTON="review-button",u.RESULT_BUTTON="result-button",u.POLL_RESULT="poll-result",u.USER_SUBMIT_GOOGLE_API_ADDRESS="user-submit-google-api-address";let w=[I.USER_SUBMIT_ADDRESS_PROVINCE,I.USER_SUBMIT_ADDRESS_DISTRICT,I.USER_SUBMIT_ADDRESS_COMMUNE,I.USER_SUBMIT_ADDRESS];(p=_||(_={}))[p.UNLIMITED=0]="UNLIMITED",p[p.EXACT_NUMBER=1]="EXACT_NUMBER",p[p.RANGE=2]="RANGE";let k={[I.USER_SUBMIT_EMAIL]:"email",[I.USER_SUBMIT_TEXT]:"text",[I.USER_SUBMIT_DROPDOWN]:"text",[I.USER_SUBMIT_NAME]:"name",[I.USER_SUBMIT_NUMBER]:"number",[I.USER_SUBMIT_ADDRESS]:"address",[I.USER_SUBMIT_PHONE]:"tel",[I.USER_SUBMIT_OTP]:"tel",[I.USER_SUBMIT_WHATSAPP]:"tel",[I.USER_SUBMIT_DATE]:"date",[I.USER_SUBMIT_CONFIRM]:"confirm",[I.USER_SUBMIT_SEND]:"submit",[I.USER_SUBMIT_TERMS]:"terms",[I.USER_SUBMIT_ADDRESS_PROVINCE]:"province",[I.USER_SUBMIT_ADDRESS_DISTRICT]:"district",[I.USER_SUBMIT_ADDRESS_COMMUNE]:"commune",[I.USER_SUBMIT_BMI]:"bmi",[I.USER_SUBMIT_GENDER]:"gender",[I.POLL_CHOICE]:"poll",[I.POLL_CHOICE_TEXT_BY_INPUT]:"poll",[I.POLL_CHOICE_IMAGE]:"poll",[I.RATING_STAR]:"rating",[I.RATING_DESCRIPTION]:"text",[I.LIKE_CHOICE]:"like",[I.DISLIKE_CHOICE]:"dislike",[I.REVIEW_CHOICE]:"review",[I.USER_SUBMIT_GOOGLE_API_ADDRESS]:"google-api-address",[I.USER_SUBMIT_DOB]:"dob"},R={FRU:"FRU",survey:"Survey",ristScreener:"risk_screener",voucherAcuvue:"ACUVUE"};(g=O||(O={})).VIDEO="video",g.SHORTS="short",g.PODCAST="podcast",g.LIVESTREAM="live-stream",(h=y||(y={})).Facebook="facebook",h.Zalo="zalo",h.Twitter="twitter",h.WhatsApp="whatsApp",h.Line="line",h.Instagram="instagram",h.LinkedIn="linkedin",h.Youtube="youtube",h.Tiktok="tiktok",h.Telegram="telegram",h.Viber="viber";let N={DD:{id:"common.day",defaultMessage:"Day"},MM:{id:"common.month",defaultMessage:"Month"},YYYY:{id:"common.year",defaultMessage:"Year"}};var A=Object.freeze({__proto__:null,get SocialType(){return y},COMMON_DATE_TRANSLATE_KEY:N,get Gender(){return m},get BabyGrowthChartType(){return b},get BabyGrowthChartDuration(){return E},get BabyGrowthResultTab(){return v},get LOCALE(){return x.L},get OnboardingStep(){return T},get NodePosition(){return S},get NodeType(){return C},NodeFinalTypes:B,get NodeIntentType(){return f},get NodeActionType(){return I},FULL_KEY_ADDRESS:w,get NodeMultipleOptions(){return _},ELEMENT_CONTROL_INPUT_TYPE:k,SubotType:R,get VideoType(){return O}})},VtSX:function(e,t,n){n.d(t,{A:function(){return Avatar},D:function(){return DistanceTag},I:function(){return IconWrapper},P:function(){return Pin3},S:function(){return ShapedArrowDown}});var a=n("q1tI"),i=n("rBCA"),r=n("iBNF"),o=n("9S3P"),l=n("2YCo");let Pin3=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"none"},e),a.createElement("g",{clipPath:"url(#clip0_5371_10640)"},a.createElement("path",{d:"M6.6665 4.3335L8.1665 5.8335L6.6665 7.3335",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M8.16667 5.8335H5.83333C5.09667 5.8335 4.5 6.43016 4.5 7.16683V7.50016",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6.94331 10.3902L10.3907 6.94281C10.9114 6.42211 10.9114 5.57789 10.3907 5.05719L6.94331 1.60981C6.42261 1.08911 5.57839 1.08911 5.05769 1.60981L1.61031 5.05719C1.08961 5.57789 1.08961 6.42211 1.61031 6.94281L5.05769 10.3902C5.57839 10.9109 6.42261 10.9109 6.94331 10.3902Z",stroke:"#8C8C8C",strokeWidth:.72,strokeLinecap:"round",strokeLinejoin:"round"})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0_5371_10640"},a.createElement("rect",{width:12,height:12,fill:"white"})))),ShapedArrowDown=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none"},e),a.createElement("path",{d:"M13.5554 9.33398L7.99989 5.55621L2.44434 9.33398",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),s=i.Z.div` background-color: var(--background-color, transparent); color: white; cursor: pointer; img { --width: var(--width-prop, 40px); --height: var(--height-prop, 40px); width: var(--width); height: var(--height); } &[data-has-max='true'] { img { max-width: var(--width); max-height: var(--height); } } &[data-avatar-type='square'] { img { --width: var(--width-prop, 72px); --height: var(--height-prop, 72px); border-radius: ${r.r.borderRadius}; } } &[data-avatar-type='rounded'] { img { border-radius: 50%; } } &[data-custom-size='true'] { display: flex; overflow: hidden; overflow: hidden; width: var(--size); height: var(--size); align-items: center; justify-content: center; background-size: cover; font-size: calc(var(--size) / 2); font-weight: bold; &[data-avatar-type='square'] { border-radius: ${r.r.borderRadius}; } &[data-avatar-type='rounded'] { border-radius: 50%; img { --width: 100%; --height: 100%; } } img { object-fit: cover; } } `,c={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},Avatar=({type:e="square",size:t,avatarImg:n,avatarUrl:i,firstLetter:r,backgroundColor:l,onClick:d,style:u,className:p,width:g,height:h,alt:m})=>{let b=t?c[t]:void 0,[E,v]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(i){let e=document.createElement("img");e.setAttribute("src",i),e.addEventListener("error",()=>{v(!0)})}},[i,v]);let T=(!i&&!n||E)&&r;return a.createElement(s,{style:Object.assign(Object.assign({},u),{"--size":b?b+"px":void 0,"--width-prop":g?g+"px":void 0,"--height-prop":h?h+"px":void 0,"--background-color":l}),"data-has-max":!!(g&&h),"data-avatar-type":e,onClick:d,className:p,avatarUrl:i,"data-custom-size":!!t},n,i&&!E&&a.createElement(o.I,{src:i,alt:m||"avatar"}),T&&r)},d=i.Z.div` display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; color: ${r.r.colors.red700}; border-radius: 8px; border: 1px solid ${r.r.colors.neutral100}; font-size: 0.6875rem; line-height: 1rem; border-radius: 0.5rem; `,u=(0,i.Z)(Pin3)` width: 0.75rem; height: 0.75rem; color: ${r.r.colors.gray400}; `;function DistanceTag({value:e,className:t}){return a.createElement(d,{className:t},a.createElement(u,null),a.createElement(l.T,{size:"p3",weight:"regular",color:r.r.colors.gray400},e))}let p=i.Z.div` display: inline-flex; align-items: center; justify-content: center; flex-grow: 0; flex-shrink: 0; width: calc(var(--wrapper-size, var(--icon-size)) * 1px); height: calc(var(--wrapper-size, var(--icon-size)) * 1px); &[data-clickable='true'] { cursor: pointer; } > * { width: calc(var(--icon-size) * 1px); height: calc(var(--icon-size) * 1px); } &[data-svg-custom-stroke='true'] > svg * { stroke: var(--icon-stroke-color); } &[data-svg-custom-fill='true'] > svg * { fill: var(--icon-fill-color); } `,IconWrapper=({children:e,className:t,onClick:n,wrapperSize:i,iconSize:r=24,wrapperStyle:o,iconStyle:l,svgIcon:s,wrapperProps:c})=>a.createElement(p,Object.assign({className:t,onClick:n,style:Object.assign(Object.assign(Object.assign(Object.assign({},i&&{"--wrapper-size":i}),r&&{"--icon-size":r}),s&&Object.assign(Object.assign({},s.fill&&{"--icon-fill-color":s.fill}),s.stroke&&{"--icon-stroke-color":s.stroke})),o),"data-clickable":!!n,"data-svg-custom-stroke":!!(null==s?void 0:s.stroke),"data-svg-custom-fill":!!(null==s?void 0:s.fill)},c),a.cloneElement(e,{style:l}))},YED8:function(e,t,n){n.d(t,{M:function(){return Modal}});var a=n("SwpR"),i=n("q1tI"),r=n("h8tX"),o=n("eM4/");let Modal=e=>{var{styles:t,classNames:n,transitionProps:l}=e,s=(0,a._)(e,["styles","classNames","transitionProps"]);let{classes:c}=(0,o.u)(void 0,{name:"Modal",styles:t,classNames:n});return i.createElement(r.u,Object.assign({centered:!0,classNames:c,transitionProps:Object.assign({transition:"fade"},l),trapFocus:!1},s))}},"2YCo":function(e,t,n){n.d(t,{T:function(){return d}});var a=n("SwpR"),i=n("q1tI"),r=n("/npG"),o=n("8vDj"),l=n("TIp3"),s=n("pfEW"),c=(0,r.k)((e,t)=>{var n,a,i,r,o,l,c,d,u,p;let g=s.a[null==t?void 0:t.customStylesType]||s.a[s.C.NONE],h=null===(n=g.fontSize[null==t?void 0:t.size])||void 0===n?void 0:n[0],m=null===(a=g.lineHeight[null==t?void 0:t.size])||void 0===a?void 0:a[0],b=null!==(o=null===(r=null===(i=g.letterSpacing)||void 0===i?void 0:i[null==t?void 0:t.size])||void 0===r?void 0:r[0])&&void 0!==o?o:0,E=null===(l=g.fontSize[null==t?void 0:t.size])||void 0===l?void 0:l[1],v=null===(c=g.lineHeight[null==t?void 0:t.size])||void 0===c?void 0:c[1],T=null!==(p=null===(u=null===(d=g.letterSpacing)||void 0===d?void 0:d[null==t?void 0:t.size])||void 0===u?void 0:u[1])&&void 0!==p?p:0;return{root:Object.assign({},(null==t?void 0:t.size)&&{fontWeight:(null==t?void 0:t.as)==="label"?s.F.semiBold:g.fontWeight[t.weight]||g.fontWeightBySize[null==t?void 0:t.size]||s.F.regular,fontSize:`${h}`,lineHeight:`${m}`,letterSpacing:b,[e.fn.smallerThan("sm")]:{fontSize:`${E}`,lineHeight:`${v}`,letterSpacing:T}})}});let d=(0,i.forwardRef)((e,t)=>{var n,{size:r,color:d,weight:u,as:p="p",styles:g,className:h,dataEventCategory:m,dataEventAction:b,dataEventLabel:E,variant:v}=e,T=(0,a._)(e,["size","color","weight","as","styles","className","dataEventCategory","dataEventAction","dataEventLabel","variant"]);let S=(0,o.rZ)(),C=(0,s.u)(),{classes:f,cx:I}=c({size:r,weight:"caption"===u?"bold":u,as:p,customStylesType:C},{name:"Text",styles:g}),_="string"==typeof S.colors[d]?S.colors[d]:d;return i.createElement(l.x,Object.assign({"data-size":r,className:I(f.root,h),color:_||("label"===p?S.colors.gray[6]:(null===(n=null==S?void 0:S.other)||void 0===n?void 0:n.template)==="mb"?S.colors.delftGray[7]:void 0)||("primary"===v?S.colors.gray[9]:"secondary"===v?S.colors.gray[7]:"tertiary"===v?S.colors.gray[4]:"disabled"===v?S.colors.gray[3]:"error"===v?S.colors.red[6]:"success"===v?S.colors.green[6]:void 0)||S.colors.gray[7],component:p,"data-event-category":m,"data-event-action":b,"data-event-label":E,classNames:{root:Object.assign(Object.assign({},T.wordWrap?{"word-wrap":T.wordWrap}:void 0),T.isUppercase||"caption"===u?{"text-transform":"uppercase"}:void 0)},ref:t},T))})}}]);