@hhgtech/hhg-components 1.29.310 → 1.29.311-beta-1

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 (510) hide show
  1. package/README.md +2 -0
  2. package/build/{LastPeriod-bf102301.js → LastPeriod-6aa75bd3.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-ad8bada5.js → MobileBottomNavigationIcon-35bc2dbc.js} +3 -3
  4. package/build/{Spinner-874e7661.js → Spinner-3edd5234.js} +1 -1
  5. package/build/{WhatsApp-34f43ae0.js → WhatsApp-e02be0fb.js} +1 -1
  6. package/build/adapters.js +19 -19
  7. package/build/atoms.js +46 -46
  8. package/build/babyGrowth.js +83 -83
  9. package/build/cache.js +2 -2
  10. package/build/care.js +17 -17
  11. package/build/careBookingSearchBar.js +14 -14
  12. package/build/careBookingSearchBarV2.js +15 -15
  13. package/build/components/mantine/modal/index.d.ts +2 -2
  14. package/build/components/mantine/phone/countrySelect.d.ts +1 -1
  15. package/build/components/mantine/phone/phoneWithCustomCountrySelect.d.ts +1 -0
  16. package/build/components.js +90 -90
  17. package/build/{constants-fa210ca2.js → constants-09fe0cff.js} +1 -1
  18. package/build/constants.js +3 -3
  19. package/build/constantsDomainLocales.js +1 -1
  20. package/build/constantsRiskScreener.js +2 -2
  21. package/build/constantsSite.js +2 -2
  22. package/build/{core-00337849.js → core-f1165d8d.js} +1 -1
  23. package/build/{dataTransform-e2039e2c.js → dataTransform-2421197c.js} +1 -1
  24. package/build/ecom.js +4 -4
  25. package/build/{editor-b96a5104.js → editor-8fc16a4e.js} +11 -11
  26. package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
  27. package/build/embeddedHeathToolCards_babyPoop.js +19 -19
  28. package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
  29. package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
  30. package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
  31. package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  32. package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  33. package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
  34. package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
  35. package/build/esm/{LastPeriod-082d0fab.js → LastPeriod-1bf53a56.js} +1 -1
  36. package/build/esm/{MobileBottomNavigationIcon-dc6eab1c.js → MobileBottomNavigationIcon-67de62af.js} +3 -3
  37. package/build/esm/{Spinner-c76eea1e.js → Spinner-c8f098c6.js} +1 -1
  38. package/build/esm/{WhatsApp-46c87a68.js → WhatsApp-c5b9d80d.js} +1 -1
  39. package/build/esm/adapters.js +19 -19
  40. package/build/esm/atoms.js +46 -46
  41. package/build/esm/babyGrowth.js +83 -83
  42. package/build/esm/cache.js +2 -2
  43. package/build/esm/care.js +17 -17
  44. package/build/esm/careBookingSearchBar.js +14 -14
  45. package/build/esm/careBookingSearchBarV2.js +15 -15
  46. package/build/esm/components/mantine/modal/index.d.ts +2 -2
  47. package/build/esm/components/mantine/phone/countrySelect.d.ts +1 -1
  48. package/build/esm/components/mantine/phone/phoneWithCustomCountrySelect.d.ts +1 -0
  49. package/build/esm/components.js +90 -90
  50. package/build/esm/{constants-dd59b6bb.js → constants-e0416208.js} +1 -1
  51. package/build/esm/constants.js +3 -3
  52. package/build/esm/constantsDomainLocales.js +1 -1
  53. package/build/esm/constantsRiskScreener.js +2 -2
  54. package/build/esm/constantsSite.js +2 -2
  55. package/build/esm/{core-666bc190.js → core-f99efa1a.js} +1 -1
  56. package/build/esm/{dataTransform-490d14d4.js → dataTransform-27bfbb46.js} +1 -1
  57. package/build/esm/ecom.js +4 -4
  58. package/build/esm/{editor-7493c15a.js → editor-2a519968.js} +11 -11
  59. package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
  60. package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
  61. package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
  62. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
  63. package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
  64. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  65. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  66. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
  67. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
  68. package/build/esm/{fixedBottomAdBlock-3af9d1a6.js → fixedBottomAdBlock-93240933.js} +24 -24
  69. package/build/esm/footer.js +21 -21
  70. package/build/esm/gAssets.js +2 -2
  71. package/build/esm/healthToolsCardWrapper.js +18 -18
  72. package/build/esm/healthToolsForm.js +33 -33
  73. package/build/esm/hooks.js +13 -13
  74. package/build/esm/i18n/translationKeys.d.ts +1 -1
  75. package/build/esm/i18n-values/en-PH.js +1 -0
  76. package/build/esm/i18n-values/hi-IN.js +1 -0
  77. package/build/esm/i18n-values/id-ID.js +1 -0
  78. package/build/esm/i18n-values/km-KH.js +2 -1
  79. package/build/esm/i18n-values/ms-MY.js +1 -0
  80. package/build/esm/i18n-values/my-MM.js +1 -0
  81. package/build/esm/i18n-values/th-TH.js +1 -0
  82. package/build/esm/i18n-values/tl-PH.js +1 -0
  83. package/build/esm/i18n-values/vi-VN.js +1 -0
  84. package/build/esm/i18n-values/vi-VN_MB.js +1 -0
  85. package/build/esm/i18n-values/zh-TW.js +1 -0
  86. package/build/esm/i18n.js +2 -2
  87. package/build/esm/i18nV2.js +2 -2
  88. package/build/esm/{index-87a336ce.js → index-011c2b61.js} +6 -6
  89. package/build/esm/{index-03d9fccc.js → index-0123b03e.js} +3 -3
  90. package/build/esm/{index-1eb5a216.js → index-0263bad1.js} +6 -6
  91. package/build/esm/{index-8f6534fd.js → index-06288869.js} +1 -1
  92. package/build/esm/{index-5445b285.js → index-0fa95483.js} +2 -2
  93. package/build/esm/{index-4dd28938.js → index-12d59f14.js} +3 -3
  94. package/build/esm/{index-116e1d31.js → index-20f87432.js} +16 -16
  95. package/build/esm/{index-9720736f.js → index-21e5ae93.js} +3 -3
  96. package/build/esm/{index-28dc6ec9.js → index-28b7498c.js} +2 -2
  97. package/build/esm/{index-385a5498.js → index-29eae795.js} +1 -1
  98. package/build/esm/{index-ca2d4ebe.js → index-2a18d37d.js} +13 -13
  99. package/build/esm/{index-462ab3ff.js → index-2ae7fa04.js} +1 -1
  100. package/build/esm/{index-c2cc5925.js → index-31b91912.js} +17 -17
  101. package/build/esm/{index-0d9f23d4.js → index-32345420.js} +7 -7
  102. package/build/esm/{index-bdc3ceee.js → index-34e6b722.js} +2 -2
  103. package/build/esm/{index-0d4448bd.js → index-354c78be.js} +3 -3
  104. package/build/esm/{index-ddc92a3f.js → index-3974d41d.js} +3 -3
  105. package/build/esm/{index-dbcbef2e.js → index-3f97c3e0.js} +13 -13
  106. package/build/esm/{index-884ab933.js → index-4162f5c7.js} +4 -4
  107. package/build/esm/{index-3e3f60cc.js → index-41c1d529.js} +16 -16
  108. package/build/esm/{index-eca4cedb.js → index-42dae2d5.js} +26 -26
  109. package/build/esm/{index-fde13df0.js → index-4be1c602.js} +21 -21
  110. package/build/esm/{index-7a216561.js → index-4c05882f.js} +13 -13
  111. package/build/esm/{index-2fdf9522.js → index-4d05056e.js} +10 -10
  112. package/build/esm/{index-009d858e.js → index-4d67242f.js} +2 -2
  113. package/build/esm/{index-ceea1f7c.js → index-4e37fd5a.js} +24 -24
  114. package/build/esm/{index-ac3f517e.js → index-516da591.js} +2 -2
  115. package/build/esm/{index-0281f5a6.js → index-55469525.js} +6 -6
  116. package/build/esm/{index-cf86cc99.js → index-5577065b.js} +5 -5
  117. package/build/esm/{index-c5be74bb.js → index-5aa83eb8.js} +18 -18
  118. package/build/esm/{index-b988d9ff.js → index-5abf7a73.js} +6 -6
  119. package/build/esm/{index-ef635844.js → index-63545479.js} +3 -3
  120. package/build/esm/{index-33a44547.js → index-6aae9c6b.js} +30 -30
  121. package/build/esm/{index-797cd5bf.js → index-6e94861a.js} +17 -17
  122. package/build/esm/{index-86bb01db.js → index-72bdca04.js} +2 -2
  123. package/build/esm/{index-ed22a2e5.js → index-769f43e2.js} +11 -11
  124. package/build/esm/{index-64b3fca2.js → index-7c4beac1.js} +13 -13
  125. package/build/esm/{index-50ab695a.js → index-88addba1.js} +15 -15
  126. package/build/esm/{index-8191c1c6.js → index-8a3a9007.js} +2 -2
  127. package/build/esm/{index-d6b0f5c3.js → index-8e3e708a.js} +1 -1
  128. package/build/esm/{index-f1501e7e.js → index-9165a7a1.js} +15 -15
  129. package/build/esm/{index-3084194d.js → index-91ecb0e4.js} +2 -2
  130. package/build/esm/{index-a6272b56.js → index-9b099661.js} +2 -2
  131. package/build/esm/{index-f4896192.js → index-a3b0f1b2.js} +7 -7
  132. package/build/esm/{index-aedceeb0.js → index-a5d3d154.js} +32 -32
  133. package/build/esm/{index-3823402c.js → index-ad45976b.js} +2 -2
  134. package/build/esm/{index-fefe4cc8.js → index-ade23bd1.js} +16 -16
  135. package/build/esm/{index-48fc51fc.js → index-b85d1ef5.js} +2 -2
  136. package/build/esm/{index-6f743917.js → index-bc28b2f5.js} +5 -5
  137. package/build/esm/{index-ba1d177d.js → index-bf9e2bef.js} +1 -1
  138. package/build/esm/{index-24133f56.js → index-c4bf5bc1.js} +1 -1
  139. package/build/esm/{index-d204fb64.js → index-c4f5a4ac.js} +1 -1
  140. package/build/esm/{index-b7b7b745.js → index-c7e59de7.js} +3 -3
  141. package/build/esm/{index-af372347.js → index-cdbd0867.js} +18 -18
  142. package/build/esm/{index-cdca49e2.js → index-cf69fdb6.js} +1 -1
  143. package/build/esm/{index-c828cd85.js → index-d5079a81.js} +1 -1
  144. package/build/esm/{index-e2a2571f.js → index-e617c45e.js} +18 -18
  145. package/build/esm/{index-8104f1e3.js → index-f6164cc1.js} +17 -17
  146. package/build/esm/{index-e0996b33.js → index-fe6180a4.js} +20 -20
  147. package/build/esm/{index-e0b4e093.js → index-ffebc2ed.js} +2 -2
  148. package/build/esm/index.js +112 -112
  149. package/build/esm/{labelSorting-71d29d3d.js → labelSorting-78f528cd.js} +4 -4
  150. package/build/esm/lead.js +24 -24
  151. package/build/esm/{logoIcon-37333208.js → logoIcon-173cd1ae.js} +2 -2
  152. package/build/esm/mantine.js +25 -25
  153. package/build/esm/misc.js +16 -16
  154. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  155. package/build/esm/miscGetSocialList.js +8 -8
  156. package/build/esm/miscScreenSizeContext.js +1 -1
  157. package/build/esm/mobileBottomNavigation.js +5 -5
  158. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  159. package/build/esm/molecules.js +69 -69
  160. package/build/esm/moleculesArticleCard.js +6 -6
  161. package/build/esm/moleculesArticleCardV2.js +16 -16
  162. package/build/esm/navigation.js +40 -40
  163. package/build/esm/navigationLogoutPopup.js +9 -9
  164. package/build/esm/navigationProfileButton.js +23 -23
  165. package/build/esm/onboardingV2.js +29 -29
  166. package/build/esm/organisms.js +44 -44
  167. package/build/esm/{post-1d607021.js → post-63500f36.js} +2 -2
  168. package/build/esm/profileNavigation.js +19 -19
  169. package/build/esm/progressBar.js +1 -1
  170. package/build/esm/pwg.js +22 -22
  171. package/build/esm/ssoV2/api/paths.d.ts +1 -0
  172. package/build/esm/ssoV2/index.d.ts +8 -0
  173. package/build/esm/ssoV2/screens/components/progressBar.d.ts +14 -0
  174. package/build/esm/ssoV2/screens/components/progressBar.utils.d.ts +6 -0
  175. package/build/esm/ssoV2/screens/components/setupLater.d.ts +6 -0
  176. package/build/esm/ssoV2/screens/setup/otherSetup.d.ts +1 -1
  177. package/build/esm/ssoV2/ssoStateManager/store.d.ts +14 -0
  178. package/build/esm/ssoV2.js +474 -267
  179. package/build/esm/{store-c7b445f5.js → store-487a7b12.js} +24 -5
  180. package/build/esm/subot.js +33 -33
  181. package/build/esm/surveyOrPremiumBanner.js +31 -31
  182. package/build/esm/surveyQuestionCard.js +10 -10
  183. package/build/esm/{surveyThankyouCard-9fd36cf3.js → surveyThankyouCard-f9115601.js} +5 -5
  184. package/build/esm/together.js +53 -53
  185. package/build/esm/togetherApiUtils.js +4 -4
  186. package/build/esm/togetherAtoms.js +30 -30
  187. package/build/esm/togetherComponentGlobalContext.js +4 -4
  188. package/build/esm/togetherMolecules.js +48 -48
  189. package/build/esm/togetherMoleculesCardAuthor.js +27 -27
  190. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  191. package/build/esm/togetherMoleculesProfileDetail.js +37 -37
  192. package/build/esm/togetherOrganisms.js +47 -47
  193. package/build/esm/togetherRichTextEditor.js +17 -17
  194. package/build/esm/togetherShareBox.js +10 -10
  195. package/build/esm/{treePopoverMenu-efe352e5.js → treePopoverMenu-4195000d.js} +19 -19
  196. package/build/esm/{types-416bf730.js → types-abff4a35.js} +2 -2
  197. package/build/esm/types.js +2 -2
  198. package/build/esm/{useCategory-16021e28.js → useCategory-5c19fe97.js} +5 -5
  199. package/build/esm/{useHealthToolCache-3854d5ed.js → useHealthToolCache-2366d683.js} +1 -1
  200. package/build/esm/{useMantineLocale-07ea4cf6.js → useMantineLocale-d8cddb30.js} +6 -6
  201. package/build/esm/{usePlacesAutocomplete-4996a3c9.js → usePlacesAutocomplete-4ccbb3f6.js} +1 -1
  202. package/build/esm/{useScreenSize-02adc177.js → useScreenSize-e4d03c6d.js} +2 -2
  203. package/build/esm/useTogetherAuthRequiredAction.js +9 -9
  204. package/build/esm/{utils-8e7408f2.js → utils-4245844b.js} +3 -3
  205. package/build/esm/{utils-2f47732f.js → utils-43ca4117.js} +2 -2
  206. package/build/esm/{utils-483662f7.js → utils-f726d1d7.js} +2 -2
  207. package/build/esm/vaccination.js +21 -21
  208. package/build/{fixedBottomAdBlock-6b461854.js → fixedBottomAdBlock-678b5855.js} +24 -24
  209. package/build/footer.js +21 -21
  210. package/build/gAssets.js +2 -2
  211. package/build/healthToolsCardWrapper.js +18 -18
  212. package/build/healthToolsForm.js +33 -33
  213. package/build/hooks.js +13 -13
  214. package/build/i18n/translationKeys.d.ts +1 -1
  215. package/build/i18n-values/en-PH.js +1 -0
  216. package/build/i18n-values/hi-IN.js +1 -0
  217. package/build/i18n-values/id-ID.js +1 -0
  218. package/build/i18n-values/km-KH.js +2 -1
  219. package/build/i18n-values/ms-MY.js +1 -0
  220. package/build/i18n-values/my-MM.js +1 -0
  221. package/build/i18n-values/th-TH.js +1 -0
  222. package/build/i18n-values/tl-PH.js +1 -0
  223. package/build/i18n-values/vi-VN.js +1 -0
  224. package/build/i18n-values/vi-VN_MB.js +1 -0
  225. package/build/i18n-values/zh-TW.js +1 -0
  226. package/build/i18n.js +1 -1
  227. package/build/i18nV2.js +1 -1
  228. package/build/{index-de85ffcc.js → index-0c955ff2.js} +16 -16
  229. package/build/{index-a4b8bb7e.js → index-18d5eaef.js} +30 -30
  230. package/build/{index-0c66ee32.js → index-1a1b73a9.js} +3 -3
  231. package/build/{index-c371b9cb.js → index-1a319b87.js} +1 -1
  232. package/build/{index-ffa7a87f.js → index-20c597a1.js} +1 -1
  233. package/build/{index-072bee2e.js → index-25165fdd.js} +2 -2
  234. package/build/{index-3a611dae.js → index-27c5864b.js} +1 -1
  235. package/build/{index-d341569b.js → index-2eb072ac.js} +3 -3
  236. package/build/{index-440e211b.js → index-336f66b6.js} +6 -6
  237. package/build/{index-6395212c.js → index-3410f69b.js} +20 -20
  238. package/build/{index-fc91b56e.js → index-35e6b371.js} +17 -17
  239. package/build/{index-1bbe12bd.js → index-36f2b38e.js} +16 -16
  240. package/build/{index-8791c1c2.js → index-43e8d97c.js} +10 -10
  241. package/build/{index-0853b3cd.js → index-488e84ed.js} +21 -21
  242. package/build/{index-2123a072.js → index-52e72f30.js} +32 -32
  243. package/build/{index-2dd41ae9.js → index-5389dac4.js} +1 -1
  244. package/build/{index-a525c4cd.js → index-55598b87.js} +13 -13
  245. package/build/{index-d1343759.js → index-58917eb3.js} +3 -3
  246. package/build/{index-a5772208.js → index-592ff95a.js} +7 -7
  247. package/build/{index-5fc2cd51.js → index-5f56e01d.js} +2 -2
  248. package/build/{index-e686ca2a.js → index-62943ea5.js} +1 -1
  249. package/build/{index-d87b818e.js → index-6696ad89.js} +11 -11
  250. package/build/{index-b8961d1b.js → index-67bbdbb1.js} +2 -2
  251. package/build/{index-0bd3e14a.js → index-69047269.js} +13 -13
  252. package/build/{index-ef9025b3.js → index-6cf8b249.js} +5 -5
  253. package/build/{index-d7792b63.js → index-7135f18d.js} +18 -18
  254. package/build/{index-27aafa10.js → index-738bdffb.js} +1 -1
  255. package/build/{index-e7a03912.js → index-756fea6b.js} +16 -16
  256. package/build/{index-0450113e.js → index-8409422a.js} +13 -13
  257. package/build/{index-eeb534d4.js → index-887c1c29.js} +15 -15
  258. package/build/{index-19186e71.js → index-8de516bd.js} +3 -3
  259. package/build/{index-a06fe154.js → index-91346989.js} +26 -26
  260. package/build/{index-b54767aa.js → index-91e216ab.js} +2 -2
  261. package/build/{index-9f8fa338.js → index-9320f90c.js} +2 -2
  262. package/build/{index-1f1f8ee2.js → index-93370511.js} +17 -17
  263. package/build/{index-62a5386c.js → index-9968dbee.js} +6 -6
  264. package/build/{index-3392cffa.js → index-b0170fde.js} +24 -24
  265. package/build/{index-6f8821b3.js → index-b0e0926c.js} +3 -3
  266. package/build/{index-5eb26cff.js → index-b2fe78be.js} +1 -1
  267. package/build/{index-ebae6258.js → index-b3d85b3d.js} +18 -18
  268. package/build/{index-1ad5fb8c.js → index-b650afab.js} +2 -2
  269. package/build/{index-52213846.js → index-b71d5002.js} +2 -2
  270. package/build/{index-e819c506.js → index-c5393ae2.js} +7 -7
  271. package/build/{index-51dfe588.js → index-c8193e90.js} +3 -3
  272. package/build/{index-a09d9e3a.js → index-c8fb429a.js} +2 -2
  273. package/build/{index-ce0b4d62.js → index-c957b095.js} +1 -1
  274. package/build/{index-de8619b3.js → index-c96b819e.js} +2 -2
  275. package/build/{index-89a13973.js → index-cfcd6a21.js} +6 -6
  276. package/build/{index-3da24603.js → index-d261b04c.js} +18 -18
  277. package/build/{index-f50575bf.js → index-d44c15d7.js} +2 -2
  278. package/build/{index-b3c64944.js → index-d899cf05.js} +1 -1
  279. package/build/{index-cf8f7e2b.js → index-dccd5c99.js} +3 -3
  280. package/build/{index-98e525ee.js → index-e3e4c118.js} +4 -4
  281. package/build/{index-2f000aea.js → index-e478d654.js} +5 -5
  282. package/build/{index-5f0a74c3.js → index-e74ef826.js} +15 -15
  283. package/build/{index-0bae09f3.js → index-f7c9b9cd.js} +13 -13
  284. package/build/{index-6fc42bd7.js → index-fc10b479.js} +6 -6
  285. package/build/{index-6fba8121.js → index-fcb5bd92.js} +2 -2
  286. package/build/{index-dbba4167.js → index-fcdd2edb.js} +2 -2
  287. package/build/{index-95c6b09e.js → index-fda559fa.js} +17 -17
  288. package/build/index.js +112 -112
  289. package/build/{labelSorting-ee9dbfed.js → labelSorting-8f6dc43f.js} +4 -4
  290. package/build/lead.js +24 -24
  291. package/build/{logoIcon-bdd83bfe.js → logoIcon-e54bd797.js} +2 -2
  292. package/build/mantine.js +22 -22
  293. package/build/misc.js +16 -16
  294. package/build/miscGetDynamicHealthTool.js +4 -4
  295. package/build/miscGetSocialList.js +8 -8
  296. package/build/miscScreenSizeContext.js +1 -1
  297. package/build/mobileBottomNavigation.js +5 -5
  298. package/build/mobileBottomNavigationIcon.js +5 -5
  299. package/build/molecules.js +69 -69
  300. package/build/moleculesArticleCard.js +6 -6
  301. package/build/moleculesArticleCardV2.js +16 -16
  302. package/build/navigation.js +40 -40
  303. package/build/navigationLogoutPopup.js +9 -9
  304. package/build/navigationProfileButton.js +23 -23
  305. package/build/onboardingV2.js +28 -28
  306. package/build/organisms.js +44 -44
  307. package/build/{post-68d9e129.js → post-74688ad2.js} +2 -2
  308. package/build/profileNavigation.js +19 -19
  309. package/build/progressBar.js +1 -1
  310. package/build/pwg.js +22 -22
  311. package/build/ssoV2/api/paths.d.ts +1 -0
  312. package/build/ssoV2/index.d.ts +8 -0
  313. package/build/ssoV2/screens/components/progressBar.d.ts +14 -0
  314. package/build/ssoV2/screens/components/progressBar.utils.d.ts +6 -0
  315. package/build/ssoV2/screens/components/setupLater.d.ts +6 -0
  316. package/build/ssoV2/screens/setup/otherSetup.d.ts +1 -1
  317. package/build/ssoV2/ssoStateManager/store.d.ts +14 -0
  318. package/build/ssoV2.js +471 -264
  319. package/build/{store-b6e93a3e.js → store-6e91182d.js} +26 -4
  320. package/build/subot.js +32 -32
  321. package/build/surveyOrPremiumBanner.js +31 -31
  322. package/build/surveyQuestionCard.js +10 -10
  323. package/build/{surveyThankyouCard-a2b371a5.js → surveyThankyouCard-57e6c1e1.js} +5 -5
  324. package/build/together.js +53 -53
  325. package/build/togetherApiUtils.js +4 -4
  326. package/build/togetherAtoms.js +30 -30
  327. package/build/togetherComponentGlobalContext.js +4 -4
  328. package/build/togetherMolecules.js +48 -48
  329. package/build/togetherMoleculesCardAuthor.js +27 -27
  330. package/build/togetherMoleculesPostImagePreview.js +11 -11
  331. package/build/togetherMoleculesProfileDetail.js +37 -37
  332. package/build/togetherOrganisms.js +47 -47
  333. package/build/togetherRichTextEditor.js +17 -17
  334. package/build/togetherShareBox.js +10 -10
  335. package/build/{treePopoverMenu-c9756393.js → treePopoverMenu-f204d844.js} +19 -19
  336. package/build/{types-2f4d9816.js → types-5060522d.js} +2 -2
  337. package/build/types.js +2 -2
  338. package/build/{useCategory-1a397510.js → useCategory-f4ca2b73.js} +5 -5
  339. package/build/{useHealthToolCache-9c18bdec.js → useHealthToolCache-5219ce44.js} +1 -1
  340. package/build/{useMantineLocale-e6ec128f.js → useMantineLocale-8c2720be.js} +6 -6
  341. package/build/{usePlacesAutocomplete-f3777df5.js → usePlacesAutocomplete-d2020c21.js} +1 -1
  342. package/build/{useScreenSize-6405c8d7.js → useScreenSize-bba57188.js} +2 -2
  343. package/build/useTogetherAuthRequiredAction.js +9 -9
  344. package/build/{utils-649a6c1a.js → utils-1cee05ac.js} +2 -2
  345. package/build/{utils-9d21393e.js → utils-4abda4aa.js} +3 -3
  346. package/build/{utils-a6a14827.js → utils-9bd88d5a.js} +2 -2
  347. package/build/vaccination.js +21 -21
  348. package/package.json +1 -1
  349. /package/build/{BMI_BOYS.percentile.monthly-2bc64611.js → BMI_BOYS.percentile.monthly-720dd1d0.js} +0 -0
  350. /package/build/{BMI_BOYS.percentile.weekly-1a794178.js → BMI_BOYS.percentile.weekly-b4f8e6a0.js} +0 -0
  351. /package/build/{BMI_BOYS.percentile.yearly-58472c0f.js → BMI_BOYS.percentile.yearly-4d79a836.js} +0 -0
  352. /package/build/{BMI_BOYS.zscore.monthly-ae3ff525.js → BMI_BOYS.zscore.monthly-2939cfda.js} +0 -0
  353. /package/build/{BMI_BOYS.zscore.weekly-8a3e7cb1.js → BMI_BOYS.zscore.weekly-ab279fdf.js} +0 -0
  354. /package/build/{BMI_BOYS.zscore.yearly-56e256cf.js → BMI_BOYS.zscore.yearly-92b2e399.js} +0 -0
  355. /package/build/{BMI_GIRLS.percentile.monthly-fb51b8cc.js → BMI_GIRLS.percentile.monthly-44f6636b.js} +0 -0
  356. /package/build/{BMI_GIRLS.percentile.weekly-c02c4d4d.js → BMI_GIRLS.percentile.weekly-a6c50cf6.js} +0 -0
  357. /package/build/{BMI_GIRLS.percentile.yearly-94e03770.js → BMI_GIRLS.percentile.yearly-d8f02609.js} +0 -0
  358. /package/build/{BMI_GIRLS.zscore.monthly-fb669b62.js → BMI_GIRLS.zscore.monthly-0490c190.js} +0 -0
  359. /package/build/{BMI_GIRLS.zscore.weekly-6339f708.js → BMI_GIRLS.zscore.weekly-8f1328b4.js} +0 -0
  360. /package/build/{BMI_GIRLS.zscore.yearly-0bfa399d.js → BMI_GIRLS.zscore.yearly-f6ef5777.js} +0 -0
  361. /package/build/{ChevronDown-aa4e9915.js → ChevronDown-ee5a75a8.js} +0 -0
  362. /package/build/{Close-49af07f7.js → Close-7a821cb6.js} +0 -0
  363. /package/build/{Google-d68f1d9f.js → Google-8931d3a8.js} +0 -0
  364. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-a76666f9.js → HEAD CIRCUM_BOYS.percentile.monthly-603b7d6a.js} +0 -0
  365. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-cfc42b2a.js → HEAD CIRCUM_BOYS.percentile.weekly-99208b89.js} +0 -0
  366. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-4ea3be2f.js → HEAD CIRCUM_BOYS.percentile.yearly-2949de66.js} +0 -0
  367. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-3b0c0c14.js → HEAD CIRCUM_BOYS.zscore.monthly-416db3fc.js} +0 -0
  368. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-ac84eaa7.js → HEAD CIRCUM_BOYS.zscore.weekly-de1fd6a8.js} +0 -0
  369. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-b42c2f92.js → HEAD CIRCUM_BOYS.zscore.yearly-867ecbe5.js} +0 -0
  370. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-a2b52042.js → HEAD CIRCUM_GIRLS.percentile.monthly-3dd9f719.js} +0 -0
  371. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-62fa3e5d.js → HEAD CIRCUM_GIRLS.percentile.weekly-81b52d56.js} +0 -0
  372. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-c6b1e11d.js → HEAD CIRCUM_GIRLS.percentile.yearly-d1feeef9.js} +0 -0
  373. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-a2b2377d.js → HEAD CIRCUM_GIRLS.zscore.monthly-42b732c1.js} +0 -0
  374. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-b12734cb.js → HEAD CIRCUM_GIRLS.zscore.weekly-658d9c0d.js} +0 -0
  375. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-017edf0b.js → HEAD CIRCUM_GIRLS.zscore.yearly-6e37e478.js} +0 -0
  376. /package/build/{HEIGHT_BOYS.percentile.monthly-f1741fba.js → HEIGHT_BOYS.percentile.monthly-ae15d956.js} +0 -0
  377. /package/build/{HEIGHT_BOYS.percentile.weekly-c4c2a3b6.js → HEIGHT_BOYS.percentile.weekly-9399af4c.js} +0 -0
  378. /package/build/{HEIGHT_BOYS.percentile.yearly-70ea45f9.js → HEIGHT_BOYS.percentile.yearly-d32848d9.js} +0 -0
  379. /package/build/{HEIGHT_BOYS.zscore.monthly-023189c7.js → HEIGHT_BOYS.zscore.monthly-25f33c91.js} +0 -0
  380. /package/build/{HEIGHT_BOYS.zscore.weekly-1a445d6a.js → HEIGHT_BOYS.zscore.weekly-d91b0d4a.js} +0 -0
  381. /package/build/{HEIGHT_BOYS.zscore.yearly-3f2155c4.js → HEIGHT_BOYS.zscore.yearly-0b861214.js} +0 -0
  382. /package/build/{HEIGHT_GIRLS.percentile.monthly-bc55a691.js → HEIGHT_GIRLS.percentile.monthly-e60f6f20.js} +0 -0
  383. /package/build/{HEIGHT_GIRLS.percentile.weekly-6c639055.js → HEIGHT_GIRLS.percentile.weekly-7301b9f8.js} +0 -0
  384. /package/build/{HEIGHT_GIRLS.percentile.yearly-77ddcabc.js → HEIGHT_GIRLS.percentile.yearly-8ac57abd.js} +0 -0
  385. /package/build/{HEIGHT_GIRLS.zscore.monthly-d3ac795a.js → HEIGHT_GIRLS.zscore.monthly-18b61010.js} +0 -0
  386. /package/build/{HEIGHT_GIRLS.zscore.weekly-b59e0ca6.js → HEIGHT_GIRLS.zscore.weekly-36e351eb.js} +0 -0
  387. /package/build/{HEIGHT_GIRLS.zscore.yearly-c33ea8b9.js → HEIGHT_GIRLS.zscore.yearly-74e4575a.js} +0 -0
  388. /package/build/{Locale-bd14c9e1.js → Locale-49f73d3d.js} +0 -0
  389. /package/build/{Visible-480ace09.js → Visible-c455e0a6.js} +0 -0
  390. /package/build/{WEIGHT_BOYS.percentile.monthly-8edee43b.js → WEIGHT_BOYS.percentile.monthly-c775bdeb.js} +0 -0
  391. /package/build/{WEIGHT_BOYS.percentile.weekly-34358ecf.js → WEIGHT_BOYS.percentile.weekly-fea9e600.js} +0 -0
  392. /package/build/{WEIGHT_BOYS.percentile.yearly-b65cf0ef.js → WEIGHT_BOYS.percentile.yearly-ad142f6b.js} +0 -0
  393. /package/build/{WEIGHT_BOYS.zscore.monthly-414cdc73.js → WEIGHT_BOYS.zscore.monthly-93eea704.js} +0 -0
  394. /package/build/{WEIGHT_BOYS.zscore.weekly-c2b08349.js → WEIGHT_BOYS.zscore.weekly-02a6963f.js} +0 -0
  395. /package/build/{WEIGHT_BOYS.zscore.yearly-56dd794c.js → WEIGHT_BOYS.zscore.yearly-421c922b.js} +0 -0
  396. /package/build/{WEIGHT_GIRLS.percentile.monthly-4d0b3483.js → WEIGHT_GIRLS.percentile.monthly-5be4b9d9.js} +0 -0
  397. /package/build/{WEIGHT_GIRLS.percentile.weekly-08a53800.js → WEIGHT_GIRLS.percentile.weekly-906192f0.js} +0 -0
  398. /package/build/{WEIGHT_GIRLS.percentile.yearly-902227bf.js → WEIGHT_GIRLS.percentile.yearly-f59b21fc.js} +0 -0
  399. /package/build/{WEIGHT_GIRLS.zscore.monthly-84e95bfc.js → WEIGHT_GIRLS.zscore.monthly-f0bc115c.js} +0 -0
  400. /package/build/{WEIGHT_GIRLS.zscore.weekly-13cb4adc.js → WEIGHT_GIRLS.zscore.weekly-48871a07.js} +0 -0
  401. /package/build/{WEIGHT_GIRLS.zscore.yearly-19a757a6.js → WEIGHT_GIRLS.zscore.yearly-561c83a1.js} +0 -0
  402. /package/build/{animation-19e6a7bb.js → animation-d677aefd.js} +0 -0
  403. /package/build/{constants-abf9a9ae.js → constants-0d5c1a0c.js} +0 -0
  404. /package/build/{constants-754a2443.js → constants-48da0702.js} +0 -0
  405. /package/build/{constants-050599c6.js → constants-d3ac020b.js} +0 -0
  406. /package/build/{dataTransform-64023d00.js → dataTransform-252ba81c.js} +0 -0
  407. /package/build/{doctor-26b75011.js → doctor-0e550854.js} +0 -0
  408. /package/build/esm/{BMI_BOYS.percentile.monthly-8af9f7ed.js → BMI_BOYS.percentile.monthly-4904aff0.js} +0 -0
  409. /package/build/esm/{BMI_BOYS.percentile.weekly-f6d7cf47.js → BMI_BOYS.percentile.weekly-b7eee7a5.js} +0 -0
  410. /package/build/esm/{BMI_BOYS.percentile.yearly-109b0941.js → BMI_BOYS.percentile.yearly-a06da176.js} +0 -0
  411. /package/build/esm/{BMI_BOYS.zscore.monthly-bf42d27a.js → BMI_BOYS.zscore.monthly-5a67daa9.js} +0 -0
  412. /package/build/esm/{BMI_BOYS.zscore.weekly-c7c9ee32.js → BMI_BOYS.zscore.weekly-3220edd8.js} +0 -0
  413. /package/build/esm/{BMI_BOYS.zscore.yearly-1c44a03d.js → BMI_BOYS.zscore.yearly-d2414f67.js} +0 -0
  414. /package/build/esm/{BMI_GIRLS.percentile.monthly-571f181d.js → BMI_GIRLS.percentile.monthly-2f8a1fd5.js} +0 -0
  415. /package/build/esm/{BMI_GIRLS.percentile.weekly-12487d31.js → BMI_GIRLS.percentile.weekly-a2697025.js} +0 -0
  416. /package/build/esm/{BMI_GIRLS.percentile.yearly-4e831390.js → BMI_GIRLS.percentile.yearly-0d29fd19.js} +0 -0
  417. /package/build/esm/{BMI_GIRLS.zscore.monthly-188c8853.js → BMI_GIRLS.zscore.monthly-cdb93c40.js} +0 -0
  418. /package/build/esm/{BMI_GIRLS.zscore.weekly-f1c81e86.js → BMI_GIRLS.zscore.weekly-cc732e5c.js} +0 -0
  419. /package/build/esm/{BMI_GIRLS.zscore.yearly-08fc6437.js → BMI_GIRLS.zscore.yearly-c10f4da4.js} +0 -0
  420. /package/build/esm/{ChevronDown-99cd0a81.js → ChevronDown-55b2b21a.js} +0 -0
  421. /package/build/esm/{Close-36c0e89a.js → Close-1a966a3e.js} +0 -0
  422. /package/build/esm/{Google-92682157.js → Google-5d9ab9f1.js} +0 -0
  423. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-98838ee5.js → HEAD CIRCUM_BOYS.percentile.monthly-65ebdfc6.js} +0 -0
  424. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-10fc6540.js → HEAD CIRCUM_BOYS.percentile.weekly-58ef5c13.js} +0 -0
  425. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-64bde947.js → HEAD CIRCUM_BOYS.percentile.yearly-8682ae08.js} +0 -0
  426. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-9865bf8d.js → HEAD CIRCUM_BOYS.zscore.monthly-1220e1a2.js} +0 -0
  427. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-88ad0c06.js → HEAD CIRCUM_BOYS.zscore.weekly-425a6761.js} +0 -0
  428. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-af8b1b6a.js → HEAD CIRCUM_BOYS.zscore.yearly-f1b0f8f7.js} +0 -0
  429. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-4928c051.js → HEAD CIRCUM_GIRLS.percentile.monthly-6f895d9c.js} +0 -0
  430. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-41d8019e.js → HEAD CIRCUM_GIRLS.percentile.weekly-96189d33.js} +0 -0
  431. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-cc28a1a9.js → HEAD CIRCUM_GIRLS.percentile.yearly-79284d86.js} +0 -0
  432. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-913ed954.js → HEAD CIRCUM_GIRLS.zscore.monthly-a1d67af8.js} +0 -0
  433. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-995e7da7.js → HEAD CIRCUM_GIRLS.zscore.weekly-7e13ab18.js} +0 -0
  434. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-b299a7d5.js → HEAD CIRCUM_GIRLS.zscore.yearly-4a0fb595.js} +0 -0
  435. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-2befd4ce.js → HEIGHT_BOYS.percentile.monthly-0d3e762d.js} +0 -0
  436. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-e5518601.js → HEIGHT_BOYS.percentile.weekly-fc856fce.js} +0 -0
  437. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-980cf112.js → HEIGHT_BOYS.percentile.yearly-f3f48098.js} +0 -0
  438. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-252d6084.js → HEIGHT_BOYS.zscore.monthly-37b6b368.js} +0 -0
  439. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-cfc76a39.js → HEIGHT_BOYS.zscore.weekly-3bac1abf.js} +0 -0
  440. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-1cf35654.js → HEIGHT_BOYS.zscore.yearly-51f1063e.js} +0 -0
  441. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-37195c10.js → HEIGHT_GIRLS.percentile.monthly-5270ae51.js} +0 -0
  442. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-221ac9cc.js → HEIGHT_GIRLS.percentile.weekly-28f81f2a.js} +0 -0
  443. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-4fd39f59.js → HEIGHT_GIRLS.percentile.yearly-5c445f80.js} +0 -0
  444. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-b7e1d64c.js → HEIGHT_GIRLS.zscore.monthly-ff1b7664.js} +0 -0
  445. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-9c5ffc45.js → HEIGHT_GIRLS.zscore.weekly-7c1d7356.js} +0 -0
  446. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-92950ba4.js → HEIGHT_GIRLS.zscore.yearly-670f27fd.js} +0 -0
  447. /package/build/esm/{Locale-88e3696b.js → Locale-88a21a52.js} +0 -0
  448. /package/build/esm/{Visible-1c50290d.js → Visible-c49095b4.js} +0 -0
  449. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-823951df.js → WEIGHT_BOYS.percentile.monthly-7f351f1c.js} +0 -0
  450. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-d5802949.js → WEIGHT_BOYS.percentile.weekly-a6c1b428.js} +0 -0
  451. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-9285f181.js → WEIGHT_BOYS.percentile.yearly-139fcf9c.js} +0 -0
  452. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-5da25e18.js → WEIGHT_BOYS.zscore.monthly-956569bf.js} +0 -0
  453. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-bd3efec8.js → WEIGHT_BOYS.zscore.weekly-8ba61384.js} +0 -0
  454. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-ffd7d195.js → WEIGHT_BOYS.zscore.yearly-1c423672.js} +0 -0
  455. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-7179575e.js → WEIGHT_GIRLS.percentile.monthly-861d4a78.js} +0 -0
  456. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-b48a91f5.js → WEIGHT_GIRLS.percentile.weekly-8764f54f.js} +0 -0
  457. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-5df9dbf5.js → WEIGHT_GIRLS.percentile.yearly-452dc477.js} +0 -0
  458. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-3b70fbe7.js → WEIGHT_GIRLS.zscore.monthly-cd25ef82.js} +0 -0
  459. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-55ec3ef5.js → WEIGHT_GIRLS.zscore.weekly-04aea4d0.js} +0 -0
  460. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-d8d16a65.js → WEIGHT_GIRLS.zscore.yearly-774eca88.js} +0 -0
  461. /package/build/esm/{animation-6ba43f05.js → animation-ca13e361.js} +0 -0
  462. /package/build/esm/{constants-ed2d1422.js → constants-0dbcd429.js} +0 -0
  463. /package/build/esm/{constants-381c5a9b.js → constants-7a8ee2ee.js} +0 -0
  464. /package/build/esm/{constants-7126088d.js → constants-ad79c668.js} +0 -0
  465. /package/build/esm/{dataTransform-fc3b3df7.js → dataTransform-4ca675cd.js} +0 -0
  466. /package/build/esm/{doctor-84b8dd59.js → doctor-58ec7f00.js} +0 -0
  467. /package/build/esm/{index-53ca8997.js → index-203c1c5f.js} +0 -0
  468. /package/build/esm/{index-b20e0116.js → index-7bcf5279.js} +0 -0
  469. /package/build/esm/{index-b43182e4.js → index-92ea2ce7.js} +0 -0
  470. /package/build/esm/{index-6b39a688.js → index-b352753f.js} +0 -0
  471. /package/build/esm/{index-5d1687e2.js → index-c86ee551.js} +0 -0
  472. /package/build/esm/{index-73a1467f.js → index-d046c7fc.js} +0 -0
  473. /package/build/esm/{index-80db9a3d.js → index-d5575a8d.js} +0 -0
  474. /package/build/esm/{index-23d8c6f8.js → index-d8214780.js} +0 -0
  475. /package/build/esm/{index-b4a9511d.js → index-f158fa4c.js} +0 -0
  476. /package/build/esm/{index.styles-c9075be7.js → index.styles-2cbd1eb7.js} +0 -0
  477. /package/build/esm/{localizeNumberFormat-47fddad3.js → localizeNumberFormat-b53cdc9b.js} +0 -0
  478. /package/build/esm/{normalizeLink-010ca347.js → normalizeLink-24d52aa5.js} +0 -0
  479. /package/build/esm/{other-33b4d4a0.js → other-09aeeb91.js} +0 -0
  480. /package/build/esm/{paths-c6f3783e.js → paths-fbc4da23.js} +0 -0
  481. /package/build/esm/{translationsContext-6eb1e527.js → translationsContext-a0106fcb.js} +0 -0
  482. /package/build/esm/{tslib.es6-c84e4384.js → tslib.es6-d88c3b89.js} +0 -0
  483. /package/build/esm/{types-6d15f25c.js → types-c1d7e3fe.js} +0 -0
  484. /package/build/esm/{useIsInit-ceda245d.js → useIsInit-208edd1f.js} +0 -0
  485. /package/build/esm/{useOutsideClick-bdd04199.js → useOutsideClick-90dae7c8.js} +0 -0
  486. /package/build/esm/{useScrollbarSize-8a202c25.js → useScrollbarSize-f846101d.js} +0 -0
  487. /package/build/esm/{useUniqueId-3ea1c9d5.js → useUniqueId-ab1d124a.js} +0 -0
  488. /package/build/esm/{utils-722bd86a.js → utils-a5594c06.js} +0 -0
  489. /package/build/{index-99392e86.js → index-20114de3.js} +0 -0
  490. /package/build/{index-0a468885.js → index-4ecb8f52.js} +0 -0
  491. /package/build/{index-7fd58e9f.js → index-7a37caad.js} +0 -0
  492. /package/build/{index-1806c98f.js → index-7b084899.js} +0 -0
  493. /package/build/{index-ea3147c3.js → index-8e818b2a.js} +0 -0
  494. /package/build/{index-9f67c820.js → index-acf3abe2.js} +0 -0
  495. /package/build/{index-1a26f8e1.js → index-bdc63c1a.js} +0 -0
  496. /package/build/{index-1a9f72cf.js → index-c7dfff8e.js} +0 -0
  497. /package/build/{index-cf561899.js → index-d9cfe3fe.js} +0 -0
  498. /package/build/{index.styles-18c4b28b.js → index.styles-393f1d67.js} +0 -0
  499. /package/build/{localizeNumberFormat-b46b98ec.js → localizeNumberFormat-0a286427.js} +0 -0
  500. /package/build/{normalizeLink-504885b8.js → normalizeLink-ca1bb1d9.js} +0 -0
  501. /package/build/{other-02cf041a.js → other-ab6201ba.js} +0 -0
  502. /package/build/{paths-cb9589ef.js → paths-6b54a7b2.js} +0 -0
  503. /package/build/{translationsContext-1004699f.js → translationsContext-07bca71f.js} +0 -0
  504. /package/build/{tslib.es6-c3f3259f.js → tslib.es6-22334994.js} +0 -0
  505. /package/build/{types-4469d844.js → types-00539d96.js} +0 -0
  506. /package/build/{useIsInit-90107648.js → useIsInit-df5f4b16.js} +0 -0
  507. /package/build/{useOutsideClick-c0691182.js → useOutsideClick-8ed87dbd.js} +0 -0
  508. /package/build/{useScrollbarSize-e3383cad.js → useScrollbarSize-a13c3d03.js} +0 -0
  509. /package/build/{useUniqueId-2418857a.js → useUniqueId-63428d01.js} +0 -0
  510. /package/build/{utils-fe54d063.js → utils-504829b2.js} +0 -0
