@hhgtech/hhg-components 1.19.16 → 1.19.17

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 (86) hide show
  1. package/build/{useFbDataLayer-49119223.js → ageGenerate-e846bbcb.js} +1 -1
  2. package/build/babyGrowth.js +1 -1
  3. package/build/care.js +1 -1
  4. package/build/components/molecules/babyGrowthChooseProfileDrawer/index.d.ts +3 -1
  5. package/build/components.js +1 -1
  6. package/build/{theme-7830aadf.js → constants-d4ec4195.js} +1 -1
  7. package/build/core.js +1 -1
  8. package/build/ecom.js +1 -1
  9. package/build/esm/ageGenerate-62d82532.js +1 -0
  10. package/build/esm/babyGrowth.js +1 -1
  11. package/build/esm/care.js +1 -1
  12. package/build/esm/components.js +1 -1
  13. package/build/esm/{theme-886d0d2f.js → constants-17d17987.js} +1 -1
  14. package/build/esm/core.js +1 -1
  15. package/build/esm/ecom.js +1 -1
  16. package/build/esm/i18n.js +1 -1
  17. package/build/esm/{index-652b0a74.js → index-12332bd0.js} +1 -1
  18. package/build/esm/{index-913475f3.js → index-2bf6ca32.js} +1 -1
  19. package/build/esm/{index-854bfede.js → index-3386acf9.js} +1 -1
  20. package/build/esm/index-54dd0dc4.js +1 -0
  21. package/build/esm/{index-34fd4ca2.js → index-5917887f.js} +1 -1
  22. package/build/esm/index-c0a77cf9.js +1 -0
  23. package/build/esm/{index-ca8a65c8.js → index-c47f17a7.js} +1 -1
  24. package/build/esm/index.js +1 -1
  25. package/build/esm/{index.styled-6ceb1ffe.js → index.styled-0eba6ff8.js} +1 -1
  26. package/build/esm/index.styled-142eab0d.js +1 -0
  27. package/build/esm/{index.styled-9275ccf5.js → index.styled-c3a83617.js} +1 -1
  28. package/build/esm/navigation.js +1 -1
  29. package/build/esm/number-126ee62e.js +1 -0
  30. package/build/esm/routing-93ed4dbc.js +1 -0
  31. package/build/esm/theme-731042bc.js +1 -0
  32. package/build/esm/together.js +1 -1
  33. package/build/esm/translationsContext-221a5963.js +1 -0
  34. package/build/esm/translationsProvider-3b4b064d.js +1 -0
  35. package/build/esm/types-0402f8a4.js +1 -0
  36. package/build/esm/types-60ef9e30.js +1 -0
  37. package/build/esm/types-9f973275.js +1 -0
  38. package/build/esm/useTranslations-2ba43851.js +1 -0
  39. package/build/i18n.js +1 -1
  40. package/build/{index-0df9a517.js → index-1aff1d46.js} +1 -1
  41. package/build/{index-a8e54837.js → index-2ea715f8.js} +1 -1
  42. package/build/index-3e076261.js +1 -0
  43. package/build/index-740e88b9.js +1 -0
  44. package/build/{index-906c77a2.js → index-b2578f78.js} +1 -1
  45. package/build/{index-a0e1567e.js → index-e517ed0e.js} +1 -1
  46. package/build/index-ee42e5a5.js +1 -0
  47. package/build/index.js +1 -1
  48. package/build/index.styled-0d3afe1b.js +1 -0
  49. package/build/{index.styled-04f94566.js → index.styled-9b7b2095.js} +1 -1
  50. package/build/{index.styled-0b580017.js → index.styled-afb2b3b3.js} +1 -1
  51. package/build/navigation.js +1 -1
  52. package/build/number-95704111.js +1 -0
  53. package/build/routing-3fb6d350.js +1 -0
  54. package/build/theme-6cd33b22.js +1 -0
  55. package/build/together.js +1 -1
  56. package/build/translationsContext-f8e45a1a.js +1 -0
  57. package/build/translationsProvider-91e90e10.js +1 -0
  58. package/build/types-890a575c.js +1 -0
  59. package/build/types-9555904f.js +1 -0
  60. package/build/types-d1bc9a86.js +1 -0
  61. package/build/useTranslations-99cf899e.js +1 -0
  62. package/package.json +1 -1
  63. package/build/esm/index-9644b600.js +0 -1
  64. package/build/esm/index-ea077d6c.js +0 -1
  65. package/build/esm/index.styled-4e2d45c1.js +0 -1
  66. package/build/esm/number-3cb24023.js +0 -1
  67. package/build/esm/routing-d6ceeffd.js +0 -1
  68. package/build/esm/translationsContext-e813aff9.js +0 -1
  69. package/build/esm/translationsProvider-5f0618c7.js +0 -1
  70. package/build/esm/types-209a2b6c.js +0 -1
  71. package/build/esm/types-35f3d422.js +0 -1
  72. package/build/esm/types-ebaf3833.js +0 -1
  73. package/build/esm/useFbDataLayer-e9860653.js +0 -1
  74. package/build/esm/useTranslations-443c50f3.js +0 -1
  75. package/build/index-a8d94311.js +0 -1
  76. package/build/index-d551cf10.js +0 -1
  77. package/build/index-e302ff07.js +0 -1
  78. package/build/index.styled-80cb4d3a.js +0 -1
  79. package/build/number-87b13133.js +0 -1
  80. package/build/routing-1865523f.js +0 -1
  81. package/build/translationsContext-d7c8e0a0.js +0 -1
  82. package/build/translationsProvider-cc84606e.js +0 -1
  83. package/build/types-18923efa.js +0 -1
  84. package/build/types-27402c2a.js +0 -1
  85. package/build/types-cc6f9312.js +0 -1
  86. package/build/useTranslations-3a6e3bef.js +0 -1
