@hhgtech/hhg-components 1.28.57 → 1.28.59

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 (309) hide show
  1. package/build/{Plus-29cf93ab.js → Plus-155fd41f.js} +1 -1
  2. package/build/{WhatsApp-0328afb7.js → WhatsApp-cbd2b870.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-accf73ad.js → constants-5f9a141f.js} +1 -1
  8. package/build/{constants-6df0e996.js → constants-6a8e6824.js} +1 -1
  9. package/build/constants.js +1 -1
  10. package/build/{core-74527c16.js → core-b543f933.js} +1 -1
  11. package/build/{dataTransform-90c60ebb.js → dataTransform-9d1496b9.js} +1 -1
  12. package/build/ecom.js +1 -1
  13. package/build/esm/{Plus-f7c5618a.js → Plus-0795a68c.js} +1 -1
  14. package/build/esm/{WhatsApp-712a2952.js → WhatsApp-c7fd561d.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-0025e49b.js → constants-7b7e7784.js} +1 -1
  20. package/build/esm/{constants-2b9cc123.js → constants-d7aa1c1c.js} +1 -1
  21. package/build/esm/constants.js +1 -1
  22. package/build/esm/{core-7df57a7b.js → core-87a3d383.js} +1 -1
  23. package/build/esm/{dataTransform-0387e8b3.js → dataTransform-9c92d261.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-f55ca837.js +1 -0
  28. package/build/esm/{getSocialList-73f474a8.js → getSocialList-be651baf.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-bd2dfaf4.js → index-03b6469c.js} +4 -4
  33. package/build/esm/{index-47defc94.js → index-09d9862b.js} +1 -1
  34. package/build/esm/index-0ce3ea30.js +113 -0
  35. package/build/esm/{index-11ddf8b9.js → index-1c858659.js} +1 -1
  36. package/build/esm/index-36467b48.js +1 -0
  37. package/build/esm/index-404bb127.js +1 -0
  38. package/build/esm/{index-ef286146.js → index-417dbb92.js} +1 -1
  39. package/build/esm/{index-0aa85299.js → index-47ab8d3d.js} +1 -1
  40. package/build/esm/index-47b11c19.js +1 -0
  41. package/build/esm/{index-bd890b36.js → index-4fa69484.js} +1 -1
  42. package/build/esm/{index-7bc42cef.js → index-5222461b.js} +1 -1
  43. package/build/esm/{index-3fcc7de2.js → index-5db9b9d7.js} +9 -9
  44. package/build/esm/{index-75ae81a1.js → index-64dc6b83.js} +1 -1
  45. package/build/esm/{index-6a968a24.js → index-77b369f0.js} +1 -1
  46. package/build/esm/{index-449bd04b.js → index-88f24735.js} +1 -1
  47. package/build/esm/{index-1979f711.js → index-a9cbc4b7.js} +1 -1
  48. package/build/esm/index-b6c758c5.js +2748 -0
  49. package/build/esm/{index-cbeaabc6.js → index-bfb36e6c.js} +1 -1
  50. package/build/esm/{index-49571e2c.js → index-cce4d6b6.js} +150 -150
  51. package/build/esm/{index-ac8ebb4a.js → index-ed7346f2.js} +1 -1
  52. package/build/esm/{index-495ffaf3.js → index-f047d212.js} +1 -1
  53. package/build/esm/{index-7ab2dba5.js → index-f76eef86.js} +1 -1
  54. package/build/esm/{index-27926bb9.js → index-fe314c0f.js} +2 -2
  55. package/build/esm/index.js +1 -1
  56. package/build/esm/{index.styled-f2aff174.js → index.styled-500647b4.js} +1 -1
  57. package/build/esm/{index.styles-3ff4ce8e.js → index.styles-fa4052da.js} +1 -1
  58. package/build/esm/lead/index.d.ts +2 -1
  59. package/build/esm/lead.js +1 -1
  60. package/build/esm/mantine.js +1 -1
  61. package/build/esm/misc.js +1 -1
  62. package/build/esm/navigation.js +1 -1
  63. package/build/esm/onboardingV2.js +3 -3
  64. package/build/esm/pwg.js +2 -2
  65. package/build/esm/{routing-c72cf84b.js → routing-7c6d65ae.js} +1 -1
  66. package/build/esm/subot.js +1 -1
  67. package/build/esm/together/components/atoms/cardReactions/element/index.d.ts +6 -5
  68. package/build/esm/together/components/atoms/cardReactions/index.d.ts +3 -3
  69. package/build/esm/together/components/molecules/cardAuthor/authorBadgeItem/index.d.ts +3 -0
  70. package/build/esm/together/components/molecules/cardAuthor/authorBadgeItem/index.styles.d.ts +8 -0
  71. package/build/esm/together/components/molecules/cardAuthor/context.d.ts +13 -0
  72. package/build/esm/together/components/molecules/cardAuthor/displayName.d.ts +2 -0
  73. package/build/esm/together/components/molecules/cardAuthor/index.d.ts +12 -13
  74. package/build/esm/together/components/molecules/cardAuthor/index.styles.d.ts +0 -1
  75. package/build/esm/together/interfaces/types.d.ts +6 -0
  76. package/build/esm/together.js +1 -1
  77. package/build/esm/{types-65d7416d.js → types-8e137b89.js} +202 -202
  78. package/build/esm/{types-b1b4d47c.js → types-a8c76d05.js} +22 -22
  79. package/build/esm/types.js +1 -1
  80. package/build/esm/useCategory-21a9ba33.js +1 -0
  81. package/build/esm/{useHealthToolCache-251daff3.js → useHealthToolCache-148be933.js} +1 -1
  82. package/build/esm/{usePlacesAutocomplete-4a1e0e57.js → usePlacesAutocomplete-96e52ce9.js} +1 -1
  83. package/build/esm/useTranslations-78d82c21.js +1 -0
  84. package/build/esm/{utils-f11e41fe.js → utils-3e125f1e.js} +2 -2
  85. package/build/esm/utils-5af9dad1.js +1 -0
  86. package/build/esm/{utils-0f6dd8a5.js → utils-f842970f.js} +1 -1
  87. package/build/esm/vaccination.js +3 -3
  88. package/build/footer.js +1 -1
  89. package/build/gAssets.js +1 -1
  90. package/build/{getDynamicHealthTool-c60e68fa.js → getDynamicHealthTool-c3acf06a.js} +1 -1
  91. package/build/{getSocialList-630891ed.js → getSocialList-3e010454.js} +1 -1
  92. package/build/hooks.js +1 -1
  93. package/build/i18n.js +1 -1
  94. package/build/i18nV2.js +1 -1
  95. package/build/{index-84d7415b.js → index-046ee378.js} +3 -3
  96. package/build/{index-ea138477.js → index-14cdaffe.js} +1 -1
  97. package/build/{index-c9f86bff.js → index-222727c4.js} +171 -171
  98. package/build/{index-98bbfe57.js → index-296a0b5b.js} +1 -1
  99. package/build/index-2deaed20.js +113 -0
  100. package/build/{index-7d061022.js → index-30443c6e.js} +1 -1
  101. package/build/{index-c3fd1632.js → index-3f91ded6.js} +1 -1
  102. package/build/{index-3ead4f3b.js → index-48bcbf86.js} +1 -1
  103. package/build/{index-2ef72538.js → index-6f106161.js} +1 -1
  104. package/build/index-7feececd.js +1 -0
  105. package/build/{index-af31de20.js → index-80fbf9a2.js} +1 -1
  106. package/build/{index-03f3ee56.js → index-8199c76f.js} +1 -1
  107. package/build/{index-c070fdfc.js → index-86439785.js} +1 -1
  108. package/build/index-ae905846.js +1 -0
  109. package/build/{index-03b6e1bc.js → index-ba567cf6.js} +1 -1
  110. package/build/{index-61501e74.js → index-bbdde6e0.js} +1 -1
  111. package/build/{index-4af93720.js → index-e0c87872.js} +1 -1
  112. package/build/{index-be9cca2e.js → index-e4d32d14.js} +1 -1
  113. package/build/{index-8da5271e.js → index-eca857bd.js} +1 -1
  114. package/build/{index-3893e92a.js → index-f39724a1.js} +2 -2
  115. package/build/{index-fec5e458.js → index-f6cc5b05.js} +2 -2
  116. package/build/index-fecb8f45.js +2748 -0
  117. package/build/{index-4b4621fc.js → index-ffd92aea.js} +1 -1
  118. package/build/index.js +1 -1
  119. package/build/{index.styled-c87d00c0.js → index.styled-3811edd9.js} +1 -1
  120. package/build/{index.styles-0f69a584.js → index.styles-b34ee290.js} +5 -5
  121. package/build/lead/index.d.ts +2 -1
  122. package/build/lead.js +1 -1
  123. package/build/mantine.js +1 -1
  124. package/build/misc.js +1 -1
  125. package/build/navigation.js +1 -1
  126. package/build/onboardingV2.js +1 -1
  127. package/build/pwg.js +1 -1
  128. package/build/{routing-2fc7c708.js → routing-29d56eb6.js} +1 -1
  129. package/build/subot.js +1 -1
  130. package/build/together/components/atoms/cardReactions/element/index.d.ts +6 -5
  131. package/build/together/components/atoms/cardReactions/index.d.ts +3 -3
  132. package/build/together/components/molecules/cardAuthor/authorBadgeItem/index.d.ts +3 -0
  133. package/build/together/components/molecules/cardAuthor/authorBadgeItem/index.styles.d.ts +8 -0
  134. package/build/together/components/molecules/cardAuthor/context.d.ts +13 -0
  135. package/build/together/components/molecules/cardAuthor/displayName.d.ts +2 -0
  136. package/build/together/components/molecules/cardAuthor/index.d.ts +12 -13
  137. package/build/together/components/molecules/cardAuthor/index.styles.d.ts +0 -1
  138. package/build/together/interfaces/types.d.ts +6 -0
  139. package/build/together.js +1 -1
  140. package/build/{types-9c499972.js → types-341cbbd1.js} +1 -1
  141. package/build/{types-7e10aa4b.js → types-760db918.js} +70 -70
  142. package/build/types.js +1 -1
  143. package/build/useCategory-d3020719.js +1 -0
  144. package/build/{useHealthToolCache-26767afb.js → useHealthToolCache-728f118d.js} +1 -1
  145. package/build/{usePlacesAutocomplete-df148a7c.js → usePlacesAutocomplete-07a7b610.js} +1 -1
  146. package/build/useTranslations-d2cbefef.js +1 -0
  147. package/build/utils-1a351432.js +1 -0
  148. package/build/{utils-7b0b950b.js → utils-90cf77ff.js} +1 -1
  149. package/build/{utils-2424ad70.js → utils-af90797a.js} +1 -1
  150. package/build/vaccination.js +1 -1
  151. package/package.json +5 -3
  152. package/build/esm/getDynamicHealthTool-ae9dd594.js +0 -1
  153. package/build/esm/index-0e0b9e2d.js +0 -2748
  154. package/build/esm/index-8389442a.js +0 -1
  155. package/build/esm/index-a7a6f2f8.js +0 -1
  156. package/build/esm/index-c83e2c6d.js +0 -1
  157. package/build/esm/index-d0c1cd58.js +0 -113
  158. package/build/esm/index-e119a401.js +0 -1
  159. package/build/esm/useCategory-285c8929.js +0 -1
  160. package/build/esm/useTranslations-71150e1d.js +0 -1
  161. package/build/esm/useUniqueId-871437b9.js +0 -1
  162. package/build/esm/utils-b83897f9.js +0 -1
  163. package/build/index-33839bf2.js +0 -1
  164. package/build/index-65b1d890.js +0 -113
  165. package/build/index-6853c2df.js +0 -1
  166. package/build/index-6f3496ec.js +0 -2748
  167. package/build/index-cdf8d22b.js +0 -1
  168. package/build/useCategory-e37a5113.js +0 -1
  169. package/build/useTranslations-498d106f.js +0 -1
  170. package/build/useUniqueId-dcfc3871.js +0 -1
  171. package/build/utils-f53640d1.js +0 -1
  172. /package/build/{BMI_BOYS.percentile.monthly-7c1f442a.js → BMI_BOYS.percentile.monthly-dc83dcf5.js} +0 -0
  173. /package/build/{BMI_BOYS.percentile.weekly-f35471bd.js → BMI_BOYS.percentile.weekly-e3dff055.js} +0 -0
  174. /package/build/{BMI_BOYS.percentile.yearly-747fddc8.js → BMI_BOYS.percentile.yearly-7b400a2c.js} +0 -0
  175. /package/build/{BMI_BOYS.zscore.monthly-40ffab15.js → BMI_BOYS.zscore.monthly-22e88be5.js} +0 -0
  176. /package/build/{BMI_BOYS.zscore.weekly-2558df4d.js → BMI_BOYS.zscore.weekly-7254d38e.js} +0 -0
  177. /package/build/{BMI_BOYS.zscore.yearly-c50b7daf.js → BMI_BOYS.zscore.yearly-0ce1987c.js} +0 -0
  178. /package/build/{BMI_GIRLS.percentile.monthly-930cc7b0.js → BMI_GIRLS.percentile.monthly-8f29513e.js} +0 -0
  179. /package/build/{BMI_GIRLS.percentile.weekly-abfe88eb.js → BMI_GIRLS.percentile.weekly-b13d593f.js} +0 -0
  180. /package/build/{BMI_GIRLS.percentile.yearly-ddb2fc4b.js → BMI_GIRLS.percentile.yearly-53368595.js} +0 -0
  181. /package/build/{BMI_GIRLS.zscore.monthly-b07dabad.js → BMI_GIRLS.zscore.monthly-a453df29.js} +0 -0
  182. /package/build/{BMI_GIRLS.zscore.weekly-7ff3b728.js → BMI_GIRLS.zscore.weekly-6a5afb2f.js} +0 -0
  183. /package/build/{BMI_GIRLS.zscore.yearly-23e39370.js → BMI_GIRLS.zscore.yearly-7e400eed.js} +0 -0
  184. /package/build/{ChevronDown-60dfaf68.js → ChevronDown-e3a06b59.js} +0 -0
  185. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-49ee9158.js → HEAD CIRCUM_BOYS.percentile.monthly-3bf214c5.js} +0 -0
  186. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-3212dfa3.js → HEAD CIRCUM_BOYS.percentile.weekly-10c63505.js} +0 -0
  187. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-a0bbf6a0.js → HEAD CIRCUM_BOYS.percentile.yearly-ec027f7c.js} +0 -0
  188. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-e091094c.js → HEAD CIRCUM_BOYS.zscore.monthly-4b2f4e10.js} +0 -0
  189. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-833459f8.js → HEAD CIRCUM_BOYS.zscore.weekly-5a6c7eed.js} +0 -0
  190. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-1cfbeac4.js → HEAD CIRCUM_BOYS.zscore.yearly-c6d5d99a.js} +0 -0
  191. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-9849f834.js → HEAD CIRCUM_GIRLS.percentile.monthly-f38e143e.js} +0 -0
  192. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-5cb8c830.js → HEAD CIRCUM_GIRLS.percentile.weekly-961e9398.js} +0 -0
  193. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-f57b40e9.js → HEAD CIRCUM_GIRLS.percentile.yearly-fb89c9d5.js} +0 -0
  194. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-79102211.js → HEAD CIRCUM_GIRLS.zscore.monthly-f4be59eb.js} +0 -0
  195. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-4320a2b5.js → HEAD CIRCUM_GIRLS.zscore.weekly-b1435610.js} +0 -0
  196. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-d122a505.js → HEAD CIRCUM_GIRLS.zscore.yearly-44f4bf7e.js} +0 -0
  197. /package/build/{HEIGHT_BOYS.percentile.monthly-246e47a4.js → HEIGHT_BOYS.percentile.monthly-9d116dae.js} +0 -0
  198. /package/build/{HEIGHT_BOYS.percentile.weekly-df1d3933.js → HEIGHT_BOYS.percentile.weekly-af5e9330.js} +0 -0
  199. /package/build/{HEIGHT_BOYS.percentile.yearly-2cf03f10.js → HEIGHT_BOYS.percentile.yearly-84c68900.js} +0 -0
  200. /package/build/{HEIGHT_BOYS.zscore.monthly-35d6ff9d.js → HEIGHT_BOYS.zscore.monthly-3f6f7a60.js} +0 -0
  201. /package/build/{HEIGHT_BOYS.zscore.weekly-e5b11239.js → HEIGHT_BOYS.zscore.weekly-191d8a50.js} +0 -0
  202. /package/build/{HEIGHT_BOYS.zscore.yearly-5055ffc2.js → HEIGHT_BOYS.zscore.yearly-9e6a420d.js} +0 -0
  203. /package/build/{HEIGHT_GIRLS.percentile.monthly-b557c0ed.js → HEIGHT_GIRLS.percentile.monthly-edbe76b4.js} +0 -0
  204. /package/build/{HEIGHT_GIRLS.percentile.weekly-287247ba.js → HEIGHT_GIRLS.percentile.weekly-9656f527.js} +0 -0
  205. /package/build/{HEIGHT_GIRLS.percentile.yearly-cd0e7ffc.js → HEIGHT_GIRLS.percentile.yearly-d5e9646f.js} +0 -0
  206. /package/build/{HEIGHT_GIRLS.zscore.monthly-33433a04.js → HEIGHT_GIRLS.zscore.monthly-7962a30f.js} +0 -0
  207. /package/build/{HEIGHT_GIRLS.zscore.weekly-57e0bc18.js → HEIGHT_GIRLS.zscore.weekly-00091ba0.js} +0 -0
  208. /package/build/{HEIGHT_GIRLS.zscore.yearly-c8cacc57.js → HEIGHT_GIRLS.zscore.yearly-3f3bdcf2.js} +0 -0
  209. /package/build/{Subot-52e94ede.js → Subot-da4770e7.js} +0 -0
  210. /package/build/{Visible-8835941a.js → Visible-bbf989e9.js} +0 -0
  211. /package/build/{WEIGHT_BOYS.percentile.monthly-3917215a.js → WEIGHT_BOYS.percentile.monthly-0efda3d8.js} +0 -0
  212. /package/build/{WEIGHT_BOYS.percentile.weekly-6eb9a56d.js → WEIGHT_BOYS.percentile.weekly-da0ea954.js} +0 -0
  213. /package/build/{WEIGHT_BOYS.percentile.yearly-29731535.js → WEIGHT_BOYS.percentile.yearly-f6da0f3e.js} +0 -0
  214. /package/build/{WEIGHT_BOYS.zscore.monthly-e3123910.js → WEIGHT_BOYS.zscore.monthly-69b7c7f8.js} +0 -0
  215. /package/build/{WEIGHT_BOYS.zscore.weekly-694662de.js → WEIGHT_BOYS.zscore.weekly-288a675a.js} +0 -0
  216. /package/build/{WEIGHT_BOYS.zscore.yearly-0f990dad.js → WEIGHT_BOYS.zscore.yearly-74aa3f11.js} +0 -0
  217. /package/build/{WEIGHT_GIRLS.percentile.monthly-241403dd.js → WEIGHT_GIRLS.percentile.monthly-c507c65f.js} +0 -0
  218. /package/build/{WEIGHT_GIRLS.percentile.weekly-137b3467.js → WEIGHT_GIRLS.percentile.weekly-f08c1806.js} +0 -0
  219. /package/build/{WEIGHT_GIRLS.percentile.yearly-e9aecc7d.js → WEIGHT_GIRLS.percentile.yearly-65e7c887.js} +0 -0
  220. /package/build/{WEIGHT_GIRLS.zscore.monthly-2cff2183.js → WEIGHT_GIRLS.zscore.monthly-545572f3.js} +0 -0
  221. /package/build/{WEIGHT_GIRLS.zscore.weekly-0bfd7674.js → WEIGHT_GIRLS.zscore.weekly-0eb78b8f.js} +0 -0
  222. /package/build/{WEIGHT_GIRLS.zscore.yearly-9c0a3370.js → WEIGHT_GIRLS.zscore.yearly-f82147f8.js} +0 -0
  223. /package/build/{animation-ce2ee519.js → animation-6d0e530d.js} +0 -0
  224. /package/build/{cookieHelper-1bbbf79c.js → cookieHelper-7d59b3e7.js} +0 -0
  225. /package/build/esm/{BMI_BOYS.percentile.monthly-c4a97c9a.js → BMI_BOYS.percentile.monthly-d5a8dcff.js} +0 -0
  226. /package/build/esm/{BMI_BOYS.percentile.weekly-6339f482.js → BMI_BOYS.percentile.weekly-54a95b85.js} +0 -0
  227. /package/build/esm/{BMI_BOYS.percentile.yearly-8c1ca6e2.js → BMI_BOYS.percentile.yearly-d2d8b110.js} +0 -0
  228. /package/build/esm/{BMI_BOYS.zscore.monthly-3a5c8b0d.js → BMI_BOYS.zscore.monthly-0bd50ff3.js} +0 -0
  229. /package/build/esm/{BMI_BOYS.zscore.weekly-97453c11.js → BMI_BOYS.zscore.weekly-c8593da1.js} +0 -0
  230. /package/build/esm/{BMI_BOYS.zscore.yearly-d9b1265b.js → BMI_BOYS.zscore.yearly-d5005236.js} +0 -0
  231. /package/build/esm/{BMI_GIRLS.percentile.monthly-c05fdcd4.js → BMI_GIRLS.percentile.monthly-e3884907.js} +0 -0
  232. /package/build/esm/{BMI_GIRLS.percentile.weekly-18663de0.js → BMI_GIRLS.percentile.weekly-1ed13a41.js} +0 -0
  233. /package/build/esm/{BMI_GIRLS.percentile.yearly-2f551a4c.js → BMI_GIRLS.percentile.yearly-e718de5e.js} +0 -0
  234. /package/build/esm/{BMI_GIRLS.zscore.monthly-9a5c1809.js → BMI_GIRLS.zscore.monthly-358d226f.js} +0 -0
  235. /package/build/esm/{BMI_GIRLS.zscore.weekly-23e3fe35.js → BMI_GIRLS.zscore.weekly-fcedba22.js} +0 -0
  236. /package/build/esm/{BMI_GIRLS.zscore.yearly-02d624e8.js → BMI_GIRLS.zscore.yearly-9ca47d29.js} +0 -0
  237. /package/build/esm/{ChevronDown-bd411290.js → ChevronDown-cc35428e.js} +0 -0
  238. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-6a86e966.js → HEAD CIRCUM_BOYS.percentile.monthly-f7558c8b.js} +0 -0
  239. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-99b4a304.js → HEAD CIRCUM_BOYS.percentile.weekly-7bc35bee.js} +0 -0
  240. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-af69640c.js → HEAD CIRCUM_BOYS.percentile.yearly-77357f85.js} +0 -0
  241. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-d5a7fdb7.js → HEAD CIRCUM_BOYS.zscore.monthly-2714257f.js} +0 -0
  242. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-cdcc57d4.js → HEAD CIRCUM_BOYS.zscore.weekly-62058fcf.js} +0 -0
  243. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-1c6c655f.js → HEAD CIRCUM_BOYS.zscore.yearly-65649b30.js} +0 -0
  244. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-a4c62c65.js → HEAD CIRCUM_GIRLS.percentile.monthly-2e8f844b.js} +0 -0
  245. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-72020f04.js → HEAD CIRCUM_GIRLS.percentile.weekly-28edfa4f.js} +0 -0
  246. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-493f7cf8.js → HEAD CIRCUM_GIRLS.percentile.yearly-763567ce.js} +0 -0
  247. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-066536b9.js → HEAD CIRCUM_GIRLS.zscore.monthly-cf6bb939.js} +0 -0
  248. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-943658b2.js → HEAD CIRCUM_GIRLS.zscore.weekly-d6db86f2.js} +0 -0
  249. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-15ea58ed.js → HEAD CIRCUM_GIRLS.zscore.yearly-bd3add5c.js} +0 -0
  250. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-1e25737a.js → HEIGHT_BOYS.percentile.monthly-33050dfa.js} +0 -0
  251. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-f8c953c4.js → HEIGHT_BOYS.percentile.weekly-790dde30.js} +0 -0
  252. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-9f8f36d6.js → HEIGHT_BOYS.percentile.yearly-24a1ba96.js} +0 -0
  253. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-22dc00c5.js → HEIGHT_BOYS.zscore.monthly-68f937ad.js} +0 -0
  254. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-c7a8ae2b.js → HEIGHT_BOYS.zscore.weekly-5aafe365.js} +0 -0
  255. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-12815978.js → HEIGHT_BOYS.zscore.yearly-ffefa912.js} +0 -0
  256. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-2833c123.js → HEIGHT_GIRLS.percentile.monthly-72e94858.js} +0 -0
  257. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-0daf9f5b.js → HEIGHT_GIRLS.percentile.weekly-ce075c84.js} +0 -0
  258. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-4789a7e7.js → HEIGHT_GIRLS.percentile.yearly-ac92e23f.js} +0 -0
  259. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-de7243f8.js → HEIGHT_GIRLS.zscore.monthly-ea49be8c.js} +0 -0
  260. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-4918bb2a.js → HEIGHT_GIRLS.zscore.weekly-59da335b.js} +0 -0
  261. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-d4fd8ddd.js → HEIGHT_GIRLS.zscore.yearly-b16bfb36.js} +0 -0
  262. /package/build/esm/{Subot-56771801.js → Subot-e1ee8861.js} +0 -0
  263. /package/build/esm/{Visible-ace89781.js → Visible-5984bb59.js} +0 -0
  264. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-264f8b1e.js → WEIGHT_BOYS.percentile.monthly-15ee1673.js} +0 -0
  265. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-b4944551.js → WEIGHT_BOYS.percentile.weekly-fc4985d2.js} +0 -0
  266. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-a8c6c2be.js → WEIGHT_BOYS.percentile.yearly-7fa505f0.js} +0 -0
  267. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-4e623320.js → WEIGHT_BOYS.zscore.monthly-d56eab98.js} +0 -0
  268. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-1555670e.js → WEIGHT_BOYS.zscore.weekly-1d371a78.js} +0 -0
  269. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-b26402ba.js → WEIGHT_BOYS.zscore.yearly-d87e6880.js} +0 -0
  270. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-984185a1.js → WEIGHT_GIRLS.percentile.monthly-6f53bf1d.js} +0 -0
  271. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-b0e99fd4.js → WEIGHT_GIRLS.percentile.weekly-caa0cf1b.js} +0 -0
  272. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-893995ec.js → WEIGHT_GIRLS.percentile.yearly-4c1432b0.js} +0 -0
  273. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-8dc61ee2.js → WEIGHT_GIRLS.zscore.monthly-1628b4dd.js} +0 -0
  274. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-fe211553.js → WEIGHT_GIRLS.zscore.weekly-b240946e.js} +0 -0
  275. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-87882127.js → WEIGHT_GIRLS.zscore.yearly-f360fff3.js} +0 -0
  276. /package/build/esm/{animation-3f2b6f75.js → animation-70b8e1f2.js} +0 -0
  277. /package/build/esm/{cookieHelper-0c215a0b.js → cookieHelper-2017148d.js} +0 -0
  278. /package/build/esm/{index-7f1f7516.js → index-754b44fc.js} +0 -0
  279. /package/build/esm/{index-576a616c.js → index-86e92cc0.js} +0 -0
  280. /package/build/esm/{index-fa5073f3.js → index-cf6580dd.js} +0 -0
  281. /package/build/esm/{isProduction-6599ce88.js → isProduction-9fe75b7e.js} +0 -0
  282. /package/build/esm/{localizeNumberFormat-28d92a62.js → localizeNumberFormat-cd2532b2.js} +0 -0
  283. /package/build/esm/{normalizeLink-7c303f96.js → normalizeLink-bae43899.js} +0 -0
  284. /package/build/esm/{number-d5c1e150.js → number-07ae3046.js} +0 -0
  285. /package/build/esm/{paths-a1da3d54.js → paths-be7ff55f.js} +0 -0
  286. /package/build/esm/{theme-23782329.js → theme-dab2950f.js} +0 -0
  287. /package/build/esm/{translationsContext-5ab0d4b4.js → translationsContext-5a2101f0.js} +0 -0
  288. /package/build/esm/{tslib.es6-2cb84ad8.js → tslib.es6-16e6bdc9.js} +0 -0
  289. /package/build/esm/{types-69671356.js → types-27d242a7.js} +0 -0
  290. /package/build/esm/{useIsInit-f38f0d5c.js → useIsInit-aa198cba.js} +0 -0
  291. /package/build/esm/{useOutsideClick-f050c073.js → useOutsideClick-a88e81d5.js} +0 -0
  292. /package/build/esm/{useScrollbarSize-7f0be029.js → useScrollbarSize-81850e48.js} +0 -0
  293. /package/build/esm/{utils-1ad4f186.js → utils-f69a5c66.js} +0 -0
  294. /package/build/{index-ba62d856.js → index-49020afd.js} +0 -0
  295. /package/build/{index-aaeccb69.js → index-5caececd.js} +0 -0
  296. /package/build/{index-0790d5ae.js → index-d725f995.js} +0 -0
  297. /package/build/{isProduction-9e0e9225.js → isProduction-5ee9440e.js} +0 -0
  298. /package/build/{localizeNumberFormat-c501510d.js → localizeNumberFormat-d05fe4e0.js} +0 -0
  299. /package/build/{normalizeLink-91646273.js → normalizeLink-069cc041.js} +0 -0
  300. /package/build/{number-21ab8a99.js → number-b3bfb023.js} +0 -0
  301. /package/build/{paths-99000104.js → paths-24d6890e.js} +0 -0
  302. /package/build/{theme-533eba85.js → theme-571f5130.js} +0 -0
  303. /package/build/{translationsContext-b64cc287.js → translationsContext-dfb5d88d.js} +0 -0
  304. /package/build/{tslib.es6-0476eed4.js → tslib.es6-94b275ba.js} +0 -0
  305. /package/build/{types-5c712d9e.js → types-bf4f47c3.js} +0 -0
  306. /package/build/{useIsInit-2a888094.js → useIsInit-4db83cec.js} +0 -0
  307. /package/build/{useOutsideClick-3b96ab2e.js → useOutsideClick-51ce49df.js} +0 -0
  308. /package/build/{useScrollbarSize-bd02c351.js → useScrollbarSize-2e658fb6.js} +0 -0
  309. /package/build/{utils-381e90c1.js → utils-f2321c70.js} +0 -0