@@ -1,27 +1,27 @@
1
- import { a as __awaiter, _ as __rest } from './tslib.es6-c84e4384.js';
2
- import React__default, { createContext, useEffect, useState, useMemo, useCallback, forwardRef } from 'react';
3
- import { I as Input, s as styles, O as OTP, f as PasswordInput, R as Radio, E as ErrorBoundary } from './index-ed22a2e5.js';
4
- import { a as useSSOSteps, f as fetchSSOV2Api, w as websiteId, S as SSO_V2_PATHS, c as checkUserExist, u as useSSOV2Store, b as SSOStepTypeType, F as FacebookAppId, G as GoogleAuthClientId, h as handleAuthSuccess, g as getUserInfo, i as isUserFinishedSetup, d as updateUserInfo, r as resetPassword, e as redirect } from './store-c7b445f5.js';
5
- export { u as useSSOV2Store } from './store-c7b445f5.js';
1
+ import { a as __awaiter, _ as __rest } from './tslib.es6-d88c3b89.js';
2
+ import React__default, { createContext, useMemo, useEffect, useState, useCallback, forwardRef } from 'react';
3
+ import { I as Input, s as styles, O as OTP, f as PasswordInput, E as ErrorBoundary } from './index-769f43e2.js';
4
+ import { S as SSOStepTypeType, a as useSSOSteps, u as useSSOV2Store, i as isUserFinishedSetup, f as fetchSSOV2Api, w as websiteId, b as SSO_V2_PATHS, c as checkUserExist, F as FacebookAppId, G as GoogleAuthClientId, h as handleAuthSuccess, g as getUserInfo, d as updateUserInfo, e as isPhoneNotVerifedYet, j as isLoginWithPhoneNotVerifedYet, k as isFlowFinishedSetup, r as resetPassword, l as redirect } from './store-487a7b12.js';
5
+ export { u as useSSOV2Store } from './store-487a7b12.js';
6
6
  import { ChevronLeft } from '@hhgtech/icons/arrow';
