@hhgtech/hhg-components 1.29.527 → 1.29.528

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 (519) hide show
  1. package/build/{InputDate-4723615c.js → InputDate-e44a5170.js} +5 -5
  2. package/build/{LastPeriod-73630d52.js → LastPeriod-acd8425a.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-cc6f18e0.js → MobileBottomNavigationIcon-391275dc.js} +3 -3
  4. package/build/{SiteWideBanner-72c71636.js → SiteWideBanner-5f5eef6e.js} +11 -11
  5. package/build/{Spinner-a6e3eb27.js → Spinner-9cb85a18.js} +1 -1
  6. package/build/{WhatsApp-5f603292.js → WhatsApp-e2be209d.js} +1 -1
  7. package/build/adapters.js +20 -20
  8. package/build/atoms.js +51 -51
  9. package/build/babyGrowth.js +86 -86
  10. package/build/cache.js +2 -2
  11. package/build/care/components/organisms/bookingSearchBarV2/SearchResultContent.d.ts +13 -0
  12. package/build/care/components/organisms/bookingSearchBarV2/index.d.ts +7 -1
  13. package/build/care/components/organisms/bookingSearchBarV2/searchInputs/ModalSearchResult.d.ts +8 -0
  14. package/build/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +8 -1
  15. package/build/care/components/organisms/bookingSearchBarV2/searchLocation/CustomSelectItem.d.ts +9 -0
  16. package/build/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +1 -1
  17. package/build/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -2
  18. package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/CustomSelectItem.d.ts +9 -0
  19. package/build/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +1 -1
  20. package/build/care.js +24 -18
  21. package/build/careBookingSearchBar.js +14 -14
  22. package/build/careBookingSearchBarV2.js +553 -258
  23. package/build/components.js +106 -106
  24. package/build/{constants-ec3816fe.js → constants-8187e577.js} +2 -2
  25. package/build/{constants-8ddf9f14.js → constants-978bec21.js} +1 -1
  26. package/build/constants.js +3 -3
  27. package/build/constantsDomainLocales.js +1 -1
  28. package/build/constantsRiskScreener.js +2 -2
  29. package/build/constantsSite.js +2 -2
  30. package/build/{core-1b4b5bb6.js → core-df6980aa.js} +1 -1
  31. package/build/{dataTransform-f5d2e15b.js → dataTransform-4e9d4b21.js} +1 -1
  32. package/build/ecom.js +5 -5
  33. package/build/{editor-1f3a4880.js → editor-1410b123.js} +11 -11
  34. package/build/embeddedHeathToolCards_babyGrowth.js +25 -25
  35. package/build/embeddedHeathToolCards_babyPoop.js +22 -22
  36. package/build/embeddedHeathToolCards_babyVaccine.js +24 -24
  37. package/build/embeddedHeathToolCards_bmi_bmi.js +27 -27
  38. package/build/embeddedHeathToolCards_bmrBmr.js +27 -27
  39. package/build/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  40. package/build/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  41. package/build/embeddedHeathToolCards_pwg_pwg.js +28 -28
  42. package/build/embeddedHeathToolCards_targetHeartRate.js +29 -29
  43. package/build/esm/{InputDate-19558a4a.js → InputDate-8a6cea00.js} +5 -5
  44. package/build/esm/{LastPeriod-36173ef3.js → LastPeriod-782d7853.js} +1 -1
  45. package/build/esm/{MobileBottomNavigationIcon-6c0c186f.js → MobileBottomNavigationIcon-fd28ef21.js} +3 -3
  46. package/build/esm/{SiteWideBanner-7010dc39.js → SiteWideBanner-93e3d85b.js} +11 -11
  47. package/build/esm/{Spinner-432bb892.js → Spinner-ac3cafdf.js} +1 -1
  48. package/build/esm/{WhatsApp-e843edd2.js → WhatsApp-f00db235.js} +1 -1
  49. package/build/esm/adapters.js +20 -20
  50. package/build/esm/atoms.js +51 -51
  51. package/build/esm/babyGrowth.js +86 -86
  52. package/build/esm/cache.js +2 -2
  53. package/build/esm/care/components/organisms/bookingSearchBarV2/SearchResultContent.d.ts +13 -0
  54. package/build/esm/care/components/organisms/bookingSearchBarV2/index.d.ts +7 -1
  55. package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/ModalSearchResult.d.ts +8 -0
  56. package/build/esm/care/components/organisms/bookingSearchBarV2/searchInputs/index.d.ts +8 -1
  57. package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/CustomSelectItem.d.ts +9 -0
  58. package/build/esm/care/components/organisms/bookingSearchBarV2/searchLocation/index.d.ts +1 -1
  59. package/build/esm/care/components/organisms/bookingSearchBarV2/searchResult/index.d.ts +2 -2
  60. package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/CustomSelectItem.d.ts +9 -0
  61. package/build/esm/care/components/organisms/bookingSearchBarV2/searchSpecialty/index.d.ts +1 -1
  62. package/build/esm/care.js +24 -18
  63. package/build/esm/careBookingSearchBar.js +14 -14
  64. package/build/esm/careBookingSearchBarV2.js +555 -260
  65. package/build/esm/components.js +106 -106
  66. package/build/esm/{constants-5d94c1eb.js → constants-1d2564ea.js} +1 -1
  67. package/build/esm/{constants-02ff2b9a.js → constants-ebc698d1.js} +2 -2
  68. package/build/esm/constants.js +3 -3
  69. package/build/esm/constantsDomainLocales.js +1 -1
  70. package/build/esm/constantsRiskScreener.js +2 -2
  71. package/build/esm/constantsSite.js +2 -2
  72. package/build/esm/{core-28fc1feb.js → core-f02df1ea.js} +1 -1
  73. package/build/esm/{dataTransform-18e7db46.js → dataTransform-7ec80df6.js} +1 -1
  74. package/build/esm/ecom.js +5 -5
  75. package/build/esm/{editor-f39bd267.js → editor-95beb114.js} +11 -11
  76. package/build/esm/embeddedHeathToolCards_babyGrowth.js +25 -25
  77. package/build/esm/embeddedHeathToolCards_babyPoop.js +22 -22
  78. package/build/esm/embeddedHeathToolCards_babyVaccine.js +24 -24
  79. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +27 -27
  80. package/build/esm/embeddedHeathToolCards_bmrBmr.js +27 -27
  81. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +24 -24
  82. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +24 -24
  83. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +28 -28
  84. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +29 -29
  85. package/build/esm/footer.js +22 -22
  86. package/build/esm/gAssets.js +2 -2
  87. package/build/esm/{healthTools-67f81a15.js → healthTools-a478793b.js} +1 -1
  88. package/build/esm/healthToolsCardWrapper.js +20 -20
  89. package/build/esm/healthToolsForm.js +35 -35
  90. package/build/esm/hooks.js +14 -14
  91. package/build/esm/i18n.js +2 -2
  92. package/build/esm/i18nV2.js +2 -2
  93. package/build/esm/{index-6b81ef4b.js → index-0aac98d9.js} +32 -32
  94. package/build/esm/{index-13cc2584.js → index-0c8a796f.js} +2 -2
  95. package/build/esm/{index-b09ae67e.js → index-0cf4fb1a.js} +22 -22
  96. package/build/esm/{index-625b13b0.js → index-14c5e5f8.js} +14 -14
  97. package/build/esm/{index-a0a5c82d.js → index-18597dc3.js} +2 -2
  98. package/build/esm/{index-21e8e383.js → index-19b57024.js} +18 -18
  99. package/build/esm/{index-848bd280.js → index-1c22f471.js} +2 -2
  100. package/build/esm/{index-11f06411.js → index-1d71825a.js} +3 -3
  101. package/build/esm/{index-132ec066.js → index-1e03896e.js} +5 -5
  102. package/build/esm/{index-927ce49f.js → index-1ef3bd24.js} +17 -17
  103. package/build/esm/{index-9f3cf366.js → index-28c3f888.js} +3 -3
  104. package/build/esm/{index-3b6525bf.js → index-29614899.js} +3 -3
  105. package/build/esm/{index-2757fc57.js → index-2fc6abb3.js} +13 -13
  106. package/build/esm/{index-592bba40.js → index-3699be44.js} +2 -2
  107. package/build/esm/{index-9f43c268.js → index-3ecee9df.js} +2 -2
  108. package/build/esm/{index-b34a19f4.js → index-4786dd1b.js} +4 -4
  109. package/build/esm/{index-039f30e3.js → index-49993060.js} +2 -2
  110. package/build/esm/{index-fb51821c.js → index-4e4a4448.js} +2 -2
  111. package/build/esm/{index-d51a88aa.js → index-51642785.js} +1 -1
  112. package/build/esm/{index-c11e3721.js → index-52f5a292.js} +15 -15
  113. package/build/esm/{index-c262545f.js → index-54a358f7.js} +3 -3
  114. package/build/esm/{index-5416cd64.js → index-5a3a3f42.js} +14 -14
  115. package/build/esm/{index-9783f70f.js → index-5c7ecb24.js} +6 -6
  116. package/build/esm/{index-89dfc455.js → index-61c5b995.js} +11 -11
  117. package/build/esm/{index-cac853ef.js → index-6615252e.js} +2 -2
  118. package/build/esm/{index-c2162f76.js → index-6c9ffea1.js} +6 -6
  119. package/build/esm/{index-2b33f487.js → index-7061fdca.js} +2 -2
  120. package/build/esm/{index-71ef7de6.js → index-729cb32a.js} +18 -18
  121. package/build/esm/{index-78e91f91.js → index-72b972f5.js} +1 -1
  122. package/build/esm/{index-40506630.js → index-73b17150.js} +1 -1
  123. package/build/esm/{index-51164185.js → index-75a9c5b3.js} +2 -2
  124. package/build/esm/{index-2f2b3118.js → index-7d3b5c77.js} +2 -2
  125. package/build/esm/{index-d920a82c.js → index-80102061.js} +3 -3
  126. package/build/esm/{index-350c8057.js → index-8347736a.js} +3 -3
  127. package/build/esm/{index-83cdc404.js → index-873a735a.js} +7 -7
  128. package/build/esm/{index-c288d070.js → index-8828f77d.js} +25 -25
  129. package/build/esm/{index-d6d9926d.js → index-8ad71dae.js} +16 -16
  130. package/build/esm/{index-835cb1a4.js → index-8d70c74a.js} +4 -4
  131. package/build/esm/{index-d3de292b.js → index-8ff3d8b9.js} +19 -19
  132. package/build/esm/{index-ec874d7f.js → index-90c6261d.js} +2 -2
  133. package/build/esm/{index-9eb4ea68.js → index-9313ba10.js} +5 -5
  134. package/build/esm/{index-3dcbd5d8.js → index-969578b1.js} +13 -13
  135. package/build/esm/{index-88ad09a2.js → index-96cfc6d0.js} +21 -21
  136. package/build/esm/{index-d5a0deff.js → index-997d9afe.js} +14 -14
  137. package/build/esm/{index-41b75b06.js → index-a4fb5c60.js} +16 -16
  138. package/build/esm/{index-6d341978.js → index-a7cbb0b9.js} +1 -1
  139. package/build/esm/{index-33b29944.js → index-ad0c95a7.js} +9 -9
  140. package/build/esm/{index-e772c903.js → index-ad9c69f5.js} +15 -15
  141. package/build/esm/{index-d8bffadf.js → index-b07e5ab0.js} +3 -3
  142. package/build/esm/{index-037ffb65.js → index-b13dc946.js} +7 -7
  143. package/build/esm/{index-baeae593.js → index-b79948be.js} +6 -6
  144. package/build/esm/{index-6562a540.js → index-ba4cfc72.js} +2 -2
  145. package/build/esm/{index-b26c8202.js → index-bf75e23b.js} +2 -2
  146. package/build/esm/{index-d8b71ebe.js → index-c3579fb3.js} +2 -2
  147. package/build/esm/{index-5ce992e9.js → index-caba5feb.js} +16 -16
  148. package/build/esm/{index-eb266a2f.js → index-cc5f3d4b.js} +9 -9
  149. package/build/esm/{index-14c5bc71.js → index-cea40631.js} +33 -33
  150. package/build/esm/{index-3bbfc9b7.js → index-d1643abc.js} +1 -1
  151. package/build/esm/{index-a38113ec.js → index-d35dccbb.js} +24 -24
  152. package/build/esm/{index-f25b49f4.js → index-d5f782eb.js} +2 -2
  153. package/build/esm/{index-e29f4da3.js → index-d6463809.js} +8 -8
  154. package/build/esm/{index-baa344ea.js → index-d957287d.js} +1 -1
  155. package/build/esm/{index-ed3537b8.js → index-dc74d2a2.js} +2 -2
  156. package/build/esm/{index-0d2192e4.js → index-e102e0b2.js} +15 -15
  157. package/build/esm/{index-17e22a49.js → index-e21fd7e1.js} +3 -3
  158. package/build/esm/{index-4de26227.js → index-e29051bf.js} +32 -32
  159. package/build/esm/{index-cf0997ce.js → index-e30b89da.js} +16 -16
  160. package/build/esm/{index-81417442.js → index-e670af0e.js} +6 -6
  161. package/build/esm/{index-16b3f06c.js → index-e8e284f7.js} +1 -1
  162. package/build/esm/{index-00172803.js → index-fdb5c913.js} +3 -3
  163. package/build/esm/{index-08a9819c.js → index-fea9434a.js} +3 -3
  164. package/build/esm/index.js +126 -126
  165. package/build/esm/{labelSorting-b86fc783.js → labelSorting-0ff4b693.js} +4 -4
  166. package/build/esm/lead.js +37 -37
  167. package/build/esm/{logoIcon-8589d465.js → logoIcon-a24cf073.js} +2 -2
  168. package/build/esm/mantine.js +27 -27
  169. package/build/esm/misc.js +19 -19
  170. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  171. package/build/esm/miscGetSocialList.js +8 -8
  172. package/build/esm/miscScreenSizeContext.js +1 -1
  173. package/build/esm/mobileBottomNavigation.js +5 -5
  174. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  175. package/build/esm/molecules.js +79 -79
  176. package/build/esm/moleculesArticleCard.js +6 -6
  177. package/build/esm/moleculesArticleCardV2.js +17 -17
  178. package/build/esm/navigation.js +49 -49
  179. package/build/esm/navigationLogoutPopup.js +11 -11
  180. package/build/esm/navigationProfileButton.js +27 -27
  181. package/build/esm/onboardingV2.js +30 -30
  182. package/build/esm/organisms.js +62 -62
  183. package/build/esm/{paths-28205e0f.js → paths-57889e7a.js} +2 -2
  184. package/build/esm/{post-85d8faaa.js → post-e85d518d.js} +2 -2
  185. package/build/esm/profileNavigation.js +20 -20
  186. package/build/esm/progressBar.js +1 -1
  187. package/build/esm/pwg.js +23 -23
  188. package/build/esm/ssoV2.js +31 -31
  189. package/build/esm/{store-46ca3b02.js → store-58945988.js} +3 -3
  190. package/build/esm/subot.js +40 -40
  191. package/build/esm/surveyOrPremiumBanner.js +34 -34
  192. package/build/esm/surveyQuestionCard.js +11 -11
  193. package/build/esm/{surveyThankyouCard-fe5eb710.js → surveyThankyouCard-020bd785.js} +5 -5
  194. package/build/esm/together.js +57 -57
  195. package/build/esm/togetherApiUtils.js +6 -6
  196. package/build/esm/togetherAtoms.js +31 -31
  197. package/build/esm/togetherComponentGlobalContext.js +6 -6
  198. package/build/esm/togetherMolecules.js +52 -52
  199. package/build/esm/togetherMoleculesCardAuthor.js +29 -29
  200. package/build/esm/togetherMoleculesPostImagePreview.js +13 -13
  201. package/build/esm/togetherMoleculesProfileDetail.js +40 -40
  202. package/build/esm/togetherOrganisms.js +51 -51
  203. package/build/esm/togetherRichTextEditor.js +20 -20
  204. package/build/esm/togetherShareBox.js +12 -12
  205. package/build/esm/{transform-9e1ae172.js → transform-54db313c.js} +27 -27
  206. package/build/esm/{translationsProvider-7112664a.js → translationsProvider-74ef088c.js} +1 -1
  207. package/build/esm/{treePopoverMenu-4534abf4.js → treePopoverMenu-43e10598.js} +19 -19
  208. package/build/esm/types.js +2 -2
  209. package/build/esm/{useCartCareService-dab2f9d4.js → useCartCareService-78b0a223.js} +1 -1
  210. package/build/esm/{useHealthToolCache-c6faed71.js → useHealthToolCache-a120abd1.js} +1 -1
  211. package/build/esm/{usePhoneValidator-6d70c013.js → usePhoneValidator-6ac61ebc.js} +5 -5
  212. package/build/esm/{usePlacesAutocomplete-eb7786f7.js → usePlacesAutocomplete-09a0e342.js} +1 -1
  213. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  214. package/build/esm/{utils-a6dea16c.js → utils-4560ea01.js} +5 -5
  215. package/build/esm/{utils-5d0e618d.js → utils-78865776.js} +2 -2
  216. package/build/esm/{utils-fb8bf638.js → utils-9b4e448e.js} +3 -3
  217. package/build/esm/{utils-9a6c6029.js → utils-e4a74b46.js} +3 -3
  218. package/build/esm/{utils-5e210f54.js → utils-e56045d9.js} +2 -2
  219. package/build/esm/vaccination.js +22 -22
  220. package/build/footer.js +22 -22
  221. package/build/gAssets.js +2 -2
  222. package/build/{healthTools-83fac0a5.js → healthTools-4c002c0b.js} +1 -1
  223. package/build/healthToolsCardWrapper.js +20 -20
  224. package/build/healthToolsForm.js +35 -35
  225. package/build/hooks.js +14 -14
  226. package/build/i18n.js +2 -2
  227. package/build/i18nV2.js +1 -1
  228. package/build/{index-88d16ec2.js → index-015f890f.js} +6 -6
  229. package/build/{index-0dabd635.js → index-034a704f.js} +7 -7
  230. package/build/{index-40725e8b.js → index-071fc285.js} +3 -3
  231. package/build/{index-3d421c34.js → index-07443896.js} +2 -2
  232. package/build/{index-5c45ee6c.js → index-08ce6245.js} +2 -2
  233. package/build/{index-2509613f.js → index-0d3129b1.js} +6 -6
  234. package/build/{index-627899a6.js → index-0e60b5c7.js} +18 -18
  235. package/build/{index-c935c8ae.js → index-2823f5ed.js} +3 -3
  236. package/build/{index-e584f6b5.js → index-2a0e7ab6.js} +3 -3
  237. package/build/{index-034d9ef4.js → index-2c0ceb91.js} +3 -3
  238. package/build/{index-381e1575.js → index-2dc73063.js} +18 -18
  239. package/build/{index-2358141f.js → index-30398c28.js} +4 -4
  240. package/build/{index-fca34957.js → index-317470d8.js} +13 -13
  241. package/build/{index-623aa44d.js → index-31a7199d.js} +2 -2
  242. package/build/{index-231a399f.js → index-3d073609.js} +5 -5
  243. package/build/{index-91a769d7.js → index-3f93a7ef.js} +32 -32
  244. package/build/{index-b2840c48.js → index-43597605.js} +9 -9
  245. package/build/{index-5968ea5b.js → index-4519c910.js} +2 -2
  246. package/build/{index-d44486f8.js → index-4b4ffab8.js} +22 -22
  247. package/build/{index-f8c96c21.js → index-4f61ac85.js} +32 -32
  248. package/build/{index-40eb2a9e.js → index-5057d16f.js} +2 -2
  249. package/build/{index-beae4bf5.js → index-54f20948.js} +1 -1
  250. package/build/{index-4270d6cf.js → index-55741379.js} +1 -1
  251. package/build/{index-b5f92ca0.js → index-5bc65809.js} +6 -6
  252. package/build/{index-b75bbb36.js → index-5fdcef88.js} +2 -2
  253. package/build/{index-c0824124.js → index-626df4e1.js} +21 -21
  254. package/build/{index-21bd3fc2.js → index-6699754e.js} +13 -13
  255. package/build/{index-73704e7a.js → index-68b3b9cc.js} +25 -25
  256. package/build/{index-acb6aa58.js → index-78d490d2.js} +3 -3
  257. package/build/{index-6043692f.js → index-7922e69e.js} +2 -2
  258. package/build/{index-696cbd6a.js → index-7979a7fd.js} +3 -3
  259. package/build/{index-4f5e23e0.js → index-7dbf4343.js} +1 -1
  260. package/build/{index-ae61f98e.js → index-859d9704.js} +11 -11
  261. package/build/{index-221ad3a7.js → index-8a641926.js} +1 -1
  262. package/build/{index-67eb9b89.js → index-8d636c5e.js} +15 -15
  263. package/build/{index-c60704f1.js → index-8ed68f29.js} +15 -15
  264. package/build/{index-12897bdd.js → index-8f89038a.js} +15 -15
  265. package/build/{index-0384d19d.js → index-9175f3dc.js} +1 -1
  266. package/build/{index-04d4d6d5.js → index-9368f4ba.js} +8 -8
  267. package/build/{index-22ab16d6.js → index-94b27427.js} +2 -2
  268. package/build/{index-d469f7de.js → index-99d8372b.js} +2 -2
  269. package/build/{index-8be9c1f5.js → index-9a1a2a20.js} +24 -24
  270. package/build/{index-e0e468cb.js → index-9c06a9f8.js} +6 -6
  271. package/build/{index-640597bc.js → index-9cdb8ffc.js} +5 -5
  272. package/build/{index-22841a69.js → index-a027ddce.js} +3 -3
  273. package/build/{index-fcb30055.js → index-a0fe3cd0.js} +2 -2
  274. package/build/{index-9dcf2fa6.js → index-a1138fdb.js} +9 -9
  275. package/build/{index-881cfb0f.js → index-aa442c73.js} +2 -2
  276. package/build/{index-edfd48a3.js → index-abacafb1.js} +2 -2
  277. package/build/{index-4b9dcf37.js → index-abed94ee.js} +7 -7
  278. package/build/{index-27670cc8.js → index-ac37f6c0.js} +16 -16
  279. package/build/{index-1d9bd91f.js → index-ad516504.js} +3 -3
  280. package/build/{index-cc8ff3c0.js → index-af18e92c.js} +3 -3
  281. package/build/{index-6439d793.js → index-b919614c.js} +1 -1
  282. package/build/{index-ce60142f.js → index-bb486b2b.js} +16 -16
  283. package/build/{index-eb070ff1.js → index-bda9fc0f.js} +14 -14
  284. package/build/{index-b5d72bcf.js → index-c037399a.js} +14 -14
  285. package/build/{index-163d3814.js → index-c0797540.js} +2 -2
  286. package/build/{index-06008daa.js → index-c74a66ef.js} +17 -17
  287. package/build/{index-d13c0da0.js → index-d0193408.js} +19 -19
  288. package/build/{index-8d5df576.js → index-d08623ad.js} +16 -16
  289. package/build/{index-d664f4c8.js → index-dab87a70.js} +2 -2
  290. package/build/{index-ede1d939.js → index-dd216b8d.js} +2 -2
  291. package/build/{index-048c359c.js → index-de56de6f.js} +14 -14
  292. package/build/{index-c785a38f.js → index-e6ee6bb1.js} +33 -33
  293. package/build/{index-1e657b96.js → index-e72051d3.js} +2 -2
  294. package/build/{index-768ce2e2.js → index-ec50dce8.js} +3 -3
  295. package/build/{index-08383fcf.js → index-f104b7d3.js} +1 -1
  296. package/build/{index-78f5bf5c.js → index-f3df57f3.js} +2 -2
  297. package/build/{index-2cc01292.js → index-fc3632d1.js} +16 -16
  298. package/build/{index-680b660f.js → index-fea268f5.js} +4 -4
  299. package/build/index.js +126 -126
  300. package/build/{labelSorting-c9cb020f.js → labelSorting-7fc632e0.js} +4 -4
  301. package/build/lead.js +37 -37
  302. package/build/{logoIcon-8ce9a50c.js → logoIcon-bfcdf2f9.js} +2 -2
  303. package/build/mantine.js +25 -25
  304. package/build/misc.js +19 -19
  305. package/build/miscGetDynamicHealthTool.js +4 -4
  306. package/build/miscGetSocialList.js +8 -8
  307. package/build/miscScreenSizeContext.js +1 -1
  308. package/build/mobileBottomNavigation.js +5 -5
  309. package/build/mobileBottomNavigationIcon.js +5 -5
  310. package/build/molecules.js +79 -79
  311. package/build/moleculesArticleCard.js +6 -6
  312. package/build/moleculesArticleCardV2.js +17 -17
  313. package/build/navigation.js +49 -49
  314. package/build/navigationLogoutPopup.js +11 -11
  315. package/build/navigationProfileButton.js +27 -27
  316. package/build/onboardingV2.js +29 -29
  317. package/build/organisms.js +62 -62
  318. package/build/{paths-07bb96ba.js → paths-60d5e970.js} +2 -2
  319. package/build/{post-e25c60f7.js → post-a8461958.js} +2 -2
  320. package/build/profileNavigation.js +20 -20
  321. package/build/progressBar.js +1 -1
  322. package/build/pwg.js +23 -23
  323. package/build/ssoV2.js +29 -29
  324. package/build/{store-2a85405b.js → store-61cad318.js} +3 -3
  325. package/build/subot.js +39 -39
  326. package/build/surveyOrPremiumBanner.js +34 -34
  327. package/build/surveyQuestionCard.js +11 -11
  328. package/build/{surveyThankyouCard-61ed696c.js → surveyThankyouCard-896e9d87.js} +5 -5
  329. package/build/together.js +57 -57
  330. package/build/togetherApiUtils.js +6 -6
  331. package/build/togetherAtoms.js +31 -31
  332. package/build/togetherComponentGlobalContext.js +6 -6
  333. package/build/togetherMolecules.js +52 -52
  334. package/build/togetherMoleculesCardAuthor.js +29 -29
  335. package/build/togetherMoleculesPostImagePreview.js +13 -13
  336. package/build/togetherMoleculesProfileDetail.js +40 -40
  337. package/build/togetherOrganisms.js +51 -51
  338. package/build/togetherRichTextEditor.js +20 -20
  339. package/build/togetherShareBox.js +12 -12
  340. package/build/{transform-61680d8a.js → transform-f5678a32.js} +27 -27
  341. package/build/{translationsProvider-636d7cb5.js → translationsProvider-7e6db534.js} +1 -1
  342. package/build/{treePopoverMenu-45f06b81.js → treePopoverMenu-d6b74bd6.js} +19 -19
  343. package/build/types.js +2 -2
  344. package/build/{useCartCareService-46731f77.js → useCartCareService-202114a6.js} +1 -1
  345. package/build/{useHealthToolCache-b9319885.js → useHealthToolCache-25f3cf03.js} +1 -1
  346. package/build/{usePhoneValidator-5a391cbf.js → usePhoneValidator-36d897da.js} +5 -5
  347. package/build/{usePlacesAutocomplete-4c51dc6b.js → usePlacesAutocomplete-437f7caf.js} +1 -1
  348. package/build/useTogetherAuthRequiredAction.js +10 -10
  349. package/build/{utils-595db140.js → utils-082f61e1.js} +5 -5
  350. package/build/{utils-bb345cce.js → utils-1aeabb49.js} +2 -2
  351. package/build/{utils-6fe19ced.js → utils-4d304390.js} +3 -3
  352. package/build/{utils-68673897.js → utils-b3fa920f.js} +2 -2
  353. package/build/{utils-83aaaf9c.js → utils-bc652d73.js} +3 -3
  354. package/build/vaccination.js +22 -22
  355. package/package.json +1 -1
  356. /package/build/{BMI_BOYS.percentile.monthly-71706d34.js → BMI_BOYS.percentile.monthly-c8cb7280.js} +0 -0
  357. /package/build/{BMI_BOYS.percentile.weekly-7347a0d7.js → BMI_BOYS.percentile.weekly-55ff6bc1.js} +0 -0
  358. /package/build/{BMI_BOYS.percentile.yearly-a91f42b3.js → BMI_BOYS.percentile.yearly-ae309cc1.js} +0 -0
  359. /package/build/{BMI_BOYS.zscore.monthly-5a655570.js → BMI_BOYS.zscore.monthly-51faa333.js} +0 -0
  360. /package/build/{BMI_BOYS.zscore.weekly-a9d33e3a.js → BMI_BOYS.zscore.weekly-c8bc4567.js} +0 -0
  361. /package/build/{BMI_BOYS.zscore.yearly-484752f7.js → BMI_BOYS.zscore.yearly-3e94c386.js} +0 -0
  362. /package/build/{BMI_GIRLS.percentile.monthly-bcc5b3c5.js → BMI_GIRLS.percentile.monthly-2f0f4651.js} +0 -0
  363. /package/build/{BMI_GIRLS.percentile.weekly-10944ec1.js → BMI_GIRLS.percentile.weekly-f3d8cc3f.js} +0 -0
  364. /package/build/{BMI_GIRLS.percentile.yearly-4cb9b07b.js → BMI_GIRLS.percentile.yearly-ce01bdfd.js} +0 -0
  365. /package/build/{BMI_GIRLS.zscore.monthly-c8509ebc.js → BMI_GIRLS.zscore.monthly-c30a5aa7.js} +0 -0
  366. /package/build/{BMI_GIRLS.zscore.weekly-0a45a2af.js → BMI_GIRLS.zscore.weekly-850dcf70.js} +0 -0
  367. /package/build/{BMI_GIRLS.zscore.yearly-38fd0761.js → BMI_GIRLS.zscore.yearly-c14aaf5e.js} +0 -0
  368. /package/build/{ChevronDown-daab0252.js → ChevronDown-bd7697c4.js} +0 -0
  369. /package/build/{Close-6bcd5612.js → Close-d80873df.js} +0 -0
  370. /package/build/{Google-46ae3220.js → Google-7f8e4f6e.js} +0 -0
  371. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-acd7d0c0.js → HEAD CIRCUM_BOYS.percentile.monthly-8faeb896.js} +0 -0
  372. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-0624ad4a.js → HEAD CIRCUM_BOYS.percentile.weekly-e070074f.js} +0 -0
  373. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-7f5e2f03.js → HEAD CIRCUM_BOYS.percentile.yearly-820285f4.js} +0 -0
  374. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-e24a3e66.js → HEAD CIRCUM_BOYS.zscore.monthly-1b0097ec.js} +0 -0
  375. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-f47af62d.js → HEAD CIRCUM_BOYS.zscore.weekly-5686ddfb.js} +0 -0
  376. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-b9a06fde.js → HEAD CIRCUM_BOYS.zscore.yearly-ad150e91.js} +0 -0
  377. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-2a4e90ea.js → HEAD CIRCUM_GIRLS.percentile.monthly-076cdb96.js} +0 -0
  378. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-55b7b3ff.js → HEAD CIRCUM_GIRLS.percentile.weekly-7ba0f699.js} +0 -0
  379. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-3072fb36.js → HEAD CIRCUM_GIRLS.percentile.yearly-c64aece9.js} +0 -0
  380. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-0d75efdc.js → HEAD CIRCUM_GIRLS.zscore.monthly-222ef11f.js} +0 -0
  381. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-8cbb2c5b.js → HEAD CIRCUM_GIRLS.zscore.weekly-bffe1fde.js} +0 -0
  382. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-8d484ee7.js → HEAD CIRCUM_GIRLS.zscore.yearly-65836f4a.js} +0 -0
  383. /package/build/{HEIGHT_BOYS.percentile.monthly-0ed745dc.js → HEIGHT_BOYS.percentile.monthly-312b0a78.js} +0 -0
  384. /package/build/{HEIGHT_BOYS.percentile.weekly-83f4827d.js → HEIGHT_BOYS.percentile.weekly-d4a02b3a.js} +0 -0
  385. /package/build/{HEIGHT_BOYS.percentile.yearly-5010e8d8.js → HEIGHT_BOYS.percentile.yearly-4991623c.js} +0 -0
  386. /package/build/{HEIGHT_BOYS.zscore.monthly-3ea70741.js → HEIGHT_BOYS.zscore.monthly-cf943dab.js} +0 -0
  387. /package/build/{HEIGHT_BOYS.zscore.weekly-2e3eaa3f.js → HEIGHT_BOYS.zscore.weekly-929ee172.js} +0 -0
  388. /package/build/{HEIGHT_BOYS.zscore.yearly-2062c6ef.js → HEIGHT_BOYS.zscore.yearly-1ad495ec.js} +0 -0
  389. /package/build/{HEIGHT_GIRLS.percentile.monthly-24046937.js → HEIGHT_GIRLS.percentile.monthly-49d5f51f.js} +0 -0
  390. /package/build/{HEIGHT_GIRLS.percentile.weekly-5d48ca6c.js → HEIGHT_GIRLS.percentile.weekly-a99518f5.js} +0 -0
  391. /package/build/{HEIGHT_GIRLS.percentile.yearly-93eeb025.js → HEIGHT_GIRLS.percentile.yearly-91a3be34.js} +0 -0
  392. /package/build/{HEIGHT_GIRLS.zscore.monthly-b1d98e51.js → HEIGHT_GIRLS.zscore.monthly-ba8c8e6e.js} +0 -0
  393. /package/build/{HEIGHT_GIRLS.zscore.weekly-3ac2b96a.js → HEIGHT_GIRLS.zscore.weekly-50353a52.js} +0 -0
  394. /package/build/{HEIGHT_GIRLS.zscore.yearly-5e0b0bb8.js → HEIGHT_GIRLS.zscore.yearly-d1b5f969.js} +0 -0
  395. /package/build/{Locale-a078bb23.js → Locale-daf9aa88.js} +0 -0
  396. /package/build/{Visible-08c4be3d.js → Visible-2b15fba4.js} +0 -0
  397. /package/build/{WEIGHT_BOYS.percentile.monthly-78d2a6d0.js → WEIGHT_BOYS.percentile.monthly-5d6787ce.js} +0 -0
  398. /package/build/{WEIGHT_BOYS.percentile.weekly-56168e21.js → WEIGHT_BOYS.percentile.weekly-1a860b4b.js} +0 -0
  399. /package/build/{WEIGHT_BOYS.percentile.yearly-80c8b72b.js → WEIGHT_BOYS.percentile.yearly-fd57716a.js} +0 -0
  400. /package/build/{WEIGHT_BOYS.zscore.monthly-e6e24158.js → WEIGHT_BOYS.zscore.monthly-a0acd992.js} +0 -0
  401. /package/build/{WEIGHT_BOYS.zscore.weekly-ebcacfa3.js → WEIGHT_BOYS.zscore.weekly-89ef1904.js} +0 -0
  402. /package/build/{WEIGHT_BOYS.zscore.yearly-cd0d70fa.js → WEIGHT_BOYS.zscore.yearly-7da1d40a.js} +0 -0
  403. /package/build/{WEIGHT_GIRLS.percentile.monthly-131d256b.js → WEIGHT_GIRLS.percentile.monthly-6f58db3e.js} +0 -0
  404. /package/build/{WEIGHT_GIRLS.percentile.weekly-21f14054.js → WEIGHT_GIRLS.percentile.weekly-86271d0c.js} +0 -0
  405. /package/build/{WEIGHT_GIRLS.percentile.yearly-bd1f351e.js → WEIGHT_GIRLS.percentile.yearly-0ef79884.js} +0 -0
  406. /package/build/{WEIGHT_GIRLS.zscore.monthly-1aa42d0e.js → WEIGHT_GIRLS.zscore.monthly-b25a4c9b.js} +0 -0
  407. /package/build/{WEIGHT_GIRLS.zscore.weekly-7c73bedc.js → WEIGHT_GIRLS.zscore.weekly-370bd448.js} +0 -0
  408. /package/build/{WEIGHT_GIRLS.zscore.yearly-5f457f00.js → WEIGHT_GIRLS.zscore.yearly-f9e4eee1.js} +0 -0
  409. /package/build/{ageGenerate-98e62464.js → ageGenerate-15148d2a.js} +0 -0
  410. /package/build/{animation-c1188035.js → animation-2da7465d.js} +0 -0
  411. /package/build/{constants-1793f76d.js → constants-01227b75.js} +0 -0
  412. /package/build/{constants-8109eafd.js → constants-d45110a8.js} +0 -0
  413. /package/build/{context-df75dde3.js → context-e82deb48.js} +0 -0
  414. /package/build/{dataTransform-e60babbb.js → dataTransform-88f89c7a.js} +0 -0
  415. /package/build/esm/{BMI_BOYS.percentile.monthly-2704f965.js → BMI_BOYS.percentile.monthly-59d604f6.js} +0 -0
  416. /package/build/esm/{BMI_BOYS.percentile.weekly-cb98a634.js → BMI_BOYS.percentile.weekly-fc44a5b7.js} +0 -0
  417. /package/build/esm/{BMI_BOYS.percentile.yearly-cf423a0a.js → BMI_BOYS.percentile.yearly-9176e4e1.js} +0 -0
  418. /package/build/esm/{BMI_BOYS.zscore.monthly-685ba1c7.js → BMI_BOYS.zscore.monthly-6e573c0b.js} +0 -0
  419. /package/build/esm/{BMI_BOYS.zscore.weekly-f88a217b.js → BMI_BOYS.zscore.weekly-1745ebd4.js} +0 -0
  420. /package/build/esm/{BMI_BOYS.zscore.yearly-4112d011.js → BMI_BOYS.zscore.yearly-1476fb3a.js} +0 -0
  421. /package/build/esm/{BMI_GIRLS.percentile.monthly-63c6d21c.js → BMI_GIRLS.percentile.monthly-d2d35df9.js} +0 -0
  422. /package/build/esm/{BMI_GIRLS.percentile.weekly-447ff2e9.js → BMI_GIRLS.percentile.weekly-6c19387b.js} +0 -0
  423. /package/build/esm/{BMI_GIRLS.percentile.yearly-dd787daa.js → BMI_GIRLS.percentile.yearly-06cc8ebe.js} +0 -0
  424. /package/build/esm/{BMI_GIRLS.zscore.monthly-3a9080d3.js → BMI_GIRLS.zscore.monthly-fd5ac2e5.js} +0 -0
  425. /package/build/esm/{BMI_GIRLS.zscore.weekly-a6b58da1.js → BMI_GIRLS.zscore.weekly-f68aa046.js} +0 -0
  426. /package/build/esm/{BMI_GIRLS.zscore.yearly-efcd0984.js → BMI_GIRLS.zscore.yearly-0c048503.js} +0 -0
  427. /package/build/esm/{ChevronDown-13f6a5cf.js → ChevronDown-99190b49.js} +0 -0
  428. /package/build/esm/{Close-c1620eee.js → Close-4c9c5d81.js} +0 -0
  429. /package/build/esm/{Google-9786875a.js → Google-49452371.js} +0 -0
  430. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-582c90de.js → HEAD CIRCUM_BOYS.percentile.monthly-d369c45c.js} +0 -0
  431. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-978bac8a.js → HEAD CIRCUM_BOYS.percentile.weekly-2c48fafc.js} +0 -0
  432. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-cf26e3d0.js → HEAD CIRCUM_BOYS.percentile.yearly-e794341e.js} +0 -0
  433. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-31de970e.js → HEAD CIRCUM_BOYS.zscore.monthly-407b0528.js} +0 -0
  434. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-900f95f2.js → HEAD CIRCUM_BOYS.zscore.weekly-771bbb48.js} +0 -0
  435. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-409f8b98.js → HEAD CIRCUM_BOYS.zscore.yearly-623d50eb.js} +0 -0
  436. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-4231eb97.js → HEAD CIRCUM_GIRLS.percentile.monthly-214f1990.js} +0 -0
  437. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-b02c363f.js → HEAD CIRCUM_GIRLS.percentile.weekly-7cbe6fff.js} +0 -0
  438. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-78b34ff2.js → HEAD CIRCUM_GIRLS.percentile.yearly-28207825.js} +0 -0
  439. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-0c7a31f7.js → HEAD CIRCUM_GIRLS.zscore.monthly-9e25b76a.js} +0 -0
  440. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-868bf312.js → HEAD CIRCUM_GIRLS.zscore.weekly-32881b18.js} +0 -0
  441. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-e76ac89e.js → HEAD CIRCUM_GIRLS.zscore.yearly-4f8e0a2e.js} +0 -0
  442. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-20d42076.js → HEIGHT_BOYS.percentile.monthly-6a5617db.js} +0 -0
  443. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-a2798e49.js → HEIGHT_BOYS.percentile.weekly-f5400955.js} +0 -0
  444. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-483306f2.js → HEIGHT_BOYS.percentile.yearly-7d0b1c6e.js} +0 -0
  445. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-42784c9d.js → HEIGHT_BOYS.zscore.monthly-d03f1410.js} +0 -0
  446. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-849fe5f4.js → HEIGHT_BOYS.zscore.weekly-54afffac.js} +0 -0
  447. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-548e7e60.js → HEIGHT_BOYS.zscore.yearly-395598e5.js} +0 -0
  448. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-c5b41a4d.js → HEIGHT_GIRLS.percentile.monthly-202e9f0a.js} +0 -0
  449. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-430ad60a.js → HEIGHT_GIRLS.percentile.weekly-0c2d2912.js} +0 -0
  450. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-ea5d2cef.js → HEIGHT_GIRLS.percentile.yearly-edbc48dd.js} +0 -0
  451. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-feabe2d8.js → HEIGHT_GIRLS.zscore.monthly-6c102061.js} +0 -0
  452. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-6b3584e2.js → HEIGHT_GIRLS.zscore.weekly-c068f6e5.js} +0 -0
  453. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-0d4773d1.js → HEIGHT_GIRLS.zscore.yearly-62525f1e.js} +0 -0
  454. /package/build/esm/{Locale-adfd207f.js → Locale-dd85e540.js} +0 -0
  455. /package/build/esm/{Visible-5b3e8bb2.js → Visible-ca95870e.js} +0 -0
  456. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-79ea5ed5.js → WEIGHT_BOYS.percentile.monthly-b0ec8b51.js} +0 -0
  457. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-df533c0b.js → WEIGHT_BOYS.percentile.weekly-cbace597.js} +0 -0
  458. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-be9284bf.js → WEIGHT_BOYS.percentile.yearly-bd229dcb.js} +0 -0
  459. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-33696cff.js → WEIGHT_BOYS.zscore.monthly-8a2526bd.js} +0 -0
  460. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-7ce33291.js → WEIGHT_BOYS.zscore.weekly-010ccb5d.js} +0 -0
  461. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-87bf3a6e.js → WEIGHT_BOYS.zscore.yearly-807fb74a.js} +0 -0
  462. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-02a28d8b.js → WEIGHT_GIRLS.percentile.monthly-188cf1de.js} +0 -0
  463. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-1e556624.js → WEIGHT_GIRLS.percentile.weekly-edcf30aa.js} +0 -0
  464. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-a2a7e950.js → WEIGHT_GIRLS.percentile.yearly-11916aa1.js} +0 -0
  465. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-ca966e35.js → WEIGHT_GIRLS.zscore.monthly-02e4f36e.js} +0 -0
  466. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-995c55b4.js → WEIGHT_GIRLS.zscore.weekly-f04180c7.js} +0 -0
  467. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-666e98e9.js → WEIGHT_GIRLS.zscore.yearly-b0f6b466.js} +0 -0
  468. /package/build/esm/{ageGenerate-5820c481.js → ageGenerate-a19ee554.js} +0 -0
  469. /package/build/esm/{animation-d8cdf774.js → animation-530c8713.js} +0 -0
  470. /package/build/esm/{constants-ce5271a6.js → constants-2a6f0822.js} +0 -0
  471. /package/build/esm/{constants-1da5a50a.js → constants-ebf82e1d.js} +0 -0
  472. /package/build/esm/{context-3ef9593e.js → context-adea3929.js} +0 -0
  473. /package/build/esm/{dataTransform-cbeb5762.js → dataTransform-31b69b1f.js} +0 -0
  474. /package/build/esm/{index-ec96ed21.js → index-10d0027c.js} +0 -0
  475. /package/build/esm/{index-bef69cf0.js → index-22cb52ac.js} +0 -0
  476. /package/build/esm/{index-f488874b.js → index-40178353.js} +0 -0
  477. /package/build/esm/{index-8166c45c.js → index-43a9fa15.js} +0 -0
  478. /package/build/esm/{index-e6344e81.js → index-52105956.js} +0 -0
  479. /package/build/esm/{index-be67b7ae.js → index-676cea42.js} +0 -0
  480. /package/build/esm/{index-e8324372.js → index-b2a8a256.js} +0 -0
  481. /package/build/esm/{index-56e4d976.js → index-edde0d78.js} +0 -0
  482. /package/build/esm/{index-a131e0d4.js → index-f3b9047f.js} +0 -0
  483. /package/build/esm/{index.styles-403f770f.js → index.styles-fc1f3f4c.js} +0 -0
  484. /package/build/esm/{localizeNumberFormat-88646ced.js → localizeNumberFormat-02aa10d8.js} +0 -0
  485. /package/build/esm/{normalizeLink-5d0ac05d.js → normalizeLink-be7f4c29.js} +0 -0
  486. /package/build/esm/{number-003a0b20.js → number-323db2e3.js} +0 -0
  487. /package/build/esm/{shared-f8354531.js → shared-ddb4a7c0.js} +0 -0
  488. /package/build/esm/{translationsContext-f5f75ec5.js → translationsContext-9ccdd735.js} +0 -0
  489. /package/build/esm/{tslib.es6-88ed8ad1.js → tslib.es6-eac05ee6.js} +0 -0
  490. /package/build/esm/{types-bb63b0f1.js → types-1da79786.js} +0 -0
  491. /package/build/esm/{types-1fa82904.js → types-f3c62b8e.js} +0 -0
  492. /package/build/esm/{useOutsideClick-8288aa4e.js → useOutsideClick-7b0e73bb.js} +0 -0
  493. /package/build/esm/{useScrollbarSize-84630ccb.js → useScrollbarSize-cbeb3de3.js} +0 -0
  494. /package/build/esm/{useUniqueId-781519f9.js → useUniqueId-09a9a15d.js} +0 -0
  495. /package/build/esm/{utils-308ca058.js → utils-8fa947f2.js} +0 -0
  496. /package/build/esm/{utils-e7b81bdc.js → utils-f2c14fb6.js} +0 -0
  497. /package/build/{index-b262b1d4.js → index-0b65a3e1.js} +0 -0
  498. /package/build/{index-cf78f71e.js → index-3658a241.js} +0 -0
  499. /package/build/{index-0c2bcd44.js → index-6116f62d.js} +0 -0
  500. /package/build/{index-858052e3.js → index-6c22e2d3.js} +0 -0
  501. /package/build/{index-4dcc592d.js → index-7305ec62.js} +0 -0
  502. /package/build/{index-a2e16797.js → index-a185e6c8.js} +0 -0
  503. /package/build/{index-c92c0540.js → index-cad29f79.js} +0 -0
  504. /package/build/{index-8f28b7cd.js → index-de2e9a33.js} +0 -0
  505. /package/build/{index-f74dab7a.js → index-ff0be8db.js} +0 -0
  506. /package/build/{index.styles-eac100df.js → index.styles-7654fb59.js} +0 -0
  507. /package/build/{localizeNumberFormat-276f5621.js → localizeNumberFormat-0c6e5858.js} +0 -0
  508. /package/build/{normalizeLink-d947e46b.js → normalizeLink-9cbdcafa.js} +0 -0
  509. /package/build/{number-50711ee8.js → number-10ca56f4.js} +0 -0
  510. /package/build/{shared-e6688092.js → shared-7b7b3f13.js} +0 -0
  511. /package/build/{translationsContext-a3ccdf71.js → translationsContext-9b0d023d.js} +0 -0
  512. /package/build/{tslib.es6-96c97478.js → tslib.es6-7d483fc2.js} +0 -0
  513. /package/build/{types-b89d9486.js → types-9d499822.js} +0 -0
  514. /package/build/{types-c613708f.js → types-ed1ecac3.js} +0 -0
  515. /package/build/{useOutsideClick-de846086.js → useOutsideClick-c0a2806b.js} +0 -0
  516. /package/build/{useScrollbarSize-fa69e3af.js → useScrollbarSize-96b32242.js} +0 -0
  517. /package/build/{useUniqueId-f936ca4e.js → useUniqueId-36c15220.js} +0 -0
  518. /package/build/{utils-08509440.js → utils-06f796b5.js} +0 -0
  519. /package/build/{utils-fe333e42.js → utils-3b9fef4f.js} +0 -0