@@ -1 +1 @@
1
- export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-49571e2c.js";import"./tslib.es6-2cb84ad8.js";import"react";import"./index-e119a401.js";import"./index-7bc42cef.js";import"./index-11ddf8b9.js";import"date-fns/locale";import"./Subot-56771801.js";import"./isProduction-6599ce88.js";import"./index-d0c1cd58.js";import"@mantine/core";import"@mantine/hooks";import"./theme-23782329.js";import"dayjs";import"./utils-1ad4f186.js";import"styled-components";import"@mantine/carousel";import"./Plus-f7c5618a.js";import"classnames";import"./useUniqueId-871437b9.js";import"./normalizeLink-7c303f96.js";import"./routing-c72cf84b.js";import"./index-3fcc7de2.js";import"./utils-f11e41fe.js";import"./cookieHelper-0c215a0b.js";import"slugify";import"string-format";import"./index-cbeaabc6.js";import"./utils-0f6dd8a5.js";import"./useTranslations-71150e1d.js";import"./translationsContext-5ab0d4b4.js";import"lodash/throttle";import"@mantine/dates";import"./constants-0025e49b.js";import"./index-c83e2c6d.js";import"./WhatsApp-712a2952.js";import"./index.styles-3ff4ce8e.js";import"./constants-2b9cc123.js";import"./animation-3f2b6f75.js";import"react-keyed-flatten-children";import"./ChevronDown-bd411290.js";import"./index-ac8ebb4a.js";import"./index-0aa85299.js";import"./useIsInit-f38f0d5c.js";import"./index.styled-f2aff174.js";import"./index-7f1f7516.js";import"dayjs/plugin/relativeTime";import"./index-576a616c.js";import"lodash/debounce";import"./core-7df57a7b.js";
1
+ export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-cce4d6b6.js";import"./tslib.es6-16e6bdc9.js";import"react";import"./index-0ce3ea30.js";import"@mantine/core";import"@mantine/hooks";import"./theme-dab2950f.js";import"./index-5222461b.js";import"./index-1c858659.js";import"date-fns/locale";import"./Subot-e1ee8861.js";import"./isProduction-9fe75b7e.js";import"dayjs";import"./utils-f69a5c66.js";import"styled-components";import"@mantine/carousel";import"./Plus-0795a68c.js";import"classnames";import"./useTranslations-78d82c21.js";import"./translationsContext-5a2101f0.js";import"string-format";import"./normalizeLink-bae43899.js";import"./routing-7c6d65ae.js";import"./index-5db9b9d7.js";import"./utils-3e125f1e.js";import"./cookieHelper-2017148d.js";import"slugify";import"./index-bfb36e6c.js";import"./utils-f842970f.js";import"lodash/throttle";import"@mantine/dates";import"./constants-7b7e7784.js";import"./index-36467b48.js";import"./WhatsApp-c7fd561d.js";import"./index.styles-fa4052da.js";import"./constants-d7aa1c1c.js";import"./animation-70b8e1f2.js";import"react-keyed-flatten-children";import"./ChevronDown-cc35428e.js";import"./index-ed7346f2.js";import"./index-47ab8d3d.js";import"./useIsInit-aa198cba.js";import"./index.styled-500647b4.js";import"./index-754b44fc.js";import"dayjs/plugin/relativeTime";import"./index-86e92cc0.js";import"lodash/debounce";import"./core-87a3d383.js";
@@ -1,4 +1,4 @@
1
- import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{Box as d,Input as c,Grid as p,Title as u,Container as g,Flex as b,rem as h,Stack as E,AspectRatio as f}from"@mantine/core";import{P as L,d as v,R as y,O as C,e as x,u as w,B as S}from"./index-d0c1cd58.js";import"@mantine/dates";import{L as j}from"./index-11ddf8b9.js";import"./Subot-56771801.js";import{C as P}from"./index-7bc42cef.js";import{T as O}from"./Plus-f7c5618a.js";import{t as k}from"./theme-23782329.js";import"./translationsContext-5ab0d4b4.js";import"string-format";import{useInterval as F,useCounter as B}from"@mantine/hooks";import{M as z,a as N}from"./utils-1ad4f186.js";import{M as T,h as I}from"./utils-b83897f9.js";export{M as MAPPED_LOCALE}from"./utils-b83897f9.js";import{createFormContext as D,yupResolver as A}from"@mantine/form";import Z from"styled-components";import{_,a as q}from"./tslib.es6-2cb84ad8.js";import{H as V}from"./index.styles-3ff4ce8e.js";import"./constants-2b9cc123.js";import{L as $}from"./utils-0f6dd8a5.js";import{u as H}from"./useTranslations-71150e1d.js";import"./WhatsApp-712a2952.js";import"./index.styled-f2aff174.js";import"./index-7f1f7516.js";import"./utils-f11e41fe.js";import*as W from"yup";import{D as U}from"./index-ef286146.js";import{A as Y}from"./index-bd890b36.js";import{V as R}from"./Visible-ace89781.js";import{createPortal as G}from"react-dom";import{I as K}from"./index-c83e2c6d.js";import J from"lodash/throttle";import{B as Q}from"./index-ac8ebb4a.js";import{T as X}from"./index-8389442a.js";import{format as ee}from"date-fns";import te from"react-keyed-flatten-children";import"dayjs";import"@mantine/carousel";import"classnames";import"date-fns/locale";import"./isProduction-6599ce88.js";import"./animation-3f2b6f75.js";import"./cookieHelper-0c215a0b.js";import"slugify";import"./useUniqueId-871437b9.js";const ne=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[re,oe,ae]=D(),ie=Z(d)`
1
+ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle as o,useState as a,useRef as i,useEffect as l,useMemo as s,Fragment as m}from"react";import{Box as d,Input as c,Grid as p,Title as u,Container as g,Flex as b,rem as h,Stack as E,AspectRatio as f}from"@mantine/core";import{P as L,d as v,R as y,O as C,e as x,u as w,B as S}from"./index-0ce3ea30.js";import"@mantine/dates";import{L as j}from"./index-1c858659.js";import"./Subot-e1ee8861.js";import{C as P}from"./index-5222461b.js";import{T as O}from"./Plus-0795a68c.js";import{t as k}from"./theme-dab2950f.js";import"./translationsContext-5a2101f0.js";import"string-format";import{useInterval as F,useCounter as B}from"@mantine/hooks";import{M as z,a as N}from"./utils-f69a5c66.js";import{M as T,h as I}from"./utils-5af9dad1.js";export{M as MAPPED_LOCALE}from"./utils-5af9dad1.js";import{createFormContext as D,yupResolver as A}from"@mantine/form";import Z from"styled-components";import{_,a as V}from"./tslib.es6-16e6bdc9.js";import{H as q}from"./index.styles-fa4052da.js";import"./constants-d7aa1c1c.js";import{L as $}from"./utils-f842970f.js";import{u as H}from"./useTranslations-78d82c21.js";import"./WhatsApp-c7fd561d.js";import"./index.styled-500647b4.js";import"./index-754b44fc.js";import"./utils-3e125f1e.js";import*as W from"yup";import{D as U}from"./index-417dbb92.js";import{A as Y}from"./index-4fa69484.js";import{V as R}from"./Visible-5984bb59.js";import{createPortal as G}from"react-dom";import{I as K}from"./index-36467b48.js";import J from"lodash/throttle";import{B as Q}from"./index-ed7346f2.js";import{T as X}from"./index-404bb127.js";import{format as ee}from"date-fns";import te from"react-keyed-flatten-children";import"dayjs";import"@mantine/carousel";import"classnames";import"date-fns/locale";import"./isProduction-9fe75b7e.js";import"./animation-70b8e1f2.js";import"./cookieHelper-2017148d.js";import"slugify";const ne=t({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[re,oe,ae]=D(),ie=Z(d)`
2
2
  .phone-input {
3
3
  width: 100%;
4
4
  margin-bottom: 32px;
@@ -15,7 +15,7 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
15
15
  border-radius: 0 4px 4px 0;
16
16
  }
