@hhgtech/hhg-components 1.27.72 → 1.27.73

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 (265) hide show
  1. package/build/babyGrowth.js +2 -2
  2. package/build/cache.js +1 -1
  3. package/build/care.js +1 -1
  4. package/build/components.js +1 -1
  5. package/build/constants.js +1 -1
  6. package/build/core-1296b978.js +1 -0
  7. package/build/{dataTransform-a610dba2.js → dataTransform-b57ffe49.js} +1 -1
  8. package/build/ecom.js +1 -1
  9. package/build/esm/babyGrowth.js +4 -4
  10. package/build/esm/cache.js +1 -1
  11. package/build/esm/care.js +1 -1
  12. package/build/esm/components.js +1 -1
  13. package/build/esm/constants.js +1 -1
  14. package/build/esm/core-aef19cc1.js +1 -0
  15. package/build/esm/{dataTransform-474b6557.js → dataTransform-acd309eb.js} +1 -1
  16. package/build/esm/ecom.js +1 -1
  17. package/build/esm/{fixedBottomAdBlock-5ed62fc2.js → fixedBottomAdBlock-4f598b4e.js} +1 -1
  18. package/build/esm/footer.js +1 -1
  19. package/build/esm/gAssets.js +1 -1
  20. package/build/esm/getDynamicHealthTool-e1e9eb88.js +1 -0
  21. package/build/esm/{getSocialList-e2edc6f8.js → getSocialList-62952c6e.js} +1 -1
  22. package/build/esm/hooks.js +1 -1
  23. package/build/esm/i18n.js +1 -1
  24. package/build/esm/i18nV2.js +1 -1
  25. package/build/esm/{index-699a67a1.js → index-03fb3d5f.js} +1 -1
  26. package/build/esm/{index-ef52a951.js → index-25a079fc.js} +1 -1
  27. package/build/esm/index-2b4f9440.js +1 -0
  28. package/build/esm/{index-066e1f8c.js → index-2bd17e3a.js} +1 -1
  29. package/build/esm/{index-eef47a39.js → index-2dbad103.js} +1 -1
  30. package/build/esm/index-4c42fd2d.js +1 -0
  31. package/build/esm/{index-b42eddeb.js → index-58d76b74.js} +1 -1
  32. package/build/esm/{index-33a767db.js → index-61b40bb3.js} +2 -2
  33. package/build/esm/{index-d92f4c41.js → index-6c3b66ef.js} +1 -1
  34. package/build/esm/{index-eed61604.js → index-7768bc42.js} +1 -1
  35. package/build/esm/{index-ffe1f1b4.js → index-77a12ad4.js} +1 -1
  36. package/build/esm/index-a46315a8.js +1 -0
  37. package/build/esm/{index-75e66b82.js → index-ac0440c7.js} +1 -1
  38. package/build/esm/{index-aa0f1be7.js → index-acb68002.js} +1 -1
  39. package/build/esm/{index-30364853.js → index-b6603e31.js} +1 -1
  40. package/build/esm/{index-c7061390.js → index-ca8ba9cb.js} +1 -1
  41. package/build/esm/{index-13b5fcc4.js → index-d96a464a.js} +1 -1
  42. package/build/esm/{index-b7da5adf.js → index-d99f5fe1.js} +2 -2
  43. package/build/esm/{index-940a2837.js → index-dc45af44.js} +1 -1
  44. package/build/esm/{index-7c0c9a23.js → index-e006ea08.js} +1 -1
  45. package/build/esm/{index-52cbdc13.js → index-e8aa27ee.js} +1 -1
  46. package/build/esm/index.js +1 -1
  47. package/build/esm/{index.styled-d630ba54.js → index.styled-574d9f4e.js} +4 -4
  48. package/build/esm/{index.styled-6b23e614.js → index.styled-9454d250.js} +9 -9
  49. package/build/esm/{index.styled-73921818.js → index.styled-f8d51cb2.js} +3 -3
  50. package/build/esm/lead.js +1 -1
  51. package/build/esm/mantine.js +1 -1
  52. package/build/esm/misc.js +1 -1
  53. package/build/esm/navigation.js +1 -1
  54. package/build/esm/onboarding.js +1 -1
  55. package/build/esm/onboardingV2.js +1 -1
  56. package/build/esm/pwg.js +5 -5
  57. package/build/esm/{routing-8b859474.js → routing-2ca62b4e.js} +1 -1
  58. package/build/esm/together.js +1 -1
  59. package/build/esm/{types-b03d781d.js → types-9b1fb32b.js} +1 -1
  60. package/build/esm/{types-eac9771c.js → types-d69ee206.js} +12 -12
  61. package/build/esm/types.js +1 -1
  62. package/build/esm/useHealthToolCache-77748b45.js +1 -0
  63. package/build/esm/{useRafState-326a32a7.js → useRafState-24287f60.js} +1 -1
  64. package/build/esm/{useTranslations-7597d802.js → useTranslations-e8adac8a.js} +1 -1
  65. package/build/esm/{utils-8db4813e.js → utils-0f4c6649.js} +1 -1
  66. package/build/esm/{utils-df78bdca.js → utils-49cd0015.js} +1 -1
  67. package/build/esm/vaccination.js +5 -5
  68. package/build/{fixedBottomAdBlock-efff2f32.js → fixedBottomAdBlock-dd768903.js} +1 -1
  69. package/build/footer.js +1 -1
  70. package/build/gAssets.js +1 -1
  71. package/build/getDynamicHealthTool-365b67da.js +1 -0
  72. package/build/{getSocialList-3ea88d7b.js → getSocialList-a0d8c4a7.js} +1 -1
  73. package/build/hooks.js +1 -1
  74. package/build/i18n.js +1 -1
  75. package/build/i18nV2.js +1 -1
  76. package/build/{index-d4846e3a.js → index-1f22fb4d.js} +1 -1
  77. package/build/{index-8324905e.js → index-2115a785.js} +1 -1
  78. package/build/{index-6bce8ea9.js → index-2ba9af52.js} +1 -1
  79. package/build/{index-945b6fd5.js → index-2bafc328.js} +1 -1
  80. package/build/{index-684d4b18.js → index-3cfe6be9.js} +1 -1
  81. package/build/{index-83b85075.js → index-487def80.js} +2 -2
  82. package/build/{index-d107f239.js → index-54f6d8ba.js} +1 -1
  83. package/build/{index-ed56a039.js → index-56226bf8.js} +1 -1
  84. package/build/{index-8ab8ccad.js → index-650f746c.js} +1 -1
  85. package/build/{index-3843f4de.js → index-6c6477b0.js} +1 -1
  86. package/build/index-70e4f70a.js +53 -0
  87. package/build/{index-56cbbe46.js → index-8cac71fc.js} +1 -1
  88. package/build/{index-7e2c352a.js → index-98b4c324.js} +1 -1
  89. package/build/{index-a89418e3.js → index-b2cc7acc.js} +1 -1
  90. package/build/{index-6819831b.js → index-bf806fa4.js} +1 -1
  91. package/build/index-e0fd117e.js +1 -0
  92. package/build/{index-8738dafb.js → index-eabacc42.js} +1 -1
  93. package/build/{index-3cd3e667.js → index-f33dd806.js} +1 -1
  94. package/build/{index-47af3631.js → index-f56461c2.js} +1 -1
  95. package/build/{index-79d33036.js → index-f5843f88.js} +1 -1
  96. package/build/{index-d0ab8429.js → index-fd68bdb7.js} +1 -1
  97. package/build/index.js +1 -1
  98. package/build/{index.styled-f26d68bc.js → index.styled-38be6a23.js} +1 -1
  99. package/build/{index.styled-522d2abb.js → index.styled-ab1adfdd.js} +1 -1
  100. package/build/{index.styled-e69e3538.js → index.styled-cce65f47.js} +3 -3
  101. package/build/lead.js +1 -1
  102. package/build/mantine.js +1 -1
  103. package/build/misc.js +1 -1
  104. package/build/navigation.js +1 -1
  105. package/build/onboarding.js +1 -1
  106. package/build/onboardingV2.js +1 -1
  107. package/build/pwg.js +1 -1
  108. package/build/{routing-01287887.js → routing-eb58bf99.js} +1 -1
  109. package/build/together.js +1 -1
  110. package/build/{types-a73e1726.js → types-c6b697e7.js} +2 -2
  111. package/build/{types-317f61f9.js → types-dc124c2c.js} +1 -1
  112. package/build/types.js +1 -1
  113. package/build/useHealthToolCache-374f4461.js +1 -0
  114. package/build/{useRafState-38ff191f.js → useRafState-2bfbf48d.js} +1 -1
  115. package/build/{useTranslations-4d34c49d.js → useTranslations-388b2c98.js} +1 -1
  116. package/build/utils-2bd51637.js +1 -0
  117. package/build/{utils-6de25682.js → utils-66fc3fa8.js} +1 -1
  118. package/build/vaccination.js +1 -1
  119. package/package.json +1 -1
  120. package/build/core-0404054c.js +0 -1
  121. package/build/esm/core-7af1314a.js +0 -1
  122. package/build/esm/getDynamicHealthTool-5c62bbce.js +0 -1
  123. package/build/esm/index-164612c2.js +0 -1
  124. package/build/esm/index-258ac3a9.js +0 -1
  125. package/build/esm/index-7dbac417.js +0 -1
  126. package/build/esm/useHealthToolCache-e518b9cb.js +0 -1
  127. package/build/getDynamicHealthTool-ec24ee37.js +0 -1
  128. package/build/index-794f6abb.js +0 -53
  129. package/build/index-c5e25a84.js +0 -1
  130. package/build/useHealthToolCache-040d0c35.js +0 -1
  131. package/build/utils-34552ca3.js +0 -1
  132. /package/build/{BMI_BOYS.percentile.monthly-be764fab.js → BMI_BOYS.percentile.monthly-e7969a8c.js} +0 -0
  133. /package/build/{BMI_BOYS.percentile.weekly-717ff870.js → BMI_BOYS.percentile.weekly-42b951dc.js} +0 -0
  134. /package/build/{BMI_BOYS.percentile.yearly-c36817f8.js → BMI_BOYS.percentile.yearly-933664a5.js} +0 -0
  135. /package/build/{BMI_BOYS.zscore.monthly-32f81da6.js → BMI_BOYS.zscore.monthly-f17ef1fa.js} +0 -0
  136. /package/build/{BMI_BOYS.zscore.weekly-7a8efbce.js → BMI_BOYS.zscore.weekly-ed7cc2ee.js} +0 -0
  137. /package/build/{BMI_BOYS.zscore.yearly-ea5ee846.js → BMI_BOYS.zscore.yearly-096bfd78.js} +0 -0
  138. /package/build/{BMI_GIRLS.percentile.monthly-fafb1975.js → BMI_GIRLS.percentile.monthly-bdb9e678.js} +0 -0
  139. /package/build/{BMI_GIRLS.percentile.weekly-0f67721f.js → BMI_GIRLS.percentile.weekly-e9e42718.js} +0 -0
  140. /package/build/{BMI_GIRLS.percentile.yearly-7188c946.js → BMI_GIRLS.percentile.yearly-ecfbd535.js} +0 -0
  141. /package/build/{BMI_GIRLS.zscore.monthly-ad6d0a8f.js → BMI_GIRLS.zscore.monthly-8b52f84f.js} +0 -0
  142. /package/build/{BMI_GIRLS.zscore.weekly-e06dbae9.js → BMI_GIRLS.zscore.weekly-c1519c5f.js} +0 -0
  143. /package/build/{BMI_GIRLS.zscore.yearly-b477d025.js → BMI_GIRLS.zscore.yearly-c72f1e1b.js} +0 -0
  144. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-00445d26.js → HEAD CIRCUM_BOYS.percentile.monthly-d6942910.js} +0 -0
  145. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-67a1e177.js → HEAD CIRCUM_BOYS.percentile.weekly-7bbe3d72.js} +0 -0
  146. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-981651d2.js → HEAD CIRCUM_BOYS.percentile.yearly-cf2082c8.js} +0 -0
  147. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-31a26be4.js → HEAD CIRCUM_BOYS.zscore.monthly-fa1d4ea1.js} +0 -0
  148. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-42e932cb.js → HEAD CIRCUM_BOYS.zscore.weekly-46201be1.js} +0 -0
  149. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-c2ba3a34.js → HEAD CIRCUM_BOYS.zscore.yearly-6f6a75ef.js} +0 -0
  150. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-c7cd5712.js → HEAD CIRCUM_GIRLS.percentile.monthly-2d3c69ed.js} +0 -0
  151. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-bdde3016.js → HEAD CIRCUM_GIRLS.percentile.weekly-38c7470e.js} +0 -0
  152. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-083f2f97.js → HEAD CIRCUM_GIRLS.percentile.yearly-7e815061.js} +0 -0
  153. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-7e5d7105.js → HEAD CIRCUM_GIRLS.zscore.monthly-966e1673.js} +0 -0
  154. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-5467f154.js → HEAD CIRCUM_GIRLS.zscore.weekly-397d5497.js} +0 -0
  155. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-5b292847.js → HEAD CIRCUM_GIRLS.zscore.yearly-51c69a5c.js} +0 -0
  156. /package/build/{HEIGHT_BOYS.percentile.monthly-b9d24b9f.js → HEIGHT_BOYS.percentile.monthly-bf8bed39.js} +0 -0
  157. /package/build/{HEIGHT_BOYS.percentile.weekly-cd1daad2.js → HEIGHT_BOYS.percentile.weekly-51275e3e.js} +0 -0
  158. /package/build/{HEIGHT_BOYS.percentile.yearly-718da8a9.js → HEIGHT_BOYS.percentile.yearly-d9baf324.js} +0 -0
  159. /package/build/{HEIGHT_BOYS.zscore.monthly-93c88a85.js → HEIGHT_BOYS.zscore.monthly-4c7134a9.js} +0 -0
  160. /package/build/{HEIGHT_BOYS.zscore.weekly-221290aa.js → HEIGHT_BOYS.zscore.weekly-ea470e59.js} +0 -0
  161. /package/build/{HEIGHT_BOYS.zscore.yearly-dbc6ef38.js → HEIGHT_BOYS.zscore.yearly-b4001eac.js} +0 -0
  162. /package/build/{HEIGHT_GIRLS.percentile.monthly-5a941c7f.js → HEIGHT_GIRLS.percentile.monthly-97007a17.js} +0 -0
  163. /package/build/{HEIGHT_GIRLS.percentile.weekly-6513f88c.js → HEIGHT_GIRLS.percentile.weekly-2d9cf38b.js} +0 -0
  164. /package/build/{HEIGHT_GIRLS.percentile.yearly-a80bec60.js → HEIGHT_GIRLS.percentile.yearly-dcc7e180.js} +0 -0
  165. /package/build/{HEIGHT_GIRLS.zscore.monthly-9f006152.js → HEIGHT_GIRLS.zscore.monthly-05dab57e.js} +0 -0
  166. /package/build/{HEIGHT_GIRLS.zscore.weekly-ed46a9be.js → HEIGHT_GIRLS.zscore.weekly-9c1227b0.js} +0 -0
  167. /package/build/{HEIGHT_GIRLS.zscore.yearly-55a6e918.js → HEIGHT_GIRLS.zscore.yearly-f69f0c16.js} +0 -0
  168. /package/build/{Onboarding-30977a28.js → Onboarding-763263bd.js} +0 -0
  169. /package/build/{Visible-73a9c61e.js → Visible-1510daae.js} +0 -0
  170. /package/build/{WEIGHT_BOYS.percentile.monthly-9211cc59.js → WEIGHT_BOYS.percentile.monthly-5aef6340.js} +0 -0
  171. /package/build/{WEIGHT_BOYS.percentile.weekly-d4613745.js → WEIGHT_BOYS.percentile.weekly-78eae415.js} +0 -0
  172. /package/build/{WEIGHT_BOYS.percentile.yearly-fe3e0acc.js → WEIGHT_BOYS.percentile.yearly-3e111a86.js} +0 -0
  173. /package/build/{WEIGHT_BOYS.zscore.monthly-c8b51e11.js → WEIGHT_BOYS.zscore.monthly-88e278fc.js} +0 -0
  174. /package/build/{WEIGHT_BOYS.zscore.weekly-915b7636.js → WEIGHT_BOYS.zscore.weekly-ad3d219a.js} +0 -0
  175. /package/build/{WEIGHT_BOYS.zscore.yearly-63b05989.js → WEIGHT_BOYS.zscore.yearly-cdc469bc.js} +0 -0
  176. /package/build/{WEIGHT_GIRLS.percentile.monthly-2b7b348c.js → WEIGHT_GIRLS.percentile.monthly-ef315c6b.js} +0 -0
  177. /package/build/{WEIGHT_GIRLS.percentile.weekly-396c0d03.js → WEIGHT_GIRLS.percentile.weekly-b9b2294d.js} +0 -0
  178. /package/build/{WEIGHT_GIRLS.percentile.yearly-6dc1ee7c.js → WEIGHT_GIRLS.percentile.yearly-573f8c5f.js} +0 -0
  179. /package/build/{WEIGHT_GIRLS.zscore.monthly-8dd66e65.js → WEIGHT_GIRLS.zscore.monthly-dcf55ae9.js} +0 -0
  180. /package/build/{WEIGHT_GIRLS.zscore.weekly-e7309a28.js → WEIGHT_GIRLS.zscore.weekly-32036680.js} +0 -0
  181. /package/build/{WEIGHT_GIRLS.zscore.yearly-46483619.js → WEIGHT_GIRLS.zscore.yearly-f472782e.js} +0 -0
  182. /package/build/{constants-d085b55e.js → constants-2a1ae49b.js} +0 -0
  183. /package/build/{cookieHelper-113d5d8f.js → cookieHelper-c02a9835.js} +0 -0
  184. /package/build/{dataTransform-db7919b9.js → dataTransform-50ca2b71.js} +0 -0
  185. /package/build/esm/{BMI_BOYS.percentile.monthly-e82cdc65.js → BMI_BOYS.percentile.monthly-026be207.js} +0 -0
  186. /package/build/esm/{BMI_BOYS.percentile.weekly-20d30be1.js → BMI_BOYS.percentile.weekly-9d11ceed.js} +0 -0
  187. /package/build/esm/{BMI_BOYS.percentile.yearly-7cf08717.js → BMI_BOYS.percentile.yearly-915860f5.js} +0 -0
  188. /package/build/esm/{BMI_BOYS.zscore.monthly-390537ec.js → BMI_BOYS.zscore.monthly-027665dd.js} +0 -0
  189. /package/build/esm/{BMI_BOYS.zscore.weekly-3a235c91.js → BMI_BOYS.zscore.weekly-36332c51.js} +0 -0
  190. /package/build/esm/{BMI_BOYS.zscore.yearly-eed73a8a.js → BMI_BOYS.zscore.yearly-01355236.js} +0 -0
  191. /package/build/esm/{BMI_GIRLS.percentile.monthly-05837b6a.js → BMI_GIRLS.percentile.monthly-de2fbc61.js} +0 -0
  192. /package/build/esm/{BMI_GIRLS.percentile.weekly-678a74ee.js → BMI_GIRLS.percentile.weekly-a3e37e19.js} +0 -0
  193. /package/build/esm/{BMI_GIRLS.percentile.yearly-dc9fa3b6.js → BMI_GIRLS.percentile.yearly-3186aba5.js} +0 -0
  194. /package/build/esm/{BMI_GIRLS.zscore.monthly-acd95d4a.js → BMI_GIRLS.zscore.monthly-c8b642f7.js} +0 -0
  195. /package/build/esm/{BMI_GIRLS.zscore.weekly-de839d3b.js → BMI_GIRLS.zscore.weekly-c7892f39.js} +0 -0
  196. /package/build/esm/{BMI_GIRLS.zscore.yearly-c0da7049.js → BMI_GIRLS.zscore.yearly-2bf35542.js} +0 -0
  197. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-eef769c0.js → HEAD CIRCUM_BOYS.percentile.monthly-bc65812f.js} +0 -0
  198. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-ac24b410.js → HEAD CIRCUM_BOYS.percentile.weekly-c963ce3c.js} +0 -0
  199. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-d88f2f93.js → HEAD CIRCUM_BOYS.percentile.yearly-91e16bf5.js} +0 -0
  200. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-a16e5ce9.js → HEAD CIRCUM_BOYS.zscore.monthly-f7ecf3be.js} +0 -0
  201. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-09eccbd7.js → HEAD CIRCUM_BOYS.zscore.weekly-a052bb19.js} +0 -0
  202. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-0034fe55.js → HEAD CIRCUM_BOYS.zscore.yearly-272adbaa.js} +0 -0
  203. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-672e6cbe.js → HEAD CIRCUM_GIRLS.percentile.monthly-6a7b41c4.js} +0 -0
  204. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-4912f431.js → HEAD CIRCUM_GIRLS.percentile.weekly-095cbc85.js} +0 -0
  205. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-8a6aafe9.js → HEAD CIRCUM_GIRLS.percentile.yearly-0133cc9d.js} +0 -0
  206. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-eec78343.js → HEAD CIRCUM_GIRLS.zscore.monthly-bcc9ccfd.js} +0 -0
  207. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-68e991c1.js → HEAD CIRCUM_GIRLS.zscore.weekly-c6eda8cb.js} +0 -0
  208. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-10f61af8.js → HEAD CIRCUM_GIRLS.zscore.yearly-9d59e363.js} +0 -0
  209. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-d59c166e.js → HEIGHT_BOYS.percentile.monthly-9b992c6a.js} +0 -0
  210. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-088e8adb.js → HEIGHT_BOYS.percentile.weekly-3a8a7218.js} +0 -0
  211. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-436897cb.js → HEIGHT_BOYS.percentile.yearly-ab7c235b.js} +0 -0
  212. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-74c8dcc5.js → HEIGHT_BOYS.zscore.monthly-a9e24711.js} +0 -0
  213. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-5fcde6cd.js → HEIGHT_BOYS.zscore.weekly-f15762c5.js} +0 -0
  214. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-0e48b2f8.js → HEIGHT_BOYS.zscore.yearly-e918cdf5.js} +0 -0
  215. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-25fd2813.js → HEIGHT_GIRLS.percentile.monthly-06edf320.js} +0 -0
  216. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-6d83e9a7.js → HEIGHT_GIRLS.percentile.weekly-cada39b4.js} +0 -0
  217. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-64bc5924.js → HEIGHT_GIRLS.percentile.yearly-c6255de8.js} +0 -0
  218. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-2aef62ab.js → HEIGHT_GIRLS.zscore.monthly-59b2af8e.js} +0 -0
  219. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-92f68a56.js → HEIGHT_GIRLS.zscore.weekly-1d14e2b6.js} +0 -0
  220. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-958c71a2.js → HEIGHT_GIRLS.zscore.yearly-e839dbb2.js} +0 -0
  221. /package/build/esm/{Onboarding-ad49870c.js → Onboarding-ff78862f.js} +0 -0
  222. /package/build/esm/{Visible-ac315efb.js → Visible-df051a7d.js} +0 -0
  223. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-adad02ed.js → WEIGHT_BOYS.percentile.monthly-ca848d26.js} +0 -0
  224. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-2d886cac.js → WEIGHT_BOYS.percentile.weekly-3631d852.js} +0 -0
  225. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-b8bbb4e9.js → WEIGHT_BOYS.percentile.yearly-9691b24d.js} +0 -0
  226. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-ab63ae85.js → WEIGHT_BOYS.zscore.monthly-24aae22c.js} +0 -0
  227. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-8c359273.js → WEIGHT_BOYS.zscore.weekly-a573fac1.js} +0 -0
  228. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-f35f47d4.js → WEIGHT_BOYS.zscore.yearly-24aeb0e7.js} +0 -0
  229. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-b8d9bd0d.js → WEIGHT_GIRLS.percentile.monthly-eb2b71f3.js} +0 -0
  230. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-bf02db33.js → WEIGHT_GIRLS.percentile.weekly-0fc5ac47.js} +0 -0
  231. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-2099b0bf.js → WEIGHT_GIRLS.percentile.yearly-54f86a24.js} +0 -0
  232. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-f2776700.js → WEIGHT_GIRLS.zscore.monthly-6c507f4b.js} +0 -0
  233. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-7acf1c1c.js → WEIGHT_GIRLS.zscore.weekly-fd6436d5.js} +0 -0
  234. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-0a90ab49.js → WEIGHT_GIRLS.zscore.yearly-e0b72bae.js} +0 -0
  235. /package/build/esm/{constants-254a4df3.js → constants-bd2e2bb9.js} +0 -0
  236. /package/build/esm/{cookieHelper-f8486f9d.js → cookieHelper-24e8a5fb.js} +0 -0
  237. /package/build/esm/{dataTransform-5e76271a.js → dataTransform-6a627eb5.js} +0 -0
  238. /package/build/esm/{index-6ee00df0.js → index-1626c7eb.js} +0 -0
  239. /package/build/esm/{isProduction-8ce1051d.js → isProduction-b12d596a.js} +0 -0
  240. /package/build/esm/{localizeNumberFormat-947fe3bd.js → localizeNumberFormat-1cebd783.js} +0 -0
  241. /package/build/esm/{normalizeLink-6d537179.js → normalizeLink-86bd6e1e.js} +0 -0
  242. /package/build/esm/{paths-d4225106.js → paths-64ccdd58.js} +0 -0
  243. /package/build/esm/{screenSizeContext-987c451f.js → screenSizeContext-4eb558b5.js} +0 -0
  244. /package/build/esm/{theme-31acd0c2.js → theme-6958f818.js} +0 -0
  245. /package/build/esm/{translationsContext-e9aaabb6.js → translationsContext-cf558e50.js} +0 -0
  246. /package/build/esm/{tslib.es6-c8835980.js → tslib.es6-aa6dda30.js} +0 -0
  247. /package/build/esm/{types-6686141b.js → types-614fc596.js} +0 -0
  248. /package/build/esm/{useIsInit-3a06bd4a.js → useIsInit-1907bb7f.js} +0 -0
  249. /package/build/esm/{useOutsideClick-c00670e4.js → useOutsideClick-7843e861.js} +0 -0
  250. /package/build/esm/{useScrollbarSize-ba68fbbc.js → useScrollbarSize-859a83e2.js} +0 -0
  251. /package/build/esm/{useUniqueId-6daecd5a.js → useUniqueId-224e1126.js} +0 -0
  252. /package/build/{index-02fdc77f.js → index-68c32ed4.js} +0 -0
  253. /package/build/{isProduction-028c30c1.js → isProduction-5decd5ee.js} +0 -0
  254. /package/build/{localizeNumberFormat-b048ccb6.js → localizeNumberFormat-fc44b259.js} +0 -0
  255. /package/build/{normalizeLink-64a0a4fd.js → normalizeLink-2e7b8c35.js} +0 -0
  256. /package/build/{paths-1677e749.js → paths-d8522736.js} +0 -0
  257. /package/build/{screenSizeContext-593b4ba2.js → screenSizeContext-58d16a70.js} +0 -0
  258. /package/build/{theme-d21cf9c9.js → theme-714ba8eb.js} +0 -0
  259. /package/build/{translationsContext-ef6e8716.js → translationsContext-5dbe0768.js} +0 -0
  260. /package/build/{tslib.es6-b8b05056.js → tslib.es6-71ed3e73.js} +0 -0
  261. /package/build/{types-d430ba99.js → types-dfb71ff9.js} +0 -0
  262. /package/build/{useIsInit-c7206042.js → useIsInit-a3d864b6.js} +0 -0
  263. /package/build/{useOutsideClick-23bc853d.js → useOutsideClick-1fd814a9.js} +0 -0
  264. /package/build/{useScrollbarSize-555600fa.js → useScrollbarSize-79ed5c61.js} +0 -0
  265. /package/build/{useUniqueId-61b17d61.js → useUniqueId-3d496ffe.js} +0 -0
