@hhgtech/hhg-components 1.19.13 → 1.19.15

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 (79) hide show
  1. package/build/babyGrowth.js +1 -1
  2. package/build/care.js +1 -1
  3. package/build/components.js +1 -1
  4. package/build/core.js +1 -1
  5. package/build/ecom.js +1 -1
  6. package/build/esm/babyGrowth.js +1 -1
  7. package/build/esm/care.js +1 -1
  8. package/build/esm/components.js +1 -1
  9. package/build/esm/core.js +1 -1
  10. package/build/esm/ecom.js +1 -1
  11. package/build/esm/{index-fd5aeb00.js → index-34fd4ca2.js} +1 -1
  12. package/build/esm/{index-77b7d1fa.js → index-652b0a74.js} +1 -1
  13. package/build/esm/{index-c080f2c3.js → index-854bfede.js} +1 -1
  14. package/build/esm/{index-6f5fe0f0.js → index-913475f3.js} +1 -1
  15. package/build/esm/index-9644b600.js +1 -0
  16. package/build/esm/{index-a94a59f8.js → index-ca8a65c8.js} +1 -1
  17. package/build/esm/index-ea077d6c.js +1 -0
  18. package/build/esm/index.js +1 -1
  19. package/build/esm/index.styled-4e2d45c1.js +1 -0
  20. package/build/esm/index.styled-6ceb1ffe.js +1 -0
  21. package/build/esm/{index.styled-9e28ffc0.js → index.styled-9275ccf5.js} +1 -1
  22. package/build/esm/navigation.js +1 -1
  23. package/build/esm/number-3cb24023.js +1 -0
  24. package/build/esm/routing-d6ceeffd.js +1 -0
  25. package/build/esm/{constants-17d17987.js → theme-886d0d2f.js} +1 -1
  26. package/build/esm/together.js +1 -1
  27. package/build/esm/types-209a2b6c.js +1 -0
  28. package/build/esm/types-35f3d422.js +1 -0
  29. package/build/esm/types-87f32571.js +1 -0
  30. package/build/esm/useFbDataLayer-e9860653.js +1 -0
  31. package/build/esm/useTranslations-443c50f3.js +1 -0
  32. package/build/{index-15a8d752.js → index-0df9a517.js} +1 -1
  33. package/build/{index-eba0ccfd.js → index-906c77a2.js} +1 -1
  34. package/build/{index-a42bf49e.js → index-a0e1567e.js} +1 -1
  35. package/build/index-a8d94311.js +1 -0
  36. package/build/{index-a9dac361.js → index-a8e54837.js} +1 -1
  37. package/build/index-d551cf10.js +1 -0
  38. package/build/index-e302ff07.js +1 -0
  39. package/build/index.js +1 -1
  40. package/build/index.styled-04f94566.js +1 -0
  41. package/build/index.styled-0b580017.js +1 -0
  42. package/build/index.styled-80cb4d3a.js +1 -0
  43. package/build/misc/theme.d.ts +1 -0
  44. package/build/navigation.js +1 -1
  45. package/build/number-87b13133.js +1 -0
  46. package/build/routing-1865523f.js +1 -0
  47. package/build/{constants-d4ec4195.js → theme-7830aadf.js} +1 -1
  48. package/build/together.js +1 -1
  49. package/build/types-18923efa.js +1 -0
  50. package/build/types-b528f9ad.js +1 -0
  51. package/build/types-cc6f9312.js +1 -0
  52. package/build/{ageGenerate-ab2ee426.js → useFbDataLayer-49119223.js} +1 -1
  53. package/build/useTranslations-3a6e3bef.js +1 -0
  54. package/package.json +1 -1
  55. package/build/esm/ageGenerate-479027f2.js +0 -1
  56. package/build/esm/index-3741f100.js +0 -1
  57. package/build/esm/index-aa913db3.js +0 -1
  58. package/build/esm/index.styled-5c6564ec.js +0 -1
  59. package/build/esm/index.styled-f044c8b2.js +0 -1
  60. package/build/esm/number-126ee62e.js +0 -1
  61. package/build/esm/routing-93ed4dbc.js +0 -1
  62. package/build/esm/theme-ed3b5e70.js +0 -1
  63. package/build/esm/types-26e71aa2.js +0 -1
  64. package/build/esm/types-55b8733c.js +0 -1
  65. package/build/esm/types-a158a9d8.js +0 -1
  66. package/build/esm/useTranslations-5c58aaf7.js +0 -1
  67. package/build/index-a7a67901.js +0 -1
  68. package/build/index-c49191c2.js +0 -1
  69. package/build/index-cb4f4283.js +0 -1
  70. package/build/index.styled-31c53cd9.js +0 -1
  71. package/build/index.styled-9b06e721.js +0 -1
  72. package/build/index.styled-df62f800.js +0 -1
  73. package/build/number-95704111.js +0 -1
  74. package/build/routing-3fb6d350.js +0 -1
  75. package/build/theme-da70da1e.js +0 -1
  76. package/build/types-18cefca9.js +0 -1
  77. package/build/types-b129e43d.js +0 -1
  78. package/build/types-cfe2f3a5.js +0 -1
  79. package/build/useTranslations-f5815b25.js +0 -1
@@ -152,6 +152,7 @@ export declare const theme: {
152
152
  belowHeader: string;
153
153
  zIndex100: string;
154
154
  onTop: string;
155
+ drawer: number;
155
156
  };
156
157
  defaultColor: string;