17
17
  }
18
- `,le=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=_(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=H(),s=a||oe(),m={phone:t=>{var{label:n,name:o="phone"}=t,a=_(t,["label","name"]);return e.createElement(c.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(L,Object.assign({defaultCountry:T[process.env.UNIFY_LOCALE]||"VN"},s.getInputProps(o),a)),e.createElement(c.Error,{size:"md"},s.errors.phone))},full_name:t=>{var{label:n,name:r="name"}=t,o=_(t,["label","name"]);return e.createElement(v,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(r),o))},email:t=>{var{label:n,name:r="email"}=t,o=_(t,["label","name"]);return e.createElement(v,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(r),o))},dob:t=>{var{label:n,name:r="dob"}=t,o=_(t,["label","name"]);return e.createElement(U,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(r),o))},gender:t=>{var{label:n,name:r="gender"}=t,o=_(t,["label","name"]);return e.createElement(y.Group,Object.assign({className:"radio-group",label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("tools.selectGender"))},s.getInputProps(r),o),e.createElement(y,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(y,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(C,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(t))),e.createElement(c.Error,null,s.errors.otp)),password:({label:t,name:n="password"})=>e.createElement(v.Password,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(R,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(v.Password,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(R,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(x,Object.assign({label:e.createElement(O,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},o)},s.getInputProps(t,{type:"checkbox"}),{error:null})),e.createElement(c.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:t=>{var{label:n,className:r="",name:o="address"}=t,a=_(t,["label","className","name"]);return e.createElement(Y,Object.assign({className:`${r} input-control`,label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.address"))},s.getInputProps(o),a))}},d=n.map((e=>{var t;const n="string"==typeof e?{inputType:e}:e;return null===(t=m[n.inputType])||void 0===t?void 0:t.call(m,n)}));return e.createElement(ie,Object.assign({},i),d)},se=e=>W.object().shape({phone:W.string().required(e("onboarding.updatePhone.error")).default(""),name:W.string().required(e("onboarding.errorMessage.requiredName")),email:W.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:W.mixed().required(e("onboarding.similac.address.error")),term:W.bool().oneOf([!0],e("onboarding.similac.term.error"))});var me=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:c,customFormTexts:p}=t,u=_(t,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:g,setSharedData:b,sharedData:h}=r(ne),{t:E}=H(),f=ae({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==s?void 0:s.phone)||"",email:(null==h?void 0:h.email)||(null==s?void 0:s.email)||"",name:(null==h?void 0:h.name)||(null==s?void 0:s.name)||""},validate:l||A(se(E))}),L=e=>q(void 0,void 0,void 0,(function*(){try{yield null==i?void 0:i(e),b((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),g()}catch(e){console.error(e)}})),v=e=>{console.log(e)},y=()=>{var e;return null===(e=f.onSubmit(L,v))||void 0===e?void 0:e()};return o(n,(()=>({submitForm:y}))),e.createElement(d,Object.assign({"data-active":m},u),e.createElement(d,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},e.createElement(d,{sx:{textAlign:"center"}},e.createElement(V,{tag:"h4",as:"h2"},null==p?void 0:p.heading),e.createElement(O,{size:"p3"},null==p?void 0:p.description)),e.createElement(re,{form:f},e.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:f.onSubmit(L,v)},e.createElement(d,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},e.createElement(le,{inputOrder:a,customTerms:c,className:"friso-form"}))))))}));const de=Z.div`
18
+ `,le=t=>{var{inputOrder:n=["phone"],withSimilac:r=!1,customTerms:o="",formContext:a}=t,i=_(t,["inputOrder","withSimilac","customTerms","formContext"]);const{t:l}=H(),s=a||oe(),m={phone:t=>{var{label:n,name:o="phone"}=t,a=_(t,["label","name"]);return e.createElement(c.Wrapper,{className:r?"input-control":"phone-input",withAsterisk:!0,label:n||r?e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.phone")):void 0},e.createElement(L,Object.assign({defaultCountry:T[process.env.UNIFY_LOCALE]||"VN"},s.getInputProps(o),a)),e.createElement(c.Error,{size:"md"},s.errors.phone))},full_name:t=>{var{label:n,name:r="name"}=t,o=_(t,["label","name"]);return e.createElement(v,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourName")),withAsterisk:!0},s.getInputProps(r),o))},email:t=>{var{label:n,name:r="email"}=t,o=_(t,["label","name"]);return e.createElement(v,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourEmail")),withAsterisk:!0},s.getInputProps(r),o))},dob:t=>{var{label:n,name:r="dob"}=t,o=_(t,["label","name"]);return e.createElement(U,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},s.getInputProps(r),o))},gender:t=>{var{label:n,name:r="gender"}=t,o=_(t,["label","name"]);return e.createElement(y.Group,Object.assign({className:"radio-group",label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("tools.selectGender"))},s.getInputProps(r),o),e.createElement(y,{value:"0",label:l("onboarding.formEmail.genderMale")}),e.createElement(y,{value:"1",label:l("onboarding.formEmail.genderFemale")}))},otp:({name:t="otp"})=>e.createElement("div",{className:"otp-input"},e.createElement(C,Object.assign({enterKeyHint:void 0,nonce:void 0},s.getInputProps(t))),e.createElement(c.Error,null,s.errors.otp)),password:({label:t,name:n="password"})=>e.createElement(v.Password,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:e.createElement(R,null)},s.getInputProps(n))),confirm_password:({label:t,name:n="confirmPassword"})=>e.createElement(v.Password,Object.assign({label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},t||l("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:e.createElement(R,null)},s.getInputProps(n))),term:({name:t="term",className:n=""})=>o?e.createElement("div",{style:{marginBottom:16},className:n},e.createElement(x,Object.assign({label:e.createElement(O,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},o)},s.getInputProps(t,{type:"checkbox"}),{error:null})),e.createElement(c.Error,{size:"md"},s.getInputProps("term",{type:"checkbox"}).error)):null,address:t=>{var{label:n,className:r="",name:o="address"}=t,a=_(t,["label","className","name"]);return e.createElement(Y,Object.assign({className:`${r} input-control`,label:e.createElement(O,{size:"s4",weight:"semiBold",as:"span"},n||l("onboarding.similac.input.address"))},s.getInputProps(o),a))}},d=n.map((e=>{var t;const n="string"==typeof e?{inputType:e}:e;return null===(t=m[n.inputType])||void 0===t?void 0:t.call(m,n)}));return e.createElement(ie,Object.assign({},i),d)},se=e=>W.object().shape({phone:W.string().required(e("onboarding.updatePhone.error")).default(""),name:W.string().required(e("onboarding.errorMessage.requiredName")),email:W.string().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:W.mixed().required(e("onboarding.similac.address.error")),term:W.bool().oneOf([!0],e("onboarding.similac.term.error"))});var me=n(((t,n)=>{var{inputOrder:a,onSubmit:i,validateSchema:l,defaultValues:s,isActive:m,customTerms:c,customFormTexts:p}=t,u=_(t,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);const{nextStep:g,setSharedData:b,sharedData:h}=r(ne),{t:E}=H(),f=ae({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==s?void 0:s.phone)||"",email:(null==h?void 0:h.email)||(null==s?void 0:s.email)||"",name:(null==h?void 0:h.name)||(null==s?void 0:s.name)||""},validate:l||A(se(E))}),L=e=>V(void 0,void 0,void 0,(function*(){try{yield null==i?void 0:i(e),b((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),g()}catch(e){console.error(e)}})),v=e=>{console.log(e)},y=()=>{var e;return null===(e=f.onSubmit(L,v))||void 0===e?void 0:e()};return o(n,(()=>({submitForm:y}))),e.createElement(d,Object.assign({"data-active":m},u),e.createElement(d,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},e.createElement(d,{sx:{textAlign:"center"}},e.createElement(q,{tag:"h4",as:"h2"},null==p?void 0:p.heading),e.createElement(O,{size:"p3"},null==p?void 0:p.description)),e.createElement(re,{form:f},e.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:f.onSubmit(L,v)},e.createElement(d,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},e.createElement(le,{inputOrder:a,customTerms:c,className:"friso-form"}))))))}));const de=Z.div`
19
19
  position: fixed;
20
20
  inset: 0;
21
21
  z-index: 1000;
