@hhgtech/hhg-components 1.28.35 → 1.28.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/build/babyGrowth.js +30 -14
  2. package/build/cache.js +1 -1
  3. package/build/care.js +1 -1
  4. package/build/components/atoms/alert/index.d.ts +1 -2
  5. package/build/components/atoms/avatar/index.d.ts +1 -2
  6. package/build/components/atoms/avatar/index.styled.d.ts +2 -1
  7. package/build/components/atoms/backdrop/index.styled.d.ts +2 -1
  8. package/build/components/atoms/checkbox/index.styled.d.ts +2 -1
  9. package/build/components/atoms/divider/index.d.ts +1 -2
  10. package/build/components/atoms/fileDropdown/index.d.ts +1 -2
  11. package/build/components/atoms/grid/index.styled.d.ts +2 -1
  12. package/build/components/atoms/heading/index.d.ts +1 -2
  13. package/build/components/atoms/logo/index.styled.d.ts +3 -2
  14. package/build/components/atoms/marryBabyText/index.d.ts +1 -2
  15. package/build/components/atoms/marryBabyText/index.styled.d.ts +4 -2
  16. package/build/components/atoms/pagination/index.d.ts +1 -2
  17. package/build/components/mantine/slider/index.styled.d.ts +7 -1
  18. package/build/components/mantine/text/index.styled.d.ts +1 -9
  19. package/build/components/molecules/articleCard/_deprecated_index.d.ts +1 -2
  20. package/build/components/molecules/categoryCard/index.d.ts +1 -2
  21. package/build/components/molecules/dropdown/index.d.ts +1 -2
  22. package/build/components/molecules/dropdown/index.styled.d.ts +1 -1
  23. package/build/components/molecules/floatButtonGroup/index.d.ts +1 -2
  24. package/build/components/molecules/languageSwitcher/tooltipSelection/index.d.ts +1 -2
  25. package/build/components/molecules/tabs/index.d.ts +1 -2
  26. package/build/components/navigationV2/components/molecules/navigationBar/index.styled.d.ts +0 -1
  27. package/build/components/onboardingV2/dynamicForm/index.styled.d.ts +1 -8
  28. package/build/components.js +1 -1
  29. package/build/{constants-c397b152.js → constants-8ef08ff5.js} +23 -23
  30. package/build/{constants-726f75de.js → constants-e54aa389.js} +1 -1
  31. package/build/constants.js +1 -1
  32. package/build/core-ba7d65c8.js +1 -0
  33. package/build/ecom.js +1 -1
  34. package/build/esm/babyGrowth.js +45 -29
  35. package/build/esm/cache.js +1 -1
  36. package/build/esm/care.js +1 -1
  37. package/build/esm/components/atoms/alert/index.d.ts +1 -2
  38. package/build/esm/components/atoms/avatar/index.d.ts +1 -2
  39. package/build/esm/components/atoms/avatar/index.styled.d.ts +2 -1
  40. package/build/esm/components/atoms/backdrop/index.styled.d.ts +2 -1
  41. package/build/esm/components/atoms/checkbox/index.styled.d.ts +2 -1
  42. package/build/esm/components/atoms/divider/index.d.ts +1 -2
  43. package/build/esm/components/atoms/fileDropdown/index.d.ts +1 -2
  44. package/build/esm/components/atoms/grid/index.styled.d.ts +2 -1
  45. package/build/esm/components/atoms/heading/index.d.ts +1 -2
  46. package/build/esm/components/atoms/logo/index.styled.d.ts +3 -2
  47. package/build/esm/components/atoms/marryBabyText/index.d.ts +1 -2
  48. package/build/esm/components/atoms/marryBabyText/index.styled.d.ts +4 -2
  49. package/build/esm/components/atoms/pagination/index.d.ts +1 -2
  50. package/build/esm/components/mantine/slider/index.styled.d.ts +7 -1
  51. package/build/esm/components/mantine/text/index.styled.d.ts +1 -9
  52. package/build/esm/components/molecules/articleCard/_deprecated_index.d.ts +1 -2
  53. package/build/esm/components/molecules/categoryCard/index.d.ts +1 -2
  54. package/build/esm/components/molecules/dropdown/index.d.ts +1 -2
  55. package/build/esm/components/molecules/dropdown/index.styled.d.ts +1 -1
  56. package/build/esm/components/molecules/floatButtonGroup/index.d.ts +1 -2
  57. package/build/esm/components/molecules/languageSwitcher/tooltipSelection/index.d.ts +1 -2
  58. package/build/esm/components/molecules/tabs/index.d.ts +1 -2
  59. package/build/esm/components/navigationV2/components/molecules/navigationBar/index.styled.d.ts +0 -1
  60. package/build/esm/components/onboardingV2/dynamicForm/index.styled.d.ts +1 -8
  61. package/build/esm/components.js +1 -1
  62. package/build/esm/{constants-54937396.js → constants-2b76d121.js} +1 -1
  63. package/build/esm/{constants-06083c39.js → constants-6cfaa1ef.js} +25 -25
  64. package/build/esm/constants.js +1 -1
  65. package/build/esm/{core-7b00c0e3.js → core-18ff4cb5.js} +1 -1
  66. package/build/esm/ecom.js +1 -1
  67. package/build/esm/footer.js +1 -1
  68. package/build/esm/gAssets.js +1 -1
  69. package/build/esm/{getDynamicHealthTool-18567743.js → getDynamicHealthTool-7989183b.js} +1 -1
  70. package/build/esm/{getSocialList-b274bbf9.js → getSocialList-5330dbd2.js} +1 -1
  71. package/build/esm/hooks.js +1 -1
  72. package/build/esm/i18n.js +1 -1
  73. package/build/esm/i18nV2.js +1 -1
  74. package/build/esm/index-03141739.js +1 -0
  75. package/build/esm/{index-26732bc8.js → index-064bc751.js} +9 -9
  76. package/build/esm/index-12a2d8bc.js +1 -0
  77. package/build/esm/{index-0d048082.js → index-162b9bde.js} +1 -1
  78. package/build/esm/{index-db160921.js → index-2b4575ac.js} +1 -1
  79. package/build/esm/{index-6b632496.js → index-2be76d22.js} +1 -1
  80. package/build/esm/index-5fdbf5bc.js +177 -0
  81. package/build/esm/{index-2eb76153.js → index-60f16dee.js} +1 -1
  82. package/build/esm/{index-d943277b.js → index-6127f94b.js} +358 -361
  83. package/build/esm/index-6e2dd27b.js +1 -0
  84. package/build/esm/{index-0d739df3.js → index-74cef015.js} +1 -1
  85. package/build/esm/index-752b7c3f.js +1 -0
  86. package/build/esm/{index-c224c645.js → index-7684a5b9.js} +1 -1
  87. package/build/esm/index-778d5fb2.js +1 -0
  88. package/build/esm/{index-c573407d.js → index-79f41857.js} +1 -1
  89. package/build/esm/index-84c08ad9.js +1 -0
  90. package/build/esm/{index-4c59e854.js → index-8f2fcc98.js} +1 -1
  91. package/build/esm/index-956cdde0.js +1 -0
  92. package/build/esm/{index-cc5735d3.js → index-9991cfb3.js} +1 -1
  93. package/build/esm/{index-6803e2f2.js → index-a2e81576.js} +5 -5
  94. package/build/esm/{index-d54f80f3.js → index-c9737971.js} +1 -1
  95. package/build/esm/index-fa625a55.js +1 -0
  96. package/build/esm/index.css +3 -1
  97. package/build/esm/index.js +1 -1
  98. package/build/esm/{index.styled-6d8c2436.js → index.styled-17af4657.js} +178 -197
  99. package/build/esm/index.styled-36cb24ce.js +50 -0
  100. package/build/esm/{index.styled-c22aa342.js → index.styled-46a99590.js} +5 -5
  101. package/build/esm/{index.styled-46a73cde.js → index.styled-a25d7261.js} +233 -235
  102. package/build/esm/{index.styles-e55de146.js → index.styles-671382bc.js} +109 -342
  103. package/build/esm/lead.js +1 -1
  104. package/build/esm/mantine.js +1 -1
  105. package/build/esm/misc.js +1 -1
  106. package/build/esm/navigation.js +1 -1
  107. package/build/esm/onboardingV2.js +1 -1
  108. package/build/esm/pwg.js +1 -1
  109. package/build/esm/{routing-4b2567b9.js → routing-ec23ed74.js} +1 -1
  110. package/build/esm/subot.js +129 -132
  111. package/build/esm/together/components/atoms/notificationBar/index.d.ts +1 -1
  112. package/build/esm/together/components/molecules/submitReportForm/index.d.ts +1 -2
  113. package/build/esm/together/components/organisms/sourceList/sourceItem/index.styled.d.ts +0 -1
  114. package/build/esm/together.js +1 -1
  115. package/build/esm/{types-5cc7e426.js → types-232e79d1.js} +1 -1
  116. package/build/esm/{types-416f316b.js → types-e1669387.js} +15 -15
  117. package/build/esm/types.js +1 -1
  118. package/build/esm/{useCategory-f09c0218.js → useCategory-00053487.js} +1 -1
  119. package/build/esm/useHealthToolCache-cfa13b2f.js +1 -0
  120. package/build/esm/{usePlacesAutocomplete-10260e15.js → usePlacesAutocomplete-07f0fc32.js} +1 -1
  121. package/build/esm/{useRafState-2c97b94f.js → useRafState-9968ee17.js} +1 -1
  122. package/build/esm/{useTranslations-d8df7d65.js → useTranslations-d963b37f.js} +1 -1
  123. package/build/esm/utils-892d8a65.js +1 -0
  124. package/build/esm/{utils-835d4db7.js → utils-98561d5e.js} +1 -1
  125. package/build/esm/vaccination.js +11 -11
  126. package/build/footer.js +1 -1
  127. package/build/gAssets.js +1 -1
  128. package/build/getDynamicHealthTool-a7d75452.js +1 -0
  129. package/build/{getSocialList-6be3fefa.js → getSocialList-9e58358a.js} +1 -1
  130. package/build/hooks.js +1 -1
  131. package/build/i18n.js +1 -1
  132. package/build/i18nV2.js +1 -1
  133. package/build/index-01f4346e.js +1 -0
  134. package/build/index-1763366b.js +1 -0
  135. package/build/{index-97fda56b.js → index-2241f0a7.js} +1 -1
  136. package/build/{index-9e1da0ee.js → index-24584ae5.js} +1 -1
  137. package/build/{index-b4764862.js → index-3f6899fe.js} +359 -362
  138. package/build/{index-f163ff61.js → index-5a341117.js} +1 -1
  139. package/build/{index-943aa021.js → index-63e33ff2.js} +5 -5
  140. package/build/{index-64635fb4.js → index-6a76dedf.js} +1 -1
  141. package/build/{index-11947038.js → index-6b89bd1e.js} +1 -1
  142. package/build/index-7adb6ca5.js +1 -0
  143. package/build/{index-cdf4c565.js → index-7c3ea642.js} +19 -19
  144. package/build/{index-00e19679.js → index-824143ee.js} +1 -1
  145. package/build/{index-c7d0c270.js → index-8e766956.js} +1 -1
  146. package/build/{index-1c2f6c28.js → index-8e8894d5.js} +1 -1
  147. package/build/{index-5682d171.js → index-a788941c.js} +9 -9
  148. package/build/{index-54d36029.js → index-b9003514.js} +1 -1
  149. package/build/index-c782489f.js +1 -0
  150. package/build/{index-1d0c568a.js → index-d9c91a7a.js} +1 -1
  151. package/build/{index-b6c92d6d.js → index-db727a39.js} +1 -1
  152. package/build/{index-884a509d.js → index-df9365fe.js} +1 -1
  153. package/build/index-f8a63825.js +1 -0
  154. package/build/{index-65d642e7.js → index-fe748c3b.js} +1 -1
  155. package/build/index.css +3 -1
  156. package/build/index.js +1 -1
  157. package/build/{index.styled-aa832b7c.js → index.styled-3570c720.js} +3 -3
  158. package/build/{index.styled-563af73e.js → index.styled-380d6e0a.js} +122 -141
  159. package/build/{index.styled-c87b2587.js → index.styled-40cb1c5c.js} +5 -5
  160. package/build/{index.styled-ea2e2d8f.js → index.styled-77b9479f.js} +232 -234
  161. package/build/index.styles-3f14873c.js +627 -0
  162. package/build/lead.js +1 -1
  163. package/build/mantine.js +1 -1
  164. package/build/misc.js +1 -1
  165. package/build/navigation.js +1 -1
  166. package/build/onboardingV2.js +1 -1
  167. package/build/pwg.js +3 -3
  168. package/build/{routing-d0bfcc30.js → routing-f6c590ab.js} +1 -1
  169. package/build/subot.js +91 -94
  170. package/build/together/components/atoms/notificationBar/index.d.ts +1 -1
  171. package/build/together/components/molecules/submitReportForm/index.d.ts +1 -2
  172. package/build/together/components/organisms/sourceList/sourceItem/index.styled.d.ts +0 -1
  173. package/build/together.js +1 -1
  174. package/build/{types-49cbbac9.js → types-2439f02e.js} +1 -1
  175. package/build/{types-3785bf95.js → types-72e39367.js} +15 -15
  176. package/build/types.js +1 -1
  177. package/build/{useCategory-8e19b607.js → useCategory-b165202c.js} +1 -1
  178. package/build/{useHealthToolCache-00ad982d.js → useHealthToolCache-b15142cb.js} +1 -1
  179. package/build/{usePlacesAutocomplete-dbe03117.js → usePlacesAutocomplete-966d009c.js} +1 -1
  180. package/build/{useRafState-dfe297b8.js → useRafState-af69ad6c.js} +1 -1
  181. package/build/{useTranslations-d5cf41a3.js → useTranslations-95cf8449.js} +1 -1
  182. package/build/utils-167797c2.js +1 -0
  183. package/build/utils-6754d753.js +1 -0
  184. package/build/vaccination.js +4 -4
  185. package/package.json +7 -2
  186. package/build/core-4602825d.js +0 -1
  187. package/build/esm/index-0b6cd675.js +0 -1
  188. package/build/esm/index-19d6e493.js +0 -1
  189. package/build/esm/index-2ad11d68.js +0 -177
  190. package/build/esm/index-61b510c9.js +0 -1
  191. package/build/esm/index-911ff28a.js +0 -1
  192. package/build/esm/index-d48e481e.js +0 -1
  193. package/build/esm/index-d772e106.js +0 -1
  194. package/build/esm/index-fa9d0948.js +0 -1
  195. package/build/esm/index-feacc1bb.js +0 -1
  196. package/build/esm/index.styled-fac84ed8.js +0 -50
  197. package/build/esm/useHealthToolCache-df731a08.js +0 -1
  198. package/build/esm/utils-81962957.js +0 -141
  199. package/build/getDynamicHealthTool-82fe270c.js +0 -1
  200. package/build/index-3ee3b3cf.js +0 -1
  201. package/build/index-69ba0774.js +0 -1
  202. package/build/index-aa9718f1.js +0 -1
  203. package/build/index-e3970aeb.js +0 -1
  204. package/build/index-ef957176.js +0 -1
  205. package/build/index.styles-8bca236c.js +0 -860
  206. package/build/utils-76f22f3b.js +0 -141
  207. package/build/utils-d08dfeed.js +0 -1
  208. /package/build/{BMI_BOYS.percentile.monthly-0ec27878.js → BMI_BOYS.percentile.monthly-19f4ed11.js} +0 -0
  209. /package/build/{BMI_BOYS.percentile.weekly-4d569734.js → BMI_BOYS.percentile.weekly-988c28e7.js} +0 -0
  210. /package/build/{BMI_BOYS.percentile.yearly-31b412eb.js → BMI_BOYS.percentile.yearly-2ce0172a.js} +0 -0
  211. /package/build/{BMI_BOYS.zscore.monthly-2488d71f.js → BMI_BOYS.zscore.monthly-0319a3ca.js} +0 -0
  212. /package/build/{BMI_BOYS.zscore.weekly-b10f3ef1.js → BMI_BOYS.zscore.weekly-6af17a54.js} +0 -0
  213. /package/build/{BMI_BOYS.zscore.yearly-68623c3d.js → BMI_BOYS.zscore.yearly-51a52dc7.js} +0 -0
  214. /package/build/{BMI_GIRLS.percentile.monthly-c1506d58.js → BMI_GIRLS.percentile.monthly-49e8d16b.js} +0 -0
  215. /package/build/{BMI_GIRLS.percentile.weekly-7e7cda8a.js → BMI_GIRLS.percentile.weekly-6852a685.js} +0 -0
  216. /package/build/{BMI_GIRLS.percentile.yearly-1a60da42.js → BMI_GIRLS.percentile.yearly-e769c49a.js} +0 -0
  217. /package/build/{BMI_GIRLS.zscore.monthly-17d96d3b.js → BMI_GIRLS.zscore.monthly-82c5d7a1.js} +0 -0
  218. /package/build/{BMI_GIRLS.zscore.weekly-5944ad7d.js → BMI_GIRLS.zscore.weekly-1f4764fb.js} +0 -0
  219. /package/build/{BMI_GIRLS.zscore.yearly-81b205b3.js → BMI_GIRLS.zscore.yearly-cac12266.js} +0 -0
  220. /package/build/{ChevronDown-ed323fc5.js → ChevronDown-5b4ef88d.js} +0 -0
  221. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-df341f5e.js → HEAD CIRCUM_BOYS.percentile.monthly-00707b2f.js} +0 -0
  222. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-376fdb05.js → HEAD CIRCUM_BOYS.percentile.weekly-36272a6b.js} +0 -0
  223. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-6efc3424.js → HEAD CIRCUM_BOYS.percentile.yearly-8ffd2a1b.js} +0 -0
  224. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-fdaf2dbf.js → HEAD CIRCUM_BOYS.zscore.monthly-b9037d32.js} +0 -0
  225. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-9c7d7dfa.js → HEAD CIRCUM_BOYS.zscore.weekly-acf9cc31.js} +0 -0
  226. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-8b50d99c.js → HEAD CIRCUM_BOYS.zscore.yearly-50079d83.js} +0 -0
  227. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-94c95ddc.js → HEAD CIRCUM_GIRLS.percentile.monthly-211234b7.js} +0 -0
  228. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-4c6f2727.js → HEAD CIRCUM_GIRLS.percentile.weekly-b6a1780b.js} +0 -0
  229. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-16e0c0d3.js → HEAD CIRCUM_GIRLS.percentile.yearly-2ac79afc.js} +0 -0
  230. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-5bd001e8.js → HEAD CIRCUM_GIRLS.zscore.monthly-39639744.js} +0 -0
  231. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-50524d03.js → HEAD CIRCUM_GIRLS.zscore.weekly-8ebb9191.js} +0 -0
  232. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-7ced5098.js → HEAD CIRCUM_GIRLS.zscore.yearly-0a728371.js} +0 -0
  233. /package/build/{HEIGHT_BOYS.percentile.monthly-bd8aeb12.js → HEIGHT_BOYS.percentile.monthly-a04a5707.js} +0 -0
  234. /package/build/{HEIGHT_BOYS.percentile.weekly-6c368cae.js → HEIGHT_BOYS.percentile.weekly-601c6385.js} +0 -0
  235. /package/build/{HEIGHT_BOYS.percentile.yearly-4d255579.js → HEIGHT_BOYS.percentile.yearly-ee7cc294.js} +0 -0
  236. /package/build/{HEIGHT_BOYS.zscore.monthly-07823cdb.js → HEIGHT_BOYS.zscore.monthly-390392ac.js} +0 -0
  237. /package/build/{HEIGHT_BOYS.zscore.weekly-1f2d261c.js → HEIGHT_BOYS.zscore.weekly-d0be59ca.js} +0 -0
  238. /package/build/{HEIGHT_BOYS.zscore.yearly-562f6aac.js → HEIGHT_BOYS.zscore.yearly-67fe48eb.js} +0 -0
  239. /package/build/{HEIGHT_GIRLS.percentile.monthly-394875dd.js → HEIGHT_GIRLS.percentile.monthly-32fbf6d6.js} +0 -0
  240. /package/build/{HEIGHT_GIRLS.percentile.weekly-dc5223b5.js → HEIGHT_GIRLS.percentile.weekly-378c22e7.js} +0 -0
  241. /package/build/{HEIGHT_GIRLS.percentile.yearly-ec1dd8b0.js → HEIGHT_GIRLS.percentile.yearly-f8a775da.js} +0 -0
  242. /package/build/{HEIGHT_GIRLS.zscore.monthly-a61227f4.js → HEIGHT_GIRLS.zscore.monthly-eba9d82b.js} +0 -0
  243. /package/build/{HEIGHT_GIRLS.zscore.weekly-810fbaba.js → HEIGHT_GIRLS.zscore.weekly-649d1e6a.js} +0 -0
  244. /package/build/{HEIGHT_GIRLS.zscore.yearly-50ce0a8f.js → HEIGHT_GIRLS.zscore.yearly-d7566aef.js} +0 -0
  245. /package/build/{Subot-ab83b6e8.js → Subot-781f30c5.js} +0 -0
  246. /package/build/{Visible-8fe90e27.js → Visible-0d367263.js} +0 -0
  247. /package/build/{WEIGHT_BOYS.percentile.monthly-35e4e540.js → WEIGHT_BOYS.percentile.monthly-cdd83d2c.js} +0 -0
  248. /package/build/{WEIGHT_BOYS.percentile.weekly-93c1552f.js → WEIGHT_BOYS.percentile.weekly-08b2cc25.js} +0 -0
  249. /package/build/{WEIGHT_BOYS.percentile.yearly-09b2c973.js → WEIGHT_BOYS.percentile.yearly-78bd0332.js} +0 -0
  250. /package/build/{WEIGHT_BOYS.zscore.monthly-bf7ac6f2.js → WEIGHT_BOYS.zscore.monthly-bd9c59c4.js} +0 -0
  251. /package/build/{WEIGHT_BOYS.zscore.weekly-377fac0f.js → WEIGHT_BOYS.zscore.weekly-71bf2560.js} +0 -0
  252. /package/build/{WEIGHT_BOYS.zscore.yearly-caf8de99.js → WEIGHT_BOYS.zscore.yearly-80a65ace.js} +0 -0
  253. /package/build/{WEIGHT_GIRLS.percentile.monthly-59251654.js → WEIGHT_GIRLS.percentile.monthly-e602fb9f.js} +0 -0
  254. /package/build/{WEIGHT_GIRLS.percentile.weekly-bca687c9.js → WEIGHT_GIRLS.percentile.weekly-8ec40671.js} +0 -0
  255. /package/build/{WEIGHT_GIRLS.percentile.yearly-c268cb57.js → WEIGHT_GIRLS.percentile.yearly-6c13450f.js} +0 -0
  256. /package/build/{WEIGHT_GIRLS.zscore.monthly-e8e7e4ec.js → WEIGHT_GIRLS.zscore.monthly-f2dff34a.js} +0 -0
  257. /package/build/{WEIGHT_GIRLS.zscore.weekly-802d8a32.js → WEIGHT_GIRLS.zscore.weekly-a7c88fa4.js} +0 -0
  258. /package/build/{WEIGHT_GIRLS.zscore.yearly-86dfa395.js → WEIGHT_GIRLS.zscore.yearly-4c55b4b9.js} +0 -0
  259. /package/build/{cookieHelper-92ea0a20.js → cookieHelper-cb2c780d.js} +0 -0
  260. /package/build/{dataTransform-fa42cb61.js → dataTransform-aa76f31c.js} +0 -0
  261. /package/build/esm/{BMI_BOYS.percentile.monthly-d0325ab2.js → BMI_BOYS.percentile.monthly-05d05da5.js} +0 -0
  262. /package/build/esm/{BMI_BOYS.percentile.weekly-2d099f4d.js → BMI_BOYS.percentile.weekly-b1aa1512.js} +0 -0
  263. /package/build/esm/{BMI_BOYS.percentile.yearly-22655d07.js → BMI_BOYS.percentile.yearly-9a9ca29b.js} +0 -0
  264. /package/build/esm/{BMI_BOYS.zscore.monthly-dfc23aee.js → BMI_BOYS.zscore.monthly-ab8c5087.js} +0 -0
  265. /package/build/esm/{BMI_BOYS.zscore.weekly-a1f8eeb8.js → BMI_BOYS.zscore.weekly-9c26d743.js} +0 -0
  266. /package/build/esm/{BMI_BOYS.zscore.yearly-1385d138.js → BMI_BOYS.zscore.yearly-0c8e88bf.js} +0 -0
  267. /package/build/esm/{BMI_GIRLS.percentile.monthly-14cfb09c.js → BMI_GIRLS.percentile.monthly-09da7135.js} +0 -0
  268. /package/build/esm/{BMI_GIRLS.percentile.weekly-ec1043ad.js → BMI_GIRLS.percentile.weekly-04cd0f7f.js} +0 -0
  269. /package/build/esm/{BMI_GIRLS.percentile.yearly-3ec36c93.js → BMI_GIRLS.percentile.yearly-b96e6cdd.js} +0 -0
  270. /package/build/esm/{BMI_GIRLS.zscore.monthly-f188295b.js → BMI_GIRLS.zscore.monthly-e301d83d.js} +0 -0
  271. /package/build/esm/{BMI_GIRLS.zscore.weekly-b655ff24.js → BMI_GIRLS.zscore.weekly-23ab6a7b.js} +0 -0
  272. /package/build/esm/{BMI_GIRLS.zscore.yearly-6ad44499.js → BMI_GIRLS.zscore.yearly-576720ea.js} +0 -0
  273. /package/build/esm/{ChevronDown-b57b4a27.js → ChevronDown-70559b47.js} +0 -0
  274. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-49ebc707.js → HEAD CIRCUM_BOYS.percentile.monthly-81d95d86.js} +0 -0
  275. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-c005f4e3.js → HEAD CIRCUM_BOYS.percentile.weekly-12162f09.js} +0 -0
  276. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-b800cb24.js → HEAD CIRCUM_BOYS.percentile.yearly-45cd1c23.js} +0 -0
  277. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-6610b76f.js → HEAD CIRCUM_BOYS.zscore.monthly-47835e82.js} +0 -0
  278. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-b5318fa3.js → HEAD CIRCUM_BOYS.zscore.weekly-026aced6.js} +0 -0
  279. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-65685624.js → HEAD CIRCUM_BOYS.zscore.yearly-01c4d654.js} +0 -0
  280. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-ee6cef4c.js → HEAD CIRCUM_GIRLS.percentile.monthly-3bac7be1.js} +0 -0
  281. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-5ff03c01.js → HEAD CIRCUM_GIRLS.percentile.weekly-d0a20741.js} +0 -0
  282. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-f50b2018.js → HEAD CIRCUM_GIRLS.percentile.yearly-dc919555.js} +0 -0
  283. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-ef066007.js → HEAD CIRCUM_GIRLS.zscore.monthly-47bf7a3c.js} +0 -0
  284. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-0054026e.js → HEAD CIRCUM_GIRLS.zscore.weekly-a8e45e75.js} +0 -0
  285. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-b0e355d4.js → HEAD CIRCUM_GIRLS.zscore.yearly-bf546ba6.js} +0 -0
  286. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-21c2a2a2.js → HEIGHT_BOYS.percentile.monthly-6ba59424.js} +0 -0
  287. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-94823e80.js → HEIGHT_BOYS.percentile.weekly-29b8fe64.js} +0 -0
  288. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-86e415d4.js → HEIGHT_BOYS.percentile.yearly-f135b8e2.js} +0 -0
  289. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-dec2158f.js → HEIGHT_BOYS.zscore.monthly-49e9680a.js} +0 -0
  290. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-b7e28d96.js → HEIGHT_BOYS.zscore.weekly-f9a65efa.js} +0 -0
  291. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-62c1caee.js → HEIGHT_BOYS.zscore.yearly-8b5ad6d2.js} +0 -0
  292. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-54ee3b6d.js → HEIGHT_GIRLS.percentile.monthly-e5b38079.js} +0 -0
  293. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-d78729a6.js → HEIGHT_GIRLS.percentile.weekly-f3670276.js} +0 -0
  294. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-18b7481d.js → HEIGHT_GIRLS.percentile.yearly-4c02f1bb.js} +0 -0
  295. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-1651c5df.js → HEIGHT_GIRLS.zscore.monthly-640e5e55.js} +0 -0
  296. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-0591cfa1.js → HEIGHT_GIRLS.zscore.weekly-4eead516.js} +0 -0
  297. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-3347eeaf.js → HEIGHT_GIRLS.zscore.yearly-6ebee51c.js} +0 -0
  298. /package/build/esm/{Subot-67816106.js → Subot-2c9e4c09.js} +0 -0
  299. /package/build/esm/{Visible-254f3d0e.js → Visible-280d16e3.js} +0 -0
  300. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-82144cc4.js → WEIGHT_BOYS.percentile.monthly-430dc3b2.js} +0 -0
  301. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-caf2756d.js → WEIGHT_BOYS.percentile.weekly-b937aeb9.js} +0 -0
  302. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-39c389a6.js → WEIGHT_BOYS.percentile.yearly-cbf833e8.js} +0 -0
  303. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-1d96fdf6.js → WEIGHT_BOYS.zscore.monthly-dd6b0e64.js} +0 -0
  304. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-6d7dc5c3.js → WEIGHT_BOYS.zscore.weekly-786a8d18.js} +0 -0
  305. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-5befa2e9.js → WEIGHT_BOYS.zscore.yearly-acfb2c76.js} +0 -0
  306. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-62e45d9b.js → WEIGHT_GIRLS.percentile.monthly-1e4153b0.js} +0 -0
  307. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-4b315673.js → WEIGHT_GIRLS.percentile.weekly-f69a3ddb.js} +0 -0
  308. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-ae777fbd.js → WEIGHT_GIRLS.percentile.yearly-a42cb1fc.js} +0 -0
  309. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-e1a711b3.js → WEIGHT_GIRLS.zscore.monthly-c8062203.js} +0 -0
  310. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-282cb95e.js → WEIGHT_GIRLS.zscore.weekly-c4c6e1e6.js} +0 -0
  311. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-9d5c2c49.js → WEIGHT_GIRLS.zscore.yearly-35f750e9.js} +0 -0
  312. /package/build/esm/{cookieHelper-715a63ab.js → cookieHelper-02a646ef.js} +0 -0
  313. /package/build/esm/{dataTransform-a9f8f8e1.js → dataTransform-3970f88b.js} +0 -0
  314. /package/build/esm/{index-3afa303d.js → index-2d5104c5.js} +0 -0
  315. /package/build/esm/{index-c1076bbe.js → index-4daeba4d.js} +0 -0
  316. /package/build/esm/{index-09ba8680.js → index-d74e3f4d.js} +0 -0
  317. /package/build/esm/{isProduction-0005bed8.js → isProduction-2e0a8f23.js} +0 -0
  318. /package/build/esm/{localizeNumberFormat-eee5e088.js → localizeNumberFormat-d7e41005.js} +0 -0
  319. /package/build/esm/{normalizeLink-0a824393.js → normalizeLink-78014c07.js} +0 -0
  320. /package/build/esm/{number-89aaa53f.js → number-33fd0b74.js} +0 -0
  321. /package/build/esm/{paths-d6be3159.js → paths-64d19041.js} +0 -0
  322. /package/build/esm/{screenSizeContext-5ebd7a94.js → screenSizeContext-18a2ae59.js} +0 -0
  323. /package/build/esm/{theme-11c43794.js → theme-2bdea2f5.js} +0 -0
  324. /package/build/esm/{translationsContext-66e27067.js → translationsContext-63b5cfff.js} +0 -0
  325. /package/build/esm/{tslib.es6-caf7391f.js → tslib.es6-70854b37.js} +0 -0
  326. /package/build/esm/{types-2c168c1f.js → types-4c039872.js} +0 -0
  327. /package/build/esm/{useIsInit-4dcae46f.js → useIsInit-28ed39fb.js} +0 -0
  328. /package/build/esm/{useOutsideClick-70e02ea6.js → useOutsideClick-0fb1f5b8.js} +0 -0
  329. /package/build/esm/{useScrollbarSize-e55adedb.js → useScrollbarSize-622c2c1a.js} +0 -0
  330. /package/build/{index-b0c9f344.js → index-36f0d549.js} +0 -0
  331. /package/build/{index-14a0aaa0.js → index-869fff15.js} +0 -0
  332. /package/build/{index-6b48c527.js → index-f0a00b26.js} +0 -0
  333. /package/build/{isProduction-e32c6264.js → isProduction-d688052c.js} +0 -0
  334. /package/build/{localizeNumberFormat-b4689cfc.js → localizeNumberFormat-c01aadd7.js} +0 -0
  335. /package/build/{normalizeLink-c8b10f92.js → normalizeLink-b47d5761.js} +0 -0
  336. /package/build/{number-79be583e.js → number-7e0491b4.js} +0 -0
  337. /package/build/{paths-0f77a743.js → paths-b90c2d13.js} +0 -0
  338. /package/build/{screenSizeContext-73ba8961.js → screenSizeContext-41fd163e.js} +0 -0
  339. /package/build/{theme-1f10ec25.js → theme-5779230b.js} +0 -0
  340. /package/build/{translationsContext-12eebeb5.js → translationsContext-149822d4.js} +0 -0
  341. /package/build/{tslib.es6-a7206fdf.js → tslib.es6-afbb99a9.js} +0 -0
  342. /package/build/{types-90377b59.js → types-3377b03d.js} +0 -0
  343. /package/build/{useIsInit-46f8a417.js → useIsInit-2ed8cbec.js} +0 -0
  344. /package/build/{useOutsideClick-42bd02d5.js → useOutsideClick-e2fd0c7a.js} +0 -0
  345. /package/build/{useScrollbarSize-3144238a.js → useScrollbarSize-4279aad3.js} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-a7206fdf.js"),t=require("react"),a=require("./useTranslations-d5cf41a3.js"),i=require("lodash/debounce"),o=require("./constants-c397b152.js"),l=require("./index-1d0c568a.js"),n=require("styled-components"),s=require("./index-884a509d.js"),r=require("./theme-1f10ec25.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-42bd02d5.js"),u=require("./screenSizeContext-73ba8961.js"),p=require("react-loading-skeleton"),h=require("./paths-0f77a743.js"),g=require("@mantine/core"),f=require("./index-11947038.js"),m=require("./cookieHelper-92ea0a20.js"),C=require("./index-b0c9f344.js"),b=require("./ChevronDown-ed323fc5.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(p),O=v(y);function k(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.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(f.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(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.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`
1
+ "use strict";var e=require("./tslib.es6-afbb99a9.js"),t=require("react"),a=require("./useTranslations-95cf8449.js"),i=require("lodash/debounce"),o=require("./constants-8ef08ff5.js"),l=require("./index-d9c91a7a.js"),n=require("styled-components"),s=require("./index-df9365fe.js"),r=require("./theme-5779230b.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-e2fd0c7a.js"),u=require("./screenSizeContext-41fd163e.js");require("dayjs");var p=require("./index-6b89bd1e.js");require("./isProduction-d688052c.js"),require("./Subot-781f30c5.js"),require("./gAssets.js");var h=require("react-loading-skeleton"),g=require("./paths-b90c2d13.js"),f=require("@mantine/core"),m=require("./cookieHelper-cb2c780d.js"),C=require("./index-36f0d549.js"),b=require("./ChevronDown-5b4ef88d.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: ${e=>e.theme.borderRadius};
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",Y="REMOVE_LAST_VISIBLE_NODE",q="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(q,{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===Y||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:Y,eventArgs:{removingCharacterNode:!0}});break;case q:{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:Y,eventArgs:{removingCharacterNode:!1}});t&&i.push({eventName:W,eventArgs:{speed:this.options.deleteSpeed,temp:!0}}),a.unshift(...i);break}case Y: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===Y||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`
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: ${({theme:e})=>e.colors.primaryBase};
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: ${({theme:e})=>e.colors.primaryHover};
211
+ background-color: ${r.theme.colors.primaryHover};
212
212
  }
213
213
 
214
214
  &:active {
215
- background-color: ${({theme:e})=>e.colors.primaryActive};
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: ${({theme:e})=>e.sizes.fwSemiBold};
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})))),Ye=(e,t,a)=>O.default(e,Object.assign(Object.assign({},t),{domain:f.domainLocales[a||"en-PH"]}));const qe=S.default.div``,We=S.default.div`
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:f}=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"},f("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})}},f("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(g.Skeleton,{height:48,circle:!0,mb:"xl",animate:!0})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},x.default.createElement(g.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(g.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},f("booking.searchBar.noResults"))))},pt=S.default.div`
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:f}=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(g.Input.Wrapper,null,x.default.createElement(g.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[f])||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`
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(g.Divider)`
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]),f=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(g.Skeleton,{height:40,animate:!0})),x.default.createElement("div",{className:"infor"},x.default.createElement("div",{className:"title"},x.default.createElement(g.Skeleton,{height:20,radius:"sm",animate:!0}))))))),f&&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`
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(g.Tabs,{value:e,onTabChange:e=>{l(e)},styles:n},x.default.createElement(g.Tabs.List,null,r.map((e=>x.default.createElement(g.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`
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;
package/build/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-ab83b6e8.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),exports.ELEMENT_CONTROL_INPUT_TYPE=e.ELEMENT_CONTROL_INPUT_TYPE,exports.FULL_KEY_ADDRESS=e.FULL_KEY_ADDRESS,Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"NodeActionType",{enumerable:!0,get:function(){return e.NodeActionType}}),exports.NodeFinalTypes=e.NodeFinalTypes,Object.defineProperty(exports,"NodeIntentType",{enumerable:!0,get:function(){return e.NodeIntentType}}),Object.defineProperty(exports,"NodeMultipleOptions",{enumerable:!0,get:function(){return e.NodeMultipleOptions}}),Object.defineProperty(exports,"NodePosition",{enumerable:!0,get:function(){return e.NodePosition}}),Object.defineProperty(exports,"NodeType",{enumerable:!0,get:function(){return e.NodeType}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}}),exports.SubotType=e.SubotType;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-781f30c5.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),exports.ELEMENT_CONTROL_INPUT_TYPE=e.ELEMENT_CONTROL_INPUT_TYPE,exports.FULL_KEY_ADDRESS=e.FULL_KEY_ADDRESS,Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"NodeActionType",{enumerable:!0,get:function(){return e.NodeActionType}}),exports.NodeFinalTypes=e.NodeFinalTypes,Object.defineProperty(exports,"NodeIntentType",{enumerable:!0,get:function(){return e.NodeIntentType}}),Object.defineProperty(exports,"NodeMultipleOptions",{enumerable:!0,get:function(){return e.NodeMultipleOptions}}),Object.defineProperty(exports,"NodePosition",{enumerable:!0,get:function(){return e.NodePosition}}),Object.defineProperty(exports,"NodeType",{enumerable:!0,get:function(){return e.NodeType}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}}),exports.SubotType=e.SubotType;
@@ -1 +1 @@
1
- "use strict";var e=require("react"),a=require("./Subot-ab83b6e8.js"),n=require("./useTranslations-d5cf41a3.js");const t={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},b={[a.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[a.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=b,exports.PREGNANCY_SLUG=t,exports.useCategory=a=>{const{locale:s}=n.useTranslations();return{isPregnancy:e.useMemo((()=>decodeURI(a.replace(/\//gi,"")).includes(t[s])),[]),isParenting:e.useMemo((()=>{var e;return decodeURI(a.replace(/\//gi,"")).includes(null===(e=b[s])||void 0===e?void 0:e.parenting)}),[]),type:e.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(a,b[s])),[a,s])}};
1
+ "use strict";var e=require("react"),a=require("./Subot-781f30c5.js"),n=require("./useTranslations-95cf8449.js");const t={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},b={[a.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[a.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[a.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=b,exports.PREGNANCY_SLUG=t,exports.useCategory=a=>{const{locale:s}=n.useTranslations();return{isPregnancy:e.useMemo((()=>decodeURI(a.replace(/\//gi,"")).includes(t[s])),[]),isParenting:e.useMemo((()=>{var e;return decodeURI(a.replace(/\//gi,"")).includes(null===(e=b[s])||void 0===e?void 0:e.parenting)}),[]),type:e.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(a,b[s])),[a,s])}};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-a7206fdf.js"),t=require("react"),a=require("./getDynamicHealthTool-82fe270c.js");exports.useHealthToolsCache=o=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield a.getDynamicHealthToolWithCache(o);l(e)}))}),[a.getDynamicHealthToolWithCache,o]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
1
+ "use strict";var e=require("./tslib.es6-afbb99a9.js"),t=require("react"),a=require("./getDynamicHealthTool-a7d75452.js");exports.useHealthToolsCache=o=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield a.getDynamicHealthToolWithCache(o);l(e)}))}),[a.getDynamicHealthToolWithCache,o]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-a7206fdf.js"),t=require("react");const i="undefined"==typeof window,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"};exports.GOOGLE_API_KEY="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",exports.GOOGLE_API_LANGUAGE=o,exports.usePlacesAutocomplete=(n="",r="",s="",c=500)=>{const[a,d]=t.useState([]),[u,l]=t.useState(!1);return t.useEffect((()=>{let t;return n?t=window.setTimeout((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t;if(n)try{l(!0);const c=yield((t="",n="",r="vi")=>e.__awaiter(void 0,void 0,void 0,(function*(){return new Promise(((e,s)=>{if(!t)return s("Need valid text input");if(i)return s("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},n?{componentRestrictions:{country:n}}:{}),{language:o[r]}),e)}catch(e){s(e)}}))})))(n,r,s);d(!(t=c)||t.length<1?[]:t.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{l(!1)}else d([])}))),c):a.length&&d([]),()=>{window.clearTimeout(t)}}),[n,c,r]),{isLoading:u,predictions:a}};
1
+ "use strict";var e=require("./tslib.es6-afbb99a9.js"),t=require("react");const i="undefined"==typeof window,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"};exports.GOOGLE_API_KEY="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",exports.GOOGLE_API_LANGUAGE=o,exports.usePlacesAutocomplete=(n="",r="",s="",c=500)=>{const[a,d]=t.useState([]),[u,l]=t.useState(!1);return t.useEffect((()=>{let t;return n?t=window.setTimeout((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t;if(n)try{l(!0);const c=yield((t="",n="",r="vi")=>e.__awaiter(void 0,void 0,void 0,(function*(){return new Promise(((e,s)=>{if(!t)return s("Need valid text input");if(i)return s("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},n?{componentRestrictions:{country:n}}:{}),{language:o[r]}),e)}catch(e){s(e)}}))})))(n,r,s);d(!(t=c)||t.length<1?[]:t.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{l(!1)}else d([])}))),c):a.length&&d([]),()=>{window.clearTimeout(t)}}),[n,c,r]),{isLoading:u,predictions:a}};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-a7206fdf.js"),t=require("react"),r=require("./cookieHelper-92ea0a20.js"),n=require("./useTranslations-d5cf41a3.js");function i(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}exports.useFbDataLayer=n=>{const a=t.useRef("");t.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,o,l,u;if(!a.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),a.current=e}if(null===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(o=a.current)||void 0===o?void 0:o.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==n?void 0:n.id){const[e,t,a,o,s,c]=yield Promise.all([n.email?i(n.email):null,n.phone?i(n.phone):null,n.birthday?i(n.birthday.split("-").join("")):null,n.gender?"m":"f",n.city_name?i(n.city_name).then((e=>e.replace(/\s/g,""))):null,n.name?i(n.name):null]);r.getCookie("_fbc"),r.getCookie("_fbp");const d={user_id:n.id};c&&(d.fn=c),e&&(d.em=e),t&&(d.ph=t),a&&(d.db=a),s&&(d.ct=s),null===(u=null===(l=window.localStorage)||void 0===l?void 0:l.setItem)||void 0===u||u.call(l,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[n])},exports.usePrevious=e=>{const r=t.useRef(),i=t.useRef(e);return n.useInitialMount()||i.current===e||(r.current=i.current,i.current=e),r.current},exports.useRafState=e=>{const[r,n]=t.useState(e),i=t.useRef(0),a=t.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{n(e)}))}),[]);return t.useEffect((()=>()=>cancelAnimationFrame(i.current))),[r,a]};
1
+ "use strict";var e=require("./tslib.es6-afbb99a9.js"),t=require("react"),r=require("./cookieHelper-cb2c780d.js"),n=require("./useTranslations-95cf8449.js");function i(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}exports.useFbDataLayer=n=>{const a=t.useRef("");t.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,o,l,u;if(!a.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),a.current=e}if(null===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(o=a.current)||void 0===o?void 0:o.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==n?void 0:n.id){const[e,t,a,o,c,s]=yield Promise.all([n.email?i(n.email):null,n.phone?i(n.phone):null,n.birthday?i(n.birthday.split("-").join("")):null,n.gender?"m":"f",n.city_name?i(n.city_name).then((e=>e.replace(/\s/g,""))):null,n.name?i(n.name):null]);r.getCookie("_fbc"),r.getCookie("_fbp");const d={user_id:n.id};s&&(d.fn=s),e&&(d.em=e),t&&(d.ph=t),a&&(d.db=a),c&&(d.ct=c),null===(u=null===(l=window.localStorage)||void 0===l?void 0:l.setItem)||void 0===u||u.call(l,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[n])},exports.usePrevious=e=>{const r=t.useRef(),i=t.useRef(e);return n.useInitialMount()||i.current===e||(r.current=i.current,i.current=e),r.current},exports.useRafState=e=>{const[r,n]=t.useState(e),i=t.useRef(0),a=t.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{n(e)}))}),[]);return t.useEffect((()=>()=>cancelAnimationFrame(i.current))),[r,a]};
@@ -1 +1 @@
1
- "use strict";var e=require("react"),t=require("./translationsContext-12eebeb5.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(require("string-format"));const s=()=>{const t=e.useRef(!0);return!!t.current&&(t.current=!1,!0)};let o=0;exports.useInitialMount=s,exports.useTranslations=function(){const{values:n,locale:s}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>n?n[e]?t?r.default(n[e]||e,t):n[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${s}`),t?r.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:s})),[n,s])},exports.useUniqueId=()=>{const t=e.useRef("");return s()&&(o+=1,t.current=`hhg-gen-id${o}`),t.current};
1
+ "use strict";var e=require("react"),t=require("./translationsContext-149822d4.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(require("string-format"));const s=()=>{const t=e.useRef(!0);return!!t.current&&(t.current=!1,!0)};let o=0;exports.useInitialMount=s,exports.useTranslations=function(){const{values:n,locale:s}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>n?n[e]?t?r.default(n[e]||e,t):n[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${s}`),t?r.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:s})),[n,s])},exports.useUniqueId=()=>{const t=e.useRef("");return s()&&(o+=1,t.current=`hhg-gen-id${o}`),t.current};
@@ -0,0 +1 @@
1
+ "use strict";var i=require("./Subot-781f30c5.js");const a={[i.LOCALE.Vietnam]:"VN",[i.LOCALE.Cambodia]:"KH",[i.LOCALE.Indonesia]:"ID",[i.LOCALE.Malaysia]:"MY",[i.LOCALE.PhilippinesEnglish]:"PH",[i.LOCALE.PhilippinesTagalog]:"PH",[i.LOCALE.Taiwan]:"TW",[i.LOCALE.Thailand]:"TH",[i.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=a,exports.hiddenEmailChar=(i="")=>{const a=i.indexOf("@"),L=i.substring(0,a),e=L.length>3?3:L.length;return i.replace(i.substring(e,a),i.slice(e,a).replace(/./g,"x"))};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react"),t=require("./gAssets.js"),s=require("./index-63e33ff2.js"),r=require("./Subot-781f30c5.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e);const n=e.memo((({type:r,width:a,height:n})=>{const h=e.useMemo((()=>{switch(r){case"hellobacsi":return{width:a||"107px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/hellobacsi.png")};case"hellodoktor":return{width:a||"127px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:a||"121px",height:n||"27px",src:t.CommonGAssets.getAssetPath("logo/hellosehat.png")};case"hellohealth":return{width:a||"123px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:a||"150px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:a||"99px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:a||"127px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:a||"101px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:a||"111px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:a||"89px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:a||"123px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:a||"105px",height:n||"24px",src:t.CommonGAssets.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:a||"60px",height:n||"57px",src:t.CommonGAssets.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:a||"145px",height:n||"28px",src:t.CommonGAssets.getAssetPath("logo/marrybaby.png")};default:return null}}),[r,a,n]),{src:l,width:g,height:i}=h||{};return o.default.createElement(s.ImageWrap,{alt:`${r} logo`,className:"main-logo-icon",src:l,style:{width:g,height:i}})})),h={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},l=[r.LOCALE.Vietnam,r.LOCALE.Taiwan,r.LOCALE.Indonesia,r.LOCALE.Malaysia],g=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],i={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]};exports.LogoIcon=n,exports.LunarNewYearLocale=l,exports.isChristmas=e=>{const t=e.getDate();return 11===e.getMonth()&&t>=16&&t<=25},exports.isLabourDay=e=>{const t=e.getFullYear(),s=new Date(t,4,1),r=new Date(s);r.setDate(s.getDate()-1);const a=new Date(s);return a.setDate(s.getDate()+1),r<=e&&e<=a},exports.isLunarNewYear=e=>{const t=e.getFullYear(),s=h[t];if(!s)return!1;const r=new Date(t,s[1],s[0]),a=new Date(r);a.setDate(r.getDate()-7);const o=new Date(r);return o.setDate(r.getDate()+5),a<=e&&e<=o},exports.isNewYear=e=>{const t=e.getDate(),s=e.getMonth();return 11===s&&t>=26||0===s&&t<=15},exports.isRamadan=e=>{const t=e.getFullYear(),s=g.filter((e=>e.year===t));return!!s.length&&s.some((s=>{const r=s.start[2]||t,a=new Date(r,s.start[1],s.start[0]),o=new Date(r,s.end[1],s.end[0]);return a<=e&&e<=o}))},exports.isVN3004=e=>{const t=e.getFullYear(),s=new Date(t,3,30),r=new Date(s);r.setDate(s.getDate()-1);const a=new Date(s);return a.setDate(s.getDate()+2),r<=e&&e<=a},exports.isVNHungKing=e=>{const t=e.getFullYear(),s=i[t];if(!s)return!1;const r=new Date(t,s[1],s[0]),a=new Date(r);a.setDate(r.getDate()-1);const o=new Date(r);return o.setDate(r.getDate()+1),a<=e&&e<=o};