7
7
  import { Close, Search } from '@hhgtech/icons/core';
8
- import { Z as ZINDEX_SSO, L as LOCALE_SPECS, S as STATIC_PAGES } from './index-5445b285.js';
9
- import { L as LogoIcon } from './logoIcon-37333208.js';
10
- import { B as Button } from './index-385a5498.js';
11
- import { M as Modal } from './index-ac3f517e.js';
12
- import { Stack, Group, Box } from '@mantine/core';
8
+ import { Z as ZINDEX_SSO, L as LOCALE_SPECS, S as STATIC_PAGES } from './index-0fa95483.js';
9
+ import { L as LogoIcon } from './logoIcon-173cd1ae.js';
10
+ import { B as Button } from './index-29eae795.js';
11
+ import { M as Modal } from './index-516da591.js';
12
+ import { Stack, Flex, Box, Group } from '@mantine/core';
13
13
  import '@mantine/dates';
14
- import './index-462ab3ff.js';
15
- import './index-b43182e4.js';
16
- import { s as showNotification } from './useMantineLocale-07ea4cf6.js';
17
- import { T as Text } from './index-48fc51fc.js';
18
- import { u as useTranslations } from './index-ba1d177d.js';
14
+ import './index-2ae7fa04.js';
15
+ import './index-92ea2ce7.js';
16
+ import { s as showNotification } from './useMantineLocale-d8cddb30.js';
17
+ import { T as Text } from './index-b85d1ef5.js';
18
+ import { u as useTranslations } from './index-bf9e2bef.js';
19
19
  import '@mantine/hooks';