@@ -282,4 +282,4 @@ import e,{createContext as t,forwardRef as n,useContext as r,useImperativeHandle
282
282
  &:not([data-active='true']) {
283
283
  display: none !important;
284
284
  }
285
- `,ze=e=>W.object().shape({password:W.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:W.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([W.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),Ne={Provider:({children:t,siteType:n,setSharedData:r})=>{const[o,i]=a(0),[s,m]=a(0),[d,c]=a({});return l((()=>{null==r||r(d)}),[d,r]),e.createElement(ne.Provider,{value:{currentStep:o,setCurrentStep:i,setMaxStep:m,nextStep:()=>o+1<=s&&i(o+1),prevStep:()=>o-1>=0&&i(o-1),siteType:n,isMarryBaby:"marryBaby"===n,sharedData:d,setSharedData:c}},t)},Modal:t=>{var{children:n,withSimilac:o,banner:a,withPortal:i}=t,l=_(t,["children","withSimilac","banner","withPortal"]);const{isMobile:s}=w(),{isMarryBaby:m}=r(ne),{t:d}=H();if(i&&"undefined"==typeof window)return null;const c=e.createElement(de,Object.assign({},l),e.createElement(ce,null,e.createElement(p,{sx:{[z.mbDown]:{margin:0},".mantine-Grid-col":{[z.mbDown]:{padding:0}}}},e.createElement(p.Col,{span:"object"!=typeof a&&!o||s?12:6,order:o?2:1,orderMd:o?1:2,sx:{zIndex:o?99:void 0}},e.createElement(pe,{"data-similac":o,"data-has-banner":"object"==typeof a},n)),a&&"object"==typeof a&&!o&&e.createElement(p.Col,{span:s?12:6,order:1,orderMd:2},e.createElement(ue,null,e.createElement(ge,{"data-is-marry-baby":m},e.createElement(be,null,a.heading&&e.createElement(u,{order:1,mb:24},a.heading),a.description&&e.createElement(O,{size:"p1",color:k.colors.gray800},d("onboarding.welcomeScreen.content"))),e.createElement(he,null,a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))),a&&"object"==typeof a&&o&&(a.imgSrc||a.imgComponent)&&e.createElement(p.Col,{span:"auto",order:1,orderMd:2},e.createElement(he,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?G(c,N()):c},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i,submitProps:l,submitLabel:s,skipProps:m,isWhatsApp:d})=>{const{t:c}=H(),{sharedData:p,setSharedData:u,nextStep:g}=r(ne),b=ae({initialValues:{phone:(null==p?void 0:p.phone)||""},validate:A(Ce(c))});return e.createElement(ye,{heading:(null==a?void 0:a.heading)||c("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||c(d?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":i},e.createElement(re,{form:b},e.createElement("form",{onSubmit:b.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{u((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),g()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["phone"]}),e.createElement(S,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},d&&{leftIcon:e.createElement(K.WhatsApp,{size:18,useCurrentColor:!0})},l,{type:"submit","data-event-category":d?"OTP":"Sign Up","data-event-action":d?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),s||c(d?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),o&&e.createElement(S,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},d&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},m,{onClick:t,type:"button"}),c("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:n,onResendCode:o,otpError:m,onClose:d,loading:c,canSkip:p})=>{const{sharedData:{email:u,retryEmailCount:g},setSharedData:b,prevStep:h,siteType:E,isMarryBaby:f,nextStep:L}=r(ne),v=n||u||"",[y,C]=a(30),x=F((()=>C((e=>e-1))),1e3),[w,S]=B(0,{min:0,max:3}),j=i(!0),{t:P}=H();l((()=>(x.start(),x.stop)),[]),l((()=>{0===y&&(x.stop(),j.current=!1)}),[y]);const M=ae({initialValues:{otp:""},validate:A(we(P))});l((()=>{m&&M.setFieldError("otp",m)}),[m]);const O=s((()=>J((()=>{j.current||(S.increment(),C(30),null==o||o(v),x.start(),j.current=!0)}),1e3,{trailing:!1})),[v,o,x]),z=g>=2;return e.createElement(xe,{heading:P("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:P("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${k.colors.gray800}">${I(v)}</b>`})}}),!z&&e.createElement("svg",{onClick:()=>{g>=2||(b((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),h())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(re,{form:M},e.createElement("form",{onSubmit:M.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{S.increment();!(yield null==t?void 0:t(e.otp))&&L()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(X,{size:"p4",color:k.colors.gray400},P("onboarding.otpForm.notReceiveOTP")),e.createElement(X,{as:"a",size:"p4",color:f?k.mbColors.pink:k.colors.primaryBase,onClick:O},P("onboarding.otpForm.resendCode",{seconds:y}))),e.createElement(Q,{theme:E,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:c,disabled:c,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},P("onboarding.button.continue")),p&&w>=3&&e.createElement(Q,{theme:E,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},P("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:c,canSkip:p,isWhatsApp:u})=>{const{sharedData:{phone:g,retryPhoneCount:E},setSharedData:f,prevStep:L,siteType:v,isMarryBaby:y,nextStep:C}=r(ne),x=n||g||"",[w,S]=a(30),j=F((()=>S((e=>e-1))),1e3),[M,z]=B(0,{min:0,max:3}),N=i(!0),{t:T}=H();l((()=>(j.start(),j.stop)),[]),l((()=>{0===w&&(j.stop(),N.current=!1)}),[w]);const I=ae({initialValues:{otp:""},validate:A(we(T))});l((()=>{m&&I.setFieldError("otp",m)}),[m]);const D=s((()=>J((()=>{N.current||(z.increment(),S(30),null==o||o(x),j.start(),N.current=!0)}),1e3,{trailing:!1})),[x,o,j]),Z=E>=2,_=`<b style="color:${k.colors.gray800}">${x.slice(0,-3).replace(/./g,"x").concat(x.slice(-3))}</b>`;return e.createElement(xe,{heading:u?e.createElement(b,{align:"center",justify:"center",gap:h(8)},e.createElement("img",{style:{width:h(24)},loading:"lazy",src:P.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),e.createElement("span",null,T("onboarding.otpWhatsapps.heading"))):T("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:T(u?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:_})}}),!Z&&e.createElement("svg",{onClick:()=>{E>=2||(f((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),L())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(re,{form:I},e.createElement("form",{onSubmit:I.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{z.increment();!(yield null==t?void 0:t(e.otp))&&C()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(O,{size:"p4",color:k.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),e.createElement(O,{as:"a",size:"p4",color:y?k.mbColors.pink:k.colors.primaryBase,onClick:D},T("onboarding.otpForm.resendCode",{seconds:w}))),e.createElement(Q,{theme:v,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:c,disabled:c,"data-event-category":u?"OTP":"Sign Up","data-event-action":u?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),p&&M>=3&&e.createElement(Q,{theme:v,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},T("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=H(),{siteType:c,isMarryBaby:p,setSharedData:u,nextStep:g}=r(ne),b=ae({validate:A(Se(m))});return l((()=>{b.setValues(Object.assign(Object.assign({gender:"0"},s),(null==s?void 0:s.birthday)&&{birthday:new Date(s.birthday)}))}),[s]),l((()=>{i&&b.setFieldError("email",i)}),[i]),e.createElement(Oe,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:p?"Marry Baby":j[d].SITE_NAME_FORMATTED})},e.createElement(re,{form:b},e.createElement("form",{className:"form",onSubmit:b.onSubmit((e=>q(void 0,void 0,void 0,(function*(){u((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")})))&&g()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(Q,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},m("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:n}=t,o=_(t,["onClose"]);const{t:a}=H(),{siteType:i}=r(ne);return e.createElement(Oe,Object.assign({},o),e.createElement(Q,{theme:i,size:"lg",onClick:n,className:"form-button"},a("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:o,canSkip:a=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:m}=t,d=_(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:c}=H(),{nextStep:p,setSharedData:u,sharedData:g}=r(ne),{isMobile:b}=w(),h=ae({initialValues:{term:!1,phone:(null==g?void 0:g.phone)||(null==s?void 0:s.phone)||"",email:(null==g?void 0:g.email)||(null==s?void 0:s.email)||"",name:(null==g?void 0:g.name)||(null==s?void 0:s.name)||""},validate:A(Fe(c,!l))}),E=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(ke,Object.assign({heading:(null==i?void 0:i.heading)||c("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||c("onboarding.updatePhone.description"),hiddenLogo:b,"data-active":m},d),e.createElement(re,{form:h},e.createElement("form",{style:{width:"100%"},onSubmit:h.onSubmit((e=>q(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),u((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),p()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:E,withSimilac:!0,customTerms:l}),e.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),a&&e.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},c("onboarding.button.skip")))))},FrisoForm:me,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=H(),{nextStep:s}=r(ne),m=ae({initialValues:{password:"",confirmPassword:""},validate:A(ze(l))});return e.createElement(Oe,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(re,{form:m},e.createElement("form",{className:"form",onSubmit:m.onSubmit((e=>q(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!a&&s()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["password","confirm_password"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(Q,{color:"ghost",isBlock:!0,size:"lg",onClick:t},l("onboarding.button.skip")),a&&e.createElement(c.Error,{className:"form-error"},a))))},StepRenderer:({children:t,onStepChange:n})=>{const{currentStep:o,setMaxStep:a}=r(ne),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,te(t).map(((t,n)=>{const r=n===o;return e.createElement(m,{key:n},e.isValidElement(t)?t.props.alwaysRender||r?e.cloneElement(t,{isActive:n===o,stepIndex:n}):null:r?t:null)})))},ThankYou:t=>{var{onClose:n,thanksPageInfo:r,isActive:o}=t,a=_(t,["onClose","thanksPageInfo","isActive"]);const{t:i}=H(),{isMobile:l}=w();return e.createElement(Be,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(g,{fluid:!0},e.createElement(E,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(f,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},e.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},e.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),e.createElement("g",{mask:"url(#mask0_4580_96805)"},e.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),e.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),e.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),e.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),e.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),e.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),e.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),e.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),e.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),e.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),e.createElement("defs",null,e.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},e.createElement("stop",{stopColor:"#C4C4C4"}),e.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),e.createElement(V,{tag:"h3"},null==r?void 0:r.title),e.createElement(O,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(S,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{le as DynamicForm,Ne as Onboarding,ne as OnboardingContext};
285
+ `,ze=e=>W.object().shape({password:W.string().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:W.string().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([W.ref("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),Ne={Provider:({children:t,siteType:n,setSharedData:r})=>{const[o,i]=a(0),[s,m]=a(0),[d,c]=a({});return l((()=>{null==r||r(d)}),[d,r]),e.createElement(ne.Provider,{value:{currentStep:o,setCurrentStep:i,setMaxStep:m,nextStep:()=>o+1<=s&&i(o+1),prevStep:()=>o-1>=0&&i(o-1),siteType:n,isMarryBaby:"marryBaby"===n,sharedData:d,setSharedData:c}},t)},Modal:t=>{var{children:n,withSimilac:o,banner:a,withPortal:i}=t,l=_(t,["children","withSimilac","banner","withPortal"]);const{isMobile:s}=w(),{isMarryBaby:m}=r(ne),{t:d}=H();if(i&&"undefined"==typeof window)return null;const c=e.createElement(de,Object.assign({},l),e.createElement(ce,null,e.createElement(p,{sx:{[z.mbDown]:{margin:0},".mantine-Grid-col":{[z.mbDown]:{padding:0}}}},e.createElement(p.Col,{span:"object"!=typeof a&&!o||s?12:6,order:o?2:1,orderMd:o?1:2,sx:{zIndex:o?99:void 0}},e.createElement(pe,{"data-similac":o,"data-has-banner":"object"==typeof a},n)),a&&"object"==typeof a&&!o&&e.createElement(p.Col,{span:s?12:6,order:1,orderMd:2},e.createElement(ue,null,e.createElement(ge,{"data-is-marry-baby":m},e.createElement(be,null,a.heading&&e.createElement(u,{order:1,mb:24},a.heading),a.description&&e.createElement(O,{size:"p1",color:k.colors.gray800},d("onboarding.welcomeScreen.content"))),e.createElement(he,null,a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))),a&&"object"==typeof a&&o&&(a.imgSrc||a.imgComponent)&&e.createElement(p.Col,{span:"auto",order:1,orderMd:2},e.createElement(he,{className:"similac"},a.imgSrc?e.createElement("img",{src:a.imgSrc,loading:"lazy"}):a.imgComponent?a.imgComponent:null)))));return i?G(c,N()):c},Form:({onClose:t,onSubmit:n,canSkip:o=!0,customFormTexts:a,isActive:i,submitProps:l,submitLabel:s,skipProps:m,isWhatsApp:d})=>{const{t:c}=H(),{sharedData:p,setSharedData:u,nextStep:g}=r(ne),b=ae({initialValues:{phone:(null==p?void 0:p.phone)||""},validate:A(Ce(c))});return e.createElement(ye,{heading:(null==a?void 0:a.heading)||c("onboarding.updatePhone.heading"),description:(null==a?void 0:a.description)||c(d?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":i},e.createElement(re,{form:b},e.createElement("form",{onSubmit:b.onSubmit((e=>V(void 0,void 0,void 0,(function*(){try{u((t=>Object.assign(Object.assign({},t),{phone:e.phone}))),yield null==n?void 0:n(e.phone),g()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["phone"]}),e.createElement(S,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},d&&{leftIcon:e.createElement(K.WhatsApp,{size:18,useCurrentColor:!0})},l,{type:"submit","data-event-category":d?"OTP":"Sign Up","data-event-action":d?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),s||c(d?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),o&&e.createElement(S,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},d&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},m,{onClick:t,type:"button"}),c("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:t,email:n,onResendCode:o,otpError:m,onClose:d,loading:c,canSkip:p})=>{const{sharedData:{email:u,retryEmailCount:g},setSharedData:b,prevStep:h,siteType:E,isMarryBaby:f,nextStep:L}=r(ne),v=n||u||"",[y,C]=a(30),x=F((()=>C((e=>e-1))),1e3),[w,S]=B(0,{min:0,max:3}),j=i(!0),{t:P}=H();l((()=>(x.start(),x.stop)),[]),l((()=>{0===y&&(x.stop(),j.current=!1)}),[y]);const M=ae({initialValues:{otp:""},validate:A(we(P))});l((()=>{m&&M.setFieldError("otp",m)}),[m]);const O=s((()=>J((()=>{j.current||(S.increment(),C(30),null==o||o(v),x.start(),j.current=!0)}),1e3,{trailing:!1})),[v,o,x]),z=g>=2;return e.createElement(xe,{heading:P("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:P("onboarding.otpForm.descriptionEmail",{email:`<b style="color:${k.colors.gray800}">${I(v)}</b>`})}}),!z&&e.createElement("svg",{onClick:()=>{g>=2||(b((e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1}))),h())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(re,{form:M},e.createElement("form",{onSubmit:M.onSubmit((e=>V(void 0,void 0,void 0,(function*(){try{S.increment();!(yield null==t?void 0:t(e.otp))&&L()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(X,{size:"p4",color:k.colors.gray400},P("onboarding.otpForm.notReceiveOTP")),e.createElement(X,{as:"a",size:"p4",color:f?k.mbColors.pink:k.colors.primaryBase,onClick:O},P("onboarding.otpForm.resendCode",{seconds:y}))),e.createElement(Q,{theme:E,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:c,disabled:c,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},P("onboarding.button.continue")),p&&w>=3&&e.createElement(Q,{theme:E,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},P("onboarding.button.skip")))))},Phone:({onSubmit:t,phone:n,onResendCode:o,otpError:m,onClose:d,loading:c,canSkip:p,isWhatsApp:u})=>{const{sharedData:{phone:g,retryPhoneCount:E},setSharedData:f,prevStep:L,siteType:v,isMarryBaby:y,nextStep:C}=r(ne),x=n||g||"",[w,S]=a(30),j=F((()=>S((e=>e-1))),1e3),[M,z]=B(0,{min:0,max:3}),N=i(!0),{t:T}=H();l((()=>(j.start(),j.stop)),[]),l((()=>{0===w&&(j.stop(),N.current=!1)}),[w]);const I=ae({initialValues:{otp:""},validate:A(we(T))});l((()=>{m&&I.setFieldError("otp",m)}),[m]);const D=s((()=>J((()=>{N.current||(z.increment(),S(30),null==o||o(x),j.start(),N.current=!0)}),1e3,{trailing:!1})),[x,o,j]),Z=E>=2,_=`<b style="color:${k.colors.gray800}">${x.slice(0,-3).replace(/./g,"x").concat(x.slice(-3))}</b>`;return e.createElement(xe,{heading:u?e.createElement(b,{align:"center",justify:"center",gap:h(8)},e.createElement("img",{style:{width:h(24)},loading:"lazy",src:P.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),e.createElement("span",null,T("onboarding.otpWhatsapps.heading"))):T("onboarding.otpForm.heading"),description:e.createElement(e.Fragment,null,e.createElement("span",{dangerouslySetInnerHTML:{__html:T(u?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:_})}}),!Z&&e.createElement("svg",{onClick:()=>{E>=2||(f((e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1}))),L())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},e.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},e.createElement(re,{form:I},e.createElement("form",{onSubmit:I.onSubmit((e=>V(void 0,void 0,void 0,(function*(){try{z.increment();!(yield null==t?void 0:t(e.otp))&&C()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:["otp"]}),e.createElement("div",{className:"resend"},e.createElement(O,{size:"p4",color:k.colors.gray400},T("onboarding.otpForm.notReceiveOTP")),e.createElement(O,{as:"a",size:"p4",color:y?k.mbColors.pink:k.colors.primaryBase,onClick:D},T("onboarding.otpForm.resendCode",{seconds:w}))),e.createElement(Q,{theme:v,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:c,disabled:c,"data-event-category":u?"OTP":"Sign Up","data-event-action":u?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},T("onboarding.button.continue")),p&&M>=3&&e.createElement(Q,{theme:v,color:"ghost",isBlock:!0,size:"lg",onClick:d,type:"button"},T("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:t,onSubmit:n,canSkip:o,loading:a,errorMessage:i,initialData:s})=>{const{t:m,locale:d}=H(),{siteType:c,isMarryBaby:p,setSharedData:u,nextStep:g}=r(ne),b=ae({validate:A(Se(m))});return l((()=>{b.setValues(Object.assign(Object.assign({gender:"0"},s),(null==s?void 0:s.birthday)&&{birthday:new Date(s.birthday)}))}),[s]),l((()=>{i&&b.setFieldError("email",i)}),[i]),e.createElement(Oe,{heading:m("onboarding.formEmail.heading"),description:m("onboarding.formEmail.description",{site:p?"Marry Baby":j[d].SITE_NAME_FORMATTED})},e.createElement(re,{form:b},e.createElement("form",{className:"form",onSubmit:b.onSubmit((e=>V(void 0,void 0,void 0,(function*(){u((t=>Object.assign(Object.assign({},t),e)));!(yield null==n?void 0:n(Object.assign(Object.assign({},e),{birthday:e.birthday&&ee(e.birthday,"yyyy-MM-dd")})))&&g()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["full_name","email","dob","gender"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:a,disabled:a},m("onboarding.button.continue")),o&&e.createElement(Q,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:t,type:"button"},m("onboarding.button.skip")))))},ResultScreen:t=>{var{onClose:n}=t,o=_(t,["onClose"]);const{t:a}=H(),{siteType:i}=r(ne);return e.createElement(Oe,Object.assign({},o),e.createElement(Q,{theme:i,size:"lg",onClick:n,className:"form-button"},a("onboarding.button.continue")))},SimilacForm:t=>{var{onClose:n,onSubmit:o,canSkip:a=!0,customFormTexts:i,customTerms:l,defaultValues:s,isActive:m}=t,d=_(t,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);const{t:c}=H(),{nextStep:p,setSharedData:u,sharedData:g}=r(ne),{isMobile:b}=w(),h=ae({initialValues:{term:!1,phone:(null==g?void 0:g.phone)||(null==s?void 0:s.phone)||"",email:(null==g?void 0:g.email)||(null==s?void 0:s.email)||"",name:(null==g?void 0:g.name)||(null==s?void 0:s.name)||""},validate:A(Fe(c,!l))}),E=(null==s?void 0:s.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return e.createElement(ke,Object.assign({heading:(null==i?void 0:i.heading)||c("onboarding.updatePhone.heading"),description:(null==i?void 0:i.description)||c("onboarding.updatePhone.description"),hiddenLogo:b,"data-active":m},d),e.createElement(re,{form:h},e.createElement("form",{style:{width:"100%"},onSubmit:h.onSubmit((e=>V(void 0,void 0,void 0,(function*(){try{yield null==o?void 0:o(e),u((t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name}))),p()}catch(e){console.error(e)}}))),(e=>{console.log(e)}))},e.createElement(le,{inputOrder:E,withSimilac:!0,customTerms:l}),e.createElement(S,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},c("onboarding.button.continue")),a&&e.createElement(S,{variant:"ghost",fullWidth:!0,size:"lg",onClick:n,type:"button"},c("onboarding.button.skip")))))},FrisoForm:me,UpdatePasswordForm:({onClose:t,onSubmit:n,canSkip:o,errorMessage:a,loading:i})=>{const{t:l}=H(),{nextStep:s}=r(ne),m=ae({initialValues:{password:"",confirmPassword:""},validate:A(ze(l))});return e.createElement(Oe,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},e.createElement(re,{form:m},e.createElement("form",{className:"form",onSubmit:m.onSubmit((e=>V(void 0,void 0,void 0,(function*(){yield n((null==e?void 0:e.password)||""),!a&&s()}))),(e=>{console.log({fieldErrors:e})}))},e.createElement(le,{inputOrder:["password","confirm_password"]}),e.createElement(Q,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),o&&e.createElement(Q,{color:"ghost",isBlock:!0,size:"lg",onClick:t},l("onboarding.button.skip")),a&&e.createElement(c.Error,{className:"form-error"},a))))},StepRenderer:({children:t,onStepChange:n})=>{const{currentStep:o,setMaxStep:a}=r(ne),i=e.Children.count(t);return l((()=>{null==n||n(o)}),[o]),l((()=>{a(i-1)}),[i]),e.createElement(e.Fragment,null,te(t).map(((t,n)=>{const r=n===o;return e.createElement(m,{key:n},e.isValidElement(t)?t.props.alwaysRender||r?e.cloneElement(t,{isActive:n===o,stepIndex:n}):null:r?t:null)})))},ThankYou:t=>{var{onClose:n,thanksPageInfo:r,isActive:o}=t,a=_(t,["onClose","thanksPageInfo","isActive"]);const{t:i}=H(),{isMobile:l}=w();return e.createElement(Be,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":o},a),e.createElement(g,{fluid:!0},e.createElement(E,{align:"center",spacing:8,w:"100%",ta:"center"},e.createElement(f,{ratio:1,w:{base:120,md:160}},e.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},e.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},e.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),e.createElement("g",{mask:"url(#mask0_4580_96805)"},e.createElement("path",{d:"M71.5938 0.45906L76.9763 38.1373C77.0115 38.1373 77.0819 38.1373 77.1171 38.102L82.3589 75.0033L87.5656 38.0666C87.6008 38.0666 87.636 38.0666 87.636 38.0666L92.8426 1.02406C88.6562 0.353123 84.3642 0 80.0018 0C77.1522 0 74.3378 0.141249 71.5938 0.45906Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M131.15 18.5391C125.733 14.0191 119.682 10.1701 113.173 7.20386L97.8699 41.0683C97.9051 41.0683 97.9403 41.1037 97.9403 41.1037L82.4609 75.2859L131.15 18.5391Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.4386 64.8334L82.1114 75.3212H81.9707L82.3225 75.4271H82.3577L82.3928 75.3918L82.428 75.4271H82.3928L82.428 75.4624H82.4632L82.6039 75.5331L82.4984 75.4624L118.347 85.9855C118.347 86.0208 118.347 86.0208 118.312 86.0561L158.101 97.8151C159.332 92.2005 160.001 86.3386 160.001 80.3355C160.001 78.6758 159.93 76.9809 159.86 75.3565H119.825C119.825 75.3918 119.825 75.3918 119.825 75.4271L82.4632 75.4624V75.4271L82.6391 75.3918L82.4984 75.4624L82.815 75.3565H82.6391L155.497 53.6394C153.07 46.7182 149.728 40.2208 145.612 34.2883L82.6391 75.2859H82.4984L82.5687 75.2152L82.4632 75.2859L82.4984 75.074L82.428 75.2152V75.2506L82.3928 75.2859V75.2506H82.3225V75.2152L82.2521 75.074L82.2873 75.2506L82.2169 75.2152L82.2521 75.2506H82.1114L15.7614 32.4167C11.2231 38.5258 7.52917 45.341 4.85547 52.6154L46.4386 64.8334ZM82.3225 75.3918V75.4271L82.2169 75.3565L82.3225 75.3918Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M57.8032 46.9301L82.2887 75.2506L66.7741 41.1036L50.556 5.61475C43.6607 8.33379 37.2579 12.0063 31.4531 16.4556L57.8032 46.9301Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M113.877 95.8023L82.5312 75.5684L106.982 103.854C106.946 103.854 106.946 103.889 106.911 103.889L136.005 137.647C141.529 132.209 146.243 125.994 150.042 119.179L113.877 95.8023Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.427V75.4627H82.356L82.3203 75.427H82.356H82.3203Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2857 75.4623L82.321 75.427H82.2857L82.1445 75.4976L82.2857 75.4623Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2164 75.5684L50.9411 95.9436C50.906 95.9082 50.906 95.8729 50.8708 95.8376L11.3281 121.51C15.4794 128.501 20.6861 134.787 26.7019 140.19L62.5858 98.4507L82.2164 75.5684Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M46.438 86.0559L82.2867 75.3916L0.140721 75.4975C0.0351803 77.0866 0 78.6756 0 80.3C0 86.7975 0.773967 93.1184 2.21636 99.1921L46.438 86.0559C46.438 86.0912 46.438 86.0912 46.438 86.0559Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.2507 75.7095L47 153.467C54.2823 156.786 62.1275 159.011 70.3949 160L82.2507 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.4609 75.7095L94.3519 159.329C102.373 157.881 109.972 155.233 116.938 151.56L82.4609 75.7095Z",fill:"#E0F8EE"}),e.createElement("path",{d:"M82.3203 75.5684L82.3556 75.8509L82.4262 75.5684L82.3556 75.4978L82.3203 75.5684Z",fill:"#E0F8EE"})),e.createElement("path",{d:"M124.694 61.2L124.986 62.1726C125.083 62.6589 125.472 62.9507 125.959 63.1452L126.931 63.437L125.959 63.8261C125.569 63.9234 125.18 64.3124 125.083 64.7015L124.694 65.7714L124.305 64.7015C124.111 64.3124 123.819 64.0206 123.43 63.8261L122.457 63.5343L123.43 63.2425C123.819 63.1452 124.111 62.7562 124.305 62.3671L124.694 61.2Z",fill:"#2D87F3"}),e.createElement("path",{d:"M104.744 34.2856L104.915 34.8571C104.973 35.1428 105.201 35.3142 105.487 35.4285L106.058 35.5999L105.487 35.8285C105.258 35.8856 105.03 36.1142 104.973 36.3428L104.744 36.9714L104.515 36.3428C104.401 36.1142 104.23 35.9428 104.001 35.8285L103.43 35.6571L104.001 35.4856C104.23 35.4285 104.401 35.1999 104.515 34.9714L104.744 34.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M118.345 38L119.088 40.4C119.431 41.4857 120.288 42.3429 121.317 42.6286L123.717 43.3714L121.259 44.2286C120.231 44.5714 119.488 45.3714 119.145 46.3429L118.288 48.8L117.317 46.2286C116.974 45.2571 116.174 44.5143 115.202 44.1714L112.859 43.3714L115.145 42.5714C116.117 42.2286 116.859 41.4857 117.259 40.5714L118.345 38Z",fill:"#FFB521"}),e.createElement("path",{d:"M41.8846 98.8572L42.056 99.4286C42.1132 99.7143 42.3417 99.8857 42.6275 100L43.1989 100.171L42.6275 100.4C42.3989 100.457 42.1703 100.686 42.1132 100.914L41.8846 101.543L41.656 100.914C41.5417 100.686 41.3703 100.514 41.1417 100.4L40.5703 100.229L41.1417 100.057C41.3703 100 41.5417 99.7715 41.656 99.5429L41.8846 98.8572Z",fill:"#00B16A"}),e.createElement("path",{d:"M64.5717 125.314L65.3145 127.714C65.6574 128.8 66.5145 129.657 67.5431 129.943L69.9431 130.686L67.4859 131.543C66.4574 131.886 65.7145 132.686 65.3717 133.657L64.5145 136.114L63.5431 133.543C63.2002 132.571 62.4002 131.828 61.4288 131.486L59.0859 130.686L61.3717 129.886C62.3431 129.543 63.0859 128.8 63.4859 127.886L64.5717 125.314Z",fill:"#FFB521"}),e.createElement("path",{d:"M80.9708 120.343L81.2565 121.314C81.3708 121.771 81.7708 122.114 82.1708 122.228L83.1993 122.514L82.1708 122.857C81.7708 122.971 81.4279 123.314 81.3136 123.714L80.9708 124.743L80.5708 123.657C80.3993 123.257 80.1136 122.914 79.7136 122.8L78.7422 122.457L79.7136 122.114C80.1136 122 80.3993 121.657 80.5708 121.314L80.9708 120.343Z",fill:"#2D87F3"}),e.createElement("path",{d:"M130.307 98.2856L130.529 99.0426C130.619 99.3988 130.93 99.666 131.242 99.755L132.043 99.9777L131.242 100.245C130.93 100.334 130.663 100.601 130.574 100.913L130.307 101.714L129.995 100.868C129.862 100.557 129.639 100.289 129.327 100.2L128.57 99.9331L129.327 99.666C129.639 99.5769 129.862 99.3098 129.995 99.0426L130.307 98.2856Z",fill:"#00B16A"}),e.createElement("path",{d:"M36.592 64L36.8147 64.757C36.9037 65.1132 37.2154 65.3803 37.5271 65.4694L38.3286 65.692L37.5271 65.9592C37.2154 66.0482 36.9482 66.3154 36.8592 66.6271L36.592 67.4286L36.2803 66.5826C36.1467 66.2709 35.9241 66.0037 35.6124 65.9147L34.8555 65.6475L35.6124 65.3803C35.9241 65.2913 36.1467 65.0241 36.2803 64.757L36.592 64Z",fill:"#FFB521"}),e.createElement("path",{d:"M67.3816 26.8572L67.6734 27.8298C67.7707 28.3161 68.1597 28.6079 68.646 28.8025L69.6187 29.0942L68.646 29.4833C68.257 29.5806 67.8679 29.9696 67.7707 30.3587L67.3816 31.4286L66.9926 30.3587C66.798 29.9696 66.5062 29.6778 66.1172 29.4833L65.1445 29.1915L66.1172 28.8997C66.5062 28.8025 66.798 28.4134 66.9926 28.0243L67.3816 26.8572Z",fill:"#2D87F3"}),e.createElement("path",{d:"M80.0011 108.572C95.7807 108.572 108.573 95.7797 108.573 80.0001C108.573 64.2206 95.7807 51.4287 80.0011 51.4287C64.2216 51.4287 51.4297 64.2206 51.4297 80.0001C51.4297 95.7797 64.2216 108.572 80.0011 108.572Z",fill:"#00B16A"}),e.createElement("path",{d:"M78.5808 89.1451C77.3597 89.147 76.1503 88.908 75.0217 88.4418C73.8932 87.9757 72.8677 87.2914 72.0039 86.4283L68.6389 83.0617C68.1939 82.6009 67.9477 81.9838 67.9532 81.3432C67.9588 80.7027 68.2157 80.0899 68.6687 79.6369C69.1217 79.1839 69.7344 78.927 70.375 78.9214C71.0156 78.9159 71.6327 79.1621 72.0935 79.6071L75.4585 82.9738C75.8649 83.3802 76.3473 83.7025 76.8783 83.9225C77.4093 84.1424 77.9784 84.2556 78.5531 84.2556C79.1278 84.2556 79.6969 84.1424 80.2279 83.9225C80.7589 83.7025 81.2413 83.3802 81.6477 82.9738L102.984 63.6911C103.468 63.2745 104.095 63.0635 104.732 63.1034C105.369 63.1433 105.965 63.4308 106.392 63.9044C106.82 64.3781 107.046 65.0003 107.02 65.6379C106.995 66.2756 106.722 66.8781 106.258 67.3166L85.0046 86.513C84.1599 87.3531 83.1576 88.0181 82.0552 88.4698C80.9528 88.9215 79.7721 89.151 78.5808 89.1451Z",fill:"white"}),e.createElement("defs",null,e.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(80 80) rotate(90) scale(80)"},e.createElement("stop",{stopColor:"#C4C4C4"}),e.createElement("stop",{offset:"1",stopColor:"#C4C4C4",stopOpacity:"0"}))))),e.createElement(q,{tag:"h3"},null==r?void 0:r.title),e.createElement(O,{size:"p3",color:"gray.6"},null==r?void 0:r.description),e.createElement(S,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:n},i("similac.thankYou.done")))))}};export{le as DynamicForm,Ne as Onboarding,ne as OnboardingContext};
package/build/esm/pwg.js CHANGED
@@ -1,4 +1,4 @@
1
- import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as o}from"./index-449bd04b.js";import{T as n}from"./Plus-f7c5618a.js";import{P as i}from"./index-bd2dfaf4.js";import{u as s}from"./useTranslations-71150e1d.js";import{t as c}from"./theme-23782329.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as u,YAxis as y,Area as b,ReferenceDot as f}from"recharts";import{C as h}from"./index-7f1f7516.js";import{a as x}from"./useOutsideClick-f050c073.js";import E from"styled-components";import{_ as k}from"./tslib.es6-2cb84ad8.js";import"./index.styled-f2aff174.js";import"@mantine/core";import"./Subot-56771801.js";import"./index-7bc42cef.js";import"./index-11ddf8b9.js";import"date-fns/locale";import"./isProduction-6599ce88.js";import"./index-d0c1cd58.js";import"@mantine/hooks";import"dayjs";import"./utils-1ad4f186.js";import"@mantine/carousel";import"classnames";import"./index-8389442a.js";import"@mantine/dates";import"./translationsContext-5ab0d4b4.js";import"string-format";const w=t=>{const{x:r,y:a,payload:l,activeWeek:o}=t;return o===l.value?e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?c.mbColors.pink:c.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},l.value)):e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},v=E.div`
1
+ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as o}from"./index-88f24735.js";import{T as n}from"./Plus-0795a68c.js";import{P as i}from"./index-03b6469c.js";import{u as s}from"./useTranslations-78d82c21.js";import{t as c}from"./theme-dab2950f.js";import{ResponsiveContainer as m,AreaChart as d,CartesianGrid as p,Tooltip as g,XAxis as u,YAxis as y,Area as b,ReferenceDot as h}from"recharts";import{C as f}from"./index-754b44fc.js";import{a as x}from"./useOutsideClick-a88e81d5.js";import E from"styled-components";import{_ as k}from"./tslib.es6-16e6bdc9.js";import"./index.styled-500647b4.js";import"@mantine/core";import"./Subot-e1ee8861.js";import"./index-5222461b.js";import"./index-1c858659.js";import"date-fns/locale";import"./isProduction-9fe75b7e.js";import"./index-0ce3ea30.js";import"@mantine/hooks";import"dayjs";import"./utils-f69a5c66.js";import"@mantine/carousel";import"classnames";import"./index-404bb127.js";import"@mantine/dates";import"./translationsContext-5a2101f0.js";import"string-format";const w=t=>{const{x:r,y:a,payload:l,activeWeek:o}=t;return o===l.value?e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("circle",{r:12,fill:"marryBaby"===t.siteType?c.mbColors.pink:c.colors.primaryBase}),e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.white,fontFamily:"Inter",fontWeight:"600",fontSize:"12px"},l.value)):e.createElement("g",{transform:`translate(${r},${a})`},e.createElement("text",{textAnchor:"middle",alignmentBaseline:"central",fill:c.colors.gray600,fontFamily:"Inter",fontWeight:"400",fontSize:"12px"},l.value))},v=E.div`
2
2
  /* position: absolute; */
3
3
  display: flex;
4
4
  flex-direction: column;
@@ -55,7 +55,7 @@ import e,{useMemo as t,useState as r,useRef as a}from"react";import{M as l,a as
55
55
  align-items: center;
56
56
  gap: 4px;
57
57
  }
58
- `,T=[{name:"overweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"underweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"healthy",backgroundColor:c.colors.green50,color:c.colors.green900}],B=r=>{var a,l,o,i,s;const{payload:m,active:d}=r,p=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:u}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(l=p.toolTipLabel)||void 0===l?void 0:l[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:c.colors.gray800,weight:"semiBold"},null===(s=p.toolTipLabel)||void 0===s?void 0:s[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:u},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:a,activeWeek:l,t:o})=>{const n=o(`bmi.result.${a}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===l?{toolTipLabel:r,translatedStatus:n,status:a}:{})))},S=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:S})=>{const{t:z}=s(),L="marryBaby"===S,F=t((()=>W({weightByWeek:i,weightBefore:o,toolTipLabel:v,status:C,activeWeek:E,t:z})),[i,o,v,C,E]),[I,M]=r(!1),N=a(null);return x(N,(()=>M(!1))),e.createElement(j,null,L?e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark}," ",z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")),Array.isArray(F)&&F.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:F,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:c.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&I&&void 0!==E&&void 0!==k},t))}),e.createElement(u,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:S})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(y,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:c.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:L?c.mbColors.tonePink:c.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(f,{onClick:()=>M(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(h,{ref:N,r:4}),fill:L?c.mbColors.pink:c.colors.primaryBase,stroke:L?c.mbColors.pink:c.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),L?e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},z("pregnancy.week")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("pregnancy.week")))))},z=t=>{var{color:r}=t,a=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"},a),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||c.colors.primaryBase}))},L=({idealWeight:t,siteType:r})=>{const{t:a}=s(),o="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.lightPink}),e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},a("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(z,{color:c.colors.primary100}),e.createElement(n,{size:"n1",color:c.colors.gray600},e.createElement(n,{size:"n1",as:"span"},a("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.pink}),e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},a("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(z,null),e.createElement(n,{size:"n1",color:c.colors.gray600},a("pwg.placeholder.weight")))))},F=E.div`
58
+ `,T=[{name:"overweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"underweight",backgroundColor:c.colors.yellow50,color:c.colors.yellow900},{name:"healthy",backgroundColor:c.colors.green50,color:c.colors.green900}],B=r=>{var a,l,o,i,s;const{payload:m,active:d}=r,p=null===(a=null==m?void 0:m[0])||void 0===a?void 0:a.payload;if(!p||!p.toolTipLabel||!d)return null;const{backgroundColor:g,color:u}=t((()=>T.find((e=>e.name===p.status))),[null==p?void 0:p.status]);return e.createElement(v,null,e.createElement("div",null,null===(l=p.toolTipLabel)||void 0===l?void 0:l[0]," ",null===(o=p.toolTipLabel)||void 0===o?void 0:o[1]),e.createElement("div",null,(null===(i=p.toolTipLabel)||void 0===i?void 0:i[2])&&e.createElement(n,{as:"span",size:"s3",color:c.colors.gray800,weight:"semiBold"},null===(s=p.toolTipLabel)||void 0===s?void 0:s[2]),e.createElement("div",{className:"risk",style:{backgroundColor:g}},e.createElement(n,{size:"n1",color:u},p.translatedStatus))))},W=({weightByWeek:e,weightBefore:t,toolTipLabel:r,status:a,activeWeek:l,t:o})=>{const n=o(`bmi.result.${a}`);return e.map((e=>Object.assign({name:e.week,min:t+e.min,difference:e.max-e.min,max:t+e.max},e.week===l?{toolTipLabel:r,translatedStatus:n,status:a}:{})))},S=({weightBefore:o,weightByWeek:i,activeWeek:E,currentWeight:k,toolTipLabel:v=[],status:C,withLine:T=!1,siteType:S})=>{const{t:z}=s(),L="marryBaby"===S,F=t((()=>W({weightByWeek:i,weightBefore:o,toolTipLabel:v,status:C,activeWeek:E,t:z})),[i,o,v,C,E]),[I,M]=r(!1),N=a(null);return x(N,(()=>M(!1))),e.createElement(j,null,L?e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark}," ",z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("babyGrowth.weight")," ",z("pregnancyWeightGain.weightInput.desc")),Array.isArray(F)&&F.length>0&&e.createElement(j,null,e.createElement(m,{height:388,className:"chart"},e.createElement(d,{data:F,margin:{top:16,right:0,left:0}},e.createElement(p,{stroke:c.colors.neutral100}),e.createElement(g,{trigger:"click",content:t=>e.createElement(B,Object.assign({active:!T&&I&&void 0!==E&&void 0!==k},t))}),e.createElement(u,{type:"number",scale:"linear",ticks:Array.from({length:40},((e,t)=>t+1)),dataKey:"name",tickLine:!1,tickMargin:12,tick:t=>e.createElement(w,Object.assign({},t,{activeWeek:E,siteType:S})),domain:["dataMin","dataMax"],interval:"preserveStartEnd",tickCount:1,allowDecimals:!1}),e.createElement(y,{domain:[e=>Math.max(e,o-10||e),e=>Math.max(e,o+20||e)],type:"number",scale:"auto",interval:"preserveStartEnd",tickLine:!1,tickMargin:7,width:45,tickCount:10,allowDecimals:!0,tickFormatter:e=>String(Math.round(100*(e+Number.EPSILON))/100),tick:{fontFamily:"Inter",fontWeight:400,fontSize:12,color:c.colors.gray600}}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"min",stackId:"1",stroke:"transparent",fill:"transparent"}),e.createElement(b,{connectNulls:!0,type:"monotone",dataKey:"difference",stackId:"1",stroke:"transparent",fill:L?c.mbColors.tonePink:c.colors.primary100}),void 0!==E&&void 0!==k&&e.createElement(h,{onClick:()=>M(!0),x:0===E?1:E,y:k,r:4,shape:e.createElement(f,{ref:N,r:4}),fill:L?c.mbColors.pink:c.colors.primaryBase,stroke:L?c.mbColors.pink:c.colors.primaryBase}))),e.createElement("div",{className:"custom-chart-label"},e.createElement("i",null),L?e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},z("pregnancy.week")):e.createElement(n,{size:"n1",color:c.colors.gray500},z("pregnancy.week")))))},z=t=>{var{color:r}=t,a=k(t,["color"]);return e.createElement("svg",Object.assign({width:"8",height:"8",viewBox:"0 0 8 8",fill:"none"},a),e.createElement("circle",{cx:"4",cy:"4",r:"4",fill:r||c.colors.primaryBase}))},L=({idealWeight:t,siteType:r})=>{const{t:a}=s(),o="marryBaby"===r;return e.createElement(C,null,e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.lightPink}),e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},a("pregnancyTool.weightSuggested")," ",e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t))):e.createElement(e.Fragment,null,e.createElement(z,{color:c.colors.primary100}),e.createElement(n,{size:"n1",color:c.colors.gray600},e.createElement(n,{size:"n1",as:"span"},a("pregnancyTool.weightSuggested")," "),e.createElement(n,{size:"n1",color:c.colors.gray800,weight:"bold",as:"span"},t)))),e.createElement("div",null,o?e.createElement(e.Fragment,null,e.createElement(z,{color:c.mbColors.pink}),e.createElement(l,{type:"bodytext-3",color:c.mbColors.dark},a("pwg.placeholder.weight"))):e.createElement(e.Fragment,null,e.createElement(z,null),e.createElement(n,{size:"n1",color:c.colors.gray600},a("pwg.placeholder.weight")))))},F=E.div`
59
59
  display: flex;
60
60
  flex-direction: column;
61
61
  align-items: center;
@@ -1 +1 @@
1
- import{d as e}from"./index-11ddf8b9.js";import{i as s}from"./isProduction-6599ce88.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,n as c,i as d,t as g};
1
+ import{d as e}from"./index-1c858659.js";import{i as s}from"./isProduction-9fe75b7e.js";const t=(t,o)=>{if("undefined"!=typeof window)return window.location.origin;const r="development"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return r?"http://localhost:3000":`https://${!r&&!s?o?"fe.":"discover.":o?"www.":""}${e[o?"vi-VN_MB":t]}`},o=(t,o)=>process.env.UNIFY_SSO_API||`https://${s?"id.":"staging-id."}${e[o?"vi-VN_MB":t]}`,r=()=>process.env.UNIFY_INTERNAL_TOGETHER_API||process.env.UNIFY_TOGETHER_API||`https://${s?"together.":"staging-together."}hellohealthgroup.com`,n=t=>process.env.UNIFY_DISCOVER_API||`https://${s?"wp.":"staging."}${e[t]}`,i=()=>process.env.UNIFY_INTERNAL_CARE_API||process.env.UNIFY_CARE_API||`https://${s?"health-care.":"service-health-care."}hellohealthgroup.com`;export{o as a,r as b,n as c,i as d,t as g};
@@ -1,4 +1,4 @@
1
- import e,{createContext as t,useContext as i,useRef as n,useState as o,useEffect as a,useCallback as l,useMemo as r,forwardRef as s,memo as d,useImperativeHandle as c}from"react";import{e as u,c as m,N as p,d as v,f as g,g as b,E as h,L as f,F as y}from"./Subot-56771801.js";import{a as _,_ as x}from"./tslib.es6-2cb84ad8.js";import{B as E,d as w,M as S,e as k,G as I,h as N,A as O,f as T}from"./index-11ddf8b9.js";import C from"js-cookie";import M from"fastdom";import P from"fastdom/extensions/fastdom-promised";import U from"string-format";import{G as B,b as j,x as R,y as A,T as L,L as D}from"./utils-f11e41fe.js";import{v4 as $}from"uuid";import{i as F}from"./isProduction-6599ce88.js";import q from"hex-rgb";import z from"classnames";import{C as H}from"./index-576a616c.js";import{D as G,L as V}from"./index-75ae81a1.js";import{motion as Y}from"framer-motion";import{M as W}from"./utils-1ad4f186.js";import X from"styled-components";import{B as K,S as J}from"./index-d0c1cd58.js";import{Remarkable as Q}from"remarkable";import{useInView as Z}from"react-intersection-observer";import{Box as ee,Textarea as te}from"@mantine/core";import{C as ie}from"./index-7bc42cef.js";import{I as ne}from"./index-c83e2c6d.js";import oe from"dayjs";import ae from"dayjs/plugin/isSameOrBefore";import{T as le}from"./Plus-f7c5618a.js";import{t as re}from"./theme-23782329.js";import"@mantine/dates";import"./translationsContext-5ab0d4b4.js";import"@mantine/hooks";import se from"lodash/isEmpty";import{Controller as de,useForm as ce}from"react-hook-form";import ue,{getCountryCallingCode as me,isPossiblePhoneNumber as pe,parsePhoneNumber as ve}from"react-phone-number-input";import{LoadScript as ge}from"@react-google-maps/api";import{u as be,G as he,a as fe}from"./usePlacesAutocomplete-4a1e0e57.js";import{B as ye}from"./index-ac8ebb4a.js";import{D as _e}from"./index-27926bb9.js";import"date-fns/locale";import"./cookieHelper-0c215a0b.js";import"slugify";import"./useTranslations-71150e1d.js";import"date-fns";import"react-day-picker/DayPickerInput";import"@mantine/carousel";import"./WhatsApp-712a2952.js";import"./useUniqueId-871437b9.js";const xe=M.extend(P),Ee={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}"},we={cached:{},clearCached:e=>{console.log(we.cached),Object.keys(we.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),we.cached[e]=void 0}))},withCached:(e,t)=>_(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===we.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof we.cached[e]&&(t(we.cached[e]),clearInterval(n))}),100)}));if("object"==typeof we.cached[e])return we.cached[e];we.cached[e]="waitingTheFirstResponse";try{const i=yield t();return we.cached[e]=i,setTimeout((()=>{we.cached[e]=void 0}),18e5),i}catch(t){return we.cached[e]=void 0,Promise.reject(t)}}))},Se=(e,t)=>{const{subotApiUrl:i}=null==B?void 0:B.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+U(e,Object.assign({},t))},ke=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Ie=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},Ne=e=>_(void 0,void 0,void 0,(function*(){try{return yield we.withCached("SubotInlineFirstNode",(()=>_(void 0,void 0,void 0,(function*(){const t=yield j(Se(Ee.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Ie(t),t}))))}catch(e){return null}})),Oe=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),Te=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),Ce=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],Me=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...Ce],Pe=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(Me.includes(i))if(Ce.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),Ue=e=>[{id:$(),label:JSON.stringify({title:"",description:""}),type:u.SSO_INTENT,url:""},{id:$(),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:u.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:$(),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:u.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:$(),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:u.SSO_INTENT,url:"/images/subot/shield.svg"}];function Be(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const je=e=>R.parse(e||"")["hhg-id"]||C.get("hhg-id")||"",Re=e=>{if(e)return C.set("hhg-id",e),e;const t=je();if(t)return t;const i=$();return C.set("hhg-id",i),i},Ae=e=>{const t=R.parse(e||"")[E]||C.get(E)||"";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""}},Le=e=>{const t=R.parse(e||"")[E]||C.get(E)||"";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}}},De=$(),$e=()=>De,Fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${F?"":"discover."}${w[e]}`,qe=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)))},ze=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},He=30,Ge=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},Ve=(e,t,i,n)=>{const o=Ge(e[0]);if(!t)return{};const a=e.findIndex((e=>e.id==t)),l=e.reduce(((e,l,r)=>{var s,d;if(r>a)return e;const c=l,u=i&&c.id===t?{action_id:i}:c._message;let p=0;const v=null===(s=c.actions)||void 0===s?void 0:s.find((e=>e.id===(null==u?void 0:u.action_id)));p+=(null==v?void 0:v.score)||0;const g=void 0!==o[c.id],b=i&&c.id===t?n:null==u?void 0:u.form_submit_meta;if(g&&c.type===m.FORM&&b){const e=o[c.id].action_id,t=null===(d=c.actions)||void 0===d?void 0:d.find((t=>t.id===e)),i=null==t?void 0:t.key,n=b.find((e=>e.key===i&&"number"===e.control));if(o[c.id].number&&["+","-","x","/"].includes(o[c.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[c.id].operator,i=o[c.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:l}},Ye=(e,t)=>{const i=Ge(t[0]);if(0===Object.keys(i).length)return e;const n=t.filter((e=>e.type===m.FORM));return Object.keys(i).forEach((t=>{var o,a,l;const r=n.find((e=>e.id===t)),s=null===(o=null==r?void 0:r.actions)||void 0===o?void 0:o.find((e=>{var n;return e.id===(null===(n=i[t])||void 0===n?void 0:n.action_id)})),d=null==s?void 0:s.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===d&&"number"===e.control));if(i[t].number&&["+","-","x","/"].includes(i[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const n=Number(c.value),o=i[t].operator,a=i[t].number;let l=0;if("+"===o&&(l=n+a),"-"===o&&(l=n-a),"x"===o&&(l=n*a),"/"===o&&(l=n/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},We="other",Xe="stateInlineSSO",Ke=()=>{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{}}},Je=e=>{const t=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,t)=>{var i,n,o,a,l,r,s,d,c,u,p,v,b,h,f,y,_,x,E,w,S;if(t.actions&&(null===(i=t._message)||void 0===i?void 0:i.action_id)&&(null===(n=t._message)||void 0===n?void 0:n.action_value)){const i=t._message.action_value;if(t.type===m.FORM){const i=["address","province","district","commune"],n=((null===(o=t._message)||void 0===o?void 0:o.form_submit_meta)||[]).filter((e=>!i.includes(e.control))),m=((null===(a=t._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>i.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(l=m.address)||void 0===l?void 0:l.value,null===(r=m.commune)||void 0===r?void 0:r.value,null===(s=m.district)||void 0===s?void 0:s.value,null===(d=m.province)||void 0===d?void 0:d.value].filter(Boolean).join(", ");p&&m.address?e.push({attribute:m.address.key,value:p,label_question:(null===(u=null===(c=t.intents)||void 0===c?void 0:c[0])||void 0===u?void 0:u.label)||""}):n.forEach((i=>{var n,o;e.push({attribute:i.key,value:i.value,label_question:(null===(o=null===(n=t.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(t.type===m.TEXT)if(t.is_multi_select){const i=Object.keys(t._message.selected_actions||{}),n=t.actions.filter((e=>e.label&&i.includes(e.id))).map((e=>e.label));i.length&&e.push({attribute:t.actions[0].key||"",value:n,label_question:(null===(v=null===(p=t.intents)||void 0===p?void 0:p[0])||void 0===v?void 0:v.label)||""})}else{const n=t._message.action_id,o=t.actions.find((e=>e.id===n)),a=null==o?void 0:o.label,l=null===(f=null===(h=null===(b=t._message)||void 0===b?void 0:b.form_submit_meta)||void 0===h?void 0:h.find((e=>e.key===We)))||void 0===f?void 0:f.value,r=(null==o?void 0:o.type)===g.USER_CHOICE_TEXT_BY_INPUT;a&&n&&e.push({attribute:i,value:r&&l?l:a,label_question:(null===(_=null===(y=t.intents)||void 0===y?void 0:y[0])||void 0===_?void 0:_.label)||""})}if(t.type===m.POLL){const i=t.id,n=(null===(E=null===(x=t._message)||void 0===x?void 0:x.current_polls)||void 0===E?void 0:E[i])||[],o=t.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:t.actions[0].key||"",value:o,label_question:(null===(S=null===(w=t.intents)||void 0===w?void 0:w[0])||void 0===S?void 0:S.label)||""})}}return e}),[]);return t},Qe=(e,t)=>{var i;try{if("ACUVUE"!==(null===(i=t.extra_settings)||void 0===i?void 0:i.subot_type))return;let n="",o="",a="",l=Le().email;if((e||[]).forEach((e=>{var t,i,r;const s=e._message;if(!s)return;const d=null===(t=e.actions)||void 0===t?void 0:t.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?n=(null==d?void 0:d.label)||"":"voucher_color"===s.action_value&&(o=(null==d?void 0:d.label)||""),e.type===m.FORM){const e=null===(i=s.form_submit_meta)||void 0===i?void 0:i.find((e=>"voucher_size"===e.key)),t=null===(r=s.form_submit_meta)||void 0===r?void 0:r.find((e=>"email"===e.control));e&&(a=e.value),t&&(l=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===n&&l)return{email:l,voucherName:n};if(n&&o&&a&&l)return{email:l,voucherName:`${n}|${o}|${a}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},Ze=({nodes:e,activeId:t,params:i,accountIdFromLogs:n})=>_(void 0,void 0,void 0,(function*(){try{let o="in_progress";const a=e[e.length-1];(null==a?void 0:a.type)&&v.includes(a.type)&&(o="complete");const l=e.slice(1),r={activeId:t,params:i,nodes:l,tracking:Object.assign(Object.assign({},Ke()),{full_url:window.location.href}),unifiedAnswers:Je(l),voucherAnswers:Qe(l,e[0])},s={cookie_id:Re(),account_id:n||Ae()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(r),status:o,type:"inline",market:S[A]};yield j(Se(Ee.POST_SUBOT_CREATE_LOG),"POST",{data:s})}catch(e){}})),et=(e,t)=>{try{const[i,n,o]=q(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},tt=t({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),it=({children:t,articleLink:s,subotId:d,isFullContainer:c,bgColor:u,primaryColor:m,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})=>{const{formatMessage:h,action:{pushNotifications:f}}=i(L),y=n(null),E=n(null),[w,S]=o(!0),[N,O]=o(""),[T,M]=o([]),[P,U]=o(!1),[R,A]=o({});a((()=>{const e=u||"#e3f2ff",t=m||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=y.current,a=(new Date).getTime();o&&(xe.mutate((()=>{o.style.setProperty("--subot-inline-bg-color",e),o.style.setProperty("--subot-inline-primary-color",t),o.style.setProperty("--subot-inline-primary-color-hover",et(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",et(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",et(t,.3)||"#bcdeff")})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[u,m]);const D=l((()=>{const e=window.gaData,t=window.location.origin+k+("tl-PH"===(null==B?void 0:B.locale)?s.replace("fil/",""):s),i={bot_id:d,account_id:Ae()||null,action_id:"",action_value:"",cookie_id:Re(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:C.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:$e()};return Pe(i,null==B?void 0:B.router.query)}),[]),$=l((()=>{var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),F=l(((e,t=!0)=>_(void 0,void 0,void 0,(function*(){var i;if(!e||!e.url||!e.bot_id)return;let n="",o=[];S(!0);const a=yield Ne(e.bot_id);1===(null==a?void 0:a._status)&&(n=null==a?void 0:a._data.id.toString(),o.push(null==a?void 0:a._data,null==a?void 0:a._data.first_node));const l=t?yield(r=o[0],_(void 0,void 0,void 0,(function*(){var e,t;try{if(!r)return null;const i=yield j(Se(Ee.GET_SUBOT_LOG,{botId:r.id,cookieId:Re(),accountId:Ae()||"",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),o=n.nodes,a="in_progress"===i._data.status,l="complete"===i._data.status;return a||l?{nodes:[r,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:Ae()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var r;l&&(o=l.nodes,n=l.activeId,E.current=(null===(i=l.params)||void 0===i?void 0:i.account_id)||0);const s=((e,{getParams:t})=>{try{if(!Ae())return null;const i=JSON.parse(localStorage.getItem(Xe)||""),n=18e5;return(null==i?void 0:i.botId)===e&&i.listNodes&&i.activeId&&i.createdAt+n>Date.now()&&(localStorage.removeItem(Xe),i.listNodes.slice(-1)[0].position===p.SSO)?{listNodes:i.listNodes,activeId:i.activeId,params:Object.assign(Object.assign(Object.assign({},t()),i.params),{account_id:Ae()||null,cookie_id:Re(i.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:D});if(s&&s.params.action_id&&s.params.action_value){const e=yield ke(s.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(n=null==e?void 0:e._data.node.id,o=s.listNodes,o[o.length-1]=null==e?void 0:e._data.node,Ze({nodes:o,activeId:n,params:s.params,accountIdFromLogs:E.current}),setTimeout((()=>{$()}),100))}const d=(null==s?void 0:s.params)||(null==l?void 0:l.params)||e,[c,u]=((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]})(o[0],n,o);S(!1),O(c),M(u),A(Object.assign(Object.assign({},e),d))}))),[]),q=l(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${d}"]`);i&&i.click();let n=N,o=[...T];if(null==t?void 0:t.node_id){const e=o.findIndex((({id:e})=>e==t.node_id));-1!==e&&(o[e]._message=Object.assign(Object.assign({},o[e]._message),t),o=[...o.slice(0,e+1)])}if(S(!0),e){const t=o.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)o=[...o,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},o[t]),e),{_message:Object.assign(Object.assign({},o[t]._message),null==e?void 0:e._message)});o=[...o.slice(0,t),Object.assign({},i),...o.slice(t+1)]}n=e.id}setTimeout((()=>{M(o),O(n),S(!1),Ze({nodes:o,activeId:n,params:R,accountIdFromLogs:E.current})}),250)}),[T,N]),z=l((e=>_(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),Ve(T,N,e.action_id)),i=yield ke(t);if(S(!1),1===(null==i?void 0:i._status)){const e=null==i?void 0:i._data,{node:n}=e,o=x(e,["node"]),a=Object.assign(Object.assign({},n),{_message:Object.assign(Object.assign({},o),{node_id:n.id})});return void(-1!==T.findIndex((e=>e.id===a.id))?q(a):q(a,t))}f({title:h({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=T.find((e=>e.id==N));t&&t.hasOwnProperty("first_node")&&(O(T[1].id.toString()),Ze({nodes:T,activeId:T[1].id.toString(),params:D(),accountIdFromLogs:E.current}))}))),[q,T]),H=l((()=>{const e=T.findIndex((({id:e})=>e==N));if(e&&-1!==e&&e>1){const t=T[e-1];O(t.id),Ze({nodes:T,activeId:t.id,params:R,accountIdFromLogs:E.current})}}),[T,N]),G=l((()=>{const e=D();F(e,!1);const t=T[0],i=T[1];Ze({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:E.current})}),[D,F,T]),V=l((e=>{M((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==N?t.map((t=>{const i=t;return i.id===N?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[N]);a((()=>{if(C.get(I)){const e=D();F(e)}else Be({condition:()=>Boolean(C.get(I)),finished:()=>{const e=D();F(e)}})}),[]),a((()=>{if(!T.length)return;T.find((e=>e.id==N))&&N||O(d+"")}),[N,T]);const Y=r((()=>({activeId:N,params:R,listNodes:T,loading:w,setLoading:S,getParams:D,onNext:z,onPrev:H,onSubmit:q,onStartOver:G,onChange:V,isShowFooter:P,setIsShowFooter:U,isFullContainer:c,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})),[N,z,H,q,V,G,P,R,T,w,S,D,c,v,g,b]);return T.length?e.createElement(tt.Provider,{value:Y},e.createElement("div",{ref:y},t)):null},nt=t=>e.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e.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"})),ot="480px",at=X.div`
1
+ import e,{createContext as t,useContext as i,useRef as n,useState as o,useEffect as a,useCallback as l,useMemo as r,forwardRef as s,memo as d,useImperativeHandle as c}from"react";import{e as u,c as m,N as p,d as v,f as g,g as b,E as h,L as f,F as y}from"./Subot-e1ee8861.js";import{a as _,_ as x}from"./tslib.es6-16e6bdc9.js";import{B as E,d as w,M as S,e as k,G as I,h as N,A as O,f as T}from"./index-1c858659.js";import C from"js-cookie";import M from"fastdom";import P from"fastdom/extensions/fastdom-promised";import U from"string-format";import{G as B,b as j,x as R,y as A,T as L,L as D}from"./utils-3e125f1e.js";import{v4 as $}from"uuid";import{i as F}from"./isProduction-9fe75b7e.js";import q from"hex-rgb";import z from"classnames";import{C as H}from"./index-86e92cc0.js";import{D as G,L as V}from"./index-64dc6b83.js";import{motion as Y}from"framer-motion";import{M as W}from"./utils-f69a5c66.js";import X from"styled-components";import{B as K,S as J}from"./index-0ce3ea30.js";import{Remarkable as Q}from"remarkable";import{useInView as Z}from"react-intersection-observer";import{Box as ee,Textarea as te}from"@mantine/core";import{C as ie}from"./index-5222461b.js";import{I as ne}from"./index-36467b48.js";import oe from"dayjs";import ae from"dayjs/plugin/isSameOrBefore";import{T as le}from"./Plus-0795a68c.js";import{t as re}from"./theme-dab2950f.js";import"@mantine/dates";import"./translationsContext-5a2101f0.js";import"@mantine/hooks";import se from"lodash/isEmpty";import{Controller as de,useForm as ce}from"react-hook-form";import ue,{getCountryCallingCode as me,isPossiblePhoneNumber as pe,parsePhoneNumber as ve}from"react-phone-number-input";import{LoadScript as ge}from"@react-google-maps/api";import{u as be,G as he,a as fe}from"./usePlacesAutocomplete-96e52ce9.js";import{B as ye}from"./index-ed7346f2.js";import{D as _e}from"./index-fe314c0f.js";import"date-fns/locale";import"./cookieHelper-2017148d.js";import"slugify";import"./useTranslations-78d82c21.js";import"date-fns";import"react-day-picker/DayPickerInput";import"@mantine/carousel";import"./WhatsApp-c7fd561d.js";const xe=M.extend(P),Ee={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}"},we={cached:{},clearCached:e=>{console.log(we.cached),Object.keys(we.cached).filter((t=>t.startsWith(e))).forEach((e=>{console.log(e),we.cached[e]=void 0}))},withCached:(e,t)=>_(void 0,void 0,void 0,(function*(){if("waitingTheFirstResponse"===we.cached[e])return new Promise((t=>{const i=(new Date).getTime(),n=setInterval((()=>{(new Date).getTime()-i>3e3&&clearInterval(n),"object"==typeof we.cached[e]&&(t(we.cached[e]),clearInterval(n))}),100)}));if("object"==typeof we.cached[e])return we.cached[e];we.cached[e]="waitingTheFirstResponse";try{const i=yield t();return we.cached[e]=i,setTimeout((()=>{we.cached[e]=void 0}),18e5),i}catch(t){return we.cached[e]=void 0,Promise.reject(t)}}))},Se=(e,t)=>{const{subotApiUrl:i}=null==B?void 0:B.env;return(i.endsWith("frontend/api/")?i:i+"frontend/api/")+U(e,Object.assign({},t))},ke=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_MESSAGE),"POST",{data:e})}catch(e){}})),Ie=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},Ne=e=>_(void 0,void 0,void 0,(function*(){try{return yield we.withCached("SubotInlineFirstNode",(()=>_(void 0,void 0,void 0,(function*(){const t=yield j(Se(Ee.GET_INLINE_FIRST_NODE)+`/${e}`,"GET");return Ie(t),t}))))}catch(e){return null}})),Oe=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_CLICK),"POST",{data:e})}catch(e){}})),Te=e=>_(void 0,void 0,void 0,(function*(){try{return yield j(Se(Ee.GET_INLINE_IMPRESSION),"POST",{data:e})}catch(e){}})),Ce=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],Me=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...Ce],Pe=(e,t)=>(Object.keys(t).map((i=>{const n=t[i];if("source"!==i){if(Me.includes(i))if(Ce.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),Ue=e=>[{id:$(),label:JSON.stringify({title:"",description:""}),type:u.SSO_INTENT,url:""},{id:$(),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:u.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:$(),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:u.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:$(),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:u.SSO_INTENT,url:"/images/subot/shield.svg"}];function Be(e){const t=e.condition,i=e.finished,n=e.timeout||3e3,o=(new Date).getTime(),a=setInterval((()=>{((new Date).getTime()-o>n||t())&&(clearInterval(a),i())}),300)}const je=e=>R.parse(e||"")["hhg-id"]||C.get("hhg-id")||"",Re=e=>{if(e)return C.set("hhg-id",e),e;const t=je();if(t)return t;const i=$();return C.set("hhg-id",i),i},Ae=e=>{const t=R.parse(e||"")[E]||C.get(E)||"";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""}},Le=e=>{const t=R.parse(e||"")[E]||C.get(E)||"";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}}},De=$(),$e=()=>De,Fe=(e,t)=>!t&&("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname))?"http://localhost":`https://${F?"":"discover."}${w[e]}`,qe=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)))},ze=e=>{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()},He=30,Ge=e=>{try{return e.dynamic_score||{}}catch(e){return{}}},Ve=(e,t,i,n)=>{const o=Ge(e[0]);if(!t)return{};const a=e.findIndex((e=>e.id==t)),l=e.reduce(((e,l,r)=>{var s,d;if(r>a)return e;const c=l,u=i&&c.id===t?{action_id:i}:c._message;let p=0;const v=null===(s=c.actions)||void 0===s?void 0:s.find((e=>e.id===(null==u?void 0:u.action_id)));p+=(null==v?void 0:v.score)||0;const g=void 0!==o[c.id],b=i&&c.id===t?n:null==u?void 0:u.form_submit_meta;if(g&&c.type===m.FORM&&b){const e=o[c.id].action_id,t=null===(d=c.actions)||void 0===d?void 0:d.find((t=>t.id===e)),i=null==t?void 0:t.key,n=b.find((e=>e.key===i&&"number"===e.control));if(o[c.id].number&&["+","-","x","/"].includes(o[c.id].operator)&&(null==n?void 0:n.value)&&Number(n.value)){const e=Number(n.value),t=o[c.id].operator,i=o[c.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:l}},Ye=(e,t)=>{const i=Ge(t[0]);if(0===Object.keys(i).length)return e;const n=t.filter((e=>e.type===m.FORM));return Object.keys(i).forEach((t=>{var o,a,l;const r=n.find((e=>e.id===t)),s=null===(o=null==r?void 0:r.actions)||void 0===o?void 0:o.find((e=>{var n;return e.id===(null===(n=i[t])||void 0===n?void 0:n.action_id)})),d=null==s?void 0:s.key,c=null===(l=null===(a=null==r?void 0:r._message)||void 0===a?void 0:a.form_submit_meta)||void 0===l?void 0:l.find((e=>e.key===d&&"number"===e.control));if(i[t].number&&["+","-","x","/"].includes(i[t].operator)&&(null==c?void 0:c.value)&&Number(c.value)){const n=Number(c.value),o=i[t].operator,a=i[t].number;let l=0;if("+"===o&&(l=n+a),"-"===o&&(l=n-a),"x"===o&&(l=n*a),"/"===o&&(l=n/a),e.includes(`{{var:${d}}}`)){const t=new RegExp(`{{var:${d}}}`,"g");e=e.replace(t,String(Math.floor(100*l)/100))}}})),e},We="other",Xe="stateInlineSSO",Ke=()=>{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{}}},Je=e=>{const t=e.filter((e=>"Unified Questions"===e.name)).reduce(((e,t)=>{var i,n,o,a,l,r,s,d,c,u,p,v,b,h,f,y,_,x,E,w,S;if(t.actions&&(null===(i=t._message)||void 0===i?void 0:i.action_id)&&(null===(n=t._message)||void 0===n?void 0:n.action_value)){const i=t._message.action_value;if(t.type===m.FORM){const i=["address","province","district","commune"],n=((null===(o=t._message)||void 0===o?void 0:o.form_submit_meta)||[]).filter((e=>!i.includes(e.control))),m=((null===(a=t._message)||void 0===a?void 0:a.form_submit_meta)||[]).filter((e=>i.includes(e.control))).reduce(((e,t)=>(e[t.control]=t,e)),{}),p=[null===(l=m.address)||void 0===l?void 0:l.value,null===(r=m.commune)||void 0===r?void 0:r.value,null===(s=m.district)||void 0===s?void 0:s.value,null===(d=m.province)||void 0===d?void 0:d.value].filter(Boolean).join(", ");p&&m.address?e.push({attribute:m.address.key,value:p,label_question:(null===(u=null===(c=t.intents)||void 0===c?void 0:c[0])||void 0===u?void 0:u.label)||""}):n.forEach((i=>{var n,o;e.push({attribute:i.key,value:i.value,label_question:(null===(o=null===(n=t.intents)||void 0===n?void 0:n[0])||void 0===o?void 0:o.label)||""})}))}if(t.type===m.TEXT)if(t.is_multi_select){const i=Object.keys(t._message.selected_actions||{}),n=t.actions.filter((e=>e.label&&i.includes(e.id))).map((e=>e.label));i.length&&e.push({attribute:t.actions[0].key||"",value:n,label_question:(null===(v=null===(p=t.intents)||void 0===p?void 0:p[0])||void 0===v?void 0:v.label)||""})}else{const n=t._message.action_id,o=t.actions.find((e=>e.id===n)),a=null==o?void 0:o.label,l=null===(f=null===(h=null===(b=t._message)||void 0===b?void 0:b.form_submit_meta)||void 0===h?void 0:h.find((e=>e.key===We)))||void 0===f?void 0:f.value,r=(null==o?void 0:o.type)===g.USER_CHOICE_TEXT_BY_INPUT;a&&n&&e.push({attribute:i,value:r&&l?l:a,label_question:(null===(_=null===(y=t.intents)||void 0===y?void 0:y[0])||void 0===_?void 0:_.label)||""})}if(t.type===m.POLL){const i=t.id,n=(null===(E=null===(x=t._message)||void 0===x?void 0:x.current_polls)||void 0===E?void 0:E[i])||[],o=t.actions.filter((e=>e.label&&n.includes(e.id))).map((e=>e.label));n.length&&e.push({attribute:t.actions[0].key||"",value:o,label_question:(null===(S=null===(w=t.intents)||void 0===w?void 0:w[0])||void 0===S?void 0:S.label)||""})}}return e}),[]);return t},Qe=(e,t)=>{var i;try{if("ACUVUE"!==(null===(i=t.extra_settings)||void 0===i?void 0:i.subot_type))return;let n="",o="",a="",l=Le().email;if((e||[]).forEach((e=>{var t,i,r;const s=e._message;if(!s)return;const d=null===(t=e.actions)||void 0===t?void 0:t.find((e=>e.id===s.action_id));if("voucher_product"===s.action_value?n=(null==d?void 0:d.label)||"":"voucher_color"===s.action_value&&(o=(null==d?void 0:d.label)||""),e.type===m.FORM){const e=null===(i=s.form_submit_meta)||void 0===i?void 0:i.find((e=>"voucher_size"===e.key)),t=null===(r=s.form_submit_meta)||void 0===r?void 0:r.find((e=>"email"===e.control));e&&(a=e.value),t&&(l=t.value)}})),"ACUVUE® OASYS (1-DAY) WITH HYDRALUXE®"===n&&l)return{email:l,voucherName:n};if(n&&o&&a&&l)return{email:l,voucherName:`${n}|${o}|${a}`}}catch(e){console.log("ExtractVoucherAnswer",e)}},Ze=({nodes:e,activeId:t,params:i,accountIdFromLogs:n})=>_(void 0,void 0,void 0,(function*(){try{let o="in_progress";const a=e[e.length-1];(null==a?void 0:a.type)&&v.includes(a.type)&&(o="complete");const l=e.slice(1),r={activeId:t,params:i,nodes:l,tracking:Object.assign(Object.assign({},Ke()),{full_url:window.location.href}),unifiedAnswers:Je(l),voucherAnswers:Qe(l,e[0])},s={cookie_id:Re(),account_id:n||Ae()||null,bot_id:e[0].id,flow_uuid:e[0].flow_uuid,data:JSON.stringify(r),status:o,type:"inline",market:S[A]};yield j(Se(Ee.POST_SUBOT_CREATE_LOG),"POST",{data:s})}catch(e){}})),et=(e,t)=>{try{const[i,n,o]=q(e,{format:"array"});return`rgba(${i}, ${n}, ${o}, ${t})`}catch(e){return}},tt=t({activeId:"",params:{},listNodes:[],loading:!0,getParams:()=>({}),onNext:()=>null,onPrev:()=>null,onSubmit:()=>null,onStartOver:()=>null,onChange:()=>null,isShowFooter:!1,setIsShowFooter:()=>null,setLoading:()=>null,userInfo:null}),it=({children:t,articleLink:s,subotId:d,isFullContainer:c,bgColor:u,primaryColor:m,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})=>{const{formatMessage:h,action:{pushNotifications:f}}=i(L),y=n(null),E=n(null),[w,S]=o(!0),[N,O]=o(""),[T,M]=o([]),[P,U]=o(!1),[R,A]=o({});a((()=>{const e=u||"#e3f2ff",t=m||"#2d87f3",i=(new Date).getTime(),n=setInterval((()=>{const o=y.current,a=(new Date).getTime();o&&(xe.mutate((()=>{o.style.setProperty("--subot-inline-bg-color",e),o.style.setProperty("--subot-inline-primary-color",t),o.style.setProperty("--subot-inline-primary-color-hover",et(t,.9)||t),o.style.setProperty("--subot-inline-primary-color-100",et(t,.1)||"#e3f2ff"),o.style.setProperty("--subot-inline-primary-color-300",et(t,.3)||"#bcdeff")})),clearInterval(n)),a-i>18e4&&clearInterval(n)}),100);return()=>{clearInterval(n)}}),[u,m]);const D=l((()=>{const e=window.gaData,t=window.location.origin+k+("tl-PH"===(null==B?void 0:B.locale)?s.replace("fil/",""):s),i={bot_id:d,account_id:Ae()||null,action_id:"",action_value:"",cookie_id:Re(),current_score:0,current_keys:[],current_selected:[],form_submit_meta:[],gtm_id:e?Object.keys(e)[0]:"",ga_client_id:C.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:$e()};return Pe(i,null==B?void 0:B.router.query)}),[]),$=l((()=>{var e;null===(e=y.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start",inline:"center"})}),[]),F=l(((e,t=!0)=>_(void 0,void 0,void 0,(function*(){var i;if(!e||!e.url||!e.bot_id)return;let n="",o=[];S(!0);const a=yield Ne(e.bot_id);1===(null==a?void 0:a._status)&&(n=null==a?void 0:a._data.id.toString(),o.push(null==a?void 0:a._data,null==a?void 0:a._data.first_node));const l=t?yield(r=o[0],_(void 0,void 0,void 0,(function*(){var e,t;try{if(!r)return null;const i=yield j(Se(Ee.GET_SUBOT_LOG,{botId:r.id,cookieId:Re(),accountId:Ae()||"",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),o=n.nodes,a="in_progress"===i._data.status,l="complete"===i._data.status;return a||l?{nodes:[r,...o],activeId:n.activeId,params:Object.assign(Object.assign({},n.params),{account_id:Ae()||n.params.account_id||null})}:null}catch(e){return null}}))):null;var r;l&&(o=l.nodes,n=l.activeId,E.current=(null===(i=l.params)||void 0===i?void 0:i.account_id)||0);const s=((e,{getParams:t})=>{try{if(!Ae())return null;const i=JSON.parse(localStorage.getItem(Xe)||""),n=18e5;return(null==i?void 0:i.botId)===e&&i.listNodes&&i.activeId&&i.createdAt+n>Date.now()&&(localStorage.removeItem(Xe),i.listNodes.slice(-1)[0].position===p.SSO)?{listNodes:i.listNodes,activeId:i.activeId,params:Object.assign(Object.assign(Object.assign({},t()),i.params),{account_id:Ae()||null,cookie_id:Re(i.params.cookie_id)})}:null}catch(e){return null}})(e.bot_id,{getParams:D});if(s&&s.params.action_id&&s.params.action_value){const e=yield ke(s.params);1===(null==e?void 0:e._status)&&(null==e?void 0:e._data.node)&&(n=null==e?void 0:e._data.node.id,o=s.listNodes,o[o.length-1]=null==e?void 0:e._data.node,Ze({nodes:o,activeId:n,params:s.params,accountIdFromLogs:E.current}),setTimeout((()=>{$()}),100))}const d=(null==s?void 0:s.params)||(null==l?void 0:l.params)||e,[c,u]=((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]})(o[0],n,o);S(!1),O(c),M(u),A(Object.assign(Object.assign({},e),d))}))),[]),q=l(((e,t)=>{const i=document.querySelector(`.si-revamp-event-submission[data-bot-id="${d}"]`);i&&i.click();let n=N,o=[...T];if(null==t?void 0:t.node_id){const e=o.findIndex((({id:e})=>e==t.node_id));-1!==e&&(o[e]._message=Object.assign(Object.assign({},o[e]._message),t),o=[...o.slice(0,e+1)])}if(S(!0),e){const t=o.findIndex((({id:t})=>t==(null==e?void 0:e.id)));if(-1===t)o=[...o,Object.assign({},e)];else{const i=Object.assign(Object.assign(Object.assign({},o[t]),e),{_message:Object.assign(Object.assign({},o[t]._message),null==e?void 0:e._message)});o=[...o.slice(0,t),Object.assign({},i),...o.slice(t+1)]}n=e.id}setTimeout((()=>{M(o),O(n),S(!1),Ze({nodes:o,activeId:n,params:R,accountIdFromLogs:E.current})}),250)}),[T,N]),z=l((e=>_(void 0,void 0,void 0,(function*(){if(null==e?void 0:e.node_id){const t=Object.assign(Object.assign({},e),Ve(T,N,e.action_id)),i=yield ke(t);if(S(!1),1===(null==i?void 0:i._status)){const e=null==i?void 0:i._data,{node:n}=e,o=x(e,["node"]),a=Object.assign(Object.assign({},n),{_message:Object.assign(Object.assign({},o),{node_id:n.id})});return void(-1!==T.findIndex((e=>e.id===a.id))?q(a):q(a,t))}f({title:h({id:"notification.comment.somethingWrong"}),message:"",type:"danger"})}const t=T.find((e=>e.id==N));t&&t.hasOwnProperty("first_node")&&(O(T[1].id.toString()),Ze({nodes:T,activeId:T[1].id.toString(),params:D(),accountIdFromLogs:E.current}))}))),[q,T]),H=l((()=>{const e=T.findIndex((({id:e})=>e==N));if(e&&-1!==e&&e>1){const t=T[e-1];O(t.id),Ze({nodes:T,activeId:t.id,params:R,accountIdFromLogs:E.current})}}),[T,N]),G=l((()=>{const e=D();F(e,!1);const t=T[0],i=T[1];Ze({nodes:[t,i],activeId:String(t.id),params:e,accountIdFromLogs:E.current})}),[D,F,T]),V=l((e=>{M((t=>e&&(null==e?void 0:e.node_id)&&(null==e?void 0:e.node_id)==N?t.map((t=>{const i=t;return i.id===N?Object.assign(Object.assign({},t),{_message:i._message?Object.assign(Object.assign({},i._message),e):e}):t})):t))}),[N]);a((()=>{if(C.get(I)){const e=D();F(e)}else Be({condition:()=>Boolean(C.get(I)),finished:()=>{const e=D();F(e)}})}),[]),a((()=>{if(!T.length)return;T.find((e=>e.id==N))&&N||O(d+"")}),[N,T]);const Y=r((()=>({activeId:N,params:R,listNodes:T,loading:w,setLoading:S,getParams:D,onNext:z,onPrev:H,onSubmit:q,onStartOver:G,onChange:V,isShowFooter:P,setIsShowFooter:U,isFullContainer:c,isDisabledAnimationOnMobile:v,onCloseMobile:g,userInfo:b})),[N,z,H,q,V,G,P,R,T,w,S,D,c,v,g,b]);return T.length?e.createElement(tt.Provider,{value:Y},e.createElement("div",{ref:y},t)):null},nt=t=>e.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e.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"})),ot="480px",at=X.div`
2
2
  position: relative;
3
3
 
4
4
  .si-inline-revamp-container {
@@ -1,8 +1,9 @@
1
- import React, { HTMLAttributes, ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
+ import { BoxProps } from '@mantine/core';
2
3
  export type Props = {
3
4
  children?: ReactNode;
4
- } & HTMLAttributes<HTMLDivElement>;
5
- declare const LikeWrapper: ({ children, className }: Props) => React.JSX.Element;
6
- declare const ShareWrapper: ({ children, className }: Props) => React.JSX.Element;
7
- declare const CommentWrapper: ({ children, className }: Props) => React.JSX.Element;
5
+ } & BoxProps;
6
+ declare const LikeWrapper: ({ children, className, ...boxProps }: Props) => React.JSX.Element;
7
+ declare const ShareWrapper: ({ children, className, ...boxProps }: Props) => React.JSX.Element;
8
+ declare const CommentWrapper: ({ children, className, ...boxProps }: Props) => React.JSX.Element;
8
9
  export { LikeWrapper, ShareWrapper, CommentWrapper };
@@ -28,8 +28,8 @@ export type Props = {
28
28
  };
29
29
  declare const CardReactions: {
30
30
  ({ type, viewCount, loveCount, replyCount, replyPadding, liked, isReplied, onCommentClick, onLikeClick, onShareClick, className, style, hideCommentIcon, showingMostEngaging, isMarryBaby: isMarryBabyInit, hasShare, hasCountLike, trackingCategory, trackingLabel, children, ...rest }: Props): React.JSX.Element;
31
- LikeWrapper: ({ children, className }: import("./element").Props) => React.JSX.Element;
32
- ShareWrapper: ({ children, className }: import("./element").Props) => React.JSX.Element;
33
- CommentWrapper: ({ children, className }: import("./element").Props) => React.JSX.Element;
31
+ LikeWrapper: ({ children, className, ...boxProps }: import("./element").Props) => React.JSX.Element;
32
+ ShareWrapper: ({ children, className, ...boxProps }: import("./element").Props) => React.JSX.Element;
33
+ CommentWrapper: ({ children, className, ...boxProps }: import("./element").Props) => React.JSX.Element;
34
34
  };
35
35
  export { CardReactions };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { BoxProps } from '@mantine/core';
3
+ export declare const AuthorBadgeItem: ({ styles, className, classNames, }: BoxProps) => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ declare const _default: (params: void, options?: import("@mantine/core").UseStylesOptions<string>) => {
2
+ classes: {
3
+ root: string;
4
+ };
5
+ cx: (...args: any) => string;
6
+ theme: import("@mantine/core").MantineTheme;
7
+ };
8
+ export default _default;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { SiteType } from "../../../../types";
3
+ export type CardAuthorContextProps = {
4
+ displayName: string;
5
+ role: string;
6
+ title: string;
7
+ siteType: SiteType;
8
+ handleMakeAppointment: (doctorId?: string, hospitalId?: string) => void;
9
+ doctorId: string;
10
+ hospitalId: string;
11
+ currentUrl: string;
12
+ };
13
+ export declare const CardAuthorContext: import("react").Context<CardAuthorContextProps>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DisplayName: () => React.JSX.Element;
@@ -1,7 +1,10 @@
1
1
  import React, { HTMLAttributes, ReactNode } from 'react';
2
2
  import { DefaultProps, Selectors } from '@mantine/core';
3
+ import { CardAuthor as CardAuthorUI } from "../../../../components/ui/cardAuthor";
3
4
  import { DataTrackingType } from "../../../../interfaces/types";
4
5
  import { Role } from "../../../../interfaces/types";
6
+ import { AuthorBadgeItem } from "./authorBadgeItem";
7
+ import { DisplayName } from "./displayName";
5
8
  import useStyles from "./index.styles";
6
9
  import { Community } from "../../../interfaces/types";
7
10
  import { Props as UserAvatarProps } from "../../atoms/userAvatar";
@@ -47,17 +50,13 @@ export interface Props extends DefaultProps<MyComponentStylesNames, HTMLAttribut
47
50
  hideBackground?: boolean;
48
51
  children?: ReactNode;
49
52
  }
50
- export type CardAuthorContextProps = {
51
- handleMakeAppointment: (doctorId?: string, hospitalId?: string) => void;
52
- doctorId: string;
53
- hospitalId: string;
54
- currentUrl: string;
55
- };
56
- declare const CardAuthor: {
57
- (props: Props & DataTrackingType): React.JSX.Element;
58
- MainText: ({ children, className }: import("../../../../components/ui/cardAuthor/element").Props) => React.JSX.Element;
59
- SubText: ({ children, className }: import("../../../../components/ui/cardAuthor/element").Props) => React.JSX.Element;
60
- SubTextRow: ({ children, className, ...rest }: import("../../../../components/ui/cardAuthor/element").Props) => React.JSX.Element;
61
- SubDivider: ({ className }: import("../../../../components/ui/cardAuthor/element").Props) => React.JSX.Element;
62
- };
53
+ export interface CompoundedComponent extends React.ForwardRefExoticComponent<Props & DataTrackingType> {
54
+ MainText: typeof CardAuthorUI.MainText;
55
+ SubText: typeof CardAuthorUI.SubText;
56
+ SubTextRow: typeof CardAuthorUI.SubTextRow;
57
+ SubDivider: typeof CardAuthorUI.SubDivider;
58
+ AuthorBadge: typeof AuthorBadgeItem;
59
+ DisplayName: typeof DisplayName;
60
+ }
61
+ declare const CardAuthor: CompoundedComponent;
63
62
  export { CardAuthor };
@@ -1,7 +1,6 @@
1
1
  declare const _default: (params: void, options?: import("@mantine/core").UseStylesOptions<string>) => {
2
2
  classes: {
3
3
  root: string;
4
- authorBadge: string;
5
4
  };
6
5
  cx: (...args: any) => string;
7
6
  theme: import("@mantine/core").MantineTheme;
@@ -138,6 +138,9 @@ export type Post = {
138
138
  isAskDoctor?: number;
139
139
  expertAnswer: ExpertAnswer;
140
140
  createdTime?: string;
141
+ isMinigame?: boolean;
142
+ eventStart?: string;
143
+ eventEnd?: string;
141
144
  };
142
145
  export type PostPaginationApi = {
143
146
  current: number;
@@ -214,6 +217,9 @@ export type PostApi = {
214
217
  is_anonymous?: number;
215
218
  is_question?: number;
216
219
  expert_answer?: ExpertAnswerApi;
220
+ event_type?: string;
221
+ event_start?: string;
222
+ event_end?: string;
217
223
  };
218
224
  export type TogetherTopicsApi = {
219
225
  community_id: number;
@@ -1 +1 @@
1
- export{f as CardAuthor,C as CardLink,B as CardPost,D as CardPostPopoverMore,b as CardReactions,E as CardReply,F as CardReplyPopover,g as CreateNewPostContent,h as CreatePostDescription,i as CreatePostTitle,r as ImagePreviewPopup,I as InputCommentBar,d as LabelPin,L as LabelSortPin,e as LabelSorting,G as PopoverMenu,P as PopupDanger,k as PopupDoctor,j as PopupExpert,n as PopupFrame,l as PopupHospital,q as PostContent,v as PostImagePreview,s as PostSingleImageViewPopup,y as ProfileDetail,x as ProfileDetailModal,p as ShareBox,S as SharePopup,A as SkipQuestionOfExpertBtn,w as SocialLinkPreview,H as SourceList,o as SubmitReportForm,z as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,m as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-65d7416d.js";export{d as TogetherDataTransforms,U as UserAvatar}from"./index-3fcc7de2.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-f11e41fe.js";import"react";import"./Plus-f7c5618a.js";import"./tslib.es6-2cb84ad8.js";import"@mantine/core";import"./theme-23782329.js";import"./translationsContext-5ab0d4b4.js";import"string-format";import"./index-27926bb9.js";import"styled-components";import"./useTranslations-71150e1d.js";import"innertext";import"./index-c83e2c6d.js";import"./WhatsApp-712a2952.js";import"./useUniqueId-871437b9.js";import"./index-d0c1cd58.js";import"@mantine/hooks";import"./index-7bc42cef.js";import"./index-11ddf8b9.js";import"date-fns/locale";import"./Subot-56771801.js";import"./isProduction-6599ce88.js";import"dayjs";import"./utils-1ad4f186.js";import"@mantine/carousel";import"classnames";import"@mantine/dates";import"./index-1979f711.js";import"./index.styles-3ff4ce8e.js";import"./constants-2b9cc123.js";import"./animation-3f2b6f75.js";import"react-keyed-flatten-children";import"./paths-a1da3d54.js";import"./index-6a968a24.js";import"lodash/debounce";import"react-contenteditable";import"./index-ac8ebb4a.js";import"./cookieHelper-0c215a0b.js";import"react-dom";import"./number-d5c1e150.js";import"date-fns";import"dayjs/plugin/relativeTime";import"./index-a7a6f2f8.js";import"./routing-c72cf84b.js";import"./utils-0f6dd8a5.js";import"./index.styled-f2aff174.js";import"./index-7f1f7516.js";import"slugify";
1
+ export{f as CardAuthor,C as CardLink,B as CardPost,D as CardPostPopoverMore,b as CardReactions,E as CardReply,F as CardReplyPopover,g as CreateNewPostContent,h as CreatePostDescription,i as CreatePostTitle,r as ImagePreviewPopup,I as InputCommentBar,d as LabelPin,L as LabelSortPin,e as LabelSorting,G as PopoverMenu,P as PopupDanger,k as PopupDoctor,j as PopupExpert,n as PopupFrame,l as PopupHospital,q as PostContent,v as PostImagePreview,s as PostSingleImageViewPopup,y as ProfileDetail,x as ProfileDetailModal,p as ShareBox,S as SharePopup,A as SkipQuestionOfExpertBtn,w as SocialLinkPreview,H as SourceList,o as SubmitReportForm,z as TabNameInProfileDetail,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,m as TopicSelectList,V as VerifiedTag,u as useTogetherAuthRequiredAction}from"./types-8e137b89.js";export{d as TogetherDataTransforms,U as UserAvatar}from"./index-5db9b9d7.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants}from"./utils-3e125f1e.js";import"react";import"./Plus-0795a68c.js";import"./tslib.es6-16e6bdc9.js";import"@mantine/core";import"./theme-dab2950f.js";import"./translationsContext-5a2101f0.js";import"string-format";import"./index-fe314c0f.js";import"styled-components";import"./useTranslations-78d82c21.js";import"innertext";import"./index-36467b48.js";import"./WhatsApp-c7fd561d.js";import"./index-0ce3ea30.js";import"@mantine/hooks";import"./index-5222461b.js";import"./index-1c858659.js";import"date-fns/locale";import"./Subot-e1ee8861.js";import"./isProduction-9fe75b7e.js";import"dayjs";import"./utils-f69a5c66.js";import"@mantine/carousel";import"classnames";import"@mantine/dates";import"./index-a9cbc4b7.js";import"./index.styles-fa4052da.js";import"./constants-d7aa1c1c.js";import"./animation-70b8e1f2.js";import"react-keyed-flatten-children";import"./paths-be7ff55f.js";import"./index-77b369f0.js";import"lodash/debounce";import"react-contenteditable";import"./index-ed7346f2.js";import"./cookieHelper-2017148d.js";import"react-dom";import"./number-07ae3046.js";import"date-fns";import"dayjs/plugin/relativeTime";import"./index-47b11c19.js";import"./routing-7c6d65ae.js";import"./utils-f842970f.js";import"./index.styled-500647b4.js";import"./index-754b44fc.js";import"slugify";