@hhgtech/hhg-components 1.27.113 → 1.27.115

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 (269) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care/components/organisms/bookingSearchBarV2/searchResultSpecialties/index.d.ts +2 -1
  4. package/build/care/interfaces/constants.d.ts +1 -0
  5. package/build/care.js +1 -1
  6. package/build/components/molecules/surveyOrPremiumBanner/context.d.ts +3 -1
  7. package/build/components/molecules/surveyOrPremiumBanner/index.d.ts +1 -1
  8. package/build/components.js +1 -1
  9. package/build/{constants-fd82a887.js → constants-dee18538.js} +1 -1
  10. package/build/constants.js +1 -1
  11. package/build/core-5f367bd4.js +1 -0
  12. package/build/ecom.js +1 -1
  13. package/build/esm/babyGrowth.js +5 -5
  14. package/build/esm/cache.js +1 -1
  15. package/build/esm/care/components/organisms/bookingSearchBarV2/searchResultSpecialties/index.d.ts +2 -1
  16. package/build/esm/care/interfaces/constants.d.ts +1 -0
  17. package/build/esm/care.js +1 -1
  18. package/build/esm/components/molecules/surveyOrPremiumBanner/context.d.ts +3 -1
  19. package/build/esm/components/molecules/surveyOrPremiumBanner/index.d.ts +1 -1
  20. package/build/esm/components.js +1 -1
  21. package/build/esm/{constants-66251709.js → constants-55b45825.js} +1 -1
  22. package/build/esm/constants.js +1 -1
  23. package/build/esm/{core-256cda08.js → core-3eccb9f3.js} +1 -1
  24. package/build/esm/ecom.js +1 -1
  25. package/build/esm/{fixedBottomAdBlock-42a0fc3b.js → fixedBottomAdBlock-96dd8500.js} +1 -1
  26. package/build/esm/footer.js +1 -1
  27. package/build/esm/gAssets.js +1 -1
  28. package/build/esm/{getDynamicHealthTool-0e9dffaf.js → getDynamicHealthTool-4de90d2c.js} +1 -1
  29. package/build/esm/{getSocialList-04ad7465.js → getSocialList-ffdab233.js} +1 -1
  30. package/build/esm/hooks.js +1 -1
  31. package/build/esm/i18n.js +1 -1
  32. package/build/esm/i18nV2.js +1 -1
  33. package/build/esm/{index-c9c1af14.js → index-09c17ca0.js} +1 -1
  34. package/build/esm/{index-4ef01662.js → index-163dbf81.js} +1 -1
  35. package/build/esm/{index-7ea25330.js → index-17e0de1a.js} +1 -1
  36. package/build/esm/{index-1f31ee2c.js → index-337f9c4b.js} +1 -1
  37. package/build/esm/index-5b495943.js +1 -0
  38. package/build/esm/{index-c04a8332.js → index-72ccbc84.js} +1 -1
  39. package/build/esm/{index-c52c6d1d.js → index-74c5df78.js} +1 -1
  40. package/build/esm/{index-aab6e937.js → index-7cae1139.js} +1 -1
  41. package/build/esm/{index-9a6cbd76.js → index-86fa35f1.js} +1 -1
  42. package/build/esm/{index-5b15422c.js → index-8c194e19.js} +1 -1
  43. package/build/esm/{index-c20147f5.js → index-948c3689.js} +1 -1
  44. package/build/esm/{index-d533e676.js → index-a53fa885.js} +1 -1
  45. package/build/esm/{index-671bebd2.js → index-a5f32e1f.js} +1 -1
  46. package/build/esm/{index-4b0913ef.js → index-b38a4082.js} +1 -1
  47. package/build/esm/{index-9dc3058e.js → index-bee675e7.js} +1 -1
  48. package/build/esm/{index-6bfebf91.js → index-cd94eec4.js} +1 -1
  49. package/build/esm/{index-79cd66c0.js → index-e8312aa1.js} +1 -1
  50. package/build/esm/{index-37ac3e0a.js → index-ec45fec9.js} +6 -6
  51. package/build/esm/{index-40352094.js → index-f0703e1c.js} +2 -2
  52. package/build/esm/{index-f9338e27.js → index-f2e5ccac.js} +2 -2
  53. package/build/esm/{index-2472bb2e.js → index-f5c58742.js} +1 -1
  54. package/build/esm/index.js +1 -1
  55. package/build/esm/{index.styled-8ad8796f.js → index.styled-476ff122.js} +4 -4
  56. package/build/esm/{index.styled-c742d0a3.js → index.styled-54cd15cf.js} +4 -4
  57. package/build/esm/{index.styled-ce98cbc1.js → index.styled-dd9882a9.js} +1 -1
  58. package/build/esm/{index.styles-952b0f4b.js → index.styles-70158aec.js} +1 -1
  59. package/build/esm/lead.js +1 -1
  60. package/build/esm/mantine.js +1 -1
  61. package/build/esm/misc.js +1 -1
  62. package/build/esm/navigation.js +1 -1
  63. package/build/esm/{normalizeLink-58957b47.js → normalizeLink-ec13b136.js} +1 -1
  64. package/build/esm/onboarding.js +1 -1
  65. package/build/esm/onboardingV2.js +1 -1
  66. package/build/esm/pwg.js +3 -3
  67. package/build/esm/together.js +1 -1
  68. package/build/esm/{types-0cbaa281.js → types-8b4be14a.js} +130 -130
  69. package/build/esm/{types-27c16503.js → types-d95ff0a2.js} +1 -1
  70. package/build/esm/types.js +1 -1
  71. package/build/esm/{useCategory-bfba2de5.js → useCategory-04f78bbd.js} +1 -1
  72. package/build/esm/useHealthToolCache-144f477f.js +1 -0
  73. package/build/esm/{useRafState-66b5f663.js → useRafState-a8591aed.js} +1 -1
  74. package/build/esm/{useTranslations-b2f04ab6.js → useTranslations-b80f6cea.js} +1 -1
  75. package/build/esm/{utils-33c4c832.js → utils-6efd33c7.js} +1 -1
  76. package/build/esm/vaccination.js +5 -5
  77. package/build/{fixedBottomAdBlock-664a6e50.js → fixedBottomAdBlock-7cd506c7.js} +1 -1
  78. package/build/footer.js +1 -1
  79. package/build/gAssets.js +1 -1
  80. package/build/{getDynamicHealthTool-571597e0.js → getDynamicHealthTool-5c61456a.js} +1 -1
  81. package/build/{getSocialList-2d43911c.js → getSocialList-5de74aca.js} +1 -1
  82. package/build/hooks.js +1 -1
  83. package/build/i18n.js +1 -1
  84. package/build/i18nV2.js +1 -1
  85. package/build/{index-537bccbe.js → index-05e21683.js} +1 -1
  86. package/build/{index-a89b23de.js → index-06a0ee4f.js} +1 -1
  87. package/build/index-09ed8172.js +53 -0
  88. package/build/{index-c57b487f.js → index-120a5211.js} +1 -1
  89. package/build/{index-e7f2e80f.js → index-2078c919.js} +1 -1
  90. package/build/{index-32d3a385.js → index-239bd1af.js} +1 -1
  91. package/build/{index-8383af12.js → index-2fba8b09.js} +1 -1
  92. package/build/{index-e022af07.js → index-5c8e9580.js} +1 -1
  93. package/build/{index-5b7dfda4.js → index-63626740.js} +1 -1
  94. package/build/{index-63632fd5.js → index-66bd0a7b.js} +1 -1
  95. package/build/{index-f36821a3.js → index-6a45ff11.js} +1 -1
  96. package/build/{index-55a6f97a.js → index-716e7e90.js} +1 -1
  97. package/build/index-76173979.js +1 -0
  98. package/build/{index-22a4d8ec.js → index-80d1c6d3.js} +1 -1
  99. package/build/index-8dfe86fe.js +1 -0
  100. package/build/{index-9669998e.js → index-97a47459.js} +1 -1
  101. package/build/{index-b99409f1.js → index-9b288574.js} +1 -1
  102. package/build/{index-bc8fcf35.js → index-ca244410.js} +1 -1
  103. package/build/{index-9f6e2696.js → index-eb228f66.js} +15 -15
  104. package/build/{index-dad94e78.js → index-f9ef69b8.js} +1 -1
  105. package/build/index-fb707465.js +1 -0
  106. package/build/index.js +1 -1
  107. package/build/{index.styled-0d4d68f3.js → index.styled-f21b31a6.js} +1 -1
  108. package/build/{index.styled-90c35fc5.js → index.styled-f3571c38.js} +1 -1
  109. package/build/{index.styled-b9465af1.js → index.styled-f3b66fe9.js} +5 -5
  110. package/build/{index.styles-9285e23d.js → index.styles-b9febcc9.js} +1 -1
  111. package/build/lead.js +1 -1
  112. package/build/mantine.js +1 -1
  113. package/build/misc.js +1 -1
  114. package/build/navigation.js +1 -1
  115. package/build/{normalizeLink-28258895.js → normalizeLink-886f7c9d.js} +1 -1
  116. package/build/onboarding.js +1 -1
  117. package/build/onboardingV2.js +1 -1
  118. package/build/pwg.js +2 -2
  119. package/build/together.js +1 -1
  120. package/build/{types-ffea7b45.js → types-b9f1522b.js} +1 -1
  121. package/build/{types-90d8b488.js → types-c2a36494.js} +12 -12
  122. package/build/types.js +1 -1
  123. package/build/{useCategory-971481b4.js → useCategory-ff3032d0.js} +1 -1
  124. package/build/useHealthToolCache-bf07b19c.js +1 -0
  125. package/build/{useRafState-5cd3ac64.js → useRafState-8b05394a.js} +1 -1
  126. package/build/{useTranslations-2e7d64aa.js → useTranslations-1901ec76.js} +1 -1
  127. package/build/{utils-2fb6eb7d.js → utils-6a2363f8.js} +1 -1
  128. package/build/vaccination.js +1 -1
  129. package/package.json +1 -1
  130. package/build/core-5c4c9018.js +0 -1
  131. package/build/esm/index-404d6f42.js +0 -1
  132. package/build/esm/useHealthToolCache-b9973713.js +0 -1
  133. package/build/index-2584fe83.js +0 -53
  134. package/build/index-2db33f49.js +0 -1
  135. package/build/index-4efa8e7e.js +0 -1
  136. package/build/index-58609826.js +0 -1
  137. package/build/useHealthToolCache-10f561aa.js +0 -1
  138. /package/build/{BMI_BOYS.percentile.monthly-5b917714.js → BMI_BOYS.percentile.monthly-9b668c29.js} +0 -0
  139. /package/build/{BMI_BOYS.percentile.weekly-9566eb37.js → BMI_BOYS.percentile.weekly-b4c3a07f.js} +0 -0
  140. /package/build/{BMI_BOYS.percentile.yearly-db737739.js → BMI_BOYS.percentile.yearly-c3e94826.js} +0 -0
  141. /package/build/{BMI_BOYS.zscore.monthly-86f68a0b.js → BMI_BOYS.zscore.monthly-71a3da1d.js} +0 -0
  142. /package/build/{BMI_BOYS.zscore.weekly-92d923b0.js → BMI_BOYS.zscore.weekly-14aa09df.js} +0 -0
  143. /package/build/{BMI_BOYS.zscore.yearly-4d92f086.js → BMI_BOYS.zscore.yearly-1535f1b6.js} +0 -0
  144. /package/build/{BMI_GIRLS.percentile.monthly-6a6d1837.js → BMI_GIRLS.percentile.monthly-be24fd95.js} +0 -0
  145. /package/build/{BMI_GIRLS.percentile.weekly-5589d39f.js → BMI_GIRLS.percentile.weekly-97d31ea1.js} +0 -0
  146. /package/build/{BMI_GIRLS.percentile.yearly-15c4d279.js → BMI_GIRLS.percentile.yearly-0a98eaa5.js} +0 -0
  147. /package/build/{BMI_GIRLS.zscore.monthly-667e63fd.js → BMI_GIRLS.zscore.monthly-ec195345.js} +0 -0
  148. /package/build/{BMI_GIRLS.zscore.weekly-3fdeccfe.js → BMI_GIRLS.zscore.weekly-05151437.js} +0 -0
  149. /package/build/{BMI_GIRLS.zscore.yearly-ea25f63d.js → BMI_GIRLS.zscore.yearly-296ebe80.js} +0 -0
  150. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-6db968ca.js → HEAD CIRCUM_BOYS.percentile.monthly-ca9cb5b7.js} +0 -0
  151. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-2a4e9201.js → HEAD CIRCUM_BOYS.percentile.weekly-af15543c.js} +0 -0
  152. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-c566092e.js → HEAD CIRCUM_BOYS.percentile.yearly-8da4114b.js} +0 -0
  153. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-03fc7b94.js → HEAD CIRCUM_BOYS.zscore.monthly-56c3da8d.js} +0 -0
  154. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-faa83c6d.js → HEAD CIRCUM_BOYS.zscore.weekly-697ad965.js} +0 -0
  155. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-629071b8.js → HEAD CIRCUM_BOYS.zscore.yearly-c0f55526.js} +0 -0
  156. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-fd8e09c4.js → HEAD CIRCUM_GIRLS.percentile.monthly-6c536973.js} +0 -0
  157. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-d7bc181c.js → HEAD CIRCUM_GIRLS.percentile.weekly-bf3fc7ed.js} +0 -0
  158. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-2c18bf98.js → HEAD CIRCUM_GIRLS.percentile.yearly-bf8b0db8.js} +0 -0
  159. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-8d909763.js → HEAD CIRCUM_GIRLS.zscore.monthly-8694e757.js} +0 -0
  160. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-018ebd5c.js → HEAD CIRCUM_GIRLS.zscore.weekly-9ad440da.js} +0 -0
  161. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-f4da36f0.js → HEAD CIRCUM_GIRLS.zscore.yearly-3acde4ed.js} +0 -0
  162. /package/build/{HEIGHT_BOYS.percentile.monthly-4bcc65ef.js → HEIGHT_BOYS.percentile.monthly-5a5e9d9d.js} +0 -0
  163. /package/build/{HEIGHT_BOYS.percentile.weekly-7c769b89.js → HEIGHT_BOYS.percentile.weekly-e42a798f.js} +0 -0
  164. /package/build/{HEIGHT_BOYS.percentile.yearly-3f50eba5.js → HEIGHT_BOYS.percentile.yearly-178082da.js} +0 -0
  165. /package/build/{HEIGHT_BOYS.zscore.monthly-a78a7a26.js → HEIGHT_BOYS.zscore.monthly-0073ec8c.js} +0 -0
  166. /package/build/{HEIGHT_BOYS.zscore.weekly-caab37b3.js → HEIGHT_BOYS.zscore.weekly-dbe2bb6a.js} +0 -0
  167. /package/build/{HEIGHT_BOYS.zscore.yearly-c2d46f1f.js → HEIGHT_BOYS.zscore.yearly-14ca8968.js} +0 -0
  168. /package/build/{HEIGHT_GIRLS.percentile.monthly-b3265a7d.js → HEIGHT_GIRLS.percentile.monthly-f5aff8ff.js} +0 -0
  169. /package/build/{HEIGHT_GIRLS.percentile.weekly-69403da3.js → HEIGHT_GIRLS.percentile.weekly-a3b5e2a5.js} +0 -0
  170. /package/build/{HEIGHT_GIRLS.percentile.yearly-5f19a816.js → HEIGHT_GIRLS.percentile.yearly-a32c2583.js} +0 -0
  171. /package/build/{HEIGHT_GIRLS.zscore.monthly-e56cd9ff.js → HEIGHT_GIRLS.zscore.monthly-6f9a7d7e.js} +0 -0
  172. /package/build/{HEIGHT_GIRLS.zscore.weekly-cfbee1ac.js → HEIGHT_GIRLS.zscore.weekly-7948cd1b.js} +0 -0
  173. /package/build/{HEIGHT_GIRLS.zscore.yearly-603fd96e.js → HEIGHT_GIRLS.zscore.yearly-e4cc71d8.js} +0 -0
  174. /package/build/{Onboarding-2b01db17.js → Onboarding-2f763873.js} +0 -0
  175. /package/build/{Visible-7e3703b1.js → Visible-671ae192.js} +0 -0
  176. /package/build/{WEIGHT_BOYS.percentile.monthly-df2b38ad.js → WEIGHT_BOYS.percentile.monthly-aa8cbaa8.js} +0 -0
  177. /package/build/{WEIGHT_BOYS.percentile.weekly-017d4587.js → WEIGHT_BOYS.percentile.weekly-01192e49.js} +0 -0
  178. /package/build/{WEIGHT_BOYS.percentile.yearly-d98f06d0.js → WEIGHT_BOYS.percentile.yearly-f77d5156.js} +0 -0
  179. /package/build/{WEIGHT_BOYS.zscore.monthly-3efc2926.js → WEIGHT_BOYS.zscore.monthly-f49c33bc.js} +0 -0
  180. /package/build/{WEIGHT_BOYS.zscore.weekly-1478e955.js → WEIGHT_BOYS.zscore.weekly-26f94187.js} +0 -0
  181. /package/build/{WEIGHT_BOYS.zscore.yearly-96592d44.js → WEIGHT_BOYS.zscore.yearly-a8d2da3b.js} +0 -0
  182. /package/build/{WEIGHT_GIRLS.percentile.monthly-7990f762.js → WEIGHT_GIRLS.percentile.monthly-fc72fd67.js} +0 -0
  183. /package/build/{WEIGHT_GIRLS.percentile.weekly-4b98de90.js → WEIGHT_GIRLS.percentile.weekly-83cbe837.js} +0 -0
  184. /package/build/{WEIGHT_GIRLS.percentile.yearly-5686e441.js → WEIGHT_GIRLS.percentile.yearly-5df84ca6.js} +0 -0
  185. /package/build/{WEIGHT_GIRLS.zscore.monthly-76c7187f.js → WEIGHT_GIRLS.zscore.monthly-79e4c930.js} +0 -0
  186. /package/build/{WEIGHT_GIRLS.zscore.weekly-bc5910e8.js → WEIGHT_GIRLS.zscore.weekly-24ba6197.js} +0 -0
  187. /package/build/{WEIGHT_GIRLS.zscore.yearly-07b83056.js → WEIGHT_GIRLS.zscore.yearly-6fb7bfb7.js} +0 -0
  188. /package/build/{cookieHelper-47e34efa.js → cookieHelper-56a7d794.js} +0 -0
  189. /package/build/{dataTransform-fe677610.js → dataTransform-1578190f.js} +0 -0
  190. /package/build/esm/{BMI_BOYS.percentile.monthly-9e7fdff9.js → BMI_BOYS.percentile.monthly-c19f4e7c.js} +0 -0
  191. /package/build/esm/{BMI_BOYS.percentile.weekly-109aa882.js → BMI_BOYS.percentile.weekly-64ecc96e.js} +0 -0
  192. /package/build/esm/{BMI_BOYS.percentile.yearly-2f4904a4.js → BMI_BOYS.percentile.yearly-b3072dd2.js} +0 -0
  193. /package/build/esm/{BMI_BOYS.zscore.monthly-b7818505.js → BMI_BOYS.zscore.monthly-7397adb4.js} +0 -0
  194. /package/build/esm/{BMI_BOYS.zscore.weekly-8a8c6e60.js → BMI_BOYS.zscore.weekly-b4228f0f.js} +0 -0
  195. /package/build/esm/{BMI_BOYS.zscore.yearly-259d827f.js → BMI_BOYS.zscore.yearly-fbec987d.js} +0 -0
  196. /package/build/esm/{BMI_GIRLS.percentile.monthly-4c85f2e2.js → BMI_GIRLS.percentile.monthly-af6db555.js} +0 -0
  197. /package/build/esm/{BMI_GIRLS.percentile.weekly-52780dde.js → BMI_GIRLS.percentile.weekly-7ce86044.js} +0 -0
  198. /package/build/esm/{BMI_GIRLS.percentile.yearly-d552f7ff.js → BMI_GIRLS.percentile.yearly-728a4d6b.js} +0 -0
  199. /package/build/esm/{BMI_GIRLS.zscore.monthly-70736759.js → BMI_GIRLS.zscore.monthly-6f6f33de.js} +0 -0
  200. /package/build/esm/{BMI_GIRLS.zscore.weekly-09d9a498.js → BMI_GIRLS.zscore.weekly-23f23397.js} +0 -0
  201. /package/build/esm/{BMI_GIRLS.zscore.yearly-787a71f2.js → BMI_GIRLS.zscore.yearly-fd5e78dc.js} +0 -0
  202. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-3dc23858.js → HEAD CIRCUM_BOYS.percentile.monthly-b99d27b3.js} +0 -0
  203. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-fc90a435.js → HEAD CIRCUM_BOYS.percentile.weekly-554de12c.js} +0 -0
  204. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-d311328c.js → HEAD CIRCUM_BOYS.percentile.yearly-e2db0550.js} +0 -0
  205. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-a4105e49.js → HEAD CIRCUM_BOYS.zscore.monthly-e6254b70.js} +0 -0
  206. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-1602faff.js → HEAD CIRCUM_BOYS.zscore.weekly-85e9e0e2.js} +0 -0
  207. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-314d87f2.js → HEAD CIRCUM_BOYS.zscore.yearly-e58cec4d.js} +0 -0
  208. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-1755894d.js → HEAD CIRCUM_GIRLS.percentile.monthly-3d76a65b.js} +0 -0
  209. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-eff64869.js → HEAD CIRCUM_GIRLS.percentile.weekly-c0c51676.js} +0 -0
  210. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-ec836bd1.js → HEAD CIRCUM_GIRLS.percentile.yearly-10f4d9bb.js} +0 -0
  211. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-45824afc.js → HEAD CIRCUM_GIRLS.zscore.monthly-1ade5695.js} +0 -0
  212. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-3dda450c.js → HEAD CIRCUM_GIRLS.zscore.weekly-e0dec6e3.js} +0 -0
  213. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-47d31d6a.js → HEAD CIRCUM_GIRLS.zscore.yearly-abc7ddd2.js} +0 -0
  214. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-8e3e5eea.js → HEIGHT_BOYS.percentile.monthly-9a38d9b6.js} +0 -0
  215. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-4fd1e4f0.js → HEIGHT_BOYS.percentile.weekly-25092e6f.js} +0 -0
  216. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-a72efc6f.js → HEIGHT_BOYS.percentile.yearly-72dbc7cc.js} +0 -0
  217. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-bbc5d61a.js → HEIGHT_BOYS.zscore.monthly-5e8fff1a.js} +0 -0
  218. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-be4b43d4.js → HEIGHT_BOYS.zscore.weekly-6c778e57.js} +0 -0
  219. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-41fab017.js → HEIGHT_BOYS.zscore.yearly-cb8f1769.js} +0 -0
  220. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-5960d7bc.js → HEIGHT_GIRLS.percentile.monthly-c3a69e26.js} +0 -0
  221. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-842b0b35.js → HEIGHT_GIRLS.percentile.weekly-c233b340.js} +0 -0
  222. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-5e771144.js → HEIGHT_GIRLS.percentile.yearly-2d88d968.js} +0 -0
  223. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-a87662f6.js → HEIGHT_GIRLS.zscore.monthly-ed0b0fd2.js} +0 -0
  224. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-9974df51.js → HEIGHT_GIRLS.zscore.weekly-7abeb26d.js} +0 -0
  225. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-036899ae.js → HEIGHT_GIRLS.zscore.yearly-0ca5aab2.js} +0 -0
  226. /package/build/esm/{Onboarding-3631c6d1.js → Onboarding-03e07675.js} +0 -0
  227. /package/build/esm/{Visible-2bac67a9.js → Visible-8321b81d.js} +0 -0
  228. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-fb78f02c.js → WEIGHT_BOYS.percentile.monthly-1c993046.js} +0 -0
  229. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-a91de386.js → WEIGHT_BOYS.percentile.weekly-e5d59278.js} +0 -0
  230. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-ad66fdd2.js → WEIGHT_BOYS.percentile.yearly-b8822d69.js} +0 -0
  231. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-2f39cc76.js → WEIGHT_BOYS.zscore.monthly-a101acdc.js} +0 -0
  232. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-14cc15d4.js → WEIGHT_BOYS.zscore.weekly-664fff4e.js} +0 -0
  233. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-2041fbea.js → WEIGHT_BOYS.zscore.yearly-b066dd44.js} +0 -0
  234. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-3a60ac45.js → WEIGHT_GIRLS.percentile.monthly-1cc08b51.js} +0 -0
  235. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-d0fbecca.js → WEIGHT_GIRLS.percentile.weekly-0a5407e2.js} +0 -0
  236. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-3ae3438e.js → WEIGHT_GIRLS.percentile.yearly-78551541.js} +0 -0
  237. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-ed2bf2a6.js → WEIGHT_GIRLS.zscore.monthly-a40de4e8.js} +0 -0
  238. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-3328de54.js → WEIGHT_GIRLS.zscore.weekly-acbadfd5.js} +0 -0
  239. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-e78ef269.js → WEIGHT_GIRLS.zscore.yearly-39895e16.js} +0 -0
  240. /package/build/esm/{cookieHelper-2fe90225.js → cookieHelper-48427295.js} +0 -0
  241. /package/build/esm/{dataTransform-532e7457.js → dataTransform-747d4e52.js} +0 -0
  242. /package/build/esm/{index-7df304c0.js → index-81131e03.js} +0 -0
  243. /package/build/esm/{isProduction-85c6cb19.js → isProduction-1a2ee964.js} +0 -0
  244. /package/build/esm/{localizeNumberFormat-17475a32.js → localizeNumberFormat-128eb5ef.js} +0 -0
  245. /package/build/esm/{number-251f8529.js → number-1741390a.js} +0 -0
  246. /package/build/esm/{paths-46458204.js → paths-32761998.js} +0 -0
  247. /package/build/esm/{screenSizeContext-4ff53e25.js → screenSizeContext-823a0ed3.js} +0 -0
  248. /package/build/esm/{theme-b5489d82.js → theme-1fbc994e.js} +0 -0
  249. /package/build/esm/{translationsContext-be2e1844.js → translationsContext-93c2cf4e.js} +0 -0
  250. /package/build/esm/{tslib.es6-0405df6a.js → tslib.es6-ac3afa23.js} +0 -0
  251. /package/build/esm/{types-48c94135.js → types-3a5bac59.js} +0 -0
  252. /package/build/esm/{useIsInit-942b94fa.js → useIsInit-c52c83fe.js} +0 -0
  253. /package/build/esm/{useOutsideClick-3450a7a8.js → useOutsideClick-60f0a66c.js} +0 -0
  254. /package/build/esm/{useScrollbarSize-11faa525.js → useScrollbarSize-97b46895.js} +0 -0
  255. /package/build/esm/{useUniqueId-d35bf586.js → useUniqueId-85a1867a.js} +0 -0
  256. /package/build/{index-4046269f.js → index-17d4eae2.js} +0 -0
  257. /package/build/{isProduction-e1b7813f.js → isProduction-0720723e.js} +0 -0
  258. /package/build/{localizeNumberFormat-7424a97a.js → localizeNumberFormat-66256a35.js} +0 -0
  259. /package/build/{number-b3767f34.js → number-5d2dc1a0.js} +0 -0
  260. /package/build/{paths-2ac2ae14.js → paths-2840670d.js} +0 -0
  261. /package/build/{screenSizeContext-4d5786c6.js → screenSizeContext-5fb2e1e3.js} +0 -0
  262. /package/build/{theme-1a7c14fb.js → theme-430914fa.js} +0 -0
  263. /package/build/{translationsContext-f962ff63.js → translationsContext-91bf4ce0.js} +0 -0
  264. /package/build/{tslib.es6-0d31715f.js → tslib.es6-ada91747.js} +0 -0
  265. /package/build/{types-ef750ab6.js → types-00acdbca.js} +0 -0
  266. /package/build/{useIsInit-790b9962.js → useIsInit-8236e789.js} +0 -0
  267. /package/build/{useOutsideClick-81c62034.js → useOutsideClick-9f3c981c.js} +0 -0
  268. /package/build/{useScrollbarSize-29ac8766.js → useScrollbarSize-2ff4d0ee.js} +0 -0
  269. /package/build/{useUniqueId-86a9e1d4.js → useUniqueId-e09145f0.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{useState as a,useCallback as o,useMemo as n,useEffect as s,useRef as l,useReducer as r}from"react";import{u as c}from"./useTranslations-b2f04ab6.js";import d from"lodash/debounce";import{I as p,L as u,a as h,C as g}from"./constants-66251709.js";import{I as m}from"./index-7ea25330.js";import C,{createGlobalStyle as b}from"styled-components";import{T as y}from"./index-2472bb2e.js";import{t as f}from"./theme-b5489d82.js";import{M as v}from"./screenSizeContext-4ff53e25.js";import x from"react-loading-skeleton";import w from"lodash/shuffle";import{a as E}from"./useOutsideClick-3450a7a8.js";import{P as S}from"./paths-46458204.js";import{Skeleton as L,Input as k,Divider as O,Tabs as j,Flex as I,Button as F}from"@mantine/core";import{e as M,d as $}from"./index-c9c1af14.js";import{g as R,s as T,d as P}from"./cookieHelper-2fe90225.js";import{C as A,I as N}from"./index-5b15422c.js";import B from"string-format";const V=e=>t.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),t.createElement("path",{d:"M7.99969 9.38055L5.45236 6.83322C5.17636 6.55722 4.72836 6.55722 4.45236 6.83322C4.17636 7.10922 4.17636 7.55722 4.45236 7.83322L7.52836 10.9092C7.78903 11.1699 8.21103 11.1699 8.47103 10.9092L11.547 7.83322C11.823 7.55722 11.823 7.10922 11.547 6.83322C11.271 6.55722 10.823 6.55722 10.547 6.83322L7.99969 9.38055Z"}));function D(){const[e,t]=a((()=>{if("undefined"==typeof window)return"unset";if(R(M))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,s]=a((()=>{if("undefined"==typeof window)return null;const e=R(M);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=o((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const i={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};T(M,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{P(M),t("denied")}))}),[]);return n((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const K=C.div``,z=C.div`
1
+ import{a as e}from"./tslib.es6-ac3afa23.js";import*as t from"react";import i,{useState as a,useCallback as o,useMemo as n,useEffect as s,useRef as l,useReducer as r}from"react";import{u as c}from"./useTranslations-b80f6cea.js";import d from"lodash/debounce";import{I as p,L as u,a as h,C as g,S as m}from"./constants-55b45825.js";import{I as C}from"./index-17e0de1a.js";import b,{createGlobalStyle as y}from"styled-components";import{T as f}from"./index-f5c58742.js";import{t as v}from"./theme-1fbc994e.js";import{M as x}from"./screenSizeContext-823a0ed3.js";import w from"react-loading-skeleton";import E from"lodash/shuffle";import{a as S}from"./useOutsideClick-60f0a66c.js";import{P as L}from"./paths-32761998.js";import{Skeleton as k,Input as O,Divider as j,Tabs as I,Flex as F,Button as $}from"@mantine/core";import{e as M,d as R}from"./index-09c17ca0.js";import{g as T,s as P,d as A}from"./cookieHelper-48427295.js";import{C as N,I as B}from"./index-8c194e19.js";import V from"string-format";const D=e=>t.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),t.createElement("path",{d:"M7.99969 9.38055L5.45236 6.83322C5.17636 6.55722 4.72836 6.55722 4.45236 6.83322C4.17636 7.10922 4.17636 7.55722 4.45236 7.83322L7.52836 10.9092C7.78903 11.1699 8.21103 11.1699 8.47103 10.9092L11.547 7.83322C11.823 7.55722 11.823 7.10922 11.547 6.83322C11.271 6.55722 10.823 6.55722 10.547 6.83322L7.99969 9.38055Z"}));function K(){const[e,t]=a((()=>{if("undefined"==typeof window)return"unset";if(T(M))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,s]=a((()=>{if("undefined"==typeof window)return null;const e=T(M);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=o((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const i={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};P(M,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{A(M),t("denied")}))}),[]);return n((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const z=b.div``,_=b.div`
2
2
  --searchbar-z-index: 305;
3
3
  &[data-is-modal='true'] {
4
4
  position: fixed;
@@ -11,17 +11,17 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
11
11
  background-color: white;
12
12
  z-index: var(--searchbar-z-index);
13
13
  }
14
- `,_=C.section``,H=C.input`
14
+ `,H=b.section``,G=b.input`
15
15
  position: fixed;
16
16
  left: -100%;
17
17
  top: -100%;
18
- `,G=C(m)`
18
+ `,Z=b(C)`
19
19
  #booking-search-bar & {
20
20
  input {
21
21
  font-size: 16px;
22
22
  }
23
23
  }
24
- `,Z=b`
24
+ `,Y=y`
25
25
  .care-popup-open {
26
26
  overflow: hidden;
27
27
  position: fixed;
@@ -35,7 +35,7 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
35
35
  z-index: 2;
36
36
  }
37
37
  }
38
- `,Y=({className:e,color:t})=>i.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M18 6L6 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M6 6L18 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),U=({className:e,color:t})=>i.createElement("svg",{width:"14",height:"20",viewBox:"0 0 14 20",className:e},i.createElement("path",{d:"M7 0C3.134 0 0 3.134 0 7C0 10.966 4.404 16.82 6.226 19.071C6.626 19.565 7.374 19.565 7.774 19.071C9.596 16.82 14 10.966 14 7C14 3.134 10.866 0 7 0ZM7 9.5C5.619 9.5 4.5 8.381 4.5 7C4.5 5.619 5.619 4.5 7 4.5C8.381 4.5 9.5 5.619 9.5 7C9.5 8.381 8.381 9.5 7 9.5Z",fill:t||"currentColor"})),W=({className:e,color:t})=>i.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M11 18C14.866 18 18 14.866 18 11C18 7.13401 14.866 4 11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18Z",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M20 20L16 16",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),Q=({width:e,height:t})=>i.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"})),q=C.li`
38
+ `,U=({className:e,color:t})=>i.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M18 6L6 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M6 6L18 18",stroke:t||"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),W=({className:e,color:t})=>i.createElement("svg",{width:"14",height:"20",viewBox:"0 0 14 20",className:e},i.createElement("path",{d:"M7 0C3.134 0 0 3.134 0 7C0 10.966 4.404 16.82 6.226 19.071C6.626 19.565 7.374 19.565 7.774 19.071C9.596 16.82 14 10.966 14 7C14 3.134 10.866 0 7 0ZM7 9.5C5.619 9.5 4.5 8.381 4.5 7C4.5 5.619 5.619 4.5 7 4.5C8.381 4.5 9.5 5.619 9.5 7C9.5 8.381 8.381 9.5 7 9.5Z",fill:t||"currentColor"})),Q=({className:e,color:t})=>i.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("path",{d:"M11 18C14.866 18 18 14.866 18 11C18 7.13401 14.866 4 11 4C7.13401 4 4 7.13401 4 11C4 14.866 7.13401 18 11 18Z",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M20 20L16 16",stroke:t||"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),q=({width:e,height:t})=>i.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"})),J=b.li`
39
39
  display: flex;
40
40
  align-items: center;
41
41
  gap: 12px;
@@ -56,9 +56,9 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
56
56
  right: 18px;
57
57
  top: 0;
58
58
  height: 1px;
59
- background-color: ${f.colors.neutral100};
59
+ background-color: ${v.colors.neutral100};
60
60
  }
61
- `,J=C.div`
61
+ `,X=b.div`
62
62
  display: flex;
63
63
  position: absolute;
64
64
  top: 48px;
@@ -70,19 +70,19 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
70
70
  background-color: white;
71
71
  z-index: 30;
72
72
 
73
- ${v.tdDown} {
73
+ ${x.tdDown} {
74
74
  position: relative;
75
75
  top: 0;
76
76
  box-shadow: initial;
77
77
  }
78
- `,X=C.ul`
78
+ `,ee=b.ul`
79
79
  width: 100%;
80
80
  max-height: 600px;
81
81
  overflow-y: auto;
82
- `,ee=C(U)`
82
+ `,te=b(W)`
83
83
  width: 12px;
84
84
  height: 18px;
85
- `,te=C.li`
85
+ `,ie=b.li`
86
86
  position: relative;
87
87
  cursor: pointer;
88
88
  padding: 12px 18px;
@@ -100,11 +100,11 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
100
100
  right: 18px;
101
101
  top: 0;
102
102
  height: 1px;
103
- background-color: ${f.colors.neutral100};
103
+ background-color: ${v.colors.neutral100};
104
104
  }
105
105
 
106
106
  &:not([data-is-denied='true']):hover {
107
- background-color: ${f.colors.neutral50};
107
+ background-color: ${v.colors.neutral50};
108
108
  }
109
109
 
110
110
  &:last-child:hover {
@@ -120,17 +120,17 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
120
120
  &[data-is-denied='true'] {
121
121
  cursor: not-allowed;
122
122
  }
123
- `,ie=C((({count:e,className:t})=>i.createElement(i.Fragment,null,[...Array(e)].map(((e,a)=>i.createElement(q,{className:t,key:a},i.createElement(x,{count:1,height:32}),i.createElement(x,{count:1,height:24})))))))`
123
+ `,ae=b((({count:e,className:t})=>i.createElement(i.Fragment,null,[...Array(e)].map(((e,a)=>i.createElement(J,{className:t,key:a},i.createElement(w,{count:1,height:32}),i.createElement(w,{count:1,height:24})))))))`
124
124
  &:first-child {
125
125
  padding-top: 18px;
126
126
  }
127
- `,ae=({cities:e,isLoading:t,onLocationClick:a,selectedLocation:o})=>{const{t:n,locale:s}=c();return i.createElement(J,{"data-testid":"location-search-results"},i.createElement(X,null,t?i.createElement(ie,{count:5}):!e||e.length<1?i.createElement(i.Fragment,null,i.createElement(te,{"data-is-denied":"true"},i.createElement(y,{size:"sm",color:"#ccc"},n("booking.searchBar.noResults")))):i.createElement(i.Fragment,null,i.createElement(te,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;a&&a({name:n("booking.searchBar.allLocations"),id:p,slug:null===(e=u[s])||void 0===e?void 0:e.ALL})}},i.createElement(ee,{color:f.colors.neutral400}),i.createElement(y,{size:"md"},n("booking.searchBar.allLocations"))),e.map((e=>i.createElement(te,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),a&&a(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==o?void 0:o.id)===e.id},i.createElement(ee,{color:f.colors.neutral400}),i.createElement(y,{size:"md"},e.name)))))))},oe="TYPE_CHARACTER",ne="REMOVE_CHARACTER",se="REMOVE_ALL",le="REMOVE_LAST_VISIBLE_NODE",re="PAUSE_FOR",ce="CHANGE_DELETE_SPEED",de="CHANGE_DELAY",pe="PASTE_STRING",ue=(e,t)=>Math.floor(Math.random()*(t-e+1))+e,he="TEXT_NODE";class ge{constructor(e){this.state={lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null},this.options={strings:null,delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,stringSplitter:null,onCreateTextNode:null,onRemoveNode:null},this.start=()=>(this.state.eventLoopPaused=!1,this.runEventLoop(),this),this.pause=()=>(this.state.eventLoopPaused=!0,this),this.stop=()=>(this.state.eventLoop&&(window.cancelAnimationFrame(this.state.eventLoop),this.state.eventLoop=null),this),this.pauseFor=e=>(this.addEventToQueue(re,{ms:e}),this),this.typeOutAllStrings=()=>"string"==typeof this.options.strings?(this.typeString(this.options.strings).pauseFor(this.options.pauseFor),this):(this.options.strings.forEach((e=>{this.typeString(e).pauseFor(this.options.pauseFor).deleteAll(this.options.deleteSpeed)})),this),this.typeString=(e,t=null)=>{if(e){const{stringSplitter:i}=this.options||{},a="function"==typeof i?i(e):e.split("");this.typeCharacters(a,t)}return this},this.pasteString=(e,t=null)=>(e&&this.addEventToQueue(pe,{character:e,node:t}),this),this.deleteAll=(e="natural")=>(this.addEventToQueue(se,{speed:e}),this),this.changeDeleteSpeed=e=>{if(!e)throw new Error("Must provide new delete speed");return this.addEventToQueue(ce,{speed:e}),this},this.changeDelay=e=>{if(!e)throw new Error("Must provide new delay");return this.addEventToQueue(de,{delay:e}),this},this.deleteChars=e=>{if(!e)throw new Error("Must provide amount of characters to delete");for(let t=0;t<e;t++)this.addEventToQueue(ne);return this},this.typeCharacters=(e,t=null)=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((e=>{this.addEventToQueue(oe,{character:e,node:t})})),this},this.removeCharacters=e=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((()=>{this.addEventToQueue(ne)})),this},this.addEventToQueue=(e,t,i=!1)=>this.addEventToStateProperty(e,t,i,"eventQueue"),this.addReverseCalledEvent=(e,t,i=!1)=>{const{loop:a}=this.options;return a?this.addEventToStateProperty(e,t,i,"reverseCalledEvents"):this},this.addEventToStateProperty=(e,t,i=!1,a)=>{const o={eventName:e,eventArgs:t||{}};return this.state[a]=i?[o,...this.state[a]]:[...this.state[a],o],this},this.runEventLoop=()=>{this.state.lastFrameTime||(this.state.lastFrameTime=Date.now());const e=Date.now(),t=e-this.state.lastFrameTime;if(!this.state.eventQueue.length){if(!this.options.loop)return;this.state.eventQueue=[...this.state.calledEvents],this.state.calledEvents=[],this.options=Object.assign({},this.state.initialOptions)}if(this.state.eventLoop=window.requestAnimationFrame(this.runEventLoop),this.state.eventLoopPaused)return;if(this.state.pauseUntil){if(e<this.state.pauseUntil)return;this.state.pauseUntil=null}const i=[...this.state.eventQueue],a=i.shift();let o=0;if(o=a.eventName===le||a.eventName===ne?"natural"===this.options.deleteSpeed?ue(40,80):this.options.deleteSpeed:"natural"===this.options.delay?ue(120,160):this.options.delay,t<=o)return;const{eventName:n,eventArgs:s}=a;switch(n){case pe:case oe:{const{character:e}=s,t=document.createTextNode(e);let i=t;this.options.onCreateTextNode&&"function"==typeof this.options.onCreateTextNode&&(i=this.options.onCreateTextNode(e,t)),this.state.visibleNodes=[...this.state.visibleNodes,{type:he,character:e,node:i}];break}case ne:i.unshift({eventName:le,eventArgs:{removingCharacterNode:!0}});break;case re:{const{ms:e}=a.eventArgs;this.state.pauseUntil=Date.now()+parseInt(e);break}case se:{const{visibleNodes:e}=this.state,{speed:t}=s,a=[];t&&a.push({eventName:ce,eventArgs:{speed:t,temp:!0}});for(let t=0,i=e.length;t<i;t++)a.push({eventName:le,eventArgs:{removingCharacterNode:!1}});t&&a.push({eventName:ce,eventArgs:{speed:this.options.deleteSpeed,temp:!0}}),i.unshift(...a);break}case le:if(this.state.visibleNodes.length){const{node:e,character:t}=this.state.visibleNodes.pop();this.options.onRemoveNode&&"function"==typeof this.options.onRemoveNode&&this.options.onRemoveNode({node:e,character:t}),e&&e.parentNode.removeChild(e)}break;case ce:this.options.deleteSpeed=a.eventArgs.speed;break;case de:this.options.delay=a.eventArgs.delay}this.options.loop&&(a.eventName===le||a.eventArgs&&a.eventArgs.temp||(this.state.calledEvents=[...this.state.calledEvents,a])),this.state.eventQueue=i,this.state.lastFrameTime=e},e&&(this.options=Object.assign(Object.assign({},this.options),e)),this.state.initialOptions=Object.assign({},this.options),this.init()}init(){this.addEventToQueue(se,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}}function me({inputRef:e,wrapperRef:t,disabled:i}){const{t:a,locale:o}=c(),l=n((()=>{if(i)return[];const e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==o&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),w(e).map((e=>a(e)))}),[a,o]);function r(e){const t=p();return t&&(t.placeholder=t.placeholder+e),null}function d(){const e=p();e&&(e.placeholder=e.placeholder.slice(0,-1))}function p(){return e&&e.current?e.current:t&&t.current&&t.current.querySelector("input")||null}s((()=>{if(i)return;const e=p();e&&(e.placeholder="",new ge({strings:l,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:r,onRemoveNode:d}))}),[e,t])}const Ce=C.div`
127
+ `,oe=({cities:e,isLoading:t,onLocationClick:a,selectedLocation:o})=>{const{t:n,locale:s}=c();return i.createElement(X,{"data-testid":"location-search-results"},i.createElement(ee,null,t?i.createElement(ae,{count:5}):!e||e.length<1?i.createElement(i.Fragment,null,i.createElement(ie,{"data-is-denied":"true"},i.createElement(f,{size:"sm",color:"#ccc"},n("booking.searchBar.noResults")))):i.createElement(i.Fragment,null,i.createElement(ie,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;a&&a({name:n("booking.searchBar.allLocations"),id:p,slug:null===(e=u[s])||void 0===e?void 0:e.ALL})}},i.createElement(te,{color:v.colors.neutral400}),i.createElement(f,{size:"md"},n("booking.searchBar.allLocations"))),e.map((e=>i.createElement(ie,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),a&&a(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==o?void 0:o.id)===e.id},i.createElement(te,{color:v.colors.neutral400}),i.createElement(f,{size:"md"},e.name)))))))},ne="TYPE_CHARACTER",se="REMOVE_CHARACTER",le="REMOVE_ALL",re="REMOVE_LAST_VISIBLE_NODE",ce="PAUSE_FOR",de="CHANGE_DELETE_SPEED",pe="CHANGE_DELAY",ue="PASTE_STRING",he=(e,t)=>Math.floor(Math.random()*(t-e+1))+e,ge="TEXT_NODE";class me{constructor(e){this.state={lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null},this.options={strings:null,delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,stringSplitter:null,onCreateTextNode:null,onRemoveNode:null},this.start=()=>(this.state.eventLoopPaused=!1,this.runEventLoop(),this),this.pause=()=>(this.state.eventLoopPaused=!0,this),this.stop=()=>(this.state.eventLoop&&(window.cancelAnimationFrame(this.state.eventLoop),this.state.eventLoop=null),this),this.pauseFor=e=>(this.addEventToQueue(ce,{ms:e}),this),this.typeOutAllStrings=()=>"string"==typeof this.options.strings?(this.typeString(this.options.strings).pauseFor(this.options.pauseFor),this):(this.options.strings.forEach((e=>{this.typeString(e).pauseFor(this.options.pauseFor).deleteAll(this.options.deleteSpeed)})),this),this.typeString=(e,t=null)=>{if(e){const{stringSplitter:i}=this.options||{},a="function"==typeof i?i(e):e.split("");this.typeCharacters(a,t)}return this},this.pasteString=(e,t=null)=>(e&&this.addEventToQueue(ue,{character:e,node:t}),this),this.deleteAll=(e="natural")=>(this.addEventToQueue(le,{speed:e}),this),this.changeDeleteSpeed=e=>{if(!e)throw new Error("Must provide new delete speed");return this.addEventToQueue(de,{speed:e}),this},this.changeDelay=e=>{if(!e)throw new Error("Must provide new delay");return this.addEventToQueue(pe,{delay:e}),this},this.deleteChars=e=>{if(!e)throw new Error("Must provide amount of characters to delete");for(let t=0;t<e;t++)this.addEventToQueue(se);return this},this.typeCharacters=(e,t=null)=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((e=>{this.addEventToQueue(ne,{character:e,node:t})})),this},this.removeCharacters=e=>{if(!e||!Array.isArray(e))throw new Error("Characters must be an array");return e.forEach((()=>{this.addEventToQueue(se)})),this},this.addEventToQueue=(e,t,i=!1)=>this.addEventToStateProperty(e,t,i,"eventQueue"),this.addReverseCalledEvent=(e,t,i=!1)=>{const{loop:a}=this.options;return a?this.addEventToStateProperty(e,t,i,"reverseCalledEvents"):this},this.addEventToStateProperty=(e,t,i=!1,a)=>{const o={eventName:e,eventArgs:t||{}};return this.state[a]=i?[o,...this.state[a]]:[...this.state[a],o],this},this.runEventLoop=()=>{this.state.lastFrameTime||(this.state.lastFrameTime=Date.now());const e=Date.now(),t=e-this.state.lastFrameTime;if(!this.state.eventQueue.length){if(!this.options.loop)return;this.state.eventQueue=[...this.state.calledEvents],this.state.calledEvents=[],this.options=Object.assign({},this.state.initialOptions)}if(this.state.eventLoop=window.requestAnimationFrame(this.runEventLoop),this.state.eventLoopPaused)return;if(this.state.pauseUntil){if(e<this.state.pauseUntil)return;this.state.pauseUntil=null}const i=[...this.state.eventQueue],a=i.shift();let o=0;if(o=a.eventName===re||a.eventName===se?"natural"===this.options.deleteSpeed?he(40,80):this.options.deleteSpeed:"natural"===this.options.delay?he(120,160):this.options.delay,t<=o)return;const{eventName:n,eventArgs:s}=a;switch(n){case ue:case ne:{const{character:e}=s,t=document.createTextNode(e);let i=t;this.options.onCreateTextNode&&"function"==typeof this.options.onCreateTextNode&&(i=this.options.onCreateTextNode(e,t)),this.state.visibleNodes=[...this.state.visibleNodes,{type:ge,character:e,node:i}];break}case se:i.unshift({eventName:re,eventArgs:{removingCharacterNode:!0}});break;case ce:{const{ms:e}=a.eventArgs;this.state.pauseUntil=Date.now()+parseInt(e);break}case le:{const{visibleNodes:e}=this.state,{speed:t}=s,a=[];t&&a.push({eventName:de,eventArgs:{speed:t,temp:!0}});for(let t=0,i=e.length;t<i;t++)a.push({eventName:re,eventArgs:{removingCharacterNode:!1}});t&&a.push({eventName:de,eventArgs:{speed:this.options.deleteSpeed,temp:!0}}),i.unshift(...a);break}case re:if(this.state.visibleNodes.length){const{node:e,character:t}=this.state.visibleNodes.pop();this.options.onRemoveNode&&"function"==typeof this.options.onRemoveNode&&this.options.onRemoveNode({node:e,character:t}),e&&e.parentNode.removeChild(e)}break;case de:this.options.deleteSpeed=a.eventArgs.speed;break;case pe:this.options.delay=a.eventArgs.delay}this.options.loop&&(a.eventName===re||a.eventArgs&&a.eventArgs.temp||(this.state.calledEvents=[...this.state.calledEvents,a])),this.state.eventQueue=i,this.state.lastFrameTime=e},e&&(this.options=Object.assign(Object.assign({},this.options),e)),this.state.initialOptions=Object.assign({},this.options),this.init()}init(){this.addEventToQueue(le,null,!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}}function Ce({inputRef:e,wrapperRef:t,disabled:i}){const{t:a,locale:o}=c(),l=n((()=>{if(i)return[];const e=["booking.searchBar.placeholder.hospital","booking.searchBar.placeholder.doctor"];return"zh-TW"!==o&&e.push("booking.searchBar.placeholder.specialty","booking.searchBar.placeholder.service"),E(e).map((e=>a(e)))}),[a,o]);function r(e){const t=p();return t&&(t.placeholder=t.placeholder+e),null}function d(){const e=p();e&&(e.placeholder=e.placeholder.slice(0,-1))}function p(){return e&&e.current?e.current:t&&t.current&&t.current.querySelector("input")||null}s((()=>{if(i)return;const e=p();e&&(e.placeholder="",new me({strings:l,autoStart:!0,loop:!0,delay:32,deleteSpeed:32,pauseFor:1500,onCreateTextNode:r,onRemoveNode:d}))}),[e,t])}const be=b.div`
128
128
  user-select: none;
129
129
  input {
130
130
  pointer-events: none;
131
131
  background-color: white;
132
132
  }
133
- `;function be({focused:e,value:t="",onClick:a,trackingAttributes:o,inputSearchPlaceholder:s}){const{t:r}=c(),d=l(null);me({wrapperRef:d,disabled:!!s});const p=n((()=>o?{"data-event-category":o.dataEventCategory,"data-event-action":o.dataEventAction,"data-event-label":o.dataEventLabel}:{}),[o]);return i.createElement(Ce,Object.assign({onClick:()=>a&&a(),ref:d},p),i.createElement(G,{inputClassName:"location"===e?"focused":void 0,name:"booking-search-placeholder",displayIcon:i.createElement(W,{color:f.colors.gray400}),placeholder:r("booking.searchBar.searchInput.placeholder"),value:t,size:"md"}))}const ye=C.header`
133
+ `;function ye({focused:e,value:t="",onClick:a,trackingAttributes:o,inputSearchPlaceholder:s}){const{t:r}=c(),d=l(null);Ce({wrapperRef:d,disabled:!!s});const p=n((()=>o?{"data-event-category":o.dataEventCategory,"data-event-action":o.dataEventAction,"data-event-label":o.dataEventLabel}:{}),[o]);return i.createElement(be,Object.assign({onClick:()=>a&&a(),ref:d},p),i.createElement(Z,{inputClassName:"location"===e?"focused":void 0,name:"booking-search-placeholder",displayIcon:i.createElement(Q,{color:v.colors.gray400}),placeholder:r("booking.searchBar.searchInput.placeholder"),value:t,size:"md"}))}const fe=b.header`
134
134
  display: flex;
135
135
  height: 64px;
136
136
  align-items: center;
@@ -141,30 +141,30 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
141
141
  background-color: white;
142
142
  top: 0;
143
143
  left: 0;
144
- `,fe=C.div`
144
+ `,ve=b.div`
145
145
  display: inline-flex;
146
146
  flex: 1;
147
147
  justify-content: flex-end;
148
148
  cursor: pointer;
149
149
  text-decoration: underline;
150
- `,ve=C.div`
150
+ `,xe=b.div`
151
151
  display: flex;
152
152
  align-items: center;
153
153
  margin-left: 16px;
154
154
  cursor: pointer;
155
- `,xe=C.div`
155
+ `,we=b.div`
156
156
  width: 100%;
157
157
  margin-left: 24px;
158
- `,we=C(y)`
159
- color: ${f.colors.secondaryDark};
158
+ `,Ee=b(f)`
159
+ color: ${v.colors.secondaryDark};
160
160
  text-align: start;
161
- `,Ee=({className:e,onLeftClick:t,headingText:a,onRightClick:o,iconLeft:n,textRight:s})=>i.createElement(ye,{className:e},i.createElement(ve,{onClick:t},n||i.createElement(Y,{color:f.colors.gray800})),i.createElement(xe,null,i.createElement(we,{size:"md",type:"bold"},a)),i.createElement(fe,{onClick:o},s&&i.createElement("p",null,s))),Se={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2},Le={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",searchLocationKeywords:"",searchKeywords:"",selectedLocation:null,defaultCity:null,initialCities:[],cities:[],searchResults:[],initialSearchResults:[],isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN"};var ke;function Oe(e){const{selectedLocation:t,searchLocationKeywords:i}=e;return t&&i!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function je(e,t){var i;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case ke.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case ke.ClickOutsideInputLocation:return e.isMobile||"location"!==e.focused?e:Oe(Object.assign(Object.assign({},e),{focused:"none"}));case ke.ClickOutsideInputSearch:return e.isMobile||"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case ke.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(i=e.selectedLocation)||void 0===i?void 0:i.id)===h&&(t.searchLocationKeywords=""),t}case ke.FocusInputSearch:const a=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?Oe(a):a;case ke.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case ke.ChangeInputSearch:{const i=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:i,isLoadingSearchResults:i.trim().length>Se[e.locale]})}case ke.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case ke.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case ke.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case ke.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case ke.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case ke.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case ke.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case ke.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case ke.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case ke.FetchSearchResultsComplete:{const i=Object.assign(Object.assign({},e),{searchResults:t.payload});return 0===e.initialSearchResults.length&&(i.initialSearchResults=t.payload),i}case ke.FetchCitiesByGeoIpComplete:{let{cities:i}=t.payload;const{default:a}=t.payload;i=i.filter((e=>e.id!==a.id)),i.unshift(a),e.initialSelectedCity&&!i.find((t=>t.id===e.initialSelectedCity.id))&&i.unshift(e.initialSelectedCity);const o=Object.assign(Object.assign({},e),{defaultCity:a,initialCities:i,cities:i});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(o.selectedLocation=a,o.searchLocationKeywords=a.name),o}case ke.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case ke.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case ke.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case ke.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case ke.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case ke.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case ke.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case ke.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case ke.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});default:return e}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder"}(ke||(ke={}));const Ie=C.div`
161
+ `,Se=({className:e,onLeftClick:t,headingText:a,onRightClick:o,iconLeft:n,textRight:s})=>i.createElement(fe,{className:e},i.createElement(xe,{onClick:t},n||i.createElement(U,{color:v.colors.gray800})),i.createElement(we,null,i.createElement(Ee,{size:"md",type:"bold"},a)),i.createElement(ve,{onClick:o},s&&i.createElement("p",null,s))),Le={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2},ke={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",searchLocationKeywords:"",searchKeywords:"",selectedLocation:null,defaultCity:null,initialCities:[],cities:[],searchResults:[],initialSearchResults:[],isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN"};var Oe;function je(e){const{selectedLocation:t,searchLocationKeywords:i}=e;return t&&i!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function Ie(e,t){var i;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case Oe.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case Oe.ClickOutsideInputLocation:return e.isMobile||"location"!==e.focused?e:je(Object.assign(Object.assign({},e),{focused:"none"}));case Oe.ClickOutsideInputSearch:return e.isMobile||"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case Oe.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(i=e.selectedLocation)||void 0===i?void 0:i.id)===h&&(t.searchLocationKeywords=""),t}case Oe.FocusInputSearch:const a=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?je(a):a;case Oe.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case Oe.ChangeInputSearch:{const i=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:i,isLoadingSearchResults:i.trim().length>Le[e.locale]})}case Oe.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case Oe.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case Oe.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case Oe.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case Oe.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case Oe.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case Oe.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case Oe.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case Oe.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case Oe.FetchSearchResultsComplete:{const i=Object.assign(Object.assign({},e),{searchResults:t.payload});return 0===e.initialSearchResults.length&&(i.initialSearchResults=t.payload),i}case Oe.FetchCitiesByGeoIpComplete:{let{cities:i}=t.payload;const{default:a}=t.payload;i=i.filter((e=>e.id!==a.id)),i.unshift(a),e.initialSelectedCity&&!i.find((t=>t.id===e.initialSelectedCity.id))&&i.unshift(e.initialSelectedCity);const o=Object.assign(Object.assign({},e),{defaultCity:a,initialCities:i,cities:i});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(o.selectedLocation=a,o.searchLocationKeywords=a.name),o}case Oe.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case Oe.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case Oe.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case Oe.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case Oe.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case Oe.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case Oe.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case Oe.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case Oe.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});default:return e}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder"}(Oe||(Oe={}));const Fe=b.div`
162
162
  display: flex;
163
163
  gap: 16px;
164
- ${v.mbDown} {
164
+ ${x.mbDown} {
165
165
  flex-direction: column;
166
166
  padding: 14px;
167
- background-color: ${f.colors.primary50};
167
+ background-color: ${v.colors.primary50};
168
168
 
169
169
  input {
170
170
  filter: drop-shadow(0px 4px 8px rgba(0, 0, 0, 0.04))
@@ -176,18 +176,18 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
176
176
  input {
177
177
  background-color: white;
178
178
  }
179
- `,Fe=C.div`
179
+ `,$e=b.div`
180
180
  position: relative;
181
- `,Me=C(Fe)`
181
+ `,Me=b($e)`
182
182
  flex: 1;
183
- `,$e=C(Fe)`
183
+ `,Re=b($e)`
184
184
  flex: 2;
185
- `,Re=C((({className:e,color:t})=>i.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"8",fill:"white"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z",fill:t||"currentColor"}))))`
185
+ `,Te=b((({className:e,color:t})=>i.createElement("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("rect",{x:"4",y:"4",width:"16",height:"16",rx:"8",fill:"white"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z",fill:t||"currentColor"}))))`
186
186
  display: none;
187
187
  &.shown {
188
188
  display: block;
189
189
  }
190
- `,Te=()=>i.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.97887 8.15493C2.97887 5.29627 5.29627 2.97887 8.15493 2.97887C11.0136 2.97887 13.331 5.29627 13.331 8.15493C13.331 11.0136 11.0136 13.331 8.15493 13.331C5.29627 13.331 2.97887 11.0136 2.97887 8.15493ZM8.15493 1.5C4.47951 1.5 1.5 4.47951 1.5 8.15493C1.5 11.8303 4.47951 14.8099 8.15493 14.8099C9.72624 14.8099 11.1704 14.2653 12.3089 13.3546L15.2377 16.2834C15.5265 16.5722 15.9947 16.5722 16.2834 16.2834C16.5722 15.9947 16.5722 15.5265 16.2834 15.2377L13.3546 12.3089C14.2653 11.1704 14.8099 9.72624 14.8099 8.15493C14.8099 4.47951 11.8303 1.5 8.15493 1.5Z",fill:"white"})),Pe=C.button`
190
+ `,Pe=()=>i.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.97887 8.15493C2.97887 5.29627 5.29627 2.97887 8.15493 2.97887C11.0136 2.97887 13.331 5.29627 13.331 8.15493C13.331 11.0136 11.0136 13.331 8.15493 13.331C5.29627 13.331 2.97887 11.0136 2.97887 8.15493ZM8.15493 1.5C4.47951 1.5 1.5 4.47951 1.5 8.15493C1.5 11.8303 4.47951 14.8099 8.15493 14.8099C9.72624 14.8099 11.1704 14.2653 12.3089 13.3546L15.2377 16.2834C15.5265 16.5722 15.9947 16.5722 16.2834 16.2834C16.5722 15.9947 16.5722 15.5265 16.2834 15.2377L13.3546 12.3089C14.2653 11.1704 14.8099 9.72624 14.8099 8.15493C14.8099 4.47951 11.8303 1.5 8.15493 1.5Z",fill:"white"})),Ae=b.button`
191
191
  min-height: 100%;
192
192
  border-radius: 6px;
193
193
  background-color: ${({theme:e})=>e.colors.primaryBase};
@@ -198,7 +198,7 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
198
198
  cursor: pointer;
199
199
  flex: 0.3;
200
200
 
201
- ${v.mbDown} {
201
+ ${x.mbDown} {
202
202
  --margin: 16px;
203
203
  min-height: 44px;
204
204
  margin: var(--margin);
@@ -218,41 +218,41 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
218
218
  &:focus-visible {
219
219
  outline: 1px solid black;
220
220
  }
221
- `,Ae=C(y)`
221
+ `,Ne=b(f)`
222
222
  font-weight: ${({theme:e})=>e.sizes.fwSemiBold};
223
- `,Ne=({onClick:e})=>{const{t:t}=c(),a=t("booking.searchBar.searchButton");return i.createElement(Pe,{onClick:e,title:a},i.createElement(Te,null),i.createElement(Ae,{size:"s3",color:"white"},a))};function Be({isMobile:e,state:t,dispatch:a,debouncedFetchCitiesByKeyword:s,debouncedFetchSearchResults:r,focusLocationInput:d,focusSearchInput:p,renderLocationResults:u,renderSearchResults:g,locationTrackingAttributes:m,trackingAttributes:C,onSearch:b,initalSearchValue:y}){const v=l(null),x=l(null),{focused:w,searchLocationKeywords:S,geoLocationPermission:L,selectedLocation:k,searchKeywords:O,inputSearchPlaceholder:j}=t,{t:I}=c();me({wrapperRef:x,disabled:!!j}),E(v,(()=>{e||a({type:ke.ClickOutsideInputLocation})})),E(x,(()=>{e||a({type:ke.ClickOutsideInputSearch})}));const F=n((()=>"granted"===L&&(null==k?void 0:k.id)===h?f.colors.primaryBase:f.colors.gray400),[L,k]),M=o((function(e){a({type:ke.ChangeInputSearch,payload:e}),"function"!=typeof b&&(e.trim().length>Se[t.locale]||y?r(e.trim(),t):(r.cancel(),a({type:ke.DisplayInitialSearchResults})))}),[a,t]),$=o((function(e){a({type:ke.ChangeInputLocation,payload:e}),e.trim().length>Se[t.locale]?s(e.trim()):(s.cancel(),a({type:ke.DisplayInitialCities}))}),[s,a]);return i.createElement(Ie,null,i.createElement(Me,{ref:v},i.createElement(G,{inputClassName:"location"===w?"focused":void 0,placeholder:I("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:i.createElement(U,{className:"location-pin-icon",color:F}),actionIcon:i.createElement(Re,{color:f.colors.gray300,className:""!==S?"shown":""}),onActionClick:function(){a({type:ke.ClearInputLocation}),s.cancel(),d()},value:S,onChange:$,onFocus:()=>a({type:ke.FocusInputLocation}),size:"md",trackingAttributes:m}),!e&&u()),i.createElement($e,{ref:x},i.createElement(G,{placeholder:j||I("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:i.createElement(Re,{color:f.colors.gray300,className:""!==O?"shown":""}),onActionClick:function(){a({type:ke.ClearInputSearch}),r.cancel(),r("",t),p()},value:O,onChange:M,onFocus:()=>a({type:ke.FocusInputSearch}),inputClassName:"search"===w?"focused":void 0,size:"md",trackingAttributes:C,onKeyPress:e=>{t.autoCompleteDisabled&&"Enter"===e.key&&b&&b({cityId:t.selectedLocation.id,keyword:O})},enterKeyHint:t.autoCompleteDisabled?"search":void 0}),!e&&g()),t.autoCompleteDisabled&&!t.isMobile&&i.createElement(Ne,{onClick:()=>{b({cityId:t.selectedLocation.id,keyword:O})}}))}const Ve=()=>i.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},i.createElement("path",{d:"M7.00004 0.666992C5.29757 0.666992 3.64067 0.813476 2.52087 1.03158C1.73311 1.18457 1.16671 1.86816 1.16671 2.6722V4.83366C1.16671 5.29264 1.54106 5.66699 2.00004 5.66699H12C12.459 5.66699 12.8334 5.29264 12.8334 4.83366V2.69824C12.8334 1.89421 12.267 1.21061 11.4792 1.05762C10.3562 0.839518 8.69275 0.666992 7.00004 0.666992ZM6.16671 1.50033H7.83337V2.33366H8.66671V4.00033H7.83337V4.83366H6.16671V4.00033H5.33337V2.33366H6.16671V1.50033ZM1.42712 6.50033C1.3197 6.89421 1.24158 7.32389 1.19275 7.77637C1.14718 8.18001 1.05603 9.25423 1.06254 9.36491C0.603556 9.72624 0.333374 10.2861 0.333374 10.9014C0.333374 11.8356 0.977906 12.6364 1.84379 12.8285C2.74548 15.0192 4.55212 17.3337 7.00004 17.3337C9.44796 17.3337 11.2546 14.9964 12.1563 12.8024C13.0222 12.6136 13.6667 11.8356 13.6667 10.9014C13.6667 10.2861 13.3965 9.72624 12.9375 9.36491C12.9441 9.25423 12.8562 8.16048 12.8073 7.75033C12.7552 7.30436 12.6804 6.89095 12.573 6.50033H5.35942C6.52804 8.20606 9.27543 7.18717 11.0365 7.62012C11.5736 8.79199 11.1667 10.4326 11.1667 10.4326L11.8177 10.641C11.9121 10.6702 12 10.7549 12 10.9014C12 11.0576 11.8861 11.1943 11.6875 11.1878L11.0105 11.0837L10.7761 11.7347C9.96554 14.0492 8.4128 15.667 7.00004 15.667C5.58728 15.667 4.03455 14.0492 3.224 11.7347L2.96358 11.0837L2.26046 11.1878C2.11723 11.1878 2.00004 11.0576 2.00004 10.9014C2.00004 10.7549 2.08793 10.6702 2.18233 10.641L2.83337 10.4326C2.73246 10.5531 2.4102 8.7041 2.83337 8.03678C3.59184 7.5127 4.2266 7.87728 5.12504 6.50033H1.42712ZM5.17712 9.05241C4.57166 9.05241 4.08337 9.55371 4.08337 10.1722C4.08337 10.7907 4.57166 11.292 5.17712 11.292C5.78259 11.292 6.27087 10.7907 6.27087 10.1722C6.27087 9.55371 5.78259 9.05241 5.17712 9.05241ZM8.82296 9.05241C8.21749 9.05241 7.72921 9.55371 7.72921 10.1722C7.72921 10.7907 8.21749 11.292 8.82296 11.292C9.42843 11.292 9.91671 10.7907 9.91671 10.1722C9.91671 9.55371 9.42843 9.05241 8.82296 9.05241Z",fill:"#9AA2AC"})),De=()=>i.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},i.createElement("path",{d:"M8.99996 0.666992C6.27535 0.666992 3.85348 1.97884 2.33329 4.00033H4.59892C5.80009 2.94564 7.36259 2.33366 8.99996 2.33366C10.6373 2.33366 12.1998 2.94564 13.401 4.00033H15.6666C14.1464 1.97884 11.7246 0.666992 8.99996 0.666992ZM1.78642 4.83366C1.07678 7.04069 0.666626 9.59928 0.666626 12.3337C0.666626 14.085 0.826131 15.7679 1.13538 17.3337H16.8645C17.1738 15.7679 17.3333 14.085 17.3333 12.3337C17.3333 9.59928 16.9231 7.04069 16.2135 4.83366H1.78642ZM8.99996 7.33366C11.3014 7.33366 13.1666 9.19889 13.1666 11.5003C13.1666 13.8018 11.3014 15.667 8.99996 15.667C6.69853 15.667 4.83329 13.8018 4.83329 11.5003C4.83329 9.19889 6.69853 7.33366 8.99996 7.33366ZM8.16663 9.00033V10.667H6.49996V12.3337H8.16663V14.0003H9.83329V12.3337H11.5V10.667H9.83329V9.00033H8.16663Z",fill:"#9AA2AC"})),Ke=()=>i.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},i.createElement("path",{d:"M8 0.666992L0.5 5.63533V14.8337C0.5 15.7545 1.24583 16.5003 2.16667 16.5003H13.8333C14.7542 16.5003 15.5 15.7545 15.5 14.8337V5.63533L8 0.666992ZM11.3333 10.667H8.83333V13.167H7.16667V10.667H4.66667V9.00033H7.16667V6.50033H8.83333V9.00033H11.3333V10.667Z",fill:"#9AA2AC"})),ze=()=>i.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},i.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),_e=C.header`
223
+ `,Be=({onClick:e})=>{const{t:t}=c(),a=t("booking.searchBar.searchButton");return i.createElement(Ae,{onClick:e,title:a},i.createElement(Pe,null),i.createElement(Ne,{size:"s3",color:"white"},a))};function Ve({isMobile:e,state:t,dispatch:a,debouncedFetchCitiesByKeyword:s,debouncedFetchSearchResults:r,focusLocationInput:d,focusSearchInput:p,renderLocationResults:u,renderSearchResults:g,locationTrackingAttributes:m,trackingAttributes:C,onSearch:b,initalSearchValue:y}){const f=l(null),x=l(null),{focused:w,searchLocationKeywords:E,geoLocationPermission:L,selectedLocation:k,searchKeywords:O,inputSearchPlaceholder:j}=t,{t:I}=c();Ce({wrapperRef:x,disabled:!!j}),S(f,(()=>{e||a({type:Oe.ClickOutsideInputLocation})})),S(x,(()=>{e||a({type:Oe.ClickOutsideInputSearch})}));const F=n((()=>"granted"===L&&(null==k?void 0:k.id)===h?v.colors.primaryBase:v.colors.gray400),[L,k]),$=o((function(e){a({type:Oe.ChangeInputSearch,payload:e}),"function"!=typeof b&&(e.trim().length>Le[t.locale]||y?r(e.trim(),t):(r.cancel(),a({type:Oe.DisplayInitialSearchResults})))}),[a,t]),M=o((function(e){a({type:Oe.ChangeInputLocation,payload:e}),e.trim().length>Le[t.locale]?s(e.trim()):(s.cancel(),a({type:Oe.DisplayInitialCities}))}),[s,a]);return i.createElement(Fe,null,i.createElement(Me,{ref:f},i.createElement(Z,{inputClassName:"location"===w?"focused":void 0,placeholder:I("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:i.createElement(W,{className:"location-pin-icon",color:F}),actionIcon:i.createElement(Te,{color:v.colors.gray300,className:""!==E?"shown":""}),onActionClick:function(){a({type:Oe.ClearInputLocation}),s.cancel(),d()},value:E,onChange:M,onFocus:()=>a({type:Oe.FocusInputLocation}),size:"md",trackingAttributes:m}),!e&&u()),i.createElement(Re,{ref:x},i.createElement(Z,{placeholder:j||I("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:i.createElement(Te,{color:v.colors.gray300,className:""!==O?"shown":""}),onActionClick:function(){a({type:Oe.ClearInputSearch}),r.cancel(),r("",t),p()},value:O,onChange:$,onFocus:()=>a({type:Oe.FocusInputSearch}),inputClassName:"search"===w?"focused":void 0,size:"md",trackingAttributes:C,onKeyPress:e=>{t.autoCompleteDisabled&&"Enter"===e.key&&b&&b({cityId:t.selectedLocation.id,keyword:O})},enterKeyHint:t.autoCompleteDisabled?"search":void 0}),!e&&g()),t.autoCompleteDisabled&&!t.isMobile&&i.createElement(Be,{onClick:()=>{b({cityId:t.selectedLocation.id,keyword:O})}}))}const De=()=>i.createElement("svg",{width:"14",height:"18",viewBox:"0 0 14 18"},i.createElement("path",{d:"M7.00004 0.666992C5.29757 0.666992 3.64067 0.813476 2.52087 1.03158C1.73311 1.18457 1.16671 1.86816 1.16671 2.6722V4.83366C1.16671 5.29264 1.54106 5.66699 2.00004 5.66699H12C12.459 5.66699 12.8334 5.29264 12.8334 4.83366V2.69824C12.8334 1.89421 12.267 1.21061 11.4792 1.05762C10.3562 0.839518 8.69275 0.666992 7.00004 0.666992ZM6.16671 1.50033H7.83337V2.33366H8.66671V4.00033H7.83337V4.83366H6.16671V4.00033H5.33337V2.33366H6.16671V1.50033ZM1.42712 6.50033C1.3197 6.89421 1.24158 7.32389 1.19275 7.77637C1.14718 8.18001 1.05603 9.25423 1.06254 9.36491C0.603556 9.72624 0.333374 10.2861 0.333374 10.9014C0.333374 11.8356 0.977906 12.6364 1.84379 12.8285C2.74548 15.0192 4.55212 17.3337 7.00004 17.3337C9.44796 17.3337 11.2546 14.9964 12.1563 12.8024C13.0222 12.6136 13.6667 11.8356 13.6667 10.9014C13.6667 10.2861 13.3965 9.72624 12.9375 9.36491C12.9441 9.25423 12.8562 8.16048 12.8073 7.75033C12.7552 7.30436 12.6804 6.89095 12.573 6.50033H5.35942C6.52804 8.20606 9.27543 7.18717 11.0365 7.62012C11.5736 8.79199 11.1667 10.4326 11.1667 10.4326L11.8177 10.641C11.9121 10.6702 12 10.7549 12 10.9014C12 11.0576 11.8861 11.1943 11.6875 11.1878L11.0105 11.0837L10.7761 11.7347C9.96554 14.0492 8.4128 15.667 7.00004 15.667C5.58728 15.667 4.03455 14.0492 3.224 11.7347L2.96358 11.0837L2.26046 11.1878C2.11723 11.1878 2.00004 11.0576 2.00004 10.9014C2.00004 10.7549 2.08793 10.6702 2.18233 10.641L2.83337 10.4326C2.73246 10.5531 2.4102 8.7041 2.83337 8.03678C3.59184 7.5127 4.2266 7.87728 5.12504 6.50033H1.42712ZM5.17712 9.05241C4.57166 9.05241 4.08337 9.55371 4.08337 10.1722C4.08337 10.7907 4.57166 11.292 5.17712 11.292C5.78259 11.292 6.27087 10.7907 6.27087 10.1722C6.27087 9.55371 5.78259 9.05241 5.17712 9.05241ZM8.82296 9.05241C8.21749 9.05241 7.72921 9.55371 7.72921 10.1722C7.72921 10.7907 8.21749 11.292 8.82296 11.292C9.42843 11.292 9.91671 10.7907 9.91671 10.1722C9.91671 9.55371 9.42843 9.05241 8.82296 9.05241Z",fill:"#9AA2AC"})),Ke=()=>i.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18"},i.createElement("path",{d:"M8.99996 0.666992C6.27535 0.666992 3.85348 1.97884 2.33329 4.00033H4.59892C5.80009 2.94564 7.36259 2.33366 8.99996 2.33366C10.6373 2.33366 12.1998 2.94564 13.401 4.00033H15.6666C14.1464 1.97884 11.7246 0.666992 8.99996 0.666992ZM1.78642 4.83366C1.07678 7.04069 0.666626 9.59928 0.666626 12.3337C0.666626 14.085 0.826131 15.7679 1.13538 17.3337H16.8645C17.1738 15.7679 17.3333 14.085 17.3333 12.3337C17.3333 9.59928 16.9231 7.04069 16.2135 4.83366H1.78642ZM8.99996 7.33366C11.3014 7.33366 13.1666 9.19889 13.1666 11.5003C13.1666 13.8018 11.3014 15.667 8.99996 15.667C6.69853 15.667 4.83329 13.8018 4.83329 11.5003C4.83329 9.19889 6.69853 7.33366 8.99996 7.33366ZM8.16663 9.00033V10.667H6.49996V12.3337H8.16663V14.0003H9.83329V12.3337H11.5V10.667H9.83329V9.00033H8.16663Z",fill:"#9AA2AC"})),ze=()=>i.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17"},i.createElement("path",{d:"M8 0.666992L0.5 5.63533V14.8337C0.5 15.7545 1.24583 16.5003 2.16667 16.5003H13.8333C14.7542 16.5003 15.5 15.7545 15.5 14.8337V5.63533L8 0.666992ZM11.3333 10.667H8.83333V13.167H7.16667V10.667H4.66667V9.00033H7.16667V6.50033H8.83333V9.00033H11.3333V10.667Z",fill:"#9AA2AC"})),_e=()=>i.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},i.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),He=b.header`
224
224
  display: flex;
225
225
  justify-content: space-between;
226
226
  padding: 12px 24px;
227
- background-color: ${f.colors.neutral50};
227
+ background-color: ${v.colors.neutral50};
228
228
  box-shadow: inset 0px 1px 0px #e4e8ec;
229
- `,He=C.div`
229
+ `,Ge=b.div`
230
230
  display: grid;
231
231
  flex: 2;
232
232
  align-items: center;
233
233
  gap: 16px;
234
234
  grid-template-columns: 16px 1fr;
235
- `,Ge=C.p`
236
- color: ${f.colors.neutral800};
235
+ `,Ze=b.p`
236
+ color: ${v.colors.neutral800};
237
237
  font-size: 14px;
238
- font-weight: ${f.sizes.fwSemiBold};
238
+ font-weight: ${v.sizes.fwSemiBold};
239
239
  letter-spacing: -0.2px;
240
240
  line-height: 22px;
241
- `,Ze=C.button`
241
+ `,Ye=b.button`
242
242
  flex: 1;
243
243
  cursor: pointer;
244
244
  text-align: end;
245
- `,Ye=C.section`
245
+ `,Ue=b.section`
246
246
  padding: 12px 16px;
247
247
  --rowGap: 16px;
248
248
  --graphicSize: 32px;
249
249
 
250
- ${v.tdUp} {
250
+ ${x.tdUp} {
251
251
  --rowGap: 8px;
252
252
  }
253
- `,Ue=C.ul`
253
+ `,We=b.ul`
254
254
  --gap: 16px;
255
- ${v.tdUp} {
255
+ ${x.tdUp} {
256
256
  --gap: 8px;
257
257
  }
258
258
 
@@ -269,16 +269,16 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
269
269
  transition: none;
270
270
  }
271
271
 
272
- ${v.tdUp} {
272
+ ${x.tdUp} {
273
273
  grid-template-columns: 1fr 1fr;
274
274
  } ;
275
- `,We=C(y)`
275
+ `,Qe=b(f)`
276
276
  margin-top: 12px;
277
277
  margin-bottom: 8px;
278
278
  cursor: pointer;
279
279
  text-align: start;
280
280
  text-transform: capitalize;
281
- `,Qe=C.li`
281
+ `,qe=b.li`
282
282
  display: flex;
283
283
  align-items: center;
284
284
  gap: var(--rowGap);
@@ -286,7 +286,7 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
286
286
  &.not-nav {
287
287
  cursor: default;
288
288
  }
289
- `,qe=C.div`
289
+ `,Je=b.div`
290
290
  --wrapper-size: var(--graphicSize);
291
291
  border-radius: calc(var(--wrapper-size) / 2);
292
292
  background-color: var(--neutral50);
@@ -304,85 +304,85 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
304
304
  }
305
305
 
306
306
  &:focus-visible {
307
- outline: 1px solid ${f.colors.gray600};
307
+ outline: 1px solid ${v.colors.gray600};
308
308
  }
309
- `,Je=C(y)`
309
+ `,Xe=b(f)`
310
310
  line-height: 22px;
311
311
  letter-spacing: -0.2px;
312
312
 
313
- ${v.tdUp} {
313
+ ${x.tdUp} {
314
314
  &[data-size='p3'] {
315
315
  font-size: 14px;
316
316
  }
317
317
  }
318
- `,Xe=C.figure`
318
+ `,et=b.figure`
319
319
  max-width: var(--graphicSize);
320
320
  min-width: var(--graphicSize);
321
- `,et=C.svg`
321
+ `,tt=b.svg`
322
322
  margin: 0 auto;
323
323
  display: block;
324
- `,tt=C.div`
324
+ `,it=b.div`
325
325
  display: grid;
326
326
  place-items: center;
327
- `,it={doctors:({width:e,height:t})=>i.createElement("svg",{width:e||32,height:t||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{clipPath:"url(#clip0_14712_400114)"},i.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),i.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),i.createElement("defs",null,i.createElement("clipPath",{id:"clip0_14712_400114"},i.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),services:({width:e,height:t})=>i.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),i.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))},at=({type:e,item:t,imageUrl:a,className:o,onClickItem:s})=>{const l=n((()=>{const t=it[e]||Q;return i.createElement(t,{width:32,height:"services"===e?32:24})}),[e]);return i.createElement(Qe,{onClick:()=>s&&s(t),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||s&&s(t)},tabIndex:0,role:"button",className:o},i.createElement(Xe,null,"hospitals"===e?i.createElement(et,{width:"12",height:"16",viewBox:"0 0 12 16"},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):i.createElement(qe,{type:e},a?i.createElement("img",{src:a,width:32,height:"services"===e?32:24,loading:"lazy"}):l)),i.createElement(Je,{color:f.colors.gray800,size:"p3"},t.name))},ot=({type:e,data:t,state:o,dispatch:s,itemsToShow:l,itemsToShowDesktop:r,isMobile:d,isLoading:p,keyword:h,isNavResultItem:g})=>{const[m,C]=a(!1),{t:b,locale:v}=c(),{selectedLocation:w,searchKeywords:E}=o,S=n((()=>u[v]),[v]),L="ms-MY"===v,k=n((()=>({doctors:{name:b("booking.searchPopup.doctors"),icon:i.createElement(Ve,null),slug:S.DOCTOR},services:{name:b("booking.searchPopup.services"),icon:i.createElement(De,null),slug:S.SERVICE},hospitals:{name:b("booking.searchPopup.hospitals"),icon:i.createElement(Ke,null),slug:S.HOSPITAL},specialties:{name:b("booking.searchPopup.specialties"),icon:i.createElement(ze,null),slug:S.SPECIALTIES}})),[e,S]),O=n((()=>k[e].slug),[k]),j=d?l:r;function I(t){let i="";switch(e){case"specialties":i=`/${w.slug}/${k.doctors.slug}/${t.slug}`;break;case"services":i=`/${w.slug}/${O}/${t.slug}`;break;case"doctors":case"hospitals":i=`/${O}/${t.slug}-${t.id}`}i&&s({type:ke.SelectSearchResult,payload:{name:t.name,url:i}})}function F(t){return i.createElement(at,{key:t.id,item:t,type:e,imageUrl:t.logo||t.avatar||t.thumbnail,className:g?"":"not-nav",onClickItem:g&&I})}return i.createElement("section",null,i.createElement(_e,null,i.createElement(He,null,k[e].icon,i.createElement(Ge,null,k[e].name)),(h.trim().length<=Se[v]||L)&&i.createElement(Ze,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${w.slug}/${O}`}t&&s({type:ke.NavigateTo,payload:t})}},i.createElement(y,{size:"p3",color:f.colors.primaryBase},b("booking.searchPopup.seeAll")))),(p||t&&t.length>0)&&i.createElement(Ye,null,i.createElement(Ue,null,p&&Array(2).fill(void 0).map(((t,a)=>i.createElement(Qe,{key:e+"loading"+a},i.createElement(Xe,null,i.createElement(tt,null,i.createElement(x,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),i.createElement(x,{width:120,height:24})))),!p&&t&&t.length>0&&t.slice(0,j).map(F)),i.createElement(Ue,{isShown:m,isMore:!0},t.slice(j,-1).map(F)),"specialties"===e&&j<t.length&&!p&&i.createElement("button",{onClick:()=>C(!m)},i.createElement(We,{size:"p3",color:f.colors.primaryBase},b(m?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(j<t.length||L)&&!p&&h.trim().length>Se[v]&&i.createElement("button",{onClick:function(){const{slug:t}=k[e],i=`/${w.slug}/${t}?q=${E}`;s({type:ke.NavigateTo,payload:i})}},i.createElement(We,{size:"p3",color:f.colors.primaryBase},b(`booking.searchPopup.searchIn.${e}`,{name:h})))),!p&&0===(null==t?void 0:t.length)&&i.createElement(Ye,null,i.createElement(y,{size:"sm",color:f.colors.gray400},b("booking.searchBar.noResults"))))},nt=C.section`
327
+ `,at={doctors:({width:e,height:t})=>i.createElement("svg",{width:e||32,height:t||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{clipPath:"url(#clip0_14712_400114)"},i.createElement("rect",{width:"32",height:"32",rx:"16",fill:"#E4E8EC"}),i.createElement("path",{d:"M22.065 9.58305C22.1108 9.80952 22.1431 10.0396 22.1614 10.2722C22.3769 13.0522 22.5858 16.1276 22.5727 17.618C22.5306 20.5688 19.708 21.1325 19.4564 21.1769L19.4495 21.5357L19.5228 23.9014C20.8688 23.9341 22.203 24.1759 23.4772 24.6196C24.5264 24.9739 25.4827 25.5591 26.2757 26.332C27.0688 27.105 27.6783 28.0461 28.0594 29.0858L31.9886 39.2068C31.91 39.3048 30.6939 39.6356 29.4888 39.944C30.1695 42.3315 30.4582 44.8142 30.3432 47.2953C30.2991 48.2666 30.1816 49.264 29.7245 50.1211C29.4508 50.6342 29.0319 51.0912 28.5296 51.3753C28.5099 51.4347 28.4864 51.4928 28.4593 51.5495C28.4293 51.6146 28.3908 51.6756 28.3448 51.7307C28.3293 51.7772 28.3232 51.8406 28.3162 51.9135C28.3004 52.0779 28.2799 52.2909 28.1362 52.4685C28.001 52.6373 27.8519 52.7945 27.6905 52.9386C27.6905 52.9386 27.092 52.9667 26.4133 52.9845L26.458 58.4088H5.7492L6.30965 52.9523L5.66093 53.1637C5.07664 53.3528 4.45628 53.4028 3.84925 53.3099C3.24222 53.2169 2.66526 52.9835 2.1643 52.6283C1.61489 52.2388 1.17445 51.715 0.884966 51.1068C0.595484 50.4987 0.46662 49.8266 0.510669 49.1545L0.644528 47.1369L1.41503 38.3366L1.81323 38.4135L-0.914307 37.8437L-0.402886 36.5663C-0.407359 36.5645 -0.411803 36.5627 -0.416214 36.5608C-0.410804 36.56 -0.40538 36.5594 -0.399946 36.5589L2.05995 30.4146C3.00034 28.0825 4.7421 26.1624 6.97187 24.9999C8.56171 24.176 10.3028 23.6861 12.0882 23.5597L11.788 16.5865C11.1882 16.6507 10.0095 16.5266 9.96087 14.954C9.91229 13.3824 11.0457 13.3171 11.6507 13.3961L11.6445 13.2523C11.5785 12.8433 11.5088 12.439 11.4577 12.2132C11.3782 11.8628 11.2611 11.4953 11.1419 11.1207C10.8794 10.2967 10.6061 9.43855 10.697 8.65293C10.697 8.65293 10.6909 8.00438 11.4565 7.24044C11.3707 6.86644 11.3686 6.47786 11.4507 6.10258C11.5366 5.70965 11.7125 5.34199 11.9645 5.02848C12.2165 4.71497 12.5377 4.46414 12.9029 4.29569C13.2682 4.12725 13.6675 4.04577 14.0696 4.05766C14.2277 4.06393 14.3849 4.08493 14.5418 4.10589C14.7932 4.13945 15.0439 4.17294 15.2971 4.14581C15.7708 4.09409 16.177 3.83884 16.5862 3.58167C16.8357 3.42492 17.0863 3.26745 17.354 3.15494C17.9119 2.93744 18.5266 2.91281 19.1002 3.08497C19.6738 3.25713 20.1733 3.61619 20.5192 4.105C20.5943 4.21716 20.6621 4.33678 20.7298 4.45631C20.9035 4.76299 21.077 5.06915 21.373 5.24769C21.5927 5.38236 21.8482 5.42658 22.1057 5.47114C22.2633 5.49842 22.4216 5.52582 22.5728 5.57417C23.0267 5.71015 23.3999 6.0411 23.6319 6.45436C23.6327 6.40753 23.6317 6.36062 23.629 6.31374C23.6502 6.3657 23.6623 6.42092 23.6649 6.47698C23.6661 6.49165 23.667 6.50632 23.6677 6.521C23.8246 6.82609 23.9058 7.17114 23.8885 7.51347C23.8544 7.93447 23.7053 8.33801 23.4574 8.68001C23.2096 9.02201 22.8725 9.28933 22.483 9.45278C22.3469 9.50712 22.2071 9.55061 22.065 9.58305Z",fill:"white"})),i.createElement("defs",null,i.createElement("clipPath",{id:"clip0_14712_400114"},i.createElement("rect",{width:"32",height:"32",rx:"16",fill:"white"})))),services:({width:e,height:t})=>i.createElement("svg",{width:e||30,height:t||30,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i.createElement("circle",{cx:"15",cy:"15",r:"15",fill:"#F7F9FC"}),i.createElement("path",{d:"M14.9998 6.66663C12.2752 6.66663 9.85335 7.97848 8.33317 9.99996H10.5988C11.8 8.94527 13.3625 8.33329 14.9998 8.33329C16.6372 8.33329 18.1997 8.94527 19.4009 9.99996H21.6665C20.1463 7.97848 17.7244 6.66663 14.9998 6.66663ZM7.7863 10.8333C7.07666 13.0403 6.6665 15.5989 6.6665 18.3333C6.6665 20.0846 6.82601 21.7675 7.13525 23.3333H22.8644C23.1737 21.7675 23.3332 20.0846 23.3332 18.3333C23.3332 15.5989 22.923 13.0403 22.2134 10.8333H7.7863ZM14.9998 13.3333C17.3013 13.3333 19.1665 15.1985 19.1665 17.5C19.1665 19.8014 17.3013 21.6666 14.9998 21.6666C12.6984 21.6666 10.8332 19.8014 10.8332 17.5C10.8332 15.1985 12.6984 13.3333 14.9998 13.3333ZM14.1665 15V16.6666H12.4998V18.3333H14.1665V20H15.8332V18.3333H17.4998V16.6666H15.8332V15H14.1665Z",fill:"#BFC5CC"}))},ot=({type:e,item:t,imageUrl:a,className:o,onClickItem:s})=>{const l=n((()=>{const t=at[e]||q;return i.createElement(t,{width:32,height:"services"===e?32:24})}),[e]);return i.createElement(qe,{onClick:()=>s&&s(t),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||s&&s(t)},tabIndex:0,role:"button",className:o},i.createElement(et,null,"hospitals"===e?i.createElement(tt,{width:"12",height:"16",viewBox:"0 0 12 16"},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 5.94873C0.75 3.04623 3.0975 0.69873 6 0.69873C8.9025 0.69873 11.25 3.04623 11.25 5.94873C11.25 9.07623 7.935 13.3887 6.5775 15.0312C6.2775 15.3912 5.73 15.3912 5.43 15.0312C4.065 13.3887 0.75 9.07623 0.75 5.94873ZM4.125 5.94873C4.125 6.98373 4.965 7.82373 6 7.82373C7.035 7.82373 7.875 6.98373 7.875 5.94873C7.875 4.91373 7.035 4.07373 6 4.07373C4.965 4.07373 4.125 4.91373 4.125 5.94873Z",fill:"#9AA2AC"})):i.createElement(Je,{type:e},a?i.createElement("img",{src:a,width:32,height:"services"===e?32:24,loading:"lazy"}):l)),i.createElement(Xe,{color:v.colors.gray800,size:"p3"},t.name))},nt=({type:e,data:t,state:o,dispatch:s,itemsToShow:l,itemsToShowDesktop:r,isMobile:d,isLoading:p,keyword:h,isNavResultItem:g})=>{const[m,C]=a(!1),{t:b,locale:y}=c(),{selectedLocation:x,searchKeywords:E}=o,S=n((()=>u[y]),[y]),L="ms-MY"===y,k=n((()=>({doctors:{name:b("booking.searchPopup.doctors"),icon:i.createElement(De,null),slug:S.DOCTOR},services:{name:b("booking.searchPopup.services"),icon:i.createElement(Ke,null),slug:S.SERVICE},hospitals:{name:b("booking.searchPopup.hospitals"),icon:i.createElement(ze,null),slug:S.HOSPITAL},specialties:{name:b("booking.searchPopup.specialties"),icon:i.createElement(_e,null),slug:S.SPECIALTIES}})),[e,S]),O=n((()=>k[e].slug),[k]),j=d?l:r;function I(t){let i="";switch(e){case"specialties":i=`/${x.slug}/${k.doctors.slug}/${t.slug}`;break;case"services":i=`/${x.slug}/${O}/${t.slug}`;break;case"doctors":case"hospitals":i=`/${O}/${t.slug}-${t.id}`}i&&s({type:Oe.SelectSearchResult,payload:{name:t.name,url:i}})}function F(t){return i.createElement(ot,{key:t.id,item:t,type:e,imageUrl:t.logo||t.avatar||t.thumbnail,className:g?"":"not-nav",onClickItem:g&&I})}return i.createElement("section",null,i.createElement(He,null,i.createElement(Ge,null,k[e].icon,i.createElement(Ze,null,k[e].name)),(h.trim().length<=Le[y]||L)&&i.createElement(Ye,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${x.slug}/${O}`}t&&s({type:Oe.NavigateTo,payload:t})}},i.createElement(f,{size:"p3",color:v.colors.primaryBase},b("booking.searchPopup.seeAll")))),(p||t&&t.length>0)&&i.createElement(Ue,null,i.createElement(We,null,p&&Array(2).fill(void 0).map(((t,a)=>i.createElement(qe,{key:e+"loading"+a},i.createElement(et,null,i.createElement(it,null,i.createElement(w,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),i.createElement(w,{width:120,height:24})))),!p&&t&&t.length>0&&t.slice(0,j).map(F)),i.createElement(We,{isShown:m,isMore:!0},t.slice(j,-1).map(F)),"specialties"===e&&j<t.length&&!p&&i.createElement("button",{onClick:()=>C(!m)},i.createElement(Qe,{size:"p3",color:v.colors.primaryBase},b(m?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(j<t.length||L)&&!p&&h.trim().length>Le[y]&&i.createElement("button",{onClick:function(){const{slug:t}=k[e],i=`/${x.slug}/${t}?q=${E}`;s({type:Oe.NavigateTo,payload:i})}},i.createElement(Qe,{size:"p3",color:v.colors.primaryBase},b(`booking.searchPopup.searchIn.${e}`,{name:h})))),!p&&0===(null==t?void 0:t.length)&&i.createElement(Ue,null,i.createElement(f,{size:"sm",color:v.colors.gray400},b("booking.searchBar.noResults"))))},st=b.section`
328
328
  background-color: white;
329
329
  border-radius: 4px;
330
330
  position: absolute;
331
331
  width: 100%;
332
332
  z-index: 30;
333
333
 
334
- ${v.tdUp} {
334
+ ${x.tdUp} {
335
335
  box-shadow: 0px 24px 32px rgba(0, 0, 0, 0.04),
336
336
  0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04),
337
337
  0px 0px 1px rgba(0, 0, 0, 0.04);
338
338
  }
339
- `,st=({data:e,state:t,dispatch:a,isMobile:o,isLoading:n,keyword:s,hideResults:l,isNavResultItem:r})=>i.createElement(nt,null,e&&e.map((e=>l&&l.includes(e.type)?i.createElement(i.Fragment,null):i.createElement(ot,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:o,isLoading:n,keyword:s,isNavResultItem:r})))),lt=(e,t,i)=>B(e,Object.assign(Object.assign({},t),{domain:$[i||"en-PH"]}));const rt=({isMobile:t,careApiDomain:g,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:y="",careFrontDomain:f="/care",isDebug:v=!1,askForGeolocationPermission:x=!1,gaTrackingSearchBar:w,gaTrackingLocationSearch:E,autoCompleteDisabled:L=!1,inputSearchPlaceholder:k="",isOptionAllLocation:O=!1,hideResults:j=[],isNavResultItem:I=!0,routerPush:F,onGeoLocationPermissionChange:M,onSearch:$,onChangeLocation:R})=>{const{t:T,locale:P}=c(),A=l(null),N=l(null),[B,V]=a(void 0),[G,Y]=a(!1),{geoLocationPermission:U,geoLocationCoordinates:W,requestGeoLocation:Q}=D(),[q,J]=r(je,Le,(e=>Object.assign(Object.assign({},e),{isDebug:v,isMobile:t,geoLocationPermission:m||U||"unset",geoLocationCoordinates:C||W||null,searchKeywords:y,initialSelectedCity:b||null,selectedLocation:b||e.selectedLocation||null,searchLocationKeywords:(null==b?void 0:b.name)||e.searchLocationKeywords,autoCompleteDisabled:L,inputSearchPlaceholder:k,locale:P}))),{navigateTo:X,focused:ee,isLoadingCities:te,cities:ie,searchKeywords:oe,geoLocationPermission:ne,selectedLocation:se,initialSelectedCity:le,defaultCity:re,searchResults:ce,isLoadingSearchResults:de,isMobileModalOpened:pe,inputSearchPlaceholder:ue}=q,{fetchCitiesByLocation:he,fetchCitiesByKeyword:ge,fetchSearchResults:me}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const a=o((function(a,o={}){const n=`${t}${a}`;return e({type:ke.FetchCitiesStart}),fetch(lt(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:ke.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:o((function({coordinates:t}){let o={};const n={};t&&(o={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(n.noPaging=1);const s=[a(S.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(S.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:ke.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(S.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ke.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:o((function(a,o){const n=`${t}${S.GET_SEARCH_V2}`;e({type:ke.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:l,geoLocationCoordinates:r}=o;let c="";if(!l||!s)return void e({type:ke.FetchSearchResultsFinish});l.id===h?r||(c=s.id):c=l.id===p?"":l.id;const d=(null==r?void 0:r.lat)||"",u=(null==r?void 0:r.lng)||"";return fetch(lt(n,{domain:t,searchType:"global",keyword:a.trim().length>Se[i]?a.trim():"",city:c===h?"":c,lat:d,lng:u},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:ke.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:ke.FetchSearchResultsFinish})))}),[i,t,e])}}({dispatch:J,locale:P,careApiDomain:g}),Ce=n((()=>{var e;return{id:h,name:T("booking.searchBar.currentLocation"),slug:null===(e=u[P])||void 0===e?void 0:e.CURRENT}}),[T,P]),ye=n((()=>d(ge,400)),[ge]),fe=n((()=>d(me,400)),[me]);s((()=>{""!==y&&y!==q.searchKeywords&&J({type:ke.UpdateInitialSearchValue,payload:y})}),[y]),s((()=>{x&&(null==se?void 0:se.id)===h&&"unset"===ne&&Q()}),[x,se,ne]),s((()=>{m||ne===U||("granted"===U&&W?J({type:ke.GrantGeoLocationPermission,payload:W}):"denied"===U&&J({type:ke.DenyGeoLocationPermission}))}),[ne,U,W,m]),s((()=>{X&&(F?F(X):window.location.href=`${f}${X}`)}),[X]);const ve=o((function(){J({type:ke.SelectCurrentLocation,payload:Ce})}),[T,J]);s((()=>{var e;"denied"===ne||le||J({type:ke.SelectLocation,payload:{name:T("booking.searchBar.allLocations"),id:p,slug:null===(e=u[P])||void 0===e?void 0:e.ALL}}),M&&M(ne,q.geoLocationCoordinates),t&&"granted"===ne&&se&&J({type:ke.FocusInputSearch}),he({coordinates:q.geoLocationCoordinates})}),[ne]),s((()=>{se&&re&&me(q.searchKeywords,q)}),[se,re]),s((()=>{k!==ue&&J({type:ke.SetInputSearchPlaceholder,payload:k})}),[k,ue]),s((()=>{pe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[pe]);const xe=o((function(e){"ms-MY"===P&&Y(!0),J({type:ke.SelectLocation,payload:e}),"ms-MY"!==P&&Ie(),R&&R(e)}),[T,J]);function we(){"ms-MY"===P&&Y(!0),t&&"granted"!==q.geoLocationPermission?Q():(ve(),"ms-MY"!==P&&Ie())}function Oe(){var e;A.current&&(null===(e=A.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function Ie(){var e;A.current&&(null===(e=A.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Fe(){J({type:ke.CloseMobileModal})}function Me(){return"location"!==ee?null:i.createElement(ae,{isLoading:te,cities:ie,onLocationClick:xe,onCurrentLocationClick:we,isLocationLoading:te,geoLocationPermission:ne,selectedLocation:se,isOptionAllLocation:O})}function $e(){return"search"!==ee?null:q.autoCompleteDisabled?t?i.createElement(Ne,{onClick:()=>{$({cityId:q.selectedLocation.id,keyword:oe}),Fe()}}):null:i.createElement(st,{data:ce,state:q,dispatch:J,isMobile:!1,keyword:oe,isLoading:de,hideResults:j,isNavResultItem:I})}function Re(){return i.createElement(Be,{isMobile:t,state:q,dispatch:J,debouncedFetchCitiesByKeyword:ye,debouncedFetchSearchResults:fe,focusLocationInput:Oe,focusSearchInput:Ie,renderLocationResults:Me,renderSearchResults:$e,trackingAttributes:w,locationTrackingAttributes:E,onSearch:$,initalSearchValue:y})}return s((()=>{if(window.visualViewport){const e=e=>{const t=e.target;V(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[V]),s((()=>{if(se&&G&&"ms-MY"===P){const e=`/${se.slug}/hospital`;J({type:ke.NavigateTo,payload:e}),Y(!1)}}),[G,P,se]),t?i.createElement(i.Fragment,null,i.createElement(Z,null),i.createElement(H,{ref:N}),i.createElement(z,{id:"booking-search-bar",ref:A,"data-is-modal":t&&pe,style:{"--mobile-care-searchbar-height":pe&&B?`${B}px`:"100%"}},pe?i.createElement(i.Fragment,null,i.createElement(_,null,i.createElement(Ee,{headingText:T("booking.searchBar.searchButton"),onLeftClick:Fe}),Re()),Me(),$e()):i.createElement(be,{onClick:function(){var t;return e(this,void 0,void 0,(function*(){N.current&&N.current.focus(),J({type:ke.OpenMobileModal}),yield Promise.resolve(),A.current&&(null===(t=A.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:ee,value:oe,trackingAttributes:w,inputSearchPlaceholder:k}))):i.createElement(K,{id:"booking-search-bar",ref:A},Re())},ct=C.div``,dt=C.div`
340
- background-color: ${f.colors.neutral50};
339
+ `,lt=({data:e,state:t,dispatch:a,isMobile:o,isLoading:n,keyword:s,hideResults:l,isNavResultItem:r})=>i.createElement(st,null,e&&e.map((e=>l&&l.includes(e.type)?i.createElement(i.Fragment,null):i.createElement(nt,{type:e.type,state:t,dispatch:a,itemsToShow:2,itemsToShowDesktop:4,key:e.type,data:e.results,isMobile:o,isLoading:n,keyword:s,isNavResultItem:r})))),rt=(e,t,i)=>V(e,Object.assign(Object.assign({},t),{domain:R[i||"en-PH"]}));const ct=({isMobile:t,careApiDomain:g,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:y="",careFrontDomain:f="/care",isDebug:v=!1,askForGeolocationPermission:x=!1,gaTrackingSearchBar:w,gaTrackingLocationSearch:E,autoCompleteDisabled:S=!1,inputSearchPlaceholder:k="",isOptionAllLocation:O=!1,hideResults:j=[],isNavResultItem:I=!0,routerPush:F,onGeoLocationPermissionChange:$,onSearch:M,onChangeLocation:R})=>{const{t:T,locale:P}=c(),A=l(null),N=l(null),[B,V]=a(void 0),[D,Z]=a(!1),{geoLocationPermission:U,geoLocationCoordinates:W,requestGeoLocation:Q}=K(),[q,J]=r(Ie,ke,(e=>Object.assign(Object.assign({},e),{isDebug:v,isMobile:t,geoLocationPermission:m||U||"unset",geoLocationCoordinates:C||W||null,searchKeywords:y,initialSelectedCity:b||null,selectedLocation:b||e.selectedLocation||null,searchLocationKeywords:(null==b?void 0:b.name)||e.searchLocationKeywords,autoCompleteDisabled:S,inputSearchPlaceholder:k,locale:P}))),{navigateTo:X,focused:ee,isLoadingCities:te,cities:ie,searchKeywords:ae,geoLocationPermission:ne,selectedLocation:se,initialSelectedCity:le,defaultCity:re,searchResults:ce,isLoadingSearchResults:de,isMobileModalOpened:pe,inputSearchPlaceholder:ue}=q,{fetchCitiesByLocation:he,fetchCitiesByKeyword:ge,fetchSearchResults:me}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const a=o((function(a,o={}){const n=`${t}${a}`;return e({type:Oe.FetchCitiesStart}),fetch(rt(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:Oe.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:o((function({coordinates:t}){let o={};const n={};t&&(o={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(n.noPaging=1);const s=[a(L.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(L.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:Oe.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(L.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:Oe.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:o((function(a,o){const n=`${t}${L.GET_SEARCH_V2}`;e({type:Oe.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:l,geoLocationCoordinates:r}=o;let c="";if(!l||!s)return void e({type:Oe.FetchSearchResultsFinish});l.id===h?r||(c=s.id):c=l.id===p?"":l.id;const d=(null==r?void 0:r.lat)||"",u=(null==r?void 0:r.lng)||"";return fetch(rt(n,{domain:t,searchType:"global",keyword:a.trim().length>Le[i]?a.trim():"",city:c===h?"":c,lat:d,lng:u},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>e({type:Oe.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:Oe.FetchSearchResultsFinish})))}),[i,t,e])}}({dispatch:J,locale:P,careApiDomain:g}),Ce=n((()=>{var e;return{id:h,name:T("booking.searchBar.currentLocation"),slug:null===(e=u[P])||void 0===e?void 0:e.CURRENT}}),[T,P]),be=n((()=>d(ge,400)),[ge]),fe=n((()=>d(me,400)),[me]);s((()=>{""!==y&&y!==q.searchKeywords&&J({type:Oe.UpdateInitialSearchValue,payload:y})}),[y]),s((()=>{x&&(null==se?void 0:se.id)===h&&"unset"===ne&&Q()}),[x,se,ne]),s((()=>{m||ne===U||("granted"===U&&W?J({type:Oe.GrantGeoLocationPermission,payload:W}):"denied"===U&&J({type:Oe.DenyGeoLocationPermission}))}),[ne,U,W,m]),s((()=>{X&&(F?F(X):window.location.href=`${f}${X}`)}),[X]);const ve=o((function(){J({type:Oe.SelectCurrentLocation,payload:Ce})}),[T,J]);s((()=>{var e;"denied"===ne||le||J({type:Oe.SelectLocation,payload:{name:T("booking.searchBar.allLocations"),id:p,slug:null===(e=u[P])||void 0===e?void 0:e.ALL}}),$&&$(ne,q.geoLocationCoordinates),t&&"granted"===ne&&se&&J({type:Oe.FocusInputSearch}),he({coordinates:q.geoLocationCoordinates})}),[ne]),s((()=>{se&&re&&me(q.searchKeywords,q)}),[se,re]),s((()=>{k!==ue&&J({type:Oe.SetInputSearchPlaceholder,payload:k})}),[k,ue]),s((()=>{pe?document.body.classList.add("care-popup-open"):document.body.classList.remove("care-popup-open")}),[pe]);const xe=o((function(e){"ms-MY"===P&&Z(!0),J({type:Oe.SelectLocation,payload:e}),"ms-MY"!==P&&je(),R&&R(e)}),[T,J]);function we(){"ms-MY"===P&&Z(!0),t&&"granted"!==q.geoLocationPermission?Q():(ve(),"ms-MY"!==P&&je())}function Ee(){var e;A.current&&(null===(e=A.current.querySelector('input[name="search-location"]'))||void 0===e||e.focus())}function je(){var e;A.current&&(null===(e=A.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}function Fe(){J({type:Oe.CloseMobileModal})}function $e(){return"location"!==ee?null:i.createElement(oe,{isLoading:te,cities:ie,onLocationClick:xe,onCurrentLocationClick:we,isLocationLoading:te,geoLocationPermission:ne,selectedLocation:se,isOptionAllLocation:O})}function Me(){return"search"!==ee?null:q.autoCompleteDisabled?t?i.createElement(Be,{onClick:()=>{M({cityId:q.selectedLocation.id,keyword:ae}),Fe()}}):null:i.createElement(lt,{data:ce,state:q,dispatch:J,isMobile:!1,keyword:ae,isLoading:de,hideResults:j,isNavResultItem:I})}function Re(){return i.createElement(Ve,{isMobile:t,state:q,dispatch:J,debouncedFetchCitiesByKeyword:be,debouncedFetchSearchResults:fe,focusLocationInput:Ee,focusSearchInput:je,renderLocationResults:$e,renderSearchResults:Me,trackingAttributes:w,locationTrackingAttributes:E,onSearch:M,initalSearchValue:y})}return s((()=>{if(window.visualViewport){const e=e=>{const t=e.target;V(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[V]),s((()=>{if(se&&D&&"ms-MY"===P){const e=`/${se.slug}/hospital`;J({type:Oe.NavigateTo,payload:e}),Z(!1)}}),[D,P,se]),t?i.createElement(i.Fragment,null,i.createElement(Y,null),i.createElement(G,{ref:N}),i.createElement(_,{id:"booking-search-bar",ref:A,"data-is-modal":t&&pe,style:{"--mobile-care-searchbar-height":pe&&B?`${B}px`:"100%"}},pe?i.createElement(i.Fragment,null,i.createElement(H,null,i.createElement(Se,{headingText:T("booking.searchBar.searchButton"),onLeftClick:Fe}),Re()),$e(),Me()):i.createElement(ye,{onClick:function(){var t;return e(this,void 0,void 0,(function*(){N.current&&N.current.focus(),J({type:Oe.OpenMobileModal}),yield Promise.resolve(),A.current&&(null===(t=A.current.querySelector('input[name="search-location"]'))||void 0===t||t.focus())}))},focused:ee,value:ae,trackingAttributes:w,inputSearchPlaceholder:k}))):i.createElement(z,{id:"booking-search-bar",ref:A},Re())},dt=b.div``,pt=b.div`
340
+ background-color: ${v.colors.neutral50};
341
341
  padding-bottom: 1px;
342
- ${v.mbDown} {
342
+ ${x.mbDown} {
343
343
  padding: 0 16px 10px;
344
344
  }
345
- `,pt=C(A)`
345
+ `,ut=b(N)`
346
346
  padding: 30px 56px;
347
347
  border-radius: 0px 0px 4px 4px;
348
- background-color: ${f.colors.white};
348
+ background-color: ${v.colors.white};
349
349
  box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.04),
350
350
  0px 0px 2px 0px rgba(0, 0, 0, 0.06), 0px 4px 8px 0px rgba(0, 0, 0, 0.04);
351
351
 
352
- ${v.mbDown} {
352
+ ${x.mbDown} {
353
353
  padding: 16px 16px;
354
354
  }
355
355
 
356
356
  .flex-search-input {
357
357
  flex-direction: row;
358
- ${v.mbDown} {
358
+ ${x.mbDown} {
359
359
  flex-direction: column;
360
360
  }
361
361
  }
362
- `,ut={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2},ht={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",focusedSpecialty:"none",searchLocationKeywords:"",searchSpecialtyKeywords:"",searchKeywords:"",selectedLocation:null,selectedSpecialty:null,defaultCity:null,initialCities:[],cities:[],searchResults:{},initialSearchResults:{},isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN",allSpecialties:[],popularKeys:[]};var gt;function mt(e){const{selectedLocation:t,searchLocationKeywords:i}=e;return t&&i!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function Ct(e,t){var i,a;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case gt.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case gt.ClickOutsideInputLocation:return"location"!==e.focused?e:mt(Object.assign(Object.assign({},e),{focused:"none"}));case gt.ClickOutsideInputSpecialty:return"specialty"!==e.focused?e:mt(Object.assign(Object.assign({},e),{focused:"none"}));case gt.ClickOutsideInputSearch:return"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case gt.ClickOutsideInputSearchSpecialty:return"search"!==e.focusedSpecialty?e:Object.assign(Object.assign({},e),{focusedSpecialty:"none"});case gt.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(i=e.selectedLocation)||void 0===i?void 0:i.id)===h&&(t.searchLocationKeywords=""),t}case gt.FocusInputSpecialty:{const t=Object.assign(Object.assign({},e),{focused:"specialty"});return(null===(a=e.selectedLocation)||void 0===a?void 0:a.id)===h&&(t.searchLocationKeywords=""),t}case gt.FocusInputSearch:const o=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?mt(o):o;case gt.FocusInputSearchSpecialty:return Object.assign(Object.assign({},e),{focusedSpecialty:"search"});case gt.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case gt.ChangeInputSearch:{const i=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:i,isLoadingSearchResults:i.trim().length>ut[e.locale]})}case gt.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case gt.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case gt.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case gt.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case gt.SelectSpecialty:return Object.assign(Object.assign({},e),{focused:"none",selectedSpecialty:t.payload});case gt.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case gt.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case gt.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case gt.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case gt.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case gt.FetchSearchResultsComplete:return Object.assign(Object.assign({},e),{searchResults:Object.assign(Object.assign({},e.searchResults),{[t.payload.key]:t.payload.searches})});case gt.FetchCitiesByGeoIpComplete:{let{cities:i}=t.payload;const{default:a}=t.payload;i=i.filter((e=>e.id!==a.id)),i.unshift(a),e.initialSelectedCity&&!i.find((t=>t.id===e.initialSelectedCity.id))&&i.unshift(e.initialSelectedCity);const o=Object.assign(Object.assign({},e),{defaultCity:a,initialCities:i,cities:i});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(o.selectedLocation=a,o.searchLocationKeywords=a.name),o}case gt.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case gt.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case gt.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case gt.UpdateInitialSearchResults:return Object.assign(Object.assign({},e),{initialSearchResults:Object.assign(Object.assign({},e.initialSearchResults),{[t.payload.key]:t.payload.searches})});case gt.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case gt.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case gt.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case gt.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case gt.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case gt.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});case gt.FetchAllSpecialties:return Object.assign(Object.assign({},e),{allSpecialties:t.payload});case gt.FetchPopularKeys:return Object.assign(Object.assign({},e),{popularKeys:t.payload});default:return e}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.ClickOutsideInputSearchSpecialty="click outside input search specialty",e.ClickOutsideInputSpecialty="click outside input specialty",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.FocusInputSearchSpecialty="focus input search specialty",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.SelectSpecialty="select specialty",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.UpdateInitialSearchResults="update initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder",e.FocusInputSpecialty="focus input specialty",e.FetchAllSpecialties="fetch all specialty",e.FetchPopularKeys="fetch popular key by type"}(gt||(gt={}));const bt=C.div`
362
+ `,ht={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2},gt={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",focusedSpecialty:"none",searchLocationKeywords:"",searchSpecialtyKeywords:"",searchKeywords:"",selectedLocation:null,selectedSpecialty:null,defaultCity:null,initialCities:[],cities:[],searchResults:{},initialSearchResults:{},isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN",allSpecialties:[],popularKeys:[]};var mt;function Ct(e){const{selectedLocation:t,searchLocationKeywords:i}=e;return t&&i!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function bt(e,t){var i,a;switch(e.isDebug&&console.log("bookingSearchBar",{action:t,state:e}),t.type){case mt.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case mt.ClickOutsideInputLocation:return"location"!==e.focused?e:Ct(Object.assign(Object.assign({},e),{focused:"none"}));case mt.ClickOutsideInputSpecialty:return"specialty"!==e.focused?e:Ct(Object.assign(Object.assign({},e),{focused:"none"}));case mt.ClickOutsideInputSearch:return"search"!==e.focused?e:Object.assign(Object.assign({},e),{focused:"none"});case mt.ClickOutsideInputSearchSpecialty:return"search"!==e.focusedSpecialty?e:Object.assign(Object.assign({},e),{focusedSpecialty:"none"});case mt.FocusInputLocation:{const t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(i=e.selectedLocation)||void 0===i?void 0:i.id)===h&&(t.searchLocationKeywords=""),t}case mt.FocusInputSpecialty:{const t=Object.assign(Object.assign({},e),{focused:"specialty"});return(null===(a=e.selectedLocation)||void 0===a?void 0:a.id)===h&&(t.searchLocationKeywords=""),t}case mt.FocusInputSearch:const o=Object.assign(Object.assign({},e),{focused:"search"});return e.isMobile?Ct(o):o;case mt.FocusInputSearchSpecialty:return Object.assign(Object.assign({},e),{focusedSpecialty:"search"});case mt.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case mt.ChangeInputSearch:{const i=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:i,isLoadingSearchResults:i.trim().length>ht[e.locale]})}case mt.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case mt.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case mt.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case mt.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case mt.SelectSpecialty:return Object.assign(Object.assign({},e),{focused:"none",selectedSpecialty:t.payload});case mt.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case mt.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case mt.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case mt.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case mt.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case mt.FetchSearchResultsComplete:return Object.assign(Object.assign({},e),{searchResults:Object.assign(Object.assign({},e.searchResults),{[t.payload.key]:t.payload.searches})});case mt.FetchCitiesByGeoIpComplete:{let{cities:i}=t.payload;const{default:a}=t.payload;i=i.filter((e=>e.id!==a.id)),i.unshift(a),e.initialSelectedCity&&!i.find((t=>t.id===e.initialSelectedCity.id))&&i.unshift(e.initialSelectedCity);const o=Object.assign(Object.assign({},e),{defaultCity:a,initialCities:i,cities:i});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(o.selectedLocation=a,o.searchLocationKeywords=a.name),o}case mt.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case mt.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case mt.DisplayInitialSearchResults:return Object.assign(Object.assign({},e),{searchResults:e.initialSearchResults,isLoadingSearchResults:!1});case mt.UpdateInitialSearchResults:return Object.assign(Object.assign({},e),{initialSearchResults:Object.assign(Object.assign({},e.initialSearchResults),{[t.payload.key]:t.payload.searches})});case mt.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case mt.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case mt.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case mt.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case mt.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case mt.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});case mt.FetchAllSpecialties:return Object.assign(Object.assign({},e),{allSpecialties:t.payload});case mt.FetchPopularKeys:return Object.assign(Object.assign({},e),{popularKeys:t.payload});default:return e}}!function(e){e.NavigateTo="navigate to url",e.ClickOutsideInputLocation="click outside input location",e.ClickOutsideInputSearch="click outside input search",e.ClickOutsideInputSearchSpecialty="click outside input search specialty",e.ClickOutsideInputSpecialty="click outside input specialty",e.SelectCurrentLocation="select current location",e.FocusInputLocation="focus input location",e.FocusInputSearch="focus input search",e.FocusInputSearchSpecialty="focus input search specialty",e.ChangeInputLocation="change input location",e.ChangeInputSearch="change input search",e.ClearInputLocation="clear input location",e.ClearInputSearch="clear input search",e.SelectLocation="select location",e.SelectSpecialty="select specialty",e.FetchCitiesStart="fetch cities start",e.FetchCitiesFinish="fetch cities finish",e.FetchSearchResultsStart="fetch search results start",e.FetchSearchResultsComplete="fetch search results complete",e.FetchSearchResultsFinish="fetch search results finish",e.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",e.FetchCitiesByKeywordComplete="fetch cities by keyword finish",e.DisplayInitialCities="display initial cities",e.DisplayInitialSearchResults="display initial search results",e.UpdateInitialSearchResults="update initial search results",e.GrantGeoLocationPermission="grant geolocation permission",e.DenyGeoLocationPermission="deny geolocation permission",e.OpenMobileModal="open mobile modal",e.CloseMobileModal="close mobile modal",e.UpdateInitialSearchValue="update initial search value",e.SelectSearchResult="select search result",e.SetInputSearchPlaceholder="set input search placeholder",e.FocusInputSpecialty="focus input specialty",e.FetchAllSpecialties="fetch all specialty",e.FetchPopularKeys="fetch popular key by type"}(mt||(mt={}));const yt=b.div`
363
363
  flex: 1;
364
364
  position: relative;
365
365
 
366
- ${v.mbDown} {
366
+ ${x.mbDown} {
367
367
  width: 100%;
368
368
  display: flex;
369
369
  flex-direction: column;
370
370
  gap: 12px;
371
371
  }
372
- `,yt=C.div`
372
+ `,ft=b.div`
373
373
  position: absolute;
374
374
  top: calc(100% + 2px);
375
375
  width: 100%;
376
376
  border-radius: 4px;
377
- background: ${f.colors.white};
377
+ background: ${v.colors.white};
378
378
  box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1);
379
379
  z-index: 10;
380
380
 
381
- ${v.mbDown} {
381
+ ${x.mbDown} {
382
382
  width: calc(100% + 64px);
383
383
  left: -32px;
384
384
  }
385
- `,ft=C.div``,vt=C.div`
385
+ `,vt=b.div``,xt=b.div`
386
386
  display: flex;
387
387
  justify-content: space-between;
388
388
  align-item: center;
@@ -390,30 +390,30 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
390
390
  background: #f7f9fc;
391
391
 
392
392
  .title {
393
- color: ${f.colors.gray800};
393
+ color: ${v.colors.gray800};
394
394
  font-size: 14px;
395
395
  font-weight: 600;
396
396
  line-height: 22px;
397
397
  }
398
398
 
399
399
  .btn-see-all {
400
- color: ${f.colors.blue600};
400
+ color: ${v.colors.blue600};
401
401
  font-size: 14px;
402
402
  line-height: 22px;
403
403
  cursor: pointer;
404
404
  }
405
- `,xt=C.div`
405
+ `,wt=b.div`
406
406
  padding: 10px 16px;
407
407
  max-height: 400px;
408
408
  overflow: auto;
409
- `,wt=C.div`
409
+ `,Et=b.div`
410
410
  display: flex;
411
411
  gap: 12px;
412
412
  align-items: center;
413
413
  cursor: pointer;
414
414
 
415
415
  &:hover {
416
- background-color: ${f.colors.blue50};
416
+ background-color: ${v.colors.blue50};
417
417
  }
418
418
  .image-item {
419
419
  flex: 0 0 48px;
@@ -432,16 +432,16 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
432
432
  overflow: hidden;
433
433
  padding: 12px 0;
434
434
  flex: 1;
435
- border-bottom: 1px solid ${f.colors.neutral100};
435
+ border-bottom: 1px solid ${v.colors.neutral100};
436
436
  .title {
437
- color: ${f.colors.gray800};
437
+ color: ${v.colors.gray800};
438
438
  font-size: 16px;
439
439
  font-weight: 600;
440
440
  line-height: 24px;
441
441
  }
442
442
  .description {
443
443
  overflow: hidden;
444
- color: ${f.colors.gray600};
444
+ color: ${v.colors.gray600};
445
445
  text-overflow: ellipsis;
446
446
  white-space: nowrap;
447
447
  font-size: 12px;
@@ -469,40 +469,40 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
469
469
  border-bottom: none;
470
470
  }
471
471
  }
472
- `;C.div`
472
+ `;b.div`
473
473
  padding: 0 16px 16px;
474
474
 
475
475
  .search-detail-btn {
476
- color: ${f.colors.blue600};
476
+ color: ${v.colors.blue600};
477
477
  font-size: 14px;
478
478
  line-height: 22px;
479
479
  cursor: pointer;
480
480
  }
481
- `;const Et=({state:e,type:t,results:a,location:o,isLoading:s,typeInformation:l,clientSlug:r="",dispatch:d})=>{const{t:p}=c(),{selectedLocation:u}=e,h=n((()=>l[t].slug),[l,t]);return i.createElement(ft,null,i.createElement(vt,null,i.createElement("div",{className:"title"},p("booking.searchResult.description",{search_type:l[t].name,search_location:o})),a.length>0&&i.createElement("div",{className:"btn-see-all",onClick:()=>{let i=`/${u.slug}/${h}`;r===g&&(i+=`/${r}`),("doctor"===t||"hospital"===t)&&e.selectedSpecialty.id>0&&(i+=`?specialtyId=${e.selectedSpecialty.id}`),i&&d({type:gt.NavigateTo,payload:i})}},p("home.seeAll"))),i.createElement(xt,null,s&&Array(3).fill(void 0).map(((e,a)=>i.createElement(wt,{key:t+"loading"+a,className:2===a?"last-item":""},i.createElement("div",{className:"image-item"},i.createElement(L,{height:48,circle:!0,mb:"xl",animate:!0})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},i.createElement(L,{height:8,mt:10,radius:"xl",animate:!0})),i.createElement("div",{className:"description"},i.createElement("div",{className:"sub-description"},i.createElement(L,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!s&&a&&a.length>0&&i.createElement(i.Fragment,null,a.map(((e,o)=>{var n,s;const r=a.length>4&&3===o||a.length<=4&&o===a.length-1;let c="";return"hospital"===t&&(c=(null==e?void 0:e.address)||""),"doctor"===t&&(c=(null===(n=null==e?void 0:e.specialties)||void 0===n?void 0:n.join(", "))||""),"service"===t&&(c=(null===(s=null==e?void 0:e.organization)||void 0===s?void 0:s.name)||""),o>=4?i.createElement(i.Fragment,null):i.createElement(wt,{key:e.id,className:r?"last-item":"",onClick:()=>(e=>{let i="";switch(t){case"service":i=`/${u.slug}/${h}/${e.slug}`;break;case"doctor":case"hospital":i=`/${h}/${e.slug}-${e.id}`}i&&d({type:gt.NavigateTo,payload:i})})(e)},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.logo||e.avatar,alt:e.name})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},e.name),i.createElement("div",{className:"description"},l[t].icon,i.createElement("div",{className:"sub-description"},c))))}))),!s&&0===(null==a?void 0:a.length)&&i.createElement(y,{size:"sm",color:f.colors.gray400},p("booking.searchBar.noResults"))))},St=C.div`
481
+ `;const St=({state:e,type:t,results:a,location:o,isLoading:s,typeInformation:l,clientSlug:r="",dispatch:d})=>{const{t:p}=c(),{selectedLocation:u}=e,h=n((()=>l[t].slug),[l,t]);return i.createElement(vt,null,i.createElement(xt,null,i.createElement("div",{className:"title"},p("booking.searchResult.description",{search_type:l[t].name,search_location:o})),a.length>0&&i.createElement("div",{className:"btn-see-all",onClick:()=>{let i=`/${u.slug}/${h}`;r===g&&(i+=`/${r}`),("doctor"===t||"hospital"===t)&&e.selectedSpecialty.id>0&&(i+=`?specialtyId=${e.selectedSpecialty.id}`),i&&d({type:mt.NavigateTo,payload:i})}},p("home.seeAll"))),i.createElement(wt,null,s&&Array(3).fill(void 0).map(((e,a)=>i.createElement(Et,{key:t+"loading"+a,className:2===a?"last-item":""},i.createElement("div",{className:"image-item"},i.createElement(k,{height:48,circle:!0,mb:"xl",animate:!0})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},i.createElement(k,{height:8,mt:10,radius:"xl",animate:!0})),i.createElement("div",{className:"description"},i.createElement("div",{className:"sub-description"},i.createElement(k,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!s&&a&&a.length>0&&i.createElement(i.Fragment,null,a.map(((e,o)=>{var n,s;const r=a.length>4&&3===o||a.length<=4&&o===a.length-1;let c="";return"hospital"===t&&(c=(null==e?void 0:e.address)||""),"doctor"===t&&(c=(null===(n=null==e?void 0:e.specialties)||void 0===n?void 0:n.join(", "))||""),"service"===t&&(c=(null===(s=null==e?void 0:e.organization)||void 0===s?void 0:s.name)||""),o>=4?i.createElement(i.Fragment,null):i.createElement(Et,{key:e.id,className:r?"last-item":"",onClick:()=>(e=>{let i="";switch(t){case"service":i=`/${u.slug}/${h}/${e.slug}`;break;case"doctor":case"hospital":i=`/${h}/${e.slug}-${e.id}`}i&&d({type:mt.NavigateTo,payload:i})})(e)},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.logo||e.avatar,alt:e.name})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},e.name),i.createElement("div",{className:"description"},l[t].icon,i.createElement("div",{className:"sub-description"},c))))}))),!s&&0===(null==a?void 0:a.length)&&i.createElement(f,{size:"sm",color:v.colors.gray400},p("booking.searchBar.noResults"))))},Lt=b.div`
482
482
  position: relative;
483
483
 
484
- ${v.mbDown} {
484
+ ${x.mbDown} {
485
485
  width: 100%;
486
486
  display: flex;
487
487
  flex-direction: column;
488
488
  gap: 12px;
489
489
  }
490
- `,Lt=C.div`
490
+ `,kt=b.div`
491
491
  position: absolute;
492
492
  top: calc(100% + 2px);
493
493
  width: calc(100% + 100px);
494
494
  border-radius: 4px;
495
- background: ${f.colors.white};
495
+ background: ${v.colors.white};
496
496
  box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1);
497
497
  z-index: 10;
498
498
  max-height: 300px;
499
499
  overflow: auto;
500
500
 
501
- ${v.mbDown} {
501
+ ${x.mbDown} {
502
502
  width: calc(100% + 64px);
503
503
  left: -32px;
504
504
  }
505
- `,kt=C.li`
505
+ `,Ot=b.li`
506
506
  position: relative;
507
507
  cursor: pointer;
508
508
  padding: 12px 18px;
@@ -536,11 +536,11 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
536
536
  right: 18px;
537
537
  top: 0;
538
538
  height: 1px;
539
- background-color: ${f.colors.neutral100};
539
+ background-color: ${v.colors.neutral100};
540
540
  }
541
541
 
542
542
  &:not([data-is-denied='true']):hover {
543
- background-color: ${f.colors.neutral50};
543
+ background-color: ${v.colors.neutral50};
544
544
  }
545
545
 
546
546
  &:last-child:hover {
@@ -556,32 +556,32 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
556
556
  &[data-is-denied='true'] {
557
557
  cursor: not-allowed;
558
558
  }
559
- `;C(U)`
559
+ `;b(W)`
560
560
  width: 12px;
561
561
  height: 18px;
562
- `;const Ot=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),jt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),It=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),Ft=()=>i.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},i.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),Mt=({state:e,isMobile:t,debouncedFetchSearchResults:a,selectedLocation:s,onSpecialtyClick:r,dispatch:d})=>{var p;const{t:h,locale:g}=c(),m=l(null),C=n((()=>u[g]),[g]),b=n((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:t?"border: 1px solid #d9d9d9":"none",height:t?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:t?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[t]),f=o((function(e){console.log(e)}),[a,d]);return E(m,(()=>{d({type:gt.ClickOutsideInputSpecialty})})),i.createElement(St,{ref:m},i.createElement(k.Wrapper,null,i.createElement(k,{size:t?"md":"lg",placeholder:h("booking.searchPopup.specialties"),value:(null===(p=null==e?void 0:e.selectedSpecialty)||void 0===p?void 0:p.name)||"",rightSection:i.createElement(V,null),styles:b,onFocus:()=>d({type:gt.FocusInputSpecialty}),onChange:e=>{f(e.target.value)}})),"specialty"===e.focused&&i.createElement(Lt,null,i.createElement(kt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:h("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:C.SPECIALTIES})}},i.createElement("div",{className:"image-item"},i.createElement(Ft,null)),i.createElement(y,{size:"md"},h("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>i.createElement(kt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==s?void 0:s.id)===e.id},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.thumbnail,alt:e.name})),i.createElement(y,{size:"md"},e.name))))))},$t=({state:e,type:t,isMobile:a,isLoading:s,initalSearchValue:r,typeInformation:d,debouncedFetchSearchResults:p,trackingAttributes:u,hideSpecialtySelection:h=!1,clientSlug:g="",focusSearchInput:m,onSearch:C,dispatch:b})=>{var y;const{t:f}=c(),v=l(null),x=n((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),w=n((()=>"doctor"===t?f("booking.searchBar.placeholder.doctor"):"service"===t?f("booking.searchBar.placeholder.service"):"hospital"===t?f("booking.searchBar.placeholder.hospital"):"specialty"===t?f("booking.searchBar.placeholder.specialty"):""),[t]),S=n((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),L=n((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),O=n((()=>({input:{color:"#262626"}})),[]);E(v,(()=>{b({type:gt.ClickOutsideInputSearch})}));const j=o((function(i){b({type:gt.ChangeInputSearch,payload:i}),"function"!=typeof C&&(i.trim().length>ut[e.locale]||r||0===i.trim().length?p(i.trim(),e,t,g):(p.cancel(),b({type:gt.DisplayInitialSearchResults})))}),[b,e,t]),I=o((function(e){b({type:gt.SelectSpecialty,payload:e}),m()}),[b]);return i.createElement(bt,{ref:v},"specialty"===t?i.createElement(k.Wrapper,{styles:S},i.createElement(k,{icon:i.createElement(N.Search,null),size:a?"md":"lg",placeholder:w,styles:O,value:e.searchKeywords,onFocus:()=>b({type:gt.FocusInputSearchSpecialty}),onChange:e=>{j(e.target.value)}})):i.createElement(i.Fragment,null,"service"===t?i.createElement(k.Wrapper,{styles:S},i.createElement(k,{icon:i.createElement(N.Search,null),size:a?"md":"lg",name:"search-results",placeholder:w,onFocus:()=>b({type:gt.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{j(e.target.value)}})):i.createElement(i.Fragment,null,a&&!h?i.createElement(i.Fragment,null,i.createElement(Mt,{state:e,isMobile:a,dispatch:b,debouncedFetchSearchResults:p,onSpecialtyClick:I}),i.createElement(k.Wrapper,{styles:S},i.createElement(k,{icon:i.createElement(N.Search,null),size:"md",placeholder:w,value:e.searchKeywords,name:"search-results",onFocus:()=>b({type:gt.FocusInputSearch}),onChange:e=>{j(e.target.value)}}))):i.createElement(k.Wrapper,{styles:S,className:h?"hide-specialty-selection":""},i.createElement(k,Object.assign({icon:i.createElement(N.Search,null),size:"lg",placeholder:w,styles:L,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{j(e.target.value)},onFocus:()=>b({type:gt.FocusInputSearch})},x,{rightSection:h?i.createElement(i.Fragment,null):i.createElement(Mt,{state:e,isMobile:a,dispatch:b,debouncedFetchSearchResults:p,onSpecialtyClick:I})})))),"search"===e.focused&&i.createElement(yt,null,i.createElement(Et,{type:t,state:e,results:(null===(y=e.searchResults)||void 0===y?void 0:y[t])||[],location:e.selectedLocation.name,dispatch:b,isLoading:s,typeInformation:d,clientSlug:g}))))},Rt=C.div`
562
+ `;const jt=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M8.98307 14.3333C7.87196 14.3333 6.92752 13.9445 6.14974 13.1667C5.37196 12.3889 4.98307 11.4445 4.98307 10.3333V9.96668C4.08307 9.85557 3.33041 9.45557 2.72507 8.76668C2.1193 8.07779 1.81641 7.26668 1.81641 6.33334V3.10001C1.81641 2.93334 1.87463 2.79157 1.99107 2.67468C2.10796 2.55823 2.24974 2.50001 2.41641 2.50001H3.81641V2.33334C3.81641 2.1889 3.86374 2.06934 3.95841 1.97468C4.05263 1.88045 4.17196 1.83334 4.31641 1.83334C4.46085 1.83334 4.58041 1.88045 4.67507 1.97468C4.7693 2.06934 4.81641 2.1889 4.81641 2.33334V3.66668C4.81641 3.81112 4.7693 3.93045 4.67507 4.02468C4.58041 4.11934 4.46085 4.16668 4.31641 4.16668C4.17196 4.16668 4.05263 4.11934 3.95841 4.02468C3.86374 3.93045 3.81641 3.81112 3.81641 3.66668V3.50001H2.81641V6.33334C2.81641 7.06668 3.07752 7.69445 3.59974 8.21668C4.12196 8.7389 4.74974 9.00001 5.48307 9.00001C6.21641 9.00001 6.84418 8.7389 7.36641 8.21668C7.88863 7.69445 8.14974 7.06668 8.14974 6.33334V3.50001H7.14974V3.66668C7.14974 3.81112 7.10263 3.93045 7.00841 4.02468C6.91374 4.11934 6.79418 4.16668 6.64974 4.16668C6.5053 4.16668 6.38596 4.11934 6.29174 4.02468C6.19707 3.93045 6.14974 3.81112 6.14974 3.66668V2.33334C6.14974 2.1889 6.19707 2.06934 6.29174 1.97468C6.38596 1.88045 6.5053 1.83334 6.64974 1.83334C6.79418 1.83334 6.91374 1.88045 7.00841 1.97468C7.10263 2.06934 7.14974 2.1889 7.14974 2.33334V2.50001H8.54974C8.71641 2.50001 8.85818 2.55823 8.97507 2.67468C9.09152 2.79157 9.14974 2.93334 9.14974 3.10001V6.33334C9.14974 7.26668 8.84707 8.07779 8.24174 8.76668C7.63596 9.45557 6.88307 9.85557 5.98307 9.96668V10.3333C5.98307 11.1667 6.27485 11.8751 6.85841 12.4587C7.44152 13.0418 8.14974 13.3333 8.98307 13.3333C9.81641 13.3333 10.5249 13.0418 11.1084 12.4587C11.6915 11.8751 11.9831 11.1667 11.9831 10.3333V9.25001C11.6386 9.1389 11.3526 8.93601 11.1251 8.64134C10.8971 8.34712 10.7831 8.01112 10.7831 7.63334C10.7831 7.15557 10.9497 6.75001 11.2831 6.41668C11.6164 6.08334 12.0164 5.91668 12.4831 5.91668C12.9609 5.91668 13.3664 6.08334 13.6997 6.41668C14.0331 6.75001 14.1997 7.15557 14.1997 7.63334C14.1997 8.01112 14.086 8.34712 13.8584 8.64134C13.6304 8.93601 13.3386 9.1389 12.9831 9.25001V10.3333C12.9831 11.4445 12.5942 12.3889 11.8164 13.1667C11.0386 13.9445 10.0942 14.3333 8.98307 14.3333ZM12.4831 8.33334C12.6831 8.33334 12.8526 8.26401 12.9917 8.12534C13.1304 7.98623 13.1997 7.82223 13.1997 7.63334C13.1997 7.43334 13.1304 7.26401 12.9917 7.12534C12.8526 6.98623 12.6831 6.91668 12.4831 6.91668C12.2831 6.91668 12.1164 6.98623 11.9831 7.12534C11.8497 7.26401 11.7831 7.43334 11.7831 7.63334C11.7831 7.82223 11.8497 7.98623 11.9831 8.12534C12.1164 8.26401 12.2831 8.33334 12.4831 8.33334Z",fill:"#595959"})),It=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M6.86836 9.26489V10.2386C6.86836 10.509 6.96294 10.7389 7.15209 10.9283C7.34124 11.1176 7.57093 11.2122 7.84114 11.2122C8.11135 11.2122 8.34133 11.1176 8.53106 10.9283C8.7208 10.7389 8.81567 10.509 8.81567 10.2386V9.26489H9.78936C10.0598 9.26489 10.2897 9.17031 10.479 8.98116C10.6684 8.79201 10.763 8.56233 10.763 8.29211C10.763 8.0219 10.6684 7.79192 10.479 7.60219C10.2897 7.41245 10.0598 7.31758 9.78936 7.31758H8.81567V6.34389C8.81567 6.07343 8.72109 5.84354 8.53194 5.65422C8.34279 5.4649 8.11311 5.37024 7.84289 5.37024C7.57268 5.37024 7.3427 5.4649 7.15297 5.65422C6.96323 5.84354 6.86836 6.07343 6.86836 6.34389V7.31758H5.89467C5.62421 7.31758 5.39432 7.41216 5.205 7.60131C5.01568 7.79046 4.92102 8.02014 4.92102 8.29036C4.92102 8.56057 5.01568 8.79055 5.205 8.98028C5.39432 9.17002 5.62421 9.26489 5.89467 9.26489H6.86836ZM3.40809 14.1333C3.02086 14.1333 2.68938 13.9954 2.41364 13.7196C2.13788 13.4439 2 13.1124 2 12.7252V6.07426C2 5.85132 2.04987 5.64011 2.14961 5.44063C2.24936 5.24116 2.38723 5.07689 2.56323 4.94782L6.99718 1.61486C7.24323 1.42712 7.52444 1.33325 7.84081 1.33325C8.15718 1.33325 8.43919 1.42712 8.68685 1.61486L13.1208 4.94782C13.2968 5.07689 13.4347 5.24116 13.5344 5.44063C13.6342 5.64011 13.684 5.85132 13.684 6.07426V12.7252C13.684 13.1124 13.5462 13.4439 13.2704 13.7196C12.9947 13.9954 12.6632 14.1333 12.2759 14.1333H3.40809ZM3.40809 12.9649H12.2759C12.3459 12.9649 12.4033 12.9424 12.4482 12.8974C12.4932 12.8525 12.5156 12.7951 12.5156 12.7252V6.07426C12.5156 6.03431 12.5069 5.99811 12.4894 5.96566C12.4719 5.9332 12.4482 5.90449 12.4183 5.87953L7.98433 2.55406C7.94438 2.51911 7.89694 2.50164 7.84202 2.50164C7.78709 2.50164 7.73965 2.51911 7.69971 2.55406L3.26576 5.87953C3.2358 5.90449 3.21209 5.9332 3.1946 5.96566C3.17712 5.99811 3.16839 6.03431 3.16839 6.07426V12.7252C3.16839 12.7951 3.19086 12.8525 3.2358 12.8974C3.28075 12.9424 3.33818 12.9649 3.40809 12.9649Z",fill:"#595959"})),Ft=()=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},i.createElement("path",{d:"M7.99984 8.00004C8.3665 8.00004 8.68039 7.86949 8.9415 7.60837C9.20261 7.34726 9.33317 7.03337 9.33317 6.66671C9.33317 6.30004 9.20261 5.98615 8.9415 5.72504C8.68039 5.46393 8.3665 5.33337 7.99984 5.33337C7.63317 5.33337 7.31928 5.46393 7.05817 5.72504C6.79706 5.98615 6.6665 6.30004 6.6665 6.66671C6.6665 7.03337 6.79706 7.34726 7.05817 7.60837C7.31928 7.86949 7.63317 8.00004 7.99984 8.00004ZM7.99984 12.9C9.35539 11.6556 10.3609 10.525 11.0165 9.50837C11.6721 8.49171 11.9998 7.58893 11.9998 6.80004C11.9998 5.58893 11.6137 4.59726 10.8415 3.82504C10.0693 3.05282 9.12206 2.66671 7.99984 2.66671C6.87761 2.66671 5.93039 3.05282 5.15817 3.82504C4.38595 4.59726 3.99984 5.58893 3.99984 6.80004C3.99984 7.58893 4.32761 8.49171 4.98317 9.50837C5.63873 10.525 6.64428 11.6556 7.99984 12.9ZM7.99984 14.4167C7.91095 14.4167 7.82206 14.4 7.73317 14.3667C7.64428 14.3334 7.5665 14.2889 7.49984 14.2334C5.87761 12.8 4.6665 11.4695 3.8665 10.2417C3.0665 9.01393 2.6665 7.86671 2.6665 6.80004C2.6665 5.13337 3.20261 3.8056 4.27484 2.81671C5.34706 1.82782 6.58873 1.33337 7.99984 1.33337C9.41095 1.33337 10.6526 1.82782 11.7248 2.81671C12.7971 3.8056 13.3332 5.13337 13.3332 6.80004C13.3332 7.86671 12.9332 9.01393 12.1332 10.2417C11.3332 11.4695 10.1221 12.8 8.49984 14.2334C8.43317 14.2889 8.35539 14.3334 8.2665 14.3667C8.17761 14.4 8.08873 14.4167 7.99984 14.4167Z",fill:"#8C8C8C"})),$t=()=>i.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},i.createElement("path",{d:"M3.83333 0.5C2.94928 0.5 2.10143 0.851189 1.47631 1.47631C0.851189 2.10143 0.5 2.94928 0.5 3.83333C0.5 4.71739 0.851189 5.56523 1.47631 6.19036C2.10143 6.81548 2.94928 7.16667 3.83333 7.16667C4.71739 7.16667 5.56523 6.81548 6.19036 6.19036C6.81548 5.56523 7.16667 4.71739 7.16667 3.83333C7.16667 2.94928 6.81548 2.10143 6.19036 1.47631C5.56523 0.851189 4.71739 0.5 3.83333 0.5V0.5ZM10.5 0.5C9.57917 0.5 8.83333 1.24583 8.83333 2.16667V5.5C8.83333 6.42083 9.57917 7.16667 10.5 7.16667H13.8333C14.7542 7.16667 15.5 6.42083 15.5 5.5V2.16667C15.5 1.24583 14.7542 0.5 13.8333 0.5H10.5ZM3.83333 8.83333C2.94928 8.83333 2.10143 9.18452 1.47631 9.80964C0.851189 10.4348 0.5 11.2826 0.5 12.1667C0.5 13.0507 0.851189 13.8986 1.47631 14.5237C2.10143 15.1488 2.94928 15.5 3.83333 15.5C4.71739 15.5 5.56523 15.1488 6.19036 14.5237C6.81548 13.8986 7.16667 13.0507 7.16667 12.1667C7.16667 11.2826 6.81548 10.4348 6.19036 9.80964C5.56523 9.18452 4.71739 8.83333 3.83333 8.83333V8.83333ZM12.1667 8.83333C11.2826 8.83333 10.4348 9.18452 9.80964 9.80964C9.18452 10.4348 8.83333 11.2826 8.83333 12.1667C8.83333 13.0507 9.18452 13.8986 9.80964 14.5237C10.4348 15.1488 11.2826 15.5 12.1667 15.5C13.0507 15.5 13.8986 15.1488 14.5237 14.5237C15.1488 13.8986 15.5 13.0507 15.5 12.1667C15.5 11.2826 15.1488 10.4348 14.5237 9.80964C13.8986 9.18452 13.0507 8.83333 12.1667 8.83333V8.83333Z",fill:"#9AA2AC"})),Mt=({state:e,isMobile:t,debouncedFetchSearchResults:a,selectedLocation:s,onSpecialtyClick:r,dispatch:d})=>{var p;const{t:h,locale:g}=c(),m=l(null),C=n((()=>u[g]),[g]),b=n((()=>({wrapper:{"&:after":{content:'""',width:"1px",height:"20px",backgroundColor:"#E4E8EC",position:"absolute",right:0,top:"13px"}},input:{border:t?"border: 1px solid #d9d9d9":"none",height:t?"40px":"46px !important",paddingRight:"30px","&:focus":{boxShadow:t?"box-shadow: 0px 0px 0px 2px #91caff":"none"}},rightSection:{width:"30px",svg:{fontSize:"20px"}}})),[t]),y=o((function(e){console.log(e)}),[a,d]);return S(m,(()=>{d({type:mt.ClickOutsideInputSpecialty})})),i.createElement(Lt,{ref:m},i.createElement(O.Wrapper,null,i.createElement(O,{size:t?"md":"lg",placeholder:h("booking.searchPopup.specialties"),value:(null===(p=null==e?void 0:e.selectedSpecialty)||void 0===p?void 0:p.name)||"",rightSection:i.createElement(D,null),styles:b,onFocus:()=>d({type:mt.FocusInputSpecialty}),onChange:e=>{y(e.target.value)}})),"specialty"===e.focused&&i.createElement(kt,null,i.createElement(Ot,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{r&&r({name:h("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:C.SPECIALTIES})}},i.createElement("div",{className:"image-item"},i.createElement($t,null)),i.createElement(f,{size:"md"},h("booking.searchBar.allSpecialties"))),e.allSpecialties.map((e=>i.createElement(Ot,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),r&&r(Object.assign(Object.assign({},e),{total_doctor:0}))},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==s?void 0:s.id)===e.id},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.thumbnail,alt:e.name})),i.createElement(f,{size:"md"},e.name))))))},Rt=({state:e,type:t,isMobile:a,isLoading:s,initalSearchValue:r,typeInformation:d,debouncedFetchSearchResults:p,trackingAttributes:u,hideSpecialtySelection:h=!1,clientSlug:g="",focusSearchInput:m,onSearch:C,dispatch:b})=>{var y;const{t:f}=c(),v=l(null),x=n((()=>u?{"data-event-category":u.dataEventCategory,"data-event-action":u.dataEventAction,"data-event-label":u.dataEventLabel}:{}),[u]),w=n((()=>"doctor"===t?f("booking.searchBar.placeholder.doctor"):"service"===t?f("booking.searchBar.placeholder.service"):"hospital"===t?f("booking.searchBar.placeholder.hospital"):"specialty"===t?f("booking.searchBar.placeholder.specialty"):""),[t]),E=n((()=>({root:{flex:1,"&.hide-specialty-selection":{".mantine-Input-rightSection":{display:"none"},input:{paddingLeft:"48px"},".mantine-Input-icon":{left:"0"}}}})),[]),L=n((()=>({icon:{left:"165px"},input:{color:"#262626",'&[data-with-icon="true"]':{paddingLeft:"205px",paddingRight:"16px"}},rightSection:{left:0,width:"165px",padding:"1px"}})),[]),k=n((()=>({input:{color:"#262626"}})),[]);S(v,(()=>{b({type:mt.ClickOutsideInputSearch})}));const j=o((function(i){b({type:mt.ChangeInputSearch,payload:i}),"function"!=typeof C&&(i.trim().length>ht[e.locale]||r||0===i.trim().length?p(i.trim(),e,t,g):(p.cancel(),b({type:mt.DisplayInitialSearchResults})))}),[b,e,t]),I=o((function(e){b({type:mt.SelectSpecialty,payload:e}),m()}),[b]);return i.createElement(yt,{ref:v},"specialty"===t?i.createElement(O.Wrapper,{styles:E},i.createElement(O,{icon:i.createElement(B.Search,null),size:a?"md":"lg",placeholder:w,styles:k,value:e.searchKeywords,onFocus:()=>b({type:mt.FocusInputSearchSpecialty}),onChange:e=>{j(e.target.value)}})):i.createElement(i.Fragment,null,"service"===t?i.createElement(O.Wrapper,{styles:E},i.createElement(O,{icon:i.createElement(B.Search,null),size:a?"md":"lg",name:"search-results",placeholder:w,onFocus:()=>b({type:mt.FocusInputSearch}),value:e.searchKeywords,onChange:e=>{j(e.target.value)}})):i.createElement(i.Fragment,null,a&&!h?i.createElement(i.Fragment,null,i.createElement(Mt,{state:e,isMobile:a,dispatch:b,debouncedFetchSearchResults:p,onSpecialtyClick:I}),i.createElement(O.Wrapper,{styles:E},i.createElement(O,{icon:i.createElement(B.Search,null),size:"md",placeholder:w,value:e.searchKeywords,name:"search-results",onFocus:()=>b({type:mt.FocusInputSearch}),onChange:e=>{j(e.target.value)}}))):i.createElement(O.Wrapper,{styles:E,className:h?"hide-specialty-selection":""},i.createElement(O,Object.assign({icon:i.createElement(B.Search,null),size:"lg",placeholder:w,styles:L,name:"search-results",autoComplete:"off",value:e.searchKeywords,onChange:e=>{j(e.target.value)},onFocus:()=>b({type:mt.FocusInputSearch})},x,{rightSection:h?i.createElement(i.Fragment,null):i.createElement(Mt,{state:e,isMobile:a,dispatch:b,debouncedFetchSearchResults:p,onSpecialtyClick:I})})))),"search"===e.focused&&i.createElement(ft,null,i.createElement(St,{type:t,state:e,results:(null===(y=e.searchResults)||void 0===y?void 0:y[t])||[],location:e.selectedLocation.name,dispatch:b,isLoading:s,typeInformation:d,clientSlug:g}))))},Tt=b.div`
563
563
  position: relative;
564
564
 
565
- ${v.mbDown} {
565
+ ${x.mbDown} {
566
566
  width: 100%;
567
567
  display: flex;
568
568
  flex-direction: column;
569
569
  gap: 12px;
570
570
  }
571
- `,Tt=C.div`
571
+ `,Pt=b.div`
572
572
  position: absolute;
573
573
  top: calc(100% + 2px);
574
574
  width: 100%;
575
575
  border-radius: 4px;
576
- background: ${f.colors.white};
576
+ background: ${v.colors.white};
577
577
  box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1);
578
578
  z-index: 10;
579
579
 
580
- ${v.mbDown} {
580
+ ${x.mbDown} {
581
581
  width: calc(100% + 64px);
582
582
  left: -32px;
583
583
  }
584
- `,Pt=C.li`
584
+ `,At=b.li`
585
585
  position: relative;
586
586
  cursor: pointer;
587
587
  padding: 12px 18px;
@@ -599,11 +599,11 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
599
599
  right: 18px;
600
600
  top: 0;
601
601
  height: 1px;
602
- background-color: ${f.colors.neutral100};
602
+ background-color: ${v.colors.neutral100};
603
603
  }
604
604
 
605
605
  &:not([data-is-denied='true']):hover {
606
- background-color: ${f.colors.neutral50};
606
+ background-color: ${v.colors.neutral50};
607
607
  }
608
608
 
609
609
  &:last-child:hover {
@@ -619,37 +619,37 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
619
619
  &[data-is-denied='true'] {
620
620
  cursor: not-allowed;
621
621
  }
622
- `,At=C(U)`
622
+ `,Nt=b(W)`
623
623
  width: 12px;
624
624
  height: 18px;
625
- `,Nt=({state:e,isMobile:t,debouncedFetchCitiesByKeyword:a,selectedLocation:s,trackingAttributes:r,onLocationClick:d,dispatch:h})=>{const{t:g,locale:m}=c(),C=l(null),b=n((()=>r?{"data-event-category":r.dataEventCategory,"data-event-action":r.dataEventAction,"data-event-label":r.dataEventLabel}:{}),[r]),v=o((function(t){h({type:gt.ChangeInputLocation,payload:t}),t.trim().length>ut[e.locale]?a(t.trim()):(a.cancel(),h({type:gt.DisplayInitialCities}))}),[a,h]);return E(C,(()=>{h({type:gt.ClickOutsideInputLocation})})),i.createElement(Rt,{ref:C},i.createElement(k.Wrapper,null,i.createElement(k,Object.assign({size:t?"md":"lg",placeholder:"Search location",value:e.searchLocationKeywords,onFocus:()=>h({type:gt.FocusInputLocation}),onChange:e=>{v(e.target.value)}},b))),"location"===e.focused&&i.createElement(Tt,null,i.createElement(Pt,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;d&&d({name:g("booking.searchBar.allLocations"),id:p,slug:null===(e=u[m])||void 0===e?void 0:e.ALL})}},i.createElement(At,{color:f.colors.neutral400}),i.createElement(y,{size:"md"},g("booking.searchBar.allLocations"))),e.cities.map((e=>i.createElement(Pt,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),d&&d(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==s?void 0:s.id)===e.id},i.createElement(At,{color:f.colors.neutral400}),i.createElement(y,{size:"md"},e.name))))))},Bt=C.div`
625
+ `,Bt=({state:e,isMobile:t,debouncedFetchCitiesByKeyword:a,selectedLocation:s,trackingAttributes:r,onLocationClick:d,dispatch:h})=>{const{t:g,locale:m}=c(),C=l(null),b=n((()=>r?{"data-event-category":r.dataEventCategory,"data-event-action":r.dataEventAction,"data-event-label":r.dataEventLabel}:{}),[r]),y=o((function(t){h({type:mt.ChangeInputLocation,payload:t}),t.trim().length>ht[e.locale]?a(t.trim()):(a.cancel(),h({type:mt.DisplayInitialCities}))}),[a,h]);return S(C,(()=>{h({type:mt.ClickOutsideInputLocation})})),i.createElement(Tt,{ref:C},i.createElement(O.Wrapper,null,i.createElement(O,Object.assign({size:t?"md":"lg",placeholder:"Search location",value:e.searchLocationKeywords,onFocus:()=>h({type:mt.FocusInputLocation}),onChange:e=>{y(e.target.value)}},b))),"location"===e.focused&&i.createElement(Pt,null,i.createElement(At,{key:"all-location",role:"button",tabIndex:0,onClick:()=>{var e;d&&d({name:g("booking.searchBar.allLocations"),id:p,slug:null===(e=u[m])||void 0===e?void 0:e.ALL})}},i.createElement(Nt,{color:v.colors.neutral400}),i.createElement(f,{size:"md"},g("booking.searchBar.allLocations"))),e.cities.map((e=>i.createElement(At,{key:e.id,onClick:t=>{t.nativeEvent.stopImmediatePropagation(),d&&d(e)},role:"button",tabIndex:0,"aria-label":`Select ${e.name} as location`,isSelected:(null==s?void 0:s.id)===e.id},i.createElement(Nt,{color:v.colors.neutral400}),i.createElement(f,{size:"md"},e.name))))))},Vt=b.div`
626
626
  display: flex;
627
627
  flex-wrap: wrap;
628
628
  row-gap: 8px;
629
629
  column-gap: 20px;
630
- ${v.mbDown} {
630
+ ${x.mbDown} {
631
631
  margin-top: 12px;
632
632
  }
633
- `,Vt=C.div`
633
+ `,Dt=b.div`
634
634
  display: flex;
635
635
  align-items: center;
636
636
  border-radius: 8px;
637
- border: 1px solid ${f.colors.neutral100};
638
- background: ${f.colors.white};
637
+ border: 1px solid ${v.colors.neutral100};
638
+ background: ${v.colors.white};
639
639
  padding: 8px 12px 8px 8px;
640
640
  flex: 0 0 calc(33.3% - 13px);
641
641
  gap: 12px;
642
642
  cursor: pointer;
643
643
 
644
644
  &:hover {
645
- background: ${f.colors.blue50};
645
+ background: ${v.colors.blue50};
646
646
  }
647
647
 
648
- ${v.tdDown} {
648
+ ${x.tdDown} {
649
649
  flex: 0 0 calc(50% - 10px);
650
650
  }
651
651
 
652
- ${v.mbDown} {
652
+ ${x.mbDown} {
653
653
  flex: 0 0 100%;
654
654
  border: none;
655
655
  }
@@ -669,7 +669,7 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
669
669
  .infor {
670
670
  flex: 1;
671
671
  .title {
672
- color: ${f.colors.gray800};
672
+ color: ${v.colors.gray800};
673
673
  font-size: 14px;
674
674
  font-style: normal;
675
675
  font-weight: 400;
@@ -677,83 +677,83 @@ import{a as e}from"./tslib.es6-0405df6a.js";import*as t from"react";import i,{us
677
677
  }
678
678
 
679
679
  .description {
680
- color: ${f.colors.gray600};
680
+ color: ${v.colors.gray600};
681
681
  font-size: 12px;
682
682
  font-weight: 400;
683
683
  line-height: 18px;
684
684
  }
685
685
  }
686
- `,Dt=C(O)`
686
+ `,Kt=b(j)`
687
687
  margin: 24px 0 !important;
688
- `,Kt=C.div`
688
+ `,zt=b.div`
689
689
  display: flex;
690
690
  justify-content: center;
691
691
  margin-top: 24px;
692
692
  .show-more {
693
693
  border-radius: 4px;
694
- border: 1px solid ${f.colors.neutral200};
694
+ border: 1px solid ${v.colors.neutral200};
695
695
  padding: 12px 16px;
696
696
  cursor: pointer;
697
697
  display: inline-block;
698
- color: ${f.colors.gray800};
698
+ color: ${v.colors.gray800};
699
699
  font-size: 16px;
700
700
  font-weight: 600;
701
701
  line-height: 24px;
702
702
 
703
- ${v.mbDown} {
703
+ ${x.mbDown} {
704
704
  width: 100%;
705
705
  text-align: center;
706
706
  }
707
707
  }
708
- `,zt=({state:e,isMobile:t,specialties:a,isLoading:o,dispatch:s})=>{const{t:l,locale:r}=c(),{selectedLocation:d}=e,p=n((()=>u[r]),[r]),h=n((()=>a.length>=9||e.searchKeywords.trim().length<=ut[e.locale]),[e.searchKeywords,a]);return i.createElement(i.Fragment,null,!t&&i.createElement(Dt,{color:"#E4E8EC"}),i.createElement(Bt,null,a.length>0&&!o&&i.createElement(i.Fragment,null,a.map(((e,t)=>t>=9?i.createElement(i.Fragment,null):i.createElement(Vt,{key:e.id,onClick:()=>(e=>{const t=`/${d.slug}/${p.DOCTOR}/${e}`;s({type:gt.NavigateTo,payload:t})})(e.slug)},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.thumbnail,alt:e.name})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},e.name)))))),0===a.length&&!o&&i.createElement(y,{size:"sm",color:f.colors.gray400},l("booking.searchBar.noResults")),o&&Array(6).fill(void 0).map(((e,t)=>i.createElement(Vt,{key:"loading"+t},i.createElement("div",{className:"image-item"},i.createElement(L,{height:40,animate:!0})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},i.createElement(L,{height:20,radius:"sm",animate:!0}))))))),h&&i.createElement(Kt,null,i.createElement("div",{className:"show-more",onClick:()=>{const e=`/${p.SPECIALTIES}`;s({type:gt.NavigateTo,payload:e})}},l("home.seeAll"))))},_t=C.div`
708
+ `,_t=({state:e,isMobile:t,specialties:a,isLoading:o,clientSlug:s="",dispatch:l})=>{const{t:r,locale:d}=c(),{selectedLocation:p}=e,h=n((()=>u[d]),[d]),g=n((()=>a.length>=9||e.searchKeywords.trim().length<=ht[e.locale]),[e.searchKeywords,a]);return i.createElement(i.Fragment,null,!t&&i.createElement(Kt,{color:"#E4E8EC"}),i.createElement(Vt,null,a.length>0&&!o&&i.createElement(i.Fragment,null,a.map(((e,t)=>t>=9?i.createElement(i.Fragment,null):i.createElement(Dt,{key:e.id,onClick:()=>(e=>{let t="";t=e===m&&s?`/${p.slug}/${h.HOSPITAL}/${s}/`:`/${p.slug}/${h.DOCTOR}/${e}`,l({type:mt.NavigateTo,payload:t})})(e.slug)},i.createElement("div",{className:"image-item"},i.createElement("img",{src:e.thumbnail,alt:e.name})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},e.name)))))),0===a.length&&!o&&i.createElement(f,{size:"sm",color:v.colors.gray400},r("booking.searchBar.noResults")),o&&Array(6).fill(void 0).map(((e,t)=>i.createElement(Dt,{key:"loading"+t},i.createElement("div",{className:"image-item"},i.createElement(k,{height:40,animate:!0})),i.createElement("div",{className:"infor"},i.createElement("div",{className:"title"},i.createElement(k,{height:20,radius:"sm",animate:!0}))))))),g&&i.createElement(zt,null,i.createElement("div",{className:"show-more",onClick:()=>{const e=`/${h.SPECIALTIES}`;l({type:mt.NavigateTo,payload:e})}},r("home.seeAll"))))},Ht=b.div`
709
709
  display: flex;
710
710
  gap: 5px;
711
711
  margin-top: 16px;
712
712
  flex-wrap: wrap;
713
- `,Ht=C.div`
714
- color: ${f.colors.gray600};
713
+ `,Gt=b.div`
714
+ color: ${v.colors.gray600};
715
715
  font-size: 14px;
716
716
  font-weight: 600;
717
717
  line-height: 22px;
718
718
  padding: 4px 12px;
719
- background: ${f.colors.white};
719
+ background: ${v.colors.white};
720
720
  border-radius: 32px;
721
721
  cursor: pointer;
722
- border: 1px solid ${f.colors.white};
722
+ border: 1px solid ${v.colors.white};
723
723
  margin-bottom: 5px;
724
- border-color: ${f.colors.neutral100};
724
+ border-color: ${v.colors.neutral100};
725
725
  background: #f7f9fc;
726
726
 
727
727
  &.view-all {
728
728
  border-radius: 32px;
729
- border-color: ${f.colors.blue50};
730
- background: ${f.colors.blue50};
731
- color: ${f.colors.blue600};
729
+ border-color: ${v.colors.blue50};
730
+ background: ${v.colors.blue50};
731
+ color: ${v.colors.blue600};
732
732
 
733
733
  &:hover {
734
- border-color: ${f.colors.blue50};
735
- background: ${f.colors.blue50};
736
- color: ${f.colors.blue600};
734
+ border-color: ${v.colors.blue50};
735
+ background: ${v.colors.blue50};
736
+ color: ${v.colors.blue600};
737
737
  }
738
738
  }
739
739
 
740
740
  &:hover {
741
- border-color: ${f.colors.neutral100};
741
+ border-color: ${v.colors.neutral100};
742
742
  background: #f7f9fc;
743
743
  }
744
- `,Gt=C.div`
745
- color: ${f.colors.gray600};
744
+ `,Zt=b.div`
745
+ color: ${v.colors.gray600};
746
746
  font-size: 14px;
747
747
  font-weight: 600;
748
748
  line-height: 22px;
749
749
  padding: 4px 0;
750
- background: ${f.colors.white};
750
+ background: ${v.colors.white};
751
751
  border-radius: 32px;
752
- border: 1px solid ${f.colors.white};
752
+ border: 1px solid ${v.colors.white};
753
753
  margin-bottom: 5px;
754
754
  margin-right: 7px;
755
- `,Zt=({state:e,type:t,typeInformation:a,dispatch:o})=>{const{t:s}=c(),{selectedLocation:l}=e,r=n((()=>a[t].slug),[a,t]);return i.createElement(_t,null,i.createElement(Gt,null,s("booking.searchBar.popularKey")),e.popularKeys.map((e=>i.createElement(Ht,{key:e.id,onClick:()=>{var t;(t=e).url&&(window.location.href=t.url)}},e.keyword))),i.createElement(Ht,{className:"view-all",onClick:()=>{const e=`/${l.slug}/${r}`;e&&o({type:gt.NavigateTo,payload:e})}},s("booking.searchBar.viewAll")))},Yt=C.div`
755
+ `,Yt=({state:e,type:t,typeInformation:a,dispatch:o})=>{const{t:s}=c(),{selectedLocation:l}=e,r=n((()=>a[t].slug),[a,t]);return i.createElement(Ht,null,i.createElement(Zt,null,s("booking.searchBar.popularKey")),e.popularKeys.map((e=>i.createElement(Gt,{key:e.id,onClick:()=>{var t;(t=e).url&&(window.location.href=t.url)}},e.keyword))),i.createElement(Gt,{className:"view-all",onClick:()=>{const e=`/${l.slug}/${r}`;e&&o({type:mt.NavigateTo,payload:e})}},s("booking.searchBar.viewAll")))},Ut=b.div`
756
756
  background: rgba(255, 255, 255, 0.64);
757
757
  backdrop-filter: blur(12px);
758
- border-bottom: 1px solid ${f.colors.neutral100};
759
- `,Ut=({currentTab:e,hideTabBookingSearch:t=[],isMobile:a,setCurrentTab:o})=>{const{t:s}=c(),l=n((()=>({root:{overflowY:a?"hidden":"initial",overflowX:a?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:a?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:a?"14px":"16px",fontWeight:600,lineHeight:a?"22px":"24px"}})),[a]),r=(()=>{const{t:e}=c();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),d=n((()=>r.filter((e=>!t.includes(e.value)))||[]),[t,r]);return i.createElement(Yt,{className:"booking-search-tab"},i.createElement(A,null,i.createElement(j,{value:e,onTabChange:e=>{o(e)},styles:l},i.createElement(j.List,null,d.map((e=>i.createElement(j.Tab,{value:e.value,key:e.value},s(e.label))))))))};var Wt;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(Wt||(Wt={}));const Qt=({isMobile:e,careApiDomain:t,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:y="",initTypeSearch:f="hospital",initSpecialty:v,careFrontDomain:x="/care",isDebug:w=!1,gaTrackingSearchBar:L,gaTrackingLocationSearch:k,autoCompleteDisabled:O=!1,inputSearchPlaceholder:j="",hideTabBookingSearch:M=[],hideSpecialtySelection:$=!1,hidePopularSearchKeys:R=!1,clientSlug:T="",routerPush:P,onGeoLocationPermissionChange:A,onChangeLocation:N})=>{const{locale:B,t:V}=c(),K=l(null),z=l(null),[_,H]=a(f),{geoLocationPermission:G,geoLocationCoordinates:Z}=D(),[Y,U]=r(Ct,ht,(t=>Object.assign(Object.assign({},t),{isDebug:w,isMobile:e,geoLocationPermission:m||G||"unset",geoLocationCoordinates:C||Z||null,searchKeywords:y,initialSelectedCity:b||null,selectedLocation:b||t.selectedLocation||null,searchLocationKeywords:(null==b?void 0:b.name)||t.searchLocationKeywords,autoCompleteDisabled:O,inputSearchPlaceholder:j,locale:B}))),{navigateTo:W,focusedSpecialty:Q,searchKeywords:q,geoLocationPermission:J,selectedLocation:X,selectedSpecialty:ee,initialSelectedCity:te,searchResults:ie,isLoadingSearchResults:ae}=Y,{fetchCitiesByLocation:oe,fetchCitiesByKeyword:ne,fetchSearchResults:se,fetchAllSpecialties:le,fetchPopularKeys:re}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const a=o((function(a,o={}){const n=`${t}${a}`;return e({type:gt.FetchCitiesStart}),fetch(lt(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:gt.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:o((function({coordinates:t}){let o={};const n={};t&&(o={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(n.noPaging=1);const s=[a(S.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(S.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:gt.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(S.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:gt.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:o((function(a,o,n,s,l){const r="specialty"===n?`${t}${S.GET_SEARCH_SPECIALTY}`:`${t}${S.GET_SEARCH_V2}`;e({type:gt.FetchSearchResultsStart});const{selectedLocation:c,geoLocationCoordinates:d,selectedSpecialty:u}=o;let g="";if(!c)return void e({type:gt.FetchSearchResultsFinish});g=c.id===p?"":c.id;const m=(null==d?void 0:d.lat)||"",C=(null==d?void 0:d.lng)||"",b=(null==u?void 0:u.id)>0?null==u?void 0:u.id:"",y=a.trim().length>ut[i]?a.trim():"";return fetch(lt(r,{domain:t,searchType:n||"global",keyword:y,city:g===h?"":g,lat:m,lng:C,specialty_id:b,client_slug:s},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let i=[];"specialty"!==n&&(i=t.searches),"specialty"===n&&(i=y?t.specialties:t.default),e({type:gt.FetchSearchResultsComplete,payload:{key:n,searches:i||[]}}),l&&e({type:gt.UpdateInitialSearchResults,payload:{key:n,searches:i||[]}})})).catch((e=>{console.log("error loading search results",{url:r,error:e})})).finally((()=>e({type:gt.FetchSearchResultsFinish})))}),[i,t,e]),fetchAllSpecialties:o((function(){const a=`${t}${S.GET_SEARCH_SPECIALTY}`;return fetch(lt(a,{domain:t,searchType:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:gt.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:a,error:e})}))}),[i,t,e]),fetchPopularKeys:o((function(a){const o=`${t}${S.GET_SEARCH_POPULAR_KEY}`;return fetch(lt(o,{domain:t,searchType:Wt[a],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:gt.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,t,e])}}({dispatch:U,locale:B,careApiDomain:t}),ce=n((()=>u[B]),[B]),de=n((()=>({doctor:{name:V("booking.searchPopup.doctors"),icon:i.createElement(Ot,null),slug:ce.DOCTOR},service:{name:V("booking.searchPopup.services"),icon:i.createElement(jt,null),slug:ce.SERVICE},hospital:{name:V("booking.searchPopup.hospitals"),icon:i.createElement(It,null),slug:ce.HOSPITAL},specialty:{name:V("booking.searchPopup.specialties"),icon:i.createElement(Ft,null),slug:ce.SPECIALTIES}})),[_]),pe=n((()=>d(ne,400)),[ne]),ue=n((()=>d(se,400)),[se]),he=o((function(e){U({type:gt.SelectLocation,payload:e}),ge(),N&&N(e)}),[V,U]);function ge(){var e;K.current&&(null===(e=K.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return E(z,(()=>{U({type:gt.ClickOutsideInputSearchSpecialty})})),s((()=>{var t;"denied"===J||te||U({type:gt.SelectLocation,payload:{name:V("booking.searchBar.allLocations"),id:p,slug:null===(t=u[B])||void 0===t?void 0:t.ALL}}),A&&A(J,Y.geoLocationCoordinates),e&&"granted"===J&&X&&U({type:gt.FocusInputSearch}),oe({coordinates:Y.geoLocationCoordinates})}),[J]),s((()=>{const e=v||{name:V("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ce.SPECIALTIES};Y.selectedSpecialty||U({type:gt.SelectSpecialty,payload:e})}),[v,Y.selectedSpecialty]),s((()=>{le()}),[]),s((()=>{re(_)}),[_]),s((()=>{W&&(P?P(W):window.location.href=`${x}${W}`)}),[W]),s((()=>{se(Y.searchKeywords,Y,_,T,!0)}),[X,ee,_]),i.createElement(ct,{ref:K},i.createElement(Ut,{currentTab:_,setCurrentTab:H,isMobile:e,hideTabBookingSearch:M}),i.createElement(dt,{className:"booking-search-container"},i.createElement(pt,null,i.createElement("div",{ref:z},i.createElement(I,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==_&&i.createElement(Nt,{state:Y,isMobile:e,dispatch:U,debouncedFetchCitiesByKeyword:pe,selectedLocation:X,onLocationClick:he,trackingAttributes:k}),i.createElement($t,{type:_,isMobile:e,state:Y,dispatch:U,debouncedFetchSearchResults:ue,initalSearchValue:y,focusSearchInput:ge,typeInformation:de,trackingAttributes:L,isLoading:ae,hideSpecialtySelection:$,clientSlug:T}),i.createElement(F,{size:e?"md":"lg",fullWidth:e,onClick:function(){let e="";const{slug:t}=de[_];let i="";("doctor"===_||"hospital"===_)&&Y.selectedSpecialty.id>0&&(i=`&specialtyId=${Y.selectedSpecialty.id}`),e="specialty"===_?`/${t}`:`/${X.slug}/${t}`,T===g&&(e+=`/${T}`),e+=`?q=${q}${i}`,e&&U({type:gt.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},V("booking.searchBar.searchButton"))),!R&&"specialty"!==_&&Y.popularKeys.length>0&&i.createElement(Zt,{type:_,state:Y,typeInformation:de,dispatch:U}),"specialty"===_&&"search"===Q&&i.createElement(zt,{state:Y,isMobile:e,dispatch:U,specialties:(null==ie?void 0:ie.specialty)||[],isLoading:ae})))))};var qt;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(qt||(qt={}));var Jt=Object.freeze({__proto__:null,get RedirectType(){return qt}});export{rt as B,V as C,Qt as a,Jt as t};
758
+ border-bottom: 1px solid ${v.colors.neutral100};
759
+ `,Wt=({currentTab:e,hideTabBookingSearch:t=[],isMobile:a,setCurrentTab:o})=>{const{t:s}=c(),l=n((()=>({root:{overflowY:a?"hidden":"initial",overflowX:a?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:a?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:a?"14px":"16px",fontWeight:600,lineHeight:a?"22px":"24px"}})),[a]),r=(()=>{const{t:e}=c();return[{value:"hospital",label:e("booking.searchPopup.hospitals")},{value:"doctor",label:e("booking.searchPopup.doctors")},{value:"service",label:e("booking.searchPopup.services")},{value:"specialty",label:e("booking.searchPopup.specialties")}]})(),d=n((()=>r.filter((e=>!t.includes(e.value)))||[]),[t,r]);return i.createElement(Ut,{className:"booking-search-tab"},i.createElement(N,null,i.createElement(I,{value:e,onTabChange:e=>{o(e)},styles:l},i.createElement(I.List,null,d.map((e=>i.createElement(I.Tab,{value:e.value,key:e.value},s(e.label))))))))};var Qt;!function(e){e.doctor="doctor",e.service="hospital_service",e.hospital="hospital_branch"}(Qt||(Qt={}));const qt=({isMobile:e,careApiDomain:t,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:y="",initTypeSearch:f="hospital",initSpecialty:v,careFrontDomain:x="/care",isDebug:w=!1,gaTrackingSearchBar:E,gaTrackingLocationSearch:k,autoCompleteDisabled:O=!1,inputSearchPlaceholder:j="",hideTabBookingSearch:I=[],hideSpecialtySelection:M=!1,hidePopularSearchKeys:R=!1,clientSlug:T="",routerPush:P,onGeoLocationPermissionChange:A,onChangeLocation:N})=>{const{locale:B,t:V}=c(),D=l(null),z=l(null),[_,H]=a(f),{geoLocationPermission:G,geoLocationCoordinates:Z}=K(),[Y,U]=r(bt,gt,(t=>Object.assign(Object.assign({},t),{isDebug:w,isMobile:e,geoLocationPermission:m||G||"unset",geoLocationCoordinates:C||Z||null,searchKeywords:y,initialSelectedCity:b||null,selectedLocation:b||t.selectedLocation||null,searchLocationKeywords:(null==b?void 0:b.name)||t.searchLocationKeywords,autoCompleteDisabled:O,inputSearchPlaceholder:j,locale:B}))),{navigateTo:W,focusedSpecialty:Q,searchKeywords:q,geoLocationPermission:J,selectedLocation:X,selectedSpecialty:ee,initialSelectedCity:te,searchResults:ie,isLoadingSearchResults:ae}=Y,{fetchCitiesByLocation:oe,fetchCitiesByKeyword:ne,fetchSearchResults:se,fetchAllSpecialties:le,fetchPopularKeys:re}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const a=o((function(a,o={}){const n=`${t}${a}`;return e({type:mt.FetchCitiesStart}),fetch(rt(n,o,i),{method:"GET"}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e)))).finally((()=>e({type:mt.FetchCitiesFinish})))}),[i]);return{fetchCitiesByLocation:o((function({coordinates:t}){let o={};const n={};t&&(o={lat:t.lat,lng:t.lng}),"ms-MY"===i&&(n.noPaging=1);const s=[a(L.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(L.GET_CITIES_LIST,{noPaging:1})),Promise.all(s).then((([t,i])=>{const a=Object.assign({},t);if(i){const e=a.cities.map((e=>e.id));a.cities=a.cities.concat(i.cities.filter((t=>!e.includes(t.id))))}e({type:mt.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(L.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:mt.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:o((function(a,o,n,s,l){const r="specialty"===n?`${t}${L.GET_SEARCH_SPECIALTY}`:`${t}${L.GET_SEARCH_V2}`;e({type:mt.FetchSearchResultsStart});const{selectedLocation:c,geoLocationCoordinates:d,selectedSpecialty:u}=o;let g="";if(!c)return void e({type:mt.FetchSearchResultsFinish});g=c.id===p?"":c.id;const m=(null==d?void 0:d.lat)||"",C=(null==d?void 0:d.lng)||"",b=(null==u?void 0:u.id)>0?null==u?void 0:u.id:"",y=a.trim().length>ht[i]?a.trim():"";return fetch(rt(r,{domain:t,searchType:n||"global",keyword:y,city:g===h?"":g,lat:m,lng:C,specialty_id:b,client_slug:s},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{let i=[];"specialty"!==n&&(i=t.searches),"specialty"===n&&(i=y?t.specialties:t.default),e({type:mt.FetchSearchResultsComplete,payload:{key:n,searches:i||[]}}),l&&e({type:mt.UpdateInitialSearchResults,payload:{key:n,searches:i||[]}})})).catch((e=>{console.log("error loading search results",{url:r,error:e})})).finally((()=>e({type:mt.FetchSearchResultsFinish})))}),[i,t,e]),fetchAllSpecialties:o((function(){const a=`${t}${L.GET_SEARCH_SPECIALTY}`;return fetch(rt(a,{domain:t,searchType:""},i),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:mt.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:a,error:e})}))}),[i,t,e]),fetchPopularKeys:o((function(a){const o=`${t}${L.GET_SEARCH_POPULAR_KEY}`;return fetch(rt(o,{domain:t,searchType:Qt[a],sort_by:"display_order",sort_order:"asc"},i)).then((e=>e.json())).then((e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e))).then((t=>{e({type:mt.FetchPopularKeys,payload:t.popular_searches||[]})})).catch((e=>{console.log("error loading search results",{url:o,error:e})}))}),[i,t,e])}}({dispatch:U,locale:B,careApiDomain:t}),ce=n((()=>u[B]),[B]),de=n((()=>({doctor:{name:V("booking.searchPopup.doctors"),icon:i.createElement(jt,null),slug:ce.DOCTOR},service:{name:V("booking.searchPopup.services"),icon:i.createElement(It,null),slug:ce.SERVICE},hospital:{name:V("booking.searchPopup.hospitals"),icon:i.createElement(Ft,null),slug:ce.HOSPITAL},specialty:{name:V("booking.searchPopup.specialties"),icon:i.createElement($t,null),slug:ce.SPECIALTIES}})),[_]),pe=n((()=>d(ne,400)),[ne]),ue=n((()=>d(se,400)),[se]),he=o((function(e){U({type:mt.SelectLocation,payload:e}),ge(),N&&N(e)}),[V,U]);function ge(){var e;D.current&&(null===(e=D.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return S(z,(()=>{U({type:mt.ClickOutsideInputSearchSpecialty})})),s((()=>{var t;"denied"===J||te||U({type:mt.SelectLocation,payload:{name:V("booking.searchBar.allLocations"),id:p,slug:null===(t=u[B])||void 0===t?void 0:t.ALL}}),A&&A(J,Y.geoLocationCoordinates),e&&"granted"===J&&X&&U({type:mt.FocusInputSearch}),oe({coordinates:Y.geoLocationCoordinates})}),[J]),s((()=>{const e=v||{name:V("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:ce.SPECIALTIES};Y.selectedSpecialty||U({type:mt.SelectSpecialty,payload:e})}),[v,Y.selectedSpecialty]),s((()=>{le()}),[]),s((()=>{re(_)}),[_]),s((()=>{W&&(P?P(W):window.location.href=`${x}${W}`)}),[W]),s((()=>{se(Y.searchKeywords,Y,_,T,!0)}),[X,ee,_]),i.createElement(dt,{ref:D},i.createElement(Wt,{currentTab:_,setCurrentTab:H,isMobile:e,hideTabBookingSearch:I}),i.createElement(pt,{className:"booking-search-container"},i.createElement(ut,null,i.createElement("div",{ref:z},i.createElement(F,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==_&&i.createElement(Bt,{state:Y,isMobile:e,dispatch:U,debouncedFetchCitiesByKeyword:pe,selectedLocation:X,onLocationClick:he,trackingAttributes:k}),i.createElement(Rt,{type:_,isMobile:e,state:Y,dispatch:U,debouncedFetchSearchResults:ue,initalSearchValue:y,focusSearchInput:ge,typeInformation:de,trackingAttributes:E,isLoading:ae,hideSpecialtySelection:M,clientSlug:T}),i.createElement($,{size:e?"md":"lg",fullWidth:e,onClick:function(){let e="";const{slug:t}=de[_];let i="";("doctor"===_||"hospital"===_)&&Y.selectedSpecialty.id>0&&(i=`&specialtyId=${Y.selectedSpecialty.id}`),e="specialty"===_?`/${t}`:`/${X.slug}/${t}`,T===g&&(e+=`/${T}`),e+=`?q=${q}${i}`,e&&U({type:mt.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},V("booking.searchBar.searchButton"))),!R&&"specialty"!==_&&Y.popularKeys.length>0&&i.createElement(Yt,{type:_,state:Y,typeInformation:de,dispatch:U}),"specialty"===_&&"search"===Q&&i.createElement(_t,{state:Y,isMobile:e,dispatch:U,specialties:(null==ie?void 0:ie.specialty)||[],isLoading:ae,clientSlug:T})))))};var Jt;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Jt||(Jt={}));var Xt=Object.freeze({__proto__:null,get RedirectType(){return Jt}});export{ct as B,D as C,qt as a,Xt as t};