@onairos/react-native 3.1.18 → 3.2.0

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 (729) hide show
  1. package/README.md +374 -403
  2. package/lib/commonjs/api/index.js +1 -75
  3. package/lib/commonjs/api/index.js.map +1 -1
  4. package/lib/commonjs/assets/images/email.png +0 -0
  5. package/lib/commonjs/assets/images/linkedin.png +0 -0
  6. package/lib/commonjs/assets/images/reddit.png +0 -0
  7. package/lib/commonjs/assets/images/youtube.png +0 -0
  8. package/lib/commonjs/components/DataRequestModal.js.map +1 -1
  9. package/lib/commonjs/components/DataRequestScreen.js.map +1 -1
  10. package/lib/commonjs/components/EmailVerificationModal.js.map +1 -1
  11. package/lib/commonjs/components/Onairos.js +3 -1
  12. package/lib/commonjs/components/Onairos.js.map +1 -1
  13. package/lib/commonjs/components/OnairosButton.js +190 -171
  14. package/lib/commonjs/components/OnairosButton.js.map +1 -1
  15. package/lib/commonjs/components/Overlay.js +5 -5
  16. package/lib/commonjs/components/Overlay.js.map +1 -1
  17. package/lib/commonjs/components/PinInput.js +120 -282
  18. package/lib/commonjs/components/PinInput.js.map +1 -1
  19. package/lib/commonjs/components/PlatformList.js.map +1 -1
  20. package/lib/commonjs/components/TrainingModal.js +563 -808
  21. package/lib/commonjs/components/TrainingModal.js.map +1 -1
  22. package/lib/commonjs/components/UniversalOnboarding.js +1283 -2304
  23. package/lib/commonjs/components/UniversalOnboarding.js.map +1 -1
  24. package/lib/commonjs/components/UniversalOnboarding.tsx.new +455 -0
  25. package/lib/commonjs/components/onboarding/OAuthWebView.js +743 -134
  26. package/lib/commonjs/components/onboarding/OAuthWebView.js.map +1 -1
  27. package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +1 -1
  28. package/lib/commonjs/components/onboarding/PinInput.js.map +1 -1
  29. package/lib/commonjs/components/onboarding/PlatformConnector.js.map +1 -1
  30. package/lib/commonjs/components/screens/ConnectorScreen.js.map +1 -1
  31. package/lib/commonjs/components/screens/LoadingScreen.js.map +1 -1
  32. package/lib/commonjs/components/screens/PinCreationScreen.js.map +1 -1
  33. package/lib/commonjs/constants/index.js.map +1 -1
  34. package/lib/commonjs/hooks/useConnections.js +125 -120
  35. package/lib/commonjs/hooks/useConnections.js.map +1 -1
  36. package/lib/commonjs/hooks/useCredentials.js.map +1 -1
  37. package/lib/commonjs/index.js +31 -201
  38. package/lib/commonjs/index.js.map +1 -1
  39. package/lib/commonjs/services/apiKeyService.js +102 -101
  40. package/lib/commonjs/services/apiKeyService.js.map +1 -1
  41. package/lib/commonjs/services/oauthService.js.map +1 -1
  42. package/lib/commonjs/services/platformAuthService.js +722 -956
  43. package/lib/commonjs/services/platformAuthService.js.map +1 -1
  44. package/lib/commonjs/types/ambient.d.js.map +1 -1
  45. package/lib/commonjs/types/declarations.d.js.map +1 -1
  46. package/lib/commonjs/types/index.d.js.map +1 -1
  47. package/lib/commonjs/types/index.js.map +1 -1
  48. package/lib/commonjs/types/node-fix.d.js.map +1 -1
  49. package/lib/commonjs/types/node-override.d.js.map +1 -1
  50. package/lib/commonjs/types/opacity.d.js.map +1 -1
  51. package/lib/commonjs/types/types.d.js.map +1 -1
  52. package/lib/commonjs/types.js.map +1 -1
  53. package/lib/commonjs/utils/Portal.js +4 -4
  54. package/lib/commonjs/utils/Portal.js.map +1 -1
  55. package/lib/commonjs/utils/api.js +24 -24
  56. package/lib/commonjs/utils/api.js.map +1 -1
  57. package/lib/commonjs/utils/auth.js +18 -18
  58. package/lib/commonjs/utils/auth.js.map +1 -1
  59. package/lib/commonjs/utils/crypto.js +13 -13
  60. package/lib/commonjs/utils/crypto.js.map +1 -1
  61. package/lib/commonjs/utils/debugHelper.js.map +1 -1
  62. package/lib/commonjs/utils/encryption.js +12 -12
  63. package/lib/commonjs/utils/encryption.js.map +1 -1
  64. package/lib/commonjs/utils/onairosApi.js.map +1 -1
  65. package/lib/commonjs/utils/programmaticFlow.js +16 -16
  66. package/lib/commonjs/utils/programmaticFlow.js.map +1 -1
  67. package/lib/commonjs/utils/retryHelper.js +27 -27
  68. package/lib/commonjs/utils/retryHelper.js.map +1 -1
  69. package/lib/commonjs/utils/secureStorage.js.map +1 -1
  70. package/lib/module/api/index.js +0 -72
  71. package/lib/module/api/index.js.map +1 -1
  72. package/lib/module/assets/images/email.png +0 -0
  73. package/lib/module/assets/images/linkedin.png +0 -0
  74. package/lib/module/assets/images/reddit.png +0 -0
  75. package/lib/module/assets/images/youtube.png +0 -0
  76. package/lib/module/components/DataRequestModal.js.map +1 -1
  77. package/lib/module/components/DataRequestScreen.js.map +1 -1
  78. package/lib/module/components/EmailVerificationModal.js.map +1 -1
  79. package/lib/module/components/Onairos.js +3 -1
  80. package/lib/module/components/Onairos.js.map +1 -1
  81. package/lib/module/components/OnairosButton.js +192 -172
  82. package/lib/module/components/OnairosButton.js.map +1 -1
  83. package/lib/module/components/Overlay.js +5 -5
  84. package/lib/module/components/Overlay.js.map +1 -1
  85. package/lib/module/components/PinInput.js +120 -283
  86. package/lib/module/components/PinInput.js.map +1 -1
  87. package/lib/module/components/PlatformList.js.map +1 -1
  88. package/lib/module/components/TrainingModal.js +565 -809
  89. package/lib/module/components/TrainingModal.js.map +1 -1
  90. package/lib/module/components/UniversalOnboarding.js +1284 -2307
  91. package/lib/module/components/UniversalOnboarding.js.map +1 -1
  92. package/lib/module/components/UniversalOnboarding.tsx.new +455 -0
  93. package/lib/module/components/onboarding/OAuthWebView.js +744 -136
  94. package/lib/module/components/onboarding/OAuthWebView.js.map +1 -1
  95. package/lib/module/components/onboarding/OnboardingHeader.js.map +1 -1
  96. package/lib/module/components/onboarding/PinInput.js.map +1 -1
  97. package/lib/module/components/onboarding/PlatformConnector.js.map +1 -1
  98. package/lib/module/components/screens/ConnectorScreen.js.map +1 -1
  99. package/lib/module/components/screens/LoadingScreen.js.map +1 -1
  100. package/lib/module/components/screens/PinCreationScreen.js.map +1 -1
  101. package/lib/module/constants/index.js.map +1 -1
  102. package/lib/module/hooks/useConnections.js +125 -119
  103. package/lib/module/hooks/useConnections.js.map +1 -1
  104. package/lib/module/hooks/useCredentials.js.map +1 -1
  105. package/lib/module/index.js +17 -55
  106. package/lib/module/index.js.map +1 -1
  107. package/lib/module/services/apiKeyService.js +102 -101
  108. package/lib/module/services/apiKeyService.js.map +1 -1
  109. package/lib/module/services/oauthService.js.map +1 -1
  110. package/lib/module/services/platformAuthService.js +704 -943
  111. package/lib/module/services/platformAuthService.js.map +1 -1
  112. package/lib/module/types/ambient.d.js.map +1 -1
  113. package/lib/module/types/declarations.d.js.map +1 -1
  114. package/lib/module/types/index.d.js.map +1 -1
  115. package/lib/module/types/index.js.map +1 -1
  116. package/lib/module/types/node-fix.d.js.map +1 -1
  117. package/lib/module/types/node-override.d.js.map +1 -1
  118. package/lib/module/types/opacity.d.js.map +1 -1
  119. package/lib/module/types/types.d.js.map +1 -1
  120. package/lib/module/types.js.map +1 -1
  121. package/lib/module/utils/Portal.js +4 -4
  122. package/lib/module/utils/Portal.js.map +1 -1
  123. package/lib/module/utils/api.js +24 -24
  124. package/lib/module/utils/api.js.map +1 -1
  125. package/lib/module/utils/auth.js +18 -18
  126. package/lib/module/utils/auth.js.map +1 -1
  127. package/lib/module/utils/crypto.js +13 -13
  128. package/lib/module/utils/crypto.js.map +1 -1
  129. package/lib/module/utils/debugHelper.js.map +1 -1
  130. package/lib/module/utils/encryption.js +12 -12
  131. package/lib/module/utils/encryption.js.map +1 -1
  132. package/lib/module/utils/onairosApi.js.map +1 -1
  133. package/lib/module/utils/programmaticFlow.js +16 -16
  134. package/lib/module/utils/programmaticFlow.js.map +1 -1
  135. package/lib/module/utils/retryHelper.js +27 -27
  136. package/lib/module/utils/retryHelper.js.map +1 -1
  137. package/lib/module/utils/secureStorage.js.map +1 -1
  138. package/lib/typescript/api/index.d.ts +7 -15
  139. package/lib/typescript/api/index.d.ts.map +1 -1
  140. package/lib/typescript/components/DataRequestModal.d.ts +10 -10
  141. package/lib/typescript/components/DataRequestScreen.d.ts +10 -10
  142. package/lib/typescript/components/EmailVerificationModal.d.ts +10 -10
  143. package/lib/typescript/components/Onairos.d.ts +3 -3
  144. package/lib/typescript/components/Onairos.d.ts.map +1 -1
  145. package/lib/typescript/components/OnairosButton.d.ts +11 -36
  146. package/lib/typescript/components/OnairosButton.d.ts.map +1 -1
  147. package/lib/typescript/components/Overlay.d.ts +3 -3
  148. package/lib/typescript/components/PinInput.d.ts +3 -13
  149. package/lib/typescript/components/PinInput.d.ts.map +1 -1
  150. package/lib/typescript/components/PlatformList.d.ts +3 -3
  151. package/lib/typescript/components/TrainingModal.d.ts +3 -14
  152. package/lib/typescript/components/TrainingModal.d.ts.map +1 -1
  153. package/lib/typescript/components/UniversalOnboarding.d.ts +3 -16
  154. package/lib/typescript/components/UniversalOnboarding.d.ts.map +1 -1
  155. package/lib/typescript/components/onboarding/OAuthWebView.d.ts +9 -9
  156. package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +1 -1
  157. package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +10 -10
  158. package/lib/typescript/components/onboarding/PinInput.d.ts +3 -3
  159. package/lib/typescript/components/onboarding/PlatformConnector.d.ts +12 -12
  160. package/lib/typescript/components/screens/ConnectorScreen.d.ts +8 -8
  161. package/lib/typescript/components/screens/LoadingScreen.d.ts +8 -8
  162. package/lib/typescript/components/screens/PinCreationScreen.d.ts +9 -9
  163. package/lib/typescript/constants/index.d.ts +52 -52
  164. package/lib/typescript/hooks/useConnections.d.ts +8 -13
  165. package/lib/typescript/hooks/useConnections.d.ts.map +1 -1
  166. package/lib/typescript/hooks/useCredentials.d.ts +8 -8
  167. package/lib/typescript/index.d.ts +17 -38
  168. package/lib/typescript/index.d.ts.map +1 -1
  169. package/lib/typescript/services/apiKeyService.d.ts +131 -131
  170. package/lib/typescript/services/apiKeyService.d.ts.map +1 -1
  171. package/lib/typescript/services/oauthService.d.ts +49 -49
  172. package/lib/typescript/services/platformAuthService.d.ts +143 -68
  173. package/lib/typescript/services/platformAuthService.d.ts.map +1 -1
  174. package/lib/typescript/types/index.d.ts +225 -264
  175. package/lib/typescript/types/index.d.ts.map +1 -1
  176. package/lib/typescript/types.d.ts +266 -266
  177. package/lib/typescript/utils/Portal.d.ts +13 -13
  178. package/lib/typescript/utils/api.d.ts +5 -5
  179. package/lib/typescript/utils/auth.d.ts +5 -5
  180. package/lib/typescript/utils/crypto.d.ts +3 -3
  181. package/lib/typescript/utils/debugHelper.d.ts +28 -28
  182. package/lib/typescript/utils/encryption.d.ts +18 -18
  183. package/lib/typescript/utils/onairosApi.d.ts +86 -86
  184. package/lib/typescript/utils/programmaticFlow.d.ts +22 -22
  185. package/lib/typescript/utils/retryHelper.d.ts +68 -68
  186. package/lib/typescript/utils/secureStorage.d.ts +93 -93
  187. package/package.json +149 -145
  188. package/src/api/index.ts +110 -151
  189. package/src/assets/images/email.png +0 -0
  190. package/src/assets/images/linkedin.png +0 -0
  191. package/src/assets/images/reddit.png +0 -0
  192. package/src/assets/images/youtube.png +0 -0
  193. package/src/components/DataRequestScreen.tsx +355 -355
  194. package/src/components/EmailVerificationModal.tsx +363 -363
  195. package/src/components/Onairos.tsx +424 -422
  196. package/src/components/OnairosButton.tsx +359 -339
  197. package/src/components/Overlay.tsx +506 -506
  198. package/src/components/PinInput.tsx +343 -555
  199. package/src/components/PlatformList.tsx +144 -144
  200. package/src/components/TrainingModal.tsx +737 -1047
  201. package/src/components/UniversalOnboarding.tsx +1820 -2888
  202. package/src/components/UniversalOnboarding.tsx.new +455 -0
  203. package/src/components/onboarding/OAuthWebView.tsx +838 -232
  204. package/src/hooks/useConnections.ts +163 -161
  205. package/src/hooks/useCredentials.ts +174 -174
  206. package/src/index.js +14 -14
  207. package/src/index.ts +49 -99
  208. package/src/services/apiKeyService.ts +921 -919
  209. package/src/services/platformAuthService.ts +1113 -1346
  210. package/src/types/ambient.d.ts +28 -28
  211. package/src/types/index.ts +238 -265
  212. package/src/types/node-fix.d.ts +18 -18
  213. package/src/types/node-override.d.ts +23 -23
  214. package/src/types/opacity.d.ts +15 -15
  215. package/src/types/types.d.ts +17 -17
  216. package/src/utils/Portal.tsx +82 -82
  217. package/src/utils/api.js +111 -111
  218. package/src/utils/auth.js +103 -103
  219. package/src/utils/crypto.js +59 -59
  220. package/src/utils/encryption.ts +68 -68
  221. package/src/utils/programmaticFlow.ts +112 -112
  222. package/src/utils/retryHelper.ts +274 -274
  223. package/types/index.d.ts +213 -213
  224. package/types/node-env.d.ts +14 -14
  225. package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  226. package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  227. package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
  228. package/lib/commonjs/assets/icons/Gmail.png +0 -0
  229. package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
  230. package/lib/commonjs/assets/icons/Redditicon.png +0 -0
  231. package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
  232. package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
  233. package/lib/commonjs/assets/icons/farcaster.png +0 -0
  234. package/lib/commonjs/assets/icons/instagram.png +0 -0
  235. package/lib/commonjs/assets/icons/pinterest.png +0 -0
  236. package/lib/commonjs/assets/icons/swerv_logo.png +0 -0
  237. package/lib/commonjs/assets/icons/twitter.jpg +0 -0
  238. package/lib/commonjs/assets/images/Checkbox.svg +0 -3
  239. package/lib/commonjs/assets/images/EnochE.svg +0 -19
  240. package/lib/commonjs/assets/images/Enochicon1.png +0 -0
  241. package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
  242. package/lib/commonjs/assets/images/Facebookicon.png +0 -0
  243. package/lib/commonjs/assets/images/Gmail.png +0 -0
  244. package/lib/commonjs/assets/images/Googlelogo.png +0 -0
  245. package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
  246. package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
  247. package/lib/commonjs/assets/images/Personalityprofile.svg +0 -3
  248. package/lib/commonjs/assets/images/Personalitytraits.svg +0 -3
  249. package/lib/commonjs/assets/images/Redditicon.png +0 -0
  250. package/lib/commonjs/assets/images/Userpreferences.svg +0 -3
  251. package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
  252. package/lib/commonjs/assets/images/arrow.svg +0 -20
  253. package/lib/commonjs/assets/images/basicproficon.svg +0 -43
  254. package/lib/commonjs/assets/images/basicprofile.svg +0 -3
  255. package/lib/commonjs/assets/images/checkmark.svg +0 -4
  256. package/lib/commonjs/assets/images/contentanalysis.svg +0 -3
  257. package/lib/commonjs/assets/images/contenticon.svg +0 -23
  258. package/lib/commonjs/assets/images/persona1.png +0 -0
  259. package/lib/commonjs/assets/images/persona2.png +0 -0
  260. package/lib/commonjs/assets/images/persona3.png +0 -0
  261. package/lib/commonjs/assets/images/persona4.png +0 -0
  262. package/lib/commonjs/assets/images/persona5.png +0 -0
  263. package/lib/commonjs/assets/images/personalityicon.svg +0 -18
  264. package/lib/commonjs/assets/images/x-close.svg +0 -3
  265. package/lib/commonjs/components/BodyText.js +0 -27
  266. package/lib/commonjs/components/BodyText.js.map +0 -1
  267. package/lib/commonjs/components/BrandMark.js +0 -44
  268. package/lib/commonjs/components/BrandMark.js.map +0 -1
  269. package/lib/commonjs/components/CodeInput.js +0 -30
  270. package/lib/commonjs/components/CodeInput.js.map +0 -1
  271. package/lib/commonjs/components/EmailInput.js +0 -30
  272. package/lib/commonjs/components/EmailInput.js.map +0 -1
  273. package/lib/commonjs/components/ExistingUserDataConfirmation.js +0 -474
  274. package/lib/commonjs/components/ExistingUserDataConfirmation.js.map +0 -1
  275. package/lib/commonjs/components/GoogleButton.js +0 -55
  276. package/lib/commonjs/components/GoogleButton.js.map +0 -1
  277. package/lib/commonjs/components/HeadingGroup.js +0 -43
  278. package/lib/commonjs/components/HeadingGroup.js.map +0 -1
  279. package/lib/commonjs/components/ModalHeader.js +0 -99
  280. package/lib/commonjs/components/ModalHeader.js.map +0 -1
  281. package/lib/commonjs/components/ModalSheet.js +0 -47
  282. package/lib/commonjs/components/ModalSheet.js.map +0 -1
  283. package/lib/commonjs/components/OnairosSignInButton.js +0 -129
  284. package/lib/commonjs/components/OnairosSignInButton.js.map +0 -1
  285. package/lib/commonjs/components/PersonaImage.js +0 -60
  286. package/lib/commonjs/components/PersonaImage.js.map +0 -1
  287. package/lib/commonjs/components/PersonaLoadingScreen.js +0 -156
  288. package/lib/commonjs/components/PersonaLoadingScreen.js.map +0 -1
  289. package/lib/commonjs/components/PersonalizationConsentScreen.js +0 -316
  290. package/lib/commonjs/components/PersonalizationConsentScreen.js.map +0 -1
  291. package/lib/commonjs/components/PinCreationScreen.js +0 -393
  292. package/lib/commonjs/components/PinCreationScreen.js.map +0 -1
  293. package/lib/commonjs/components/PlatformConnectorsStep.js +0 -828
  294. package/lib/commonjs/components/PlatformConnectorsStep.js.map +0 -1
  295. package/lib/commonjs/components/PlatformToggle.js +0 -180
  296. package/lib/commonjs/components/PlatformToggle.js.map +0 -1
  297. package/lib/commonjs/components/PrimaryButton.js +0 -180
  298. package/lib/commonjs/components/PrimaryButton.js.map +0 -1
  299. package/lib/commonjs/components/SignInMatchAnimation.js +0 -197
  300. package/lib/commonjs/components/SignInMatchAnimation.js.map +0 -1
  301. package/lib/commonjs/components/SignInStep.js +0 -179
  302. package/lib/commonjs/components/SignInStep.js.map +0 -1
  303. package/lib/commonjs/components/VerificationStep.js +0 -154
  304. package/lib/commonjs/components/VerificationStep.js.map +0 -1
  305. package/lib/commonjs/components/WelcomeScreen.js +0 -401
  306. package/lib/commonjs/components/WelcomeScreen.js.map +0 -1
  307. package/lib/commonjs/components/icons/Basicproficon.js +0 -37
  308. package/lib/commonjs/components/icons/Basicproficon.js.map +0 -1
  309. package/lib/commonjs/components/icons/Basicprofile.js +0 -21
  310. package/lib/commonjs/components/icons/Basicprofile.js.map +0 -1
  311. package/lib/commonjs/components/icons/Checkbox.js +0 -21
  312. package/lib/commonjs/components/icons/Checkbox.js.map +0 -1
  313. package/lib/commonjs/components/icons/Checkmark.js +0 -27
  314. package/lib/commonjs/components/icons/Checkmark.js.map +0 -1
  315. package/lib/commonjs/components/icons/Contentanalysis.js +0 -21
  316. package/lib/commonjs/components/icons/Contentanalysis.js.map +0 -1
  317. package/lib/commonjs/components/icons/Contenticon.js +0 -39
  318. package/lib/commonjs/components/icons/Contenticon.js.map +0 -1
  319. package/lib/commonjs/components/icons/EnochE.js +0 -41
  320. package/lib/commonjs/components/icons/EnochE.js.map +0 -1
  321. package/lib/commonjs/components/icons/Personalityicon.js +0 -30
  322. package/lib/commonjs/components/icons/Personalityicon.js.map +0 -1
  323. package/lib/commonjs/components/icons/Personalityprofile.js +0 -21
  324. package/lib/commonjs/components/icons/Personalityprofile.js.map +0 -1
  325. package/lib/commonjs/components/icons/Personalitytraits.js +0 -21
  326. package/lib/commonjs/components/icons/Personalitytraits.js.map +0 -1
  327. package/lib/commonjs/components/icons/Userpreferences.js +0 -21
  328. package/lib/commonjs/components/icons/Userpreferences.js.map +0 -1
  329. package/lib/commonjs/components/icons/index.js +0 -84
  330. package/lib/commonjs/components/icons/index.js.map +0 -1
  331. package/lib/commonjs/config/api.js +0 -34
  332. package/lib/commonjs/config/api.js.map +0 -1
  333. package/lib/commonjs/context/AuthContext.js +0 -345
  334. package/lib/commonjs/context/AuthContext.js.map +0 -1
  335. package/lib/commonjs/hooks/useConnectedAccounts.js +0 -111
  336. package/lib/commonjs/hooks/useConnectedAccounts.js.map +0 -1
  337. package/lib/commonjs/hooks/useUserConnections.js +0 -148
  338. package/lib/commonjs/hooks/useUserConnections.js.map +0 -1
  339. package/lib/commonjs/services/apiClient.js +0 -302
  340. package/lib/commonjs/services/apiClient.js.map +0 -1
  341. package/lib/commonjs/services/authService.js +0 -935
  342. package/lib/commonjs/services/authService.js.map +0 -1
  343. package/lib/commonjs/services/biometricPinService.js +0 -184
  344. package/lib/commonjs/services/biometricPinService.js.map +0 -1
  345. package/lib/commonjs/services/connectedAccountsService.js +0 -268
  346. package/lib/commonjs/services/connectedAccountsService.js.map +0 -1
  347. package/lib/commonjs/services/googleAuthService.js +0 -268
  348. package/lib/commonjs/services/googleAuthService.js.map +0 -1
  349. package/lib/commonjs/services/imageCompressionService.js +0 -260
  350. package/lib/commonjs/services/imageCompressionService.js.map +0 -1
  351. package/lib/commonjs/services/jwtStorageService.js +0 -256
  352. package/lib/commonjs/services/jwtStorageService.js.map +0 -1
  353. package/lib/commonjs/services/mobileTrainingService.js +0 -185
  354. package/lib/commonjs/services/mobileTrainingService.js.map +0 -1
  355. package/lib/commonjs/services/pinEncryptionService.js +0 -84
  356. package/lib/commonjs/services/pinEncryptionService.js.map +0 -1
  357. package/lib/commonjs/services/pinStorageUtils.js +0 -105
  358. package/lib/commonjs/services/pinStorageUtils.js.map +0 -1
  359. package/lib/commonjs/services/storageService.js +0 -404
  360. package/lib/commonjs/services/storageService.js.map +0 -1
  361. package/lib/commonjs/services/trainingApiHelpers.js +0 -73
  362. package/lib/commonjs/services/trainingApiHelpers.js.map +0 -1
  363. package/lib/commonjs/services/userConnectionsService.js +0 -486
  364. package/lib/commonjs/services/userConnectionsService.js.map +0 -1
  365. package/lib/commonjs/services/youtubeMigrationService.js +0 -415
  366. package/lib/commonjs/services/youtubeMigrationService.js.map +0 -1
  367. package/lib/commonjs/theme/index.js +0 -249
  368. package/lib/commonjs/theme/index.js.map +0 -1
  369. package/lib/commonjs/utils/eventUtils.js +0 -288
  370. package/lib/commonjs/utils/eventUtils.js.map +0 -1
  371. package/lib/commonjs/utils/haptics.js +0 -66
  372. package/lib/commonjs/utils/haptics.js.map +0 -1
  373. package/lib/commonjs/utils/imagePreloader.js +0 -6
  374. package/lib/commonjs/utils/imagePreloader.js.map +0 -1
  375. package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  376. package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  377. package/lib/module/assets/icons/Facebookicon.png +0 -0
  378. package/lib/module/assets/icons/Gmail.png +0 -0
  379. package/lib/module/assets/icons/Linkedinicon.png +0 -0
  380. package/lib/module/assets/icons/Redditicon.png +0 -0
  381. package/lib/module/assets/icons/YouTubeicon2.png +0 -0
  382. package/lib/module/assets/icons/YouTubeicon3.png +0 -0
  383. package/lib/module/assets/icons/farcaster.png +0 -0
  384. package/lib/module/assets/icons/instagram.png +0 -0
  385. package/lib/module/assets/icons/pinterest.png +0 -0
  386. package/lib/module/assets/icons/swerv_logo.png +0 -0
  387. package/lib/module/assets/icons/twitter.jpg +0 -0
  388. package/lib/module/assets/images/Checkbox.svg +0 -3
  389. package/lib/module/assets/images/EnochE.svg +0 -19
  390. package/lib/module/assets/images/Enochicon1.png +0 -0
  391. package/lib/module/assets/images/Face_ID_logo.png +0 -0
  392. package/lib/module/assets/images/Facebookicon.png +0 -0
  393. package/lib/module/assets/images/Gmail.png +0 -0
  394. package/lib/module/assets/images/Googlelogo.png +0 -0
  395. package/lib/module/assets/images/Linkedinicon.png +0 -0
  396. package/lib/module/assets/images/Onairoslogo.png +0 -0
  397. package/lib/module/assets/images/Personalityprofile.svg +0 -3
  398. package/lib/module/assets/images/Personalitytraits.svg +0 -3
  399. package/lib/module/assets/images/Redditicon.png +0 -0
  400. package/lib/module/assets/images/Userpreferences.svg +0 -3
  401. package/lib/module/assets/images/YouTubeicon3.png +0 -0
  402. package/lib/module/assets/images/arrow.svg +0 -20
  403. package/lib/module/assets/images/basicproficon.svg +0 -43
  404. package/lib/module/assets/images/basicprofile.svg +0 -3
  405. package/lib/module/assets/images/checkmark.svg +0 -4
  406. package/lib/module/assets/images/contentanalysis.svg +0 -3
  407. package/lib/module/assets/images/contenticon.svg +0 -23
  408. package/lib/module/assets/images/persona1.png +0 -0
  409. package/lib/module/assets/images/persona2.png +0 -0
  410. package/lib/module/assets/images/persona3.png +0 -0
  411. package/lib/module/assets/images/persona4.png +0 -0
  412. package/lib/module/assets/images/persona5.png +0 -0
  413. package/lib/module/assets/images/personalityicon.svg +0 -18
  414. package/lib/module/assets/images/x-close.svg +0 -3
  415. package/lib/module/components/BodyText.js +0 -20
  416. package/lib/module/components/BodyText.js.map +0 -1
  417. package/lib/module/components/BrandMark.js +0 -37
  418. package/lib/module/components/BrandMark.js.map +0 -1
  419. package/lib/module/components/CodeInput.js +0 -23
  420. package/lib/module/components/CodeInput.js.map +0 -1
  421. package/lib/module/components/EmailInput.js +0 -23
  422. package/lib/module/components/EmailInput.js.map +0 -1
  423. package/lib/module/components/ExistingUserDataConfirmation.js +0 -465
  424. package/lib/module/components/ExistingUserDataConfirmation.js.map +0 -1
  425. package/lib/module/components/GoogleButton.js +0 -48
  426. package/lib/module/components/GoogleButton.js.map +0 -1
  427. package/lib/module/components/HeadingGroup.js +0 -36
  428. package/lib/module/components/HeadingGroup.js.map +0 -1
  429. package/lib/module/components/ModalHeader.js +0 -92
  430. package/lib/module/components/ModalHeader.js.map +0 -1
  431. package/lib/module/components/ModalSheet.js +0 -39
  432. package/lib/module/components/ModalSheet.js.map +0 -1
  433. package/lib/module/components/OnairosSignInButton.js +0 -120
  434. package/lib/module/components/OnairosSignInButton.js.map +0 -1
  435. package/lib/module/components/PersonaImage.js +0 -53
  436. package/lib/module/components/PersonaImage.js.map +0 -1
  437. package/lib/module/components/PersonaLoadingScreen.js +0 -148
  438. package/lib/module/components/PersonaLoadingScreen.js.map +0 -1
  439. package/lib/module/components/PersonalizationConsentScreen.js +0 -309
  440. package/lib/module/components/PersonalizationConsentScreen.js.map +0 -1
  441. package/lib/module/components/PinCreationScreen.js +0 -386
  442. package/lib/module/components/PinCreationScreen.js.map +0 -1
  443. package/lib/module/components/PlatformConnectorsStep.js +0 -820
  444. package/lib/module/components/PlatformConnectorsStep.js.map +0 -1
  445. package/lib/module/components/PlatformToggle.js +0 -173
  446. package/lib/module/components/PlatformToggle.js.map +0 -1
  447. package/lib/module/components/PrimaryButton.js +0 -172
  448. package/lib/module/components/PrimaryButton.js.map +0 -1
  449. package/lib/module/components/SignInMatchAnimation.js +0 -189
  450. package/lib/module/components/SignInMatchAnimation.js.map +0 -1
  451. package/lib/module/components/SignInStep.js +0 -171
  452. package/lib/module/components/SignInStep.js.map +0 -1
  453. package/lib/module/components/VerificationStep.js +0 -146
  454. package/lib/module/components/VerificationStep.js.map +0 -1
  455. package/lib/module/components/WelcomeScreen.js +0 -393
  456. package/lib/module/components/WelcomeScreen.js.map +0 -1
  457. package/lib/module/components/icons/Basicproficon.js +0 -30
  458. package/lib/module/components/icons/Basicproficon.js.map +0 -1
  459. package/lib/module/components/icons/Basicprofile.js +0 -14
  460. package/lib/module/components/icons/Basicprofile.js.map +0 -1
  461. package/lib/module/components/icons/Checkbox.js +0 -14
  462. package/lib/module/components/icons/Checkbox.js.map +0 -1
  463. package/lib/module/components/icons/Checkmark.js +0 -20
  464. package/lib/module/components/icons/Checkmark.js.map +0 -1
  465. package/lib/module/components/icons/Contentanalysis.js +0 -14
  466. package/lib/module/components/icons/Contentanalysis.js.map +0 -1
  467. package/lib/module/components/icons/Contenticon.js +0 -32
  468. package/lib/module/components/icons/Contenticon.js.map +0 -1
  469. package/lib/module/components/icons/EnochE.js +0 -34
  470. package/lib/module/components/icons/EnochE.js.map +0 -1
  471. package/lib/module/components/icons/Personalityicon.js +0 -23
  472. package/lib/module/components/icons/Personalityicon.js.map +0 -1
  473. package/lib/module/components/icons/Personalityprofile.js +0 -14
  474. package/lib/module/components/icons/Personalityprofile.js.map +0 -1
  475. package/lib/module/components/icons/Personalitytraits.js +0 -14
  476. package/lib/module/components/icons/Personalitytraits.js.map +0 -1
  477. package/lib/module/components/icons/Userpreferences.js +0 -14
  478. package/lib/module/components/icons/Userpreferences.js.map +0 -1
  479. package/lib/module/components/icons/index.js +0 -13
  480. package/lib/module/components/icons/index.js.map +0 -1
  481. package/lib/module/config/api.js +0 -26
  482. package/lib/module/config/api.js.map +0 -1
  483. package/lib/module/context/AuthContext.js +0 -335
  484. package/lib/module/context/AuthContext.js.map +0 -1
  485. package/lib/module/hooks/useConnectedAccounts.js +0 -106
  486. package/lib/module/hooks/useConnectedAccounts.js.map +0 -1
  487. package/lib/module/hooks/useUserConnections.js +0 -140
  488. package/lib/module/hooks/useUserConnections.js.map +0 -1
  489. package/lib/module/services/apiClient.js +0 -298
  490. package/lib/module/services/apiClient.js.map +0 -1
  491. package/lib/module/services/authService.js +0 -905
  492. package/lib/module/services/authService.js.map +0 -1
  493. package/lib/module/services/biometricPinService.js +0 -173
  494. package/lib/module/services/biometricPinService.js.map +0 -1
  495. package/lib/module/services/connectedAccountsService.js +0 -255
  496. package/lib/module/services/connectedAccountsService.js.map +0 -1
  497. package/lib/module/services/googleAuthService.js +0 -258
  498. package/lib/module/services/googleAuthService.js.map +0 -1
  499. package/lib/module/services/imageCompressionService.js +0 -250
  500. package/lib/module/services/imageCompressionService.js.map +0 -1
  501. package/lib/module/services/jwtStorageService.js +0 -239
  502. package/lib/module/services/jwtStorageService.js.map +0 -1
  503. package/lib/module/services/mobileTrainingService.js +0 -172
  504. package/lib/module/services/mobileTrainingService.js.map +0 -1
  505. package/lib/module/services/pinEncryptionService.js +0 -75
  506. package/lib/module/services/pinEncryptionService.js.map +0 -1
  507. package/lib/module/services/pinStorageUtils.js +0 -93
  508. package/lib/module/services/pinStorageUtils.js.map +0 -1
  509. package/lib/module/services/storageService.js +0 -383
  510. package/lib/module/services/storageService.js.map +0 -1
  511. package/lib/module/services/trainingApiHelpers.js +0 -67
  512. package/lib/module/services/trainingApiHelpers.js.map +0 -1
  513. package/lib/module/services/userConnectionsService.js +0 -476
  514. package/lib/module/services/userConnectionsService.js.map +0 -1
  515. package/lib/module/services/youtubeMigrationService.js +0 -404
  516. package/lib/module/services/youtubeMigrationService.js.map +0 -1
  517. package/lib/module/theme/index.js +0 -244
  518. package/lib/module/theme/index.js.map +0 -1
  519. package/lib/module/utils/eventUtils.js +0 -270
  520. package/lib/module/utils/eventUtils.js.map +0 -1
  521. package/lib/module/utils/haptics.js +0 -59
  522. package/lib/module/utils/haptics.js.map +0 -1
  523. package/lib/module/utils/imagePreloader.js +0 -3
  524. package/lib/module/utils/imagePreloader.js.map +0 -1
  525. package/lib/typescript/components/BodyText.d.ts +0 -10
  526. package/lib/typescript/components/BodyText.d.ts.map +0 -1
  527. package/lib/typescript/components/BrandMark.d.ts +0 -11
  528. package/lib/typescript/components/BrandMark.d.ts.map +0 -1
  529. package/lib/typescript/components/CodeInput.d.ts +0 -10
  530. package/lib/typescript/components/CodeInput.d.ts.map +0 -1
  531. package/lib/typescript/components/EmailInput.d.ts +0 -8
  532. package/lib/typescript/components/EmailInput.d.ts.map +0 -1
  533. package/lib/typescript/components/ExistingUserDataConfirmation.d.ts +0 -12
  534. package/lib/typescript/components/ExistingUserDataConfirmation.d.ts.map +0 -1
  535. package/lib/typescript/components/GoogleButton.d.ts +0 -11
  536. package/lib/typescript/components/GoogleButton.d.ts.map +0 -1
  537. package/lib/typescript/components/HeadingGroup.d.ts +0 -11
  538. package/lib/typescript/components/HeadingGroup.d.ts.map +0 -1
  539. package/lib/typescript/components/ModalHeader.d.ts +0 -11
  540. package/lib/typescript/components/ModalHeader.d.ts.map +0 -1
  541. package/lib/typescript/components/ModalSheet.d.ts +0 -13
  542. package/lib/typescript/components/ModalSheet.d.ts.map +0 -1
  543. package/lib/typescript/components/OnairosSignInButton.d.ts +0 -13
  544. package/lib/typescript/components/OnairosSignInButton.d.ts.map +0 -1
  545. package/lib/typescript/components/PersonaImage.d.ts +0 -8
  546. package/lib/typescript/components/PersonaImage.d.ts.map +0 -1
  547. package/lib/typescript/components/PersonaLoadingScreen.d.ts +0 -10
  548. package/lib/typescript/components/PersonaLoadingScreen.d.ts.map +0 -1
  549. package/lib/typescript/components/PersonalizationConsentScreen.d.ts +0 -10
  550. package/lib/typescript/components/PersonalizationConsentScreen.d.ts.map +0 -1
  551. package/lib/typescript/components/PinCreationScreen.d.ts +0 -10
  552. package/lib/typescript/components/PinCreationScreen.d.ts.map +0 -1
  553. package/lib/typescript/components/PlatformConnectorsStep.d.ts +0 -11
  554. package/lib/typescript/components/PlatformConnectorsStep.d.ts.map +0 -1
  555. package/lib/typescript/components/PlatformToggle.d.ts +0 -20
  556. package/lib/typescript/components/PlatformToggle.d.ts.map +0 -1
  557. package/lib/typescript/components/PrimaryButton.d.ts +0 -22
  558. package/lib/typescript/components/PrimaryButton.d.ts.map +0 -1
  559. package/lib/typescript/components/SignInMatchAnimation.d.ts +0 -9
  560. package/lib/typescript/components/SignInMatchAnimation.d.ts.map +0 -1
  561. package/lib/typescript/components/SignInStep.d.ts +0 -12
  562. package/lib/typescript/components/SignInStep.d.ts.map +0 -1
  563. package/lib/typescript/components/VerificationStep.d.ts +0 -13
  564. package/lib/typescript/components/VerificationStep.d.ts.map +0 -1
  565. package/lib/typescript/components/WelcomeScreen.d.ts +0 -9
  566. package/lib/typescript/components/WelcomeScreen.d.ts.map +0 -1
  567. package/lib/typescript/components/icons/Basicproficon.d.ts +0 -5
  568. package/lib/typescript/components/icons/Basicproficon.d.ts.map +0 -1
  569. package/lib/typescript/components/icons/Basicprofile.d.ts +0 -5
  570. package/lib/typescript/components/icons/Basicprofile.d.ts.map +0 -1
  571. package/lib/typescript/components/icons/Checkbox.d.ts +0 -5
  572. package/lib/typescript/components/icons/Checkbox.d.ts.map +0 -1
  573. package/lib/typescript/components/icons/Checkmark.d.ts +0 -5
  574. package/lib/typescript/components/icons/Checkmark.d.ts.map +0 -1
  575. package/lib/typescript/components/icons/Contentanalysis.d.ts +0 -5
  576. package/lib/typescript/components/icons/Contentanalysis.d.ts.map +0 -1
  577. package/lib/typescript/components/icons/Contenticon.d.ts +0 -5
  578. package/lib/typescript/components/icons/Contenticon.d.ts.map +0 -1
  579. package/lib/typescript/components/icons/EnochE.d.ts +0 -5
  580. package/lib/typescript/components/icons/EnochE.d.ts.map +0 -1
  581. package/lib/typescript/components/icons/Personalityicon.d.ts +0 -5
  582. package/lib/typescript/components/icons/Personalityicon.d.ts.map +0 -1
  583. package/lib/typescript/components/icons/Personalityprofile.d.ts +0 -5
  584. package/lib/typescript/components/icons/Personalityprofile.d.ts.map +0 -1
  585. package/lib/typescript/components/icons/Personalitytraits.d.ts +0 -5
  586. package/lib/typescript/components/icons/Personalitytraits.d.ts.map +0 -1
  587. package/lib/typescript/components/icons/Userpreferences.d.ts +0 -5
  588. package/lib/typescript/components/icons/Userpreferences.d.ts.map +0 -1
  589. package/lib/typescript/components/icons/index.d.ts +0 -12
  590. package/lib/typescript/components/icons/index.d.ts.map +0 -1
  591. package/lib/typescript/config/api.d.ts +0 -24
  592. package/lib/typescript/config/api.d.ts.map +0 -1
  593. package/lib/typescript/context/AuthContext.d.ts +0 -34
  594. package/lib/typescript/context/AuthContext.d.ts.map +0 -1
  595. package/lib/typescript/hooks/useConnectedAccounts.d.ts +0 -11
  596. package/lib/typescript/hooks/useConnectedAccounts.d.ts.map +0 -1
  597. package/lib/typescript/hooks/useUserConnections.d.ts +0 -12
  598. package/lib/typescript/hooks/useUserConnections.d.ts.map +0 -1
  599. package/lib/typescript/services/apiClient.d.ts +0 -91
  600. package/lib/typescript/services/apiClient.d.ts.map +0 -1
  601. package/lib/typescript/services/authService.d.ts +0 -216
  602. package/lib/typescript/services/authService.d.ts.map +0 -1
  603. package/lib/typescript/services/biometricPinService.d.ts +0 -29
  604. package/lib/typescript/services/biometricPinService.d.ts.map +0 -1
  605. package/lib/typescript/services/connectedAccountsService.d.ts +0 -56
  606. package/lib/typescript/services/connectedAccountsService.d.ts.map +0 -1
  607. package/lib/typescript/services/googleAuthService.d.ts +0 -63
  608. package/lib/typescript/services/googleAuthService.d.ts.map +0 -1
  609. package/lib/typescript/services/imageCompressionService.d.ts +0 -37
  610. package/lib/typescript/services/imageCompressionService.d.ts.map +0 -1
  611. package/lib/typescript/services/jwtStorageService.d.ts +0 -86
  612. package/lib/typescript/services/jwtStorageService.d.ts.map +0 -1
  613. package/lib/typescript/services/mobileTrainingService.d.ts +0 -45
  614. package/lib/typescript/services/mobileTrainingService.d.ts.map +0 -1
  615. package/lib/typescript/services/pinEncryptionService.d.ts +0 -17
  616. package/lib/typescript/services/pinEncryptionService.d.ts.map +0 -1
  617. package/lib/typescript/services/pinStorageUtils.d.ts +0 -25
  618. package/lib/typescript/services/pinStorageUtils.d.ts.map +0 -1
  619. package/lib/typescript/services/storageService.d.ts +0 -128
  620. package/lib/typescript/services/storageService.d.ts.map +0 -1
  621. package/lib/typescript/services/trainingApiHelpers.d.ts +0 -38
  622. package/lib/typescript/services/trainingApiHelpers.d.ts.map +0 -1
  623. package/lib/typescript/services/userConnectionsService.d.ts +0 -90
  624. package/lib/typescript/services/userConnectionsService.d.ts.map +0 -1
  625. package/lib/typescript/services/youtubeMigrationService.d.ts +0 -12
  626. package/lib/typescript/services/youtubeMigrationService.d.ts.map +0 -1
  627. package/lib/typescript/theme/index.d.ts +0 -416
  628. package/lib/typescript/theme/index.d.ts.map +0 -1
  629. package/lib/typescript/utils/eventUtils.d.ts +0 -108
  630. package/lib/typescript/utils/eventUtils.d.ts.map +0 -1
  631. package/lib/typescript/utils/haptics.d.ts +0 -11
  632. package/lib/typescript/utils/haptics.d.ts.map +0 -1
  633. package/lib/typescript/utils/imagePreloader.d.ts +0 -2
  634. package/lib/typescript/utils/imagePreloader.d.ts.map +0 -1
  635. package/src/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  636. package/src/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  637. package/src/assets/icons/Facebookicon.png +0 -0
  638. package/src/assets/icons/Gmail.png +0 -0
  639. package/src/assets/icons/Linkedinicon.png +0 -0
  640. package/src/assets/icons/Redditicon.png +0 -0
  641. package/src/assets/icons/YouTubeicon2.png +0 -0
  642. package/src/assets/icons/YouTubeicon3.png +0 -0
  643. package/src/assets/icons/farcaster.png +0 -0
  644. package/src/assets/icons/instagram.png +0 -0
  645. package/src/assets/icons/pinterest.png +0 -0
  646. package/src/assets/icons/swerv_logo.png +0 -0
  647. package/src/assets/icons/twitter.jpg +0 -0
  648. package/src/assets/images/Checkbox.svg +0 -3
  649. package/src/assets/images/EnochE.svg +0 -19
  650. package/src/assets/images/Enochicon1.png +0 -0
  651. package/src/assets/images/Face_ID_logo.png +0 -0
  652. package/src/assets/images/Facebookicon.png +0 -0
  653. package/src/assets/images/Gmail.png +0 -0
  654. package/src/assets/images/Googlelogo.png +0 -0
  655. package/src/assets/images/Linkedinicon.png +0 -0
  656. package/src/assets/images/Onairoslogo.png +0 -0
  657. package/src/assets/images/Personalityprofile.svg +0 -3
  658. package/src/assets/images/Personalitytraits.svg +0 -3
  659. package/src/assets/images/Redditicon.png +0 -0
  660. package/src/assets/images/Userpreferences.svg +0 -3
  661. package/src/assets/images/YouTubeicon3.png +0 -0
  662. package/src/assets/images/arrow.svg +0 -20
  663. package/src/assets/images/basicproficon.svg +0 -43
  664. package/src/assets/images/basicprofile.svg +0 -3
  665. package/src/assets/images/checkmark.svg +0 -4
  666. package/src/assets/images/contentanalysis.svg +0 -3
  667. package/src/assets/images/contenticon.svg +0 -23
  668. package/src/assets/images/persona1.png +0 -0
  669. package/src/assets/images/persona2.png +0 -0
  670. package/src/assets/images/persona3.png +0 -0
  671. package/src/assets/images/persona4.png +0 -0
  672. package/src/assets/images/persona5.png +0 -0
  673. package/src/assets/images/personalityicon.svg +0 -18
  674. package/src/assets/images/x-close.svg +0 -3
  675. package/src/components/BodyText.tsx +0 -33
  676. package/src/components/BrandMark.tsx +0 -62
  677. package/src/components/CodeInput.tsx +0 -32
  678. package/src/components/EmailInput.tsx +0 -31
  679. package/src/components/ExistingUserDataConfirmation.tsx +0 -507
  680. package/src/components/GoogleButton.tsx +0 -55
  681. package/src/components/HeadingGroup.tsx +0 -49
  682. package/src/components/ModalHeader.tsx +0 -125
  683. package/src/components/ModalSheet.tsx +0 -59
  684. package/src/components/OnairosSignInButton.tsx +0 -132
  685. package/src/components/PersonaImage.tsx +0 -79
  686. package/src/components/PersonaLoadingScreen.tsx +0 -201
  687. package/src/components/PersonalizationConsentScreen.tsx +0 -410
  688. package/src/components/PinCreationScreen.tsx +0 -492
  689. package/src/components/PlatformConnectorsStep.tsx +0 -892
  690. package/src/components/PlatformToggle.tsx +0 -226
  691. package/src/components/PrimaryButton.tsx +0 -214
  692. package/src/components/SignInMatchAnimation.tsx +0 -225
  693. package/src/components/SignInStep.tsx +0 -217
  694. package/src/components/VerificationStep.tsx +0 -198
  695. package/src/components/WelcomeScreen.tsx +0 -490
  696. package/src/components/icons/Basicproficon.tsx +0 -30
  697. package/src/components/icons/Basicprofile.tsx +0 -17
  698. package/src/components/icons/Checkbox.tsx +0 -17
  699. package/src/components/icons/Checkmark.tsx +0 -24
  700. package/src/components/icons/Contentanalysis.tsx +0 -17
  701. package/src/components/icons/Contenticon.tsx +0 -30
  702. package/src/components/icons/EnochE.tsx +0 -39
  703. package/src/components/icons/Personalityicon.tsx +0 -22
  704. package/src/components/icons/Personalityprofile.tsx +0 -17
  705. package/src/components/icons/Personalitytraits.tsx +0 -17
  706. package/src/components/icons/Userpreferences.tsx +0 -17
  707. package/src/components/icons/index.ts +0 -12
  708. package/src/config/api.ts +0 -25
  709. package/src/context/AuthContext.tsx +0 -393
  710. package/src/hooks/useConnectedAccounts.ts +0 -139
  711. package/src/hooks/useUserConnections.ts +0 -166
  712. package/src/services/apiClient.ts +0 -337
  713. package/src/services/authService.ts +0 -1008
  714. package/src/services/biometricPinService.ts +0 -193
  715. package/src/services/connectedAccountsService.ts +0 -290
  716. package/src/services/googleAuthService.ts +0 -279
  717. package/src/services/imageCompressionService.ts +0 -303
  718. package/src/services/jwtStorageService.ts +0 -257
  719. package/src/services/mobileTrainingService.ts +0 -204
  720. package/src/services/pinEncryptionService.ts +0 -76
  721. package/src/services/pinStorageUtils.ts +0 -97
  722. package/src/services/storageService.ts +0 -452
  723. package/src/services/trainingApiHelpers.ts +0 -67
  724. package/src/services/userConnectionsService.ts +0 -557
  725. package/src/services/youtubeMigrationService.ts +0 -454
  726. package/src/theme/index.ts +0 -239
  727. package/src/utils/eventUtils.ts +0 -303
  728. package/src/utils/haptics.ts +0 -59
  729. package/src/utils/imagePreloader.ts +0 -2