@@ -1,22 +1,27 @@
1
- import React__default, { useMemo, useRef, useCallback, useState, useReducer, useEffect } from 'react';
2
- import { Skeleton, Input, ScrollArea, Divider, Tabs, Flex, Button } from '@mantine/core';
3
- import { i as checkMarkIconUrl, P as PinIcon, h as getApiPath, u as useGeolocation } from './utils-5e210f54.js';
4
- import { a as useOutsideClick } from './useOutsideClick-8288aa4e.js';
5
- import { u as useTranslations } from './index-78e91f91.js';
1
+ import React__default, { useMemo, forwardRef, useRef, useImperativeHandle, useCallback, useState, useReducer, useEffect } from 'react';
2
+ import { Search } from '@hhgtech/icons/core';
3
+ import { Skeleton, clsx, Text as Text$1, Select, rem, useMantineTheme, Input, Stack, Flex, Box, Divider, Tabs } from '@mantine/core';
4
+ import { useDisclosure } from '@mantine/hooks';
5
+ import { i as checkMarkIconUrl, P as PinIcon, h as getApiPath, u as useGeolocation } from './utils-e56045d9.js';
6
+ import { a as useOutsideClick } from './useOutsideClick-7b0e73bb.js';
7
+ import { u as useTranslations } from './index-72b972f5.js';
6
8
  import debounce from 'lodash/debounce';