20
- import './utils-722bd86a.js';
21
- import './other-33b4d4a0.js';
22
- import './index-ddc92a3f.js';
23
- import { L as LOCALE } from './Locale-88e3696b.js';
24
- import { G as Google, F as Facebook } from './Google-92682157.js';
20
+ import './utils-a5594c06.js';
21
+ import './other-09aeeb91.js';
22
+ import './index-3974d41d.js';
23
+ import { L as LOCALE } from './Locale-88a21a52.js';
24
+ import { G as Google, F as Facebook } from './Google-5d9ab9f1.js';
25
25
  import { parsePhoneNumber, getCountryCallingCode } from 'react-phone-number-input';
26
26
  import styled from '@emotion/styled';
27
27
  import cn from 'classnames';
@@ -29,28 +29,28 @@ import { CaretDown } from '@hhgtech/icons/other';
29
29
  import debounce from 'lodash/debounce';
30
30
  import throttle from 'lodash/throttle';
31
31
  import Flags from 'react-phone-number-input/flags';
32
- import { u as useScreenSize } from './useScreenSize-02adc177.js';
32
+ import { u as useScreenSize } from './useScreenSize-e4d03c6d.js';
33
33
  import { Drawer } from 'vaul';
34
- import { M as MAPPED_LOCALE } from './utils-2f47732f.js';
35
- import { S as Spoiler } from './index-ef635844.js';
34
+ import { M as MAPPED_LOCALE } from './utils-43ca4117.js';
35
+ import { S as Spoiler } from './index-63545479.js';
36
36
  import { domainLocales } from './constantsDomainLocales.js';
37
37
  import { useForm, yupResolver } from '@mantine/form';
38
38
  import * as yup from 'yup';
39
39
  import dayjs from 'dayjs';
40
- import { D as DatePicker } from './index-1eb5a216.js';
40
+ import { D as DatePicker } from './index-0263bad1.js';
41
41
  import '@mantine/carousel';
42
42
  import './miscTheme.js';
43
- import './useUniqueId-3ea1c9d5.js';
43
+ import './useUniqueId-ab1d124a.js';
44
44
  import './constantsSite.js';
45
45
  import 'zustand';
46
46
  import './constantsIsProduction.js';
47
- import './normalizeLink-010ca347.js';
47
+ import './normalizeLink-24d52aa5.js';
48
48
  import './miscCookieHelper.js';
49
49
  import 'date-fns/locale';
50
50
  import './constantsRiskScreener.js';
51
- import './index.styles-c9075be7.js';
51
+ import './index.styles-2cbd1eb7.js';
52
52
  import '@mantine/notifications';
53
- import './translationsContext-6eb1e527.js';
53
+ import './translationsContext-a0106fcb.js';
54
54
 