@@ -1 +1 @@
1
- import{aG as e,aH as t,aI as a}from"./utils-df78bdca.js";export{aK as Accordion,A as Anchor,z as AspectRatio,y as Avatar,aJ as Breadcrumbs,E as Button,aL as Carousel,aF as Checkbox,J as Input,aB as MAPPED_LOCALE,aO as OTHER_THEME_CONFIG,aE as OTP,aC as Phone,aP as Popover,aD as Radio,a8 as Select,ar as Tabs,x as Text,aM as emotionCache,aN as getHeadingStyles,aI as getMantineThemeOverride,aA as themeColors,aH as useMantineLocale}from"./utils-df78bdca.js";export{D as DatePicker}from"./index-066e1f8c.js";export{I as Indicator}from"./index-7dbac417.js";import s,{useMemo as r}from"react";export{M as Modal}from"./index-699a67a1.js";import{_ as o}from"./tslib.es6-c8835980.js";import{Badge as i,Spoiler as n,LoadingOverlay as c,MantineProvider as l,clsx as m,Title as d,Text as p,Button as u}from"@mantine/core";import{t as f}from"./theme-31acd0c2.js";import{T as g}from"./index-164612c2.js";import{u as h}from"./useTranslations-7597d802.js";export{b as CentralCarousel}from"./index-7c0c9a23.js";export{S as Slider}from"./index-c7061390.js";export{S as Switch}from"./index-6ee00df0.js";import"styled-components";import"./screenSizeContext-987c451f.js";import"lodash/throttle";import"./gAssets.js";import"./index-ef52a951.js";import"date-fns/locale";import"./Onboarding-ad49870c.js";import"./isProduction-8ce1051d.js";import"./index-b7da5adf.js";import"dayjs";import"./useUniqueId-6daecd5a.js";import"./translationsContext-e9aaabb6.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/hooks";import"@mantine/dates";import"@mantine/carousel";import"lodash/debounce";import"./cookieHelper-f8486f9d.js";import"slugify";import"./index-75e66b82.js";const j=t=>s.createElement(e,Object.assign({minRows:2,maxRows:4},t)),v=e=>{var{color:t=f.colors.primaryBase,styles:a}=e,r=o(e,["color","styles"]);return s.createElement(i,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},r))},O=e=>{var{children:t,line:a,lineHeight:i,trackingAttributes:c,maxHeight:l,customExpandFn:m}=e,d=o(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=h(),u=r((()=>l||(a&&i?a*i:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const b=r((()=>c?{"data-event-category":c.dataEventCategory,"data-event-action":c.dataEventAction,"data-event-label":c.dataEventLabel}:{}),[c]);return s.createElement(n,Object.assign({showLabel:s.createElement(g,Object.assign({size:"p3",color:f.colors.primaryBase},b,{onClick:m}),p("articlePage.readMore")),hideLabel:s.createElement(g,Object.assign({size:"p3",color:f.colors.primaryBase},b),p("articlePage.showLess"))},d,{maxHeight:u}),t)};const C=e=>(function(e=!1){s.useEffect((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}(e.visible),s.createElement(c,Object.assign({loaderProps:{color:f.colors.primaryBase}},e))),H=e=>{var{children:r,locale:i,template:n="hb"}=e,c=o(e,["children","locale","template"]);return t(i),s.createElement(l,Object.assign({theme:a(i,n)},c),r)};var P="MON6sfi",N="pS-tJD7",T="s3tJ9-5",w="fNsZr1b",k="uuxV74v",B="YohjTDU";function L(e){const{icon:t,title:a,description:r,button:i,buttonProps:n,style:c,className:l}=e,b=n||{},{size:f="lg",variant:g="outline"}=b,h=o(b,["size","variant"]),x=t;return s.createElement("div",{className:m("result",P,l),style:c},x&&s.createElement("div",{className:m("resultIconContainer",N)},s.createElement(x,{className:m("resultIcon",T)})),s.createElement(d,{order:3,size:"h3",className:m("resultTitle",w)},a),s.createElement(p,{className:m("resultDescription",k)},r),i&&s.createElement(u,Object.assign({},h,{size:f,variant:g,className:m("resultButton",B,h.className)}),i))}export{v as Badge,C as LoadingOverlay,H as MantineProvider,L as Result,O as Spoiler,j as TextArea};
1
+ import{aG as e,aH as t,aI as a}from"./utils-49cd0015.js";export{aK as Accordion,A as Anchor,z as AspectRatio,y as Avatar,aJ as Breadcrumbs,E as Button,aL as Carousel,aF as Checkbox,J as Input,aB as MAPPED_LOCALE,aO as OTHER_THEME_CONFIG,aE as OTP,aC as Phone,aP as Popover,aD as Radio,a8 as Select,ar as Tabs,x as Text,aM as emotionCache,aN as getHeadingStyles,aI as getMantineThemeOverride,aA as themeColors,aH as useMantineLocale}from"./utils-49cd0015.js";export{D as DatePicker}from"./index-2bd17e3a.js";export{I as Indicator}from"./index-2b4f9440.js";import s,{useMemo as r}from"react";export{M as Modal}from"./index-03fb3d5f.js";import{_ as o}from"./tslib.es6-aa6dda30.js";import{Badge as i,Spoiler as n,LoadingOverlay as l,MantineProvider as c,clsx as m,Title as d,Text as p,Button as u}from"@mantine/core";import{t as f}from"./theme-6958f818.js";import{T as g}from"./index-4c42fd2d.js";import{u as h}from"./useTranslations-e8adac8a.js";export{b as CentralCarousel}from"./index-e006ea08.js";export{S as Slider}from"./index-ca8ba9cb.js";export{S as Switch}from"./index-1626c7eb.js";import"styled-components";import"./screenSizeContext-4eb558b5.js";import"lodash/throttle";import"./gAssets.js";import"./index-25a079fc.js";import"date-fns/locale";import"./Onboarding-ff78862f.js";import"./isProduction-b12d596a.js";import"./index-d99f5fe1.js";import"dayjs";import"./useUniqueId-224e1126.js";import"./translationsContext-cf558e50.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/hooks";import"@mantine/dates";import"@mantine/carousel";import"lodash/debounce";import"./cookieHelper-24e8a5fb.js";import"slugify";import"./index-ac0440c7.js";const j=t=>s.createElement(e,Object.assign({minRows:2,maxRows:4},t)),v=e=>{var{color:t=f.colors.primaryBase,styles:a}=e,r=o(e,["color","styles"]);return s.createElement(i,Object.assign({variant:"filled",color:t,styles:Object.assign({root:{borderRadius:"2px",background:t,textTransform:"unset"}},a)},r))},O=e=>{var{children:t,line:a,lineHeight:i,trackingAttributes:l,maxHeight:c,customExpandFn:m}=e,d=o(e,["children","line","lineHeight","trackingAttributes","maxHeight","customExpandFn"]);const{t:p}=h(),u=r((()=>c||(a&&i?a*i:(console.error("[HHG-Comp]:[Spoiler] Please provide maxHeight, or line with lineHeight"),0))),[]);t||console.error("[HHG-Comp]:[Spoiler] Please provide children");const b=r((()=>l?{"data-event-category":l.dataEventCategory,"data-event-action":l.dataEventAction,"data-event-label":l.dataEventLabel}:{}),[l]);return s.createElement(n,Object.assign({showLabel:s.createElement(g,Object.assign({size:"p3",color:f.colors.primaryBase},b,{onClick:m}),p("articlePage.readMore")),hideLabel:s.createElement(g,Object.assign({size:"p3",color:f.colors.primaryBase},b),p("articlePage.showLess"))},d,{maxHeight:u}),t)};const C=e=>(function(e=!1){s.useEffect((()=>{if(e){const e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}}),[e])}(e.visible),s.createElement(l,Object.assign({loaderProps:{color:f.colors.primaryBase}},e))),H=e=>{var{children:r,locale:i,template:n="hb"}=e,l=o(e,["children","locale","template"]);return t(i),s.createElement(c,Object.assign({theme:a(i,n)},l),r)};var P="MON6sfi",N="pS-tJD7",T="s3tJ9-5",w="fNsZr1b",k="uuxV74v",B="YohjTDU";function L(e){const{icon:t,title:a,description:r,button:i,buttonProps:n,style:l,className:c}=e,f=n||{},{size:b="lg",variant:g="outline"}=f,h=o(f,["size","variant"]),x=t;return s.createElement("div",{className:m("result",P,c),style:l},x&&s.createElement("div",{className:m("resultIconContainer",N)},s.createElement(x,{className:m("resultIcon",T)})),s.createElement(d,{order:3,size:"h3",className:m("resultTitle",w)},a),s.createElement(p,{className:m("resultDescription",k)},r),i&&s.createElement(u,Object.assign({},h,{size:b,variant:g,className:m("resultButton",B,h.className)}),i))}export{v as Badge,C as LoadingOverlay,H as MantineProvider,L as Result,O as Spoiler,j as TextArea};
package/build/esm/misc.js CHANGED
@@ -1 +1 @@
1
- export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-947fe3bd.js";export{B as Breakpoints,M as MediaQueries,S as ScreenSizeContext,q as ScreenSizeContextProvider,h as fadeIn,i as formatUrlWithPageParam,j as getBoundariesFromMediaQueryKey,k as getPopupWrapperDom,p as getWindowSizeGroups,l as getWrapperDomWithSelector,m as makeParams,o as safeEncodeURI,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp,n as startCase,t as toggleNoScroll}from"./screenSizeContext-987c451f.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-f8486f9d.js";import"react";import"styled-components";export{M as MBTheme,t as theme}from"./theme-31acd0c2.js";export{a as abbreviateNumber,f as formatPill}from"./dataTransform-5e76271a.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-8b859474.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-5c62bbce.js";export{g as getSocialList}from"./getSocialList-e2edc6f8.js";import"dayjs";import"lodash/throttle";import"./index-ef52a951.js";import"date-fns/locale";import"./Onboarding-ad49870c.js";import"./isProduction-8ce1051d.js";import"./tslib.es6-c8835980.js";import"./core-7af1314a.js";import"./normalizeLink-6d537179.js";import"./gAssets.js";
1
+ export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-1cebd783.js";export{B as Breakpoints,M as MediaQueries,S as ScreenSizeContext,q as ScreenSizeContextProvider,h as fadeIn,i as formatUrlWithPageParam,j as getBoundariesFromMediaQueryKey,k as getPopupWrapperDom,p as getWindowSizeGroups,l as getWrapperDomWithSelector,m as makeParams,o as safeEncodeURI,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp,n as startCase,t as toggleNoScroll}from"./screenSizeContext-4eb558b5.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-24e8a5fb.js";import"react";import"styled-components";export{M as MBTheme,t as theme}from"./theme-6958f818.js";export{a as abbreviateNumber,f as formatPill}from"./dataTransform-6a627eb5.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-2ca62b4e.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-e1e9eb88.js";export{g as getSocialList}from"./getSocialList-62952c6e.js";import"dayjs";import"lodash/throttle";import"./index-25a079fc.js";import"date-fns/locale";import"./Onboarding-ff78862f.js";import"./isProduction-b12d596a.js";import"./tslib.es6-aa6dda30.js";import"./core-aef19cc1.js";import"./normalizeLink-86bd6e1e.js";import"./gAssets.js";
@@ -1 +1 @@
1
- import"./tslib.es6-c8835980.js";import"react";import"./core-7af1314a.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-eef47a39.js";import"./index-ef52a951.js";import"./normalizeLink-6d537179.js";import"./routing-8b859474.js";import"./dataTransform-474b6557.js";import"./index.styled-6b23e614.js";import"./isProduction-8ce1051d.js";import"./utils-df78bdca.js";import"@mantine/core";import"styled-components";import"./index-7c0c9a23.js";import"@mantine/carousel";import"@mantine/hooks";import"./theme-31acd0c2.js";import"./screenSizeContext-987c451f.js";import"lodash/throttle";import"./gAssets.js";import"date-fns/locale";import"./Onboarding-ad49870c.js";import"./index-b7da5adf.js";import"dayjs";import"./useUniqueId-6daecd5a.js";import"./index-164612c2.js";import"./translationsContext-e9aaabb6.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/dates";import"lodash/debounce";import"./cookieHelper-f8486f9d.js";import"slugify";import"./index-940a2837.js";import"./useTranslations-7597d802.js";import"./index-75e66b82.js";import"./constants-254a4df3.js";import"./index-7dbac417.js";import"./useIsInit-3a06bd4a.js";import"dayjs/plugin/relativeTime";
1
+ import"./tslib.es6-aa6dda30.js";import"react";import"./core-aef19cc1.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-2dbad103.js";import"./index-25a079fc.js";import"./normalizeLink-86bd6e1e.js";import"./routing-2ca62b4e.js";import"./dataTransform-acd309eb.js";import"./index.styled-9454d250.js";import"./isProduction-b12d596a.js";import"./utils-49cd0015.js";import"@mantine/core";import"styled-components";import"./index-e006ea08.js";import"@mantine/carousel";import"@mantine/hooks";import"./theme-6958f818.js";import"./screenSizeContext-4eb558b5.js";import"lodash/throttle";import"./gAssets.js";import"date-fns/locale";import"./Onboarding-ff78862f.js";import"./index-d99f5fe1.js";import"dayjs";import"./useUniqueId-224e1126.js";import"./index-4c42fd2d.js";import"./translationsContext-cf558e50.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/dates";import"lodash/debounce";import"./cookieHelper-24e8a5fb.js";import"slugify";import"./index-dc45af44.js";import"./useTranslations-e8adac8a.js";import"./index-ac0440c7.js";import"./constants-bd2e2bb9.js";import"./index-2b4f9440.js";import"./useIsInit-1907bb7f.js";import"dayjs/plugin/relativeTime";
@@ -1 +1 @@
1
- import{a as e,_ as o}from"./tslib.es6-c8835980.js";import t,{useContext as n,useState as r,useRef as a,useEffect as i,useMemo as s,useCallback as l}from"react";import{Input as d,Grid as m,Title as c}from"@mantine/core";import{useInterval as p,useCounter as u}from"@mantine/hooks";import{B as g}from"./index-75e66b82.js";import{x as b,aC as E,J as h,aD as f,aE as v,aF as y,w,E as S}from"./utils-df78bdca.js";import{u as P,a as j,F as k,O as C,b as x}from"./index-d92f4c41.js";import{u as B}from"./useTranslations-7597d802.js";import"lodash/debounce";import"./isProduction-8ce1051d.js";import{L as z}from"./index-ef52a951.js";import{O as T}from"./Onboarding-ad49870c.js";export{O as OnboardingStep}from"./Onboarding-ad49870c.js";import"dayjs";import{M as F}from"./screenSizeContext-987c451f.js";import"styled-components";import{t as N}from"./theme-31acd0c2.js";import"./gAssets.js";import{S as I,a as L,b as q,c as A,d as D,e as V,f as _,g as U,h as R,i as W}from"./index.styled-73921818.js";import{yupResolver as H}from"@mantine/form";import"./index-7c0c9a23.js";import"./index-b7da5adf.js";import"@mantine/dates";import{D as Y}from"./index-066e1f8c.js";import{A as $}from"./index-13b5fcc4.js";import{V as G}from"./Visible-ac315efb.js";import{M as Z,h as J}from"./utils-8db4813e.js";export{M as MAPPED_LOCALE}from"./utils-8db4813e.js";import*as K from"yup";import Q from"lodash/throttle";import{T as X}from"./index-164612c2.js";import{format as ee}from"date-fns";import"./translationsContext-e9aaabb6.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-6daecd5a.js";import"./cookieHelper-f8486f9d.js";import"slugify";import"date-fns/locale";const oe=({inputOrder:e=["phone"],withSimilac:o=!1,customTerms:n=""})=>{const{t:r}=B(),a=P(),i=t.createElement(d.Wrapper,Object.assign({className:o?"input-control":"phone-input",withAsterisk:!0},o?{label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.phone"))}:{}),t.createElement(E,Object.assign({defaultCountry:Z[process.env.UNIFY_LOCALE]||"VN"},a.getInputProps("phone"))),t.createElement(d.Error,{size:"md"},a.errors.phone)),s=t.createElement(h,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourName")),withAsterisk:!0},a.getInputProps("name"))),l=t.createElement(h,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourEmail")),withAsterisk:!0},a.getInputProps("email"))),m=t.createElement(Y,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},a.getInputProps("dob"))),c=t.createElement(f.Group,Object.assign({className:"radio-group",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("bmi.selectGender"))},a.getInputProps("gender")),t.createElement(f,{value:"0",label:r("onboarding.formEmail.genderMale")}),t.createElement(f,{value:"1",label:r("onboarding.formEmail.genderFemale")})),p=t.createElement("div",{className:"otp-input"},t.createElement(v,Object.assign({enterKeyHint:void 0,nonce:void 0},a.getInputProps("otp"))),t.createElement(d.Error,null,a.errors.otp)),u=t.createElement(h.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("password"))),g=t.createElement(h.Wrapper,Object.assign({},a.getInputProps("term",{type:"checkbox"}),{error:null,mb:16}),t.createElement(y,{label:n?t.createElement(b,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},n):t.createElement(b,{size:"p4",as:"span"},"Tôi đã đọc và đồng ý với các điều khoản và chương trình của"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Hello Bacsi"))," ","và"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Abbott Similac"))," ","và được hướng dẫn cách ngưng chương trình"),onChange:e=>{a.setFieldValue("term",e.currentTarget.checked)}}),t.createElement(d.Error,{size:"md"},a.getInputProps("term",{type:"checkbox"}).error)),w=t.createElement($,Object.assign({className:"input-control",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.address"))},a.getInputProps("address"))),S=t.createElement(h.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("confirmPassword"))),j=e.map((e=>({phone:i,full_name:s,email:l,dob:m,gender:c,otp:p,password:u,confirm_password:S,term:g,address:w}[e]||null)));return t.createElement(I,null,j)},te=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default("")}),ne=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName")),email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:K.mixed().required(e("onboarding.similac.address.error")),term:K.bool().oneOf([!0],e("onboarding.similac.term.error"))}),re=e=>K.object().shape({otp:K.string().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),ae=e=>K.object().shape({email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName"))}),ie=e=>K.object().shape({password:K.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:K.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([K.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),se=({onClose:o,onSubmit:n,canSkip:r=!0,customFormTexts:a})=>{const{t:i}=B(),s=j({initialValues:{phone:""},validate:H(te(i))});return t.createElement(L,{heading:(null==a?void 0:a.heading)||i("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||i("onboarding.updatePhone.description")},t.createElement(k,{form:s},t.createElement("form",{onSubmit:s.onSubmit((o=>e(void 0,void 0,void 0,(function*(){n(o.phone)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["phone"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},i("onboarding.button.continue")),r&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},i("onboarding.button.skip")))))},le=n=>{var{onClose:r,onSubmit:a,canSkip:i=!0,customFormTexts:s,customTerms:l,defaultValues:d}=n,m=o(n,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues"]);const{t:c}=B(),{isMobile:p}=w(),u=j({initialValues:Object.assign({phone:"",term:!1},d),validate:H(ne(c))});return t.createElement(L,Object.assign({heading:(null==s?void 0:s.heading)||c("onboarding.updatePhone.heading"),description:(null==s?void 0:s.description)||c("onboarding.updatePhone.description"),hiddenLogo:p},m),t.createElement(k,{form:u},t.createElement("form",{onSubmit:u.onSubmit((o=>e(void 0,void 0,void 0,(function*(){a(o)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["full_name","email","phone","address","term"],withSimilac:!0,customTerms:l}),t.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),i&&t.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:r,type:"button"},c("onboarding.button.skip")))))},de=e=>{var{withSimilac:n=!1}=e,r=o(e,["withSimilac"]);return n?t.createElement(le,Object.assign({},r)):t.createElement(se,Object.assign({},r))},me=({onSubmit:o,phone:l,email:d,onResendCode:m,otpError:c,onClose:b,loading:E,onBack:h,canSkip:f,outOfEdit:v})=>{const{siteType:y,isMarryBaby:w}=n(C),[S,P]=r(30),O=p((()=>P((e=>e-1))),1e3),[M,x]=u(0,{min:0,max:3}),z=a(!0),{t:T}=B();i((()=>(O.start(),O.stop)),[]),i((()=>{0===S&&(O.stop(),z.current=!1)}),[S]);const F=j({initialValues:{otp:""},validate:H(re(T))});i((()=>{c&&F.setFieldError("otp",c)}),[c]);const I=s((()=>Q((()=>{z.current||(x.increment(),P(30),null==m||m(l||d),O.start(),z.current=!0)}),1e3,{trailing:!1})),[l,d,m,O]);return t.createElement(q,{heading:T("onboarding.otpForm.heading"),description:t.createElement(t.Fragment,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:l?T("onboarding.otpForm.description",{phone:`<b style="color:${N.colors.gray800}">${l.slice(0,-3).replace(/./g,"x").concat(l.slice(-3))}</b>`}):T("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${N.colors.gray800}">${J(d)}</b>`})}}),!v&&t.createElement("svg",{onClick:()=>{null==h||h()},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},t.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},t.createElement(k,{form:F},t.createElement("form",{onSubmit:F.onSubmit((t=>e(void 0,void 0,void 0,(function*(){x.increment(),o(t.otp)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["otp"]}),t.createElement("div",{className:"resend"},t.createElement(X,{size:"p4",color:N.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),t.createElement(X,{as:"a",size:"p4",color:w?N.mbColors.pink:N.colors.primaryBase,onClick:I},T("onboarding.otpForm.resendCode",{seconds:S}))),t.createElement(g,{theme:y,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:E,disabled:E,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),f&&M>=3&&t.createElement(g,{theme:y,color:"ghost",isBlock:!0,size:"lg",onClick:b,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none",type:"button"},T("onboarding.button.skip")))))},ce=({onClose:e,onSubmit:o,canSkip:r,loading:a,errorMessage:s,initialData:l})=>{const{t:d,locale:m}=B(),{siteType:c,isMarryBaby:p}=n(C),u=j({validate:H(ae(d))});return i((()=>{u.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),i((()=>{s&&u.setFieldError("email",s)}),[s]),t.createElement(x,{heading:d("onboarding.formEmail.heading"),description:d("onboarding.formEmail.description",{site:p?"Marry Baby":z[m].SITE_NAME_FORMATTED})},t.createElement(k,{form:u},t.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>{o(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")}))}),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},d("onboarding.button.continue")),r&&t.createElement(g,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:e},d("onboarding.button.skip")))))},pe=({onClose:e,onSubmit:o,canSkip:n,errorMessage:r,loading:a})=>{const{t:i}=B(),s=j({initialValues:{password:"",confirmPassword:""},validate:H(ie(i))});return t.createElement(x,{heading:i("onboarding.updatePassword.heading"),description:i("onboarding.updatePassword.description")},t.createElement(k,{form:s},t.createElement("form",{className:"form",onSubmit:s.onSubmit((e=>o((null==e?void 0:e.password)||"")),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["password","confirm_password"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:a,disabled:a},i("onboarding.button.continue")),n&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:e},i("onboarding.button.skip")),r&&t.createElement(d.Error,{className:"form-error"},r))))},ue=n=>{var{banner:a,canSkip:i,createPassError:s,createPassLoading:d,customFormTexts:p,emailLoading:E,flow:h=[T.Phone,T.OTP],initialData:f,onClose:v,onCreatePassByEmail:y,onOtpSubmit:S,onPersonalInfoSubmit:P,onPhoneSubmit:j,onResendCode:k,otpError:O,otpLoading:M,personalInfoError:z,resultScreenProps:I,siteType:L,step:q,withSimilac:H=!1,similacFormProps:Y}=n,$=o(n,["banner","canSkip","createPassError","createPassLoading","customFormTexts","emailLoading","flow","initialData","onClose","onCreatePassByEmail","onOtpSubmit","onPersonalInfoSubmit","onPhoneSubmit","onResendCode","otpError","otpLoading","personalInfoError","resultScreenProps","siteType","step","withSimilac","similacFormProps"]);const{t:G}=B(),[Z,J]=r(q||h[0]),[K,Q]=r(""),[X,ee]=r(""),[oe,te]=u(0,{min:0,max:2}),{isMobile:ne}=w(),re=l((()=>{const e=h.indexOf(Z)+1;e<=h.length-1&&J(h[e])}),[Z]),ae=l((()=>{const e=h.indexOf(Z)-1;e>=0&&J(h[e])}),[Z]),ie=o=>e(void 0,void 0,void 0,(function*(){try{!(yield S(o))&&re()}catch(e){console.error(e)}})),se=()=>{oe>=2||(te.increment(),ae())},ue="marryBaby"===L;return t.createElement(C.Provider,{value:{siteType:L,isMarryBaby:ue}},t.createElement(A,Object.assign({},$),h.length>0?t.createElement(D,null,t.createElement(m,{sx:{[F.mbDown]:{margin:0},".mantine-Grid-col":{[F.mbDown]:{padding:0}}}},t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2,sx:{zIndex:H?99:void 0}},t.createElement(V,{"data-similac":H,"data-has-banner":"object"==typeof a},Z===T.Phone&&(H?t.createElement(le,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){var e;try{const t=null==o?void 0:o.phone;t&&(Q(t),yield Promise.all([null===(e=null==Y?void 0:Y.onFormSubmit)||void 0===e?void 0:e.call(Y,o),null==j?void 0:j(t)])),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding,defaultValues:null==Y?void 0:Y.defaultValues,customTerms:null==Y?void 0:Y.customTerms}):t.createElement(de,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{Q(o),yield null==j?void 0:j(o),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding})),Z===T.OTP&&t.createElement(me,{onClose:v,onSubmit:ie,phone:K,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2}),Z===T.OTPEmail&&t.createElement(me,{onClose:v,onSubmit:ie,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2,email:X}),Z===T.PersonalInfo&&t.createElement(ce,{initialData:null==f?void 0:f[T.PersonalInfo],onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{ee((null==o?void 0:o.email)||"");!(yield null==P?void 0:P(o))&&re()}catch(e){console.error(e)}})),errorMessage:z,loading:E}),Z===T.UpdatePassword&&t.createElement(pe,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{yield null==y?void 0:y(o),!s&&re()}catch(e){console.error(e)}})),errorMessage:s,loading:d}),Z===T.Result&&t.createElement(x,Object.assign({},I),t.createElement(g,{theme:L,size:"lg",onClick:v,className:"form-button"},G("onboarding.button.continue"))))),"object"==typeof a&&!H&&t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2},t.createElement(_,null,t.createElement(U,{"data-is-marry-baby":ue},t.createElement(R,null,(null==a?void 0:a.heading)&&t.createElement(c,{order:1,mb:24},null==a?void 0:a.heading),(null==a?void 0:a.description)&&t.createElement(b,{size:"p1",color:N.colors.gray800},G("onboarding.welcomeScreen.content"))),(null==a?void 0:a.imgSrc)&&t.createElement("div",null,t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy"}))))),"object"==typeof a&&H&&(null==a?void 0:a.imgSrc)&&t.createElement(m.Col,{span:"auto",order:H?1:2,orderMd:H?2:1},t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy",className:"similac"})))):"Incorrect flow"))};export{de as OnboardingForm,ue as OnboardingModal,me as OtpForm};
1
+ import{a as e,_ as o}from"./tslib.es6-aa6dda30.js";import t,{useContext as n,useState as r,useRef as a,useEffect as i,useMemo as s,useCallback as l}from"react";import{Input as d,Grid as m,Title as c}from"@mantine/core";import{useInterval as p,useCounter as u}from"@mantine/hooks";import{B as g}from"./index-ac0440c7.js";import{x as b,aC as f,J as E,aD as h,aE as v,aF as y,w,E as S}from"./utils-49cd0015.js";import{u as P,a as j,F as k,O as C,b as x}from"./index-6c3b66ef.js";import{u as B}from"./useTranslations-e8adac8a.js";import"lodash/debounce";import"./isProduction-b12d596a.js";import{L as z}from"./index-25a079fc.js";import{O as T}from"./Onboarding-ff78862f.js";export{O as OnboardingStep}from"./Onboarding-ff78862f.js";import"dayjs";import{M as F}from"./screenSizeContext-4eb558b5.js";import"styled-components";import{t as N}from"./theme-6958f818.js";import"./gAssets.js";import{S as I,a as L,b as q,c as A,d as D,e as V,f as _,g as U,h as R,i as W}from"./index.styled-f8d51cb2.js";import{yupResolver as H}from"@mantine/form";import"./index-e006ea08.js";import"./index-d99f5fe1.js";import"@mantine/dates";import{D as Y}from"./index-2bd17e3a.js";import{A as $}from"./index-d96a464a.js";import{V as G}from"./Visible-df051a7d.js";import{M as Z,h as J}from"./utils-0f4c6649.js";export{M as MAPPED_LOCALE}from"./utils-0f4c6649.js";import*as K from"yup";import Q from"lodash/throttle";import{T as X}from"./index-4c42fd2d.js";import{format as ee}from"date-fns";import"./translationsContext-cf558e50.js";import"string-format";import"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-224e1126.js";import"./cookieHelper-24e8a5fb.js";import"slugify";import"date-fns/locale";const oe=({inputOrder:e=["phone"],withSimilac:o=!1,customTerms:n=""})=>{const{t:r}=B(),a=P(),i=t.createElement(d.Wrapper,Object.assign({className:o?"input-control":"phone-input",withAsterisk:!0},o?{label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.phone"))}:{}),t.createElement(f,Object.assign({defaultCountry:Z[process.env.UNIFY_LOCALE]||"VN"},a.getInputProps("phone"))),t.createElement(d.Error,{size:"md"},a.errors.phone)),s=t.createElement(E,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourName")),withAsterisk:!0},a.getInputProps("name"))),l=t.createElement(E,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourEmail")),withAsterisk:!0},a.getInputProps("email"))),m=t.createElement(Y,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},a.getInputProps("dob"))),c=t.createElement(h.Group,Object.assign({className:"radio-group",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("bmi.selectGender"))},a.getInputProps("gender")),t.createElement(h,{value:"0",label:r("onboarding.formEmail.genderMale")}),t.createElement(h,{value:"1",label:r("onboarding.formEmail.genderFemale")})),p=t.createElement("div",{className:"otp-input"},t.createElement(v,Object.assign({enterKeyHint:void 0,nonce:void 0},a.getInputProps("otp"))),t.createElement(d.Error,null,a.errors.otp)),u=t.createElement(E.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("password"))),g=t.createElement(E.Wrapper,Object.assign({},a.getInputProps("term",{type:"checkbox"}),{error:null,mb:16}),t.createElement(y,{label:n?t.createElement(b,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},n):t.createElement(b,{size:"p4",as:"span"},"Tôi đã đọc và đồng ý với các điều khoản và chương trình của"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Hello Bacsi"))," ","và"," ",t.createElement("a",null,t.createElement(b,{size:"label1",as:"span",weight:"bold",color:"blue.6"},"Abbott Similac"))," ","và được hướng dẫn cách ngưng chương trình"),onChange:e=>{a.setFieldValue("term",e.currentTarget.checked)}}),t.createElement(d.Error,{size:"md"},a.getInputProps("term",{type:"checkbox"}).error)),w=t.createElement($,Object.assign({className:"input-control",label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.similac.input.address"))},a.getInputProps("address"))),S=t.createElement(E.Password,Object.assign({label:t.createElement(b,{size:"s4",weight:"semiBold",as:"span"},r("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:t.createElement(G,null)},a.getInputProps("confirmPassword"))),j=e.map((e=>({phone:i,full_name:s,email:l,dob:m,gender:c,otp:p,password:u,confirm_password:S,term:g,address:w}[e]||null)));return t.createElement(I,null,j)},te=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default("")}),ne=e=>K.object().shape({phone:K.string().required(e("onboarding.updatePhone.error")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName")),email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:K.mixed().required(e("onboarding.similac.address.error")),term:K.bool().oneOf([!0],e("onboarding.similac.term.error"))}),re=e=>K.object().shape({otp:K.string().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),ae=e=>K.object().shape({email:K.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:K.string().required(e("onboarding.errorMessage.requiredName"))}),ie=e=>K.object().shape({password:K.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:K.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([K.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),se=({onClose:o,onSubmit:n,canSkip:r=!0,customFormTexts:a})=>{const{t:i}=B(),s=j({initialValues:{phone:""},validate:H(te(i))});return t.createElement(L,{heading:(null==a?void 0:a.heading)||i("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||i("onboarding.updatePhone.description")},t.createElement(k,{form:s},t.createElement("form",{onSubmit:s.onSubmit((o=>e(void 0,void 0,void 0,(function*(){n(o.phone)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["phone"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},i("onboarding.button.continue")),r&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},i("onboarding.button.skip")))))},le=n=>{var{onClose:r,onSubmit:a,canSkip:i=!0,customFormTexts:s,customTerms:l,defaultValues:d}=n,m=o(n,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues"]);const{t:c}=B(),{isMobile:p}=w(),u=j({initialValues:Object.assign({phone:"",term:!1},d),validate:H(ne(c))});return t.createElement(L,Object.assign({heading:(null==s?void 0:s.heading)||c("onboarding.updatePhone.heading"),description:(null==s?void 0:s.description)||c("onboarding.updatePhone.description"),hiddenLogo:p},m),t.createElement(k,{form:u},t.createElement("form",{onSubmit:u.onSubmit((o=>e(void 0,void 0,void 0,(function*(){a(o)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["full_name","email","phone","address","term"],withSimilac:!0,customTerms:l}),t.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),i&&t.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:r,type:"button"},c("onboarding.button.skip")))))},de=e=>{var{withSimilac:n=!1}=e,r=o(e,["withSimilac"]);return n?t.createElement(le,Object.assign({},r)):t.createElement(se,Object.assign({},r))},me=({onSubmit:o,phone:l,email:d,onResendCode:m,otpError:c,onClose:b,loading:f,onBack:E,canSkip:h,outOfEdit:v})=>{const{siteType:y,isMarryBaby:w}=n(C),[S,P]=r(30),O=p((()=>P((e=>e-1))),1e3),[M,x]=u(0,{min:0,max:3}),z=a(!0),{t:T}=B();i((()=>(O.start(),O.stop)),[]),i((()=>{0===S&&(O.stop(),z.current=!1)}),[S]);const F=j({initialValues:{otp:""},validate:H(re(T))});i((()=>{c&&F.setFieldError("otp",c)}),[c]);const I=s((()=>Q((()=>{z.current||(x.increment(),P(30),null==m||m(l||d),O.start(),z.current=!0)}),1e3,{trailing:!1})),[l,d,m,O]);return t.createElement(q,{heading:T("onboarding.otpForm.heading"),description:t.createElement(t.Fragment,null,t.createElement("span",{dangerouslySetInnerHTML:{__html:l?T("onboarding.otpForm.description",{phone:`<b style="color:${N.colors.gray800}">${l.slice(0,-3).replace(/./g,"x").concat(l.slice(-3))}</b>`}):T("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${N.colors.gray800}">${J(d)}</b>`})}}),!v&&t.createElement("svg",{onClick:()=>{null==E||E()},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"otp-description-edit-icon"},t.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},t.createElement(k,{form:F},t.createElement("form",{onSubmit:F.onSubmit((t=>e(void 0,void 0,void 0,(function*(){x.increment(),o(t.otp)}))),(e=>{console.log(e)}))},t.createElement(oe,{inputOrder:["otp"]}),t.createElement("div",{className:"resend"},t.createElement(X,{size:"p4",color:N.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),t.createElement(X,{as:"a",size:"p4",color:w?N.mbColors.pink:N.colors.primaryBase,onClick:I},T("onboarding.otpForm.resendCode",{seconds:S}))),t.createElement(g,{theme:y,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:f,disabled:f,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),h&&M>=3&&t.createElement(g,{theme:y,color:"ghost",isBlock:!0,size:"lg",onClick:b,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none",type:"button"},T("onboarding.button.skip")))))},ce=({onClose:e,onSubmit:o,canSkip:r,loading:a,errorMessage:s,initialData:l})=>{const{t:d,locale:m}=B(),{siteType:c,isMarryBaby:p}=n(C),u=j({validate:H(ae(d))});return i((()=>{u.setValues(Object.assign(Object.assign({gender:"0"},l),(null==l?void 0:l.birthday)&&{birthday:new Date(l.birthday)}))}),[l]),i((()=>{s&&u.setFieldError("email",s)}),[s]),t.createElement(x,{heading:d("onboarding.formEmail.heading"),description:d("onboarding.formEmail.description",{site:p?"Marry Baby":z[m].SITE_NAME_FORMATTED})},t.createElement(k,{form:u},t.createElement("form",{className:"form",onSubmit:u.onSubmit((e=>{o(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")}))}),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["full_name","email","dob","gender"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},d("onboarding.button.continue")),r&&t.createElement(g,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:e},d("onboarding.button.skip")))))},pe=({onClose:e,onSubmit:o,canSkip:n,errorMessage:r,loading:a})=>{const{t:i}=B(),s=j({initialValues:{password:"",confirmPassword:""},validate:H(ie(i))});return t.createElement(x,{heading:i("onboarding.updatePassword.heading"),description:i("onboarding.updatePassword.description")},t.createElement(k,{form:s},t.createElement("form",{className:"form",onSubmit:s.onSubmit((e=>o((null==e?void 0:e.password)||"")),(e=>{console.log({fieldErrors:e})}))},t.createElement(oe,{inputOrder:["password","confirm_password"]}),t.createElement(g,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:a,disabled:a},i("onboarding.button.continue")),n&&t.createElement(g,{color:"ghost",isBlock:!0,size:"lg",onClick:e},i("onboarding.button.skip")),r&&t.createElement(d.Error,{className:"form-error"},r))))},ue=n=>{var{banner:a,canSkip:i,createPassError:s,createPassLoading:d,customFormTexts:p,emailLoading:f,flow:E=[T.Phone,T.OTP],initialData:h,onClose:v,onCreatePassByEmail:y,onOtpSubmit:S,onPersonalInfoSubmit:P,onPhoneSubmit:j,onResendCode:k,otpError:O,otpLoading:M,personalInfoError:z,resultScreenProps:I,siteType:L,step:q,withSimilac:H=!1,similacFormProps:Y}=n,$=o(n,["banner","canSkip","createPassError","createPassLoading","customFormTexts","emailLoading","flow","initialData","onClose","onCreatePassByEmail","onOtpSubmit","onPersonalInfoSubmit","onPhoneSubmit","onResendCode","otpError","otpLoading","personalInfoError","resultScreenProps","siteType","step","withSimilac","similacFormProps"]);const{t:G}=B(),[Z,J]=r(q||E[0]),[K,Q]=r(""),[X,ee]=r(""),[oe,te]=u(0,{min:0,max:2}),{isMobile:ne}=w(),re=l((()=>{const e=E.indexOf(Z)+1;e<=E.length-1&&J(E[e])}),[Z]),ae=l((()=>{const e=E.indexOf(Z)-1;e>=0&&J(E[e])}),[Z]),ie=o=>e(void 0,void 0,void 0,(function*(){try{!(yield S(o))&&re()}catch(e){console.error(e)}})),se=()=>{oe>=2||(te.increment(),ae())},ue="marryBaby"===L;return t.createElement(C.Provider,{value:{siteType:L,isMarryBaby:ue}},t.createElement(A,Object.assign({},$),E.length>0?t.createElement(D,null,t.createElement(m,{sx:{[F.mbDown]:{margin:0},".mantine-Grid-col":{[F.mbDown]:{padding:0}}}},t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2,sx:{zIndex:H?99:void 0}},t.createElement(V,{"data-similac":H,"data-has-banner":"object"==typeof a},Z===T.Phone&&(H?t.createElement(le,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){var e;try{const t=null==o?void 0:o.phone;t&&(Q(t),yield Promise.all([null===(e=null==Y?void 0:Y.onFormSubmit)||void 0===e?void 0:e.call(Y,o),null==j?void 0:j(t)])),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding,defaultValues:null==Y?void 0:Y.defaultValues,customTerms:null==Y?void 0:Y.customTerms}):t.createElement(de,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{Q(o),yield null==j?void 0:j(o),re()}catch(e){console.error(e)}})),customFormTexts:p.onboarding})),Z===T.OTP&&t.createElement(me,{onClose:v,onSubmit:ie,phone:K,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2}),Z===T.OTPEmail&&t.createElement(me,{onClose:v,onSubmit:ie,onResendCode:k,otpError:O,loading:M,canSkip:i,onBack:se,outOfEdit:oe>=2,email:X}),Z===T.PersonalInfo&&t.createElement(ce,{initialData:null==h?void 0:h[T.PersonalInfo],onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{ee((null==o?void 0:o.email)||"");!(yield null==P?void 0:P(o))&&re()}catch(e){console.error(e)}})),errorMessage:z,loading:f}),Z===T.UpdatePassword&&t.createElement(pe,{onClose:v,canSkip:i,onSubmit:o=>e(void 0,void 0,void 0,(function*(){try{yield null==y?void 0:y(o),!s&&re()}catch(e){console.error(e)}})),errorMessage:s,loading:d}),Z===T.Result&&t.createElement(x,Object.assign({},I),t.createElement(g,{theme:L,size:"lg",onClick:v,className:"form-button"},G("onboarding.button.continue"))))),"object"==typeof a&&!H&&t.createElement(m.Col,{span:"object"!=typeof a&&!H||ne?12:6,order:H?2:1,orderMd:H?1:2},t.createElement(_,null,t.createElement(U,{"data-is-marry-baby":ue},t.createElement(R,null,(null==a?void 0:a.heading)&&t.createElement(c,{order:1,mb:24},null==a?void 0:a.heading),(null==a?void 0:a.description)&&t.createElement(b,{size:"p1",color:N.colors.gray800},G("onboarding.welcomeScreen.content"))),(null==a?void 0:a.imgSrc)&&t.createElement("div",null,t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy"}))))),"object"==typeof a&&H&&(null==a?void 0:a.imgSrc)&&t.createElement(m.Col,{span:"auto",order:H?1:2,orderMd:H?2:1},t.createElement(W,{src:null==a?void 0:a.imgSrc,loading:"lazy",className:"similac"})))):"Incorrect flow"))};export{de as OnboardingForm,ue as OnboardingModal,me as OtpForm};
@@ -1,4 +1,4 @@
1
- import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{_ as d,a as c}from"./tslib.es6-c8835980.js";import{Box as p,Input as u,Grid as g,Title as b,Container as h,Stack as E,AspectRatio as f}from"@mantine/core";import{x as L,aC as v,J as C,aD as y,aE as x,aF as w,H as S,w as M,L as P,E as j}from"./utils-df78bdca.js";import{D as k}from"./index-066e1f8c.js";import"dayjs";import{M as O,k as F}from"./screenSizeContext-987c451f.js";import B from"styled-components";import{t as z}from"./theme-31acd0c2.js";import{L as N}from"./index-ef52a951.js";import"./isProduction-8ce1051d.js";import{L as I}from"./Onboarding-ad49870c.js";import"./gAssets.js";import{u as T}from"./useTranslations-7597d802.js";import"./index-7c0c9a23.js";import{useInterval as D,useCounter as Z}from"@mantine/hooks";import{A}from"./index-13b5fcc4.js";import"lodash/debounce";import{V as _}from"./Visible-ac315efb.js";import{createFormContext as V,yupResolver as H}from"@mantine/form";import"./index-b7da5adf.js";import"@mantine/dates";import*as q from"yup";import{createPortal as $}from"react-dom";import{B as U}from"./index-75e66b82.js";import{b as Y}from"./index-d92f4c41.js";import R from"lodash/throttle";import{T as W}from"./index-164612c2.js";import{format as G}from"date-fns";import"./translationsContext-e9aaabb6.js";import"string-format";import K from"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-6daecd5a.js";import"./cookieHelper-f8486f9d.js";import"slugify";import"date-fns/locale";import"./utils-8db4813e.js";const J=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[Q,X,ee]=V(),te=B(p)`
1
+ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{_ as d,a as c}from"./tslib.es6-aa6dda30.js";import{Box as p,Input as u,Grid as g,Title as b,Container as h,Stack as E,AspectRatio as f}from"@mantine/core";import{x as L,aC as v,J as C,aD as y,aE as x,aF as w,H as S,w as M,L as P,E as j}from"./utils-49cd0015.js";import{D as k}from"./index-2bd17e3a.js";import"dayjs";import{M as O,k as F}from"./screenSizeContext-4eb558b5.js";import B from"styled-components";import{t as z}from"./theme-6958f818.js";import{L as N}from"./index-25a079fc.js";import"./isProduction-b12d596a.js";import{L as I}from"./Onboarding-ff78862f.js";import"./gAssets.js";import{u as T}from"./useTranslations-e8adac8a.js";import"./index-e006ea08.js";import{useInterval as D,useCounter as Z}from"@mantine/hooks";import{A}from"./index-d96a464a.js";import"lodash/debounce";import{V as _}from"./Visible-df051a7d.js";import{createFormContext as V,yupResolver as H}from"@mantine/form";import"./index-d99f5fe1.js";import"@mantine/dates";import*as q from"yup";import{createPortal as $}from"react-dom";import{B as U}from"./index-ac0440c7.js";import{b as Y}from"./index-6c3b66ef.js";import R from"lodash/throttle";import{T as W}from"./index-4c42fd2d.js";import{format as G}from"date-fns";import"./translationsContext-cf558e50.js";import"string-format";import K from"react-keyed-flatten-children";import"@mantine/carousel";import"./useUniqueId-224e1126.js";import"./cookieHelper-24e8a5fb.js";import"slugify";import"date-fns/locale";import"./utils-0f4c6649.js";const J=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[Q,X,ee]=V(),te=B(p)`
2
2
  .phone-input {
3
3
  width: 100%;
4
4
  margin-bottom: 32px;
package/build/esm/pwg.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as o}from"./index-258ac3a9.js";import{T as n}from"./index-164612c2.js";import{P as i}from"./index-aa0f1be7.js";import{u as c}from"./useTranslations-7597d802.js";import{t as s}from"./theme-31acd0c2.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as h}from"recharts";import{C as x}from"./index-7c0c9a23.js";import{a as f}from"./useOutsideClick-c00670e4.js";import E from"styled-components";import{_ as k}from"./tslib.es6-c8835980.js";import"./Onboarding-ad49870c.js";import"./index.styled-d630ba54.js";import"./gAssets.js";import"./index-ef52a951.js";import"date-fns/locale";import"./isProduction-8ce1051d.js";import"./translationsContext-e9aaabb6.js";import"string-format";import"@mantine/carousel";import"@mantine/core";import"@mantine/hooks";const w=t=>{const{x:r,y:a,payload:l,activeWeek:o}=t;return o===l.value?e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?s.mbColors.pink:s.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},l.value)):e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:s.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},v=E.div`
1
+ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as o}from"./index-a46315a8.js";import{T as n}from"./index-4c42fd2d.js";import{P as i}from"./index-acb68002.js";import{u as s}from"./useTranslations-e8adac8a.js";import{t as c}from"./theme-6958f818.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as y,YAxis as u,Area as b,ReferenceDot as f}from"recharts";import{C as h}from"./index-e006ea08.js";import{a as x}from"./useOutsideClick-7843e861.js";import E from"styled-components";import{_ as k}from"./tslib.es6-aa6dda30.js";import"./Onboarding-ff78862f.js";import"./index.styled-574d9f4e.js";import"./gAssets.js";import"./index-25a079fc.js";import"date-fns/locale";import"./isProduction-b12d596a.js";import"./translationsContext-cf558e50.js";import"string-format";import"@mantine/carousel";import"@mantine/core";import"@mantine/hooks";const w=t=>{const{x:r,y:a,payload:l,activeWeek:o}=t;return o===l.value?e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?c.mbColors.pink:c.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},l.value)):e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},v=E.div`
2
2
  /* position: absolute; */
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -18,7 +18,7 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as
18
18
  display: flex;
19
19
  align-items: center;
20
20
  padding: 4px 8px;
21
- background: ${s.colors.yellow600};
21
+ background: ${c.colors.yellow600};
22
22
  border-radius: 3px;
23
23
  } */
24
24
  & > * {
@@ -55,14 +55,14 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as
55
55
  align-items: center;
56
56
  gap: 4px;
57
57
  }
58
- `,T=[{name:"overweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"underweight",backgroundColor:s.colors.yellow50,color:s.colors.yellow900},{name:"healthy",backgroundColor:s.colors.green50,color:s.colors.green900}],B=r=>{var a,l,o,i,c;const{payload:m,active:d}=r,p=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:y}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(l=p.toolTipLabel)||void 0===l?void 0:l[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:s.colors.gray800,type:"semiBold"},null===(c=p.toolTipLabel)||void 0===c?void 0:c[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:y},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:a,activeWeek:l,t:o})=>{const n=o(`bmi.result.${a}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===l?{toolTipLabel:r,translatedStatus:n,status:a}:{})))},z=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:z})=>{const{t:L}=c(),S="marryBaby"===z,O=t((()=>W({weightByWeek:i,weightBefore:o,toolTipLabel:v,status:C,activeWeek:E,t:L})),[i,o,v,C,E]),[F,I]=r(!1),M=a(null);return f(M,(()=>I(!1))),e.createElement(j,null,S?e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark}," ",L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:s.colors.gray500},L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")),Array.isArray(O)&&O.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:O,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:s.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&F&&void 0!==E&&void 0!==k},t))}),e.createElement(y,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:z})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(u,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:s.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:S?s.mbColors.tonePink:s.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>I(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(x,{ref:M,r:4}),fill:S?s.mbColors.pink:s.colors.primaryBase,stroke:S?s.mbColors.pink:s.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),S?e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},L("pregnancy.week")):e.createElement(n,{size:"n1",color:s.colors.gray500},L("pregnancy.week")))))},L=t=>{var{color:r}=t,a=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||s.colors.primaryBase}))},S=({idealWeight:t,siteType:r})=>{const{t:a}=c(),o="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:s.mbColors.lightPink}),e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},a("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(L,{color:s.colors.primary100}),e.createElement(n,{size:"n1",color:s.colors.gray600},e.createElement(n,{size:"n1",as:"span"},a("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:s.colors.gray800,type:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:s.mbColors.pink}),e.createElement(l,{type:"bodytext-3",color:s.mbColors.dark},a("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(L,null),e.createElement(n,{size:"n1",color:s.colors.gray600},a("pwg.placeholder.weight")))))},O=E.div`
58
+ `,T=[{name:"overweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"underweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"healthy",backgroundColor:c.colors.green50,color:c.colors.green900}],B=r=>{var a,l,o,i,s;const{payload:m,active:d}=r,p=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:y}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(l=p.toolTipLabel)||void 0===l?void 0:l[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:c.colors.gray800,type:"semiBold"},null===(s=p.toolTipLabel)||void 0===s?void 0:s[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:y},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:a,activeWeek:l,t:o})=>{const n=o(`bmi.result.${a}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===l?{toolTipLabel:r,translatedStatus:n,status:a}:{})))},z=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:z})=>{const{t:L}=s(),S="marryBaby"===z,O=t((()=>W({weightByWeek:i,weightBefore:o,toolTipLabel:v,status:C,activeWeek:E,t:L})),[i,o,v,C,E]),[F,I]=r(!1),M=a(null);return x(M,(()=>I(!1))),e.createElement(j,null,S?e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark}," ",L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:c.colors.gray500},L("babyGrowth.weight")," ",L("pregnancyWeightGain.weightInput.desc")),Array.isArray(O)&&O.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:O,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:c.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&F&&void 0!==E&&void 0!==k},t))}),e.createElement(y,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:z})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(u,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:c.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:S?c.mbColors.tonePink:c.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(f,{onClick:()=>I(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(h,{ref:M,r:4}),fill:S?c.mbColors.pink:c.colors.primaryBase,stroke:S?c.mbColors.pink:c.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),S?e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},L("pregnancy.week")):e.createElement(n,{size:"n1",color:c.colors.gray500},L("pregnancy.week")))))},L=t=>{var{color:r}=t,a=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||c.colors.primaryBase}))},S=({idealWeight:t,siteType:r})=>{const{t:a}=s(),o="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:c.mbColors.lightPink}),e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},a("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:c.colors.gray800,type:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(L,{color:c.colors.primary100}),e.createElement(n,{size:"n1",color:c.colors.gray600},e.createElement(n,{size:"n1",as:"span"},a("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:c.colors.gray800,type:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(L,{color:c.mbColors.pink}),e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},a("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(L,null),e.createElement(n,{size:"n1",color:c.colors.gray600},a("pwg.placeholder.weight")))))},O=E.div`
59
59
  display: flex;
60
60
  flex-direction: column;
61
61
  align-items: center;
62
62
  padding: 24px 16px;
63
63
  width: 100%;
64
64
  gap: 24px;
65
- border: 1px solid ${s.colors.neutral100};
65
+ border: 1px solid ${c.colors.neutral100};
66
66
  border-radius: 8px;
67
67
  .chart-header {
68
68
  text-align: center;
@@ -70,4 +70,4 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as
70
70
  > div {
71
71
  width: 100%;
72
72
  }
73
- `,F=({chartProps:t,pillCarouselProps:r,idealWeight:a,description:l,siteType:m})=>{const{t:d}=c(),p="marryBaby"===m;return e.createElement(O,null,e.createElement("div",{className:"chart-header"},p?e.createElement(o,{type:"h3",color:s.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",type:"semiBold",color:s.colors.gray800},d("pregnancyTool.weightSuggested")),l&&l),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(S,{idealWeight:a,siteType:m}),e.createElement(z,Object.assign({},t,{siteType:m}))))};export{F as PregnancyWeightGainChart};
73
+ `,F=({chartProps:t,pillCarouselProps:r,idealWeight:a,description:l,siteType:m})=>{const{t:d}=s(),p="marryBaby"===m;return e.createElement(O,null,e.createElement("div",{className:"chart-header"},p?e.createElement(o,{type:"h3",color:c.mbColors.dark},d("pregnancyTool.weightSuggested")):e.createElement(n,{size:"s1",type:"semiBold",color:c.colors.gray800},d("pregnancyTool.weightSuggested")),l&&l),e.createElement(i,Object.assign({},r)),e.createElement("div",null,e.createElement(S,{idealWeight:a,siteType:m}),e.createElement(z,Object.assign({},t,{siteType:m}))))};export{F as PregnancyWeightGainChart};
@@ -1 +1 @@
1
- import{d as e}from"./index-ef52a951.js";import{i as s}from"./isProduction-8ce1051d.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,n as c,i as d,t as g};
1
+ import{d as e}from"./index-25a079fc.js";import{i as s}from"./isProduction-b12d596a.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,n as c,i as d,t as g};
@@ -1 +1 @@
1
- export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,J as SourceList,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-b03d781d.js";export{U as UserAvatar}from"./index.styled-6b23e614.js";export{d as TogetherDataTransforms}from"./dataTransform-474b6557.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,d as TogetherComponentGlobalContext,e as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-df78bdca.js";import"./tslib.es6-c8835980.js";import"react";import"@mantine/core";import"./index-30364853.js";import"styled-components";import"./screenSizeContext-987c451f.js";import"lodash/throttle";import"./index-940a2837.js";import"./gAssets.js";import"./index-ef52a951.js";import"date-fns/locale";import"./Onboarding-ad49870c.js";import"./isProduction-8ce1051d.js";import"./index-7c0c9a23.js";import"@mantine/carousel";import"@mantine/hooks";import"./index-164612c2.js";import"./index-75e66b82.js";import"./index-52cbdc13.js";import"./index-b7da5adf.js";import"./theme-31acd0c2.js";import"dayjs";import"./useUniqueId-6daecd5a.js";import"@mantine/dates";import"./translationsContext-e9aaabb6.js";import"string-format";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-33a767db.js";import"./useTranslations-7597d802.js";import"./index-258ac3a9.js";import"date-fns";import"./index-c7061390.js";import"lodash/debounce";import"./types-6686141b.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-b42eddeb.js";import"./paths-d4225106.js";import"./constants-254a4df3.js";import"react-contenteditable";import"./cookieHelper-f8486f9d.js";import"react-dom";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-d630ba54.js";import"uuid";import"./utils-8db4813e.js";import"dayjs/plugin/relativeTime";import"./index-699a67a1.js";import"./routing-8b859474.js";import"react-keyed-flatten-children";import"slugify";
1
+ export{g as CardAuthor,C as CardLink,D as CardPost,E as CardPostPopoverMore,b as CardReactions,F as CardReply,G as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,H as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,z as ProfileDetail,y as ProfileDetailModal,q as ShareBox,S as SharePopup,B as SkipQuestionOfExpertBtn,x as SocialLinkPreview,J as SourceList,p as SubmitReportForm,A as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-9b1fb32b.js";export{U as UserAvatar}from"./index.styled-9454d250.js";export{d as TogetherDataTransforms}from"./dataTransform-acd309eb.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,d as TogetherComponentGlobalContext,e as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-49cd0015.js";import"./tslib.es6-aa6dda30.js";import"react";import"@mantine/core";import"./index-b6603e31.js";import"styled-components";import"./screenSizeContext-4eb558b5.js";import"lodash/throttle";import"./index-dc45af44.js";import"./gAssets.js";import"./index-25a079fc.js";import"date-fns/locale";import"./Onboarding-ff78862f.js";import"./isProduction-b12d596a.js";import"./index-e006ea08.js";import"@mantine/carousel";import"@mantine/hooks";import"./index-4c42fd2d.js";import"./index-ac0440c7.js";import"./index-e8aa27ee.js";import"./index-d99f5fe1.js";import"./theme-6958f818.js";import"dayjs";import"./useUniqueId-224e1126.js";import"@mantine/dates";import"./translationsContext-cf558e50.js";import"string-format";import"@hookform/resolvers/yup";import"react-hook-form";import"./index-61b40bb3.js";import"./useTranslations-e8adac8a.js";import"./index-a46315a8.js";import"date-fns";import"./index-ca8ba9cb.js";import"lodash/debounce";import"./types-614fc596.js";import"react-day-picker/DayPickerInput";import"innertext";import"./index-58d76b74.js";import"./paths-64ccdd58.js";import"./constants-bd2e2bb9.js";import"react-contenteditable";import"./cookieHelper-24e8a5fb.js";import"react-dom";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-574d9f4e.js";import"uuid";import"./utils-0f4c6649.js";import"dayjs/plugin/relativeTime";import"./index-03fb3d5f.js";import"./routing-2ca62b4e.js";import"react-keyed-flatten-children";import"slugify";
@@ -1,4 +1,4 @@
1
- import{a as e,_ as t}from"./tslib.es6-c8835980.js";import*as a from"react";import o,{createContext as n,useContext as i,useState as l,useRef as r,useEffect as s,useMemo as c,useCallback as d}from"react";import{useMantineTheme as m,createStyles as p,Flex as u,Box as g,rem as v,Checkbox as h,Portal as b,Anchor as f,Accordion as y,Popover as w}from"@mantine/core";import{a as x}from"./index-30364853.js";import{u as E}from"./useTranslations-7597d802.js";import C from"innertext";import{t as k}from"./theme-31acd0c2.js";import{H as N,I as A,d as T,A as z,P,e as I,f as S}from"./index-b7da5adf.js";import{d as L,a9 as M,aa as j,O as B,ab as F,ac as O,ad as R,H as V,ae as D,x as U,Q as W,af as H,ag as Z,ah as q,ai as _,aj as G,ak as Q,w as X,al as K,am as $,an as Y,ao as J,E as ee,ap as te,a0 as ae,A as oe,aq as ne,ar as ie,as as le,at as re,au as se}from"./utils-df78bdca.js";import"@mantine/dates";import{D as ce,d as de}from"./index-ef52a951.js";import"./Onboarding-ad49870c.js";import{CommonGAssets as me}from"./gAssets.js";import pe from"dayjs";import{M as ue,t as ge,o as ve,k as he}from"./screenSizeContext-987c451f.js";import be,{keyframes as fe,css as ye}from"styled-components";import"./isProduction-8ce1051d.js";import{I as we}from"./index-7c0c9a23.js";import"@mantine/hooks";import{A as xe,a as Ee,B as Ce,D as ke}from"./index-b42eddeb.js";import{e as Ne,c as Ae,P as Te,g as ze,b as Pe,h as Ie,i as Se}from"./dataTransform-474b6557.js";import{T as Le}from"./index-164612c2.js";import{I as Me}from"./index-52cbdc13.js";import je from"lodash/debounce";import Be from"react-contenteditable";import{B as Fe}from"./index-75e66b82.js";import{d as Oe,g as Re}from"./cookieHelper-f8486f9d.js";import*as Ve from"react-dom";import{format as De}from"date-fns";import"react-day-picker/DayPickerInput";import{U as Ue}from"./index.styled-6b23e614.js";import"./index-33a767db.js";import"lodash/throttle";import"./types-6686141b.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-d630ba54.js";import"uuid";import"./utils-8db4813e.js";import"string-format";import We from"dayjs/plugin/relativeTime";import{M as He}from"./index-699a67a1.js";import{a as Ze}from"./useUniqueId-6daecd5a.js";import"./translationsContext-e9aaabb6.js";import{g as qe}from"./routing-8b859474.js";const _e=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),a.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),Ge=n({}),Qe=({children:e,defaultParams:t})=>o.createElement(Ge.Provider,{value:{defaultParams:t}},e),Xe=e=>{const{data:{userInfo:t,env:{togetherBasePath:a}}}=i(L),{defaultParams:o}=i(Ge)||{},n=null==t?void 0:t.id,l=t&&"number"==typeof t.communities_interacted&&0===t.communities_interacted;return{authActionWrapper:(t,i)=>{const r=Object.assign(Object.assign(Object.assign({},o),e),i);if(!n||l){n||Oe(M),(null==r?void 0:r._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(r._joinCommunityIds).filter(Boolean))))),null==r||delete r._joinCommunityIds),(null==r?void 0:r._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(r._joinTopicIds).filter(Boolean))))),null==r||delete r._joinTopicIds);const e=(null==r?void 0:r._location)||window.location.href;return null==r||delete r._location,window.location.href=j(e,r,a),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},Ke=be.div`
1
+ import{a as e,_ as t}from"./tslib.es6-aa6dda30.js";import*as a from"react";import o,{createContext as n,useContext as i,useState as l,useRef as r,useEffect as s,useMemo as c,useCallback as d}from"react";import{useMantineTheme as m,createStyles as p,Flex as u,Box as g,rem as v,Checkbox as h,Portal as b,Anchor as f,Accordion as y,Popover as w}from"@mantine/core";import{a as x}from"./index-b6603e31.js";import{u as E}from"./useTranslations-e8adac8a.js";import C from"innertext";import{t as k}from"./theme-6958f818.js";import{H as N,I as A,d as T,A as z,P,e as I,f as S}from"./index-d99f5fe1.js";import{d as L,a9 as M,aa as j,O as B,ab as F,ac as O,ad as R,H as V,ae as D,x as U,Q as W,af as H,ag as Z,ah as q,ai as _,aj as G,ak as Q,w as X,al as K,am as $,an as Y,ao as J,E as ee,ap as te,a0 as ae,A as oe,aq as ne,ar as ie,as as le,at as re,au as se}from"./utils-49cd0015.js";import"@mantine/dates";import{D as ce,d as de}from"./index-25a079fc.js";import"./Onboarding-ff78862f.js";import{CommonGAssets as me}from"./gAssets.js";import pe from"dayjs";import{M as ue,t as ge,o as ve,k as he}from"./screenSizeContext-4eb558b5.js";import be,{keyframes as fe,css as ye}from"styled-components";import"./isProduction-b12d596a.js";import{I as we}from"./index-e006ea08.js";import"@mantine/hooks";import{A as xe,a as Ee,B as Ce,D as ke}from"./index-58d76b74.js";import{e as Ne,c as Ae,P as Te,g as ze,b as Pe,h as Ie,i as Se}from"./dataTransform-acd309eb.js";import{T as Le}from"./index-4c42fd2d.js";import{I as Me}from"./index-e8aa27ee.js";import je from"lodash/debounce";import Be from"react-contenteditable";import{B as Fe}from"./index-ac0440c7.js";import{d as Oe,g as Re}from"./cookieHelper-24e8a5fb.js";import*as Ve from"react-dom";import{format as De}from"date-fns";import"react-day-picker/DayPickerInput";import{U as Ue}from"./index.styled-9454d250.js";import"./index-61b40bb3.js";import"lodash/throttle";import"./types-614fc596.js";import"react-hook-form";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./index.styled-574d9f4e.js";import"uuid";import"./utils-0f4c6649.js";import"string-format";import We from"dayjs/plugin/relativeTime";import{M as He}from"./index-03fb3d5f.js";import{a as Ze}from"./useUniqueId-224e1126.js";import"./translationsContext-cf558e50.js";import{g as qe}from"./routing-2ca62b4e.js";const _e=e=>a.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),a.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),Ge=n({}),Qe=({children:e,defaultParams:t})=>o.createElement(Ge.Provider,{value:{defaultParams:t}},e),Xe=e=>{const{data:{userInfo:t,env:{togetherBasePath:a}}}=i(L),{defaultParams:o}=i(Ge)||{},n=null==t?void 0:t.id,l=t&&"number"==typeof t.communities_interacted&&0===t.communities_interacted;return{authActionWrapper:(t,i)=>{const r=Object.assign(Object.assign(Object.assign({},o),e),i);if(!n||l){n||Oe(M),(null==r?void 0:r._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(r._joinCommunityIds).filter(Boolean))))),null==r||delete r._joinCommunityIds),(null==r?void 0:r._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(r._joinTopicIds).filter(Boolean))))),null==r||delete r._joinTopicIds);const e=(null==r?void 0:r._location)||window.location.href;return null==r||delete r._location,window.location.href=j(e,r,a),null}return t&&t()},params:Object.assign(Object.assign({},o),e)}},Ke=be.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{a as e}from"./tslib.es6-c8835980.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-7597d802.js";import d from"lodash/debounce";import{I as p,L as u,a as h}from"./constants-254a4df3.js";import{I as g}from"./index-52cbdc13.js";import m,{createGlobalStyle as C}from"styled-components";import{T as b}from"./index-164612c2.js";import{t as f}from"./theme-31acd0c2.js";import{M as y}from"./screenSizeContext-987c451f.js";import v from"react-loading-skeleton";import x from"lodash/shuffle";import{a as w}from"./useOutsideClick-c00670e4.js";import{P as E}from"./paths-d4225106.js";import{Skeleton as S,Input as L,Divider as k,Tabs as O,Flex as j,Button as I}from"@mantine/core";import{c as M,d as R}from"./index-ef52a951.js";import{g as F,s as $,d as T}from"./cookieHelper-f8486f9d.js";import{C as P,I as A}from"./index-b7da5adf.js";import N from"string-format";const B=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 V(){const[e,t]=a((()=>{if("undefined"==typeof window)return"unset";if(F(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=F(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};$(M,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{T(M),t("denied")}))}),[]);return n((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const D=m.div``,z=m.div`
1
+ import{a as e}from"./tslib.es6-aa6dda30.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-e8adac8a.js";import d from"lodash/debounce";import{I as p,L as u,a as h}from"./constants-bd2e2bb9.js";import{I as g}from"./index-e8aa27ee.js";import m,{createGlobalStyle as C}from"styled-components";import{T as b}from"./index-4c42fd2d.js";import{t as f}from"./theme-6958f818.js";import{M as y}from"./screenSizeContext-4eb558b5.js";import v from"react-loading-skeleton";import x from"lodash/shuffle";import{a as w}from"./useOutsideClick-7843e861.js";import{P as E}from"./paths-64ccdd58.js";import{Skeleton as S,Input as L,Divider as k,Tabs as O,Flex as j,Button as I}from"@mantine/core";import{c as M,d as R}from"./index-25a079fc.js";import{g as F,s as $,d as T}from"./cookieHelper-24e8a5fb.js";import{C as P,I as A}from"./index-d99f5fe1.js";import N from"string-format";const B=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 V(){const[e,t]=a((()=>{if("undefined"==typeof window)return"unset";if(F(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=F(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};$(M,JSON.stringify(i),{minutes:15}),s(i),t("granted")}),(()=>{T(M),t("denied")}))}),[]);return n((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const D=m.div``,z=m.div`
2
2
  --searchbar-z-index: 305;
3
3
  &[data-is-modal='true'] {
4
4
  position: fixed;
@@ -11,11 +11,11 @@ import{a as e}from"./tslib.es6-c8835980.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
- `,H=m.section``,K=m.input`
14
+ `,H=m.section``,_=m.input`
15
15
  position: fixed;
16
16
  left: -100%;
17
17
  top: -100%;
18
- `,_=m(g)`
18
+ `,K=m(g)`
19
19
  #booking-search-bar & {
20
20
  input {
21
21
  font-size: 16px;
@@ -130,7 +130,7 @@ import{a as e}from"./tslib.es6-c8835980.js";import*as t from"react";import i,{us
130
130
  pointer-events: none;
131
131
  background-color: white;
132
132
  }
133
- `;function Ce({focused:e,value:t="",onClick:a,trackingAttributes:o,inputSearchPlaceholder:s}){const{t:r}=c(),d=l(null);ge({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(me,Object.assign({onClick:()=>a&&a(),ref:d},p),i.createElement(_,{inputClassName:"location"===e?"focused":void 0,name:"booking-search-placeholder",displayIcon:i.createElement(U,{color:f.colors.gray400}),placeholder:r("booking.searchBar.searchInput.placeholder"),value:t,size:"md"}))}const be=m.header`
133
+ `;function Ce({focused:e,value:t="",onClick:a,trackingAttributes:o,inputSearchPlaceholder:s}){const{t:r}=c(),d=l(null);ge({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(me,Object.assign({onClick:()=>a&&a(),ref:d},p),i.createElement(K,{inputClassName:"location"===e?"focused":void 0,name:"booking-search-placeholder",displayIcon:i.createElement(U,{color:f.colors.gray400}),placeholder:r("booking.searchBar.searchInput.placeholder"),value:t,size:"md"}))}const be=m.header`
134
134
  display: flex;
135
135
  height: 64px;
136
136
  align-items: center;
@@ -220,19 +220,19 @@ import{a as e}from"./tslib.es6-c8835980.js";import*as t from"react";import i,{us
220
220
  }
221
221
  `,Pe=m(b)`
222
222
  font-weight: ${({theme:e})=>e.sizes.fwSemiBold};
223
- `,Ae=({onClick:e})=>{const{t:t}=c(),a=t("booking.searchBar.searchButton");return i.createElement(Te,{onClick:e,title:a},i.createElement($e,null),i.createElement(Pe,{size:"s3",color:"white"},a))};function Ne({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:E,searchLocationKeywords:S,geoLocationPermission:L,selectedLocation:k,searchKeywords:O,inputSearchPlaceholder:j}=t,{t:I}=c();ge({wrapperRef:x,disabled:!!j}),w(v,(()=>{e||a({type:Le.ClickOutsideInputLocation})})),w(x,(()=>{e||a({type:Le.ClickOutsideInputSearch})}));const M=n((()=>"granted"===L&&(null==k?void 0:k.id)===h?f.colors.primaryBase:f.colors.gray400),[L,k]),R=o((function(e){a({type:Le.ChangeInputSearch,payload:e}),"function"!=typeof b&&(e.trim().length>Ee[t.locale]||y?r(e.trim(),t):(r.cancel(),a({type:Le.DisplayInitialSearchResults})))}),[a,t]),F=o((function(e){a({type:Le.ChangeInputLocation,payload:e}),e.trim().length>Ee[t.locale]?s(e.trim()):(s.cancel(),a({type:Le.DisplayInitialCities}))}),[s,a]);return i.createElement(je,null,i.createElement(Me,{ref:v},i.createElement(_,{inputClassName:"location"===E?"focused":void 0,placeholder:I("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:i.createElement(Y,{className:"location-pin-icon",color:M}),actionIcon:i.createElement(Fe,{color:f.colors.gray300,className:""!==S?"shown":""}),onActionClick:function(){a({type:Le.ClearInputLocation}),s.cancel(),d()},value:S,onChange:F,onFocus:()=>a({type:Le.FocusInputLocation}),size:"md",trackingAttributes:m}),!e&&u()),i.createElement(Re,{ref:x},i.createElement(_,{placeholder:j||I("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:i.createElement(Fe,{color:f.colors.gray300,className:""!==O?"shown":""}),onActionClick:function(){a({type:Le.ClearInputSearch}),r.cancel(),r("",t),p()},value:O,onChange:R,onFocus:()=>a({type:Le.FocusInputSearch}),inputClassName:"search"===E?"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(Ae,{onClick:()=>{b({cityId:t.selectedLocation.id,keyword:O})}}))}const Be=()=>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"})),Ve=()=>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"})),De=()=>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"})),He=m.header`
223
+ `,Ae=({onClick:e})=>{const{t:t}=c(),a=t("booking.searchBar.searchButton");return i.createElement(Te,{onClick:e,title:a},i.createElement($e,null),i.createElement(Pe,{size:"s3",color:"white"},a))};function Ne({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:E,searchLocationKeywords:S,geoLocationPermission:L,selectedLocation:k,searchKeywords:O,inputSearchPlaceholder:j}=t,{t:I}=c();ge({wrapperRef:x,disabled:!!j}),w(v,(()=>{e||a({type:Le.ClickOutsideInputLocation})})),w(x,(()=>{e||a({type:Le.ClickOutsideInputSearch})}));const M=n((()=>"granted"===L&&(null==k?void 0:k.id)===h?f.colors.primaryBase:f.colors.gray400),[L,k]),R=o((function(e){a({type:Le.ChangeInputSearch,payload:e}),"function"!=typeof b&&(e.trim().length>Ee[t.locale]||y?r(e.trim(),t):(r.cancel(),a({type:Le.DisplayInitialSearchResults})))}),[a,t]),F=o((function(e){a({type:Le.ChangeInputLocation,payload:e}),e.trim().length>Ee[t.locale]?s(e.trim()):(s.cancel(),a({type:Le.DisplayInitialCities}))}),[s,a]);return i.createElement(je,null,i.createElement(Me,{ref:v},i.createElement(K,{inputClassName:"location"===E?"focused":void 0,placeholder:I("booking.searchBar.locationPlaceholder"),autoComplete:"off",name:"search-location",displayIcon:i.createElement(Y,{className:"location-pin-icon",color:M}),actionIcon:i.createElement(Fe,{color:f.colors.gray300,className:""!==S?"shown":""}),onActionClick:function(){a({type:Le.ClearInputLocation}),s.cancel(),d()},value:S,onChange:F,onFocus:()=>a({type:Le.FocusInputLocation}),size:"md",trackingAttributes:m}),!e&&u()),i.createElement(Re,{ref:x},i.createElement(K,{placeholder:j||I("booking.searchBar.searchInput.placeholder"),autoComplete:"off",name:"search-results",actionIcon:i.createElement(Fe,{color:f.colors.gray300,className:""!==O?"shown":""}),onActionClick:function(){a({type:Le.ClearInputSearch}),r.cancel(),r("",t),p()},value:O,onChange:R,onFocus:()=>a({type:Le.FocusInputSearch}),inputClassName:"search"===E?"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(Ae,{onClick:()=>{b({cityId:t.selectedLocation.id,keyword:O})}}))}const Be=()=>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"})),Ve=()=>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"})),De=()=>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"})),He=m.header`
224
224
  display: flex;
225
225
  justify-content: space-between;
226
226
  padding: 12px 24px;
227
227
  background-color: ${f.colors.neutral50};
228
228
  box-shadow: inset 0px 1px 0px #e4e8ec;
229
- `,Ke=m.div`
229
+ `,_e=m.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
- `,_e=m.p`
235
+ `,Ke=m.p`
236
236
  color: ${f.colors.neutral800};
237
237
  font-size: 14px;
238
238
  font-weight: ${f.sizes.fwSemiBold};
@@ -324,7 +324,7 @@ import{a as e}from"./tslib.es6-c8835980.js";import*as t from"react";import i,{us
324
324
  `,et=m.div`
325
325
  display: grid;
326
326
  place-items: center;
327
- `,tt={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"}))},it=({type:e,item:t,imageUrl:a,className:o,onClickItem:s})=>{const l=n((()=>{const t=tt[e]||W;return i.createElement(t,{width:32,height:"services"===e?32:24})}),[e]);return i.createElement(We,{onClick:()=>s&&s(t),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||s&&s(t)},tabIndex:0,role:"button",className:o},i.createElement(Je,null,"hospitals"===e?i.createElement(Xe,{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(qe,{color:f.colors.gray800,size:"p3"},t.name))},at=({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:y,locale:x}=c(),{selectedLocation:w,searchKeywords:E}=o,S=n((()=>u[x]),[x]),L="ms-MY"===x,k=n((()=>({doctors:{name:y("booking.searchPopup.doctors"),icon:i.createElement(Be,null),slug:S.DOCTOR},services:{name:y("booking.searchPopup.services"),icon:i.createElement(Ve,null),slug:S.SERVICE},hospitals:{name:y("booking.searchPopup.hospitals"),icon:i.createElement(De,null),slug:S.HOSPITAL},specialties:{name:y("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:Le.SelectSearchResult,payload:{name:t.name,url:i}})}function M(t){return i.createElement(it,{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(Ke,null,k[e].icon,i.createElement(_e,null,k[e].name)),(h.trim().length<=Ee[x]||L)&&i.createElement(Ge,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${w.slug}/${O}`}t&&s({type:Le.NavigateTo,payload:t})}},i.createElement(b,{size:"p3",color:f.colors.primaryBase},y("booking.searchPopup.seeAll")))),(p||t&&t.length>0)&&i.createElement(Ze,null,i.createElement(Ye,null,p&&Array(2).fill(void 0).map(((t,a)=>i.createElement(We,{key:e+"loading"+a},i.createElement(Je,null,i.createElement(et,null,i.createElement(v,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),i.createElement(v,{width:120,height:24})))),!p&&t&&t.length>0&&t.slice(0,j).map(M)),i.createElement(Ye,{isShown:m,isMore:!0},t.slice(j,-1).map(M)),"specialties"===e&&j<t.length&&!p&&i.createElement("button",{onClick:()=>C(!m)},i.createElement(Ue,{size:"p3",color:f.colors.primaryBase},y(m?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(j<t.length||L)&&!p&&h.trim().length>Ee[x]&&i.createElement("button",{onClick:function(){const{slug:t}=k[e],i=`/${w.slug}/${t}?q=${E}`;s({type:Le.NavigateTo,payload:i})}},i.createElement(Ue,{size:"p3",color:f.colors.primaryBase},y(`booking.searchPopup.searchIn.${e}`,{name:h})))),!p&&0===(null==t?void 0:t.length)&&i.createElement(Ze,null,i.createElement(b,{size:"sm",color:f.colors.gray400},y("booking.searchBar.noResults"))))},ot=m.section`
327
+ `,tt={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"}))},it=({type:e,item:t,imageUrl:a,className:o,onClickItem:s})=>{const l=n((()=>{const t=tt[e]||W;return i.createElement(t,{width:32,height:"services"===e?32:24})}),[e]);return i.createElement(We,{onClick:()=>s&&s(t),onKeyDown:e=>{"Enter"!==e.key&&"Space"!==e.key||s&&s(t)},tabIndex:0,role:"button",className:o},i.createElement(Je,null,"hospitals"===e?i.createElement(Xe,{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(qe,{color:f.colors.gray800,size:"p3"},t.name))},at=({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:y,locale:x}=c(),{selectedLocation:w,searchKeywords:E}=o,S=n((()=>u[x]),[x]),L="ms-MY"===x,k=n((()=>({doctors:{name:y("booking.searchPopup.doctors"),icon:i.createElement(Be,null),slug:S.DOCTOR},services:{name:y("booking.searchPopup.services"),icon:i.createElement(Ve,null),slug:S.SERVICE},hospitals:{name:y("booking.searchPopup.hospitals"),icon:i.createElement(De,null),slug:S.HOSPITAL},specialties:{name:y("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:Le.SelectSearchResult,payload:{name:t.name,url:i}})}function M(t){return i.createElement(it,{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(_e,null,k[e].icon,i.createElement(Ke,null,k[e].name)),(h.trim().length<=Ee[x]||L)&&i.createElement(Ge,{onClick:function(){let t="";switch(e){case"specialties":t=`/${O}`;break;case"services":case"doctors":case"hospitals":t=`/${w.slug}/${O}`}t&&s({type:Le.NavigateTo,payload:t})}},i.createElement(b,{size:"p3",color:f.colors.primaryBase},y("booking.searchPopup.seeAll")))),(p||t&&t.length>0)&&i.createElement(Ze,null,i.createElement(Ye,null,p&&Array(2).fill(void 0).map(((t,a)=>i.createElement(We,{key:e+"loading"+a},i.createElement(Je,null,i.createElement(et,null,i.createElement(v,{height:14,width:"hospitals"===e?12:32,style:{maxWidth:"var(--graphicSize)",minHeight:"var(--graphicSize)"}}))),i.createElement(v,{width:120,height:24})))),!p&&t&&t.length>0&&t.slice(0,j).map(M)),i.createElement(Ye,{isShown:m,isMore:!0},t.slice(j,-1).map(M)),"specialties"===e&&j<t.length&&!p&&i.createElement("button",{onClick:()=>C(!m)},i.createElement(Ue,{size:"p3",color:f.colors.primaryBase},y(m?"booking.searchPopup.seeLessSpecialties":"booking.searchPopup.seeMoreSpecialties"))),"specialties"!==e&&(j<t.length||L)&&!p&&h.trim().length>Ee[x]&&i.createElement("button",{onClick:function(){const{slug:t}=k[e],i=`/${w.slug}/${t}?q=${E}`;s({type:Le.NavigateTo,payload:i})}},i.createElement(Ue,{size:"p3",color:f.colors.primaryBase},y(`booking.searchPopup.searchIn.${e}`,{name:h})))),!p&&0===(null==t?void 0:t.length)&&i.createElement(Ze,null,i.createElement(b,{size:"sm",color:f.colors.gray400},y("booking.searchBar.noResults"))))},ot=m.section`
328
328
  background-color: white;
329
329
  border-radius: 4px;
330
330
  position: absolute;
@@ -336,7 +336,7 @@ import{a as e}from"./tslib.es6-c8835980.js";import*as t from"react";import i,{us
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
- `,nt=({data:e,state:t,dispatch:a,isMobile:o,isLoading:n,keyword:s,hideResults:l,isNavResultItem:r})=>i.createElement(ot,null,e&&e.map((e=>l&&l.includes(e.type)?i.createElement(i.Fragment,null):i.createElement(at,{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})))),st=(e,t,i)=>N(e,Object.assign(Object.assign({},t),{domain:R[i||"en-PH"]}));const lt=({isMobile:t,careApiDomain:g,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:f="",careFrontDomain:y="/care",isDebug:v=!1,askForGeolocationPermission:x=!1,gaTrackingSearchBar:w,gaTrackingLocationSearch:S,autoCompleteDisabled:L=!1,inputSearchPlaceholder:k="",isOptionAllLocation:O=!1,hideResults:j=[],isNavResultItem:I=!0,routerPush:M,onGeoLocationPermissionChange:R,onSearch:F,onChangeLocation:$})=>{const{t:T,locale:P}=c(),A=l(null),N=l(null),[B,_]=a(void 0),[Z,Y]=a(!1),{geoLocationPermission:U,geoLocationCoordinates:W,requestGeoLocation:Q}=V(),[q,J]=r(Oe,Se,(e=>Object.assign(Object.assign({},e),{isDebug:v,isMobile:t,geoLocationPermission:m||U||"unset",geoLocationCoordinates:C||W||null,searchKeywords:f,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:ae,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:Le.FetchCitiesStart}),fetch(st(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:Le.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(E.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(E.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:Le.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(E.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:Le.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}${E.GET_SEARCH_V2}`;e({type:Le.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:l,geoLocationCoordinates:r}=o;let c="";if(!l||!s)return void e({type:Le.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(st(n,{domain:t,searchType:"global",keyword:a.trim().length>Ee[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:Le.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:Le.FetchSearchResultsFinish})))}),[i,t,e])}}({dispatch:J,locale:P,careApiDomain:g}),be=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]),fe=n((()=>d(ge,400)),[ge]),ye=n((()=>d(me,400)),[me]);s((()=>{""!==f&&f!==q.searchKeywords&&J({type:Le.UpdateInitialSearchValue,payload:f})}),[f]),s((()=>{x&&(null==se?void 0:se.id)===h&&"unset"===ne&&Q()}),[x,se,ne]),s((()=>{m||ne===U||("granted"===U&&W?J({type:Le.GrantGeoLocationPermission,payload:W}):"denied"===U&&J({type:Le.DenyGeoLocationPermission}))}),[ne,U,W,m]),s((()=>{X&&(M?M(X):window.location.href=`${y}${X}`)}),[X]);const ve=o((function(){J({type:Le.SelectCurrentLocation,payload:be})}),[T,J]);s((()=>{var e;"denied"===ne||le||J({type:Le.SelectLocation,payload:{name:T("booking.searchBar.allLocations"),id:p,slug:null===(e=u[P])||void 0===e?void 0:e.ALL}}),R&&R(ne,q.geoLocationCoordinates),t&&"granted"===ne&&se&&J({type:Le.FocusInputSearch}),he({coordinates:q.geoLocationCoordinates})}),[ne]),s((()=>{se&&re&&me(q.searchKeywords,q)}),[se,re]),s((()=>{k!==ue&&J({type:Le.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:Le.SelectLocation,payload:e}),"ms-MY"!==P&&Ie(),$&&$(e)}),[T,J]);function ke(){"ms-MY"===P&&Y(!0),t&&"granted"!==q.geoLocationPermission?Q():(ve(),"ms-MY"!==P&&Ie())}function je(){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 Me(){J({type:Le.CloseMobileModal})}function Re(){return"location"!==ee?null:i.createElement(ie,{isLoading:te,cities:ae,onLocationClick:xe,onCurrentLocationClick:ke,isLocationLoading:te,geoLocationPermission:ne,selectedLocation:se,isOptionAllLocation:O})}function Fe(){return"search"!==ee?null:q.autoCompleteDisabled?t?i.createElement(Ae,{onClick:()=>{F({cityId:q.selectedLocation.id,keyword:oe}),Me()}}):null:i.createElement(nt,{data:ce,state:q,dispatch:J,isMobile:!1,keyword:oe,isLoading:de,hideResults:j,isNavResultItem:I})}function $e(){return i.createElement(Ne,{isMobile:t,state:q,dispatch:J,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:ye,focusLocationInput:je,focusSearchInput:Ie,renderLocationResults:Re,renderSearchResults:Fe,trackingAttributes:w,locationTrackingAttributes:S,onSearch:F,initalSearchValue:f})}return s((()=>{if(window.visualViewport){const e=e=>{const t=e.target;_(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[_]),s((()=>{if(se&&Z&&"ms-MY"===P){const e=`/${se.slug}/hospital`;J({type:Le.NavigateTo,payload:e}),Y(!1)}}),[Z,P,se]),t?i.createElement(i.Fragment,null,i.createElement(G,null),i.createElement(K,{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(H,null,i.createElement(we,{headingText:T("booking.searchBar.searchButton"),onLeftClick:Me}),$e()),Re(),Fe()):i.createElement(Ce,{onClick:function(){var t;return e(this,void 0,void 0,(function*(){N.current&&N.current.focus(),J({type:Le.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(D,{id:"booking-search-bar",ref:A},$e())},rt=m.div``,ct=m.div`
339
+ `,nt=({data:e,state:t,dispatch:a,isMobile:o,isLoading:n,keyword:s,hideResults:l,isNavResultItem:r})=>i.createElement(ot,null,e&&e.map((e=>l&&l.includes(e.type)?i.createElement(i.Fragment,null):i.createElement(at,{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})))),st=(e,t,i)=>N(e,Object.assign(Object.assign({},t),{domain:R[i||"en-PH"]}));const lt=({isMobile:t,careApiDomain:g,geoLocationPermission:m,geoLocationCoordinates:C,initialSelectedCity:b,initialSearchValue:f="",careFrontDomain:y="/care",isDebug:v=!1,askForGeolocationPermission:x=!1,gaTrackingSearchBar:w,gaTrackingLocationSearch:S,autoCompleteDisabled:L=!1,inputSearchPlaceholder:k="",isOptionAllLocation:O=!1,hideResults:j=[],isNavResultItem:I=!0,routerPush:M,onGeoLocationPermissionChange:R,onSearch:F,onChangeLocation:$})=>{const{t:T,locale:P}=c(),A=l(null),N=l(null),[B,K]=a(void 0),[Z,Y]=a(!1),{geoLocationPermission:U,geoLocationCoordinates:W,requestGeoLocation:Q}=V(),[q,J]=r(Oe,Se,(e=>Object.assign(Object.assign({},e),{isDebug:v,isMobile:t,geoLocationPermission:m||U||"unset",geoLocationCoordinates:C||W||null,searchKeywords:f,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:ae,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:Le.FetchCitiesStart}),fetch(st(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:Le.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(E.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(E.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:Le.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(E.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:Le.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}${E.GET_SEARCH_V2}`;e({type:Le.FetchSearchResultsStart});const{defaultCity:s,selectedLocation:l,geoLocationCoordinates:r}=o;let c="";if(!l||!s)return void e({type:Le.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(st(n,{domain:t,searchType:"global",keyword:a.trim().length>Ee[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:Le.FetchSearchResultsComplete,payload:t}))).catch((e=>{console.log("error loading search results",{url:n,error:e})})).finally((()=>e({type:Le.FetchSearchResultsFinish})))}),[i,t,e])}}({dispatch:J,locale:P,careApiDomain:g}),be=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]),fe=n((()=>d(ge,400)),[ge]),ye=n((()=>d(me,400)),[me]);s((()=>{""!==f&&f!==q.searchKeywords&&J({type:Le.UpdateInitialSearchValue,payload:f})}),[f]),s((()=>{x&&(null==se?void 0:se.id)===h&&"unset"===ne&&Q()}),[x,se,ne]),s((()=>{m||ne===U||("granted"===U&&W?J({type:Le.GrantGeoLocationPermission,payload:W}):"denied"===U&&J({type:Le.DenyGeoLocationPermission}))}),[ne,U,W,m]),s((()=>{X&&(M?M(X):window.location.href=`${y}${X}`)}),[X]);const ve=o((function(){J({type:Le.SelectCurrentLocation,payload:be})}),[T,J]);s((()=>{var e;"denied"===ne||le||J({type:Le.SelectLocation,payload:{name:T("booking.searchBar.allLocations"),id:p,slug:null===(e=u[P])||void 0===e?void 0:e.ALL}}),R&&R(ne,q.geoLocationCoordinates),t&&"granted"===ne&&se&&J({type:Le.FocusInputSearch}),he({coordinates:q.geoLocationCoordinates})}),[ne]),s((()=>{se&&re&&me(q.searchKeywords,q)}),[se,re]),s((()=>{k!==ue&&J({type:Le.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:Le.SelectLocation,payload:e}),"ms-MY"!==P&&Ie(),$&&$(e)}),[T,J]);function ke(){"ms-MY"===P&&Y(!0),t&&"granted"!==q.geoLocationPermission?Q():(ve(),"ms-MY"!==P&&Ie())}function je(){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 Me(){J({type:Le.CloseMobileModal})}function Re(){return"location"!==ee?null:i.createElement(ie,{isLoading:te,cities:ae,onLocationClick:xe,onCurrentLocationClick:ke,isLocationLoading:te,geoLocationPermission:ne,selectedLocation:se,isOptionAllLocation:O})}function Fe(){return"search"!==ee?null:q.autoCompleteDisabled?t?i.createElement(Ae,{onClick:()=>{F({cityId:q.selectedLocation.id,keyword:oe}),Me()}}):null:i.createElement(nt,{data:ce,state:q,dispatch:J,isMobile:!1,keyword:oe,isLoading:de,hideResults:j,isNavResultItem:I})}function $e(){return i.createElement(Ne,{isMobile:t,state:q,dispatch:J,debouncedFetchCitiesByKeyword:fe,debouncedFetchSearchResults:ye,focusLocationInput:je,focusSearchInput:Ie,renderLocationResults:Re,renderSearchResults:Fe,trackingAttributes:w,locationTrackingAttributes:S,onSearch:F,initalSearchValue:f})}return s((()=>{if(window.visualViewport){const e=e=>{const t=e.target;K(null==t?void 0:t.height)};return window.visualViewport.addEventListener("resize",e,{passive:!0}),()=>{window.visualViewport.removeEventListener("resize",e)}}}),[K]),s((()=>{if(se&&Z&&"ms-MY"===P){const e=`/${se.slug}/hospital`;J({type:Le.NavigateTo,payload:e}),Y(!1)}}),[Z,P,se]),t?i.createElement(i.Fragment,null,i.createElement(G,null),i.createElement(_,{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(H,null,i.createElement(we,{headingText:T("booking.searchBar.searchButton"),onLeftClick:Me}),$e()),Re(),Fe()):i.createElement(Ce,{onClick:function(){var t;return e(this,void 0,void 0,(function*(){N.current&&N.current.focus(),J({type:Le.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(D,{id:"booking-search-bar",ref:A},$e())},rt=m.div``,ct=m.div`
340
340
  background-color: ${f.colors.neutral50};
341
341
  padding-bottom: 10px;
342
342
  ${y.mbDown} {
@@ -710,7 +710,7 @@ import{a as e}from"./tslib.es6-c8835980.js";import*as t from"react";import i,{us
710
710
  gap: 5px;
711
711
  margin-top: 16px;
712
712
  flex-wrap: wrap;
713
- `,Kt=m.div`
713
+ `,_t=m.div`
714
714
  color: ${f.colors.gray600};
715
715
  font-size: 14px;
716
716
  font-weight: 600;
@@ -744,8 +744,8 @@ import{a as e}from"./tslib.es6-c8835980.js";import*as t from"react";import i,{us
744
744
  border-color: ${f.colors.neutral100};
745
745
  background: #f7f9fc;
746
746
  }
747
- `,_t=()=>i.createElement(Ht,null,i.createElement(Kt,null,"Popular Specialties"),i.createElement(Kt,{className:"active"},"General Practitioner"),i.createElement(Kt,{className:"view-all"},"View all")),Gt=m.div`
747
+ `,Kt=()=>i.createElement(Ht,null,i.createElement(_t,null,"Popular Specialties"),i.createElement(_t,{className:"active"},"General Practitioner"),i.createElement(_t,{className:"view-all"},"View all")),Gt=m.div`
748
748
  background: rgba(255, 255, 255, 0.64);
749
749
  backdrop-filter: blur(12px);
750
750
  border-bottom: 1px solid ${f.colors.neutral100};
751
- `,Zt=({currentTab:e,isMobile:t,setCurrentTab:a})=>{const{t:o}=c(),s=n((()=>({root:{overflowY:t?"hidden":"initial",overflowX:t?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:t?"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:t?"14px":"16px",fontWeight:600,lineHeight:t?"22px":"24px"}})),[t]);return i.createElement(Gt,null,i.createElement(P,null,i.createElement(O,{value:e,onTabChange:e=>{a(e)},styles:s},i.createElement(O.List,null,i.createElement(O.Tab,{value:"hospital"},o("booking.searchPopup.hospitals")),i.createElement(O.Tab,{value:"doctor"},o("booking.searchPopup.doctors")),i.createElement(O.Tab,{value:"service"},o("booking.searchPopup.services")),i.createElement(O.Tab,{value:"specialty"},o("booking.searchPopup.specialties"))))))};const Yt=({isMobile:e,careApiDomain:t,geoLocationPermission:g,geoLocationCoordinates:m,initialSelectedCity:C,initialSearchValue:b="",careFrontDomain:f="/care",isDebug:y=!1,gaTrackingSearchBar:v,gaTrackingLocationSearch:x,autoCompleteDisabled:w=!1,inputSearchPlaceholder:S="",routerPush:L,onGeoLocationPermissionChange:k,onChangeLocation:O})=>{const{locale:M,t:R}=c(),F=l(null),[$,T]=a("hospital"),{geoLocationPermission:P,geoLocationCoordinates:A}=V(),[N,B]=r(mt,ut,(t=>Object.assign(Object.assign({},t),{isDebug:y,isMobile:e,geoLocationPermission:g||P||"unset",geoLocationCoordinates:m||A||null,searchKeywords:b,initialSelectedCity:C||null,selectedLocation:C||t.selectedLocation||null,searchLocationKeywords:(null==C?void 0:C.name)||t.searchLocationKeywords,autoCompleteDisabled:w,inputSearchPlaceholder:S,locale:M}))),{navigateTo:D,searchKeywords:z,geoLocationPermission:H,selectedLocation:K,selectedSpecialty:_,initialSelectedCity:G,searchResults:Z,isLoadingSearchResults:Y}=N,{fetchCitiesByLocation:U,fetchCitiesByKeyword:W,fetchSearchResults:Q,fetchAllSpecialties:q}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const a=o((function(a,o={}){const n=`${t}${a}`;return e({type:ht.FetchCitiesStart}),fetch(st(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:ht.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(E.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(E.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:ht.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(E.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ht.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:o((function(a,o,n,s){const l="specialty"===n?`${t}${E.GET_SEARCH_SPECIALTY}`:`${t}${E.GET_SEARCH_V2}`;e({type:ht.FetchSearchResultsStart});const{defaultCity:r,selectedLocation:c,geoLocationCoordinates:d,selectedSpecialty:u}=o;let g="";if(!c||!r)return void e({type:ht.FetchSearchResultsFinish});c.id===h?d||(g=r.id):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:"";return fetch(st(l,{domain:t,searchType:n||"global",keyword:a.trim().length>pt[i]?a.trim():"",city:g===h?"":g,lat:m,lng:C,specialty_id:b},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:ht.FetchSearchResultsComplete,payload:{key:n,searches:t.searches||t.specialties||[]}}),s&&e({type:ht.UpdateInitialSearchResults,payload:{key:n,searches:t.searches||t.specialties||[]}})})).catch((e=>{console.log("error loading search results",{url:l,error:e})})).finally((()=>e({type:ht.FetchSearchResultsFinish})))}),[i,t,e]),fetchAllSpecialties:o((function(){const a=`${t}${E.GET_SEARCH_SPECIALTY}`;return fetch(st(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:ht.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:a,error:e})}))}),[i,t,e])}}({dispatch:B,locale:M,careApiDomain:t}),J=n((()=>u[M]),[M]),X=n((()=>({doctor:{name:R("booking.searchPopup.doctors"),icon:i.createElement(kt,null),slug:J.DOCTOR},service:{name:R("booking.searchPopup.services"),icon:i.createElement(Ot,null),slug:J.SERVICE},hospital:{name:R("booking.searchPopup.hospitals"),icon:i.createElement(jt,null),slug:J.HOSPITAL},specialty:{name:R("booking.searchPopup.specialties"),icon:i.createElement(It,null),slug:J.SPECIALTIES}})),[$]),ee=n((()=>d(W,400)),[W]),te=n((()=>d(Q,400)),[Q]),ie=o((function(e){B({type:ht.SelectLocation,payload:e}),ae(),O&&O(e)}),[R,B]);function ae(){var e;F.current&&(null===(e=F.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return s((()=>{var t;"denied"===H||G||B({type:ht.SelectLocation,payload:{name:R("booking.searchBar.allLocations"),id:p,slug:null===(t=u[M])||void 0===t?void 0:t.ALL}}),k&&k(H,N.geoLocationCoordinates),e&&"granted"===H&&K&&B({type:ht.FocusInputSearch}),U({coordinates:N.geoLocationCoordinates})}),[H]),s((()=>{B({type:ht.SelectSpecialty,payload:{name:R("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:J.SPECIALTIES}})}),[]),s((()=>{q()}),[]),s((()=>{D&&(L?L(D):window.location.href=`${f}${D}`)}),[D]),s((()=>{(K||_)&&Q(N.searchKeywords,N,$,!0)}),[K,_]),s((()=>{Q(N.searchKeywords,N,$,!0)}),[$]),i.createElement(rt,{ref:F},i.createElement(Zt,{currentTab:$,setCurrentTab:T,isMobile:e}),i.createElement(ct,null,i.createElement(dt,null,i.createElement(j,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==$&&i.createElement(At,{state:N,isMobile:e,dispatch:B,debouncedFetchCitiesByKeyword:ee,selectedLocation:K,onLocationClick:ie,trackingAttributes:x}),i.createElement(Rt,{type:$,isMobile:e,state:N,dispatch:B,debouncedFetchSearchResults:te,initalSearchValue:b,focusSearchInput:ae,typeInformation:X,trackingAttributes:v,isLoading:Y}),i.createElement(I,{size:e?"md":"lg",fullWidth:e,onClick:function(){let e="";const{slug:t}=X[$];e="specialty"===$?`/${t}?q=${z}`:`/${K.slug}/${t}?q=${z}`,e&&B({type:ht.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},R("booking.searchBar.searchButton"))),"specialty"!==$&&i.createElement(_t,null),"specialty"===$&&i.createElement(zt,{state:N,isMobile:e,dispatch:B,specialties:(null==Z?void 0:Z.specialty)||[],isLoading:Y}))))};var Ut;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Ut||(Ut={}));var Wt=Object.freeze({__proto__:null,get RedirectType(){return Ut}});export{lt as B,B as C,Yt as a,Wt as t};
751
+ `,Zt=({currentTab:e,isMobile:t,setCurrentTab:a})=>{const{t:o}=c(),s=n((()=>({root:{overflowY:t?"hidden":"initial",overflowX:t?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:t?"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:t?"14px":"16px",fontWeight:600,lineHeight:t?"22px":"24px"}})),[t]);return i.createElement(Gt,null,i.createElement(P,null,i.createElement(O,{value:e,onTabChange:e=>{a(e)},styles:s},i.createElement(O.List,null,i.createElement(O.Tab,{value:"hospital"},o("booking.searchPopup.hospitals")),i.createElement(O.Tab,{value:"doctor"},o("booking.searchPopup.doctors")),i.createElement(O.Tab,{value:"service"},o("booking.searchPopup.services")),i.createElement(O.Tab,{value:"specialty"},o("booking.searchPopup.specialties"))))))};const Yt=({isMobile:e,careApiDomain:t,geoLocationPermission:g,geoLocationCoordinates:m,initialSelectedCity:C,initialSearchValue:b="",careFrontDomain:f="/care",isDebug:y=!1,gaTrackingSearchBar:v,gaTrackingLocationSearch:x,autoCompleteDisabled:w=!1,inputSearchPlaceholder:S="",routerPush:L,onGeoLocationPermissionChange:k,onChangeLocation:O})=>{const{locale:M,t:R}=c(),F=l(null),[$,T]=a("hospital"),{geoLocationPermission:P,geoLocationCoordinates:A}=V(),[N,B]=r(mt,ut,(t=>Object.assign(Object.assign({},t),{isDebug:y,isMobile:e,geoLocationPermission:g||P||"unset",geoLocationCoordinates:m||A||null,searchKeywords:b,initialSelectedCity:C||null,selectedLocation:C||t.selectedLocation||null,searchLocationKeywords:(null==C?void 0:C.name)||t.searchLocationKeywords,autoCompleteDisabled:w,inputSearchPlaceholder:S,locale:M}))),{navigateTo:D,searchKeywords:z,geoLocationPermission:H,selectedLocation:_,selectedSpecialty:K,initialSelectedCity:G,searchResults:Z,isLoadingSearchResults:Y}=N,{fetchCitiesByLocation:U,fetchCitiesByKeyword:W,fetchSearchResults:Q,fetchAllSpecialties:q}=function({dispatch:e,careApiDomain:t,locale:i="vi-VN"}){const a=o((function(a,o={}){const n=`${t}${a}`;return e({type:ht.FetchCitiesStart}),fetch(st(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:ht.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(E.GET_CITY_BY_IP,Object.assign(Object.assign({},o),n))];return"zh-TW"===i&&s.push(a(E.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:ht.FetchCitiesByGeoIpComplete,payload:a})})).catch((e=>console.error("error loading cities by location",e)))}),[i,t,e]),fetchCitiesByKeyword:o((function(t){return a(E.GET_CITIES_LIST,{keyword:t}).then((t=>{e({type:ht.FetchCitiesByKeywordComplete,payload:t.cities})})).catch((e=>console.error("error loading cities by keyword",e)))}),[i,t,e]),fetchSearchResults:o((function(a,o,n,s){const l="specialty"===n?`${t}${E.GET_SEARCH_SPECIALTY}`:`${t}${E.GET_SEARCH_V2}`;e({type:ht.FetchSearchResultsStart});const{selectedLocation:r,geoLocationCoordinates:c,selectedSpecialty:d}=o;let u="";if(!r)return void e({type:ht.FetchSearchResultsFinish});u=r.id===p?"":r.id;const g=(null==c?void 0:c.lat)||"",m=(null==c?void 0:c.lng)||"",C=(null==d?void 0:d.id)>0?null==d?void 0:d.id:"";return fetch(st(l,{domain:t,searchType:n||"global",keyword:a.trim().length>pt[i]?a.trim():"",city:u===h?"":u,lat:g,lng:m,specialty_id:C},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:ht.FetchSearchResultsComplete,payload:{key:n,searches:t.searches||t.specialties||[]}}),s&&e({type:ht.UpdateInitialSearchResults,payload:{key:n,searches:t.searches||t.specialties||[]}})})).catch((e=>{console.log("error loading search results",{url:l,error:e})})).finally((()=>e({type:ht.FetchSearchResultsFinish})))}),[i,t,e]),fetchAllSpecialties:o((function(){const a=`${t}${E.GET_SEARCH_SPECIALTY}`;return fetch(st(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:ht.FetchAllSpecialties,payload:t.specialties||[]})})).catch((e=>{console.log("error loading search results",{url:a,error:e})}))}),[i,t,e])}}({dispatch:B,locale:M,careApiDomain:t}),J=n((()=>u[M]),[M]),X=n((()=>({doctor:{name:R("booking.searchPopup.doctors"),icon:i.createElement(kt,null),slug:J.DOCTOR},service:{name:R("booking.searchPopup.services"),icon:i.createElement(Ot,null),slug:J.SERVICE},hospital:{name:R("booking.searchPopup.hospitals"),icon:i.createElement(jt,null),slug:J.HOSPITAL},specialty:{name:R("booking.searchPopup.specialties"),icon:i.createElement(It,null),slug:J.SPECIALTIES}})),[$]),ee=n((()=>d(W,400)),[W]),te=n((()=>d(Q,400)),[Q]),ie=o((function(e){B({type:ht.SelectLocation,payload:e}),ae(),O&&O(e)}),[R,B]);function ae(){var e;F.current&&(null===(e=F.current.querySelector('input[name="search-results"]'))||void 0===e||e.focus())}return s((()=>{var t;"denied"===H||G||B({type:ht.SelectLocation,payload:{name:R("booking.searchBar.allLocations"),id:p,slug:null===(t=u[M])||void 0===t?void 0:t.ALL}}),k&&k(H,N.geoLocationCoordinates),e&&"granted"===H&&_&&B({type:ht.FocusInputSearch}),U({coordinates:N.geoLocationCoordinates})}),[H]),s((()=>{B({type:ht.SelectSpecialty,payload:{name:R("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:J.SPECIALTIES}})}),[]),s((()=>{q()}),[]),s((()=>{D&&(L?L(D):window.location.href=`${f}${D}`)}),[D]),s((()=>{Q(N.searchKeywords,N,$,!0)}),[_,K,$]),i.createElement(rt,{ref:F},i.createElement(Zt,{currentTab:$,setCurrentTab:T,isMobile:e}),i.createElement(ct,null,i.createElement(dt,null,i.createElement(j,{gap:"12px",justify:"space-between",align:"center",direction:e?"column":"row",className:"flex-search-input"},"specialty"!==$&&i.createElement(At,{state:N,isMobile:e,dispatch:B,debouncedFetchCitiesByKeyword:ee,selectedLocation:_,onLocationClick:ie,trackingAttributes:x}),i.createElement(Rt,{type:$,isMobile:e,state:N,dispatch:B,debouncedFetchSearchResults:te,initalSearchValue:b,focusSearchInput:ae,typeInformation:X,trackingAttributes:v,isLoading:Y}),i.createElement(I,{size:e?"md":"lg",fullWidth:e,onClick:function(){let e="";const{slug:t}=X[$];e="specialty"===$?`/${t}?q=${z}`:`/${_.slug}/${t}?q=${z}`,e&&B({type:ht.NavigateTo,payload:e})},styles:{root:{height:e?"40px":"48px"}}},R("booking.searchBar.searchButton"))),"specialty"!==$&&i.createElement(Kt,null),"specialty"===$&&i.createElement(zt,{state:N,isMobile:e,dispatch:B,specialties:(null==Z?void 0:Z.specialty)||[],isLoading:Y}))))};var Ut;!function(e){e[e.SPECIALTY=1]="SPECIALTY",e[e.DOCTOR=2]="DOCTOR",e[e.CLINIC=3]="CLINIC",e[e.SERVICE=4]="SERVICE"}(Ut||(Ut={}));var Wt=Object.freeze({__proto__:null,get RedirectType(){return Ut}});export{lt as B,B as C,Yt as a,Wt as t};
@@ -1 +1 @@
1
- export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,G as Gender,L as LOCALE,O as OnboardingStep}from"./Onboarding-ad49870c.js";
1
+ export{a as BabyGrowthChartDuration,B as BabyGrowthChartType,b as BabyGrowthResultTab,G as Gender,L as LOCALE,O as OnboardingStep}from"./Onboarding-ff78862f.js";
@@ -0,0 +1 @@
1
+ import{a as o}from"./tslib.es6-aa6dda30.js";import{useState as t,useEffect as a,useCallback as e}from"react";import{a as i}from"./getDynamicHealthTool-e1e9eb88.js";const l=l=>{const[n,r]=t([]);a((()=>{o(void 0,void 0,void 0,(function*(){const o=yield i(l);r(o)}))}),[i,l]);const s=e((o=>{var t;return(null===(t=n.find((t=>t.template===o)))||void 0===t?void 0:t.link)||""}),[n]);return{allTools:n,getHealthToolLink:s}};export{l as u};
@@ -1 +1 @@
1
- import{a as e}from"./tslib.es6-c8835980.js";import{useRef as t,useEffect as n,useState as r,useCallback as i}from"react";import{g as o}from"./cookieHelper-f8486f9d.js";import{u as a}from"./useUniqueId-6daecd5a.js";function l(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const c=r=>{const i=t("");n((()=>(e(void 0,void 0,void 0,(function*(){var e,t,n,a,c;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(n=i.current)||void 0===n?void 0:n.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==r?void 0:r.id){const[e,t,n,i,s,u]=yield Promise.all([r.email?l(r.email):null,r.phone?l(r.phone):null,r.birthday?l(r.birthday.split("-").join("")):null,r.gender?"m":"f",r.city_name?l(r.city_name).then((e=>e.replace(/\s/g,""))):null,r.name?l(r.name):null]);o("_fbc"),o("_fbp");const d={user_id:r.id};u&&(d.fn=u),e&&(d.em=e),t&&(d.ph=t),n&&(d.db=n),s&&(d.ct=s),null===(c=null===(a=window.localStorage)||void 0===a?void 0:a.setItem)||void 0===c||c.call(a,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[r])},s=e=>{const n=t(),r=t(e);return a()||r.current===e||(n.current=r.current,r.current=e),n.current},u=e=>{const[o,a]=r(e),l=t(0),c=i((e=>{cancelAnimationFrame(l.current),l.current=requestAnimationFrame((()=>{a(e)}))}),[]);return n((()=>()=>cancelAnimationFrame(l.current))),[o,c]};export{s as a,u as b,c as u};
1
+ import{a as e}from"./tslib.es6-aa6dda30.js";import{useRef as t,useEffect as n,useState as r,useCallback as i}from"react";import{g as o}from"./cookieHelper-24e8a5fb.js";import{u as a}from"./useUniqueId-224e1126.js";function l(e){const t=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",t).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const c=r=>{const i=t("");n((()=>(e(void 0,void 0,void 0,(function*(){var e,t,n,a,c;if(!i.current){let e=yield fetch("https://api.ipify.org").then((e=>e.text()));e||(e=yield fetch("https://icanhazip.com").then((e=>e.text()))),i.current=e}if(null===(t=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===t||t.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(n=i.current)||void 0===n?void 0:n.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==r?void 0:r.id){const[e,t,n,i,s,u]=yield Promise.all([r.email?l(r.email):null,r.phone?l(r.phone):null,r.birthday?l(r.birthday.split("-").join("")):null,r.gender?"m":"f",r.city_name?l(r.city_name).then((e=>e.replace(/\s/g,""))):null,r.name?l(r.name):null]);o("_fbc"),o("_fbp");const d={user_id:r.id};u&&(d.fn=u),e&&(d.em=e),t&&(d.ph=t),n&&(d.db=n),s&&(d.ct=s),null===(c=null===(a=window.localStorage)||void 0===a?void 0:a.setItem)||void 0===c||c.call(a,"fbDataLayer_userInfo",JSON.stringify(d))}})),()=>{})),[r])},s=e=>{const n=t(),r=t(e);return a()||r.current===e||(n.current=r.current,r.current=e),n.current},u=e=>{const[o,a]=r(e),l=t(0),c=i((e=>{cancelAnimationFrame(l.current),l.current=requestAnimationFrame((()=>{a(e)}))}),[]);return n((()=>()=>cancelAnimationFrame(l.current))),[o,c]};export{s as a,u as b,c as u};
@@ -1 +1 @@
1
- import{useContext as o,useMemo as a}from"react";import{T as e}from"./translationsContext-e9aaabb6.js";import r from"string-format";function t(){const{values:t,locale:n}=o(e)||{locale:"en-PH"};return a((()=>({t:(o,a)=>t?t[o]?a?r(t[o]||o,a):t[o]||o:(console.warn(`[useTranslations] Missing translation for key ${o} and locale ${n}`),a?r(o,a):o):(console.error("[useTranslations] t method called before translation values are loaded"),o),locale:n})),[t,n])}export{t as u};
1
+ import{useContext as o,useMemo as a}from"react";import{T as e}from"./translationsContext-cf558e50.js";import r from"string-format";function t(){const{values:t,locale:n}=o(e)||{locale:"en-PH"};return a((()=>({t:(o,a)=>t?t[o]?a?r(t[o]||o,a):t[o]||o:(console.warn(`[useTranslations] Missing translation for key ${o} and locale ${n}`),a?r(o,a):o):(console.error("[useTranslations] t method called before translation values are loaded"),o),locale:n})),[t,n])}export{t as u};