7
- import { a as ID_OPTION_CURRENT_LOCATION, M as MAPPING_CLIENT_WITH_SLUG, L as LOCALIZED_SLUGS, I as ID_OPTION_ALL_LOCATION, S as SLUG_VACIN_ID, C as CLIENT_KEY } from './constants-1da5a50a.js';
9
+ import { a as ID_OPTION_CURRENT_LOCATION, L as LOCALIZED_SLUGS, I as ID_OPTION_ALL_LOCATION, S as SLUG_VACIN_ID, C as CLIENT_KEY, M as MAPPING_CLIENT_WITH_SLUG } from './constants-ebf82e1d.js';
8
10
  import styled from '@emotion/styled';
9
11
  import { theme } from './miscTheme.js';
10
- import { M as MediaQueries } from './utils-308ca058.js';
11
- import { C as Container } from './index-a131e0d4.js';
12
- import { Search } from '@hhgtech/icons/core';
13
- import { T as Text } from './index-6562a540.js';
14
- import { C as ChevronDown } from './ChevronDown-13f6a5cf.js';
15
- import { P as PATHS } from './paths-28205e0f.js';
16
- import './index-2b33f487.js';
12
+ import { M as MediaQueries } from './utils-8fa947f2.js';
13
+ import { C as Container } from './index-f3b9047f.js';
14
+ import { T as Text } from './index-ba4cfc72.js';
15
+ import { C as ChevronDown } from './ChevronDown-99190b49.js';
16
+ import { _ as __rest } from './tslib.es6-eac05ee6.js';
17
+ import { ArrowLeft } from '@hhgtech/icons/arrow';
18
+ import { M as Modal } from './index-7d3b5c77.js';
19
+ import { P as PATHS } from './paths-57889e7a.js';
20
+ import { B as Button } from './index-b07e5ab0.js';
21
+ import './index-7061fdca.js';
17
22
  import 'date-fns/locale';
