"use strict";(self.webpackChunkhhgDiscoverV1=self.webpackChunkhhgDiscoverV1||[]).push([[3069,9236],{aVqH:function(e,t,n){n.d(t,{$$:function(){return callApiWithLead},Gq:function(){return authorize},Hg:function(){return g},Q2:function(){return getWindowId},T7:function(){return callApiWithAuth},oX:function(){return postSSOApiFormData},px:function(){return callApi}});var a=n("dvDa"),o=n("iVi/"),r=n("p46w"),i=n.n(r),l=n("Q6jF"),c=n("LSb+"),s=n("/sjq"),u=n("9brV"),d=n("77FC"),p=n("JOt+");let g=u.Km.NEXT_PUBLIC_DEPLOY_LOCALE||"en-PH",createAxiosWithInterceptor=(e,t)=>{let n=a.A.create();return n.interceptors.request.use(n=>(e&&t&&(n.headers.Authorization="".concat(t," ").concat(e)),n),e=>{Promise.reject(e)}),n},fixedEncodeURI=e=>encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]"),callApi=async function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{let o=createAxiosWithInterceptor(),r=await o({url:a?e:fixedEncodeURI(e),method:t,...n,params:{lang:"tl-PH"===u.Km.NEXT_PUBLIC_DEPLOY_LOCALE?"fil":void 0,...null==n?void 0:n.params},timeout:3e4});if(r)return r.data}catch(a){(0,d.H4)(null,e,t,null==n?void 0:n.requestFrom,a)}return null},callApiWithAuth=async(e,t,n,a)=>{try{let r=o.parse(a||""),l=r[u.ty],c=l||i().get(u.ty);if(c&&c.length){let a=createAxiosWithInterceptor(c,"Bearer"),o=await a({url:e,method:t,...n,params:{...null==n?void 0:n.params,lang:"tl-PH"===u.Km.NEXT_PUBLIC_DEPLOY_LOCALE?"fil":void 0},timeout:3e4});if(o)return o.data}else if(null==n?void 0:n.noAuthFallback)return callApi(e,t,n)}catch(a){if((0,d.H4)(null,e,t,null==n?void 0:n.requestFrom,a),null==n?void 0:n.noAuthFallback)return callApi(e,t,n);if(null==n?void 0:n.allowError)throw a}return null},callApiWithLead=async(e,t,n,r)=>{try{let c=o.parse(r||""),s=c[u.Y3],d=s||i().get(u.Y3),p=c[u.pJ]||i().get(u.pJ);if(!d){let e=(0,l.A)();d=e,i().set(u.Y3,e)}let g=await (0,a.A)({url:fixedEncodeURI(e),method:t,...n,data:{...null==n?void 0:n.data,cookie_id:d,ga_client_id:p||""},timeout:3e4});if(g)return g.data}catch(n){(0,d.H4)(null,e,t,"lead",n)}return null},authorize=async()=>{try{let n,o;try{n=await (0,p.callApiNew)(c.PATHS.USER_PROFILE.GET_PROFILE,{method:"POST"},"sso")}catch(e){o=e,n||(n=e.response)}if((null==n?void 0:n.code)==="SSO_ERR_041"||(null==n?void 0:n._status)!==1){let n=i().get(u.nN);if(n){var e,t;let o=await (0,a.A)({url:"https://id.hellobacsi.com/api/"+c.PATHS.USER_PROFILE.POST_USER_REFRESH,method:"POST",timeout:1e4,data:{refresh_token:n},headers:{"Content-Type":"application/json",Accept:"application/json"}});if(null==o?void 0:null===(t=o.data)||void 0===t?void 0:null===(e=t._data)||void 0===e?void 0:e.token)return i().set(u.ty,o.data._data.token,{domain:"localhost"===window.location.hostname?"localhost":".".concat(s.domainLocales[g]),expires:o.data._data.expire_in||void 0}),authorize()}}if(o)throw o;if(n)return n._data}catch(e){console.log({err:e})}return null},m=(0,l.A)(),getWindowId=()=>m,callSSOApi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i().get(u.ty);return n?(0,p.callApiNew)(e,{...t},"sso"):Promise.reject("[SSO API] Missing auth cookie when calling ".concat(e))},postSSOApiFormData=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=new FormData;for(let[e,n]of Object.entries(t))a.append(e,n);return callSSOApi(e,{method:"POST",data:a,headers:{"Content-Type":"multipart/form-data"},...n})}},bPK4:function(e,t,n){n.d(t,{GW:function(){return getCareAllSpecialtyUrl},JQ:function(){return getCareHospitalUrl},KG:function(){return getEcommerceApiPath},ME:function(){return getCareServiceUrl},Nh:function(){return getPathURLSearchParams},Nv:function(){return getCareSpecialtyUrl},PU:function(){return getSubotApiPath},Rg:function(){return getChatbotApiPath},SF:function(){return getCareDoctorUrl},WH:function(){return getLeadPath},at:function(){return getCurrentBaseUrl},e1:function(){return getTogetherPath},eB:function(){return getCareDomain},er:function(){return getApiPath},gQ:function(){return getUrlToRedirectToSSOWithReturnUrl},jA:function(){return getBabyVaccineToolPath},nN:function(){return getHellositePath},oN:function(){return getHelloSitesUrl},pN:function(){return getServiceUrl},vf:function(){return getLocalApiPath},vo:function(){return getApiTrackingPath},yZ:function(){return getCareSearchPageUrl}});var a=n("NmYn"),o=n.n(a),r=n("gY0P"),i=n.n(r),l=n("/sjq"),c=n("9brV");let s=c.Km.NEXT_PUBLIC_DEPLOY_LOCALE||"en-PH",formatString=function(){for(var e=arguments.length,t=Array(e),n=0;ne&&(!e.includes("=")||e.split("=")[1]));return 0===n.length?e:"".concat(e,"?").concat(n.join("&"))}return a},getLocalApiPath=(e,t)=>{let{NEXT_PUBLIC_BASE_API_URL:n}=c.Km;return n+"wp-json/api/"+formatString(e,{...t})},getApiPath=(e,t)=>{let{NEXT_PUBLIC_BASE_API_URL:n,WP_INTERNAL_API:a}=c.Km;return(a||n)+"wp-json/api/"+formatString(e,{...t})},getApiTrackingPath=(e,t)=>c.Km.NEXT_PUBLIC_BASE_API_URL+"wp-json/"+formatString(e,{...t}),getLeadPath=(e,t)=>c.Km.NEXT_PUBLIC_LEAD_API+"api/"+formatString(e,{...t}),getTogetherPath=(e,t,n)=>c.Km.NEXT_PUBLIC_TOGETHER_API+"api/".concat(n||"v1","/")+formatString(e,{...t}),getCurrentBaseUrl=e=>window.location.origin,getCareDomain=e=>{let t="production"===c.Km.DEPLOY_ENV;return t?"".concat(l.domainLocales[e],"/care"):"discover.".concat(l.domainLocales[e],"/care")},slugifiedNameWithId=(e,t,n,a)=>a&&t?"".concat(a,"-").concat(t):"".concat(o()(e||"",{lower:!0,locale:n||s}),"-").concat(t),getServiceUrl=e=>{var t,n;let{locale:a,citySlug:r}=e;return"/care/".concat(o()(r||(null===(t=c.ix[a||"vi-VN"])||void 0===t?void 0:t.CURRENT)||"",{lower:!0,locale:a}),"/").concat(null===(n=c.ix[a||"vi-VN"])||void 0===n?void 0:n.SERVICE)},getCareAllSpecialtyUrl=e=>{var t;let{locale:n}=e;return"/care/".concat(null===(t=c.ix[n||"vi-VN"])||void 0===t?void 0:t.SPECIALTIES)},getCareSpecialtyUrl=e=>{var t,n;let{locale:a,citySlug:r,slug:i}=e;return"/care/".concat(o()(r||(null===(t=c.ix[a||"vi-VN"])||void 0===t?void 0:t.ALL)||"",{lower:!0,locale:a}),"/").concat(null===(n=c.ix[a||"vi-VN"])||void 0===n?void 0:n.HOSPITAL,"/").concat(i)},getCareHospitalUrl=e=>{var t;let{name:n,id:a,locale:o,slug:r}=e;return"/care/".concat(null===(t=c.ix[o||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(slugifiedNameWithId(n,a,o,r))},getCareDoctorUrl=e=>{var t;let{name:n,id:a,locale:o}=e;return"/care/".concat(null===(t=c.ix[o||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(slugifiedNameWithId(n,a))},getCareServiceUrl=e=>{var t;let{name:n,id:a,locale:o}=e;return"/care/".concat(null===(t=c.ix[o||"vi-VN"])||void 0===t?void 0:t.SERVICE,"/").concat(slugifiedNameWithId(n,a))},getCareSearchPageUrl=e=>{var t,n;let{type:a,locale:o,searchSlug:r}=e;return"/care/".concat(null===(t=c.ix[o])||void 0===t?void 0:t.CURRENT,"/").concat(null===(n=c.ix[o])||void 0===n?void 0:n[c.m4[a]],"/").concat(null!=r?r:"")},getBabyVaccineToolPath=(e,t)=>(c.Km.INTERNAL_VACCINATION_TOOL_API||c.Km.NEXT_PUBLIC_VACCINATION_TOOL_API)+formatString(e,{...t,domain:l.domainLocales[s]}),getUrlToRedirectToSSOWithReturnUrl=(e,t,n)=>{let a=e||window.location.href,o=t?"".concat(a.includes("?")?"&":"?","source=").concat(t):"",r=n?"".concat(a.includes("?")||o?"&":"?","action=").concat(n):"";return c.a5?"".concat(c.a5,"?returnUrl=").concat(encodeURIComponent("".concat(a).concat(o).concat(r))):"/"},getSubotApiPath=(e,t)=>{let{SUBOT_INTERNAL:n,NEXT_PUBLIC_SUBOT_API:a}=c.Km;return a+formatString(e,{...t})},getEcommerceApiPath=(e,t)=>{let{NEXT_PUBLIC_ECOMMERCE_API:n}=c.Km;return(n||"https://uat-ecommerce.hellobacsi.com/")+"rest/"+c.Km.NEXT_PUBLIC_STORE_CODE+"/V1/"+formatString(e,{...t})},getChatbotApiPath=(e,t)=>{let{NEXT_PUBLIC_CHAT_BOT_API:n="https://chatbot-staging.hellohealthgroup.com/"}=c.Km;return n+formatString(e,{...t})},getHelloSitesUrl=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{DEPLOY_ENV:a}=c.Km,o=!t&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname);return n?"https://".concat(l.domainLocales[e]):o?"http://".concat(window.location.host):"https://".concat("production"===a?"":"discover.").concat(l.domainLocales[e])};function getHellositePath(e){let{locale:t,slug:n,query:a}=e,o=getHelloSitesUrl(t);"tl-PH"===t&&(o+="/fil");let r="?";if(void 0!==a){let e="";Object.keys(a).map(t=>{let n=a[t];Array.isArray(n)&&(r+=e+n.map(e=>"".concat(t,"=").concat(e)).join("&"),e="&"),"string"==typeof n&&(r+=e+"".concat(t,"=").concat(n),e="&")})}"?"===r&&(r="");let i=[];return"string"==typeof n&&(i=n.split("/").filter(Boolean)),Array.isArray(n)&&(i=n.map(e=>e.split("/").filter(Boolean).join("/"),[])),o+"/"+i.join("/")+"/"+r}function getPathURLSearchParams(e,t){let n=e,a=new URLSearchParams(t),o=0;return a.forEach((e,t)=>{e?o++:a.delete(t)}),0!==o&&(n+="?".concat(a)),n}},GV9h:function(e,t,n){n.d(t,{k:function(){return DiscoverHead}});var a=n("BGKE"),o=n("+OUp"),r=n("4v/2"),i=n("k3v3"),l=n.n(i),c=n("bPK4");let getWatermark=(e,t)=>{if(!t)return"";let n=RegExp("(".concat(null==e?void 0:e.slice(-2),".png)$"),"g");return n.test(t)?t:"".concat(t,"?wm=1")};var s=n("/sjq"),u=n("AG8C"),d=n("9brV");let DiscoverHead=e=>{var t,n,i,p;let g,{SEOData:m={},noUsingRouterPush:h=!1,languageOptions:v=[],isHealthToolResultSharing:E}=e,{DEPLOY_ENV:f}=d.Km,{asPath:S}=(0,u.$)(),{totalPages:C,currentPage:T,title:A="",description:_="",image:O,type:P,customMetaData:I=[],isIndexable:N=!0,hasNoCanonical:b=!1,openGraph:y,twitter:L}=m,{title:w,image:M,imageWidth:U="1200",imageHeight:R="630",description:D}=y||{},{image:Y,title:B,description:H}=L||{},{locale:k,router:{pathname:x,query:F}}=(0,u.$)(),G="https://".concat(s.domainLocales[k]).concat(d.nS,"/").concat(k,".png"),V=getWatermark(k,O)||G,K=getWatermark(k,M),W=getWatermark(k,Y),j="".concat(d.Jp).concat(x);Object.keys(F).forEach(e=>{let t=F[e];t&&Array.isArray(t)&&(j=j.replace("[...".concat(e,"]"),t.join("/"))),"string"==typeof t&&x.endsWith("[".concat(e,"]"))&&(j=j.replace("[".concat(e,"]"),t))});let z=(0,o.useMemo)(()=>(null==v?void 0:v.length)>=2?v.map(e=>e.label===d.Rs.EN?{...e,label:"en-PH"}:e.label===d.Rs.FIL?{...e,label:"tl-PH"}:e):[],[v]),q="/"===j?"":"/";if(m.apiMetaData&&"string"==typeof m.apiMetaData){let e=null===(p=m.apiMetaData)||void 0===p?void 0:p.match(/(.*)<\/title>/),t=" - Page ".concat(T," of ").concat(C),n=T&&1!==T&&e&&e[0]&&e[1]?m.apiMetaData.replace(e[0],e[0].includes("-")?e[0].replace("-",t+" - "):"".concat(e[1].concat(t),"")):m.apiMetaData;try{g=(0,r.Ay)(n,{trim:!0,replace:e=>{e.attribs&&Object.keys(e.attribs).forEach(t=>{let n=t.replace(/[^\w\s]/gi,""),a=e.attribs[t];if(delete e.attribs[t],isNaN(Number(n))){var o,r;e.attribs[n]=a,["og:image","twitter:image"].includes(a)&&(e.attribs.content=getWatermark(k,e.attribs.content)||V),E&&(null===(o=e.attribs)||void 0===o?void 0:o.property)==="og:url"&&(null===(r=e.attribs)||void 0===r?void 0:r.content)&&(e.attribs.content="\n ".concat((0,c.oN)(k)).concat(S))}})}})}catch(e){console.error(e)}let o=null==g?void 0:g.some(e=>{var t;return(null===(t=e.props)||void 0===t?void 0:t.property)==="og:image"});Array.isArray(g)&&g.length&&!o&&(g=[...g,(0,a.Y)("meta",{property:"og:image",content:K||V},"og:image"),(0,a.Y)("meta",{property:"og:image:secure_url",content:K||V},"og:image:secure_url"),(0,a.Y)("meta",{property:"og:image:width",content:"".concat(U)},"og:image:width"),(0,a.Y)("meta",{property:"og:image:height",content:"".concat(R)},"og:image:height"),(0,a.Y)("meta",{name:"twitter:image",content:W||V},"twitter:image")])}let J=null==g?void 0:g.filter(e=>"title"===e.type),Q=(null==J?void 0:null===(n=J[0])||void 0===n?void 0:null===(t=n.props)||void 0===t?void 0:t.children)||A;return(0,a.FD)(l(),{children:[(0,a.Y)("meta",{charSet:"UTF-8"}),(0,a.Y)("meta",{name:"viewport",content:"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"}),(0,a.Y)("meta",{name:"google",content:"notranslate"}),(0,a.Y)("meta",{name:"robots",content:N&&"production"===f?"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1":"noindex"}),(0,a.Y)("meta",{property:"fb:app_id",content:"653713035016537"}),I.map((e,t)=>(0,a.Y)("meta",{...e},"custom-meta-".concat(t))),(0,a.Y)("meta",{name:"theme-color",content:"#2c87f3"}),(0,a.Y)("meta",{name:"page_type",content:"Home"}),(0,a.Y)("meta",{name:"page_platform",content:"WEB"}),(0,a.Y)("meta",{name:"page_language",content:k}),z&&z.length>=2?z.map(e=>(0,a.Y)("link",{rel:"alternate",hrefLang:e.label,href:"https://".concat(s.domainLocales[k]).concat(e.value)},e.value)):(0,a.Y)("link",{rel:"alternate",href:"https://".concat(s.domainLocales[k]).concat(j).concat(q)}),(0,a.Y)("meta",{name:"ahrefs-site-verification",content:"46e7521a2b89a1013149c4685bbe02a1d36a4732fef98655142b829bc87cba4d"}),!g&&(0,a.FD)(a.FK,{children:[(0,a.Y)("title",{children:null===(i=m.openGraph)||void 0===i?void 0:i.title}),!b&&(0,a.Y)("link",{rel:"canonical",href:"https://".concat(s.domainLocales[k]).concat(j).concat(q)}),(0,a.Y)("meta",{name:"description",content:_||D}),m.schemaData&&(0,a.Y)("script",{type:"application/ld+json",className:"yoast-schema-graph",dangerouslySetInnerHTML:{__html:m.schemaData}}),(0,a.Y)("meta",{property:"og:locale",content:k}),(0,a.Y)("meta",{property:"og:type",content:P||"website"}),(0,a.Y)("meta",{property:"og:title",content:w||A}),(0,a.Y)("meta",{property:"og:description",content:D||_}),(0,a.Y)("meta",{property:"og:url",content:"https://".concat(s.domainLocales[k]).concat(j,"/")}),(0,a.Y)("meta",{property:"og:site_name",content:d.El[k].SITE_NAME_FORMATTED}),(0,a.Y)("meta",{property:"og:image",content:K||V}),(0,a.Y)("meta",{property:"og:image:secure_url",content:K||V}),(0,a.Y)("meta",{property:"og:image:width",content:"".concat(U)}),(0,a.Y)("meta",{property:"og:image:height",content:"".concat(R)}),(0,a.Y)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,a.Y)("meta",{name:"twitter:title",content:B||A}),(0,a.Y)("meta",{name:"twitter:description",content:H||_}),(0,a.Y)("meta",{name:"twitter:image",content:W||V})]}),(d.EH[k]||[]).map((e,t)=>"link"===e.type?(0,a.Y)("link",{rel:e.rel,href:e.href,sizes:e.sizes},"favicon-".concat(t)):"meta"===e.type?(0,a.Y)("meta",{name:e.name,content:e.content},t):null),g,Q&&(0,a.Y)("title",{children:Q})]})}},"4JDt":function(e,t,n){var a=n("BGKE"),o=n("+OUp"),r=n("Sb+D");let ErrorBoundary=class ErrorBoundary extends o.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught React Boundary error:",e,t),(0,r.Cp)("React Boundary Error",{extra:{error:e,errorInfo:t}})}render(){return this.state.hasError?this.props.fallback||(0,a.Y)(a.FK,{}):this.props.children||(0,a.Y)(a.FK,{})}constructor(...e){super(...e),this.state={hasError:!1}}};t.A=ErrorBoundary},Imrq:function(e,t,n){n.d(t,{s:function(){return NavigatorLayout},q:function(){return getDefaultLanguageOptions}});var a=n("BGKE"),o=n("4JDt"),r=n("AG8C"),i=n("9brV"),l=n("+OUp"),c=n("p46w"),s=n.n(c),u=n("VoJx"),d=n.n(u),p=n("dDsW"),g=n("/sjq");let m=d()(()=>n.e(428).then(n.bind(n,"b+p/")).then(e=>e.LeavePageConfirmPopupWrapper),{loadableGenerated:{webpack:()=>["b+p/"]},ssr:!1}),h=d()(()=>Promise.all([n.e(3139),n.e(3760),n.e(2897),n.e(5263),n.e(9785),n.e(1451),n.e(3186),n.e(1839),n.e(3805),n.e(9096),n.e(638),n.e(2750)]).then(n.bind(n,"wWMa")).then(e=>e.CookieAcceptConfirm),{loadableGenerated:{webpack:()=>[null]},ssr:!1}),BelowMainContent=()=>{var e;let{locale:t,router:{asPath:n}}=(0,r.$)(),[c,u]=(0,l.useState)(!1),[d,v]=(0,l.useState)(!1),[E,f]=(0,l.useTransition)(),{formatMessage:S}=(0,p.A)();(0,l.useEffect)(()=>{f(()=>{u(i.Oe.includes(t)&&!s().get(i.V7))}),setTimeout(()=>{f(()=>{v(!0)})},5e3)},[]),(0,l.useEffect)(()=>{let e=document.getElementsByTagName("body")[0];c?e.classList.add("hasCookieConfirm"):e.classList.remove("hasCookieConfirm")},[c]);let C=(0,l.useCallback)(()=>{let e={adConsentGranted:!0,analyticsConsentGranted:!0,functionalityConsentGranted:!0,personalizationConsentGranted:!0,securityConsentGranted:!0};s().set(i.V7,JSON.stringify(e),{domain:"development"===i.Km.NEXT_PUBLIC_DEPLOY_ENV?"localhost":".".concat(g.domainLocales[t])}),u(!1),window.consentListeners.forEach(t=>{t(e)})},[u]);return(0,a.FD)(a.FK,{children:[(0,a.Y)("div",{id:"mantine-modal-target",style:{position:"relative",zIndex:305},children:d&&(0,a.Y)(a.FK,{children:(0,a.Y)(o.A,{children:(0,a.Y)(m,{})})})}),c&&d?(0,a.Y)(o.A,{children:(0,a.Y)(h,{theme:"helloSites",className:"cookie-confirm-box",title:S({id:"cookiePolicies.modal.title",defaultMessage:"Please accept our privacy policy"}),description:S({id:"cookiePolicies.modal.description",defaultMessage:"Hello Health Group uses cookies to improve your experience and to show you personalized ads"}),policiesUrl:"/static".concat((null===(e=i.CS[t])||void 0===e?void 0:e.PRIVACY_POLICY)||"/"),onAcceptClick:C,translations:{acceptButton:S({id:"cookiePolicies.modal.accept",defaultMessage:"Accept"}),policiesButton:S({id:"cookiePolicies.modal.ourPolicies",defaultMessage:"Our Policies"})},trackingAttributes:{dataEventCategory:"Consent Pop Up",dataEventAction:"Accept Click",dataEventLabel:"https://".concat(g.domainLocales[t]).concat(i.Jp).concat(n)}})}):void 0]})};var v=n("GV9h"),E=n("AeFk"),f=n("rBCA"),S=n("CL9C"),C=n("iBNF"),T=n("kyC6"),A=n("UYRA"),_=n("4BRW"),O=n("a5vB"),P=n("JOt+"),I=n("LSb+"),N=n("CN7H"),b=n("wA0V"),y=n("a5L+"),L=n("CWxQ"),w=n("VnHZ"),M=n("fgcN"),U=n("B1vh");n("8BcA");var R=n("ROQx");let formatNavMenuContent=e=>{var t;return(null===(t=e.categories)||void 0===t?void 0:t.items)&&(e.categories.items=e.categories.items.map(e=>(delete e.childCates,delete e.catParent,delete e.metaTag,delete e.mobileCoverImage,delete e.reviewedDate,delete e.textColor,delete e.thumnailColor,(0,R._t)(e)))),e},fetchNavMenuContentData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-PH";return(0,T.g)(e).then(formatNavMenuContent)};var D=n("akdD");let Y=d()(()=>Promise.all([n.e(3028),n.e(9172)]).then(n.bind(n,"HtcZ")).then(e=>e.StickySponsoredBy),{loadableGenerated:{webpack:()=>["HtcZ"]}}),B=(0,E.AH)("a[data-event-category='Chatbot AI']{button{padding-left:10px;padding-right:12px;height:36px;.mantine-Button-label{font-size:13px;font-weight:500;line-height:22px;color:#111111;}.mantine-Button-leftIcon{margin-right:2px;svg{width:24px;height:24px;}}}}input[name='search-input-menu-servicedesktop'].mantine-Input-input{border-color:#e4e8ec;border-radius:8px;",S.M.mbDown,"{height:46px;}}"),H=(0,E.AH)("div[data-site-type='helloSites']{background-color:",C.w.colors.blue900,";}"),k=(0,f.A)(T.N,{target:"ewvpcet0"})(i.fg?B:""," ",e=>e.isWinCashBackTheme?H:(0,E.AH)("div[data-site-type='helloSites']{background-color:#ffffff;}")),MainNav=e=>{var t,n;let{onTopBarAppears:c,sitewideBanner:s,isSponsored:u,sponsoredType:d,sponsoredBy:p,dataNavMenuContent:m,languageOptions:h,activeMenuService:v,subHead:E,isHomepage:f,articleId:S,categorySlug:C,utmMedium:T}=e,{locale:R,router:{asPath:B}}=(0,r.$)(),H=(0,b.m)(),x=(0,A.u)();(0,l.useEffect)(()=>(null==x||x({articleId:null!=S?S:"",categorySlug:null!=C?C:"",utmMedium:null!=T?T:""}),()=>{null==x||x({articleId:"",categorySlug:"",utmMedium:""})}),[S,C,T,x]);let F=B.split("?")[0].toLowerCase(),G=F.includes("/obesiti-dan-diabetes"),{setIsNavCollapse:V,setIsNavSponsor:K}=(0,D.w)(e=>({setIsNavCollapse:e.setIsNavCollapse,setIsNavSponsor:e.setIsNavSponsor}),O.x),W=i.Pn.includes(R),{state:j={},dispatch:z}=(0,l.useContext)(w.B),{setOpenQuickBookingDrawer:q}=(0,U.f)(e=>e,O.x),{userInfo:J}=j,Q=(0,y.a)(),X=(0,M.E)(e=>e.setNavMenuCategories),[$,Z]=(0,l.useState)(null!=m?m:{});(0,l.useEffect)(()=>{m&&Z(m)},[m]),(0,l.useEffect)(()=>{let e=!1;return fetchNavMenuContentData(R||"en-PH").then(t=>{!e&&t&&Z(t)}),()=>{e=!0}},[R]);let ee=(0,l.useMemo)(()=>({enableAppIntroPage:[_.L.Vietnam].includes(R),enableProfileFindMyBooking:i.oQ.includes(R)&&Q}),[R,Q]),et=void 0===p||Array.isArray(p)?p:[p];(0,l.useEffect)(()=>{K(!!u)},[u]),(0,l.useEffect)(()=>{R===_.L.Vietnam&&(async()=>{(null==J?void 0:J.id)?(await N.y.getCartId(),N.y.getCart().then(e=>{var t;z({type:L.Q.UPDATE_CART,payload:(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.items_qty)||0})})):(await N.c.getCartId(),N.c.getCart().then(e=>{var t;z({type:L.Q.UPDATE_CART,payload:(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.items_qty)||0})}))})()},[null==J?void 0:J.id,B]);let en=(0,l.useMemo)(()=>{var e,t,n,a;return{...$,healthTools:{...null==$?void 0:$.healthTools,items:null==$?void 0:null===(t=$.healthTools)||void 0===t?void 0:null===(e=t.items)||void 0===e?void 0:e.map(e=>({...e,icon:e.icon||i.KN})),spotlights:null==$?void 0:null===(a=$.healthTools)||void 0===a?void 0:null===(n=a.spotlights)||void 0===n?void 0:n.map(e=>({...e,icon:e.icon||i.KN}))}}},[$]);return(0,l.useEffect)(()=>{var e,t,n,a;X({categories:{items:null!==(n=null===(e=en.categories)||void 0===e?void 0:e.items)&&void 0!==n?n:[],spotlights:null!==(a=null===(t=en.categories)||void 0===t?void 0:t.spotlights)&&void 0!==a?a:[]}})},[null===(t=en.categories)||void 0===t?void 0:t.items,null===(n=en.categories)||void 0===n?void 0:n.spotlights,X]),(0,a.Y)(o.A,{children:(0,a.Y)(k,{siteType:"helloSites",locale:R,currentUrl:H,onLogout:()=>{(0,P.callApiNew)(I.PATHS.USER_PROFILE.POST_LOGOUT,{method:"POST"},"sso"),z({type:L.Q.LOGOUT,payload:{domain:"."+g.domainLocales[R]}})},ssrMenuContent:en||{},onTopBarAppears:e=>{null==c||c(e),V(!e)},userState:{...j,userInfo:J||void 0},isMobile:Q,isHomepage:f,activeMenuService:v||"categories",sitewideBannerData:s||void 0,languageOptions:h,onBookingClick:e=>{e.preventDefault(),q(!0)},sponsorComponent:u?(0,a.Y)(Y,{isCollapsed:!1,sponsoredType:d,sponsoredBy:et,isMobile:Q}):void 0,isUserLoading:(null==j?void 0:j.userInfo)===void 0,subHead:E,configs:ee,isWinCashBackTheme:W,enableO2ONavigationMenu:!G})})};var x=n("oxwC"),F=n("2M76");let NavFooter=e=>{let{footerInfo:t}=e,{locale:n}=(0,r.$)();return(0,a.Y)(a.FK,{children:t&&(0,a.Y)(o.A,{children:(0,a.Y)(F.A,{ssrOnly:!0,children:(0,a.Y)(x.F,{footerInfo:t,locale:n,siteType:"helloSites",type:"main",basePath:i.Jp})})})})},G={English:"en",Filipino:"tl"},V={English:"EN",Filipino:"FIL"},getDefaultLanguageOptions=(e,t)=>["en-PH","tl-PH"].includes(e)?[{label:"EN",value:t,locale:"en-PH"},{label:"FIL",value:"/fil"+t,locale:"tl-PH"}]:[],NavigatorLayout=e=>{let{title:t,description:n,image:l,children:c,onTopBarAppears:s,SEOData:u={},type:d="website",footerInfo:p,sitewideBanner:g,isSponsored:m,sponsoredType:h,sponsoredBy:E,noUsingRouterPush:f,dataNavMenuContent:S,languageOptions:C,activeMenuService:T,subHead:A,isHealthToolResultSharing:_,isHomepage:O=!1,isInline:P,articleId:I,categorySlug:N,utmMedium:b="banner_others"}=e,{locale:y}=(0,r.$)(),L=i.El[y].SITE_NAME_FORMATTED,w=null==C?void 0:C.map(e=>({...e,locale:e.locale?e.locale:G[e.label]+"-"+y.split("-")[1],label:V[e.label]||e.label,originalLabel:e.label}));return(0,a.FD)(a.FK,{children:[(0,a.Y)(o.A,{children:(0,a.Y)(v.k,{SEOData:{title:t,image:l,description:n,siteName:L,type:d,...u},noUsingRouterPush:f,languageOptions:null==w?void 0:w.map(e=>({...e,label:e.originalLabel})),isHealthToolResultSharing:_})}),P?null:(0,a.Y)(MainNav,{onTopBarAppears:s,isSponsored:m,sponsoredType:h,sponsoredBy:E,sitewideBanner:g,languageOptions:w,dataNavMenuContent:S,activeMenuService:T,subHead:A,isHomepage:O,articleId:I,categorySlug:N,utmMedium:O?"banner_home":b}),(0,a.Y)(o.A,{fallback:(0,a.Y)("div",{style:{width:"100%",height:200}}),children:c}),P?null:(0,a.FD)(a.FK,{children:[(0,a.Y)(BelowMainContent,{}),(0,a.Y)(NavFooter,{footerInfo:p})]})]})}},akdD:function(e,t,n){n.d(t,{w:function(){return o}});var a=n("VNqU");let o=(0,a.vt)(e=>({isNavCollapse:!1,isNavSponsor:!1,isNavBanner:!1,setIsNavCollapse(t){e({isNavCollapse:t})},setIsNavSponsor(t){e({isNavSponsor:t})},setIsNavBanner(t){e({isNavBanner:t})}}))},CN7H:function(e,t,n){n.d(t,{c:function(){return d},y:function(){return p}});var a=n("xrdX"),o=n("p46w"),r=n.n(o),i=n("JOt+"),l=n("LSb+"),c=n("aVqH"),s=n("bPK4"),u=n("9brV");let d={getCartId:async()=>{let e=r().get(u.bF)||"";if(e)return e;let t=await (0,c.px)((0,s.KG)(l.PATHS.ECOMMERCE.GUEST_GET_CART_ID),"POST");return e=(null==t?void 0:t.data)||"",r().set(u.bF,e,{domain:"development"===u.Km.NEXT_PUBLIC_DEPLOY_ENV?"localhost":".".concat(a.y[u.Km.DEPLOY_LOCALE])}),e},addToCart:async(e,t)=>{if(!e||!t)return;let n=await d.getCartId();if(n)return await (0,c.px)((0,s.KG)(l.PATHS.ECOMMERCE.GUEST_ADD_ITEM_TO_CART,{cartId:n}),"POST",{data:{cartItem:{sku:e,qty:t}}})},getCart:async()=>{let e=await d.getCartId();if(!e)return;let t=await (0,i.callApiNew)(l.PATHS.ECOMMERCE.GUEST_GET_CART,{method:"GET",params:{cartId:e}},"ecommerce");return t},getCartTotals:async()=>{let e=await d.getCartId();if(e)return await (0,i.callApiNew)(l.PATHS.ECOMMERCE.GUEST_GET_CART_TOTALS,{method:"GET",params:{cartId:e}},"ecommerce")}},p={getCartId:()=>(0,i.callApiNew)(l.PATHS.ECOMMERCE.GET_CART_ID,{method:"POST"},"ecommerce"),addToCart:(e,t)=>{if(e&&t)return(0,i.callApiNew)(l.PATHS.ECOMMERCE.ADD_ITEM_TO_CART,{method:"POST",data:{cartItem:{sku:e,qty:t}}},"ecommerce")},getCart:async()=>{let e=await (0,i.callApiNew)(l.PATHS.ECOMMERCE.GET_CART,{method:"GET"},"ecommerce");return e},getCartTotals:async()=>(0,i.callApiNew)(l.PATHS.ECOMMERCE.GET_CART_TOTALS,{method:"POST"},"ecommerce")}},wA0V:function(e,t,n){n.d(t,{m:function(){return useCurrentUrl}});var a=n("+OUp"),o=n("bPK4"),r=n("AG8C"),i=n("9brV");function useCurrentUrl(){let{locale:e,router:{asPath:t}}=(0,r.$)(),[n,l]=(0,a.useState)(()=>"".concat((0,o.oN)(e,!1)).concat(i.Jp).concat(t));return(0,a.useEffect)(()=>{l(window.location.href)},[t]),n}},"a5L+":function(e,t,n){n.d(t,{a:function(){return useIsMobile}});var a=n("bGjd");let useIsMobile=e=>{let{isMobile:t,isMobileSSR:n,isLargeMobile:o}=(0,a.lm)();return"boolean"==typeof t||"boolean"==typeof o?!!(e&&o||t):!!(e&&o||n)}},bGjd:function(e,t,n){n.d(t,{LB:function(){return ScreenSizeProvider},O4:function(){return ScreenSizeListener},lm:function(){return useScreenSize}});var a=n("BGKE"),o=n("+OUp"),r=n("sEfC"),i=n.n(r),l=n("oWg6"),c=n("VNqU"),s=n("a5vB");let getIsMobile=()=>window.innerWidth<768,getIsLargeMobile=()=>window.innerWidth>=768&&window.innerWidth<1112,useScreenSize=()=>{let{isMobile:e,isLargeMobile:t,isMobileSSR:n}=useScreenSizeContext(e=>({isMobile:e.isMobile,isLargeMobile:e.isLargeMobile,isMobileSSR:e.isMobileSSR}),s.x);return{isMobile:e,isLargeMobile:t,isMobileSSR:n}},useScreenSizeListener=()=>{let{setIsMobile:e,setIsLargeMobile:t}=useScreenSizeContext(e=>({setSSR:e.setSSR,setIsMobile:e.setIsMobile,setIsLargeMobile:e.setIsLargeMobile}),s.x);(0,o.useEffect)(()=>{let n=i()(()=>{let n=getIsMobile(),a=getIsLargeMobile();"boolean"==typeof n&&e(n),"boolean"==typeof a&&t(a)},200);return window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[])},ScreenSizeListener=()=>(useScreenSizeListener(),null),createScreenSizeStore=e=>{let t={isMobile:getIsMobile(),isLargeMobile:getIsLargeMobile()};return(0,l.y)()(n=>({...t,...e,setIsMobile:e=>n({isMobile:e}),setIsLargeMobile:e=>n({isLargeMobile:e}),setSSR:e=>n({isMobileSSR:e})}))},u=(0,o.createContext)(null),ScreenSizeProvider=e=>{let{isMobileSSR:t,children:n}=e,r=(0,o.useRef)();return r.current||(r.current=createScreenSizeStore({isMobileSSR:t})),(0,a.Y)(u.Provider,{value:r.current,children:n})};function useScreenSizeContext(e,t){let n=(0,o.useContext)(u);if(!n)throw Error("Missing ScreenSizeContext.Provider in the tree");return(0,c.Pj)(n,e,t)}},CWxQ:function(e,t,n){n.d(t,{Q:function(){return a}});let a={LOGIN:"LOGIN",LOGOUT:"LOGOUT",AUTHORIZING:"AUTHORIZING",SET_IS_MOBILE_SSR:"SET_IS_MOBILE_SSR",ADD_BOOKMARKS:"ADD_BOOKMARKS",REMOVE_BOOKMARKS:"REMOVE_BOOKMARKS",SET_OPEN_LOGOUT_POPUP:"SET_OPEN_LOGOUT_POPUP",SET_COMMENT_FOCUS:"SET_COMMENT_FOCUS",SET_OPEN_DUE_DATE_POPUP:"SET_OPEN_DUE_DATE_POPUP",INIT_USER:"INIT_USER",PLAY_ARTICLE:"PLAY_ARTICLE",SET_OPEN_CONFIRM_LEAVE_PAGE_POPUP:"SET_OPEN_CONFIRM_LEAVE_PAGE_POPUP",SET_CHATWOOT_WEBSITE_TOKEN:"SET_CHATWOOT_WEBSITE_TOKEN",SET_ZALO_CONFIG:"SET_ZALO_CONFIG",SET_COLLECTING_ACTION:"SET_COLLECTING_ACTION",SET_HEALTH_INFO:"SET_HEALTH_INFO",UPDATE_CART:"UPDATE_CART",ADD_COMMUNITY_JOINED:"ADD_COMMUNITY_JOINED",REMOVE_COMMUNITY_JOINED:"REMOVE_COMMUNITY_JOINED",UPDATE_USER_INFO:"UPDATE_USER_INFO",ADD_SUCCESS_LOGIN_FN:"ADD_SUCCESS_LOGIN_FN"}},VnHZ:function(e,t,n){n.d(t,{B:function(){return o}});var a=n("+OUp");let o=(0,a.createContext)({})},fgcN:function(e,t,n){n.d(t,{E:function(){return o}});var a=n("VNqU");let getCategoriesFromNavMenu=e=>{var t,n,a,o;return{categoryItems:null!==(a=null==e?void 0:null===(t=e.categories)||void 0===t?void 0:t.items)&&void 0!==a?a:[],categorySpotlights:null!==(o=null==e?void 0:null===(n=e.categories)||void 0===n?void 0:n.spotlights)&&void 0!==o?o:[]}},o=(0,a.vt)(e=>({categoryItems:[],categorySpotlights:[],setNavMenuCategories:t=>{e(getCategoriesFromNavMenu(t))}}))},B1vh:function(e,t,n){n.d(t,{f:function(){return r}});var a=n("VNqU"),o=n("n6X/");let r=(0,a.vt)(e=>({openQuickBookingDrawer:!1,setOpenQuickBookingDrawer(t){e({openQuickBookingDrawer:t})},careType:o.t.DOCTOR,setCareType(t){e({careType:t})},setData(t){e({data:t})}}))},"n6X/":function(e,t,n){var a,o;n.d(t,{t:function(){return a}}),(o=a||(a={}))[o.DOCTOR=0]="DOCTOR",o[o.SERVICE=1]="SERVICE"}}]);