@hhgtech/hhg-components 1.20.39 → 1.20.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/build/babyGrowth.js +1 -1
  2. package/build/care.js +1 -1
  3. package/build/components/atoms/babyGrowthChart/chartConfig.d.ts +5 -2
  4. package/build/components.js +1 -1
  5. package/build/core.js +1 -1
  6. package/build/esm/babyGrowth.js +1 -1
  7. package/build/esm/care.js +1 -1
  8. package/build/esm/components.js +1 -1
  9. package/build/esm/core.js +1 -1
  10. package/build/esm/{getSocialList-344dc326.js → getSocialList-cb857fba.js} +1 -1
  11. package/build/esm/i18n.js +1 -1
  12. package/build/esm/index-3bf7af06.js +1 -0
  13. package/build/esm/{index-d6a4f92c.js → index-488778dc.js} +1 -1
  14. package/build/esm/{index-ff49b928.js → index-5abf3144.js} +1 -1
  15. package/build/esm/{index-8227d813.js → index-8a042dcf.js} +1 -1
  16. package/build/esm/{index-0e5bd1fb.js → index-b0eba32e.js} +1 -1
  17. package/build/esm/{index-70e0d1d4.js → index-bdc8c779.js} +1 -1
  18. package/build/esm/{index-a0cf6992.js → index-dfc3dc8f.js} +1 -1
  19. package/build/esm/{index-cbc324ad.js → index-e6b4cdad.js} +1 -1
  20. package/build/esm/{index-281f3a5d.js → index-ed39f7e0.js} +1 -1
  21. package/build/esm/index.js +1 -1
  22. package/build/esm/{index.styled-687ce5d9.js → index.styled-69cca86d.js} +1 -1
  23. package/build/esm/{index.styled-4e3897dc.js → index.styled-f8bcaba1.js} +1 -1
  24. package/build/esm/{lazyLoad-b7b94ece.js → lazyLoad-9702fa7e.js} +1 -1
  25. package/build/esm/navigation.js +1 -1
  26. package/build/esm/navigationLayout_deprecated.js +1 -1
  27. package/build/esm/routing-f1bdaa22.js +1 -0
  28. package/build/esm/together.js +1 -1
  29. package/build/esm/{togetherComponentGlobalContext-f8ea64d0.js → togetherComponentGlobalContext-104fdffa.js} +1 -1
  30. package/build/esm/translationsContext-873337b8.js +1 -0
  31. package/build/esm/translationsProvider-4c0f3ed8.js +1 -0
  32. package/build/esm/{types-6ec4b7c7.js → types-085b551a.js} +1 -1
  33. package/build/esm/{types-7130a456.js → types-fd89a516.js} +1 -1
  34. package/build/esm/{useHealthToolCache-b3b12adf.js → useHealthToolCache-52e24c31.js} +1 -1
  35. package/build/{getSocialList-65bb0345.js → getSocialList-6ea0d58d.js} +1 -1
  36. package/build/i18n.js +1 -1
  37. package/build/{index-ed98d3ac.js → index-23a0055b.js} +1 -1
  38. package/build/{index-078e0692.js → index-267359a8.js} +1 -1
  39. package/build/{index-95883fdf.js → index-26eac243.js} +1 -1
  40. package/build/{index-ba0c5199.js → index-47d10bf9.js} +1 -1
  41. package/build/{index-4f4caffc.js → index-7dad6750.js} +1 -1
  42. package/build/{index-5261d727.js → index-8ac646d5.js} +1 -1
  43. package/build/{index-b869f138.js → index-910a1963.js} +1 -1
  44. package/build/index-99b3a587.js +1 -0
  45. package/build/{index-8ba54851.js → index-e0601dd6.js} +1 -1
  46. package/build/index.js +1 -1
  47. package/build/{index.styled-9a110f10.js → index.styled-7f5e220d.js} +1 -1
  48. package/build/{index.styled-d6c94662.js → index.styled-ed8a2b2a.js} +1 -1
  49. package/build/{lazyLoad-912c7f19.js → lazyLoad-9057b459.js} +1 -1
  50. package/build/navigation.js +1 -1
  51. package/build/navigationLayout_deprecated.js +1 -1
  52. package/build/{routing-b37fabee.js → routing-cb99a6a0.js} +1 -1
  53. package/build/together.js +1 -1
  54. package/build/{togetherComponentGlobalContext-3c3921c0.js → togetherComponentGlobalContext-904cd42b.js} +1 -1
  55. package/build/translationsContext-af789c7c.js +1 -0
  56. package/build/translationsProvider-04343e8a.js +1 -0
  57. package/build/{types-aff30aac.js → types-6f225c17.js} +1 -1
  58. package/build/{types-13acee37.js → types-77d76fa7.js} +1 -1
  59. package/build/{useHealthToolCache-0bad7b9e.js → useHealthToolCache-c3e430e3.js} +1 -1
  60. package/package.json +1 -1
  61. package/build/esm/index-bd2b4f11.js +0 -1
  62. package/build/esm/routing-04007731.js +0 -1
  63. package/build/esm/translationsContext-f9a08cfc.js +0 -1
  64. package/build/esm/translationsProvider-6034aea5.js +0 -1
  65. package/build/index-b243390f.js +0 -1
  66. package/build/translationsContext-663106a3.js +0 -1
  67. package/build/translationsProvider-e65587c1.js +0 -1