18
- import './index-6d341978.js';
19
- import './Locale-adfd207f.js';
23
+ import './index-a7cbb0b9.js';
24
+ import './Locale-dd85e540.js';
20
25
  import './constantsSite.js';
21
26
  import './constantsDomainLocales.js';
22
27
  import './constantsRiskScreener.js';
@@ -24,9 +29,10 @@ import './constantsIsProduction.js';
24
29
  import './miscCookieHelper.js';
25
30
  import 'react-loading-skeleton';
26
31
  import 'string-format';
27
- import './translationsContext-f5f75ec5.js';
28
- import './tslib.es6-88ed8ad1.js';
29
- import './index-56e4d976.js';
32
+ import './translationsContext-9ccdd735.js';
33
+ import './index-edde0d78.js';
34
+ import './index.styles-fc1f3f4c.js';
35
+ import './shared-ddb4a7c0.js';
30
36
 
31
37
  const StyledSearchBarWrapper = styled.div ``;
32
38
  const StyleWrapperContainer = styled.div `
@@ -215,9 +221,9 @@ function reducer(state, action) {
215
221
  case ActionTypes.ClearInputSearch:
216
222
  return Object.assign(Object.assign({}, state), { focused: 'search', searchKeywords: '' });
217
223
  case ActionTypes.SelectLocation:
218
- return Object.assign(Object.assign({}, state), { focused: 'none', selectedLocation: action.payload, searchLocationKeywords: action.payload.name });
224
+ return Object.assign(Object.assign({}, state), { focused: 'none', selectedLocation: action.payload, searchLocationKeywords: action.payload.name, searchResults: {} });
219
225
  case ActionTypes.SelectSpecialty:
220
- return Object.assign(Object.assign({}, state), { focused: 'none', selectedSpecialty: action.payload });
226
+ return Object.assign(Object.assign({}, state), { focused: 'none', selectedSpecialty: action.payload, searchResults: {} });
221
227
  case ActionTypes.SelectSearchResult:
222
228
  return Object.assign(Object.assign({}, state), { searchKeywords: action.payload.name, isMobileModalOpened: false, focused: 'none', navigateTo: action.payload.url });
223
229
  case ActionTypes.FetchCitiesStart:
@@ -295,7 +301,7 @@ const StyleSearchInputsWrapper = styled.div `
295
301
  gap: 12px;
296
302
  }
297
303
  `;
298
- const StyleResultWrapper$2 = styled.div `
304
+ const StyleResultWrapper = styled.div `
299
305
  position: absolute;
300
306
  top: calc(100% + 2px);
301
307
  width: 100%;
@@ -311,7 +317,7 @@ const StyleResultWrapper$2 = styled.div `
311
317
  `;
312
318
 
313
319
  const StyledSearchResultWrapper = styled.div ``;
314
- const StyleResultHeader = styled.div `
320
+ styled.div `
315
321
  display: flex;
316
322
  justify-content: space-between;
317
323
  align-item: center;
@@ -343,9 +349,12 @@ const StyleResultItem = styled.div `
343
349
  align-items: center;
344
350
  cursor: pointer;
345
351
 