@@ -1,207 +1,106 @@
1
- import React, { useState, useEffect, useRef } from 'react';
2
- import { View, Text, StyleSheet, TouchableOpacity, ActivityIndicator, Dimensions, TextInput, Keyboard, Animated, Platform, KeyboardAvoidingView, Modal, TouchableWithoutFeedback } from 'react-native';
1
+ import React, { useEffect, useRef, useState } from 'react';
2
+ import { View, Text, StyleSheet, TouchableOpacity, Dimensions, Modal, TouchableWithoutFeedback, SafeAreaView, Image, Alert } from 'react-native';
3
+ import Icon from 'react-native-vector-icons/MaterialIcons';
3
4
  import { io } from 'socket.io-client';
4
- import { getAuthToken, getOnairosUsername } from '../services/authService';
5
- import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
6
- import AsyncStorage from '@react-native-async-storage/async-storage';
7
- import { getEncryptedPinForAPI } from '../services/pinEncryptionService';
8
- import { clearTemporaryPin } from '../services/pinStorageUtils';
9
- // import EmailVerification from '../../../components/EmailVerification'; // Commented out - file doesn't exist
10
- // import { sendEmailVerificationCode } from '../../../services/api'; // Commented out - use local API instead
11
- import { startEnochTrainingWithYouTubeCheck } from '../services/mobileTrainingService';
12
- import { ExistingUserDataConfirmation } from './ExistingUserDataConfirmation';
5
+ import { COLORS } from '../constants';
13
6
  const {
14
7
  width,
15
8
  height
16
9
  } = Dimensions.get('window');