157
158
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("./tslib.es6-f7929e76.js"),require("react"),require("./core-8fcc56eb.js"),require("./index.styled-31c53cd9.js");var e=require("./index-a7a67901.js");require("react-id-generator"),require("./index.styled-9b06e721.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("lodash/debounce"),require("react-dom"),require("lodash"),require("./useTranslations-f5815b25.js"),require("react-range"),require("./translationsContext-d7c8e0a0.js"),require("./constants-d4ec4195.js"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./number-95704111.js"),require("styled-components"),require("./routing-3fb6d350.js"),require("./index.styled-df62f800.js"),require("./theme-da70da1e.js"),require("smoothscroll-polyfill"),require("./index-15a8d752.js"),require("./index-a9dac361.js"),require("./constants-ea7b35a2.js"),require("./cookieHelper-612b90fa.js"),require("date-fns/locale/hi"),require("date-fns/locale/ms"),require("date-fns/locale/th"),exports.NavigationV2=e.NavigationV2,exports.getNavMenuContent=e.getNavMenuContent,exports.getNavMenuContentWithCache=e.getNavMenuContentWithCache;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("./tslib.es6-f7929e76.js"),require("react"),require("./core-8fcc56eb.js"),require("./index.styled-04f94566.js");var e=require("./index-e302ff07.js");require("react-id-generator"),require("./index.styled-80cb4d3a.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("lodash/debounce"),require("react-dom"),require("lodash"),require("./useTranslations-3a6e3bef.js"),require("react-range"),require("styled-components"),require("./routing-1865523f.js"),require("./translationsContext-d7c8e0a0.js"),require("./theme-7830aadf.js"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./index.styled-0b580017.js"),require("smoothscroll-polyfill"),require("./index-0df9a517.js"),require("./index-a8e54837.js"),require("./constants-ea7b35a2.js"),require("./cookieHelper-612b90fa.js"),require("./number-87b13133.js"),require("date-fns/locale/hi"),require("date-fns/locale/ms"),require("date-fns/locale/th"),exports.NavigationV2=e.NavigationV2,exports.getNavMenuContent=e.getNavMenuContent,exports.getNavMenuContentWithCache=e.getNavMenuContentWithCache;
@@ -0,0 +1 @@
1
+ "use strict";exports.abbreviateNumber=function(e){var r=String(e);if(e>=1e3){for(var t=Math.floor((""+e).length/3),a=void 0,o=2;o>=1;o--){if(((a=parseFloat((0!=t?e/Math.pow(1e3,t):e).toPrecision(o)))+"").replace(/[^a-zA-Z 0-9]+/g,"").length<=2)break}a&&a%1!=0&&(a=a.toFixed(1)),r=a+["","k","m","b","t"][t]}return r};
@@ -0,0 +1 @@
1
+ "use strict";var t=require("./theme-7830aadf.js");exports.getCareApiDomain=function(){return"https://".concat(t.isProduction?"health-care.":"service-health-care.","hellohealthgroup.com")},exports.getCurrentBaseUrl=function(o,e){void 0===e&&(e="helloSites");var r="marryBaby"===e,n="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV,c=!n&&!t.isProduction;return n?"http://localhost:3000":"https://".concat(c?r?"fe.":"discover.":r?"www.":"").concat(t.domainLocales[o])},exports.getCurrentSsoUrl=function(o){return"https://".concat(t.isProduction?"id.":"staging-id.").concat(t.domainLocales[o])},exports.getDiscoverApiDomain=function(o){return"https://".concat(t.isProduction?"wp.":"staging.").concat(t.domainLocales[o])},exports.getTogetherApiDomain=function(){return"https://".concat(t.isProduction?"together.":"staging-together.","hellohealthgroup.com")};
@@ -1 +1 @@
1
- "use strict";var o,E={"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","tl-PH":"hellodoctor.com.ph"},l={"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",PREGNANCY_WEIGHT_GAIN:"cong-cu-tinh-can-nang-khi-mang-thai",BABY_POOP:"phan-tre-so-sinh-nhu-the-nao-la-tot",VACCINATION_TOOL:"lich-tiem-chung"},"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",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"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",PREGNANCY_WEIGHT_GAIN:"เครื่องคำนวณน้ำหนักตัว",BABY_POOP:"สีอุจจาระของลูก-บอกถึงส",VACCINATION_TOOL:"vaccination-tool"},"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",PREGNANCY_WEIGHT_GAIN:"រង្វាស់សុខភាព/គណនាទម្ងន់ស្ត្រីពពោះ",BABY_POOP:"រង្វាស់សុខភាព/អត្ថន័យពណ៌-និងរូបរាងលាម",VACCINATION_TOOL:"រង្វាស់សុខភាព/កាលវិភាគចាក់ថ្នាំបង្កា"},"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",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"how-does-babies-poop-look-like",VACCINATION_TOOL:"vaccination-tool"},"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",PREGNANCY_WEIGHT_GAIN:"kalkulator-kenaikan-berat-badan-ibu-hamil",BABY_POOP:"warna-feses-bayi-normal",VACCINATION_TOOL:"jadwal-imunisasi"},"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",PREGNANCY_WEIGHT_GAIN:"garbhavastha-weight-calculator",BABY_POOP:"visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"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",PREGNANCY_WEIGHT_GAIN:"kalkulator-tambah-berat-badan-hamil",BABY_POOP:"kenali-najis-bayi-anda",VACCINATION_TOOL:"alat-kesihatan-vaksin"},"tl-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:"/fil/images/tooltips-ph.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool",ABOUT_US_IMAGE:"/fil/images/aboutus/PH.png"}},t={"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/",COMMUNITY_GUIDELINE:"/tieu-chuan-cong-dong",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:"/គោលការណ៍ណែនាំសហគមន៍",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"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",COMMUNITY_GUIDELINE:"/panduan-komunitas",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"tl-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/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community"}},I=["vi-VN","id-ID","en-PH","tl-PH","th-TH","ms-MY","my-MM"],i=["vi-VN","id-ID","en-PH","tl-PH"],T=["vi-VN","id-ID"],O=("undefined"!=typeof window?function(o){var E,l;return null!==(l=null===(E=null==o?void 0:o.match(/^https?:\/\/([^/?#]+)(?:[/?#]|$)/i))||void 0===E?void 0:E[1])&&void 0!==l?l:""}(null===(o=null===window||void 0===window?void 0:window.location)||void 0===o?void 0:o.href):"").split("."),a=process.env.NEXT_PUBLIC_DEPLOY_ENV?"production"===process.env.NEXT_PUBLIC_DEPLOY_ENV:O&&!("dev"===O[0]||"dev"===O[1]||"staging"===O[0]||"staging-id"===O[0]||"staging-id-hotfix"===O[0]||"localhost"===O[0].split(":")[0]||"staging"===O[1]||"fe"===O[0]||"fe-hotfix"===O[0]||"discover"===O[0]||"discover-hotfix"===O[0]),e=Object.freeze({__proto__:null,USER_GEOLOCATION_COORDINATES_COOKIE:"userGeoLocationCoordinates",domainLocales:E,LOCALE_SPECS:l,STATIC_PAGES:t,UP_BASEPATH:"user",TOGETHER_LOCALES:I,CARE_LOCALES:i,CARE_BOOKING_LOCALES:T,isProduction:a});exports.CARE_BOOKING_LOCALES=T,exports.CARE_LOCALES=i,exports.LOCALE_SPECS=l,exports.STATIC_PAGES=t,exports.TOGETHER_LOCALES=I,exports.UP_BASEPATH="user",exports.USER_GEOLOCATION_COORDINATES_COOKIE="userGeoLocationCoordinates",exports.constants=e,exports.domainLocales=E,exports.isProduction=a;
1
+ "use strict";var e,o={"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","tl-PH":"hellodoctor.com.ph"},l={"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",PREGNANCY_WEIGHT_GAIN:"cong-cu-tinh-can-nang-khi-mang-thai",BABY_POOP:"phan-tre-so-sinh-nhu-the-nao-la-tot",VACCINATION_TOOL:"lich-tiem-chung"},"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",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"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",PREGNANCY_WEIGHT_GAIN:"เครื่องคำนวณน้ำหนักตัว",BABY_POOP:"สีอุจจาระของลูก-บอกถึงส",VACCINATION_TOOL:"vaccination-tool"},"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",PREGNANCY_WEIGHT_GAIN:"រង្វាស់សុខភាព/គណនាទម្ងន់ស្ត្រីពពោះ",BABY_POOP:"រង្វាស់សុខភាព/អត្ថន័យពណ៌-និងរូបរាងលាម",VACCINATION_TOOL:"រង្វាស់សុខភាព/កាលវិភាគចាក់ថ្នាំបង្កា"},"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",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"how-does-babies-poop-look-like",VACCINATION_TOOL:"vaccination-tool"},"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",PREGNANCY_WEIGHT_GAIN:"kalkulator-kenaikan-berat-badan-ibu-hamil",BABY_POOP:"warna-feses-bayi-normal",VACCINATION_TOOL:"jadwal-imunisasi"},"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",PREGNANCY_WEIGHT_GAIN:"garbhavastha-weight-calculator",BABY_POOP:"visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool"},"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",PREGNANCY_WEIGHT_GAIN:"kalkulator-tambah-berat-badan-hamil",BABY_POOP:"kenali-najis-bayi-anda",VACCINATION_TOOL:"alat-kesihatan-vaksin"},"tl-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:"/fil/images/tooltips-ph.png",PREGNANCY_WEIGHT_GAIN:"pregnancy-weight-gain-calculator",BABY_POOP:"a-visual-guide-on-baby-poop",VACCINATION_TOOL:"vaccination-tool",ABOUT_US_IMAGE:"/fil/images/aboutus/PH.png"}},a={"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/",COMMUNITY_GUIDELINE:"/tieu-chuan-cong-dong",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:"/គោលការណ៍ណែនាំសហគមន៍",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"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",COMMUNITY_GUIDELINE:"/panduan-komunitas",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:"/panduan-komuniti",TOGETHER:"/community"},"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/",COMMUNITY_GUIDELINE:null,TOGETHER:"/community"},"tl-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/",COMMUNITY_GUIDELINE:"/community-guidelines",TOGETHER:"/community"}},t=["vi-VN","id-ID","en-PH","tl-PH","th-TH","ms-MY","my-MM"],E=["vi-VN","id-ID","en-PH","tl-PH"],i=["vi-VN","id-ID"],n=("undefined"!=typeof window?function(e){var o,l;return null!==(l=null===(o=null==e?void 0:e.match(/^https?:\/\/([^/?#]+)(?:[/?#]|$)/i))||void 0===o?void 0:o[1])&&void 0!==l?l:""}(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.href):"").split("."),I=process.env.NEXT_PUBLIC_DEPLOY_ENV?"production"===process.env.NEXT_PUBLIC_DEPLOY_ENV:n&&!("dev"===n[0]||"dev"===n[1]||"staging"===n[0]||"staging-id"===n[0]||"staging-id-hotfix"===n[0]||"localhost"===n[0].split(":")[0]||"staging"===n[1]||"fe"===n[0]||"fe-hotfix"===n[0]||"discover"===n[0]||"discover-hotfix"===n[0]),T=Object.freeze({__proto__:null,USER_GEOLOCATION_COORDINATES_COOKIE:"userGeoLocationCoordinates",domainLocales:o,LOCALE_SPECS:l,STATIC_PAGES:a,UP_BASEPATH:"user",TOGETHER_LOCALES:t,CARE_LOCALES:E,CARE_BOOKING_LOCALES:i,isProduction:I});exports.CARE_BOOKING_LOCALES=i,exports.CARE_LOCALES=E,exports.LOCALE_SPECS=l,exports.STATIC_PAGES=a,exports.TOGETHER_LOCALES=t,exports.UP_BASEPATH="user",exports.USER_GEOLOCATION_COORDINATES_COOKIE="userGeoLocationCoordinates",exports.constants=T,exports.domainLocales=o,exports.isProduction=I,exports.theme={colors:{primaryBase:"#2d87f3",primaryHover:"#2c74df",primaryActive:"#2b62cd",primaryVisited:"#5e38ba",secondaryBase:"#284a75",secondaryDark:"#1b3250",accentLight:"#b1ebf8",accentMain:"#00AECD",success:"#00b16a",error:"#f71210",gray100:"#f2f2f2",gray200:"#d9d9d9",gray300:"#bfbfbf",gray400:"#8c8c8c",gray500:"#737373",gray600:"#595959",gray800:"#262626",blue50:"#e3f2ff",blue100:"#bcdeff",blue200:"#91caff",blue300:"#65b5ff",blue400:"#45a4ff",blue500:"#2b94ff",blue600:"#2d87f3",blue700:"#2c74df",blue800:"#2b62cd",blue900:"#2743ad",alertWarning:"#fe921d",green50:"#e0f8ee",green100:"#b3eed5",green200:"#7ce2b9",green300:"#2ed69e",green400:"#00CB8A",green500:"#00C076",green600:"#00B16A",green700:"#009E5C",green800:"#008C50",green900:"#006C39",yellow50:"#fff8e2",yellow100:"#ffecb6",yellow200:"#ffe187",yellow300:"#ffd658",yellow400:"#ffc326",yellow500:"#fe921d",yellow600:"#ffb521",yellow700:"#fea21e",yellow800:"#fe921d",yellow900:"#fc7419",red50:"#fae9e8",red100:"#feccbf",red200:"#ff5331",red300:"#f44d2c",red400:"#ff6f4d",red500:"#ff5331",red600:"#f44d2c",red700:"#e64728",red800:"#d84023",red900:"#bf331b",neutral50:"#f8f9fc",neutral100:"#e4e8ec",neutral150:"#fafafa",neutral200:"#d2d6dc",neutral300:"#bfc5cc",neutral400:"#adb3bc",neutral500:"#9aa2ac",neutral600:"#87909c",neutral700:"#757f8c",neutral800:"#626d7c",teal50:"#e0f7fc",teal100:"#b1ebf8",teal200:"#7ddff3",teal300:"#44d1ec",teal400:"#00c7e6",teal500:"#00bee0",teal600:"#00aecd",teal700:"#0099b2",teal800:"#008599",teal900:"#00626c",pink50:"#fff1f6",pink100:"#fec7dc",pink200:"#fec7dc",pink300:"#fec2cf",pink400:"#fe9dc2",pink500:"#fd87b4",pink600:"#fd72a7",pink700:"#fc5d9a",pink800:"#fc488d",violet50:"#f5edff",violet100:"#e7d2f7",violet200:"#d8b7f0",violet300:"#ca9ce8",violet400:"#bb82e1",violet500:"#ad67d9",violet600:"#9e4cd1",violet700:"#9031ca",violet800:"#8116c2",indigo700:"#35639c",indigo800:"#284a75",indigo900:"#1b3250",brown50:"#faecde",brown100:"#ecd8c5",brown200:"#dec5ab",brown300:"#d0b192",brown400:"#c39d79",brown500:"#b5895f",brown600:"#a77646",brown700:"#99622c",brown800:"#8b4e13",white:"#fff"},mbColors:{pink:"#e85388",cobalt:"#2661ad",dark:"#202135",gray:"#3e3f58",midGray:"#9495a0",lightGray:"#f3f3f3",lightMint:"#f2fcf8",lightPink:"#ffeaf1",lightOrange:"#fffaeb",lightBlue:"#e0e9fc",mint:"#5ec08f",peach:"#ffaaa9",orange:"#fb8c00",ceruleanBlue:"#b6ceff",red:"#eb5757",lightRed:"#fdeeee",yellow:"#ff8a2b",green:"#f2fcf7",blue:"#4096fe",toneYellow:"#fff9eb",toneGreen:"#f2fcf7",toneBlue:"#e0e9fb",tonePink:"#ffeaf1"},sizes:{fwBold:"700",fwSemiBold:"600",fsCaption2:"13px",fsHeading1:"40px",fsHeading2:"28px",fsHeading4:"24px",fsHeading5:"18px",fsHeading6:"16px",fsParagraph3:"16px",fsParagraph4:"14px",fwRegular:"400"},zIndexes:{belowHeader:"1",zIndex100:"100",onTop:"1000",drawer:305},defaultColor:""};
package/build/together.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index.styled-9b06e721.js"),r=require("./types-cfe2f3a5.js");require("./tslib.es6-f7929e76.js"),require("styled-components"),require("react"),require("./cookieHelper-612b90fa.js"),require("./index.styled-31c53cd9.js"),require("./theme-da70da1e.js"),require("./useTranslations-f5815b25.js"),require("./translationsContext-d7c8e0a0.js"),require("./number-95704111.js"),require("./index-15a8d752.js"),require("date-fns"),require("date-fns/locale/en-US"),require("date-fns/locale/hi"),require("date-fns/locale/id"),require("date-fns/locale/ms"),require("date-fns/locale/th"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./constants-d4ec4195.js"),require("react-id-generator"),require("./index-a9dac361.js"),require("lodash"),require("react-dom"),require("./index-a42bf49e.js"),require("react-range"),require("lodash/debounce"),exports.CardAuthor=e.CardAuthor,exports.CardReactions=e.CardReactions,exports.DefaultComponentGlobalContextData=e.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return e.GlobalData}}),exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.Loading=e.Loading,exports.PopoverMenu=e.PopoverMenu,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.TogetherComponentGlobalContext=e.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=e.TogetherComponentGlobalContextProvider,exports.TogetherConstants=e.constants,exports.TogetherDataTransforms=e.dataTransform,exports.UserAvatar=e.UserAvatar,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.CardLink=r.CardLink,exports.CardPost=r.CardPost,exports.CardPostPopoverMore=r.CardPostPopoverMore,exports.CardReply=r.CardReply,exports.CardReplyPopover=r.CardReplyPopover,exports.CreateNewPostContent=r.CreateNewPostContent,exports.CreatePostDescription=r.CreatePostDescription,exports.CreatePostTitle=r.CreatePostTitle,exports.ImagePreviewPopup=r.ImagePreviewPopup,exports.InputCommentBar=r.InputCommentBar,exports.LabelPin=r.LabelPin,exports.PopupDanger=r.PopupDanger,exports.PostContent=r.PostContent,exports.PostImagePreview=r.PostImagePreview,exports.PostSingleImageViewPopup=r.PostSingleImageViewPopup,exports.SubmitReportForm=r.SubmitReportForm,exports.TagTopic=r.TagTopic,exports.TogetherTypes=r.types,exports.TopicSelectList=r.TopicSelectList;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index.styled-80cb4d3a.js"),r=require("./types-18923efa.js");require("./tslib.es6-f7929e76.js"),require("styled-components"),require("react"),require("./cookieHelper-612b90fa.js"),require("./index.styled-04f94566.js"),require("./theme-7830aadf.js"),require("./useTranslations-3a6e3bef.js"),require("./translationsContext-d7c8e0a0.js"),require("./number-87b13133.js"),require("./index-0df9a517.js"),require("date-fns"),require("date-fns/locale/en-US"),require("date-fns/locale/hi"),require("date-fns/locale/id"),require("date-fns/locale/ms"),require("date-fns/locale/th"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("react-id-generator"),require("./index-a8e54837.js"),require("lodash"),require("react-dom"),require("./index-a0e1567e.js"),require("react-range"),require("lodash/debounce"),exports.CardAuthor=e.CardAuthor,exports.CardReactions=e.CardReactions,exports.DefaultComponentGlobalContextData=e.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return e.GlobalData}}),exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.Loading=e.Loading,exports.PopoverMenu=e.PopoverMenu,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.TogetherComponentGlobalContext=e.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=e.TogetherComponentGlobalContextProvider,exports.TogetherConstants=e.constants,exports.TogetherDataTransforms=e.dataTransform,exports.UserAvatar=e.UserAvatar,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.CardLink=r.CardLink,exports.CardPost=r.CardPost,exports.CardPostPopoverMore=r.CardPostPopoverMore,exports.CardReply=r.CardReply,exports.CardReplyPopover=r.CardReplyPopover,exports.CreateNewPostContent=r.CreateNewPostContent,exports.CreatePostDescription=r.CreatePostDescription,exports.CreatePostTitle=r.CreatePostTitle,exports.ImagePreviewPopup=r.ImagePreviewPopup,exports.InputCommentBar=r.InputCommentBar,exports.LabelPin=r.LabelPin,exports.PopupDanger=r.PopupDanger,exports.PostContent=r.PostContent,exports.PostImagePreview=r.PostImagePreview,exports.PostSingleImageViewPopup=r.PostSingleImageViewPopup,exports.SubmitReportForm=r.SubmitReportForm,exports.TagTopic=r.TagTopic,exports.TogetherTypes=r.types,exports.TopicSelectList=r.TopicSelectList;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./tslib.es6-f7929e76.js"),t=require("react"),n=require("./index.styled-04f94566.js"),a=require("./index-a0e1567e.js"),o=require("./useTranslations-3a6e3bef.js"),i=require("./index.styled-80cb4d3a.js"),l=require("./theme-7830aadf.js");require("react-range");var r=require("react-dom");require("date-fns"),require("styled-components");var s=require("./index-a8e54837.js"),c=require("lodash/debounce"),u=require("./index-0df9a517.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function m(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var p=d(t),v=m(r),f=d(c),g=function(a){var o=a.title,l=a.url,r=a.image,s=a.logo,c=a.className,d=a.style,m=a.noRefetch,v=t.useContext(i.TogetherComponentGlobalContext).data,f=v.locale,g=v.env.isMarryBaby,h=t.useState(!1),C=h[0],w=h[1],E=t.useRef(m);E.current=m;var y=t.useState(null),k=y[0],_=y[1];t.useEffect((function(){e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(t){return E.current?[2]:l?(_((function(t){return e.__assign(e.__assign({},t),{isFetching:!0})})),i.callApi(i.getApiPath(i.PATHS.FETCH_PREVIEW,{_locale:f}),"POST",{data:{link:l}}).then((function(e){var t,n,a;w(!1),_({title:null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.title,url:l,image:(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.image)||(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.logo)})})).catch((function(){_(null)})),[2]):[2,_(null)]}))}))}),[l]);var b=(null==k?void 0:k.image)||r,T=(null==k?void 0:k.title)||o,S=(null==k?void 0:k.logo)||s,P=(null==k?void 0:k.url)||l,x=P.replace("http://","").replace("https://","").split(/[/?#]/)[0],N=t.useRef(!1);return p.default.createElement(i.StyledCardLink,{"data-is-marrybaby":g,className:"".concat(c," no-replace-click"),style:d},p.default.createElement("a",{href:P,target:"_blank",rel:"noreferrer"},b&&p.default.createElement("div",{className:"link-image-wrapper"},!g&&p.default.createElement("img",{className:"link-image-blur",src:b,onError:function(e){N.current||(N.current=!0,e.currentTarget.src=i.DEFAULT_IMG)}}),p.default.createElement("img",{className:"link-image",src:b,onError:function(e){N.current||(N.current=!0,e.currentTarget.src=i.DEFAULT_IMG)}})),p.default.createElement("div",{className:"link-info-container"},p.default.createElement(n.Text,{size:"n1"},g&&S&&!C&&p.default.createElement("img",{className:"link-logo",src:S,onError:function(e){return w(!0)}}),x),p.default.createElement(u.Heading,{tag:"h6"},T))))},h=function(e){var a=e.topics,o=e.onClick,l=e.className,r=e.style,s=function(){var e=t.useState(!1),n=e[0],a=e[1],o=t.useRef(null),i=t.useRef(null),l=t.useRef();return{sliding:n,mouseDownHandler:function(e){if(o.current){l.current=setTimeout((function(){a(!0)}),500),i.current={left:o.current.scrollLeft,x:e.clientX};var t=function(e){var t=i.current;if(t){var n=e.clientX-t.x;o.current&&(o.current.scrollLeft=t.left-n)}},n=function(){l.current&&(clearTimeout(l.current),l.current=void 0),a(!1),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)}},sliderRef:o,pos:i}}(),c=s.sliding,u=s.mouseDownHandler,d=s.sliderRef,m=t.useContext(i.TogetherComponentGlobalContext),v=m.data.env.togetherBasePath,f=m.action.sanitizeFunction;return p.default.createElement(i.StyledTagTopic,{ref:d,onClick:o,onMouseDown:function(e){return u(e)},className:"".concat(l," ").concat(c?"sliding":""),style:r},a.map((function(e,t){return p.default.createElement("a",{className:"tag-link-item",key:t,href:e.isActive&&!e.isHidden?"".concat(v).concat(e.url):void 0},p.default.createElement(n.Text,{size:"p3"},p.default.createElement("span",{dangerouslySetInnerHTML:{__html:(null==f?void 0:f(e.name))||e.name}})))})))},C=function(e){var n=e.onClick;e.color;var a=e.className,l=e.style,r=t.useContext(i.TogetherComponentGlobalContext).data.env.isMarryBaby,s=o.useTranslations().t;return p.default.createElement(i.LabelSortPin,{label:p.default.createElement(p.default.Fragment,null,r&&p.default.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"})," ",s("label.pinnedPost")),rightLabel:!r&&p.default.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:n,color:"white",className:"label-pinned ".concat(a),style:l})},w=function(e){return{message:e("notification.failure"),type:"danger"}},E="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",y=function(t){var n=t.id,a=t.locale;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return n?[4,i.callApiWithAuth(i.getApiPath(i.PATHS.POST.LIKE,{id:n,_locale:a}),"GET")]:[2];case 1:return[2,e.sent()]}}))}))},k=function(t){var n=t.id,a=t.locale;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return n?[4,i.callApiWithAuth(i.getApiPath(i.PATHS.POST.DELETE,{id:n,_locale:a}),"DELETE")]:[2];case 1:return[2,e.sent()]}}))}))},_=function(t){var n=t.title,a=t.description,o=t.communityId,l=t.imageFiles,r=t.previewUrl,s=t.topicIds,c=t.locale,u=t.sanitizeFunction,d=t.categoryCommunityId,m=t.categoryTopicIds,p=t.introUrl,v=t.bannerUrl,f=t.scheduleTime;return e.__awaiter(void 0,void 0,void 0,(function(){var t,g,h,C,w;return e.__generator(this,(function(e){switch(e.label){case 0:return t=new FormData,g=i.removeBannedWordWrapper(a),h=i.removeBannedWordWrapper(n),C=i.getMentionIdsFromString(g),t.append("title",h),t.append("description",i.encodePostContent(g,u)),d?t.append("category_community",String(d)):o&&t.append("community_id",String(o)),(null==r?void 0:r.title)&&t.append("preview_title",r.title),(null==r?void 0:r.description)&&t.append("preview_description",r.description),(null==r?void 0:r.url)&&t.append("preview_link",r.url),(null==r?void 0:r.image)&&t.append("preview_image",r.image),null==s||s.forEach((function(e){t.append("topics[]",String(e||""))})),null==m||m.forEach((function(e){t.append("category_topics[]",String(e||""))})),(null==l?void 0:l.length)?[4,Promise.all(l.map((function(e,t){return new Promise((function(n){setTimeout((function(){n(i.uploadAndGetSrc(e,c))}),2e3*t)}))})))]:[3,2];case 1:return null==(w=e.sent())||w.filter(Boolean).slice(0,i.MAX_IMAGE_UPLOADS).forEach((function(e,n){t.append("images[".concat(n,"]"),e)})),[3,3];case 2:t.append("images",""),e.label=3;case 3:return null==C||C.forEach((function(e){t.append("mention_ids[]",e)})),t.append("intro_url",p||""),t.append("banner",v||""),f&&(t.append("post_type","scheduled"),t.append("schedule_datetime",f)),[2,t]}}))}))},b=function(t){var n=t.locale,a=t.formData,o=t.isArticleComment;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,i.callApiWithAuth(i.getApiPath(o?i.PATHS.POST.CREATE_ARTICLE_COMMENT:i.PATHS.POST.CREATE,{_locale:n}),"POST",{data:a,headers:{"Content-Type":"multipart/form-data"}})];case 1:return[2,e.sent()]}}))}))},T=function(t){var n=t.id,a=t.locale,o=t.formData;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,i.callApiWithAuth(i.getApiPath(i.PATHS.POST.UPDATE,{id:n,_locale:a}),"POST",{data:o})];case 1:return[2,e.sent()]}}))}))},S=function(e){var t=e.id,n=e.reason,a=e.locale,o=new FormData;return o.append("reason",n),i.callApiWithAuth(i.getApiPath(i.PATHS.POST.REPORT,{_locale:a,id:t}),"POST",{data:o})},P=function(e,n){var a=t.useState(e||[]),o=a[0],i=a[1];return{onSelectImages:function(t){var a=t.target.files;a&&(n&&e?n((e||o).concat(Array.from(a))):i((function(t){var o=e||t;return n&&n(o.concat(Array.from(a))),o.concat(Array.from(a))})))},onRemoveImage:function(t){if(n&&e){var a=e;a.splice(t,1),n(a.slice())}else i((function(a){var o=e||a;return o.splice(t,1),n&&n(o.slice()),o.slice()}))},onRemoveAllImages:function(){n?n([]):i([])},imageSrcs:t.useMemo((function(){return(e||o).map((function(e){return"string"==typeof e?e:URL.createObjectURL(e)}))}),[e,o]),imageFiles:e||o}},x="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",N=function(e){var a=e.className,r=e.style,s=e.bannedWords,c=void 0===s?[]:s,u=e.value,d=e.onChange,m=e.onPreviewUrlChange,v=e.onInvalidUrlsChange,f=e.onImageFilesChange,h=e.imageFiles,C=e.isReplying,w=o.useTranslations().t,y=t.useState(null),k=y[0],_=y[1],b=t.useRef(null),T=P(h,f),S=T.onSelectImages,N=T.onRemoveImage,I=T.imageSrcs;return t.useEffect((function(){m&&((null==k?void 0:k.url)?m({title:k.title||"",url:k.url||"",image:k.image||"",description:k.description||""}):m(null))}),[k]),p.default.createElement(i.StyledCreatePostDescription,{className:a,style:r},p.default.createElement(n.Text,{size:"p4",className:"description-label"},w("createPost.popup.description")),p.default.createElement("div",{className:"textarea-control"},p.default.createElement("div",{className:"textarea-wrapper"},p.default.createElement(i.RichTextEditor,{html:u||"",onChange:d,bannedWords:c,onImagePickerClick:function(){var e;return null===(e=b.current)||void 0===e?void 0:e.click()},onPreviewUrlChange:_,onInvalidUrlsChange:v,isReplying:C}))),p.default.createElement(n.Text,{size:"p4",className:"count-string"},w("character"),": ",i.innertext_1(u||"").length),(!I||0===I.length)&&k&&p.default.createElement("div",{className:"link-preview-wrapper"},k.isFetching?p.default.createElement(i.Loading,null):p.default.createElement(p.default.Fragment,null,p.default.createElement(g,{title:k.title,url:k.url||"#",image:k.image,noRefetch:!0}),p.default.createElement("img",{src:x,className:"icon-close",onClick:function(){return _(null)}}))),p.default.createElement("input",{ref:b,type:"file",accept:"image/png, image/gif, image/jpeg",multiple:!0,style:{display:"none"},onChange:S}),I.length>i.MAX_IMAGE_UPLOADS?p.default.createElement("div",{className:"input-notification"},p.default.createElement("img",{src:E}),p.default.createElement(n.Text,{size:"p4",color:l.theme.colors.alertWarning},w("createPost.popup.warningImage"))):null,I.length>0&&p.default.createElement("div",{className:"image-gallery"},I.map((function(e,t){return p.default.createElement("div",{key:t,className:"image-item"},p.default.createElement("img",{src:e}),p.default.createElement("img",{className:"close-btn",src:x,onClick:function(){return N(t)}}))}))))},I=function(e,t){if(!t)return e;var n=t.limit,a=t.bannedWords,o=void 0===a?[]:a,l="number"==typeof n&&n>=0?e.substring(0,n):e;return i.highlightBadWords(l,o)},A=function(e){var a,l=e.className,r=e.style,c=e.bannedWords,u=void 0===c?[]:c,d=e.value,m=e.onChange,v=o.useTranslations().t,g=t.useState(""),h=g[0],C=g[1],w=t.useRef(null);t.useEffect((function(){if(w.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=w.current;return t.addEventListener("paste",e),function(){return t.removeEventListener("paste",e)}}}),[w]);var E=(null==u?void 0:u.join(","))||"";t.useEffect((function(){var e;if(E){var t=null===(e=w.current)||void 0===e?void 0:e.innerText;if(t){var n=i.highlightBadWords(t,u);n!==t&&(m&&m(n),C(n))}}}),[E]);var y=t.useCallback(f.default((function(e){if(w.current){var t=I(w.current.innerText,{limit:120,bannedWords:u});m&&m(t),C(t)}}),300),[]);return t.useEffect((function(){setTimeout((function(){var e;null===(e=w.current)||void 0===e||e.focus()}),500)}),[]),p.default.createElement(i.StyledCreatePostTitle,{className:l,style:r},p.default.createElement(s.Input,{name:"title",value:d||h,size:"md",label:v("createPost.title"),CustomInput:p.default.createElement(i._default,{innerRef:w,html:d||h,onChange:function(e){if(w.current&&w.current.innerText!==(d||h)){var t=I(w.current.innerText,{bannedWords:u});m&&m(t),C(t),y(w.current.innerText)}},className:"title-input"})}),p.default.createElement(n.Text,{size:"p4",className:"count-string"},v("createPost.popup.wordCount",{count:(null===(a=w.current)||void 0===a?void 0:a.innerText.length)||0,max:120})))},M=function(n){var a=n.className,o=n.style,l=n.topics,r=n.communityId,s=n.onChange,c=n.isLoading,u=n.disabled,d=n.forceTopics,m=n.selectedTopics,v=n.noFetch,f=t.useContext(i.TogetherComponentGlobalContext).data,g=f.locale,h=f.env.isMarryBaby,C=t.useState(l?e.__spreadArray([],l,!0):[]),w=C[0],E=C[1],y=t.useState(m?e.__spreadArray([],m,!0):[]),k=y[0],_=y[1],b=t.useState(!1),T=b[0],S=b[1],P=t.useRef(l);P.current=l,t.useEffect((function(){var t;!r||v||(null===(t=P.current)||void 0===t?void 0:t.length)||(E([]),S(!0),e.__awaiter(void 0,void 0,void 0,(function(){var t,n,a,o;return e.__generator(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,i.callApi(i.getApiPath(i.PATHS.TOPIC.LIST,{communityId:r,_locale:g}),"GET")];case 1:return t=e.sent(),n=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.topics,Array.isArray(n)&&E((function(){return(null==n?void 0:n.map(i.formatTopic).sort((function(e,t){return(e.order||0)-(t.order||0)})))||[]})),[3,3];case 2:return a=e.sent(),console.log(a),S(!1),[3,3];case 3:return S(!1),[2]}}))})))}),[r,v]);var x=null==l?void 0:l.map((function(e){return e.id})).join("-"),N=null==w?void 0:w.map((function(e){return e.id})).join("-"),I=null==d?void 0:d.map((function(e){return e.id})).join("-");t.useEffect((function(){l&&void 0!==x&&x!==N&&E(l)}),[l,x,N]);var A=t.useMemo((function(){return w.filter((function(e){return!(null==d?void 0:d.some((function(t){return t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId})))}))}),[N,I]);return p.default.createElement(i.StyledTopicSelectList,{"data-is-marrybaby":h,className:a,style:o},d.map((function(e){return p.default.createElement(L,{key:"".concat(e.id,"-").concat(e.mappedCategoryId),topic:e,disabled:!0,selected:!0})})),A.map((function(e){return p.default.createElement(L,{key:"".concat(e.id,"-").concat(e.mappedCategoryId),topic:e,disabled:u,selected:(m||k).some((function(t){return t.id&&t.id===e.id||t.mappedCategoryId&&t.mappedCategoryId===e.mappedCategoryId})),onClick:function(){var t=m||k,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),s&&m?s(t.slice()):(s&&s(t.slice()),_(t.slice()))}})})),(c||T)&&p.default.createElement(i.Loading,{className:"topic-spinner"}))},L=function(e){var t=e.topic,n=e.disabled,a=e.selected,o=e.onClick;return p.default.createElement("div",{className:"tag-item"+(a?" --active":""),"data-disabled":n,onClick:n?void 0:o},t.name)},R=function(e){var a=e.className,l=e.isMarryBaby,r=e.style,s=e.title,c=e.description,d=e.acceptText,m=e.cancelText,f=e.onAccept,g=e.thumbnail,h=e.isThumbnailIcon,C=e.onClose,w=t.useContext(i.TogetherComponentGlobalContext).data.env.isMarryBaby,E="boolean"==typeof l?l:w,y=t.useState(!1),k=y[0],_=y[1];return t.useEffect((function(){return o.toggleNoScroll(!0),setTimeout((function(){return _(!0)}),0),function(){return o.toggleNoScroll(!1)}}),[]),v.createPortal(p.default.createElement(i.StyledPopupDanger,{"data-is-marrybaby":E,className:a,style:r,"data-open":k},p.default.createElement(i.PopupFrame,{className:"popup-frame",isOpen:k,onClose:C},p.default.createElement("div",{className:"confirm-dialog",onClick:function(e){return e.stopPropagation()}},p.default.createElement("div",{className:"confirm-content"},g&&p.default.createElement("div",{className:"thumbnail-container ".concat(h?"is-icon":"")},p.default.createElement("img",{className:"thumbnail",src:g})),p.default.createElement(u.Heading,{className:"title",tag:"h2"},s),p.default.createElement(n.Text,{className:"desc",size:"lg"},c),p.default.createElement("div",{className:"btn-group"},p.default.createElement(n.Button,{theme:E?"marryBaby":"helloSites",size:"md",color:"secondary",onClick:function(){null==f||f(),null==C||C()}},d),p.default.createElement(n.Button,{theme:E?"marryBaby":"helloSites",size:"md",onClick:C},m)))),E&&g&&p.default.createElement("div",{className:"thumbnail-container is-mobile ".concat(h?"is-icon":"")},p.default.createElement("img",{className:"thumbnail",src:g})))),document.body)},B=function(t){var n=t.postId,a=t.message,o=t.photos,l=t.link,r=t.locale,s=t.sanitizeFunction,c=t.replyingUserId,u=t.replyingUserName,d=t.replyingId;return e.__awaiter(void 0,void 0,void 0,(function(){var t,m,p;return e.__generator(this,(function(e){switch(e.label){case 0:return t=new FormData,m=i.encodePostContent(a.replace(/(\&nbsp;)+/g," "),s),p=i.getMentionIdsFromString(m),o&&o.length>0?[4,Promise.all(null==o?void 0:o.map((function(e){return i.uploadAndGetSrc(e,r)})))]:[3,2];case 1:e.sent().filter(Boolean).slice(0,i.MAX_IMAGE_UPLOADS).forEach((function(e){t.append("images[]",e)})),e.label=2;case 2:return l&&t.append("link",l),null==p||p.forEach((function(e){t.append("mention_ids[]",e)})),t.append("post_id",n),d&&t.append("parent_id",d),c&&(p.unshift(c),m='[mention+id="'.concat(c,'"+name="').concat((u||"").replace('"',"'"),'"]').concat(m),t.append("parent_user_id",String(c))),t.append("content",m),t.append("content",m),[2,t]}}))}))},j=function(t,n){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,i.callApiWithAuth(i.getApiPath(i.PATHS.COMMENT.CREATE,{_locale:n}),"POST",{data:t,headers:{"Content-Type":"multipart/form-data"}})]}))}))},F=function(t,n){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,i.callApiWithAuth(i.getApiPath(i.PATHS.COMMENT.REPLY,{_locale:n}),"POST",{data:t,headers:{"Content-Type":"multipart/form-data"}})]}))}))},D=function(t){var n=t.commentId,a=t.setLike,o=void 0!==a&&a,l=t.locale;return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){return[2,i.callApiWithAuth(i.getApiPath(o?i.PATHS.COMMENT.LIKE:i.PATHS.COMMENT.UNLIKE,{_locale:l,id:n}),"GET")]}))}))},O=function(e){var t=e.id,n=e.locale;return i.callApiWithAuth(i.getApiPath(i.PATHS.COMMENT.DELETE,{_locale:n,id:t}),"DELETE")},H=function(a){var l=a.isReply,r=a.className,c=a.onClose,u=a.replyToName,d=a.style,m=a.replyingId,v=a.replyingUser,f=a.onPostSuccess;a.isMainCmt;var h=a.post,C=a.isMarryBaby,w=t.useContext(i.TogetherComponentGlobalContext),E=w.action,y=E.pushNotifications,k=E.sanitizeFunction,_=w.data,b=_.userInfo,T=_.locale,S=_.env.isMarryBaby,N="boolean"==typeof C?C:S,I=o.useTranslations().t,A=P(),M=A.onSelectImages,L=A.onRemoveImage,R=A.imageSrcs,D=A.onRemoveAllImages,O=A.imageFiles,H=t.useState(""),U=H[0],W=H[1],z=t.useContext(i.MainInputTriggerContext).trigger,V=t.useState(!1),G=V[0],q=V[1],Z=t.useRef(null),K=t.useRef(null),Q=t.useRef(null),X=t.useState([]),$=X[0],J=X[1],Y=t.useState([]),ee=Y[0],te=Y[1],ne=t.useState(null),ae=ne[0],oe=ne[1];return t.useEffect((function(){var e;null===(e=Q.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout((function(){var e;null===(e=K.current)||void 0===e||e.focus()}),400)}),[z]),p.default.createElement(i.StyledInputCommentBar,{"data-is-reply":l,className:r,style:d},l&&p.default.createElement("div",{className:"reply-to-container"},p.default.createElement(n.Text,{size:"p4"},p.default.createElement("span",{dangerouslySetInnerHTML:{__html:I("inputComment.replyTo",{name:'<span style="color: #2D87F3; cursor: pointer">@'.concat(u||"","</span>")})}})),p.default.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 c&&c()}})),p.default.createElement("div",{className:"input-container",ref:Q},p.default.createElement(i.UserAvatar,{className:"avatar-wrapper ".concat(l?"avatar-wrapper-reply":""),avatar:(null==b?void 0:b.id)?b.avatar:i.DEFAULT_AVATAR_IMG,username:(null==b?void 0:b.name)||(null==b?void 0:b.username)}),p.default.createElement("input",{ref:Z,onChange:M,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),p.default.createElement(s.Input,{value:U,name:"input",size:"md",className:"input-wrapper",displayIcon:p.default.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:p.default.createElement("div",{className:"as-input"},p.default.createElement(i.RichTextEditor,{className:"textarea",html:U,onChange:W,onImagePickerClick:function(){var e;return null===(e=Z.current)||void 0===e?void 0:e.click()},bannedWords:ee,onPreviewUrlChange:oe,onInvalidUrlsChange:J,setEditorRef:function(e){return K.current=e},isReplying:l}))}),p.default.createElement(n.Button,{theme:N?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,n,a,o,r,s,u,d,p,g,C,w,E;return e.__generator(this,(function(_){switch(_.label){case 0:if(!(null==h?void 0:h.id)||G)return[2];q(!0),_.label=1;case 1:return _.trys.push([1,4,,5]),t=function(e){W(""),D(),c&&c();var t=i.formatComment(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),f&&f(t)},[4,B(e.__assign({message:U,photos:O,postId:String(h.id),link:null==ae?void 0:ae.url,sanitizeFunction:k,locale:T},l&&m?{replyingUserId:String((null==v?void 0:v.id)||(null===(r=null==h?void 0:h.author)||void 0===r?void 0:r.id)||""),replyingId:m,replyingUserName:(null==v?void 0:v.name)||(null==v?void 0:v.username)||""}:{}))];case 2:return n=_.sent(),[4,l&&m?F(n,T):j(n,T)];case 3:return a=_.sent(),(null==(o=null==a?void 0:a.data)?void 0:o.id)&&!(null===(u=null===(s=null==a?void 0:a.messages)||void 0===s?void 0:s.moderation)||void 0===u?void 0:u.type)?t(a):"banned"===(null===(p=null===(d=null==a?void 0:a.messages)||void 0===d?void 0:d.moderation)||void 0===p?void 0:p.type)?(y({title:I("notification.comment.blocked.title"),message:I("notification.comment.blocked.message"),type:"danger"}),a.messages.moderation.words&&te(a.messages.moderation.words)):"suspect"===(null===(C=null===(g=null==a?void 0:a.messages)||void 0===g?void 0:g.moderation)||void 0===C?void 0:C.type)?(y({title:I("notification.comment.suspect.title"),message:I("notification.comment.suspect.message"),type:"warning"}),W(""),D(),c&&c()):(null===(w=null==a?void 0:a.messages)||void 0===w?void 0:w.find((function(e){var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(y({message:I("notification.suspend.message"),type:"warning"}),W(""),D(),c&&c()):y({title:"",message:(null===(E=null==a?void 0:a.messages)||void 0===E?void 0:E[0])||I("notification.comment.somethingWrong"),type:"danger"}),[3,5];case 4:return _.sent(),y({title:"",message:I("notification.comment.somethingWrong"),type:"danger"}),[3,5];case 5:return q(!1),[2]}}))}))},isLoading:G,isDisabled:!!(null==$?void 0:$.length)||G||!U||(null==U?void 0:U.length)<2||!U.trim()},p.default.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==$?void 0:$.length)?p.default.createElement("div",{className:"error-text"},I("notification.limitUrlDomain")):null,(!R||0===R.length)&&ae&&p.default.createElement("div",{className:"link-preview-wrapper"},ae.isFetching?p.default.createElement(i.Loading,null):p.default.createElement(p.default.Fragment,null,p.default.createElement(g,{title:ae.title,url:ae.url||"#",image:ae.image,noRefetch:!0}),p.default.createElement("img",{src:x,className:"icon-close",onClick:function(){return oe(null)}}))),R&&R.length>0&&p.default.createElement("div",{className:"preview-images-container"},R.map((function(e,t){return p.default.createElement("div",{key:t,className:"image-src-wrapper"},p.default.createElement("img",{className:"preview-image",src:e}),p.default.createElement("img",{src:x,className:"icon-close-circle",onClick:function(){return L(t)}}))}))))},U="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",W=function(a){var r=a.className,s=a.style,c=a.reason,u=a.reasonText,d=a.onClose,m=a.postId,v=t.useContext(i.TogetherComponentGlobalContext),f=v.data,g=f.locale,h=f.env.isMarryBaby,C=v.action.pushNotifications,w=o.useTranslations().t,E=t.useState(!1),y=E[0],k=E[1];return p.default.createElement(i.StyledSubmitReportForm,{"data-is-marrybaby":h,className:r,style:s},p.default.createElement("ul",{className:"report-list"},p.default.createElement("li",{className:"report-item"},p.default.createElement("img",{src:U}),p.default.createElement(n.Text,{className:"__label",color:l.theme.colors.gray800,size:"p4"},u))),p.default.createElement(n.Button,{theme:h?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:y,onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:if(!m||y)return[2];k(!0),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,S({id:m,reason:c,locale:g})];case 2:return 1===(null==(t=e.sent())?void 0:t.status)&&(C({message:"Post reported",type:"success"}),d&&d()),[3,4];case 3:return e.sent(),[3,4];case 4:return k(!1),[2]}}))}))}},w("submit")))},z=function(e){var n=e.className,a=e.style,l=e.replyingTo,r=e.mentionedUser,s=e.description,c=e.disableShortenContent,u=e.mentions,d=void 0===u?[]:u,m=t.useState(!1),v=m[0],f=m[1],g=o.useTranslations().t,h=i.useTogetherAuthRequiredAction().authActionWrapper,C=t.useState(!1),w=C[0],E=C[1],y=i.decodeMention(i.decodePostUrl(s||"","display"),d),k=t.useContext(i.TogetherComponentGlobalContext).action.sanitizeFunction,_=t.useMemo((function(){var e=k(y||"");if(c||v)return{showContent:e,hasSeeMore:!1};var t=e.slice(0,200),n=200-27*((t.match(/<\/div>/g)||[]).length-1),a=(t||"").slice(0,n<40?40:n),o=k(a.replace(/(<|<\/)( +|[a-zA-Z]*)$/gi,"")),i=o.length<e.length-10;return{showContent:i?o:e,hasSeeMore:i}}),[c,v,y]),b=(null==r?void 0:r.name)||l,T="expert"===(null==r?void 0:r.role)&&!!(null==r?void 0:r.partnerId);return p.default.createElement(p.default.Fragment,null,T&&p.default.createElement(i.PopupExpert,{isOpen:w,onClose:function(){return E(!1)},expertId:String(null==r?void 0:r.partnerId)}),p.default.createElement(i.StyledPostContent,{className:"".concat(n," no-replace-click"),style:a},b&&p.default.createElement("span",{onClick:function(){return T&&E(!0)},className:"post-content-replying"},"@",b),(null==s?void 0:s.startsWith("[mention+id="))&&p.default.createElement("span",{className:"post-content-replying tag-only"},"@"),p.default.createElement("span",{dangerouslySetInnerHTML:{__html:_.showContent},className:"post-content ".concat(_.hasSeeMore?"has-see-more":"")}),_.hasSeeMore&&!v&&p.default.createElement("span",null,"... ",p.default.createElement("span",{onClick:function(e){e.preventDefault(),e.stopPropagation(),h((function(){return f(!0)}))},className:"see-more-text"},g("post.seeMore")))))},V=function(e){var a=e.className,l=e.style,r=e.authorName,s=e.images,c=e.onClose,u=e.onOpenSingleView,d=o.useTranslations().t,m=t.useState(!1),f=m[0],g=m[1];return t.useEffect((function(){setTimeout((function(){g(!0)}),0)}),[]),v.createPortal(p.default.createElement(i.StyledImagePreviewPopup,{className:a,style:l,"data-open":f},p.default.createElement("div",{className:"top-bar"},p.default.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:c,alt:"go back"}),p.default.createElement(n.Text,{size:"p2",type:"bold",style:{textAlign:"center"}},d("previewPhotos.title",{name:r}))),p.default.createElement("div",{className:"container"},s.map((function(e,t){return p.default.createElement("img",{className:"img-preview",key:t,src:e,onClick:function(){return null==u?void 0:u(t)},alt:"post img"})})))),document.body)},G="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",q=function(e){var n=e.initialViewIndex,a=e.images,o=e.onClose,l=t.useState(n),r=l[0],s=l[1],c=t.useState(!1),u=c[0],d=c[1];t.useEffect((function(){setTimeout((function(){d(!0)}),0)}),[]);var m=null==a?void 0:a[r],f=0===r,g=!(null==a?void 0:a.length)||r===(null==a?void 0:a.length)-1;return v.createPortal(p.default.createElement(i.StyledImagePreviewContainer,{"data-open":u&&!!m},p.default.createElement(i.StyledImagePreviewTopbar,null,p.default.createElement("img",{src:i.img,className:"icon-close",onClick:o,alt:"close"})),m&&r>=0&&p.default.createElement(p.default.Fragment,null,p.default.createElement(i.StyledImagePreviewWrapper,null,p.default.createElement("img",{className:"img-preview",src:m,alt:"post img open"}),p.default.createElement(i.StyledArrowWrapper,{"data-disabled":f,onClick:function(){return!f&&s(r-1)}},p.default.createElement(i.StyledCircleArrow,null,p.default.createElement("img",{src:G,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":f}))),p.default.createElement(i.StyledArrowWrapper,{"data-right":!0,"data-disabled":g,onClick:function(){return!g&&s(r+1)}},p.default.createElement(i.StyledCircleArrow,null,p.default.createElement("img",{src:G,alt:"right arrow","data-disabled":g})))))),document.body)},Z=function(e){var n=e.className,a=e.images,l=void 0===a?[]:a,r=e.style,s=e.authorName,c=t.useContext(i.TogetherComponentGlobalContext).data.env.isMarryBaby,d="+ ".concat((l.length||0)-4),m=t.useState(!1),v=m[0],f=m[1],g=t.useState(-1),h=g[0],C=g[1];t.useEffect((function(){setTimeout((function(){return null===o.lazyLoadInstance||void 0===o.lazyLoadInstance?void 0:o.lazyLoadInstance.update()}),100)}),[null==l?void 0:l.slice(0,5).join("|")]);var w=l.length>5,E=t.useRef(!1);return t.useEffect((function(){return function(){E.current&&o.toggleNoScroll(!1)}}),[]),t.useEffect((function(){v||h>=0?(o.toggleNoScroll(!0),E.current=!0):(o.toggleNoScroll(!1),E.current=!1)}),[v,h]),p.default.createElement(p.default.Fragment,null,p.default.createElement(i.StyledPostImagePreview,{className:n,style:r,"data-image-count":w?5:l.length||0,"data-is-marrybaby":c},null==l?void 0:l.slice(0,5).map((function(e,t){return p.default.createElement("div",{className:"img-wrapper",key:t,onClick:function(){t>=4&&w?f(!0):C(t)}},!c&&p.default.createElement("img",{className:"lazy img-preview-blur","data-src":e}),p.default.createElement("img",{className:"lazy img-preview","data-src":e}),4===t&&w&&p.default.createElement("div",{className:"img-more-overlay"},p.default.createElement(u.Heading,{tag:"h1",color:"white"},d)))}))),v&&p.default.createElement(V,{authorName:s||"",images:l,onClose:function(){return f(!1)},onOpenSingleView:C}),h>=0&&p.default.createElement(q,{images:l,initialViewIndex:h,onClose:function(){return C(-1)}}))},K=function(n){var a=n.url,o=n.image,l=n.className,r=n.style,s=t.useContext(i.TogetherComponentGlobalContext).data.locale,c=t.useState(null),u=c[0],d=c[1];t.useEffect((function(){e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(t){return o?[2]:a?(d((function(t){return e.__assign(e.__assign({},t),{isFetching:!0})})),i.callApi(i.getApiPath(i.PATHS.FETCH_PREVIEW,{_locale:s}),"POST",{data:{link:a}}).then((function(e){var t,n;d({url:a,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(){d(null)})),[2]):[2,d(null)]}))}))}),[a,o]);var m=(null==u?void 0:u.image)||o,v=(null==u?void 0:u.url)||a,f=t.useMemo((function(){return i.youtubeVidIdGetter(v)}),[v]),g=t.useMemo((function(){return i.facebookVidIdGetter(v)}),[v]),h=t.useRef(0),C=t.useRef(0),w=t.useState(!1),E=w[0],y=w[1];t.useEffect((function(){var e=function(){var e,t=null===(e=k.current)||void 0===e?void 0:e.getBoundingClientRect(),n=!1;t&&(!h.current||Math.abs((h.current-t.width)/(null==t?void 0:t.width))>.2)&&(h.current=Math.floor(t.width),n=!0),t&&(!C.current||Math.abs((C.current-t.height)/(null==t?void 0:t.height))>.2)&&(C.current=Math.floor(t.height),n=!0),n&&y((function(e){return!e}))};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]);var k=t.useRef(null),_=t.useRef(!1);return p.default.createElement(i.StyledSocialLinkPreview,{className:"".concat(l," no-replace-click"),style:r,ref:k},o||!f&&!g?p.default.createElement("a",{href:v,target:"_blank",rel:"noreferrer"},p.default.createElement("div",{className:"link-image-wrapper ".concat((null==u?void 0:u.isFetching)?"fetching":"")},(null==u?void 0:u.isFetching)?p.default.createElement(i.Loading,{className:"loading-spinner"}):p.default.createElement("img",{className:"link-image",src:m||i.DEFAULT_IMG,onError:function(e){_.current||(_.current=!0,e.currentTarget.src=i.DEFAULT_IMG)}}))):p.default.createElement("div",{className:"link-image-wrapper"},f?p.default.createElement("iframe",{width:"100%",height:"100%",src:"https://www.youtube.com/embed/".concat(f,"?&autoplay=1&mute=1"),frameBorder:"0",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,border:"none",overflow:"hidden"}}):g?p.default.createElement("iframe",{key:String(E),src:"https://www.facebook.com/plugins/video.php?href=".concat(encodeURIComponent(v),"&autoplay=1&show_text=false&t=0&width=").concat(h.current,"&height=").concat(C.current),style:{position:"absolute",top:"50%",left:"50%",border:"none",overflow:"hidden",height:C.current,width:h.current,transform:"translate(-50%, -50%)"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"}):null))},Q="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",X="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",$="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",J=function(n){var a=n.onDeleteComment,l=n.commentId,r=n.className,s=void 0===r?"":r,c=n.popoverClassName,u=void 0===c?"":c,d=t.useContext(i.TogetherComponentGlobalContext),m=d.data,v=m.env.isMarryBaby,f=m.locale,g=d.action.pushNotifications,h=o.useTranslations().t,C=t.useState(!1),w=C[0],E=C[1],y=i.useTogetherAuthRequiredAction().authActionWrapper;return p.default.createElement("div",{className:s,onClick:function(e){e.preventDefault(),e.stopPropagation()}},w&&p.default.createElement(R,{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:h("popup.deleteComment.title"),description:h("popup.deleteComment.description"),acceptText:h("popup.deletePost.accept"),cancelText:h("popup.deletePost.cancel"),onAccept:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,n;return e.__generator(this,(function(e){switch(e.label){case 0:return l?[4,O({id:l,locale:f})]:[2];case 1:return 1===(null==(t=e.sent())?void 0:t.status)?(a&&a(),g({title:"",message:h("notification.success"),type:"success"})):g({title:"",message:(null===(n=null==t?void 0:t.messages)||void 0===n?void 0:n[0])||h("notification.failure"),type:"danger"}),[2]}}))}))},onClose:function(){return E(!1)}}),p.default.createElement(i.TreePopoverMenu,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:$,label:h("actionPopover.delete"),onClick:function(){y((function(){E(!0)}))}}]},className:u,toggleButtonContent:p.default.createElement("img",{src:v?Q:X}),buttonProps:{}}))},Y=function(r){var s,c,u,d,m,v=r.className,f=r.style,h=r.comment,C=r.type,w=void 0===C?"comment":C,E=r.level,y=void 0===E?0:E,k=r.replyingId,_=r.onPostCommentSuccess,b=r.post,T=r.onDeleteComment,S=r.refetchComment,P=r.hasQuickBookingEnable,x=r.handleMakeAppointment,N=t.useContext(i.TogetherComponentGlobalContext).data,I=N.locale,A=N.userInfo,M=N.env.isMarryBaby,L=o.useTranslations().t,R=t.useState(h||null),B=R[0],j=R[1],F=B.id;B.countReplies;var O=B.countLikes,U=B.content,W=B.createdAt,V=B.replies,G=void 0===V?[]:V,q=B.images,K=void 0===q?[]:q,Q=B.author,X=B.liked,$=B.link,ee=B.mentionedUser,te=B.mentions,ne=function(e){try{var t=e.match(/\[@([^\]]+)\]/),n=t?t[0].replace("[@","").replace("]",""):"";return{text:e.replace(/\[@([^\]]+)\]/,"").trim(),replyingTo:n}}catch(e){}return{text:""}}(U),ae=ne.text,oe=ne.replyingTo,ie=i.useTogetherAuthRequiredAction({_joinCommunityIds:[null===(s=null==b?void 0:b.community)||void 0===s?void 0:s.id],_joinTopicIds:null===(c=null==b?void 0:b.topics)||void 0===c?void 0:c.map((function(e){return e.id}))}).authActionWrapper,le=t.useState(4),re=le[0],se=le[1],ce=!!(null==A?void 0:A.id)&&(null==G?void 0:G.some((function(e){return e.author.id===A.id}))),ue=function(t){j((function(n){n.replies.unshift(t);var a=e.__assign(e.__assign({},n),{replies:n.replies.slice(),countReplies:n.countReplies+1});return S&&S(a),a}))},de=t.useState(!1),me=de[0],pe=de[1],ve=t.useMemo((function(){return"comment"===w&&G&&0!=G.length?G.sort((function(e,t){var n=new Date(e.createdAt).getTime(),a=new Date(t.createdAt).getTime();return n>a?-1:n<a?1:0})):G}),[w,G]),fe=(null==G?void 0:G.length)||0,ge=String(null==Q?void 0:Q.email)&&(null==A?void 0:A.email)&&String(null==Q?void 0:Q.email)===String(null==A?void 0:A.email),he=(null==Q?void 0:Q.name)||(null==Q?void 0:Q.username)||"",Ce=null==Q?void 0:Q.avatar,we=(null==Q?void 0:Q.username)||(null==Q?void 0:Q.name)||"",Ee=t.useState(null),ye=Ee[0],ke=Ee[1],_e=t.useState(null),be=_e[0],Te=_e[1];t.useEffect((function(){if(null==Q?void 0:Q.hospitalId){t=Q.hospitalId,e.__awaiter(void 0,void 0,void 0,(function(){var n,a;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,i.callApi(i.getCarePath(i.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:l.domainLocales[I]}),"get")];case 1:return n=e.sent(),(null===(a=null==n?void 0:n._data)||void 0===a?void 0:a.branch)&&ke(null==n?void 0:n._data.branch),[2]}}))}))}var t,n;if(null==Q?void 0:Q.doctorId){n=Q.doctorId,e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,i.callApi(i.getCarePath(i.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:n,website_url:l.domainLocales[I]}),"get")];case 1:return t=e.sent(),(null===(a=null==t?void 0:t._data)||void 0===a?void 0:a.doctor)&&Te(null==t?void 0:t._data.doctor),[2]}}))}))}}),[Q.hospitalId,Q.doctorId]);var Se=(null==be?void 0:be.valid_outpatient)||(null==be?void 0:be.valid_telemedicine),Pe=((null==ye?void 0:ye.total_available_service)||(null==ye?void 0:ye.total_available_doctor))>0,xe=P&&(Se||Pe);return p.default.createElement(i.TogetherAuthConfigContextProvider,{defaultParams:{_joinCommunityIds:[null===(u=null==b?void 0:b.community)||void 0===u?void 0:u.id],_joinTopicIds:null===(d=null==b?void 0:b.topics)||void 0===d?void 0:d.map((function(e){return e.id}))}},p.default.createElement(i.StyledCardPost,{className:v,style:f,"data-is-reply":!!y,"data-is-marrybaby":M,"data-has-booking":xe},"reply"===w&&p.default.createElement(a.Divider,{className:"top-divider",type:"solid"}),p.default.createElement(i.CardAuthor,{avatar:Ce,name:he,username:we,email:null==Q?void 0:Q.email,time:W,className:"post-author ".concat(ge?"with-popover":""),type:w,userId:null==Q?void 0:Q.id,role:null==Q?void 0:Q.role,expertId:null==Q?void 0:Q.partnerId,title:null==Q?void 0:Q.title,doctorId:null==Q?void 0:Q.doctorId,hospitalId:null==Q?void 0:Q.hospitalId,hasQuickBooking:xe,handleMakeAppointment:x}),p.default.createElement(z,{className:"post-content-wrapper",replyingTo:oe,mentionedUser:ee,description:ae,mentions:te}),p.default.createElement("span",null),p.default.createElement("span",null),K&&K.length>0?p.default.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},p.default.createElement(Z,{images:K,authorName:null==Q?void 0:Q.username})):null,K&&0!==K.length||!$?null:p.default.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},p.default.createElement(g,{url:$})),"most-engaging"!==w?p.default.createElement(p.default.Fragment,null,p.default.createElement(i.CardReactions,{type:i.CardReactionType.reply,loveCount:O,replyCount:fe,className:"post-reaction",liked:X,isReplied:ce,hideCommentIcon:"reply"===w,onCommentClick:function(){return ie((function(){return pe((function(e){return!e}))}))},onCommentCountClick:function(){return ie((function(){pe(!0)}))},onLikeClick:function(){return ie((function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return F?[4,D({commentId:F,setLike:!X,locale:I})]:[3,2];case 1:1===t.sent().status&&j((function(t){return e.__assign(e.__assign({},t),{liked:!X,countLikes:t.countLikes+(X?-1:1)})})),t.label=2;case 2:return[2]}}))}))}))}}),me&&p.default.createElement(H,{replyingId:k||B.id,replyToName:Q.name||Q.username||"",isReply:!0,onClose:function(){return pe(!1)},onPostSuccess:function(e){"reply"===w?_&&_(e):ue(e)},post:b,replyingUser:Q}),"comment"===w&&G&&G.length>0?p.default.createElement("div",{className:"comment-reply-wrapper"},null===(m=null==ve?void 0:ve.slice(0,re))||void 0===m?void 0:m.map((function(t){return p.default.createElement(Y,{key:t.id,comment:t,type:"reply",className:"comment-reply-item",level:y+1,replyingId:F,onPostCommentSuccess:ue,post:b,onDeleteComment:function(){j((function(n){return e.__assign(e.__assign({},n),{replies:n.replies.filter((function(e){return e.id!==t.id})),countReplies:n.countReplies-1})}))},handleMakeAppointment:x,hasQuickBookingEnable:P})})),fe>re&&p.default.createElement(p.default.Fragment,null,p.default.createElement(a.Divider,{className:"top-divider",type:"solid"}),p.default.createElement(n.Button,{className:"more-cmt",size:"lg",color:"ghost",onClick:function(){return se((function(e){return e+4}))}},L("comment.seeMoreReplies",{count:fe-re}),p.default.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,ge&&p.default.createElement(J,{onDeleteComment:T,className:"popover",commentId:B.id})))},ee="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",te="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",ne="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",ae=function(n){var a=n.authorEmail,l=n.onDeletePost,r=n.shareUrl,s=n.post,c=n.className,u=void 0===c?"":c,d=n.popoverClassName,m=void 0===d?"":d,v=n.onBookmark,f=n.onRemoveBookmark,g=n.onEditPost,h=t.useContext(i.TogetherComponentGlobalContext),C=h.data,w=C.locale,E=C.userInfo,y=C.togetherUserId,_=C.env.isMarryBaby,b=h.action.pushNotifications,T=o.useTranslations().t,S=t.useState(!1),P=S[0],x=S[1],N=t.useState(!1),I=N[0],A=N[1],M=t.useState(!1),L=M[0],B=M[1],j=i.useTogetherAuthRequiredAction().authActionWrapper,F=a&&(null==E?void 0:E.email)&&a===String(null==E?void 0:E.email);return p.default.createElement("div",{className:u,onClick:function(e){e.preventDefault(),e.stopPropagation()}},L&&p.default.createElement(i.SharePopup,{url:r,text:null==s?void 0:s.title,onClose:function(){return B(!1)}}),I&&p.default.createElement(R,{thumbnail:"./svg/delete.svg",isThumbnailIcon:!0,title:T("popup.deletePost.title"),description:T("popup.deletePost.description"),acceptText:T("popup.deletePost.accept"),cancelText:T("popup.deletePost.cancel"),onAccept:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:if(!(null==s?void 0:s.id)||P)return[2];x(!0),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,k({id:s.id,locale:w})];case 2:return 1===(null==(t=e.sent())?void 0:t.status)&&(null==l||l()),[3,4];case 3:return e.sent(),[3,4];case 4:return x(!1),[2]}}))}))},onClose:function(){return A(!1)}}),p.default.createElement(i.TreePopoverMenu,{className:m,toggleButtonContent:p.default.createElement("img",{src:_?Q:X}),position:"bottom",align:"end",buttonProps:{isLoading:P},data:F?{isShowheader:!1,type:"list",list:[{icon:ne,label:T("morePopover.share"),onClick:function(){return B(!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:T("actionPopover.edit"),onClick:g},{icon:$,label:T("actionPopover.delete"),onClick:function(){j((function(){return A(!0)}))}}]}:{isShowheader:!1,type:"list",list:[{icon:ne,label:T("morePopover.share"),onClick:function(){return B(!0)}},{icon:(null==s?void 0:s.bookmarked)?ee:te,label:(null==s?void 0:s.bookmarked)?T("morePopover.unsavePost"):T("morePopover.savePost"),onClick:function(){j((function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:return(null==E?void 0:E.id)&&(null==s?void 0:s.id)?(null==s?void 0:s.bookmarked)?[4,i.callApiWithAuth(i.getApiPath(i.PATHS.BOOKMARK.DELETE,{_locale:w}),"DELETE",{data:{post_id:String(s.id)}})]:[3,2]:[2];case 1:return 1===(null==(t=e.sent())?void 0:t.status)?(b({title:"",message:"Removed saved post",type:"success",displayIcon:te}),f&&f()):b({title:"",message:"Remove failed",type:"danger",displayIcon:te}),[3,4];case 2:return[4,i.callApiWithAuth(i.getApiPath(i.PATHS.BOOKMARK.CREATE,{_locale:w}),"POST",{data:{user_id:y||E.id,post_id:s.id}})];case 3:1===(null==(t=e.sent())?void 0:t.status)?(b({title:"",message:"Post saved",type:"success",displayIcon:ee}),v&&v()):b({title:"",message:"Post saved failed",type:"danger",displayIcon:te}),e.label=4;case 4:return[2]}}))}))}))}},{icon:U,label:T("morePopover.report"),subTree:{title:T("morePopover.report.title"),description:T("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(i.REPORT_REASON_MAP).map((function(e){return{label:i.REPORT_REASON_MAP[e].label,reason:i.REPORT_REASON_MAP[e].reportReasonText,reasonValue:e}})).map((function(e){return{label:T(e.label),subTree:{title:T("morePopover.reportSubmit.title"),description:T("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:function(t){return p.default.createElement(W,{reason:e.reasonValue,reasonText:T(e.reason),postId:null==s?void 0:s.id,onClose:function(){return t&&t(!1)}})}}}}))}}]}}))},oe=function(t,n){return e.__awaiter(void 0,void 0,void 0,(function(){var a,o,l,r;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,i.callApiWithOptionalAuth(i.getApiPath(i.PATHS.COMMENT.LIST,{postId:t,_locale:n,sort:"popularity",perPage:1,withoutReply:1}),"GET")];case 1:return a=e.sent(),[2,null===(r=null===(l=null===(o=null==a?void 0:a.data)||void 0===o?void 0:o.comments)||void 0===l?void 0:l.map(i.formatComment))||void 0===r?void 0:r[0]]}}))}))},ie=Object.freeze({__proto__:null});exports.CardLink=g,exports.CardPost=function(a){var l=a.className,r=a.style,s=a.hideViewMoreComment,c=a.showMostEngaging,d=a.onCommentClick,m=a.onCommentCountClick,v=a.onMostEngagingCommentClick,f=a.onPostCommentSuccess,E=a.disableCardLink,k=a.disableShortenContent,_=a.onDeletePost,b=a.onEditPost,T=a.post,S=a.mostEngagingComment,P=a.onDeleteComment,x=a.showInputComment,N=a.InlineCommentsComponent,I=a.hasQuickBookingEnable,A=a.handleMakeAppointment,M=t.useState(T),L=M[0],R=M[1],B=t.useState(!1),j=B[0],F=B[1],D=t.useState(S),O=D[0],U=D[1],W=L.community,V=L.topics,G=L.author,q=L.slug,Q=L.isPin,X=L.liked,$=L.scheduleDateTime,J=L.createdAt,ee=L.photos,te=L.mentions,ne=L.title,ie=L.description,le=L.previewUrl,re=L.likesCount,se=L.commentsCount,ce=L.id,ue=L.commented,de=t.useContext(i.TogetherComponentGlobalContext),me=de.data,pe=me.locale,ve=me.env,fe=ve.isMarryBaby,ge=ve.togetherBasePath,he=de.action.pushNotifications,Ce=o.useTranslations().t,we=t.useState(x),Ee=we[0],ye=we[1],ke="".concat(ge,"/").concat((null==W?void 0:W.slug)||"_","/").concat(q||""),_e="".concat(i.getCurrentBaseUrl(pe)).concat(ke),be=i.useTogetherAuthRequiredAction((null==W?void 0:W.slug)?{_joinCommunityIds:[W.id],_joinTopicIds:null==V?void 0:V.map((function(e){return e.id}))}:void 0).authActionWrapper,Te=t.useState(!1),Se=Te[0],Pe=Te[1];t.useEffect((function(){ye(x)}),[x]);var xe=(null==G?void 0:G.name)||(null==G?void 0:G.username)||"",Ne=(null==G?void 0:G.username)||(null==G?void 0:G.name)||"",Ie=null==G?void 0:G.avatar,Ae=t.useState(null),Me=Ae[0],Le=Ae[1],Re=t.useState(null),Be=Re[0],je=Re[1];t.useEffect((function(){if(null==G?void 0:G.hospitalId){t=G.hospitalId,e.__awaiter(void 0,void 0,void 0,(function(){var n,a;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,i.callApi(i.getCarePath(i.CARE_PATHS.GET_HOSPITAL_INFO,{hospital_branch_id:t,website_url:i.domainLocales[pe]}),"get")];case 1:return n=e.sent(),(null===(a=null==n?void 0:n._data)||void 0===a?void 0:a.branch)&&Le(null==n?void 0:n._data.branch),[2]}}))}))}var t,n;if(null==G?void 0:G.doctorId){n=G.doctorId,e.__awaiter(void 0,void 0,void 0,(function(){var t,a;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,i.callApi(i.getCarePath(i.CARE_PATHS.GET_DOCTOR_INFO,{doctorId:n,website_url:i.domainLocales[pe]}),"get")];case 1:return t=e.sent(),(null===(a=null==t?void 0:t._data)||void 0===a?void 0:a.doctor)&&je(null==t?void 0:t._data.doctor),[2]}}))}))}}),[G.hospitalId,G.doctorId]);var Fe=(null==Be?void 0:Be.valid_outpatient)||(null==Be?void 0:Be.valid_telemedicine),De=((null==Me?void 0:Me.total_available_service)||(null==Me?void 0:Me.total_available_doctor))>0,Oe=I&&(Fe||De);t.useEffect((function(){e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:return ce&&se&&c&&!(null==S?void 0:S.id)?[4,oe(ce,pe)]:[3,2];case 1:t=e.sent(),U(t),e.label=2;case 2:return[2]}}))}))}),[ce,pe,se,c,null==S?void 0:S.id]),t.useEffect((function(){U(S)}),[null==S?void 0:S.id]);var He=function(t){return e.__awaiter(void 0,void 0,void 0,(function(){var n;return e.__generator(this,(function(a){switch(a.label){case 0:return se>1&&(null==O?void 0:O.id)&&(null==O?void 0:O.id)===(null==t?void 0:t.id)?[4,oe(ce,pe)]:[3,2];case 1:n=a.sent(),U(n),a.label=2;case 2:return R((function(t){return e.__assign(e.__assign({},t),{commentsCount:t.commentsCount-1})})),P&&P(t),[2]}}))}))};return p.default.createElement(i.TogetherAuthConfigContextProvider,{defaultParams:(null==W?void 0:W.slug)?{_joinCommunityIds:[W.id],_joinTopicIds:null==V?void 0:V.map((function(e){return e.id}))}:void 0},j&&p.default.createElement(i.SharePopup,{url:_e,avatar:i.DEFAULT_IMG,text:ne,onClose:function(){return F(!1)}}),p.default.createElement(i.StyledCardPost$1,{className:l,style:r,"data-is-marrybaby":fe},Q?p.default.createElement(C,{className:"post-pin"}):null,p.default.createElement("div",{style:{position:"relative"}},p.default.createElement(i.CardAuthor,{avatar:Ie,name:xe,username:Ne,url:E?void 0:ke,email:null==G?void 0:G.email,time:$||J,community:W,className:"post-author",role:null==G?void 0:G.role,userId:null==G?void 0:G.id,expertId:null==G?void 0:G.partnerId,doctorId:null==G?void 0:G.doctorId,hospitalId:null==G?void 0:G.hospitalId,title:null==G?void 0:G.title,hasQuickBooking:Oe,handleMakeAppointment:A}),p.default.createElement(ae,{authorEmail:String(null==G?void 0:G.email),onDeletePost:_,shareUrl:_e,post:L,className:"popover",onEditPost:b})),p.default.createElement("a",{href:E?void 0:ke,className:"post-content-link-wrapper"},ne&&p.default.createElement(u.Heading,{className:"post-content-title",as:"h1",tag:"h5",fontWeight:"bold"},i.innertext_1(ne)),p.default.createElement(z,{className:"post-content-wrapper",description:ie,disableShortenContent:k,mentions:te})),p.default.createElement("span",null),p.default.createElement("span",null),p.default.createElement("div",{key:"tag-topic"},V&&V.length>0?p.default.createElement(h,{topics:V,className:"post-topics"}):null),p.default.createElement("div",{key:"social-preview"},(null==L?void 0:L.introUrl)?p.default.createElement("div",{className:"social-preview-wrapper ".concat((null==ee?void 0:ee.length)?"has-image":"")},p.default.createElement(K,{url:L.introUrl,image:L.bannerImage})):null),p.default.createElement("div",{key:"image-preview"},(null==ee?void 0:ee.length)?p.default.createElement("div",{className:"image-preview-wrapper"},p.default.createElement(Z,{images:ee,authorName:null==G?void 0:G.name})):null),p.default.createElement("div",{key:"link-preview"},(null==L?void 0:L.introUrl)||(null==ee?void 0:ee.length)||!(null==le?void 0:le.url)?null:p.default.createElement("div",{className:"link-preview-wrapper"},p.default.createElement(g,{title:le.title,url:le.url,image:le.image}))),p.default.createElement(i.CardReactions,{type:i.CardReactionType.post,loveCount:re,replyCount:se,className:"post-reaction ".concat((null==ee?void 0:ee.length)||(null==le?void 0:le.url)?"hide-top-border":""),liked:Se?!X:X,isReplied:ue,onCommentClick:function(){return be((function(){d?d():ye((function(e){return!e}))}))},onCommentCountClick:function(){be((function(){fe?ye(!0):m?m():!E&&(window.location.href=ke)}))},onShareClick:function(){F(!0)},onLikeClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(n){switch(n.label){case 0:if(!ce||Se)return[2];Pe(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,y({id:ce,locale:pe})];case 2:return 1!==(null==(t=n.sent())?void 0:t.status)?he(w(Ce)):R((function(t){return e.__assign(e.__assign({},t),{likesCount:(t.likesCount||0)+(t.liked?-1:1),liked:!t.liked})})),[3,4];case 3:return n.sent(),he(w(Ce)),[3,4];case 4:return Pe(!1),[2]}}))}))},showingMostEngaging:!(!c||!(null==O?void 0:O.id))}),Ee&&p.default.createElement(H,{isMainCmt:!x,onClose:function(){return ye(!1)},onPostSuccess:function(t){0!==se||(null==O?void 0:O.id)||U(t),R((function(t){return e.__assign(e.__assign({},t),{commentsCount:t.commentsCount+1,commented:!0})})),f&&f(t)},post:L}),c&&(null==O?void 0:O.id)?p.default.createElement("div",{className:"most-engaging-wrapper",onClick:function(e){v?(e.stopPropagation(),v()):window.location.href=ke}},p.default.createElement(Y,{hasQuickBookingEnable:I,handleMakeAppointment:A,comment:O,onDeleteComment:function(){He&&He(O)},className:"most-engaging-comment",type:"most-engaging",key:O.id}),se>1&&!s&&p.default.createElement(n.Button,{className:"see-more-comments",color:"ghost",size:"md"},Ce("comment.seeMoreComments",{count:se-1}))):null,N))},exports.CardPostPopoverMore=ae,exports.CardReply=Y,exports.CardReplyPopover=J,exports.CreateNewPostContent=function(r){var s=r.className,c=r.style,u=r.onPostCreatedEdited,d=r.onClose,m=r.communities,v=void 0===m?[]:m,f=r.forceSelectCommunity,g=r.forceSelectTopics,h=r.articleId,C=r.optionalTopic,y=r.editPostData,k=r.defaultCommunity,S=r.defaultTopics,P=r.noFetchTopic,x=r.hideTopicList,I=!!(null==y?void 0:y.id),L=t.useContext(i.TogetherComponentGlobalContext),R=L.data,B=R.locale,j=R.env.isMarryBaby,F=L.action,D=F.pushNotifications,O=F.sanitizeFunction,H=o.useTranslations().t,U=t.useState(!1),W=U[0],z=U[1],V=t.useState(""),G=V[0],q=V[1],Z=t.useState(""),K=Z[0],Q=Z[1],X=t.useState(f?{label:f.name,value:"".concat(f.id||"","-").concat(f.mappedCategoryId||"")}:{label:H("community.choose"),value:""}),$=X[0],J=X[1],Y=t.useState(e.__spreadArray([],g,!0)||[]),ee=Y[0],te=Y[1],ne=t.useState([]),ae=ne[0],oe=ne[1],ie=t.useState([]),le=ie[0],re=ie[1],se=f||v.find((function(e){return"".concat(e.id||"","-").concat(e.mappedCategoryId||"")===$.value})),ce=f?[f]:v.filter((function(e){return e.isActive})).sort((function(e,t){return e.name>t.name?1:e.name<t.name?-1:0})),ue=t.useState(null),de=ue[0],me=ue[1],pe=t.useState([]),ve=pe[0],fe=pe[1],ge=G&&i.innertext_1(K)&&(C||!C&&ee.length>0)&&se&&(!ae||ae.length<=i.MAX_IMAGE_UPLOADS)&&!(null==ve?void 0:ve.length)&&!W;t.useEffect((function(){if(y){var e=y;q(e.title||""),Q(i.decodeMention(i.decodePostUrl(e.description||"","edit"),e.mentions)),J({label:e.community.name,value:"".concat(e.community.id||"","-").concat(e.community.mappedCategoryId||"")}),te(e.topics||[]),oe(e.photos||[])}else k&&J({label:k.name,value:"".concat(k.id||"","-").concat(k.mappedCategoryId||"")}),S&&te(S)}),[]);var he=function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t,n,a,o,l,r,s,c,m,p,v,f;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,_({title:G,description:K,communityId:String((null==se?void 0:se.id)||""),imageFiles:ae,previewUrl:de,topicIds:null==ee?void 0:ee.map((function(e){return String(e.id||"")})).filter(Boolean),locale:B,sanitizeFunction:O,categoryCommunityId:String((null==se?void 0:se.mappedCategoryId)||""),categoryTopicIds:null==ee?void 0:ee.map((function(e){return String(e.mappedCategoryId||"")})).filter(Boolean)})];case 1:return t=e.sent(),h&&t.append("article_id",h),I?(null==y?void 0:y.id)?[4,T({id:y.id,formData:t,locale:B})]:[3,3]:[3,4];case 2:n=e.sent(),e.label=3;case 3:return[3,6];case 4:return[4,b({formData:t,locale:B,isArticleComment:!(null==se?void 0:se.id)&&!!(null==se?void 0:se.mappedCategoryId)})];case 5:n=e.sent(),e.label=6;case 6:return(null==(a=null==n?void 0:n.data)?void 0:a.id)&&!(null===(l=null===(o=null==n?void 0:n.messages)||void 0===o?void 0:o.moderation)||void 0===l?void 0:l.type)?(D({message:H("createPost.popup.success"),type:"success"}),function(e){u&&u(i.formatPost(e),I),d&&d()}(a)):"banned"===(null===(s=null===(r=null==n?void 0:n.messages)||void 0===r?void 0:r.moderation)||void 0===s?void 0:s.type)?(D({title:H("notification.post.blocked.title"),message:H("notification.post.blocked.message"),type:"danger"}),n.messages.moderation.words&&re(n.messages.moderation.words)):"suspect"===(null===(m=null===(c=null==n?void 0:n.messages)||void 0===c?void 0:c.moderation)||void 0===m?void 0:m.type)?(D({title:H("notification.post.suspect.title"),message:H("notification.post.suspect.message"),type:"warning"}),d&&d()):(null===(v=null===(p=null==n?void 0:n.messages)||void 0===p?void 0:p.find)||void 0===v?void 0:v.call(p,(function(e){var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))})))?(D({message:H("notification.suspend.message"),type:"danger"}),d&&d()):D({message:(null===(f=null==n?void 0:n.messages)||void 0===f?void 0:f[0])||H("notification.failure"),type:"danger"}),[2]}}))}))};return p.default.createElement(i.StyledCreateNewPost,{className:s,style:c},p.default.createElement("div",{className:"input-group-container"},p.default.createElement(A,{className:"input-group",bannedWords:le,value:G,onChange:q}),p.default.createElement(N,{className:"input-group",bannedWords:le,value:K,onChange:Q,onPreviewUrlChange:me,onInvalidUrlsChange:fe,onImageFilesChange:oe,imageFiles:ae}),p.default.createElement("div",{className:"input-group"},p.default.createElement(n.Text,{size:"p4",className:"input-group-label"},H("admin.community")),p.default.createElement(a.Dropdown,{options:(null==ce?void 0:ce.map((function(e,t){return{label:e.name,value:"".concat(e.id||"","-").concat(e.mappedCategoryId||"")}})))||[],id:"community-picker",placeholder:H("community.choose"),value:$,onChange:function(e){J({label:e.label,value:String(e.value)}),te([])},disabled:!!f}),p.default.createElement(n.Text,{size:"sm",className:"warning",color:l.theme.colors.gray400},"* ",H("commentPopup.warning.newPost"))),!x&&p.default.createElement("div",{className:"input-group"},p.default.createElement(n.Text,{size:"p4",className:"input-group-label"},H("tab.topic")),p.default.createElement("div",{className:"input-notification"},p.default.createElement("img",{src:se?"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":E}),p.default.createElement(n.Text,{size:"base",color:l.theme.colors.gray500},H(se?"createPost.popup.primary":"createPost.popup.warning"))),se&&p.default.createElement(M,{className:"tag-list",communityId:se.id,forceTopics:g,onChange:te,selectedTopics:ee,noFetch:P}))),p.default.createElement(n.Button,{theme:j?"marryBaby":"helloSites",className:"submit-btn",size:"lg",onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:if(!ge||W)return[3,5];z(!0),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,he()];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),console.error(t),D(w(H)),[3,4];case 4:z(!1),e.label=5;case 5:return[2]}}))}))},isDisabled:!ge,isLoading:W},H("createPost.popup.submit")))},exports.CreatePostDescription=N,exports.CreatePostTitle=A,exports.ImagePreviewPopup=V,exports.InputCommentBar=H,exports.LabelPin=C,exports.PopupDanger=R,exports.PostContent=z,exports.PostImagePreview=Z,exports.PostSingleImageViewPopup=q,exports.SubmitReportForm=W,exports.TagTopic=h,exports.TopicSelectList=M,exports.types=ie;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./tslib.es6-f7929e76.js"),t=require("react"),n=require("./constants-ea7b35a2.js"),a=require("./theme-7830aadf.js"),i=require("./cookieHelper-612b90fa.js"),o=require("./useTranslations-3a6e3bef.js"),r=require("lodash/debounce"),l=require("./index.styled-04f94566.js"),s=require("./index-a8e54837.js");require("react-range"),require("react-dom"),require("date-fns");var c=require("styled-components");require("./translationsContext-d7c8e0a0.js");var u=require("react-loading-skeleton"),d=require("react-id-generator"),p=require("lodash/shuffle"),h=require("./useOutsideClick-528bfd6c.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=f(t),m=f(r),C=f(c),v=f(u),x=f(p);var y,b,_,w,E,k,L,S,T,O,I,M,R=C.default.div(y||(y=e.__makeTemplateObject([""],[""]))),A=C.default.div(b||(b=e.__makeTemplateObject(["\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"]))),N=C.default.section(_||(_=e.__makeTemplateObject([""],[""]))),P=C.default.input(w||(w=e.__makeTemplateObject(["\n position: fixed;\n left: -100%;\n top: -100%;\n"],["\n position: fixed;\n left: -100%;\n top: -100%;\n"]))),F=C.default(s.Input)(E||(E=e.__makeTemplateObject(["\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"]))),z=c.createGlobalStyle(k||(k=e.__makeTemplateObject(["\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"]))),j=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("path",{d:"M18 6L6 18",stroke:n||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),g.default.createElement("path",{d:"M6 6L18 18",stroke:n||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},D=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{width:"14",height:"20",viewBox:"0 0 14 20",className:t},g.default.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:n||"currentColor"}))},H=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:t},g.default.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:n||"currentColor"}))},V=function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.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:n||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),g.default.createElement("path",{d:"M20 20L16 16",stroke:n||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},B=function(e){var t=e.width,n=e.height;return g.default.createElement("svg",{width:t||30,height:n||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}))},K=C.default.li(L||(L=e.__makeTemplateObject(["\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"])),a.theme.colors.neutral100),Z=C.default.div(S||(S=e.__makeTemplateObject(["\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"])),o.MediaQueries.mbDown),G=C.default.ul(T||(T=e.__makeTemplateObject(["\n width: 100%;\n max-height: 600px;\n overflow-y: auto;\n"],["\n width: 100%;\n max-height: 600px;\n overflow-y: auto;\n"]))),U=C.default(D)(O||(O=e.__makeTemplateObject(["\n width: 12px;\n height: 18px;\n"],["\n width: 12px;\n height: 18px;\n"]))),q=C.default.li(I||(I=e.__makeTemplateObject(["\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 ")}),a.theme.colors.neutral100,a.theme.colors.neutral50),Q=C.default((function(t){var n=t.count,a=t.className,i=d.useId(n);return g.default.createElement(g.default.Fragment,null,e.__spreadArray([],Array(n),!0).map((function(e,t){return g.default.createElement(K,{className:a,key:i[t]},g.default.createElement(v.default,{count:1,height:32}),g.default.createElement(v.default,{count:1,height:24}))})))}))(M||(M=e.__makeTemplateObject(["\n &:first-child {\n padding-top: 18px;\n }\n"],["\n &:first-child {\n padding-top: 18px;\n }\n"]))),W=function(e){var t=e.cities,n=e.isLoading,i=e.onLocationClick,r=e.onCurrentLocationClick,s=e.geoLocationPermission,c=void 0===s?"unset":s,u=e.isLocationLoading,d=e.selectedLocation,p=o.useTranslations().t,h="denied"===c,f=function(){return g.default.createElement(q,{role:"button",tabIndex:0,onClick:function(e){h||(e.nativeEvent.stopImmediatePropagation(),u||r())},"data-is-denied":h},h?g.default.createElement(l.Text,{color:"var(--gray600)",size:"md"},"x"):u?g.default.createElement(v.default,{height:20,width:20}):g.default.createElement(H,{color:a.theme.colors.primaryBase}),g.default.createElement("div",null,h?g.default.createElement(l.Text,{color:"var(--gray600)",size:"sm",style:{lineHeight:1.5}},p("booking.searchBar.grantLocation")):u?g.default.createElement(v.default,{height:20,style:{width:"calc(100% - 16px)"}}):g.default.createElement(l.Text,{size:"md"},p("booking.searchBar.useCurrentLocation"))))};return g.default.createElement(Z,{"data-testid":"location-search-results"},g.default.createElement(G,null,n?g.default.createElement(Q,{count:5}):!t||t.length<1?g.default.createElement(g.default.Fragment,null,f(),g.default.createElement(q,{"data-is-denied":"true"},g.default.createElement(l.Text,{size:"sm",color:"#ccc"},p("booking.searchBar.noResults")))):g.default.createElement(g.default.Fragment,null,f(),t.map((function(e){return g.default.createElement(q,{key:e.id,onClick:function(t){t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":"Select ".concat(e.name," as location"),isSelected:(null==d?void 0:d.id)===e.id},g.default.createElement(U,{color:a.theme.colors.neutral400}),g.default.createElement(l.Text,{size:"md"},e.name))})))))},Y="TYPE_CHARACTER",J="REMOVE_CHARACTER",X="REMOVE_ALL",$="REMOVE_LAST_VISIBLE_NODE",ee="PAUSE_FOR",te="CHANGE_DELETE_SPEED",ne="CHANGE_DELAY",ae="PASTE_STRING",ie=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},oe="TEXT_NODE",re=function(){function t(t){var n=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 n.state.eventLoopPaused=!1,n.runEventLoop(),n},this.pause=function(){return n.state.eventLoopPaused=!0,n},this.stop=function(){return n.state.eventLoop&&(window.cancelAnimationFrame(n.state.eventLoop),n.state.eventLoop=null),n},this.pauseFor=function(e){return n.addEventToQueue(ee,{ms:e}),n},this.typeOutAllStrings=function(){return"string"==typeof n.options.strings?(n.typeString(n.options.strings).pauseFor(n.options.pauseFor),n):(n.options.strings.forEach((function(e){n.typeString(e).pauseFor(n.options.pauseFor).deleteAll(n.options.deleteSpeed)})),n)},this.typeString=function(e,t){if(void 0===t&&(t=null),e){var a=(n.options||{}).stringSplitter,i="function"==typeof a?a(e):e.split("");n.typeCharacters(i,t)}return n},this.pasteString=function(e,t){return void 0===t&&(t=null),e&&n.addEventToQueue(ae,{character:e,node:t}),n},this.deleteAll=function(e){return void 0===e&&(e="natural"),n.addEventToQueue(X,{speed:e}),n},this.changeDeleteSpeed=function(e){if(!e)throw new Error("Must provide new delete speed");return n.addEventToQueue(te,{speed:e}),n},this.changeDelay=function(e){if(!e)throw new Error("Must provide new delay");return n.addEventToQueue(ne,{delay:e}),n},this.deleteChars=function(e){if(!e)throw new Error("Must provide amount of characters to delete");for(var t=0;t<e;t++)n.addEventToQueue(J);return n},this.typeCharacters=function(e,t){if(void 0===t&&(t=null),!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(e){n.addEventToQueue(Y,{character:e,node:t})})),n},this.removeCharacters=function(e){if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((function(){n.addEventToQueue(J)})),n},this.addEventToQueue=function(e,t,a){return void 0===a&&(a=!1),n.addEventToStateProperty(e,t,a,"eventQueue")},this.addReverseCalledEvent=function(e,t,a){return void 0===a&&(a=!1),n.options.loop?n.addEventToStateProperty(e,t,a,"reverseCalledEvents"):n},this.addEventToStateProperty=function(t,a,i,o){void 0===i&&(i=!1);var r={eventName:t,eventArgs:a||{}};return n.state[o]=i?e.__spreadArray([r],n.state[o],!0):e.__spreadArray(e.__spreadArray([],n.state[o],!0),[r],!1),n},this.runEventLoop=function(){n.state.lastFrameTime||(n.state.lastFrameTime=Date.now());var t=Date.now(),a=t-n.state.lastFrameTime;if(!n.state.eventQueue.length){if(!n.options.loop)return;n.state.eventQueue=e.__spreadArray([],n.state.calledEvents,!0),n.state.calledEvents=[],n.options=e.__assign({},n.state.initialOptions)}if(n.state.eventLoop=window.requestAnimationFrame(n.runEventLoop),!n.state.eventLoopPaused){if(n.state.pauseUntil){if(t<n.state.pauseUntil)return;n.state.pauseUntil=null}var i=e.__spreadArray([],n.state.eventQueue,!0),o=i.shift();if(!(a<=(o.eventName===$||o.eventName===J?"natural"===n.options.deleteSpeed?ie(40,80):n.options.deleteSpeed:"natural"===n.options.delay?ie(120,160):n.options.delay))){var r=o.eventName,l=o.eventArgs;switch(r){case ae:case Y:var s=l.character,c=document.createTextNode(s),u=c;n.options.onCreateTextNode&&"function"==typeof n.options.onCreateTextNode&&(u=n.options.onCreateTextNode(s,c)),n.state.visibleNodes=e.__spreadArray(e.__spreadArray([],n.state.visibleNodes,!0),[{type:oe,character:s,node:u}],!1);break;case J:i.unshift({eventName:$,eventArgs:{removingCharacterNode:!0}});break;case ee:var d=o.eventArgs.ms;n.state.pauseUntil=Date.now()+parseInt(d);break;case X:var p=n.state.visibleNodes,h=l.speed,f=[];h&&f.push({eventName:te,eventArgs:{speed:h,temp:!0}});for(var g=0,m=p.length;g<m;g++)f.push({eventName:$,eventArgs:{removingCharacterNode:!1}});h&&f.push({eventName:te,eventArgs:{speed:n.options.deleteSpeed,temp:!0}}),i.unshift.apply(i,f);break;case $:if(n.state.visibleNodes.length){var C=n.state.visibleNodes.pop(),v=C.node;s=C.character;n.options.onRemoveNode&&"function"==typeof n.options.onRemoveNode&&n.options.onRemoveNode({node:v,character:s}),v&&v.parentNode.removeChild(v)}break;case te:n.options.deleteSpeed=o.eventArgs.speed;break;case ne:n.options.delay=o.eventArgs.delay}n.options.loop&&(o.eventName===$||o.eventArgs&&o.eventArgs.temp||(n.state.calledEvents=e.__spreadArray(e.__spreadArray([],n.state.calledEvents,!0),[o],!1))),n.state.eventQueue=i,n.state.lastFrameTime=t}}},t&&(this.options=e.__assign(e.__assign({},this.options),t)),this.state.initialOptions=e.__assign({},this.options),this.init()}return t.prototype.init=function(){this.addEventToQueue(X,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()},t}();function le(e){var n=e.inputRef,a=e.wrapperRef,i=e.disabled,r=o.useTranslations(),l=r.t,s=r.locale,c=t.useMemo((function(){if(i)return[];var e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==s&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),x.default(e).map((function(e){return l(e)}))}),[l,s]);function u(e){var t=p();return t&&(t.placeholder=t.placeholder+e),null}function d(){var e=p();e&&(e.placeholder=e.placeholder.slice(0,-1))}function p(){return n&&n.current?n.current:a&&a.current&&a.current.querySelector("input")||null}t.useEffect((function(){if(!i){var e=p();e&&(e.placeholder="",new re({strings:c,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:u,onRemoveNode:d}))}}),[n,a])}var se,ce=C.default.div(se||(se=e.__makeTemplateObject(["\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 ue(n){var i=n.focused,r=n.value,l=void 0===r?"":r,s=n.onClick,c=n.trackingAttributes,u=n.inputSearchPlaceholder,d=o.useTranslations().t,p=t.useRef(null);le({wrapperRef:p,disabled:!!u});var h=t.useMemo((function(){return c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}}),[c]);return g.default.createElement(ce,e.__assign({onClick:function(){return s&&s()},ref:p},h),g.default.createElement(F,{inputClassName:"location"===i?"focused":void 0,name:"booking-search-placeholder",displayIcon:g.default.createElement(V,{color:a.theme.colors.gray400}),placeholder:d("booking.searchBar.searchInput.placeholder"),value:l,size:"md"}))}var de,pe,he,fe,ge,me,Ce=C.default.header(de||(de=e.__makeTemplateObject(["\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"]))),ve=C.default.div(pe||(pe=e.__makeTemplateObject(["\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"]))),xe=C.default.div(he||(he=e.__makeTemplateObject(["\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"]))),ye=C.default.div(fe||(fe=e.__makeTemplateObject(["\n width: 100%;\n margin-left: 24px;\n"],["\n width: 100%;\n margin-left: 24px;\n"]))),be=C.default(l.Text)(ge||(ge=e.__makeTemplateObject(["\n color: ",";\n text-align: start;\n"],["\n color: ",";\n text-align: start;\n"])),a.theme.colors.secondaryDark),_e=function(e){var t=e.className,n=e.onLeftClick,i=e.headingText,o=e.onRightClick,r=e.iconLeft,l=e.textRight;return g.default.createElement(Ce,{className:t},g.default.createElement(xe,{onClick:n},r||g.default.createElement(j,{color:a.theme.colors.gray800})),g.default.createElement(ye,null,g.default.createElement(be,{size:"md",type:"bold"},i)),g.default.createElement(ve,{onClick:o},l&&g.default.createElement("p",null,l)))},we={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0},Ee={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 ke(t){var n=t.selectedLocation,a=t.searchLocationKeywords;return n&&a!==n.name?e.__assign(e.__assign({},t),{searchLocationKeywords:n.name}):t}function Le(t,a){var i;switch(t.isDebug&&console.log("bookingSearchBar",{action:a,state:t}),a.type){case me.NavigateTo:return e.__assign(e.__assign({},t),{navigateTo:a.payload,focused:"none",isMobileModalOpened:!1});case me.ClickOutsideInputLocation:return t.isMobile||"location"!==t.focused?t:ke(e.__assign(e.__assign({},t),{focused:"none"}));case me.ClickOutsideInputSearch:return t.isMobile||"search"!==t.focused?t:e.__assign(e.__assign({},t),{focused:"none"});case me.FocusInputLocation:var o=e.__assign(e.__assign({},t),{focused:"location"});return(null===(i=t.selectedLocation)||void 0===i?void 0:i.id)===n.ID_OPTION_CURRENT_LOCATION&&(o.searchLocationKeywords=""),o;case me.FocusInputSearch:var r=e.__assign(e.__assign({},t),{focused:"search"});return t.isMobile?ke(r):r;case me.ChangeInputLocation:return e.__assign(e.__assign({},t),{searchLocationKeywords:a.payload});case me.ChangeInputSearch:var l=a.payload;return e.__assign(e.__assign({},t),{searchKeywords:l,isLoadingSearchResults:l.trim().length>we[t.locale]});case me.SelectCurrentLocation:return e.__assign(e.__assign({},t),{focused:"none",selectedLocation:a.payload,searchLocationKeywords:a.payload.name});case me.ClearInputLocation:return e.__assign(e.__assign({},t),{focused:"location",cities:t.initialCities,searchLocationKeywords:""});case me.ClearInputSearch:return e.__assign(e.__assign({},t),{focused:"search",searchKeywords:""});case me.SelectLocation:return e.__assign(e.__assign({},t),{focused:"none",selectedLocation:a.payload,searchLocationKeywords:a.payload.name});case me.SelectSearchResult:return e.__assign(e.__assign({},t),{searchKeywords:a.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:a.payload.url});case me.FetchCitiesStart:return e.__assign(e.__assign({},t),{isLoadingCities:!0});case me.FetchCitiesFinish:return e.__assign(e.__assign({},t),{isLoadingCities:!1});case me.FetchSearchResultsStart:return e.__assign(e.__assign({},t),{isLoadingSearchResults:!0});case me.FetchSearchResultsFinish:return e.__assign(e.__assign({},t),{isLoadingSearchResults:!1});case me.FetchSearchResultsComplete:var s=e.__assign(e.__assign({},t),{searchResults:a.payload});return 0===t.initialSearchResults.length&&(s.initialSearchResults=a.payload),s;case me.FetchCitiesByGeoIpComplete:var c=a.payload.cities,u=a.payload.default;(c=c.filter((function(e){return e.id!==u.id}))).unshift(u),t.initialSelectedCity&&!c.find((function(e){return e.id===t.initialSelectedCity.id}))&&c.unshift(t.initialSelectedCity);var d=e.__assign(e.__assign({},t),{defaultCity:u,initialCities:c,cities:c});return"denied"!==t.geoLocationPermission||t.initialSelectedCity||(d.selectedLocation=u,d.searchLocationKeywords=u.name),d;case me.FetchCitiesByKeywordComplete:return e.__assign(e.__assign({},t),{cities:a.payload});case me.DisplayInitialCities:return e.__assign(e.__assign({},t),{cities:t.initialCities});case me.DisplayInitialSearchResults:return e.__assign(e.__assign({},t),{searchResults:t.initialSearchResults,isLoadingSearchResults:!1});case me.GrantGeoLocationPermission:return e.__assign(e.__assign({},t),{geoLocationPermission:"granted",geoLocationCoordinates:a.payload});case me.DenyGeoLocationPermission:return e.__assign(e.__assign({},t),{geoLocationPermission:"denied",geoLocationCoordinates:null});case me.OpenMobileModal:return e.__assign(e.__assign({},t),{isMobileModalOpened:!0});case me.CloseMobileModal:return e.__assign(e.__assign({},t),{isMobileModalOpened:!1});case me.UpdateInitialSearchValue:return e.__assign(e.__assign({},t),{searchKeywords:a.payload});case me.SetInputSearchPlaceholder:return e.__assign(e.__assign({},t),{inputSearchPlaceholder:a.payload});default:return t}}!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"}(me||(me={}));var Se,Te,Oe,Ie,Me,Re,Ae,Ne=function(){return g.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},g.default.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"}))},Pe=C.default.button(Se||(Se=e.__makeTemplateObject(["\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}),o.MediaQueries.mbDown,(function(e){return e.theme.colors.primaryHover}),(function(e){return e.theme.colors.primaryActive})),Fe=C.default(l.Text)(Te||(Te=e.__makeTemplateObject(["\n font-weight: ",";\n"],["\n font-weight: ",";\n"])),(function(e){return e.theme.sizes.fwSemiBold})),ze=function(e){var t=e.onClick,n=(0,o.useTranslations().t)("booking.searchBar.searchButton");return g.default.createElement(Pe,{onClick:t,title:n},g.default.createElement(Ne,null),g.default.createElement(Fe,{size:"s3",color:"white"},n))},je=C.default.div(Oe||(Oe=e.__makeTemplateObject(["\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"])),o.MediaQueries.mbDown,a.theme.colors.blue50),De=C.default.div(Ie||(Ie=e.__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"]))),He=C.default(De)(Me||(Me=e.__makeTemplateObject(["\n flex: 1;\n"],["\n flex: 1;\n"]))),Ve=C.default(De)(Re||(Re=e.__makeTemplateObject(["\n flex: 2;\n"],["\n flex: 2;\n"]))),Be=C.default((function(e){var t=e.className,n=e.color;return g.default.createElement("svg",{className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"8",fill:"white"}),g.default.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:n||"currentColor"}))}))(Ae||(Ae=e.__makeTemplateObject(["\n display: none;\n &.shown {\n display: block;\n }\n"],["\n display: none;\n &.shown {\n display: block;\n }\n"])));function Ke(e){var i=e.isMobile,r=e.state,l=e.dispatch,s=e.debouncedFetchCitiesByKeyword,c=e.debouncedFetchSearchResults,u=e.focusLocationInput,d=e.focusSearchInput,p=e.renderLocationResults,f=e.renderSearchResults,m=e.trackingAttributes,C=e.onSearch,v=e.initalSearchValue,x=t.useRef(null),y=t.useRef(null),b=r.focused,_=r.searchLocationKeywords,w=r.geoLocationPermission,E=r.selectedLocation,k=r.searchKeywords,L=r.inputSearchPlaceholder,S=o.useTranslations().t;le({wrapperRef:y,disabled:!!L}),h.useOutsideClick(x,(function(){l({type:me.ClickOutsideInputLocation})})),h.useOutsideClick(y,(function(){l({type:me.ClickOutsideInputSearch})}));var T=t.useMemo((function(){return"granted"===w&&(null==E?void 0:E.id)===n.ID_OPTION_CURRENT_LOCATION?a.theme.colors.primaryBase:a.theme.colors.gray400}),[w,E]),O=t.useCallback((function(e){l({type:me.ChangeInputSearch,payload:e}),"function"!=typeof C&&(e.trim().length>we[r.locale]||v?c(e.trim(),r):(c.cancel(),l({type:me.DisplayInitialSearchResults})))}),[l,r]),I=t.useCallback((function(e){l({type:me.ChangeInputLocation,payload:e}),e.trim().length>we[r.locale]?s(e.trim()):(s.cancel(),l({type:me.DisplayInitialCities}))}),[s,l]);return g.default.createElement(je,null,g.default.createElement(He,{ref:x},g.default.createElement(F,{inputClassName:"location"===b?"focused":void 0,placeholder:S("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:g.default.createElement(D,{className:"location-pin-icon",color:T}),actionIcon:g.default.createElement(Be,{color:a.theme.colors.gray300,className:""!==_?"shown":""}),onActionClick:function(){l({type:me.ClearInputLocation}),s.cancel(),u()},value:_,onChange:I,onFocus:function(){return l({type:me.FocusInputLocation})},size:"md"}),!i&&p()),g.default.createElement(Ve,{ref:y},g.default.createElement(F,{placeholder:L||S("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:g.default.createElement(Be,{color:a.theme.colors.gray300,className:""!==k?"shown":""}),onActionClick:function(){l({type:me.ClearInputSearch}),c.cancel(),c("",r),d()},value:k,onChange:O,onFocus:function(){return l({type:me.FocusInputSearch})},inputClassName:"search"===b?"focused":void 0,size:"md",trackingAttributes:m,onKeyPress:function(e){r.autoCompleteDisabled&&"Enter"===e.key&&C&&C({cityId:r.selectedLocation.id,keyword:k})},enterKeyHint:r.autoCompleteDisabled?"search":void 0}),!i&&f()),r.autoCompleteDisabled&&!r.isMobile&&g.default.createElement(ze,{onClick:function(){C({cityId:r.selectedLocation.id,keyword:k})}}))}var Ze,Ge,Ue,qe,Qe,We,Ye,Je,Xe,$e,et,tt,nt,at,it=C.default.li(Ze||(Ze=e.__makeTemplateObject(["\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"]))),ot=C.default.div(Ge||(Ge=e.__makeTemplateObject(["\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 t=e.type;return t&&"doctors"===t&&"\n border-radius: calc(var(--graphicSize) / 2);\n "}),(function(e){var t=e.type;return t&&"doctors"===t?"\n\n object-fit: cover; \n ":"\n object-fit: contain;\n "}),a.theme.colors.gray600),rt=C.default(l.Text)(Ue||(Ue=e.__makeTemplateObject(["\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"])),o.MediaQueries.tdUp),lt=C.default.figure(qe||(qe=e.__makeTemplateObject(["\n max-width: var(--graphicSize);\n min-width: var(--graphicSize);\n"],["\n max-width: var(--graphicSize);\n min-width: var(--graphicSize);\n"]))),st=C.default.svg(Qe||(Qe=e.__makeTemplateObject(["\n margin: 0 auto;\n display: block;\n"],["\n margin: 0 auto;\n display: block;\n"]))),ct=C.default.div(We||(We=e.__makeTemplateObject(["\n display: grid;\n place-items: center;\n"],["\n display: grid;\n place-items: center;\n"]))),ut={doctors:function(e){var t=e.width,n=e.height;return g.default.createElement("svg",{width:t||32,height:n||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("g",{clipPath:"url(#clip0_14712_400114)"},g.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),g.default.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"})),g.default.createElement("defs",null,g.default.createElement("clipPath",{id:"clip0_14712_400114"},g.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"}))))},services:function(e){var t=e.width,n=e.height;return g.default.createElement("svg",{width:t||30,height:n||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),g.default.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"}))}},dt=function(e){var n=e.type,i=e.item,o=e.imageUrl,r=e.onClickItem,l=t.useMemo((function(){var e=ut[n]||B;return g.default.createElement(e,{width:32,height:"services"===n?32:24})}),[n]);return g.default.createElement(it,{onClick:function(){return r&&r(i)},onKeyDown:function(e){"Enter"!==e.key&&"Space"!==e.key||r&&r(i)},tabIndex:0,role:"button"},g.default.createElement(lt,null,"hospitals"===n?g.default.createElement(st,{width:"12",height:"16",viewBox:"0 0 12 16"},g.default.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"})):g.default.createElement(ot,{type:n},o?g.default.createElement("img",{src:o,width:32,height:"services"===n?32:24}):l)),g.default.createElement(rt,{color:a.theme.colors.gray800,size:"p3"},i.name))},pt=function(){return g.default.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},g.default.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"}))},ht=function(){return g.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},g.default.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"}))},ft=function(){return g.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},g.default.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"}))},gt=function(){return g.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},g.default.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"}))},mt=C.default.header(Ye||(Ye=e.__makeTemplateObject(["\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"])),a.theme.colors.neutral50),Ct=C.default.div(Je||(Je=e.__makeTemplateObject(["\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"]))),vt=C.default.p(Xe||(Xe=e.__makeTemplateObject(["\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"])),a.theme.colors.neutral800,a.theme.sizes.fwSemiBold),xt=C.default.button($e||($e=e.__makeTemplateObject(["\n flex: 1;\n cursor: pointer;\n text-align: end;\n"],["\n flex: 1;\n cursor: pointer;\n text-align: end;\n"]))),yt=C.default.section(et||(et=e.__makeTemplateObject(["\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"])),o.MediaQueries.tdUp),bt=C.default.ul(tt||(tt=e.__makeTemplateObject(["\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"])),o.MediaQueries.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 "}),o.MediaQueries.tdUp),_t=C.default(l.Text)(nt||(nt=e.__makeTemplateObject(["\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"]))),wt=function(e){var i=e.type,r=e.data,s=e.state,c=e.dispatch,u=e.itemsToShow,d=e.itemsToShowDesktop,p=e.isMobile,h=e.isLoading,f=e.keyword,m=t.useState(!1),C=m[0],x=m[1],y=o.useTranslations(),b=y.t,_=y.locale,w=s.selectedLocation,E=s.searchKeywords,k=t.useMemo((function(){return n.LOCALIZED_SLUGS[_]}),[_]),L=t.useMemo((function(){return{doctors:{name:b("booking.searchPopup.doctors"),icon:g.default.createElement(pt,null),slug:k.DOCTOR},services:{name:b("booking.searchPopup.services"),icon:g.default.createElement(ht,null),slug:k.SERVICE},hospitals:{name:b("booking.searchPopup.hospitals"),icon:g.default.createElement(ft,null),slug:k.HOSPITAL},specialties:{name:b("booking.searchPopup.specialties"),icon:g.default.createElement(gt,null),slug:k.SPECIALTIES}}}),[i,k]),S=t.useMemo((function(){return L[i].slug}),[L]),T=p?u:d;function O(e){var t="";switch(i){case"specialties":t="/".concat(w.slug,"/").concat(L.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&&c({type:me.SelectSearchResult,payload:{name:e.name,url:t}})}function I(e){return g.default.createElement(dt,{key:e.id,item:e,type:i,imageUrl:e.logo||e.avatar||e.thumbnail,onClickItem:O})}return g.default.createElement("section",null,g.default.createElement(mt,null,g.default.createElement(Ct,null,L[i].icon,g.default.createElement(vt,null,L[i].name)),f.trim().length<=we[_]&&g.default.createElement(xt,{onClick:function(){var e="";switch(i){case"specialties":e="/".concat(S);break;case"services":case"doctors":case"hospitals":e="/".concat(w.slug,"/").concat(S)}e&&c({type:me.NavigateTo,payload:e})}},g.default.createElement(l.Text,{size:"p3",color:a.theme.colors.primaryBase},b("booking.searchPopup.seeAll")))),(h||r&&r.length>0)&&g.default.createElement(yt,null,g.default.createElement(bt,null,h&&Array(2).fill(void 0).map((function(e,t){return g.default.createElement(it,{key:i+"loading"+t},g.default.createElement(lt,null,g.default.createElement(ct,null,g.default.createElement(v.default,{height:14,width:"hospitals"===i?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),g.default.createElement(v.default,{width:120,height:24}))})),!h&&r&&r.length>0&&r.slice(0,T).map(I)),g.default.createElement(bt,{isShown:C,isMore:!0},r.slice(T,-1).map(I)),"specialties"===i&&T<r.length&&!h&&g.default.createElement("button",{onClick:function(){return x(!C)}},g.default.createElement(_t,{size:"p3",color:a.theme.colors.primaryBase},b(C?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==i&&T<r.length&&!h&&f.trim().length>we[_]&&g.default.createElement("button",{onClick:function(){var e=L[i].slug,t="/".concat(w.slug,"/").concat(e,"?q=").concat(E);c({type:me.NavigateTo,payload:t})}},g.default.createElement(_t,{size:"p3",color:a.theme.colors.primaryBase},b("booking.searchPopup.searchIn.".concat(i),{name:f})))),!h&&0===(null==r?void 0:r.length)&&g.default.createElement(yt,null,g.default.createElement(l.Text,{size:"sm",color:a.theme.colors.gray400},b("booking.searchBar.noResults"))))},Et=C.default.section(at||(at=e.__makeTemplateObject(["\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"])),o.MediaQueries.tdUp),kt=function(e){var t=e.data,n=e.state,a=e.dispatch,i=e.isMobile,o=e.isLoading,r=e.keyword;return g.default.createElement(Et,null,t&&t.map((function(e){return g.default.createElement(wt,{type:e.type,state:n,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:o,keyword:r})})))},Lt="api/lists/cities?keyword={keyword}&country_id={countryId}&site={domain}&_nopaging={noPaging}",St="api/v2/search/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}",Tt="api/geobyip?site={domain}&latitude={lat}&longitude={lng}",Ot=function(t,a,i){return o.stringFormat(t,e.__assign(e.__assign({},a),{domain:n.domainLocales[i||"en-PH"]}))};var It;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(It||(It={}));var Mt=Object.freeze({__proto__:null,get RedirectType(){return It}});exports.BookingSearchBar=function(r){var l=r.isMobile,s=r.careApiDomain,c=r.geoLocationPermission,u=r.geoLocationCoordinates,d=r.initialSelectedCity,p=r.initialSearchValue,h=void 0===p?"":p,f=r.careFrontDomain,C=void 0===f?"/care":f,v=r.isDebug,x=void 0!==v&&v,y=r.askForGeolocationPermission,b=void 0!==y&&y,_=r.gaTrackingSearchBar,w=r.autoCompleteDisabled,E=void 0!==w&&w,k=r.inputSearchPlaceholder,L=void 0===k?"":k,S=r.routerPush,T=r.onGeoLocationPermissionChange,O=r.onSearch,I=r.onChangeLocation,M=o.useTranslations(),F=M.t,j=M.locale,D=t.useRef(null),H=t.useRef(null),V=t.useState(void 0),B=V[0],K=V[1],Z=function(){var e=t.useState((function(){if("undefined"==typeof window)return"unset";if(i.getCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";var e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),n=e[0],o=e[1],r=t.useState((function(){if("undefined"==typeof window)return null;var e=i.getCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=r[0],s=r[1],c=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(e){var t={lat:"".concat(Math.round(1e7*e.coords.latitude)/1e7),lng:"".concat(Math.round(1e7*e.coords.longitude)/1e7)};i.setCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),0,15),s(t),o("granted")}),(function(){i.deleteCookie(a.USER_GEOLOCATION_COORDINATES_COOKIE),o("denied")}))}),[]);return t.useMemo((function(){return{geoLocationPermission:n,geoLocationCoordinates:l,requestGeoLocation:c}}),[n,l])}(),G=Z.geoLocationPermission,U=Z.geoLocationCoordinates,q=Z.requestGeoLocation,Q=t.useReducer(Le,Ee,(function(t){return e.__assign(e.__assign({},t),{isDebug:x,isMobile:l,geoLocationPermission:c||G||"unset",geoLocationCoordinates:u||U||null,searchKeywords:h,initialSelectedCity:d||null,selectedLocation:d||t.selectedLocation||null,searchLocationKeywords:(null==d?void 0:d.name)||t.searchLocationKeywords,autoCompleteDisabled:E,inputSearchPlaceholder:L,locale:j})})),Y=Q[0],J=Q[1],X=Y.navigateTo,$=Y.focused,ee=Y.isLoadingCities,te=Y.cities,ne=Y.searchKeywords,ae=Y.geoLocationPermission,ie=Y.selectedLocation,oe=Y.initialSelectedCity,re=Y.defaultCity,le=Y.searchResults,se=Y.isLoadingSearchResults,ce=Y.isMobileModalOpened,de=Y.inputSearchPlaceholder,pe=function(a){var i=a.dispatch,o=a.careApiDomain,r=a.locale,l=void 0===r?"vi-VN":r,s=t.useCallback((function(e,t){void 0===t&&(t={});var n="".concat(o).concat(e);return i({type:me.FetchCitiesStart}),fetch(Ot(n,t,l),{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 i({type:me.FetchCitiesFinish})}))}),[l]),c=t.useCallback((function(t){var n=t.coordinates,a={};n&&(a={lat:n.lat,lng:n.lng});var o=[s(Tt,a)];return"zh-TW"===l&&o.push(s(Lt,{noPaging:1})),Promise.all(o).then((function(t){var n=t[0],a=t[1],o=e.__assign({},n);if(a){var r=o.cities.map((function(e){return e.id}));o.cities=o.cities.concat(a.cities.filter((function(e){return!r.includes(e.id)})))}i({type:me.FetchCitiesByGeoIpComplete,payload:o})})).catch((function(e){return console.error("error loading cities by location",e)}))}),[l,o,i]);return{fetchCitiesByLocation:c,fetchCitiesByKeyword:t.useCallback((function(e){return s(Lt,{keyword:e}).then((function(e){i({type:me.FetchCitiesByKeywordComplete,payload:e.cities})})).catch((function(e){return console.error("error loading cities by keyword",e)}))}),[l,o,i]),fetchSearchResults:t.useCallback((function(e,t){var a="".concat(o).concat(St);i({type:me.FetchSearchResultsStart});var r=t.defaultCity,s=t.selectedLocation,c=t.geoLocationCoordinates,u="";if(s&&r){s.id===n.ID_OPTION_CURRENT_LOCATION?c||(u=r.id):u=s.id;var d=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(Ot(a,{domain:o,searchType:"global",keyword:e.trim().length>we[l]?e.trim():"",city:u===n.ID_OPTION_CURRENT_LOCATION?"":u,lat:d,lng:p},l),{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 i({type:me.FetchSearchResultsComplete,payload:e})})).catch((function(e){console.log("error loading search results",{url:a,error:e})})).finally((function(){return i({type:me.FetchSearchResultsFinish})}))}i({type:me.FetchSearchResultsFinish})}),[l,o,i])}}({dispatch:J,locale:j,careApiDomain:s}),he=pe.fetchCitiesByLocation,fe=pe.fetchCitiesByKeyword,ge=pe.fetchSearchResults,Ce=t.useMemo((function(){var e;return{id:n.ID_OPTION_CURRENT_LOCATION,name:F("booking.searchBar.currentLocation"),slug:null===(e=n.LOCALIZED_SLUGS[j])||void 0===e?void 0:e.CURRENT}}),[F,j]),ve=t.useMemo((function(){return m.default(fe,400)}),[fe]),xe=t.useMemo((function(){return m.default(ge,400)}),[ge]);t.useEffect((function(){""!==h&&h!==Y.searchKeywords&&J({type:me.UpdateInitialSearchValue,payload:h})}),[h]),t.useEffect((function(){b&&(null==ie?void 0:ie.id)===n.ID_OPTION_CURRENT_LOCATION&&"unset"===ae&&q()}),[b,ie,ae]),t.useEffect((function(){c||ae===G||("granted"===G&&U?J({type:me.GrantGeoLocationPermission,payload:U}):"denied"===G&&J({type:me.DenyGeoLocationPermission}))}),[ae,G,U,c]),t.useEffect((function(){X&&(S?S(X):window.location.href="".concat(C).concat(X))}),[X]);var ye=t.useCallback((function(){J({type:me.SelectCurrentLocation,payload:Ce})}),[F,J]);t.useEffect((function(){"denied"===ae||oe||ye(),T&&T(ae,Y.geoLocationCoordinates),l&&"granted"===ae&&ie&&J({type:me.FocusInputSearch}),he({coordinates:Y.geoLocationCoordinates})}),[ae]),t.useEffect((function(){ie&&re&&ge(Y.searchKeywords,Y)}),[ie,re]),t.useEffect((function(){L!==de&&J({type:me.SetInputSearchPlaceholder,payload:L})}),[L,de]),t.useEffect((function(){ce?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[ce]);var be=t.useCallback((function(e){J({type:me.SelectLocation,payload:e}),Te(),I&&I(e)}),[F,J]);function ke(){l&&"granted"!==Y.geoLocationPermission?q():(ye(),Te())}function Se(){var e;D.current&&(null===(e=D.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Te(){var e;D.current&&(null===(e=D.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Oe(){return"location"!==$?null:g.default.createElement(W,{isLoading:ee,cities:te,onLocationClick:be,onCurrentLocationClick:ke,isLocationLoading:ee,geoLocationPermission:ae,selectedLocation:ie})}function Ie(){return"search"!==$?null:Y.autoCompleteDisabled?l?g.default.createElement(ze,{onClick:function(){O({cityId:Y.selectedLocation.id,keyword:ne})}}):null:g.default.createElement(kt,{data:le,state:Y,dispatch:J,isMobile:!1,keyword:ne,isLoading:se})}function Me(){return g.default.createElement(Ke,{isMobile:l,state:Y,dispatch:J,debouncedFetchCitiesByKeyword:ve,debouncedFetchSearchResults:xe,focusLocationInput:Se,focusSearchInput:Te,renderLocationResults:Oe,renderSearchResults:Ie,trackingAttributes:_,onSearch:O,initalSearchValue:h})}return t.useEffect((function(){if(window.visualViewport){var e=function(e){var t=e.target;K(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e),function(){window.visualViewport.removeEventListener("resize",e)}}}),[K]),l?g.default.createElement(g.default.Fragment,null,g.default.createElement(z,null),g.default.createElement(P,{ref:H}),g.default.createElement(A,{id:"booking-search-bar",ref:D,"data-is-modal":l&&ce,style:{"--mobile-care-searchbar-height":ce&&B?"".concat(B,"px"):"100%"}},ce?g.default.createElement(g.default.Fragment,null,g.default.createElement(N,null,g.default.createElement(_e,{headingText:"Search",onLeftClick:function(){J({type:me.CloseMobileModal})}}),Me()),Oe(),Ie()):g.default.createElement(ue,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return H.current&&H.current.focus(),J({type:me.OpenMobileModal}),[4,Promise.resolve()];case 1:return e.sent(),D.current&&(null===(t=D.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus()),[2]}}))}))},focused:$,value:ne,trackingAttributes:_,inputSearchPlaceholder:L}))):g.default.createElement(R,{id:"booking-search-bar",ref:D},Me())},exports.types=Mt;