55
55
  const SSOStateContext = createContext({
56
56
  locale: LOCALE.Vietnam,
@@ -158,13 +158,195 @@ const BackgroundHeader = () => (React__default.createElement("svg", { width: "29
158
158
  React__default.createElement("stop", { stopColor: "#fff", stopOpacity: "0" }),
159
159
  React__default.createElement("stop", { offset: "1", stopColor: "#fff" })))));
160
160
 
161
+ const isPhoneVerifedAlready = (userInfo, flowData) => {
162
+ var _a;
163
+ if (flowData === null || flowData === void 0 ? void 0 : flowData.metaData) {
164
+ return (_a = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _a === void 0 ? void 0 : _a.is_phone_verified;
165
+ }
166
+ return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone_verified_at) && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone);
167
+ };
168
+ const isSetupFullInfoAlready = (userInfo, flowData) => {
169
+ var _a, _b, _c;
170
+ if (flowData === null || flowData === void 0 ? void 0 : flowData.metaData) {
171
+ return (((_a = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _a === void 0 ? void 0 : _a.is_name) &&
172
+ ((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_gender) &&
173
+ ((_c = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _c === void 0 ? void 0 : _c.is_birthday));
174
+ }
175
+ const hasName = !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.name);
176
+ const hasGender = typeof (userInfo === null || userInfo === void 0 ? void 0 : userInfo.gender) === 'number';
177
+ const hasBirthday = !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.birthday);
178
+ return hasName && hasGender && hasBirthday;
179
+ };
180
+ const isExistUpdateEmailStep = (steps) => {
181
+ return steps.find((s) => s.type === SSOStepTypeType.UPDATE_EMAIL);
182
+ };
183
+
184
+ const isSocialFlowFn = (flowData) => {
185
+ return (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'google' || (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'facebook';
186
+ };
187
+ const isPhoneFlowFn = (flowData) => {
188
+ return ((flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'sms' ||
189
+ (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'zalo' ||
190
+ (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'phone');
191
+ };
192
+ const isEmailFlowFn = (flowData) => {
193
+ return (flowData === null || flowData === void 0 ? void 0 : flowData.method) === 'email';
194
+ };
195
+ const isDisplayProgressBarFn = (flowData, step) => {
196
+ const showProgressBar = (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP ||
197
+ (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.SETUP_FULL ||
198
+ (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.VERIFY_PHONE ||
199
+ (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.PASSWORD ||
200
+ (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.FORGOT_PASSWORD_PHONE ||
201
+ (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.FORGOT_PASSWORD_SETUP ||
202
+ (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.EMAIL ||
203
+ (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.UPDATE_EMAIL;
204
+ const isWhiteListFlow = isSocialFlowFn(flowData) ||
205
+ isPhoneFlowFn(flowData) ||
206
+ isEmailFlowFn(flowData);
207
+ return showProgressBar && isWhiteListFlow;
208
+ };
209
+ const getCurrentStepNumber = (flowData, { steps, currentStepIndex, }, userInfo) => {
210
+ var _a, _b;
211
+ const step = steps[currentStepIndex];
212
+ const isSocialFlow = isSocialFlowFn(flowData);
213
+ const isPhoneFlow = isPhoneFlowFn(flowData);
214
+ const isEmailFlow = isEmailFlowFn(flowData);
215
+ /** Social (Google, Facebook): FIRST => VERIFY_PHONE | OTP => STEP_FULL */
216
+ if (isSocialFlow) {
217
+ const arrSteps = [
218
+ !isPhoneVerifedAlready(userInfo, flowData)
219
+ ? [SSOStepTypeType.VERIFY_PHONE, SSOStepTypeType.OTP]
220
+ : undefined,
221
+ isExistUpdateEmailStep(steps)
222
+ ? (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
223
+ ? SSOStepTypeType.OTP
224
+ : SSOStepTypeType.UPDATE_EMAIL
225
+ : undefined,
226
+ !userInfo || !isUserFinishedSetup(userInfo)
227
+ ? SSOStepTypeType.SETUP_FULL
228
+ : undefined,
229
+ ]
230
+ .flat()
231
+ .filter(Boolean);
232
+ const previousStep = steps[currentStepIndex - 1];
233
+ return [
234
+ arrSteps.length,
235
+ (previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === SSOStepTypeType.UPDATE_EMAIL
236
+ ? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
237
+ : arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
238
+ ];
239
+ }
240
+ if (isPhoneFlow && (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'signup') {
241
+ const arrSteps = [
242
+ !isPhoneVerifedAlready(userInfo, flowData)
243
+ ? SSOStepTypeType.OTP
244
+ : undefined,
245
+ !((_a = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _a === void 0 ? void 0 : _a.is_pass)
246
+ ? SSOStepTypeType.FORGOT_PASSWORD_SETUP
247
+ : undefined,
248
+ !isSetupFullInfoAlready(userInfo, flowData)
249
+ ? SSOStepTypeType.SETUP_FULL
250
+ : undefined,
251
+ ]
252
+ .flat()
253
+ .filter(Boolean);
254
+ return [
255
+ arrSteps.length,
256
+ arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
257
+ ];
258
+ }
259
+ if (isPhoneFlow && (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'login') {
260
+ const arrSteps = [
261
+ SSOStepTypeType.PASSWORD,
262
+ !isPhoneVerifedAlready(userInfo, flowData)
263
+ ? [SSOStepTypeType.FORGOT_PASSWORD_PHONE, SSOStepTypeType.OTP]
264
+ : undefined,
265
+ isExistUpdateEmailStep(steps)
266
+ ? (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
267
+ ? SSOStepTypeType.OTP
268
+ : SSOStepTypeType.UPDATE_EMAIL
269
+ : undefined,
270
+ !isSetupFullInfoAlready(userInfo, flowData)
271
+ ? SSOStepTypeType.SETUP_FULL
272
+ : undefined,
273
+ ]
274
+ .flat()
275
+ .filter(Boolean);
276
+ const previousStep = steps[currentStepIndex - 1];
277
+ return [
278
+ arrSteps.length,
279
+ (previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === SSOStepTypeType.UPDATE_EMAIL
280
+ ? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
281
+ : arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
282
+ ];
283
+ }
284
+ if (isEmailFlow) {
285
+ const hasPasswordStep = !((_b = flowData === null || flowData === void 0 ? void 0 : flowData.metaData) === null || _b === void 0 ? void 0 : _b.is_pass);
286
+ const hasPhoneStep = !isPhoneVerifedAlready(userInfo, flowData);
287
+ const hasSetupFullStep = !isSetupFullInfoAlready(userInfo, flowData);
288
+ if (!hasPasswordStep && !hasPhoneStep && !hasSetupFullStep)
289
+ return [];
290
+ const arrSteps = [
291
+ (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
292
+ ? SSOStepTypeType.OTP
293
+ : SSOStepTypeType.EMAIL,
294
+ hasPasswordStep
295
+ ? SSOStepTypeType.FORGOT_PASSWORD_SETUP
296
+ : SSOStepTypeType.PASSWORD,
297
+ hasPhoneStep
298
+ ? (step === null || step === void 0 ? void 0 : step.type) === SSOStepTypeType.OTP
299
+ ? SSOStepTypeType.OTP
300
+ : SSOStepTypeType.VERIFY_PHONE
301
+ : undefined,
302
+ hasSetupFullStep ? SSOStepTypeType.SETUP_FULL : undefined,
303
+ ]
304
+ .flat()
305
+ .filter(Boolean);
306
+ const previousStep = steps[currentStepIndex - 1];
307
+ return [
308
+ arrSteps.length,
309
+ (previousStep === null || previousStep === void 0 ? void 0 : previousStep.type) === SSOStepTypeType.VERIFY_PHONE
310
+ ? arrSteps.findLastIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1
311
+ : arrSteps.findIndex((type) => type === (step === null || step === void 0 ? void 0 : step.type)) + 1,
312
+ ];
313
+ }
314
+ return [];
315
+ };
316
+ const ProgressBar = () => {
317
+ // const initUserInfo = useRef<UserInfo | undefined | null>()
318
+ const { steps, currentStepIndex } = useSSOSteps();
319
+ const { flowData, userInfo } = useSSOV2Store();
320
+ /** No need update state IF userInfo is changed */
321
+ const initUserInfo = useMemo(() => userInfo, [userInfo]);
322
+ const [totalStepNumber, activeStepNumber] = getCurrentStepNumber(flowData, { steps, currentStepIndex }, initUserInfo);
323
+ if (!activeStepNumber || totalStepNumber === 1)
324
+ return null;
325
+ return (React__default.createElement(Flex, { gap: 2 }, Array.from({ length: totalStepNumber }).map((_, idx) => {
326
+ const currentStepNumber = idx + 1;
327
+ return (React__default.createElement(Box, { key: currentStepNumber, style: {
328
+ width: 'auto',
329
+ height: 2,
330
+ flex: 1,
331
+ borderRadius: 4,
332
+ backgroundColor: currentStepNumber <= activeStepNumber ? '#00B16A' : '#D2D6DC',
333
+ } }));
334
+ })));
335
+ };
336
+
161
337
  const SSOPopupWrapper = ({ children, opened, onClose, }) => {
162
338
  var _a;
163
- const { steps, goBack } = useSSOSteps();
339
+ const { steps, goBack, currentStepIndex } = useSSOSteps();
340
+ const { flowData } = useSSOV2Store();
164
341
  const { locale, tracking } = useSSOState();
165
- const showBack = steps.length > 1;
166
- const showClose = steps.length === 1;
167
- const showLogo = steps.length === 1;
342
+ const currentStep = steps[currentStepIndex];
343
+ const showProgressBar = isDisplayProgressBarFn(flowData, currentStep);
344
+ const showBack = (steps.length > 1 && !showProgressBar) ||
345
+ (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.OTP ||
346
+ (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.PASSWORD ||
347
+ (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.EMAIL;
348
+ const showClose = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.FIRST;
349
+ const showLogo = (steps.length === 1 || showProgressBar) && !showBack;
168
350
  const logoType = (_a = LOCALE_SPECS[locale]) === null || _a === void 0 ? void 0 : _a.LOGO_TYPE;
169
351
  const [closeConfirmOpen, setCloseConfirmOpen] = React__default.useState(false);
170
352
  const onCloseClick = () => {
@@ -207,7 +389,11 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
207
389
  display: 'block',
208
390
  },
209
391
  },
210
- }), withCloseButton: false, zIndex: ZINDEX_SSO },
392
+ }), withCloseButton: false, zIndex: ZINDEX_SSO, overlayProps: {
393
+ 'data-event-label': 'Focus out',
394
+ 'data-event-category': tracking === null || tracking === void 0 ? void 0 : tracking.category,
395
+ 'data-event-action': tracking === null || tracking === void 0 ? void 0 : tracking.action,
396
+ } },
211
397
  React__default.createElement("div", { style: {
212
398
  height: 40,
213
399
  display: 'flex',
@@ -220,7 +406,7 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
220
406
  padding: 8,
221
407
  background: 'white',
222
408
  borderRadius: '100%',
223
- }, onClick: goBack, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "back" },
409
+ }, onClick: goBack, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Back" },
224
410
  React__default.createElement(ChevronLeft, null))),
225
411
  showLogo && (React__default.createElement(LogoIcon, { type: logoType, height: 32, width: 'unset' })),
226
412
  showClose && (React__default.createElement(Button, { variant: "white", style: {
@@ -231,6 +417,7 @@ const SSOPopupWrapper = ({ children, opened, onClose, }) => {
231
417
  borderRadius: '100%',
232
418
  }, onClick: onCloseClick, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Exit" },
233
419
  React__default.createElement(Close, null)))),
420
+ showProgressBar && React__default.createElement(ProgressBar, null),
234
421
  React__default.createElement("div", { style: {
235
422
  flex: 1,
236
423
  } }, children)),
@@ -374,7 +561,10 @@ const SSOEmailScreen = ({ hidden, }) => {
374
561
  const { t } = useTranslations();
375
562
  const [loading, setLoading] = React__default.useState(false);
376
563
  const [errMsg, setErrMsg] = React__default.useState('');
377
- const trackingCategory = `SSO - Sign Up via Email`;
564
+ const { flowData } = useSSOV2Store();
565
+ const trackingCategory = flowData.flow === 'signup'
566
+ ? `SSO - Sign Up via Email`
567
+ : 'SSO - Sign In via Email';
378
568
  const trackingAction = 'Continue With Email';
379
569
  const { setTracking } = useSSOState();
380
570
  useEffect(() => {
@@ -402,6 +592,7 @@ const SSOEmailScreen = ({ hidden, }) => {
402
592
  flowData: {
403
593
  method: 'email',
404
594
  flow: 'login',
595
+ metaData: existRes._data,
405
596
  },
406
597
  });
407
598
  // go to password screen
@@ -419,6 +610,7 @@ const SSOEmailScreen = ({ hidden, }) => {
419
610
  flowData: {
420
611
  method: 'email',
421
612
  flow: 'signup',
613
+ metaData: existRes._data,
422
614
  },
423
615
  });
424
616
  if (!((_b = existRes._data) === null || _b === void 0 ? void 0 : _b.provider)) {
@@ -437,7 +629,7 @@ const SSOEmailScreen = ({ hidden, }) => {
437
629
  config: {
438
630
  email,
439
631
  otpType: 'email',
440
- afterAction: 'setup',
632
+ afterAction: 'forgot',
441
633
  },
442
634
  });
443
635
  goNext();
@@ -1778,7 +1970,7 @@ function CountrySelectWithIcon(_a) {
1778
1970
  var { value, options, className,
1779
1971
  // iconComponent: Icon,
1780
1972
  // getIconAspectRatio,
1781
- arrowComponent: Arrow = DefaultArrowComponent, onChange, disabled, readOnly } = _a, rest = __rest(_a, ["value", "options", "className", "arrowComponent", "onChange", "disabled", "readOnly"]);
1973
+ arrowComponent: Arrow = DefaultArrowComponent, onChange, disabled, readOnly, trackingFn } = _a, rest = __rest(_a, ["value", "options", "className", "arrowComponent", "onChange", "disabled", "readOnly", "trackingFn"]);
1782
1974
  const { t } = useTranslations();
1783
1975
  const [open, setOpen] = useState(false);
1784
1976
  const [modalStyle, setModalStyle] = useState({});
@@ -1862,13 +2054,13 @@ function CountrySelectWithIcon(_a) {
1862
2054
  React__default.createElement(SelectCountryItem, { option: selectedOption, onSelect: (option) => {
1863
2055
  onChange_(option.value);
1864
2056
  setOpen(false);
1865
- } }))),
2057
+ }, trackingFn: trackingFn }))),
1866
2058
  React__default.createElement(Stack, { spacing: 0 },
1867
2059
  React__default.createElement(Text, { size: "s4" }, t('ssov2.first.search.country.all')),
1868
2060
  filteredOptions.map((option) => (React__default.createElement(SelectCountryItem, { option: option, key: option.value, onSelect: (option) => {
1869
2061
  onChange_(option.value);
1870
2062
  setOpen(false);
1871
- }, selected: selectedOption.value === option.value }))))));
2063
+ }, selected: selectedOption.value === option.value, trackingFn: trackingFn }))))));
1872
2064
  const FlagSelected = Flags[selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value];
1873
2065
  return (React__default.createElement(React__default.Fragment, null,
1874
2066
  React__default.createElement("div", { className: "PhoneInputCountry", ref: countryDivRef },
@@ -1932,7 +2124,7 @@ function CountrySelectWithIcon(_a) {
1932
2124
  }, onClick: () => setOpen(false) }),
1933
2125
  React__default.createElement("div", { style: Object.assign({ position: 'fixed', height: 540, top: '100%', left: 0, width: '100%', backgroundColor: 'white', padding: '8px 24px', zIndex: ZINDEX_SSO + 9, borderRadius: 12, boxShadow: '0px 0px 1px 0px #0000000A, 0px 4px 8px 0px #0000000A, 0px 16px 24px 0px #0000000A, 0px 24px 32px 0px #0000000A', overflow: 'auto' }, modalStyle) }, SelectCountryContent))))));
1934
2126
  }