17
10
  export const TrainingModal = ({
18
11
  visible,
12
+ progress,
13
+ eta,
19
14
  onCancel,
20
15
  onComplete,
21
16
  modelKey,
22
17
  username,
23
- isPrimaryAuth = false,
24
- autoFocusEmailInput = false,
25
- // Add default value
26
- navigation
18
+ test = false
27
19
  }) => {
28
- const [progress, setProgress] = useState(0);
29
- const [email, setEmail] = useState('');
30
- const [emailError, setEmailError] = useState('');
31
- const [isTrainingComplete, setIsTrainingComplete] = useState(false);
32
- const [isSubmittingEmail, setIsSubmittingEmail] = useState(false);
20
+ // Socket and training state
21
+ const socketRef = useRef(null);
33
22
  const [socketConnected, setSocketConnected] = useState(false);
34
23
  const [trainingStatus, setTrainingStatus] = useState('Initializing...');
35
24
  const [hasError, setHasError] = useState(false);
25
+ const [errorCode, setErrorCode] = useState(null);
26
+ const [isTrainingComplete, setIsTrainingComplete] = useState(false);
36
27
  const [userTraits, setUserTraits] = useState(null);
37
28
  const [inferenceResults, setInferenceResults] = useState(null);
38
- const socketRef = useRef(null);
39
- const emailInputRef = useRef(null); // Add email input ref
40
- const [userToken, setUserToken] = useState(null);
41
- const [userInfo, setUserInfo] = useState(null);
42
- const [matchStep, setMatchStep] = useState('email');
43
- const [matchCount, setMatchCount] = useState(0);
44
- const [isContinueLoading, setIsContinueLoading] = useState(false);
45
- const [existingUserAccountInfo, setExistingUserAccountInfo] = useState(null);
46
-
47
- // --- Modal slide animation ---
48
- const modalTranslateY = useRef(new Animated.Value(height)).current;
49
- const animationDuration = 300; // Increased duration for smoother animation
50
-
51
- // Reset state when modal becomes invisible
52
- useEffect(() => {
53
- if (!visible) {
54
- // Reset all state
55
- setEmail('');
56
- setEmailError('');
57
- setIsSubmittingEmail(false);
58
- setMatchStep('email');
59
- setMatchCount(0);
60
- setIsContinueLoading(false);
61
- setProgress(0);
62
- setIsTrainingComplete(false);
63
- setHasError(false);
64
- setTrainingStatus('Initializing...');
65
- setUserTraits(null);
66
- setInferenceResults(null);
67
- setUserToken(null);
68
- setUserInfo(null);
69
-
70
- // Reset animation value
71
- modalTranslateY.setValue(height);
72
- }
73
- }, [visible]);
74
-
75
- // Handle animation
76
- useEffect(() => {
77
- if (visible) {
78
- // Ensure we start from the bottom
79
- modalTranslateY.setValue(height);
80
- // Animate up
81
- Animated.spring(modalTranslateY, {
82
- toValue: 0,
83
- useNativeDriver: true,
84
- damping: 20,
85
- mass: 1,
86
- stiffness: 200
87
- }).start();
88
- }
89
- }, [visible]);
90
-
91
- // Handle modal close
92
- const handleModalClose = () => {
93
- Animated.spring(modalTranslateY, {
94
- toValue: height,
95
- useNativeDriver: true,
96
- damping: 20,
97
- mass: 1,
98
- stiffness: 200
99
- }).start(() => {
100
- onCancel();
101
- });
29
+ const [internalProgress, setInternalProgress] = useState(0);
30
+ const [isEnochSDK, setIsEnochSDK] = useState(false); // Determine if using Enoch SDK
31
+ const [trainingResults, setTrainingResults] = useState(null);
32
+
33
+ // Use internal progress if available, otherwise fall back to prop progress
34
+ const currentProgress = internalProgress > 0 ? internalProgress / 100 : progress;
35
+ const progressPercentage = Math.round(currentProgress * 100);
36
+
37
+ // Mock user data for now - in real implementation this would come from props
38
+ const userToken = 'mock-token'; // TODO: Get from actual auth
39
+ const userInfo = {
40
+ username: username || 'mobile_user',
41
+ email: null,
42
+ id: null,
43
+ name: username || 'mobile_user'
102
44
  };
103
45
 
104
- // Get auth token and user info on mount
46
+ // Check if we should use Enoch SDK (based on modelKey or other criteria)
105
47
  useEffect(() => {
106
- const loadUserData = async () => {
107
- try {
108
- const token = await getAuthToken();
109
- setUserToken(token);
110
- if (token) {
111
- // Use provided username instead of making API call to avoid 404 error
112
- // The backend JWT contains username but /api/user/profile endpoint doesn't exist
113
- const fallbackUsername = username || 'mobile_user';
114
- console.log('🔍 Using provided username for training:', fallbackUsername);
115
- setUserInfo({
116
- username: fallbackUsername,
117
- email: null,
118
- id: null // Will be filled by backend during training
119
- });
120
- }
121
- } catch (error) {
122
- console.error('Error loading user data:', error);
123
- // Fallback user info
124
- setUserInfo({
125
- username: username || 'mobile_user',
126
- email: null,
127
- id: null
128
- });
129
- }
130
- };
131
- if (visible) {
132
- loadUserData();
133
- }
134
- }, [visible, username]);
48
+ // For now, default to clean training unless specified
49
+ // In real implementation, this would be determined by SDK type
50
+ setIsEnochSDK((modelKey === null || modelKey === void 0 ? void 0 : modelKey.includes('enoch')) || false);
51
+ }, [modelKey]);
135
52
 
