@hhgtech/hhg-components 1.28.55 → 1.28.56

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 (283) hide show
  1. package/build/{Plus-54948d91.js → Plus-5db023c7.js} +1 -1
  2. package/build/{WhatsApp-6d901f48.js → WhatsApp-378451bf.js} +1 -1
  3. package/build/babyGrowth.js +2 -2
  4. package/build/cache.js +1 -1
  5. package/build/care.js +1 -1
  6. package/build/components.js +1 -1
  7. package/build/{constants-a45e9439.js → constants-12b9a3a8.js} +1 -1
  8. package/build/{constants-152ef105.js → constants-c7e18ae3.js} +1 -1
  9. package/build/constants.js +1 -1
  10. package/build/{core-335c2da3.js → core-709ce77d.js} +1 -1
  11. package/build/{dataTransform-a5319404.js → dataTransform-92fa6ba9.js} +1 -1
  12. package/build/ecom.js +1 -1
  13. package/build/esm/{Plus-74f52e6c.js → Plus-8ce4f4ec.js} +1 -1
  14. package/build/esm/{WhatsApp-764b872d.js → WhatsApp-fbb196cd.js} +1 -1
  15. package/build/esm/babyGrowth.js +5 -5
  16. package/build/esm/cache.js +1 -1
  17. package/build/esm/care.js +1 -1
  18. package/build/esm/components.js +1 -1
  19. package/build/esm/{constants-0683dc31.js → constants-1b372a77.js} +1 -1
  20. package/build/esm/{constants-f4c472e4.js → constants-7a224812.js} +1 -1
  21. package/build/esm/constants.js +1 -1
  22. package/build/esm/core-2b914f39.js +1 -0
  23. package/build/esm/{dataTransform-756179c9.js → dataTransform-0b72568d.js} +1 -1
  24. package/build/esm/ecom.js +1 -1
  25. package/build/esm/footer.js +1 -1
  26. package/build/esm/gAssets.js +1 -1
  27. package/build/esm/getDynamicHealthTool-99872dc7.js +1 -0
  28. package/build/esm/{getSocialList-68fa92f4.js → getSocialList-b51adc23.js} +1 -1
  29. package/build/esm/hooks.js +1 -1
  30. package/build/esm/i18n.js +1 -1
  31. package/build/esm/i18nV2.js +1 -1
  32. package/build/esm/{index-b2fd7f71.js → index-0cc4495e.js} +1 -1
  33. package/build/esm/{index-198068d7.js → index-0d7ce447.js} +5 -5
  34. package/build/esm/{index-8e0dc901.js → index-252cd73f.js} +1 -1
  35. package/build/esm/{index-737f6666.js → index-268c7c6b.js} +1 -1
  36. package/build/esm/index-321a258f.js +1 -0
  37. package/build/esm/index-40525833.js +1 -0
  38. package/build/esm/{index-d9f09bce.js → index-47e79c7a.js} +2 -2
  39. package/build/esm/{index-516a950d.js → index-48c1217c.js} +1 -1
  40. package/build/esm/{index-fffa276c.js → index-50688929.js} +3 -3
  41. package/build/esm/{index-4209d110.js → index-635521df.js} +1 -1
  42. package/build/esm/{index-bd711d1d.js → index-636381d2.js} +1 -1
  43. package/build/esm/index-6f811e9f.js +1 -0
  44. package/build/esm/{index-77800f03.js → index-767b3730.js} +1 -1
  45. package/build/esm/{index-05e53bec.js → index-7b57d2c6.js} +1 -1
  46. package/build/esm/{index-58970baf.js → index-7ba828ef.js} +1 -1
  47. package/build/esm/{index-738bc059.js → index-829ce636.js} +1 -1
  48. package/build/esm/{index-2444997f.js → index-8a737b32.js} +1 -1
  49. package/build/esm/{index-f296970a.js → index-90134df0.js} +1 -1
  50. package/build/esm/{index-3409f3ca.js → index-b21e07ed.js} +1 -1
  51. package/build/esm/index-b46983f9.js +1 -0
  52. package/build/esm/{index-2e200c36.js → index-c2fbc104.js} +1 -1
  53. package/build/esm/{index-816d81a1.js → index-e83bfcd7.js} +1 -1
  54. package/build/esm/{index-d0efc6f7.js → index-f22483ac.js} +1 -1
  55. package/build/esm/index-f63e0f99.js +1 -0
  56. package/build/esm/index.js +1 -1
  57. package/build/esm/{index.styled-e7114743.js → index.styled-8cfdb7c4.js} +1 -1
  58. package/build/esm/{index.styles-607132bf.js → index.styles-f5691a90.js} +42 -42
  59. package/build/esm/lead.js +1 -1
  60. package/build/esm/mantine.js +1 -1
  61. package/build/esm/misc.js +1 -1
  62. package/build/esm/navigation.js +1 -1
  63. package/build/esm/onboardingV2.js +1 -1
  64. package/build/esm/pwg.js +5 -5
  65. package/build/esm/{routing-9dc90ff7.js → routing-5149c7fa.js} +1 -1
  66. package/build/esm/subot.js +1 -1
  67. package/build/esm/together.js +1 -1
  68. package/build/esm/{types-c4a3cc51.js → types-cdbe15bf.js} +1 -1
  69. package/build/esm/{types-aa7b8d46.js → types-d093873c.js} +1 -1
  70. package/build/esm/types.js +1 -1
  71. package/build/esm/{useCategory-53558471.js → useCategory-1a7c064a.js} +1 -1
  72. package/build/esm/{useHealthToolCache-cfeb4f39.js → useHealthToolCache-8eea15d9.js} +1 -1
  73. package/build/esm/{usePlacesAutocomplete-abfbd1a6.js → usePlacesAutocomplete-d698a28e.js} +1 -1
  74. package/build/esm/useTranslations-86e89bb6.js +1 -0
  75. package/build/esm/{utils-bb7cbdbf.js → utils-16683592.js} +2 -2
  76. package/build/esm/{utils-230293e5.js → utils-c799817b.js} +1 -1
  77. package/build/esm/{utils-9cb13935.js → utils-f1f499ef.js} +1 -1
  78. package/build/esm/vaccination.js +11 -11
  79. package/build/footer.js +1 -1
  80. package/build/gAssets.js +1 -1
  81. package/build/{getDynamicHealthTool-f7738ae3.js → getDynamicHealthTool-498f29e9.js} +1 -1
  82. package/build/{getSocialList-816e94c7.js → getSocialList-66c5b6ee.js} +1 -1
  83. package/build/hooks.js +1 -1
  84. package/build/i18n.js +1 -1
  85. package/build/i18nV2.js +1 -1
  86. package/build/{index-a986f5cc.js → index-0c003a87.js} +1 -1
  87. package/build/{index-3453364d.js → index-14e23eae.js} +1 -1
  88. package/build/{index-f8556ecc.js → index-2952a2dc.js} +1 -1
  89. package/build/{index-e9bcd521.js → index-2db766a9.js} +1 -1
  90. package/build/{index-a0ff0c7c.js → index-3e769745.js} +1 -1
  91. package/build/{index-beafcfe0.js → index-40a294f0.js} +1 -1
  92. package/build/{index-ac495049.js → index-4ce3604f.js} +2 -2
  93. package/build/index-5b1d11af.js +1 -0
  94. package/build/{index-ed991afc.js → index-5e751a6e.js} +1 -1
  95. package/build/{index-3c0325dd.js → index-6b402916.js} +1 -1
  96. package/build/{index-e2aa0679.js → index-74fc7579.js} +1 -1
  97. package/build/{index-9fed5846.js → index-7e8c99e4.js} +1 -1
  98. package/build/{index-abcb94df.js → index-7f9239c8.js} +2 -2
  99. package/build/{index-654c54be.js → index-86f87970.js} +1 -1
  100. package/build/{index-6fe01704.js → index-95065bac.js} +1 -1
  101. package/build/{index-36d00c1e.js → index-a36b5063.js} +20 -20
  102. package/build/{index-13b06ce7.js → index-a39628ee.js} +1 -1
  103. package/build/{index-06c31aa5.js → index-b04eb521.js} +1 -1
  104. package/build/{index-4fcc50ac.js → index-be10c4e0.js} +1 -1
  105. package/build/{index-34b22040.js → index-c50fe502.js} +2 -2
  106. package/build/index-cea2c74a.js +1 -0
  107. package/build/{index-93072a8a.js → index-e8a104ed.js} +1 -1
  108. package/build/{index-6395c71d.js → index-eea67a77.js} +1 -1
  109. package/build/{index-32c9ce71.js → index-f049adba.js} +1 -1
  110. package/build/index.js +1 -1
  111. package/build/{index.styled-5c0482ab.js → index.styled-8f95d44d.js} +1 -1
  112. package/build/{index.styles-4e9a4b76.js → index.styles-b6376365.js} +16 -16
  113. package/build/lead.js +1 -1
  114. package/build/mantine.js +1 -1
  115. package/build/misc.js +1 -1
  116. package/build/navigation.js +1 -1
  117. package/build/onboardingV2.js +1 -1
  118. package/build/pwg.js +2 -2
  119. package/build/{routing-20ad0d2b.js → routing-0b0a26ff.js} +1 -1
  120. package/build/subot.js +1 -1
  121. package/build/together.js +1 -1
  122. package/build/{types-8871614c.js → types-294e4e86.js} +1 -1
  123. package/build/{types-21848dce.js → types-91eb9de5.js} +1 -1
  124. package/build/types.js +1 -1
  125. package/build/{useCategory-b48bb500.js → useCategory-3d89eb4d.js} +1 -1
  126. package/build/{useHealthToolCache-7ab5f9c5.js → useHealthToolCache-de7192b2.js} +1 -1
  127. package/build/{usePlacesAutocomplete-7fa143b6.js → usePlacesAutocomplete-4125b7b9.js} +1 -1
  128. package/build/{useTranslations-da1647d4.js → useTranslations-778ab09c.js} +1 -1
  129. package/build/{utils-9389c98f.js → utils-2bd7f928.js} +1 -1
  130. package/build/{utils-fd32cb42.js → utils-4db34bcf.js} +2 -2
  131. package/build/{utils-c0ee935c.js → utils-e637cc9f.js} +1 -1
  132. package/build/vaccination.js +1 -1
  133. package/package.json +1 -1
  134. package/build/esm/core-93ac9e1f.js +0 -1
  135. package/build/esm/getDynamicHealthTool-0d6da468.js +0 -1
  136. package/build/esm/index-22ebe2d3.js +0 -1
  137. package/build/esm/index-3d2abc54.js +0 -1
  138. package/build/esm/index-4d4fe4a9.js +0 -1
  139. package/build/esm/index-77fd947f.js +0 -1
  140. package/build/esm/index-ea30bcd6.js +0 -1
  141. package/build/esm/useTranslations-2bfc2d1a.js +0 -1
  142. package/build/index-695bcc12.js +0 -1
  143. package/build/index-f04d4a4d.js +0 -1
  144. /package/build/{BMI_BOYS.percentile.monthly-d3c686ae.js → BMI_BOYS.percentile.monthly-608c49ea.js} +0 -0
  145. /package/build/{BMI_BOYS.percentile.weekly-b1684768.js → BMI_BOYS.percentile.weekly-f4ef5f0a.js} +0 -0
  146. /package/build/{BMI_BOYS.percentile.yearly-0238ac12.js → BMI_BOYS.percentile.yearly-8b7c31c8.js} +0 -0
  147. /package/build/{BMI_BOYS.zscore.monthly-94cb0748.js → BMI_BOYS.zscore.monthly-ee736952.js} +0 -0
  148. /package/build/{BMI_BOYS.zscore.weekly-f50db573.js → BMI_BOYS.zscore.weekly-eaaad5cb.js} +0 -0
  149. /package/build/{BMI_BOYS.zscore.yearly-a98f3c96.js → BMI_BOYS.zscore.yearly-228bf966.js} +0 -0
  150. /package/build/{BMI_GIRLS.percentile.monthly-0b319364.js → BMI_GIRLS.percentile.monthly-ee9b4086.js} +0 -0
  151. /package/build/{BMI_GIRLS.percentile.weekly-f1518ef8.js → BMI_GIRLS.percentile.weekly-88eb168f.js} +0 -0
  152. /package/build/{BMI_GIRLS.percentile.yearly-3b178d54.js → BMI_GIRLS.percentile.yearly-64f86799.js} +0 -0
  153. /package/build/{BMI_GIRLS.zscore.monthly-5e9d2df3.js → BMI_GIRLS.zscore.monthly-47014ff8.js} +0 -0
  154. /package/build/{BMI_GIRLS.zscore.weekly-d754160f.js → BMI_GIRLS.zscore.weekly-4cba96bc.js} +0 -0
  155. /package/build/{BMI_GIRLS.zscore.yearly-8a183bde.js → BMI_GIRLS.zscore.yearly-16fdf047.js} +0 -0
  156. /package/build/{ChevronDown-15cca681.js → ChevronDown-5b12eac1.js} +0 -0
  157. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-2c94f81c.js → HEAD CIRCUM_BOYS.percentile.monthly-53f64b81.js} +0 -0
  158. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-0cae2452.js → HEAD CIRCUM_BOYS.percentile.weekly-9645d212.js} +0 -0
  159. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-74bd6cff.js → HEAD CIRCUM_BOYS.percentile.yearly-16313480.js} +0 -0
  160. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-3b47563f.js → HEAD CIRCUM_BOYS.zscore.monthly-ca44e960.js} +0 -0
  161. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-b997313c.js → HEAD CIRCUM_BOYS.zscore.weekly-d7782b27.js} +0 -0
  162. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-06d04ada.js → HEAD CIRCUM_BOYS.zscore.yearly-a7a06896.js} +0 -0
  163. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-b8241562.js → HEAD CIRCUM_GIRLS.percentile.monthly-d4be9bf4.js} +0 -0
  164. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-4e9b860d.js → HEAD CIRCUM_GIRLS.percentile.weekly-f31a52f5.js} +0 -0
  165. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-9121c08b.js → HEAD CIRCUM_GIRLS.percentile.yearly-42e83272.js} +0 -0
  166. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-f0188d6b.js → HEAD CIRCUM_GIRLS.zscore.monthly-0778a9c5.js} +0 -0
  167. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-a9911f13.js → HEAD CIRCUM_GIRLS.zscore.weekly-422152a4.js} +0 -0
  168. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-f71d641f.js → HEAD CIRCUM_GIRLS.zscore.yearly-88fbedd2.js} +0 -0
  169. /package/build/{HEIGHT_BOYS.percentile.monthly-d3768455.js → HEIGHT_BOYS.percentile.monthly-e4e06f5f.js} +0 -0
  170. /package/build/{HEIGHT_BOYS.percentile.weekly-96a73428.js → HEIGHT_BOYS.percentile.weekly-3431022e.js} +0 -0
  171. /package/build/{HEIGHT_BOYS.percentile.yearly-d839fd3b.js → HEIGHT_BOYS.percentile.yearly-ac16a132.js} +0 -0
  172. /package/build/{HEIGHT_BOYS.zscore.monthly-64ce2640.js → HEIGHT_BOYS.zscore.monthly-60ed36a3.js} +0 -0
  173. /package/build/{HEIGHT_BOYS.zscore.weekly-312366e4.js → HEIGHT_BOYS.zscore.weekly-ae6f8ffc.js} +0 -0
  174. /package/build/{HEIGHT_BOYS.zscore.yearly-16e829f4.js → HEIGHT_BOYS.zscore.yearly-a76b8b9f.js} +0 -0
  175. /package/build/{HEIGHT_GIRLS.percentile.monthly-1c21967d.js → HEIGHT_GIRLS.percentile.monthly-d377bccf.js} +0 -0
  176. /package/build/{HEIGHT_GIRLS.percentile.weekly-281fe154.js → HEIGHT_GIRLS.percentile.weekly-8654e3b3.js} +0 -0
  177. /package/build/{HEIGHT_GIRLS.percentile.yearly-c6bd690d.js → HEIGHT_GIRLS.percentile.yearly-464a3df2.js} +0 -0
  178. /package/build/{HEIGHT_GIRLS.zscore.monthly-75de2b7c.js → HEIGHT_GIRLS.zscore.monthly-a1e1e53d.js} +0 -0
  179. /package/build/{HEIGHT_GIRLS.zscore.weekly-0bc77aa6.js → HEIGHT_GIRLS.zscore.weekly-d9151bef.js} +0 -0
  180. /package/build/{HEIGHT_GIRLS.zscore.yearly-ef5ab1a5.js → HEIGHT_GIRLS.zscore.yearly-de563c40.js} +0 -0
  181. /package/build/{Subot-75abd57a.js → Subot-52a853c9.js} +0 -0
  182. /package/build/{Visible-33f6b1dc.js → Visible-87789997.js} +0 -0
  183. /package/build/{WEIGHT_BOYS.percentile.monthly-56ec27d0.js → WEIGHT_BOYS.percentile.monthly-7b12062a.js} +0 -0
  184. /package/build/{WEIGHT_BOYS.percentile.weekly-5b97ff78.js → WEIGHT_BOYS.percentile.weekly-f91d5d07.js} +0 -0
  185. /package/build/{WEIGHT_BOYS.percentile.yearly-b388b157.js → WEIGHT_BOYS.percentile.yearly-f8dcf3df.js} +0 -0
  186. /package/build/{WEIGHT_BOYS.zscore.monthly-3e16d435.js → WEIGHT_BOYS.zscore.monthly-4ec73c75.js} +0 -0
  187. /package/build/{WEIGHT_BOYS.zscore.weekly-eabb91cd.js → WEIGHT_BOYS.zscore.weekly-0957de57.js} +0 -0
  188. /package/build/{WEIGHT_BOYS.zscore.yearly-da2f6096.js → WEIGHT_BOYS.zscore.yearly-29785e07.js} +0 -0
  189. /package/build/{WEIGHT_GIRLS.percentile.monthly-c46836f5.js → WEIGHT_GIRLS.percentile.monthly-74ff490d.js} +0 -0
  190. /package/build/{WEIGHT_GIRLS.percentile.weekly-4b08038d.js → WEIGHT_GIRLS.percentile.weekly-5787c39e.js} +0 -0
  191. /package/build/{WEIGHT_GIRLS.percentile.yearly-4cd46ed1.js → WEIGHT_GIRLS.percentile.yearly-9d0b172a.js} +0 -0
  192. /package/build/{WEIGHT_GIRLS.zscore.monthly-60b75079.js → WEIGHT_GIRLS.zscore.monthly-4d69c551.js} +0 -0
  193. /package/build/{WEIGHT_GIRLS.zscore.weekly-3f61408b.js → WEIGHT_GIRLS.zscore.weekly-0de8c13f.js} +0 -0
  194. /package/build/{WEIGHT_GIRLS.zscore.yearly-319edc8c.js → WEIGHT_GIRLS.zscore.yearly-44930149.js} +0 -0
  195. /package/build/{animation-c29cc5bc.js → animation-71e7e86f.js} +0 -0
  196. /package/build/{cookieHelper-1eaa42d7.js → cookieHelper-db011eab.js} +0 -0
  197. /package/build/esm/{BMI_BOYS.percentile.monthly-20892a54.js → BMI_BOYS.percentile.monthly-9ff1f082.js} +0 -0
  198. /package/build/esm/{BMI_BOYS.percentile.weekly-5f79e22e.js → BMI_BOYS.percentile.weekly-0ba92235.js} +0 -0
  199. /package/build/esm/{BMI_BOYS.percentile.yearly-12936223.js → BMI_BOYS.percentile.yearly-1086e00e.js} +0 -0
  200. /package/build/esm/{BMI_BOYS.zscore.monthly-60708e68.js → BMI_BOYS.zscore.monthly-0f7f613e.js} +0 -0
  201. /package/build/esm/{BMI_BOYS.zscore.weekly-c8a613c5.js → BMI_BOYS.zscore.weekly-87fa8db7.js} +0 -0
  202. /package/build/esm/{BMI_BOYS.zscore.yearly-a9bd8507.js → BMI_BOYS.zscore.yearly-85eb22b9.js} +0 -0
  203. /package/build/esm/{BMI_GIRLS.percentile.monthly-41dd2d7c.js → BMI_GIRLS.percentile.monthly-2935fa95.js} +0 -0
  204. /package/build/esm/{BMI_GIRLS.percentile.weekly-d067d41b.js → BMI_GIRLS.percentile.weekly-93283f42.js} +0 -0
  205. /package/build/esm/{BMI_GIRLS.percentile.yearly-66a2783f.js → BMI_GIRLS.percentile.yearly-c016af3f.js} +0 -0
  206. /package/build/esm/{BMI_GIRLS.zscore.monthly-c815fa18.js → BMI_GIRLS.zscore.monthly-bf1221f3.js} +0 -0
  207. /package/build/esm/{BMI_GIRLS.zscore.weekly-7589a0a0.js → BMI_GIRLS.zscore.weekly-b66ec0f6.js} +0 -0
  208. /package/build/esm/{BMI_GIRLS.zscore.yearly-b7a10a85.js → BMI_GIRLS.zscore.yearly-330d603a.js} +0 -0
  209. /package/build/esm/{ChevronDown-b3e02130.js → ChevronDown-dba95d81.js} +0 -0
  210. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-626ceeeb.js → HEAD CIRCUM_BOYS.percentile.monthly-a57fcb48.js} +0 -0
  211. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-a5fdcc13.js → HEAD CIRCUM_BOYS.percentile.weekly-763200c2.js} +0 -0
  212. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-fd3d54b5.js → HEAD CIRCUM_BOYS.percentile.yearly-56722b16.js} +0 -0
  213. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-5c54f379.js → HEAD CIRCUM_BOYS.zscore.monthly-1409bd4b.js} +0 -0
  214. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-c58948a0.js → HEAD CIRCUM_BOYS.zscore.weekly-b4a8bf06.js} +0 -0
  215. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-ab4a588a.js → HEAD CIRCUM_BOYS.zscore.yearly-8eec84ca.js} +0 -0
  216. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-12b33b8e.js → HEAD CIRCUM_GIRLS.percentile.monthly-3ef12e21.js} +0 -0
  217. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-a2d59338.js → HEAD CIRCUM_GIRLS.percentile.weekly-34358201.js} +0 -0
  218. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-44dbecdb.js → HEAD CIRCUM_GIRLS.percentile.yearly-1068a35e.js} +0 -0
  219. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-58a30ace.js → HEAD CIRCUM_GIRLS.zscore.monthly-509028ee.js} +0 -0
  220. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-36428056.js → HEAD CIRCUM_GIRLS.zscore.weekly-f6358d7e.js} +0 -0
  221. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-f8600e66.js → HEAD CIRCUM_GIRLS.zscore.yearly-3a982ae8.js} +0 -0
  222. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-0ac98831.js → HEIGHT_BOYS.percentile.monthly-b071586a.js} +0 -0
  223. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-83a94654.js → HEIGHT_BOYS.percentile.weekly-fe964e0e.js} +0 -0
  224. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-3cee73b2.js → HEIGHT_BOYS.percentile.yearly-d259bd03.js} +0 -0
  225. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-26ec47f8.js → HEIGHT_BOYS.zscore.monthly-fba561d6.js} +0 -0
  226. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-b92229c6.js → HEIGHT_BOYS.zscore.weekly-bd62c93d.js} +0 -0
  227. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-b220649f.js → HEIGHT_BOYS.zscore.yearly-8215dea7.js} +0 -0
  228. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-6b12dbaf.js → HEIGHT_GIRLS.percentile.monthly-4963f297.js} +0 -0
  229. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-a565b8f2.js → HEIGHT_GIRLS.percentile.weekly-a6f4dc51.js} +0 -0
  230. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-22d15b4b.js → HEIGHT_GIRLS.percentile.yearly-a1875219.js} +0 -0
  231. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-a98b969a.js → HEIGHT_GIRLS.zscore.monthly-82dc7d06.js} +0 -0
  232. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-71d38c7d.js → HEIGHT_GIRLS.zscore.weekly-9dc820e7.js} +0 -0
  233. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-5d6fddfa.js → HEIGHT_GIRLS.zscore.yearly-b826ff70.js} +0 -0
  234. /package/build/esm/{Subot-851fd333.js → Subot-7273a528.js} +0 -0
  235. /package/build/esm/{Visible-2cdedc33.js → Visible-1090bd49.js} +0 -0
  236. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-607e4448.js → WEIGHT_BOYS.percentile.monthly-93900776.js} +0 -0
  237. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-253a7a81.js → WEIGHT_BOYS.percentile.weekly-866ad4eb.js} +0 -0
  238. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-b83e8e14.js → WEIGHT_BOYS.percentile.yearly-3c951027.js} +0 -0
  239. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-b5a3665a.js → WEIGHT_BOYS.zscore.monthly-36f7548b.js} +0 -0
  240. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-b9548729.js → WEIGHT_BOYS.zscore.weekly-85126ac6.js} +0 -0
  241. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-ea749e5d.js → WEIGHT_BOYS.zscore.yearly-eb4a834d.js} +0 -0
  242. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-1b99019f.js → WEIGHT_GIRLS.percentile.monthly-fe3367f1.js} +0 -0
  243. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-ca6f0a48.js → WEIGHT_GIRLS.percentile.weekly-13e77337.js} +0 -0
  244. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-90000ca0.js → WEIGHT_GIRLS.percentile.yearly-6bdcfaf4.js} +0 -0
  245. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-b398da08.js → WEIGHT_GIRLS.zscore.monthly-20d0147d.js} +0 -0
  246. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-14c3c82b.js → WEIGHT_GIRLS.zscore.weekly-2e229a27.js} +0 -0
  247. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-02ffbc4f.js → WEIGHT_GIRLS.zscore.yearly-61af19d6.js} +0 -0
  248. /package/build/esm/{animation-40bcca6a.js → animation-58e1654e.js} +0 -0
  249. /package/build/esm/{cookieHelper-0c3dcabd.js → cookieHelper-b69ab332.js} +0 -0
  250. /package/build/esm/{index-6deb876e.js → index-54152214.js} +0 -0
  251. /package/build/esm/{index-5e61790d.js → index-82fd9ecc.js} +0 -0
  252. /package/build/esm/{index-df9619b8.js → index-8ddd1712.js} +0 -0
  253. /package/build/esm/{isProduction-d32c9de6.js → isProduction-b5a4232a.js} +0 -0
  254. /package/build/esm/{localizeNumberFormat-0d035fa2.js → localizeNumberFormat-0bb372b5.js} +0 -0
  255. /package/build/esm/{normalizeLink-b5dd4ea3.js → normalizeLink-c5fb54cb.js} +0 -0
  256. /package/build/esm/{number-b2244c1b.js → number-9748fd86.js} +0 -0
  257. /package/build/esm/{paths-eaed7507.js → paths-dc966233.js} +0 -0
  258. /package/build/esm/{theme-868b0ca0.js → theme-adcbd043.js} +0 -0
  259. /package/build/esm/{translationsContext-6c25aedd.js → translationsContext-a60c9450.js} +0 -0
  260. /package/build/esm/{tslib.es6-ba9d8cd4.js → tslib.es6-6116a023.js} +0 -0
  261. /package/build/esm/{types-e56d1f3f.js → types-0504c47c.js} +0 -0
  262. /package/build/esm/{useIsInit-65eb966d.js → useIsInit-6a263059.js} +0 -0
  263. /package/build/esm/{useOutsideClick-0d9abe5e.js → useOutsideClick-1959d3a7.js} +0 -0
  264. /package/build/esm/{useScrollbarSize-547afb52.js → useScrollbarSize-6bc774ea.js} +0 -0
  265. /package/build/esm/{useUniqueId-9cd4ba87.js → useUniqueId-772eafdf.js} +0 -0
  266. /package/build/esm/{utils-16053cd5.js → utils-de8dd6dc.js} +0 -0
  267. /package/build/{index-8f4c566f.js → index-0011304a.js} +0 -0
  268. /package/build/{index-2e493e48.js → index-063beba4.js} +0 -0
  269. /package/build/{index-eebbbb0a.js → index-24961b96.js} +0 -0
  270. /package/build/{isProduction-1b27c7e8.js → isProduction-1358e2f3.js} +0 -0
  271. /package/build/{localizeNumberFormat-3fd4984c.js → localizeNumberFormat-c742a6c3.js} +0 -0
  272. /package/build/{normalizeLink-8d5414b7.js → normalizeLink-fb57949a.js} +0 -0
  273. /package/build/{number-c8e16fcd.js → number-a61c9201.js} +0 -0
  274. /package/build/{paths-f4b000d7.js → paths-680b0596.js} +0 -0
  275. /package/build/{theme-645eae3b.js → theme-1a921769.js} +0 -0
  276. /package/build/{translationsContext-25ed50e4.js → translationsContext-e697619c.js} +0 -0
  277. /package/build/{tslib.es6-f3854ac2.js → tslib.es6-11571a59.js} +0 -0
  278. /package/build/{types-a61d3975.js → types-2ddc39fa.js} +0 -0
  279. /package/build/{useIsInit-0b395431.js → useIsInit-ace4f5d2.js} +0 -0
  280. /package/build/{useOutsideClick-ed38ff08.js → useOutsideClick-1ff0a049.js} +0 -0
  281. /package/build/{useScrollbarSize-c9cfb1ec.js → useScrollbarSize-fe02c3ef.js} +0 -0
  282. /package/build/{useUniqueId-10e140e3.js → useUniqueId-a6a2ac25.js} +0 -0
  283. /package/build/{utils-ac610998.js → utils-71645360.js} +0 -0
