@hhgtech/hhg-components 1.28.39 → 1.28.40

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 (277) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +2 -1
  4. package/build/care.js +1 -1
  5. package/build/components.js +1 -1
  6. package/build/{constants-57d89069.js → constants-20b167d2.js} +1 -1
  7. package/build/{constants-82348c13.js → constants-e7c8985f.js} +1 -1
  8. package/build/constants.js +1 -1
  9. package/build/{core-081bdce5.js → core-ca200210.js} +1 -1
  10. package/build/ecom.js +1 -1
  11. package/build/esm/babyGrowth.js +4 -4
  12. package/build/esm/cache.js +1 -1
  13. package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +2 -1
  14. package/build/esm/care.js +1 -1
  15. package/build/esm/components.js +1 -1
  16. package/build/esm/{constants-0d46ae1d.js → constants-95cb8ea0.js} +1 -1
  17. package/build/esm/{constants-039f36fe.js → constants-bcabc622.js} +1 -1
  18. package/build/esm/constants.js +1 -1
  19. package/build/esm/{core-3c0d6b0f.js → core-ac4e85c7.js} +1 -1
  20. package/build/esm/ecom.js +1 -1
  21. package/build/esm/footer.js +1 -1
  22. package/build/esm/gAssets.js +1 -1
  23. package/build/esm/{getDynamicHealthTool-d874b77f.js → getDynamicHealthTool-00faa2c1.js} +1 -1
  24. package/build/esm/{getSocialList-5ea15cba.js → getSocialList-1248c74c.js} +1 -1
  25. package/build/esm/hooks.js +1 -1
  26. package/build/esm/i18n.js +1 -1
  27. package/build/esm/i18nV2.js +1 -1
  28. package/build/esm/{index-8dfb1724.js → index-02f0f4fe.js} +1 -1
  29. package/build/esm/{index-14839883.js → index-13feb3ef.js} +1 -1
  30. package/build/esm/{index-8db07311.js → index-14780cf0.js} +1 -1
  31. package/build/esm/{index-282bbb6d.js → index-15efeba7.js} +1 -1
  32. package/build/esm/{index-5ecfac85.js → index-19144b5a.js} +1 -1
  33. package/build/esm/index-1fc7e785.js +1 -0
  34. package/build/esm/{index-e17cd802.js → index-212c6a21.js} +1 -1
  35. package/build/esm/{index-0e6dbcc0.js → index-428d1aeb.js} +1 -1
  36. package/build/esm/{index-6795099e.js → index-4e8c3bb6.js} +1 -1
  37. package/build/esm/index-53ef56cd.js +1 -0
  38. package/build/esm/{index-20b84b31.js → index-6aeb538e.js} +1 -1
  39. package/build/esm/{index-7d0179b5.js → index-941eb658.js} +1 -1
  40. package/build/esm/{index-f1ff7dac.js → index-a5e07868.js} +1 -1
  41. package/build/esm/index-c7ee8e8e.js +1 -0
  42. package/build/esm/{index-434197c4.js → index-d6b66097.js} +1 -1
  43. package/build/esm/{index-1ac72931.js → index-dde41fb0.js} +1 -1
  44. package/build/esm/{index-5761cc3d.js → index-e0365fb2.js} +1 -1
  45. package/build/esm/{index-dff74895.js → index-e28d801c.js} +1 -1
  46. package/build/esm/{index-fa32b4d8.js → index-e751d8c2.js} +1 -1
  47. package/build/esm/{index-c70696a6.js → index-eace0e39.js} +1 -1
  48. package/build/esm/{index-622dbaca.js → index-f2ede565.js} +1 -1
  49. package/build/esm/{index-3d1ca95c.js → index-f4f05774.js} +1 -1
  50. package/build/esm/index.js +1 -1
  51. package/build/esm/{index.styled-e26007df.js → index.styled-4a4ab4d3.js} +6 -6
  52. package/build/esm/{index.styled-a1854a4a.js → index.styled-7f374882.js} +1 -1
  53. package/build/esm/{index.styled-ede7c10d.js → index.styled-cadd6706.js} +1 -1
  54. package/build/esm/{index.styled-90fe28c0.js → index.styled-d760ce2f.js} +3 -3
  55. package/build/esm/{index.styles-95837b62.js → index.styles-3036321c.js} +6 -6
  56. package/build/esm/lead.js +1 -1
  57. package/build/esm/mantine.js +1 -1
  58. package/build/esm/misc.js +1 -1
  59. package/build/esm/navigation.js +1 -1
  60. package/build/esm/onboardingV2.js +9 -9
  61. package/build/esm/pwg.js +3 -3
  62. package/build/esm/{routing-7c32cdb3.js → routing-0284bf36.js} +1 -1
  63. package/build/esm/subot.js +1 -1
  64. package/build/esm/together.js +1 -1
  65. package/build/esm/{types-c5a3b173.js → types-553958a6.js} +7 -7
  66. package/build/esm/{types-d466572e.js → types-b8611d30.js} +1 -1
  67. package/build/esm/types.js +1 -1
  68. package/build/esm/{useCategory-702b6604.js → useCategory-b6426a83.js} +1 -1
  69. package/build/esm/useHealthToolCache-9185d66c.js +1 -0
  70. package/build/esm/{usePlacesAutocomplete-d14c4671.js → usePlacesAutocomplete-12181fb9.js} +1 -1
  71. package/build/esm/{useRafState-1ba3edb3.js → useRafState-652131c8.js} +1 -1
  72. package/build/esm/{useTranslations-51dc4ab8.js → useTranslations-e0f5679c.js} +1 -1
  73. package/build/esm/{utils-8849cc57.js → utils-0347b372.js} +1 -1
  74. package/build/esm/{utils-b2a0d664.js → utils-f65c59d5.js} +1 -1
  75. package/build/esm/vaccination.js +1 -1
  76. package/build/footer.js +1 -1
  77. package/build/gAssets.js +1 -1
  78. package/build/getDynamicHealthTool-765ca7ef.js +1 -0
  79. package/build/{getSocialList-55a29d3a.js → getSocialList-1ec4bb1e.js} +1 -1
  80. package/build/hooks.js +1 -1
  81. package/build/i18n.js +1 -1
  82. package/build/i18nV2.js +1 -1
  83. package/build/{index-511b99c0.js → index-0dfb02fc.js} +1 -1
  84. package/build/{index-80a776c5.js → index-1411d846.js} +1 -1
  85. package/build/{index-557f79d9.js → index-16f49c45.js} +1 -1
  86. package/build/{index-dd161fb0.js → index-27fce9f9.js} +1 -1
  87. package/build/{index-1cc9c0e2.js → index-2e6dbe21.js} +1 -1
  88. package/build/{index-543b2956.js → index-32a73461.js} +1 -1
  89. package/build/{index-70fc6801.js → index-3824cae4.js} +1 -1
  90. package/build/{index-f20a3b0b.js → index-3b70c7c6.js} +1 -1
  91. package/build/{index-cbb25109.js → index-417895f0.js} +1 -1
  92. package/build/{index-192c3976.js → index-48cdf99f.js} +1 -1
  93. package/build/{index-cda192d8.js → index-67c1fe30.js} +1 -1
  94. package/build/{index-9686d73a.js → index-8919cdee.js} +1 -1
  95. package/build/{index-e23393d6.js → index-9b5898bd.js} +1 -1
  96. package/build/{index-2744bd7d.js → index-a604bf78.js} +1 -1
  97. package/build/index-ccd99d7b.js +1 -0
  98. package/build/index-d681911b.js +1 -0
  99. package/build/{index-505a6231.js → index-d79b83e7.js} +3 -3
  100. package/build/{index-8a4e8200.js → index-e387ee43.js} +1 -1
  101. package/build/{index-e4732cde.js → index-e393d84f.js} +1 -1
  102. package/build/{index-5a09ea5b.js → index-e94212a5.js} +1 -1
  103. package/build/{index-566d616e.js → index-f0b22b20.js} +1 -1
  104. package/build/{index-5537eb8b.js → index-f65612b1.js} +1 -1
  105. package/build/index.js +1 -1
  106. package/build/{index.styled-bf702a00.js → index.styled-38621c5f.js} +1 -1
  107. package/build/{index.styled-95722c0d.js → index.styled-6220e760.js} +1 -1
  108. package/build/{index.styled-edaa5fca.js → index.styled-9dd14387.js} +1 -1
  109. package/build/index.styled-f6dc3372.js +50 -0
  110. package/build/{index.styles-eee657e0.js → index.styles-3ab75ee6.js} +1 -1
  111. package/build/lead.js +1 -1
  112. package/build/mantine.js +1 -1
  113. package/build/misc.js +1 -1
  114. package/build/navigation.js +1 -1
  115. package/build/onboardingV2.js +1 -1
  116. package/build/pwg.js +3 -3
  117. package/build/{routing-d19d8856.js → routing-404b0db3.js} +1 -1
  118. package/build/subot.js +1 -1
  119. package/build/together.js +1 -1
  120. package/build/{types-ec42e31c.js → types-422e65f8.js} +1 -1
  121. package/build/{types-e7648820.js → types-af0c33af.js} +9 -9
  122. package/build/types.js +1 -1
  123. package/build/{useCategory-15d34903.js → useCategory-bf09d2fa.js} +1 -1
  124. package/build/{useHealthToolCache-af770568.js → useHealthToolCache-a13afe89.js} +1 -1
  125. package/build/{usePlacesAutocomplete-24621567.js → usePlacesAutocomplete-38246a89.js} +1 -1
  126. package/build/{useRafState-80bb67ea.js → useRafState-816567d2.js} +1 -1
  127. package/build/{useTranslations-2e112ad4.js → useTranslations-58ee3b9e.js} +1 -1
  128. package/build/{utils-6f3d330e.js → utils-119b98c5.js} +1 -1
  129. package/build/{utils-a167e7a3.js → utils-660ff29e.js} +1 -1
  130. package/build/vaccination.js +1 -1
  131. package/package.json +1 -1
  132. package/build/esm/index-1be91706.js +0 -1
  133. package/build/esm/index-65d31851.js +0 -1
  134. package/build/esm/index-c7136b2d.js +0 -1
  135. package/build/esm/useHealthToolCache-1290f2b9.js +0 -1
  136. package/build/getDynamicHealthTool-12e2540d.js +0 -1
  137. package/build/index-86314983.js +0 -1
  138. package/build/index-b983594e.js +0 -1
  139. package/build/index.styled-7c52b155.js +0 -50
  140. /package/build/{BMI_BOYS.percentile.monthly-1abf1841.js → BMI_BOYS.percentile.monthly-2be7494b.js} +0 -0
  141. /package/build/{BMI_BOYS.percentile.weekly-a8aff425.js → BMI_BOYS.percentile.weekly-a476da14.js} +0 -0
  142. /package/build/{BMI_BOYS.percentile.yearly-c73321bb.js → BMI_BOYS.percentile.yearly-47264daf.js} +0 -0
  143. /package/build/{BMI_BOYS.zscore.monthly-69a99c2a.js → BMI_BOYS.zscore.monthly-def07248.js} +0 -0
  144. /package/build/{BMI_BOYS.zscore.weekly-f990fa6a.js → BMI_BOYS.zscore.weekly-5bae230f.js} +0 -0
  145. /package/build/{BMI_BOYS.zscore.yearly-ed65c22b.js → BMI_BOYS.zscore.yearly-13085083.js} +0 -0
  146. /package/build/{BMI_GIRLS.percentile.monthly-4c7cb156.js → BMI_GIRLS.percentile.monthly-f5b552ef.js} +0 -0
  147. /package/build/{BMI_GIRLS.percentile.weekly-d570954a.js → BMI_GIRLS.percentile.weekly-078c93d8.js} +0 -0
  148. /package/build/{BMI_GIRLS.percentile.yearly-61a85bc5.js → BMI_GIRLS.percentile.yearly-79661652.js} +0 -0
  149. /package/build/{BMI_GIRLS.zscore.monthly-f20b70e4.js → BMI_GIRLS.zscore.monthly-8a4e6815.js} +0 -0
  150. /package/build/{BMI_GIRLS.zscore.weekly-178a1989.js → BMI_GIRLS.zscore.weekly-ed0b7994.js} +0 -0
  151. /package/build/{BMI_GIRLS.zscore.yearly-88ad18e5.js → BMI_GIRLS.zscore.yearly-8d875256.js} +0 -0
  152. /package/build/{ChevronDown-3037c172.js → ChevronDown-a220d6bf.js} +0 -0
  153. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-56a4402b.js → HEAD CIRCUM_BOYS.percentile.monthly-81c35b36.js} +0 -0
  154. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-ccf3c87f.js → HEAD CIRCUM_BOYS.percentile.weekly-0ade78bd.js} +0 -0
  155. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-2b9916f6.js → HEAD CIRCUM_BOYS.percentile.yearly-5166fc6d.js} +0 -0
  156. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-bc3fdf65.js → HEAD CIRCUM_BOYS.zscore.monthly-105ecbce.js} +0 -0
  157. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-a3275cbb.js → HEAD CIRCUM_BOYS.zscore.weekly-3c03bbb6.js} +0 -0
  158. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-424de02b.js → HEAD CIRCUM_BOYS.zscore.yearly-f9c772b7.js} +0 -0
  159. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-31cf5774.js → HEAD CIRCUM_GIRLS.percentile.monthly-6d84e295.js} +0 -0
  160. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-56bc87df.js → HEAD CIRCUM_GIRLS.percentile.weekly-52253e24.js} +0 -0
  161. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-d495ae77.js → HEAD CIRCUM_GIRLS.percentile.yearly-7f23d028.js} +0 -0
  162. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-389b52dc.js → HEAD CIRCUM_GIRLS.zscore.monthly-9cd318a0.js} +0 -0
  163. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-545c913f.js → HEAD CIRCUM_GIRLS.zscore.weekly-ab38e511.js} +0 -0
  164. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-25153e42.js → HEAD CIRCUM_GIRLS.zscore.yearly-d3160e92.js} +0 -0
  165. /package/build/{HEIGHT_BOYS.percentile.monthly-a0167766.js → HEIGHT_BOYS.percentile.monthly-5acc24fe.js} +0 -0
  166. /package/build/{HEIGHT_BOYS.percentile.weekly-fe6c86b4.js → HEIGHT_BOYS.percentile.weekly-569a97bd.js} +0 -0
  167. /package/build/{HEIGHT_BOYS.percentile.yearly-b5f70609.js → HEIGHT_BOYS.percentile.yearly-42642e47.js} +0 -0
  168. /package/build/{HEIGHT_BOYS.zscore.monthly-69050519.js → HEIGHT_BOYS.zscore.monthly-65dbd7fb.js} +0 -0
  169. /package/build/{HEIGHT_BOYS.zscore.weekly-086ed503.js → HEIGHT_BOYS.zscore.weekly-0d17c4ae.js} +0 -0
  170. /package/build/{HEIGHT_BOYS.zscore.yearly-ea1fd110.js → HEIGHT_BOYS.zscore.yearly-27b8768a.js} +0 -0
  171. /package/build/{HEIGHT_GIRLS.percentile.monthly-04393cf7.js → HEIGHT_GIRLS.percentile.monthly-cd7488f2.js} +0 -0
  172. /package/build/{HEIGHT_GIRLS.percentile.weekly-309dd221.js → HEIGHT_GIRLS.percentile.weekly-43ff1254.js} +0 -0
  173. /package/build/{HEIGHT_GIRLS.percentile.yearly-3fe7b9fc.js → HEIGHT_GIRLS.percentile.yearly-43e4aff0.js} +0 -0
  174. /package/build/{HEIGHT_GIRLS.zscore.monthly-a274d11d.js → HEIGHT_GIRLS.zscore.monthly-31f100f4.js} +0 -0
  175. /package/build/{HEIGHT_GIRLS.zscore.weekly-832a2702.js → HEIGHT_GIRLS.zscore.weekly-79fb01f3.js} +0 -0
  176. /package/build/{HEIGHT_GIRLS.zscore.yearly-e1250f72.js → HEIGHT_GIRLS.zscore.yearly-bdfde055.js} +0 -0
  177. /package/build/{Subot-b76ccc9c.js → Subot-9d5418e4.js} +0 -0
  178. /package/build/{Visible-a902bc5d.js → Visible-5f2e5d2d.js} +0 -0
  179. /package/build/{WEIGHT_BOYS.percentile.monthly-6aee36d0.js → WEIGHT_BOYS.percentile.monthly-5e8b69e3.js} +0 -0
  180. /package/build/{WEIGHT_BOYS.percentile.weekly-84a9ddf3.js → WEIGHT_BOYS.percentile.weekly-f0dc4f4e.js} +0 -0
  181. /package/build/{WEIGHT_BOYS.percentile.yearly-6a5235a6.js → WEIGHT_BOYS.percentile.yearly-94cb010e.js} +0 -0
  182. /package/build/{WEIGHT_BOYS.zscore.monthly-7b87e89a.js → WEIGHT_BOYS.zscore.monthly-53bc9947.js} +0 -0
  183. /package/build/{WEIGHT_BOYS.zscore.weekly-7dc34a8b.js → WEIGHT_BOYS.zscore.weekly-6ea5cde9.js} +0 -0
  184. /package/build/{WEIGHT_BOYS.zscore.yearly-8cde12c0.js → WEIGHT_BOYS.zscore.yearly-f37e5962.js} +0 -0
  185. /package/build/{WEIGHT_GIRLS.percentile.monthly-c1117e84.js → WEIGHT_GIRLS.percentile.monthly-a0af2262.js} +0 -0
  186. /package/build/{WEIGHT_GIRLS.percentile.weekly-5da1d720.js → WEIGHT_GIRLS.percentile.weekly-1c11854b.js} +0 -0
  187. /package/build/{WEIGHT_GIRLS.percentile.yearly-a23ec4ec.js → WEIGHT_GIRLS.percentile.yearly-c84a146d.js} +0 -0
  188. /package/build/{WEIGHT_GIRLS.zscore.monthly-2f26e279.js → WEIGHT_GIRLS.zscore.monthly-6c42d8ac.js} +0 -0
  189. /package/build/{WEIGHT_GIRLS.zscore.weekly-8b0a38e9.js → WEIGHT_GIRLS.zscore.weekly-f6ac49b3.js} +0 -0
  190. /package/build/{WEIGHT_GIRLS.zscore.yearly-8bad89fe.js → WEIGHT_GIRLS.zscore.yearly-53a8fb67.js} +0 -0
  191. /package/build/{cookieHelper-edf24fec.js → cookieHelper-24b1f061.js} +0 -0
  192. /package/build/{dataTransform-e2f61d60.js → dataTransform-e795262f.js} +0 -0
  193. /package/build/esm/{BMI_BOYS.percentile.monthly-b9ab85f0.js → BMI_BOYS.percentile.monthly-90e8d51b.js} +0 -0
  194. /package/build/esm/{BMI_BOYS.percentile.weekly-ef82192f.js → BMI_BOYS.percentile.weekly-0f155cb8.js} +0 -0
  195. /package/build/esm/{BMI_BOYS.percentile.yearly-183654c8.js → BMI_BOYS.percentile.yearly-24097fcb.js} +0 -0
  196. /package/build/esm/{BMI_BOYS.zscore.monthly-6eda6e64.js → BMI_BOYS.zscore.monthly-c874926b.js} +0 -0
  197. /package/build/esm/{BMI_BOYS.zscore.weekly-2e5db2e4.js → BMI_BOYS.zscore.weekly-f82f54d5.js} +0 -0
  198. /package/build/esm/{BMI_BOYS.zscore.yearly-89b97ccc.js → BMI_BOYS.zscore.yearly-e86e6196.js} +0 -0
  199. /package/build/esm/{BMI_GIRLS.percentile.monthly-c2dca76b.js → BMI_GIRLS.percentile.monthly-b5f00f2c.js} +0 -0
  200. /package/build/esm/{BMI_GIRLS.percentile.weekly-3db696ed.js → BMI_GIRLS.percentile.weekly-0160255f.js} +0 -0
  201. /package/build/esm/{BMI_GIRLS.percentile.yearly-d3831386.js → BMI_GIRLS.percentile.yearly-49fd6692.js} +0 -0
  202. /package/build/esm/{BMI_GIRLS.zscore.monthly-9cef6f5e.js → BMI_GIRLS.zscore.monthly-c33b9640.js} +0 -0
  203. /package/build/esm/{BMI_GIRLS.zscore.weekly-78f3bce3.js → BMI_GIRLS.zscore.weekly-8dc83438.js} +0 -0
  204. /package/build/esm/{BMI_GIRLS.zscore.yearly-50c1c22d.js → BMI_GIRLS.zscore.yearly-1dbbb382.js} +0 -0
  205. /package/build/esm/{ChevronDown-38081c52.js → ChevronDown-8da7a294.js} +0 -0
  206. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-768e0230.js → HEAD CIRCUM_BOYS.percentile.monthly-ebfdafc9.js} +0 -0
  207. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-68c28fef.js → HEAD CIRCUM_BOYS.percentile.weekly-27229ddd.js} +0 -0
  208. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-79c477be.js → HEAD CIRCUM_BOYS.percentile.yearly-ea484f34.js} +0 -0
  209. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-c22a6bb8.js → HEAD CIRCUM_BOYS.zscore.monthly-b98df2be.js} +0 -0
  210. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-fa0c45de.js → HEAD CIRCUM_BOYS.zscore.weekly-b542bf2d.js} +0 -0
  211. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-fd828878.js → HEAD CIRCUM_BOYS.zscore.yearly-1f5e4d0b.js} +0 -0
  212. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-0e370871.js → HEAD CIRCUM_GIRLS.percentile.monthly-36881b4b.js} +0 -0
  213. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-f4708552.js → HEAD CIRCUM_GIRLS.percentile.weekly-0535db6d.js} +0 -0
  214. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-dfb103cf.js → HEAD CIRCUM_GIRLS.percentile.yearly-018ff807.js} +0 -0
  215. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-3ee0be1b.js → HEAD CIRCUM_GIRLS.zscore.monthly-c1dbe313.js} +0 -0
  216. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-44bcc793.js → HEAD CIRCUM_GIRLS.zscore.weekly-cd22e813.js} +0 -0
  217. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-a1027497.js → HEAD CIRCUM_GIRLS.zscore.yearly-6a9ea565.js} +0 -0
  218. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-02e472da.js → HEIGHT_BOYS.percentile.monthly-8e6a0752.js} +0 -0
  219. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-0680ad0c.js → HEIGHT_BOYS.percentile.weekly-ceabde0e.js} +0 -0
  220. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-6f8aae30.js → HEIGHT_BOYS.percentile.yearly-28d17801.js} +0 -0
  221. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-c4cd5e14.js → HEIGHT_BOYS.zscore.monthly-5ce17623.js} +0 -0
  222. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-44a38e55.js → HEIGHT_BOYS.zscore.weekly-d758fae7.js} +0 -0
  223. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-07fc5764.js → HEIGHT_BOYS.zscore.yearly-d11d3f15.js} +0 -0
  224. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-747f685b.js → HEIGHT_GIRLS.percentile.monthly-31f4a828.js} +0 -0
  225. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-f8a8a438.js → HEIGHT_GIRLS.percentile.weekly-735778e7.js} +0 -0
  226. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-19c6a95d.js → HEIGHT_GIRLS.percentile.yearly-1eabd968.js} +0 -0
  227. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-a70d26ec.js → HEIGHT_GIRLS.zscore.monthly-8b8612b9.js} +0 -0
  228. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-80c3120b.js → HEIGHT_GIRLS.zscore.weekly-b8a53c59.js} +0 -0
  229. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-55b48c0f.js → HEIGHT_GIRLS.zscore.yearly-bc15c84f.js} +0 -0
  230. /package/build/esm/{Subot-f581f4df.js → Subot-7ea674b0.js} +0 -0
  231. /package/build/esm/{Visible-773a840f.js → Visible-247d254f.js} +0 -0
  232. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-c7365e22.js → WEIGHT_BOYS.percentile.monthly-f08f1fd2.js} +0 -0
  233. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-5d62ee47.js → WEIGHT_BOYS.percentile.weekly-fbaf9e3d.js} +0 -0
  234. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-90eef9c4.js → WEIGHT_BOYS.percentile.yearly-d64145ca.js} +0 -0
  235. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-39cb41e2.js → WEIGHT_BOYS.zscore.monthly-f239897a.js} +0 -0
  236. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-1fd3816a.js → WEIGHT_BOYS.zscore.weekly-1a2e5a33.js} +0 -0
  237. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-91994e22.js → WEIGHT_BOYS.zscore.yearly-034538fa.js} +0 -0
  238. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-8803f9b5.js → WEIGHT_GIRLS.percentile.monthly-39819cdb.js} +0 -0
  239. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-ec6c8a49.js → WEIGHT_GIRLS.percentile.weekly-15569768.js} +0 -0
  240. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-0e9334c7.js → WEIGHT_GIRLS.percentile.yearly-9f519921.js} +0 -0
  241. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-031167a3.js → WEIGHT_GIRLS.zscore.monthly-c0a9a7aa.js} +0 -0
  242. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-36d7530c.js → WEIGHT_GIRLS.zscore.weekly-23c1cce3.js} +0 -0
  243. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-93c90f87.js → WEIGHT_GIRLS.zscore.yearly-9a088bbf.js} +0 -0
  244. /package/build/esm/{cookieHelper-1491c7ea.js → cookieHelper-0d554a3d.js} +0 -0
  245. /package/build/esm/{dataTransform-9bceddac.js → dataTransform-cf3f3aee.js} +0 -0
  246. /package/build/esm/{index-0797d3cb.js → index-96308c0d.js} +0 -0
  247. /package/build/esm/{index-2f243424.js → index-c26145e4.js} +0 -0
  248. /package/build/esm/{index-bbf78608.js → index-e4c49b57.js} +0 -0
  249. /package/build/esm/{isProduction-d8d94564.js → isProduction-d0d81279.js} +0 -0
  250. /package/build/esm/{localizeNumberFormat-3657ce11.js → localizeNumberFormat-1e3158ab.js} +0 -0
  251. /package/build/esm/{normalizeLink-7259b86a.js → normalizeLink-409cf3bf.js} +0 -0
  252. /package/build/esm/{number-a14a26d2.js → number-f57dcbd1.js} +0 -0
  253. /package/build/esm/{paths-80d2b4f2.js → paths-f6ce774b.js} +0 -0
  254. /package/build/esm/{screenSizeContext-f9a53919.js → screenSizeContext-8f042934.js} +0 -0
  255. /package/build/esm/{theme-9d69f1a2.js → theme-c254ba9f.js} +0 -0
  256. /package/build/esm/{translationsContext-a929820e.js → translationsContext-f66e3d3d.js} +0 -0
  257. /package/build/esm/{tslib.es6-7b491686.js → tslib.es6-1a7e483e.js} +0 -0
  258. /package/build/esm/{types-c4843c87.js → types-062901c3.js} +0 -0
  259. /package/build/esm/{useIsInit-36546b9c.js → useIsInit-db1c31df.js} +0 -0
  260. /package/build/esm/{useOutsideClick-78141983.js → useOutsideClick-bfa18062.js} +0 -0
  261. /package/build/esm/{useScrollbarSize-30b1bee4.js → useScrollbarSize-611c8d35.js} +0 -0
  262. /package/build/{index-ff51ac26.js → index-1b69057d.js} +0 -0
  263. /package/build/{index-0251e5f0.js → index-cd030832.js} +0 -0
  264. /package/build/{index-af3f2c07.js → index-e6e3941f.js} +0 -0
  265. /package/build/{isProduction-fa856154.js → isProduction-e1ad6827.js} +0 -0
  266. /package/build/{localizeNumberFormat-118c54b5.js → localizeNumberFormat-7e1dae02.js} +0 -0
  267. /package/build/{normalizeLink-b898d874.js → normalizeLink-adb3417c.js} +0 -0
  268. /package/build/{number-e86b559d.js → number-995e468a.js} +0 -0
  269. /package/build/{paths-bbbcac69.js → paths-f7c2f1d1.js} +0 -0
  270. /package/build/{screenSizeContext-478cce5e.js → screenSizeContext-66416462.js} +0 -0
  271. /package/build/{theme-1481c80b.js → theme-675875f1.js} +0 -0
  272. /package/build/{translationsContext-e83c75a5.js → translationsContext-37b57080.js} +0 -0
  273. /package/build/{tslib.es6-524ea691.js → tslib.es6-af7c5340.js} +0 -0
  274. /package/build/{types-5ceae17e.js → types-8f4d78a7.js} +0 -0
  275. /package/build/{useIsInit-b0daf2cf.js → useIsInit-3c899c10.js} +0 -0
  276. /package/build/{useOutsideClick-abc52969.js → useOutsideClick-44c908eb.js} +0 -0
  277. /package/build/{useScrollbarSize-251ab8f8.js → useScrollbarSize-aef8017d.js} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-524ea691.js"),t=require("react"),a=require("./useTranslations-2e112ad4.js"),i=require("lodash/debounce"),o=require("./constants-82348c13.js"),l=require("./index-1cc9c0e2.js"),n=require("styled-components"),s=require("./index-70fc6801.js"),r=require("./theme-1481c80b.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-abc52969.js"),u=require("./screenSizeContext-478cce5e.js");require("dayjs");var p=require("./index-511b99c0.js");require("./isProduction-fa856154.js"),require("./Subot-b76ccc9c.js"),require("./gAssets.js");var h=require("react-loading-skeleton"),g=require("./paths-bbbcac69.js"),f=require("@mantine/core"),m=require("./cookieHelper-edf24fec.js"),C=require("./index-0251e5f0.js"),b=require("./ChevronDown-3037c172.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`
1
+ "use strict";var e=require("./tslib.es6-af7c5340.js"),t=require("react"),a=require("./useTranslations-58ee3b9e.js"),i=require("lodash/debounce"),o=require("./constants-e7c8985f.js"),l=require("./index-2e6dbe21.js"),n=require("styled-components"),s=require("./index-3824cae4.js"),r=require("./theme-675875f1.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-44c908eb.js"),u=require("./screenSizeContext-66416462.js");require("dayjs");var p=require("./index-0dfb02fc.js");require("./isProduction-e1ad6827.js"),require("./Subot-9d5418e4.js"),require("./gAssets.js");var h=require("react-loading-skeleton"),g=require("./paths-f7c2f1d1.js"),f=require("@mantine/core"),m=require("./cookieHelper-24b1f061.js"),C=require("./index-cd030832.js"),b=require("./ChevronDown-a220d6bf.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;
@@ -75,11 +75,11 @@
75
75
  top: 0;
76
76
  box-shadow: initial;
77
77
  }
78
- `,V=S.default.ul`
78
+ `,K=S.default.ul`
79
79
  width: 100%;
80
80
  max-height: 600px;
81
81
  overflow-y: auto;
82
- `,K=S.default(P)`
82
+ `,V=S.default(P)`
83
83
  width: 12px;
84
84
  height: 18px;
85
85
  `,H=S.default.li`
@@ -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",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`
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(K,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(V,{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(V,{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;
@@ -315,16 +315,16 @@
315
315
  font-size: 14px;
316
316
  }
317
317
  }
318
- `,Ve=S.default.figure`
318
+ `,Ke=S.default.figure`
319
319
  max-width: var(--graphicSize);
320
320
  min-width: var(--graphicSize);
321
- `,Ke=S.default.svg`
321
+ `,Ve=S.default.svg`
322
322
  margin: 0 auto;
323
323
  display: block;
324
324
  `,He=S.default.div`
325
325
  display: grid;
326
326
  place-items: center;
327
- `,ze={doctors:({width:e,height:t})=>x.default.createElement("svg",{width:e||32,height:t||32,viewBox:"0 0 32 32",fill:"none"},x.default.createElement("g",{clipPath:"url(#clip0_14712_400114)"},x.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),x.default.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),x.default.createElement("defs",null,x.default.createElement("clipPath",{id:"clip0_14712_400114"},x.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),services:({width:e,height:t})=>x.default.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none"},x.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),x.default.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))},Ge=({type:e,item:a,imageUrl:i,className:o,onClickItem:l})=>{const n=t.useMemo((()=>{const t=ze[e]||$;return x.default.createElement(t,{width:32,height:"services"===e?32:24})}),[e]);return x.default.createElement(Fe,{onClick:()=>l&&l(a),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||l&&l(a)},tabIndex:0,role:"button",className:o},x.default.createElement(Ve,null,"hospitals"===e?x.default.createElement(Ke,{width:"12",height:"16",viewBox:"0 0 12 16"},x.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):x.default.createElement(De,{type:e},i?x.default.createElement("img",{src:i,width:32,height:"services"===e?32:24,loading:"lazy"}):n)),x.default.createElement(Be,{color:r.theme.colors.gray800,size:"p3"},a.name))},Ze=({type:e,data:i,state:l,dispatch:n,itemsToShow:c,itemsToShowDesktop:d,isMobile:u,isLoading:p,keyword:h,isNavResultItem:g})=>{const[f,m]=t.useState(!1),{t:C,locale:b}=a.useTranslations(),{selectedLocation:y,searchKeywords:v}=l,E=t.useMemo((()=>o.LOCALIZED_SLUGS[b]),[b]),S="ms-MY"===b,L=t.useMemo((()=>({doctors:{name:C("booking.searchPopup.doctors"),icon:x.default.createElement(ke,null),slug:E.DOCTOR},services:{name:C("booking.searchPopup.services"),icon:x.default.createElement(Ie,null),slug:E.SERVICE},hospitals:{name:C("booking.searchPopup.hospitals"),icon:x.default.createElement(Te,null),slug:E.HOSPITAL},specialties:{name:C("booking.searchPopup.specialties"),icon:x.default.createElement(je,null),slug:E.SPECIALTIES}})),[e,E]),O=t.useMemo((()=>L[e].slug),[L]),k=u?c:d;function I(t){let a="";switch(e){case"specialties":a=`/${y.slug}/${L.doctors.slug}/${t.slug}`;break;case"services":a=`/${y.slug}/${O}/${t.slug}`;break;case"doctors":case"hospitals":a=`/${O}/${t.slug}-${t.id}`}a&&n({type:ge.SelectSearchResult,payload:{name:t.name,url:a}})}function T(t){return x.default.createElement(Ge,{key:t.id,item:t,type:e,imageUrl:t.logo||t.avatar||t.thumbnail,className:g?"":"not-nav",onClickItem:g&&I})}return x.default.createElement("section",null,x.default.createElement(Me,null,x.default.createElement(Re,null,L[e].icon,x.default.createElement(Ne,null,L[e].name)),(h.trim().length<=pe[b]||S)&&x.default.createElement(Ae,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${y.slug}/${O}`}t&&n({type:ge.NavigateTo,payload:t})}},x.default.createElement(s.Text,{size:"p3",color:r.theme.colors.primaryBase},C("booking.searchPopup.seeAll")))),(p||i&&i.length>0)&&x.default.createElement(Pe,null,x.default.createElement(_e,null,p&&Array(2).fill(void 0).map(((t,a)=>x.default.createElement(Fe,{key:e+"loading"+a},x.default.createElement(Ve,null,x.default.createElement(He,null,x.default.createElement(w.default,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),x.default.createElement(w.default,{width:120,height:24})))),!p&&i&&i.length>0&&i.slice(0,k).map(T)),x.default.createElement(_e,{isShown:f,isMore:!0},i.slice(k,-1).map(T)),"specialties"===e&&k<i.length&&!p&&x.default.createElement("button",{onClick:()=>m(!f)},x.default.createElement($e,{size:"p3",color:r.theme.colors.primaryBase},C(f?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(k<i.length||S)&&!p&&h.trim().length>pe[b]&&x.default.createElement("button",{onClick:function(){const{slug:t}=L[e],a=`/${y.slug}/${t}?q=${v}`;n({type:ge.NavigateTo,payload:a})}},x.default.createElement($e,{size:"p3",color:r.theme.colors.primaryBase},C(`booking.searchPopup.searchIn.${e}`,{name:h})))),!p&&0===(null==i?void 0:i.length)&&x.default.createElement(Pe,null,x.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},C("booking.searchBar.noResults"))))},Ue=S.default.section`
327
+ `,ze={doctors:({width:e,height:t})=>x.default.createElement("svg",{width:e||32,height:t||32,viewBox:"0 0 32 32",fill:"none"},x.default.createElement("g",{clipPath:"url(#clip0_14712_400114)"},x.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),x.default.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),x.default.createElement("defs",null,x.default.createElement("clipPath",{id:"clip0_14712_400114"},x.default.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),services:({width:e,height:t})=>x.default.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none"},x.default.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),x.default.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))},Ge=({type:e,item:a,imageUrl:i,className:o,onClickItem:l})=>{const n=t.useMemo((()=>{const t=ze[e]||$;return x.default.createElement(t,{width:32,height:"services"===e?32:24})}),[e]);return x.default.createElement(Fe,{onClick:()=>l&&l(a),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||l&&l(a)},tabIndex:0,role:"button",className:o},x.default.createElement(Ke,null,"hospitals"===e?x.default.createElement(Ve,{width:"12",height:"16",viewBox:"0 0 12 16"},x.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):x.default.createElement(De,{type:e},i?x.default.createElement("img",{src:i,width:32,height:"services"===e?32:24,loading:"lazy"}):n)),x.default.createElement(Be,{color:r.theme.colors.gray800,size:"p3"},a.name))},Ze=({type:e,data:i,state:l,dispatch:n,itemsToShow:c,itemsToShowDesktop:d,isMobile:u,isLoading:p,keyword:h,isNavResultItem:g})=>{const[f,m]=t.useState(!1),{t:C,locale:b}=a.useTranslations(),{selectedLocation:y,searchKeywords:v}=l,E=t.useMemo((()=>o.LOCALIZED_SLUGS[b]),[b]),S="ms-MY"===b,L=t.useMemo((()=>({doctors:{name:C("booking.searchPopup.doctors"),icon:x.default.createElement(ke,null),slug:E.DOCTOR},services:{name:C("booking.searchPopup.services"),icon:x.default.createElement(Ie,null),slug:E.SERVICE},hospitals:{name:C("booking.searchPopup.hospitals"),icon:x.default.createElement(Te,null),slug:E.HOSPITAL},specialties:{name:C("booking.searchPopup.specialties"),icon:x.default.createElement(je,null),slug:E.SPECIALTIES}})),[e,E]),O=t.useMemo((()=>L[e].slug),[L]),k=u?c:d;function I(t){let a="";switch(e){case"specialties":a=`/${y.slug}/${L.doctors.slug}/${t.slug}`;break;case"services":a=`/${y.slug}/${O}/${t.slug}`;break;case"doctors":case"hospitals":a=`/${O}/${t.slug}-${t.id}`}a&&n({type:ge.SelectSearchResult,payload:{name:t.name,url:a}})}function T(t){return x.default.createElement(Ge,{key:t.id,item:t,type:e,imageUrl:t.logo||t.avatar||t.thumbnail,className:g?"":"not-nav",onClickItem:g&&I})}return x.default.createElement("section",null,x.default.createElement(Me,null,x.default.createElement(Re,null,L[e].icon,x.default.createElement(Ne,null,L[e].name)),(h.trim().length<=pe[b]||S)&&x.default.createElement(Ae,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${y.slug}/${O}`}t&&n({type:ge.NavigateTo,payload:t})}},x.default.createElement(s.Text,{size:"p3",color:r.theme.colors.primaryBase},C("booking.searchPopup.seeAll")))),(p||i&&i.length>0)&&x.default.createElement(Pe,null,x.default.createElement(_e,null,p&&Array(2).fill(void 0).map(((t,a)=>x.default.createElement(Fe,{key:e+"loading"+a},x.default.createElement(Ke,null,x.default.createElement(He,null,x.default.createElement(w.default,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),x.default.createElement(w.default,{width:120,height:24})))),!p&&i&&i.length>0&&i.slice(0,k).map(T)),x.default.createElement(_e,{isShown:f,isMore:!0},i.slice(k,-1).map(T)),"specialties"===e&&k<i.length&&!p&&x.default.createElement("button",{onClick:()=>m(!f)},x.default.createElement($e,{size:"p3",color:r.theme.colors.primaryBase},C(f?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(k<i.length||S)&&!p&&h.trim().length>pe[b]&&x.default.createElement("button",{onClick:function(){const{slug:t}=L[e],a=`/${y.slug}/${t}?q=${v}`;n({type:ge.NavigateTo,payload:a})}},x.default.createElement($e,{size:"p3",color:r.theme.colors.primaryBase},C(`booking.searchPopup.searchIn.${e}`,{name:h})))),!p&&0===(null==i?void 0:i.length)&&x.default.createElement(Pe,null,x.default.createElement(s.Text,{size:"sm",color:r.theme.colors.gray400},C("booking.searchBar.noResults"))))},Ue=S.default.section`
328
328
  background-color: white;
329
329
  border-radius: 4px;
330
330
  position: absolute;
@@ -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(),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`
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,onEnterSearch:C,dispatch:b})=>{var y;const{t:v}=a.useTranslations(),E=t.useRef(null),S=t.useMemo((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),L=t.useMemo((()=>"doctor"===i?v("booking.searchBar.placeholder.doctor"):"service"===i?v("booking.searchBar.placeholder.service"):"hospital"===i?v("booking.searchBar.placeholder.hospital"):"specialty"===i?v("booking.searchBar.placeholder.specialty"):""),[i]),w=t.useMemo((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),O=t.useMemo((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),k=t.useMemo((()=>({input:{color:"#262626"}})),[]);d.useOutsideClick(E,(()=>{b({type:at.ClickOutsideInputSearch})}));const I=t.useCallback((function(t){b({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(),b({type:at.DisplayInitialSearchResults})))}),[b,e,i]),T=t.useCallback((function(e){b({type:at.SelectSpecialty,payload:e}),g()}),[b]),j=t.useCallback((e=>{13===e.keyCode&&(e.stopPropagation(),e.preventDefault(),C&&C())}),[C]);return x.default.createElement(lt,{ref:E},"specialty"===i?x.default.createElement(f.Input.Wrapper,{styles:w},x.default.createElement(f.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",placeholder:L,styles:k,value:e.searchKeywords,onFocus:()=>b({type:at.FocusInputSearchSpecialty}),onChange:e=>{I(e.target.value)},onKeyDown:j})):x.default.createElement(x.default.Fragment,null,"service"===i?x.default.createElement(f.Input.Wrapper,{styles:w},x.default.createElement(f.Input,{icon:x.default.createElement(s.Icon.Search,null),size:o?"md":"lg",name:"search-results",placeholder:L,onFocus:()=>b({type:at.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{I(e.target.value)},onKeyDown:j})):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:b,debouncedFetchSearchResults:c,onSpecialtyClick:T}),x.default.createElement(f.Input.Wrapper,{styles:w},x.default.createElement(f.Input,{icon:x.default.createElement(s.Icon.Search,null),size:"md",placeholder:L,value:e.searchKeywords,name:"search-results",onFocus:()=>b({type:at.FocusInputSearch}),onChange:e=>{I(e.target.value)},onKeyDown:j}))):x.default.createElement(f.Input.Wrapper,{styles:w,className:p?"hide-specialty-selection":""},x.default.createElement(f.Input,Object.assign({icon:x.default.createElement(s.Icon.Search,null),size:"lg",placeholder:L,styles:O,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{I(e.target.value)},onFocus:()=>b({type:at.FocusInputSearch}),onKeyDown:j},S,{rightSection:p?x.default.createElement(x.default.Fragment,null):x.default.createElement(yt,{state:e,isMobile:o,dispatch:b,debouncedFetchSearchResults:c,onSpecialtyClick:T})})))),"search"===e.focused&&x.default.createElement(nt,null,x.default.createElement(ut,{type:i,state:e,results:(null===(y=e.searchResults)||void 0===y?void 0:y[i])||[],location:e.selectedLocation.name,dispatch:b,isLoading:l,typeInformation:r,clientSlug:h}))))},xt=S.default.div`
567
567
  position: relative;
568
568
 
569
569
  ${u.MediaQueries.mbDown} {
@@ -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: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;
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 Kt=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:K,geoLocationCoordinates:V,requestGeoLocation:H}=k(),[z,Z]=t.useReducer(me,he,(e=>Object.assign(Object.assign({},e),{isDebug:u,isMobile:i,geoLocationPermission:n||K||"unset",geoLocationCoordinates:s||V||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===K||("granted"===K&&V?Z({type:ge.GrantGeoLocationPermission,payload:V}):"denied"===K&&Z({type:ge.DenyGeoLocationPermission}))}),[J,K,V,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:K,searchKeywords:V,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())}function ne(){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=${V}${a}`,e&&D({type:at.NavigateTo,payload:e})}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,onEnterSearch:ne,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:ne,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"===K&&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=Kt;
package/build/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-b76ccc9c.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-9d5418e4.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-b76ccc9c.js"),n=require("./useTranslations-2e112ad4.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-9d5418e4.js"),n=require("./useTranslations-58ee3b9e.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-524ea691.js"),t=require("react"),a=require("./getDynamicHealthTool-12e2540d.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-af7c5340.js"),t=require("react"),a=require("./getDynamicHealthTool-765ca7ef.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 c=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:c}};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-524ea691.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-af7c5340.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-524ea691.js"),t=require("react"),r=require("./cookieHelper-edf24fec.js"),n=require("./useTranslations-2e112ad4.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-af7c5340.js"),t=require("react"),r=require("./cookieHelper-24b1f061.js"),n=require("./useTranslations-58ee3b9e.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 +1 @@
1
- "use strict";var e=require("react"),t=require("./translationsContext-e83c75a5.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-37b57080.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 +1 @@
1
- "use strict";var e=require("react"),t=require("./gAssets.js"),s=require("./index-8a4e8200.js"),r=require("./Subot-b76ccc9c.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};
1
+ "use strict";var e=require("react"),t=require("./gAssets.js"),s=require("./index-e387ee43.js"),r=require("./Subot-9d5418e4.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};
@@ -1 +1 @@
1
- "use strict";var i=require("./Subot-b76ccc9c.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"))};
1
+ "use strict";var i=require("./Subot-9d5418e4.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("@"),e=i.substring(0,a),L=e.length>3?3:e.length;return i.replace(i.substring(L,a),i.slice(L,a).replace(/./g,"x"))};
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-524ea691.js"),t=require("react"),a=require("@mantine/core"),l=require("./index-8a4e8200.js");require("@mantine/dates"),require("./index-511b99c0.js");var n=require("./Subot-b76ccc9c.js");require("./gAssets.js");var r=require("./index-70fc6801.js"),i=require("dayjs"),o=require("./screenSizeContext-478cce5e.js"),c=require("styled-components"),s=require("./theme-1481c80b.js");require("./isProduction-fa856154.js");var d=require("./useTranslations-2e112ad4.js"),u=require("@mantine/hooks");require("lodash/debounce"),require("./useCategory-15d34903.js");var m=require("./index-af3f2c07.js");require("./translationsContext-e83c75a5.js"),require("string-format"),require("@linaria/react");var C=require("./index.styles-eee657e0.js");require("./constants-82348c13.js"),require("./utils-6f3d330e.js"),require("./index.styled-95722c0d.js"),require("./index-ff51ac26.js");var f=require("./index-557f79d9.js"),p=require("@mantine/form"),g=require("dayjs/plugin/customParseFormat"),h=require("./index-5a09ea5b.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@mantine/carousel"),require("classnames"),require("date-fns/locale"),require("lodash/throttle"),require("react-keyed-flatten-children"),require("./cookieHelper-edf24fec.js"),require("slugify");var E=b(t),x=b(i),v=b(c),y=b(g);const T=v.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-af7c5340.js"),t=require("react"),a=require("@mantine/core"),l=require("./index-e387ee43.js");require("@mantine/dates"),require("./index-0dfb02fc.js");var n=require("./Subot-9d5418e4.js");require("./gAssets.js");var r=require("./index-3824cae4.js"),i=require("dayjs"),o=require("./screenSizeContext-66416462.js"),c=require("styled-components"),s=require("./theme-675875f1.js");require("./isProduction-e1ad6827.js");var d=require("./useTranslations-58ee3b9e.js"),u=require("@mantine/hooks");require("lodash/debounce"),require("./useCategory-bf09d2fa.js");var m=require("./index-e6e3941f.js");require("./translationsContext-37b57080.js"),require("string-format"),require("@linaria/react");var C=require("./index.styles-3ab75ee6.js");require("./constants-e7c8985f.js"),require("./utils-119b98c5.js"),require("./index.styled-6220e760.js"),require("./index-1b69057d.js");var f=require("./index-16f49c45.js"),p=require("@mantine/form"),g=require("dayjs/plugin/customParseFormat"),h=require("./index-e94212a5.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@mantine/carousel"),require("classnames"),require("date-fns/locale"),require("lodash/throttle"),require("react-keyed-flatten-children"),require("./cookieHelper-24b1f061.js"),require("slugify");var E=b(t),x=b(i),v=b(c),y=b(g);const T=v.default.div`
2
2
  position: relative;
3
3
  padding: 16px;
4
4
  min-height: 110px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hhgtech/hhg-components",
3
- "version": "1.28.39",
3
+ "version": "1.28.40",
4
4
  "main": "build/index.js",
5
5
  "module": "build/esm/index.js",
6
6
  "files": [
@@ -1 +0,0 @@
1
- import{_ as e}from"./tslib.es6-7b491686.js";import t from"react";import{Image as o}from"@mantine/core";import{DatePickerInput as r}from"@mantine/dates";import{I as s}from"./index-14839883.js";import{L as i}from"./Subot-f581f4df.js";import{CommonGAssets as a}from"./gAssets.js";import{M as n}from"./index-8dfb1724.js";const l=l=>{var m,{value:c,fullWidth:d=!0}=l,p=e(l,["value","fullWidth"]);return t.createElement(r,Object.assign({locale:n[process.env.UNIFY_LOCALE||i.Vietnam],valueFormat:null===(m=s[process.env.UNIFY_LOCALE||i.Vietnam])||void 0===m?void 0:m.dateFormat,size:"md",clearable:!1,popoverProps:d?{styles:{dropdown:{minWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}}:{},styles:{root:{position:"relative"},rightSection:{pointerEvents:"none",cursor:"default"}},rightSection:t.createElement(o,{src:a.getAssetPath(p.isMB?"MB-calendar.svg":"OutlineCalendar.svg"),width:16,height:16}),value:c},p,{className:`input-control ${(null==p?void 0:p.className)||""}`}))};export{l as D};
@@ -1 +0,0 @@
1
- import{_ as t}from"./tslib.es6-7b491686.js";import e from"react";import"./index-8dfb1724.js";import"@mantine/core";import"@mantine/dates";import"./index-14839883.js";import"./Subot-f581f4df.js";import"./gAssets.js";import{T as o}from"./index-fa32b4d8.js";import"dayjs";import"./screenSizeContext-f9a53919.js";import"styled-components";import"./theme-9d69f1a2.js";import"./isProduction-d8d94564.js";import"./translationsContext-a929820e.js";import"string-format";import"@mantine/hooks";const i=i=>{var{size:s="base",type:r="regular"}=i,m=t(i,["size","type"]);return e.createElement(o,Object.assign({size:s,weight:"caption"===r?"bold":r},m))};export{i as T};
@@ -1 +0,0 @@
1
- import{_ as t}from"./tslib.es6-7b491686.js";import o from"react";import{Indicator as s}from"@mantine/core";import"dayjs";import"./screenSizeContext-f9a53919.js";import"styled-components";import{t as e}from"./theme-9d69f1a2.js";import"./index-14839883.js";import"./isProduction-d8d94564.js";import"./Subot-f581f4df.js";import"./gAssets.js";const r=r=>{var{styles:i,color:n=e.colors.red700}=r,m=t(r,["styles","color"]);return o.createElement(s,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({processing:{animationDirection:"alternate"}},i),color:n},m))};export{r as I};
@@ -1 +0,0 @@
1
- import{a as o}from"./tslib.es6-7b491686.js";import{useState as t,useEffect as i,useCallback as l}from"react";import{a as n}from"./getDynamicHealthTool-d874b77f.js";const r=r=>{const[a,e]=t([]);i((()=>{o(void 0,void 0,void 0,(function*(){const o=yield n(r);e(o)}))}),[n,r]);const s=l((o=>{var t;return(null===(t=a.find((t=>t.template===o)))||void 0===t?void 0:t.link)||""}),[a]);return{allTools:a,getHealthToolLink:s}};export{r as u};
@@ -1 +0,0 @@
1
- "use strict";var t=require("./tslib.es6-524ea691.js"),i=require("./core-081bdce5.js"),e=require("./normalizeLink-b898d874.js"),l=require("./routing-d19d8856.js");const o=(t,i)=>{var e,l;if(!t)return{};const o="tl-PH"===i?"/fil":"";return{id:t.id,isSubot:t.is_subot,template:t.template,icon:t.icon,link:(null===(e=t.link)||void 0===e?void 0:e.startsWith("http"))?t.link:`${o}/health-tools`+(null===(l=t.link)||void 0===l?void 0:l.replace(`${o}/`,"/")),subtitle:t.subtitle,title:t.title}},n=i=>t.__awaiter(void 0,void 0,void 0,(function*(){var t,n;try{const a="tl-PH"===i?"lang=fil":"";let r=[];try{const s=yield fetch(e.normalizeLinkSlash(`${l.getDiscoverApiDomain(i)}/wp-json/api/healthtools?ismenu=0${a?"&"+a:""}`)).then((t=>t.json()));r=(null===(n=null===(t=null==s?void 0:s.data)||void 0===t?void 0:t.map)||void 0===n?void 0:n.call(t,(t=>o(t,i))))||[]}catch(t){}return r}catch(t){console.error(t)}}));exports.formatHealthTool=o,exports.getDynamicHealthTool=n,exports.getDynamicHealthToolWithCache=e=>t.__awaiter(void 0,void 0,void 0,(function*(){return(yield i.getDataWithCache("all-health-tools",(()=>n(e||"en-PH")),(t=>!!(null==t?void 0:t.length)),6e4))||[]}));
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-524ea691.js"),r=require("react"),t=require("@mantine/core");require("dayjs"),require("./screenSizeContext-478cce5e.js"),require("styled-components");var s=require("./theme-1481c80b.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./index-511b99c0.js"),require("./isProduction-fa856154.js"),require("./Subot-b76ccc9c.js"),require("./gAssets.js");var o=i(r);exports.Indicator=r=>{var{styles:i,color:c=s.theme.colors.red700}=r,n=e.__rest(r,["styles","color"]);return o.default.createElement(t.Indicator,Object.assign({inline:!0,position:"top-end",offset:4,styles:Object.assign({processing:{animationDirection:"alternate"}},i),color:c},n))};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-524ea691.js"),r=require("react");require("./index-8a4e8200.js"),require("@mantine/core"),require("@mantine/dates"),require("./index-511b99c0.js"),require("./Subot-b76ccc9c.js"),require("./gAssets.js");var t=require("./index-70fc6801.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("dayjs"),require("./screenSizeContext-478cce5e.js"),require("styled-components"),require("./theme-1481c80b.js"),require("./isProduction-fa856154.js"),require("./translationsContext-e83c75a5.js"),require("string-format"),require("@mantine/hooks");var s=i(r);exports.Text=r=>{var{size:i="base",type:u="regular"}=r,n=e.__rest(r,["size","type"]);return s.default.createElement(t.Text,Object.assign({size:i,weight:"caption"===u?"bold":u},n))};
@@ -1,50 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-524ea691.js"),t=require("react"),r=require("./Subot-b76ccc9c.js"),n=require("./gAssets.js"),a=require("./theme-1481c80b.js"),o=require("styled-components"),i=require("./index-8a4e8200.js"),l=require("./index-b983594e.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(t),d=s(o);const u=d.default.div`
2
- display: inline-flex;
3
- overflow: hidden;
4
- width: ${e=>e.size}px;
5
- height: ${e=>e.size}px;
6
- box-sizing: border-box;
7
- align-items: center;
8
- justify-content: center;
9
-
10
- border: 1px solid #e4e8ec;
11
- background-color: ${e=>e.backgroundColor||a.theme.colors.white};
12
- border-radius: ${e=>e.borderRadius||"50%"};
13
- & > * {
14
- width: ${e=>e.iconSize}px;
15
- height: ${e=>e.iconSize}px;
16
- }
17
- `,p=d.default.div`
18
- display: inline-block;
19
- height: 108px;
20
- background-color: ${e=>e.theme.colors.white};
21
- border-radius: 60px;
22
- cursor: pointer;
23
- &.selected-week-pill {
24
- background-color: ${e=>e.theme.colors.pink100};
25
- }
26
-
27
- & > div:first-child {
28
- margin: 4px 4px 0;
29
- }
30
-
31
- & > p {
32
- margin-top: 8px;
33
- text-align: center;
34
- }
35
-
36
- & > * {
37
- pointer-events: none;
38
- }
39
- `,x=[r.LOCALE.Myanmar,r.LOCALE.Taiwan],b=d.default((r=>{var{icon:o,name:s,className:d,locale:b="en-PH",dataEventCategory:g,dataEventAction:m,dataEventLabel:h,onSelect:v}=r,f=e.__rest(r,["icon","name","className","locale","dataEventCategory","dataEventAction","dataEventLabel","onSelect"]);const y=t.useMemo((()=>null==d?void 0:d.includes("selected-week-pill")),[d]);return c.default.createElement(p,Object.assign({onClick:v,className:d?"week-pill".concat(" non-pointer-event-child ",d):"week-pill non-pointer-event-child","data-event-category":g,"data-event-action":m,"data-event-label":h},f),c.default.createElement(u,{size:64,iconSize:40,backgroundColor:a.theme.colors.white},c.default.createElement(i.ImageWrap,{src:o||n.CommonGAssets.getAssetPath("week_default.png"),alt:`week ${s}`})),y?c.default.createElement(l.Text,Object.assign({type:"semiBold",size:"n1",color:a.theme.colors.gray800},x.includes(b)&&{style:{fontSize:"10px"}}),s):c.default.createElement(l.Text,Object.assign({size:"n1",color:a.theme.colors.gray600},x.includes(b)&&{style:{fontSize:"10px"}}),s))}))`
40
- box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.08);
41
- `,g=d.default(i.CentralCarousel.Slide)`
42
- cursor: pointer;
43
- > div * {
44
- pointer-events: none;
45
- }
46
- `,m=d.default(i.CentralCarousel)`
47
- .centerred-pill-wrapper {
48
- padding: 16px 0;
49
- }
50
- `;exports.StyledCarousel=m,exports.StyledPill=b,exports.StyledSlide=g;