@@ -0,0 +1 @@
1
+ import{w as t,y as a}from"./lazyLoad-9702fa7e.js";var c=function(c,o){var e="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return e?"http://localhost:3000":"https://".concat(!e&&!a?o?"fe.":"discover.":o?"www.":"").concat(t[o?"vi-VN_MB":c])},o=function(c,o){return"https://".concat(a?"id.":"staging-id.").concat(t[o?"vi-VN_MB":c])},e=function(){return"https://".concat(a?"together.":"staging-together.","hellohealthgroup.com")},n=function(c){return"https://".concat(a?"wp.":"staging.").concat(t[c])},r=function(){return"https://".concat(a?"health-care.":"service-health-care.","hellohealthgroup.com")};export{o as a,e as b,n as c,r as d,c as g};
@@ -1 +1 @@
1
- export{C as CardLink,q as CardPost,r as CardPostPopoverMore,b as CardReactions,s as CardReply,v as CardReplyPopover,f as CreateNewPostContent,g as CreatePostDescription,h as CreatePostTitle,n as ImagePreviewPopup,I as InputCommentBar,d as LabelPin,L as LabelSortPin,e as LabelSorting,w as PopoverMenu,P as PopupDanger,j as PopupFrame,m as PostContent,p as PostImagePreview,o as PostSingleImageViewPopup,l as ShareBox,S as SharePopup,k as SubmitReportForm,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,i as TopicSelectList,u as useTogetherAuthRequiredAction}from"./types-7130a456.js";export{C as CardAuthor,L as Loading,a as PopupDoctor,P as PopupExpert,b as PopupHospital,d as TogetherDataTransforms,U as UserAvatar}from"./index-cbc324ad.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./togetherComponentGlobalContext-f8ea64d0.js";import"react";import"./index.styled-4e3897dc.js";import"./tslib.es6-38c4ccef.js";import"styled-components";import"./lazyLoad-b7b94ece.js";import"./translationsContext-f9a08cfc.js";import"string-format";import"vanilla-lazyload";import"./index-ff49b928.js";import"./index-70e0d1d4.js";import"innertext";import"react-range";import"react-dom";import"lodash/debounce";import"date-fns";import"./index-0e5bd1fb.js";import"react-contenteditable";import"./cookieHelper-0e8521c3.js";import"./number-3cb24023.js";import"lodash";import"./index-bd2b4f11.js";import"date-fns/locale/en-US";import"date-fns/locale/hi";import"date-fns/locale/id";import"date-fns/locale/ms";import"date-fns/locale/th";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"react-id-generator";import"slugify";
1
+ export{C as CardLink,q as CardPost,r as CardPostPopoverMore,b as CardReactions,s as CardReply,v as CardReplyPopover,f as CreateNewPostContent,g as CreatePostDescription,h as CreatePostTitle,n as ImagePreviewPopup,I as InputCommentBar,d as LabelPin,L as LabelSortPin,e as LabelSorting,w as PopoverMenu,P as PopupDanger,j as PopupFrame,m as PostContent,p as PostImagePreview,o as PostSingleImageViewPopup,l as ShareBox,S as SharePopup,k as SubmitReportForm,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,i as TopicSelectList,u as useTogetherAuthRequiredAction}from"./types-fd89a516.js";export{C as CardAuthor,L as Loading,a as PopupDoctor,P as PopupExpert,b as PopupHospital,d as TogetherDataTransforms,U as UserAvatar}from"./index-e6b4cdad.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./togetherComponentGlobalContext-104fdffa.js";import"react";import"./index.styled-f8bcaba1.js";import"./tslib.es6-38c4ccef.js";import"styled-components";import"./lazyLoad-9702fa7e.js";import"./translationsContext-873337b8.js";import"string-format";import"vanilla-lazyload";import"./index-5abf3144.js";import"./index-bdc8c779.js";import"innertext";import"react-range";import"react-dom";import"lodash/debounce";import"date-fns";import"./index-b0eba32e.js";import"react-contenteditable";import"./cookieHelper-0e8521c3.js";import"./number-3cb24023.js";import"lodash";import"./index-3bf7af06.js";import"date-fns/locale/en-US";import"date-fns/locale/hi";import"date-fns/locale/id";import"date-fns/locale/ms";import"date-fns/locale/th";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"react-id-generator";import"slugify";
@@ -1 +1 @@
1
- import e,{useState as t,useEffect as r,createContext as o}from"react";import{K as a}from"./index.styled-4e3897dc.js";import{b as n,_ as i,a as l,c as s}from"./tslib.es6-38c4ccef.js";import{M as c}from"./lazyLoad-b7b94ece.js";import u from"styled-components";import{g as d}from"./cookieHelper-0e8521c3.js";import _ from"slugify";import p from"string-format";var E,m,h={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},T=function(o){var n=o.type,i=void 0===n?"square":n,l=o.size,s=o.avatarImg,c=o.avatarUrl,u=o.firstLetter,d=o.backgroundColor,_=o.onClick,p=o.style,E=o.className,m=o.isAmp,T=void 0!==m&&m,v=o.width,g=o.height,b=l?h[l]:void 0,A=t(!1),O=A[0],L=A[1];r((function(){if(c){var e=document.createElement("img");e.setAttribute("src",c),e.addEventListener("error",(function(){L(!0)}))}}),[c,L]);var f=(!c&&!s||O)&&u;return e.createElement(a,{style:p,"data-avatar-type":i,onClick:_,className:E,size:T?void 0:b,backgroundColor:d,avatarUrl:c,"data-is-amp":T,width:v,height:g},s,c&&!O&&e.createElement("img",{src:c}),f&&u)},v=u.div(E||(E=n(["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"],["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.gray200}),c.mbDown,c.mbDown,c.mbUp),g=u.div(m||(m=n(["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"],["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"]))),b=function(t){var r=t.type,o=void 0===r?"lead":r,a=t.closeIcon,n=t.isOpen,i=void 0===n||n,l=t.onClose,s=t.children,c=t.className,u=void 0===c?"":c,d=t.enableAnimation,_=void 0===d||d;return e.createElement(e.Fragment,null,e.createElement(v,{"data-open":i,"data-type":o,"data-animation":_},e.createElement("div",{className:"".concat(u||""," popup-content")},!!a&&e.createElement("div",{className:"close-button",onClick:l},a),s)),e.createElement(g,{"data-open":i,onClick:l}))},A={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}"},O={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},L={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},f={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},I=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},o=(t||{}).decode||y,a=0;for(;a<e.length;){var n=e.indexOf("=",a);if(-1===n)break;var i=e.indexOf(";",a);if(-1===i)i=e.length;else if(i<n){a=e.lastIndexOf(";",n-1)+1;continue}var l=e.slice(a,n).trim();if(void 0===r[l]){var s=e.slice(n+1,i).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),r[l]=D(s,o)}a=i+1}return r},w=function(e,t,r){var o=r||{},a=o.encode||P;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!S.test(e))throw new TypeError("argument name is invalid");var n=a(t);if(n&&!S.test(n))throw new TypeError("argument val is invalid");var i=e+"="+n;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(l)}if(o.domain){if(!S.test(o.domain))throw new TypeError("option domain is invalid");i+="; Domain="+o.domain}if(o.path){if(!S.test(o.path))throw new TypeError("option path is invalid");i+="; Path="+o.path}if(o.expires){var s=o.expires;if(!function(e){return"[object Date]"===R.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+s.toUTCString()}o.httpOnly&&(i+="; HttpOnly");o.secure&&(i+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i},R=Object.prototype.toString,S=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function y(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function P(e){return encodeURIComponent(e)}function D(e,t){try{return t(e)}catch(t){return e}}var N={parse:I,serialize:w},G="/images/avatar.jpg",k="/images/default-image.jpg",x={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR"},C={"id-ID":{"kalkulator-bmi":x.BMI,"kebutuhan-kalori":x.BMR,"kalkulator-hari-perkiraan-lahir":x.DUE_DATE,"kalkulator-masa-subur-2":x.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":x.PWG,"kalkulator-detak-jantung-saat-olahraga":x.THR},"ms-MY":{"kalkulator-bmi":x.BMI,"kalkulator-bmr":x.BMR,"kalkulator-tarikh-bersalin":x.DUE_DATE,"kalkulator-kesuburan":x.OVULATION,"kalkulator-tambah-berat-badan-hamil":x.PWG,"target-heart-rate-calculator":x.THR},"vi-VN":{"cach-tinh-chi-so-bmi":x.BMI,"tinh-chi-so-bmr":x.BMR,"cong-cu-tinh-ngay-du-sinh":x.DUE_DATE,"tinh-ngay-rung-trung":x.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":x.PWG,"cong-cu-do-nhip-tim":x.THR},"zh-TW":{"bmi-calculator":x.BMI,"bmr-calculator":x.BMR,"due-date-calculator":x.DUE_DATE,"ovulation-calculator":x.OVULATION,"pregnancy-weight-gain-calculator":x.PWG,"target-heart-rate-calculator":x.THR},"en-PH":{"bmi-calculator":x.BMI,"bmr-calculator":x.BMR,"due-date-calculator":x.DUE_DATE,"ovulation-calculator":x.OVULATION,"pregnancy-weight-gain-calculator":x.PWG,"target-heart-rate-calculator":x.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":x.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":x.BMR,"เครื่องมือคำนวณกำหนดคลอด":x.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":x.OVULATION,"เครื่องคำนวณน้ำหนักตัว":x.PWG,"เครื่องวัดอัตราการเต้น":x.THR},"hi-IN":{"bmi-calculator-en":x.BMI,"bmi-calculator":x.BMI,"bmr-calculator":x.BMR,"delivery-date-calculator":x.DUE_DATE,"ovulation-calculator":x.OVULATION,"pregnancy-weight-gain-calculator":x.PWG,"target-heart-rate-calculator":x.THR},"km-KH":{"គណនា-bmi":x.BMI,"គណនា-bmr":x.BMR,"គណនាថ្ងៃសម្រាលកូន":x.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":x.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":x.PWG,"គណនារកចង្វាក់បេះដូងល្អ":x.THR},"my-MM":{"bmi-calculator":x.BMI,"bmr-calculator":x.BMR,"due-date-calendar":x.DUE_DATE,"ovulation-calculator":x.OVULATION,"pregnaancy-weight-calculator":x.PWG,"target-heartrate":x.THR,"pregnancy-weight-calculator":x.PWG,"target-heart-rate":x.THR}},M="hhg_user_token",U={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},B=20,H={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}},F=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DEFAULT_AVATAR_IMG:"/images/avatar.jpg",DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:"/images/default-image.jpg",BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:x,LOCALE_HEALTH_TOOLS:C,BEARER_TOKEN_COOKIE:"hhg_user_token",TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:"together_admin_token",Z_INDEX:{adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:"hhg-id",GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:U,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:H}),K={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},V={"vi-VN":"marrybaby.vn"},Y=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",j=function(e){var t=ue.env.isMarryBaby;return"https://".concat(t?V[e]:K[e])},W=function(e){var t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},z=function(e){var t=ue.env.isMarryBaby;if("undefined"!=typeof window)return window.location.origin;var r="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":"https://".concat(r?t?"fe.":"discover.":t?"www.":"").concat(K[e])},X=function(e,t,r){return"undefined"!=typeof window?window.location.href:"".concat(z(e)).concat(t).concat(r)},$=function(e,t,r){var o="";r&&(o=Object.keys(r).map((function(e){return e+"="+r[e]})).join("&"));var a=((null==ue?void 0:ue.env)||{}).togetherBaseApiUrl,n=void 0===a?"":a,i=p(e,s(s({},(null==t?void 0:t._locale)?{website_url:j(String(t._locale))}:{}),t));return i+="".concat(i.includes("?")?"&":"?").concat(o),n+"api/v1/"+W(i)},q=function(e,t){var r=((null==ue?void 0:ue.env)||{}).discoverBaseApiUrl;return(void 0===r?"":r)+"wp-json/api/"+W(p(e,s({},t)))},J=function(e,t){var r=((null==ue?void 0:ue.env)||{}).careBaseApiUrl;return((void 0===r?"":r)||"https://service-health-care.hellohealthgroup.com/")+W(p(e,s({},t)))},Z=function(e){return(null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e},Q=function(e,t,r,o){return void 0===o&&(o=!1),i(void 0,void 0,void 0,(function(){var a,n,i,c,u;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,fetch(o?e:(d=e,encodeURI(d).replace(/%5B/g,"[").replace(/%5D/g,"]")),s({method:t},Z(r))).then((function(e){return e.json()}))];case 1:return(a=l.sent())?[2,a]:[3,3];case 2:return n=l.sent(),console.log(n),console.log({url:e,status:null===(i=null==n?void 0:n.response)||void 0===i?void 0:i.status,statusText:null===(c=null==n?void 0:n.response)||void 0===c?void 0:c.statusText}),[2,(null===(u=null==n?void 0:n.response)||void 0===u?void 0:u.data)||null];case 3:return[2,null]}var d}))}))},ee=function(e,t,r,o){return void 0===t&&(t="GET"),i(void 0,void 0,void 0,(function(){var a,n,i,c,u,_,p,E,m,h,T,v,g,b;return l(this,(function(l){switch(l.label){case 0:if(l.trys.push([0,7,,8]),a="string"==typeof e?e:e.url,n="string"==typeof e?e:e.backupUrl,i=N.parse(o||""),c=i.hhg_user_token,!(u=c||d("hhg_user_token"))||!u.length)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,fetch(a,s(s({method:t},Z(r)),{headers:{Authorization:"Bearer "+u}})).then((function(e){return e.json()}))];case 2:return _=l.sent(),(null===(m=null==_?void 0:_.messages)||void 0===m?void 0:m.find((function(e){return"Unauthenticated"===(null==e?void 0:e.toLowerCase())})))?[2,Q(n||a,t,r)]:_?[2,_]:[3,4];case 3:return p=l.sent(),console.log({status:null===(h=null==p?void 0:p.response)||void 0===h?void 0:h.status,statusText:null===(T=null==p?void 0:p.response)||void 0===T?void 0:T.statusText}),[2,Q(n||a,t,r)];case 4:return[3,6];case 5:return[2,Q(n||a,t,r)];case 6:return[3,8];case 7:return E=l.sent(),console.log({status:null===(v=null==E?void 0:E.response)||void 0===v?void 0:v.status,statusText:null===(g=null==E?void 0:E.response)||void 0===g?void 0:g.statusText}),[2,(null===(b=null==E?void 0:E.response)||void 0===b?void 0:b.data)||null];case 8:return[2,null]}}))}))},te=function(e,t,r,o){return i(void 0,void 0,void 0,(function(){var a,n,i,c;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),a=N.parse(o||""),n=a.hhg_user_token,(i=n||d("hhg_user_token"))&&i.length?[4,fetch(e,s(s({method:t},Z(r)),{headers:{Authorization:"Bearer "+i}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=l.sent())return[2,c];l.label=2;case 2:return[3,4];case 3:return l.sent(),[2,null];case 4:return[2,null]}}))}))},re=function(e,t,r,o){return i(void 0,void 0,void 0,(function(){var a,n,i,c;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),a=N.parse(o||""),n=a.together_admin_token,(i=n||d("together_admin_token"))&&i.length?[4,fetch(e,s(s({method:t},Z(r)),{headers:{Authorization:"Bearer "+i}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=l.sent())return[2,c];l.label=2;case 2:return[3,4];case 3:return l.sent(),[2,null];case 4:return[2,null]}}))}))};function oe(e,t,r){var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+r+"$2"):e+a+t+"="+r}var ae=function(e,t,r){void 0===r&&(r="/community");var o=e||("undefined"!=typeof window?window.location.href:"/"),a="undefined"!=typeof window?window.location.origin:"";return a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/")),function(e,t){var r=ue.env.publicSSO,o=e||window.location.href;return t&&Object.keys(t).map((function(e){oe(o,e,t[e])})),oe(o,"source","communities"),r?"".concat(r,"?returnUrl=").concat(encodeURIComponent(o.toString())):o}("".concat(a).concat(r,"/on-boarding?return=").concat(encodeURIComponent(o)),t)},ne=function(e,t,r,o){return r&&t?"".concat(r,"-").concat(t):"".concat(_(e||"",{lower:!0,locale:o||Y}),"-").concat(t)},ie=function(e){var t,r=e.name,o=e.id,a=e.locale;return"/care/".concat(null===(t=H[a||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(ne(r,o))},le=function(e){var t,r=e.name,o=e.id,a=e.slug,n=e.locale;return"/care/".concat(null===(t=H[n||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(ne(r,o,a))},se={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},ce=o({data:se,action:{pushNotifications:function(e){return e},sanitizeFunction:function(e){return e}}}),ue=se,de=function(o){var a=o.locale,n=void 0===a?"vi-VN":a,i=o.children,l=o.userInfo,s=o.router,c=o.env,u=void 0===c?{isMarryBaby:!1,togetherBasePath:"/community"}:c,d=o.sanitizeFunction,_=void 0===d?function(e){return e}:d,p=o.pushNotifications,E=void 0===p?function(){return!1}:p,m=t(),h=m[0],T=m[1];return ue={userInfo:l,locale:n,togetherUserId:h,router:s,env:u},r((function(){(null==l?void 0:l.id)&&te($(A.PROFILE,{_locale:n}),"GET").then((function(e){var t;T(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==l?void 0:l.id]),e.createElement(ce.Provider,{value:{data:{userInfo:l,locale:n,togetherUserId:h,router:s,env:u},action:{pushNotifications:E,sanitizeFunction:_}}},i)};export{T as A,M as B,O as C,se as D,ue as G,B as M,b as P,U as R,ce as T,de as a,k as b,F as c,Q as d,$ as e,A as f,ae as g,X as h,f as i,re as j,te as k,G as l,J as m,z as n,K as o,ee as p,le as q,ie as r,q as s,L as t};
1
+ import e,{useState as t,useEffect as r,createContext as o}from"react";import{K as a}from"./index.styled-f8bcaba1.js";import{b as n,_ as i,a as l,c as s}from"./tslib.es6-38c4ccef.js";import{M as c}from"./lazyLoad-9702fa7e.js";import u from"styled-components";import{g as d}from"./cookieHelper-0e8521c3.js";import _ from"slugify";import p from"string-format";var E,m,h={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},T=function(o){var n=o.type,i=void 0===n?"square":n,l=o.size,s=o.avatarImg,c=o.avatarUrl,u=o.firstLetter,d=o.backgroundColor,_=o.onClick,p=o.style,E=o.className,m=o.isAmp,T=void 0!==m&&m,v=o.width,g=o.height,b=l?h[l]:void 0,A=t(!1),O=A[0],f=A[1];r((function(){if(c){var e=document.createElement("img");e.setAttribute("src",c),e.addEventListener("error",(function(){f(!0)}))}}),[c,f]);var L=(!c&&!s||O)&&u;return e.createElement(a,{style:p,"data-avatar-type":i,onClick:_,className:E,size:T?void 0:b,backgroundColor:d,avatarUrl:c,"data-is-amp":T,width:v,height:g},s,c&&!O&&e.createElement("img",{src:c}),L&&u)},v=u.div(E||(E=n(["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"],["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.gray200}),c.mbDown,c.mbDown,c.mbUp),g=u.div(m||(m=n(["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"],["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"]))),b=function(t){var r=t.type,o=void 0===r?"lead":r,a=t.closeIcon,n=t.isOpen,i=void 0===n||n,l=t.onClose,s=t.children,c=t.className,u=void 0===c?"":c,d=t.enableAnimation,_=void 0===d||d;return e.createElement(e.Fragment,null,e.createElement(v,{"data-open":i,"data-type":o,"data-animation":_},e.createElement("div",{className:"".concat(u||""," popup-content")},!!a&&e.createElement("div",{className:"close-button",onClick:l},a),s)),e.createElement(g,{"data-open":i,onClick:l}))},A={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}"},O={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},f={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},L={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},I=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},o=(t||{}).decode||y,a=0;for(;a<e.length;){var n=e.indexOf("=",a);if(-1===n)break;var i=e.indexOf(";",a);if(-1===i)i=e.length;else if(i<n){a=e.lastIndexOf(";",n-1)+1;continue}var l=e.slice(a,n).trim();if(void 0===r[l]){var s=e.slice(n+1,i).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),r[l]=D(s,o)}a=i+1}return r},w=function(e,t,r){var o=r||{},a=o.encode||P;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!S.test(e))throw new TypeError("argument name is invalid");var n=a(t);if(n&&!S.test(n))throw new TypeError("argument val is invalid");var i=e+"="+n;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(l)}if(o.domain){if(!S.test(o.domain))throw new TypeError("option domain is invalid");i+="; Domain="+o.domain}if(o.path){if(!S.test(o.path))throw new TypeError("option path is invalid");i+="; Path="+o.path}if(o.expires){var s=o.expires;if(!function(e){return"[object Date]"===R.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+s.toUTCString()}o.httpOnly&&(i+="; HttpOnly");o.secure&&(i+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i},R=Object.prototype.toString,S=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function y(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function P(e){return encodeURIComponent(e)}function D(e,t){try{return t(e)}catch(t){return e}}var N={parse:I,serialize:w},G="/images/avatar.jpg",k="/images/default-image.jpg",x={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR"},C={"id-ID":{"kalkulator-bmi":x.BMI,"kebutuhan-kalori":x.BMR,"kalkulator-hari-perkiraan-lahir":x.DUE_DATE,"kalkulator-masa-subur-2":x.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":x.PWG,"kalkulator-detak-jantung-saat-olahraga":x.THR},"ms-MY":{"kalkulator-bmi":x.BMI,"kalkulator-bmr":x.BMR,"kalkulator-tarikh-bersalin":x.DUE_DATE,"kalkulator-kesuburan":x.OVULATION,"kalkulator-tambah-berat-badan-hamil":x.PWG,"target-heart-rate-calculator":x.THR},"vi-VN":{"cach-tinh-chi-so-bmi":x.BMI,"tinh-chi-so-bmr":x.BMR,"cong-cu-tinh-ngay-du-sinh":x.DUE_DATE,"tinh-ngay-rung-trung":x.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":x.PWG,"cong-cu-do-nhip-tim":x.THR},"zh-TW":{"bmi-calculator":x.BMI,"bmr-calculator":x.BMR,"due-date-calculator":x.DUE_DATE,"ovulation-calculator":x.OVULATION,"pregnancy-weight-gain-calculator":x.PWG,"target-heart-rate-calculator":x.THR},"en-PH":{"bmi-calculator":x.BMI,"bmr-calculator":x.BMR,"due-date-calculator":x.DUE_DATE,"ovulation-calculator":x.OVULATION,"pregnancy-weight-gain-calculator":x.PWG,"target-heart-rate-calculator":x.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":x.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":x.BMR,"เครื่องมือคำนวณกำหนดคลอด":x.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":x.OVULATION,"เครื่องคำนวณน้ำหนักตัว":x.PWG,"เครื่องวัดอัตราการเต้น":x.THR},"hi-IN":{"bmi-calculator-en":x.BMI,"bmi-calculator":x.BMI,"bmr-calculator":x.BMR,"delivery-date-calculator":x.DUE_DATE,"ovulation-calculator":x.OVULATION,"pregnancy-weight-gain-calculator":x.PWG,"target-heart-rate-calculator":x.THR},"km-KH":{"គណនា-bmi":x.BMI,"គណនា-bmr":x.BMR,"គណនាថ្ងៃសម្រាលកូន":x.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":x.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":x.PWG,"គណនារកចង្វាក់បេះដូងល្អ":x.THR},"my-MM":{"bmi-calculator":x.BMI,"bmr-calculator":x.BMR,"due-date-calendar":x.DUE_DATE,"ovulation-calculator":x.OVULATION,"pregnaancy-weight-calculator":x.PWG,"target-heartrate":x.THR,"pregnancy-weight-calculator":x.PWG,"target-heart-rate":x.THR}},M="hhg_user_token",U={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},B=20,H={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}},F=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DEFAULT_AVATAR_IMG:"/images/avatar.jpg",DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:"/images/default-image.jpg",BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:x,LOCALE_HEALTH_TOOLS:C,BEARER_TOKEN_COOKIE:"hhg_user_token",TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:"together_admin_token",Z_INDEX:{adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:"hhg-id",GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:U,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:H}),K={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},V={"vi-VN":"marrybaby.vn"},Y=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",j=function(e){var t=ue.env.isMarryBaby;return"https://".concat(t?V[e]:K[e])},W=function(e){var t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},z=function(e){var t=ue.env.isMarryBaby;if("undefined"!=typeof window)return window.location.origin;var r="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":"https://".concat(r?t?"fe.":"discover.":t?"www.":"").concat(K[e])},X=function(e,t,r){return"undefined"!=typeof window?window.location.href:"".concat(z(e)).concat(t).concat(r)},$=function(e,t,r){var o="";r&&(o=Object.keys(r).map((function(e){return e+"="+r[e]})).join("&"));var a=((null==ue?void 0:ue.env)||{}).togetherBaseApiUrl,n=void 0===a?"":a,i=p(e,s(s({},(null==t?void 0:t._locale)?{website_url:j(String(t._locale))}:{}),t));return i+="".concat(i.includes("?")?"&":"?").concat(o),n+"api/v1/"+W(i)},q=function(e,t){var r=((null==ue?void 0:ue.env)||{}).discoverBaseApiUrl;return(void 0===r?"":r)+"wp-json/api/"+W(p(e,s({},t)))},J=function(e,t){var r=((null==ue?void 0:ue.env)||{}).careBaseApiUrl;return((void 0===r?"":r)||"https://service-health-care.hellohealthgroup.com/")+W(p(e,s({},t)))},Z=function(e){return(null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e},Q=function(e,t,r,o){return void 0===o&&(o=!1),i(void 0,void 0,void 0,(function(){var a,n,i,c,u;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),[4,fetch(o?e:(d=e,encodeURI(d).replace(/%5B/g,"[").replace(/%5D/g,"]")),s({method:t},Z(r))).then((function(e){return e.json()}))];case 1:return(a=l.sent())?[2,a]:[3,3];case 2:return n=l.sent(),console.log(n),console.log({url:e,status:null===(i=null==n?void 0:n.response)||void 0===i?void 0:i.status,statusText:null===(c=null==n?void 0:n.response)||void 0===c?void 0:c.statusText}),[2,(null===(u=null==n?void 0:n.response)||void 0===u?void 0:u.data)||null];case 3:return[2,null]}var d}))}))},ee=function(e,t,r,o){return void 0===t&&(t="GET"),i(void 0,void 0,void 0,(function(){var a,n,i,c,u,_,p,E,m,h,T,v,g,b;return l(this,(function(l){switch(l.label){case 0:if(l.trys.push([0,7,,8]),a="string"==typeof e?e:e.url,n="string"==typeof e?e:e.backupUrl,i=N.parse(o||""),c=i.hhg_user_token,!(u=c||d("hhg_user_token"))||!u.length)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,fetch(a,s(s({method:t},Z(r)),{headers:{Authorization:"Bearer "+u}})).then((function(e){return e.json()}))];case 2:return _=l.sent(),(null===(m=null==_?void 0:_.messages)||void 0===m?void 0:m.find((function(e){return"Unauthenticated"===(null==e?void 0:e.toLowerCase())})))?[2,Q(n||a,t,r)]:_?[2,_]:[3,4];case 3:return p=l.sent(),console.log({status:null===(h=null==p?void 0:p.response)||void 0===h?void 0:h.status,statusText:null===(T=null==p?void 0:p.response)||void 0===T?void 0:T.statusText}),[2,Q(n||a,t,r)];case 4:return[3,6];case 5:return[2,Q(n||a,t,r)];case 6:return[3,8];case 7:return E=l.sent(),console.log({status:null===(v=null==E?void 0:E.response)||void 0===v?void 0:v.status,statusText:null===(g=null==E?void 0:E.response)||void 0===g?void 0:g.statusText}),[2,(null===(b=null==E?void 0:E.response)||void 0===b?void 0:b.data)||null];case 8:return[2,null]}}))}))},te=function(e,t,r,o){return i(void 0,void 0,void 0,(function(){var a,n,i,c;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),a=N.parse(o||""),n=a.hhg_user_token,(i=n||d("hhg_user_token"))&&i.length?[4,fetch(e,s(s({method:t},Z(r)),{headers:{Authorization:"Bearer "+i}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=l.sent())return[2,c];l.label=2;case 2:return[3,4];case 3:return l.sent(),[2,null];case 4:return[2,null]}}))}))},re=function(e,t,r,o){return i(void 0,void 0,void 0,(function(){var a,n,i,c;return l(this,(function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),a=N.parse(o||""),n=a.together_admin_token,(i=n||d("together_admin_token"))&&i.length?[4,fetch(e,s(s({method:t},Z(r)),{headers:{Authorization:"Bearer "+i}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=l.sent())return[2,c];l.label=2;case 2:return[3,4];case 3:return l.sent(),[2,null];case 4:return[2,null]}}))}))};function oe(e,t,r){var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+r+"$2"):e+a+t+"="+r}var ae=function(e,t,r){void 0===r&&(r="/community");var o=e||("undefined"!=typeof window?window.location.href:"/"),a="undefined"!=typeof window?window.location.origin:"";return a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/")),function(e,t){var r=ue.env.publicSSO,o=e||window.location.href;return t&&Object.keys(t).map((function(e){oe(o,e,t[e])})),oe(o,"source","communities"),r?"".concat(r,"?returnUrl=").concat(encodeURIComponent(o.toString())):o}("".concat(a).concat(r,"/on-boarding?return=").concat(encodeURIComponent(o)),t)},ne=function(e,t,r,o){return r&&t?"".concat(r,"-").concat(t):"".concat(_(e||"",{lower:!0,locale:o||Y}),"-").concat(t)},ie=function(e){var t,r=e.name,o=e.id,a=e.locale;return"/care/".concat(null===(t=H[a||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(ne(r,o))},le=function(e){var t,r=e.name,o=e.id,a=e.slug,n=e.locale;return"/care/".concat(null===(t=H[n||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(ne(r,o,a))},se={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},ce=o({data:se,action:{pushNotifications:function(e){return e},sanitizeFunction:function(e){return e}}}),ue=se,de=function(o){var a=o.locale,n=void 0===a?"vi-VN":a,i=o.children,l=o.userInfo,s=o.router,c=o.env,u=void 0===c?{isMarryBaby:!1,togetherBasePath:"/community"}:c,d=o.sanitizeFunction,_=void 0===d?function(e){return e}:d,p=o.pushNotifications,E=void 0===p?function(){return!1}:p,m=t(),h=m[0],T=m[1];return ue={userInfo:l,locale:n,togetherUserId:h,router:s,env:u},r((function(){(null==l?void 0:l.id)&&te($(A.PROFILE,{_locale:n}),"GET").then((function(e){var t;T(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==l?void 0:l.id]),e.createElement(ce.Provider,{value:{data:{userInfo:l,locale:n,togetherUserId:h,router:s,env:u},action:{pushNotifications:E,sanitizeFunction:_}}},i)};export{T as A,M as B,O as C,se as D,ue as G,B as M,b as P,U as R,ce as T,de as a,k as b,F as c,Q as d,$ as e,A as f,ae as g,X as h,L as i,re as j,te as k,G as l,J as m,z as n,K as o,ee as p,le as q,ie as r,q as s,f as t};
@@ -0,0 +1 @@
1
+ import{createContext as e}from"react";var o={"actionPopover.delete":"Delete","actionPopover.deleteNotification":"Delete this notification","actionPopover.edit":"Edit","actionPopover.inviteShareCommunity":"Invite / Share community","actionPopover.joinCommunity":"Join Community","actionPopover.leaveCommunit":"Leave Community","actionPopover.leaveCommunity":"Leave Community","actionPopover.leaveCommunity.accept":"Leave","actionPopover.leaveCommunity.cancel":"Cancel","actionPopover.leaveCommunity.description":"Are you sure you want to leave this community?","actionPopover.leaveCommunity.title":"Leave Community","actionPopover.report":"Report","actionPopover.turnOffNotification":"Turn off notification","actionPopover.turnOffNotificationAbout":"Turn off notification about {label}","actionPopover.turnOnNotification":"Turn on notification","admin.comments":"Comments","admin.communities":"Communities","admin.community":"Community","article.shareOn":"Share on","babyGrowth.alert.bmi":"There is no BMI measurements to display for {name} in WHO data range of 0 to 5 years. Use <a>BMI calculator tool</a> above 5 year old","babyGrowth.alert.head":"There is no head circumference measurements to display for {name} in WHO data range of 0 to 5 years","babyGrowth.alert.weight":"There is no Weight measurements to display for {name} in WHO data range of 0 to 10 years ","babyGrowth.drawer.addMeasurement":"Add a Measurement","babyGrowth.drawer.createBaby":"Create a baby profile","babyGrowth.drawer.switchProfile":"Switch profile","babyGrowth.head":"Head","babyGrowth.headCircumference":"Head Circumference","babyGrowth.height":"Height","babyGrowth.percentiles":"Percentiles","babyGrowth.weight":"Weight","babyVaccineTool.selectGender":"What is your baby’s gender?","booking.searchBar.currentLocation":"Current location","booking.searchBar.grantLocation":"Please grant location permission to search by current location","booking.searchBar.locationPlaceholder":"Enter city","booking.searchBar.noResults":"No Results","booking.searchBar.placeholder.doctor":"Search by doctor name","booking.searchBar.placeholder.hospital":"Search by hospital name","booking.searchBar.placeholder.service":"Search by service","booking.searchBar.placeholder.specialty":"Search by specialty","booking.searchBar.searchButton":"Search","booking.searchBar.searchInput.placeholder":"Search by Specialty or Clinic...","booking.searchBar.useCurrentLocation":"Use my current location","booking.searchPopup.doctors":"Doctors","booking.searchPopup.hospitals":"Hospitals & Clinics","booking.searchPopup.searchIn.doctors":'Search "{name}" in Doctors',"booking.searchPopup.searchIn.hospitals":'Search "{name}" in Hospitals',"booking.searchPopup.searchIn.services":'See "{name}" in Services',"booking.searchPopup.searchIn.specialties":'Search "{name}" in Specialties',"booking.searchPopup.seeAll":"See All","booking.searchPopup.seeLessSpecialties":"See less specialties","booking.searchPopup.seeMoreSpecialties":"See more specialties","booking.searchPopup.services":"Services","booking.searchPopup.specialties":"Specialties","bottomBar.share":"Share","cardAuthor.admin":"Admin","cardAuthor.ambassador":"Ambassador","cardAuthor.expert":"Expert","cardAuthor.guide":"Guide","cardAuthor.influencer":"Influencer","cardAuthor.localAdmin":"Local Admin","cardAuthor.moderator":"Moderator","cardAuthor.sponsor":"Sponsor","cardReactions.comment":"Comment","cardReactions.reply":"Reply","careBooking.bookAnAppointment":"Book an appoinment",character:"Characters","childCard.age.months":"{month} months","childCard.age.oneWeek":"1 week","childCard.age.oneYear":"1 year","childCard.age.oneYearMonth":"1 year {month} months","childCard.age.oneYearOneMonth":"1 year 1 month","childCard.age.week":"{weeks} weeks","childCard.age.yearMonth":"{year} years {month} months","childCard.age.yearNoMonth":"{year} years","childCard.age.yearOneMonth":"{year} years 1 month","childCard.menu.add":"Add a baby profile","childCard.menu.edit":"Edit {name}’s profile","childCard.menu.remove":"Remove {name}’s profile","childCard.menu.switch":"Switch baby profile","childCard.noName":"Baby’s Name","choicePopover.ambassadorPosts":"Ambassador posts","choicePopover.expertPosts":"Expert posts","choicePopover.lastestPost":"Latest posts","choicePopover.latest":"Latest","choicePopover.newest":"Newest","choicePopover.oldest":"Oldest","choicePopover.popular":"Popular","choicePopover.popularPost":"Popular posts","choicePopover.sort":"Sort","chooseBaby.button":"View your Baby Growth Chart","chooseBaby.new":"or Add new baby profile","chooseBaby.placeholder":"Please give baby name","chooseBaby.title":"Choose a Baby profile","comment.count":"{count} comments","comment.seeMoreComments":"See {count} more comments","comment.seeMoreReplies":"See {count} more replies","commentPopup.warning.newPost":"Your question will be public","community.choose":"Choose a community","community.notification.joined":"You joined {name} community","community.notification.left":"You left {name} community",copied:"Copied",copy:"Copy","createPost.popup.description":"Description","createPost.popup.primary":"Tap to select/ unselect topics","createPost.popup.submit":"Post","createPost.popup.success":"New Post Created","createPost.popup.warning":"Select a community to see your following topics","createPost.popup.warningImage":"Maximum 20 images allow, please remove some item below","createPost.popup.wordCount":"{count}/{max} words","createPost.title":"Title","createPost.urlText":"Text","expert.content.description":"Expert's Profile","expert.content.experiences":"Experiences","footer.signUp":"Sign Up Now","gender.female":"Female","gender.male":"Male","home.menu.category.view":"View {category}","home.navigator.menu.care.noDatas.cta":"Book a Doctor","home.navigator.menu.care.noDatas.description":"HelloCare helps patients to find the right medical doctors and service treatment for their needs, in their vicinity.","home.navigator.menu.care.noDatas.title":"Make an appointment with doctors easily","home.navigator.menu.category.noDatas.cta":"Discover now","home.navigator.menu.category.noDatas.description":"Hello Doctor wants to be your most trusted ally to make more informed decisions and to live healthier and happier lives.","home.navigator.menu.category.noDatas.title":"Welcome to Hello Doctor","home.navigator.menu.healthTools.noDatas.cta":"Discover more","home.navigator.menu.healthTools.noDatas.description":"These easy-to-use health assessment tools will help you gauge vital parts of your overall health and wellness.","home.navigator.menu.healthTools.noDatas.title":"Health Tools","home.navigator.menu.spotlightHospitals":"Popular Hospitals","home.navigator.menu.spotlightTools":"Favorite Tools","home.navigator.menu.spotlights":"All In Focus","home.navigator.menu.spotlights.seeAll":"See All In Focus","home.navigator.menu.together.noPosts.cta":"Join Our Communities","home.navigator.menu.together.noPosts.description":"Community is a safe space where you can connect with other members, comment on topics you care about, and receive trusted advice from medical experts on the health issues that matter most.","home.navigator.menu.together.noPosts.title":"Welcome to Community","home.navigator.menu.trendingPosts":"Highlight Posts","home.navigator.menu.trendingPosts.seeMore":"See more","home.navigator.menuItem.allCategories":"See All Categories","home.navigator.menuItem.allCommunities":"See all communities","home.navigator.menuItem.allCommunitiesheadingTitle":"Find your communities","home.navigator.menuItem.allHealthTools":"See All Health Tools","home.navigator.menuItem.allSpecialties":"All specialties","home.navigator.menuItem.allSpotlight":"See All In Focus","home.navigator.menuItem.discover":"Discover","home.navigator.menuItem.healthCategories":"Health Categories","home.navigator.menuItem.healthTools":"Health Tools","home.navigator.menuItem.healthToolsList":"Health Tools","home.navigator.menuItem.helloCare":"Book a Doctor","home.navigator.menuItem.helloEcom":"Pharmacy","home.navigator.menuItem.helloTogether":"Communities","home.navigator.menuItem.language":"Language","home.navigator.menuItem.specialties":"Specialties","home.navigator.menuItem.spotlights":"All In Focus","home.search":"Search {site}","home.seeAll":"See All","home.seeAllCategories":"See All Topics","home.seeExpert":"View Full Expert's Profile","home.seeHospital":"View Full Hospital's Profile","home.seeMore":"See More","home.seeMoreExperts":"See More Experts","hospital.content.description":"Hospital Details","inputComment.replyTo":"Reply to {name}",insert:"Insert","label.latestPost":"Latest Post","label.pinnedPost":"Pinned Post",loading:"loading","login.booking":"Booking with doctor","logout.popup.ask.mb":"Logout of Marry Baby","logout.popup.ask1":"Log Out of Hello Doctor?","logout.popup.ask2":"Are you sure you want to log out?","logout.popup.button.cancel":"Cancel","logout.popup.button.logout":"Log Out","menu.care.searchBySpecialties":"Search by specialty","morePopover.report":"Report","morePopover.report.description":"Help us understand what’s happening with this post. How would you describe it?","morePopover.report.falseNews":"False news","morePopover.report.offensive":"Offensive","morePopover.report.other":"Other","morePopover.report.prohibited":"Prohibited content","morePopover.report.scam":"Misleading or scam","morePopover.report.sex":"Sexually inappropriate","morePopover.report.spam":"Spam","morePopover.report.title":"Report this post","morePopover.report.violence":"Violence","morePopover.reportSubmit.description":"We won’t tell them who reported it. Please check these details:","morePopover.reportSubmit.title":"Submit report?","morePopover.savePost":"Save post","morePopover.share":"Share","morePopover.shareOn":"Share on","morePopover.turnOffNotifications":"Turn off notifications","morePopover.turnOnNotifications":"Turn on notifications","morePopover.unsavePost":"Remove Saved post","navigation.loginJoin":"Log in","navigation.search.input.placeholder":"Search","notification.comment.blocked.message":"This comment contains banned words or phrases and won’t be published","notification.comment.blocked.title":"Blocked comment","notification.comment.premod":"Your comment needs to be reviewed.","notification.comment.rejected":"Your comment contain words that are not allowed.","notification.comment.reportFailed":"Failed!","notification.comment.reportSuccess":"You have successfully reported a comment.","notification.comment.somethingWrong":"Something went wrong.","notification.comment.suspect.message":"This comment contains suspected words or phrases and won’t be published","notification.comment.suspect.title":"Pending comment","notification.comment.systemWithheld":"Your comment needs to be reviewed.","notification.failure":"Something wrong. Try again later!","notification.limitUrlDomain":"Cannot post link outside of Hello Health Group.","notification.post.blocked.message":"This post contains banned words or phrases and won’t be published","notification.post.blocked.title":"Blocked post","notification.post.delete":"Post Deleted","notification.post.suspect.message":"This post contains suspected words or phrases, and is placed for moderator review","notification.post.suspect.title":"Pending post","notification.success":"Success","notification.suspend.message":"Your account has been suspended for violating our terms of service","notification.urlWrongFormat":"Incorrect URL format",orCopyLink:"Or copy link","placeholder.enterTitleHere":"Enter title here","placeholder.enterUrlHere":"Enter URL here","placeholder.enterUrlTextHere":"Enter URL Text here","placeholder.newCmt":"Write a comment","placeholder.newPost":"Start a new post","popup.allTopics":"All Topics","popup.createPost.confirmCloseDescription":"If you discard now, you’ll lose this post","popup.createPost.confirmCloseTitle":"Are you sure?","popup.deleteComment.description":"Delete your comment cannot be undone","popup.deleteComment.title":"Delete comment?","popup.deletePost.accept":"Delete","popup.deletePost.cancel":"Cancel","popup.deletePost.description":"Delete your post cannot be undone","popup.deletePost.title":"Delete post?","popup.discardPost":"Discard post","popup.discardPostEdit":"Discard changes","popup.editPost":"Edit post","popup.keepEditing":"Keep editing","popup.startANewPost":"Start a new post","post.commentCount":"{count} comments","post.likesCount":"{count} likes","post.seeMore":"See More","post.shareCount":"{count} shares","previewPhotos.title":"{name}'s Post","sensitiveMask.blur":"Blur","sensitiveMask.contentWarningDescription":"Warning: The following picture may be disturbing to some viewers. Viewer discretion is advised","sensitiveMask.contentWarningMessage":"These images may be disturbing...","sensitiveMask.unblur":"Show","share.copyLink":"Or copy link","share.letsJoinCommunity":"Let's join {name} community!","share.letsJoinTopic":"Let's join {name} topic!","share.linkCopied":"Link Copied","share.linkShared":"Link Shared Successfully","share.title":"Share","shareContainer.title":"Share the results",submit:"Submit","tab.about":"About","tab.discussion":"Discussions","tab.topic":"Topics","userProfile.nav.card.eCom":"E-commerce","userProfile.nav.card.myBooking":"My Booking","userProfile.nav.card.myCommunity":"My Community","userProfile.nav.card.myFamily":"Family Profiles","userProfile.nav.card.myHealth":"My Health","userProfile.nav.card.mySaved":"Saved","userProfile.nav.header.count.comments":"Comments","userProfile.nav.header.count.posts":"Posts","userProfile.nav.header.count.tools":"Tools","userProfile.nav.header.points":"Points","userProfile.nav.header.viewProfile":"View My Profile","userProfile.nav.menu.accountSettings":"Account Settings","userProfile.nav.menu.disableAccount":"Disable Account","userProfile.nav.menu.help":"Help","userProfile.nav.menu.logout":"Log out","userProfile.nav.menu.password":"Password","userProfile.userRank.ambassador":"Ambassador","userProfile.userRank.doctor":"Doctor","userProfile.userRank.expert":"Expert","userProfile.userRank.influencer":"Influencer","userProfile.userRank.member":"Member"},t=e(null);export{t as T,o as d};