package/build/subot.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./Subot-75abd57a.js"),i=require("./tslib.es6-f3854ac2.js"),n=require("./index-a0ff0c7c.js"),a=require("js-cookie"),o=require("fastdom"),l=require("fastdom/extensions/fastdom-promised"),r=require("string-format"),d=require("./utils-9389c98f.js"),s=require("uuid"),c=require("./isProduction-1b27c7e8.js"),u=require("hex-rgb"),m=require("classnames"),p=require("./index-eebbbb0a.js"),f=require("./index-a986f5cc.js"),v=require("framer-motion"),g=require("./utils-ac610998.js"),b=require("styled-components"),h=require("./index-34b22040.js"),y=require("remarkable"),_=require("react-intersection-observer"),E=require("@mantine/core"),x=require("./index-ed991afc.js"),N=require("./index-3c0325dd.js"),T=require("dayjs"),w=require("dayjs/plugin/isSameOrBefore"),I=require("./Plus-54948d91.js"),S=require("./theme-645eae3b.js");require("@mantine/dates"),require("./translationsContext-25ed50e4.js"),require("@mantine/hooks");var O=require("lodash/isEmpty"),k=require("react-hook-form"),C=require("react-phone-number-input"),M=require("@react-google-maps/api"),A=require("./usePlacesAutocomplete-7fa143b6.js"),P=require("./index-6fe01704.js"),R=require("./index-ac495049.js");function U(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("date-fns/locale"),require("./cookieHelper-1eaa42d7.js"),require("slugify"),require("./useTranslations-da1647d4.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("@mantine/carousel"),require("./WhatsApp-6d901f48.js"),require("./useUniqueId-10e140e3.js");var B=U(e),L=U(a),j=U(o),D=U(l),q=U(r),$=U(u),F=U(m),G=U(b),z=U(T),H=U(w),Y=U(O),V=U(C);const Q=j.default.extend(D.default),K={POST_VERIFY_SMS_OTP:"sms/update-phone",POST_SEND_OTP:"sms/otp",POST_SEND_OTP_WHATSAPP:"whatsapp/otp",POST_VERIFY_OTP:"sms/verify",POST_VERIFY_OTP_WHATSAPP:"sms/verify-whatsapp",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",GET_INLINE_FIRST_NODE:"bots",GET_INLINE_MESSAGE:"inline/messages",GET_INLINE_IMPRESSION:"inline/impressions",GET_INLINE_CLICK:"inline/clicks",GET_SUBOT_LOG:"log/bot/{botId}/{cookieId}/{accountId}?type={type}",POST_SUBOT_CREATE_LOG:"log/bot",FETCH_URL_DATA:"preview",GET_VOUCHER_QUANTITY:"vouchers/total_quantity?search={search}&client_id={clientId}"},W={cached:{},clearCached:e=>{console.log(W.cached),Object.keys(W.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),W.cached[e]=void 0}))},withCached:(e,t)=>i.__awaiter(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===W.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof W.cached[e]&&(t(W.cached[e]),clearInterval(n))}),100)}));if("object"==typeof W.cached[e])return W.cached[e];W.cached[e]="waitingTheFirstResponse";try{const i=yield t();return W.cached[e]=i,setTimeout((()=>{W.cached[e]=void 0}),18e5),i}catch(t){return W.cached[e]=void 0,Promise.reject(t)}}))},X=(e,t)=>{const{subotApiUrl:i}=null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+q.default(e,Object.assign({},t))},J=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(X(K.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Z=e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},ee=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield W.withCached("SubotInlineFirstNode",(()=>i.__awaiter(void 0,void 0,void 0,(function*(){const t=yield d.callApi(X(K.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Z(t),t}))))}catch(e){return null}})),te=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(X(K.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),ie=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(X(K.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),ne=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],ae=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...ne],oe=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(ae.includes(i))if(ne.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),le=e=>[{id:s.v4(),label:JSON.stringify({title:"",description:""}),type:t.NodeIntentType.SSO_INTENT,url:""},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/shield.svg"}];function re(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,a=(new Date).getTime(),o=setInterval((()=>{((new Date).getTime()-a>n||t())&&(clearInterval(o),i())}),300)}const de=e=>d.cookie.parse(e||"")["hhg-id"]||L.default.get("hhg-id")||"",se=e=>{if(e)return L.default.set("hhg-id",e),e;const t=de();if(t)return t;const i=s.v4();return L.default.set("hhg-id",i),i},ce=e=>{const t=d.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||L.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},ue=e=>{const t=d.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||L.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},me=s.v4(),pe=()=>me,fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${c.isProduction?"":"discover."}${n.domainLocales[e]}`,ve=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},ge=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},be=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},he=(e,i,n,a)=>{const o=be(e[0]);if(!i)return{};const l=e.findIndex((e=>e.id==i)),r=e.reduce(((e,r,d)=>{var s,c;if(d>l)return e;const u=r,m=n&&u.id===i?{action_id:n}:u._message;let p=0;const f=null===(s=u.actions)||void 0===s?void 0:s.find((e=>e.id===(null==m?void 0:m.action_id)));p+=(null==f?void 0:f.score)||0;const v=void 0!==o[u.id],g=n&&u.id===i?a:null==m?void 0:m.form_submit_meta;if(v&&u.type===t.NodeType.FORM&&g){const e=o[u.id].action_id,t=null===(c=u.actions)||void 0===c?void 0:c.find((t=>t.id===e)),i=null==t?void 0:t.key,n=g.find((e=>e.key===i&&"number"===e.control));if(o[u.id].number&&["+","-","x","/"].includes(o[u.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[u.id].operator,i=o[u.id].number;let a=0;"+"===t&&(a=e+i),"-"===t&&(a=e-i),"x"===t&&(a=e*i),"/"===t&&(a=e/i),isNaN(a)||(p+=a)}}return e+p}),0);return{current_total_dynamic_score:r}},ye=(e,i)=>{const n=be(i[0]);if(0===Object.keys(n).length)return e;const a=i.filter((e=>e.type===t.NodeType.FORM));return Object.keys(n).forEach((t=>{var i,o,l;const r=a.find((e=>e.id===t)),d=null===(i=null==r?void 0:r.actions)||void 0===i?void 0:i.find((e=>{var i;return e.id===(null===(i=n[t])||void 0===i?void 0:i.action_id)})),s=null==d?void 0:d.key,c=null===(l=null===(o=null==r?void 0:r._message)||void 0===o?void 0:o.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===s&&"number"===e.control));if(n[t].number&&["+","-","x","/"].includes(n[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const i=Number(c.value),a=n[t].operator,o=n[t].number;let l=0;if("+"===a&&(l=i+o),"-"===a&&(l=i-o),"x"===a&&(l=i*o),"/"===a&&(l=i/o),e.includes(`{{var:${s}}}`)){const t=new RegExp(`{{var:${s}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},_e="other",Ee="stateInlineSSO",xe=()=>{try{const e=window.next.router.components["/[...slug]"].props.pageProps;return"services-connection"===e.template?{project_id:"care-path",user_funnel:e.spotlight.additionalSlugActive||"",audience_name:e.spotlight.groupIdActive||""}:{}}catch(e){return{}}},Ne=e=>{const i=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,i)=>{var n,a,o,l,r,d,s,c,u,m,p,f,v,g,b,h,y,_,E,x,N;if(i.actions&&(null===(n=i._message)||void 0===n?void 0:n.action_id)&&(null===(a=i._message)||void 0===a?void 0:a.action_value)){const n=i._message.action_value;if(i.type===t.NodeType.FORM){const t=["address","province","district","commune"],n=((null===(o=i._message)||void 0===o?void 0:o.form_submit_meta)||[]).filter((e=>!t.includes(e.control))),a=((null===(l=i._message)||void 0===l?void 0:l.form_submit_meta)||[]).filter((e=>t.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(r=a.address)||void 0===r?void 0:r.value,null===(d=a.commune)||void 0===d?void 0:d.value,null===(s=a.district)||void 0===s?void 0:s.value,null===(c=a.province)||void 0===c?void 0:c.value].filter(Boolean).join(", ");p&&a.address?e.push({attribute:a.address.key,value:p,label_question:(null===(m=null===(u=i.intents)||void 0===u?void 0:u[0])||void 0===m?void 0:m.label)||""}):n.forEach((t=>{var n,a;e.push({attribute:t.key,value:t.value,label_question:(null===(a=null===(n=i.intents)||void 0===n?void 0:n[0])||void 0===a?void 0:a.label)||""})}))}if(i.type===t.NodeType.TEXT)if(i.is_multi_select){const t=Object.keys(i._message.selected_actions||{}),n=i.actions.filter((e=>e.label&&t.includes(e.id))).map((e=>e.label));t.length&&e.push({attribute:i.actions[0].key||"",value:n,label_question:(null===(f=null===(p=i.intents)||void 0===p?void 0:p[0])||void 0===f?void 0:f.label)||""})}else{const a=i._message.action_id,o=i.actions.find((e=>e.id===a)),l=null==o?void 0:o.label,r=null===(b=null===(g=null===(v=i._message)||void 0===v?void 0:v.form_submit_meta)||void 0===g?void 0:g.find((e=>e.key===_e)))||void 0===b?void 0:b.value,d=(null==o?void 0:o.type)===t.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;l&&a&&e.push({attribute:n,value:d&&r?r:l,label_question:(null===(y=null===(h=i.intents)||void 0===h?void 0:h[0])||void 0===y?void 0:y.label)||""})}if(i.type===t.NodeType.POLL){const t=i.id,n=(null===(E=null===(_=i._message)||void 0===_?void 0:_.current_polls)||void 0===E?void 0:E[t])||[],a=i.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:i.actions[0].key||"",value:a,label_question:(null===(N=null===(x=i.intents)||void 0===x?void 0:x[0])||void 0===N?void 0:N.label)||""})}}return e}),[]);return i},Te=(e,i)=>{var n;try{if("ACUVUE"!==(null===(n=i.extra_settings)||void 0===n?void 0:n.subot_type))return;let a="",o="",l="",r=ue().email;if((e||[]).forEach((e=>{var i,n,d;const s=e._message;if(!s)return;const c=null===(i=e.actions)||void 0===i?void 0:i.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?a=(null==c?void 0:c.label)||"":"voucher_color"===s.action_value&&(o=(null==c?void 0:c.label)||""),e.type===t.NodeType.FORM){const e=null===(n=s.form_submit_meta)||void 0===n?void 0:n.find((e=>"voucher_size"===e.key)),t=null===(d=s.form_submit_meta)||void 0===d?void 0:d.find((e=>"email"===e.control));e&&(l=e.value),t&&(r=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===a&&r)return{email:r,voucherName:a};if(a&&o&&l&&r)return{email:r,voucherName:`${a}|${o}|${l}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},we=({nodes:e,activeId:a,params:o,accountIdFromLogs:l})=>i.__awaiter(void 0,void 0,void 0,(function*(){try{let i="in_progress";const r=e[e.length-1];(null==r?void 0:r.type)&&t.NodeFinalTypes.includes(r.type)&&(i="complete");const s=e.slice(1),c={activeId:a,params:o,nodes:s,tracking:Object.assign(Object.assign({},xe()),{full_url:window.location.href}),unifiedAnswers:Ne(s),voucherAnswers:Te(s,e[0])},u={cookie_id:se(),account_id:l||ce()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(c),status:i,type:"inline",market:n.MAP_DOMAIN_BY_LOCALE[d.locale]};yield d.callApi(X(K.POST_SUBOT_CREATE_LOG),"POST",{data:u})}catch(e){}})),Ie=(e,t)=>{try{const[i,n,a]=$.default(e,{format:"array"});return`rgba(${i}, ${n}, ${a}, ${t})`}catch(e){return}},Se=e.createContext({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),Oe=({children:a,articleLink:o,subotId:l,isFullContainer:r,bgColor:s,primaryColor:c,isDisabledAnimationOnMobile:u,onCloseMobile:m,userInfo:p})=>{const{formatMessage:f,action:{pushNotifications:v}}=e.useContext(d.TogetherComponentGlobalContext),g=e.useRef(null),b=e.useRef(null),[h,y]=e.useState(!0),[_,E]=e.useState(""),[x,N]=e.useState([]),[T,w]=e.useState(!1),[I,S]=e.useState({});e.useEffect((()=>{const e=s||"#e3f2ff",t=c||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const a=g.current,o=(new Date).getTime();a&&(Q.mutate((()=>{a.style.setProperty("--subot-inline-bg-color",e),a.style.setProperty("--subot-inline-primary-color",t),a.style.setProperty("--subot-inline-primary-color-hover",Ie(t,.9)||t),a.style.setProperty("--subot-inline-primary-color-100",Ie(t,.1)||"#e3f2ff"),a.style.setProperty("--subot-inline-primary-color-300",Ie(t,.3)||"#bcdeff")})),clearInterval(n)),o-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[s,c]);const O=e.useCallback((()=>{const e=window.gaData,t=window.location.origin+n.basePath+("tl-PH"===(null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.locale)?o.replace("fil/",""):o),i={bot_id:l,account_id:ce()||null,action_id:"",action_value:"",cookie_id:se(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:L.default.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:t.replace("http://localhost:6006","https://discover.hellobacsi.com").replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover.").replace("staging.hellohealthgroup.com","discover.hellodoctor.com.ph").replace("https://hellohealthgroup.com","https://hellodoctor.com.ph"),window_id:pe()};return oe(i,null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.router.query)}),[]),k=e.useCallback((()=>{var e;null===(e=g.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),C=e.useCallback(((e,n=!0)=>i.__awaiter(void 0,void 0,void 0,(function*(){var a;if(!e||!e.url||!e.bot_id)return;let o="",l=[];y(!0);const r=yield ee(e.bot_id);1===(null==r?void 0:r._status)&&(o=null==r?void 0:r._data.id.toString(),l.push(null==r?void 0:r._data,null==r?void 0:r._data.first_node));const s=n?yield(c=l[0],i.__awaiter(void 0,void 0,void 0,(function*(){var e,t;try{if(!c)return null;const i=yield d.callApi(X(K.GET_SUBOT_LOG,{botId:c.id,cookieId:se(),accountId:ce()||"",type:"inline"}),"GET");if(!(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.data)||"inline"!==(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.type))return null;const n=JSON.parse(i._data.data),a=n.nodes,o="in_progress"===i._data.status,l="complete"===i._data.status;return o||l?{nodes:[c,...a],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:ce()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var c;s&&(l=s.nodes,o=s.activeId,b.current=(null===(a=s.params)||void 0===a?void 0:a.account_id)||0);const u=((e,{getParams:i})=>{try{if(!ce())return null;const n=JSON.parse(localStorage.getItem(Ee)||""),a=18e5;return(null==n?void 0:n.botId)===e&&n.listNodes&&n.activeId&&n.createdAt+a>Date.now()&&(localStorage.removeItem(Ee),n.listNodes.slice(-1)[0].position===t.NodePosition.SSO)?{listNodes:n.listNodes,activeId:n.activeId,params:Object.assign(Object.assign(Object.assign({},i()),n.params),{account_id:ce()||null,cookie_id:se(n.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:O});if(u&&u.params.action_id&&u.params.action_value){const e=yield J(u.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(o=null==e?void 0:e._data.node.id,l=u.listNodes,l[l.length-1]=null==e?void 0:e._data.node,we({nodes:l,activeId:o,params:u.params,accountIdFromLogs:b.current}),setTimeout((()=>{k()}),100))}const m=(null==u?void 0:u.params)||(null==s?void 0:s.params)||e,[p,f]=((e,t,i)=>{if(!(null==e?void 0:e.subot_field_type))return[t,i];const n=i.find((e=>e.id==t));return n&&n.hasOwnProperty("first_node")&&i.length>1?[i[1].id,i]:[t,i]})(l[0],o,l);y(!1),E(p),N(f),S(Object.assign(Object.assign({},e),m))}))),[]),M=e.useCallback(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${l}"]`);i&&i.click();let n=_,a=[...x];if(null==t?void 0:t.node_id){const e=a.findIndex((({id:e})=>e==t.node_id));-1!==e&&(a[e]._message=Object.assign(Object.assign({},a[e]._message),t),a=[...a.slice(0,e+1)])}if(y(!0),e){const t=a.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)a=[...a,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},a[t]),e),{_message:Object.assign(Object.assign({},a[t]._message),null==e?void 0:e._message)});a=[...a.slice(0,t),Object.assign({},i),...a.slice(t+1)]}n=e.id}setTimeout((()=>{N(a),E(n),y(!1),we({nodes:a,activeId:n,params:I,accountIdFromLogs:b.current})}),250)}),[x,_]),A=e.useCallback((e=>i.__awaiter(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),he(x,_,e.action_id)),n=yield J(t);if(y(!1),1===(null==n?void 0:n._status)){const e=null==n?void 0:n._data,{node:a}=e,o=i.__rest(e,["node"]),l=Object.assign(Object.assign({},a),{_message:Object.assign(Object.assign({},o),{node_id:a.id})});return void(-1!==x.findIndex((e=>e.id===l.id))?M(l):M(l,t))}v({title:f({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=x.find((e=>e.id==_));t&&t.hasOwnProperty("first_node")&&(E(x[1].id.toString()),we({nodes:x,activeId:x[1].id.toString(),params:O(),accountIdFromLogs:b.current}))}))),[M,x]),P=e.useCallback((()=>{const e=x.findIndex((({id:e})=>e==_));if(e&&-1!==e&&e>1){const t=x[e-1];E(t.id),we({nodes:x,activeId:t.id,params:I,accountIdFromLogs:b.current})}}),[x,_]),R=e.useCallback((()=>{const e=O();C(e,!1);const t=x[0],i=x[1];we({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:b.current})}),[O,C,x]),U=e.useCallback((e=>{N((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==_?t.map((t=>{const i=t;return i.id===_?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[_]);e.useEffect((()=>{if(L.default.get(n.GA_TOKEN_COOKIE)){const e=O();C(e)}else re({condition:()=>Boolean(L.default.get(n.GA_TOKEN_COOKIE)),finished:()=>{const e=O();C(e)}})}),[]),e.useEffect((()=>{if(!x.length)return;x.find((e=>e.id==_))&&_||E(l+"")}),[_,x]);const j=e.useMemo((()=>({activeId:_,params:I,listNodes:x,loading:h,setLoading:y,getParams:O,onNext:A,onPrev:P,onSubmit:M,onStartOver:R,onChange:U,isShowFooter:T,setIsShowFooter:w,isFullContainer:r,isDisabledAnimationOnMobile:u,onCloseMobile:m,userInfo:p})),[_,A,P,M,U,R,T,I,x,h,y,O,r,u,m,p]);return x.length?B.default.createElement(Se.Provider,{value:j},B.default.createElement("div",{ref:g},a)):null},ke=e=>B.default.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),B.default.createElement("path",{d:"M5.991 4.99a1 1 0 0 0-.697 1.717L10.587 12l-5.293 5.293a1 1 0 1 0 1.414 1.415L12 13.415l5.293 5.293a1 1 0 1 0 1.414-1.415L13.415 12l5.293-5.293a1 1 0 1 0-1.414-1.414L12 10.586 6.708 5.293a1 1 0 0 0-.717-.302",fill:"#595959"})),Ce="480px",Me=G.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./Subot-52a853c9.js"),i=require("./tslib.es6-11571a59.js"),n=require("./index-3e769745.js"),a=require("js-cookie"),o=require("fastdom"),l=require("fastdom/extensions/fastdom-promised"),r=require("string-format"),d=require("./utils-2bd7f928.js"),s=require("uuid"),c=require("./isProduction-1358e2f3.js"),u=require("hex-rgb"),m=require("classnames"),p=require("./index-24961b96.js"),f=require("./index-0c003a87.js"),v=require("framer-motion"),g=require("./utils-71645360.js"),b=require("styled-components"),h=require("./index-c50fe502.js"),y=require("remarkable"),_=require("react-intersection-observer"),E=require("@mantine/core"),x=require("./index-5e751a6e.js"),N=require("./index-6b402916.js"),T=require("dayjs"),w=require("dayjs/plugin/isSameOrBefore"),I=require("./Plus-5db023c7.js"),S=require("./theme-1a921769.js");require("@mantine/dates"),require("./translationsContext-e697619c.js"),require("@mantine/hooks");var O=require("lodash/isEmpty"),k=require("react-hook-form"),C=require("react-phone-number-input"),M=require("@react-google-maps/api"),A=require("./usePlacesAutocomplete-4125b7b9.js"),P=require("./index-95065bac.js"),R=require("./index-4ce3604f.js");function U(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("date-fns/locale"),require("./cookieHelper-db011eab.js"),require("slugify"),require("./useTranslations-778ab09c.js"),require("date-fns"),require("react-day-picker/DayPickerInput"),require("@mantine/carousel"),require("./WhatsApp-378451bf.js"),require("./useUniqueId-a6a2ac25.js");var B=U(e),L=U(a),j=U(o),D=U(l),q=U(r),$=U(u),F=U(m),G=U(b),z=U(T),H=U(w),Y=U(O),V=U(C);const Q=j.default.extend(D.default),K={POST_VERIFY_SMS_OTP:"sms/update-phone",POST_SEND_OTP:"sms/otp",POST_SEND_OTP_WHATSAPP:"whatsapp/otp",POST_VERIFY_OTP:"sms/verify",POST_VERIFY_OTP_WHATSAPP:"sms/verify-whatsapp",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",GET_INLINE_FIRST_NODE:"bots",GET_INLINE_MESSAGE:"inline/messages",GET_INLINE_IMPRESSION:"inline/impressions",GET_INLINE_CLICK:"inline/clicks",GET_SUBOT_LOG:"log/bot/{botId}/{cookieId}/{accountId}?type={type}",POST_SUBOT_CREATE_LOG:"log/bot",FETCH_URL_DATA:"preview",GET_VOUCHER_QUANTITY:"vouchers/total_quantity?search={search}&client_id={clientId}"},W={cached:{},clearCached:e=>{console.log(W.cached),Object.keys(W.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),W.cached[e]=void 0}))},withCached:(e,t)=>i.__awaiter(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===W.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof W.cached[e]&&(t(W.cached[e]),clearInterval(n))}),100)}));if("object"==typeof W.cached[e])return W.cached[e];W.cached[e]="waitingTheFirstResponse";try{const i=yield t();return W.cached[e]=i,setTimeout((()=>{W.cached[e]=void 0}),18e5),i}catch(t){return W.cached[e]=void 0,Promise.reject(t)}}))},X=(e,t)=>{const{subotApiUrl:i}=null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+q.default(e,Object.assign({},t))},J=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(X(K.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Z=e=>{var t;if(1===(null==e?void 0:e._status)&&(null===(t=null==e?void 0:e._data)||void 0===t?void 0:t.extra_settings))try{const t=JSON.parse(e._data.extra_settings);e._data.extra_settings="object"==typeof t?t:{sync_data_friso_campaign:!1}}catch(t){e._data.extra_settings={sync_data_friso_campaign:!1}}return e},ee=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield W.withCached("SubotInlineFirstNode",(()=>i.__awaiter(void 0,void 0,void 0,(function*(){const t=yield d.callApi(X(K.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Z(t),t}))))}catch(e){return null}})),te=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(X(K.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),ie=e=>i.__awaiter(void 0,void 0,void 0,(function*(){try{return yield d.callApi(X(K.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),ne=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],ae=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...ne],oe=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(ae.includes(i))if(ne.includes(i))try{e[i]=JSON.parse(n)}catch(e){}else e[i]="account_id"!==i&&"current_score"!==i&&"bot_id"!==i?n:parseInt(n)}else e.is_new="first_login"===n})),e),le=e=>[{id:s.v4(),label:JSON.stringify({title:"",description:""}),type:t.NodeIntentType.SSO_INTENT,url:""},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:s.v4(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:t.NodeIntentType.SSO_INTENT,url:"/images/subot/shield.svg"}];function re(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,a=(new Date).getTime(),o=setInterval((()=>{((new Date).getTime()-a>n||t())&&(clearInterval(o),i())}),300)}const de=e=>d.cookie.parse(e||"")["hhg-id"]||L.default.get("hhg-id")||"",se=e=>{if(e)return L.default.set("hhg-id",e),e;const t=de();if(t)return t;const i=s.v4();return L.default.set("hhg-id",i),i},ce=e=>{const t=d.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||L.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(i).sub}catch(e){return""}},ue=e=>{const t=d.cookie.parse(e||"")[n.BEARER_TOKEN_COOKIE]||L.default.get(n.BEARER_TOKEN_COOKIE)||"";try{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join("")),n=JSON.parse(i);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},me=s.v4(),pe=()=>me,fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${c.isProduction?"":"discover."}${n.domainLocales[e]}`,ve=e=>{const t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},ge=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},be=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},he=(e,i,n,a)=>{const o=be(e[0]);if(!i)return{};const l=e.findIndex((e=>e.id==i)),r=e.reduce(((e,r,d)=>{var s,c;if(d>l)return e;const u=r,m=n&&u.id===i?{action_id:n}:u._message;let p=0;const f=null===(s=u.actions)||void 0===s?void 0:s.find((e=>e.id===(null==m?void 0:m.action_id)));p+=(null==f?void 0:f.score)||0;const v=void 0!==o[u.id],g=n&&u.id===i?a:null==m?void 0:m.form_submit_meta;if(v&&u.type===t.NodeType.FORM&&g){const e=o[u.id].action_id,t=null===(c=u.actions)||void 0===c?void 0:c.find((t=>t.id===e)),i=null==t?void 0:t.key,n=g.find((e=>e.key===i&&"number"===e.control));if(o[u.id].number&&["+","-","x","/"].includes(o[u.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[u.id].operator,i=o[u.id].number;let a=0;"+"===t&&(a=e+i),"-"===t&&(a=e-i),"x"===t&&(a=e*i),"/"===t&&(a=e/i),isNaN(a)||(p+=a)}}return e+p}),0);return{current_total_dynamic_score:r}},ye=(e,i)=>{const n=be(i[0]);if(0===Object.keys(n).length)return e;const a=i.filter((e=>e.type===t.NodeType.FORM));return Object.keys(n).forEach((t=>{var i,o,l;const r=a.find((e=>e.id===t)),d=null===(i=null==r?void 0:r.actions)||void 0===i?void 0:i.find((e=>{var i;return e.id===(null===(i=n[t])||void 0===i?void 0:i.action_id)})),s=null==d?void 0:d.key,c=null===(l=null===(o=null==r?void 0:r._message)||void 0===o?void 0:o.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===s&&"number"===e.control));if(n[t].number&&["+","-","x","/"].includes(n[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const i=Number(c.value),a=n[t].operator,o=n[t].number;let l=0;if("+"===a&&(l=i+o),"-"===a&&(l=i-o),"x"===a&&(l=i*o),"/"===a&&(l=i/o),e.includes(`{{var:${s}}}`)){const t=new RegExp(`{{var:${s}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},_e="other",Ee="stateInlineSSO",xe=()=>{try{const e=window.next.router.components["/[...slug]"].props.pageProps;return"services-connection"===e.template?{project_id:"care-path",user_funnel:e.spotlight.additionalSlugActive||"",audience_name:e.spotlight.groupIdActive||""}:{}}catch(e){return{}}},Ne=e=>{const i=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,i)=>{var n,a,o,l,r,d,s,c,u,m,p,f,v,g,b,h,y,_,E,x,N;if(i.actions&&(null===(n=i._message)||void 0===n?void 0:n.action_id)&&(null===(a=i._message)||void 0===a?void 0:a.action_value)){const n=i._message.action_value;if(i.type===t.NodeType.FORM){const t=["address","province","district","commune"],n=((null===(o=i._message)||void 0===o?void 0:o.form_submit_meta)||[]).filter((e=>!t.includes(e.control))),a=((null===(l=i._message)||void 0===l?void 0:l.form_submit_meta)||[]).filter((e=>t.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(r=a.address)||void 0===r?void 0:r.value,null===(d=a.commune)||void 0===d?void 0:d.value,null===(s=a.district)||void 0===s?void 0:s.value,null===(c=a.province)||void 0===c?void 0:c.value].filter(Boolean).join(", ");p&&a.address?e.push({attribute:a.address.key,value:p,label_question:(null===(m=null===(u=i.intents)||void 0===u?void 0:u[0])||void 0===m?void 0:m.label)||""}):n.forEach((t=>{var n,a;e.push({attribute:t.key,value:t.value,label_question:(null===(a=null===(n=i.intents)||void 0===n?void 0:n[0])||void 0===a?void 0:a.label)||""})}))}if(i.type===t.NodeType.TEXT)if(i.is_multi_select){const t=Object.keys(i._message.selected_actions||{}),n=i.actions.filter((e=>e.label&&t.includes(e.id))).map((e=>e.label));t.length&&e.push({attribute:i.actions[0].key||"",value:n,label_question:(null===(f=null===(p=i.intents)||void 0===p?void 0:p[0])||void 0===f?void 0:f.label)||""})}else{const a=i._message.action_id,o=i.actions.find((e=>e.id===a)),l=null==o?void 0:o.label,r=null===(b=null===(g=null===(v=i._message)||void 0===v?void 0:v.form_submit_meta)||void 0===g?void 0:g.find((e=>e.key===_e)))||void 0===b?void 0:b.value,d=(null==o?void 0:o.type)===t.NodeActionType.USER_CHOICE_TEXT_BY_INPUT;l&&a&&e.push({attribute:n,value:d&&r?r:l,label_question:(null===(y=null===(h=i.intents)||void 0===h?void 0:h[0])||void 0===y?void 0:y.label)||""})}if(i.type===t.NodeType.POLL){const t=i.id,n=(null===(E=null===(_=i._message)||void 0===_?void 0:_.current_polls)||void 0===E?void 0:E[t])||[],a=i.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:i.actions[0].key||"",value:a,label_question:(null===(N=null===(x=i.intents)||void 0===x?void 0:x[0])||void 0===N?void 0:N.label)||""})}}return e}),[]);return i},Te=(e,i)=>{var n;try{if("ACUVUE"!==(null===(n=i.extra_settings)||void 0===n?void 0:n.subot_type))return;let a="",o="",l="",r=ue().email;if((e||[]).forEach((e=>{var i,n,d;const s=e._message;if(!s)return;const c=null===(i=e.actions)||void 0===i?void 0:i.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?a=(null==c?void 0:c.label)||"":"voucher_color"===s.action_value&&(o=(null==c?void 0:c.label)||""),e.type===t.NodeType.FORM){const e=null===(n=s.form_submit_meta)||void 0===n?void 0:n.find((e=>"voucher_size"===e.key)),t=null===(d=s.form_submit_meta)||void 0===d?void 0:d.find((e=>"email"===e.control));e&&(l=e.value),t&&(r=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===a&&r)return{email:r,voucherName:a};if(a&&o&&l&&r)return{email:r,voucherName:`${a}|${o}|${l}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},we=({nodes:e,activeId:a,params:o,accountIdFromLogs:l})=>i.__awaiter(void 0,void 0,void 0,(function*(){try{let i="in_progress";const r=e[e.length-1];(null==r?void 0:r.type)&&t.NodeFinalTypes.includes(r.type)&&(i="complete");const s=e.slice(1),c={activeId:a,params:o,nodes:s,tracking:Object.assign(Object.assign({},xe()),{full_url:window.location.href}),unifiedAnswers:Ne(s),voucherAnswers:Te(s,e[0])},u={cookie_id:se(),account_id:l||ce()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(c),status:i,type:"inline",market:n.MAP_DOMAIN_BY_LOCALE[d.locale]};yield d.callApi(X(K.POST_SUBOT_CREATE_LOG),"POST",{data:u})}catch(e){}})),Ie=(e,t)=>{try{const[i,n,a]=$.default(e,{format:"array"});return`rgba(${i}, ${n}, ${a}, ${t})`}catch(e){return}},Se=e.createContext({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),Oe=({children:a,articleLink:o,subotId:l,isFullContainer:r,bgColor:s,primaryColor:c,isDisabledAnimationOnMobile:u,onCloseMobile:m,userInfo:p})=>{const{formatMessage:f,action:{pushNotifications:v}}=e.useContext(d.TogetherComponentGlobalContext),g=e.useRef(null),b=e.useRef(null),[h,y]=e.useState(!0),[_,E]=e.useState(""),[x,N]=e.useState([]),[T,w]=e.useState(!1),[I,S]=e.useState({});e.useEffect((()=>{const e=s||"#e3f2ff",t=c||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const a=g.current,o=(new Date).getTime();a&&(Q.mutate((()=>{a.style.setProperty("--subot-inline-bg-color",e),a.style.setProperty("--subot-inline-primary-color",t),a.style.setProperty("--subot-inline-primary-color-hover",Ie(t,.9)||t),a.style.setProperty("--subot-inline-primary-color-100",Ie(t,.1)||"#e3f2ff"),a.style.setProperty("--subot-inline-primary-color-300",Ie(t,.3)||"#bcdeff")})),clearInterval(n)),o-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[s,c]);const O=e.useCallback((()=>{const e=window.gaData,t=window.location.origin+n.basePath+("tl-PH"===(null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.locale)?o.replace("fil/",""):o),i={bot_id:l,account_id:ce()||null,action_id:"",action_value:"",cookie_id:se(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:L.default.get("_ga")||"",is_new:!1,mode:"inline",node_id:"",selected_actions:{},title_url:document.title||"",url:t.replace("http://localhost:6006","https://discover.hellobacsi.com").replace("http://localhost","https://discover.hellobacsi.com").replace("dev.","discover.").replace("staging.hellohealthgroup.com","discover.hellodoctor.com.ph").replace("https://hellohealthgroup.com","https://hellodoctor.com.ph"),window_id:pe()};return oe(i,null===d.GlobalData||void 0===d.GlobalData?void 0:d.GlobalData.router.query)}),[]),k=e.useCallback((()=>{var e;null===(e=g.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),C=e.useCallback(((e,n=!0)=>i.__awaiter(void 0,void 0,void 0,(function*(){var a;if(!e||!e.url||!e.bot_id)return;let o="",l=[];y(!0);const r=yield ee(e.bot_id);1===(null==r?void 0:r._status)&&(o=null==r?void 0:r._data.id.toString(),l.push(null==r?void 0:r._data,null==r?void 0:r._data.first_node));const s=n?yield(c=l[0],i.__awaiter(void 0,void 0,void 0,(function*(){var e,t;try{if(!c)return null;const i=yield d.callApi(X(K.GET_SUBOT_LOG,{botId:c.id,cookieId:se(),accountId:ce()||"",type:"inline"}),"GET");if(!(null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.data)||"inline"!==(null===(t=null==i?void 0:i._data)||void 0===t?void 0:t.type))return null;const n=JSON.parse(i._data.data),a=n.nodes,o="in_progress"===i._data.status,l="complete"===i._data.status;return o||l?{nodes:[c,...a],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:ce()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var c;s&&(l=s.nodes,o=s.activeId,b.current=(null===(a=s.params)||void 0===a?void 0:a.account_id)||0);const u=((e,{getParams:i})=>{try{if(!ce())return null;const n=JSON.parse(localStorage.getItem(Ee)||""),a=18e5;return(null==n?void 0:n.botId)===e&&n.listNodes&&n.activeId&&n.createdAt+a>Date.now()&&(localStorage.removeItem(Ee),n.listNodes.slice(-1)[0].position===t.NodePosition.SSO)?{listNodes:n.listNodes,activeId:n.activeId,params:Object.assign(Object.assign(Object.assign({},i()),n.params),{account_id:ce()||null,cookie_id:se(n.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:O});if(u&&u.params.action_id&&u.params.action_value){const e=yield J(u.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(o=null==e?void 0:e._data.node.id,l=u.listNodes,l[l.length-1]=null==e?void 0:e._data.node,we({nodes:l,activeId:o,params:u.params,accountIdFromLogs:b.current}),setTimeout((()=>{k()}),100))}const m=(null==u?void 0:u.params)||(null==s?void 0:s.params)||e,[p,f]=((e,t,i)=>{if(!(null==e?void 0:e.subot_field_type))return[t,i];const n=i.find((e=>e.id==t));return n&&n.hasOwnProperty("first_node")&&i.length>1?[i[1].id,i]:[t,i]})(l[0],o,l);y(!1),E(p),N(f),S(Object.assign(Object.assign({},e),m))}))),[]),M=e.useCallback(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${l}"]`);i&&i.click();let n=_,a=[...x];if(null==t?void 0:t.node_id){const e=a.findIndex((({id:e})=>e==t.node_id));-1!==e&&(a[e]._message=Object.assign(Object.assign({},a[e]._message),t),a=[...a.slice(0,e+1)])}if(y(!0),e){const t=a.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)a=[...a,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},a[t]),e),{_message:Object.assign(Object.assign({},a[t]._message),null==e?void 0:e._message)});a=[...a.slice(0,t),Object.assign({},i),...a.slice(t+1)]}n=e.id}setTimeout((()=>{N(a),E(n),y(!1),we({nodes:a,activeId:n,params:I,accountIdFromLogs:b.current})}),250)}),[x,_]),A=e.useCallback((e=>i.__awaiter(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),he(x,_,e.action_id)),n=yield J(t);if(y(!1),1===(null==n?void 0:n._status)){const e=null==n?void 0:n._data,{node:a}=e,o=i.__rest(e,["node"]),l=Object.assign(Object.assign({},a),{_message:Object.assign(Object.assign({},o),{node_id:a.id})});return void(-1!==x.findIndex((e=>e.id===l.id))?M(l):M(l,t))}v({title:f({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=x.find((e=>e.id==_));t&&t.hasOwnProperty("first_node")&&(E(x[1].id.toString()),we({nodes:x,activeId:x[1].id.toString(),params:O(),accountIdFromLogs:b.current}))}))),[M,x]),P=e.useCallback((()=>{const e=x.findIndex((({id:e})=>e==_));if(e&&-1!==e&&e>1){const t=x[e-1];E(t.id),we({nodes:x,activeId:t.id,params:I,accountIdFromLogs:b.current})}}),[x,_]),R=e.useCallback((()=>{const e=O();C(e,!1);const t=x[0],i=x[1];we({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:b.current})}),[O,C,x]),U=e.useCallback((e=>{N((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==_?t.map((t=>{const i=t;return i.id===_?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[_]);e.useEffect((()=>{if(L.default.get(n.GA_TOKEN_COOKIE)){const e=O();C(e)}else re({condition:()=>Boolean(L.default.get(n.GA_TOKEN_COOKIE)),finished:()=>{const e=O();C(e)}})}),[]),e.useEffect((()=>{if(!x.length)return;x.find((e=>e.id==_))&&_||E(l+"")}),[_,x]);const j=e.useMemo((()=>({activeId:_,params:I,listNodes:x,loading:h,setLoading:y,getParams:O,onNext:A,onPrev:P,onSubmit:M,onStartOver:R,onChange:U,isShowFooter:T,setIsShowFooter:w,isFullContainer:r,isDisabledAnimationOnMobile:u,onCloseMobile:m,userInfo:p})),[_,A,P,M,U,R,T,I,x,h,y,O,r,u,m,p]);return x.length?B.default.createElement(Se.Provider,{value:j},B.default.createElement("div",{ref:g},a)):null},ke=e=>B.default.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),B.default.createElement("path",{d:"M5.991 4.99a1 1 0 0 0-.697 1.717L10.587 12l-5.293 5.293a1 1 0 1 0 1.414 1.415L12 13.415l5.293 5.293a1 1 0 1 0 1.414-1.415L13.415 12l5.293-5.293a1 1 0 1 0-1.414-1.414L12 10.586 6.708 5.293a1 1 0 0 0-.717-.302",fill:"#595959"})),Ce="480px",Me=G.default.div`
2
2
  position: relative;
3
3
 
4
4
  .si-inline-revamp-container {
package/build/together.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-21848dce.js"),r=require("./index-13b06ce7.js"),t=require("./utils-9389c98f.js");require("react"),require("./Plus-54948d91.js"),require("./tslib.es6-f3854ac2.js"),require("@mantine/core"),require("./theme-645eae3b.js"),require("./translationsContext-25ed50e4.js"),require("string-format"),require("./index-ac495049.js"),require("styled-components"),require("./useTranslations-da1647d4.js"),require("innertext"),require("./index-3c0325dd.js"),require("./WhatsApp-6d901f48.js"),require("./useUniqueId-10e140e3.js"),require("./index-34b22040.js"),require("@mantine/hooks"),require("./index-ed991afc.js"),require("./index-a0ff0c7c.js"),require("date-fns/locale"),require("./Subot-75abd57a.js"),require("./isProduction-1b27c7e8.js"),require("dayjs"),require("./utils-ac610998.js"),require("@mantine/carousel"),require("classnames"),require("@mantine/dates"),require("./index-93072a8a.js"),require("./index.styles-4e9a4b76.js"),require("./constants-a45e9439.js"),require("./animation-c29cc5bc.js"),require("react-keyed-flatten-children"),require("./paths-f4b000d7.js"),require("./index-6395c71d.js"),require("lodash/debounce"),require("react-contenteditable"),require("./index-6fe01704.js"),require("./cookieHelper-1eaa42d7.js"),require("react-dom"),require("./number-c8e16fcd.js"),require("date-fns"),require("dayjs/plugin/relativeTime"),require("./index-32c9ce71.js"),require("./routing-20ad0d2b.js"),require("./utils-fd32cb42.js"),require("./index.styled-5c0482ab.js"),require("./index-8f4c566f.js"),require("slugify"),exports.CardAuthor=e.CardAuthor,exports.CardLink=e.CardLink,exports.CardPost=e.CardPost,exports.CardPostPopoverMore=e.CardPostPopoverMore,exports.CardReactions=e.CardReactions,exports.CardReply=e.CardReply,exports.CardReplyPopover=e.CardReplyPopover,exports.CreateNewPostContent=e.CreateNewPostContent,exports.CreatePostDescription=e.CreatePostDescription,exports.CreatePostTitle=e.CreatePostTitle,exports.ImagePreviewPopup=e.ImagePreviewPopup,exports.InputCommentBar=e.InputCommentBar,exports.LabelPin=e.LabelPin,exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.PopoverMenu=e.PopoverMenu,exports.PopupDanger=e.PopupDanger,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.PostContent=e.PostContent,exports.PostImagePreview=e.PostImagePreview,exports.PostSingleImageViewPopup=e.PostSingleImageViewPopup,exports.ProfileDetail=e.ProfileDetail,exports.ProfileDetailModal=e.ProfileDetailModal,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.SkipQuestionOfExpertBtn=e.SkipQuestionOfExpertBtn,exports.SocialLinkPreview=e.SocialLinkPreview,exports.SourceList=e.SourceList,exports.SubmitReportForm=e.SubmitReportForm,Object.defineProperty(exports,"TabNameInProfileDetail",{enumerable:!0,get:function(){return e.TabName}}),exports.TagTopic=e.TagTopic,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.TogetherTypes=e.types,exports.TopicSelectList=e.TopicSelectList,exports.VerifiedTag=e.VerifiedTag,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.TogetherDataTransforms=r.dataTransform,exports.UserAvatar=r.UserAvatar,exports.DefaultComponentGlobalContextData=t.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return t.GlobalData}}),exports.TogetherComponentGlobalContext=t.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=t.TogetherComponentGlobalContextProvider,exports.TogetherConstants=t.constants;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-91eb9de5.js"),r=require("./index-a39628ee.js"),t=require("./utils-2bd7f928.js");require("react"),require("./Plus-5db023c7.js"),require("./tslib.es6-11571a59.js"),require("@mantine/core"),require("./theme-1a921769.js"),require("./translationsContext-e697619c.js"),require("string-format"),require("./index-4ce3604f.js"),require("styled-components"),require("./useTranslations-778ab09c.js"),require("innertext"),require("./index-6b402916.js"),require("./WhatsApp-378451bf.js"),require("./useUniqueId-a6a2ac25.js"),require("./index-c50fe502.js"),require("@mantine/hooks"),require("./index-5e751a6e.js"),require("./index-3e769745.js"),require("date-fns/locale"),require("./Subot-52a853c9.js"),require("./isProduction-1358e2f3.js"),require("dayjs"),require("./utils-71645360.js"),require("@mantine/carousel"),require("classnames"),require("@mantine/dates"),require("./index-e8a104ed.js"),require("./index.styles-b6376365.js"),require("./constants-12b9a3a8.js"),require("./animation-71e7e86f.js"),require("react-keyed-flatten-children"),require("./paths-680b0596.js"),require("./index-eea67a77.js"),require("lodash/debounce"),require("react-contenteditable"),require("./index-95065bac.js"),require("./cookieHelper-db011eab.js"),require("react-dom"),require("./number-a61c9201.js"),require("date-fns"),require("dayjs/plugin/relativeTime"),require("./index-f049adba.js"),require("./routing-0b0a26ff.js"),require("./utils-4db34bcf.js"),require("./index.styled-8f95d44d.js"),require("./index-0011304a.js"),require("slugify"),exports.CardAuthor=e.CardAuthor,exports.CardLink=e.CardLink,exports.CardPost=e.CardPost,exports.CardPostPopoverMore=e.CardPostPopoverMore,exports.CardReactions=e.CardReactions,exports.CardReply=e.CardReply,exports.CardReplyPopover=e.CardReplyPopover,exports.CreateNewPostContent=e.CreateNewPostContent,exports.CreatePostDescription=e.CreatePostDescription,exports.CreatePostTitle=e.CreatePostTitle,exports.ImagePreviewPopup=e.ImagePreviewPopup,exports.InputCommentBar=e.InputCommentBar,exports.LabelPin=e.LabelPin,exports.LabelSortPin=e.LabelSortPin,exports.LabelSorting=e.LabelSorting,exports.PopoverMenu=e.PopoverMenu,exports.PopupDanger=e.PopupDanger,exports.PopupDoctor=e.PopupDoctor,exports.PopupExpert=e.PopupExpert,exports.PopupFrame=e.PopupFrame,exports.PopupHospital=e.PopupHospital,exports.PostContent=e.PostContent,exports.PostImagePreview=e.PostImagePreview,exports.PostSingleImageViewPopup=e.PostSingleImageViewPopup,exports.ProfileDetail=e.ProfileDetail,exports.ProfileDetailModal=e.ProfileDetailModal,exports.ShareBox=e.ShareBox,exports.SharePopup=e.SharePopup,exports.SkipQuestionOfExpertBtn=e.SkipQuestionOfExpertBtn,exports.SocialLinkPreview=e.SocialLinkPreview,exports.SourceList=e.SourceList,exports.SubmitReportForm=e.SubmitReportForm,Object.defineProperty(exports,"TabNameInProfileDetail",{enumerable:!0,get:function(){return e.TabName}}),exports.TagTopic=e.TagTopic,exports.TogetherAuthConfigContext=e.TogetherAuthConfigContext,exports.TogetherAuthConfigContextProvider=e.TogetherAuthConfigContextProvider,exports.TogetherTypes=e.types,exports.TopicSelectList=e.TopicSelectList,exports.VerifiedTag=e.VerifiedTag,exports.useTogetherAuthRequiredAction=e.useTogetherAuthRequiredAction,exports.TogetherDataTransforms=r.dataTransform,exports.UserAvatar=r.UserAvatar,exports.DefaultComponentGlobalContextData=t.DefaultComponentGlobalContextData,Object.defineProperty(exports,"GlobalData",{enumerable:!0,get:function(){return t.GlobalData}}),exports.TogetherComponentGlobalContext=t.TogetherComponentGlobalContext,exports.TogetherComponentGlobalContextProvider=t.TogetherComponentGlobalContextProvider,exports.TogetherConstants=t.constants;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./tslib.es6-f3854ac2.js"),t=require("react"),a=require("./useTranslations-da1647d4.js"),i=require("lodash/debounce"),o=require("./constants-a45e9439.js"),l=require("./index-6395c71d.js"),n=require("styled-components"),s=require("./Plus-54948d91.js"),r=require("./theme-645eae3b.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-ed38ff08.js"),u=require("./utils-ac610998.js"),p=require("react-loading-skeleton"),h=require("./paths-f4b000d7.js"),g=require("@mantine/core"),f=require("./index-a0ff0c7c.js"),m=require("./cookieHelper-1eaa42d7.js"),C=require("./index-eebbbb0a.js"),b=require("./index-3c0325dd.js"),y=require("./ChevronDown-15cca681.js"),v=require("string-format");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=x(t),S=x(i),L=x(n),w=x(c),O=x(p),k=x(v);function I(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const T=L.default.div``,j=L.default.div`
1
+ "use strict";var e=require("./tslib.es6-11571a59.js"),t=require("react"),a=require("./useTranslations-778ab09c.js"),i=require("lodash/debounce"),o=require("./constants-12b9a3a8.js"),l=require("./index-eea67a77.js"),n=require("styled-components"),s=require("./Plus-5db023c7.js"),r=require("./theme-1a921769.js"),c=require("lodash/shuffle"),d=require("./useOutsideClick-1ff0a049.js"),u=require("./utils-71645360.js"),p=require("react-loading-skeleton"),h=require("./paths-680b0596.js"),g=require("@mantine/core"),f=require("./index-3e769745.js"),m=require("./cookieHelper-db011eab.js"),C=require("./index-24961b96.js"),b=require("./index-6b402916.js"),y=require("./ChevronDown-5b12eac1.js"),v=require("string-format");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=x(t),S=x(i),L=x(n),w=x(c),O=x(p),k=x(v);function I(){const[e,a]=t.useState((()=>{if("undefined"==typeof window)return"unset";if(m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE))return"granted";const e=!location.protocol.includes("https")&&"localhost"!==location.hostname;return!navigator.geolocation||e?"denied":"unset"})),[i,o]=t.useState((()=>{if("undefined"==typeof window)return null;const e=m.getCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE);if(e)try{return JSON.parse(e)}catch(e){console.log(e)}return null})),l=t.useCallback((function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition((e=>{const t={lat:""+Math.round(1e7*e.coords.latitude)/1e7,lng:""+Math.round(1e7*e.coords.longitude)/1e7};m.setCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE,JSON.stringify(t),{minutes:15}),o(t),a("granted")}),(()=>{m.deleteCookie(f.USER_GEOLOCATION_COORDINATES_COOKIE),a("denied")}))}),[]);return t.useMemo((()=>({geoLocationPermission:e,geoLocationCoordinates:i,requestGeoLocation:l})),[e,i])}const T=L.default.div``,j=L.default.div`
2
2
  --searchbar-z-index: 305;
3
3
  &[data-is-modal='true'] {
4
4
  position: fixed;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react"),t=require("./Plus-54948d91.js");require("./translationsContext-25ed50e4.js"),require("string-format");var a=require("./utils-9389c98f.js"),l=require("./tslib.es6-f3854ac2.js"),o=require("@mantine/core"),n=require("./index-ac495049.js"),i=require("./useTranslations-da1647d4.js"),r=require("innertext"),s=require("./theme-645eae3b.js"),d=require("./index-3c0325dd.js"),c=require("./WhatsApp-6d901f48.js"),u=require("./index-34b22040.js");require("@mantine/dates");var m=require("./index-a0ff0c7c.js"),p=require("./Subot-75abd57a.js"),g=require("./index-ed991afc.js");require("@mantine/hooks");var h=require("./utils-ac610998.js"),f=require("./index-93072a8a.js"),v=require("./index-13b06ce7.js"),b=require("./index-6395c71d.js"),x=require("lodash/debounce"),y=require("react-contenteditable"),w=require("./index-6fe01704.js"),C=require("./index.styles-4e9a4b76.js"),E=require("./cookieHelper-1eaa42d7.js"),k=require("react-dom"),A=require("styled-components"),N=require("./number-c8e16fcd.js"),T=require("date-fns"),S=require("dayjs"),P=require("dayjs/plugin/relativeTime"),I=require("./index-32c9ce71.js"),M=require("./useUniqueId-10e140e3.js"),z=require("./routing-20ad0d2b.js");function L(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function B(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("./constants-a45e9439.js"),require("./utils-fd32cb42.js"),require("./index.styled-5c0482ab.js"),require("./index-8f4c566f.js");var R=B(e),j=L(e),O=L(r),F=L(x),D=L(y),V=B(k),U=L(A),_=L(S),H=L(P);const W=e=>R.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),R.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"})),q=e.createContext({}),G=({children:e,defaultParams:t})=>j.default.createElement(q.Provider,{value:{defaultParams:t}},e),Z=t=>{const{data:{userInfo:l,env:{togetherBasePath:o}}}=e.useContext(a.TogetherComponentGlobalContext),{defaultParams:n}=e.useContext(q)||{},i=null==l?void 0:l.id,r=l&&"number"==typeof l.communities_interacted&&0===l.communities_interacted;return{authActionWrapper:(e,l)=>{const s=Object.assign(Object.assign(Object.assign({},n),t),l);if(!i||r){i||E.deleteCookie(a.BEARER_TOKEN_COOKIE),(null==s?void 0:s._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(s._joinCommunityIds).filter(Boolean))))),null==s||delete s._joinCommunityIds),(null==s?void 0:s._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(s._joinTopicIds).filter(Boolean))))),null==s||delete s._joinTopicIds);const e=(null==s?void 0:s._location)||window.location.href;return null==s||delete s._location,window.location.href=a.getUrlToSignUp(e,s,o),null}return e&&e()},params:Object.assign(Object.assign({},n),t)}},Q=U.default.div`