@@ -0,0 +1 @@
1
+ import{_ as e}from"./tslib.es6-fd0a5c98.js";import{t as o}from"./theme-731042bc.js";import{i as t}from"./constants-17d17987.js";var i,l=Object.freeze({__proto__:null}),n=Object.freeze({__proto__:null}),a="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV,r="undefined"==typeof window,s=process.env.NEXT_PUBLIC_DEPLOY_LOCALE?process.env.NEXT_PUBLIC_DEPLOY_LOCALE:"vi-VN",u=process.env.NEXT_PUBLIC_GOOGLE_MAP_KEY||"",c=process.env.NEXT_PUBLIC_ADMIN_GOOGLE_LOCATION_KEY,d=process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID||"289442006438-cihobuq1h3r4426pur7u0e43fqdnep59.apps.googleusercontent.com",m={"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"},p=a?"http://localhost:3001":t?"https://".concat(m[s]):"https://discover.".concat(m[s]),_=t?"https://wp.".concat(m[s],"/"):"https://staging.".concat(m[s],"/"),h=process.env.NEXT_PUBLIC_TOGETHER_API_URL&&""!==process.env.NEXT_PUBLIC_TOGETHER_API_URL?process.env.NEXT_PUBLIC_TOGETHER_API_URL:"https://together.".concat(m[s],"/"),E="".concat(p,"/community"),v=process.env.NEXT_PUBLIC_SSO_URL||"http://staging-id.hellobacsi.com/";!function(e){e[e.FEMALE=0]="FEMALE",e[e.MALE=1]="MALE",e[e.ANY=2]="ANY"}(i||(i={}));var I={"vi-VN":{HOME:function(){return JSON.stringify({"@context":"https://schema.org","@graph":[{"@id":"https://hellobacsi.com/shop/#website","@type":"WebSite",description:"Hello Bacsi - Health Information",inLanguage:"vi-VN",name:"Hello Bacsi",potentialAction:[{"@type":"SearchAction","query-input":"required name=search_term_string",target:"https://hellobacsi.com/shop/tim-kiem/?keyword={search_term_string}"}],url:"https://hellobacsi.com/shop/"}]})},CATEGORY:function(e,o,t){return void 0===e&&(e=""),void 0===o&&(o=0),void 0===t&&(t=[]),JSON.stringify({"@context":"https://schema.org","@graph":[{"@id":"https://hellobacsi.com/shop/#breadcrumb","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",item:{"@id":"https://hellobacsi.com/shop/","@type":"WebPage",name:"Hello Bacsi",url:"https://hellobacsi.com/shop/"}},{"@type":"ListItem",item:{"@id":"https://hellobacsi.com/shop/danh-muc","@type":"WebPage",name:"Hello Bacsi - Danh Muc",url:"https://hellobacsi.com/shop/danh-muc"}}]},{"@type":"ItemList",url:e,numberOfItems:o,itemListElement:t}]})},BRAND:function(e,o,t){return void 0===e&&(e=""),void 0===o&&(o=0),void 0===t&&(t=[]),JSON.stringify({"@context":"https://schema.org","@graph":[{"@id":"https://hellobacsi.com/shop/#breadcrumb","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",item:{"@id":"https://hellobacsi.com/shop/","@type":"WebPage",name:"Hello Bacsi",url:"https://hellobacsi.com/shop/"}},{"@type":"ListItem",item:{"@id":"https://hellobacsi.com/shop/thuong-hieu","@type":"WebPage",name:"Hello Bacsi - Thuong Hieu",url:"https://hellobacsi.com/shop/thuong-hieu"}}]},{"@type":"ItemList",url:e,numberOfItems:o,itemListElement:t}]})},BRAND_DETAIL:function(e,o,t){return void 0===e&&(e=""),void 0===o&&(o=0),JSON.stringify({"@context":"https://schema.org","@graph":[{"@id":"https://hellobacsi.com/shop/thuong-hieu/#brand","@type":"BrandDetail",itemListElement:[{"@type":"Item",item:{"@id":"https://hellobacsi.com/shop".concat(e),"@type":"WebPage",name:"Hello Bacsi - Thuong Hieu",url:"https://hellobacsi.com/shop".concat(e)}}]},{"@type":"BrandDetail",url:"https://hellobacsi.com/shop".concat(e),numberOfItems:o,itemListElement:null!=t?t:{}}]})},PRODUCT_DETAIL:function(e,o,t){return void 0===e&&(e=""),void 0===o&&(o=0),JSON.stringify({"@context":"https://schema.org","@graph":[{"@id":"https://hellobacsi.com/shop/san-pham/#product","@type":"ProductDetail",itemListElement:[{"@type":"Item",item:{"@id":"https://hellobacsi.com/shop/san-pham/".concat(e),"@type":"WebPage",name:"Hello Bacsi - Thuong Hieu",url:"https://hellobacsi.com/shop/san-pham/".concat(e)}}]},{"@type":"BrandDetail",url:e,numberOfItems:o,itemListElement:null!=t?t:{}}]})}}},T=Object.freeze({__proto__:null,isDevelopment:a,IS_SSR:r,locale:s,BEARER_TOKEN_COOKIE:"hhg_user_token",BEARER_ADMIN_TOKEN_COOKIE:"hhg_admin_token",GUEST_CART_ID_COOKIE:"hhg_guest_cart_id",GOOGLE_MAP_KEY:u,GOOGLE_ADMIN_LOCATION_KEY:c,GOOGLE_CLIENT_ID:d,GOOGLE_CALENDAR_API_KEY:"",basePath:"shop",SSO_USER_BASE_PATH:"user",CARE_BASE_PATH:"care",COMMUNITY_BASE_PATH:"community",HEALTH_TOOLs_BASE_PATH:"health-tools",NOTIFICATION_TIME_OUT:3e3,DOMAIN_LOCALES:m,DISCOVER_URL_FE:p,DISCOVER_URL_BE:_,TOGETHER_URL_BE:h,TOGETHER_URL_FE:E,SSO_URL:v,DISCOVERY_FOOTER_URL:"#",HEALTH_CARE_FOOTER_URL:"#",HEALTH_TOOLS_FOOTER_URL:"#",HEALTH_TOGETHER_FOOTER_URL:"#",POLICIES_FOOTER_URL:"#",FAQ_FOOTER_URL:"#",SITEMAP_FOOTER_URL:"#",ABOUT_US_FOOTER_URL:"#",EXECUTIVE_BIOS_FOOTER_URL:"#",ADVERTISING_FOOTER_URL:"#",CONTACT_US_FOOTER_URL:"#",ABOUT_GO_CARE_FOOTER_URL:"#",get Gender(){return i},EMAIL_REGEX:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,COUNTRY_SITENAME:{ID:"Hello Sehat",TH:"Hello Khunmor",MY:"Hello Doktor",KH:"Hello Krupet",TW:"Hello Yishi",MM:"Hello Sayarwon",IN:"Hello Swasthya",VN:"Hello Bacsi",PH:"Hello Doctor"},LOCALE_SPECS:{"vi-VN":{LOGO_TYPE:"hellobacsi",SITE_NAME:"HelloBacsi",SITE_NAME_FORMATTED:"Hello Bacsi",HOMEPAGE_IMAGE:"https://hellobacsi.com/images/country-thumbnails/VN.png",SITE_ID:"1",INSIDER_TAG:"//hellobacsivn.api.useinsider.com/ins.js?id=10003798",TOOLTIP_IMAGE:"/images/tooltips-vn.png"},"en-PH":{LOGO_TYPE:"hellodoctor",SITE_NAME:"HelloDoctor",HOMEPAGE_IMAGE:"https://hellodoctor.com.ph/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Doctor",SITE_ID:"9",CATEGORIES_TYPE:"short",INSIDER_TAG:"//hellodoctorph.api.useinsider.com/ins.js?id=10004527",TOOLTIP_IMAGE:"/images/tooltips-ph.png"},"th-TH":{LOGO_TYPE:"hellokhunmor",SITE_NAME:"HelloKhunmor",HOMEPAGE_IMAGE:"https://hellokhunmor.com/images/country-thumbnails/TH.png",SITE_NAME_FORMATTED:"Hello Khunmor",SITE_ID:"3",CATEGORIES_TYPE:"long",INSIDER_TAG:"//hellokhunmor.api.useinsider.com/ins.js?id=10004524",TOOLTIP_IMAGE:"/images/tooltips-th.png"},"km-KH":{LOGO_TYPE:"hellokrupet",SITE_NAME:"HelloKrupet",HOMEPAGE_IMAGE:"https://hellokrupet.com/images/country-thumbnails/KH.JPG",SITE_NAME_FORMATTED:"Hello Krupet",SITE_ID:"4",CATEGORIES_TYPE:"long",INSIDER_TAG:"//hellokrupet.api.useinsider.com/ins.js?id=10004523",TOOLTIP_IMAGE:"/images/tooltips-kh.png"},"my-MM":{LOGO_TYPE:"hellosayarwon",SITE_NAME:"HelloSayarwon",HOMEPAGE_IMAGE:"https://hellosayarwon.com/images/country-thumbnails/PH.png",SITE_NAME_FORMATTED:"Hello Sayarwon",SITE_ID:"7",INSIDER_TAG:"//hellosayarwon.api.useinsider.com/ins.js?id=10004522"},"zh-TW":{LOGO_TYPE:"helloyishi",SITE_NAME:"HelloYishi",HOMEPAGE_IMAGE:"https://helloyishi.com.tw/images/country-thumbnails/TW.png",SITE_NAME_FORMATTED:"Hello Yishi",SITE_ID:"6",INSIDER_TAG:"//helloyishi.api.useinsider.com/ins.js?id=10004526",TOOLTIP_IMAGE:"/images/tooltips-tw.png"},"id-ID":{LOGO_TYPE:"hellosehat",SITE_NAME:"HelloSehat",HOMEPAGE_IMAGE:"https://hellosehat.com/images/country-thumbnails/ID.png",SITE_NAME_FORMATTED:"Hello Sehat",SITE_ID:"2",INSIDER_TAG:"//hellosehat.api.useinsider.com/ins.js?id=10003799",TOOLTIP_IMAGE:"/images/tooltips-id.png"},"hi-IN":{LOGO_TYPE:"helloswasthya",SITE_NAME:"HelloSwasthya",HOMEPAGE_IMAGE:"https://helloswasthya.com/images/country-thumbnails/IN.png",SITE_NAME_FORMATTED:"हैलो स्वास्थ्य",SITE_ID:"8",CATEGORIES_TYPE:"long",INSIDER_TAG:"//helloswasthya.api.useinsider.com/ins.js?id=10004498",TOOLTIP_IMAGE:"/images/tooltips-in.png"},"ms-MY":{LOGO_TYPE:"hellodoktor",SITE_NAME:"HelloDoktor",HOMEPAGE_IMAGE:"https://hellodoktor.com/images/country-thumbnails/MY.png",SITE_NAME_FORMATTED:"Hello Doktor",SITE_ID:"5",INSIDER_TAG:"//hellodoktor.api.useinsider.com/ins.js?id=10004525",TOOLTIP_IMAGE:"/images/tooltips-my.png"}},SOCIAL_MEDIA:{"vi-VN":{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/hellobacsi/",INSTAGRAM:"https://www.instagram.com/hellobacsi/",TWITTER:null,YOUTUBE:"https://www.youtube.com/channel/UCYHzHDXngnB7jkmcQgXwE0w"},"en-PH":{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/HelloDoctorPH/",INSTAGRAM:"https://www.instagram.com/hellodoctor_ph/",TWITTER:null},"km-KH":{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/hellokrupet/",INSTAGRAM:"https://www.instagram.com/hellokrupetofficial/",TWITTER:null,YOUTUBE:"https://www.youtube.com/channel/UCVK4p9YPIMkmoerk3X-y-TQ"},"ms-MY":{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/HelloDoktorMY/",INSTAGRAM:"https://www.instagram.com/_hellodoktor_/",TWITTER:null},"id-ID":{LINKEDIN:"https://www.linkedin.com/company/hello-sehat/",FACEBOOK:"https://www.facebook.com/hellosehat",INSTAGRAM:"https://www.instagram.com/hellosehat/",TWITTER:"https://twitter.com/HelloSehat"},"my-MM":{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/hellosayarwon/",INSTAGRAM:"https://www.facebook.com/hellosayarwon/",TWITTER:null},"zh-TW":{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/helloyishi/",INSTAGRAM:"https://www.instagram.com/helloyishi/",TWITTER:null},"hi-IN":{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/HelloSwasthya/",INSTAGRAM:"https://www.instagram.com/hello_swasthya/",TWITTER:null},"th-TH":{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/hellokhunmor/",INSTAGRAM:"https://www.instagram.com/hellokhunmor/",TWITTER:null,YOUTUBE:"https://www.youtube.com/channel/UCbdbow4UhKfa7rqIhclNPIQ/"}},FLAG_LINKS:{ID:"https://hellosehat.com/",TH:"https://hellokhunmor.com/",MY:"https://hellodoktor.com/",KH:"https://hellokrupet.com/",TW:"https://helloyishi.com.tw/",MM:"https://hellosayarwon.com/",IN:"https://helloswasthya.com/",VN:"https://hellobacsi.com/",PH:"https://hellodoctor.com.ph/"},STATIC_PAGES:{"vi-VN":{PRIVACY:"/privacy",TERM_OF_USE:"/dieu-khoan-su-dung",PRIVACY_POLICY:"/chinh-sach-quyen-rieng-tu",EDITORIAL_CORRECTIONS_POLICY:"/chinh-sach-bien-tap-chinh-sua",ADVERTISING_SPONSOR_POLICY:"/chinh-sach-quang-cao-tai-tro",POLICIES:"/chinh-sach",FAQS:"/thong-tin-quan-trong",SITEMAP:"/sitemap",ABOUT_US:"/about-us",ADVERTISEMENT:"/quang-cao-voi-chung-toi",CONTACT_US:"/lien-he",ABOUT_GO_CARE:"/about-go-care",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/hello-bacsi/",RECRUITMENT:"https://hellohealthgroup.com/careers/"},"km-KH":{POLICIES:"/policies",TERM_OF_USE:"/ខនិងលក្ខខណ្ឌ",PRIVACY_POLICY:"/គោលការណ៍ឯកជនភាព",EDITORIAL_CORRECTIONS_POLICY:"/គោលការណ៍ខ្លឹមសារមាតិកា",ADVERTISING_SPONSOR_POLICY:"/គោលការណ៍ផ្សាយពាណិជ្ជកម",FAQS:"/faqs",SITEMAP:"/sitemap",ABOUT_US:"/about-us",ADVERTISEMENT:"/advertisement",CONTACT_US:"/contact-us",ABOUT_GO_CARE:"/about-go-care",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"/#",RECRUITMENT:"https://hellohealthgroup.com/careers/"},"en-PH":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/"},"my-MM":{POLICIES:"/polisi-terma-syarat",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/pengiklanan",CONTACT_US:"/hubungi-kami",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:" https://hellohealthgroup.com/hello-doktor/",RECRUITMENT:"https://hellohealthgroup.com/careers/"},"zh-TW":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/advertising",CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,FACILITY:"/facility",HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/"},"id-ID":{POLICIES_EN:"/policies",TERM_OF_USE:"/kebijakan-pengguna",PRIVACY_POLICY:"/kebijakan-privasi",EDITORIAL_CORRECTIONS_POLICY:"/kebijakan-editorial",ADVERTISING_SPONSOR_POLICY:"/kebijakan-iklan",POLICIES:"/kebijakan",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/kontak-kami",CONTACT_EN:"/contact",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/hello-sehat/",RECRUITMENT:"https://hellohealthgroup.com/careers/",EDITORIAL_POLICY:"/edit-id",EDITORIAL_POLICY_EN:"/edit-en"},"hi-IN":{POLICIES:"/policies",TERM_OF_USE:"/terms-of-use",PRIVACY_POLICY:"/privacy-policy",EDITORIAL_CORRECTIONS_POLICY:"/editorial-and-corrections-policy",ADVERTISING_SPONSOR_POLICY:"/advertising-and-sponsor-policy",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:null,CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/"},"ms-MY":{POLICIES:"/polisi-terma-syarat",TERM_OF_USE:"/terma-dan-syarat",PRIVACY_POLICY:"/polisi-privasi",EDITORIAL_CORRECTIONS_POLICY:"/polisi-editorial",ADVERTISING_SPONSOR_POLICY:"/polisi-pengiklanan",FAQS:null,SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/pengiklanan",CONTACT_US:"/hubungi-kami",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:" https://hellohealthgroup.com/hello-doktor/",RECRUITMENT:"https://hellohealthgroup.com/careers/"},"th-TH":{POLICIES_EN:"/policies",TERM_OF_USE:"/เงื่อนใขการใช้งาน",PRIVACY_POLICY:"/นโยบายความเป็นส่วนตัว",EDITORIAL_CORRECTIONS_POLICY:"/นโยบายบรรณธิการ",ADVERTISING_SPONSOR_POLICY:"/นโยบายการโฆษณาและผู้สนับสนุน",POLICIES:"/นโยบาย",FAQS:"/คำถามที่พบบ่อย",SITEMAP:null,ABOUT_US:"/about-us",ADVERTISEMENT:"/ลงโฆษณากับเรา",CONTACT_US:"/contact-us",ABOUT_GO_CARE:null,HEALTH_TOOLS:"/health-tools",EXECUTIVE_BIOS:"https://hellohealthgroup.com/management-team/",RECRUITMENT:"https://hellohealthgroup.com/careers/"}},FAVICONS:{"vi-VN":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"km-KH":[{type:"link",rel:"icon",href:"/by-locales/km-KH/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/km-KH/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/km-KH/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/km-KH/icon-270x270.png"}],"en-PH":[{type:"link",rel:"icon",href:"/by-locales/en-PH/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/en-PH/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon",href:"/by-locales/en-PH/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/en-PH/icon-270x270.png"}],"id-ID":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"ms-MY":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"th-TH":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"my-MM":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"zh-TW":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}],"hi-IN":[{type:"link",rel:"shortcut icon",href:"/by-locales/vi-VN/favicon.ico"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-32x32.png",sizes:"32x32"},{type:"link",rel:"icon",href:"/by-locales/vi-VN/icon-192x192.png",sizes:"192x192"},{type:"link",rel:"apple-touch-icon-precomposed",href:"/by-locales/vi-VN/icon-180x180.png"},{type:"meta",name:"msapplication-TileImage",content:"/by-locales/vi-VN/icon-270x270.png"}]},LOCALE_COUNTRY:{"vi-VN":{id:1,name:"Vietnam"},"id-ID":{id:2,name:"Indonesia"},"ms-MY":{id:3,name:"Malaysia"},"km-KH":{id:4,name:"Cambodia"},"en-PH":{id:5,name:"Philippines"},"th-TH":{id:6,name:"Thai Lan"},"my-MM":{id:7,name:"Myanmar"},"zh-TW":{id:8,name:"Taiwan"},"hi-IN":{id:9,name:"India"}},MAX_ALLOWED_IMG_SIZE:20971520,COUNTRY_CODE_BY_LOCALE:{"vi-VN":"vn","id-ID":"id","ms-MY":"my","km-KH":"kh","en-PH":"ph","th-TH":"th","my-MM":"mm","zh-TW":"tw","hi-IN":"in"},COUNTRY_CURRENCY_SYMBOL:{"vi-VN":"₫","id-ID":"Rp","ms-MY":"RM","km-KH":"៛","en-PH":"₱","th-TH":"฿","my-MM":"K","zh-TW":"$","hi-IN":"₹"},CURRENCY_PREFIX:{IDR:"Dimulai dari"},LOCALISED_SLUGS:{"en-PH":{PRODUCT:"product",CATEGORY:"category",BRAND:"brand",SEARCH:"search",PROFILE:"profile",PROFILE_MANAGE_ORDERS:"profile/manage-orders",PROFILE_MANAGE_ADDRESS:"profile/deliver-address",PROFILE_VOUCHER:"profile/voucher",PROFILE_MEMBER_CARD:"profile/member-card",CART:"cart",CART_CHECKOUT:"cart/checkout",ORDER_CONFIRMATION:"order-confirmation",PROMOTION:"promotion"},"vi-VN":{PRODUCT:"san-pham",CATEGORY:"danh-muc",BRAND:"thuong-hieu",SEARCH:"tim-kiem",PROFILE:"ho-so",PROFILE_MANAGE_ORDERS:"ho-so/quan-li-don-hang",PROFILE_MANAGE_ADDRESS:"ho-so/dia-chi-giao-hang",PROFILE_VOUCHER:"ho-so/khuyen-mai",PROFILE_MEMBER_CARD:"ho-so/the-thanh-vien",CART:"gio-hang",CART_CHECKOUT:"gio-hang/thanh-toan",ORDER_CONFIRMATION:"kiem-tra-don-hang",PROMOTION:"khuyen-mai"}},HEADER_LOGO_ALIGNMENT:"188px",globalFontFamily:"Inter",ENABLE_COMMUNITY_LOCALES:["vi-VN","id-ID","ms-MY","en-PH","th-TH"],ENABLE_CARE_LOCALES:["vi-VN","id-ID","en-PH"],ENABLE_HEALTH_PARENTING_LOCALES:["vi-VN","en-PH","id-ID","ms-MY","km-KH","th-TH","my-MM","zh-TW"],SEO_SCHEMA:I});function g(e){return null!=e}var O,A={formatAutoCompleteAddress:function(e){return e&&e.place_id?{placeId:e.place_id,description:e.description||""}:null},formatPrice:function(e,o){var t="string"==typeof e?parseInt(e):e;return new Intl.NumberFormat(o||"vi-VN").format(t)},formatHotSearchKeyword:function(e){return{text:(null==e?void 0:e.name)||""}},formatHelpfulUrl:function(e){return{name:(null==e?void 0:e.name)||"",featuredImage:(null==e?void 0:e.featured_image)||"",url:(null==e?void 0:e.url)||""}},formatCategory:function(e,t,i){var l,n,a,r=i?i+"/"+e.slug:e.slug,s=(null===(n=null===(l=null==e?void 0:e.children)||void 0===l?void 0:l.map)||void 0===n?void 0:n.call(l,(function(o){return A.formatCategory(o,e.id,r)})))||[];return{id:null==e?void 0:e.id,name:(null==e?void 0:e.name)||"",logo:(null==e?void 0:e.logo)||"",slug:(null==e?void 0:e.slug)||"",fullSlug:r||"",children:s,backgroundColor:e.color||o.colors.teal50,parentId:t||0,products:(null===(a=e.products)||void 0===a?void 0:a.map(A.formatProduct))||[]}},formatFooterInfo:function(e){var o,t,i,l,n,a,r,s,u,c,d,m,p,_,h,E,v,I,T,g=(null===(i=null===(t=null===(o=null==e?void 0:e.branch)||void 0===o?void 0:o.branch)||void 0===t?void 0:t.map)||void 0===i?void 0:i.call(t,(function(e){return{flag:e.flag||"",name:e.name||"",url:e.url||""}})))||[],O=(null===(a=null===(n=null===(l=null==e?void 0:e.general)||void 0===l?void 0:l.verified)||void 0===n?void 0:n.map)||void 0===a?void 0:a.call(n,(function(e){return{image:e.image||"",url:e.url||""}})))||[],A=(null===(s=null===(r=null==e?void 0:e.menu)||void 0===r?void 0:r.map)||void 0===s?void 0:s.call(r,(function(e){var o,t;return{menu_title:e.menu_title,items:null===(t=null===(o=e.items)||void 0===o?void 0:o.map)||void 0===t?void 0:t.call(o,(function(e){return{title:e.title,url:e.url}}))}})))||[],f=(null===(d=null===(c=null===(u=null==e?void 0:e.social)||void 0===u?void 0:u.socials)||void 0===c?void 0:c.map)||void 0===d?void 0:d.call(c,(function(e){return{icon:e.icon||"",name:e.name||"",url:e.url||""}})))||[];return{branch:{title:(null===(m=null==e?void 0:e.branch)||void 0===m?void 0:m.title)||"",branch:g},general:{logo:null!==(_=null===(p=null==e?void 0:e.general)||void 0===p?void 0:p.logo)&&void 0!==_?_:"",content:null!==(E=null===(h=null==e?void 0:e.general)||void 0===h?void 0:h.content)&&void 0!==E?E:"",copyright:null!==(I=null===(v=null==e?void 0:e.general)||void 0===v?void 0:v.copyright)&&void 0!==I?I:"",verified:O},menu:A,social:{title:(null===(T=null==e?void 0:e.social)||void 0===T?void 0:T.title)||"",socials:f}}},formatNavigation:function(e){var o,t,i,l,n,a;return{hotSearchKeywords:(null===(t=null===(o=null==e?void 0:e.hot_search_keywords)||void 0===o?void 0:o.map)||void 0===t?void 0:t.call(o,A.formatHotSearchKeyword))||[],helpfulUrls:(null===(l=null===(i=null==e?void 0:e.helpful_urls)||void 0===i?void 0:i.map)||void 0===l?void 0:l.call(i,A.formatHelpfulUrl))||[],categories:(null===(a=null===(n=null==e?void 0:e.categories)||void 0===n?void 0:n.map)||void 0===a?void 0:a.call(n,(function(e){return A.formatCategory(e)})))||[],footer:A.formatFooterInfo(null==e?void 0:e.footer),storeId:(null==e?void 0:e.store_id)||0,customerId:(null==e?void 0:e.customer_id)||0,cartItemsQty:"number"==typeof(null==e?void 0:e.cart_items_qty)?e.cart_items_qty:null}},formatPriceInfo:function(e){return e?{final:e.final||0,regular:e.regular||0,discountPercent:e.discount_percent||0}:null},formatProduct:function(e){var o,t,i,l;if(!e)return null;var n={final:0,regular:0,discountPercent:0};return{id:e.id||0,price:e.price&&A.formatPriceInfo(e.price)||n,thumbnail:e.thumbnail||"",name:e.name||"",averageRating:Number((e.average_rating||0).toFixed(2)),reviewsCount:e.reviews_count||0,tag:e.tag||null,sku:e.sku||"",slug:e.slug||"",images:e.images||[],tags:e.tags||[],unit:e.unit||"",brand:e.brand?{name:e.brand.name||"",image:e.brand.image||"",slug:e.brand.slug||"",productsCount:e.brand.products_count||0}:null,description:e.description||"",productPromotions:(null===(t=null===(o=e.product_promotions)||void 0===o?void 0:o.map)||void 0===t?void 0:t.call(o,A.formatProductPromotion).filter(g))||[],categories:(null===(l=null===(i=e.categories)||void 0===i?void 0:i.map)||void 0===l?void 0:l.call(i,(function(e){return A.formatCategory(e)})).filter(g))||[],isInStock:(null==e?void 0:e.is_in_stock)||!1}},formatBanner:function(e){return e?{name:e.name||"",url:e.url||"",featuredImage:e.featured_image||"",alt:e.image_alt}:null},formatBlogPost:function(e){var o,t;return e?{title:e.title||"",image:e.image||"",link:e.link||"",postData:e.post_data?{reviewed:e.post_data.reviewed?{author:A.formatBlogPostDataReviewedUser(e.post_data.reviewed.author||void 0),editor:A.formatBlogPostDataReviewedUser(e.post_data.reviewed.editor||void 0),expert:A.formatBlogPostDataReviewedUser(e.post_data.reviewed.expert||void 0),factCheck:A.formatBlogPostDataReviewedUser(e.post_data.reviewed.fact_check||void 0),isAuthor:Boolean(e.post_data.reviewed.is_author)}:null,categories:e.post_data.categories?null===(t=(o=e.post_data.categories).map)||void 0===t?void 0:t.call(o,(function(e){return{termId:e.term_id||0,name:e.name||"",permalink:e.permalink||"",textColor:e.text_color||""}})):[],postDate:e.post_data.post_date||"",postModified:e.post_data.post_modified||"",modifiedTime:e.post_data.modified_time||""}:null}:null},formatBlogPostDataReviewedUser:function(e){return e?{id:e.ID||0,userId:e.user_id||0,formerRole:e.former_role||"",role:e.role||"",slug:e.slug||"",displayName:e.display_name||"",description:e.description||"",profileUrl:e.profile_url||"",avatar:e.avatar||"",avatarThumbnail:e.avatar_thumbnail||"",turnOffProfile:Boolean(e.turn_off_profile)}:null},formatBrand:function(e){var o,t,i,l;return e?{id:e.id||0,image:e.image||"",position:e.position||"",isPopular:e.is_popular||!1,summary:e.summary||"",name:e.name||"",slug:e.slug||"",description:e.description||null,banners:(null===(t=null===(o=e.banners)||void 0===o?void 0:o.map)||void 0===t?void 0:t.call(o,A.formatBanner).filter(g))||[],bestsellerProducts:(null===(l=null===(i=e.bestseller_products)||void 0===i?void 0:i.map)||void 0===l?void 0:l.call(i,A.formatProduct).filter(g))||[]}:null},formatHomePage:function(e){var o,t,i,l,n,a,r,s,u,c,d,m,p,_,h,E,v,I,T,O;return e?{brands:e.brands?null===(t=(o=e.brands).map)||void 0===t?void 0:t.call(o,A.formatBrand).filter(g):[],hotDeals:e.hot_deals?null===(l=(i=e.hot_deals).map)||void 0===l?void 0:l.call(i,A.formatProduct).filter(g):[],newProducts:e.new_products?null===(a=(n=e.new_products).map)||void 0===a?void 0:a.call(n,A.formatProduct).filter(g):[],slideBanners:e.slide_banners?null===(s=(r=e.slide_banners).map)||void 0===s?void 0:s.call(r,A.formatBanner).filter(g):[],subBanners:e.sub_banners?null===(c=(u=e.sub_banners).map)||void 0===c?void 0:c.call(u,A.formatBanner).filter(g):[],footerBanners:e.footer_banners?null===(m=(d=e.footer_banners).map)||void 0===m?void 0:m.call(d,A.formatBanner).filter(g):[],blogPosts:e.blog_posts?null===(_=(p=e.blog_posts).map)||void 0===_?void 0:_.call(p,A.formatBlogPost).filter(g):[],popularCategories:e.popular_categories?null===(E=(h=e.popular_categories).map)||void 0===E?void 0:E.call(h,(function(e){return A.formatCategory(e)})).filter(g):[],suggestProducts:e.suggest_products?null===(I=(v=e.suggest_products).map)||void 0===I?void 0:I.call(v,(function(e){return A.formatCategory(e)})).filter(g):[],promotions:e.promotions?null===(O=(T=e.promotions).map)||void 0===O?void 0:O.call(T,(function(e){return A.formatPromotion(e)})).filter(g):[]}:null},formatCategoryPage:function(e){var o,t,i,l;return e?{id:e.id||0,name:e.name||"",slug:e.slug||"",description:e.description||null,banners:(null===(t=null===(o=e.banners)||void 0===o?void 0:o.map)||void 0===t?void 0:t.call(o,A.formatBanner).filter(g))||[],bestsellerProducts:(null===(l=null===(i=e.bestseller_products)||void 0===i?void 0:i.map)||void 0===l?void 0:l.call(i,A.formatProduct).filter(g))||[]}:null},formatBrandPage:function(e){return e?A.formatBrand(e):null},formatPagination:function(e){return e?{current:e.current||0,first:e.first||0,itemsPerPage:e.items_per_page||0,last:e.last||0,next:e.next||0,prev:e.prev||0,totalItems:e.total_items||0}:null},formatProductDetailPage:function(o){var t,i,l,n,a,r,s,u;return o?e(e({},A.formatProduct(o)),{relatedProducts:(null===(i=null===(t=o.related_products)||void 0===t?void 0:t.map)||void 0===i?void 0:i.call(t,A.formatProduct).filter(g))||[],bestsellerProducts:(null===(n=null===(l=o.bestseller_products)||void 0===l?void 0:l.map)||void 0===n?void 0:n.call(l,A.formatProduct).filter(g))||[],viewedProducts:(null===(r=null===(a=o.viewed_products)||void 0===a?void 0:a.map)||void 0===r?void 0:r.call(a,A.formatProduct).filter(g))||[],promotions:(null===(u=null===(s=o.promotions)||void 0===s?void 0:s.map)||void 0===u?void 0:u.call(s,A.formatPromotion).filter(g))||[]}):null},formatProductReview:function(e){var o,t;return e?{reviewId:e.review_id||"",createdAt:e.created_at||"",title:e.title||"",detail:e.detail||"",nickname:e.nick_name||"",avatar:e.avatar||"",ratingVotes:(null===(t=null===(o=e.rating_votes)||void 0===o?void 0:o.map)||void 0===t?void 0:t.call(o,(function(e){return{ratingCode:e.rating_code||"",value:Number(e.value)||0,percent:Number(e.percent)||0}})))||[],images:e.images||[]}:null},formatProductPromotion:function(e){return e?{id:e.id||0,name:e.name||"",thumbnail:e.thumbnail||"",expirationDate:e.expiration_date||""}:null},formatPromotion:function(e){return e?{id:e.id||0,name:e.name||"",slug:e.slug||"",thumbnail:e.thumbnail||"",expiredDate:e.expired_date||"",banners:e.banners||[],points:0,description:e.description||"",metaTitle:e.meta_title||"",metaKeywords:e.meta_keywords||"",metaDescription:e.meta_description||""}:null},formatCustomAttributes:function(e,o){var t;return(null==e?void 0:e.length)&&(null===(t=null==e?void 0:e.find((function(e){return e.attribute_code===o})))||void 0===t?void 0:t.value)||""},formatAddress:function(e){var o,t,i,l;return e?{id:e.id||0,fullName:e.firstname||"",telephone:e.telephone||"",province:{value:null===(o=e.region)||void 0===o?void 0:o.region_id,label:null===(t=e.region)||void 0===t?void 0:t.region}||null,district:{value:A.formatCustomAttributes(e.custom_attributes,"district_id"),label:A.formatCustomAttributes(e.custom_attributes,"district")},commune:{value:A.formatCustomAttributes(e.custom_attributes,"ward_id"),label:A.formatCustomAttributes(e.custom_attributes,"ward")},street:(null===(i=null==e?void 0:e.street)||void 0===i?void 0:i.length)?null==e?void 0:e.street[0]:"",isDefault:e.default_billing&&e.default_shipping||!1,fullAddress:(null===(l=null==e?void 0:e.extension_attributes)||void 0===l?void 0:l.full_address)||""}:null},formatProvince:function(e){return(null==e?void 0:e.available_regions)?e.available_regions.map((function(e){return{value:e.id||"",label:e.name||""}})):[]},formatDistrict:function(e){return(null==e?void 0:e.districts)?e.districts.map((function(e){return{value:e.id||"",label:e.name||""}})):[]},formatCommune:function(e){return(null==e?void 0:e.communes)?e.communes.map((function(e){return{value:e.id||"",label:e.name||""}})):[]},formatOrder:function(e){var o,t;return e?{orderNumber:(null==e?void 0:e.order_number)||"",shippingData:(null==e?void 0:e.shipping_data)?{shippingMethod:e.shipping_data.shipping_method||"",shippingDescription:e.shipping_data.shipping_description||"",shippingAddress:e.shipping_data.shipping_address?{fullName:e.shipping_data.shipping_address.firstname||"",fullAddress:e.shipping_data.shipping_address.full_address||"",telephone:e.shipping_data.shipping_address.telephone||""}:null,storeAddress:null}:null,orderedDate:(null==e?void 0:e.ordered_date)||"",status:(null==e?void 0:e.status)||null,totals:(null==e?void 0:e.totals)?{subtotal:e.totals.subtotal||0,shippingAmount:e.totals.shipping_amount||0,discountAmount:e.totals.discount_amount||0,grandTotal:e.totals.grand_total||0}:null,products:(null===(t=null===(o=null==e?void 0:e.products)||void 0===o?void 0:o.map)||void 0===t?void 0:t.call(o,(function(e){return{sku:e.sku||"",name:e.name||"",price:e.price||0,rowTotal:e.row_total||0,image:e.image||"",qty:e.qty||0}})))||[],paymentMethod:(null==e?void 0:e.payment_method)||""}:null},formatStatistic:function(e){var o,t,i,l,n;return e?{pending:Number(null===(o=null==e?void 0:e.find((function(e){return"pending"===e.status})))||void 0===o?void 0:o.amount)||0,processing:Number(null===(t=null==e?void 0:e.find((function(e){return"processing"===e.status})))||void 0===t?void 0:t.amount)||0,delivering:Number(null===(i=null==e?void 0:e.find((function(e){return"delivering"===e.status})))||void 0===i?void 0:i.amount)||0,complete:Number(null===(l=null==e?void 0:e.find((function(e){return"complete"===e.status})))||void 0===l?void 0:l.amount)||0,canceled:Number(null===(n=null==e?void 0:e.find((function(e){return"canceled"===e.status})))||void 0===n?void 0:n.amount)||0}:{}},formatCartItem:function(e){var o,t,i,l,n,a,r,s;return e?{itemId:e.item_id||0,sku:e.sku||"",qty:e.qty||0,name:e.name||"",price:e.price||0,basePrice:(null===(o=e.extension_attributes)||void 0===o?void 0:o.base_price)||0,productType:e.product_type||"",quoteId:e.quote_id||"",thumbnail:(null===(t=e.extension_attributes)||void 0===t?void 0:t.thumbnail)||"",rowTotal:(null===(i=e.extension_attributes)||void 0===i?void 0:i.row_total)||0,promotions:(null===(a=null===(n=null===(l=e.extension_attributes)||void 0===l?void 0:l.promotions)||void 0===n?void 0:n.map)||void 0===a?void 0:a.call(n,A.formatProductPromotion))||[],isInStock:(null===(r=e.extension_attributes)||void 0===r?void 0:r.is_in_stock)||!1,urlProduct:(null===(s=e.extension_attributes)||void 0===s?void 0:s.url_key)||""}:null},formatCartAddress:function(e){var o;return e?{customerAddressId:(null==e?void 0:e.customer_address_id)||0,id:e.id||0,region:e.region||"",regionId:e.region_id||0,regionCode:e.region_code||"",countryId:e.country_id||"",street:e.street||[],postcode:e.postcode||"",city:e.city||"",firstname:e.firstname||"",lastname:e.lastname||"",customerId:e.customer_id||0,email:e.email||"",telephone:e.telephone||"",sameAsBilling:e.same_as_billing||0,saveInAddressBook:e.save_in_address_book||0,fullAddress:(null===(o=e.extension_attributes)||void 0===o?void 0:o.full_address)||""}:null},formatEstimatedShipping:function(e){return e?{carrierCode:e.carrier_code||"",methodCode:e.method_code||"",carrierTitle:e.carrier_title||"",methodTitle:e.method_title||"",amount:e.amount||0,baseAmount:e.base_amount||0,available:e.available||!1,errorMessage:e.error_message||"",priceExclTax:e.price_excl_tax||0,priceInclTax:e.price_incl_tax||0}:null},formatCartLoggedInCustomer:function(e){var o,t,i;return e?{email:e.email||"",firstname:e.firstname||"",lastname:e.lastname||"",id:e.id||0,groupId:e.group_id||0,createdAt:e.created_at||"",updatedAt:e.updated_at||"",createdIn:e.created_in||"",storeId:e.store_id||0,websiteId:e.website_id||0,addresses:(null===(t=null===(o=e.addresses)||void 0===o?void 0:o.map)||void 0===t?void 0:t.call(o,A.formatCartAddress))||[],disableAutoGroupChange:e.disable_auto_group_change||0,isSubscribed:(null===(i=e.extension_attributes)||void 0===i?void 0:i.is_subscribed)||!1}:null},formatCart:function(e){var o,t,i,l,n,a,r,s,u,c,d,m,p,_;return e?{id:e.id||0,createdAt:e.created_at||"",updatedAt:e.updated_at||"",isActive:e.is_active||!1,isVirtual:e.is_virtual||!1,items:(null===(i=null===(t=null===(o=e.items)||void 0===o?void 0:o.map)||void 0===t?void 0:t.call(o,A.formatCartItem))||void 0===i?void 0:i.sort((function(e,o){return Number(null==o?void 0:o.isInStock)-Number(null==e?void 0:e.isInStock)})))||[],itemsCount:e.items_count||0,itemsQty:e.items_qty||0,customer:e.customer?A.formatCartLoggedInCustomer(e.customer):null,billingAddress:e.billing_address?A.formatCartAddress(e.billing_address):null,origOrderId:e.orig_order_id||0,currency:{globalCurrencyCode:(null===(l=e.currency)||void 0===l?void 0:l.global_currency_code)||"",baseCurrencyCode:(null===(n=e.currency)||void 0===n?void 0:n.base_currency_code)||"",storeCurrencyCode:(null===(a=e.currency)||void 0===a?void 0:a.store_currency_code)||"",quoteCurrencyCode:(null===(r=e.currency)||void 0===r?void 0:r.quote_currency_code)||"",storeToBaseRate:(null===(s=e.currency)||void 0===s?void 0:s.store_to_base_rate)||0,storeToQuoteRate:(null===(u=e.currency)||void 0===u?void 0:u.store_to_quote_rate)||0,baseToGlobalRate:(null===(c=e.currency)||void 0===c?void 0:c.base_to_global_rate)||0,baseToQuoteRate:(null===(d=e.currency)||void 0===d?void 0:d.base_to_quote_rate)||0},customerIsGuest:e.customer_is_guest||!1,customerNoteNotify:e.customer_note_notify||!1,customerTaxClassId:e.customer_tax_class_id||0,storeId:e.store_id||0,shippingAssignments:null===(_=null===(p=null===(m=e.extension_attributes)||void 0===m?void 0:m.shipping_assignments)||void 0===p?void 0:p.map)||void 0===_?void 0:_.call(p,(function(e){var o,t,i;return{shipping:{address:e.shipping.address?A.formatCartAddress(e.shipping.address):null,method:(null===(o=e.shipping)||void 0===o?void 0:o.method)||""},items:(null===(i=(t=e.items).map)||void 0===i?void 0:i.call(t,A.formatCartItem))||[]}}))}:null},formatCartTotal:function(e){var o,t,i;return e?{grandTotal:e.grand_total||0,baseGrandTotal:e.base_grand_total||0,subtotal:e.subtotal||0,baseSubtotal:e.base_subtotal||0,discountAmount:e.discount_amount||0,baseDiscountAmount:e.base_discount_amount||0,subtotalWithDiscount:e.subtotal_with_discount||0,baseSubtotalWithDiscount:e.base_subtotal_with_discount||0,shippingAmount:e.shipping_amount||0,baseShippingAmount:e.base_shipping_amount||0,shippingDiscountAmount:e.shipping_discount_amount||0,baseShippingDiscountAmount:e.base_shipping_discount_amount||0,taxAmount:e.tax_amount||0,baseTaxAmount:e.base_tax_amount||0,weeeTaxAppliedAmount:e.weee_tax_applied_amount||0,shippingTaxAmount:e.shipping_tax_amount||0,baseShippingTaxAmount:e.base_shipping_tax_amount||0,subtotalInclTax:e.subtotal_incl_tax||0,shippingInclTax:e.shipping_incl_tax||0,baseShippingInclTax:e.base_shipping_incl_tax||0,baseCurrencyCode:e.base_currency_code||"",quoteCurrencyCode:e.quote_currency_code||"",itemsQty:e.items_qty||0,coupon:{couponCode:e.coupon_code||"",couponDescription:(null===(o=null==e?void 0:e.extension_attributes)||void 0===o?void 0:o.coupon_description_text)||""},items:(null===(i=null===(t=e.items)||void 0===t?void 0:t.map)||void 0===i?void 0:i.call(t,(function(e){return{itemId:e.item_id||0,price:e.price||0,basePrice:e.base_price||0,qty:e.qty||0,rowTotal:e.row_total||0,baseRowTotal:e.base_row_total||0,rowTotalWithDiscount:e.row_total_with_discount||0,taxAmount:e.tax_amount||0,baseTaxAmount:e.base_tax_amount||0,taxPercent:e.tax_percent||0,discountAmount:e.discount_amount||0,baseDiscountAmount:e.base_discount_amount||0,discountPercent:e.discount_percent||0,priceInclTax:e.price_incl_tax||0,basePriceInclTax:e.base_price_incl_tax||0,rowTotalInclTax:e.row_total_incl_tax||0,baseRowTotalInclTax:e.base_row_total_incl_tax||0,options:e.options||"",weeeTaxAppliedAmount:e.weee_tax_applied_amount||0,weeeTaxApplied:e.weee_tax_applied||0,name:e.name||""}})))||[],totalSegments:e.total_segments||[]}:null},formatPaymentMethod:function(e){return e?null==e?void 0:e.map((function(e){return{code:(null==e?void 0:e.payment_code)||"",title:(null==e?void 0:e.payment_title)||"",thumbnail:(null==e?void 0:e.payment_thumbnail)||""}})):null},formatPaymentInformation:function(e){var o;return e?{paymentMethods:A.formatPaymentMethod(null===(o=null==e?void 0:e.extension_attributes)||void 0===o?void 0:o.payment_detail_info)||[],totals:A.formatCartTotal(e.totals)}:null},formatOrderConfirmation:function(e){return e?{isSuccess:e.is_success||!1,orderInfo:A.formatOrder(e.order_info)}:null},formatCoupons:function(e){var o;return(null===(o=null==e?void 0:e.items)||void 0===o?void 0:o.length)?e.items.map((function(e){return{code:(null==e?void 0:e.code)||"",name:(null==e?void 0:e.name)||"",thumbnail:(null==e?void 0:e.thumbnail)||"",description:(null==e?void 0:e.expired_date)||""}})):null},formatShippings:function(e){return e?e.map((function(e){var o;return{carrierCode:e.carrier_code||"",methodCode:e.method_code||"",title:e.carrier_title||"",description:e.method_title||"",price:(null==e?void 0:e.base_amount)||0,thumbnail:(null===(o=null==e?void 0:e.extension_attributes)||void 0===o?void 0:o.thumbnail)||""}})):[]}},f=Object.freeze({__proto__:null,dataFormatter:A});!function(e){e.MALE="gender.male",e.FEMALE="gender.female",e.OTHER="gender.other"}(O||(O={}));var b=Object.freeze({__proto__:null,get GenderLabel(){return O},DATE_FORMAT_API:"yyyy-MM-dd",DATE_FORMAT:"dd-MM-yyyy"});export{l as a,T as c,n as d,f as i,b as t};
@@ -0,0 +1 @@
1
+ import{c as e,a as n,_ as t,d as o,e as i}from"./tslib.es6-fd0a5c98.js";import a,{useMemo as r,useState as c,useCallback as l,useEffect as s,useRef as u,useReducer as d}from"react";import{I as p,a as h,d as g}from"./constants-dc22740c.js";import{b as m}from"./constants-17d17987.js";import{g as f,s as C,d as v}from"./cookieHelper-0e8521c3.js";import{M as x,u as y,q as w}from"./useTranslations-2ba43851.js";import b from"lodash/debounce";import{T as E}from"./index.styled-c3a83617.js";import{I as L}from"./index-3386acf9.js";import"react-range";import"react-dom";import"./translationsContext-221a5963.js";import"date-fns";import k,{createGlobalStyle as S}from"styled-components";import{t as M}from"./theme-731042bc.js";import I from"react-loading-skeleton";import{useId as R}from"react-id-generator";import P from"lodash/shuffle";import{u as F}from"./useOutsideClick-6004483a.js";var z,A,T,N,H,V,B,D,O,K,Z,_,j=k.div(z||(z=e([""],[""]))),G=k.div(A||(A=e(["\n --searchbar-z-index: 305;\n &[data-is-modal='true'] {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n height: var(--mobile-care-searchbar-height, 100%);\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n background-color: white;\n z-index: var(--searchbar-z-index);\n }\n"],["\n --searchbar-z-index: 305;\n &[data-is-modal='true'] {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n height: var(--mobile-care-searchbar-height, 100%);\n overflow-y: auto;\n -webkit-overflow-scrolling: touch;\n background-color: white;\n z-index: var(--searchbar-z-index);\n }\n"]))),U=k.section(T||(T=e([""],[""]))),Q=k.input(N||(N=e(["\n position: fixed;\n left: -100%;\n top: -100%;\n"],["\n position: fixed;\n left: -100%;\n top: -100%;\n"]))),q=k(L)(H||(H=e(["\n #booking-search-bar & {\n input {\n font-size: 16px;\n }\n }\n"],["\n #booking-search-bar & {\n input {\n font-size: 16px;\n }\n }\n"]))),W=S(V||(V=e(["\n .care-popup-open {\n overflow: hidden;\n position: fixed;\n &::before {\n content: '';\n inset: 0;\n position: absolute;\n background-color: white;\n min-height: 100vh;\n min-width: 100vw;\n z-index: 2;\n }\n }\n"],["\n .care-popup-open {\n overflow: hidden;\n position: fixed;\n &::before {\n content: '';\n inset: 0;\n position: absolute;\n background-color: white;\n min-height: 100vh;\n min-width: 100vw;\n z-index: 2;\n }\n }\n"]))),Y=function(e){var n=e.className,t=e.color;return a.createElement("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M18 6L6 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M6 6L18 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},J=function(e){var n=e.className,t=e.color;return a.createElement("svg",{width:"14",height:"20",viewBox:"0 0 14 20",className:n},a.createElement("path",{d:"M7 0C3.134 0 0 3.134 0 7C0 10.966 4.404 16.82 6.226 19.071C6.626 19.565 7.374 19.565 7.774 19.071C9.596 16.82 14 10.966 14 7C14 3.134 10.866 0 7 0ZM7 9.5C5.619 9.5 4.5 8.381 4.5 7C4.5 5.619 5.619 4.5 7 4.5C8.381 4.5 9.5 5.619 9.5 7C9.5 8.381 8.381 9.5 7 9.5Z",fill:t||"currentColor"}))},X=function(e){var n=e.className,t=e.color;return a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:n},a.createElement("path",{d:"M9.99967 6.66658C8.15801 6.66658 6.66634 8.15825 6.66634 9.99992C6.66634 11.8416 8.15801 13.3333 9.99967 13.3333C11.8413 13.3333 13.333 11.8416 13.333 9.99992C13.333 8.15825 11.8413 6.66658 9.99967 6.66658ZM17.4497 9.16658C17.0663 5.69158 14.308 2.93325 10.833 2.54992V1.66659C10.833 1.20825 10.458 0.833252 9.99967 0.833252C9.54134 0.833252 9.16634 1.20825 9.16634 1.66659V2.54992C5.69134 2.93325 2.93301 5.69158 2.54967 9.16658H1.66634C1.20801 9.16658 0.833008 9.54158 0.833008 9.99992C0.833008 10.4583 1.20801 10.8333 1.66634 10.8333H2.54967C2.93301 14.3083 5.69134 17.0666 9.16634 17.4499V18.3333C9.16634 18.7916 9.54134 19.1666 9.99967 19.1666C10.458 19.1666 10.833 18.7916 10.833 18.3333V17.4499C14.308 17.0666 17.0663 14.3083 17.4497 10.8333H18.333C18.7913 10.8333 19.1663 10.4583 19.1663 9.99992C19.1663 9.54158 18.7913 9.16658 18.333 9.16658H17.4497ZM9.99967 15.8333C6.77467 15.8333 4.16634 13.2249 4.16634 9.99992C4.16634 6.77492 6.77467 4.16658 9.99967 4.16658C13.2247 4.16658 15.833 6.77492 15.833 9.99992C15.833 13.2249 13.2247 15.8333 9.99967 15.8333Z",fill:t||"currentColor"}))},$=function(e){var n=e.className,t=e.color;return a.createElement("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M11 18C14.866 18 18 14.866 18 11C18 7.13401 14.866 4 11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18Z",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M20 20L16 16",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},ee=function(e){var n=e.width,t=e.height;return a.createElement("svg",{width:n||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}))},ne=k.li(B||(B=e(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n\n > :first-child {\n flex: 1;\n }\n\n > :nth-child(2) {\n flex: 6;\n }\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n\n > :first-child {\n flex: 1;\n }\n\n > :nth-child(2) {\n flex: 6;\n }\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n"])),M.colors.neutral100),te=k.div(D||(D=e(["\n display: flex;\n position: absolute;\n top: 48px;\n min-width: 100%;\n box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),\n 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),\n 0px 0px 1px rgba(0, 0, 0, 0.04);\n border-radius: 6px;\n background-color: white;\n z-index: 30;\n\n "," {\n position: relative;\n top: 0;\n box-shadow: initial;\n }\n"],["\n display: flex;\n position: absolute;\n top: 48px;\n min-width: 100%;\n box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),\n 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),\n 0px 0px 1px rgba(0, 0, 0, 0.04);\n border-radius: 6px;\n background-color: white;\n z-index: 30;\n\n "," {\n position: relative;\n top: 0;\n box-shadow: initial;\n }\n"])),x.mbDown),oe=k.ul(O||(O=e(["\n width: 100%;\n max-height: 600px;\n overflow-y: auto;\n"],["\n width: 100%;\n max-height: 600px;\n overflow-y: auto;\n"]))),ie=k(J)(K||(K=e(["\n width: 12px;\n height: 18px;\n"],["\n width: 12px;\n height: 18px;\n"]))),ae=k.li(Z||(Z=e(["\n position: relative;\n cursor: pointer;\n padding: 12px 18px;\n display: flex;\n align-items: center;\n gap: 14px;\n overflow: hidden;\n\n ","\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n\n &:not([data-is-denied='true']):hover {\n background-color: ",";\n }\n\n &:last-child:hover {\n border-bottom-right-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n\n &:first-child:hover {\n border-top-right-radius: 6px;\n border-top-left-radius: 6px;\n }\n\n &[data-is-denied='true'] {\n cursor: not-allowed;\n }\n"],["\n position: relative;\n cursor: pointer;\n padding: 12px 18px;\n display: flex;\n align-items: center;\n gap: 14px;\n overflow: hidden;\n\n ","\n\n & + li::before {\n content: '';\n position: absolute;\n left: 18px;\n right: 18px;\n top: 0;\n height: 1px;\n background-color: ",";\n }\n\n &:not([data-is-denied='true']):hover {\n background-color: ",";\n }\n\n &:last-child:hover {\n border-bottom-right-radius: 6px;\n border-bottom-left-radius: 6px;\n }\n\n &:first-child:hover {\n border-top-right-radius: 6px;\n border-top-left-radius: 6px;\n }\n\n &[data-is-denied='true'] {\n cursor: not-allowed;\n }\n"])),(function(e){return e.isSelected&&"\n &::after {\n content: ".concat("url(\"data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.9803 0.990669C16.7205 0.99841 16.4739 1.10699 16.2928 1.2934L5.99984 11.5864L2.70687 8.2934C2.61473 8.19743 2.50436 8.12081 2.38223 8.06802C2.2601 8.01524 2.12867 7.98735 1.99563 7.986C1.86259 7.98464 1.73061 8.00985 1.60743 8.06014C1.48426 8.11043 1.37235 8.18479 1.27827 8.27887C1.1842 8.37295 1.10983 8.48485 1.05954 8.60803C1.00926 8.73121 0.98405 8.86318 0.985403 8.99622C0.986757 9.12926 1.01464 9.26069 1.06743 9.38282C1.12021 9.50495 1.19684 9.61532 1.29281 9.70747L5.29281 13.7075C5.48035 13.8949 5.73467 14.0002 5.99984 14.0002C6.26501 14.0002 6.51933 13.8949 6.70687 13.7075L17.7069 2.70747C17.8514 2.567 17.9501 2.38616 17.99 2.18864C18.03 1.99112 18.0093 1.78614 17.9308 1.60055C17.8523 1.41497 17.7195 1.25744 17.5499 1.14861C17.3803 1.03978 17.1817 0.984729 16.9803 0.990669Z' fill='%232685F1'/%3E%3C/svg%3E%0A\")",";\n top: 50%;\n right: 18px;\n position: absolute;\n transform: translateY(-50%);\n }\n ")}),M.colors.neutral100,M.colors.neutral50),re=k((function(e){var t=e.count,o=e.className,i=R(t);return a.createElement(a.Fragment,null,n([],Array(t),!0).map((function(e,n){return a.createElement(ne,{className:o,key:i[n]},a.createElement(I,{count:1,height:32}),a.createElement(I,{count:1,height:24}))})))}))(_||(_=e(["\n &:first-child {\n padding-top: 18px;\n }\n"],["\n &:first-child {\n padding-top: 18px;\n }\n"]))),ce=function(e){var n=e.cities,t=e.isLoading,o=e.onLocationClick,i=e.onCurrentLocationClick,r=e.geoLocationPermission,c=void 0===r?"unset":r,l=e.isLocationLoading,s=e.selectedLocation,u=y().t,d="denied"===c,p=function(){return a.createElement(ae,{role:"button",tabIndex:0,onClick:function(e){d||(e.nativeEvent.stopImmediatePropagation(),l||i())},"data-is-denied":d},d?a.createElement(E,{color:"var(--gray600)",size:"md"},"x"):l?a.createElement(I,{height:20,width:20}):a.createElement(X,{color:M.colors.primaryBase}),a.createElement("div",null,d?a.createElement(E,{color:"var(--gray600)",size:"sm",style:{lineHeight:1.5}},u("booking.searchBar.grantLocation")):l?a.createElement(I,{height:20,style:{width:"calc(100% - 16px)"}}):a.createElement(E,{size:"md"},u("booking.searchBar.useCurrentLocation"))))};return a.createElement(te,{"data-testid":"location-search-results"},a.createElement(oe,null,t?a.createElement(re,{count:5}):!n||n.length<1?a.createElement(a.Fragment,null,p(),a.createElement(ae,{"data-is-denied":"true"},a.createElement(E,{size:"sm",color:"#ccc"},u("booking.searchBar.noResults")))):a.createElement(a.Fragment,null,p(),n.map((function(e){return a.createElement(ae,{key:e.id,onClick:function(n){n.nativeEvent.stopImmediatePropagation(),o&&o(e)},role:"button",tabIndex:0,"aria-label":"Select ".concat(e.name," as location"),isSelected:(null==s?void 0:s.id)===e.id},a.createElement(ie,{color:M.colors.neutral400}),a.createElement(E,{size:"md"},e.name))})))))},le="TYPE_CHARACTER",se="REMOVE_CHARACTER",ue="REMOVE_ALL",de="REMOVE_LAST_VISIBLE_NODE",pe="PAUSE_FOR",he="CHANGE_DELETE_SPEED",ge="CHANGE_DELAY",me="PASTE_STRING",fe=function(e,n){return Math.floor(Math.random()*(n-e+1))+e},Ce="TEXT_NODE",ve=function(){function e(e){var o=this;this.state={lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null},this.options={strings:null,delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,stringSplitter:null,onCreateTextNode:null,onRemoveNode:null},this.start=function(){return o.state.eventLoopPaused=!1,o.runEventLoop(),o},this.pause=function(){return o.state.eventLoopPaused=!0,o},this.stop=function(){return o.state.eventLoop&&(window.cancelAnimationFrame(o.state.eventLoop),o.state.eventLoop=null),o},this.pauseFor=function(e){return o.addEventToQueue(pe,{ms:e}),o},this.typeOutAllStrings=function(){return"string"==typeof o.options.strings?(o.typeString(o.options.strings).pauseFor(o.options.pauseFor),o):(o.options.strings.forEach((function(e){o.typeString(e).pauseFor(o.options.pauseFor).deleteAll(o.options.deleteSpeed)})),o)},this.typeString=function(e,n){if(void 0===n&&(n=null),e){var t=(o.options||{}).stringSplitter,i="function"==typeof t?t(e):e.split("");o.typeCharacters(i,n)}return o},this.pasteString=function(e,n){return void 0===n&&(n=null),e&&o.addEventToQueue(me,{character:e,node:n}),o},this.deleteAll=function(e){return void 0===e&&(e="natural"),o.addEventToQueue(ue,{speed:e}),o},this.changeDeleteSpeed=function(e){if(!e)throw new Error("Must provide new delete speed");return o.addEventToQueue(he,{speed:e}),o},this.changeDelay=function(e){if(!e)throw new Error("Must provide new delay");return o.addEventToQueue(ge,{delay:e}),o},this.deleteChars=function(e){if(!e)throw new Error("Must provide amount of characters to delete");for(var n=0;n<e;n++)o.addEventToQueue(se);return o},this.typeCharacters=function(e,n){if(void 0===n&&(n=null),!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(e){o.addEventToQueue(le,{character:e,node:n})})),o},this.removeCharacters=function(e){if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(){o.addEventToQueue(se)})),o},this.addEventToQueue=function(e,n,t){return void 0===t&&(t=!1),o.addEventToStateProperty(e,n,t,"eventQueue")},this.addReverseCalledEvent=function(e,n,t){return void 0===t&&(t=!1),o.options.loop?o.addEventToStateProperty(e,n,t,"reverseCalledEvents"):o},this.addEventToStateProperty=function(e,t,i,a){void 0===i&&(i=!1);var r={eventName:e,eventArgs:t||{}};return o.state[a]=i?n([r],o.state[a],!0):n(n([],o.state[a],!0),[r],!1),o},this.runEventLoop=function(){o.state.lastFrameTime||(o.state.lastFrameTime=Date.now());var e=Date.now(),i=e-o.state.lastFrameTime;if(!o.state.eventQueue.length){if(!o.options.loop)return;o.state.eventQueue=n([],o.state.calledEvents,!0),o.state.calledEvents=[],o.options=t({},o.state.initialOptions)}if(o.state.eventLoop=window.requestAnimationFrame(o.runEventLoop),!o.state.eventLoopPaused){if(o.state.pauseUntil){if(e<o.state.pauseUntil)return;o.state.pauseUntil=null}var a=n([],o.state.eventQueue,!0),r=a.shift();if(!(i<=(r.eventName===de||r.eventName===se?"natural"===o.options.deleteSpeed?fe(40,80):o.options.deleteSpeed:"natural"===o.options.delay?fe(120,160):o.options.delay))){var c=r.eventName,l=r.eventArgs;switch(c){case me:case le:var s=l.character,u=document.createTextNode(s),d=u;o.options.onCreateTextNode&&"function"==typeof o.options.onCreateTextNode&&(d=o.options.onCreateTextNode(s,u)),o.state.visibleNodes=n(n([],o.state.visibleNodes,!0),[{type:Ce,character:s,node:d}],!1);break;case se:a.unshift({eventName:de,eventArgs:{removingCharacterNode:!0}});break;case pe:var p=r.eventArgs.ms;o.state.pauseUntil=Date.now()+parseInt(p);break;case ue:var h=o.state.visibleNodes,g=l.speed,m=[];g&&m.push({eventName:he,eventArgs:{speed:g,temp:!0}});for(var f=0,C=h.length;f<C;f++)m.push({eventName:de,eventArgs:{removingCharacterNode:!1}});g&&m.push({eventName:he,eventArgs:{speed:o.options.deleteSpeed,temp:!0}}),a.unshift.apply(a,m);break;case de:if(o.state.visibleNodes.length){var v=o.state.visibleNodes.pop(),x=v.node;s=v.character;o.options.onRemoveNode&&"function"==typeof o.options.onRemoveNode&&o.options.onRemoveNode({node:x,character:s}),x&&x.parentNode.removeChild(x)}break;case he:o.options.deleteSpeed=r.eventArgs.speed;break;case ge:o.options.delay=r.eventArgs.delay}o.options.loop&&(r.eventName===de||r.eventArgs&&r.eventArgs.temp||(o.state.calledEvents=n(n([],o.state.calledEvents,!0),[r],!1))),o.state.eventQueue=a,o.state.lastFrameTime=e}}},e&&(this.options=t(t({},this.options),e)),this.state.initialOptions=t({},this.options),this.init()}return e.prototype.init=function(){this.addEventToQueue(ue,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()},e}();function xe(e){var n=e.inputRef,t=e.wrapperRef,o=e.disabled,i=y(),a=i.t,c=i.locale,l=r((function(){if(o)return[];var e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==c&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),P(e).map((function(e){return a(e)}))}),[a,c]);function u(e){var n=p();return n&&(n.placeholder=n.placeholder+e),null}function d(){var e=p();e&&(e.placeholder=e.placeholder.slice(0,-1))}function p(){return n&&n.current?n.current:t&&t.current&&t.current.querySelector("input")||null}s((function(){if(!o){var e=p();e&&(e.placeholder="",new ve({strings:l,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:u,onRemoveNode:d}))}}),[n,t])}var ye,we=k.div(ye||(ye=e(["\n user-select: none;\n input {\n pointer-events: none;\n background-color: white;\n }\n"],["\n user-select: none;\n input {\n pointer-events: none;\n background-color: white;\n }\n"])));function be(e){var n=e.focused,o=e.value,i=void 0===o?"":o,c=e.onClick,l=e.trackingAttributes,s=e.inputSearchPlaceholder,d=y().t,p=u(null);xe({wrapperRef:p,disabled:!!s});var h=r((function(){return l?{"data-event-category":l.dataEventCategory,"data-event-action":l.dataEventAction,"data-event-label":l.dataEventLabel}:{}}),[l]);return a.createElement(we,t({onClick:function(){return c&&c()},ref:p},h),a.createElement(q,{inputClassName:"location"===n?"focused":void 0,name:"booking-search-placeholder",displayIcon:a.createElement($,{color:M.colors.gray400}),placeholder:d("booking.searchBar.searchInput.placeholder"),value:i,size:"md"}))}var Ee,Le,ke,Se,Me,Ie,Re=k.header(Ee||(Ee=e(["\n display: flex;\n height: 64px;\n align-items: center;\n justify-content: space-between;\n margin: 0 auto;\n position: sticky;\n z-index: 99;\n background-color: white;\n top: 0;\n left: 0;\n"],["\n display: flex;\n height: 64px;\n align-items: center;\n justify-content: space-between;\n margin: 0 auto;\n position: sticky;\n z-index: 99;\n background-color: white;\n top: 0;\n left: 0;\n"]))),Pe=k.div(Le||(Le=e(["\n display: inline-flex;\n flex: 1;\n justify-content: flex-end;\n cursor: pointer;\n text-decoration: underline;\n"],["\n display: inline-flex;\n flex: 1;\n justify-content: flex-end;\n cursor: pointer;\n text-decoration: underline;\n"]))),Fe=k.div(ke||(ke=e(["\n display: flex;\n align-items: center;\n margin-left: 16px;\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n margin-left: 16px;\n cursor: pointer;\n"]))),ze=k.div(Se||(Se=e(["\n width: 100%;\n margin-left: 24px;\n"],["\n width: 100%;\n margin-left: 24px;\n"]))),Ae=k(E)(Me||(Me=e(["\n color: ",";\n text-align: start;\n"],["\n color: ",";\n text-align: start;\n"])),M.colors.secondaryDark),Te=function(e){var n=e.className,t=e.onLeftClick,o=e.headingText,i=e.onRightClick,r=e.iconLeft,c=e.textRight;return a.createElement(Re,{className:n},a.createElement(Fe,{onClick:t},r||a.createElement(Y,{color:M.colors.gray800})),a.createElement(ze,null,a.createElement(Ae,{size:"md",type:"bold"},o)),a.createElement(Pe,{onClick:i},c&&a.createElement("p",null,c)))},Ne={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0},He={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",searchLocationKeywords:"",searchKeywords:"",selectedLocation:null,defaultCity:null,initialCities:[],cities:[],searchResults:[],initialSearchResults:[],isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN"};function Ve(e){var n=e.selectedLocation,o=e.searchLocationKeywords;return n&&o!==n.name?t(t({},e),{searchLocationKeywords:n.name}):e}function Be(e,n){var o;switch(e.isDebug&&console.log("bookingSearchBar",{action:n,state:e}),n.type){case Ie.NavigateTo:return t(t({},e),{navigateTo:n.payload,focused:"none",isMobileModalOpened:!1});case Ie.ClickOutsideInputLocation:return e.isMobile||"location"!==e.focused?e:Ve(t(t({},e),{focused:"none"}));case Ie.ClickOutsideInputSearch:return e.isMobile||"search"!==e.focused?e:t(t({},e),{focused:"none"});case Ie.FocusInputLocation:var i=t(t({},e),{focused:"location"});return(null===(o=e.selectedLocation)||void 0===o?void 0:o.id)===p&&(i.searchLocationKeywords=""),i;case Ie.FocusInputSearch:var a=t(t({},e),{focused:"search"});return e.isMobile?Ve(a):a;case Ie.ChangeInputLocation:return t(t({},e),{searchLocationKeywords:n.payload});case Ie.ChangeInputSearch:var r=n.payload;return t(t({},e),{searchKeywords:r,isLoadingSearchResults:r.trim().length>Ne[e.locale]});case Ie.SelectCurrentLocation:return t(t({},e),{focused:"none",selectedLocation:n.payload,searchLocationKeywords:n.payload.name});case Ie.ClearInputLocation:return t(t({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case Ie.ClearInputSearch:return t(t({},e),{focused:"search",searchKeywords:""});case Ie.SelectLocation:return t(t({},e),{focused:"none",selectedLocation:n.payload,searchLocationKeywords:n.payload.name});case Ie.SelectSearchResult:return t(t({},e),{searchKeywords:n.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:n.payload.url});case Ie.FetchCitiesStart:return t(t({},e),{isLoadingCities:!0});case Ie.FetchCitiesFinish:return t(t({},e),{isLoadingCities:!1});case Ie.FetchSearchResultsStart:return t(t({},e),{isLoadingSearchResults:!0});case Ie.FetchSearchResultsFinish:return t(t({},e),{isLoadingSearchResults:!1});case Ie.FetchSearchResultsComplete:var c=t(t({},e),{searchResults:n.payload});return 0===e.initialSearchResults.length&&(c.initialSearchResults=n.payload),c;case Ie.FetchCitiesByGeoIpComplete:var l=n.payload.cities,s=n.payload.default;(l=l.filter((function(e){return e.id!==s.id}))).unshift(s),e.initialSelectedCity&&!l.find((function(n){return n.id===e.initialSelectedCity.id}))&&l.unshift(e.initialSelectedCity);var u=t(t({},e),{defaultCity:s,initialCities:l,cities:l});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(u.selectedLocation=s,u.searchLocationKeywords=s.name),u;case Ie.FetchCitiesByKeywordComplete:return t(t({},e),{cities:n.payload});case Ie.DisplayInitialCities:return t(t({},e),{cities:e.initialCities});case Ie.DisplayInitialSearchResults:return t(t({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case Ie.GrantGeoLocationPermission:return t(t({},e),{geoLocationPermission:"granted",geoLocationCoordinates:n.payload});case Ie.DenyGeoLocationPermission:return t(t({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case Ie.OpenMobileModal:return t(t({},e),{isMobileModalOpened:!0});case Ie.CloseMobileModal:return t(t({},e),{isMobileModalOpened:!1});case Ie.UpdateInitialSearchValue:return t(t({},e),{searchKeywords:n.payload});case Ie.SetInputSearchPlaceholder:return t(t({},e),{inputSearchPlaceholder:n.payload});default:return e}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder"}(Ie||(Ie={}));var De,Oe,Ke,Ze,_e,je,Ge,Ue=function(){return a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.97887 8.15493C2.97887 5.29627 5.29627 2.97887 8.15493 2.97887C11.0136 2.97887 13.331 5.29627 13.331 8.15493C13.331 11.0136 11.0136 13.331 8.15493 13.331C5.29627 13.331 2.97887 11.0136 2.97887 8.15493ZM8.15493 1.5C4.47951 1.5 1.5 4.47951 1.5 8.15493C1.5 11.8303 4.47951 14.8099 8.15493 14.8099C9.72624 14.8099 11.1704 14.2653 12.3089 13.3546L15.2377 16.2834C15.5265 16.5722 15.9947 16.5722 16.2834 16.2834C16.5722 15.9947 16.5722 15.5265 16.2834 15.2377L13.3546 12.3089C14.2653 11.1704 14.8099 9.72624 14.8099 8.15493C14.8099 4.47951 11.8303 1.5 8.15493 1.5Z",fill:"white"}))},Qe=k.button(De||(De=e(["\n min-height: 100%;\n border-radius: 6px;\n background-color: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 11px;\n cursor: pointer;\n flex: 0.3;\n\n "," {\n --margin: 16px;\n min-height: 32px;\n margin: var(--margin);\n width: calc(100% - var(--margin) * 2);\n position: absolute;\n bottom: 0;\n }\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n &:focus-visible {\n outline: 1px solid black;\n }\n"],["\n min-height: 100%;\n border-radius: 6px;\n background-color: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 11px;\n cursor: pointer;\n flex: 0.3;\n\n "," {\n --margin: 16px;\n min-height: 32px;\n margin: var(--margin);\n width: calc(100% - var(--margin) * 2);\n position: absolute;\n bottom: 0;\n }\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n &:focus-visible {\n outline: 1px solid black;\n }\n"])),(function(e){return e.theme.colors.primaryBase}),x.mbDown,(function(e){return e.theme.colors.primaryHover}),(function(e){return e.theme.colors.primaryActive})),qe=k(E)(Oe||(Oe=e(["\n font-weight: ",";\n"],["\n font-weight: ",";\n"])),(function(e){return e.theme.sizes.fwSemiBold})),We=function(e){var n=e.onClick,t=(0,y().t)("booking.searchBar.searchButton");return a.createElement(Qe,{onClick:n,title:t},a.createElement(Ue,null),a.createElement(qe,{size:"s3",color:"white"},t))},Ye=k.div(Ke||(Ke=e(["\n display: flex;\n gap: 16px;\n "," {\n flex-direction: column;\n padding: 14px;\n background-color: ",";\n\n input {\n filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.04))\n drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.06))\n drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04));\n }\n }\n\n input {\n background-color: white;\n }\n"],["\n display: flex;\n gap: 16px;\n "," {\n flex-direction: column;\n padding: 14px;\n background-color: ",";\n\n input {\n filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.04))\n drop-shadow(0px 0px 2px rgba(0, 0, 0, 0.06))\n drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04));\n }\n }\n\n input {\n background-color: white;\n }\n"])),x.mbDown,M.colors.blue50),Je=k.div(Ze||(Ze=e(["\n position: relative;\n"],["\n position: relative;\n"]))),Xe=k(Je)(_e||(_e=e(["\n flex: 1;\n"],["\n flex: 1;\n"]))),$e=k(Je)(je||(je=e(["\n flex: 2;\n"],["\n flex: 2;\n"]))),en=k((function(e){var n=e.className,t=e.color;return a.createElement("svg",{className:n,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"8",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z",fill:t||"currentColor"}))}))(Ge||(Ge=e(["\n display: none;\n &.shown {\n display: block;\n }\n"],["\n display: none;\n &.shown {\n display: block;\n }\n"])));function nn(e){var n=e.isMobile,t=e.state,o=e.dispatch,i=e.debouncedFetchCitiesByKeyword,c=e.debouncedFetchSearchResults,s=e.focusLocationInput,d=e.focusSearchInput,h=e.renderLocationResults,g=e.renderSearchResults,m=e.locationTrackingAttributes,f=e.trackingAttributes,C=e.onSearch,v=e.initalSearchValue,x=u(null),w=u(null),b=t.focused,E=t.searchLocationKeywords,L=t.geoLocationPermission,k=t.selectedLocation,S=t.searchKeywords,I=t.inputSearchPlaceholder,R=y().t;xe({wrapperRef:w,disabled:!!I}),F(x,(function(){o({type:Ie.ClickOutsideInputLocation})})),F(w,(function(){o({type:Ie.ClickOutsideInputSearch})}));var P=r((function(){return"granted"===L&&(null==k?void 0:k.id)===p?M.colors.primaryBase:M.colors.gray400}),[L,k]),z=l((function(e){o({type:Ie.ChangeInputSearch,payload:e}),"function"!=typeof C&&(e.trim().length>Ne[t.locale]||v?c(e.trim(),t):(c.cancel(),o({type:Ie.DisplayInitialSearchResults})))}),[o,t]),A=l((function(e){o({type:Ie.ChangeInputLocation,payload:e}),e.trim().length>Ne[t.locale]?i(e.trim()):(i.cancel(),o({type:Ie.DisplayInitialCities}))}),[i,o]);return a.createElement(Ye,null,a.createElement(Xe,{ref:x},a.createElement(q,{inputClassName:"location"===b?"focused":void 0,placeholder:R("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:a.createElement(J,{className:"location-pin-icon",color:P}),actionIcon:a.createElement(en,{color:M.colors.gray300,className:""!==E?"shown":""}),onActionClick:function(){o({type:Ie.ClearInputLocation}),i.cancel(),s()},value:E,onChange:A,onFocus:function(){return o({type:Ie.FocusInputLocation})},size:"md",trackingAttributes:m}),!n&&h()),a.createElement($e,{ref:w},a.createElement(q,{placeholder:I||R("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:a.createElement(en,{color:M.colors.gray300,className:""!==S?"shown":""}),onActionClick:function(){o({type:Ie.ClearInputSearch}),c.cancel(),c("",t),d()},value:S,onChange:z,onFocus:function(){return o({type:Ie.FocusInputSearch})},inputClassName:"search"===b?"focused":void 0,size:"md",trackingAttributes:f,onKeyPress:function(e){t.autoCompleteDisabled&&"Enter"===e.key&&C&&C({cityId:t.selectedLocation.id,keyword:S})},enterKeyHint:t.autoCompleteDisabled?"search":void 0}),!n&&g()),t.autoCompleteDisabled&&!t.isMobile&&a.createElement(We,{onClick:function(){C({cityId:t.selectedLocation.id,keyword:S})}}))}var tn,on,an,rn,cn,ln,sn,un,dn,pn,hn,gn,mn,fn,Cn=k.li(tn||(tn=e(["\n display: flex;\n align-items: center;\n gap: var(--rowGap);\n cursor: pointer;\n"],["\n display: flex;\n align-items: center;\n gap: var(--rowGap);\n cursor: pointer;\n"]))),vn=k.div(on||(on=e(["\n --wrapper-size: var(--graphicSize);\n border-radius: calc(var(--wrapper-size) / 2);\n background-color: var(--neutral50);\n width: var(--wrapper-size);\n height: var(--wrapper-size);\n aspect-ratio: 1/1;\n overflow: hidden;\n\n ","\n\n img {\n width: var(--graphicSize);\n height: var(--graphicSize);\n ","\n }\n\n &:focus-visible {\n outline: 1px solid ",";\n }\n"],["\n --wrapper-size: var(--graphicSize);\n border-radius: calc(var(--wrapper-size) / 2);\n background-color: var(--neutral50);\n width: var(--wrapper-size);\n height: var(--wrapper-size);\n aspect-ratio: 1/1;\n overflow: hidden;\n\n ","\n\n img {\n width: var(--graphicSize);\n height: var(--graphicSize);\n ","\n }\n\n &:focus-visible {\n outline: 1px solid ",";\n }\n"])),(function(e){var n=e.type;return n&&"doctors"===n&&"\n border-radius: calc(var(--graphicSize) / 2);\n "}),(function(e){var n=e.type;return n&&"doctors"===n?"\n\n object-fit: cover; \n ":"\n object-fit: contain;\n "}),M.colors.gray600),xn=k(E)(an||(an=e(["\n line-height: 22px;\n letter-spacing: -0.2px;\n\n "," {\n &[data-size='p3'] {\n font-size: 14px;\n }\n }\n"],["\n line-height: 22px;\n letter-spacing: -0.2px;\n\n "," {\n &[data-size='p3'] {\n font-size: 14px;\n }\n }\n"])),x.tdUp),yn=k.figure(rn||(rn=e(["\n max-width: var(--graphicSize);\n min-width: var(--graphicSize);\n"],["\n max-width: var(--graphicSize);\n min-width: var(--graphicSize);\n"]))),wn=k.svg(cn||(cn=e(["\n margin: 0 auto;\n display: block;\n"],["\n margin: 0 auto;\n display: block;\n"]))),bn=k.div(ln||(ln=e(["\n display: grid;\n place-items: center;\n"],["\n display: grid;\n place-items: center;\n"]))),En={doctors:function(e){var n=e.width,t=e.height;return a.createElement("svg",{width:n||32,height:t||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("g",{clipPath:"url(#clip0_14712_400114)"},a.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),a.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),a.createElement("defs",null,a.createElement("clipPath",{id:"clip0_14712_400114"},a.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"}))))},services:function(e){var n=e.width,t=e.height;return a.createElement("svg",{width:n||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),a.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))}},Ln=function(e){var n=e.type,t=e.item,o=e.imageUrl,i=e.onClickItem,c=r((function(){var e=En[n]||ee;return a.createElement(e,{width:32,height:"services"===n?32:24})}),[n]);return a.createElement(Cn,{onClick:function(){return i&&i(t)},onKeyDown:function(e){"Enter"!==e.key&&"Space"!==e.key||i&&i(t)},tabIndex:0,role:"button"},a.createElement(yn,null,"hospitals"===n?a.createElement(wn,{width:"12",height:"16",viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):a.createElement(vn,{type:n},o?a.createElement("img",{src:o,width:32,height:"services"===n?32:24}):c)),a.createElement(xn,{color:M.colors.gray800,size:"p3"},t.name))},kn=function(){return a.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},a.createElement("path",{d:"M7.00004 0.666992C5.29757 0.666992 3.64067 0.813476 2.52087 1.03158C1.73311 1.18457 1.16671 1.86816 1.16671 2.6722V4.83366C1.16671 5.29264 1.54106 5.66699 2.00004 5.66699H12C12.459 5.66699 12.8334 5.29264 12.8334 4.83366V2.69824C12.8334 1.89421 12.267 1.21061 11.4792 1.05762C10.3562 0.839518 8.69275 0.666992 7.00004 0.666992ZM6.16671 1.50033H7.83337V2.33366H8.66671V4.00033H7.83337V4.83366H6.16671V4.00033H5.33337V2.33366H6.16671V1.50033ZM1.42712 6.50033C1.3197 6.89421 1.24158 7.32389 1.19275 7.77637C1.14718 8.18001 1.05603 9.25423 1.06254 9.36491C0.603556 9.72624 0.333374 10.2861 0.333374 10.9014C0.333374 11.8356 0.977906 12.6364 1.84379 12.8285C2.74548 15.0192 4.55212 17.3337 7.00004 17.3337C9.44796 17.3337 11.2546 14.9964 12.1563 12.8024C13.0222 12.6136 13.6667 11.8356 13.6667 10.9014C13.6667 10.2861 13.3965 9.72624 12.9375 9.36491C12.9441 9.25423 12.8562 8.16048 12.8073 7.75033C12.7552 7.30436 12.6804 6.89095 12.573 6.50033H5.35942C6.52804 8.20606 9.27543 7.18717 11.0365 7.62012C11.5736 8.79199 11.1667 10.4326 11.1667 10.4326L11.8177 10.641C11.9121 10.6702 12 10.7549 12 10.9014C12 11.0576 11.8861 11.1943 11.6875 11.1878L11.0105 11.0837L10.7761 11.7347C9.96554 14.0492 8.4128 15.667 7.00004 15.667C5.58728 15.667 4.03455 14.0492 3.224 11.7347L2.96358 11.0837L2.26046 11.1878C2.11723 11.1878 2.00004 11.0576 2.00004 10.9014C2.00004 10.7549 2.08793 10.6702 2.18233 10.641L2.83337 10.4326C2.73246 10.5531 2.4102 8.7041 2.83337 8.03678C3.59184 7.5127 4.2266 7.87728 5.12504 6.50033H1.42712ZM5.17712 9.05241C4.57166 9.05241 4.08337 9.55371 4.08337 10.1722C4.08337 10.7907 4.57166 11.292 5.17712 11.292C5.78259 11.292 6.27087 10.7907 6.27087 10.1722C6.27087 9.55371 5.78259 9.05241 5.17712 9.05241ZM8.82296 9.05241C8.21749 9.05241 7.72921 9.55371 7.72921 10.1722C7.72921 10.7907 8.21749 11.292 8.82296 11.292C9.42843 11.292 9.91671 10.7907 9.91671 10.1722C9.91671 9.55371 9.42843 9.05241 8.82296 9.05241Z",fill:"#9AA2AC"}))},Sn=function(){return a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},a.createElement("path",{d:"M8.99996 0.666992C6.27535 0.666992 3.85348 1.97884 2.33329 4.00033H4.59892C5.80009 2.94564 7.36259 2.33366 8.99996 2.33366C10.6373 2.33366 12.1998 2.94564 13.401 4.00033H15.6666C14.1464 1.97884 11.7246 0.666992 8.99996 0.666992ZM1.78642 4.83366C1.07678 7.04069 0.666626 9.59928 0.666626 12.3337C0.666626 14.085 0.826131 15.7679 1.13538 17.3337H16.8645C17.1738 15.7679 17.3333 14.085 17.3333 12.3337C17.3333 9.59928 16.9231 7.04069 16.2135 4.83366H1.78642ZM8.99996 7.33366C11.3014 7.33366 13.1666 9.19889 13.1666 11.5003C13.1666 13.8018 11.3014 15.667 8.99996 15.667C6.69853 15.667 4.83329 13.8018 4.83329 11.5003C4.83329 9.19889 6.69853 7.33366 8.99996 7.33366ZM8.16663 9.00033V10.667H6.49996V12.3337H8.16663V14.0003H9.83329V12.3337H11.5V10.667H9.83329V9.00033H8.16663Z",fill:"#9AA2AC"}))},Mn=function(){return a.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},a.createElement("path",{d:"M8 0.666992L0.5 5.63533V14.8337C0.5 15.7545 1.24583 16.5003 2.16667 16.5003H13.8333C14.7542 16.5003 15.5 15.7545 15.5 14.8337V5.63533L8 0.666992ZM11.3333 10.667H8.83333V13.167H7.16667V10.667H4.66667V9.00033H7.16667V6.50033H8.83333V9.00033H11.3333V10.667Z",fill:"#9AA2AC"}))},In=function(){return a.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},a.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"}))},Rn=k.header(sn||(sn=e(["\n display: flex;\n justify-content: space-between;\n padding: 12px 24px;\n background-color: ",";\n box-shadow: inset 0px 1px 0px #e4e8ec;\n"],["\n display: flex;\n justify-content: space-between;\n padding: 12px 24px;\n background-color: ",";\n box-shadow: inset 0px 1px 0px #e4e8ec;\n"])),M.colors.neutral50),Pn=k.div(un||(un=e(["\n display: grid;\n flex: 2;\n align-items: center;\n gap: 16px;\n grid-template-columns: 16px 1fr;\n"],["\n display: grid;\n flex: 2;\n align-items: center;\n gap: 16px;\n grid-template-columns: 16px 1fr;\n"]))),Fn=k.p(dn||(dn=e(["\n color: ",";\n font-size: 14px;\n font-weight: ",";\n letter-spacing: -0.2px;\n line-height: 22px;\n"],["\n color: ",";\n font-size: 14px;\n font-weight: ",";\n letter-spacing: -0.2px;\n line-height: 22px;\n"])),M.colors.neutral800,M.sizes.fwSemiBold),zn=k.button(pn||(pn=e(["\n flex: 1;\n cursor: pointer;\n text-align: end;\n"],["\n flex: 1;\n cursor: pointer;\n text-align: end;\n"]))),An=k.section(hn||(hn=e(["\n padding: 12px 16px;\n --rowGap: 16px;\n --graphicSize: 32px;\n\n "," {\n --rowGap: 8px;\n }\n"],["\n padding: 12px 16px;\n --rowGap: 16px;\n --graphicSize: 32px;\n\n "," {\n --rowGap: 8px;\n }\n"])),x.tdUp),Tn=k.ul(gn||(gn=e(["\n --gap: 16px;\n "," {\n --gap: 8px;\n }\n\n display: grid;\n overflow: hidden;\n gap: var(--gap);\n transition: max-height 0.8s ease-out;\n\n ","\n\n ","\n\n@media (prefers-reduced-motion) {\n transition: none;\n }\n\n "," {\n grid-template-columns: 1fr 1fr;\n } ;\n"],["\n --gap: 16px;\n "," {\n --gap: 8px;\n }\n\n display: grid;\n overflow: hidden;\n gap: var(--gap);\n transition: max-height 0.8s ease-out;\n\n ","\n\n ","\n\n@media (prefers-reduced-motion) {\n transition: none;\n }\n\n "," {\n grid-template-columns: 1fr 1fr;\n } ;\n"])),x.tdUp,(function(e){return e.isMore&&"\n height: auto;\n max-height: 0;\n margin-top: var(--gap);\n "}),(function(e){return e.isShown&&"\n max-height: 600px;\n "}),x.tdUp),Nn=k(E)(mn||(mn=e(["\n margin-top: 12px;\n margin-bottom: 8px;\n cursor: pointer;\n text-align: start;\n text-transform: capitalize;\n"],["\n margin-top: 12px;\n margin-bottom: 8px;\n cursor: pointer;\n text-align: start;\n text-transform: capitalize;\n"]))),Hn=function(e){var n=e.type,t=e.data,o=e.state,i=e.dispatch,l=e.itemsToShow,s=e.itemsToShowDesktop,u=e.isMobile,d=e.isLoading,p=e.keyword,g=c(!1),m=g[0],f=g[1],C=y(),v=C.t,x=C.locale,w=o.selectedLocation,b=o.searchKeywords,L=r((function(){return h[x]}),[x]),k=r((function(){return{doctors:{name:v("booking.searchPopup.doctors"),icon:a.createElement(kn,null),slug:L.DOCTOR},services:{name:v("booking.searchPopup.services"),icon:a.createElement(Sn,null),slug:L.SERVICE},hospitals:{name:v("booking.searchPopup.hospitals"),icon:a.createElement(Mn,null),slug:L.HOSPITAL},specialties:{name:v("booking.searchPopup.specialties"),icon:a.createElement(In,null),slug:L.SPECIALTIES}}}),[n,L]),S=r((function(){return k[n].slug}),[k]),R=u?l:s;function P(e){var t="";switch(n){case"specialties":t="/".concat(w.slug,"/").concat(k.doctors.slug,"/").concat(e.slug);break;case"services":t="/".concat(w.slug,"/").concat(S,"/").concat(e.slug);break;case"doctors":case"hospitals":t="/".concat(S,"/").concat(e.slug,"-").concat(e.id)}t&&i({type:Ie.SelectSearchResult,payload:{name:e.name,url:t}})}function F(e){return a.createElement(Ln,{key:e.id,item:e,type:n,imageUrl:e.logo||e.avatar||e.thumbnail,onClickItem:P})}return a.createElement("section",null,a.createElement(Rn,null,a.createElement(Pn,null,k[n].icon,a.createElement(Fn,null,k[n].name)),p.trim().length<=Ne[x]&&a.createElement(zn,{onClick:function(){var e="";switch(n){case"specialties":e="/".concat(S);break;case"services":case"doctors":case"hospitals":e="/".concat(w.slug,"/").concat(S)}e&&i({type:Ie.NavigateTo,payload:e})}},a.createElement(E,{size:"p3",color:M.colors.primaryBase},v("booking.searchPopup.seeAll")))),(d||t&&t.length>0)&&a.createElement(An,null,a.createElement(Tn,null,d&&Array(2).fill(void 0).map((function(e,t){return a.createElement(Cn,{key:n+"loading"+t},a.createElement(yn,null,a.createElement(bn,null,a.createElement(I,{height:14,width:"hospitals"===n?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),a.createElement(I,{width:120,height:24}))})),!d&&t&&t.length>0&&t.slice(0,R).map(F)),a.createElement(Tn,{isShown:m,isMore:!0},t.slice(R,-1).map(F)),"specialties"===n&&R<t.length&&!d&&a.createElement("button",{onClick:function(){return f(!m)}},a.createElement(Nn,{size:"p3",color:M.colors.primaryBase},v(m?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==n&&R<t.length&&!d&&p.trim().length>Ne[x]&&a.createElement("button",{onClick:function(){var e=k[n].slug,t="/".concat(w.slug,"/").concat(e,"?q=").concat(b);i({type:Ie.NavigateTo,payload:t})}},a.createElement(Nn,{size:"p3",color:M.colors.primaryBase},v("booking.searchPopup.searchIn.".concat(n),{name:p})))),!d&&0===(null==t?void 0:t.length)&&a.createElement(An,null,a.createElement(E,{size:"sm",color:M.colors.gray400},v("booking.searchBar.noResults"))))},Vn=k.section(fn||(fn=e(["\n background-color: white;\n border-radius: 4px;\n position: absolute;\n width: 100%;\n z-index: 30;\n\n "," {\n box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),\n 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),\n 0px 0px 1px rgba(0, 0, 0, 0.04);\n }\n"],["\n background-color: white;\n border-radius: 4px;\n position: absolute;\n width: 100%;\n z-index: 30;\n\n "," {\n box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),\n 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),\n 0px 0px 1px rgba(0, 0, 0, 0.04);\n }\n"])),x.tdUp),Bn=function(e){var n=e.data,t=e.state,o=e.dispatch,i=e.isMobile,r=e.isLoading,c=e.keyword;return a.createElement(Vn,null,n&&n.map((function(e){return a.createElement(Hn,{type:e.type,state:t,dispatch:o,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:r,keyword:c})})))},Dn="api/lists/cities?keyword={keyword}&country_id={countryId}&site={domain}&_nopaging={noPaging}",On="api/v2/search/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}",Kn="api/geobyip?site={domain}&latitude={lat}&longitude={lng}",Zn=function(e,n,o){return w(e,t(t({},n),{domain:g[o||"en-PH"]}))};var _n,jn=function(e){var n=e.isMobile,g=e.careApiDomain,x=e.geoLocationPermission,w=e.geoLocationCoordinates,E=e.initialSelectedCity,L=e.initialSearchValue,k=void 0===L?"":L,S=e.careFrontDomain,M=void 0===S?"/care":S,I=e.isDebug,R=void 0!==I&&I,P=e.askForGeolocationPermission,F=void 0!==P&&P,z=e.gaTrackingSearchBar,A=e.gaTrackingLocationSearch,T=e.autoCompleteDisabled,N=void 0!==T&&T,H=e.inputSearchPlaceholder,V=void 0===H?"":H,B=e.routerPush,D=e.onGeoLocationPermissionChange,O=e.onSearch,K=e.onChangeLocation,Z=y(),_=Z.t,q=Z.locale,Y=u(null),J=u(null),X=c(void 0),$=X[0],ee=X[1],ne=function(){var e=c((function(){if("undefined"==typeof window)return"unset";if(f(m))return"granted";var e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),n=e[0],t=e[1],o=c((function(){if("undefined"==typeof window)return null;var e=f(m);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),i=o[0],a=o[1],s=l((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(e){var n={lat:"".concat(Math.round(1e7*e.coords.latitude)/1e7),lng:"".concat(Math.round(1e7*e.coords.longitude)/1e7)};C(m,JSON.stringify(n),0,15),a(n),t("granted")}),(function(){v(m),t("denied")}))}),[]);return r((function(){return{geoLocationPermission:n,geoLocationCoordinates:i,requestGeoLocation:s}}),[n,i])}(),te=ne.geoLocationPermission,oe=ne.geoLocationCoordinates,ie=ne.requestGeoLocation,ae=d(Be,He,(function(e){return t(t({},e),{isDebug:R,isMobile:n,geoLocationPermission:x||te||"unset",geoLocationCoordinates:w||oe||null,searchKeywords:k,initialSelectedCity:E||null,selectedLocation:E||e.selectedLocation||null,searchLocationKeywords:(null==E?void 0:E.name)||e.searchLocationKeywords,autoCompleteDisabled:N,inputSearchPlaceholder:V,locale:q})})),re=ae[0],le=ae[1],se=re.navigateTo,ue=re.focused,de=re.isLoadingCities,pe=re.cities,he=re.searchKeywords,ge=re.geoLocationPermission,me=re.selectedLocation,fe=re.initialSelectedCity,Ce=re.defaultCity,ve=re.searchResults,xe=re.isLoadingSearchResults,ye=re.isMobileModalOpened,we=re.inputSearchPlaceholder,Ee=function(e){var n=e.dispatch,o=e.careApiDomain,i=e.locale,a=void 0===i?"vi-VN":i,r=l((function(e,t){void 0===t&&(t={});var i="".concat(o).concat(e);return n({type:Ie.FetchCitiesStart}),fetch(Zn(i,t,a),{method:"GET"}).then((function(e){return e.json()})).then((function(e){return 1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e))})).finally((function(){return n({type:Ie.FetchCitiesFinish})}))}),[a]),c=l((function(e){var o=e.coordinates,i={};o&&(i={lat:o.lat,lng:o.lng});var c=[r(Kn,i)];return"zh-TW"===a&&c.push(r(Dn,{noPaging:1})),Promise.all(c).then((function(e){var o=e[0],i=e[1],a=t({},o);if(i){var r=a.cities.map((function(e){return e.id}));a.cities=a.cities.concat(i.cities.filter((function(e){return!r.includes(e.id)})))}n({type:Ie.FetchCitiesByGeoIpComplete,payload:a})})).catch((function(e){return console.error("error loading cities by location",e)}))}),[a,o,n]);return{fetchCitiesByLocation:c,fetchCitiesByKeyword:l((function(e){return r(Dn,{keyword:e}).then((function(e){n({type:Ie.FetchCitiesByKeywordComplete,payload:e.cities})})).catch((function(e){return console.error("error loading cities by keyword",e)}))}),[a,o,n]),fetchSearchResults:l((function(e,t){var i="".concat(o).concat(On);n({type:Ie.FetchSearchResultsStart});var r=t.defaultCity,c=t.selectedLocation,l=t.geoLocationCoordinates,s="";if(c&&r){c.id===p?l||(s=r.id):s=c.id;var u=(null==l?void 0:l.lat)||"",d=(null==l?void 0:l.lng)||"";return fetch(Zn(i,{domain:o,searchType:"global",keyword:e.trim().length>Ne[a]?e.trim():"",city:s===p?"":s,lat:u,lng:d},a),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((function(e){return e.json()})).then((function(e){return 1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e)})).then((function(e){return n({type:Ie.FetchSearchResultsComplete,payload:e})})).catch((function(e){console.log("error loading search results",{url:i,error:e})})).finally((function(){return n({type:Ie.FetchSearchResultsFinish})}))}n({type:Ie.FetchSearchResultsFinish})}),[a,o,n])}}({dispatch:le,locale:q,careApiDomain:g}),Le=Ee.fetchCitiesByLocation,ke=Ee.fetchCitiesByKeyword,Se=Ee.fetchSearchResults,Me=r((function(){var e;return{id:p,name:_("booking.searchBar.currentLocation"),slug:null===(e=h[q])||void 0===e?void 0:e.CURRENT}}),[_,q]),Re=r((function(){return b(ke,400)}),[ke]),Pe=r((function(){return b(Se,400)}),[Se]);s((function(){""!==k&&k!==re.searchKeywords&&le({type:Ie.UpdateInitialSearchValue,payload:k})}),[k]),s((function(){F&&(null==me?void 0:me.id)===p&&"unset"===ge&&ie()}),[F,me,ge]),s((function(){x||ge===te||("granted"===te&&oe?le({type:Ie.GrantGeoLocationPermission,payload:oe}):"denied"===te&&le({type:Ie.DenyGeoLocationPermission}))}),[ge,te,oe,x]),s((function(){se&&(B?B(se):window.location.href="".concat(M).concat(se))}),[se]);var Fe=l((function(){le({type:Ie.SelectCurrentLocation,payload:Me})}),[_,le]);s((function(){"denied"===ge||fe||Fe(),D&&D(ge,re.geoLocationCoordinates),n&&"granted"===ge&&me&&le({type:Ie.FocusInputSearch}),Le({coordinates:re.geoLocationCoordinates})}),[ge]),s((function(){me&&Ce&&Se(re.searchKeywords,re)}),[me,Ce]),s((function(){V!==we&&le({type:Ie.SetInputSearchPlaceholder,payload:V})}),[V,we]),s((function(){ye?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[ye]);var ze=l((function(e){le({type:Ie.SelectLocation,payload:e}),De(),K&&K(e)}),[_,le]);function Ae(){n&&"granted"!==re.geoLocationPermission?ie():(Fe(),De())}function Ve(){var e;Y.current&&(null===(e=Y.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function De(){var e;Y.current&&(null===(e=Y.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Oe(){return"location"!==ue?null:a.createElement(ce,{isLoading:de,cities:pe,onLocationClick:ze,onCurrentLocationClick:Ae,isLocationLoading:de,geoLocationPermission:ge,selectedLocation:me})}function Ke(){return"search"!==ue?null:re.autoCompleteDisabled?n?a.createElement(We,{onClick:function(){O({cityId:re.selectedLocation.id,keyword:he})}}):null:a.createElement(Bn,{data:ve,state:re,dispatch:le,isMobile:!1,keyword:he,isLoading:xe})}function Ze(){return a.createElement(nn,{isMobile:n,state:re,dispatch:le,debouncedFetchCitiesByKeyword:Re,debouncedFetchSearchResults:Pe,focusLocationInput:Ve,focusSearchInput:De,renderLocationResults:Oe,renderSearchResults:Ke,trackingAttributes:z,locationTrackingAttributes:A,onSearch:O,initalSearchValue:k})}return s((function(){if(window.visualViewport){var e=function(e){var n=e.target;ee(null==n?void 0:n.height)};return window.visualViewport.addEventListener("resize",e),function(){window.visualViewport.removeEventListener("resize",e)}}}),[ee]),n?a.createElement(a.Fragment,null,a.createElement(W,null),a.createElement(Q,{ref:J}),a.createElement(G,{id:"booking-search-bar",ref:Y,"data-is-modal":n&&ye,style:{"--mobile-care-searchbar-height":ye&&$?"".concat($,"px"):"100%"}},ye?a.createElement(a.Fragment,null,a.createElement(U,null,a.createElement(Te,{headingText:"Search",onLeftClick:function(){le({type:Ie.CloseMobileModal})}}),Ze()),Oe(),Ke()):a.createElement(be,{onClick:function(){var e;return o(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return J.current&&J.current.focus(),le({type:Ie.OpenMobileModal}),[4,Promise.resolve()];case 1:return n.sent(),Y.current&&(null===(e=Y.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus()),[2]}}))}))},focused:ue,value:he,trackingAttributes:z,inputSearchPlaceholder:V}))):a.createElement(j,{id:"booking-search-bar",ref:Y},Ze())};!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(_n||(_n={}));var Gn=Object.freeze({__proto__:null,get RedirectType(){return _n}});export{jn as B,Gn as t};
@@ -0,0 +1 @@
1
+ import{d as e,e as t,_ as n,a as i}from"./tslib.es6-fd0a5c98.js";import o,{useContext as a,useState as r,useRef as l,useEffect as s,useMemo as c,useCallback as u}from"react";import{T as d,B as m}from"./index.styled-c3a83617.js";import{a as p,D as v}from"./index-5917887f.js";import{u as g,t as h}from"./useTranslations-2ba43851.js";import{m as f,z as w,B as C,E as k,F as y,H as E,I as b,b as N,J as I,M as T,K as x,N as M,O as _,Q as P,R as L,V as S,W as j,L as B,X as F,Y as R,_ as D,Z as O,$ as A,a0 as z,a1 as V,a2 as U,y as H,a3 as W,j as Z,a4 as G,a5 as K,U as Q,a6 as X,a7 as J,a8 as Y,u as $,g as q,a9 as ee,aa as te,ab as ne,ac as ie,ad as oe,ae,af as re,ag as le,ah as se,ai as ce,aj as ue,ak as de,al as me,a as pe,am as ve,f as ge,C as he,an as fe,ao as we,ap as Ce,S as ke,aq as ye,o as Ee,ar as be,as as Ne,at as Ie}from"./index.styled-142eab0d.js";import{t as Te}from"./theme-731042bc.js";import"react-range";import*as xe from"react-dom";import"date-fns";import{I as Me}from"./index-3386acf9.js";import _e from"lodash/debounce";import{H as Pe}from"./index-c47f17a7.js";import{l as Le}from"./number-126ee62e.js";import{d as Se}from"./constants-17d17987.js";var je=function(i){var c=i.title,u=i.url,m=i.image,p=i.logo,v=i.className,g=i.style,h=i.noRefetch,b=a(f).data,N=b.locale,I=b.env.isMarryBaby,T=r(!1),x=T[0],M=T[1],_=l(h);_.current=h;var P=r(null),L=P[0],S=P[1];s((function(){e(void 0,void 0,void 0,(function(){return t(this,(function(e){return _.current?[2]:u?(S((function(e){return n(n({},e),{isFetching:!0})})),k(y(E.FETCH_PREVIEW,{_locale:N}),"POST",{data:{link:u}}).then((function(e){var t,n,i;M(!1),S({title:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.title,url:u,image:(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.image)||(null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.logo)})})).catch((function(){S(null)})),[2]):[2,S(null)]}))}))}),[u]);var j=(null==L?void 0:L.image)||m,B=(null==L?void 0:L.title)||c,F=(null==L?void 0:L.logo)||p,R=(null==L?void 0:L.url)||u,D=R.replace("http://","").replace("https://","").split(/[/?#]/)[0],O=l(!1);return o.createElement(w,{"data-is-marrybaby":I,className:"".concat(v," no-replace-click"),style:g},o.createElement("a",{href:R,target:"_blank",rel:"noreferrer"},j&&o.createElement("div",{className:"link-image-wrapper"},!I&&o.createElement("img",{className:"link-image-blur",src:j,onError:function(e){O.current||(O.current=!0,e.currentTarget.src=C)}}),o.createElement("img",{className:"link-image",src:j,onError:function(e){O.current||(O.current=!0,e.currentTarget.src=C)}})),o.createElement("div",{className:"link-info-container"},o.createElement(d,{size:"n1"},I&&F&&!x&&o.createElement("img",{className:"link-logo",src:F,onError:function(e){return M(!0)}}),D),o.createElement(Pe,{tag:"h6"},B))))},Be=function(e){var t=e.topics,n=e.onClick,i=e.className,s=e.style,c=function(){var e=r(!1),t=e[0],n=e[1],i=l(null),o=l(null),a=l();return{sliding:t,mouseDownHandler:function(e){if(i.current){a.current=setTimeout((function(){n(!0)}),500),o.current={left:i.current.scrollLeft,x:e.clientX};var t=function(e){var t=o.current;if(t){var n=e.clientX-t.x;i.current&&(i.current.scrollLeft=t.left-n)}},r=function(){a.current&&(clearTimeout(a.current),a.current=void 0),n(!1),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",r)}},sliderRef:i,pos:o}}(),u=c.sliding,m=c.mouseDownHandler,p=c.sliderRef,v=a(f),g=v.data.env.togetherBasePath,h=v.action.sanitizeFunction;return o.createElement(b,{ref:p,onClick:n,onMouseDown:function(e){return m(e)},className:"".concat(i," ").concat(u?"sliding":""),style:s},t.map((function(e,t){return o.createElement("a",{className:"tag-link-item",key:t,href:e.isActive&&!e.isHidden?"".concat(g).concat(e.url):void 0},o.createElement(d,{size:"p3"},o.createElement("span",{dangerouslySetInnerHTML:{__html:(null==h?void 0:h(e.name))||e.name}})))})))},Fe=function(e){var t=e.onClick;e.color;var n=e.className,i=e.style,r=a(f).data.env.isMarryBaby,l=g().t;return o.createElement(N,{label:o.createElement(o.Fragment,null,r&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M3.5 19.9999L7.87 15.6299' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.95634 11.294C4.56534 11.685 4.56534 12.318 4.95634 12.708L7.87434 15.626L10.7923 18.544C11.1833 18.935 11.8163 18.935 12.2063 18.544L13.3813 17.369C13.5693 17.181 13.6743 16.927 13.6743 16.662V12.726L16.5743 9.82597L18.8833 9.94897C19.1663 9.96397 19.4433 9.85797 19.6433 9.65797L20.2173 9.08397C20.6083 8.69297 20.6083 8.05997 20.2173 7.66997L15.8313 3.28397C15.4403 2.89297 14.8073 2.89297 14.4173 3.28397L13.8433 3.85797C13.6423 4.05897 13.5363 4.33497 13.5523 4.61797L13.6753 6.92697L10.7753 9.82697H6.83834C6.57334 9.82697 6.31834 9.93197 6.13134 10.12L4.95634 11.294V11.294Z' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3cpath d='M16.5699 9.83018L13.6699 6.93018' stroke='%23FB8C00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e %3c/svg%3e"})," ",l("label.pinnedPost")),rightLabel:!r&&o.createElement("img",{className:"label-sort-pin-icon",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='7.18605' y1='7.68219' x2='3.68219' y2='13.8139' stroke='%23FEA21E' stroke-linecap='round'/%3e%3cpath d='M3.24591 7.78426C3.21275 7.84168 3.20376 7.90993 3.22092 7.97398C3.23808 8.03803 3.27998 8.09264 3.3374 8.12579L8.78429 11.2706C8.90385 11.3396 9.05674 11.2986 9.12578 11.1791C9.71191 10.1641 9.71348 8.97262 9.23682 7.99339L10.8583 5.18521C11.5115 5.00603 12.0982 4.57973 12.4638 3.94629C12.5328 3.82672 12.4919 3.67383 12.3723 3.6048L8.18237 1.18584C8.12494 1.15268 8.0567 1.1437 7.99265 1.16086C7.92861 1.17803 7.874 1.21993 7.84086 1.27736C7.47521 1.91077 7.39934 2.63194 7.57065 3.28723L5.94919 6.09545C4.86323 6.1723 3.83201 6.76934 3.24591 7.78426Z' fill='%23FEA21E' stroke='%23FEA21E' stroke-width='0.5' stroke-linejoin='round'/%3e%3c/svg%3e"}),onClick:t,color:"white",className:"label-pinned ".concat(n),style:i})},Re=function(e){return{message:e("notification.failure"),type:"danger"}},De="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%23FE921D'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Oe=function(n){var i=n.id,o=n.locale;return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return i?[4,I(y(E.POST.LIKE,{id:i,_locale:o}),"GET")]:[2];case 1:return[2,e.sent()]}}))}))},Ae=function(n){var i=n.id,o=n.locale;return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return i?[4,I(y(E.POST.DELETE,{id:i,_locale:o}),"DELETE")]:[2];case 1:return[2,e.sent()]}}))}))},ze=function(n){var i=n.title,o=n.description,a=n.communityId,r=n.imageFiles,l=n.previewUrl,s=n.topicIds,c=n.locale,u=n.sanitizeFunction,d=n.categoryCommunityId,m=n.categoryTopicIds,p=n.introUrl,v=n.bannerUrl,g=n.scheduleTime;return e(void 0,void 0,void 0,(function(){var e,n,h,f,w;return t(this,(function(t){switch(t.label){case 0:return e=new FormData,n=x(o),h=x(i),f=M(n),e.append("title",h),e.append("description",_(n,u)),d?e.append("category_community",String(d)):a&&e.append("community_id",String(a)),(null==l?void 0:l.title)&&e.append("preview_title",l.title),(null==l?void 0:l.description)&&e.append("preview_description",l.description),(null==l?void 0:l.url)&&e.append("preview_link",l.url),(null==l?void 0:l.image)&&e.append("preview_image",l.image),null==s||s.forEach((function(t){e.append("topics[]",String(t||""))})),null==m||m.forEach((function(t){e.append("category_topics[]",String(t||""))})),(null==r?void 0:r.length)?[4,Promise.all(r.map((function(e,t){return new Promise((function(n){setTimeout((function(){n(P(e,c))}),2e3*t)}))})))]:[3,2];case 1:return null==(w=t.sent())||w.filter(Boolean).slice(0,T).forEach((function(t,n){e.append("images[".concat(n,"]"),t)})),[3,3];case 2:e.append("images",""),t.label=3;case 3:return null==f||f.forEach((function(t){e.append("mention_ids[]",t)})),e.append("intro_url",p||""),e.append("banner",v||""),g&&(e.append("post_type","scheduled"),e.append("schedule_datetime",g)),[2,e]}}))}))},Ve=function(n){var i=n.locale,o=n.formData,a=n.isArticleComment;return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,I(y(a?E.POST.CREATE_ARTICLE_COMMENT:E.POST.CREATE,{_locale:i}),"POST",{data:o,headers:{"Content-Type":"multipart/form-data"}})];case 1:return[2,e.sent()]}}))}))},Ue=function(n){var i=n.id,o=n.locale,a=n.formData;return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,I(y(E.POST.UPDATE,{id:i,_locale:o}),"POST",{data:a})];case 1:return[2,e.sent()]}}))}))},He=function(e){var t=e.id,n=e.reason,i=e.locale,o=new FormData;return o.append("reason",n),I(y(E.POST.REPORT,{_locale:i,id:t}),"POST",{data:o})},We=function(e,t){var n=r(e||[]),i=n[0],o=n[1];return{onSelectImages:function(n){var a=n.target.files;a&&(t&&e?t((e||i).concat(Array.from(a))):o((function(n){var i=e||n;return t&&t(i.concat(Array.from(a))),i.concat(Array.from(a))})))},onRemoveImage:function(n){if(t&&e){var i=e;i.splice(n,1),t(i.slice())}else o((function(i){var o=e||i;return o.splice(n,1),t&&t(o.slice()),o.slice()}))},onRemoveAllImages:function(){t?t([]):o([])},imageSrcs:c((function(){return(e||i).map((function(e){return"string"==typeof e?e:URL.createObjectURL(e)}))}),[e,i]),imageFiles:e||i}},Ze="data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 22.9844C17.5228 22.9844 22 18.5072 22 12.9844C22 7.46153 17.5228 2.98438 12 2.98438C6.47715 2.98438 2 7.46153 2 12.9844C2 18.5072 6.47715 22.9844 12 22.9844Z' fill='%23262626'/%3e%3cpath d='M14.8281 10.1562L9.17127 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.17188 10.1562L14.8287 15.8131' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Ge=function(e){var t=e.className,n=e.style,i=e.bannedWords,a=void 0===i?[]:i,c=e.value,u=e.onChange,m=e.onPreviewUrlChange,p=e.onInvalidUrlsChange,v=e.onImageFilesChange,h=e.imageFiles,f=e.isReplying,w=g().t,C=r(null),k=C[0],y=C[1],E=l(null),b=We(h,v),N=b.onSelectImages,I=b.onRemoveImage,x=b.imageSrcs;return s((function(){m&&((null==k?void 0:k.url)?m({title:k.title||"",url:k.url||"",image:k.image||"",description:k.description||""}):m(null))}),[k]),o.createElement(L,{className:t,style:n},o.createElement(d,{size:"p4",className:"description-label"},w("createPost.popup.description")),o.createElement("div",{className:"textarea-control"},o.createElement("div",{className:"textarea-wrapper"},o.createElement(S,{html:c||"",onChange:u,bannedWords:a,onImagePickerClick:function(){var e;return null===(e=E.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:y,onInvalidUrlsChange:p,isReplying:f}))),o.createElement(d,{size:"p4",className:"count-string"},w("character"),": ",j(c||"").length),(!x||0===x.length)&&k&&o.createElement("div",{className:"link-preview-wrapper"},k.isFetching?o.createElement(B,null):o.createElement(o.Fragment,null,o.createElement(je,{title:k.title,url:k.url||"#",image:k.image,noRefetch:!0}),o.createElement("img",{src:Ze,className:"icon-close",onClick:function(){return y(null)}}))),o.createElement("input",{ref:E,type:"file",accept:"image/png, image/gif, image/jpeg",multiple:!0,style:{display:"none"},onChange:N}),x.length>T?o.createElement("div",{className:"input-notification"},o.createElement("img",{src:De}),o.createElement(d,{size:"p4",color:Te.colors.alertWarning},w("createPost.popup.warningImage"))):null,x.length>0&&o.createElement("div",{className:"image-gallery"},x.map((function(e,t){return o.createElement("div",{key:t,className:"image-item"},o.createElement("img",{src:e}),o.createElement("img",{className:"close-btn",src:Ze,onClick:function(){return I(t)}}))}))))},Ke=function(e,t){if(!t)return e;var n=t.limit,i=t.bannedWords,o=void 0===i?[]:i,a="number"==typeof n&&n>=0?e.substring(0,n):e;return F(a,o)},Qe=function(e){var t,n=e.className,i=e.style,a=e.bannedWords,c=void 0===a?[]:a,m=e.value,p=e.onChange,v=g().t,h=r(""),f=h[0],w=h[1],C=l(null);s((function(){if(C.current){var e=function(e){var t;e.preventDefault();var n=null===(t=e.clipboardData)||void 0===t?void 0:t.getData("text/plain");document.execCommand("insertHTML",!1,n)},t=C.current;return t.addEventListener("paste",e),function(){return t.removeEventListener("paste",e)}}}),[C]);var k=(null==c?void 0:c.join(","))||"";s((function(){var e;if(k){var t=null===(e=C.current)||void 0===e?void 0:e.innerText;if(t){var n=F(t,c);n!==t&&(p&&p(n),w(n))}}}),[k]);var y=u(_e((function(e){if(C.current){var t=Ke(C.current.innerText,{limit:120,bannedWords:c});p&&p(t),w(t)}}),300),[]);return s((function(){setTimeout((function(){var e;null===(e=C.current)||void 0===e||e.focus()}),500)}),[]),o.createElement(R,{className:n,style:i},o.createElement(Me,{name:"title",value:m||f,size:"md",label:v("createPost.title"),CustomInput:o.createElement(D,{innerRef:C,html:m||f,onChange:function(e){if(C.current&&C.current.innerText!==(m||f)){var t=Ke(C.current.innerText,{bannedWords:c});p&&p(t),w(t),y(C.current.innerText)}},className:"title-input"})}),o.createElement(d,{size:"p4",className:"count-string"},v("createPost.popup.wordCount",{count:(null===(t=C.current)||void 0===t?void 0:t.innerText.length)||0,max:120})))},Xe=function(n){var u=n.className,d=n.style,m=n.topics,p=n.communityId,v=n.onChange,g=n.isLoading,h=n.disabled,w=n.forceTopics,C=n.selectedTopics,b=n.noFetch,N=a(f).data,I=N.locale,T=N.env.isMarryBaby,x=r(m?i([],m,!0):[]),M=x[0],_=x[1],P=r(C?i([],C,!0):[]),L=P[0],S=P[1],j=r(!1),F=j[0],R=j[1],D=l(m);D.current=m,s((function(){var n;!p||b||(null===(n=D.current)||void 0===n?void 0:n.length)||(_([]),R(!0),e(void 0,void 0,void 0,(function(){var e,n,i,o;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,k(y(E.TOPIC.LIST,{communityId:p,_locale:I}),"GET")];case 1:return e=t.sent(),n=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.topics,Array.isArray(n)&&_((function(){return(null==n?void 0:n.map(A).sort((function(e,t){return(e.order||0)-(t.order||0)})))||[]})),[3,3];case 2:return i=t.sent(),console.log(i),R(!1),[3,3];case 3:return R(!1),[2]}}))})))}),[p,b]);var z=null==m?void 0:m.map((function(e){return e.id})).join("-"),V=null==M?void 0:M.map((function(e){return e.id})).join("-"),U=null==w?void 0:w.map((function(e){return e.id})).join("-");s((function(){m&&void 0!==z&&z!==V&&_(m)}),[m,z,V]);var H=c((function(){return M.filter((function(e){return!(null==w?void 0:w.some((function(t){return t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId})))}))}),[V,U]);return o.createElement(O,{"data-is-marrybaby":T,className:u,style:d},w.map((function(e){return o.createElement(Je,{key:"".concat(e.id,"-").concat(e.mappedCategoryId),topic:e,disabled:!0,selected:!0})})),H.map((function(e){return o.createElement(Je,{key:"".concat(e.id,"-").concat(e.mappedCategoryId),topic:e,disabled:h,selected:(C||L).some((function(t){return t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId})),onClick:function(){var t=C||L,n=t.findIndex((function(t){return t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId}));-1!==n?t.splice(n,1):t.push(e),v&&C?v(t.slice()):(v&&v(t.slice()),S(t.slice()))}})})),(g||F)&&o.createElement(B,{className:"topic-spinner"}))},Je=function(e){var t=e.topic,n=e.disabled,i=e.selected,a=e.onClick;return o.createElement("div",{className:"tag-item"+(i?" --active":""),"data-disabled":n,onClick:n?void 0:a},t.name)},Ye=function(n){var l=n.className,c=n.style,u=n.onPostCreatedEdited,v=n.onClose,h=n.communities,w=void 0===h?[]:h,C=n.forceSelectCommunity,k=n.forceSelectTopics,y=n.articleId,E=n.optionalTopic,b=n.editPostData,N=n.defaultCommunity,I=n.defaultTopics,x=n.noFetchTopic,M=n.hideTopicList,_=!!(null==b?void 0:b.id),P=a(f),L=P.data,S=L.locale,B=L.env.isMarryBaby,F=P.action,R=F.pushNotifications,D=F.sanitizeFunction,O=g().t,A=r(!1),W=A[0],Z=A[1],G=r(""),K=G[0],Q=G[1],X=r(""),J=X[0],Y=X[1],$=r(C?{label:C.name,value:"".concat(C.id||"","-").concat(C.mappedCategoryId||"")}:{label:O("community.choose"),value:""}),q=$[0],ee=$[1],te=r(i([],k,!0)||[]),ne=te[0],ie=te[1],oe=r([]),ae=oe[0],re=oe[1],le=r([]),se=le[0],ce=le[1],ue=C||w.find((function(e){return"".concat(e.id||"","-").concat(e.mappedCategoryId||"")===q.value})),de=C?[C]:w.filter((function(e){return e.isActive})).sort((function(e,t){return e.name>t.name?1:e.name<t.name?-1:0})),me=r(null),pe=me[0],ve=me[1],ge=r([]),he=ge[0],fe=ge[1],we=K&&j(J)&&(E||!E&&ne.length>0)&&ue&&(!ae||ae.length<=T)&&!(null==he?void 0:he.length)&&!W;s((function(){if(b){var e=b;Q(e.title||""),Y(z(V(e.description||"","edit"),e.mentions)),ee({label:e.community.name,value:"".concat(e.community.id||"","-").concat(e.community.mappedCategoryId||"")}),ie(e.topics||[]),re(e.photos||[])}else N&&ee({label:N.name,value:"".concat(N.id||"","-").concat(N.mappedCategoryId||"")}),I&&ie(I)}),[]);var Ce=function(){return e(void 0,void 0,void 0,(function(){var e,n,i,o,a,r,l,s,c,d,m,p;return t(this,(function(t){switch(t.label){case 0:return[4,ze({title:K,description:J,communityId:String((null==ue?void 0:ue.id)||""),imageFiles:ae,previewUrl:pe,topicIds:null==ne?void 0:ne.map((function(e){return String(e.id||"")})).filter(Boolean),locale:S,sanitizeFunction:D,categoryCommunityId:String((null==ue?void 0:ue.mappedCategoryId)||""),categoryTopicIds:null==ne?void 0:ne.map((function(e){return String(e.mappedCategoryId||"")})).filter(Boolean)})];case 1:return e=t.sent(),y&&e.append("article_id",y),_?(null==b?void 0:b.id)?[4,Ue({id:b.id,formData:e,locale:S})]:[3,3]:[3,4];case 2:n=t.sent(),t.label=3;case 3:return[3,6];case 4:return[4,Ve({formData:e,locale:S,isArticleComment:!(null==ue?void 0:ue.id)&&!!(null==ue?void 0:ue.mappedCategoryId)})];case 5:n=t.sent(),t.label=6;case 6:return(null==(i=null==n?void 0:n.data)?void 0:i.id)&&!(null===(a=null===(o=null==n?void 0:n.messages)||void 0===o?void 0:o.moderation)||void 0===a?void 0:a.type)?(R({message:O("createPost.popup.success"),type:"success"}),function(e){u&&u(H(e),_),v&&v()}(i)):"banned"===(null===(l=null===(r=null==n?void 0:n.messages)||void 0===r?void 0:r.moderation)||void 0===l?void 0:l.type)?(R({title:O("notification.post.blocked.title"),message:O("notification.post.blocked.message"),type:"danger"}),n.messages.moderation.words&&ce(n.messages.moderation.words)):"suspect"===(null===(c=null===(s=null==n?void 0:n.messages)||void 0===s?void 0:s.moderation)||void 0===c?void 0:c.type)?(R({title:O("notification.post.suspect.title"),message:O("notification.post.suspect.message"),type:"warning"}),v&&v()):(null===(m=null===(d=null==n?void 0:n.messages)||void 0===d?void 0:d.find)||void 0===m?void 0:m.call(d,(function(e){var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(R({message:O("notification.suspend.message"),type:"danger"}),v&&v()):R({message:(null===(p=null==n?void 0:n.messages)||void 0===p?void 0:p[0])||O("notification.failure"),type:"danger"}),[2]}}))}))};return o.createElement(U,{className:l,style:c},o.createElement("div",{className:"input-group-container"},o.createElement(Qe,{className:"input-group",bannedWords:se,value:K,onChange:Q}),o.createElement(Ge,{className:"input-group",bannedWords:se,value:J,onChange:Y,onPreviewUrlChange:ve,onInvalidUrlsChange:fe,onImageFilesChange:re,imageFiles:ae}),o.createElement("div",{className:"input-group"},o.createElement(d,{size:"p4",className:"input-group-label"},O("admin.community")),o.createElement(p,{options:(null==de?void 0:de.map((function(e,t){return{label:e.name,value:"".concat(e.id||"","-").concat(e.mappedCategoryId||"")}})))||[],id:"community-picker",placeholder:O("community.choose"),value:q,onChange:function(e){ee({label:e.label,value:String(e.value)}),ie([])},disabled:!!C}),o.createElement(d,{size:"sm",className:"warning",color:Te.colors.gray400},"* ",O("commentPopup.warning.newPost"))),!M&&o.createElement("div",{className:"input-group"},o.createElement(d,{size:"p4",className:"input-group-label"},O("tab.topic")),o.createElement("div",{className:"input-notification"},o.createElement("img",{src:ue?"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14.5C11.3137 14.5 14 11.8137 14 8.5C14 5.18629 11.3137 2.5 8 2.5C4.68629 2.5 2 5.18629 2 8.5C2 11.8137 4.68629 14.5 8 14.5Z' fill='%232D87F3'/%3e%3cpath d='M8 5.5V8.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11.5H8.00708' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e":De}),o.createElement(d,{size:"base",color:Te.colors.gray500},O(ue?"createPost.popup.primary":"createPost.popup.warning"))),ue&&o.createElement(Xe,{className:"tag-list",communityId:ue.id,forceTopics:k,onChange:ie,selectedTopics:ne,noFetch:x}))),o.createElement(m,{theme:B?"marryBaby":"helloSites",className:"submit-btn",size:"lg",onClick:function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:if(!we||W)return[3,5];Z(!0),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Ce()];case 2:return t.sent(),[3,4];case 3:return e=t.sent(),console.error(e),R(Re(O)),[3,4];case 4:Z(!1),t.label=5;case 5:return[2]}}))}))},isDisabled:!we,isLoading:W},O("createPost.popup.submit")))},$e=function(e){var t=e.className,n=e.isMarryBaby,i=e.style,l=e.title,c=e.description,u=e.acceptText,p=e.cancelText,v=e.onAccept,g=e.thumbnail,w=e.isThumbnailIcon,C=e.onClose,k=a(f).data.env.isMarryBaby,y="boolean"==typeof n?n:k,E=r(!1),b=E[0],N=E[1];return s((function(){return h(!0),setTimeout((function(){return N(!0)}),0),function(){return h(!1)}}),[]),xe.createPortal(o.createElement(W,{"data-is-marrybaby":y,className:t,style:i,"data-open":b},o.createElement(Z,{className:"popup-frame",isOpen:b,onClose:C},o.createElement("div",{className:"confirm-dialog",onClick:function(e){return e.stopPropagation()}},o.createElement("div",{className:"confirm-content"},g&&o.createElement("div",{className:"thumbnail-container ".concat(w?"is-icon":"")},o.createElement("img",{className:"thumbnail",src:g})),o.createElement(Pe,{className:"title",tag:"h2"},l),o.createElement(d,{className:"desc",size:"lg"},c),o.createElement("div",{className:"btn-group"},o.createElement(m,{theme:y?"marryBaby":"helloSites",size:"md",color:"secondary",onClick:function(){null==v||v(),null==C||C()}},u),o.createElement(m,{theme:y?"marryBaby":"helloSites",size:"md",onClick:C},p)))),y&&g&&o.createElement("div",{className:"thumbnail-container is-mobile ".concat(w?"is-icon":"")},o.createElement("img",{className:"thumbnail",src:g})))),document.body)},qe=function(n){var i=n.postId,o=n.message,a=n.photos,r=n.link,l=n.locale,s=n.sanitizeFunction,c=n.replyingUserId,u=n.replyingUserName,d=n.replyingId;return e(void 0,void 0,void 0,(function(){var e,n,m;return t(this,(function(t){switch(t.label){case 0:return e=new FormData,n=_(o.replace(/(\&nbsp;)+/g," "),s),m=M(n),a&&a.length>0?[4,Promise.all(null==a?void 0:a.map((function(e){return P(e,l)})))]:[3,2];case 1:t.sent().filter(Boolean).slice(0,T).forEach((function(t){e.append("images[]",t)})),t.label=2;case 2:return r&&e.append("link",r),null==m||m.forEach((function(t){e.append("mention_ids[]",t)})),e.append("post_id",i),d&&e.append("parent_id",d),c&&(m.unshift(c),n='[mention+id="'.concat(c,'"+name="').concat((u||"").replace('"',"'"),'"]').concat(n),e.append("parent_user_id",String(c))),e.append("content",n),e.append("content",n),[2,e]}}))}))},et=function(n,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return[2,I(y(E.COMMENT.CREATE,{_locale:i}),"POST",{data:n,headers:{"Content-Type":"multipart/form-data"}})]}))}))},tt=function(n,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return[2,I(y(E.COMMENT.REPLY,{_locale:i}),"POST",{data:n,headers:{"Content-Type":"multipart/form-data"}})]}))}))},nt=function(n){var i=n.commentId,o=n.setLike,a=void 0!==o&&o,r=n.locale;return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return[2,I(y(a?E.COMMENT.LIKE:E.COMMENT.UNLIKE,{_locale:r,id:i}),"GET")]}))}))},it=function(e){var t=e.id,n=e.locale;return I(y(E.COMMENT.DELETE,{_locale:n,id:t}),"DELETE")},ot=function(i){var c=i.isReply,u=i.className,p=i.onClose,v=i.replyToName,h=i.style,w=i.replyingId,C=i.replyingUser,k=i.onPostSuccess;i.isMainCmt;var y=i.post,E=i.isMarryBaby,b=a(f),N=b.action,I=N.pushNotifications,T=N.sanitizeFunction,x=b.data,M=x.userInfo,_=x.locale,P=x.env.isMarryBaby,L="boolean"==typeof E?E:P,j=g().t,F=We(),R=F.onSelectImages,D=F.onRemoveImage,O=F.imageSrcs,A=F.onRemoveAllImages,z=F.imageFiles,V=r(""),U=V[0],H=V[1],W=a(G).trigger,Z=r(!1),Y=Z[0],$=Z[1],q=l(null),ee=l(null),te=l(null),ne=r([]),ie=ne[0],oe=ne[1],ae=r([]),re=ae[0],le=ae[1],se=r(null),ce=se[0],ue=se[1];return s((function(){var e;null===(e=te.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout((function(){var e;null===(e=ee.current)||void 0===e||e.focus()}),400)}),[W]),o.createElement(K,{"data-is-reply":c,className:u,style:h},c&&o.createElement("div",{className:"reply-to-container"},o.createElement(d,{size:"p4"},o.createElement("span",{dangerouslySetInnerHTML:{__html:j("inputComment.replyTo",{name:'<span style="color: #2D87F3; cursor: pointer">@'.concat(v||"","</span>")})}})),o.createElement("img",{src:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8.00016' cy='8.50004' r='6.66667' fill='white' stroke='%23404040'/%3e%3cpath d='M10 6.5L6 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6 6.5L10 10.5' stroke='%23404040' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:function(){return p&&p()}})),o.createElement("div",{className:"input-container",ref:te},o.createElement(Q,{className:"avatar-wrapper ".concat(c?"avatar-wrapper-reply":""),avatar:(null==M?void 0:M.id)?M.avatar:X,username:(null==M?void 0:M.name)||(null==M?void 0:M.username)}),o.createElement("input",{ref:q,onChange:R,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),o.createElement(Me,{value:U,name:"input",size:"md",className:"input-wrapper",displayIcon:o.createElement("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.7543 4.85352H4.49227C4.01776 4.85352 3.56268 5.04201 3.22715 5.37754C2.89162 5.71307 2.70313 6.16815 2.70312 6.64266V19.1667C2.70313 19.6412 2.89162 20.0963 3.22715 20.4318C3.56268 20.7673 4.01776 20.9558 4.49227 20.9558H17.0163C17.4908 20.9558 17.9459 20.7673 18.2814 20.4318C18.6169 20.0963 18.8054 19.6412 18.8054 19.1667V12.9047' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M17.4633 3.51187C17.8192 3.15599 18.3019 2.95605 18.8052 2.95605C19.3085 2.95605 19.7912 3.15599 20.147 3.51187C20.5029 3.86775 20.7029 4.35044 20.7029 4.85373C20.7029 5.35702 20.5029 5.83971 20.147 6.19559L11.6486 14.694L8.07031 15.5886L8.96489 12.0103L17.4633 3.51187Z' stroke='%232D87F3' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"}),CustomInput:o.createElement("div",{className:"as-input"},o.createElement(S,{className:"textarea",html:U,onChange:H,onImagePickerClick:function(){var e;return null===(e=q.current)||void 0===e?void 0:e.click()},bannedWords:re,onPreviewUrlChange:ue,onInvalidUrlsChange:oe,setEditorRef:function(e){return ee.current=e},isReplying:c}))}),o.createElement(m,{theme:L?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:function(){return e(void 0,void 0,void 0,(function(){var e,i,o,a,r,l,s,u,d,m,v,g,h;return t(this,(function(t){switch(t.label){case 0:if(!(null==y?void 0:y.id)||Y)return[2];$(!0),t.label=1;case 1:return t.trys.push([1,4,,5]),e=function(e){H(""),A(),p&&p();var t=J(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),k&&k(t)},[4,qe(n({message:U,photos:z,postId:String(y.id),link:null==ce?void 0:ce.url,sanitizeFunction:T,locale:_},c&&w?{replyingUserId:String((null==C?void 0:C.id)||(null===(r=null==y?void 0:y.author)||void 0===r?void 0:r.id)||""),replyingId:w,replyingUserName:(null==C?void 0:C.name)||(null==C?void 0:C.username)||""}:{}))];case 2:return i=t.sent(),[4,c&&w?tt(i,_):et(i,_)];case 3:return o=t.sent(),(null==(a=null==o?void 0:o.data)?void 0:a.id)&&!(null===(s=null===(l=null==o?void 0:o.messages)||void 0===l?void 0:l.moderation)||void 0===s?void 0:s.type)?e(o):"banned"===(null===(d=null===(u=null==o?void 0:o.messages)||void 0===u?void 0:u.moderation)||void 0===d?void 0:d.type)?(I({title:j("notification.comment.blocked.title"),message:j("notification.comment.blocked.message"),type:"danger"}),o.messages.moderation.words&&le(o.messages.moderation.words)):"suspect"===(null===(v=null===(m=null==o?void 0:o.messages)||void 0===m?void 0:m.moderation)||void 0===v?void 0:v.type)?(I({title:j("notification.comment.suspect.title"),message:j("notification.comment.suspect.message"),type:"warning"}),H(""),A(),p&&p()):(null===(g=null==o?void 0:o.messages)||void 0===g?void 0:g.find((function(e){var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(I({message:j("notification.suspend.message"),type:"warning"}),H(""),A(),p&&p()):I({title:"",message:(null===(h=null==o?void 0:o.messages)||void 0===h?void 0:h[0])||j("notification.comment.somethingWrong"),type:"danger"}),[3,5];case 4:return t.sent(),I({title:"",message:j("notification.comment.somethingWrong"),type:"danger"}),[3,5];case 5:return $(!1),[2]}}))}))},isLoading:Y,isDisabled:!!(null==ie?void 0:ie.length)||Y||!U||(null==U?void 0:U.length)<2||!U.trim()},o.createElement("img",{src:"data:image/svg+xml,%3csvg width='20' height='21' viewBox='0 0 20 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.5 9.73438L3.75 13.4844L7.5 17.2344' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M16.25 4.73438L16.25 10.3026C16.25 11.1464 15.9208 11.9557 15.3347 12.5524C14.7487 13.1491 13.9538 13.4844 13.125 13.4844L3.75 13.4844' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",className:"icon-enter"}))),(null==ie?void 0:ie.length)?o.createElement("div",{className:"error-text"},j("notification.limitUrlDomain")):null,(!O||0===O.length)&&ce&&o.createElement("div",{className:"link-preview-wrapper"},ce.isFetching?o.createElement(B,null):o.createElement(o.Fragment,null,o.createElement(je,{title:ce.title,url:ce.url||"#",image:ce.image,noRefetch:!0}),o.createElement("img",{src:Ze,className:"icon-close",onClick:function(){return ue(null)}}))),O&&O.length>0&&o.createElement("div",{className:"preview-images-container"},O.map((function(e,t){return o.createElement("div",{key:t,className:"image-src-wrapper"},o.createElement("img",{className:"preview-image",src:e}),o.createElement("img",{src:Ze,className:"icon-close-circle",onClick:function(){return D(t)}}))}))))},at="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 5V8' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M8 11H8.00708' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",rt=function(n){var i=n.className,l=n.style,s=n.reason,c=n.reasonText,u=n.onClose,p=n.postId,v=a(f),h=v.data,w=h.locale,C=h.env.isMarryBaby,k=v.action.pushNotifications,y=g().t,E=r(!1),b=E[0],N=E[1];return o.createElement(Y,{"data-is-marrybaby":C,className:i,style:l},o.createElement("ul",{className:"report-list"},o.createElement("li",{className:"report-item"},o.createElement("img",{src:at}),o.createElement(d,{className:"__label",color:Te.colors.gray800,size:"p4"},c))),o.createElement(m,{theme:C?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:b,onClick:function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:if(!p||b)return[2];N(!0),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,He({id:p,reason:s,locale:w})];case 2:return 1===(null==(e=t.sent())?void 0:e.status)&&(k({message:"Post reported",type:"success"}),u&&u()),[3,4];case 3:return t.sent(),[3,4];case 4:return N(!1),[2]}}))}))}},y("submit")))},lt=function(e){var t=e.className,n=e.style,i=e.replyingTo,l=e.mentionedUser,s=e.description,u=e.disableShortenContent,d=e.mentions,m=void 0===d?[]:d,p=r(!1),v=p[0],h=p[1],w=g().t,C=$().authActionWrapper,k=r(!1),y=k[0],E=k[1],b=z(V(s||"","display"),m),N=a(f).action.sanitizeFunction,I=c((function(){var e=N(b||"");if(u||v)return{showContent:e,hasSeeMore:!1};var t=e.slice(0,200),n=200-27*((t.match(/<\/div>/g)||[]).length-1),i=(t||"").slice(0,n<40?40:n),o=N(i.replace(/(<|<\/)( +|[a-zA-Z]*)$/gi,"")),a=o.length<e.length-10;return{showContent:a?o:e,hasSeeMore:a}}),[u,v,b]),T=(null==l?void 0:l.name)||i,x="expert"===(null==l?void 0:l.role)&&!!(null==l?void 0:l.partnerId);return o.createElement(o.Fragment,null,x&&o.createElement(q,{isOpen:y,onClose:function(){return E(!1)},expertId:String(null==l?void 0:l.partnerId)}),o.createElement(ee,{className:"".concat(t," no-replace-click"),style:n},T&&o.createElement("span",{onClick:function(){return x&&E(!0)},className:"post-content-replying"},"@",T),(null==s?void 0:s.startsWith("[mention+id="))&&o.createElement("span",{className:"post-content-replying tag-only"},"@"),o.createElement("span",{dangerouslySetInnerHTML:{__html:I.showContent},className:"post-content ".concat(I.hasSeeMore?"has-see-more":"")}),I.hasSeeMore&&!v&&o.createElement("span",null,"... ",o.createElement("span",{onClick:function(e){e.preventDefault(),e.stopPropagation(),C((function(){return h(!0)}))},className:"see-more-text"},w("post.seeMore")))))},st=function(e){var t=e.className,n=e.style,i=e.authorName,a=e.images,l=e.onClose,c=e.onOpenSingleView,u=g().t,m=r(!1),p=m[0],v=m[1];return s((function(){setTimeout((function(){v(!0)}),0)}),[]),xe.createPortal(o.createElement(te,{className:t,style:n,"data-open":p},o.createElement("div",{className:"top-bar"},o.createElement("img",{className:"icon-arrow-left",src:"data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10.0508 18.0607L4.00078 12.0367L10.0508 6.01172' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4.00195 12.0352L19.002 12.0352' stroke='%23262626' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",onClick:l,alt:"go back"}),o.createElement(d,{size:"p2",type:"bold",style:{textAlign:"center"}},u("previewPhotos.title",{name:i}))),o.createElement("div",{className:"container"},a.map((function(e,t){return o.createElement("img",{className:"img-preview",key:t,src:e,onClick:function(){return null==c?void 0:c(t)},alt:"post img"})})))),document.body)},ct="data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12.8125L10 8.8125L6 4.8125' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",ut=function(e){var t=e.initialViewIndex,n=e.images,i=e.onClose,a=r(t),l=a[0],c=a[1],u=r(!1),d=u[0],m=u[1];s((function(){setTimeout((function(){m(!0)}),0)}),[]);var p=null==n?void 0:n[l],v=0===l,g=!(null==n?void 0:n.length)||l===(null==n?void 0:n.length)-1;return xe.createPortal(o.createElement(ne,{"data-open":d&&!!p},o.createElement(ie,null,o.createElement("img",{src:oe,className:"icon-close",onClick:i,alt:"close"})),p&&l>=0&&o.createElement(o.Fragment,null,o.createElement(ae,null,o.createElement("img",{className:"img-preview",src:p,alt:"post img open"}),o.createElement(re,{"data-disabled":v,onClick:function(){return!v&&c(l-1)}},o.createElement(le,null,o.createElement("img",{src:ct,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":v}))),o.createElement(re,{"data-right":!0,"data-disabled":g,onClick:function(){return!g&&c(l+1)}},o.createElement(le,null,o.createElement("img",{src:ct,alt:"right arrow","data-disabled":g})))))),document.body)},dt=function(e){var t=e.className,n=e.images,i=void 0===n?[]:n,c=e.style,u=e.authorName,d=a(f).data.env.isMarryBaby,m="+ ".concat((i.length||0)-4),p=r(!1),v=p[0],g=p[1],w=r(-1),C=w[0],k=w[1];s((function(){setTimeout((function(){return null==Le?void 0:Le.update()}),100)}),[null==i?void 0:i.slice(0,5).join("|")]);var y=i.length>5,E=l(!1);return s((function(){return function(){E.current&&h(!1)}}),[]),s((function(){v||C>=0?(h(!0),E.current=!0):(h(!1),E.current=!1)}),[v,C]),o.createElement(o.Fragment,null,o.createElement(se,{className:t,style:c,"data-image-count":y?5:i.length||0,"data-is-marrybaby":d},null==i?void 0:i.slice(0,5).map((function(e,t){return o.createElement("div",{className:"img-wrapper",key:t,onClick:function(){t>=4&&y?g(!0):k(t)}},!d&&o.createElement("img",{className:"lazy img-preview-blur","data-src":e}),o.createElement("img",{className:"lazy img-preview","data-src":e}),4===t&&y&&o.createElement("div",{className:"img-more-overlay"},o.createElement(Pe,{tag:"h1",color:"white"},m)))}))),v&&o.createElement(st,{authorName:u||"",images:i,onClose:function(){return g(!1)},onOpenSingleView:k}),C>=0&&o.createElement(ut,{images:i,initialViewIndex:C,onClose:function(){return k(-1)}}))},mt=function(i){var u=i.url,d=i.image,m=i.className,p=i.style,v=a(f).data.locale,g=r(null),h=g[0],w=g[1];s((function(){e(void 0,void 0,void 0,(function(){return t(this,(function(e){return d?[2]:u?(w((function(e){return n(n({},e),{isFetching:!0})})),k(y(E.FETCH_PREVIEW,{_locale:v}),"POST",{data:{link:u}}).then((function(e){var t,n;w({url:u,image:(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.image)||(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.logo)})})).catch((function(){w(null)})),[2]):[2,w(null)]}))}))}),[u,d]);var b=(null==h?void 0:h.image)||d,N=(null==h?void 0:h.url)||u,I=c((function(){return ce(N)}),[N]),T=c((function(){return ue(N)}),[N]),x=l(0),M=l(0),_=r(!1),P=_[0],L=_[1];s((function(){var e=function(){var e,t=null===(e=S.current)||void 0===e?void 0:e.getBoundingClientRect(),n=!1;t&&(!x.current||Math.abs((x.current-t.width)/(null==t?void 0:t.width))>.2)&&(x.current=Math.floor(t.width),n=!0),t&&(!M.current||Math.abs((M.current-t.height)/(null==t?void 0:t.height))>.2)&&(M.current=Math.floor(t.height),n=!0),n&&L((function(e){return!e}))};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var S=l(null),j=l(!1);return o.createElement(de,{className:"".concat(m," no-replace-click"),style:p,ref:S},d||!I&&!T?o.createElement("a",{href:N,target:"_blank",rel:"noreferrer"},o.createElement("div",{className:"link-image-wrapper ".concat((null==h?void 0:h.isFetching)?"fetching":"")},(null==h?void 0:h.isFetching)?o.createElement(B,{className:"loading-spinner"}):o.createElement("img",{className:"link-image",src:b||C,onError:function(e){j.current||(j.current=!0,e.currentTarget.src=C)}}))):o.createElement("div",{className:"link-image-wrapper"},I?o.createElement("iframe",{width:"100%",height:"100%",src:"https://www.youtube.com/embed/".concat(I,"?&autoplay=1&mute=1"),frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"}}):T?o.createElement("iframe",{key:String(P),src:"https://www.facebook.com/plugins/video.php?href=".concat(encodeURIComponent(N),"&autoplay=1&show_text=false&t=0&width=").concat(x.current,"&height=").concat(M.current),style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:M.current,width:x.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"}):null))},pt="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M5 10C3.9 10 3 10.9 3 12C3 13.1 3.9 14 5 14C6.1 14 7 13.1 7 12C7 10.9 6.1 10 5 10Z' fill='%233E3F58'/%3e %3cpath d='M19 10C17.9 10 17 10.9 17 12C17 13.1 17.9 14 19 14C20.1 14 21 13.1 21 12C21 10.9 20.1 10 19 10Z' fill='%233E3F58'/%3e %3cpath d='M12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z' fill='%233E3F58'/%3e %3c/svg%3e",vt="data:image/svg+xml,%3csvg width='3' height='13' viewBox='0 0 3 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='1.58326' cy='6.41663' r='1.25' transform='rotate(89.9997 1.58326 6.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='1.41663' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 1.41663)' fill='%23595959'/%3e%3cellipse cx='1.58326' cy='11.4166' rx='1.25' ry='1.25' transform='rotate(89.9997 1.58326 11.4166)' fill='%23595959'/%3e%3c/svg%3e",gt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 4H3.33333H14' stroke='%23737373' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33334 3.99992V2.66659C5.33334 2.31296 5.47382 1.97382 5.72387 1.72378C5.97392 1.47373 6.31305 1.33325 6.66668 1.33325H9.33334C9.68697 1.33325 10.0261 1.47373 10.2762 1.72378C10.5262 1.97382 10.6667 2.31296 10.6667 2.66659V3.99992M12.6667 3.99992V13.3333C12.6667 13.6869 12.5262 14.026 12.2762 14.2761C12.0261 14.5261 11.687 14.6666 11.3333 14.6666H4.66668C4.31305 14.6666 3.97392 14.5261 3.72387 14.2761C3.47382 14.026 3.33334 13.6869 3.33334 13.3333V3.99992H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66666 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33334 7.33325V11.3333' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",ht=function(n){var i=n.onDeleteComment,l=n.commentId,s=n.className,c=void 0===s?"":s,u=n.popoverClassName,d=void 0===u?"":u,m=a(f),p=m.data,v=p.env.isMarryBaby,h=p.locale,w=m.action.pushNotifications,C=g().t,k=r(!1),y=k[0],E=k[1],b=$().authActionWrapper;return o.createElement("div",{className:c,onClick:function(e){e.preventDefault(),e.stopPropagation()}},y&&o.createElement($e,{thumbnail:"data:image/svg+xml,%3csvg width='16' height='17' viewBox='0 0 16 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0)'%3e%3cpath d='M2 4.00781H3.33333H14' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.33337 4.00846V2.67513C5.33337 2.32151 5.47385 1.98237 5.7239 1.73232C5.97395 1.48227 6.31309 1.3418 6.66671 1.3418H9.33337C9.687 1.3418 10.0261 1.48227 10.2762 1.73232C10.5262 1.98237 10.6667 2.32151 10.6667 2.67513V4.00846M12.6667 4.00846V13.3418C12.6667 13.6954 12.5262 14.0346 12.2762 14.2846C12.0261 14.5347 11.687 14.6751 11.3334 14.6751H4.66671C4.31309 14.6751 3.97395 14.5347 3.7239 14.2846C3.47385 14.0346 3.33337 13.6954 3.33337 13.3418V4.00846H12.6667Z' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M6.66663 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M9.33337 7.3418V11.3418' stroke='%23737373' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0'%3e%3crect width='16' height='16' fill='white' transform='translate(0 0.0078125)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:C("popup.deleteComment.title"),description:C("popup.deleteComment.description"),acceptText:C("popup.deletePost.accept"),cancelText:C("popup.deletePost.cancel"),onAccept:function(){return e(void 0,void 0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:return l?[4,it({id:l,locale:h})]:[2];case 1:return 1===(null==(e=t.sent())?void 0:e.status)?(i&&i(),w({title:"",message:C("notification.success"),type:"success"})):w({title:"",message:(null===(n=null==e?void 0:e.messages)||void 0===n?void 0:n[0])||C("notification.failure"),type:"danger"}),[2]}}))}))},onClose:function(){return E(!1)}}),o.createElement(me,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:gt,label:C("actionPopover.delete"),onClick:function(){b((function(){E(!0)}))}}]},className:d,toggleButtonContent:o.createElement("img",{src:v?pt:vt}),buttonProps:{}}))},ft=function(i){var l,u,d,p,h,w=i.className,C=i.style,y=i.comment,E=i.type,b=void 0===E?"comment":E,N=i.level,I=void 0===N?0:N,T=i.replyingId,x=i.onPostCommentSuccess,M=i.post,_=i.onDeleteComment,P=i.refetchComment,L=i.hasQuickBookingEnable,S=i.handleMakeAppointment,j=a(f).data,B=j.locale,F=j.userInfo,R=j.env.isMarryBaby,D=g().t,O=r(y||null),A=O[0],z=O[1],V=A.id;A.countReplies;var U=A.countLikes,H=A.content,W=A.createdAt,Z=A.replies,G=void 0===Z?[]:Z,K=A.images,Q=void 0===K?[]:K,X=A.author,J=A.liked,Y=A.link,q=A.mentionedUser,ee=A.mentions,te=function(e){try{var t=e.match(/\[@([^\]]+)\]/),n=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:n}}catch(e){}return{text:""}}(H),ne=te.text,ie=te.replyingTo,oe=$({_joinCommunityIds:[null===(l=null==M?void 0:M.community)||void 0===l?void 0:l.id],_joinTopicIds:null===(u=null==M?void 0:M.topics)||void 0===u?void 0:u.map((function(e){return e.id}))}).authActionWrapper,ae=r(4),re=ae[0],le=ae[1],se=!!(null==F?void 0:F.id)&&(null==G?void 0:G.some((function(e){return e.author.id===F.id}))),ce=function(e){z((function(t){t.replies.unshift(e);var i=n(n({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return P&&P(i),i}))},ue=r(!1),de=ue[0],me=ue[1],ke=c((function(){return"comment"===b&&G&&0!=G.length?G.sort((function(e,t){var n=new Date(e.createdAt).getTime(),i=new Date(t.createdAt).getTime();return n>i?-1:n<i?1:0})):G}),[b,G]),ye=(null==G?void 0:G.length)||0,Ee=String(null==X?void 0:X.email)&&(null==F?void 0:F.email)&&String(null==X?void 0:X.email)===String(null==F?void 0:F.email),be=(null==X?void 0:X.name)||(null==X?void 0:X.username)||"",Ne=null==X?void 0:X.avatar,Ie=(null==X?void 0:X.username)||(null==X?void 0:X.name)||"",Te=r(null),xe=Te[0],Me=Te[1],_e=r(null),Pe=_e[0],Le=_e[1];s((function(){if(null==X?void 0:X.hospitalId){n=X.hospitalId,e(void 0,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:return[4,k(we(Ce.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:Se[B]}),"get")];case 1:return e=t.sent(),(null===(i=null==e?void 0:e._data)||void 0===i?void 0:i.branch)&&Me(null==e?void 0:e._data.branch),[2]}}))}))}var n,i;if(null==X?void 0:X.doctorId){i=X.doctorId,e(void 0,void 0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:return[4,k(we(Ce.GET_DOCTOR_INFO,{doctorId:i,website_url:Se[B]}),"get")];case 1:return e=t.sent(),(null===(n=null==e?void 0:e._data)||void 0===n?void 0:n.doctor)&&Le(null==e?void 0:e._data.doctor),[2]}}))}))}}),[X.hospitalId,X.doctorId]);var Be=(null==Pe?void 0:Pe.valid_outpatient)||(null==Pe?void 0:Pe.valid_telemedicine),Fe=((null==xe?void 0:xe.total_available_service)||(null==xe?void 0:xe.total_available_doctor))>0,Re=L&&(Be||Fe);return o.createElement(pe,{defaultParams:{_joinCommunityIds:[null===(d=null==M?void 0:M.community)||void 0===d?void 0:d.id],_joinTopicIds:null===(p=null==M?void 0:M.topics)||void 0===p?void 0:p.map((function(e){return e.id}))}},o.createElement(ve,{className:w,style:C,"data-is-reply":!!I,"data-is-marrybaby":R,"data-has-booking":Re},"reply"===b&&o.createElement(v,{className:"top-divider",type:"solid"}),o.createElement(ge,{avatar:Ne,name:be,username:Ie,email:null==X?void 0:X.email,time:W,className:"post-author ".concat(Ee?"with-popover":""),type:b,userId:null==X?void 0:X.id,role:null==X?void 0:X.role,expertId:null==X?void 0:X.partnerId,title:null==X?void 0:X.title,doctorId:null==X?void 0:X.doctorId,hospitalId:null==X?void 0:X.hospitalId,hasQuickBooking:Re,handleMakeAppointment:S}),o.createElement(lt,{className:"post-content-wrapper",replyingTo:ie,mentionedUser:q,description:ne,mentions:ee}),o.createElement("span",null),o.createElement("span",null),Q&&Q.length>0?o.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},o.createElement(dt,{images:Q,authorName:null==X?void 0:X.username})):null,Q&&0!==Q.length||!Y?null:o.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},o.createElement(je,{url:Y})),"most-engaging"!==b?o.createElement(o.Fragment,null,o.createElement(he,{type:fe.reply,loveCount:U,replyCount:ye,className:"post-reaction",liked:J,isReplied:se,hideCommentIcon:"reply"===b,onCommentClick:function(){return oe((function(){return me((function(e){return!e}))}))},onCommentCountClick:function(){return oe((function(){me(!0)}))},onLikeClick:function(){return oe((function(){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return V?[4,nt({commentId:V,setLike:!J,locale:B})]:[3,2];case 1:1===e.sent().status&&z((function(e){return n(n({},e),{liked:!J,countLikes:e.countLikes+(J?-1:1)})})),e.label=2;case 2:return[2]}}))}))}))}}),de&&o.createElement(ot,{replyingId:T||A.id,replyToName:X.name||X.username||"",isReply:!0,onClose:function(){return me(!1)},onPostSuccess:function(e){"reply"===b?x&&x(e):ce(e)},post:M,replyingUser:X}),"comment"===b&&G&&G.length>0?o.createElement("div",{className:"comment-reply-wrapper"},null===(h=null==ke?void 0:ke.slice(0,re))||void 0===h?void 0:h.map((function(e){return o.createElement(ft,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:I+1,replyingId:V,onPostCommentSuccess:ce,post:M,onDeleteComment:function(){z((function(t){return n(n({},t),{replies:t.replies.filter((function(t){return t.id!==e.id})),countReplies:t.countReplies-1})}))},handleMakeAppointment:S,hasQuickBookingEnable:L})})),ye>re&&o.createElement(o.Fragment,null,o.createElement(v,{className:"top-divider",type:"solid"}),o.createElement(m,{className:"more-cmt",size:"lg",color:"ghost",onClick:function(){return le((function(e){return e+4}))}},D("comment.seeMoreReplies",{count:ye-re}),o.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M6 12L10 8L6 4' stroke='%232D87F3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"})))):null):null,Ee&&o.createElement(ht,{onDeleteComment:_,className:"popover",commentId:A.id})))},wt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='%23595959' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",Ct="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 13.3334L8 10.3704L4 13.3334V3.85187C4 3.53754 4.12041 3.23608 4.33474 3.01382C4.54906 2.79155 4.83975 2.66669 5.14286 2.66669H10.8571C11.1602 2.66669 11.4509 2.79155 11.6653 3.01382C11.8796 3.23608 12 3.53754 12 3.85187V13.3334Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",kt="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 5.33337C13.1046 5.33337 14 4.43794 14 3.33337C14 2.2288 13.1046 1.33337 12 1.33337C10.8954 1.33337 10 2.2288 10 3.33337C10 4.43794 10.8954 5.33337 12 5.33337Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M4 10C5.10457 10 6 9.10457 6 8C6 6.89543 5.10457 6 4 6C2.89543 6 2 6.89543 2 8C2 9.10457 2.89543 10 4 10Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M12 14.6666C13.1046 14.6666 14 13.7712 14 12.6666C14 11.5621 13.1046 10.6666 12 10.6666C10.8954 10.6666 10 11.5621 10 12.6666C10 13.7712 10.8954 14.6666 12 14.6666Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M5.72668 9.00665L10.28 11.66' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M10.2734 4.33997L5.72668 6.9933' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",yt=function(n){var i=n.authorEmail,l=n.onDeletePost,s=n.shareUrl,c=n.post,u=n.className,d=void 0===u?"":u,m=n.popoverClassName,p=void 0===m?"":m,v=n.onBookmark,h=n.onRemoveBookmark,w=n.onEditPost,C=a(f),k=C.data,b=k.locale,N=k.userInfo,T=k.togetherUserId,x=k.env.isMarryBaby,M=C.action.pushNotifications,_=g().t,P=r(!1),L=P[0],S=P[1],j=r(!1),B=j[0],F=j[1],R=r(!1),D=R[0],O=R[1],A=$().authActionWrapper,z=i&&(null==N?void 0:N.email)&&i===String(null==N?void 0:N.email);return o.createElement("div",{className:d,onClick:function(e){e.preventDefault(),e.stopPropagation()}},D&&o.createElement(ke,{url:s,text:null==c?void 0:c.title,onClose:function(){return O(!1)}}),B&&o.createElement($e,{thumbnail:"./svg/delete.svg",isThumbnailIcon:!0,title:_("popup.deletePost.title"),description:_("popup.deletePost.description"),acceptText:_("popup.deletePost.accept"),cancelText:_("popup.deletePost.cancel"),onAccept:function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:if(!(null==c?void 0:c.id)||L)return[2];S(!0),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Ae({id:c.id,locale:b})];case 2:return 1===(null==(e=t.sent())?void 0:e.status)&&(null==l||l()),[3,4];case 3:return t.sent(),[3,4];case 4:return S(!1),[2]}}))}))},onClose:function(){return F(!1)}}),o.createElement(me,{className:p,toggleButtonContent:o.createElement("img",{src:x?pt:vt}),position:"bottom",align:"end",buttonProps:{isLoading:L},data:z?{isShowheader:!1,type:"list",list:[{icon:kt,label:_("morePopover.share"),onClick:function(){return O(!0)}},{icon:"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M7.16952 3.2356H2.99484C2.6785 3.2356 2.37512 3.36126 2.15143 3.58495C1.92774 3.80863 1.80208 4.11202 1.80208 4.42836V12.7777C1.80208 13.094 1.92774 13.3974 2.15143 13.6211C2.37512 13.8448 2.6785 13.9705 2.99484 13.9705H11.3442C11.6605 13.9705 11.9639 13.8448 12.1876 13.6211C12.4113 13.3974 12.537 13.094 12.537 12.7777V8.60303' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M11.6425 2.341C11.8798 2.10375 12.2016 1.97046 12.5371 1.97046C12.8726 1.97046 13.1944 2.10375 13.4317 2.341C13.6689 2.57826 13.8022 2.90005 13.8022 3.23558C13.8022 3.57111 13.6689 3.89289 13.4317 4.13015L7.76607 9.79578L5.38054 10.3922L5.97692 8.00663L11.6425 2.341Z' stroke='%23595959' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",label:_("actionPopover.edit"),onClick:w},{icon:gt,label:_("actionPopover.delete"),onClick:function(){A((function(){return F(!0)}))}}]}:{isShowheader:!1,type:"list",list:[{icon:kt,label:_("morePopover.share"),onClick:function(){return O(!0)}},{icon:(null==c?void 0:c.bookmarked)?wt:Ct,label:(null==c?void 0:c.bookmarked)?_("morePopover.unsavePost"):_("morePopover.savePost"),onClick:function(){A((function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return(null==N?void 0:N.id)&&(null==c?void 0:c.id)?(null==c?void 0:c.bookmarked)?[4,I(y(E.BOOKMARK.DELETE,{_locale:b}),"DELETE",{data:{post_id:String(c.id)}})]:[3,2]:[2];case 1:return 1===(null==(e=t.sent())?void 0:e.status)?(M({title:"",message:"Removed saved post",type:"success",displayIcon:Ct}),h&&h()):M({title:"",message:"Remove failed",type:"danger",displayIcon:Ct}),[3,4];case 2:return[4,I(y(E.BOOKMARK.CREATE,{_locale:b}),"POST",{data:{user_id:T||N.id,post_id:c.id}})];case 3:1===(null==(e=t.sent())?void 0:e.status)?(M({title:"",message:"Post saved",type:"success",displayIcon:wt}),v&&v()):M({title:"",message:"Post saved failed",type:"danger",displayIcon:Ct}),t.label=4;case 4:return[2]}}))}))}))}},{icon:at,label:_("morePopover.report"),subTree:{title:_("morePopover.report.title"),description:_("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(ye).map((function(e){return{label:ye[e].label,reason:ye[e].reportReasonText,reasonValue:e}})).map((function(e){return{label:_(e.label),subTree:{title:_("morePopover.reportSubmit.title"),description:_("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:function(t){return o.createElement(rt,{reason:e.reasonValue,reasonText:_(e.reason),postId:null==c?void 0:c.id,onClose:function(){return t&&t(!1)}})}}}}))}}]}}))},Et=function(n,i){return e(void 0,void 0,void 0,(function(){var e,o,a,r;return t(this,(function(t){switch(t.label){case 0:return[4,Ie(y(E.COMMENT.LIST,{postId:n,_locale:i,sort:"popularity",perPage:1,withoutReply:1}),"GET")];case 1:return e=t.sent(),[2,null===(r=null===(a=null===(o=null==e?void 0:e.data)||void 0===o?void 0:o.comments)||void 0===a?void 0:a.map(J))||void 0===r?void 0:r[0]]}}))}))},bt=function(i){var l=i.className,c=i.style,u=i.hideViewMoreComment,d=i.showMostEngaging,p=i.onCommentClick,v=i.onCommentCountClick,h=i.onMostEngagingCommentClick,w=i.onPostCommentSuccess,y=i.disableCardLink,E=i.disableShortenContent,b=i.onDeletePost,N=i.onEditPost,I=i.post,T=i.mostEngagingComment,x=i.onDeleteComment,M=i.showInputComment,_=i.InlineCommentsComponent,P=i.hasQuickBookingEnable,L=i.handleMakeAppointment,S=r(I),B=S[0],F=S[1],R=r(!1),D=R[0],O=R[1],A=r(T),z=A[0],V=A[1],U=B.community,H=B.topics,W=B.author,Z=B.slug,G=B.isPin,K=B.liked,Q=B.scheduleDateTime,X=B.createdAt,J=B.photos,Y=B.mentions,q=B.title,ee=B.description,te=B.previewUrl,ne=B.likesCount,ie=B.commentsCount,oe=B.id,ae=B.commented,re=a(f),le=re.data,se=le.locale,ce=le.env,ue=ce.isMarryBaby,de=ce.togetherBasePath,me=re.action.pushNotifications,ve=g().t,ye=r(M),Ie=ye[0],Te=ye[1],xe="".concat(de,"/").concat((null==U?void 0:U.slug)||"_","/").concat(Z||""),Me="".concat(Ee(se)).concat(xe),_e=$((null==U?void 0:U.slug)?{_joinCommunityIds:[U.id],_joinTopicIds:null==H?void 0:H.map((function(e){return e.id}))}:void 0).authActionWrapper,Le=r(!1),Se=Le[0],De=Le[1];s((function(){Te(M)}),[M]);var Ae=(null==W?void 0:W.name)||(null==W?void 0:W.username)||"",ze=(null==W?void 0:W.username)||(null==W?void 0:W.name)||"",Ve=null==W?void 0:W.avatar,Ue=r(null),He=Ue[0],We=Ue[1],Ze=r(null),Ge=Ze[0],Ke=Ze[1];s((function(){if(null==W?void 0:W.hospitalId){n=W.hospitalId,e(void 0,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:return[4,k(we(Ce.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:Ne[se]}),"get")];case 1:return e=t.sent(),(null===(i=null==e?void 0:e._data)||void 0===i?void 0:i.branch)&&We(null==e?void 0:e._data.branch),[2]}}))}))}var n,i;if(null==W?void 0:W.doctorId){i=W.doctorId,e(void 0,void 0,void 0,(function(){var e,n;return t(this,(function(t){switch(t.label){case 0:return[4,k(we(Ce.GET_DOCTOR_INFO,{doctorId:i,website_url:Ne[se]}),"get")];case 1:return e=t.sent(),(null===(n=null==e?void 0:e._data)||void 0===n?void 0:n.doctor)&&Ke(null==e?void 0:e._data.doctor),[2]}}))}))}}),[W.hospitalId,W.doctorId]);var Qe=(null==Ge?void 0:Ge.valid_outpatient)||(null==Ge?void 0:Ge.valid_telemedicine),Xe=((null==He?void 0:He.total_available_service)||(null==He?void 0:He.total_available_doctor))>0,Je=P&&(Qe||Xe);s((function(){e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return oe&&ie&&d&&!(null==T?void 0:T.id)?[4,Et(oe,se)]:[3,2];case 1:e=t.sent(),V(e),t.label=2;case 2:return[2]}}))}))}),[oe,se,ie,d,null==T?void 0:T.id]),s((function(){V(T)}),[null==T?void 0:T.id]);var Ye=function(i){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return ie>1&&(null==z?void 0:z.id)&&(null==z?void 0:z.id)===(null==i?void 0:i.id)?[4,Et(oe,se)]:[3,2];case 1:e=t.sent(),V(e),t.label=2;case 2:return F((function(e){return n(n({},e),{commentsCount:e.commentsCount-1})})),x&&x(i),[2]}}))}))};return o.createElement(pe,{defaultParams:(null==U?void 0:U.slug)?{_joinCommunityIds:[U.id],_joinTopicIds:null==H?void 0:H.map((function(e){return e.id}))}:void 0},D&&o.createElement(ke,{url:Me,avatar:C,text:q,onClose:function(){return O(!1)}}),o.createElement(be,{className:l,style:c,"data-is-marrybaby":ue},G?o.createElement(Fe,{className:"post-pin"}):null,o.createElement("div",{style:{position:"relative"}},o.createElement(ge,{avatar:Ve,name:Ae,username:ze,url:y?void 0:xe,email:null==W?void 0:W.email,time:Q||X,community:U,className:"post-author",role:null==W?void 0:W.role,userId:null==W?void 0:W.id,expertId:null==W?void 0:W.partnerId,doctorId:null==W?void 0:W.doctorId,hospitalId:null==W?void 0:W.hospitalId,title:null==W?void 0:W.title,hasQuickBooking:Je,handleMakeAppointment:L}),o.createElement(yt,{authorEmail:String(null==W?void 0:W.email),onDeletePost:b,shareUrl:Me,post:B,className:"popover",onEditPost:N})),o.createElement("a",{href:y?void 0:xe,className:"post-content-link-wrapper"},q&&o.createElement(Pe,{className:"post-content-title",as:"h1",tag:"h5",fontWeight:"bold"},j(q)),o.createElement(lt,{className:"post-content-wrapper",description:ee,disableShortenContent:E,mentions:Y})),o.createElement("span",null),o.createElement("span",null),o.createElement("div",{key:"tag-topic"},H&&H.length>0?o.createElement(Be,{topics:H,className:"post-topics"}):null),o.createElement("div",{key:"social-preview"},(null==B?void 0:B.introUrl)?o.createElement("div",{className:"social-preview-wrapper ".concat((null==J?void 0:J.length)?"has-image":"")},o.createElement(mt,{url:B.introUrl,image:B.bannerImage})):null),o.createElement("div",{key:"image-preview"},(null==J?void 0:J.length)?o.createElement("div",{className:"image-preview-wrapper"},o.createElement(dt,{images:J,authorName:null==W?void 0:W.name})):null),o.createElement("div",{key:"link-preview"},(null==B?void 0:B.introUrl)||(null==J?void 0:J.length)||!(null==te?void 0:te.url)?null:o.createElement("div",{className:"link-preview-wrapper"},o.createElement(je,{title:te.title,url:te.url,image:te.image}))),o.createElement(he,{type:fe.post,loveCount:ne,replyCount:ie,className:"post-reaction ".concat((null==J?void 0:J.length)||(null==te?void 0:te.url)?"hide-top-border":""),liked:Se?!K:K,isReplied:ae,onCommentClick:function(){return _e((function(){p?p():Te((function(e){return!e}))}))},onCommentCountClick:function(){_e((function(){ue?Te(!0):v?v():!y&&(window.location.href=xe)}))},onShareClick:function(){O(!0)},onLikeClick:function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:if(!oe||Se)return[2];De(!0),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Oe({id:oe,locale:se})];case 2:return 1!==(null==(e=t.sent())?void 0:e.status)?me(Re(ve)):F((function(e){return n(n({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked})})),[3,4];case 3:return t.sent(),me(Re(ve)),[3,4];case 4:return De(!1),[2]}}))}))},showingMostEngaging:!(!d||!(null==z?void 0:z.id))}),Ie&&o.createElement(ot,{isMainCmt:!M,onClose:function(){return Te(!1)},onPostSuccess:function(e){0!==ie||(null==z?void 0:z.id)||V(e),F((function(e){return n(n({},e),{commentsCount:e.commentsCount+1,commented:!0})})),w&&w(e)},post:B}),d&&(null==z?void 0:z.id)?o.createElement("div",{className:"most-engaging-wrapper",onClick:function(e){h?(e.stopPropagation(),h()):window.location.href=xe}},o.createElement(ft,{hasQuickBookingEnable:P,handleMakeAppointment:L,comment:z,onDeleteComment:function(){Ye&&Ye(z)},className:"most-engaging-comment",type:"most-engaging",key:z.id}),ie>1&&!u&&o.createElement(m,{className:"see-more-comments",color:"ghost",size:"md"},ve("comment.seeMoreComments",{count:ie-1}))):null,_))},Nt=Object.freeze({__proto__:null});export{je as C,ot as I,Fe as L,$e as P,rt as S,Be as T,Ye as a,Ge as b,Qe as c,Xe as d,lt as e,st as f,ut as g,dt as h,bt as i,yt as j,ft as k,ht as l,Nt as t};
@@ -0,0 +1 @@
1
+ import{c as n}from"./tslib.es6-fd0a5c98.js";import{keyframes as t}from"styled-components";import{useContext as a,useMemo as r}from"react";import{T as i,d as e}from"./translationsContext-221a5963.js";var o,s,l,d,c;!function(n){n.Boy="boy",n.Girl="girl"}(o||(o={})),function(n){n[n.Weight=0]="Weight",n[n.Height=1]="Height",n[n.Head=2]="Head",n[n.BMI=3]="BMI"}(s||(s={})),function(n){n[n.Weekly=0]="Weekly",n[n.Monthly=1]="Monthly",n[n.Yearly=2]="Yearly"}(l||(l={})),function(n){n[n.Weight=0]="Weight",n[n.Height=1]="Height",n[n.Head=2]="Head",n[n.BMI=3]="BMI",n[n.Record=4]="Record"}(d||(d={})),function(n){n.Vietnam="vi-VN",n.Indonesia="id-ID",n.Malaysia="ms-MY",n.Cambodia="km-KH",n.PhilippinesEnglish="en-PH",n.PhilippinesTagalog="tl-PH",n.Thailand="th-TH",n.Myanmar="my-MM",n.Taiwan="zh-TW",n.India="hi-IN"}(c||(c={}));var m,f,u,p,_,I,E,T,B,O=function(n){var t=Object.keys(n);return t.length?"?"+t.map((function(t){return"".concat(t,"=").concat(n[t])})).join("&"):""},h=function(n,t,a){void 0===t&&(t=1),void 0===a&&(a="page");var r=n.split("?"),i=r[0],e=r[1],o=new URLSearchParams(e||""),s={};return o.forEach((function(n,t){n&&(s[t]=n)})),Number(t)>1?s[a]=String(t):delete s[a],i+O(s)},y=function(n){"undefined"!=typeof window&&(document.documentElement.style.overflow=n?"hidden":"")},A={BREAK_POINT_SMALL_MOBILE:481,BREAK_POINT_MOBILE:768,BREAK_POINT_TABLET:1024,BREAK_POINT_PC:1200},P={smbDown:"@media (max-width: ".concat(A.BREAK_POINT_SMALL_MOBILE-1,"px)"),smbUp:"@media (min-width: ".concat(A.BREAK_POINT_SMALL_MOBILE,"px)"),mbDown:"@media (max-width: ".concat(A.BREAK_POINT_MOBILE-1,"px)"),mbOnly:"@media (min-width: ".concat(A.BREAK_POINT_SMALL_MOBILE,"px) and (max-width: ").concat(A.BREAK_POINT_MOBILE-1,"px)"),mbUp:"@media (min-width: ".concat(A.BREAK_POINT_MOBILE,"px)"),tdDown:"@media (max-width: ".concat(A.BREAK_POINT_TABLET-1,"px)"),tdOnly:"@media (min-width: ".concat(A.BREAK_POINT_MOBILE,"px) and (max-width: ").concat(A.BREAK_POINT_TABLET-1,"px)"),tdUp:"@media (min-width: ".concat(A.BREAK_POINT_TABLET,"px)"),pcUp:"@media (min-width: ".concat(A.BREAK_POINT_PC,"px)"),pcOnly:"@media (min-width: ".concat(A.BREAK_POINT_TABLET,"px) and (max-width: ").concat(A.BREAK_POINT_PC-1,"px)"),pcDown:"@media (max-width: ".concat(A.BREAK_POINT_PC-1,"px)")},b=function(n){switch(n){case"smbDown":return[0,A.BREAK_POINT_SMALL_MOBILE-1];case"smbUp":return[A.BREAK_POINT_SMALL_MOBILE,0];case"mbDown":return[0,A.BREAK_POINT_MOBILE-1];case"mbOnly":return[A.BREAK_POINT_SMALL_MOBILE,A.BREAK_POINT_MOBILE-1];case"mbUp":return[A.BREAK_POINT_MOBILE,0];case"tdDown":return[0,A.BREAK_POINT_TABLET-1];case"tdOnly":return[A.BREAK_POINT_MOBILE,A.BREAK_POINT_TABLET-1];case"tdUp":return[A.BREAK_POINT_TABLET,0];case"pcUp":return[A.BREAK_POINT_PC,0];case"pcOnly":return[A.BREAK_POINT_TABLET,A.BREAK_POINT_PC-1];case"pcDown":return[0,A.BREAK_POINT_PC-1]}},L=t(m||(m=n(["\nfrom {\n transform: translate3d(0, 100%, 0);\n visibility: visible;\n}\n\nto {\n transform: translate3d(0, 0, 0);\n}\n"],["\nfrom {\n transform: translate3d(0, 100%, 0);\n visibility: visible;\n}\n\nto {\n transform: translate3d(0, 0, 0);\n}\n"]))),v=t(f||(f=n(["\nfrom {\n transform: translate3d(0, -100%, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"],["\nfrom {\n transform: translate3d(0, -100%, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"]))),w=t(u||(u=n(["\n from {\n transform: translate3d(-100%, 0, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"],["\n from {\n transform: translate3d(-100%, 0, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"]))),M=t(p||(p=n(["\n from {\n transform: translate3d(100%, 0, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"],["\n from {\n transform: translate3d(100%, 0, 0);\n visibility: visible;\n }\n\n to {\n transform: translate3d(0, 0, 0);\n }\n"]))),N=t(_||(_=n(["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(0, 100%, 0);\n}\n"],["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(0, 100%, 0);\n}\n"]))),R=t(I||(I=n(["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(-100%, 0, 0);\n}\n"],["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(-100%, 0, 0);\n}\n"]))),K=t(E||(E=n(["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(100%, 0, 0);\n}\n"],["\nfrom {\n transform: translate3d(0, 0, 0);\n}\n\nto {\n visibility: hidden;\n transform: translate3d(100%, 0, 0);\n}\n"]))),x=t(T||(T=n(["\n from {\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n transform: translate3d(0, -100%, 0);\n }\n"],["\n from {\n transform: translate3d(0, 0, 0);\n }\n\n to {\n visibility: hidden;\n transform: translate3d(0, -100%, 0);\n }\n"]))),g=t(B||(B=n(["\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n"],["\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n"]))),C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function H(n){var t={exports:{}};return n(t,t.exports),t.exports}var D=H((function(n){(function(t){function a(n){var t=new Error(n);return t.name="ValueError",t}function r(n){return function(t){var r=Array.prototype.slice.call(arguments,1),i=0,e="UNDEFINED";return t.replace(/([{}])\1|[{](.*?)(?:!(.+?))?[}]/g,(function(t,o,s,l){if(null!=o)return o;var d=s;if(d.length>0){if("IMPLICIT"===e)throw a("cannot switch from implicit to explicit numbering");e="EXPLICIT"}else{if("EXPLICIT"===e)throw a("cannot switch from explicit to implicit numbering");e="IMPLICIT",d=String(i),i+=1}var c=d.split("."),m=(/^\d+$/.test(c[0])?c:["0"].concat(c)).reduce((function(n,t){return n.reduce((function(n,a){return null!=a&&t in Object(a)?["function"==typeof a[t]?a[t]():a[t]]:[]}),[])}),[r]).reduce((function(n,t){return t}),"");if(null==l)return m;if(Object.prototype.hasOwnProperty.call(n,l))return n[l](m);throw a('no transformer named "'+l+'"')}))}}var i=r({});i.create=r,i.extend=function(n,a){var i=r(a);n.format=function(){var n=Array.prototype.slice.call(arguments);return n.unshift(this),i.apply(t,n)}},n.exports=i}).call(C,C)}));function S(){var n=a(i)||{locale:"en-PH"},t=n.values,o=n.locale;return r((function(){return{t:function(n,a){return t?t[n]?a?D(t[n]||n,a):t[n]||n:(console.warn("[useTranslations] Missing translation for key ".concat(n," and locale ").concat(o)),a?D(e[n]||n,a):e[n]||n):(console.error("[useTranslations] t method called before translation values are loaded"),n)},locale:o}}),[t,o])}export{A as B,o as G,c as L,P as M,v as a,w as b,M as c,x as d,N as e,R as f,K as g,g as h,h as i,b as j,s as k,l,O as m,d as n,H as o,C as p,D as q,L as s,y as t,S as u};
package/build/i18n.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./translationsProvider-cc84606e.js"),r=require("./translationsContext-d7c8e0a0.js");require("./tslib.es6-f7929e76.js"),require("react"),exports.TranslationsProvider=e.TranslationsProvider,exports.translationsMap=e.translationsMap,exports.TranslationsContext=r.TranslationsContext,exports.defaultTranslations=r.defaultTranslations;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./translationsProvider-91e90e10.js"),r=require("./translationsContext-f8e45a1a.js");require("./tslib.es6-f7929e76.js"),require("react"),exports.TranslationsProvider=e.TranslationsProvider,exports.translationsMap=e.translationsMap,exports.TranslationsContext=r.TranslationsContext,exports.defaultTranslations=r.defaultTranslations;
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-f7929e76.js"),t=require("react"),a=require("./index.styled-04f94566.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(t);exports.Heading=function(t){var n,d=t.as,r=t.tag,s=t.className,l=t.children,o=t.title,c=t.color,g=t.style,u=t.fontWeight,v=t.dataEventCategory,f=t.dataEventAction,h=t.dataEventLabel,y=d||r;return i.default.createElement(a.StyledHeading,{title:o,style:e.__assign(e.__assign({},c?(n={},n["--custom-heading-color"]=c,n):void 0),g),"data-tag":r,"data-font-weight":u||void 0,"data-event-category":v,"data-event-action":f,"data-event-label":h,as:y,className:s,headingFontWeight:u,headingTag:r},l)};
1
+ "use strict";var e=require("./tslib.es6-f7929e76.js"),t=require("react"),a=require("./index.styled-9b7b2095.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(t);exports.Heading=function(t){var n,d=t.as,r=t.tag,s=t.className,l=t.children,o=t.title,c=t.color,g=t.style,u=t.fontWeight,v=t.dataEventCategory,f=t.dataEventAction,h=t.dataEventLabel,y=d||r;return i.default.createElement(a.StyledHeading,{title:o,style:e.__assign(e.__assign({},c?(n={},n["--custom-heading-color"]=c,n):void 0),g),"data-tag":r,"data-font-weight":u||void 0,"data-event-category":v,"data-event-action":f,"data-event-label":h,as:y,className:s,headingFontWeight:u,headingTag:r},l)};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-f7929e76.js"),t=require("react"),a=require("./index.styled-04f94566.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=n(t);exports.Input=function(n){var i=n.name,s=n.value,o=n.errorMessage,r=n.isNumerousKeyboard,c=void 0!==r&&r,u=n.actionIcon,d=n.displayIcon,m=n.onActionClick,y=n.label,p=n.className,v=n.onChange,b=n.isDisabled,f=n.CustomInput,C=n.size,g=n.style,I=n.autoComplete,N=void 0===I?"off":I,E=n.type,h=void 0===E?"text":E,A=n.inputClassName,k=n.trackingAttributes,K=n.enterKeyHint,L=e.__rest(n,["name","value","errorMessage","isNumerousKeyboard","actionIcon","displayIcon","onActionClick","label","className","onChange","isDisabled","CustomInput","size","style","autoComplete","type","inputClassName","trackingAttributes","enterKeyHint"]),z=t.useMemo((function(){return k?{"data-event-category":k.dataEventCategory,"data-event-action":k.dataEventAction,"data-event-label":k.dataEventLabel}:{}}),[k]);return l.default.createElement(a.StyledInput,{"data-size":C,className:p,"data-has-action-icon":!!u||void 0,"data-has-display-icon":!!d||void 0,"data-has-error":o&&o.length>0||void 0,style:g},y&&l.default.createElement(a.Label,{size:"label2",htmlFor:i,className:"inputLabel"},y),l.default.createElement("div",{style:{position:"relative"}},f||l.default.createElement("input",e.__assign({id:i,name:i,onChange:function(e){return v&&v(e.target.value)},type:h,"aria-label":h,value:s,disabled:b,autoComplete:N,inputMode:c||"number"===h?"numeric":h,pattern:c?"[0-9]*":".*",className:A,enterKeyHint:K},z,L)),d&&l.default.createElement(a.StyledDisplayIcon,{className:"displayIcon"},d),u&&l.default.createElement(a.StyledActionIcon,{className:"actionIcon",onClick:m},u)),o&&o.length>0&&l.default.createElement(a.StyledErrorLabel,{className:"errorLabel"},o))};
1
+ "use strict";var e=require("./tslib.es6-f7929e76.js"),t=require("react"),a=require("./index.styled-9b7b2095.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=n(t);exports.Input=function(n){var i=n.name,s=n.value,o=n.errorMessage,r=n.isNumerousKeyboard,c=void 0!==r&&r,u=n.actionIcon,d=n.displayIcon,m=n.onActionClick,y=n.label,p=n.className,b=n.onChange,v=n.isDisabled,f=n.CustomInput,C=n.size,g=n.style,I=n.autoComplete,N=void 0===I?"off":I,E=n.type,h=void 0===E?"text":E,A=n.inputClassName,k=n.trackingAttributes,K=n.enterKeyHint,L=e.__rest(n,["name","value","errorMessage","isNumerousKeyboard","actionIcon","displayIcon","onActionClick","label","className","onChange","isDisabled","CustomInput","size","style","autoComplete","type","inputClassName","trackingAttributes","enterKeyHint"]),z=t.useMemo((function(){return k?{"data-event-category":k.dataEventCategory,"data-event-action":k.dataEventAction,"data-event-label":k.dataEventLabel}:{}}),[k]);return l.default.createElement(a.StyledInput,{"data-size":C,className:p,"data-has-action-icon":!!u||void 0,"data-has-display-icon":!!d||void 0,"data-has-error":o&&o.length>0||void 0,style:g},y&&l.default.createElement(a.Label,{size:"label2",htmlFor:i,className:"inputLabel"},y),l.default.createElement("div",{style:{position:"relative"}},f||l.default.createElement("input",e.__assign({id:i,name:i,onChange:function(e){return b&&b(e.target.value)},type:h,"aria-label":h,value:s,disabled:v,autoComplete:N,inputMode:c||"number"===h?"numeric":h,pattern:c?"[0-9]*":".*",className:A,enterKeyHint:K},z,L)),d&&l.default.createElement(a.StyledDisplayIcon,{className:"displayIcon"},d),u&&l.default.createElement(a.StyledActionIcon,{className:"actionIcon",onClick:m},u)),o&&o.length>0&&l.default.createElement(a.StyledErrorLabel,{className:"errorLabel"},o))};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react"),t=require("./useTranslations-99cf899e.js"),l=require("./index.styled-9b7b2095.js"),a=require("./theme-6cd33b22.js"),n=require("date-fns"),r=require("lodash"),i=require("./index-1aff1d46.js");require("react-range"),require("react-dom");var d=require("./index.styled-afb2b3b3.js"),o=require("./useOutsideClick-528bfd6c.js"),c=require("./tslib.es6-f7929e76.js");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=C(e),f={Ask:l.Ask,BarChart:l.BarChart,Booking:l.Booking,Bookmark:l.Bookmark,Boy:function(e){var t=e.size,l=void 0===t?40:t,a=c.__rest(e,["size"]);return u.default.createElement("svg",c.__assign({xmlns:"http://www.w3.org/2000/svg",width:l,height:l,fill:"none",viewBox:"0 0 40 40"},a),u.default.createElement("circle",{cx:"20",cy:"20",r:"20",fill:"#2D87F3"}),u.default.createElement("path",{fill:"#fff",d:"M20.002 30.973c-2.616 0-4.945-.607-6.734-1.755-1.82-1.166-3.058-2.884-3.604-4.992-.045 0-.09.003-.136.003-.758 0-1.486-.3-2.023-.834a2.843 2.843 0 010-4.029 2.868 2.868 0 012.194-.83c.577-2.321 1.83-4.42 3.567-5.952C15.16 10.918 17.552 10 20.002 10s4.84.918 6.733 2.587c1.737 1.53 2.99 3.628 3.567 5.952a2.868 2.868 0 012.194.83 2.843 2.843 0 010 4.028 2.868 2.868 0 01-2.16.831c-.546 2.106-1.782 3.826-3.602 4.992-1.79 1.146-4.118 1.753-6.732 1.753z"}),u.default.createElement("path",{fill:"#2D87F3",d:"M17.95 13.19h-.014a.525.525 0 00-.524.509c0 .015-.059 1.466-2.006 1.927a.525.525 0 00-.389.63.523.523 0 00.633.386c2.18-.516 2.793-2.134 2.812-2.917a.519.519 0 00-.313-.491.527.527 0 00-.2-.044zM20.591 12.874a.524.524 0 00-.326.663c.004.014.455 1.396-1.212 2.5a.521.521 0 00.19.936.526.526 0 00.39-.066c1.866-1.236 1.878-2.966 1.625-3.708a.521.521 0 00-.464-.352.529.529 0 00-.203.027zM23.292 13.4a.525.525 0 00-.735.749c.008.007.787.783.35 2.119a.523.523 0 00.898.508.523.523 0 00.098-.183c.641-1.946-.56-3.142-.611-3.192zM15.977 21.818a1.365 1.365 0 000-1.936 1.38 1.38 0 00-1.945 0 1.365 1.365 0 000 1.936 1.38 1.38 0 001.945 0zM25.445 22.172a1.368 1.368 0 10-.682-2.652 1.369 1.369 0 10.682 2.652zM22.837 22.755a.532.532 0 00-.66.338c-.005.012-.414 1.222-2.124 1.222-1.71 0-2.12-1.21-2.124-1.222a.523.523 0 00-.998.316c.026.08.656 1.947 3.123 1.947s3.097-1.867 3.122-1.947a.52.52 0 00-.339-.654z"}))},Calendar:function(e){var t=e.size,l=void 0===t?20:t,a=e.color,n=void 0===a?"#595959":a,r=c.__rest(e,["size","color"]);return u.default.createElement("svg",c.__assign({width:l,height:l,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.8337 2.50065H16.667C17.5837 2.50065 18.3337 3.25065 18.3337 4.16732V17.5006C18.3337 18.4173 17.5837 19.1673 16.667 19.1673H3.33366C2.41699 19.1673 1.66699 18.4173 1.66699 17.5006V4.16732C1.66699 3.25065 2.41699 2.50065 3.33366 2.50065H4.16699V1.66732C4.16699 1.20898 4.54199 0.833984 5.00033 0.833984C5.45866 0.833984 5.83366 1.20898 5.83366 1.66732V2.50065H14.167V1.66732C14.167 1.20898 14.542 0.833984 15.0003 0.833984C15.4587 0.833984 15.8337 1.20898 15.8337 1.66732V2.50065ZM4.16699 17.5007H15.8337C16.292 17.5007 16.667 17.1257 16.667 16.6673V6.66732H3.33366V16.6673C3.33366 17.1257 3.70866 17.5007 4.16699 17.5007Z",fill:n}))},Community:l.Community,EditSpecial:l.EditSpecial,Family:l.Family,Font:l.Font,GenderBoy:function(e){var t=e.size,l=void 0===t?16:t,a=c.__rest(e,["size"]);return u.default.createElement("svg",c.__assign({xmlns:"http://www.w3.org/2000/svg",width:l,height:l,fill:"none",viewBox:"0 0 16 16"},a),u.default.createElement("g",{fill:"#595959",clipPath:"url(#clip0_408_8625)"},u.default.createElement("path",{d:"M15.325 1.199a.602.602 0 00-.038-.151v-.005h-.001a.618.618 0 00-.107-.168.623.623 0 00-.117-.105l-.004-.002a.6.6 0 00-.175-.078.609.609 0 00-.161-.024h-4.278a.611.611 0 000 1.223h2.802L9.6 5.535a5.469 5.469 0 00-3.433-1.203 5.506 5.506 0 00-5.5 5.5c0 3.033 2.468 5.5 5.5 5.5 3.033 0 5.5-2.467 5.5-5.5 0-1.262-.425-2.46-1.203-3.433l3.648-3.647v2.802a.611.611 0 001.222 0V1.277c0-.012-.003-.025-.004-.037a.617.617 0 00-.004-.041zM6.166 14.11A4.282 4.282 0 011.89 9.833a4.282 4.282 0 017.303-3.028 4.282 4.282 0 01-3.026 7.305z"}),u.default.createElement("path",{fillRule:"evenodd",d:"M15.287 1.048a.602.602 0 01.042.192l.002.016a.156.156 0 01.002.021v4.278a.611.611 0 01-1.222 0V2.753L10.463 6.4a5.469 5.469 0 011.203 3.433c0 3.033-2.467 5.5-5.5 5.5a5.506 5.506 0 01-5.5-5.5c0-3.033 2.468-5.5 5.5-5.5 1.263 0 2.46.425 3.433 1.203l3.647-3.647h-2.802a.611.611 0 010-1.223h4.278a.609.609 0 01.197.036.6.6 0 01.14.067h.003a.623.623 0 01.14.135h.001a.618.618 0 01.083.138v.003l.001.003zm.064-.02c.021.053.033.107.04.162m-.04-.162a.695.695 0 00-.096-.165l-.001-.002c-.008-.009-.016-.02-.026-.03A.69.69 0 0015.1.715m-.2-.089A.675.675 0 0014.722.6h-4.278a.678.678 0 000 1.355h2.641L9.594 5.447a5.535 5.535 0 00-3.428-1.18A5.573 5.573 0 00.6 9.832 5.573 5.573 0 006.166 15.4a5.573 5.573 0 005.567-5.567c0-1.257-.417-2.45-1.18-3.427l3.491-3.492v2.641a.678.678 0 001.356 0V1.277a.202.202 0 00-.003-.027v-.004l-.001-.01a.743.743 0 00-.005-.046M1.955 9.833a4.216 4.216 0 004.211 4.211 4.216 4.216 0 002.979-7.191 4.216 4.216 0 00-7.19 2.98zm7.237-3.028a4.282 4.282 0 00-7.304 3.028 4.282 4.282 0 004.278 4.278 4.282 4.282 0 003.026-7.306z",clipRule:"evenodd"})),u.default.createElement("defs",null,u.default.createElement("clipPath",{id:"clip0_408_8625"},u.default.createElement("path",{fill:"#fff",d:"M0 0H16V16H0z"}))))},GenderChooseBoy:function(e){return u.default.createElement("svg",c.__assign({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",fill:"none",viewBox:"0 0 21 20"},e),u.default.createElement("g",{clipPath:"url(#clip0_3_24176)"},u.default.createElement("path",{fill:"#45A4FF",d:"M11.203 7.633l1.914 1.914 6.397-6.397L17.6 1.235l-6.397 6.398z"}),u.default.createElement("path",{fill:"#45A4FF",d:"M8.083 5.334a7.333 7.333 0 100 14.667 7.333 7.333 0 000-14.667zm0 11.96a4.626 4.626 0 110-9.253 4.626 4.626 0 010 9.252z"}),u.default.createElement("path",{fill:"#2D87F3",d:"M7.508 8.077a4.626 4.626 0 100 9.181 4.627 4.627 0 010-9.181zM8.083 5.334a7.43 7.43 0 00-.575.022 7.334 7.334 0 010 14.622 7.333 7.333 0 10.575-14.644zM19.88 2.785v-.78L18.744.872h-.78l-2.707 2.707h1.55c.2 0 .364.163.364.365v1.55l2.707-2.708z"}),u.default.createElement("path",{fill:"#45A4FF",d:"M18.043 0h-4.585a.365.365 0 00-.364.365v1.978c0 .201.163.364.364.364h4.22c.201 0 .365.163.365.365v4.22c0 .2.163.364.364.364h1.978a.365.365 0 00.365-.364V.365A.365.365 0 0020.385 0h-2.342z"})),u.default.createElement("defs",null,u.default.createElement("clipPath",{id:"clip0_3_24176"},u.default.createElement("path",{fill:"#fff",d:"M0 0H20V20H0z",transform:"translate(.75)"}))))},GenderChooseGirl:function(e){return u.default.createElement("svg",c.__assign({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",fill:"none",viewBox:"0 0 21 20"},e),u.default.createElement("path",{fill:"#FE9DC2",d:"M13.748 15.546h-1.503a.321.321 0 01-.321-.322v-3.7H9.577v3.7a.321.321 0 01-.322.322H7.753a.321.321 0 00-.321.321v1.704c0 .178.144.322.321.322h1.502c.178 0 .322.144.322.321v1.465c0 .178.144.321.321.321h1.704a.321.321 0 00.322-.321v-1.465c0-.177.144-.321.321-.321h1.503a.321.321 0 00.321-.322v-1.704a.322.322 0 00-.321-.321z"}),u.default.createElement("path",{fill:"#FC488D",d:"M9.576 11.523v2.151a7.466 7.466 0 002.347 0v-2.15H9.576z"}),u.default.createElement("path",{fill:"#FE9DC2",d:"M10.75 0a6.357 6.357 0 100 12.715A6.357 6.357 0 0010.75 0zm0 10.368a4.01 4.01 0 110-8.021 4.01 4.01 0 010 8.021z"}),u.default.createElement("path",{fill:"#FC488D",d:"M10.157 2.391a4.01 4.01 0 100 7.934 4.011 4.011 0 010-7.934zM10.75 0c-.2 0-.398.01-.593.028a6.358 6.358 0 010 12.66A6.357 6.357 0 1010.75 0z"}))},GenderGirl:function(e){var t=e.size,l=void 0===t?16:t,a=c.__rest(e,["size"]);return u.default.createElement("svg",c.__assign({xmlns:"http://www.w3.org/2000/svg",width:l,height:l,fill:"none",viewBox:"0 0 16 16"},a),u.default.createElement("path",{fill:"#595959",d:"M11.445 8.979a4.875 4.875 0 000-6.888 4.879 4.879 0 00-6.89 0 4.875 4.875 0 000 6.888 4.849 4.849 0 002.872 1.39V12H6.28a.573.573 0 100 1.147h1.147v1.614a.573.573 0 001.146 0v-1.614H9.72a.573.573 0 100-1.146H8.573v-1.63a4.849 4.849 0 002.872-1.391zm-6.08-.81a3.728 3.728 0 010-5.268 3.73 3.73 0 015.27 0 3.728 3.728 0 010 5.267 3.73 3.73 0 01-5.27 0z"}),u.default.createElement("path",{fill:"#595959",fillRule:"evenodd",d:"M5.366 8.168a3.73 3.73 0 005.268 0 3.728 3.728 0 000-5.267 3.73 3.73 0 00-5.268 0 3.728 3.728 0 000 5.267zm6.15-6.148a4.975 4.975 0 010 7.03 4.948 4.948 0 01-2.843 1.407V11.9H9.72a.673.673 0 110 1.346H8.673v1.514a.673.673 0 01-1.346 0v-1.514H6.28a.673.673 0 110-1.346h1.046v-1.443A4.948 4.948 0 014.484 9.05a4.975 4.975 0 010-7.029 4.979 4.979 0 017.032 0zm-4.09 8.35a4.849 4.849 0 01-2.871-1.391 4.875 4.875 0 010-6.888 4.879 4.879 0 016.89 0 4.875 4.875 0 010 6.888 4.849 4.849 0 01-2.872 1.39V12H9.72a.573.573 0 110 1.147H8.573v1.614a.573.573 0 01-1.146 0v-1.614H6.28a.573.573 0 110-1.146h1.147v-1.63zm-1.99-7.398a3.628 3.628 0 000 5.126 3.63 3.63 0 005.128 0 3.628 3.628 0 000-5.126 3.63 3.63 0 00-5.128 0z",clipRule:"evenodd"}))},Girl:function(e){var t=e.size,l=void 0===t?40:t,a=c.__rest(e,["size"]);return u.default.createElement("svg",c.__assign({xmlns:"http://www.w3.org/2000/svg",width:l,height:l,fill:"none",viewBox:"0 0 24 24"},a),u.default.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"#FC5D9A"}),u.default.createElement("path",{fill:"#fff",d:"M18.283 11.759c-.034 0-.068 0-.102.003-.346-1.394-1.099-2.652-2.14-3.57a6.132 6.132 0 00-3.726-1.544v-.532a2.062 2.062 0 001.617-.634 1.178 1.178 0 000-1.638 1.13 1.13 0 00-1.626 0c-.116.119-.218.25-.305.392a2.212 2.212 0 00-.308-.393 1.13 1.13 0 00-1.625 0 1.179 1.179 0 000 1.638 2.06 2.06 0 001.5.639c.041 0 .08 0 .117-.004v.533a6.143 6.143 0 00-3.726 1.543c-1.042.918-1.793 2.177-2.14 3.572a1.72 1.72 0 00-1.317.498 1.706 1.706 0 000 2.417c.323.32.76.5 1.215.5.027 0 .054 0 .081-.002a4.968 4.968 0 002.162 2.996c1.073.69 2.47 1.053 4.04 1.053 1.57 0 2.967-.364 4.04-1.053a4.987 4.987 0 002.162-2.998 1.72 1.72 0 001.295-.499 1.705 1.705 0 000-2.417c-.322-.32-.759-.5-1.214-.5zm-5.527-7.477a.5.5 0 01.724 0 .55.55 0 010 .763 1.446 1.446 0 01-1.165.446 1.834 1.834 0 01-.004-.077v-.09c.01-.392.168-.764.445-1.042zm-2.238.762a.55.55 0 010-.763.501.501 0 01.724 0c.276.278.435.65.444 1.042v.09c0 .027-.002.053-.004.078a1.45 1.45 0 01-1.164-.447z"}),u.default.createElement("path",{fill:"#FC5D9A",d:"M9.586 13.68a.819.819 0 000-1.161.828.828 0 00-1.167 0 .819.819 0 000 1.162c.323.32.845.32 1.167 0zM15.267 13.894a.821.821 0 10-.41-1.592.821.821 0 10.41 1.592zM13.704 14.242a.32.32 0 00-.282.045.314.314 0 00-.114.159c-.002.007-.248.733-1.274.733-1.027 0-1.272-.726-1.275-.733a.314.314 0 10-.598.19c.016.046.394 1.168 1.873 1.168s1.858-1.12 1.873-1.168a.313.313 0 00-.203-.394zM12.402 7.713a.315.315 0 00-.53.24.313.313 0 00.1.218c.253.248.466.533.632.845.316.61.298 1.118-.056 1.551-.403.493-.865.449-1.104.378-.33-.096-.598-.351-.625-.595-.03-.263.058-.585.318-.71.165-.077.337-.039.486.11a.315.315 0 00.538-.22.313.313 0 00-.092-.222c-.336-.337-.797-.426-1.204-.232-.473.226-.737.752-.671 1.343.055.494.495.957 1.072 1.128.151.045.308.067.465.068.491 0 .958-.228 1.305-.652.514-.63.558-1.402.127-2.234a4.11 4.11 0 00-.761-1.016z"}))},Heart:l.Heart,Home:l.Home,Kebab:function(e){var t=e.size,l=void 0===t?20:t,a=c.__rest(e,["size"]);return u.default.createElement("svg",c.__assign({xmlns:"http://www.w3.org/2000/svg",width:l,height:l,fill:"none",viewBox:"0 0 20 20"},a),u.default.createElement("path",{fill:"#000",fillOpacity:"0.54",fillRule:"evenodd",d:"M10 6.667c.916 0 1.666-.75 1.666-1.666 0-.917-.75-1.667-1.666-1.667-.917 0-1.667.75-1.667 1.667 0 .916.75 1.666 1.667 1.666zm0 1.667c-.917 0-1.667.75-1.667 1.667 0 .916.75 1.666 1.667 1.666.916 0 1.666-.75 1.666-1.666 0-.917-.75-1.667-1.666-1.667zm-1.667 6.667c0-.917.75-1.667 1.667-1.667.916 0 1.666.75 1.666 1.667 0 .916-.75 1.666-1.666 1.666-.917 0-1.667-.75-1.667-1.666z",clipRule:"evenodd"}))},Like:l.Like,MyCommunity:l.MyCommunity,PlusSpecial:l.PlusSpecial,Recalculate:l.Recalculate,Scale:l.Scale,Share:l.Share,Stethoscope:l.Stethoscope},s=function(e){var t=e.profile,n=e.onChange,r=e.isActive;return u.default.createElement(l.StyledBabyGrowthProfileRadio,{onClick:function(){return n(t.id)}},u.default.createElement("div",{className:"baby"},"male"===t.gender?u.default.createElement(f.Boy,{size:24}):u.default.createElement(f.Girl,{size:24}),u.default.createElement(l.Text,{size:"p2",color:a.theme.colors.gray800},t.name)),u.default.createElement("div",{className:r?"radio active":"radio"}))},m=function(e,t){return e?e+" "+(t||""):"--"},h=function(n){var r=n.name,i=n.onClose,c=n.onEdit,C=n.onSwitch,f=n.onAdd,s=n.onRemove,m=t.useTranslations().t,h=e.useRef();return o.useOutsideClick(h,i),u.default.createElement("div",{ref:h},u.default.createElement(d.StyledChildCardMenu,{width:250},u.default.createElement(l.Menu.Item,{onClick:c,icon:u.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M12.7812 1.83301C12.2987 1.83301 11.8162 2.01676 11.4479 2.38509L10.6667 3.16634L13.3333 5.83301L14.1146 5.05176C14.8506 4.31576 14.8506 3.12176 14.1146 2.38509C13.7463 2.01676 13.2638 1.83301 12.7812 1.83301ZM9.66667 4.16634L2 11.833V14.4997H4.66667L12.3333 6.83301L9.66667 4.16634Z",fill:"#595959"}))},u.default.createElement(l.Text,{size:"p2",color:a.theme.colors.gray800},m("childCard.menu.edit",{name:r}))),u.default.createElement(l.Menu.Item,{onClick:C,icon:u.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M8 2.5C4.9478 2.5 2.4204 4.79359 2.05078 7.7513C2.03763 7.83928 2.04222 7.929 2.06428 8.01518C2.08634 8.10136 2.12542 8.18226 2.17922 8.2531C2.23303 8.32394 2.30046 8.3833 2.37756 8.42768C2.45465 8.47206 2.53985 8.50057 2.62813 8.51152C2.71642 8.52247 2.806 8.51564 2.8916 8.49143C2.9772 8.46723 3.05709 8.42614 3.12657 8.37059C3.19605 8.31503 3.2537 8.24613 3.29615 8.16795C3.33859 8.08978 3.36496 8.00389 3.3737 7.91536C3.66141 5.61307 5.61354 3.83333 8 3.83333C9.34288 3.83333 10.5434 4.39987 11.3919 5.30339L10.0977 6.59766C9.96766 6.72766 9.96766 6.93901 10.0977 7.06901C10.1623 7.13434 10.248 7.16667 10.3333 7.16667H13.3333C13.5101 7.16667 13.6797 7.09643 13.8047 6.9714C13.9298 6.84638 14 6.67681 14 6.5V3.5C14 3.41467 13.967 3.32966 13.9023 3.26432C13.7723 3.13432 13.561 3.13432 13.431 3.26432L12.3359 4.35938C11.2437 3.21415 9.7037 2.5 8 2.5ZM13.2943 8.49089C13.1292 8.48959 12.9695 8.54959 12.8461 8.65928C12.7227 8.76896 12.6444 8.92053 12.6263 9.08464C12.3386 11.3869 10.3865 13.1667 8 13.1667C6.65713 13.1667 5.45884 12.5994 4.60938 11.6953L5.90234 10.4023C6.03234 10.2723 6.03234 10.061 5.90234 9.93099C5.83768 9.86566 5.752 9.83333 5.66667 9.83333H2.66667C2.48986 9.83333 2.32029 9.90357 2.19526 10.0286C2.07024 10.1536 2 10.3232 2 10.5V13.5C2 13.5853 2.03299 13.6703 2.09766 13.7357C2.22766 13.8657 2.43901 13.8657 2.56901 13.7357L3.66536 12.6393C4.75711 13.7836 6.29696 14.5 8 14.5C11.0522 14.5 13.5796 12.2064 13.9492 9.2487C13.9622 9.1548 13.955 9.05922 13.928 8.96833C13.9011 8.87745 13.8552 8.79334 13.7932 8.72163C13.7312 8.64991 13.6546 8.59224 13.5686 8.55245C13.4826 8.51266 13.3891 8.49167 13.2943 8.49089Z",fill:"#595959"}))},u.default.createElement(l.Text,{size:"p2",color:a.theme.colors.gray800},m("childCard.menu.switch"))),u.default.createElement(l.Menu.Item,{onClick:f,icon:u.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9564 8.56545C15.7745 7.46727 14.9673 6.57273 13.9127 6.26C13.5273 5.44545 12.9818 4.73273 12.32 4.14364C11.1709 3.11818 9.65818 2.5 8 2.5C6.34182 2.5 4.82909 3.11818 3.68 4.14364C3.01091 4.73273 2.46545 5.45273 2.08727 6.26C1.03273 6.57273 0.225455 7.46 0.0436364 8.56545C0.0145455 8.71818 0 8.87818 0 9.04545C0 9.21273 0.0145455 9.37273 0.0436364 9.52545C0.225455 10.6236 1.03273 11.5182 2.08727 11.8309C2.46545 12.6382 3.01091 13.3509 3.66545 13.9327C4.81455 14.9655 6.33455 15.5909 8 15.5909C9.66545 15.5909 11.1855 14.9655 12.3418 13.9327C12.9964 13.3509 13.5418 12.6309 13.92 11.8309C14.9673 11.5182 15.7745 10.6309 15.9564 9.52545C15.9855 9.37273 16 9.21273 16 9.04545C16 8.87818 15.9855 8.71818 15.9564 8.56545ZM6.18182 7.04545C5.67974 7.04545 5.27273 7.45247 5.27273 7.95455C5.27273 8.45662 5.67974 8.86364 6.18182 8.86364C6.6839 8.86364 7.09091 8.45662 7.09091 7.95455C7.09091 7.45247 6.6839 7.04545 6.18182 7.04545ZM9.81818 7.04545C9.3161 7.04545 8.90909 7.45247 8.90909 7.95455C8.90909 8.45662 9.3161 8.86364 9.81818 8.86364C10.3203 8.86364 10.7273 8.45662 10.7273 7.95455C10.7273 7.45247 10.3203 7.04545 9.81818 7.04545ZM5.01821 10.5H10.9818C11.1128 10.5 11.2073 10.6455 11.1491 10.7691C10.5455 11.9109 9.36002 12.6818 8.00002 12.6818C6.64002 12.6818 5.45457 11.9109 4.85093 10.7691C4.78548 10.6455 4.88002 10.5 5.01821 10.5ZM12.9538 10.4875C12.9991 10.4938 13.0435 10.5 13.0909 10.5C13.8909 10.5 14.5455 9.84545 14.5455 9.04545C14.5455 8.24545 13.8909 7.59091 13.0909 7.59091C13.0435 7.59091 12.9991 7.5971 12.9538 7.60343C12.9297 7.60679 12.9053 7.6102 12.88 7.61273C12.7345 7.12545 12.5236 6.67455 12.2545 6.26C11.3455 4.87091 9.78182 3.95455 8 3.95455C6.21818 3.95455 4.65455 4.87091 3.74545 6.26C3.47636 6.67455 3.26545 7.12545 3.12 7.61273C3.09473 7.6102 3.07033 7.60679 3.0462 7.60343C3.0009 7.5971 2.95654 7.59091 2.90909 7.59091C2.10909 7.59091 1.45455 8.24545 1.45455 9.04545C1.45455 9.84545 2.10909 10.5 2.90909 10.5C2.95654 10.5 3.0009 10.4938 3.0462 10.4875C3.07033 10.4841 3.09473 10.4807 3.12 10.4782C3.26545 10.9655 3.47636 11.4164 3.74545 11.8309C4.65455 13.22 6.21818 14.1364 8 14.1364C9.78182 14.1364 11.3455 13.22 12.2545 11.8309C12.5236 11.4164 12.7345 10.9655 12.88 10.4782C12.9053 10.4807 12.9297 10.4841 12.9538 10.4875Z",fill:"#595959"}),u.default.createElement("path",{d:"M2.5 2V1C2.5 0.725 2.275 0.5 2 0.5C1.725 0.5 1.5 0.725 1.5 1V2H0.5C0.225 2 0 2.225 0 2.5C0 2.775 0.225 3 0.5 3H1.5V4C1.5 4.275 1.725 4.5 2 4.5C2.275 4.5 2.5 4.275 2.5 4V3H3.5C3.775 3 4 2.775 4 2.5C4 2.225 3.775 2 3.5 2H2.5Z",fill:"#595959"}))},u.default.createElement(l.Text,{size:"p2",color:a.theme.colors.gray800},m("childCard.menu.add"))),u.default.createElement(l.Menu.Item,{onClick:s,icon:u.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M6.66699 1.83301L6.00033 2.49967H3.33366C2.93366 2.49967 2.66699 2.76634 2.66699 3.16634C2.66699 3.56634 2.93366 3.83301 3.33366 3.83301H4.66699H11.3337H12.667C13.067 3.83301 13.3337 3.56634 13.3337 3.16634C13.3337 2.76634 13.067 2.49967 12.667 2.49967H10.0003L9.33366 1.83301H6.66699ZM3.33366 5.16634V13.833C3.33366 14.5663 3.93366 15.1663 4.66699 15.1663H11.3337C12.067 15.1663 12.667 14.5663 12.667 13.833V5.16634H3.33366ZM6.00033 6.49967C6.40033 6.49967 6.66699 6.76634 6.66699 7.16634V13.1663C6.66699 13.5663 6.40033 13.833 6.00033 13.833C5.60033 13.833 5.33366 13.5663 5.33366 13.1663V7.16634C5.33366 6.76634 5.60033 6.49967 6.00033 6.49967ZM10.0003 6.49967C10.4003 6.49967 10.667 6.76634 10.667 7.16634V13.1663C10.667 13.5663 10.4003 13.833 10.0003 13.833C9.60033 13.833 9.33366 13.5663 9.33366 13.1663V7.16634C9.33366 6.76634 9.60033 6.49967 10.0003 6.49967Z",fill:"#F44D2C"}))},u.default.createElement(l.Text,{size:"p2",color:a.theme.colors.red600},m("childCard.menu.remove",{name:r})))))};exports.BabyGrowthChooseProfileDrawer=function(a){var n=a.babyProfiles,r=a.onClose,i=a.onCreate,o=a.onAddMeasurement,C=a.onSwitchProfile,f=a.open,m=a.isMyProfile,h=void 0!==m&&m,v=c.__rest(a,["babyProfiles","onClose","onCreate","onAddMeasurement","onSwitchProfile","open","isMyProfile"]),w=e.useState(n[0].id),g=w[0],E=w[1],p=t.useTranslations().t;return u.default.createElement(d.StyledBabyGrowthChooseProfileDrawer,c.__assign({title:"Baby profiles",onClose:r,open:f,placement:"bottom"},v),(function(e){var t=e.internalClose;return u.default.createElement("div",{className:"add-profile-container"},u.default.createElement("div",{className:"profile-container"},n.map((function(e){return u.default.createElement(s,{key:e.id,profile:e,isActive:g===e.id,onChange:E})}))),u.default.createElement("div",{className:"button-group"},u.default.createElement(l.Button,{onClick:function(){t(),null==i||i()},size:"lg",color:"secondary",icon:u.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M13.5 9.75H9.75V13.5C9.75 13.9125 9.4125 14.25 9 14.25C8.5875 14.25 8.25 13.9125 8.25 13.5V9.75H4.5C4.0875 9.75 3.75 9.4125 3.75 9C3.75 8.5875 4.0875 8.25 4.5 8.25H8.25V4.5C8.25 4.0875 8.5875 3.75 9 3.75C9.4125 3.75 9.75 4.0875 9.75 4.5V8.25H13.5C13.9125 8.25 14.25 8.5875 14.25 9C14.25 9.4125 13.9125 9.75 13.5 9.75Z",fill:"#2D87F3"}))},p("babyGrowth.drawer.createBaby")),u.default.createElement(l.Button,{size:"lg",color:"primary",onClick:function(){t(),h?null==C||C(g):null==o||o(g)}},p(h?"babyGrowth.drawer.switchProfile":"babyGrowth.drawer.addMeasurement"))))}))},exports.BabyGrowthGender=function(e){var a=e.value,n=e.onChange,r=t.useTranslations().t;return u.default.createElement(l.StyledBabyGrowthGender,null,u.default.createElement(l.Text,{size:"label2",type:"bold",style:{marginBottom:"0.5rem"}},r("babyVaccineTool.selectGender")),u.default.createElement(l.StyledBabyGrowthGenderOption,{options:[{value:t.Gender.Girl,label:r("gender.female"),content:u.default.createElement(f.GenderChooseGirl,null)},{value:t.Gender.Boy,label:r("gender.male"),content:u.default.createElement(f.GenderChooseBoy,null)}],value:a,onChange:n,className:"gender-selector"}))},exports.BabyGrowthLegend=function(e){var n=e.legends,r=e.locale;return u.default.createElement(l.StyledBabyGrowthLegend,null,n.map((function(e,n){return u.default.createElement(l.StyledLegend,{key:n},u.default.createElement("span",{className:"dot",style:{backgroundColor:e.color}}),u.default.createElement(l.Text,{size:"n1",color:a.theme.colors.gray800},r===t.LOCALE.Indonesia?e["z-score"]:e.text))})))},exports.BabyGrowthProfileRadio=s,exports.BabyGrowthRecord=function(e){var t=e.measurementDate,r=void 0===t?new Date:t,i=e.weight,d=e.height,o=e.head,c=e.onEdit;return u.default.createElement(l.StyledBabyGrowthRecord,null,u.default.createElement("div",{className:"time"},u.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M5.64421 0.666016C5.27621 0.666016 4.97754 0.964682 4.97754 1.33268V1.99935H4.31087C3.57754 1.99935 2.97754 2.59935 2.97754 3.33268V12.666C2.97754 13.3993 3.57754 13.9993 4.31087 13.9993H13.6442C14.3775 13.9993 14.9775 13.3993 14.9775 12.666V3.33268C14.9775 2.59935 14.3775 1.99935 13.6442 1.99935H12.9775V1.33268C12.9775 0.964682 12.6789 0.666016 12.3109 0.666016C11.9429 0.666016 11.6442 0.964682 11.6442 1.33268V1.99935H6.31087V1.33268C6.31087 0.964682 6.01221 0.666016 5.64421 0.666016ZM4.31087 5.33268H13.6442V11.9993C13.6442 12.3673 13.3455 12.666 12.9775 12.666H4.97754C4.60954 12.666 4.31087 12.3673 4.31087 11.9993V5.33268Z",fill:"#8C8C8C"})),u.default.createElement(l.Text,{size:"p3",color:a.theme.colors.gray600},n.format(r,"dd/mm/yyyy")),u.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"edit-button",onClick:c},u.default.createElement("path",{d:"M12.7721 1.33398C12.2911 1.33398 11.8102 1.51773 11.443 1.88607L10.6643 2.66732L13.3224 5.33398L14.1011 4.55273C14.8348 3.81673 14.8348 2.62273 14.1011 1.88607C13.734 1.51773 13.253 1.33398 12.7721 1.33398ZM9.66748 3.66732L2.02539 11.334V14.0007H4.68351L12.3256 6.33398L9.66748 3.66732Z",fill:"#8C8C8C"}))),u.default.createElement("div",{className:"record"},u.default.createElement("div",{className:"record-item"},u.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M8.44401 9.86602C8.44401 9.57146 8.68279 9.33268 8.97734 9.33268C9.2719 9.33268 9.51068 9.57146 9.51068 9.86602V11.466C9.51068 11.7606 9.2719 11.9993 8.97734 11.9993C8.68279 11.9993 8.44401 11.7606 8.44401 11.466V9.86602Z",fill:"#8C8C8C"}),u.default.createElement("path",{d:"M8.17595 3.05319C7.96767 3.26147 7.96767 3.59916 8.17595 3.80744L8.83592 4.46741C9.0442 4.67569 9.38189 4.67569 9.59017 4.46741C9.79844 4.25913 9.79844 3.92144 9.59017 3.71316L8.9302 3.05319C8.72192 2.84491 8.38423 2.84492 8.17595 3.05319Z",fill:"#8C8C8C"}),u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2941 3.66435C12.1261 1.98071 10.7053 0.666016 8.97738 0.666016C7.2495 0.666016 5.82868 1.9807 5.66067 3.66434L3.67054 3.86336C2.92499 3.93791 2.38724 4.61197 2.48017 5.35545L3.498 13.4981C3.5814 14.1653 4.1486 14.666 4.82104 14.666H13.1336C13.806 14.666 14.3732 14.1653 14.4567 13.4981L15.4745 5.35545C15.5674 4.61197 15.0297 3.93791 14.2841 3.86336L12.2941 3.66435ZM12.1607 4.991C11.7386 6.34768 10.473 7.33268 8.97738 7.33268C7.48176 7.33268 6.2162 6.34767 5.79403 4.99099L3.80321 5.19007L4.82104 13.3327L13.1336 13.3327L14.1514 5.19007L12.1607 4.991ZM10.9774 3.99935C10.9774 5.10392 10.0819 5.99935 8.97738 5.99935C7.87281 5.99935 6.97738 5.10392 6.97738 3.99935C6.97738 2.89478 7.87281 1.99935 8.97738 1.99935C10.0819 1.99935 10.9774 2.89478 10.9774 3.99935Z",fill:"#8C8C8C"})),u.default.createElement(l.Text,{size:"s3",color:a.theme.colors.gray800,type:"semiBold"},m(i,"kg"))),u.default.createElement("div",{className:"record-item"},u.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("g",{clipPath:"url(#clip0_855_82991)"},u.default.createElement("path",{d:"M12.6055 13.9993L12.6055 1.99935C12.6055 1.26602 12.0055 0.666016 11.2721 0.666016L5.9388 0.666015C5.20547 0.666015 4.60547 1.26602 4.60547 1.99935L4.60547 13.9993C4.60547 14.7327 5.20547 15.3327 5.9388 15.3327L11.2721 15.3327C12.0055 15.3327 12.6055 14.7327 12.6055 13.9993ZM5.9388 13.9993L5.9388 1.99935L11.2721 1.99935L11.2721 3.33268L8.60547 3.33268L8.60547 4.66602L11.2721 4.66602L11.2721 5.99935L8.60547 5.99935L8.60547 7.33268L11.2721 7.33268L11.2721 8.66602L8.60547 8.66601L8.60547 9.99935L11.2721 9.99935L11.2721 11.3327L8.60547 11.3327L8.60547 12.666L11.2721 12.666L11.2721 13.9993L5.9388 13.9993Z",fill:"#8C8C8C"})),u.default.createElement("defs",null,u.default.createElement("clipPath",{id:"clip0_855_82991"},u.default.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(16.6055) rotate(90)"})))),u.default.createElement(l.Text,{size:"s3",color:a.theme.colors.gray800,type:"semiBold"},m(d,"cm"))),u.default.createElement("div",{className:"record-item"},u.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("g",{clipPath:"url(#clip0_855_82994)"},u.default.createElement("path",{d:"M9.90072 7.83268C10.361 7.83268 10.734 7.45959 10.734 6.99935C10.734 6.53911 10.361 6.16602 9.90072 6.16602C9.44048 6.16602 9.06738 6.53911 9.06738 6.99935C9.06738 7.45959 9.44048 7.83268 9.90072 7.83268Z",fill:"#8C8C8C"}),u.default.createElement("path",{d:"M6.56771 7.83268C7.02795 7.83268 7.40104 7.45959 7.40104 6.99935C7.40104 6.53911 7.02795 6.16602 6.56771 6.16602C6.10747 6.16602 5.73438 6.53911 5.73438 6.99935C5.73438 7.45959 6.10747 7.83268 6.56771 7.83268Z",fill:"#8C8C8C"}),u.default.createElement("path",{d:"M15.528 7.56C15.3614 6.55333 14.6214 5.73333 13.6547 5.44667C13.3014 4.7 12.8014 4.04667 12.1947 3.50667C11.1414 2.56667 9.7547 2 8.2347 2C6.7147 2 5.32803 2.56667 4.2747 3.50667C3.66137 4.04667 3.16137 4.70667 2.8147 5.44667C1.84803 5.73333 1.10803 6.54667 0.941367 7.56C0.9147 7.7 0.901367 7.84667 0.901367 8C0.901367 8.15333 0.9147 8.3 0.941367 8.44C1.10803 9.44667 1.84803 10.2667 2.8147 10.5533C3.16137 11.2933 3.66137 11.9467 4.26137 12.48C5.3147 13.4267 6.70803 14 8.2347 14C9.76137 14 11.1547 13.4267 12.2147 12.48C12.8147 11.9467 13.3147 11.2867 13.6614 10.5533C14.6214 10.2667 15.3614 9.45333 15.528 8.44C15.5547 8.3 15.568 8.15333 15.568 8C15.568 7.84667 15.5547 7.7 15.528 7.56ZM12.9014 9.33333C12.8347 9.33333 12.7747 9.32 12.708 9.31333C12.5747 9.76 12.3814 10.1733 12.1347 10.5533C11.3014 11.8267 9.86803 12.6667 8.2347 12.6667C6.60137 12.6667 5.16803 11.8267 4.3347 10.5533C4.08803 10.1733 3.8947 9.76 3.76137 9.31333C3.6947 9.32 3.6347 9.33333 3.56803 9.33333C2.8347 9.33333 2.2347 8.73333 2.2347 8C2.2347 7.26667 2.8347 6.66667 3.56803 6.66667C3.6347 6.66667 3.6947 6.68 3.76137 6.68667C3.8947 6.24 4.08803 5.82667 4.3347 5.44667C5.16803 4.17333 6.60137 3.33333 8.2347 3.33333C9.86803 3.33333 11.3014 4.17333 12.1347 5.44667C12.3814 5.82667 12.5747 6.24 12.708 6.68667C12.7747 6.68 12.8347 6.66667 12.9014 6.66667C13.6347 6.66667 14.2347 7.26667 14.2347 8C14.2347 8.73333 13.6347 9.33333 12.9014 9.33333ZM8.2347 11.3333C9.5747 11.3333 10.728 10.5133 11.2347 9.33333H5.2347C5.74137 10.5133 6.8947 11.3333 8.2347 11.3333Z",fill:"#8C8C8C"})),u.default.createElement("defs",null,u.default.createElement("clipPath",{id:"clip0_855_82994"},u.default.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.234375)"})))),u.default.createElement(l.Text,{size:"s3",color:a.theme.colors.gray800,type:"semiBold"},m(o,"cm")))))},exports.ChildCard=function(n){var o=n.name,c=n.gender,C=n.age,s=n.isLoggedIn,m=void 0!==s&&s,v=n.showMenu,w=void 0!==v&&v,g=n.onEdit,E=n.onSwitch,p=n.onAdd,y=n.onRemove,M=n.className,z=t.useTranslations().t,L=e.useState(!1),x=L[0],H=L[1],B=e.useCallback((function(){if(C)if(C.year<1){if(0===C.month)switch(C.week){case 0:case 1:return z("childCard.age.oneWeek");default:return z("childCard.age.week",{weeks:C.week})}if(C.month>0)return z("childCard.age.months",{month:C.month})}else{if(0===C.month)return z("childCard.age.yearNoMonth",{year:C.year});if(C.month>0)return z("childCard.age.yearMonth",{year:C.year,month:C.month})}}),[C]);return u.default.createElement(d.StyledChildCard,{className:M},u.default.createElement("div",{"data-testid":"gender"},c===t.Gender.Boy?u.default.createElement(f.Boy,{"data-testid":"boy",id:"boy"}):u.default.createElement(f.Girl,{"data-testid":"girl",id:"girl"})),u.default.createElement("div",{className:"information"},u.default.createElement(i.Heading,{tag:"h5",fontWeight:"bold",color:a.theme.colors.gray800},r.startCase(o)||z("childCard.noName")),u.default.createElement("div",{className:"detail"},u.default.createElement("div",null,c===t.Gender.Boy?u.default.createElement(f.GenderBoy,null):u.default.createElement(f.GenderGirl,null),u.default.createElement(l.Text,{size:"p3",color:a.theme.colors.gray800,style:{textTransform:"capitalize"}},c)),u.default.createElement("div",null,u.default.createElement(f.Calendar,{size:16}),C&&u.default.createElement(l.Text,{size:"p3",color:a.theme.colors.gray800},B())))),w&&m&&u.default.createElement(d.StyledOption,null,u.default.createElement(f.Kebab,{onClick:function(){return H((function(e){return!e}))}}),x&&u.default.createElement(h,{name:o,onClose:function(){return H(!1)},onEdit:function(){H(!1),g()},onSwitch:function(){H(!1),E()},onAdd:function(){H(!1),p()},onRemove:function(){H(!1),y()}})))},exports.Icon=f;