346
- &:hover {
347
- background-color: ${theme.colors.blue50};
352
+ ${MediaQueries.mbUp} {
353
+ &:hover {
354
+ background-color: ${theme.colors.blue50};
355
+ }
348
356
  }
357
+
349
358
  .image-item {
350
359
  flex: 0 0 48px;
351
360
  width: 48px;
@@ -412,8 +421,12 @@ styled.div `
412
421
  }
413
422
  `;
414
423
 
415
- const SearchResult = ({ state, type, results, location, isLoading, typeInformation, clientSlug = '', dispatch, }) => {
416
- const { locale, t } = useTranslations();
424
+ const SearchResult = ({ state, type, results,
425
+ // location,
426
+ isLoading, typeInformation,
427
+ // clientSlug = '',
428
+ dispatch, }) => {
429
+ const { t } = useTranslations();
417
430
  const { selectedLocation } = state;
418
431
  const typeSlug = useMemo(() => typeInformation[type].slug, [typeInformation, type]);
419
432
  const handleOnClick = (item) => {
@@ -434,40 +447,37 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
434
447
  });
435
448
  }
436
449
  };
437
- const handleSeeAll = () => {
438
- let url = `/${selectedLocation.slug}/${typeSlug}`;
439
- const slugClientUrl = MAPPING_CLIENT_WITH_SLUG[locale][clientSlug];
440
- if (slugClientUrl) {
441
- url += `/${slugClientUrl}`;
442
- }
443
- if ((type === 'doctor' || type === 'hospital') &&
444
- state.selectedSpecialty.id > 0) {
445
- url += `?specialtyId=${state.selectedSpecialty.id}`;
446
- }
447
- if (url) {
448
- dispatch({ type: ActionTypes.NavigateTo, payload: url });
449
- }
450
- };
450
+ // const handleSeeAll = () => {
451
+ // let url = `/${selectedLocation.slug}/${typeSlug}`
452
+ // const slugClientUrl = MAPPING_CLIENT_WITH_SLUG[locale][clientSlug]
453
+ // if (slugClientUrl) {
454
+ // url += `/${slugClientUrl}`
455
+ // }
456
+ // if (
457
+ // (type === 'doctor' || type === 'hospital') &&
458
+ // state.selectedSpecialty.id > 0
459
+ // ) {
460
+ // url += `?specialtyId=${state.selectedSpecialty.id}`
461
+ // }
462
+ // if (url) {
463
+ // dispatch({ type: ActionTypes.NavigateTo, payload: url })
464
+ // }
465
+ // }
466
+ if (results === null)
467
+ return null;
451
468
  return (React__default.createElement(StyledSearchResultWrapper, null,
452
- React__default.createElement(StyleResultHeader, null,
453
- React__default.createElement("div", { className: "title" }, t('booking.searchResult.description', {
454
- search_type: typeInformation[type].name,
455
- search_location: location,
456
- })),
457
- results.length > 0 && (React__default.createElement("div", { className: "btn-see-all", onClick: handleSeeAll }, t('home.seeAll')))),
458
- React__default.createElement(StyleResultBody, null,
459
- isLoading &&
460
- Array(3)
461
- .fill(undefined)
462
- .map((_, i) => (React__default.createElement(StyleResultItem, { key: type + 'loading' + i, className: i === 2 ? 'last-item' : '' },
463
- React__default.createElement("div", { className: "image-item" },
464
- React__default.createElement(Skeleton, { height: 48, circle: true, mb: "xl", animate: true })),
465
- React__default.createElement("div", { className: "infor" },
466
- React__default.createElement("div", { className: "title" },
467
- React__default.createElement(Skeleton, { height: 8, mt: 10, radius: "xl", animate: true })),
468
- React__default.createElement("div", { className: "description" },
469
- React__default.createElement("div", { className: "sub-description" },
470
- React__default.createElement(Skeleton, { height: 8, mt: 10, radius: "xl", width: "80%", animate: true }))))))),
469
+ React__default.createElement(StyleResultBody, { className: "search-results__body" },
470
+ isLoading && (React__default.createElement("div", { className: "skeleton-result" }, Array(3)
471
+ .fill(undefined)
472
+ .map((_, i) => (React__default.createElement(StyleResultItem, { key: type + 'loading' + i, className: i === 2 ? 'last-item' : '' },
473
+ React__default.createElement("div", { className: "image-item" },
474
+ React__default.createElement(Skeleton, { height: 48, circle: true, mb: "xl", animate: true })),
475
+ React__default.createElement("div", { className: "infor" },
476
+ React__default.createElement("div", { className: "title" },
477
+ React__default.createElement(Skeleton, { height: 8, mt: 10, radius: "xl", animate: true })),
478
+ React__default.createElement("div", { className: "description" },
479
+ React__default.createElement("div", { className: "sub-description" },
480
+ React__default.createElement(Skeleton, { height: 8, mt: 10, radius: "xl", width: "80%", animate: true }))))))))),
471
481
  !isLoading && results && results.length > 0 && (React__default.createElement(React__default.Fragment, null, results.map((item, index) => {
472
482
  var _a, _b;
473
483
  const isLastItem = (results.length > 4 && index === 3) ||
@@ -485,7 +495,7 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
485
495
  if (index >= 4) {
486
496
  return React__default.createElement(React__default.Fragment, null);
487
497
  }
488
- return (React__default.createElement(StyleResultItem, { key: item.id, className: isLastItem ? 'last-item' : '', onClick: () => handleOnClick(item) },
498
+ return (React__default.createElement(StyleResultItem, { key: item.id, className: clsx(isLastItem ? 'last-item' : '', 'result-item'), onClick: () => handleOnClick(item) },
489
499
  React__default.createElement("div", { className: "image-item" },
490
500
  React__default.createElement("img", { src: item.logo || item.avatar, alt: item.name })),
491
501
  React__default.createElement("div", { className: "infor" },
@@ -494,7 +504,14 @@ const SearchResult = ({ state, type, results, location, isLoading, typeInformati
494
504
  typeInformation[type].icon,
495
505
  React__default.createElement("div", { className: "sub-description" }, subDescription)))));
496
506
  }))),
497
- !isLoading && (results === null || results === void 0 ? void 0 : results.length) === 0 && (React__default.createElement(Text, { size: "sm", color: theme.colors.gray400 }, t('booking.searchBar.noResults'))))));
507
+ !isLoading && (results === null || results === void 0 ? void 0 : results.length) === 0 && (React__default.createElement(Text, { size: "sm", color: theme.colors.gray400, className: "noresult-block" }, t('booking.searchBar.noResults'))))));
508
+ };
509
+
510
+ const SearchResultContent = ({ state, type, isLoading, clientSlug, typeInformation, dispatch, }) => {
511
+ var _a;
512
+ if (state.focused !== 'search')
513
+ return null;
514
+ return (React__default.createElement(SearchResult, { type: type, state: state, results: ((_a = state.searchResults) === null || _a === void 0 ? void 0 : _a[type]) || null, location: state.selectedLocation.name, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug }));
498
515
  };
499
516
 
500
517
  const StyleSearchSpecialtyWrapper = styled.div `
@@ -507,7 +524,7 @@ const StyleSearchSpecialtyWrapper = styled.div `
507
524
  gap: 12px;
508
525
  }
509
526
  `;
510
- const StyleResultWrapper$1 = styled.div `
527
+ styled.div `
511
528
  position: absolute;
512
529
  top: calc(100% + 2px);
513
530
  width: calc(100% + 100px);
@@ -589,97 +606,182 @@ const StyledSpecialtyItem = styled.li `
589
606
  }