1935
- const SelectCountryItem = ({ option, onSelect, selected, }) => {
2127
+ const SelectCountryItem = ({ option, onSelect, selected, trackingFn, }) => {
1936
2128
  const selectedCallingCode = useMemo(() => {
1937
2129
  if (!option.value)
1938
2130
  return '';
@@ -1943,14 +2135,15 @@ const SelectCountryItem = ({ option, onSelect, selected, }) => {
1943
2135
  return '';
1944
2136
  }, [option.value]);
1945
2137
  const Flag = Flags[option.value];
1946
- return (React__default.createElement(Stack, { sx: {
2138
+ const tracking = (trackingFn === null || trackingFn === void 0 ? void 0 : trackingFn(option)) || {};
2139
+ return (React__default.createElement(Stack, Object.assign({ sx: {
1947
2140
  padding: '0 24px',
1948
2141
  backgroundColor: selected ? '#e3f2ff' : 'transparent',
1949
2142
  ':hover': { backgroundColor: '#F7F9FA' },
1950
2143
  cursor: 'pointer',
1951
2144
  marginLeft: -24,
1952
2145
  marginRight: -24,
1953
- }, justify: "center", onClick: () => onSelect(option) },
2146
+ }, justify: "center", onClick: () => onSelect(option) }, tracking),
1954
2147
  React__default.createElement(Group, { position: "apart", sx: {
1955
2148
  height: 50,
1956
2149
  borderBottom: '1px solid #E4E8EC',
@@ -2002,7 +2195,7 @@ function isSameOptionValue(value1, value2) {
2002
2195
  const PhoneForwardRef = (props, ref) => {
2003
2196
  const { isError, defaultCountry,
2004
2197
  // countries = countriesDefault,
2005
- countryCallingCodeEditable = false, defaultValue, value: valueProps, onChange: onChangeProps, className } = props, inputProps = __rest(props, ["isError", "defaultCountry", "countryCallingCodeEditable", "defaultValue", "value", "onChange", "className"]);
2198
+ countryCallingCodeEditable = false, defaultValue, value: valueProps, onChange: onChangeProps, className, trackingFn } = props, inputProps = __rest(props, ["isError", "defaultCountry", "countryCallingCodeEditable", "defaultValue", "value", "onChange", "className", "trackingFn"]);
2006
2199
  const [value, setValue] = useState(defaultValue || valueProps);
2007
2200
  const [PhoneInputUtils, setPhoneInputUtils] = useState(null);
2008
2201
  const onChange = (val) => {
@@ -2026,7 +2219,7 @@ const PhoneForwardRef = (props, ref) => {
2026
2219
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2027
2220
  ref: ref, value: value, onChange: onChange,
2028
2221
  // countries={countries}
2029
- defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: cn(styles.phoneInput, { isError, [styles.error]: isError }, className), countrySelectComponent: CountrySelectWithIcon }, inputProps)));
2222
+ defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: cn(styles.phoneInput, { isError, [styles.error]: isError }, className), countrySelectComponent: CountrySelectWithIcon, countrySelectProps: { trackingFn } }, inputProps)));
2030
2223
  };
2031
2224
  const PhoneWithCustomCountrySelect = forwardRef(PhoneForwardRef);
2032
2225
 
@@ -2062,11 +2255,12 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2062
2255
  const [errMsg, setErrMsg] = React__default.useState('');
2063
2256
  const { locale, onClose, setTracking } = useSSOState();
2064
2257
  const { addStep, goNext } = useSSOSteps();
2258
+ const { setUserInfo } = useSSOV2Store();
2065
2259
  const [activeTab, setActiveTab] = React__default.useState('login');
2066
2260
  const { legalTextType } = config || {};
2067
2261
  const { t } = useTranslations();
2068
- const trackingCategory = 'Sign In or Sign Up';
2069
- const trackingAction = `SSO - ${activeTab === 'login' ? 'Sign In' : 'Sign Up'}`;
2262
+ const trackingAction = 'Sign In or Sign Up';
2263
+ const trackingCategory = `SSO - ${activeTab === 'login' ? 'Sign In' : 'Sign Up'}`;
2070
2264
  useEffect(() => {
2071
2265
  if (!hidden) {
2072
2266
  setErrMsg('');
@@ -2078,20 +2272,31 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2078
2272
  }, [hidden]);
2079
2273
  const [loading, setLoading] = React__default.useState(false);
2080
2274
  const handleLoginBySocial = (credential, provider) => __awaiter(void 0, void 0, void 0, function* () {
2081
- var _c, _d;
2082
2275
  const res = yield loginBySocial(credential, provider);
2083
2276
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
2084
2277
  handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
2085
2278
  const userInfo = yield getUserInfo();
2279
+ setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
2086
2280
  if ((userInfo === null || userInfo === void 0 ? void 0 : userInfo._status) === 1 && userInfo._data) {
2087
2281
  useSSOV2Store.setState({
2088
2282
  flowData: {
2089
2283
  method: provider,
2090
2284
  },
2091
2285
  });
2092
- if (!isUserFinishedSetup(userInfo._data) ||
2093
- !userInfo._data.phone ||
2094
- !userInfo._data.phone_verified_at) {
2286
+ const isNotHavePhone = !userInfo._data.phone || !userInfo._data.phone_verified_at;
2287
+ if (isNotHavePhone) {
2288
+ useSSOV2Store.setState((f) => ({
2289
+ flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'signup', isVerifyPhone: true }),
2290
+ }));
2291
+ addStep({
2292
+ type: SSOStepTypeType.VERIFY_PHONE,
2293
+ config: {
2294
+ provider: provider,
2295
+ },
2296
+ });
2297
+ goNext();
2298
+ }
2299
+ else if (!isUserFinishedSetup(userInfo._data)) {
2095
2300
  useSSOV2Store.setState((f) => ({
2096
2301
  flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'signup' }),
2097
2302
  }));
@@ -2122,19 +2327,6 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2122
2327
  goNext();
2123
2328
  }
2124
2329
  }
2125
- else if (!((_c = userInfo._data) === null || _c === void 0 ? void 0 : _c.phone_verified_at) ||
2126
- !((_d = userInfo._data) === null || _d === void 0 ? void 0 : _d.phone)) {
2127
- useSSOV2Store.setState((f) => ({
2128
- flowData: Object.assign(Object.assign({}, f.flowData), { flow: 'login', isVerifyPhone: true }),
2129
- }));
2130
- addStep({
2131
- type: SSOStepTypeType.VERIFY_PHONE,
2132
- config: {
2133
- provider: provider,
2134
- },
2135
- });
2136
- goNext();
2137
- }
2138
2330
  else {
2139
2331
  onClose === null || onClose === void 0 ? void 0 : onClose(true);
2140
2332
  }
@@ -2174,7 +2366,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2174
2366
  };
2175
2367
  }, []);
2176
2368
  const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
2177
- var _e, _f;
2369
+ var _c, _d;
2178
2370
  setLoading(true);
2179
2371
  const { areaCode, phoneNumber } = splitPhone(phone);
2180
2372
  if (!areaCode || !phoneNumber || !phone) {
@@ -2183,12 +2375,13 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2183
2375
  }
2184
2376
  const userExist = yield checkUserExist({ phone: phoneNumber });
2185
2377
  if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
2186
- const provider = (_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider;
2187
- if ((_f = userExist._data) === null || _f === void 0 ? void 0 : _f.is_pass) {
2378
+ const provider = (_c = userExist._data) === null || _c === void 0 ? void 0 : _c.provider;
2379
+ if ((_d = userExist._data) === null || _d === void 0 ? void 0 : _d.is_pass) {
2188
2380
  useSSOV2Store.setState({
2189
2381
  flowData: {
2190
2382
  method: 'zalo',
2191
2383
  flow: 'login',
2384
+ metaData: userExist._data,
2192
2385
  },
2193
2386
  });
2194
2387
  addStep({
@@ -2216,6 +2409,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2216
2409
  flowData: {
2217
2410
  method: 'zalo',
2218
2411
  flow: 'signup',
2412
+ metaData: userExist._data,
2219
2413
  },
2220
2414
  });
2221
2415
  addStep({
@@ -2223,7 +2417,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2223
2417
  config: {
2224
2418
  phone,
2225
2419
  otpType: 'phone-zalo',
2226
- afterAction: 'setup',
2420
+ afterAction: 'forgot',
2227
2421
  },
2228
2422
  });
2229
2423
  goNext();
@@ -2235,7 +2429,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2235
2429
  setLoading(false);
2236
2430
  });
2237
2431
  const onClickContinuePhone = () => __awaiter(void 0, void 0, void 0, function* () {
2238
- var _g, _h;
2432
+ var _e, _f;
2239
2433
  setLoading(true);
2240
2434
  const { areaCode, phoneNumber } = splitPhone(phone);
2241
2435
  if (!areaCode || !phoneNumber || !phone) {
@@ -2244,12 +2438,13 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2244
2438
  }
2245
2439
  const userExist = yield checkUserExist({ phone: phoneNumber });
2246
2440
  if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
2247
- const provider = (_g = userExist._data) === null || _g === void 0 ? void 0 : _g.provider;
2248
- if ((_h = userExist._data) === null || _h === void 0 ? void 0 : _h.is_pass) {
2441
+ const provider = (_e = userExist._data) === null || _e === void 0 ? void 0 : _e.provider;
2442
+ if ((_f = userExist._data) === null || _f === void 0 ? void 0 : _f.is_pass) {
2249
2443
  useSSOV2Store.setState({
2250
2444
  flowData: {
2251
2445
  method: 'sms',
2252
2446
  flow: 'login',
2447
+ metaData: userExist._data,
2253
2448
  },
2254
2449
  });
2255
2450
  addStep({
@@ -2277,6 +2472,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2277
2472
  flowData: {
2278
2473
  method: 'sms',
2279
2474
  flow: 'signup',
2475
+ metaData: userExist._data,
2280
2476
  },
2281
2477
  });
2282
2478
  addStep({
@@ -2284,7 +2480,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2284
2480
  config: {
2285
2481
  phone,
2286
2482
  otpType: 'phone-sms',
2287
- afterAction: 'setup',
2483
+ afterAction: 'forgot',
2288
2484
  },
2289
2485
  });
2290
2486
  goNext();
@@ -2296,7 +2492,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2296
2492
  setLoading(false);
2297
2493
  });
2298
2494
  const onClickLoginWithPhone = () => __awaiter(void 0, void 0, void 0, function* () {
2299
- var _j, _k;
2495
+ var _g, _h;
2300
2496
  setLoading(true);
2301
2497
  const { areaCode, phoneNumber } = splitPhone(phone);
2302
2498
  if (!areaCode || !phoneNumber || !phone) {
@@ -2305,7 +2501,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2305
2501
  }
2306
2502
  const userExist = yield checkUserExist({ phone: phoneNumber });
2307
2503
  if ((userExist === null || userExist === void 0 ? void 0 : userExist._status) === 1) {
2308
- if (!userExist._data || !((_j = userExist._data) === null || _j === void 0 ? void 0 : _j.is_pass)) {
2504
+ if (!userExist._data || !((_g = userExist._data) === null || _g === void 0 ? void 0 : _g.is_pass)) {
2309
2505
  showNotification({
2310
2506
  message: t('ssov2.first.noAccountOrPass'),
2311
2507
  type: 'danger',
@@ -2313,11 +2509,12 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2313
2509
  setActiveTab('signup');
2314
2510
  return setLoading(false);
2315
2511
  }
2316
- if ((_k = userExist._data) === null || _k === void 0 ? void 0 : _k.is_pass) {
2512
+ if ((_h = userExist._data) === null || _h === void 0 ? void 0 : _h.is_pass) {
2317
2513
  useSSOV2Store.setState({
2318
2514
  flowData: {
2319
2515
  method: 'phone',
2320
2516
  flow: 'login',
2517
+ metaData: userExist._data,
2321
2518
  },
2322
2519
  });
2323
2520
  addStep({
@@ -2339,7 +2536,7 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2339
2536
  useSSOV2Store.setState({
2340
2537
  flowData: {
2341
2538
  method: 'email',
2342
- flow: 'login',
2539
+ flow: activeTab === 'login' ? 'login' : 'signup',
2343
2540
  },
2344
2541
  });
2345
2542
  addStep({
@@ -2396,7 +2593,17 @@ const SSOFirstScreen = ({ hidden, config, }) => {
2396
2593
  onClickContinueZalo();
2397
2594
  } },
2398
2595
  React__default.createElement(Input.Wrapper, { error: errMsg },
2399
- React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone" }))),
2596
+ React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: phone, onChange: (value) => setPhone(value), isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone", trackingFn: useCallback((option) => {
2597
+ if (!(option === null || option === void 0 ? void 0 : option.label))
2598
+ return;
2599
+ return {
2600
+ 'data-event-action': 'Country Selection',
2601
+ 'data-event-label': option.label,
2602
+ 'data-event-category': activeTab === 'signup'
2603
+ ? 'SSO - Sign Up'
2604
+ : 'SSO - Sign In',
2605
+ };
2606
+ }, [activeTab]) }))),
2400
2607
  React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickLoginWithPhone, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue Login", display: activeTab === 'login' ? 'block' : 'none' }, t('ssov2.button.continue')),
2401
2608
  React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo", display: activeTab === 'signup' ? 'block' : 'none' }, t('ssov2.button.otp.zalo')),
2402
2609
  React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS", display: activeTab === 'signup' ? 'block' : 'none' }, t('ssov2.button.otp.sms'))),
@@ -2478,10 +2685,8 @@ const initSendUpdateEmailOtp = (email) => __awaiter(void 0, void 0, void 0, func
2478
2685
  });
2479
2686
  });
2480
2687
  const resendUpdateEmailOTP = () => __awaiter(void 0, void 0, void 0, function* () {
2481
- const formData = new FormData();
2482
2688
  return fetchSSOV2Api(SSO_V2_PATHS.ECOM_CARE.RESEND_OTP, {
2483
- method: 'POST',
2484
- body: formData,
2689
+ method: 'GET',
2485
2690
  });
2486
2691
  });
2487
2692
  const verifyUpdateEmailOTP = (otpCode) => __awaiter(void 0, void 0, void 0, function* () {
@@ -2516,7 +2721,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
2516
2721
  ? 'Sign Up'
2517
2722
  : 'Sign In'} via ${trackingMethod}`;
2518
2723
  const trackingAction = isEmail
2519
- ? 'Verify Email'
2724
+ ? 'Verify Your Email'
2520
2725
  : `Verify Phone Number via ${isZalo ? 'Zalo' : isSMS ? 'SMS' : ''}`;
2521
2726
  useEffect(() => {
2522
2727
  if (!hidden) {
@@ -2529,15 +2734,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
2529
2734
  }, [hidden]);
2530
2735
  const addStepAndGoNext = (step) => {
2531
2736
  useSSOSteps.setState((old) => {
2532
- var _a, _b;
2533
2737
  const oldSteps = old.steps;
2534
- if (((_a = oldSteps[index - 1]) === null || _a === void 0 ? void 0 : _a.type) === SSOStepTypeType.VERIFY_PHONE ||
2535
- ((_b = oldSteps[index - 1]) === null || _b === void 0 ? void 0 : _b.type) === SSOStepTypeType.UPDATE_EMAIL) {
2536
- return {
2537
- steps: oldSteps.slice(0, index - 1).concat(step),
2538
- currentStepIndex: index - 1,
2539
- };
2540
- }
2541
2738
  return {
2542
2739
  steps: oldSteps.slice(0, index).concat(step),
2543
2740
  currentStepIndex: index,
@@ -2868,7 +3065,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
2868
3065
  'data-event-category': trackingCategory,
2869
3066
  'data-event-action': trackingAction,
2870
3067
  'data-event-label': 'Enter Code',
2871
- } })),
3068
+ }, placeholder: "*" })),
2872
3069
  React__default.createElement(Group, { spacing: 8, align: "center", style: {
2873
3070
  height: 40,
2874
3071
  } },
@@ -2888,6 +3085,7 @@ const SSOOTPScreen = ({ hidden, index, config, }) => {
2888
3085
  const SSOPasswordScreen = ({ hidden, config, }) => {
2889
3086
  const { t } = useTranslations();
2890
3087
  const { onClose, setTracking } = useSSOState();
3088
+ const { setUserInfo, flowData } = useSSOV2Store();
2891
3089
  const [errMsg, setErrMsg] = React__default.useState('');
2892
3090
  const phone = config === null || config === void 0 ? void 0 : config.phone;
2893
3091
  const method = config === null || config === void 0 ? void 0 : config.method;
@@ -2951,11 +3149,13 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
2951
3149
  setLoading(false);
2952
3150
  });
2953
3151
  const onAuthSuccess = (data) => __awaiter(void 0, void 0, void 0, function* () {
2954
- var _c, _d;
2955
3152
  handleAuthSuccess(data);
3153
+ const userInfo = yield getUserInfo();
3154
+ const isPhoneFlow = isPhoneFlowFn(flowData);
3155
+ const isEmailFlow = isEmailFlowFn(flowData);
3156
+ setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
2956
3157
  if (!phone && !!email) {
2957
- const userInfo = yield getUserInfo();
2958
- if (!((_c = userInfo._data) === null || _c === void 0 ? void 0 : _c.phone_verified_at) || !((_d = userInfo._data) === null || _d === void 0 ? void 0 : _d.phone)) {
3158
+ if (isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
2959
3159
  useSSOV2Store.setState((s) => ({
2960
3160
  flowData: Object.assign(Object.assign({}, s.flowData), { isVerifyPhone: true }),
2961
3161
  }));
@@ -2969,6 +3169,27 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
2969
3169
  return;
2970
3170
  }
2971
3171
  }
3172
+ if (isLoginWithPhoneNotVerifedYet(flowData, userInfo._data)) {
3173
+ addStep({
3174
+ type: SSOStepTypeType.FORGOT_PASSWORD_PHONE,
3175
+ config: {
3176
+ phone: `${userInfo._data.area_code}${userInfo._data.phone}`,
3177
+ afterAction: 'setup',
3178
+ },
3179
+ });
3180
+ goNext();
3181
+ return;
3182
+ }
3183
+ if ((isPhoneFlow || isEmailFlow) && !isUserFinishedSetup(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
3184
+ addStep({
3185
+ type: SSOStepTypeType.SETUP_FULL,
3186
+ config: {
3187
+ userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
3188
+ },
3189
+ });
3190
+ goNext();
3191
+ return;
3192
+ }
2972
3193
  onClose === null || onClose === void 0 ? void 0 : onClose(true);
2973
3194
  });
2974
3195
  return (React__default.createElement("form", { style: {
@@ -3017,6 +3238,47 @@ const SSOPasswordScreen = ({ hidden, config, }) => {
3017
3238
  React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", mt: 12, fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Sign In" }, t('ssov2.password.signIn'))));
3018
3239
  };
3019
3240
 
3241
+ const SetupLater = ({ style = {} }) => {
3242
+ const { t } = useTranslations();
3243
+ const { onClose, tracking } = useSSOState();
3244
+ const [loading, setLoading] = useState(false);
3245
+ const { userInfo, flowData } = useSSOV2Store();
3246
+ const { currentStepIndex, steps, addStep, goNext } = useSSOSteps();
3247
+ const currentStep = steps[currentStepIndex];
3248
+ const onClickSetupLater = () => __awaiter(void 0, void 0, void 0, function* () {
3249
+ if (loading)
3250
+ return;
3251
+ setLoading(true);
3252
+ if (userInfo &&
3253
+ !isUserFinishedSetup(userInfo) &&
3254
+ ((currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.VERIFY_PHONE ||
3255
+ (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.FORGOT_PASSWORD_PHONE)) {
3256
+ addStep({
3257
+ type: SSOStepTypeType.SETUP_FULL,
3258
+ config: {
3259
+ userInfo,
3260
+ },
3261
+ });
3262
+ goNext();
3263
+ }
3264
+ else if (!isFlowFinishedSetup(flowData) &&
3265
+ (currentStep === null || currentStep === void 0 ? void 0 : currentStep.type) === SSOStepTypeType.VERIFY_PHONE) {
3266
+ addStep({
3267
+ type: SSOStepTypeType.SETUP_FULL,
3268
+ config: {
3269
+ userInfo,
3270
+ },
3271
+ });
3272
+ goNext();
3273
+ }
3274
+ else {
3275
+ onClose === null || onClose === void 0 ? void 0 : onClose(true);
3276
+ }
3277
+ setLoading(false);
3278
+ });
3279
+ return (React__default.createElement(Button, { size: "sm", variant: "white", color: "#737373", style: Object.assign({ fontWeight: 400 }, style), onClick: onClickSetupLater, disabled: loading, dataEventCategory: tracking === null || tracking === void 0 ? void 0 : tracking.category, dataEventAction: tracking === null || tracking === void 0 ? void 0 : tracking.action, dataEventLabel: "Setup Later" }, t('ssov2.button.setupLater')));
3280
+ };
3281
+
3020
3282
  const SSOPasswordForgotPhone = ({ hidden, config, }) => {
3021
3283
  const phone = config === null || config === void 0 ? void 0 : config.phone;
3022
3284
  const { t } = useTranslations();
@@ -3064,7 +3326,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
3064
3326
  config: {
3065
3327
  phone,
3066
3328
  otpType: 'phone-zalo',
3067
- afterAction: 'forgot',
3329
+ afterAction: config.afterAction || 'forgot',
3068
3330
  provider: (_b = userExist._data) === null || _b === void 0 ? void 0 : _b.provider,
3069
3331
  },
3070
3332
  });
@@ -3107,7 +3369,7 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
3107
3369
  config: {
3108
3370
  phone,
3109
3371
  otpType: 'phone-sms',
3110
- afterAction: 'forgot',
3372
+ afterAction: config.afterAction || 'forgot',
3111
3373
  provider: (_d = userExist._data) === null || _d === void 0 ? void 0 : _d.provider,
3112
3374
  },
3113
3375
  });
@@ -3135,7 +3397,8 @@ const SSOPasswordForgotPhone = ({ hidden, config, }) => {
3135
3397
  isError: !!errMsg, required: true, disabled: true, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone" }),
3136
3398
  errMsg && (React__default.createElement(Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
3137
3399
  React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo" }, t('ssov2.button.continueZalo')),
3138
- React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS" }, t('ssov2.button.continueSMS')))));
3400
+ React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS" }, t('ssov2.button.continueSMS')),
3401
+ React__default.createElement(SetupLater, null))));
3139
3402
  };
3140
3403
 
3141
3404
  const CheckGrayIcon = () => (React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
@@ -3176,11 +3439,12 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
3176
3439
  const { t } = useTranslations();
3177
3440
  const [loading, setLoading] = React__default.useState(false);
3178
3441
  const [errMsg, setErrMsg] = React__default.useState('');
3179
- const { setTracking } = useSSOState();
3180
- const { flowData } = useSSOV2Store();
3442
+ const { setTracking, onClose } = useSSOState();
3443
+ const { addStep, goNext } = useSSOSteps();
3444
+ const { flowData, setUserInfo } = useSSOV2Store();
3181
3445
  const trackingMethod = flowData.method;
3182
3446
  const trackingCategory = `SSO - Sign In via ${trackingMethod}`;
3183
- const trackingAction = `Setup New Password`;
3447
+ const trackingAction = `Setup Password`;
3184
3448
  useEffect(() => {
3185
3449
  if (!hidden) {
3186
3450
  setErrMsg('');
@@ -3215,22 +3479,66 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
3215
3479
  password.length <= 50 &&
3216
3480
  password.match(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/) &&
3217
3481
  password === confirmPassword) {
3218
- const res = yield resetPassword(password, confirmPassword);
3482
+ const isPhoneOrEmailFlow = isPhoneFlowFn(flowData) || isEmailFlowFn(flowData);
3483
+ const res = isPhoneOrEmailFlow
3484
+ ? yield updateUserInfo({
3485
+ password,
3486
+ confirm_password: confirmPassword,
3487
+ validate: '',
3488
+ })
3489
+ : yield resetPassword(password, confirmPassword);
3219
3490
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
3220
- showNotification({
3221
- type: 'success',
3222
- message: 'Password has been reset successfully',
3223
- });
3224
- // back to login step
3225
- const foundPasswordIndex = steps.findIndex((step) => step.type === SSOStepTypeType.PASSWORD);
3226
- if (foundPasswordIndex === -1) {
3227
- // reset to first step
3228
- setSteps((s) => [s[0]]);
3229
- useSSOSteps.setState({ currentStepIndex: 0 });
3491
+ if (isPhoneOrEmailFlow) {
3492
+ handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
3493
+ const userInfo = yield getUserInfo();
3494
+ // Phone
3495
+ if (isPhoneFlowFn(flowData)) {
3496
+ if (userInfo && !isUserFinishedSetup(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
3497
+ addStep({
3498
+ type: SSOStepTypeType.SETUP_FULL,
3499
+ config: {
3500
+ userInfo: userInfo === null || userInfo === void 0 ? void 0 : userInfo._data,
3501
+ },
3502
+ });
3503
+ goNext();
3504
+ }
3505
+ else {
3506
+ onClose === null || onClose === void 0 ? void 0 : onClose(true);
3507
+ }
3508
+ }
3509
+ // Email
3510
+ if (isEmailFlowFn(flowData)) {
3511
+ setUserInfo(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data);
3512
+ if (isPhoneNotVerifedYet(userInfo === null || userInfo === void 0 ? void 0 : userInfo._data)) {
3513
+ addStep({
3514
+ type: SSOStepTypeType.VERIFY_PHONE,
3515
+ config: {
3516
+ provider: 'email',
3517
+ },
3518
+ });
3519
+ goNext();
3520
+ }
3521
+ else {
3522
+ onClose === null || onClose === void 0 ? void 0 : onClose(true);
3523
+ }
3524
+ }
3230
3525
  }
3231
3526
  else {
3232
- setSteps((s) => s.slice(0, foundPasswordIndex + 1));
3233
- useSSOSteps.setState({ currentStepIndex: foundPasswordIndex });
3527
+ showNotification({
3528
+ type: 'success',
3529
+ message: 'Password has been reset successfully',
3530
+ });
3531
+ // back to login step
3532
+ const foundPasswordIndex = steps.findIndex((step) => step.type === SSOStepTypeType.PASSWORD);
3533
+ if (foundPasswordIndex === -1) {
3534
+ // reset to first step
3535
+ setSteps((s) => [s[0]]);
3536
+ useSSOSteps.setState({ currentStepIndex: 0 });
3537
+ }
3538
+ else {
3539
+ setSteps((s) => s.slice(0, foundPasswordIndex + 1));
3540
+ useSSOSteps.setState({ currentStepIndex: foundPasswordIndex });
3541
+ }
3234
3542
  }
3235
3543
  // onClose?.()
3236
3544
  }
@@ -3258,7 +3566,9 @@ const SSOPasswordForgotSetup = ({ hidden, }) => {
3258
3566
  action: trackingAction,
3259
3567
  } }),
3260
3568
  errMsg && (React__default.createElement(Text, { size: "label2", color: "red.6", mt: -12 }, errMsg)),
3261
- React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Save" }, t('ssov2.button.save')))));
3569
+ React__default.createElement(Button, { type: "submit", size: "lg", variant: "primary", fullWidth: true, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'signup' ? 'Create New Account' : 'Save' }, (flowData === null || flowData === void 0 ? void 0 : flowData.flow) === 'signup'
3570
+ ? t('ssov2.setup.button.createAccount')
3571
+ : t('ssov2.button.save')))));
3262
3572
  };
3263
3573
 
3264
3574
  const SSOPhoneVerify = ({ hidden, config, }) => {
@@ -3279,6 +3589,7 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
3279
3589
  });
3280
3590
  }
3281
3591
  }, [hidden]);
3592
+ const { source } = useSSOV2Store();
3282
3593
  const { addStep, goNext } = useSSOSteps();
3283
3594
  const onClickContinueZalo = () => __awaiter(void 0, void 0, void 0, function* () {
3284
3595
  setLoading(true);
@@ -3378,7 +3689,8 @@ const SSOPhoneVerify = ({ hidden, config, }) => {
3378
3689
  setErrMsg('');
3379
3690
  }, isError: !!errMsg, required: true, name: "phone", disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Enter Phone" })),
3380
3691
  React__default.createElement(Button, { size: "lg", variant: "primary", onClick: onClickContinueZalo, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with Zalo" }, t('ssov2.button.continueZalo')),
3381
- React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS" }, t('ssov2.button.continueSMS'))))));
3692
+ React__default.createElement(Button, { size: "lg", variant: "secondary", onClick: onClickContinuePhone, disabled: loading, loading: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Continue with SMS" }, t('ssov2.button.continueSMS')),
3693
+ source !== 'care_onboarding' && source !== 'ecom' && React__default.createElement(SetupLater, null)))));
3382
3694
  };
3383
3695
 
3384
3696
  const FemaleIcon = () => (React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
@@ -3410,39 +3722,19 @@ const MaleIcon = () => (React__default.createElement("svg", { width: "20", heigh
3410
3722
  React__default.createElement("path", { d: "M11.122 6.393a.157.157 0 0 1-.051-.304c.687-.234 1.688-.344 2.26-.03a.156.156 0 0 1-.15.274c-.463-.254-1.38-.163-2.009.052a.2.2 0 0 1-.05.008m-2.19.572a.16.16 0 0 1-.144-.097c-.013-.027-.123-.097-.363-.129-.325-.043-.672.016-.772.131a.156.156 0 1 1-.236-.205c.214-.245.721-.29 1.103-.228.209.034.475.116.556.311a.156.156 0 0 1-.144.217m.222-.571a.2.2 0 0 1-.05-.009c-.629-.215-1.546-.306-2.009-.051a.156.156 0 1 1-.15-.274c.572-.315 1.572-.206 2.26.03a.156.156 0 0 1-.05.304", fill: "#404040" }),
3411
3723
  React__default.createElement("path", { d: "m11.12 9.547-.019.001a8 8 0 0 1-1.928 0 .156.156 0 1 0-.037.31c.665.08 1.337.08 2.003 0a.156.156 0 0 0-.019-.31", fill: "#D84023" })));
3412
3724
 
3725
+ // import { StyledPhone } from '../components/phone'
3413
3726
  // always has name, gender dob
3414
- const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isPhoneDisabled, loading, tracking, }) => {
3727
+ const OtherSetup = ({ form,
3728
+ // needPhone,
3729
+ // skipPhone,
3730
+ needEmail, isEmailDisable,
3731
+ // isPhoneDisabled,
3732
+ loading, tracking, }) => {
3415
3733
  const { t } = useTranslations();
3416
- const { locale = 'vi-VN' } = useSSOState();
3734
+ // const { locale = 'vi-VN' } = useSSOState()
3417
3735
  const { setupSource } = useSSOV2Store();
3418
3736
  const [dobChanged, setDobChanged] = React__default.useState(false);
3419
3737
  return (React__default.createElement(Stack, { spacing: 12 },
3420
- needPhone && (React__default.createElement(React__default.Fragment, null,
3421
- React__default.createElement(Input.Wrapper, Object.assign({ label: t('ssov2.setup.field.phone.label'), withAsterisk: true }, form.getInputProps('phone')),
3422
- React__default.createElement(StyledPhone, { defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), value: form.getInputProps('phone').value, onChange: (value) => {
3423
- form.setFieldValue('phone', value);
3424
- }, isError: !!form.getInputProps('phone').error, required: true, name: "phone", disabled: loading || isPhoneDisabled, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Phone" })),
3425
- !skipPhone && (React__default.createElement(Group, { spacing: 24 },
3426
- React__default.createElement(Text, { size: "p4" }, t('ssov2.setup.field.otp.label')),
3427
- React__default.createElement(Radio.Group, Object.assign({ name: "otpMethod", styles: {
3428
- root: {
3429
- display: 'flex',
3430
- flexDirection: 'row',
3431
- flexWrap: 'wrap',
3432
- gap: 24,
3433
- },
3434
- } }, form.getInputProps('otpMethod')),
3435
- React__default.createElement(Radio, { value: "zalo", label: "Zalo", styles: {
3436
- label: {
3437
- paddingLeft: 8,
3438
- },
3439
- }, disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Send OTP Code via Zalo" }),
3440
- React__default.createElement(Radio, { value: "sms", label: "SMS", styles: {
3441
- label: {
3442
- paddingLeft: 8,
3443
- },
3444
- }, disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Send OTP Code via SMS" })))))),
3445
- needEmail && (React__default.createElement(Input, Object.assign({ name: "email", type: "email", label: t('ssov2.setup.field.email.label'), disabled: isEmailDisable || loading, required: setupSource === 'care' ? true : false, withAsterisk: setupSource === 'care' ? true : false, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Email" }, form.getInputProps('email')))),
3446
3738
  React__default.createElement(Input, Object.assign({ name: "name", label: t('ssov2.setup.field.name.label'), withAsterisk: true, required: true, placeholder: t('ssov2.setup.field.name.placeholder'), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Name" }, form.getInputProps('name'))),
3447
3739
  React__default.createElement(Input.Wrapper, Object.assign({ label: t('ssov2.setup.field.gender.label'), withAsterisk: true }, form.getInputProps('gender')),
3448
3740
  React__default.createElement(Group, null,
@@ -3457,7 +3749,7 @@ const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isP
3457
3749
  ? 'secondary'
3458
3750
  : 'tertiary', onClick: () => {
3459
3751
  form.setFieldValue('gender', 'female');
3460
- }, leftIcon: React__default.createElement(FemaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender Female" }, t('ssov2.setup.field.gender.female')),
3752
+ }, leftIcon: React__default.createElement(FemaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender" }, t('ssov2.setup.field.gender.female')),
3461
3753
  React__default.createElement(Button, { type: "button", styles: {
3462
3754
  root: {
3463
3755
  flex: 1,
@@ -3469,7 +3761,7 @@ const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isP
3469
3761
  ? 'secondary'
3470
3762
  : 'tertiary', onClick: () => {
3471
3763
  form.setFieldValue('gender', 'male');
3472
- }, leftIcon: React__default.createElement(MaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender Male" }, t('ssov2.setup.field.gender.male')))),
3764
+ }, leftIcon: React__default.createElement(MaleIcon, null), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Gender" }, t('ssov2.setup.field.gender.male')))),
3473
3765
  React__default.createElement(DatePicker, Object.assign({ name: "dob", label: t('ssov2.setup.field.dob.label'), withAsterisk: true, required: true, placeholder: t('ssov2.setup.field.dob.placeholder'), maxDate: new Date(new Date().getFullYear() - 18, new Date().getMonth(), new Date().getDate()), disabled: loading, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Birthday" }, form.getInputProps('dob'), { onChange: (e) => {
3474
3766
  form.getInputProps('dob').onChange(e);
3475
3767
  setDobChanged(true);
@@ -3477,9 +3769,13 @@ const OtherSetup = ({ form, needPhone, skipPhone, needEmail, isEmailDisable, isP
3477
3769
  if (!form.getInputProps('dob').value && !dobChanged)
3478
3770
  return;
3479
3771
  form.getInputProps('dob').onBlur(e);
3480
- } }))));
3772
+ } })),
3773
+ needEmail && (React__default.createElement(Input, Object.assign({ name: "email", type: "email", label: t('ssov2.setup.field.email.label'), disabled: isEmailDisable || loading, required: setupSource === 'care' ? true : false, withAsterisk: setupSource === 'care' ? true : false, "data-event-category": tracking === null || tracking === void 0 ? void 0 : tracking.category, "data-event-action": tracking === null || tracking === void 0 ? void 0 : tracking.action, "data-event-label": "Enter Email", style: {
3774
+ display: isEmailDisable ? 'none' : 'block',
3775
+ } }, form.getInputProps('email'))))));
3481
3776
  };
3482
3777
 
3778
+ // import { SSOPasswordWithConfirm } from '../passwordForgotSetup/passwordWithConfirm'
3483
3779
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3484
3780
  const getDefaultData = (data) => {
3485
3781
  try {
@@ -3505,7 +3801,6 @@ const SSOSetupScreen = ({ hidden, config, }) => {
3505
3801
  var _a, _b, _c;
3506
3802
  const { onClose, setTracking } = useSSOState();
3507
3803
  const { t } = useTranslations();
3508
- const { goNext, addStep } = useSSOSteps();
3509
3804
  const { setupSource, flowData } = useSSOV2Store();
3510
3805
  const [errMsg, setErrMsg] = React__default.useState('');
3511
3806
  const userInfo = config === null || config === void 0 ? void 0 : config.userInfo;
@@ -3515,13 +3810,6 @@ const SSOSetupScreen = ({ hidden, config, }) => {
3515
3810
  const provider = (_a = config === null || config === void 0 ? void 0 : config.userInfo) === null || _a === void 0 ? void 0 : _a.provider;
3516
3811
  const authFlow = flowData === null || flowData === void 0 ? void 0 : flowData.flow;
3517
3812
  const defaultData = getDefaultData(config === null || config === void 0 ? void 0 : config.setupDefaultData);
3518
- const needPass = (authMethod === 'phone' ||
3519
- authMethod === 'zalo' ||
3520
- authMethod === 'sms' ||
3521
- authMethod === 'email' ||
3522
- provider === 'email' ||
3523
- provider === 'phone') &&
3524
- !(userInfo === null || userInfo === void 0 ? void 0 : userInfo.is_pass);
3525
3813
  const skipPhone = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone) && !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone_verified_at);
3526
3814
  const isPhoneDisabled = !!(configPhone || (defaultData === null || defaultData === void 0 ? void 0 : defaultData.phone) || skipPhone);
3527
3815
  const needPhone = authFlow === 'signup' &&
@@ -3541,8 +3829,6 @@ const SSOSetupScreen = ({ hidden, config, }) => {
3541
3829
  !(flowData === null || flowData === void 0 ? void 0 : flowData.isVerifyPhone) ||
3542
3830
  authMethod === 'facebook' ||
3543
3831
  provider === 'facebook';
3544
- // const needPhone = !userInfo?.phone_verified_at
3545
- // const needEmail = authFlow !== 'verify-phone'
3546
3832
  const isEmailDisable = (defaultEmail &&
3547
3833
  (authMethod === 'google' ||
3548
3834
  authMethod === 'email' ||
@@ -3550,7 +3836,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
3550
3836
  provider === 'email')) ||
3551
3837
  (!!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) && !!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.email_verified_at));
3552
3838
  const trackingCategory = `SSO - ${authFlow === 'signup' ? 'Sign Up' : 'Existing Users'} via ${authMethod || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.provider)}`;
3553
- const trackingAction = 'Almost done';
3839
+ const trackingAction = 'Add Information';
3554
3840
  useEffect(() => {
3555
3841
  if (!hidden) {
3556
3842
  setErrMsg('');
@@ -3579,30 +3865,7 @@ const SSOSetupScreen = ({ hidden, config, }) => {
3579
3865
  ? dayjs(defaultData.birthday, 'MM/DD/YYYY').toDate()
3580
3866
  : undefined }),
3581
3867
  validateInputOnBlur: true,
3582
- validate: yupResolver(yup.object().shape(Object.assign(Object.assign(Object.assign(Object.assign({}, (needPass
3583
- ? {
3584
- password: yup
3585
- .string()
3586
- .required(t('ssov2.validate.password.required'))
3587
- .min(8, ' ')
3588
- .max(50, ' ')
3589
- .matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/, ' '),
3590
- confirmPassword: yup
3591
- .string()
3592
- .required(t('ssov2.validate.confirmPassword.required'))
3593
- .test('passwords-match', t('ssov2.validate.confirmPassword.match'), function (value) {
3594
- return this.parent.password === value;
3595
- }),
3596
- }
3597
- : {})), (needPhone
3598
- ? Object.assign({ phone: yup.string().required(t('ssov2.validate.phone.required')) }, (!skipPhone
3599
- ? {
3600
- otpMethod: yup
3601
- .string()
3602
- .required(t('ssov2.validate.otp.required'))
3603
- .oneOf(['zalo', 'sms']),
3604
- }
3605
- : {})) : {})), (needEmail
3868
+ validate: yupResolver(yup.object().shape(Object.assign(Object.assign({}, (needEmail
3606
3869
  ? {
3607
3870
  email: setupSource === 'care'
3608
3871
  ? yup
@@ -3619,15 +3882,13 @@ const SSOSetupScreen = ({ hidden, config, }) => {
3619
3882
  const onSubmit = (values) => __awaiter(void 0, void 0, void 0, function* () {
3620
3883
  setLoading(true);
3621
3884
  try {
3622
- const { password, confirmPassword, phone, gender, name, dob, otpMethod } = values;
3885
+ const { phone, gender, name, dob } = values;
3623
3886
  const { phoneNumber, areaCode } = splitPhone(phone || configPhone || '');
3624
3887
  // validate only, delay set data to after otp
3625
3888
  const res = yield updateUserInfo({
3626
3889
  name,
3627
3890
  birthday: dayjs(dob).format('YYYY-MM-DD'),
3628
3891
  email: values.email || undefined,
3629
- password,
3630
- confirm_password: confirmPassword,
3631
3892
  phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
3632
3893
  area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '84',
3633
3894
  gender: gender === 'male' ? 1 : 0,
@@ -3635,80 +3896,23 @@ const SSOSetupScreen = ({ hidden, config, }) => {
3635
3896
  validate: 'true',
3636
3897
  });
3637
3898
  if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
3638
- // if need phone and has phone then start phone verify step, close after done
3639
- if (needPhone && !skipPhone) {
3640
- const setupData = {
3641
- name,
3642
- birthday: dayjs(dob).format('YYYY-MM-DD'),
3643
- email: values.email || undefined,
3644
- password,
3645
- confirm_password: confirmPassword,
3646
- phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
3647
- area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code) || '84',
3648
- gender: gender === 'male' ? 1 : 0,
3649
- source: setupSource,
3650
- };
3651
- if (otpMethod === 'zalo') {
3652
- const res = yield resendUpdatePhoneZaloOTP(phoneNumber, areaCode);
3653
- if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
3654
- setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
3655
- return setLoading(false);
3656
- }
3657
- addStep({
3658
- type: SSOStepTypeType.OTP,
3659
- config: {
3660
- phone,
3661
- otpType: 'phone-zalo',
3662
- isUpdatePhone: true,
3663
- afterAction: 'submitSetup',
3664
- setupData,
3665
- provider,
3666
- },
3667
- });
3668
- goNext();
3669
- }
3670
- else {
3671
- const res = yield resendUpdatePhoneOTP(phoneNumber, areaCode);
3672
- if ((res === null || res === void 0 ? void 0 : res._status) !== 1) {
3673
- setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
3674
- return setLoading(false);
3675
- }
3676
- addStep({
3677
- type: SSOStepTypeType.OTP,
3678
- config: {
3679
- phone,
3680
- otpType: 'phone-sms',
3681
- isUpdatePhone: true,
3682
- afterAction: 'submitSetup',
3683
- setupData,
3684
- provider,
3685
- },
3686
- });
3687
- goNext();
3688
- }
3899
+ const res = yield updateUserInfo({
3900
+ name,
3901
+ birthday: dayjs(dob).format('YYYY-MM-DD'),
3902
+ email: values.email || undefined,
3903
+ phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
3904
+ area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code),
3905
+ gender: gender === 'male' ? 1 : 0,
3906
+ source: setupSource,
3907
+ validate: '',
3908
+ });
3909
+ if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
3910
+ handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
3911
+ onClose === null || onClose === void 0 ? void 0 : onClose(true);
3689
3912
  }
3690
3913
  else {
3691
- // close?
3692
- const res = yield updateUserInfo({
3693
- name,
3694
- birthday: dayjs(dob).format('YYYY-MM-DD'),
3695
- email: values.email || undefined,
3696
- password,
3697
- confirm_password: confirmPassword,
3698
- phone_number: phoneNumber || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.phone),
3699
- area_code: areaCode || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.area_code),
3700
- gender: gender === 'male' ? 1 : 0,
3701
- source: setupSource,
3702
- validate: '',
3703
- });
3704
- if ((res === null || res === void 0 ? void 0 : res._status) === 1) {
3705
- handleAuthSuccess(res === null || res === void 0 ? void 0 : res._data);
3706
- onClose === null || onClose === void 0 ? void 0 : onClose(true);
3707
- }
3708
- else {
3709
- setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
3710
- return setLoading(false);
3711
- }
3914
+ setErrMsg(getErrorTextFromCode(t, res === null || res === void 0 ? void 0 : res.code));
3915
+ return setLoading(false);
3712
3916
  }
3713
3917
  }
3714
3918
  else {
@@ -3729,24 +3933,13 @@ const SSOSetupScreen = ({ hidden, config, }) => {
3729
3933
  React__default.createElement(Stack, { spacing: 8 },
3730
3934
  React__default.createElement(Text, { size: "s1", weight: "semiBold" }, t('ssov2.setup.title')),
3731
3935
  React__default.createElement(Text, { size: "p4" }, t('ssov2.setup.description'))),
3732
- needPass && (React__default.createElement(SSOPasswordWithConfirm, { form: form, loading: loading, tracking: {
3733
- category: trackingCategory,
3734
- action: trackingAction,
3735
- } })),
3736
3936
  React__default.createElement(OtherSetup, { needPhone: needPhone, skipPhone: skipPhone, needEmail: needEmail, isEmailDisable: isEmailDisable, isPhoneDisabled: isPhoneDisabled, form: form, loading: loading, tracking: {
3737
3937
  category: trackingCategory,
3738
3938
  action: trackingAction,
3739
3939
  } }),
3740
3940
  errMsg && (React__default.createElement(Text, { color: "red.6", size: "p4" }, errMsg)),
3741
- React__default.createElement(Button, { type: "submit", variant: "primary", fullWidth: true, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": needPhone && !skipPhone
3742
- ? 'Verify Phone Number'
3743
- : authFlow === 'signup'
3744
- ? 'Create New Account'
3745
- : 'Save' }, needPhone && !skipPhone
3746
- ? t('ssov2.setup.button.veriyPhone')
3747
- : authFlow === 'signup'
3748
- ? t('ssov2.setup.button.createAccount')
3749
- : t('ssov2.button.save')))));
3941
+ React__default.createElement(Button, { type: "submit", variant: "primary", fullWidth: true, loading: loading, disabled: loading, "data-event-category": trackingCategory, "data-event-action": trackingAction, "data-event-label": "Save" }, t('ssov2.button.save')),
3942
+ React__default.createElement(SetupLater, { style: { marginTop: -8 } }))));
3750
3943
  };
3751
3944
 
3752
3945
  // import {
@@ -3855,6 +4048,20 @@ const SSOScreenRenderer = () => {
3855
4048
  })));
3856
4049
  };
3857
4050
 
4051
+ if (!Array.prototype.findLastIndex) {
4052
+ Array.prototype.findLastIndex = function (callback, thisArg) {
4053
+ for (let i = this.length - 1; i >= 0; i--) {
4054
+ if (callback.call(thisArg, this[i], i, this))
4055
+ return i;
4056
+ }
4057
+ return -1;
4058
+ };
4059
+ }
4060
+ if (!String.prototype.capitalize) {
4061
+ String.prototype.capitalize = function () {
4062
+ return this.charAt(0).toUpperCase() + this.slice(1);
4063
+ };
4064
+ }
3858
4065
  const SSOV2 = ({ onClose: onCloseProps, locale }) => {
3859
4066
  const { isOpen, setOpen, returnUrl, setMounted, source, overrideClose, setOnCloseProp, forceReloadOnClose, } = useSSOV2Store();
3860
4067
  useEffect(() => {