1
+ "use strict";var e=require("react"),t=require("./Plus-5db023c7.js");require("./translationsContext-e697619c.js"),require("string-format");var a=require("./utils-2bd7f928.js"),l=require("./tslib.es6-11571a59.js"),o=require("@mantine/core"),n=require("./index-4ce3604f.js"),i=require("./useTranslations-778ab09c.js"),r=require("innertext"),s=require("./theme-1a921769.js"),d=require("./index-6b402916.js"),c=require("./WhatsApp-378451bf.js"),u=require("./index-c50fe502.js");require("@mantine/dates");var m=require("./index-3e769745.js"),p=require("./Subot-52a853c9.js"),g=require("./index-5e751a6e.js");require("@mantine/hooks");var h=require("./utils-71645360.js"),f=require("./index-e8a104ed.js"),v=require("./index-a39628ee.js"),b=require("./index-eea67a77.js"),x=require("lodash/debounce"),y=require("react-contenteditable"),w=require("./index-95065bac.js"),C=require("./index.styles-b6376365.js"),E=require("./cookieHelper-db011eab.js"),k=require("react-dom"),A=require("styled-components"),N=require("./number-a61c9201.js"),T=require("date-fns"),S=require("dayjs"),P=require("dayjs/plugin/relativeTime"),I=require("./index-f049adba.js"),M=require("./useUniqueId-a6a2ac25.js"),z=require("./routing-0b0a26ff.js");function L(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function B(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}require("./constants-12b9a3a8.js"),require("./utils-4db34bcf.js"),require("./index.styled-8f95d44d.js"),require("./index-0011304a.js");var R=B(e),j=L(e),O=L(r),F=L(x),D=L(y),V=B(k),U=L(A),_=L(S),H=L(P);const W=e=>R.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),R.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"})),q=e.createContext({}),G=({children:e,defaultParams:t})=>j.default.createElement(q.Provider,{value:{defaultParams:t}},e),Z=t=>{const{data:{userInfo:l,env:{togetherBasePath:o}}}=e.useContext(a.TogetherComponentGlobalContext),{defaultParams:n}=e.useContext(q)||{},i=null==l?void 0:l.id,r=l&&"number"==typeof l.communities_interacted&&0===l.communities_interacted;return{authActionWrapper:(e,l)=>{const s=Object.assign(Object.assign(Object.assign({},n),t),l);if(!i||r){i||E.deleteCookie(a.BEARER_TOKEN_COOKIE),(null==s?void 0:s._joinCommunityIds)&&(localStorage.setItem("to_join_community_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_community_ids")||"[]")||[]).concat(s._joinCommunityIds).filter(Boolean))))),null==s||delete s._joinCommunityIds),(null==s?void 0:s._joinTopicIds)&&(localStorage.setItem("to_join_topic_ids",JSON.stringify(Array.from(new Set((JSON.parse(localStorage.getItem("to_join_topic_ids")||"[]")||[]).concat(s._joinTopicIds).filter(Boolean))))),null==s||delete s._joinTopicIds);const e=(null==s?void 0:s._location)||window.location.href;return null==s||delete s._location,window.location.href=a.getUrlToSignUp(e,s,o),null}return e&&e()},params:Object.assign(Object.assign({},n),t)}},Q=U.default.div`
2
2
  .link-info-container {
3
3
  padding: 0.5rem 1rem;
4
4
  background: ${e=>e.color||"#f4faff"};
package/build/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-75abd57a.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),exports.ELEMENT_CONTROL_INPUT_TYPE=e.ELEMENT_CONTROL_INPUT_TYPE,exports.FULL_KEY_ADDRESS=e.FULL_KEY_ADDRESS,Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"NodeActionType",{enumerable:!0,get:function(){return e.NodeActionType}}),exports.NodeFinalTypes=e.NodeFinalTypes,Object.defineProperty(exports,"NodeIntentType",{enumerable:!0,get:function(){return e.NodeIntentType}}),Object.defineProperty(exports,"NodeMultipleOptions",{enumerable:!0,get:function(){return e.NodeMultipleOptions}}),Object.defineProperty(exports,"NodePosition",{enumerable:!0,get:function(){return e.NodePosition}}),Object.defineProperty(exports,"NodeType",{enumerable:!0,get:function(){return e.NodeType}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}}),exports.SubotType=e.SubotType;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Subot-52a853c9.js");Object.defineProperty(exports,"BabyGrowthChartDuration",{enumerable:!0,get:function(){return e.BabyGrowthChartDuration}}),Object.defineProperty(exports,"BabyGrowthChartType",{enumerable:!0,get:function(){return e.BabyGrowthChartType}}),Object.defineProperty(exports,"BabyGrowthResultTab",{enumerable:!0,get:function(){return e.BabyGrowthResultTab}}),exports.ELEMENT_CONTROL_INPUT_TYPE=e.ELEMENT_CONTROL_INPUT_TYPE,exports.FULL_KEY_ADDRESS=e.FULL_KEY_ADDRESS,Object.defineProperty(exports,"Gender",{enumerable:!0,get:function(){return e.Gender}}),Object.defineProperty(exports,"LOCALE",{enumerable:!0,get:function(){return e.LOCALE}}),Object.defineProperty(exports,"NodeActionType",{enumerable:!0,get:function(){return e.NodeActionType}}),exports.NodeFinalTypes=e.NodeFinalTypes,Object.defineProperty(exports,"NodeIntentType",{enumerable:!0,get:function(){return e.NodeIntentType}}),Object.defineProperty(exports,"NodeMultipleOptions",{enumerable:!0,get:function(){return e.NodeMultipleOptions}}),Object.defineProperty(exports,"NodePosition",{enumerable:!0,get:function(){return e.NodePosition}}),Object.defineProperty(exports,"NodeType",{enumerable:!0,get:function(){return e.NodeType}}),Object.defineProperty(exports,"OnboardingStep",{enumerable:!0,get:function(){return e.OnboardingStep}}),exports.SubotType=e.SubotType;
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-f3854ac2.js"),a=require("react"),n=require("./cookieHelper-1eaa42d7.js"),t=require("./useUniqueId-10e140e3.js"),i=require("./Subot-75abd57a.js"),s=require("./useTranslations-da1647d4.js");function l(e){const a=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",a).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const r={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},b={[i.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[i.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=b,exports.PREGNANCY_SLUG=r,exports.useCategory=e=>{const{locale:n}=s.useTranslations();return{isPregnancy:a.useMemo((()=>decodeURI(e.replace(/\//gi,"")).includes(r[n])),[]),isParenting:a.useMemo((()=>{var a;return decodeURI(e.replace(/\//gi,"")).includes(null===(a=b[n])||void 0===a?void 0:a.parenting)}),[]),type:a.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(e,b[n])),[e,n])}},exports.useFbDataLayer=t=>{const i=a.useRef("");a.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,a,s,r,b;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===(a=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===a||a.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(s=i.current)||void 0===s?void 0:s.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==t?void 0:t.id){const[e,a,i,s,h,u]=yield Promise.all([t.email?l(t.email):null,t.phone?l(t.phone):null,t.birthday?l(t.birthday.split("-").join("")):null,t.gender?"m":"f",t.city_name?l(t.city_name).then((e=>e.replace(/\s/g,""))):null,t.name?l(t.name):null]);n.getCookie("_fbc"),n.getCookie("_fbp");const o={user_id:t.id};u&&(o.fn=u),e&&(o.em=e),a&&(o.ph=a),i&&(o.db=i),h&&(o.ct=h),null===(b=null===(r=window.localStorage)||void 0===r?void 0:r.setItem)||void 0===b||b.call(r,"fbDataLayer_userInfo",JSON.stringify(o))}})),()=>{})),[t])},exports.usePrevious=e=>{const n=a.useRef(),i=a.useRef(e);return t.useInitialMount()||i.current===e||(n.current=i.current,i.current=e),n.current},exports.useRafState=e=>{const[n,t]=a.useState(e),i=a.useRef(0),s=a.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{t(e)}))}),[]);return a.useEffect((()=>()=>cancelAnimationFrame(i.current))),[n,s]};
1
+ "use strict";var e=require("./tslib.es6-11571a59.js"),a=require("react"),n=require("./cookieHelper-db011eab.js"),t=require("./useUniqueId-a6a2ac25.js"),i=require("./Subot-52a853c9.js"),s=require("./useTranslations-778ab09c.js");function l(e){const a=(new TextEncoder).encode(e.trim().toLowerCase());return crypto.subtle.digest("SHA-256",a).then((e=>Array.from(new Uint8Array(e)).map((e=>e.toString(16).padStart(2,"0"))).join("")))}const r={"vi-VN":"mang-thai","id-ID":"kehamilan","ms-MY":"kehamilan","km-KH":"ពពោះ","en-PH":"pregnancy","tl-PH":"pregnancy","th-TH":"การตั้งครรภ์","my-MM":"pregnancy","zh-TW":"pregnancy","hi-IN":"pregnancy"},b={[i.LOCALE.Vietnam]:{sexualWellness:"suc-khoe-tinh-duc",health:"suc-khoe",healthyEating:"an-uong-lanh-manh",skinHealth:"da-lieu",healthyHabit:"thoi-quen-lanh-manh",drug:"thuoc",womensHealth:"suc-khoe-phu-nu",fitness:"the-duc-the-thao",pregnancy:"mang-thai",parenting:"nuoi-day-con",diabetes:"tieu-duong-dai-thao-duong",healthyMind:"tam-ly-tam-than"},[i.LOCALE.Indonesia]:{pregnancy:"kehamilan",parenting:"parenting",health:"sehat",diabetes:"diabetes",womensHealth:"wanita",drug:"obat-suplemen",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Malaysia]:{pregnancy:"kehamilan",parenting:"keibubapaan",health:"kesihatan",diabetes:"kencing-manis",womensHealth:"kesihatan-wanita",drug:"ubat",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Cambodia]:{pregnancy:"%e1%9e%96%e1%9e%96%e1%9f%84%e1%9f%87",parenting:"%e1%9e%85%e1%9e%b7%e1%9e%89%e1%9f%92%e1%9e%85%e1%9e%b9%e1%9e%98%e1%9e%80%e1%9e%bc%e1%9e%93",health:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%91%e1%9e%bc%e1%9e%91%e1%9f%85",diabetes:"%e1%9e%87%e1%9f%86%e1%9e%84%e1%9e%ba%e1%9e%91%e1%9e%b9%e1%9e%80%e1%9e%93%e1%9f%84%e1%9e%98%e1%9e%95%e1%9f%92%e1%9e%a2%e1%9f%82%e1%9e%98",womensHealth:"%e1%9e%9f%e1%9e%bb%e1%9e%81%e1%9e%97%e1%9e%b6%e1%9e%96%e1%9e%9f%e1%9f%92%e1%9e%8f%e1%9f%92%e1%9e%9a%e1%9e%b8",drug:"%e1%9e%b1%e1%9e%9f%e1%9e%90%e1%9e%93%e1%9e%b7%e1%9e%84%e1%9e%a2%e1%9e%b6%e1%9e%a0%e1%9e%b6%e1%9e%9a%e1%9e%94%e1%9f%86%e1%9e%94%e1%9f%89%e1%9e%93",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesEnglish]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.PhilippinesTagalog]:{pregnancy:"pagbubuntis",parenting:"pagiging-magulang",health:"kalusugan",diabetes:"diabetes-fil",womensHealth:"kalusugan-kababaihan",drug:"drugs-at-supplements",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Thailand]:{pregnancy:"%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87%e0%b8%84%e0%b8%a3%e0%b8%a3%e0%b8%a0%e0%b9%8c",parenting:"%e0%b8%9e%e0%b9%88%e0%b8%ad%e0%b9%81%e0%b8%a1%e0%b9%88%e0%b9%80%e0%b8%a5%e0%b8%b5%e0%b9%89%e0%b8%a2%e0%b8%87%e0%b8%a5%e0%b8%b9%e0%b8%81",health:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e",diabetes:"%e0%b9%82%e0%b8%a3%e0%b8%84%e0%b9%80%e0%b8%9a%e0%b8%b2%e0%b8%ab%e0%b8%a7%e0%b8%b2%e0%b8%99",womensHealth:"%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%a0%e0%b8%b2%e0%b8%9e%e0%b8%ab%e0%b8%8d%e0%b8%b4%e0%b8%87",drug:"%e0%b8%a2%e0%b8%b2%e0%b9%81%e0%b8%a5%e0%b8%b0%e0%b8%ad%e0%b8%b2%e0%b8%ab%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%aa%e0%b8%a3%e0%b8%b4%e0%b8%a1",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Myanmar]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-az",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.Taiwan]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",drug:"drugs-supplement",sexualWellness:"",healthyEating:"",skinHealth:""},[i.LOCALE.India]:{pregnancy:"pregnancy",parenting:"parenting",health:"health",diabetes:"diabetes",womensHealth:"womens-health",diabetesEn:"en-diabetes",drug:"dawaai",sexualWellness:"",healthyEating:"",skinHealth:""}};exports.MAPPED_CATEGORY_SLUGS=b,exports.PREGNANCY_SLUG=r,exports.useCategory=e=>{const{locale:n}=s.useTranslations();return{isPregnancy:a.useMemo((()=>decodeURI(e.replace(/\//gi,"")).includes(r[n])),[]),isParenting:a.useMemo((()=>{var a;return decodeURI(e.replace(/\//gi,"")).includes(null===(a=b[n])||void 0===a?void 0:a.parenting)}),[]),type:a.useMemo((()=>function(e,a){const n=e.split("/");for(const e in a){const t=a[e];if(n.includes(t))return e}return null}(e,b[n])),[e,n])}},exports.useFbDataLayer=t=>{const i=a.useRef("");a.useEffect((()=>(e.__awaiter(void 0,void 0,void 0,(function*(){var e,a,s,r,b;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===(a=null===(e=window.localStorage)||void 0===e?void 0:e.setItem)||void 0===a||a.call(e,"fbClientIp",JSON.stringify({client_ip_address:(null===(s=i.current)||void 0===s?void 0:s.replace("\n",""))||"",client_user_agent:navigator.userAgent||""})),null==t?void 0:t.id){const[e,a,i,s,h,u]=yield Promise.all([t.email?l(t.email):null,t.phone?l(t.phone):null,t.birthday?l(t.birthday.split("-").join("")):null,t.gender?"m":"f",t.city_name?l(t.city_name).then((e=>e.replace(/\s/g,""))):null,t.name?l(t.name):null]);n.getCookie("_fbc"),n.getCookie("_fbp");const o={user_id:t.id};u&&(o.fn=u),e&&(o.em=e),a&&(o.ph=a),i&&(o.db=i),h&&(o.ct=h),null===(b=null===(r=window.localStorage)||void 0===r?void 0:r.setItem)||void 0===b||b.call(r,"fbDataLayer_userInfo",JSON.stringify(o))}})),()=>{})),[t])},exports.usePrevious=e=>{const n=a.useRef(),i=a.useRef(e);return t.useInitialMount()||i.current===e||(n.current=i.current,i.current=e),n.current},exports.useRafState=e=>{const[n,t]=a.useState(e),i=a.useRef(0),s=a.useCallback((e=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame((()=>{t(e)}))}),[]);return a.useEffect((()=>()=>cancelAnimationFrame(i.current))),[n,s]};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-f3854ac2.js"),t=require("react"),a=require("./getDynamicHealthTool-f7738ae3.js");exports.useHealthToolsCache=o=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield a.getDynamicHealthToolWithCache(o);l(e)}))}),[a.getDynamicHealthToolWithCache,o]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
1
+ "use strict";var e=require("./tslib.es6-11571a59.js"),t=require("react"),a=require("./getDynamicHealthTool-498f29e9.js");exports.useHealthToolsCache=o=>{const[i,l]=t.useState([]);t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){const e=yield a.getDynamicHealthToolWithCache(o);l(e)}))}),[a.getDynamicHealthToolWithCache,o]);const r=t.useCallback((e=>{var t;return(null===(t=i.find((t=>t.template===e)))||void 0===t?void 0:t.link)||""}),[i]);return{allTools:i,getHealthToolLink:r}};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-f3854ac2.js"),t=require("react");const i="undefined"==typeof window,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"};exports.GOOGLE_API_KEY="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",exports.GOOGLE_API_LANGUAGE=o,exports.usePlacesAutocomplete=(n="",r="",s="",c=500)=>{const[a,d]=t.useState([]),[u,l]=t.useState(!1);return t.useEffect((()=>{let t;return n?t=window.setTimeout((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t;if(n)try{l(!0);const c=yield((t="",n="",r="vi")=>e.__awaiter(void 0,void 0,void 0,(function*(){return new Promise(((e,s)=>{if(!t)return s("Need valid text input");if(i)return s("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},n?{componentRestrictions:{country:n}}:{}),{language:o[r]}),e)}catch(e){s(e)}}))})))(n,r,s);d(!(t=c)||t.length<1?[]:t.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{l(!1)}else d([])}))),c):a.length&&d([]),()=>{window.clearTimeout(t)}}),[n,c,r]),{isLoading:u,predictions:a}};
1
+ "use strict";var e=require("./tslib.es6-11571a59.js"),t=require("react");const i="undefined"==typeof window,o={VN:"vi",ID:"id",TH:"th",MY:"ms",TW:"zh-TW",KH:"km",MM:"my",IN:"hi",PH:"en"};exports.GOOGLE_API_KEY="AIzaSyD9AbNa4AFwr8eNVs90G1YhQLhfWJ6KncU",exports.GOOGLE_API_LANGUAGE=o,exports.usePlacesAutocomplete=(n="",r="",s="",c=500)=>{const[a,d]=t.useState([]),[u,l]=t.useState(!1);return t.useEffect((()=>{let t;return n?t=window.setTimeout((()=>e.__awaiter(void 0,void 0,void 0,(function*(){var t;if(n)try{l(!0);const c=yield((t="",n="",r="vi")=>e.__awaiter(void 0,void 0,void 0,(function*(){return new Promise(((e,s)=>{if(!t)return s("Need valid text input");if(i)return s("Need valid window object");try{(new window.google.maps.places.AutocompleteService).getPlacePredictions(Object.assign(Object.assign({input:t},n?{componentRestrictions:{country:n}}:{}),{language:o[r]}),e)}catch(e){s(e)}}))})))(n,r,s);d(!(t=c)||t.length<1?[]:t.map((e=>({placeId:e.place_id,description:e.description}))))}catch(e){console.error(e)}finally{l(!1)}else d([])}))),c):a.length&&d([]),()=>{window.clearTimeout(t)}}),[n,c,r]),{isLoading:u,predictions:a}};
@@ -1 +1 @@
1
- "use strict";var e=require("react"),t=require("./translationsContext-25ed50e4.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(require("string-format"));exports.useTranslations=function(){const{values:a,locale:o}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>a?a[e]?t?n.default(a[e]||e,t):a[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${o}`),t?n.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:o})),[a,o])};
1
+ "use strict";var e=require("react"),t=require("./translationsContext-e697619c.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(require("string-format"));exports.useTranslations=function(){const{values:a,locale:o}=e.useContext(t.TranslationsContext)||{locale:"en-PH"};return e.useMemo((()=>({t:(e,t)=>a?a[e]?t?n.default(a[e]||e,t):a[e]||e:(console.warn(`[useTranslations] Missing translation for key ${e} and locale ${o}`),t?n.default(e,t):e):(console.error("[useTranslations] t method called before translation values are loaded"),e),locale:o})),[a,o])};
@@ -1 +1 @@
1
- "use strict";var e=require("./tslib.es6-f3854ac2.js"),t=require("./cookieHelper-1eaa42d7.js"),o=require("slugify");require("./index-a0ff0c7c.js");var r=require("string-format"),a=require("react"),i=require("./isProduction-1b27c7e8.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(o),n=l(r),_=l(a),u=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var o={},r=(t||{}).decode||E,a=0;for(;a<e.length;){var i=e.indexOf("=",a);if(-1===i)break;var l=e.indexOf(";",a);if(-1===l)l=e.length;else if(l<i){a=e.lastIndexOf(";",i-1)+1;continue}var s=e.slice(a,i).trim();if(void 0===o[s]){var n=e.slice(i+1,l).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1)),o[s]=m(n,r)}a=l+1}return o},c=function(e,t,o){var r=o||{},a=r.encode||T;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!d.test(e))throw new TypeError("argument name is invalid");var i=a(t);if(i&&!d.test(i))throw new TypeError("argument val is invalid");var l=e+"="+i;if(null!=r.maxAge){var s=r.maxAge-0;if(isNaN(s)||!isFinite(s))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(s)}if(r.domain){if(!d.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!d.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){var n=r.expires;if(!function(e){return"[object Date]"===p.call(e)||e instanceof Date}(n)||isNaN(n.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+n.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():r.priority){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l},p=Object.prototype.toString,d=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function E(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function T(e){return encodeURIComponent(e)}function m(e,t){try{return t(e)}catch(t){return e}}var b={parse:u,serialize:c};const A={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"},HEALTH_TOOL:{CREATE:"health-profile/{type}/create?website_url={website_url}",GET_STATUS:"health-profile/get-status-for-user?website_url={website_url}"}},O={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},h=a.createContext({data:O,action:{pushNotifications:e=>e,sanitizeFunction:e=>e},formatMessage:()=>null});exports.GlobalData=O;const g="DD/MM/YYYY",v="/images/avatar.jpg",I="/images/default-image.jpg",L={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},S={"id-ID":{"kalkulator-bmi":L.BMI,"kebutuhan-kalori":L.BMR,"kalkulator-hari-perkiraan-lahir":L.DUE_DATE,"kalkulator-masa-subur-2":L.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":L.PWG,"kalkulator-detak-jantung-saat-olahraga":L.THR},"ms-MY":{"kalkulator-bmi":L.BMI,"kalkulator-bmr":L.BMR,"kalkulator-tarikh-bersalin":L.DUE_DATE,"kalkulator-kesuburan":L.OVULATION,"kalkulator-tambah-berat-badan-hamil":L.PWG,"target-heart-rate-calculator":L.THR},"vi-VN":{"cach-tinh-chi-so-bmi":L.BMI,"tinh-chi-so-bmr":L.BMR,"cong-cu-tinh-ngay-du-sinh":L.DUE_DATE,"tinh-ngay-rung-trung":L.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":L.PWG,"cong-cu-do-nhip-tim":L.THR},"zh-TW":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"en-PH":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":L.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":L.BMR,"เครื่องมือคำนวณกำหนดคลอด":L.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":L.OVULATION,"เครื่องคำนวณน้ำหนักตัว":L.PWG,"เครื่องวัดอัตราการเต้น":L.THR},"hi-IN":{"bmi-calculator-en":L.BMI,"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"delivery-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"km-KH":{"គណនា-bmi":L.BMI,"គណនា-bmr":L.BMR,"គណនាថ្ងៃសម្រាលកូន":L.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":L.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":L.PWG,"គណនារកចង្វាក់បេះដូងល្អ":L.THR},"my-MM":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calendar":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnaancy-weight-calculator":L.PWG,"target-heartrate":L.THR,"pregnancy-weight-calculator":L.PWG,"target-heart-rate":L.THR}},R="hhg_user_token",w="together_admin_token",f={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},y="hhg-id",D={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},P={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}};var G=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:g,DEFAULT_AVATAR_IMG:v,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:I,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:L,LOCALE_HEALTH_TOOLS:S,BEARER_TOKEN_COOKIE:R,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:w,Z_INDEX:f,BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:y,GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:D,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:P});const N={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},C={"vi-VN":"marrybaby.vn"},x=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",M=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;return`https://${t?C[e]:N[e]}`},U=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},k=(e,t,o,r)=>{let a="";o&&(a=Object.keys(o).map((e=>e+"="+o[e])).join("&"));const{togetherBaseApiUrl:i=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};let l=n.default(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:M(String(t._locale))}:{}),t));l+=`${l.includes("?")?"&":"?"}${a}`;return(r||i)+"api/v1/"+U(l)},B=e=>((null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e),H=(t,o,r,a=!1)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,i,l,s;try{const e=yield fetch(a?t:(s=t,encodeURI(s).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:o},B(r)),{headers:Object.assign({},null==r?void 0:r.headers)})).then((e=>e.json()));if(e)return e}catch(o){return console.log(o),console.log({url:t,status:null===(e=null==o?void 0:o.response)||void 0===e?void 0:e.status,statusText:null===(i=null==o?void 0:o.response)||void 0===i?void 0:i.statusText}),(null===(l=null==o?void 0:o.response)||void 0===l?void 0:l.data)||null}return null})),F=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=b.parse(i||""),l=e[R]||t.getCookie(R);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null}));function j(e,t,o){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+o+"$2"):e+a+t+"="+o}const K=(e,t,o,r)=>o&&t?`${o}-${t}`:`${s.default(e||"",{lower:!0,locale:r||x})}-${t}`;exports.ADMIN_PATHS={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},exports.BEARER_TOKEN_COOKIE=R,exports.CARE_PATHS={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},exports.DEFAULT_AVATAR_IMG=v,exports.DEFAULT_IMG=I,exports.DISCOVER_PATHS={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},exports.DUE_DATE_FORMAT=g,exports.DefaultComponentGlobalContextData=O,exports.HEALTH_TOOL_TYPE=L,exports.LEAD_TOKEN_COOKIE=y,exports.MAX_IMAGE_UPLOADS=20,exports.PATHS=A,exports.REPORT_REASON_MAP=D,exports.TogetherComponentGlobalContext=h,exports.TogetherComponentGlobalContextProvider=({locale:e="vi-VN",children:t,userInfo:o,router:r,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:l=(e=>e),pushNotifications:s=(()=>!1),formatMessage:n})=>{const[u,c]=a.useState();return exports.GlobalData={userInfo:o,locale:e,togetherUserId:u,router:r,env:i},a.useEffect((()=>{(null==o?void 0:o.id)&&F(k(A.PROFILE,{_locale:e}),"GET").then((e=>{var t;c(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==o?void 0:o.id]),_.default.createElement(h.Provider,{value:{data:{userInfo:o,locale:e,togetherUserId:u,router:r,env:i},action:{pushNotifications:s,sanitizeFunction:l},formatMessage:n}},t)},exports.Z_INDEX=f,exports.callApi=H,exports.callApiWithAdminAuth=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=b.parse(i||""),l=e[w]||t.getCookie(w);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null})),exports.callApiWithAuth=F,exports.callApiWithOptionalAuth=(o,r="GET",a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,l,s,n,_,u;try{const n="string"==typeof o?o:o.url,_="string"==typeof o?o:o.backupUrl,u=b.parse(i||""),c=u[R]||t.getCookie(R);if(!c||!c.length)return H(_||n,r,a);try{const t=yield fetch(n,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+c},null==a?void 0:a.headers)})).then((e=>e.json()));if(null===(e=null==t?void 0:t.messages)||void 0===e?void 0:e.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return H(_||n,r,a);if(t)return t}catch(e){return console.log({status:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.status,statusText:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.statusText}),H(_||n,r,a)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(_=null==e?void 0:e.response)||void 0===_?void 0:_.statusText}),(null===(u=null==e?void 0:e.response)||void 0===u?void 0:u.data)||null}return null})),exports.constants=G,exports.cookie=b,exports.domainLocales=N,exports.domainLocalesMarryBaby=C,exports.getApiPath=k,exports.getCareDoctorUrl=({name:e,id:t,locale:o})=>{var r;return`/care/${null===(r=P[o||"vi-VN"])||void 0===r?void 0:r.DOCTOR}/${K(e,t)}`},exports.getCareHospitalUrl=({name:e,id:t,slug:o,locale:r})=>{var a;return`/care/${null===(a=P[r||"vi-VN"])||void 0===a?void 0:a.HOSPITAL}/${K(e,t,o)}`},exports.getCarePath=(e,t)=>{const{careBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://service-health-care.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getCurrentBaseUrl=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;if("undefined"!=typeof window)return window.location.origin;const o="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${o?t?"fe.":"discover.":t?"www.":""}${N[e]}`},exports.getDiscoverApiPath=(e,t,o)=>{const{discoverBaseApiUrl:r="",discoverBaseProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(!i.isProduction&&o?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getMarryBabyApiPath=(e,t,o)=>{const{marryBabyApiUrl:r="",marryBabyProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o&&!i.isProduction?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getPremiumApiPath=(e,t)=>{const{premiumBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://premium-content-stag.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getSsoApiPath=(e,t)=>{const{publicSSO:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://staging-id.hellobacsi.com/")+"api/"+U(n.default(e,Object.assign({},t)))},exports.getUrlToSignUp=(e,t,o="/community")=>{const r=e||("undefined"!=typeof window?window.location.href:"/");let a="undefined"!=typeof window?window.location.origin:"";a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:o}=exports.GlobalData.env,r=e||window.location.href;return t&&Object.keys(t).map((e=>{j(r,e,t[e])})),j(r,"source","communities"),o?`${o}?returnUrl=${encodeURIComponent(r.toString())}`:r})(`${a}${o}/on-boarding?return=${encodeURIComponent(r)}`,t)},exports.getWebsiteUrlApi=M,exports.locale=x;
1
+ "use strict";var e=require("./tslib.es6-11571a59.js"),t=require("./cookieHelper-db011eab.js"),o=require("slugify");require("./index-3e769745.js");var r=require("string-format"),a=require("react"),i=require("./isProduction-1358e2f3.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=l(o),n=l(r),_=l(a),u=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var o={},r=(t||{}).decode||E,a=0;for(;a<e.length;){var i=e.indexOf("=",a);if(-1===i)break;var l=e.indexOf(";",a);if(-1===l)l=e.length;else if(l<i){a=e.lastIndexOf(";",i-1)+1;continue}var s=e.slice(a,i).trim();if(void 0===o[s]){var n=e.slice(i+1,l).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1)),o[s]=m(n,r)}a=l+1}return o},c=function(e,t,o){var r=o||{},a=r.encode||T;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!d.test(e))throw new TypeError("argument name is invalid");var i=a(t);if(i&&!d.test(i))throw new TypeError("argument val is invalid");var l=e+"="+i;if(null!=r.maxAge){var s=r.maxAge-0;if(isNaN(s)||!isFinite(s))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(s)}if(r.domain){if(!d.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!d.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){var n=r.expires;if(!function(e){return"[object Date]"===p.call(e)||e instanceof Date}(n)||isNaN(n.valueOf()))throw new TypeError("option expires is invalid");l+="; Expires="+n.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.priority){switch("string"==typeof r.priority?r.priority.toLowerCase():r.priority){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l},p=Object.prototype.toString,d=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function E(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function T(e){return encodeURIComponent(e)}function m(e,t){try{return t(e)}catch(t){return e}}var b={parse:u,serialize:c};const A={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",USER:{DETAIL:"profile/user/detail?website_url={website_url}&user_id={id}",COUNT_TABS:"profile/user/counting?website_url={website_url}&user_id={id}&total_post={post}&total_comment={comment}&total_community={community}&total_reply={reply}&total_question={question}",LIST_POST:"profile/user/posts?website_url={website_url}&user_id={id}&is_anonymous={isAnonymous}&paging=none",LIST_QUESTION_NEED_REPLY:"questions/no-reply?website_url={website_url}",LIST_QUESTION:"question/{id}?website_url={website_url}&is_reply={isReply}&is_question={isQuestion}&is_ignore={isIgnore}&group_by={groupBy}",SKIP_QUESTION:"questions/ignore?website_url={website_url}&question_id={id}",LIST_ANSWERS:"replied/{id}?website_url={website_url}&paging=1&items_per_page={pageSize}"},HEALTH_TOOL:{CREATE:"health-profile/{type}/create?website_url={website_url}",GET_STATUS:"health-profile/get-status-for-user?website_url={website_url}"}},O={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},h=a.createContext({data:O,action:{pushNotifications:e=>e,sanitizeFunction:e=>e},formatMessage:()=>null});exports.GlobalData=O;const g="DD/MM/YYYY",v="/images/avatar.jpg",I="/images/default-image.jpg",L={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR",BGC:"BGC"},S={"id-ID":{"kalkulator-bmi":L.BMI,"kebutuhan-kalori":L.BMR,"kalkulator-hari-perkiraan-lahir":L.DUE_DATE,"kalkulator-masa-subur-2":L.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":L.PWG,"kalkulator-detak-jantung-saat-olahraga":L.THR},"ms-MY":{"kalkulator-bmi":L.BMI,"kalkulator-bmr":L.BMR,"kalkulator-tarikh-bersalin":L.DUE_DATE,"kalkulator-kesuburan":L.OVULATION,"kalkulator-tambah-berat-badan-hamil":L.PWG,"target-heart-rate-calculator":L.THR},"vi-VN":{"cach-tinh-chi-so-bmi":L.BMI,"tinh-chi-so-bmr":L.BMR,"cong-cu-tinh-ngay-du-sinh":L.DUE_DATE,"tinh-ngay-rung-trung":L.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":L.PWG,"cong-cu-do-nhip-tim":L.THR},"zh-TW":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"en-PH":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":L.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":L.BMR,"เครื่องมือคำนวณกำหนดคลอด":L.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":L.OVULATION,"เครื่องคำนวณน้ำหนักตัว":L.PWG,"เครื่องวัดอัตราการเต้น":L.THR},"hi-IN":{"bmi-calculator-en":L.BMI,"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"delivery-date-calculator":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnancy-weight-gain-calculator":L.PWG,"target-heart-rate-calculator":L.THR},"km-KH":{"គណនា-bmi":L.BMI,"គណនា-bmr":L.BMR,"គណនាថ្ងៃសម្រាលកូន":L.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":L.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":L.PWG,"គណនារកចង្វាក់បេះដូងល្អ":L.THR},"my-MM":{"bmi-calculator":L.BMI,"bmr-calculator":L.BMR,"due-date-calendar":L.DUE_DATE,"ovulation-calculator":L.OVULATION,"pregnaancy-weight-calculator":L.PWG,"target-heartrate":L.THR,"pregnancy-weight-calculator":L.PWG,"target-heart-rate":L.THR}},R="hhg_user_token",w="together_admin_token",y={adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},f="hhg-id",D={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},P={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}};var G=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:g,DEFAULT_AVATAR_IMG:v,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:I,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:L,LOCALE_HEALTH_TOOLS:S,BEARER_TOKEN_COOKIE:R,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:w,Z_INDEX:y,BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:f,GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:D,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:P});const N={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},C={"vi-VN":"marrybaby.vn"},x=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",M=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;return`https://${t?C[e]:N[e]}`},U=e=>{const t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},k=(e,t,o,r)=>{let a="";o&&(a=Object.keys(o).map((e=>e+"="+o[e])).join("&"));const{togetherBaseApiUrl:i=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};let l=n.default(e,Object.assign(Object.assign({},(null==t?void 0:t._locale)?{website_url:M(String(t._locale))}:{}),t));l+=`${l.includes("?")?"&":"?"}${a}`;return(r||i)+"api/v1/"+U(l)},B=e=>((null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e),H=(t,o,r,a=!1)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,i,l,s;try{const e=yield fetch(a?t:(s=t,encodeURI(s).replace(/%5B/g,"[").replace(/%5D/g,"]")),Object.assign(Object.assign({method:o},B(r)),{headers:Object.assign({},null==r?void 0:r.headers)})).then((e=>e.json()));if(e)return e}catch(o){return console.log(o),console.log({url:t,status:null===(e=null==o?void 0:o.response)||void 0===e?void 0:e.status,statusText:null===(i=null==o?void 0:o.response)||void 0===i?void 0:i.statusText}),(null===(l=null==o?void 0:o.response)||void 0===l?void 0:l.data)||null}return null})),F=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=b.parse(i||""),l=e[R]||t.getCookie(R);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null}));function j(e,t,o){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+o+"$2"):e+a+t+"="+o}const K=(e,t,o,r)=>o&&t?`${o}-${t}`:`${s.default(e||"",{lower:!0,locale:r||x})}-${t}`;exports.ADMIN_PATHS={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},exports.BEARER_TOKEN_COOKIE=R,exports.CARE_PATHS={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},exports.DEFAULT_AVATAR_IMG=v,exports.DEFAULT_IMG=I,exports.DISCOVER_PATHS={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},exports.DUE_DATE_FORMAT=g,exports.DefaultComponentGlobalContextData=O,exports.HEALTH_TOOL_TYPE=L,exports.LEAD_TOKEN_COOKIE=f,exports.MAX_IMAGE_UPLOADS=20,exports.PATHS=A,exports.REPORT_REASON_MAP=D,exports.TogetherComponentGlobalContext=h,exports.TogetherComponentGlobalContextProvider=({locale:e="vi-VN",children:t,userInfo:o,router:r,env:i={isMarryBaby:!1,togetherBasePath:"/community"},sanitizeFunction:l=(e=>e),pushNotifications:s=(()=>!1),formatMessage:n})=>{const[u,c]=a.useState();return exports.GlobalData={userInfo:o,locale:e,togetherUserId:u,router:r,env:i},a.useEffect((()=>{(null==o?void 0:o.id)&&F(k(A.PROFILE,{_locale:e}),"GET").then((e=>{var t;c(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==o?void 0:o.id]),_.default.createElement(h.Provider,{value:{data:{userInfo:o,locale:e,togetherUserId:u,router:r,env:i},action:{pushNotifications:s,sanitizeFunction:l},formatMessage:n}},t)},exports.Z_INDEX=y,exports.callApi=H,exports.callApiWithAdminAuth=(o,r,a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){try{const e=b.parse(i||""),l=e[w]||t.getCookie(w);if(l&&l.length){const e=yield fetch(o,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+l},null==a?void 0:a.headers)})).then((e=>e.json()));if(e)return e}}catch(e){return null}return null})),exports.callApiWithAuth=F,exports.callApiWithOptionalAuth=(o,r="GET",a,i)=>e.__awaiter(void 0,void 0,void 0,(function*(){var e,l,s,n,_,u;try{const n="string"==typeof o?o:o.url,_="string"==typeof o?o:o.backupUrl,u=b.parse(i||""),c=u[R]||t.getCookie(R);if(!c||!c.length)return H(_||n,r,a);try{const t=yield fetch(n,Object.assign(Object.assign({method:r},B(a)),{headers:Object.assign({Authorization:"Bearer "+c},null==a?void 0:a.headers)})).then((e=>e.json()));if(null===(e=null==t?void 0:t.messages)||void 0===e?void 0:e.find((e=>"Unauthenticated"===(null==e?void 0:e.toLowerCase()))))return H(_||n,r,a);if(t)return t}catch(e){return console.log({status:null===(l=null==e?void 0:e.response)||void 0===l?void 0:l.status,statusText:null===(s=null==e?void 0:e.response)||void 0===s?void 0:s.statusText}),H(_||n,r,a)}}catch(e){return console.log({status:null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status,statusText:null===(_=null==e?void 0:e.response)||void 0===_?void 0:_.statusText}),(null===(u=null==e?void 0:e.response)||void 0===u?void 0:u.data)||null}return null})),exports.constants=G,exports.cookie=b,exports.domainLocales=N,exports.domainLocalesMarryBaby=C,exports.getApiPath=k,exports.getCareDoctorUrl=({name:e,id:t,locale:o})=>{var r;return`/care/${null===(r=P[o||"vi-VN"])||void 0===r?void 0:r.DOCTOR}/${K(e,t)}`},exports.getCareHospitalUrl=({name:e,id:t,slug:o,locale:r})=>{var a;return`/care/${null===(a=P[r||"vi-VN"])||void 0===a?void 0:a.HOSPITAL}/${K(e,t,o)}`},exports.getCarePath=(e,t)=>{const{careBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://service-health-care.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getCurrentBaseUrl=e=>{const{env:{isMarryBaby:t}}=exports.GlobalData;if("undefined"!=typeof window)return window.location.origin;const o="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":`https://${o?t?"fe.":"discover.":t?"www.":""}${N[e]}`},exports.getDiscoverApiPath=(e,t,o)=>{const{discoverBaseApiUrl:r="",discoverBaseProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(!i.isProduction&&o?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getMarryBabyApiPath=(e,t,o)=>{const{marryBabyApiUrl:r="",marryBabyProdApiUrl:a=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o&&!i.isProduction?a:r)+"wp-json/api/"+U(n.default(e,Object.assign({},t)))},exports.getPremiumApiPath=(e,t)=>{const{premiumBaseApiUrl:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://premium-content-stag.hellohealthgroup.com/")+U(n.default(e,Object.assign({},t)))},exports.getSsoApiPath=(e,t)=>{const{publicSSO:o=""}=(null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{};return(o||"https://staging-id.hellobacsi.com/")+"api/"+U(n.default(e,Object.assign({},t)))},exports.getUrlToSignUp=(e,t,o="/community")=>{const r=e||("undefined"!=typeof window?window.location.href:"/");let a="undefined"!=typeof window?window.location.origin:"";a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/"));return((e,t)=>{const{publicSSO:o}=exports.GlobalData.env,r=e||window.location.href;return t&&Object.keys(t).map((e=>{j(r,e,t[e])})),j(r,"source","communities"),o?`${o}?returnUrl=${encodeURIComponent(r.toString())}`:r})(`${a}${o}/on-boarding?return=${encodeURIComponent(r)}`,t)},exports.getWebsiteUrlApi=M,exports.locale=x;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./utils-ac610998.js"),t=require("styled-components"),o=require("react"),a=require("./index-ed991afc.js"),s=require("./index-34b22040.js"),n=require("./Subot-75abd57a.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(t),h=r(o);const g=l.default.div`
1
+ "use strict";var e=require("./utils-71645360.js"),t=require("styled-components"),o=require("react"),s=require("./index-5e751a6e.js"),a=require("./index-c50fe502.js"),n=require("./Subot-52a853c9.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=r(t),h=r(o);const g=l.default.div`
2
2
  position: relative;
3
3
  display: inline-flex;
4
4
  align-items: center;
@@ -138,4 +138,4 @@
138
138
  width: unset;
139
139
  margin-bottom: 4px;
140
140
  margin-left: -3px;
141
- `,p=o.memo((({type:e,width:t,height:n})=>{const r=o.useMemo((()=>{switch(e){case"hellobacsi":return{width:t||"107px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/hellobacsi.png")};case"hellodoktor":return{width:t||"127px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:t||"121px",height:n||"27px",src:a.CommonGAssets.getAssetPath("logo/hellosehat.png")};case"hellohealth":return{width:t||"123px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:t||"150px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:t||"99px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:t||"127px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:t||"101px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:t||"111px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:t||"89px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:t||"123px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:t||"105px",height:n||"24px",src:a.CommonGAssets.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:t||"60px",height:n||"57px",src:a.CommonGAssets.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:t||"145px",height:n||"28px",src:a.CommonGAssets.getAssetPath("logo/marrybaby.png")};default:return null}}),[e,t,n]),{src:l,width:g,height:i}=r||{};return h.default.createElement(s.ImageWrap,{alt:`${e} logo`,className:"main-logo-icon",src:l,style:{width:g,height:i}})})),m={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},d=[n.LOCALE.Vietnam,n.LOCALE.Taiwan,n.LOCALE.Indonesia,n.LOCALE.Malaysia],c=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],x={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]};exports.LogoIcon=p,exports.LunarNewYearLocale=d,exports.StyledLogo=g,exports.StyledProLogo=i,exports.isChristmas=e=>{const t=e.getDate();return 11===e.getMonth()&&t>=16&&t<=25},exports.isLabourDay=e=>{const t=e.getFullYear(),o=new Date(t,4,1),a=new Date(o);a.setDate(o.getDate()-1);const s=new Date(o);return s.setDate(o.getDate()+1),a<=e&&e<=s},exports.isLunarNewYear=e=>{const t=e.getFullYear(),o=m[t];if(!o)return!1;const a=new Date(t,o[1],o[0]),s=new Date(a);s.setDate(a.getDate()-7);const n=new Date(a);return n.setDate(a.getDate()+5),s<=e&&e<=n},exports.isNewYear=e=>{const t=e.getDate(),o=e.getMonth();return 11===o&&t>=26||0===o&&t<=15},exports.isRamadan=e=>{const t=e.getFullYear(),o=c.filter((e=>e.year===t));return!!o.length&&o.some((o=>{const a=o.start[2]||t,s=new Date(a,o.start[1],o.start[0]),n=new Date(a,o.end[1],o.end[0]);return s<=e&&e<=n}))},exports.isVN3004=e=>{const t=e.getFullYear(),o=new Date(t,3,30),a=new Date(o);a.setDate(o.getDate()-1);const s=new Date(o);return s.setDate(o.getDate()+2),a<=e&&e<=s},exports.isVNHungKing=e=>{const t=e.getFullYear(),o=x[t];if(!o)return!1;const a=new Date(t,o[1],o[0]),s=new Date(a);s.setDate(a.getDate()-1);const n=new Date(a);return n.setDate(a.getDate()+1),s<=e&&e<=n};
141
+ `,p=o.memo((({type:e,width:t,height:n})=>{const r=o.useMemo((()=>{switch(e){case"hellobacsi":return{width:t||"107px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellobacsi.png")};case"hellodoktor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoktor.png")};case"hellosehat":return{width:t||"121px",height:n||"27px",src:s.CommonGAssets.getAssetPath("logo/hellosehat.png")};case"hellohealth":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellohealth.png")};case"hellotogether":return{width:t||"150px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellotogether.png")};case"hellocare":return{width:t||"99px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellocare.png")};case"hellodoctor":return{width:t||"127px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellodoctor.png")};case"hellokrupet":return{width:t||"101px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokrupet.png")};case"hellosayarwon":return{width:t||"111px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellosayarwon.png")};case"helloyishi":return{width:t||"89px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloyishi.png")};case"hellokhunmor":return{width:t||"123px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/hellokhunmor.png")};case"helloswasthya":return{width:t||"105px",height:n||"24px",src:s.CommonGAssets.getAssetPath("logo/helloswasthya.png")};case"logomark":return{width:t||"60px",height:n||"57px",src:s.CommonGAssets.getAssetPath("logo/logomark.png")};case"marryBaby":return{width:t||"145px",height:n||"28px",src:s.CommonGAssets.getAssetPath("logo/marrybaby.png")};default:return null}}),[e,t,n]),{src:l,width:g,height:i}=r||{};return h.default.createElement(a.ImageWrap,{alt:`${e} logo`,className:"main-logo-icon",src:l,style:{width:g,height:i}})})),m={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},d=[n.LOCALE.Vietnam,n.LOCALE.Taiwan,n.LOCALE.Indonesia,n.LOCALE.Malaysia],c=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],x={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]};exports.LogoIcon=p,exports.LunarNewYearLocale=d,exports.StyledLogo=g,exports.StyledProLogo=i,exports.isChristmas=e=>{const t=e.getDate();return 11===e.getMonth()&&t>=16&&t<=25},exports.isLabourDay=e=>{const t=e.getFullYear(),o=new Date(t,4,1),s=new Date(o);s.setDate(o.getDate()-1);const a=new Date(o);return a.setDate(o.getDate()+1),s<=e&&e<=a},exports.isLunarNewYear=e=>{const t=e.getFullYear(),o=m[t];if(!o)return!1;const s=new Date(t,o[1],o[0]),a=new Date(s);a.setDate(s.getDate()-7);const n=new Date(s);return n.setDate(s.getDate()+5),a<=e&&e<=n},exports.isNewYear=e=>{const t=e.getDate(),o=e.getMonth();return 11===o&&t>=26||0===o&&t<=15},exports.isRamadan=e=>{const t=e.getFullYear(),o=c.filter((e=>e.year===t));return!!o.length&&o.some((o=>{const s=o.start[2]||t,a=new Date(s,o.start[1],o.start[0]),n=new Date(s,o.end[1],o.end[0]);return a<=e&&e<=n}))},exports.isVN3004=e=>{const t=e.getFullYear(),o=new Date(t,3,30),s=new Date(o);s.setDate(o.getDate()-1);const a=new Date(o);return a.setDate(o.getDate()+2),s<=e&&e<=a},exports.isVNHungKing=e=>{const t=e.getFullYear(),o=x[t];if(!o)return!1;const s=new Date(t,o[1],o[0]),a=new Date(s);a.setDate(s.getDate()-1);const n=new Date(s);return n.setDate(s.getDate()+1),a<=e&&e<=n};
@@ -1 +1 @@
1
- "use strict";var a=require("./Subot-75abd57a.js");const i={[a.LOCALE.Vietnam]:"VN",[a.LOCALE.Cambodia]:"KH",[a.LOCALE.Indonesia]:"ID",[a.LOCALE.Malaysia]:"MY",[a.LOCALE.PhilippinesEnglish]:"PH",[a.LOCALE.PhilippinesTagalog]:"PH",[a.LOCALE.Taiwan]:"TW",[a.LOCALE.Thailand]:"TH",[a.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=i,exports.hiddenEmailChar=(a="")=>{const i=a.indexOf("@"),L=a.substring(0,i),e=L.length>3?3:L.length;return a.replace(a.substring(e,i),a.slice(e,i).replace(/./g,"x"))};
1
+ "use strict";var a=require("./Subot-52a853c9.js");const i={[a.LOCALE.Vietnam]:"VN",[a.LOCALE.Cambodia]:"KH",[a.LOCALE.Indonesia]:"ID",[a.LOCALE.Malaysia]:"MY",[a.LOCALE.PhilippinesEnglish]:"PH",[a.LOCALE.PhilippinesTagalog]:"PH",[a.LOCALE.Taiwan]:"TW",[a.LOCALE.Thailand]:"TH",[a.LOCALE.Myanmar]:"MM"};exports.MAPPED_LOCALE=i,exports.hiddenEmailChar=(a="")=>{const i=a.indexOf("@"),L=a.substring(0,i),e=L.length>3?3:L.length;return a.replace(a.substring(e,i),a.slice(e,i).replace(/./g,"x"))};
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-f3854ac2.js"),t=require("react"),a=require("@mantine/core"),l=require("./index-34b22040.js");require("@mantine/dates"),require("./index-a0ff0c7c.js");var n=require("./Subot-75abd57a.js");require("./index-ed991afc.js");var r=require("./Plus-54948d91.js"),i=require("./theme-645eae3b.js"),o=require("./useTranslations-da1647d4.js"),c=require("@mantine/hooks"),s=require("styled-components"),d=require("./utils-ac610998.js"),u=require("./index-2e493e48.js");require("./translationsContext-25ed50e4.js"),require("string-format");var m=require("./index.styles-4e9a4b76.js");require("./constants-a45e9439.js"),require("./utils-fd32cb42.js");var C=require("./index-3c0325dd.js");require("./index.styled-5c0482ab.js"),require("./index-8f4c566f.js"),require("./utils-9389c98f.js");var f=require("./index-32c9ce71.js"),p=require("@mantine/form"),g=require("dayjs"),h=require("dayjs/plugin/customParseFormat"),b=require("./index-654c54be.js");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./WhatsApp-6d901f48.js"),require("@mantine/carousel"),require("classnames"),require("date-fns/locale"),require("./isProduction-1b27c7e8.js"),require("./animation-c29cc5bc.js"),require("react-keyed-flatten-children"),require("./useUniqueId-10e140e3.js"),require("./cookieHelper-1eaa42d7.js"),require("slugify");var x=E(t),v=E(s),y=E(g),T=E(h);const w=v.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tslib.es6-11571a59.js"),t=require("react"),a=require("@mantine/core"),l=require("./index-c50fe502.js");require("@mantine/dates"),require("./index-3e769745.js");var n=require("./Subot-52a853c9.js");require("./index-5e751a6e.js");var r=require("./Plus-5db023c7.js"),i=require("./theme-1a921769.js"),o=require("./useTranslations-778ab09c.js"),c=require("@mantine/hooks"),s=require("styled-components"),d=require("./utils-71645360.js"),u=require("./index-063beba4.js");require("./translationsContext-e697619c.js"),require("string-format");var m=require("./index.styles-b6376365.js");require("./constants-12b9a3a8.js"),require("./utils-4db34bcf.js");var C=require("./index-6b402916.js");require("./index.styled-8f95d44d.js"),require("./index-0011304a.js"),require("./utils-2bd7f928.js");var f=require("./index-f049adba.js"),p=require("@mantine/form"),g=require("dayjs"),h=require("dayjs/plugin/customParseFormat"),b=require("./index-86f87970.js");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./WhatsApp-378451bf.js"),require("@mantine/carousel"),require("classnames"),require("date-fns/locale"),require("./isProduction-1358e2f3.js"),require("./animation-71e7e86f.js"),require("react-keyed-flatten-children"),require("./useUniqueId-a6a2ac25.js"),require("./cookieHelper-db011eab.js"),require("slugify");var x=E(t),v=E(s),y=E(g),T=E(h);const w=v.default.div`
2
2
  position: relative;
3
3
  padding: 16px;
4
4
  min-height: 110px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hhgtech/hhg-components",
3
- "version": "1.28.55",
3
+ "version": "1.28.56",
4
4
  "main": "build/index.js",
5
5
  "module": "build/esm/index.js",
6
6
  "files": [
@@ -1 +0,0 @@
1
- import{a as t}from"./tslib.es6-ba9d8cd4.js";import{i as e}from"./isProduction-d32c9de6.js";const a={},i=t=>{if("undefined"!=typeof window){let a;try{a=JSON.parse(localStorage.getItem((e?"":"staging_")+"hhg-cache-"+t)||"{}")}catch(t){}return a||{}}return a[t]},o=(t,i)=>{try{"undefined"!=typeof window?localStorage.setItem((e?"":"staging_")+"hhg-cache-"+t,JSON.stringify({data:i,time:Date.now()})):a[t]={data:i,time:Date.now()}}catch(t){}},n=(e,a,n,r=9e5)=>t(void 0,void 0,void 0,(function*(){const t=i(e);if(t&&t.data&&t.time&&Date.now()-t.time<r)return t.data;if(a){const t=yield a();return n&&!n(t)||o(e,t),t}return null}));export{i as a,n as g,o as s};
@@ -1 +0,0 @@
1
- import{a as t}from"./tslib.es6-ba9d8cd4.js";import{n as o}from"./normalizeLink-b5dd4ea3.js";import{c as i}from"./routing-9dc90ff7.js";import{g as l}from"./core-93ac9e1f.js";const n=(t,o)=>{var i,l;if(!t)return{};const n="tl-PH"===o?"/fil":"";return{id:t.id,isSubot:t.is_subot,template:t.template,icon:t.icon,link:(null===(i=t.link)||void 0===i?void 0:i.startsWith("http"))?t.link:`${n}/health-tools`+(null===(l=t.link)||void 0===l?void 0:l.replace(`${n}/`,"/")),subtitle:t.subtitle,title:t.title}},e=l=>t(void 0,void 0,void 0,(function*(){var t,e;try{const a="tl-PH"===l?"lang=fil":"";let s=[];try{const r=yield fetch(o(`${i(l)}/wp-json/api/healthtools?ismenu=0${a?"&"+a:""}`)).then((t=>t.json()));s=(null===(e=null===(t=null==r?void 0:r.data)||void 0===t?void 0:t.map)||void 0===e?void 0:e.call(t,(t=>n(t,l))))||[]}catch(t){}return s}catch(t){console.error(t)}})),a=o=>t(void 0,void 0,void 0,(function*(){return(yield l("all-health-tools",(()=>e(o||"en-PH")),(t=>!!(null==t?void 0:t.length)),6e4))||[]}));export{a,n as f,e as g};
@@ -1 +0,0 @@
1
- import{_ as e}from"./tslib.es6-ba9d8cd4.js";import t from"react";import{Modal as s,CloseButton as l}from"@mantine/core";import{C as o}from"./index-b2fd7f71.js";import{j as a}from"./index-d9f09bce.js";import{T as n}from"./Plus-74f52e6c.js";const r=r=>{var{title:i,styles:m}=r,c=e(r,["title","styles"]);const{classes:d}=a(void 0,{name:"Modal",styles:m});return t.createElement(t.Fragment,null,t.createElement(s,Object.assign({centered:!0,classNames:d},c,{withCloseButton:!1,title:c.withCloseButton&&t.createElement(t.Fragment,null,t.createElement(n,{size:"s2",weight:"semiBold",as:"span"},i),t.createElement(l,Object.assign({},c.closeButtonProps,{onClick:()=>{var e;return null===(e=c.onClose)||void 0===e?void 0:e.call(c)},sx:{":focus":{outline:0}}}),t.createElement("img",{loading:"lazy",className:"mantine-Modal-close",src:o.getAssetPath("CloseModal.svg"),style:{width:"16px"}})))})))};export{r as M};
@@ -1 +0,0 @@
1
- import{_ as e}from"./tslib.es6-ba9d8cd4.js";import t,{useState as n,useEffect as o}from"react";import{useDebouncedValue as a}from"@mantine/hooks";import{D as i,h as s,B as r,i as l}from"./index-d9f09bce.js";const m=m=>{var{color:c,withControl:h,onChange:d,value:u,min:g,max:k,isStatic:p,containerClassName:v,containerStyle:C}=m,b=e(m,["color","withControl","onChange","value","min","max","isStatic","containerClassName","containerStyle"]);const[x,E]=n(u||g||0),[f]=a(x,i);return o((()=>{null==d||d(f)}),[f]),o((()=>{E(u)}),[u]),t.createElement(s,{className:v,style:C},h&&t.createElement(r,{type:"button",size:"sm",color:"ghost",onClick:()=>{E((e=>g&&e===g?e:e-1))}},t.createElement("svg",{width:"10",height:"10",fill:"none",viewBox:"0 0 12 3"},t.createElement("path",{d:"M1 1.004h8",stroke:c,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),t.createElement(l,Object.assign({thumbSize:21,labelAlwaysOn:!0,radius:"xl",color:c,value:x,onChange:p?()=>null:E,min:g,max:k},b,{className:"hhg-mantine-slider "+(b.className||"")})),h&&t.createElement(r,{type:"button",size:"sm",variant:"ghost",onClick:()=>{E((e=>k&&e===k?e:e+1))}},t.createElement("svg",{width:"16",height:"20",fill:"none",viewBox:"0 0 16 16"},t.createElement("path",{d:"M8 4v8M4 8h8",stroke:c,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))))};export{m as S};
@@ -1 +0,0 @@
1
- import{_ as e}from"./tslib.es6-ba9d8cd4.js";import t from"react";import{Image as o}from"@mantine/core";import{DatePickerInput as r}from"@mantine/dates";import{I as s}from"./index-bd711d1d.js";import{L as i}from"./Subot-851fd333.js";import{C as a}from"./index-b2fd7f71.js";import{M as n}from"./index-d9f09bce.js";const l=l=>{var m,{value:d,fullWidth:c=!0}=l,p=e(l,["value","fullWidth"]);return t.createElement(r,Object.assign({locale:n[process.env.UNIFY_LOCALE||i.Vietnam],valueFormat:null===(m=s[process.env.UNIFY_LOCALE||i.Vietnam])||void 0===m?void 0:m.dateFormat,size:"md",clearable:!1,popoverProps:c?{styles:{dropdown:{minWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}}:{},styles:{root:{position:"relative"},rightSection:{pointerEvents:"none",cursor:"default"}},rightSection:t.createElement(o,{src:a.getAssetPath(p.isMB?"MB-calendar.svg":"OutlineCalendar.svg"),width:16,height:16}),value:d},p,{className:`input-control ${(null==p?void 0:p.className)||""}`}))};export{l as D};
@@ -1 +0,0 @@
1
- import{_ as t}from"./tslib.es6-ba9d8cd4.js";import e from"react";import"./index-d9f09bce.js";import"@mantine/core";import"@mantine/dates";import"./index-bd711d1d.js";import"./Subot-851fd333.js";import"./index-b2fd7f71.js";import{T as i}from"./Plus-74f52e6c.js";import"./theme-868b0ca0.js";import"./translationsContext-6c25aedd.js";import"string-format";import"@mantine/hooks";import"./utils-16053cd5.js";const r=r=>{var{size:o="base",type:s="regular"}=r,m=t(r,["size","type"]);return e.createElement(i,Object.assign({size:o,weight:"caption"===s?"bold":s},m))};export{r as T};
@@ -1 +0,0 @@
1
- import o,{useState as a,useEffect as e,useMemo as t,useCallback as l}from"react";import{v as d,w as i}from"./index.styles-607132bf.js";import{_ as s,a as n}from"./tslib.es6-ba9d8cd4.js";import{u as r}from"./useTranslations-2bfc2d1a.js";import{B as c}from"./index-d9f09bce.js";import{P as v}from"./paths-eaed7507.js";import{a as u}from"./constants-0683dc31.js";import{d as m}from"./index-bd711d1d.js";import{b as p,h as b}from"./utils-bb7cbdbf.js";import{i as g}from"./isProduction-d32c9de6.js";const y=({type:a="solid",className:e,style:t})=>o.createElement(d,{style:t,className:e,"data-diver-type":a,dividerType:a}),f={admin:"cardAuthor.admin",moderator:"cardAuthor.moderator",ambassador:"cardAuthor.ambassador",expert:"cardAuthor.expert",sponsor:"cardAuthor.sponsor",guide:"cardAuthor.guide",influencer:"cardAuthor.influencer"},E=a=>{var{siteType:e,role:t,title:l,styles:d,className:n}=a,c=s(a,["siteType","role","title","styles","className"]);const{t:v}=r(),u=t?(o=>["admin","moderator","ambassador","expert","sponsor","guide","influencer"].find((a=>a===o)))(t):"",{classes:m,cx:p}=i(void 0,{name:"AuthorBadge",styles:d});return u&&f[u]?o.createElement("div",Object.assign({className:p(m.root,n),"data-label-type":u,"data-is-marrybaby":"marryBaby"===e},c),l||v(f[u])):null};var h="Dudns9-";const A=({value:t,choices:l,onChange:d})=>{const[i,s]=a(t);return e((()=>{s(t)}),[t]),o.createElement("div",{className:h},l.map(((a,e)=>o.createElement(c,{dataEventCategory:a.dataEventCategory,dataEventAction:a.dataEventAction,dataEventLabel:a.dataEventLabel,size:"sm",variant:a.value===i?"primary":"tertiary",key:e,onClick:()=>{s(a.value),null==d||d(a.value)}},a.label||""))))},T=e=>{var{label:d,bookingId:i,bookingType:y="doctor",locale:f="vi-VN"}=e,E=s(e,["label","bookingId","bookingType","locale"]);const{t:h}=r(),[A,T]=a(!1),_=t((()=>"undefined"!=typeof window?window.location.href:""),[]),C=l((()=>n(void 0,void 0,void 0,(function*(){var o,a,e,t,l,d,s,n,r,c,E,h,A,_,C;const j="doctor"===y?v.GET_DOCTOR_DETAIL:"hospital"===y?v.GET_HOSPITAL_DETAIL:"service"===y?v.GET_SERVICE_DETAIL:"";try{T(!0);const v=yield p(b(j,{id:i,site:m[f]}),"get");if(1===(null==v?void 0:v._status)){const i="doctor"===y?{id:null===(a=null===(o=null==v?void 0:v._data)||void 0===o?void 0:o.doctor)||void 0===a?void 0:a.id,slug:null===(t=null===(e=null==v?void 0:v._data)||void 0===e?void 0:e.doctor)||void 0===t?void 0:t.slug,localSlug:null===(l=u[f])||void 0===l?void 0:l.DOCTOR}:"hospital"===y?{id:null===(s=null===(d=null==v?void 0:v._data)||void 0===d?void 0:d.branch)||void 0===s?void 0:s.id,slug:null===(r=null===(n=null==v?void 0:v._data)||void 0===n?void 0:n.branch)||void 0===r?void 0:r.slug,localSlug:null===(c=u[f])||void 0===c?void 0:c.HOSPITAL}:{id:null===(h=null===(E=null==v?void 0:v._data)||void 0===E?void 0:E.service)||void 0===h?void 0:h.id,slug:null===(_=null===(A=null==v?void 0:v._data)||void 0===A?void 0:A.service)||void 0===_?void 0:_.slug,localSlug:null===(C=u[f])||void 0===C?void 0:C.SERVICE};window.location.href=`https://${g?"":"discover."}${m[f]}/care/${i.localSlug}/${i.slug}-${i.id}/`}else T(!1)}catch(o){console.log(o),T(!1)}}))),[]);return i&&y?o.createElement(c,Object.assign({dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:_,onClick:C,loading:A},E),d||h("careBooking.bookAnAppointment")):null};export{E as A,A as B,y as D,T as a};
@@ -1 +0,0 @@
1
- import{useContext as o,useMemo as a}from"react";import{T as e}from"./translationsContext-6c25aedd.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 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-f3854ac2.js"),t=require("react"),a=require("@mantine/core"),s=require("./index-34b22040.js");require("@mantine/dates");var r=require("./index-a0ff0c7c.js"),i=require("./Subot-75abd57a.js");require("./index-ed991afc.js"),require("./Plus-54948d91.js"),require("./theme-645eae3b.js");var n=require("./useTranslations-da1647d4.js");require("@mantine/hooks"),require("./utils-ac610998.js");var c=require("./utils-c0ee935c.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=d(t);const o={provinceByName:{},provinces:[],districts:[],wards:[],selectedProvince:"",selectedDistrict:"",selectedWard:""},u=(e,t)=>{switch(t.type){case"SET_DATA":return Object.assign(Object.assign({},e),t.payload);case"SET_DISTRICTS":return Object.assign(Object.assign({},e),{districts:t.payload});case"SET_WARDS":return Object.assign(Object.assign({},e),{wards:t.payload});case"SELECT_PROVINCE":return Object.assign(Object.assign({},e),{selectedProvince:t.payload,selectedDistrict:"",selectedWard:""});case"SELECT_DISTRICT":return Object.assign(Object.assign({},e),{selectedDistrict:t.payload,selectedWard:""});case"SELECT_WARD":return Object.assign(Object.assign({},e),{selectedWard:t.payload});default:return e}},p=({provinces:a})=>{const[s,n]=t.useReducer(u,o),{provinceByName:d,provinces:l,districts:p,wards:v,selectedProvince:E,selectedDistrict:b,selectedWard:h}=s,[y,j]=t.useState();t.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){var e,t,s,d;try{const l=yield fetch((d=process.env.UNIFY_LOCALE||i.LOCALE.Vietnam,`${r.CDN_ADDRESS}/cities-data-${c.MAPPED_LOCALE[d]}.json`)).then((e=>e.json()));j(l);const{list:o}=l,u=a?((e,t)=>{const a={};for(const[,e]of Object.entries(t)){const{id:t}=e;t&&(a[t]=e)}const s={};return e.map((e=>{s[e.name]=a[e.id]})),s})(a,o):o,p=Object.keys(u),v=Object.keys((null===(e=o[p[0]])||void 0===e?void 0:e.list)||{}),E=Object.keys((null===(s=null===(t=o[p[0]])||void 0===t?void 0:t[v[0]])||void 0===s?void 0:s.list)||{});n({type:"SET_DATA",payload:{provinceByName:u,provinces:p,districts:v,wards:E}})}catch(e){console.error("Error fetching address data:",e)}}))}),[process.env.UNIFY_LOCALE]);return{provinces:l,districts:p,wards:v,selectedProvince:E,selectedDistrict:b,selectedWard:h,handleProvinceChange:e=>{var t;const a=Object.keys((null===(t=d[e])||void 0===t?void 0:t.list)||{});n({type:"SET_DISTRICTS",payload:a}),n({type:"SET_WARDS",payload:[]}),n({type:"SELECT_PROVINCE",payload:e})},handleDistrictChange:e=>{var t,a;const s=Object.keys((null===(a=null===(t=d[E])||void 0===t?void 0:t.list[e])||void 0===a?void 0:a.list)||{});n({type:"SET_WARDS",payload:s}),n({type:"SELECT_DISTRICT",payload:e})},handleWardChange:e=>{n({type:"SELECT_WARD",payload:e})}}};exports.AddressInput=r=>{var{error:i,provinces:c,placeholder:d}=r,o=e.__rest(r,["error","provinces","placeholder"]);const{t:u}=n.useTranslations(),{provinces:v,districts:E,wards:b,selectedProvince:h,selectedDistrict:y,selectedWard:j,handleProvinceChange:g,handleDistrictChange:S,handleWardChange:C}=p({provinces:c}),[f,O]=t.useState("");return t.useEffect((()=>{h&&y&&j&&f?o.onChange({selectedProvince:h,selectedDistrict:y,selectedWard:j,extraInfo:f}):o.onChange(null)}),[h,y,j,f]),l.default.createElement(s.Input.Wrapper,Object.assign({withAsterisk:!0},o),l.default.createElement(a.Stack,null,l.default.createElement(s.Select,{placeholder:(null==d?void 0:d.province)||u("onboarding.similac.input.city"),data:c?v:v.sort(),searchable:!0,onChange:g,value:h}),l.default.createElement(s.Select,{placeholder:(null==d?void 0:d.district)||u("onboarding.similac.input.district"),data:E.sort(),searchable:!0,onChange:S,value:y,disabled:!h}),l.default.createElement(s.Select,{placeholder:(null==d?void 0:d.ward)||u("onboarding.similac.input.ward"),searchable:!0,data:b.sort(),value:j,onChange:C,disabled:!h||!y}),l.default.createElement(s.Input,{placeholder:(null==d?void 0:d.address)||u("onboarding.similac.input.no"),disabled:!h||!y||!j,value:f,onChange:O,style:{marginBottom:0}})),l.default.createElement(a.Input.Error,{size:"md"},i))};
@@ -1 +0,0 @@
1
- "use strict";var e=require("./tslib.es6-f3854ac2.js"),r=require("react");require("./index-34b22040.js"),require("@mantine/core"),require("@mantine/dates"),require("./index-a0ff0c7c.js"),require("./Subot-75abd57a.js"),require("./index-ed991afc.js");var t=require("./Plus-54948d91.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./theme-645eae3b.js"),require("./translationsContext-25ed50e4.js"),require("string-format"),require("@mantine/hooks"),require("./utils-ac610998.js");var s=i(r);exports.Text=r=>{var{size:i="base",type:a="regular"}=r,u=e.__rest(r,["size","type"]);return s.default.createElement(t.Text,Object.assign({size:i,weight:"caption"===a?"bold":a},u))};