590
607
  `;
591
608
 
592
- const DoctorIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
593
- React__default.createElement("path", { d: "M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208", fill: "#595959" })));
594
- const ServiceIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
595
- React__default.createElement("path", { d: "M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068", fill: "#595959" })));
596
- const HospitalIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
597
- React__default.createElement("path", { d: "M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184", fill: "#8C8C8C" })));
598
- const SpecialtyIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
599
- React__default.createElement("path", { d: "M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667", fill: "#9AA2AC" })));
600
-
601
- const SearchSpecialty = ({ state, isMobile, debouncedFetchSearchResults, selectedLocation, onSpecialtyClick, dispatch, }) => {
602
- var _a;
609
+ const CustomSelectItem$1 = forwardRef((_a, ref) => {
610
+ var { label, value, specialty } = _a, others = __rest(_a, ["label", "value", "specialty"]);
611
+ return (React__default.createElement("div", Object.assign({ ref: ref }, others),
612
+ React__default.createElement(StyledSpecialtyItem, { key: value,
613
+ // onClick={(evt) => {
614
+ // evt.nativeEvent.stopImmediatePropagation()
615
+ // if (onSpecialtyClick) {
616
+ // onSpecialtyClick({
617
+ // ...specialty,
618
+ // total_doctor: 0,
619
+ // })
620
+ // }
621
+ // }}
622
+ role: "button", tabIndex: 0, "aria-label": `Select ${label} as location` },
623
+ React__default.createElement("div", { className: "image-item" },
624
+ React__default.createElement("img", { src: specialty.thumbnail, alt: label })),
625
+ React__default.createElement(Text$1, { size: "md" }, label))));
626
+ });
627
+
628
+ const SearchSpecialty = ({ state,
629
+ // debouncedFetchSearchResults,
630
+ onSpecialtyClick, dispatch, }) => {
603
631
  const { t, locale } = useTranslations();
604
632
  const inputSpecialtyWrapperRef = useRef(null);
605
633
  const slugs = useMemo(() => LOCALIZED_SLUGS[locale], [locale]);
606
- const styleSpecialties = useMemo(() => {
607
- return {
608
- wrapper: {
609
- '&:after': {
610
- content: '""',
611
- width: '1px',
612
- height: '20px',
613
- backgroundColor: '#E4E8EC',
614
- position: 'absolute',
615
- right: 0,
616
- top: '13px',
617
- },
618
- },
619
- input: {
620
- border: isMobile ? 'border: 1px solid #d9d9d9' : 'none',
621
- height: isMobile ? '40px' : '46px !important',
622
- paddingRight: '30px',
623
- '&:focus': {
624
- boxShadow: isMobile ? 'box-shadow: 0px 0px 0px 2px #91caff' : 'none',
625
- },
626
- },
627
- rightSection: {
628
- width: '30px',
629
- svg: {
630
- fontSize: '20px',
631
- },
632
- },
633
- };
634
- }, [isMobile]);
635
- const handleSearchSpecialtyInputChange = useCallback(function handleSearchSpecialtyInputChange(value) {
636
- // dispatch({ type: ActionTypes.ChangeInputLocation, payload: value })
637
- // if (value.trim().length > SEARCH_KEYWORD_MIN_LENGTH[state.locale]) {
638
- // debouncedFetchSearchResults(value.trim())
639
- // } else {
640
- // debouncedFetchSearchResults.cancel()
641
- // dispatch({ type: ActionTypes.DisplayInitialCities })
642
- // }
643
- console.log(value);
644
- }, [debouncedFetchSearchResults, dispatch]);
634
+ // const styleSpecialties = useMemo(() => {
635
+ // return {
636
+ // wrapper: {
637
+ // '&:after': {
638
+ // content: '""',
639
+ // width: '1px',
640
+ // height: '20px',
641
+ // backgroundColor: '#E4E8EC',
642
+ // position: 'absolute',
643
+ // right: 0,
644
+ // top: '13px',
645
+ // },
646
+ // },
647
+ // input: {
648
+ // border: isMobile ? 'border: 1px solid #d9d9d9' : 'none',
649
+ // height: isMobile ? '40px' : '46px !important',
650
+ // paddingRight: '30px',
651
+ // '&:focus': {
652
+ // boxShadow: isMobile ? 'box-shadow: 0px 0px 0px 2px #91caff' : 'none',
653
+ // },
654
+ // },
655
+ // rightSection: {
656
+ // width: '30px',
657
+ // svg: {
658
+ // fontSize: '20px',
659
+ // },
660
+ // },
661
+ // } as any
662
+ // }, [isMobile])
663
+ // const handleSearchSpecialtyInputChange = useCallback(
664
+ // function handleSearchSpecialtyInputChange(value: string) {
665
+ // // dispatch({ type: ActionTypes.ChangeInputLocation, payload: value })
666
+ // // if (value.trim().length > SEARCH_KEYWORD_MIN_LENGTH[state.locale]) {
667
+ // // debouncedFetchSearchResults(value.trim())
668
+ // // } else {
669
+ // // debouncedFetchSearchResults.cancel()
670
+ // // dispatch({ type: ActionTypes.DisplayInitialCities })
671
+ // // }
672
+ // console.log(value)
673
+ // },
674
+ // [debouncedFetchSearchResults, dispatch],
675
+ // )
645
676
  useOutsideClick(inputSpecialtyWrapperRef, () => {
646
677
  dispatch({ type: ActionTypes.ClickOutsideInputSpecialty });
647
678
  });
679
+ const specialtyData = [
680
+ {
681
+ name: t('booking.searchBar.allSpecialties'),
682
+ id: -1,
683
+ thumbnail: '',
684
+ total_doctor: 0,
685
+ slug: slugs.SPECIALTIES,
686
+ },
687
+ ...state.allSpecialties,
688
+ ];
689
+ const selectValue = state.selectedSpecialty && typeof state.selectedSpecialty.id === 'number'
690
+ ? String(state.selectedSpecialty.id)
691
+ : null;
648
692
  return (React__default.createElement(StyleSearchSpecialtyWrapper, { ref: inputSpecialtyWrapperRef },
649
- React__default.createElement(Input.Wrapper, null,
650
- React__default.createElement(Input, { size: isMobile ? 'md' : 'lg', placeholder: t('booking.searchPopup.specialties'), value: ((_a = state === null || state === void 0 ? void 0 : state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.name) || '', rightSection: React__default.createElement(ChevronDown, null), styles: styleSpecialties, onFocus: () => dispatch({ type: ActionTypes.FocusInputSpecialty }), onChange: (event) => {
651
- handleSearchSpecialtyInputChange(event.target.value);
652
- } })),
653
- state.focused === 'specialty' && (React__default.createElement(StyleResultWrapper$1, null,
654
- React__default.createElement(StyledSpecialtyItem, { key: "all-location", role: "button", tabIndex: 0, onClick: () => {
655
- if (onSpecialtyClick) {
656
- onSpecialtyClick({
657
- name: t('booking.searchBar.allSpecialties'),
658
- id: -1,
659
- thumbnail: '',
660
- total_doctor: 0,
661
- slug: slugs.SPECIALTIES,
662
- });
663
- }
664
- } },
665
- React__default.createElement("div", { className: "image-item" },
666
- React__default.createElement(SpecialtyIcon, null)),
667
- React__default.createElement(Text, { size: "md" }, t('booking.searchBar.allSpecialties'))),
668
- state.allSpecialties.map((specialty) => (React__default.createElement(StyledSpecialtyItem, { key: specialty.id, onClick: (evt) => {
669
- evt.nativeEvent.stopImmediatePropagation();
670
- if (onSpecialtyClick) {
671
- onSpecialtyClick(Object.assign(Object.assign({}, specialty), { total_doctor: 0 }));
672
- }
673
- }, role: "button", tabIndex: 0, "aria-label": `Select ${specialty.name} as location`, isSelected: (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) === specialty.id },
674
- React__default.createElement("div", { className: "image-item" },
675
- React__default.createElement("img", { src: specialty.thumbnail, alt: specialty.name })),
676
- React__default.createElement(Text, { size: "md" }, specialty.name))))))));
693
+ React__default.createElement(Select, { value: selectValue, placeholder: t('booking.searchPopup.specialties'), searchable: true, nothingFound: t('common.noResult'), maxDropdownHeight: 340, dropdownPosition: "bottom", data: specialtyData.map((specialty) => ({
694
+ value: String(specialty.id),
695
+ label: specialty.name,
696
+ specialty,
697
+ })), rightSection: React__default.createElement(ChevronDown, { style: { width: 20, height: 20 } }), styles: (theme) => ({
698
+ dropdown: {
699
+ left: '0 !important',
700
+ border: 0,
701
+ marginTop: -7,
702
+ borderRadius: 0,
703
+ '& [data-mantine-scrollbar]': {
704
+ '&[data-orientation="vertical"]': {
705
+ width: '6px',
706
+ },
707
+ },
708
+ [theme.fn.largerThan('sm')]: {
709
+ minWidth: 264,
710
+ width: `264px !important`,
711
+ },
712
+ },
713
+ item: {
714
+ padding: 0,
715
+ '&[data-selected]': {
716
+ '&, &:hover': {
717
+ backgroundColor: 'transparent',
718
+ color: 'inherit',
719
+ },
720
+ },
721
+ '&[data-hovered]': {
722
+ backgroundColor: 'transparent',
723
+ },
724
+ },
725
+ input: {
726
+ '&:not(.mantine-Textarea-input)': {
727
+ height: 40,
728
+ fontSize: rem(14),
729
+ paddingLeft: 14,
730
+ paddingRight: 14,
731
+ [theme.fn.largerThan('sm')]: {
732
+ height: 46,
733
+ fontSize: rem(16),
734
+ paddingLeft: 16,
735
+ paddingRight: 16,
736
+ borderColor: 'transparent',
737
+ },
738
+ '&:focus, &:focus-within': {
739
+ outline: 'none',
740
+ boxShadow: 'none',
741
+ },
742
+ },
743
+ },
744
+ itemsWrapper: {
745
+ padding: 0,
746
+ },
747
+ wrapper: {
748
+ [theme.fn.largerThan('sm')]: {
749
+ position: 'relative',
750
+ '&:after': {
751
+ content: '""',
752
+ width: '1px',
753
+ height: '20px',
754
+ backgroundColor: '#E4E8EC',
755
+ position: 'absolute',
756
+ right: 0,
757
+ top: '13px',
758
+ },
759
+ },
760
+ },
761
+ }), itemComponent: CustomSelectItem$1, filter: (value, item) => item.label.toLowerCase().includes(value.toLowerCase().trim()), onChange: (value) => {
762
+ if (value == null)
763
+ return;
764
+ const specialty = specialtyData.find((i) => String(i.id) === value);
765
+ if (!specialty)
766
+ return;
767
+ onSpecialtyClick(Object.assign(Object.assign(Object.assign({}, specialty), { thumbnail: specialty.thumbnail || '' }), (Number(value) !== -1 && {
768
+ total_doctor: 0,
769
+ })));
770
+ } })));
677
771
  };
678
772
 
679
- const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typeInformation, debouncedFetchSearchResults, trackingAttributes, hideSpecialtySelection = false, clientSlug = '', focusSearchInput, onSearch, onEnterSearch, dispatch, }) => {
680
- var _a;
773
+ const SearchInputs = forwardRef(({ state, type, isMobile, isLoading, initalSearchValue, typeInformation, debouncedFetchSearchResults, trackingAttributes, hideSpecialtySelection = false, clientSlug = '', onSearch, onFocusInput, onEnterSearch, dispatch, onlyShowSearchBox, onChangeSpecialty, }, ref) => {
681
774
  const { t } = useTranslations();
775
+ const theme = useMantineTheme();
682
776
  const inputSearchWrapperRef = useRef(null);
777
+ const internalInputRef = useRef(null);
778
+ useImperativeHandle(ref, () => ({
779
+ focus: () => {
780
+ var _a;
781
+ (_a = internalInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
782
+ },
783
+ }));
784
+ const hasSearchIcon = !onlyShowSearchBox;
683
785
  const gaAttributes = useMemo(() => {
684
786
  if (trackingAttributes) {
685
787
  return {
@@ -693,20 +795,16 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
693
795
  }
694
796
  }, [trackingAttributes]);
695
797
  const placeholderSearch = useMemo(() => {
696
- if (type === 'doctor') {
798
+ if (type === 'doctor')
697
799
  return t('booking.searchBar.placeholder.doctor');
698
- }
699
- if (type === 'service') {
800
+ if (type === 'service')
700
801
  return t('booking.searchBar.placeholder.service');
701
- }
702
- if (type === 'hospital') {
802
+ if (type === 'hospital')
703
803
  return t('booking.searchBar.placeholder.hospital');
704
- }
705
- if (type === 'specialty') {
804
+ if (type === 'specialty')
706
805
  return t('booking.searchBar.placeholder.specialty');
707
- }
708
806
  return '';
709
- }, [type]);
807
+ }, [type, t]);
710
808
  const styleInputWrapper = useMemo(() => {
711
809
  return {
712
810
  root: {
@@ -716,7 +814,11 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
716
814
  display: 'none',
717
815
  },
718
816
  input: {
719
- paddingLeft: '48px',
817
+ paddingLeft: hasSearchIcon ? 48 : 16,
818
+ [theme.fn.smallerThan('sm')]: {
819
+ height: 40,
820
+ fontSize: rem(14),
821
+ },
720
822
  },
721
823
  '.mantine-Input-icon': {
722
824
  left: '0',
@@ -724,22 +826,22 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
724
826
  },
725
827
  },
726
828
  };
727
- }, []);
829
+ }, [hasSearchIcon, theme]);
728
830
  const styleInput = useMemo(() => {
729
831
  return {
730
832
  icon: {
731
- left: '165px',
833
+ left: '205px',
732
834
  },
733
835
  input: {
734
836
  color: '#262626',
735
837
  '&[data-with-icon="true"]': {
736
- paddingLeft: '205px',
838
+ paddingLeft: '245px',
737
839
  paddingRight: '16px',
738
840
  },
739
841
  },
740
842
  rightSection: {
741
843
  left: 0,
742
- width: '165px',
844
+ width: '205px',
743
845
  padding: '1px',
744
846
  },
745
847
  };
@@ -752,7 +854,7 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
752
854
  };
753
855
  }, []);
754
856
  useOutsideClick(inputSearchWrapperRef, () => {
755
- dispatch({ type: ActionTypes.ClickOutsideInputSearch });
857
+ !isMobile && dispatch({ type: ActionTypes.ClickOutsideInputSearch });
756
858
  });
757
859
  const handleSearchInputChange = useCallback(function handleSearchInputChange(value) {
758
860
  dispatch({ type: ActionTypes.ChangeInputSearch, payload: value });
@@ -764,40 +866,84 @@ const SearchInputs = ({ state, type, isMobile, isLoading, initalSearchValue, typ
764
866
  value.trim().length === 0) {
765
867
  debouncedFetchSearchResults(value.trim(), state, type, clientSlug);
766
868
  }
767
- else {
768
- debouncedFetchSearchResults.cancel();
769
- dispatch({ type: ActionTypes.DisplayInitialSearchResults });
770
- }
771
- }, [dispatch, state, type]);
869
+ }, [
870
+ dispatch,
871
+ state,
872
+ type,
873
+ initalSearchValue,
874
+ debouncedFetchSearchResults,
875
+ clientSlug,
876
+ onSearch,
877
+ ]);
772
878
  const handleSpecialtyClick = useCallback(function handleSpecialtyClick(specialty) {
879
+ var _a;
773
880
  dispatch({ type: ActionTypes.SelectSpecialty, payload: specialty });
774
- focusSearchInput();
775
- }, [dispatch]);
881
+ onChangeSpecialty === null || onChangeSpecialty === void 0 ? void 0 : onChangeSpecialty(specialty);
882
+ !isMobile && ((_a = internalInputRef.current) === null || _a === void 0 ? void 0 : _a.focus());
883
+ }, [dispatch, onChangeSpecialty]);
776
884
  const inputOnKeyDown = useCallback((e) => {
777
- if (e.keyCode === 13) {
885
+ if (e.key === 'Enter') {
778
886
  e.stopPropagation();
779
887
  e.preventDefault();
780
888
  onEnterSearch && onEnterSearch();
781
889
  }
782
890
  }, [onEnterSearch]);
783
891
  return (React__default.createElement(StyleSearchInputsWrapper, { ref: inputSearchWrapperRef }, type === 'specialty' ? (React__default.createElement(Input.Wrapper, { styles: styleInputWrapper },
784
- React__default.createElement(Input, { icon: React__default.createElement(Search, null), size: isMobile ? 'md' : 'lg', placeholder: placeholderSearch, styles: styleInputSpecialties, value: state.searchKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearchSpecialty }), onChange: (event) => {
892
+ React__default.createElement(Input, { ref: internalInputRef, icon: hasSearchIcon && React__default.createElement(Search, null), size: isMobile ? 'md' : 'lg', placeholder: placeholderSearch, styles: styleInputSpecialties, value: state.searchKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearchSpecialty }), onChange: (event) => {
785
893
  handleSearchInputChange(event.target.value);
786
894
  }, onKeyDown: inputOnKeyDown }))) : (React__default.createElement(React__default.Fragment, null,
787
895
  type === 'service' ? (React__default.createElement(Input.Wrapper, { styles: styleInputWrapper },
788
- React__default.createElement(Input, { icon: React__default.createElement(Search, null), size: isMobile ? 'md' : 'lg', name: "search-results", placeholder: placeholderSearch, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), value: state.searchKeywords, onChange: (event) => {
896
+ React__default.createElement(Input, { ref: internalInputRef, icon: hasSearchIcon && React__default.createElement(Search, null), size: isMobile ? 'md' : 'lg', name: "search-results", placeholder: placeholderSearch, onFocus: () => {
897
+ dispatch({ type: ActionTypes.FocusInputSearch });
898
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
899
+ }, value: state.searchKeywords, onChange: (event) => {
789
900
  handleSearchInputChange(event.target.value);
790
901
  }, onKeyDown: inputOnKeyDown }))) : (React__default.createElement(React__default.Fragment, null, isMobile && !hideSpecialtySelection ? (React__default.createElement(React__default.Fragment, null,
791
- React__default.createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick }),
902
+ !onlyShowSearchBox && (React__default.createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick })),
792
903
  React__default.createElement(Input.Wrapper, { styles: styleInputWrapper },
793
- React__default.createElement(Input, { icon: React__default.createElement(Search, null), size: "md", placeholder: placeholderSearch, value: state.searchKeywords, name: "search-results", onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), onChange: (event) => {
904
+ React__default.createElement(Input, { ref: internalInputRef, icon: hasSearchIcon && React__default.createElement(Search, null), size: "md", placeholder: placeholderSearch, value: state.searchKeywords, name: "search-results", onFocus: () => {
905
+ dispatch({ type: ActionTypes.FocusInputSearch });
906
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
907
+ }, onChange: (event) => {
794
908
  handleSearchInputChange(event.target.value);
795
909
  }, onKeyDown: inputOnKeyDown })))) : (React__default.createElement(Input.Wrapper, { styles: styleInputWrapper, className: hideSpecialtySelection ? 'hide-specialty-selection' : '' },
796
- React__default.createElement(Input, Object.assign({ icon: React__default.createElement(Search, null), size: "lg", placeholder: placeholderSearch, styles: styleInput, name: "search-results", autoComplete: "off", value: state.searchKeywords, onChange: (event) => {
910
+ React__default.createElement(Input, Object.assign({ ref: internalInputRef, icon: hasSearchIcon && React__default.createElement(Search, null), size: "lg", placeholder: placeholderSearch, styles: styleInput, name: "search-results", autoComplete: "off", value: state.searchKeywords, onChange: (event) => {
797
911
  handleSearchInputChange(event.target.value);
798
- }, onFocus: () => dispatch({ type: ActionTypes.FocusInputSearch }), onKeyDown: inputOnKeyDown }, gaAttributes, { rightSection: hideSpecialtySelection ? (React__default.createElement(React__default.Fragment, null)) : (React__default.createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick })) })))))),
799
- state.focused === 'search' && (React__default.createElement(StyleResultWrapper$2, null,
800
- React__default.createElement(SearchResult, { type: type, state: state, results: ((_a = state.searchResults) === null || _a === void 0 ? void 0 : _a[type]) || [], location: state.selectedLocation.name, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug })))))));
912
+ }, onFocus: () => {
913
+ dispatch({ type: ActionTypes.FocusInputSearch });
914
+ onFocusInput === null || onFocusInput === void 0 ? void 0 : onFocusInput();
915
+ }, onKeyDown: inputOnKeyDown }, gaAttributes, { rightSection: hideSpecialtySelection ? (React__default.createElement(React__default.Fragment, null)) : (!onlyShowSearchBox && (React__default.createElement(SearchSpecialty, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, onSpecialtyClick: handleSpecialtyClick }))) })))))),
916
+ !isMobile && (React__default.createElement(StyleResultWrapper, null,
917
+ React__default.createElement(SearchResultContent, { type: type, state: state, dispatch: dispatch, isLoading: isLoading, typeInformation: typeInformation, clientSlug: clientSlug })))))));
918
+ });
919
+ SearchInputs.displayName = 'SearchInputs';
920
+
921
+ const ModalSearchResult = (_a) => {
922
+ var { searchInputEle, closeModal, children } = _a, props = __rest(_a, ["searchInputEle", "closeModal", "children"]);
923
+ const theme = useMantineTheme();
924
+ return (React__default.createElement(Modal, Object.assign({}, props, { zIndex: 310, fullScreen: true, styles: {
925
+ content: {
926
+ borderRadius: 0,
927
+ height: '100%',
928
+ '.search-results__body': { padding: 0 },
929
+ '.result-item': {
930
+ paddingLeft: 16,
931
+ paddingRight: 16,
932
+ },
933
+ '.noresult-block': {
934
+ padding: 16,
935
+ },
936
+ '.skeleton-result': {
937
+ padding: 16,
938
+ },
939
+ },
940
+ header: { display: 'none' },
941
+ } }),
942
+ React__default.createElement(Stack, { spacing: 16, sx: { paddingTop: 16 } },
943
+ React__default.createElement(Flex, { align: 'center', gap: 12 },
944
+ React__default.createElement(ArrowLeft, { size: 28, onClick: closeModal, color: theme.fn.primaryColor() }),
945
+ React__default.createElement(Box, { sx: { width: '100%' } }, searchInputEle)),
946
+ children)));
801
947
  };
802
948
 
803
949
  const StyleSearchLocationWrapper = styled.div `