136
- // Start Enoch training via API
137
- const startEnochTraining = async socketId => {
53
+ // Start training with new API schema
54
+ const startTraining = async socketId => {
138
55
  try {
139
56
  setTrainingStatus('Starting training...');
140
- setProgress(10);
57
+ setInternalProgress(10);
58
+ setHasError(false);
59
+ setErrorCode(null);
141
60
  if (!userToken) {
142
61
  throw new Error('No authentication token available');
143
62
  }
144
- console.log('🚀 Starting Enoch training with socketId:', socketId);
145
63
 
146
- // Get stored Onairos username for API calls
147
- const storedUsername = await getOnairosUsername();
148
- const finalUsername = storedUsername || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || username || 'mobile_user';
64
+ // Determine endpoint based on SDK type
65
+ const endpoint = isEnochSDK ? '/mobile-training/enoch' : '/mobile-training/clean';
66
+ console.log(`🚀 Starting training with endpoint: ${endpoint}`);
67
+ console.log('🔍 Production mode: Using new training API schema');
149
68
 
150
- // Get connected platforms information
151
- const connectedPlatforms = await AsyncStorage.getItem('connectedPlatforms');
152
- const platformsList = connectedPlatforms ? JSON.parse(connectedPlatforms) : [];
153
- console.log('📱 Connected platforms for training:', platformsList);
154
-
155
- // Get encrypted PIN for training (if available)
156
- const encryptedPin = await getEncryptedPinForAPI().catch(error => {
157
- console.warn('⚠️ Could not get encrypted PIN for training:', error);
158
- return null;
159
- });
160
-
161
- // Prepare user data for training - match backend expected format
69
+ // Prepare training data in new format
162
70
  const trainingData = {
163
- socketId,
164
- username: finalUsername,
165
- // This will be used as fallback in backend
166
- email: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || null,
167
- // Backend will use this if available
168
- modelKey: modelKey || null,
169
- connectedPlatforms: platformsList,
170
- // Include connected platforms
171
- // Include encrypted PIN if available
172
- ...(encryptedPin && {
173
- encryptedPin: encryptedPin,
174
- hasPinData: true
175
- })
71
+ Info: {
72
+ username: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || username || 'mobile_user',
73
+ // Mock connected platforms - in real implementation this would come from props
74
+ connectedPlatforms: ['youtube', 'instagram', 'reddit'] // TODO: Get from actual connections
75
+ }
176
76
  };
177
- console.log('📤 Starting training with YouTube migration check:', trainingData);
178
- console.log('🔑 Using stored username:', storedUsername);
179
- console.log('🔑 Final username for training:', finalUsername);
180
- console.log('🔗 Connected platforms:', platformsList);
181
- console.log('🔐 PIN included in training:', !!encryptedPin);
182
-
183
- // Use the new training function that includes YouTube migration check
184
- const result = await startEnochTrainingWithYouTubeCheck(trainingData);
77
+ console.log('📤 Sending training data:', trainingData);
78
+
79
+ // Call the new training API
80
+ const response = await fetch(`https://api2.onairos.uk${endpoint}`, {
81
+ method: 'POST',
82
+ headers: {
83
+ 'Content-Type': 'application/json',
84
+ 'Authorization': `Bearer ${userToken}` // JWT token authentication
85
+ },
86
+ body: JSON.stringify(trainingData)
87
+ });
88
+ const result = await response.json();
185
89
  if (result.success) {
186
90
  console.log('🚀 Training Started:', result.message);
187
- console.log('🎯 Training Features:', result.features);
188
-
189
- // Log the new features from the spec
190
- if (result.features) {
191
- console.log('✅ Inference enabled:', result.features.inference);
192
- console.log('💾 Storage method:', result.features.storage);
193
- console.log('🔒 Compression enabled:', result.features.compression);
194
- console.log('🔐 Encryption enabled:', result.features.encryption);
195
- console.log('📊 Training type:', result.features.type);
196
- console.log('🗄️ Databases:', result.features.databases);
197
- console.log('📈 Query scores enabled:', result.features.queryScores);
198
- }
199
- setTrainingStatus('Training model...');
200
- setProgress(20);
91
+ setTrainingStatus('Training initiated...');
92
+ setInternalProgress(20);
201
93
  } else {
202
94
  console.error('Training start failed:', result.error);
203
- setTrainingStatus(`Error: ${result.error}`);
204
- setHasError(true);
95
+
96
+ // Handle specific error codes from new schema
97
+ if (result.code) {
98
+ setErrorCode(result.code);
99
+ handleTrainingError(result.code, result.error);
100
+ } else {
101
+ setTrainingStatus(`Error: ${result.error}`);
102
+ setHasError(true);
103
+ }
205
104
  }
206
105
  } catch (error) {
207
106
  console.error('Training start error:', error);
@@ -210,743 +109,600 @@ export const TrainingModal = ({
210
109
  }
211
110
  };
212
111
 
213
- // Setup socket connection and training
214
- useEffect(() => {
215
- if (!visible || !userToken || !userInfo) return;
216
- console.log('Setting up socket connection for training...');
217
- console.log('🧑‍💻 User info available:', userInfo);
218
-
219
- // Initialize socket connection
220
- socketRef.current = io('https://api2.onairos.uk', {
221
- transports: ['websocket'],
222
- autoConnect: false
223
- });
224
-
225
- // Socket event listeners
226
- socketRef.current.on('connect', () => {
227
- var _socketRef$current;
228
- console.log('✅ Socket connected for training');
229
- setSocketConnected(true);
230
- const socketId = (_socketRef$current = socketRef.current) === null || _socketRef$current === void 0 ? void 0 : _socketRef$current.id;
231
- if (socketId) {
232
- // ❌ DISABLED: This was causing training to start too early (when modal opens)
233
- // Training should only start when transitioning from connectors to PIN screen
234
- // startEnochTraining(socketId);
235
- console.log('🔌 Socket ready, but training will start only when user transitions to PIN screen');
236
- }
237
- });
238
- socketRef.current.on('disconnect', () => {
239
- console.log('❌ Socket disconnected');
240
- setSocketConnected(false);
241
- });
242
- socketRef.current.on('trainingCompleted', data => {
243
- console.log('✅ Training Complete:', data);
244
- setTrainingStatus('Running test inference...');
245
- setProgress(60);
246
- });
247
- socketRef.current.on('inferenceCompleted', data => {
248
- console.log('🧠 Inference Complete:', data);
249
- setTrainingStatus('Uploading to S3...');
250
- setProgress(80);
251
- setUserTraits(data.traits);
252
- setInferenceResults(data.inferenceResults);
253
- });
254
- socketRef.current.on('modelStandby', data => {
255
- console.log('🎉 All Complete:', data);
256
-
257
- // Log completion details based on new spec
258
- if (data.completed) {
259
- console.log('✅ Training completed:', data.message);
260
- console.log('💾 Storage method:', data.storage);
261
- console.log('🔐 Encryption enabled:', data.encryption);
262
- console.log('🧠 Inference enabled:', data.inference);
263
-
264
- // Log database info for Enoch mode
265
- if (data.databases && Array.isArray(data.databases)) {
266
- console.log('🗄️ Databases used:', data.databases.join(', '));
267
- }
112
+ // Handle training errors with specific error codes
113
+ const handleTrainingError = (code, message) => {
114
+ console.error(`Training Error [${code}]:`, message);
115
+ setHasError(true);
116
+ switch (code) {
117
+ case 'PIN_REQUIRED':
118
+ setTrainingStatus('PIN setup required');
119
+ Alert.alert('PIN Required', 'Please set up your PIN first before training.', [{
120
+ text: 'Cancel',
121
+ style: 'cancel'
122
+ }, {
123
+ text: 'Set PIN',
124
+ onPress: () => {
125
+ // TODO: Navigate to PIN setup
126
+ console.log('Navigate to PIN setup');
127
+ }
128
+ }]);
129
+ break;
130
+ case 'CONNECTIONS_REQUIRED':
131
+ setTrainingStatus('No connected accounts');
132
+ Alert.alert('Connections Required', 'Please connect at least one social media account before training.', [{
133
+ text: 'Cancel',
134
+ style: 'cancel'
135
+ }, {
136
+ text: 'Connect',
137
+ onPress: () => {
138
+ // TODO: Navigate to connections
139
+ console.log('Navigate to connections');
140
+ }
141
+ }]);
142
+ break;
143
+ case 'INSUFFICIENT_DATA':
144
+ setTrainingStatus('Insufficient data for training');
145
+ Alert.alert('Insufficient Data', 'We need more interaction data to train your model effectively. Please use your connected platforms more and try again.', [{
146
+ text: 'OK',
147
+ style: 'default'
148
+ }]);
149
+ break;
150
+ case 'ENCRYPTION_REQUIRED':
151
+ setTrainingStatus('Model encryption failed');
152
+ Alert.alert('Encryption Error', 'Failed to encrypt your model. Please try again.', [{
153
+ text: 'OK',
154
+ style: 'default'
155
+ }]);
156
+ break;
157
+ default:
158
+ setTrainingStatus(`Error: ${message}`);
159
+ Alert.alert('Training Error', message || 'An unexpected error occurred during training.', [{
160
+ text: 'OK',
161
+ style: 'default'
162
+ }]);
163
+ }
164
+ };
268
165
 
269
- // Log testing mode
270
- if (data.testing) {
271
- console.log('🧪 Testing mode enabled');
166
+ // Simulate training progress for test mode
167
+ const simulateTraining = () => {
168
+ var _phases$currentPhase;
169
+ console.log('🧪 Starting simulated training with new schema phases...');
170
+ setTrainingStatus('Validating Requirements');
171
+ setInternalProgress(5);
172
+
173
+ // Simulate all phases from the new schema
174
+ const phases = [{
175
+ progress: 10,
176
+ status: 'Validating Requirements',
177
+ delay: 1000
178
+ }, {
179
+ progress: 25,
180
+ status: 'Training Model',
181
+ delay: 2000
182
+ }, {
183
+ progress: 50,
184
+ status: 'Training Model',
185
+ delay: 2000
186
+ }, {
187
+ progress: 65,
188
+ status: 'Model Trained - Running Test Inference',
189
+ delay: 1500
190
+ }, {
191
+ progress: 80,
192
+ status: 'Encrypting and Compressing Model',
193
+ delay: 1000
194
+ }, {
195
+ progress: 95,
196
+ status: 'Uploading Encrypted Model to ARDrive',
197
+ delay: 1500
198
+ }, {
199
+ progress: 100,
200
+ status: 'Complete!',
201
+ delay: 500
202
+ }];
203
+ let currentPhase = 0;
204
+ const progressInterval = setInterval(() => {
205
+ if (currentPhase < phases.length) {
206
+ const phase = phases[currentPhase];
207
+ setInternalProgress(phase.progress);
208
+ setTrainingStatus(phase.status);
209
+ if (phase.progress === 100) {
210
+ setIsTrainingComplete(true);
211
+ clearInterval(progressInterval);
212
+
213
+ // Mock completion results
214
+ const mockResults = {
215
+ completed: true,
216
+ message: "Model trained, encrypted, and stored successfully",
217
+ storage: "ARDrive",
218
+ encryption: true,
219
+ inference: isEnochSDK,
220
+ // Only Enoch SDK runs inference
221
+ modelUrl: `https://arweave.net/mock_tx_${Date.now()}`
222
+ };
223
+ setTrainingResults(mockResults);
224
+
225
+ // Auto-complete after a short delay
226
+ setTimeout(() => {
227
+ onComplete && onComplete();
228
+ }, 1000);
272
229
  }
230
+ currentPhase++;
273
231
  }
274
- setIsTrainingComplete(true);
275
- setTrainingStatus('Complete!');
276
- setProgress(100);
232
+ }, ((_phases$currentPhase = phases[currentPhase]) === null || _phases$currentPhase === void 0 ? void 0 : _phases$currentPhase.delay) || 1000);
277
233
 
278
- // Clear temporary PIN after training is complete
279
- clearTemporaryPin();
280
-
281
- // Show continue button for primary auth when training is complete
282
- if (isPrimaryAuth) {
283
- setMatchStep('found');
284
- setMatchCount(Math.floor(Math.random() * 10) + 5);
285
- }
286
- });
287
- socketRef.current.on('trainingUpdate', data => {
288
- if (data.error) {
289
- console.error('Training update error:', data.error);
290
- setTrainingStatus(`Error: ${data.error}`);
291
- setHasError(true);
292
- } else if (data.progress) {
293
- setProgress(data.progress);
294
- setTrainingStatus(data.status || 'Training in progress...');
295
- }
296
- });
297
-
298
- // Connect to socket
299
- socketRef.current.connect();
300
-
301
- // Cleanup function
302
- return () => {
303
- if (socketRef.current) {
304
- console.log('🔌 Disconnecting training socket...');
305
- socketRef.current.disconnect();
306
- socketRef.current = null;
307
- }
308
- };
309
- }, [visible, userToken, userInfo]);
234
+ // Cleanup interval on unmount
235
+ return () => clearInterval(progressInterval);
236
+ };
310
237
 
311
- // When modal becomes visible and autoFocus is requested, focus the email input
238
+ // Setup socket connection and training
312
239
  useEffect(() => {
313
- if (visible && autoFocusEmailInput && matchStep === 'email' && emailInputRef.current) {
314
- const timer = setTimeout(() => {
315
- var _emailInputRef$curren;
316
- (_emailInputRef$curren = emailInputRef.current) === null || _emailInputRef$curren === void 0 || _emailInputRef$curren.focus();
317
- }, 150); // Small delay to sync with modal animation
318
- return () => clearTimeout(timer);
319
- } else if (!visible && emailInputRef.current) {
320
- // Optional: Blur input when modal is not visible
321
- // emailInputRef.current?.blur();
322
- }
323
- }, [visible, autoFocusEmailInput, matchStep]);
240
+ if (!visible || !userInfo) return;
241
+ console.log('Setting up socket connection for training...');
242
+ console.log('🧑‍💻 User info available:', userInfo);
243
+ console.log('🧪 Test mode:', test);
244
+ console.log('🔧 Using Enoch SDK:', isEnochSDK);
324
245
 
325
- // Validate email format
326
- const validateEmail = email => {
327
- // Check for reviewer bypass first
328
- if (email.toLowerCase().trim() === 'reviewer') {
329
- return true; // Valid for reviewer bypass
330
- }
331
- const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
332
- return emailRegex.test(email);
333
- };
334
- const handleEmailSubmit = async () => {
335
- // Check for reviewer bypass
336
- if (email.toLowerCase().trim() === 'reviewer') {
337
- console.log('🔍 Reviewer bypass detected');
338
- setEmail('reviewer@bypass.com'); // Set a valid email for the flow
339
- if (onComplete) {
340
- onComplete('reviewer@bypass.com');
341
- }
246
+ // If test mode is enabled, use simulation instead of real API
247
+ if (test) {
248
+ console.log('🧪 Test mode enabled - Using simulated training with new schema');
249
+ setSocketConnected(true);
250
+ simulateTraining();
342
251
  return;
343
252
  }
344
253
 
345
- // Regular email validation and submission
346
- if (!validateEmail(email)) {
347
- setEmailError('Please enter a valid email address');
348
- return;
349
- }
350
- setIsSubmittingEmail(true);
351
- setEmailError('');
254
+ // Initialize real socket connection
352
255
  try {
353
- console.log('📧 Sending verification code to:', email);
256
+ console.log('🔌 Production mode: Initializing real socket connection');
354
257
 
355
- // Send verification code using the new API
356
- // const result = await sendEmailVerificationCode(email); // Function not available
357
- const result = {
358
- success: true,
359
- message: 'Email verification not implemented'
360
- };
361
- if (result.success) {
362
- console.log('✅ Verification code sent successfully');
363
- setMatchStep('verification'); // Move to verification step
364
- } else {
365
- console.log('❌ Failed to send verification code:', result.message);
366
- setEmailError(result.message || 'Failed to send verification code. Please try again.');
367
- }
368
- } catch (error) {
369
- console.error('❌ Error sending verification code:', error);
370
- setEmailError('Network error. Please check your connection and try again.');
371
- } finally {
372
- setIsSubmittingEmail(false);
373
- }
374
- };
375
- const handleVerificationComplete = async (verifiedEmail, isVerified, accountInfo) => {
376
- if (isVerified) {
377
- console.log('✅ Email verification completed for:', verifiedEmail);
378
- console.log('🔍 AccountInfo received:', accountInfo);
379
- console.log('🔍 ExistingUser flag:', accountInfo === null || accountInfo === void 0 ? void 0 : accountInfo.existingUser);
380
-
381
- // Check if this is an existing user - must have accountInfo AND explicitly marked as existing
382
- if (accountInfo && accountInfo.existingUser === true) {
383
- console.log('🔍 Existing user detected:', accountInfo);
384
-
385
- // CRITICAL FIX: Ensure we have a valid JWT token before proceeding
386
- if (accountInfo.token && typeof accountInfo.token === 'string' && accountInfo.token.length > 50) {
387
- console.log('✅ Valid JWT token found for existing user');
388
-
389
- // Store the token immediately for existing users
390
- await AsyncStorage.setItem('onairos_jwt_token', accountInfo.token);
391
- await AsyncStorage.setItem('enoch_token', accountInfo.token);
392
- await AsyncStorage.setItem('auth_token', accountInfo.token);
393
- await AsyncStorage.setItem('user_email', verifiedEmail);
394
- await AsyncStorage.setItem('auth_method', 'onairos');
395
- console.log('✅ Existing user tokens stored successfully');
396
-
397
- // NEW: Show existing user confirmation modal instead of immediately completing
398
- setExistingUserAccountInfo(accountInfo);
399
- setMatchStep('existing_user');
400
- return;
401
- } else {
402
- console.error('❌ No valid JWT token for existing user - token:', accountInfo.token);
403
- console.error('❌ Cannot proceed without valid authentication token');
258
+ // Initialize socket connection
259
+ socketRef.current = io('https://api2.onairos.uk', {
260
+ transports: ['websocket'],
261
+ autoConnect: false
262
+ });
404
263
 
405
- // Don't fall back to email - throw error instead
406
- throw new Error('No valid authentication token received from server');
264
+ // Socket event listeners for new schema
265
+ socketRef.current.on('connect', () => {
266
+ var _socketRef$current;
267
+ console.log('✅ Socket connected for training');
268
+ setSocketConnected(true);
269
+ const socketId = (_socketRef$current = socketRef.current) === null || _socketRef$current === void 0 ? void 0 : _socketRef$current.id;
270
+ if (socketId) {
271
+ startTraining(socketId);
407
272
  }
408
- return;
409
- }
410
- console.log('🔍 New user detected - proceeding with account creation flow');
411
-
412
- // New user - proceed with account creation and continue to platform connectors
413
- try {
414
- console.log('📧 Creating Onairos account for verified email:', verifiedEmail);
415
- const username = verifiedEmail.split('@')[0];
416
- const onairosSignupResponse = await fetch('https://api2.onairos.uk/register/enoch', {
417
- method: 'POST',
418
- headers: {
419
- 'Content-Type': 'application/json'
420
- },
421
- body: JSON.stringify({
422
- email: verifiedEmail,
423
- username: username,
424
- name: username,
425
- emailVerified: true // Mark as verified
426
- })
427
- });
428
- const onairosResponseData = await onairosSignupResponse.json();
429
- console.log('🔗 Onairos account creation response:', onairosResponseData);
430
- if (onairosResponseData.token) {
431
- // Store tokens
432
- await AsyncStorage.setItem('onairos_jwt_token', onairosResponseData.token);
433
- await AsyncStorage.setItem('auth_token', onairosResponseData.token);
434
- await AsyncStorage.setItem('enoch_token', onairosResponseData.token);
435
- await AsyncStorage.setItem('onairos_username', onairosResponseData.username);
436
- await AsyncStorage.setItem('user_email', verifiedEmail);
437
- console.log('✅ Account created and tokens stored');
438
- console.log('🔗 Proceeding to UniversalOnboarding platform connectors');
273
+ });
274
+ socketRef.current.on('disconnect', () => {
275
+ console.log(' Socket disconnected');
276
+ setSocketConnected(false);
277
+ });
278
+ socketRef.current.on('connect_error', error => {
279
+ console.error(' Socket connection error:', error);
280
+ setTrainingStatus('Connection failed');
281
+ setHasError(true);
282
+ });
439
283
 
440
- // Close the TrainingModal and proceed to UniversalOnboarding platform connectors
441
- if (onComplete) {
442
- // This is the account creation path for new users
443
- // Always proceed to platform connectors for new users, regardless of backend response
444
- console.log('📧 TrainingModal: New user account created - proceeding to platform connectors:', verifiedEmail);
445
- onComplete(verifiedEmail);
284
+ // Handle training updates with new schema phases
285
+ socketRef.current.on('trainingUpdate', data => {
286
+ console.log('📡 Training update received:', data);
287
+ if (data.error) {
288
+ if (data.code) {
289
+ setErrorCode(data.code);
290
+ handleTrainingError(data.code, data.error);
291
+ } else {
292
+ console.error('Training update error:', data.error);
293
+ setTrainingStatus(`Error: ${data.error}`);
294
+ setHasError(true);
446
295
  }
447
296
  } else {
448
- // No token returned, continue with email to platform connectors
449
- console.log('🔗 No token returned, proceeding to platform connectors with email');
450
- // CRITICAL FIX: Store email even when account creation fails
451
- await AsyncStorage.setItem('user_email', verifiedEmail);
452
- console.log('✅ Email stored despite no token for admin check compatibility');
453
- if (onComplete) {
454
- onComplete(verifiedEmail);
297
+ // Handle different status phases
298
+ if (data.status) {
299
+ setTrainingStatus(data.status);
300
+
301
+ // Update progress based on phase
302
+ switch (data.status) {
303
+ case 'Validating Requirements':
304
+ setInternalProgress(10);
305
+ break;
306
+ case 'Training Model':
307
+ setInternalProgress(data.percent || 40);
308
+ break;
309
+ case 'Model Trained - Running Test Inference':
310
+ setInternalProgress(65);
311
+ break;
312
+ case 'Encrypting and Compressing Model':
313
+ setInternalProgress(80);
314
+ break;
315
+ case 'Uploading Encrypted Model to ARDrive':
316
+ setInternalProgress(90);
317
+ break;
318
+ default:
319
+ if (data.percent) {
320
+ setInternalProgress(data.percent);
321
+ }
322
+ }
323
+ }
324
+ if (data.progress) {
325
+ setInternalProgress(data.progress);
455
326
  }
456
327
  }
457
- } catch (error) {
458
- console.error('❌ Error creating account after verification:', error);
459
- // Continue anyway to platform connectors
460
- console.log('🔗 Error occurred, but proceeding to platform connectors');
461
- // CRITICAL FIX: Store email even when account creation throws an error
462
- await AsyncStorage.setItem('user_email', verifiedEmail);
463
- console.log('✅ Email stored despite error for admin check compatibility');
464
- if (onComplete) {
465
- onComplete(verifiedEmail);
466
- }
467
- }
468
- }
469
- };
470
- const handleVerificationBack = () => {
471
- setMatchStep('email');
472
- setEmailError('');
473
- };
474
-
475
- // Handle existing user confirmation
476
- const handleExistingUserConfirm = async () => {
477
- console.log('✅ Existing user confirmed data sharing');
478
- if (existingUserAccountInfo && existingUserAccountInfo.token) {
479
- if (onComplete) {
480
- onComplete(existingUserAccountInfo.token);
481
- }
482
- } else {
483
- console.error('❌ No token available for existing user');
484
- setEmailError('Authentication error. Please try again.');
485
- setMatchStep('email');
486
- }
487
- };
488
- const handleExistingUserCancel = () => {
489
- console.log('❌ Existing user cancelled data sharing');
490
- setMatchStep('email');
491
- setExistingUserAccountInfo(null);
492
- setEmailError('');
493
- };
494
- const handleExistingUserAddMoreData = () => {
495
- console.log('🔗 Existing user wants to add more data');
496
-
497
- // Store the existing user info for later use
498
- if (existingUserAccountInfo && existingUserAccountInfo.token) {
499
- AsyncStorage.setItem('existing_user_token', existingUserAccountInfo.token);
500
- AsyncStorage.setItem('existing_user_info', JSON.stringify(existingUserAccountInfo));
501
- }
502
-
503
- // Continue to new user flow (UniversalOnboarding) but with existing user context
504
- setMatchStep('email');
505
- setExistingUserAccountInfo(null);
506
-
507
- // Call onComplete with email to trigger UniversalOnboarding
508
- if (onComplete) {
509
- onComplete(email);
510
- }
511
- };
512
-
513
- // Ensure cancel button always works
514
- const handleCancelPress = () => {
515
- // Clear temporary PIN when cancelling
516
- clearTemporaryPin();
517
- onCancel();
518
- };
519
- const handleContinue = () => {
520
- // Trigger haptic feedback when button is pressed
521
- ReactNativeHapticFeedback.trigger('impactMedium', {
522
- enableVibrateFallback: true,
523
- ignoreAndroidSystemSettings: false
524
- });
525
- console.log('handleContinue called. Current email state:', email);
526
- console.log('Continue button pressed, completing onboarding with email:', email);
527
-
528
- // Make sure we have a valid email
529
- if (!validateEmail(email)) {
530
- console.log('Email validation failed, cannot continue');
531
- return;
532
- }
328
+ });
533
329
 
534
- // Show loading state
535
- setIsContinueLoading(true);
330
+ // Handle training completion with new schema
331
+ socketRef.current.on('trainingCompleted', data => {
332
+ console.log('✅ Training Complete:', data);
333
+ if (data.completed && data.storage === 'ARDrive' && data.encryption === true) {
334
+ setTrainingStatus('Training completed successfully!');
335
+ setIsTrainingComplete(true);
336
+ setInternalProgress(100);
337
+ setTrainingResults(data);
338
+
339
+ // Display results
340
+ console.log('✅ Model URL:', data.modelUrl);
341
+ console.log('✅ Storage:', data.storage);
342
+ console.log('✅ Encrypted:', data.encryption);
343
+ console.log('✅ Inference:', data.inference);
344
+
345
+ // Auto-complete after a short delay
346
+ setTimeout(() => {
347
+ onComplete && onComplete();
348
+ }, 1500);
349
+ } else {
350
+ console.error('Training completion missing required fields:', data);
351
+ setTrainingStatus('Training completed with warnings');
352
+ setHasError(true);
353
+ }
354
+ });
536
355
 
537
- // Call onComplete immediately to prevent splash screen flash
538
- // The loading state will still be visible during the transition
539
- if (onComplete) {
540
- console.log('Calling onComplete with email:', email);
541
- onComplete(email);
542
- // Note: We don't reset isContinueLoading because the component will unmount
543
- }
544
- };
356
+ // Legacy handlers for backward compatibility
357
+ socketRef.current.on('inferenceCompleted', data => {
358
+ console.log('🧠 Inference Complete:', data);
359
+ setUserTraits(data.traits);
360
+ setInferenceResults(data.inferenceResults);
361
+ });
362
+ socketRef.current.on('modelStandby', data => {
363
+ console.log('🎉 Model Ready:', data);
364
+ // This is handled by trainingCompleted now
365
+ });
545
366
 
546
- // Calculate user-friendly message based on progress
547
- const getUserFriendlyMessage = () => {
548
- if (hasError) return 'Something went wrong. Please try again.';
549
- if (isTrainingComplete) return 'Your persona is ready! 🎉';
550
- if (progress < 20) {
551
- return 'Keeping your data private...';
552
- } else if (progress < 40) {
553
- return 'Trying to understand your mind...';
554
- } else if (progress < 60) {
555
- return 'You\'re more interesting than I expected...';
556
- } else if (progress < 80) {
557
- return 'Finalizing your unique persona...';
558
- } else if (progress < 95) {
559
- return 'Almost done...';
560
- } else {
561
- return 'Just a few more seconds...';
367
+ // Connect to socket
368
+ socketRef.current.connect();
369
+ } catch (socketError) {
370
+ console.error('🚨 Production mode: Socket connection failed:', socketError);
371
+ setTrainingStatus('Failed to connect to training service');
372
+ setHasError(true);
562
373
  }
563
- };
564
374
 
565
- // Calculate remaining time estimate
566
- const getTimeEstimate = () => {
567
- if (hasError) return 'Please try again';
568
- if (isTrainingComplete) return 'Complete!';
569
-
570
- // Rough time estimates based on progress
571
- const remainingProgress = 100 - progress;
572
- const estimatedSeconds = Math.ceil(remainingProgress / 100 * 120); // Assume 2 minutes total
573
-
574
- if (estimatedSeconds > 60) {
575
- return `About ${Math.ceil(estimatedSeconds / 60)} minute${Math.ceil(estimatedSeconds / 60) > 1 ? 's' : ''} remaining`;
576
- } else if (estimatedSeconds > 0) {
577
- return `About ${estimatedSeconds} seconds remaining`;
578
- } else {
579
- return 'Almost there...';
580
- }
375
+ // Cleanup function
376
+ return () => {
377
+ if (socketRef.current) {
378
+ console.log('🔌 Disconnecting training socket...');
379
+ socketRef.current.disconnect();
380
+ socketRef.current = null;
381
+ }
382
+ };
383
+ }, [visible, userInfo, test, isEnochSDK]);
384
+
385
+ // Render error details for specific error codes
386
+ const renderErrorDetails = () => {
387
+ if (!hasError || !errorCode) return null;
388
+ const errorDetails = {
389
+ 'PIN_REQUIRED': {
390
+ icon: 'lock',
391
+ title: 'PIN Setup Required',
392
+ description: 'Set up your PIN to secure your AI model'
393
+ },
394
+ 'CONNECTIONS_REQUIRED': {
395
+ icon: 'link',
396
+ title: 'Connect Accounts',
397
+ description: 'Connect at least one social media account'
398
+ },
399
+ 'INSUFFICIENT_DATA': {
400
+ icon: 'data-usage',
401
+ title: 'More Data Needed',
402
+ description: 'We need more interaction data to train effectively'
403
+ },
404
+ 'ENCRYPTION_REQUIRED': {
405
+ icon: 'security',
406
+ title: 'Encryption Failed',
407
+ description: 'Failed to encrypt your model securely'
408
+ }
409
+ };
410
+ const details = errorDetails[errorCode];
411
+ if (!details) return null;
412
+ return /*#__PURE__*/React.createElement(View, {
413
+ style: styles.errorDetailsContainer
414
+ }, /*#__PURE__*/React.createElement(Icon, {
415
+ name: details.icon,
416
+ size: 32,
417
+ color: "#FF6B6B"
418
+ }), /*#__PURE__*/React.createElement(Text, {
419
+ style: styles.errorTitle
420
+ }, details.title), /*#__PURE__*/React.createElement(Text, {
421
+ style: styles.errorDescription
422
+ }, details.description));
581
423
  };
582
-
583
- // Grabber bar
584
- const Grabber = () => /*#__PURE__*/React.createElement(View, {
585
- style: styles.grabberContainer
586
- }, /*#__PURE__*/React.createElement(View, {
587
- style: styles.grabberBar
588
- }));
589
- if (!visible) return null;
590
- const progressPercentage = Math.min(Math.max(progress, 0), 100);
591
424
  return /*#__PURE__*/React.createElement(Modal, {
592
425
  visible: visible,
593
426
  transparent: true,
594
- animationType: "none" // Changed to none since we're handling animation
595
- ,
596
- onRequestClose: handleModalClose
597
- }, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
598
- onPress: handleModalClose
599
- }, /*#__PURE__*/React.createElement(View, {
427
+ animationType: "none",
428
+ statusBarTranslucent: true,
429
+ onRequestClose: onCancel
430
+ }, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, null, /*#__PURE__*/React.createElement(View, {
600
431
  style: styles.modalOverlay
601
- }, /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
602
- behavior: Platform.OS === "ios" ? "padding" : "height",
603
- keyboardVerticalOffset: 0,
604
- style: styles.keyboardAvoidingView
605
- }, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
606
- onPress: e => e.stopPropagation()
607
- }, /*#__PURE__*/React.createElement(Animated.View, {
608
- style: [styles.modalContent, {
609
- transform: [{
610
- translateY: modalTranslateY
611
- }]
612
- }]
613
- }, /*#__PURE__*/React.createElement(Grabber, null), /*#__PURE__*/React.createElement(TouchableOpacity, {
614
- style: styles.closeButton,
615
- onPress: onCancel
616
- }, /*#__PURE__*/React.createElement(Text, {
617
- style: styles.closeButtonText
618
- }, "\u2715")), matchStep === 'email' && /*#__PURE__*/React.createElement(View, {
619
- style: [styles.primaryAuthHeader, {
620
- marginTop: 40
432
+ }, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, null, /*#__PURE__*/React.createElement(View, {
433
+ style: styles.bottomSheet
434
+ }, /*#__PURE__*/React.createElement(View, {
435
+ style: styles.handleContainer
436
+ }, /*#__PURE__*/React.createElement(View, {
437
+ style: styles.handle
438
+ })), /*#__PURE__*/React.createElement(SafeAreaView, {
439
+ style: styles.container
440
+ }, /*#__PURE__*/React.createElement(View, {
441
+ style: styles.content
442
+ }, /*#__PURE__*/React.createElement(Image, {
443
+ source: require('../assets/images/onairos_logo.png'),
444
+ style: styles.onairosLogo,
445
+ resizeMode: "contain"
446
+ }), /*#__PURE__*/React.createElement(Text, {
447
+ style: styles.title
448
+ }, isEnochSDK ? 'Training AI with Inference' : 'Training Your AI'), /*#__PURE__*/React.createElement(View, {
449
+ style: styles.progressContainer
450
+ }, /*#__PURE__*/React.createElement(View, {
451
+ style: styles.progressBar
452
+ }, /*#__PURE__*/React.createElement(View, {
453
+ style: [styles.progressFill, {
454
+ width: `${progressPercentage}%`
621
455
  }]
622
- }, /*#__PURE__*/React.createElement(Text, {
623
- style: styles.primaryAuthTitle
624
- }, "Sign in with Onairos"), /*#__PURE__*/React.createElement(Text, {
625
- style: styles.primaryAuthSubtitle
626
- })), isPrimaryAuth && matchStep === 'email' && /*#__PURE__*/React.createElement(View, {
627
- style: styles.emailSection
628
- }, /*#__PURE__*/React.createElement(Text, {
629
- style: styles.emailLabel
630
- }, "Enter your email to sign in / create an account"), /*#__PURE__*/React.createElement(TextInput, {
631
- ref: emailInputRef,
632
- style: [styles.emailInput, emailError ? styles.emailInputError : null],
633
- value: email,
634
- onChangeText: text => {
635
- setEmail(text);
636
- if (emailError) setEmailError('');
637
- },
638
- placeholder: "your.email@example.com",
639
- keyboardType: "email-address",
640
- autoCapitalize: "none",
641
- autoCorrect: false,
642
- returnKeyType: "done",
643
- onSubmitEditing: () => Keyboard.dismiss()
644
- }), emailError ? /*#__PURE__*/React.createElement(Text, {
456
+ })), /*#__PURE__*/React.createElement(Text, {
457
+ style: styles.progressText
458
+ }, progressPercentage, "%")), /*#__PURE__*/React.createElement(Text, {
459
+ style: styles.statusText
460
+ }, trainingStatus), hasError && /*#__PURE__*/React.createElement(View, {
461
+ style: styles.errorContainer
462
+ }, /*#__PURE__*/React.createElement(Icon, {
463
+ name: "error-outline",
464
+ size: 24,
465
+ color: "#FF6B6B"
466
+ }), /*#__PURE__*/React.createElement(Text, {
645
467
  style: styles.errorText
646
- }, emailError) : null, /*#__PURE__*/React.createElement(TouchableOpacity, {
647
- style: [styles.continueButton, (isSubmittingEmail || !email.includes('@') && email.toLowerCase().trim() !== 'reviewer') && styles.disabledButton, {
648
- marginTop: 24
649
- }],
650
- onPress: handleEmailSubmit,
651
- disabled: isSubmittingEmail || !email.includes('@') && email.toLowerCase().trim() !== 'reviewer',
652
- activeOpacity: 0.8
653
- }, isSubmittingEmail ? /*#__PURE__*/React.createElement(ActivityIndicator, {
654
- size: "small",
655
- color: "#FFFFFF"
656
- }) : /*#__PURE__*/React.createElement(Text, {
657
- style: styles.continueButtonText
658
- }, "Continue"))), isPrimaryAuth && matchStep === 'verification' && /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Text, null, "Email verification step (not implemented)")), isPrimaryAuth && matchStep === 'existing_user' && existingUserAccountInfo && /*#__PURE__*/React.createElement(ExistingUserDataConfirmation, {
659
- visible: true,
660
- onConfirm: handleExistingUserConfirm,
661
- onCancel: handleExistingUserCancel,
662
- onAddMoreData: handleExistingUserAddMoreData,
663
- accountInfo: existingUserAccountInfo,
664
- userEmail: email
665
- }), isPrimaryAuth && matchStep === 'searching' && /*#__PURE__*/React.createElement(View, {
666
- style: styles.matchContainer
667
- }, /*#__PURE__*/React.createElement(Text, {
668
- style: styles.matchTitle
669
- }), /*#__PURE__*/React.createElement(ActivityIndicator, {
670
- size: "large",
671
- color: "#E9C46A",
672
- style: styles.matchLoader
468
+ }, "Training encountered an error")), renderErrorDetails(), isTrainingComplete && trainingResults && /*#__PURE__*/React.createElement(View, {
469
+ style: styles.resultsContainer
470
+ }, /*#__PURE__*/React.createElement(Icon, {
471
+ name: "check-circle",
472
+ size: 32,
473
+ color: "#4CAF50"
474
+ }), /*#__PURE__*/React.createElement(Text, {
475
+ style: styles.resultsTitle
476
+ }, "Training Complete!"), /*#__PURE__*/React.createElement(View, {
477
+ style: styles.resultsDetails
478
+ }, /*#__PURE__*/React.createElement(View, {
479
+ style: styles.resultItem
480
+ }, /*#__PURE__*/React.createElement(Icon, {
481
+ name: "cloud-done",
482
+ size: 16,
483
+ color: "#666"
484
+ }), /*#__PURE__*/React.createElement(Text, {
485
+ style: styles.resultText
486
+ }, "Storage: ", trainingResults.storage)), /*#__PURE__*/React.createElement(View, {
487
+ style: styles.resultItem
488
+ }, /*#__PURE__*/React.createElement(Icon, {
489
+ name: "security",
490
+ size: 16,
491
+ color: "#666"
673
492
  }), /*#__PURE__*/React.createElement(Text, {
674
- style: styles.matchMessage
675
- }, "Searching for potential connections based on your email...")), isPrimaryAuth && matchStep === 'found' && progress >= 100 && /*#__PURE__*/React.createElement(View, {
676
- style: styles.matchContainer
493
+ style: styles.resultText
494
+ }, "Encrypted: ", trainingResults.encryption ? 'Yes' : 'No')), trainingResults.inference && /*#__PURE__*/React.createElement(View, {
495
+ style: styles.resultItem
496
+ }, /*#__PURE__*/React.createElement(Icon, {
497
+ name: "psychology",
498
+ size: 16,
499
+ color: "#666"
500
+ }), /*#__PURE__*/React.createElement(Text, {
501
+ style: styles.resultText
502
+ }, "Inference: Completed")))), /*#__PURE__*/React.createElement(View, {
503
+ style: styles.footer
504
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
505
+ style: styles.cancelButton,
506
+ onPress: onCancel
677
507
  }, /*#__PURE__*/React.createElement(Text, {
678
- style: styles.matchTitle
679
- }, "Connections Found"), /*#__PURE__*/React.createElement(View, {
680
- style: styles.matchCircle
508
+ style: styles.cancelButtonText
509
+ }, "Cancel")), (currentProgress >= 1 || isTrainingComplete) && /*#__PURE__*/React.createElement(TouchableOpacity, {
510
+ style: styles.completeButton,
511
+ onPress: onComplete
681
512
  }, /*#__PURE__*/React.createElement(Text, {
682
- style: styles.matchCount
683
- }, matchCount)), /*#__PURE__*/React.createElement(Text, {
684
- style: styles.matchMessage
685
- }, "We found ", matchCount, " potential connections for you!"), /*#__PURE__*/React.createElement(Text, {
686
- style: styles.matchSubMessage
687
- }, "Complete your profile to see your personalized matches"), /*#__PURE__*/React.createElement(TouchableOpacity, {
688
- style: [styles.continueButton, isContinueLoading && styles.disabledButton],
689
- onPress: handleContinue,
690
- disabled: isContinueLoading
691
- }, isContinueLoading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
692
- size: "small",
693
- color: "#FFFFFF"
694
- }) : /*#__PURE__*/React.createElement(Text, {
695
- style: styles.continueButtonText
696
- }, "continue to setup")))))))));
513
+ style: styles.completeButtonText
514
+ }, "Complete"))))))))));
697
515
  };
