@hhgtech/hhg-components 1.28.35 → 1.28.36
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.
- package/build/babyGrowth.js +30 -14
- package/build/cache.js +1 -1
- package/build/care.js +1 -1
- package/build/components/atoms/alert/index.d.ts +1 -2
- package/build/components/atoms/avatar/index.d.ts +1 -2
- package/build/components/atoms/divider/index.d.ts +1 -2
- package/build/components/atoms/fileDropdown/index.d.ts +1 -2
- package/build/components/atoms/heading/index.d.ts +1 -2
- package/build/components/atoms/marryBabyText/index.d.ts +1 -2
- package/build/components/atoms/marryBabyText/index.styled.d.ts +4 -2
- package/build/components/atoms/pagination/index.d.ts +1 -2
- package/build/components/mantine/slider/index.styled.d.ts +7 -1
- package/build/components/mantine/text/index.styled.d.ts +1 -9
- package/build/components/molecules/articleCard/_deprecated_index.d.ts +1 -2
- package/build/components/molecules/categoryCard/index.d.ts +1 -2
- package/build/components/molecules/dropdown/index.d.ts +1 -2
- package/build/components/molecules/dropdown/index.styled.d.ts +1 -1
- package/build/components/molecules/floatButtonGroup/index.d.ts +1 -2
- package/build/components/molecules/languageSwitcher/tooltipSelection/index.d.ts +1 -2
- package/build/components/molecules/tabs/index.d.ts +1 -2
- package/build/components/navigationV2/components/molecules/navigationBar/index.styled.d.ts +0 -1
- package/build/components/onboardingV2/dynamicForm/index.styled.d.ts +1 -8
- package/build/components.js +1 -1
- package/build/{constants-c397b152.js → constants-437bb4bf.js} +23 -23
- package/build/{constants-726f75de.js → constants-80dd2233.js} +1 -1
- package/build/constants.js +1 -1
- package/build/{core-4602825d.js → core-80e9cff8.js} +1 -1
- package/build/ecom.js +1 -1
- package/build/esm/babyGrowth.js +45 -29
- package/build/esm/cache.js +1 -1
- package/build/esm/care.js +1 -1
- package/build/esm/components/atoms/alert/index.d.ts +1 -2
- package/build/esm/components/atoms/avatar/index.d.ts +1 -2
- package/build/esm/components/atoms/divider/index.d.ts +1 -2
- package/build/esm/components/atoms/fileDropdown/index.d.ts +1 -2
- package/build/esm/components/atoms/heading/index.d.ts +1 -2
- package/build/esm/components/atoms/marryBabyText/index.d.ts +1 -2
- package/build/esm/components/atoms/marryBabyText/index.styled.d.ts +4 -2
- package/build/esm/components/atoms/pagination/index.d.ts +1 -2
- package/build/esm/components/mantine/slider/index.styled.d.ts +7 -1
- package/build/esm/components/mantine/text/index.styled.d.ts +1 -9
- package/build/esm/components/molecules/articleCard/_deprecated_index.d.ts +1 -2
- package/build/esm/components/molecules/categoryCard/index.d.ts +1 -2
- package/build/esm/components/molecules/dropdown/index.d.ts +1 -2
- package/build/esm/components/molecules/dropdown/index.styled.d.ts +1 -1
- package/build/esm/components/molecules/floatButtonGroup/index.d.ts +1 -2
- package/build/esm/components/molecules/languageSwitcher/tooltipSelection/index.d.ts +1 -2
- package/build/esm/components/molecules/tabs/index.d.ts +1 -2
- package/build/esm/components/navigationV2/components/molecules/navigationBar/index.styled.d.ts +0 -1
- package/build/esm/components/onboardingV2/dynamicForm/index.styled.d.ts +1 -8
- package/build/esm/components.js +1 -1
- package/build/esm/{constants-54937396.js → constants-4c45be75.js} +1 -1
- package/build/esm/{constants-06083c39.js → constants-c3b0c92c.js} +25 -25
- package/build/esm/constants.js +1 -1
- package/build/esm/{core-7b00c0e3.js → core-5b21c19e.js} +1 -1
- package/build/esm/ecom.js +1 -1
- package/build/esm/footer.js +1 -1
- package/build/esm/gAssets.js +1 -1
- package/build/esm/getDynamicHealthTool-2e9a5548.js +1 -0
- package/build/esm/{getSocialList-b274bbf9.js → getSocialList-3e7a32e3.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/i18n.js +1 -1
- package/build/esm/i18nV2.js +1 -1
- package/build/esm/index-020361fe.js +177 -0
- package/build/esm/{index-c573407d.js → index-15c00b1c.js} +1 -1
- package/build/esm/{index-c224c645.js → index-17537d5b.js} +1 -1
- package/build/esm/index-1782f56e.js +1 -0
- package/build/esm/{index-6803e2f2.js → index-17d273a3.js} +5 -5
- package/build/esm/{index-fa9d0948.js → index-1b2689ee.js} +1 -1
- package/build/esm/{index-61b510c9.js → index-2eac1ec8.js} +1 -1
- package/build/esm/{index-cc5735d3.js → index-4eb2530b.js} +1 -1
- package/build/esm/{index-26732bc8.js → index-6536dd4e.js} +9 -9
- package/build/esm/index-6c2d86ad.js +1 -0
- package/build/esm/{index-d943277b.js → index-72cd7c00.js} +358 -361
- package/build/esm/{index-19d6e493.js → index-9d393a92.js} +1 -1
- package/build/esm/{index-4c59e854.js → index-9d86c3a8.js} +1 -1
- package/build/esm/index-a1e1a441.js +1 -0
- package/build/esm/{index-0d739df3.js → index-a60bd3f2.js} +1 -1
- package/build/esm/index-a903d8ce.js +1 -0
- package/build/esm/{index-0d048082.js → index-c22300e9.js} +1 -1
- package/build/esm/index-c9c584ed.js +1 -0
- package/build/esm/{index-2eb76153.js → index-e7f889b2.js} +1 -1
- package/build/esm/{index-d54f80f3.js → index-f0206e98.js} +1 -1
- package/build/esm/{index-db160921.js → index-f64ac5b4.js} +1 -1
- package/build/esm/{index-6b632496.js → index-f75306ca.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-c22aa342.js → index.styled-551f3c76.js} +5 -5
- package/build/esm/{index.styled-6d8c2436.js → index.styled-57535894.js} +178 -197
- package/build/esm/{index.styled-46a73cde.js → index.styled-5c99d64b.js} +233 -235
- package/build/esm/index.styled-780df456.js +50 -0
- package/build/esm/{index.styles-e55de146.js → index.styles-874b1834.js} +146 -160
- package/build/esm/lead.js +1 -1
- package/build/esm/mantine.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/onboardingV2.js +9 -9
- package/build/esm/pwg.js +1 -1
- package/build/esm/{routing-4b2567b9.js → routing-a8a2d2fd.js} +1 -1
- package/build/esm/screenSizeContext-dff03e2b.js +81 -0
- package/build/esm/subot.js +129 -132
- package/build/esm/together/components/atoms/notificationBar/index.d.ts +1 -1
- package/build/esm/together/components/molecules/submitReportForm/index.d.ts +1 -2
- package/build/esm/together/components/organisms/sourceList/sourceItem/index.styled.d.ts +0 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{types-5cc7e426.js → types-07a8f7f9.js} +1 -1
- package/build/esm/{types-416f316b.js → types-9b65a599.js} +15 -15
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-f09c0218.js → useCategory-8582dedd.js} +1 -1
- package/build/esm/useHealthToolCache-5b104f1e.js +1 -0
- package/build/esm/{usePlacesAutocomplete-10260e15.js → usePlacesAutocomplete-3f0cff61.js} +1 -1
- package/build/esm/{useRafState-2c97b94f.js → useRafState-27d2b972.js} +1 -1
- package/build/esm/{useTranslations-d8df7d65.js → useTranslations-14b7fcc5.js} +1 -1
- package/build/esm/{utils-835d4db7.js → utils-0b2c5aec.js} +1 -1
- package/build/esm/{utils-81962957.js → utils-cca2af3a.js} +1 -1
- package/build/esm/vaccination.js +1 -1
- package/build/footer.js +1 -1
- package/build/gAssets.js +1 -1
- package/build/{getDynamicHealthTool-82fe270c.js → getDynamicHealthTool-fad842aa.js} +1 -1
- package/build/{getSocialList-6be3fefa.js → getSocialList-72284d55.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/{index-ef957176.js → index-18823495.js} +1 -1
- package/build/index-18bee338.js +1 -0
- package/build/{index-1c2f6c28.js → index-24290a1e.js} +1 -1
- package/build/{index-884a509d.js → index-28f61b63.js} +1 -1
- package/build/{index-c7d0c270.js → index-3e31d08a.js} +1 -1
- package/build/index-3ec29f74.js +1 -0
- package/build/{index-cdf4c565.js → index-411b2c54.js} +7 -7
- package/build/{index-69ba0774.js → index-461460ac.js} +1 -1
- package/build/{index-54d36029.js → index-4af92d15.js} +1 -1
- package/build/{index-943aa021.js → index-536d19f8.js} +5 -5
- package/build/{index-5682d171.js → index-66d800b3.js} +9 -9
- package/build/{index-97fda56b.js → index-67f50ae5.js} +1 -1
- package/build/{index-65d642e7.js → index-7e3aeed4.js} +1 -1
- package/build/{index-1d0c568a.js → index-81ec6599.js} +1 -1
- package/build/{index-64635fb4.js → index-88ff79b6.js} +1 -1
- package/build/{index-b6c92d6d.js → index-95d71ef9.js} +1 -1
- package/build/{index-00e19679.js → index-a14ac95c.js} +1 -1
- package/build/{index-9e1da0ee.js → index-a527fd86.js} +1 -1
- package/build/{index-b4764862.js → index-c9dc742a.js} +359 -362
- package/build/{index-f163ff61.js → index-cc31ada4.js} +1 -1
- package/build/{index-11947038.js → index-edb98431.js} +1 -1
- package/build/{index-e3970aeb.js → index-f62932f3.js} +1 -1
- package/build/index.js +1 -1
- package/build/{index.styled-c87b2587.js → index.styled-228e96a3.js} +5 -5
- package/build/{index.styled-ea2e2d8f.js → index.styled-2ce77f4d.js} +232 -234
- package/build/{index.styled-563af73e.js → index.styled-6d41d939.js} +118 -137
- package/build/{index.styled-aa832b7c.js → index.styled-86cd31ca.js} +6 -6
- package/build/{index.styles-8bca236c.js → index.styles-b3f7ae61.js} +146 -160
- package/build/lead.js +1 -1
- package/build/mantine.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/onboardingV2.js +5 -5
- package/build/pwg.js +1 -1
- package/build/{routing-d0bfcc30.js → routing-0dd231c5.js} +1 -1
- package/build/screenSizeContext-0e841cc0.js +81 -0
- package/build/subot.js +91 -94
- package/build/together/components/atoms/notificationBar/index.d.ts +1 -1
- package/build/together/components/molecules/submitReportForm/index.d.ts +1 -2
- package/build/together/components/organisms/sourceList/sourceItem/index.styled.d.ts +0 -1
- package/build/together.js +1 -1
- package/build/{types-3785bf95.js → types-439160fd.js} +15 -15
- package/build/{types-49cbbac9.js → types-b4747009.js} +1 -1
- package/build/types.js +1 -1
- package/build/{useCategory-8e19b607.js → useCategory-718ae913.js} +1 -1
- package/build/{useHealthToolCache-00ad982d.js → useHealthToolCache-40a88025.js} +1 -1
- package/build/{usePlacesAutocomplete-dbe03117.js → usePlacesAutocomplete-54de454b.js} +1 -1
- package/build/{useRafState-dfe297b8.js → useRafState-c9f6527a.js} +1 -1
- package/build/{useTranslations-d5cf41a3.js → useTranslations-a1b68e91.js} +1 -1
- package/build/{utils-d08dfeed.js → utils-50bb77a6.js} +1 -1
- package/build/{utils-76f22f3b.js → utils-7528478f.js} +1 -1
- package/build/vaccination.js +1 -1
- package/package.json +1 -1
- package/build/esm/getDynamicHealthTool-18567743.js +0 -1
- package/build/esm/index-0b6cd675.js +0 -1
- package/build/esm/index-2ad11d68.js +0 -177
- package/build/esm/index-911ff28a.js +0 -1
- package/build/esm/index-d48e481e.js +0 -1
- package/build/esm/index-d772e106.js +0 -1
- package/build/esm/index-feacc1bb.js +0 -1
- package/build/esm/index.styled-fac84ed8.js +0 -50
- package/build/esm/screenSizeContext-5ebd7a94.js +0 -81
- package/build/esm/useHealthToolCache-df731a08.js +0 -1
- package/build/index-3ee3b3cf.js +0 -1
- package/build/index-aa9718f1.js +0 -1
- package/build/screenSizeContext-73ba8961.js +0 -81
- /package/build/{BMI_BOYS.percentile.monthly-0ec27878.js → BMI_BOYS.percentile.monthly-bd7c4653.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-4d569734.js → BMI_BOYS.percentile.weekly-aa0676d7.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-31b412eb.js → BMI_BOYS.percentile.yearly-710bf0bc.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-2488d71f.js → BMI_BOYS.zscore.monthly-265d16b8.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-b10f3ef1.js → BMI_BOYS.zscore.weekly-20e34020.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-68623c3d.js → BMI_BOYS.zscore.yearly-67395b04.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-c1506d58.js → BMI_GIRLS.percentile.monthly-e5a6f286.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-7e7cda8a.js → BMI_GIRLS.percentile.weekly-0d918cc9.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-1a60da42.js → BMI_GIRLS.percentile.yearly-9ab58003.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-17d96d3b.js → BMI_GIRLS.zscore.monthly-980c6ad8.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-5944ad7d.js → BMI_GIRLS.zscore.weekly-2886baca.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-81b205b3.js → BMI_GIRLS.zscore.yearly-e3123e93.js} +0 -0
- /package/build/{ChevronDown-ed323fc5.js → ChevronDown-7d583eac.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-df341f5e.js → HEAD CIRCUM_BOYS.percentile.monthly-5489c654.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-376fdb05.js → HEAD CIRCUM_BOYS.percentile.weekly-72af67ec.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-6efc3424.js → HEAD CIRCUM_BOYS.percentile.yearly-4689f174.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-fdaf2dbf.js → HEAD CIRCUM_BOYS.zscore.monthly-218db6e2.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-9c7d7dfa.js → HEAD CIRCUM_BOYS.zscore.weekly-d4b77ee2.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-8b50d99c.js → HEAD CIRCUM_BOYS.zscore.yearly-ba3d997e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-94c95ddc.js → HEAD CIRCUM_GIRLS.percentile.monthly-120ece3e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-4c6f2727.js → HEAD CIRCUM_GIRLS.percentile.weekly-591bb09a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-16e0c0d3.js → HEAD CIRCUM_GIRLS.percentile.yearly-2a19d75a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-5bd001e8.js → HEAD CIRCUM_GIRLS.zscore.monthly-47aa0b49.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-50524d03.js → HEAD CIRCUM_GIRLS.zscore.weekly-7faf2731.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-7ced5098.js → HEAD CIRCUM_GIRLS.zscore.yearly-0a9527cb.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-bd8aeb12.js → HEIGHT_BOYS.percentile.monthly-975cab78.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-6c368cae.js → HEIGHT_BOYS.percentile.weekly-45fbff53.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-4d255579.js → HEIGHT_BOYS.percentile.yearly-2a158d1f.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-07823cdb.js → HEIGHT_BOYS.zscore.monthly-8dc3c9d2.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-1f2d261c.js → HEIGHT_BOYS.zscore.weekly-6156e4e0.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-562f6aac.js → HEIGHT_BOYS.zscore.yearly-f76c1f5e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-394875dd.js → HEIGHT_GIRLS.percentile.monthly-b45e867e.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-dc5223b5.js → HEIGHT_GIRLS.percentile.weekly-46b92e1b.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-ec1dd8b0.js → HEIGHT_GIRLS.percentile.yearly-9abaef8d.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-a61227f4.js → HEIGHT_GIRLS.zscore.monthly-eb201a4a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-810fbaba.js → HEIGHT_GIRLS.zscore.weekly-1c1b80f3.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-50ce0a8f.js → HEIGHT_GIRLS.zscore.yearly-19fe9d55.js} +0 -0
- /package/build/{Subot-ab83b6e8.js → Subot-6a20c386.js} +0 -0
- /package/build/{Visible-8fe90e27.js → Visible-96ce1462.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-35e4e540.js → WEIGHT_BOYS.percentile.monthly-48925e68.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-93c1552f.js → WEIGHT_BOYS.percentile.weekly-9675b472.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-09b2c973.js → WEIGHT_BOYS.percentile.yearly-5ae74491.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-bf7ac6f2.js → WEIGHT_BOYS.zscore.monthly-fda03047.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-377fac0f.js → WEIGHT_BOYS.zscore.weekly-2ab9f08c.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-caf8de99.js → WEIGHT_BOYS.zscore.yearly-b68de4e1.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-59251654.js → WEIGHT_GIRLS.percentile.monthly-1c82f3e1.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-bca687c9.js → WEIGHT_GIRLS.percentile.weekly-0628410e.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-c268cb57.js → WEIGHT_GIRLS.percentile.yearly-bac2752a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-e8e7e4ec.js → WEIGHT_GIRLS.zscore.monthly-444c0637.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-802d8a32.js → WEIGHT_GIRLS.zscore.weekly-e943b0eb.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-86dfa395.js → WEIGHT_GIRLS.zscore.yearly-cd96850c.js} +0 -0
- /package/build/{cookieHelper-92ea0a20.js → cookieHelper-90494d05.js} +0 -0
- /package/build/{dataTransform-fa42cb61.js → dataTransform-6263c35e.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-d0325ab2.js → BMI_BOYS.percentile.monthly-2f0ebcbf.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-2d099f4d.js → BMI_BOYS.percentile.weekly-923b3d30.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-22655d07.js → BMI_BOYS.percentile.yearly-7d39033d.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-dfc23aee.js → BMI_BOYS.zscore.monthly-21915d60.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-a1f8eeb8.js → BMI_BOYS.zscore.weekly-afaad99e.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-1385d138.js → BMI_BOYS.zscore.yearly-2d48176b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-14cfb09c.js → BMI_GIRLS.percentile.monthly-67f03f38.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-ec1043ad.js → BMI_GIRLS.percentile.weekly-a2c33686.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-3ec36c93.js → BMI_GIRLS.percentile.yearly-7a98dd42.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-f188295b.js → BMI_GIRLS.zscore.monthly-599baf2d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-b655ff24.js → BMI_GIRLS.zscore.weekly-c258aef0.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-6ad44499.js → BMI_GIRLS.zscore.yearly-e8ce4dc8.js} +0 -0
- /package/build/esm/{ChevronDown-b57b4a27.js → ChevronDown-198d9cc6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-49ebc707.js → HEAD CIRCUM_BOYS.percentile.monthly-bc41ab37.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-c005f4e3.js → HEAD CIRCUM_BOYS.percentile.weekly-bd73d642.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-b800cb24.js → HEAD CIRCUM_BOYS.percentile.yearly-044a1a1a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-6610b76f.js → HEAD CIRCUM_BOYS.zscore.monthly-61bf74c0.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-b5318fa3.js → HEAD CIRCUM_BOYS.zscore.weekly-28e9f5ed.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-65685624.js → HEAD CIRCUM_BOYS.zscore.yearly-2a0e1789.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-ee6cef4c.js → HEAD CIRCUM_GIRLS.percentile.monthly-13f948b3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-5ff03c01.js → HEAD CIRCUM_GIRLS.percentile.weekly-88cc5320.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-f50b2018.js → HEAD CIRCUM_GIRLS.percentile.yearly-7f0f400b.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-ef066007.js → HEAD CIRCUM_GIRLS.zscore.monthly-d78908a1.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-0054026e.js → HEAD CIRCUM_GIRLS.zscore.weekly-f3207f83.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-b0e355d4.js → HEAD CIRCUM_GIRLS.zscore.yearly-0628d6d8.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-21c2a2a2.js → HEIGHT_BOYS.percentile.monthly-182bed39.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-94823e80.js → HEIGHT_BOYS.percentile.weekly-44f52c09.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-86e415d4.js → HEIGHT_BOYS.percentile.yearly-bb541601.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-dec2158f.js → HEIGHT_BOYS.zscore.monthly-a9a9dd47.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-b7e28d96.js → HEIGHT_BOYS.zscore.weekly-9fc7b902.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-62c1caee.js → HEIGHT_BOYS.zscore.yearly-88da8bc2.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-54ee3b6d.js → HEIGHT_GIRLS.percentile.monthly-fb5f6f0d.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-d78729a6.js → HEIGHT_GIRLS.percentile.weekly-4baca659.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-18b7481d.js → HEIGHT_GIRLS.percentile.yearly-fc7e1fc1.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-1651c5df.js → HEIGHT_GIRLS.zscore.monthly-b439db85.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-0591cfa1.js → HEIGHT_GIRLS.zscore.weekly-8681e64a.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-3347eeaf.js → HEIGHT_GIRLS.zscore.yearly-28b1d0bb.js} +0 -0
- /package/build/esm/{Subot-67816106.js → Subot-e272425a.js} +0 -0
- /package/build/esm/{Visible-254f3d0e.js → Visible-e7a4b560.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-82144cc4.js → WEIGHT_BOYS.percentile.monthly-d6835449.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-caf2756d.js → WEIGHT_BOYS.percentile.weekly-bc54a47c.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-39c389a6.js → WEIGHT_BOYS.percentile.yearly-69b5c0cf.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-1d96fdf6.js → WEIGHT_BOYS.zscore.monthly-fae0c31f.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-6d7dc5c3.js → WEIGHT_BOYS.zscore.weekly-58bfd560.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-5befa2e9.js → WEIGHT_BOYS.zscore.yearly-4e428e24.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-62e45d9b.js → WEIGHT_GIRLS.percentile.monthly-5136f490.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-4b315673.js → WEIGHT_GIRLS.percentile.weekly-bd8ea375.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-ae777fbd.js → WEIGHT_GIRLS.percentile.yearly-40e16990.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-e1a711b3.js → WEIGHT_GIRLS.zscore.monthly-bc34aead.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-282cb95e.js → WEIGHT_GIRLS.zscore.weekly-c5ab12a0.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-9d5c2c49.js → WEIGHT_GIRLS.zscore.yearly-41608a14.js} +0 -0
- /package/build/esm/{cookieHelper-715a63ab.js → cookieHelper-28df9366.js} +0 -0
- /package/build/esm/{dataTransform-a9f8f8e1.js → dataTransform-3cf63532.js} +0 -0
- /package/build/esm/{index-09ba8680.js → index-10c5feed.js} +0 -0
- /package/build/esm/{index-c1076bbe.js → index-9d4a84ac.js} +0 -0
- /package/build/esm/{index-3afa303d.js → index-ac4a532b.js} +0 -0
- /package/build/esm/{isProduction-0005bed8.js → isProduction-b5290208.js} +0 -0
- /package/build/esm/{localizeNumberFormat-eee5e088.js → localizeNumberFormat-a5628e95.js} +0 -0
- /package/build/esm/{normalizeLink-0a824393.js → normalizeLink-03495796.js} +0 -0
- /package/build/esm/{number-89aaa53f.js → number-97247dba.js} +0 -0
- /package/build/esm/{paths-d6be3159.js → paths-fcede6b6.js} +0 -0
- /package/build/esm/{theme-11c43794.js → theme-ccf55e31.js} +0 -0
- /package/build/esm/{translationsContext-66e27067.js → translationsContext-7856306b.js} +0 -0
- /package/build/esm/{tslib.es6-caf7391f.js → tslib.es6-842a2bb8.js} +0 -0
- /package/build/esm/{types-2c168c1f.js → types-3f42ad37.js} +0 -0
- /package/build/esm/{useIsInit-4dcae46f.js → useIsInit-7d05716a.js} +0 -0
- /package/build/esm/{useOutsideClick-70e02ea6.js → useOutsideClick-9d03d01d.js} +0 -0
- /package/build/esm/{useScrollbarSize-e55adedb.js → useScrollbarSize-1c748ec0.js} +0 -0
- /package/build/{index-6b48c527.js → index-22f2dd43.js} +0 -0
- /package/build/{index-b0c9f344.js → index-a6882810.js} +0 -0
- /package/build/{index-14a0aaa0.js → index-b3a56944.js} +0 -0
- /package/build/{isProduction-e32c6264.js → isProduction-975fbda1.js} +0 -0
- /package/build/{localizeNumberFormat-b4689cfc.js → localizeNumberFormat-f603a6d8.js} +0 -0
- /package/build/{normalizeLink-c8b10f92.js → normalizeLink-b260b165.js} +0 -0
- /package/build/{number-79be583e.js → number-3f6eba85.js} +0 -0
- /package/build/{paths-0f77a743.js → paths-9ce571a8.js} +0 -0
- /package/build/{theme-1f10ec25.js → theme-cf605758.js} +0 -0
- /package/build/{translationsContext-12eebeb5.js → translationsContext-b4e24bbe.js} +0 -0
- /package/build/{tslib.es6-a7206fdf.js → tslib.es6-8187fb3c.js} +0 -0
- /package/build/{types-90377b59.js → types-16f153bc.js} +0 -0
- /package/build/{useIsInit-46f8a417.js → useIsInit-df1db68e.js} +0 -0
- /package/build/{useOutsideClick-42bd02d5.js → useOutsideClick-eeca1a83.js} +0 -0
- /package/build/{useScrollbarSize-3144238a.js → useScrollbarSize-7a77a7be.js} +0 -0
|
@@ -4,6 +4,6 @@ export type Props = {
|
|
|
4
4
|
icon?: React.ReactNode;
|
|
5
5
|
bgColor?: string;
|
|
6
6
|
highlightColor?: string;
|
|
7
|
-
}
|
|
7
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
8
8
|
declare const NotificationBar: ({ icon, bgColor, highlightColor, message, ...rest }: Props) => React.JSX.Element;
|
|
9
9
|
export { NotificationBar };
|
package/build/together.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index.styled-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index.styled-6d41d939.js"),r=require("./index-66d800b3.js"),t=require("./types-b4747009.js"),o=require("./index.styles-b3f7ae61.js");require("react"),require("@mantine/core"),require("./tslib.es6-8187fb3c.js"),require("./useTranslations-a1b68e91.js"),require("./translationsContext-b4e24bbe.js"),require("string-format"),require("./index-28f61b63.js"),require("./theme-cf605758.js"),require("dayjs"),require("./screenSizeContext-0e841cc0.js"),require("styled-components"),require("lodash/throttle"),require("./index-edb98431.js"),require("date-fns/locale"),require("./Subot-6a20c386.js"),require("./isProduction-975fbda1.js"),require("./gAssets.js"),require("./index-536d19f8.js"),require("@mantine/hooks"),require("@mantine/carousel"),require("classnames"),require("@mantine/dates"),require("./number-3f6eba85.js"),require("date-fns"),require("./index-4af92d15.js"),require("./index-81ec6599.js"),require("./constants-437bb4bf.js"),require("./routing-0dd231c5.js"),require("dayjs/plugin/relativeTime"),require("./paths-9ce571a8.js"),require("lodash/debounce"),require("./useCategory-718ae913.js"),require("./index-a527fd86.js"),require("innertext"),require("./cookieHelper-90494d05.js"),require("react-contenteditable"),require("react-dom"),require("./utils-7528478f.js"),require("./index.styled-228e96a3.js"),require("./index-b3a56944.js"),require("./index-88ff79b6.js"),require("react-keyed-flatten-children"),require("slugify"),exports.CardAuthor=e.CardAuthor,exports.CardReactions=e.CardReactions,exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.PopoverMenu=e.PopoverMenu,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.PostContent=e.PostContent,exports.ProfileDetail=e.ProfileDetail,exports.ProfileDetailModal=e.ProfileDetailModal,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.SourceList=e.SourceList,Object.defineProperty(exports,"TabNameInProfileDetail",{enumerable:!0,get:function(){return e.TabName}}),exports.TagTopic=e.TagTopic,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.TogetherDataTransforms=r.dataTransform,exports.UserAvatar=r.UserAvatar,exports.CardLink=t.CardLink,exports.CardPost=t.CardPost,exports.CardPostPopoverMore=t.CardPostPopoverMore,exports.CardReply=t.CardReply,exports.CardReplyPopover=t.CardReplyPopover,exports.CreateNewPostContent=t.CreateNewPostContent,exports.CreatePostDescription=t.CreatePostDescription,exports.CreatePostTitle=t.CreatePostTitle,exports.ImagePreviewPopup=t.ImagePreviewPopup,exports.InputCommentBar=t.InputCommentBar,exports.LabelPin=t.LabelPin,exports.PopupDanger=t.PopupDanger,exports.PostImagePreview=t.PostImagePreview,exports.PostSingleImageViewPopup=t.PostSingleImageViewPopup,exports.SkipQuestionOfExpertBtn=t.SkipQuestionOfExpertBtn,exports.SocialLinkPreview=t.SocialLinkPreview,exports.SubmitReportForm=t.SubmitReportForm,exports.TogetherTypes=t.types,exports.TopicSelectList=t.TopicSelectList,exports.VerifiedTag=t.VerifiedTag,exports.DefaultComponentGlobalContextData=o.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return o.GlobalData}}),exports.TogetherComponentGlobalContext=o.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=o.TogetherComponentGlobalContextProvider,exports.TogetherConstants=o.constants;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("./tslib.es6-
|
|
1
|
+
"use strict";var e=require("./tslib.es6-8187fb3c.js"),t=require("react"),a=require("./useTranslations-a1b68e91.js"),i=require("lodash/debounce"),o=require("./constants-437bb4bf.js"),l=require("./index-81ec6599.js"),n=require("styled-components"),s=require("./index-28f61b63.js"),r=require("./theme-cf605758.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-eeca1a83.js"),u=require("./screenSizeContext-0e841cc0.js");require("dayjs");var p=require("./index-edb98431.js");require("./isProduction-975fbda1.js"),require("./Subot-6a20c386.js"),require("./gAssets.js");var h=require("react-loading-skeleton"),g=require("./paths-9ce571a8.js"),f=require("@mantine/core"),m=require("./cookieHelper-90494d05.js"),C=require("./index-a6882810.js"),b=require("./ChevronDown-7d583eac.js"),y=require("string-format");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=v(t),E=v(i),S=v(n),L=v(c),w=v(h),O=v(y);function k(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(p.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(p.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(p.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(p.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const I=S.default.div``,T=S.default.div`
|
|
2
2
|
--searchbar-z-index: 305;
|
|
3
3
|
&[data-is-modal='true'] {
|
|
4
4
|
position: fixed;
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),
|
|
67
67
|
0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
|
|
68
68
|
0px 0px 1px rgba(0, 0, 0, 0.04);
|
|
69
|
-
border-radius: ${
|
|
69
|
+
border-radius: ${r.theme.borderRadius};
|
|
70
70
|
background-color: white;
|
|
71
71
|
z-index: 30;
|
|
72
72
|
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
&:first-child {
|
|
125
125
|
padding-top: 18px;
|
|
126
126
|
}
|
|
127
|
-
`,G=({cities:e,isLoading:t,onLocationClick:i,selectedLocation:l})=>{const{t:n,locale:c}=a.useTranslations();return x.default.createElement(B,{"data-testid":"location-search-results"},x.default.createElement(V,null,t?x.default.createElement(z,{count:5}):!e||e.length<1?x.default.createElement(x.default.Fragment,null,x.default.createElement(H,{"data-is-denied":"true"},x.default.createElement(s.Text,{size:"sm",color:"#ccc"},n("booking.searchBar.noResults")))):x.default.createElement(x.default.Fragment,null,x.default.createElement(H,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;i&&i({name:n("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[c])||void 0===e?void 0:e.ALL})}},x.default.createElement(K,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},n("booking.searchBar.allLocations"))),e.map((e=>x.default.createElement(H,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==l?void 0:l.id)===e.id},x.default.createElement(K,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},e.name)))))))},Z="TYPE_CHARACTER",U="REMOVE_CHARACTER",Q="REMOVE_ALL",
|
|
127
|
+
`,G=({cities:e,isLoading:t,onLocationClick:i,selectedLocation:l})=>{const{t:n,locale:c}=a.useTranslations();return x.default.createElement(B,{"data-testid":"location-search-results"},x.default.createElement(V,null,t?x.default.createElement(z,{count:5}):!e||e.length<1?x.default.createElement(x.default.Fragment,null,x.default.createElement(H,{"data-is-denied":"true"},x.default.createElement(s.Text,{size:"sm",color:"#ccc"},n("booking.searchBar.noResults")))):x.default.createElement(x.default.Fragment,null,x.default.createElement(H,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;i&&i({name:n("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[c])||void 0===e?void 0:e.ALL})}},x.default.createElement(K,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},n("booking.searchBar.allLocations"))),e.map((e=>x.default.createElement(H,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),i&&i(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==l?void 0:l.id)===e.id},x.default.createElement(K,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},e.name)))))))},Z="TYPE_CHARACTER",U="REMOVE_CHARACTER",Q="REMOVE_ALL",q="REMOVE_LAST_VISIBLE_NODE",Y="PAUSE_FOR",W="CHANGE_DELETE_SPEED",J="CHANGE_DELAY",X="PASTE_STRING",ee=(e,t)=>Math.floor(Math.random()*(t-e+1))+e,te="TEXT_NODE";class ae{constructor(e){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=()=>(this.state.eventLoopPaused=!1,this.runEventLoop(),this),this.pause=()=>(this.state.eventLoopPaused=!0,this),this.stop=()=>(this.state.eventLoop&&(window.cancelAnimationFrame(this.state.eventLoop),this.state.eventLoop=null),this),this.pauseFor=e=>(this.addEventToQueue(Y,{ms:e}),this),this.typeOutAllStrings=()=>"string"==typeof this.options.strings?(this.typeString(this.options.strings).pauseFor(this.options.pauseFor),this):(this.options.strings.forEach((e=>{this.typeString(e).pauseFor(this.options.pauseFor).deleteAll(this.options.deleteSpeed)})),this),this.typeString=(e,t=null)=>{if(e){const{stringSplitter:a}=this.options||{},i="function"==typeof a?a(e):e.split("");this.typeCharacters(i,t)}return this},this.pasteString=(e,t=null)=>(e&&this.addEventToQueue(X,{character:e,node:t}),this),this.deleteAll=(e="natural")=>(this.addEventToQueue(Q,{speed:e}),this),this.changeDeleteSpeed=e=>{if(!e)throw new Error("Must provide new delete speed");return this.addEventToQueue(W,{speed:e}),this},this.changeDelay=e=>{if(!e)throw new Error("Must provide new delay");return this.addEventToQueue(J,{delay:e}),this},this.deleteChars=e=>{if(!e)throw new Error("Must provide amount of characters to delete");for(let t=0;t<e;t++)this.addEventToQueue(U);return this},this.typeCharacters=(e,t=null)=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((e=>{this.addEventToQueue(Z,{character:e,node:t})})),this},this.removeCharacters=e=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((()=>{this.addEventToQueue(U)})),this},this.addEventToQueue=(e,t,a=!1)=>this.addEventToStateProperty(e,t,a,"eventQueue"),this.addReverseCalledEvent=(e,t,a=!1)=>{const{loop:i}=this.options;return i?this.addEventToStateProperty(e,t,a,"reverseCalledEvents"):this},this.addEventToStateProperty=(e,t,a=!1,i)=>{const o={eventName:e,eventArgs:t||{}};return this.state[i]=a?[o,...this.state[i]]:[...this.state[i],o],this},this.runEventLoop=()=>{this.state.lastFrameTime||(this.state.lastFrameTime=Date.now());const e=Date.now(),t=e-this.state.lastFrameTime;if(!this.state.eventQueue.length){if(!this.options.loop)return;this.state.eventQueue=[...this.state.calledEvents],this.state.calledEvents=[],this.options=Object.assign({},this.state.initialOptions)}if(this.state.eventLoop=window.requestAnimationFrame(this.runEventLoop),this.state.eventLoopPaused)return;if(this.state.pauseUntil){if(e<this.state.pauseUntil)return;this.state.pauseUntil=null}const a=[...this.state.eventQueue],i=a.shift();let o=0;if(o=i.eventName===q||i.eventName===U?"natural"===this.options.deleteSpeed?ee(40,80):this.options.deleteSpeed:"natural"===this.options.delay?ee(120,160):this.options.delay,t<=o)return;const{eventName:l,eventArgs:n}=i;switch(l){case X:case Z:{const{character:e}=n,t=document.createTextNode(e);let a=t;this.options.onCreateTextNode&&"function"==typeof this.options.onCreateTextNode&&(a=this.options.onCreateTextNode(e,t)),this.state.visibleNodes=[...this.state.visibleNodes,{type:te,character:e,node:a}];break}case U:a.unshift({eventName:q,eventArgs:{removingCharacterNode:!0}});break;case Y:{const{ms:e}=i.eventArgs;this.state.pauseUntil=Date.now()+parseInt(e);break}case Q:{const{visibleNodes:e}=this.state,{speed:t}=n,i=[];t&&i.push({eventName:W,eventArgs:{speed:t,temp:!0}});for(let t=0,a=e.length;t<a;t++)i.push({eventName:q,eventArgs:{removingCharacterNode:!1}});t&&i.push({eventName:W,eventArgs:{speed:this.options.deleteSpeed,temp:!0}}),a.unshift(...i);break}case q:if(this.state.visibleNodes.length){const{node:e,character:t}=this.state.visibleNodes.pop();this.options.onRemoveNode&&"function"==typeof this.options.onRemoveNode&&this.options.onRemoveNode({node:e,character:t}),e&&e.parentNode.removeChild(e)}break;case W:this.options.deleteSpeed=i.eventArgs.speed;break;case J:this.options.delay=i.eventArgs.delay}this.options.loop&&(i.eventName===q||i.eventArgs&&i.eventArgs.temp||(this.state.calledEvents=[...this.state.calledEvents,i])),this.state.eventQueue=a,this.state.lastFrameTime=e},e&&(this.options=Object.assign(Object.assign({},this.options),e)),this.state.initialOptions=Object.assign({},this.options),this.init()}init(){this.addEventToQueue(Q,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}}function ie({inputRef:e,wrapperRef:i,disabled:o}){const{t:l,locale:n}=a.useTranslations(),s=t.useMemo((()=>{if(o)return[];const e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==n&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),L.default(e).map((e=>l(e)))}),[l,n]);function r(e){const t=d();return t&&(t.placeholder=t.placeholder+e),null}function c(){const e=d();e&&(e.placeholder=e.placeholder.slice(0,-1))}function d(){return e&&e.current?e.current:i&&i.current&&i.current.querySelector("input")||null}t.useEffect((()=>{if(o)return;const e=d();e&&(e.placeholder="",new ae({strings:s,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:r,onRemoveNode:c}))}),[e,i])}const oe=S.default.div`
|
|
128
128
|
user-select: none;
|
|
129
129
|
input {
|
|
130
130
|
pointer-events: none;
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
`,Ee=()=>x.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},x.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"})),Se=S.default.button`
|
|
191
191
|
min-height: 100%;
|
|
192
192
|
border-radius: 6px;
|
|
193
|
-
background-color: ${
|
|
193
|
+
background-color: ${r.theme.colors.primaryBase};
|
|
194
194
|
display: flex;
|
|
195
195
|
justify-content: center;
|
|
196
196
|
align-items: center;
|
|
@@ -208,18 +208,18 @@
|
|
|
208
208
|
}
|
|
209
209
|
|
|
210
210
|
&:hover {
|
|
211
|
-
background-color: ${
|
|
211
|
+
background-color: ${r.theme.colors.primaryHover};
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
&:active {
|
|
215
|
-
background-color: ${
|
|
215
|
+
background-color: ${r.theme.colors.primaryActive};
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
&:focus-visible {
|
|
219
219
|
outline: 1px solid black;
|
|
220
220
|
}
|
|
221
221
|
`,Le=S.default(s.Text)`
|
|
222
|
-
font-weight: ${
|
|
222
|
+
font-weight: ${r.theme.sizes.fwSemiBold};
|
|
223
223
|
`,we=({onClick:e})=>{const{t:t}=a.useTranslations(),i=t("booking.searchBar.searchButton");return x.default.createElement(Se,{onClick:e,title:i},x.default.createElement(Ee,null),x.default.createElement(Le,{size:"s3",color:"white"},i))};function Oe({isMobile:e,state:i,dispatch:l,debouncedFetchCitiesByKeyword:n,debouncedFetchSearchResults:s,focusLocationInput:c,focusSearchInput:u,renderLocationResults:p,renderSearchResults:h,locationTrackingAttributes:g,trackingAttributes:f,onSearch:m,initalSearchValue:C}){const b=t.useRef(null),y=t.useRef(null),{focused:v,searchLocationKeywords:E,geoLocationPermission:S,selectedLocation:L,searchKeywords:w,inputSearchPlaceholder:O}=i,{t:k}=a.useTranslations();ie({wrapperRef:y,disabled:!!O}),d.useOutsideClick(b,(()=>{e||l({type:ge.ClickOutsideInputLocation})})),d.useOutsideClick(y,(()=>{e||l({type:ge.ClickOutsideInputSearch})}));const I=t.useMemo((()=>"granted"===S&&(null==L?void 0:L.id)===o.ID_OPTION_CURRENT_LOCATION?r.theme.colors.primaryBase:r.theme.colors.gray400),[S,L]),T=t.useCallback((function(e){l({type:ge.ChangeInputSearch,payload:e}),"function"!=typeof m&&(e.trim().length>pe[i.locale]||C?s(e.trim(),i):(s.cancel(),l({type:ge.DisplayInitialSearchResults})))}),[l,i]),j=t.useCallback((function(e){l({type:ge.ChangeInputLocation,payload:e}),e.trim().length>pe[i.locale]?n(e.trim()):(n.cancel(),l({type:ge.DisplayInitialCities}))}),[n,l]);return x.default.createElement(Ce,null,x.default.createElement(ye,{ref:b},x.default.createElement(R,{inputClassName:"location"===v?"focused":void 0,placeholder:k("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:x.default.createElement(P,{className:"location-pin-icon",color:I}),actionIcon:x.default.createElement(xe,{color:r.theme.colors.gray300,className:""!==E?"shown":""}),onActionClick:function(){l({type:ge.ClearInputLocation}),n.cancel(),c()},value:E,onChange:j,onFocus:()=>l({type:ge.FocusInputLocation}),size:"md",trackingAttributes:g}),!e&&p()),x.default.createElement(ve,{ref:y},x.default.createElement(R,{placeholder:O||k("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:x.default.createElement(xe,{color:r.theme.colors.gray300,className:""!==w?"shown":""}),onActionClick:function(){l({type:ge.ClearInputSearch}),s.cancel(),s("",i),u()},value:w,onChange:T,onFocus:()=>l({type:ge.FocusInputSearch}),inputClassName:"search"===v?"focused":void 0,size:"md",trackingAttributes:f,onKeyPress:e=>{i.autoCompleteDisabled&&"Enter"===e.key&&m&&m({cityId:i.selectedLocation.id,keyword:w})},enterKeyHint:i.autoCompleteDisabled?"search":void 0}),!e&&h()),i.autoCompleteDisabled&&!i.isMobile&&x.default.createElement(we,{onClick:()=>{m({cityId:i.selectedLocation.id,keyword:w})}}))}const ke=()=>x.default.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},x.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"})),Ie=()=>x.default.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},x.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"})),Te=()=>x.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},x.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"})),je=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},x.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"})),Me=S.default.header`
|
|
224
224
|
display: flex;
|
|
225
225
|
justify-content: space-between;
|
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
|
|
337
337
|
0px 0px 1px rgba(0, 0, 0, 0.04);
|
|
338
338
|
}
|
|
339
|
-
`,Qe=({data:e,state:t,dispatch:a,isMobile:i,isLoading:o,keyword:l,hideResults:n,isNavResultItem:s})=>x.default.createElement(Ue,null,e&&e.map((e=>n&&n.includes(e.type)?x.default.createElement(x.default.Fragment,null):x.default.createElement(Ze,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:o,keyword:l,isNavResultItem:s})))),
|
|
339
|
+
`,Qe=({data:e,state:t,dispatch:a,isMobile:i,isLoading:o,keyword:l,hideResults:n,isNavResultItem:s})=>x.default.createElement(Ue,null,e&&e.map((e=>n&&n.includes(e.type)?x.default.createElement(x.default.Fragment,null):x.default.createElement(Ze,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:i,isLoading:o,keyword:l,isNavResultItem:s})))),qe=(e,t,a)=>O.default(e,Object.assign(Object.assign({},t),{domain:p.domainLocales[a||"en-PH"]}));const Ye=S.default.div``,We=S.default.div`
|
|
340
340
|
background-color: ${r.theme.colors.neutral50};
|
|
341
341
|
padding-bottom: 1px;
|
|
342
342
|
${u.MediaQueries.mbDown} {
|
|
@@ -485,7 +485,7 @@
|
|
|
485
485
|
line-height: 22px;
|
|
486
486
|
cursor: pointer;
|
|
487
487
|
}
|
|
488
|
-
`;const ut=({state:e,type:i,results:l,location:n,isLoading:c,typeInformation:d,clientSlug:u="",dispatch:p})=>{const{locale:h,t:
|
|
488
|
+
`;const ut=({state:e,type:i,results:l,location:n,isLoading:c,typeInformation:d,clientSlug:u="",dispatch:p})=>{const{locale:h,t:g}=a.useTranslations(),{selectedLocation:m}=e,C=t.useMemo((()=>d[i].slug),[d,i]);return x.default.createElement(st,null,x.default.createElement(rt,null,x.default.createElement("div",{className:"title"},g("booking.searchResult.description",{search_type:d[i].name,search_location:n})),l.length>0&&x.default.createElement("div",{className:"btn-see-all",onClick:()=>{let t=`/${m.slug}/${C}`;const a=o.MAPPING_CLIENT_WITH_SLUG[h][u];a&&(t+=`/${a}`),("doctor"===i||"hospital"===i)&&e.selectedSpecialty.id>0&&(t+=`?specialtyId=${e.selectedSpecialty.id}`),t&&p({type:at.NavigateTo,payload:t})}},g("home.seeAll"))),x.default.createElement(ct,null,c&&Array(3).fill(void 0).map(((e,t)=>x.default.createElement(dt,{key:i+"loading"+t,className:2===t?"last-item":""},x.default.createElement("div",{className:"image-item"},x.default.createElement(f.Skeleton,{height:48,circle:!0,mb:"xl",animate:!0})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},x.default.createElement(f.Skeleton,{height:8,mt:10,radius:"xl",animate:!0})),x.default.createElement("div",{className:"description"},x.default.createElement("div",{className:"sub-description"},x.default.createElement(f.Skeleton,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!c&&l&&l.length>0&&x.default.createElement(x.default.Fragment,null,l.map(((e,t)=>{var a,o;const n=l.length>4&&3===t||l.length<=4&&t===l.length-1;let s="";return"hospital"===i&&(s=(null==e?void 0:e.address)||""),"doctor"===i&&(s=(null===(a=null==e?void 0:e.specialties)||void 0===a?void 0:a.join(", "))||""),"service"===i&&(s=(null===(o=null==e?void 0:e.hospital_branch)||void 0===o?void 0:o.name)||""),t>=4?x.default.createElement(x.default.Fragment,null):x.default.createElement(dt,{key:e.id,className:n?"last-item":"",onClick:()=>(e=>{let t="";switch(i){case"service":t=`/${m.slug}/${C}/${e.slug}`;break;case"doctor":case"hospital":t=`/${C}/${e.slug}-${e.id}`}t&&p({type:at.NavigateTo,payload:t})})(e)},x.default.createElement("div",{className:"image-item"},x.default.createElement("img",{src:e.logo||e.avatar,alt:e.name})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},e.name),x.default.createElement("div",{className:"description"},d[i].icon,x.default.createElement("div",{className:"sub-description"},s))))}))),!c&&0===(null==l?void 0:l.length)&&x.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},g("booking.searchBar.noResults"))))},pt=S.default.div`
|
|
489
489
|
position: relative;
|
|
490
490
|
|
|
491
491
|
${u.MediaQueries.mbDown} {
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
&[data-is-denied='true'] {
|
|
564
564
|
cursor: not-allowed;
|
|
565
565
|
}
|
|
566
|
-
`,ft=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),mt=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Ct=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),bt=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},x.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"})),yt=({state:e,isMobile:i,debouncedFetchSearchResults:l,selectedLocation:n,onSpecialtyClick:r,dispatch:c})=>{var u;const{t:p,locale:h}=a.useTranslations(),f=t.useRef(null),m=t.useMemo((()=>o.LOCALIZED_SLUGS[h]),[h]),C=t.useMemo((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:i?"border: 1px solid #d9d9d9":"none",height:i?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:i?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[i]),y=t.useCallback((function(e){console.log(e)}),[l,c]);return d.useOutsideClick(f,(()=>{c({type:at.ClickOutsideInputSpecialty})})),x.default.createElement(pt,{ref:f},x.default.createElement(g.Input.Wrapper,null,x.default.createElement(g.Input,{size:i?"md":"lg",placeholder:p("booking.searchPopup.specialties"),value:(null===(u=null==e?void 0:e.selectedSpecialty)||void 0===u?void 0:u.name)||"",rightSection:x.default.createElement(b.ChevronDown,null),styles:C,onFocus:()=>c({type:at.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&x.default.createElement(ht,null,x.default.createElement(gt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:p("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:m.SPECIALTIES})}},x.default.createElement("div",{className:"image-item"},x.default.createElement(bt,null)),x.default.createElement(s.Text,{size:"md"},p("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>x.default.createElement(gt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},x.default.createElement("div",{className:"image-item"},x.default.createElement("img",{src:e.thumbnail,alt:e.name})),x.default.createElement(s.Text,{size:"md"},e.name))))))},vt=({state:e,type:i,isMobile:o,isLoading:l,initalSearchValue:n,typeInformation:r,debouncedFetchSearchResults:c,trackingAttributes:u,hideSpecialtySelection:p=!1,clientSlug:h="",focusSearchInput:f,onSearch:m,dispatch:C})=>{var b;const{t:y}=a.useTranslations(),v=t.useRef(null),E=t.useMemo((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),S=t.useMemo((()=>"doctor"===i?y("booking.searchBar.placeholder.doctor"):"service"===i?y("booking.searchBar.placeholder.service"):"hospital"===i?y("booking.searchBar.placeholder.hospital"):"specialty"===i?y("booking.searchBar.placeholder.specialty"):""),[i]),L=t.useMemo((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),w=t.useMemo((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),O=t.useMemo((()=>({input:{color:"#262626"}})),[]);d.useOutsideClick(v,(()=>{C({type:at.ClickOutsideInputSearch})}));const k=t.useCallback((function(t){C({type:at.ChangeInputSearch,payload:t}),"function"!=typeof m&&(t.trim().length>et[e.locale]||n||0===t.trim().length?c(t.trim(),e,i,h):(c.cancel(),C({type:at.DisplayInitialSearchResults})))}),[C,e,i]),I=t.useCallback((function(e){C({type:at.SelectSpecialty,payload:e}),f()}),[C]);return x.default.createElement(lt,{ref:v},"specialty"===i?x.default.createElement(g.Input.Wrapper,{styles:L},x.default.createElement(g.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",placeholder:S,styles:O,value:e.searchKeywords,onFocus:()=>C({type:at.FocusInputSearchSpecialty}),onChange:e=>{k(e.target.value)}})):x.default.createElement(x.default.Fragment,null,"service"===i?x.default.createElement(g.Input.Wrapper,{styles:L},x.default.createElement(g.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",name:"search-results",placeholder:S,onFocus:()=>C({type:at.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{k(e.target.value)}})):x.default.createElement(x.default.Fragment,null,o&&!p?x.default.createElement(x.default.Fragment,null,x.default.createElement(yt,{state:e,isMobile:o,dispatch:C,debouncedFetchSearchResults:c,onSpecialtyClick:I}),x.default.createElement(g.Input.Wrapper,{styles:L},x.default.createElement(g.Input,{icon:x.default.createElement(s.Icon.Search,null),size:"md",placeholder:S,value:e.searchKeywords,name:"search-results",onFocus:()=>C({type:at.FocusInputSearch}),onChange:e=>{k(e.target.value)}}))):x.default.createElement(g.Input.Wrapper,{styles:L,className:p?"hide-specialty-selection":""},x.default.createElement(g.Input,Object.assign({icon:x.default.createElement(s.Icon.Search,null),size:"lg",placeholder:S,styles:w,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{k(e.target.value)},onFocus:()=>C({type:at.FocusInputSearch})},E,{rightSection:p?x.default.createElement(x.default.Fragment,null):x.default.createElement(yt,{state:e,isMobile:o,dispatch:C,debouncedFetchSearchResults:c,onSpecialtyClick:I})})))),"search"===e.focused&&x.default.createElement(nt,null,x.default.createElement(ut,{type:i,state:e,results:(null===(b=e.searchResults)||void 0===b?void 0:b[i])||[],location:e.selectedLocation.name,dispatch:C,isLoading:l,typeInformation:r,clientSlug:h}))))},xt=S.default.div`
|
|
566
|
+
`,ft=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),mt=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Ct=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},x.default.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),bt=()=>x.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},x.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"})),yt=({state:e,isMobile:i,debouncedFetchSearchResults:l,selectedLocation:n,onSpecialtyClick:r,dispatch:c})=>{var u;const{t:p,locale:h}=a.useTranslations(),g=t.useRef(null),m=t.useMemo((()=>o.LOCALIZED_SLUGS[h]),[h]),C=t.useMemo((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:i?"border: 1px solid #d9d9d9":"none",height:i?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:i?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[i]),y=t.useCallback((function(e){console.log(e)}),[l,c]);return d.useOutsideClick(g,(()=>{c({type:at.ClickOutsideInputSpecialty})})),x.default.createElement(pt,{ref:g},x.default.createElement(f.Input.Wrapper,null,x.default.createElement(f.Input,{size:i?"md":"lg",placeholder:p("booking.searchPopup.specialties"),value:(null===(u=null==e?void 0:e.selectedSpecialty)||void 0===u?void 0:u.name)||"",rightSection:x.default.createElement(b.ChevronDown,null),styles:C,onFocus:()=>c({type:at.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&x.default.createElement(ht,null,x.default.createElement(gt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:p("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:m.SPECIALTIES})}},x.default.createElement("div",{className:"image-item"},x.default.createElement(bt,null)),x.default.createElement(s.Text,{size:"md"},p("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>x.default.createElement(gt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},x.default.createElement("div",{className:"image-item"},x.default.createElement("img",{src:e.thumbnail,alt:e.name})),x.default.createElement(s.Text,{size:"md"},e.name))))))},vt=({state:e,type:i,isMobile:o,isLoading:l,initalSearchValue:n,typeInformation:r,debouncedFetchSearchResults:c,trackingAttributes:u,hideSpecialtySelection:p=!1,clientSlug:h="",focusSearchInput:g,onSearch:m,dispatch:C})=>{var b;const{t:y}=a.useTranslations(),v=t.useRef(null),E=t.useMemo((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),S=t.useMemo((()=>"doctor"===i?y("booking.searchBar.placeholder.doctor"):"service"===i?y("booking.searchBar.placeholder.service"):"hospital"===i?y("booking.searchBar.placeholder.hospital"):"specialty"===i?y("booking.searchBar.placeholder.specialty"):""),[i]),L=t.useMemo((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),w=t.useMemo((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),O=t.useMemo((()=>({input:{color:"#262626"}})),[]);d.useOutsideClick(v,(()=>{C({type:at.ClickOutsideInputSearch})}));const k=t.useCallback((function(t){C({type:at.ChangeInputSearch,payload:t}),"function"!=typeof m&&(t.trim().length>et[e.locale]||n||0===t.trim().length?c(t.trim(),e,i,h):(c.cancel(),C({type:at.DisplayInitialSearchResults})))}),[C,e,i]),I=t.useCallback((function(e){C({type:at.SelectSpecialty,payload:e}),g()}),[C]);return x.default.createElement(lt,{ref:v},"specialty"===i?x.default.createElement(f.Input.Wrapper,{styles:L},x.default.createElement(f.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",placeholder:S,styles:O,value:e.searchKeywords,onFocus:()=>C({type:at.FocusInputSearchSpecialty}),onChange:e=>{k(e.target.value)}})):x.default.createElement(x.default.Fragment,null,"service"===i?x.default.createElement(f.Input.Wrapper,{styles:L},x.default.createElement(f.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",name:"search-results",placeholder:S,onFocus:()=>C({type:at.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{k(e.target.value)}})):x.default.createElement(x.default.Fragment,null,o&&!p?x.default.createElement(x.default.Fragment,null,x.default.createElement(yt,{state:e,isMobile:o,dispatch:C,debouncedFetchSearchResults:c,onSpecialtyClick:I}),x.default.createElement(f.Input.Wrapper,{styles:L},x.default.createElement(f.Input,{icon:x.default.createElement(s.Icon.Search,null),size:"md",placeholder:S,value:e.searchKeywords,name:"search-results",onFocus:()=>C({type:at.FocusInputSearch}),onChange:e=>{k(e.target.value)}}))):x.default.createElement(f.Input.Wrapper,{styles:L,className:p?"hide-specialty-selection":""},x.default.createElement(f.Input,Object.assign({icon:x.default.createElement(s.Icon.Search,null),size:"lg",placeholder:S,styles:w,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{k(e.target.value)},onFocus:()=>C({type:at.FocusInputSearch})},E,{rightSection:p?x.default.createElement(x.default.Fragment,null):x.default.createElement(yt,{state:e,isMobile:o,dispatch:C,debouncedFetchSearchResults:c,onSpecialtyClick:I})})))),"search"===e.focused&&x.default.createElement(nt,null,x.default.createElement(ut,{type:i,state:e,results:(null===(b=e.searchResults)||void 0===b?void 0:b[i])||[],location:e.selectedLocation.name,dispatch:C,isLoading:l,typeInformation:r,clientSlug:h}))))},xt=S.default.div`
|
|
567
567
|
position: relative;
|
|
568
568
|
|
|
569
569
|
${u.MediaQueries.mbDown} {
|
|
@@ -627,7 +627,7 @@
|
|
|
627
627
|
width: 12px;
|
|
628
628
|
height: 18px;
|
|
629
629
|
flex: 0 0 12px;
|
|
630
|
-
`,wt=({state:e,isMobile:i,debouncedFetchCitiesByKeyword:l,selectedLocation:n,trackingAttributes:c,onLocationClick:u,dispatch:p})=>{const{t:h,locale:
|
|
630
|
+
`,wt=({state:e,isMobile:i,debouncedFetchCitiesByKeyword:l,selectedLocation:n,trackingAttributes:c,onLocationClick:u,dispatch:p})=>{const{t:h,locale:g}=a.useTranslations(),m=t.useRef(null),C=t.useMemo((()=>c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}),[c]),b=t.useCallback((function(t){p({type:at.ChangeInputLocation,payload:t}),t.trim().length>et[e.locale]?l(t.trim()):(l.cancel(),p({type:at.DisplayInitialCities}))}),[l,p]);return d.useOutsideClick(m,(()=>{p({type:at.ClickOutsideInputLocation})})),x.default.createElement(xt,{ref:m},x.default.createElement(f.Input.Wrapper,null,x.default.createElement(f.Input,Object.assign({size:i?"md":"lg",placeholder:"Search location",value:e.searchLocationKeywords,onFocus:()=>p({type:at.FocusInputLocation}),onChange:e=>{b(e.target.value)}},C))),"location"===e.focused&&x.default.createElement(Et,null,x.default.createElement(St,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;u&&u({name:h("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[g])||void 0===e?void 0:e.ALL})}},x.default.createElement(Lt,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},h("booking.searchBar.allLocations"))),e.cities.map((e=>x.default.createElement(St,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),u&&u(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==n?void 0:n.id)===e.id},x.default.createElement(Lt,{color:r.theme.colors.neutral400}),x.default.createElement(s.Text,{size:"md"},e.name))))))},Ot=S.default.div`
|
|
631
631
|
display: flex;
|
|
632
632
|
flex-wrap: wrap;
|
|
633
633
|
row-gap: 8px;
|
|
@@ -688,7 +688,7 @@
|
|
|
688
688
|
line-height: 18px;
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
|
-
`,It=S.default(
|
|
691
|
+
`,It=S.default(f.Divider)`
|
|
692
692
|
margin: 24px 0 !important;
|
|
693
693
|
`,Tt=S.default.div`
|
|
694
694
|
display: flex;
|
|
@@ -710,7 +710,7 @@
|
|
|
710
710
|
text-align: center;
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
`,jt=({state:e,isMobile:i,specialties:l,isLoading:n,dispatch:c})=>{const{t:d,locale:u}=a.useTranslations(),{selectedLocation:p}=e,h=t.useMemo((()=>o.LOCALIZED_SLUGS[u]),[u]),
|
|
713
|
+
`,jt=({state:e,isMobile:i,specialties:l,isLoading:n,dispatch:c})=>{const{t:d,locale:u}=a.useTranslations(),{selectedLocation:p}=e,h=t.useMemo((()=>o.LOCALIZED_SLUGS[u]),[u]),g=t.useMemo((()=>l.length>=9||e.searchKeywords.trim().length<=et[e.locale]),[e.searchKeywords,l]);return x.default.createElement(x.default.Fragment,null,!i&&x.default.createElement(It,{color:"#E4E8EC"}),x.default.createElement(Ot,null,l.length>0&&!n&&x.default.createElement(x.default.Fragment,null,l.map(((e,t)=>t>=9?x.default.createElement(x.default.Fragment,null):x.default.createElement(kt,{key:e.id,onClick:()=>(e=>{let t="";e===o.SLUG_VACIN_ID?(t=`/${p.slug}/${h.HOSPITAL}/${o.CLIENT_KEY.GSK}/`,c({type:at.ClickOutsideInputSearchSpecialty})):t=`/${p.slug}/${h.DOCTOR}/${e}`,c({type:at.NavigateTo,payload:t})})(e.slug)},x.default.createElement("div",{className:"image-item"},x.default.createElement("img",{src:e.thumbnail,alt:e.name})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},e.name)))))),0===l.length&&!n&&x.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},d("booking.searchBar.noResults")),n&&Array(6).fill(void 0).map(((e,t)=>x.default.createElement(kt,{key:"loading"+t},x.default.createElement("div",{className:"image-item"},x.default.createElement(f.Skeleton,{height:40,animate:!0})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},x.default.createElement(f.Skeleton,{height:20,radius:"sm",animate:!0}))))))),g&&x.default.createElement(Tt,null,x.default.createElement("div",{className:"show-more",onClick:()=>{const e=`/${h.SPECIALTIES}`;c({type:at.NavigateTo,payload:e})}},d("home.seeAll"))))},Mt=S.default.div`
|
|
714
714
|
display: flex;
|
|
715
715
|
gap: 5px;
|
|
716
716
|
margin-top: 16px;
|
|
@@ -763,7 +763,7 @@
|
|
|
763
763
|
border-bottom: 1px solid ${r.theme.colors.neutral100};
|
|
764
764
|
`,_t=S.default(C.Container)`
|
|
765
765
|
padding: 0 16px;
|
|
766
|
-
`,$t=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const n=t.useMemo((()=>({root:{overflowY:o?"hidden":"initial",overflowX:o?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:o?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:o?"14px":"16px",fontWeight:600,lineHeight:o?"22px":"24px"}})),[o]),s=(()=>{const{t:e}=a.useTranslations();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),r=t.useMemo((()=>s.filter((e=>!i.includes(e.value)))||[]),[i,s]);return x.default.createElement(Pt,{className:"booking-search-tab"},x.default.createElement(_t,null,x.default.createElement(
|
|
766
|
+
`,$t=({currentTab:e,hideTabBookingSearch:i=[],isMobile:o,setCurrentTab:l})=>{const n=t.useMemo((()=>({root:{overflowY:o?"hidden":"initial",overflowX:o?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:o?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:o?"14px":"16px",fontWeight:600,lineHeight:o?"22px":"24px"}})),[o]),s=(()=>{const{t:e}=a.useTranslations();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),r=t.useMemo((()=>s.filter((e=>!i.includes(e.value)))||[]),[i,s]);return x.default.createElement(Pt,{className:"booking-search-tab"},x.default.createElement(_t,null,x.default.createElement(f.Tabs,{value:e,onTabChange:e=>{l(e)},styles:n},x.default.createElement(f.Tabs.List,null,r.map((e=>x.default.createElement(f.Tabs.Tab,{value:e.value,key:e.value},e.label)))))))};var Ft;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(Ft||(Ft={}));const Dt=S.default.div`
|
|
767
767
|
background-color: var(--neutral50);
|
|
768
768
|
padding: 12px 0;
|
|
769
769
|
box-shadow: inset 0px 1px 0px #e4e8ec;
|
|
@@ -782,4 +782,4 @@
|
|
|
782
782
|
display: flex;
|
|
783
783
|
align-items: center;
|
|
784
784
|
}
|
|
785
|
-
`;var Bt;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Bt||(Bt={}));var Vt=Object.freeze({__proto__:null,get RedirectType(){return Bt}});exports.BookingSearchBar=({isMobile:i,careApiDomain:l,geoLocationPermission:n,geoLocationCoordinates:s,initialSelectedCity:r,initialSearchValue:c="",careFrontDomain:d="/care",isDebug:u=!1,askForGeolocationPermission:p=!1,gaTrackingSearchBar:g,gaTrackingLocationSearch:f,autoCompleteDisabled:m=!1,inputSearchPlaceholder:C="",isOptionAllLocation:b=!1,hideResults:y=[],isNavResultItem:v=!0,routerPush:S,onGeoLocationPermissionChange:L,onSearch:w,onChangeLocation:O})=>{const{t:R,locale:A}=a.useTranslations(),P=t.useRef(null),_=t.useRef(null),[$,F]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:V,geoLocationCoordinates:K,requestGeoLocation:H}=k(),[z,Z]=t.useReducer(me,he,(e=>Object.assign(Object.assign({},e),{isDebug:u,isMobile:i,geoLocationPermission:n||V||"unset",geoLocationCoordinates:s||K||null,searchKeywords:c,initialSelectedCity:r||null,selectedLocation:r||e.selectedLocation||null,searchLocationKeywords:(null==r?void 0:r.name)||e.searchLocationKeywords,autoCompleteDisabled:m,inputSearchPlaceholder:C,locale:A}))),{navigateTo:U,focused:Q,isLoadingCities:Y,cities:q,searchKeywords:W,geoLocationPermission:J,selectedLocation:X,initialSelectedCity:ee,defaultCity:te,searchResults:ae,isLoadingSearchResults:ie,isMobileModalOpened:oe,inputSearchPlaceholder:ne}=z,{fetchCitiesByLocation:se,fetchCitiesByKeyword:re,fetchSearchResults:ce}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:ge.FetchCitiesStart}),fetch(Ye(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ge.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(h.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:ge.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(h.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ge.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l){const n=`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:ge.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:ge.FetchSearchResultsFinish});r.id===o.ID_OPTION_CURRENT_LOCATION?c||(d=s.id):d=r.id===o.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(Ye(n,{domain:a,searchType:"global",keyword:t.trim().length>pe[i]?t.trim():"",city:d===o.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:p},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:ge.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:ge.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:Z,locale:A,careApiDomain:l}),de=t.useMemo((()=>{var e;return{id:o.ID_OPTION_CURRENT_LOCATION,name:R("booking.searchBar.currentLocation"),slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.CURRENT}}),[R,A]),fe=t.useMemo((()=>E.default(re,400)),[re]),Ce=t.useMemo((()=>E.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&Z({type:ge.UpdateInitialSearchValue,payload:c})}),[c]),t.useEffect((()=>{p&&(null==X?void 0:X.id)===o.ID_OPTION_CURRENT_LOCATION&&"unset"===J&&H()}),[p,X,J]),t.useEffect((()=>{n||J===V||("granted"===V&&K?Z({type:ge.GrantGeoLocationPermission,payload:K}):"denied"===V&&Z({type:ge.DenyGeoLocationPermission}))}),[J,V,K,n]),t.useEffect((()=>{U&&(S?S(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){Z({type:ge.SelectCurrentLocation,payload:de})}),[R,Z]);t.useEffect((()=>{var e;"denied"===J||ee||Z({type:ge.SelectLocation,payload:{name:R("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.ALL}}),L&&L(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&Z({type:ge.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==ne&&Z({type:ge.SetInputSearchPlaceholder,payload:C})}),[C,ne]),t.useEffect((()=>{oe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[oe]);const ye=t.useCallback((function(e){"ms-MY"===A&&B(!0),Z({type:ge.SelectLocation,payload:e}),"ms-MY"!==A&&Ee(),O&&O(e)}),[R,Z]);function ve(){"ms-MY"===A&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==A&&Ee())}function xe(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){Z({type:ge.CloseMobileModal})}function Le(){return"location"!==Q?null:x.default.createElement(G,{isLoading:Y,cities:q,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:Y,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function ke(){return"search"!==Q?null:z.autoCompleteDisabled?i?x.default.createElement(we,{onClick:()=>{w({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:x.default.createElement(Qe,{data:ae,state:z,dispatch:Z,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return x.default.createElement(Oe,{isMobile:i,state:z,dispatch:Z,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:Ce,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:Le,renderSearchResults:ke,trackingAttributes:g,locationTrackingAttributes:f,onSearch:w,initalSearchValue:c})}return t.useEffect((()=>{if(window.visualViewport){const e=e=>{const t=e.target;F(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[F]),t.useEffect((()=>{if(X&&D&&"ms-MY"===A){const e=`/${X.slug}/hospital`;Z({type:ge.NavigateTo,payload:e}),B(!1)}}),[D,A,X]),i?x.default.createElement(x.default.Fragment,null,x.default.createElement(N,null),x.default.createElement(M,{ref:_}),x.default.createElement(T,{id:"booking-search-bar",ref:P,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&$?`${$}px`:"100%"}},oe?x.default.createElement(x.default.Fragment,null,x.default.createElement(j,null,x.default.createElement(ue,{headingText:R("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),Le(),ke()):x.default.createElement(le,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){_.current&&_.current.focus(),Z({type:ge.OpenMobileModal}),yield Promise.resolve(),P.current&&(null===(t=P.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:g,inputSearchPlaceholder:C}))):x.default.createElement(I,{id:"booking-search-bar",ref:P},Ie())},exports.BookingSearchBarV2=({isMobile:e,careApiDomain:i,geoLocationPermission:l,geoLocationCoordinates:n,initialSelectedCity:s,initialSearchValue:r="",initTypeSearch:c="hospital",initSpecialty:u,careFrontDomain:p="/care",isDebug:f=!1,gaTrackingSearchBar:m,gaTrackingLocationSearch:C,autoCompleteDisabled:b=!1,inputSearchPlaceholder:y="",hideTabBookingSearch:v=[],hideSpecialtySelection:S=!1,hidePopularSearchKeys:L=!1,clientSlug:w="",routerPush:O,onGeoLocationPermissionChange:I,onChangeLocation:T})=>{const{locale:j,t:M}=a.useTranslations(),R=t.useRef(null),N=t.useRef(null),[A,P]=t.useState(c),{geoLocationPermission:_,geoLocationCoordinates:$}=k(),[F,D]=t.useReducer(ot,tt,(t=>Object.assign(Object.assign({},t),{isDebug:f,isMobile:e,geoLocationPermission:l||_||"unset",geoLocationCoordinates:n||$||null,searchKeywords:r,initialSelectedCity:s||null,selectedLocation:s||t.selectedLocation||null,searchLocationKeywords:(null==s?void 0:s.name)||t.searchLocationKeywords,autoCompleteDisabled:b,inputSearchPlaceholder:y,locale:j}))),{navigateTo:B,focusedSpecialty:V,searchKeywords:K,geoLocationPermission:H,selectedLocation:z,selectedSpecialty:G,initialSelectedCity:Z,searchResults:U,isLoadingSearchResults:Q}=F,{fetchCitiesByLocation:Y,fetchCitiesByKeyword:q,fetchSearchResults:W,fetchAllSpecialties:J,fetchPopularKeys:X}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN",client:l=""}){const n=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:at.FetchCitiesStart}),fetch(Ye(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:at.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const s={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(s.noPaging=1);const r=[n(h.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},a),s),{client:o.CLIENT_KEY.MSD===l?"":l}))];return"zh-TW"===i&&r.push(n(h.PATHS.GET_CITIES_LIST,{noPaging:1,client:o.CLIENT_KEY.MSD===l?"":l})),Promise.all(r).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:at.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return n(h.PATHS.GET_CITIES_LIST,{keyword:t,client:l}).then((t=>{e({type:at.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,n,s,r,c){const d="specialty"===s?`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`:`${a}${h.PATHS.GET_SEARCH_V2}`;e({type:at.FetchSearchResultsStart});const{selectedLocation:u,geoLocationCoordinates:p,selectedSpecialty:g}=n;let f="";if(!u)return void e({type:at.FetchSearchResultsFinish});f=u.id===o.ID_OPTION_ALL_LOCATION?"":u.id;const m=(null==p?void 0:p.lat)||"",C=(null==p?void 0:p.lng)||"",b=(null==g?void 0:g.id)>0?null==g?void 0:g.id:"",y=t.trim().length>et[i]?t.trim():"";return fetch(Ye(d,{domain:a,searchType:s||"global",keyword:y,city:f===o.ID_OPTION_CURRENT_LOCATION?"":f,lat:m,lng:C,specialty_id:b,client_slug:o.CLIENT_KEY.MSD===r?"":r,msd:o.CLIENT_KEY.MSD===l?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let a=[];"specialty"!==s&&(a=t.searches),"specialty"===s&&(a=y?t.specialties:t.default),e({type:at.FetchSearchResultsComplete,payload:{key:s,searches:a||[]}}),c&&e({type:at.UpdateInitialSearchResults,payload:{key:s,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:d,error:e})})).finally((()=>e({type:at.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${h.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(Ye(t,{domain:a,searchType:"",msd:o.CLIENT_KEY.MSD===l?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:t,error:e})}))}),[i,a,e]),fetchPopularKeys:t.useCallback((function(t){const o=`${a}${h.PATHS.GET_SEARCH_POPULAR_KEY}`;return fetch(Ye(o,{domain:a,searchType:Ft[t],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,a,e])}}({dispatch:D,locale:j,careApiDomain:i,client:w}),ee=t.useMemo((()=>o.LOCALIZED_SLUGS[j]),[j]),te=t.useMemo((()=>({doctor:{name:M("booking.searchPopup.doctors"),icon:x.default.createElement(ft,null),slug:ee.DOCTOR},service:{name:M("booking.searchPopup.services"),icon:x.default.createElement(mt,null),slug:ee.SERVICE},hospital:{name:M("booking.searchPopup.hospitals"),icon:x.default.createElement(Ct,null),slug:ee.HOSPITAL},specialty:{name:M("booking.searchPopup.specialties"),icon:x.default.createElement(bt,null),slug:ee.SPECIALTIES}})),[A]),ae=t.useMemo((()=>E.default(q,400)),[q]),ie=t.useMemo((()=>E.default(W,400)),[W]),oe=t.useCallback((function(e){D({type:at.SelectLocation,payload:e}),le(),T&&T(e)}),[M,D]);function le(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return d.useOutsideClick(N,(()=>{D({type:at.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===H||Z||D({type:at.SelectLocation,payload:{name:M("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(t=o.LOCALIZED_SLUGS[j])||void 0===t?void 0:t.ALL}}),I&&I(H,F.geoLocationCoordinates),e&&"granted"===H&&z&&D({type:at.FocusInputSearch}),Y({coordinates:F.geoLocationCoordinates})}),[H]),t.useEffect((()=>{const e=u||{name:M("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ee.SPECIALTIES};F.selectedSpecialty||D({type:at.SelectSpecialty,payload:e})}),[u,F.selectedSpecialty]),t.useEffect((()=>{J()}),[]),t.useEffect((()=>{X(A)}),[A]),t.useEffect((()=>{B&&(O?O(B):window.location.href=`${p}${B}`)}),[B]),t.useEffect((()=>{W(F.searchKeywords,F,A,w,!0)}),[z,G,A]),x.default.createElement(qe,{ref:R},x.default.createElement($t,{currentTab:A,setCurrentTab:P,isMobile:e,hideTabBookingSearch:v}),x.default.createElement(We,{className:"booking-search-container"},x.default.createElement(Je,null,x.default.createElement(Xe,null,x.default.createElement("div",{ref:N},x.default.createElement(g.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==A&&x.default.createElement(wt,{state:F,isMobile:e,dispatch:D,debouncedFetchCitiesByKeyword:ae,selectedLocation:z,onLocationClick:oe,trackingAttributes:C}),x.default.createElement(vt,{type:A,isMobile:e,state:F,dispatch:D,debouncedFetchSearchResults:ie,initalSearchValue:r,focusSearchInput:le,typeInformation:te,trackingAttributes:m,isLoading:Q,hideSpecialtySelection:S,clientSlug:w}),x.default.createElement(g.Button,{size:e?"md":"lg",color:"#2D87F3",fullWidth:e,variant:"filled",onClick:function(){let e="";const{slug:t}=te[A];let a="";const i=o.MAPPING_CLIENT_WITH_SLUG[j][w];("doctor"===A||"hospital"===A)&&F.selectedSpecialty.id>0&&(a=`&specialtyId=${F.selectedSpecialty.id}`),e="specialty"===A?`/${t}`:`/${z.slug}/${t}`,i&&(e+=`/${i}`),e+=`?q=${K}${a}`,e&&D({type:at.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},M("booking.searchBar.searchButton"))),!L&&"specialty"!==A&&F.popularKeys.length>0&&x.default.createElement(At,{type:A,state:F,typeInformation:te,dispatch:D}),"specialty"===A&&"search"===V&&x.default.createElement(jt,{state:F,isMobile:e,dispatch:D,specialties:(null==U?void 0:U.specialty)||[],isLoading:Q}))))))},exports.TextDivider=({children:e,icon:t,className:a,style:i})=>x.default.createElement(Dt,{style:i,className:a},x.default.createElement(C.Container,null,x.default.createElement("div",{className:"icon-wrapper"},t),x.default.createElement(s.Text,{size:"c1",color:"var(--neutral800)"},e))),exports.types=Vt;
|
|
785
|
+
`;var Bt;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Bt||(Bt={}));var Vt=Object.freeze({__proto__:null,get RedirectType(){return Bt}});exports.BookingSearchBar=({isMobile:i,careApiDomain:l,geoLocationPermission:n,geoLocationCoordinates:s,initialSelectedCity:r,initialSearchValue:c="",careFrontDomain:d="/care",isDebug:u=!1,askForGeolocationPermission:p=!1,gaTrackingSearchBar:h,gaTrackingLocationSearch:f,autoCompleteDisabled:m=!1,inputSearchPlaceholder:C="",isOptionAllLocation:b=!1,hideResults:y=[],isNavResultItem:v=!0,routerPush:S,onGeoLocationPermissionChange:L,onSearch:w,onChangeLocation:O})=>{const{t:R,locale:A}=a.useTranslations(),P=t.useRef(null),_=t.useRef(null),[$,F]=t.useState(void 0),[D,B]=t.useState(!1),{geoLocationPermission:V,geoLocationCoordinates:K,requestGeoLocation:H}=k(),[z,Z]=t.useReducer(me,he,(e=>Object.assign(Object.assign({},e),{isDebug:u,isMobile:i,geoLocationPermission:n||V||"unset",geoLocationCoordinates:s||K||null,searchKeywords:c,initialSelectedCity:r||null,selectedLocation:r||e.selectedLocation||null,searchLocationKeywords:(null==r?void 0:r.name)||e.searchLocationKeywords,autoCompleteDisabled:m,inputSearchPlaceholder:C,locale:A}))),{navigateTo:U,focused:Q,isLoadingCities:q,cities:Y,searchKeywords:W,geoLocationPermission:J,selectedLocation:X,initialSelectedCity:ee,defaultCity:te,searchResults:ae,isLoadingSearchResults:ie,isMobileModalOpened:oe,inputSearchPlaceholder:ne}=z,{fetchCitiesByLocation:se,fetchCitiesByKeyword:re,fetchSearchResults:ce}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN"}){const l=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:ge.FetchCitiesStart}),fetch(qe(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ge.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const o={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(o.noPaging=1);const n=[l(g.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign({},a),o))];return"zh-TW"===i&&n.push(l(g.PATHS.GET_CITIES_LIST,{noPaging:1})),Promise.all(n).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:ge.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return l(g.PATHS.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ge.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,l){const n=`${a}${g.PATHS.GET_SEARCH_V2}`;e({type:ge.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:r,geoLocationCoordinates:c}=l;let d="";if(!r||!s)return void e({type:ge.FetchSearchResultsFinish});r.id===o.ID_OPTION_CURRENT_LOCATION?c||(d=s.id):d=r.id===o.ID_OPTION_ALL_LOCATION?"":r.id;const u=(null==c?void 0:c.lat)||"",p=(null==c?void 0:c.lng)||"";return fetch(qe(n,{domain:a,searchType:"global",keyword:t.trim().length>pe[i]?t.trim():"",city:d===o.ID_OPTION_CURRENT_LOCATION?"":d,lat:u,lng:p},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:ge.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:ge.FetchSearchResultsFinish})))}),[i,a,e])}}({dispatch:Z,locale:A,careApiDomain:l}),de=t.useMemo((()=>{var e;return{id:o.ID_OPTION_CURRENT_LOCATION,name:R("booking.searchBar.currentLocation"),slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.CURRENT}}),[R,A]),fe=t.useMemo((()=>E.default(re,400)),[re]),Ce=t.useMemo((()=>E.default(ce,400)),[ce]);t.useEffect((()=>{""!==c&&c!==z.searchKeywords&&Z({type:ge.UpdateInitialSearchValue,payload:c})}),[c]),t.useEffect((()=>{p&&(null==X?void 0:X.id)===o.ID_OPTION_CURRENT_LOCATION&&"unset"===J&&H()}),[p,X,J]),t.useEffect((()=>{n||J===V||("granted"===V&&K?Z({type:ge.GrantGeoLocationPermission,payload:K}):"denied"===V&&Z({type:ge.DenyGeoLocationPermission}))}),[J,V,K,n]),t.useEffect((()=>{U&&(S?S(U):window.location.href=`${d}${U}`)}),[U]);const be=t.useCallback((function(){Z({type:ge.SelectCurrentLocation,payload:de})}),[R,Z]);t.useEffect((()=>{var e;"denied"===J||ee||Z({type:ge.SelectLocation,payload:{name:R("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(e=o.LOCALIZED_SLUGS[A])||void 0===e?void 0:e.ALL}}),L&&L(J,z.geoLocationCoordinates),i&&"granted"===J&&X&&Z({type:ge.FocusInputSearch}),se({coordinates:z.geoLocationCoordinates})}),[J]),t.useEffect((()=>{X&&te&&ce(z.searchKeywords,z)}),[X,te]),t.useEffect((()=>{C!==ne&&Z({type:ge.SetInputSearchPlaceholder,payload:C})}),[C,ne]),t.useEffect((()=>{oe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[oe]);const ye=t.useCallback((function(e){"ms-MY"===A&&B(!0),Z({type:ge.SelectLocation,payload:e}),"ms-MY"!==A&&Ee(),O&&O(e)}),[R,Z]);function ve(){"ms-MY"===A&&B(!0),i&&"granted"!==z.geoLocationPermission?H():(be(),"ms-MY"!==A&&Ee())}function xe(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ee(){var e;P.current&&(null===(e=P.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Se(){Z({type:ge.CloseMobileModal})}function Le(){return"location"!==Q?null:x.default.createElement(G,{isLoading:q,cities:Y,onLocationClick:ye,onCurrentLocationClick:ve,isLocationLoading:q,geoLocationPermission:J,selectedLocation:X,isOptionAllLocation:b})}function ke(){return"search"!==Q?null:z.autoCompleteDisabled?i?x.default.createElement(we,{onClick:()=>{w({cityId:z.selectedLocation.id,keyword:W}),Se()}}):null:x.default.createElement(Qe,{data:ae,state:z,dispatch:Z,isMobile:!1,keyword:W,isLoading:ie,hideResults:y,isNavResultItem:v})}function Ie(){return x.default.createElement(Oe,{isMobile:i,state:z,dispatch:Z,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:Ce,focusLocationInput:xe,focusSearchInput:Ee,renderLocationResults:Le,renderSearchResults:ke,trackingAttributes:h,locationTrackingAttributes:f,onSearch:w,initalSearchValue:c})}return t.useEffect((()=>{if(window.visualViewport){const e=e=>{const t=e.target;F(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[F]),t.useEffect((()=>{if(X&&D&&"ms-MY"===A){const e=`/${X.slug}/hospital`;Z({type:ge.NavigateTo,payload:e}),B(!1)}}),[D,A,X]),i?x.default.createElement(x.default.Fragment,null,x.default.createElement(N,null),x.default.createElement(M,{ref:_}),x.default.createElement(T,{id:"booking-search-bar",ref:P,"data-is-modal":i&&oe,style:{"--mobile-care-searchbar-height":oe&&$?`${$}px`:"100%"}},oe?x.default.createElement(x.default.Fragment,null,x.default.createElement(j,null,x.default.createElement(ue,{headingText:R("booking.searchBar.searchButton"),onLeftClick:Se}),Ie()),Le(),ke()):x.default.createElement(le,{onClick:function(){var t;return e.__awaiter(this,void 0,void 0,(function*(){_.current&&_.current.focus(),Z({type:ge.OpenMobileModal}),yield Promise.resolve(),P.current&&(null===(t=P.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:Q,value:W,trackingAttributes:h,inputSearchPlaceholder:C}))):x.default.createElement(I,{id:"booking-search-bar",ref:P},Ie())},exports.BookingSearchBarV2=({isMobile:e,careApiDomain:i,geoLocationPermission:l,geoLocationCoordinates:n,initialSelectedCity:s,initialSearchValue:r="",initTypeSearch:c="hospital",initSpecialty:u,careFrontDomain:p="/care",isDebug:h=!1,gaTrackingSearchBar:m,gaTrackingLocationSearch:C,autoCompleteDisabled:b=!1,inputSearchPlaceholder:y="",hideTabBookingSearch:v=[],hideSpecialtySelection:S=!1,hidePopularSearchKeys:L=!1,clientSlug:w="",routerPush:O,onGeoLocationPermissionChange:I,onChangeLocation:T})=>{const{locale:j,t:M}=a.useTranslations(),R=t.useRef(null),N=t.useRef(null),[A,P]=t.useState(c),{geoLocationPermission:_,geoLocationCoordinates:$}=k(),[F,D]=t.useReducer(ot,tt,(t=>Object.assign(Object.assign({},t),{isDebug:h,isMobile:e,geoLocationPermission:l||_||"unset",geoLocationCoordinates:n||$||null,searchKeywords:r,initialSelectedCity:s||null,selectedLocation:s||t.selectedLocation||null,searchLocationKeywords:(null==s?void 0:s.name)||t.searchLocationKeywords,autoCompleteDisabled:b,inputSearchPlaceholder:y,locale:j}))),{navigateTo:B,focusedSpecialty:V,searchKeywords:K,geoLocationPermission:H,selectedLocation:z,selectedSpecialty:G,initialSelectedCity:Z,searchResults:U,isLoadingSearchResults:Q}=F,{fetchCitiesByLocation:q,fetchCitiesByKeyword:Y,fetchSearchResults:W,fetchAllSpecialties:J,fetchPopularKeys:X}=function({dispatch:e,careApiDomain:a,locale:i="vi-VN",client:l=""}){const n=t.useCallback((function(t,o={}){const l=`${a}${t}`;return e({type:at.FetchCitiesStart}),fetch(qe(l,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:at.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:t.useCallback((function({coordinates:t}){let a={};const s={};t&&(a={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(s.noPaging=1);const r=[n(g.PATHS.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},a),s),{client:o.CLIENT_KEY.MSD===l?"":l}))];return"zh-TW"===i&&r.push(n(g.PATHS.GET_CITIES_LIST,{noPaging:1,client:o.CLIENT_KEY.MSD===l?"":l})),Promise.all(r).then((([t,a])=>{const i=Object.assign({},t);if(a){const e=i.cities.map((e=>e.id));i.cities=i.cities.concat(a.cities.filter((t=>!e.includes(t.id))))}e({type:at.FetchCitiesByGeoIpComplete,payload:i})})).catch((e=>console.error("error loading cities by location",e)))}),[i,a,e]),fetchCitiesByKeyword:t.useCallback((function(t){return n(g.PATHS.GET_CITIES_LIST,{keyword:t,client:l}).then((t=>{e({type:at.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,a,e]),fetchSearchResults:t.useCallback((function(t,n,s,r,c){const d="specialty"===s?`${a}${g.PATHS.GET_SEARCH_SPECIALTY}`:`${a}${g.PATHS.GET_SEARCH_V2}`;e({type:at.FetchSearchResultsStart});const{selectedLocation:u,geoLocationCoordinates:p,selectedSpecialty:h}=n;let f="";if(!u)return void e({type:at.FetchSearchResultsFinish});f=u.id===o.ID_OPTION_ALL_LOCATION?"":u.id;const m=(null==p?void 0:p.lat)||"",C=(null==p?void 0:p.lng)||"",b=(null==h?void 0:h.id)>0?null==h?void 0:h.id:"",y=t.trim().length>et[i]?t.trim():"";return fetch(qe(d,{domain:a,searchType:s||"global",keyword:y,city:f===o.ID_OPTION_CURRENT_LOCATION?"":f,lat:m,lng:C,specialty_id:b,client_slug:o.CLIENT_KEY.MSD===r?"":r,msd:o.CLIENT_KEY.MSD===l?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let a=[];"specialty"!==s&&(a=t.searches),"specialty"===s&&(a=y?t.specialties:t.default),e({type:at.FetchSearchResultsComplete,payload:{key:s,searches:a||[]}}),c&&e({type:at.UpdateInitialSearchResults,payload:{key:s,searches:a||[]}})})).catch((e=>{console.log("error loading search results",{url:d,error:e})})).finally((()=>e({type:at.FetchSearchResultsFinish})))}),[i,a,e]),fetchAllSpecialties:t.useCallback((function(){const t=`${a}${g.PATHS.GET_SEARCH_SPECIALTY}`;return fetch(qe(t,{domain:a,searchType:"",msd:o.CLIENT_KEY.MSD===l?1:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:t,error:e})}))}),[i,a,e]),fetchPopularKeys:t.useCallback((function(t){const o=`${a}${g.PATHS.GET_SEARCH_POPULAR_KEY}`;return fetch(qe(o,{domain:a,searchType:Ft[t],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:at.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,a,e])}}({dispatch:D,locale:j,careApiDomain:i,client:w}),ee=t.useMemo((()=>o.LOCALIZED_SLUGS[j]),[j]),te=t.useMemo((()=>({doctor:{name:M("booking.searchPopup.doctors"),icon:x.default.createElement(ft,null),slug:ee.DOCTOR},service:{name:M("booking.searchPopup.services"),icon:x.default.createElement(mt,null),slug:ee.SERVICE},hospital:{name:M("booking.searchPopup.hospitals"),icon:x.default.createElement(Ct,null),slug:ee.HOSPITAL},specialty:{name:M("booking.searchPopup.specialties"),icon:x.default.createElement(bt,null),slug:ee.SPECIALTIES}})),[A]),ae=t.useMemo((()=>E.default(Y,400)),[Y]),ie=t.useMemo((()=>E.default(W,400)),[W]),oe=t.useCallback((function(e){D({type:at.SelectLocation,payload:e}),le(),T&&T(e)}),[M,D]);function le(){var e;R.current&&(null===(e=R.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return d.useOutsideClick(N,(()=>{D({type:at.ClickOutsideInputSearchSpecialty})})),t.useEffect((()=>{var t;"denied"===H||Z||D({type:at.SelectLocation,payload:{name:M("booking.searchBar.allLocations"),id:o.ID_OPTION_ALL_LOCATION,slug:null===(t=o.LOCALIZED_SLUGS[j])||void 0===t?void 0:t.ALL}}),I&&I(H,F.geoLocationCoordinates),e&&"granted"===H&&z&&D({type:at.FocusInputSearch}),q({coordinates:F.geoLocationCoordinates})}),[H]),t.useEffect((()=>{const e=u||{name:M("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ee.SPECIALTIES};F.selectedSpecialty||D({type:at.SelectSpecialty,payload:e})}),[u,F.selectedSpecialty]),t.useEffect((()=>{J()}),[]),t.useEffect((()=>{X(A)}),[A]),t.useEffect((()=>{B&&(O?O(B):window.location.href=`${p}${B}`)}),[B]),t.useEffect((()=>{W(F.searchKeywords,F,A,w,!0)}),[z,G,A]),x.default.createElement(Ye,{ref:R},x.default.createElement($t,{currentTab:A,setCurrentTab:P,isMobile:e,hideTabBookingSearch:v}),x.default.createElement(We,{className:"booking-search-container"},x.default.createElement(Je,null,x.default.createElement(Xe,null,x.default.createElement("div",{ref:N},x.default.createElement(f.Flex,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==A&&x.default.createElement(wt,{state:F,isMobile:e,dispatch:D,debouncedFetchCitiesByKeyword:ae,selectedLocation:z,onLocationClick:oe,trackingAttributes:C}),x.default.createElement(vt,{type:A,isMobile:e,state:F,dispatch:D,debouncedFetchSearchResults:ie,initalSearchValue:r,focusSearchInput:le,typeInformation:te,trackingAttributes:m,isLoading:Q,hideSpecialtySelection:S,clientSlug:w}),x.default.createElement(f.Button,{size:e?"md":"lg",color:"#2D87F3",fullWidth:e,variant:"filled",onClick:function(){let e="";const{slug:t}=te[A];let a="";const i=o.MAPPING_CLIENT_WITH_SLUG[j][w];("doctor"===A||"hospital"===A)&&F.selectedSpecialty.id>0&&(a=`&specialtyId=${F.selectedSpecialty.id}`),e="specialty"===A?`/${t}`:`/${z.slug}/${t}`,i&&(e+=`/${i}`),e+=`?q=${K}${a}`,e&&D({type:at.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},M("booking.searchBar.searchButton"))),!L&&"specialty"!==A&&F.popularKeys.length>0&&x.default.createElement(At,{type:A,state:F,typeInformation:te,dispatch:D}),"specialty"===A&&"search"===V&&x.default.createElement(jt,{state:F,isMobile:e,dispatch:D,specialties:(null==U?void 0:U.specialty)||[],isLoading:Q}))))))},exports.TextDivider=({children:e,icon:t,className:a,style:i})=>x.default.createElement(Dt,{style:i,className:a},x.default.createElement(C.Container,null,x.default.createElement("div",{className:"icon-wrapper"},t),x.default.createElement(s.Text,{size:"c1",color:"var(--neutral800)"},e))),exports.types=Vt;
|