@@ -810,7 +956,7 @@ const StyleSearchLocationWrapper = styled.div `
810
956
  gap: 12px;
811
957
  }
812
958
  `;
813
- const StyleResultWrapper = styled.div `
959
+ styled.div `
814
960
  position: absolute;
815
961
  top: calc(100% + 2px);
816
962
  width: 100%;
@@ -833,17 +979,6 @@ const StyledLocationItem = styled.div `
833
979
  gap: 14px;
834
980
  overflow: hidden;
835
981
 
836
- ${({ isSelected }) => isSelected &&
837
- `
838
- &::after {
839
- content: ${checkMarkIconUrl};
840
- top: 50%;
841
- right: 18px;
842
- position: absolute;
843
- transform: translateY(-50%);
844
- }
845
- `}
846
-
847
982
  & + li::before {
848
983
  content: '';
849
984
  position: absolute;
@@ -878,9 +1013,29 @@ const StyledPinIcon = styled(PinIcon) `
878
1013
  flex: 0 0 12px;
879
1014
  `;
880
1015
 
881
- const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, selectedLocation, trackingAttributes, onLocationClick, dispatch, }) => {
1016
+ const CustomSelectItem = forwardRef((_a, ref) => {
1017
+ var { label, value } = _a, others = __rest(_a, ["label", "value"]);
1018
+ return (React__default.createElement("div", Object.assign({ ref: ref }, others),
1019
+ React__default.createElement(StyledLocationItem, { key: value, role: "button", tabIndex: 0, "aria-label": `Select ${label} as location`, className: "location-item" },
1020
+ React__default.createElement(StyledPinIcon, { color: theme.colors.neutral400 }),
1021
+ React__default.createElement(Text$1, { size: "md" }, label))));
1022
+ });
1023
+
1024
+ const SearchLocation = ({ state, debouncedFetchCitiesByKeyword, selectedLocation, trackingAttributes, onLocationClick, dispatch, }) => {
1025
+ var _a;
882
1026
  const { t, locale } = useTranslations();
883
1027
  const inputLocationWrapperRef = useRef(null);
1028
+ const citiesData = useMemo(() => {
1029
+ var _a;
1030
+ return [
1031
+ {
1032
+ name: t('booking.searchBar.allLocations'),
1033
+ id: ID_OPTION_ALL_LOCATION,
1034
+ slug: (_a = LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL,
1035
+ },
1036
+ ...state.cities,
1037
+ ];
1038
+ }, [state.cities, t, locale]);
884
1039
  const gaAttributes = useMemo(() => {
885
1040
  if (trackingAttributes) {
886
1041
  return {
@@ -889,9 +1044,7 @@ const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, select
889
1044
  'data-event-label': trackingAttributes.dataEventLabel,
890
1045
  };
891
1046
  }
892
- else {
893
- return {};
894
- }
1047
+ return {};
895
1048
  }, [trackingAttributes]);
896
1049
  const handleSearchLocationInputChange = useCallback(function handleSearchLocationInputChange(value) {
897
1050
  dispatch({ type: ActionTypes.ChangeInputLocation, payload: value });
@@ -902,39 +1055,101 @@ const SearchLocation = ({ state, isMobile, debouncedFetchCitiesByKeyword, select
902
1055
  debouncedFetchCitiesByKeyword.cancel();
903
1056
  dispatch({ type: ActionTypes.DisplayInitialCities });
904
1057
  }
905
- }, [debouncedFetchCitiesByKeyword, dispatch]);
1058
+ }, [debouncedFetchCitiesByKeyword, dispatch, state.locale]);
906
1059
  useOutsideClick(inputLocationWrapperRef, () => {
907
1060
  dispatch({ type: ActionTypes.ClickOutsideInputLocation });
908
1061
  });
1062
+ const stateValue = (_a = selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) !== null && _a !== void 0 ? _a : null;
1063
+ const defaultValue = stateValue === null ? undefined : String(stateValue);
909
1064
  return (React__default.createElement(StyleSearchLocationWrapper, { ref: inputLocationWrapperRef },
910
- React__default.createElement(Input.Wrapper, null,
911
- React__default.createElement(Input, Object.assign({ size: isMobile ? 'md' : 'lg', placeholder: "Search location", value: state.searchLocationKeywords, onFocus: () => dispatch({ type: ActionTypes.FocusInputLocation }), onChange: (event) => {
912
- handleSearchLocationInputChange(event.target.value);
913
- } }, gaAttributes))),
914
- state.focused === 'location' && (React__default.createElement(StyleResultWrapper, null,
915
- React__default.createElement(ScrollArea, { scrollbarSize: 6, styles: { viewport: { maxHeight: 400 } } },
916
- React__default.createElement(StyledLocationItem, { key: "all-location", role: "button", tabIndex: 0, onClick: () => {
917
- var _a;
918
- if (onLocationClick) {
919
- onLocationClick({
920
- name: t('booking.searchBar.allLocations'),
921
- id: ID_OPTION_ALL_LOCATION,
922
- slug: (_a = LOCALIZED_SLUGS[locale]) === null || _a === void 0 ? void 0 : _a.ALL,
923
- });
924
- }
925
- } },
926
- React__default.createElement(StyledPinIcon, { color: theme.colors.neutral400 }),
927
- React__default.createElement(Text, { size: "md" }, t('booking.searchBar.allLocations'))),
928
- state.cities.map((city) => (React__default.createElement(StyledLocationItem, { key: city.id, onClick: (evt) => {
929
- evt.nativeEvent.stopImmediatePropagation();
930
- if (onLocationClick) {
931
- onLocationClick(city);
932
- }
933
- }, role: "button", tabIndex: 0, "aria-label": `Select ${city.name} as location`, isSelected: (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.id) === city.id },
934
- React__default.createElement(StyledPinIcon, { color: theme.colors.neutral400 }),
935
- React__default.createElement(Text, { size: "md" }, city.name)))))))));
1065
+ React__default.createElement(Select, Object.assign({ key: defaultValue !== null && defaultValue !== void 0 ? defaultValue : 'no-selected-location', defaultValue: defaultValue, placeholder: t('booking.searchBar.allLocations'), searchable: true, onSearchChange: (value) => {
1066
+ handleSearchLocationInputChange(value);
1067
+ }, onFocus: () => {
1068
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1069
+ }, onDropdownClose: () => {
1070
+ debouncedFetchCitiesByKeyword.cancel();
1071
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1072
+ }, nothingFound: t('common.noResult'), maxDropdownHeight: 340, dropdownPosition: "bottom", data: citiesData.map((city) => ({
1073
+ value: String(city.id),
1074
+ label: city.name,
1075
+ city,
1076
+ })), rightSection: React__default.createElement(React__default.Fragment, null) }, gaAttributes, { styles: (theme) => ({
1077
+ item: {
1078
+ padding: 0,
1079
+ '&[data-selected]': {
1080
+ '&, &:hover': {
1081
+ backgroundColor: 'transparent',
1082
+ color: 'inherit',
1083
+ },
1084
+ '.location-item': {
1085
+ '&::after': {
1086
+ content: checkMarkIconUrl,
1087
+ top: '50%',
1088
+ right: 19,
1089
+ position: 'absolute',
1090
+ transform: 'translateY(-50%)',
1091
+ },
1092
+ },
1093
+ },
1094
+ '&[data-hovered]': {
1095
+ backgroundColor: 'transparent',
1096
+ },
1097
+ },
1098
+ input: {
1099
+ '&:not(.mantine-Textarea-input)': {
1100
+ height: 48,
1101
+ fontSize: rem(16),
1102
+ paddingLeft: 16,
1103
+ paddingRight: 16,
1104
+ [theme.fn.smallerThan('sm')]: {
1105
+ height: 40,
1106
+ fontSize: rem(14),
1107
+ paddingLeft: 14,
1108
+ paddingRight: 14,
1109
+ },
1110
+ },
1111
+ },
1112
+ itemsWrapper: {
1113
+ padding: 0,
1114
+ },
1115
+ dropdown: {
1116
+ left: '0 !important',
1117
+ border: 0,
1118
+ marginTop: -7,
1119
+ borderRadius: 0,
1120
+ '& ::-webkit-scrollbar': {
1121
+ width: '6px',
1122
+ height: '6px',
1123
+ },
1124
+ },
1125
+ }), itemComponent: CustomSelectItem,
1126
+ // 3. Logic quan trọng nhất: Luôn trả về true để bỏ qua bộ lọc mặc định của Mantine
1127
+ // Vì chúng ta fetch data từ API hoặc dùng toàn bộ list ban đầu
1128
+ filter: () => true, onChange: (value) => {
1129
+ if (value == null)
1130
+ return;
1131
+ const city = citiesData.find((i) => String(i.id) === value);
1132
+ if (!city)
1133
+ return;
1134
+ onLocationClick(city);
1135
+ debouncedFetchCitiesByKeyword.cancel();
1136
+ dispatch({ type: ActionTypes.DisplayInitialCities });
1137
+ setTimeout(() => {
1138
+ var _a, _b;
1139
+ (_b = (_a = inputLocationWrapperRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('input')) === null || _b === void 0 ? void 0 : _b.blur();
1140
+ }, 0);
1141
+ } }))));
936
1142
  };
937
1143
 
1144
+ const DoctorIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1145
+ React__default.createElement("path", { d: "M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208", fill: "#595959" })));
1146
+ const ServiceIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1147
+ React__default.createElement("path", { d: "M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068", fill: "#595959" })));
1148
+ const HospitalIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
1149
+ React__default.createElement("path", { d: "M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184", fill: "#8C8C8C" })));
1150
+ const SpecialtyIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16" },
1151
+ React__default.createElement("path", { d: "M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667", fill: "#9AA2AC" })));
1152
+
938
1153
  const StyleSpecialtiesWrapper = styled.div `
939
1154
  display: flex;
940
1155
  flex-wrap: wrap;
@@ -1308,16 +1523,20 @@ function useSearchBarApi({ dispatch, careApiDomain, locale = 'vi-VN', client = '
1308
1523
  moreParams.noPaging = 1;
1309
1524
  }
1310
1525
  const requests = [
1311
- fetchCitiesApi(PATHS.GET_CITY_BY_IP, Object.assign(Object.assign(Object.assign({}, params), moreParams), { client: CLIENT_KEY.MSD === client ? '' : client })),
1526
+ fetchCitiesApi(PATHS.GET_CITY_BY_IP, Object.assign(Object.assign(Object.assign({}, params), moreParams), { hospitalActive: 1, client: CLIENT_KEY.MSD === client ? '' : client })),
1312
1527
  ];
1313
1528
  if (locale === 'zh-TW') {
1314
1529
  requests.push(fetchCitiesApi(PATHS.GET_CITIES_LIST, {
1315
1530
  noPaging: 1,
1531
+ hospitalActive: 1,
1316
1532
  client: CLIENT_KEY.MSD === client ? '' : client,
1317
1533
  }));
1318
1534
  }
1319
1535
  else {
1320
- requests.push(fetchCitiesApi(PATHS.GET_CITIES_LIST));
1536
+ requests.push(fetchCitiesApi(PATHS.GET_CITIES_LIST, {
1537
+ noPaging: 1,
1538
+ hospitalActive: 1,
1539
+ }));
1321
1540
  }
1322
1541
  return Promise.all(requests)
1323
1542
  .then(([data1, data2]) => {
@@ -1497,11 +1716,14 @@ gaTrackingSearchBar, gaTrackingLocationSearch, autoCompleteDisabled = false, inp
1497
1716
  // isOptionAllLocation = false,
1498
1717
  // hideResults = [],
1499
1718
  // isNavResultItem = true,
1500
- routerPush, onGeoLocationPermissionChange,
1719
+ triggerSearchWhenChangeFilter, routerPush, onGeoLocationPermissionChange,
1501
1720
  // onSearch,
1502
1721
  onChangeLocation, }) => {
1722
+ var _a;
1503
1723
  const { locale, t } = useTranslations();
1504
1724
  const wrapperRef = useRef(null);
1725
+ const searchInputDesktopRef = useRef(null);
1726
+ const searchInputMobileRef = useRef(null);
1505
1727
  const inputSearchSpecialtyWrapperRef = useRef(null);
1506
1728
  const [currentTab, setCurrentTab] = useState(initTypeSearch);
1507
1729
  const { geoLocationPermission: geoLocationPermissionFromHook, geoLocationCoordinates: geoLocationCoordinatesFromHook, } = useGeolocation();
@@ -1516,7 +1738,9 @@ onChangeLocation, }) => {
1516
1738
  const { navigateTo, focusedSpecialty,
1517
1739
  // isLoadingCities,
1518
1740
  // cities,
1519
- searchKeywords, geoLocationPermission, selectedLocation, selectedSpecialty, initialSelectedCity,
1741
+ searchKeywords, geoLocationPermission, selectedLocation,
1742
+ // selectedSpecialty,
1743
+ initialSelectedCity,
1520
1744
  // defaultCity,
1521
1745
  searchResults, isLoadingSearchResults,
1522
1746
  // isMobileModalOpened,
@@ -1530,6 +1754,7 @@ onChangeLocation, }) => {
1530
1754
  client: clientSlug,
1531
1755
  });