698
516
  const styles = StyleSheet.create({
699
- container: {
517
+ modalOverlay: {
700
518
  flex: 1,
701
- backgroundColor: '#fff',
702
- padding: 24
519
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
520
+ justifyContent: 'flex-end',
521
+ alignItems: 'center'
703
522
  },
704
- scrollContentContainer: {
705
- flexGrow: 1,
706
- justifyContent: 'flex-start',
707
- paddingBottom: 0,
708
- marginBottom: 0
523
+ bottomSheet: {
524
+ backgroundColor: '#fff',
525
+ width: width,
526
+ height: height * 0.8,
527
+ borderTopLeftRadius: 24,
528
+ borderTopRightRadius: 24,
529
+ overflow: 'hidden'
709
530
  },
710
- actualContentWrapper: {
531
+ handleContainer: {
711
532
  width: '100%',
712
- alignItems: 'center' // Center content like headers if they are not full width
533
+ alignItems: 'center',
534
+ paddingTop: 12,
535
+ paddingBottom: 8
536
+ },
537
+ handle: {
538
+ width: 40,
539
+ height: 5,
540
+ borderRadius: 3,
541
+ backgroundColor: '#E0E0E0'
542
+ },
543
+ container: {
544
+ flex: 1,
545
+ backgroundColor: '#fff'
713
546
  },
714
547
  content: {
715
- // This style might be unused or redefined if still needed for specific children
716
- // flex: 1, // Original content style, likely not needed for the wrapper anymore
548
+ flex: 1,
549
+ width: '100%',
550
+ alignItems: 'center',
551
+ justifyContent: 'center',
552
+ padding: 24
717
553
  },
718
554
  title: {
719
555
  fontSize: 24,
720
556
  fontWeight: '600',
721
- color: '#333',
722
- marginBottom: 24,
557
+ marginTop: 24,
558
+ marginBottom: 8,
559
+ color: COLORS.text.primary,
723
560
  textAlign: 'center'
724
561
  },
725
562
  subtitle: {
726
563
  fontSize: 16,
727
- color: '#666',
728
- marginBottom: 32,
564
+ color: COLORS.text.secondary,
565
+ textAlign: 'center',
566
+ marginBottom: 32
567
+ },
568
+ statusText: {
569
+ fontSize: 14,
570
+ color: COLORS.text.secondary,
571
+ marginBottom: 24,
729
572
  textAlign: 'center'
730
573
  },
731
574
  progressContainer: {
732
- marginBottom: 24
575
+ width: '100%',
576
+ marginBottom: 16
733
577
  },
734
578
  progressBar: {
735
579
  height: 8,
736
- backgroundColor: '#F5F5F5',
580
+ backgroundColor: COLORS.border,
737
581
  borderRadius: 4,
738
- overflow: 'hidden',
739
- marginBottom: 8
582
+ overflow: 'hidden'
740
583
  },
741
584
  progressFill: {
742
585
  height: '100%',
743
- backgroundColor: '#1BA9D4',
586
+ backgroundColor: COLORS.primary,
744
587
  borderRadius: 4
745
588
  },
746
589
  progressText: {
747
590
  fontSize: 14,
748
- color: '#666',
749
- textAlign: 'right'
591
+ color: COLORS.text.secondary,
592
+ textAlign: 'center',
593
+ marginTop: 8
750
594
  },
751
- infoContainer: {
595
+ etaText: {
596
+ fontSize: 14,
597
+ color: COLORS.text.secondary,
598
+ marginBottom: 24
599
+ },
600
+ loadingContainer: {
752
601
  flexDirection: 'row',
753
602
  alignItems: 'center',
754
603
  marginBottom: 32
755
604
  },
756
- etaText: {
605
+ loadingText: {
757
606
  fontSize: 14,
758
- color: '#666',
759
- marginLeft: 8,
760
- textAlign: 'center',
761
- marginBottom: 16
762
- },
763
- detailText: {
764
- fontSize: 14,
765
- color: '#666',
766
- lineHeight: 20
607
+ color: COLORS.text.secondary,
608
+ marginLeft: 8
767
609
  },
768
- emailSection: {
769
- marginTop: 24,
770
- marginBottom: 16,
771
- width: '100%'
610
+ footer: {
611
+ flexDirection: 'row',
612
+ alignItems: 'center',
613
+ justifyContent: 'space-between',
614
+ width: '100%',
615
+ borderTopWidth: 1,
616
+ borderTopColor: '#eee',
617
+ paddingTop: 16,
618
+ paddingHorizontal: 24,
619
+ paddingBottom: 24
772
620
  },
773
- emailSectionPrimary: {
774
- marginTop: 40,
775
- marginBottom: 40
621
+ cancelButton: {
622
+ paddingVertical: 8,
623
+ paddingHorizontal: 16
776
624
  },
777
- emailLabel: {
625
+ cancelButtonText: {
778
626
  fontSize: 16,
779
- fontWeight: '500',
780
- color: '#333',
781
- marginBottom: 12,
782
- textAlign: 'center'
627
+ color: '#666'
783
628
  },
784
- emailInput: {
785
- height: 48,
629
+ completeButton: {
630
+ paddingVertical: 16,
631
+ paddingHorizontal: 32,
632
+ borderRadius: 16,
633
+ backgroundColor: '#fff',
786
634
  borderWidth: 1,
787
- borderColor: '#E0E0E0',
788
- borderRadius: 8,
789
- paddingHorizontal: 16,
790
- fontSize: 16,
791
- marginBottom: 8
635
+ borderColor: '#000'
792
636
  },
793
- emailInputError: {
794
- borderColor: '#FF3B30'
637
+ completeButtonText: {
638
+ fontSize: 16,
639
+ fontWeight: '600',
640
+ color: '#000'
795
641
  },
796
- errorText: {
797
- color: '#FF3B30',
798
- fontSize: 14,
799
- marginBottom: 16
642
+ onairosLogo: {
643
+ width: 48,
644
+ height: 48
800
645
  },
801
- footer: {
646
+ errorContainer: {
802
647
  flexDirection: 'row',
803
- justifyContent: 'space-between',
804
- marginTop: 24,
805
- paddingTop: 16
806
- },
807
- completeButton: {
808
- paddingVertical: 12,
809
- paddingHorizontal: 24,
810
- backgroundColor: '#1BA9D4',
811
- borderRadius: 8
812
- },
813
- disabledButton: {
814
- backgroundColor: '#CCCCCC',
815
- opacity: 0.7
816
- },
817
- completeButtonText: {
818
- color: '#fff',
819
- fontSize: 16,
820
- fontWeight: '600'
648
+ alignItems: 'center',
649
+ marginBottom: 16
821
650
  },
822
- statusText: {
651
+ errorText: {
823
652
  fontSize: 14,
824
- color: '#666',
653
+ color: '#FF6B6B',
825
654
  marginLeft: 8
826
655
  },
827
- progressError: {
828
- backgroundColor: '#FF3B30'
829
- },
830
- primaryAuthHeader: {
656
+ errorDetailsContainer: {
831
657
  alignItems: 'center',
832
658
  marginBottom: 24,
833
- paddingHorizontal: 16
834
- },
835
- primaryAuthTitle: {
836
- fontSize: 24,
837
- fontWeight: '600',
838
- color: '#333',
839
- marginBottom: 8,
840
- textAlign: 'center'
659
+ padding: 16,
660
+ backgroundColor: '#FFF5F5',
661
+ borderRadius: 12,
662
+ borderWidth: 1,
663
+ borderColor: '#FFEBEE'
841
664
  },
842
- primaryAuthSubtitle: {
665
+ errorTitle: {
843
666
  fontSize: 16,
844
- color: '#555',
845
- textAlign: 'center',
846
- marginBottom: 16
847
- },
848
- matchContainer: {
849
- alignItems: 'center',
850
- padding: 20
851
- },
852
- matchTitle: {
853
- fontSize: 24,
854
667
  fontWeight: '600',
855
- color: '#333',
856
- marginBottom: 16,
857
- textAlign: 'center'
858
- },
859
- matchLoader: {
860
- marginVertical: 20
861
- },
862
- matchMessage: {
863
- fontSize: 16,
864
- color: '#555',
865
- textAlign: 'center',
866
- marginVertical: 12
668
+ color: '#FF6B6B',
669
+ marginTop: 8,
670
+ marginBottom: 4
867
671
  },
868
- matchSubMessage: {
672
+ errorDescription: {
869
673
  fontSize: 14,
870
- color: '#777',
871
- textAlign: 'center',
872
- marginTop: 8
873
- },
874
- matchCircle: {
875
- width: 80,
876
- height: 80,
877
- borderRadius: 40,
878
- backgroundColor: '#E9C46A',
879
- justifyContent: 'center',
880
- alignItems: 'center',
881
- marginVertical: 16
882
- },
883
- matchCount: {
884
- fontSize: 32,
885
- fontWeight: 'bold',
886
- color: '#FFFFFF'
674
+ color: '#666',
675
+ textAlign: 'center'
887
676
  },
888
- continueButton: {
889
- marginTop: 40,
890
- width: '85%',
891
- height: 50,
892
- backgroundColor: '#000000',
893
- borderRadius: 8,
894
- justifyContent: 'center',
677
+ resultsContainer: {
895
678
  alignItems: 'center',
896
- alignSelf: 'center'
679
+ marginBottom: 24,
680
+ padding: 16,
681
+ backgroundColor: '#F5F5F5',
682
+ borderRadius: 12,
683
+ borderWidth: 1,
684
+ borderColor: '#E0E0E0'
897
685
  },
898
- continueButtonText: {
899
- color: '#FFFFFF',
900
- fontSize: 18,
686
+ resultsTitle: {
687
+ fontSize: 16,
901
688
  fontWeight: '600',
902
- textAlign: 'center'
689
+ color: '#4CAF50',
690
+ marginTop: 8,
691
+ marginBottom: 12
903
692
  },
904
- modalOverlay: {
905
- flex: 1,
906
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
907
- justifyContent: 'flex-end'
908
- },
909
- keyboardAvoidingView: {
910
- flex: 1,
911
- justifyContent: 'flex-end',
912
- alignItems: 'stretch',
913
- margin: 0,
914
- padding: 0
915
- },
916
- modalContent: {
917
- backgroundColor: '#fff',
918
- borderTopLeftRadius: 20,
919
- borderTopRightRadius: 20,
920
- padding: 24,
921
- paddingTop: 12,
922
- minHeight: height * 0.4,
923
- maxHeight: height * 0.9
924
- },
925
- closeButton: {
926
- position: 'absolute',
927
- top: 15,
928
- // Adjust as needed for visual balance with grabber and padding
929
- right: 20,
930
- // Adjust as needed
931
- padding: 5,
932
- // Make it easier to tap
933
- zIndex: 10 // Ensure it's above other content
934
- },
935
- closeButtonText: {
936
- fontSize: 24,
937
- // Make it a bit larger
938
- color: '#888',
939
- // Subtle color
940
- fontWeight: '300'
693
+ resultsDetails: {
694
+ alignItems: 'flex-start',
695
+ width: '100%'
941
696
  },
942
- grabberContainer: {
943
- alignItems: 'center'
697
+ resultItem: {
698
+ flexDirection: 'row',
699
+ alignItems: 'center',
700
+ marginBottom: 4
944
701
  },
945
- grabberBar: {
946
- width: 48,
947
- height: 5,
948
- borderRadius: 3,
949
- backgroundColor: '#E0E0E0'
702
+ resultText: {
703
+ fontSize: 14,
704
+ color: '#666',
705
+ marginLeft: 8
950
706
  }
951
707
  });
952
708
  //# sourceMappingURL=TrainingModal.js.map