1532
1756
  const slugs = useMemo(() => LOCALIZED_SLUGS[locale], [locale]);
1757
+ const [opened, { close, open }] = useDisclosure(false);
1533
1758
  const typeInformation = useMemo(() => {
1534
1759
  return Object.assign({ doctor: {
1535
1760
  name: t('booking.searchPopup.doctors'),
@@ -1553,34 +1778,31 @@ onChangeLocation, }) => {
1553
1778
  }, [currentTab]);
1554
1779
  const debouncedFetchCitiesByKeyword = useMemo(() => debounce(fetchCitiesByKeyword, 400), [fetchCitiesByKeyword]);
1555
1780
  const debouncedFetchSearchResults = useMemo(() => debounce(fetchSearchResults, 400), [fetchSearchResults]);
1556
- const handleLocationClick = useCallback(function handleLocationClick(city) {
1557
- dispatch({ type: ActionTypes.SelectLocation, payload: city });
1558
- focusSearchInput();
1559
- if (onChangeLocation) {
1560
- onChangeLocation(city);
1561
- }
1562
- }, [t, dispatch]);
1563
- function focusSearchInput() {
1781
+ // function focusSearchInput() {
1782
+ // if (wrapperRef.current) {
1783
+ // wrapperRef.current
1784
+ // .querySelector<HTMLInputElement>('input[name="search-results"]')
1785
+ // ?.focus()
1786
+ // }
1787
+ // }
1788
+ const onClickSearchByKeyword = useCallback(function onClickSearchByKeyword({ locationSlug, specialtyId, } = {}) {
1564
1789
  var _a;
1565
- if (wrapperRef.current) {
1566
- (_a = wrapperRef.current
1567
- .querySelector('input[name="search-results"]')) === null || _a === void 0 ? void 0 : _a.focus();
1568
- }
1569
- }
1570
- function onClickSearchByKeyword() {
1790
+ close();
1571
1791
  let url = '';
1572
1792
  const { slug: typeSlug } = typeInformation[currentTab];
1573
1793
  let moreParams = '';
1574
1794
  const slugClientUrl = MAPPING_CLIENT_WITH_SLUG[locale][clientSlug];
1795
+ const selectedSpecialtyId = specialtyId || ((_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id) || -1;
1796
+ const selectedLocationSlug = locationSlug || (selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.slug) || '';
1575
1797
  if ((currentTab === 'doctor' || currentTab === 'hospital') &&
1576
- state.selectedSpecialty.id > 0) {
1577
- moreParams = `&specialtyId=${state.selectedSpecialty.id}`;
1798
+ selectedSpecialtyId > 0) {
1799
+ moreParams = `&specialtyId=${selectedSpecialtyId}`;
1578
1800
  }
1579
1801
  if (currentTab === 'specialty') {
1580
1802
  url = `/${typeSlug}`;
1581
1803
  }
1582
1804
  else {
1583
- url = `/${selectedLocation.slug}/${typeSlug}`;
1805
+ url = `/${selectedLocationSlug}/${typeSlug}`;
1584
1806
  }
1585
1807
  if (slugClientUrl) {
1586
1808
  url += `/${slugClientUrl}`;
@@ -1589,9 +1811,34 @@ onChangeLocation, }) => {
1589
1811
  if (url) {
1590
1812
  dispatch({ type: ActionTypes.NavigateTo, payload: url });
1591
1813
  }
1592
- }
1814
+ }, [
1815
+ clientSlug,
1816
+ close,
1817
+ currentTab,
1818
+ dispatch,
1819
+ locale,
1820
+ searchKeywords,
1821
+ selectedLocation === null || selectedLocation === void 0 ? void 0 : selectedLocation.slug,
1822
+ (_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id,
1823
+ typeInformation,
1824
+ ]);
1825
+ const handleLocationClick = useCallback(function handleLocationClick(city) {
1826
+ triggerSearchWhenChangeFilter &&
1827
+ onClickSearchByKeyword({ locationSlug: city.slug });
1828
+ dispatch({ type: ActionTypes.SelectLocation, payload: city });
1829
+ if (onChangeLocation) {
1830
+ onChangeLocation(city);
1831
+ }
1832
+ }, [
1833
+ dispatch,
1834
+ isMobile,
1835
+ onChangeLocation,
1836
+ onClickSearchByKeyword,
1837
+ triggerSearchWhenChangeFilter,
1838
+ ]);
1593
1839
  useOutsideClick(inputSearchSpecialtyWrapperRef, () => {
1594
- dispatch({ type: ActionTypes.ClickOutsideInputSearchSpecialty });
1840
+ !isMobile &&
1841
+ dispatch({ type: ActionTypes.ClickOutsideInputSearchSpecialty });
1595
1842
  });
1596
1843
  useEffect(() => {
1597
1844
  var _a;
@@ -1614,6 +1861,7 @@ onChangeLocation, }) => {
1614
1861
  fetchCitiesByLocation({ coordinates: state.geoLocationCoordinates });
1615
1862
  }, [geoLocationPermission]);
1616
1863
  useEffect(() => {
1864
+ var _a;
1617
1865
  const defaultSpecialty = initSpecialty
1618
1866
  ? initSpecialty
1619
1867
  : {
@@ -1623,13 +1871,23 @@ onChangeLocation, }) => {
1623
1871
  total_doctor: 0,
1624
1872
  slug: slugs.SPECIALTIES,
1625
1873
  };
1626
- if (!state.selectedSpecialty) {
1874
+ if (initSpecialty) {
1875
+ if (((_a = state.selectedSpecialty) === null || _a === void 0 ? void 0 : _a.id) !== initSpecialty.id) {
1876
+ dispatch({
1877
+ type: ActionTypes.SelectSpecialty,
1878
+ payload: initSpecialty,
1879
+ });
1880
+ }
1881
+ return;
1882
+ }
1883
+ if (!state.selectedSpecialty ||
1884
+ state.selectedSpecialty.id !== defaultSpecialty.id) {
1627
1885
  dispatch({
1628
1886
  type: ActionTypes.SelectSpecialty,
1629
1887
  payload: defaultSpecialty,
1630
1888
  });
1631
1889
  }
1632
- }, [initSpecialty, state.selectedSpecialty]);
1890
+ }, [initSpecialty, slugs.SPECIALTIES, t]);
1633
1891
  useEffect(() => {
1634
1892
  fetchAllSpecialties();
1635
1893
  }, []);
@@ -1648,25 +1906,62 @@ onChangeLocation, }) => {
1648
1906
  }, [navigateTo]);
1649
1907
  useEffect(() => {
1650
1908
  fetchSearchResults(state.searchKeywords, state, currentTab, clientSlug, true);
1651
- }, [selectedLocation, selectedSpecialty, currentTab]);
1652
- return (React__default.createElement(StyledSearchBarWrapper, { ref: wrapperRef },
1653
- React__default.createElement(TabSearch, { currentTab: currentTab, setCurrentTab: setCurrentTab, isMobile: isMobile, hideTabBookingSearch: hideTabBookingSearch, hideSpecialtyTab: hideSpecialtyTab }),
1654
- React__default.createElement(StyleWrapperContainer, { className: "booking-search-container" },
1655
- React__default.createElement(StyleSearchInputContainer, null,
1656
- React__default.createElement(StyleSearchContent, { className: "booking-search-content" },
1657
- React__default.createElement("div", { ref: inputSearchSpecialtyWrapperRef },
1658
- React__default.createElement(Flex, { gap: "12px", justify: "space-between", align: "center", direction: isMobile ? 'column' : 'row', className: "flex-search-input" },
1659
- currentTab !== 'specialty' && (React__default.createElement(SearchLocation, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchCitiesByKeyword: debouncedFetchCitiesByKeyword, selectedLocation: selectedLocation, onLocationClick: handleLocationClick, trackingAttributes: gaTrackingLocationSearch })),
1660
- React__default.createElement(SearchInputs, { type: currentTab, isMobile: isMobile, state: state, dispatch: dispatch, debouncedFetchSearchResults: debouncedFetchSearchResults, initalSearchValue: initialSearchValue, focusSearchInput: focusSearchInput, onEnterSearch: onClickSearchByKeyword, typeInformation: typeInformation, trackingAttributes: gaTrackingSearchBar, isLoading: isLoadingSearchResults, hideSpecialtySelection: hideSpecialtySelection || hideSpecialtyTab, clientSlug: clientSlug }),
1661
- React__default.createElement(Button, { size: isMobile ? 'md' : 'lg', color: "#2D87F3", fullWidth: isMobile, variant: "filled", onClick: onClickSearchByKeyword, styles: {
1662
- root: {
1663
- height: isMobile ? '40px' : '48px',
1664
- },
1665
- } }, t('booking.searchBar.searchButton'))),
1666
- !hidePopularSearchKeys &&
1667
- currentTab !== 'specialty' &&
1668
- state.popularKeys.length > 0 && (React__default.createElement(SearchTag, { type: currentTab, state: state, typeInformation: typeInformation, dispatch: dispatch })),
1669
- currentTab === 'specialty' && focusedSpecialty === 'search' && (React__default.createElement(SearchResultSpecialties, { state: state, isMobile: isMobile, dispatch: dispatch, specialties: (searchResults === null || searchResults === void 0 ? void 0 : searchResults.specialty) || [], isLoading: isLoadingSearchResults }))))))));
1909
+ }, [currentTab]);
1910
+ useEffect(() => {
1911
+ if (opened && isMobile) {
1912
+ const timer = setTimeout(() => {
1913
+ var _a;
1914
+ (_a = searchInputMobileRef.current) === null || _a === void 0 ? void 0 : _a.focus();
1915
+ }, 150);
1916
+ return () => clearTimeout(timer);
1917
+ }
1918
+ }, [opened, isMobile]);
1919
+ const searchInputsProps = {
1920
+ type: currentTab,
1921
+ isMobile: isMobile,
1922
+ state: state,
1923
+ dispatch: dispatch,
1924
+ debouncedFetchSearchResults: debouncedFetchSearchResults,
1925
+ initalSearchValue: initialSearchValue,
1926
+ // focusSearchInput: focusSearchInput,
1927
+ onEnterSearch: onClickSearchByKeyword,
1928
+ typeInformation: typeInformation,
1929
+ trackingAttributes: gaTrackingSearchBar,
1930
+ isLoading: isLoadingSearchResults,
1931
+ hideSpecialtySelection: hideSpecialtySelection || hideSpecialtyTab,
1932
+ clientSlug: clientSlug,
1933
+ triggerSearchWhenChangeFilter,
1934
+ onChangeSpecialty: (specialty) => triggerSearchWhenChangeFilter &&
1935
+ onClickSearchByKeyword({ specialtyId: specialty.id }),
1936
+ };
1937
+ return (React__default.createElement(React__default.Fragment, null,
1938
+ React__default.createElement(StyledSearchBarWrapper, { ref: wrapperRef },
1939
+ React__default.createElement(TabSearch, { currentTab: currentTab, setCurrentTab: setCurrentTab, isMobile: isMobile, hideTabBookingSearch: hideTabBookingSearch, hideSpecialtyTab: hideSpecialtyTab }),
1940
+ React__default.createElement(StyleWrapperContainer, { className: "booking-search-container" },
1941
+ React__default.createElement(StyleSearchInputContainer, null,
1942
+ React__default.createElement(StyleSearchContent, { className: "booking-search-content" },
1943
+ React__default.createElement("div", { ref: inputSearchSpecialtyWrapperRef },
1944
+ React__default.createElement(Flex, { gap: "12px", justify: "space-between", align: "center", direction: isMobile ? 'column' : 'row', className: "flex-search-input" },
1945
+ currentTab !== 'specialty' && (React__default.createElement(SearchLocation, { state: state, isMobile: isMobile, dispatch: dispatch, debouncedFetchCitiesByKeyword: debouncedFetchCitiesByKeyword, selectedLocation: selectedLocation, onLocationClick: handleLocationClick, trackingAttributes: gaTrackingLocationSearch })),
1946
+ React__default.createElement(SearchInputs, Object.assign({}, searchInputsProps, { ref: searchInputDesktopRef, onFocusInput: () => isMobile && open() })),
1947
+ React__default.createElement(Button, { size: isMobile ? 'md' : 'lg', fullWidth: isMobile, variant: "primary", onClick: () => onClickSearchByKeyword(), styles: {
1948
+ root: {
1949
+ height: isMobile ? '40px' : '48px',
1950
+ },
1951
+ } }, t('booking.searchBar.searchButton'))),
1952
+ !hidePopularSearchKeys &&
1953
+ currentTab !== 'specialty' &&
1954
+ state.popularKeys.length > 0 && (React__default.createElement(SearchTag, { type: currentTab, state: state, typeInformation: typeInformation, dispatch: dispatch })),
1955
+ currentTab === 'specialty' &&
1956
+ focusedSpecialty === 'search' && (React__default.createElement(SearchResultSpecialties, { state: state, isMobile: isMobile, dispatch: dispatch, specialties: (searchResults === null || searchResults === void 0 ? void 0 : searchResults.specialty) || [], isLoading: isLoadingSearchResults }))))))),
1957
+ isMobile && (React__default.createElement(ModalSearchResult, { keepMounted: true, opened: opened, onClose: close, closeModal: close, searchInputEle: React__default.createElement(Flex, { align: 'center', gap: 8 },
1958
+ React__default.createElement(SearchInputs, Object.assign({}, searchInputsProps, { onlyShowSearchBox: true, ref: searchInputMobileRef })),
1959
+ React__default.createElement(Button, { variant: "primary", leftIcon: React__default.createElement(Search, { size: 20, color: '#fff' }), onClick: () => onClickSearchByKeyword() })) },
1960
+ React__default.createElement(Box, { sx: {
1961
+ marginLeft: -16,
1962
+ marginRight: -16,
1963
+ } },
1964
+ React__default.createElement(SearchResultContent, { type: currentTab, state: state, dispatch: dispatch, isLoading: isLoadingSearchResults, typeInformation: typeInformation, clientSlug: clientSlug }))))));
1670
1965
  };
1671
1966
 
1672
1967
  export { BookingSearchBarV2 };