@onairos/react-native 3.7.2 → 3.7.4

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 (237) hide show
  1. package/lib/commonjs/api/index.js +219 -9
  2. package/lib/commonjs/components/BodyText.js +27 -9
  3. package/lib/commonjs/components/BrandMark.js +111 -10
  4. package/lib/commonjs/components/CodeInput.js +120 -9
  5. package/lib/commonjs/components/EmailInput.js +30 -8
  6. package/lib/commonjs/components/GoogleButton.js +56 -9
  7. package/lib/commonjs/components/HeadingGroup.js +43 -9
  8. package/lib/commonjs/components/LLMDataInputModal.js +664 -14
  9. package/lib/commonjs/components/ModalHeader.js +99 -9
  10. package/lib/commonjs/components/ModalSheet.js +47 -9
  11. package/lib/commonjs/components/Onairos.js +380 -14
  12. package/lib/commonjs/components/OnairosButton.js +313 -13
  13. package/lib/commonjs/components/OnairosSignInButton.js +130 -12
  14. package/lib/commonjs/components/Overlay.js +465 -13
  15. package/lib/commonjs/components/PersonaImage.js +137 -10
  16. package/lib/commonjs/components/PersonaLoadingScreen.js +318 -12
  17. package/lib/commonjs/components/PersonalizationConsentScreen.js +467 -13
  18. package/lib/commonjs/components/PinCreationScreen.js +403 -12
  19. package/lib/commonjs/components/PinInput.js +464 -9
  20. package/lib/commonjs/components/PlatformConnectorsStep.js +1311 -23
  21. package/lib/commonjs/components/PlatformList.js +137 -10
  22. package/lib/commonjs/components/PlatformToggle.js +180 -9
  23. package/lib/commonjs/components/PrimaryButton.js +180 -10
  24. package/lib/commonjs/components/SignInMatchAnimation.js +197 -9
  25. package/lib/commonjs/components/SignInStep.js +345 -12
  26. package/lib/commonjs/components/UniversalOnboarding.js +2780 -30
  27. package/lib/commonjs/components/VerificationStep.js +176 -11
  28. package/lib/commonjs/components/WelcomeScreen.js +461 -22
  29. package/lib/commonjs/components/icons/Basicproficon.js +37 -8
  30. package/lib/commonjs/components/icons/Basicprofile.js +21 -8
  31. package/lib/commonjs/components/icons/Checkbox.js +21 -8
  32. package/lib/commonjs/components/icons/Checkmark.js +27 -8
  33. package/lib/commonjs/components/icons/Contentanalysis.js +21 -8
  34. package/lib/commonjs/components/icons/Contenticon.js +39 -8
  35. package/lib/commonjs/components/icons/EnochE.js +41 -8
  36. package/lib/commonjs/components/icons/Personalityicon.js +30 -8
  37. package/lib/commonjs/components/icons/Personalityprofile.js +21 -8
  38. package/lib/commonjs/components/icons/Personalitytraits.js +21 -8
  39. package/lib/commonjs/components/icons/Userpreferences.js +21 -8
  40. package/lib/commonjs/components/icons/index.js +84 -17
  41. package/lib/commonjs/components/onboarding/OAuthWebView.js +1754 -18
  42. package/lib/commonjs/components/onboarding/OnboardingHeader.js +74 -10
  43. package/lib/commonjs/components/onboarding/PinInput.js +283 -10
  44. package/lib/commonjs/components/onboarding/PlatformConnector.js +249 -11
  45. package/lib/commonjs/config/PLATFORM_APIS.md +849 -0
  46. package/lib/commonjs/config/api.js +56 -7
  47. package/lib/commonjs/constants/index.js +120 -7
  48. package/lib/commonjs/context/AuthContext.js +345 -10
  49. package/lib/commonjs/hooks/useConnectedAccounts.js +111 -9
  50. package/lib/commonjs/hooks/useConnections.js +102 -8
  51. package/lib/commonjs/hooks/useCredentials.js +178 -10
  52. package/lib/commonjs/hooks/useUserConnections.js +148 -10
  53. package/lib/commonjs/index.js +439 -34
  54. package/lib/commonjs/services/apiClient.js +298 -8
  55. package/lib/commonjs/services/biometricPinService.js +180 -8
  56. package/lib/commonjs/services/chatGPTConversationExtractor.js +155 -8
  57. package/lib/commonjs/services/chatGPTConversationService.js +275 -9
  58. package/lib/commonjs/services/claudeConversationExtractor.js +103 -8
  59. package/lib/commonjs/services/claudeConversationService.js +158 -9
  60. package/lib/commonjs/services/connectedAccountsService.js +310 -10
  61. package/lib/commonjs/services/googleAuthService.js +252 -11
  62. package/lib/commonjs/services/hingeDataExtractor.js +105 -8
  63. package/lib/commonjs/services/hingeDataService.js +150 -9
  64. package/lib/commonjs/services/imageCompressionService.js +260 -7
  65. package/lib/commonjs/services/instagramDataExtractor.js +126 -8
  66. package/lib/commonjs/services/instagramDataService.js +163 -9
  67. package/lib/commonjs/services/jwtStorageService.js +276 -7
  68. package/lib/commonjs/services/linkedinDOMExtractor.js +245 -7
  69. package/lib/commonjs/services/linkedinProfileService.js +222 -9
  70. package/lib/commonjs/services/linkedinScrapingService.js +230 -8
  71. package/lib/commonjs/services/llmDataStorage.js +294 -8
  72. package/lib/commonjs/services/mobileTrainingService.js +186 -8
  73. package/lib/commonjs/services/netflixDataExtractor.js +120 -8
  74. package/lib/commonjs/services/netflixDataService.js +198 -9
  75. package/lib/commonjs/services/pinEncryptionService.js +84 -8
  76. package/lib/commonjs/services/pinStorageUtils.js +105 -7
  77. package/lib/commonjs/services/platformAuthService.js +1484 -12
  78. package/lib/commonjs/services/sephoraDataExtractor.js +140 -8
  79. package/lib/commonjs/services/sephoraDataService.js +200 -9
  80. package/lib/commonjs/services/spotifyDataExtractor.js +148 -8
  81. package/lib/commonjs/services/spotifyDataService.js +241 -9
  82. package/lib/commonjs/services/storageService.js +404 -8
  83. package/lib/commonjs/services/telegramDataExtractor.js +115 -8
  84. package/lib/commonjs/services/telegramDataService.js +499 -9
  85. package/lib/commonjs/services/trainingApiHelpers.js +73 -7
  86. package/lib/commonjs/services/userConnectionsService.js +340 -10
  87. package/lib/commonjs/services/youtubeMigrationService.js +416 -10
  88. package/lib/commonjs/theme/index.js +250 -7
  89. package/lib/commonjs/types/ambient.d.js +2 -1
  90. package/lib/commonjs/types/declarations.d.js +2 -1
  91. package/lib/commonjs/types/index.js +6 -1
  92. package/lib/commonjs/types/node-fix.d.js +2 -1
  93. package/lib/commonjs/types/node-override.d.js +2 -1
  94. package/lib/commonjs/types/opacity.d.js +2 -1
  95. package/lib/commonjs/types.js +14 -1
  96. package/lib/commonjs/utils/Portal.js +98 -8
  97. package/lib/commonjs/utils/api.js +130 -9
  98. package/lib/commonjs/utils/assetRegistry.js +210 -35
  99. package/lib/commonjs/utils/auth.js +112 -9
  100. package/lib/commonjs/utils/connectorTests.js +613 -29
  101. package/lib/commonjs/utils/crypto.js +62 -8
  102. package/lib/commonjs/utils/debugHelper.js +64 -1
  103. package/lib/commonjs/utils/encryption.js +76 -7
  104. package/lib/commonjs/utils/eventUtils.js +288 -1
  105. package/lib/commonjs/utils/haptics.js +66 -9
  106. package/lib/commonjs/utils/imagePreloader.js +6 -1
  107. package/lib/commonjs/utils/networkDiagnostics.js +226 -8
  108. package/lib/commonjs/utils/onairosApi.js +350 -9
  109. package/lib/commonjs/utils/programmaticFlow.js +117 -9
  110. package/lib/commonjs/utils/retryHelper.js +220 -1
  111. package/lib/commonjs/utils/secureStorage.js +349 -10
  112. package/lib/commonjs/utils/webviewScripts/chatgpt.js +551 -1
  113. package/lib/commonjs/utils/webviewScripts/claude.js +376 -1
  114. package/lib/commonjs/utils/webviewScripts/hinge.js +411 -1
  115. package/lib/commonjs/utils/webviewScripts/index.js +698 -15
  116. package/lib/commonjs/utils/webviewScripts/instagram.js +454 -1
  117. package/lib/commonjs/utils/webviewScripts/linkedin.js +880 -1
  118. package/lib/commonjs/utils/webviewScripts/netflix.js +382 -1
  119. package/lib/commonjs/utils/webviewScripts/sephora.js +516 -1
  120. package/lib/commonjs/utils/webviewScripts/spotify.js +419 -1
  121. package/lib/commonjs/utils/webviewScripts/telegram.js +678 -1
  122. package/lib/module/api/index.js +211 -1
  123. package/lib/module/components/BodyText.js +20 -1
  124. package/lib/module/components/BrandMark.js +104 -1
  125. package/lib/module/components/CodeInput.js +113 -1
  126. package/lib/module/components/EmailInput.js +23 -1
  127. package/lib/module/components/GoogleButton.js +49 -1
  128. package/lib/module/components/HeadingGroup.js +36 -1
  129. package/lib/module/components/LLMDataInputModal.js +656 -7
  130. package/lib/module/components/ModalHeader.js +92 -1
  131. package/lib/module/components/ModalSheet.js +39 -1
  132. package/lib/module/components/Onairos.js +373 -1
  133. package/lib/module/components/OnairosButton.js +305 -1
  134. package/lib/module/components/OnairosSignInButton.js +121 -1
  135. package/lib/module/components/Overlay.js +456 -1
  136. package/lib/module/components/PersonaImage.js +129 -1
  137. package/lib/module/components/PersonaLoadingScreen.js +310 -1
  138. package/lib/module/components/PersonalizationConsentScreen.js +460 -1
  139. package/lib/module/components/PinCreationScreen.js +396 -1
  140. package/lib/module/components/PinInput.js +456 -1
  141. package/lib/module/components/PlatformConnectorsStep.js +1302 -6
  142. package/lib/module/components/PlatformList.js +129 -1
  143. package/lib/module/components/PlatformToggle.js +173 -1
  144. package/lib/module/components/PrimaryButton.js +172 -1
  145. package/lib/module/components/SignInMatchAnimation.js +189 -1
  146. package/lib/module/components/SignInStep.js +338 -1
  147. package/lib/module/components/UniversalOnboarding.js +2770 -1
  148. package/lib/module/components/VerificationStep.js +168 -1
  149. package/lib/module/components/WelcomeScreen.js +453 -1
  150. package/lib/module/components/icons/Basicproficon.js +30 -1
  151. package/lib/module/components/icons/Basicprofile.js +14 -1
  152. package/lib/module/components/icons/Checkbox.js +14 -1
  153. package/lib/module/components/icons/Checkmark.js +20 -1
  154. package/lib/module/components/icons/Contentanalysis.js +14 -1
  155. package/lib/module/components/icons/Contenticon.js +32 -1
  156. package/lib/module/components/icons/EnochE.js +34 -1
  157. package/lib/module/components/icons/Personalityicon.js +23 -1
  158. package/lib/module/components/icons/Personalityprofile.js +14 -1
  159. package/lib/module/components/icons/Personalitytraits.js +14 -1
  160. package/lib/module/components/icons/Userpreferences.js +14 -1
  161. package/lib/module/components/icons/index.js +13 -1
  162. package/lib/module/components/onboarding/OAuthWebView.js +1746 -1
  163. package/lib/module/components/onboarding/OnboardingHeader.js +66 -1
  164. package/lib/module/components/onboarding/PinInput.js +274 -1
  165. package/lib/module/components/onboarding/PlatformConnector.js +240 -1
  166. package/lib/module/config/PLATFORM_APIS.md +849 -0
  167. package/lib/module/config/api.js +47 -1
  168. package/lib/module/constants/index.js +114 -1
  169. package/lib/module/context/AuthContext.js +335 -1
  170. package/lib/module/hooks/useConnectedAccounts.js +106 -1
  171. package/lib/module/hooks/useConnections.js +95 -1
  172. package/lib/module/hooks/useCredentials.js +171 -6
  173. package/lib/module/hooks/useUserConnections.js +140 -1
  174. package/lib/module/index.js +172 -1
  175. package/lib/module/services/apiClient.js +295 -1
  176. package/lib/module/services/biometricPinService.js +169 -1
  177. package/lib/module/services/chatGPTConversationExtractor.js +149 -1
  178. package/lib/module/services/chatGPTConversationService.js +268 -1
  179. package/lib/module/services/claudeConversationExtractor.js +97 -1
  180. package/lib/module/services/claudeConversationService.js +151 -1
  181. package/lib/module/services/connectedAccountsService.js +293 -1
  182. package/lib/module/services/googleAuthService.js +241 -1
  183. package/lib/module/services/hingeDataExtractor.js +99 -1
  184. package/lib/module/services/hingeDataService.js +143 -1
  185. package/lib/module/services/imageCompressionService.js +250 -1
  186. package/lib/module/services/instagramDataExtractor.js +120 -1
  187. package/lib/module/services/instagramDataService.js +156 -1
  188. package/lib/module/services/jwtStorageService.js +257 -1
  189. package/lib/module/services/linkedinDOMExtractor.js +234 -1
  190. package/lib/module/services/linkedinProfileService.js +210 -1
  191. package/lib/module/services/linkedinScrapingService.js +219 -1
  192. package/lib/module/services/llmDataStorage.js +277 -1
  193. package/lib/module/services/mobileTrainingService.js +173 -1
  194. package/lib/module/services/netflixDataExtractor.js +114 -1
  195. package/lib/module/services/netflixDataService.js +191 -1
  196. package/lib/module/services/pinEncryptionService.js +74 -6
  197. package/lib/module/services/pinStorageUtils.js +93 -1
  198. package/lib/module/services/platformAuthService.js +1461 -1
  199. package/lib/module/services/sephoraDataExtractor.js +134 -1
  200. package/lib/module/services/sephoraDataService.js +193 -1
  201. package/lib/module/services/spotifyDataExtractor.js +142 -1
  202. package/lib/module/services/spotifyDataService.js +234 -1
  203. package/lib/module/services/storageService.js +383 -1
  204. package/lib/module/services/telegramDataExtractor.js +109 -1
  205. package/lib/module/services/telegramDataService.js +493 -1
  206. package/lib/module/services/trainingApiHelpers.js +67 -1
  207. package/lib/module/services/userConnectionsService.js +329 -1
  208. package/lib/module/services/youtubeMigrationService.js +405 -1
  209. package/lib/module/theme/index.js +245 -1
  210. package/lib/module/types.js +10 -1
  211. package/lib/module/utils/Portal.js +90 -1
  212. package/lib/module/utils/api.js +118 -1
  213. package/lib/module/utils/assetRegistry.js +200 -34
  214. package/lib/module/utils/auth.js +100 -1
  215. package/lib/module/utils/connectorTests.js +600 -27
  216. package/lib/module/utils/crypto.js +54 -1
  217. package/lib/module/utils/debugHelper.js +54 -1
  218. package/lib/module/utils/encryption.js +67 -1
  219. package/lib/module/utils/eventUtils.js +270 -1
  220. package/lib/module/utils/haptics.js +59 -8
  221. package/lib/module/utils/imagePreloader.js +3 -1
  222. package/lib/module/utils/networkDiagnostics.js +217 -1
  223. package/lib/module/utils/onairosApi.js +333 -1
  224. package/lib/module/utils/programmaticFlow.js +111 -1
  225. package/lib/module/utils/retryHelper.js +211 -1
  226. package/lib/module/utils/secureStorage.js +330 -6
  227. package/lib/module/utils/webviewScripts/chatgpt.js +545 -1
  228. package/lib/module/utils/webviewScripts/claude.js +370 -1
  229. package/lib/module/utils/webviewScripts/hinge.js +405 -1
  230. package/lib/module/utils/webviewScripts/index.js +434 -1
  231. package/lib/module/utils/webviewScripts/instagram.js +448 -1
  232. package/lib/module/utils/webviewScripts/linkedin.js +874 -1
  233. package/lib/module/utils/webviewScripts/netflix.js +376 -1
  234. package/lib/module/utils/webviewScripts/sephora.js +510 -1
  235. package/lib/module/utils/webviewScripts/spotify.js +413 -1
  236. package/lib/module/utils/webviewScripts/telegram.js +672 -1
  237. package/package.json +2 -2
@@ -1 +1,2770 @@
1
- import React,{useCallback,useEffect,useState,useRef}from'react';import{View,Text,StyleSheet,Dimensions,TouchableOpacity,TouchableWithoutFeedback,Platform,Modal,Animated,Linking,Alert}from'react-native';import AsyncStorage from'@react-native-async-storage/async-storage';import _0x117441 from'./BrandMark';import _0x418f1f from'./HeadingGroup';import _0x558898 from'./BodyText';function _0x3118(){const _0x4283f0=['get','📊\x20[BACKGROUND]\x20Training\x20progress:','nwvne','signin','verification','🍎\x20[APPLE\x20FIX]\x20primaryAuthOnly\x20detected\x20-\x20resetting\x20to\x20welcome\x20step','🚀\x20[TRANSITION]\x20Starting\x20background\x20training\x20during\x20connect\x20→\x20pin\x20transition','❌\x20[TRANSITION]\x20Background\x20training\x20failed\x20during\x20transition:','✅\x20Inference\x20enabled:','💾\x20Storage\x20method:','🗄️\x20Databases:','OjKtN','AVtBw','connectedPlatforms','📱\x20Stored\x20connected\x20platform:','Total\x20platforms:','Error\x20storing\x20connected\x20platform:','🔌\x20Socket\x20ID\x20for\x20training:','🔄\x20Socket\x20ready\x20for\x20persona\x20display\x20with\x20token:','None','⏰\x20Socket\x20registered\x20but\x20training\x20will\x20not\x20start\x20from\x20persona\x20screen...','Waiting\x20for\x20training\x20to\x20start\x20from\x20connector→PIN\x20transition','❌\x20No\x20socket\x20ID\x20available\x20after\x20connection','BQGFM','Error\x20removing\x20connected\x20platform:','FIWQF','Disconnect\x20Platform','cancel','destructive','🆕\x20New\x20user\x20or\x20no\x20existing\x20connections,\x20showing\x20platform\x20connection\x20screen','platforms','🔍\x20Disconnect\x20details:','yGxrV','POSRD','wiGuj','aRkPW','YRJXb','ryjwF','❌\x20Error\x20sending\x20verification\x20code:','IfoCr','lDgGG','No\x20authentication\x20token\x20available','UkaDS','url','Finalizing\x20your\x20unique\x20persona','welcome','existing_user_token','YhcKi','Failed\x20to\x20initialize\x20training.\x20Please\x20try\x20again.','oauth','ZLkmc','code','connect','HQQdW','1|3|2|0|4|5','🔐\x20[BACKGROUND]\x20Continuing\x20existing\x20background\x20training\x20with\x20PIN\x20validation','No\x20background\x20socket\x20ID\x20available','🔌\x20[BACKGROUND]\x20Using\x20existing\x20socket\x20ID:','LoahY','cEana','reviewer@bypass.com','🔍\x20Reviewer\x20bypass\x20detected','onairos_user','true','0|1|2|3|4','test@example.com','✅\x20Verification\x20code\x20sent\x20successfully','❌\x20Failed\x20to\x20send\x20verification\x20code:','Failed\x20to\x20send\x20verification\x20code.\x20Please\x20try\x20again.','UaYcN','bBnSY','Network\x20error.\x20Please\x20check\x20your\x20connection\x20and\x20try\x20again.','ℹ️\x20Google\x20Sign-In\x20cancelled\x20by\x20user','YouTube\x20connection\x20failed.\x20Please\x20try\x20again.','✅\x20Google\x20Sign-In\x20successful:','🔍\x20Is\x20new\x20user?','bJgTc','skoEW','3|2|4|0|5|1','consent','ℹ️\x20No\x20existing\x20connections\x20found\x20-\x20proceeding\x20to\x20platforms\x20step','⚠️\x20Could\x20not\x20fetch\x20existing\x20connections,\x20proceeding\x20to\x20platforms:','TBtAe','❌\x20Google\x20Sign-In\x20error:','Google\x20Sign-In\x20failed.\x20Please\x20try\x20again.','FYgAV','✅\x20Using\x20real\x20authentication\x20token\x20for\x20onComplete:','xnnwa','rgNHA','🔍\x20Verifying\x20email\x20code:','🔍\x20App\x20name:','returning_user','❌\x20Email\x20verification\x20failed:','QtBCg','ZdBio','👋\x20Logout\x20requested\x20-\x20clearing\x20tokens\x20and\x20navigating\x20to\x20login','5|0|3|2|8|1|4|7|6','sdk_jwt_token','onairos_jwt_token','auth_method','WsiPE','❌\x20Error\x20during\x20logout:','eFgFe','✅\x20Verification\x20code\x20resent\x20successfully','Failed\x20to\x20resend\x20verification\x20code.','user_email','🔑\x20[SDK]\x20Token\x20available:','📧\x20[SDK]\x20Email\x20available:','✅\x20[SDK]\x20Calling\x20onComplete\x20with\x20token\x20and\x20user\x20data','jOmhO','SwvWk','⚠️\x20[SDK]\x20No\x20email\x20found\x20-\x20calling\x20onComplete\x20with\x20limited\x20data','❌\x20[SDK]\x20Error\x20retrieving\x20auth\x20data\x20for\x20onComplete:','✅\x20[SDK]\x20onComplete\x20finished\x20-\x20waiting\x20for\x20parent\x20to\x20close\x20modal','🚀\x20Get\x20Started\x20pressed\x20-\x20moving\x20to\x20signin','MWIhU','⚠️\x20[SDK]\x20User\x20skipped\x20-\x20no\x20auth\x20data\x20available','❌\x20[SDK]\x20Error\x20during\x20skip:','✅\x20[SDK]\x20Skip\x20complete\x20-\x20waiting\x20for\x20parent\x20to\x20close\x20modal','WHkkV','🔍\x20Reviewer\x20bypass\x20triggered\x20from\x20platforms','NvXPj','eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXZpZXdlciI6dHJ1ZSwiaWF0IjoxNzA0MDY3MjAwfQ.reviewer-bypass-signature-placeholder','✅\x20Stored\x20reviewer\x20bypass\x20markers','❌\x20Failed\x20to\x20store\x20reviewer\x20bypass:','Epgap','GAlYa','uYwsq','jOFxP','XLnLm','xkkaI','3|4|0|2|1','📊\x20Training\x20type:','📈\x20Query\x20scores\x20enabled:','🎯\x20Training\x20Features:','xcLCd','FaznT','instagram','chatgpt','llm','🤖\x20Handling\x20LLM/ChatGPT\x20connection\x20-\x20sending\x20to\x20backend...','✅\x20Backend\x20received\x20and\x20stored\x20LLM\x20data','📝\x20Connection\x20ID:','icpzc','Ankpp','dlAhH','platform','Error\x20loading\x20user\x20data:','DoBhV','5|2|1|4|3|0','👋\x20Welcome\x20back!\x20User\x20has\x20existing\x20connections,\x20skipping\x20to\x20consent\x20screen','🔐\x20[PIN\x20SUBMIT]\x20PIN\x20submitted,\x20checking\x20for\x20background\x20training...','UzCYM','✅\x20[PIN\x20SUBMIT]\x20Background\x20training\x20detected,\x20continuing\x20with\x20PIN\x20validation...','❌\x20[PIN\x20SUBMIT]\x20Failed\x20to\x20continue\x20background\x20training:','Error:\x20Failed\x20to\x20continue\x20training','ℹ️\x20[PIN\x20SUBMIT]\x20No\x20background\x20training\x20detected','No\x20training\x20in\x20progress.\x20Please\x20restart\x20the\x20flow.','ZvCGo','🚀\x20Starting\x20Enoch\x20training\x20with\x20socketId:','🔑\x20Using\x20auth\x20token:','mobile_user','📱\x20Connected\x20platforms\x20for\x20training:','📤\x20Sending\x20training\x20data\x20to\x20/mobile-training/enoch:','📡\x20Training\x20API\x20response:','CONNECTIONS_REQUIRED','🔗\x20Connections\x20required\x20detected\x20from\x20HTTP\x20response','XzTmC','2|5|4|1|6|3|0','🔒\x20Compression\x20enabled:','❌\x20Training\x20start\x20failed:','❌\x20Training\x20start\x20error:','3|4|5|0|2|1','✅\x20[BACKGROUND]\x20PIN\x20submitted\x20for\x20existing\x20training\x20session','❌\x20[BACKGROUND]\x20Failed\x20to\x20continue\x20background\x20training:','ApZkx','ruNVJ','ZcwLG','OYHyi','❌\x20Socket\x20disconnected,\x20reason:','❌\x20Error\x20checking\x20authentication\x20token:','DrODp','❌\x20Socket\x20connection\x20error:','0|1|3|2|4','🎉\x20All\x20Complete:','ghGzf','✅\x20Training\x20completed:','🧠\x20Inference\x20enabled:','ewLXz','🧪\x20Testing\x20mode\x20enabled','✅\x20Training\x20Complete:','📊\x20Training\x20update:','hNOQW','🔄\x20YouTube\x20token\x20expired,\x20triggering\x20reconnection...','YouTube\x20token\x20expired\x20-\x20reconnecting...','🔗\x20Connections\x20required\x20detected\x20from\x20socket','Connections\x20required','NO_DATA','oekHm','2|7|5|6|4|1|3|0','🚫\x20No\x20data\x20scenario\x20detected','No\x20interaction\x20data\x20found','2|5|1|3|0|4','ℹ️\x20Limited\x20data\x20scenario\x20detected','LIMITED_DATA','uwKql','aLhMV','4|1|2|5|3|0','🔍\x20Socket\x20state:','Connection\x20timeout.\x20Please\x20check\x20your\x20internet\x20and\x20try\x20again.','✅\x20Socket\x20connected\x20for\x20training','🔌\x20Socket\x20connection\x20details:','zQRNq','attempts','❌\x20Socket\x20reconnection\x20error:','❌\x20Error\x20resending\x20verification\x20code:','EMERl','YouTube\x20tokens\x20refreshed\x20-\x20but\x20training\x20only\x20starts\x20from\x20connector→PIN','❌\x20Token\x20refresh\x20failed,\x20attempting\x20full\x20reconnection...','YouTube\x20reconnection\x20failed.\x20Please\x20restart\x20from\x20connector\x20screen.','EauOf','🔍\x20Token\x20length:','🔑\x20Token\x20stored\x20verification:','Not\x20stored','🔄\x20UserInfo\x20not\x20available,\x20attempting\x20to\x20reload...','🧑‍💻\x20Set\x20user\x20info:','WHkWu','❌\x20No\x20authentication\x20token\x20available\x20after\x20ensureAuthToken','🧑‍💻\x20User\x20info\x20available:','🌐\x20Attempting\x20to\x20connect\x20to:\x20${API_CONFIG.BASE_URL}','📱\x20Device\x20platform:','🔗\x20Network\x20connectivity\x20check\x20starting...','reconnect','reconnect_failed','connect_error','trainingCompleted','modelStandby','trainingUpdate','🔌\x20Attempting\x20to\x20connect\x20to\x20socket...','🔌\x20Socket\x20config:','🔌\x20Socket\x20connect()\x20called\x20-\x20waiting\x20for\x20connection...','4|1|3|2|0','training-complete-token','🔍\x20UniversalOnboarding:\x20modalVisible\x20state\x20is:','eDXXA','Keeping\x20your\x20data\x20private','Trying\x20to\x20understand\x20your\x20mind','oReAv','You\x27re\x20more\x20interesting\x20than\x20I\x20expected','akMed','MmVWM','bcUAF','Just\x20a\x20few\x20more\x20seconds','➕\x20Returning\x20user\x20wants\x20to\x20connect\x20more\x20platforms','🎉\x20Real\x20persona\x20creation\x20completed\x20successfully','CQqly','BhUtC','JSQsx','xguKj','aictK','❌\x20Error\x20retrieving\x20real\x20token\x20for\x20onComplete:','⚠️\x20No\x20authentication\x20token\x20found','ℹ️\x20SDK\x20does\x20not\x20create\x20users\x20during\x20onboarding','jnNfy','EWNCq','Koggc','yHnkd','❌\x20[BACKGROUND]\x20Socket\x20disconnected','LhDVF','NysYd','Connecting...','Failed\x20to\x20create\x20authentication\x20token\x20for\x20background\x20training','🧑‍💻\x20[BACKGROUND]\x20User\x20info\x20set:','Initializing\x20data\x20collection...','websocket','connected','🚀\x20[BACKGROUND]\x20Starting\x20background\x20training\x20with\x20socketId:','📤\x20Sending\x20background\x20training\x20data\x20to\x20/mobile-training/enoch:','🔗\x20Connections\x20required\x20detected\x20from\x20background\x20training','🎯\x20Background\x20training\x20Features:','0|1|5|3|6|2|4','Background\x20training\x20model...','Background\x20training\x20failed\x20to\x20start','TkNVa','✅\x20Returning\x20user\x20accepted\x20consent','amaBG','❌\x20[SDK]\x20Error\x20during\x20returning\x20user\x20consent:','✅\x20[SDK]\x20Returning\x20user\x20onComplete\x20finished\x20-\x20waiting\x20for\x20parent\x20to\x20close\x20modal','VvXUj','Pinterest','linkedin','Reddit','gmail','Gmail','ChatGPT','slide','Container\x20Top:\x20','Handle\x20Top:\x20','Hide\x20Debug','PFVWQ','XUUaU','FbmEX','ZRqWA','Value','mjgnh','lgkvp','lPGJv','MOuXK','lIJYa','xMovn','pKRmI','SNPir','TyNWW','log','🔍\x20UniversalOnboarding:\x20current\x20step\x20is:','🔍\x20UniversalOnboarding:\x20primaryAuthOnly\x20is:','progress','status','TvaGf','frGSP','WsdBw','ywzXz','SosmY','xTpBq','->\x20Setting\x20to:\x20welcome','jTZEV','OxWJg','RPlAt','bgujA','tVJQs','xeNxW','ZqDFk','ntPoa','QqRcp','oWkWs','zsIhf','MsjGA','tGXBZ','ukQzf','IHxkI','EfXTB','bUfrU','YaXmN','Zhphb','yIDno','IbGYM','fHGOQ','error','vLMza','VkhOK','TGrfX','getItem','dtmfj','includes','push','stringify','zDLiE','split','Oabhy','inference','auPhv','features','storage','type','acwtr','encryption','RBpqY','compression','kDpwM','ZsGsr','qWUiU','uTHCe','Starting\x20training','PHtGk','qOJDb','NrGQl','aeDsL','NRenU','tkdDl','nIJfw','TRAXe','parse','filter','📱\x20Removed\x20connected\x20platform:','Remaining\x20platforms:','PxLIK','current','LljRT','HEbCI','rLdBc','engine','transport','shqdn','name','cCFxO','oDRbD','jXrbR','nhZAj','substring','fxrlF','BQuDn','pVDDs','iJmDo','aqNuQ','alert','uEzFH','Are\x20you\x20sure\x20you\x20want\x20to\x20disconnect\x20','QNjGJ','Osrxb','leklc','hMTJh','disconnected','JJIaf','🔌\x20Disconnected\x20platform:','skODj','STWPQ','mQWKi','MOJYO','xeLLo','AsFGo','JHswm','loURa','wUTwG','yFMWo','vcjvt','qMROG','WaleP','AFrbR','vxSdG','BHnkD','UWqkj','MSbXI','NAhFK','YRbBC','LJbau','qltbM','mScUm','afykI','eBlNc','TiwLp','repeat','message','aAbTk','SpHdP','RCOXx','laoJb','RhAPL','aheAJ','Processing...','jFQiX','lgIwa','#E60023','XsZSe','jptBm','rbttO','LQXjt','vKaIe','CfQDM','LJqNg','MPgEs','JtMmk','#EA4335','eXdJe','ZAjIX','#10A37F','OPKZT','NjHMU','KBvkP','ZZsdX','FQFhI','Tjoow','bWeAn','QAvPX','GbGLi','start','addEventListener','qqLPX','muhSQ','oCxWo','KUNnM','ATGWx','mnojk','dtIcK','nnnoQ','vluvp','qDFsh','🔌\x20Cleaning\x20up\x20socket\x20connection...','disconnect','wpGJr','rhuYi','SmwJZ','WHXYs','GHZdJ','oCWkg','nocgq','existing_user_info','bgybD','Xtkhw','🔍\x20Using\x20username\x20for\x20training:','pgiXy','QDQLG','zcFOa','tPyJy','maaeN','KZfcE','fYxDR','🔍\x20Found\x20existing\x20user\x20info\x20-\x20user\x20wants\x20to\x20add\x20more\x20data','oYyhz','removeItem','lfzTO','foAXU','HrNWf','nHPdN','DvJsc','FaHYD','nPHeg','lnRXI','SwmGK','XRMoQ','🔑\x20[CACHED\x20LOGIN]\x20Found\x20valid\x20token\x20for\x20user:','length','0|3|5|4|1|2','oWlAr','fEGJY','iwmCZ','🔑\x20[CACHED\x20LOGIN]\x20User\x20authenticated\x20but\x20no\x20connections\x20-\x20skipping\x20to\x20platforms','nfbro','QuhQC','iRfNn','OGuIn','email','WTVup','bwXtw','WdfWK','eqrNw','vdmps','flsZx','noRWZ','Heuyj','zUCRo','fibRO','Foenl','dHCau','gqXqV','VYjTy','user_','floor','random','Initial\x20connection\x20status:','keys','forEach','GvfEu','Connection\x20statuses\x20set:','KHzjz','DxQZg','mQARp','OnbRk','upijd','hMTaP','xYHwb','CVpjb','gAecZ','WZckB','ssBgm','aOYZg','LOivO','eCpSt','FHqVH','kyTfE','RnLvW','yswvH','vnVZP','qPXGa','EWFhB','wytZN','kdsjE','searchParams','WxDHy','zkAtx','yRlFu','XjgbP','fMJPE','gqGPK','TLsIx','slOnZ','BUTTON_PRESS','PTUth','vHciN','OulPA','yjqxz','InxZF','fQPAE','BGVGg','...','oGjZd','hyllA','BkwfZ','kycrL','setItem','pGwsz','rXDxb','BHKnr','aYYvD','LUvjn','UqUTL','UUcCp','CXpYT','📧\x20Sending\x20verification\x20code\x20to:','success','qoTmi','RIFcZ','gyjBr','Rbcjp','VNzuE','yHHNT','jwdDj','kVwVV','ZqWJI','NOzVl','KdCeR','jtSDz','🔗\x20Initiating\x20Google\x20Sign-In','EPVUq','user','QxqVZ','isNewUser','username','bMUop','qsVOt','👤\x20Returning\x20user\x20detected\x20via\x20Google\x20Sign-In\x20-\x20checking\x20for\x20existing\x20connections','ZApfz','EEjiu','aNilH','dKbEi','kPdCl','zAtoe','\x20existing\x20connections\x20-\x20skipping\x20to\x20consent','map','SUCCESS','gEroi','warn','YArNt','cancelled','IOUjZ','RcHPL','PPiUR','FQgvN','sMTGC','ENUzv','ERROR','Iqjvh','xwabN','eRpeJ','mAEHD','KBOGy','aDEBY','LNQrS','CXpAI','cBIyf','EueXU','tROuA','TpGyB','TtsHv','VWZhq','FKvTi','🧪\x20Test\x20bypass\x20-\x20skipping\x20code\x20verification,\x20going\x20to\x20platforms','WIuQA','PMAtS','✅\x20Email\x20verification\x20successful','flowType','existingUserData','Nhlzx','UjqPZ','connections','isArray','hasData','active','hEugs','ZWXMN','Invalid\x20verification\x20code.\x20Please\x20try\x20again.','FIHqI','TMLot','iKQMF','Verification\x20failed.\x20Please\x20try\x20again.','hpysT','nRQxw','GnjFe','AvUhy','wEcqY','multiRemove','yrJRS','EWwSf','Ajvxt','kgYqU','RSvzG','JhNWF','wiQXl','IlYOw','mYJvM','xJUms','uWCjM','WGgrE','AvoPk','all','jBHJF','nxCPI','KBSvZ','aiZPj','JsIjc','dYiVJ','SEOmt','BASE_URL','ZVXfq','ZzxDa','🍎\x20[SDK]\x20Calling\x20onComplete\x20with\x20email\x20(no\x20SDK\x20token\x20-\x20Apple\x20auth)','VzJCi','JBNoi','IDTnM','DLXWM','WxGsw','Ryzty','⏭️\x20Skipping\x20platform\x20connections','SJMgT','ADcmF','uPmne','dKOwu','RKXHR','✅\x20[SDK]\x20User\x20skipped\x20platforms\x20-\x20still\x20calling\x20onComplete\x20with\x20auth\x20data','ezcgT','Ntuzu','AVRGB','nYUxJ','sKVhe','KylmN','zjNOk','zwXOe','uNCIO','FDemt','UaEKa','seiDb','rZkNM','remove','zMeyI','izjyl','TVGdW','ytCmE','ChZzm','TyuLO','SApvM','gITQd','lDVri','ADQTp','tGUIb','OVxUf','IZjSK','wqGWe','ZOEeN','Error\x20connecting\x20to\x20','RJFfV','wlmkd','BSQij','LEtUh','dnfRU','rTbNk','dzLDx','VKhHh','nhaMp','🚀\x20Training\x20Started:','IWoCz','owFaa','PjWJs','yMjSX','mqZBD','NPlJh','_user','uimtW','qNCGI','huQTz','now','fGdmE','QXsQd','srgTt','connectionId','axvXk','\x20successfully\x20connected\x20and\x20stored\x20in\x20backend','fvDoH','bBPAa','PimvN','lAbEB','NVNvG','htYEm','VNGaV','lzZIb','WLOdK','TrRGs','zjpcw','zyFzs','dyzyO','teEBi','QFMoq','rHtdz','Yicga','IdlCV','ItBDp','GYgZB','Hgklq','oUBnv','srnAl','hQJBd','jIpMe','MADAr','VmzGx','iTKQH','rSQSU','KimDp','Qamtk','LfUXe','🎉\x20OAuth\x20success\x20for\x20','\x20-\x20backend\x20callback\x20completed','📝\x20Received\x20result:','XRxNm','uCWpK','mNbQI','UHIUB','eAqhq','IskwR','iLTaY','💾\x20','rGTNP','✅\x20Updating\x20connection\x20state\x20for\x20','XDZKD','vhplc','🗄️\x20Databases\x20used:','cPexi','KpPTB','DoeZQ','tGDvn','CnFBp','databases','Wkdep','EvkLw','GSpkB','LmErV','Srmut','jTSjO','vaYTx','yzGfC','WHOUK','gEjXr','cMLKa','ZoBQY','🔐\x20[PIN\x20SUBMIT]\x20PIN\x20stored\x20securely,\x20moved\x20to\x20persona\x20step','UgpEH','HWXkd','❌\x20No\x20authentication\x20token\x20available','Tryxy','PGMRS','JNzrh','yuKhQ','zbmwm','hpbVU','YnDVQ','catch','vHIXO','Ysfyd','jbtZO','Uyuks','yNQQU','requiresConnections','xpcED','KQGcL','LoAJK','fvIrp','WKqRe','MNVQT','KwjJB','🔐\x20Encryption\x20enabled:','iMSpu','WurGA','✅\x20Found\x20','uUHFk','XDape','Ztciv','ntqAm','Training\x20model...','fDWRK','vCrYo','Error:\x20','LKnTr','INMsX','jrBIL','Unknown\x20error','QweKZ','LCapj','lvtbO','YRqRy','ZtFLw','jMWNH','YbhVr','hErzQ','RjUFB','ucygZ','cFrvG','cZIoS','SJaAc','BeaNV','BufrG','XSalf','zinyV','MvCZZ','LxPSK','wEhTC','XXFrC','GuLFH','oMgwk','nocUo','bfemK','IusaH','ymuzE','cowSc','PpYvy','Viurn','HwhlV','BrjBZ','xuzgx','wfzFz','CKOLs','hWHHx','Connection\x20failed.\x20Please\x20try\x20again.','NbUAg','vNYjk','Running\x20test\x20inference','3|1|0|4|5|2|6','🔄\x20Attempting\x20to\x20refresh\x20YouTube\x20tokens...','btzkh','qZfLy','oIubg','youtube','pHFjE','rKPvU','jWKcX','LugsL','❌\x20YouTube\x20token\x20refresh/reconnection\x20error:','akwmW','vMQbA','ZgEzR','1|2|3|0|4|5','xDkGu','HpGfV','testing','VzfeZ','joQtl','WtGtD','🚀\x20Starting\x20persona\x20creation...','🔐\x20Step\x201:\x20Ensuring\x20authentication\x20token...','sitCx','HFKBm','daSGw','vczYE','PhLnJ','xfbQi','YUtwu','hNKJl','vztGC','wmFeE','cYbph','zqKaQ','heWyN','ucnSu','bDnUE','NwUZJ','ccLip','aUzxp','🔧\x20Setting\x20up\x20socket\x20connection\x20for\x20real\x20training...','EQcwK','aAqOd','YUpAv','lXizy','gGNmH','🔌\x20Socket\x20instance\x20created:','TIUkW','lyARn','nMAiX','qVKeZ','HOMqs','SQWMb','UdzDF','bDNCZ','zoZrF','QLDiQ','fvEEq','odUiC','YMEel','poiDz','GlmXN','PGEfh','MQetL','OZImA','OIAav','okQBh','LJEPk','gCHDz','tNzlD','oKgGx','OoUxY','GpecD','cIKzg','ImtgD','rslRP','UxzRX','sirNK','LQqLG','reconnect_attempt','🔄\x20Socket\x20reconnection\x20attempt:','Reconnecting...\x20(','IsrsC','BUfuT','qbqym','BpyoJ','EGBDM','pSaLH','vhxXW','vIWCl','TgvTm','OYtZV','AyLIA','CgeWv','XXRtJ','0|3|2|1|4','❌\x20Socket\x20error\x20details:','stack','pLObk','QBAnK','lYbNc','nLtsN','EvBCa','MOpYh','uBdTf','XplyG','Zinot','inferenceCompleted','QtZDE','Uploading\x20to\x20S3','traits','qOFOH','inferenceResults','BdiSE','arsuW','Ukdsv','hjVUS','qRTai','XuOwC','GJqlU','DBOTo','HZMXG','FeuRU','join','FEeDc','Complete!','OMyeh','pDhhh','YouTube\x20access\x20token\x20has\x20expired','YWNmT','yeMXk','mNyxy','PuHwD','oruiE','NoDWv','pDArM','twzBT','gJyqp','Token\x20refresh\x20failed\x20-\x20please\x20restart\x20from\x20connector\x20screen','ioFfO','SNqsk','✅\x20YouTube\x20reconnected,\x20but\x20training\x20restart\x20disabled','fzUAH','❌\x20YouTube\x20reconnection\x20failed:','OUDVO','aKsEQ','CYYch','yPGNO','XWrzn','Error\x20initiating\x20OAuth\x20for\x20','xxodE','0|3|6|5|4|2|7|1','UjDyU','CCCUU','kfVAb','fpbAZ','epllf','jUplA','pTrAh','wbJvS','iGxVN','vGRYQ','DJZVt','mBPNx','jbVVc','details','NNXnp','kVZCe','LotuT','aTsNW','YqHoy','DblLF','WZCcD','dyKiV','HCMHe','EFQsO','DYnWr','iBVwM','FBkfK','VjnBb','Training\x20in\x20progress','kFqLu','xsqJx','ieLzf','OCEPq','xrYrp','LIdpM','xZMbU','yiOBC','qyzjv','fSaYz','nlWUk','iGbId','laoFu','gDukO','GfbRv','CkQdY','FjZba','jfCFD','LBDAh','readyState','FBBiW','lhrBf','CZnKQ','zUevN','SpNyp','❌\x20Error\x20in\x20startPersonaCreation:','sMfdc','DUyVr','Something\x20went\x20wrong.\x20Please\x20try\x20again.','kttNN','oxxMW','jTKJo','Connection\x20error.\x20Please\x20try\x20again.','FGCgK','JyLOZ','FKYMC','VEjpR','QnRYh','uuCDh','zRHQN','NBVyA','HWDkm','hckmP','zcfBD','ktowc','bBIny','DpIWL','ZQrub','VxtqL','DILyN','yAGJq','timing','bxaeg','call','YwLLb','eyXUK','JPvFO','lmVUG','wGeBY','coBjm','qpzJo','ULzlX','🔌\x20Disconnecting\x20training\x20socket...','BBlfs','JFZdD','CNlkg','fyCiJ','completed','nkjhb','cyZFr','lQzwj','CPmmn','moJjv','UlNLx','zORWX','tlZOl','aKakq','sUccT','tmPBR','NGDQY','iOvpT','vHOkv','IFMyU','eopcr','phnGZ','hCdES','KOVIg','NBwtg','vDWLO','NVuWn','trim','ETuob','VslOa','values','some','ipkwS','iPHvi','EqhkG','KyUBQ','RMVxa','sLITJ','FhRRc','IljND','setValue','wyZes','KxdqU','rnwiB','QZLMM','nWjdl','EFDLE','nKpvj','bKtBz','hMuYq','fxXQm','raBKQ','✅\x20[BACKGROUND]\x20Auth\x20token\x20ready:','woHfO','MITkl','xfeaJ','eOzJS','eziVI','yQmam','fZOtd','QYMoT','ybNtJ','XnoCn','✅\x20[BACKGROUND]\x20Socket\x20connected,\x20starting\x20background\x20data\x20collection...','qyFjn','Collecting\x20your\x20data...','uiWIA','ILmsD','AlEuC','zcLCg','ykoKH','AcQWM','✅\x20[BACKGROUND]\x20Background\x20training\x20initiated\x20successfully','❌\x20[BACKGROUND]\x20Background\x20training\x20failed:','rkGIX','oWUpV','aYKMf','oLBin','AdujL','CPvUF','nzHIP','rGTWW','jbTEz','UAjdu','yriIw','yUpBv','KcZYx','imlzn','WBoKt','enxXl','pyoGM','QJZpR','keZMs','KmoOm','modalOverlay','createElement','backdrop','container','handleContainer','handleButton','handle','debugPanel','debugTitle','debugRow','IVBHV','max','debugBtn','debugLabel','VKuCA','debugCloseBtnText','brandMarkContainer','headingContainer','bodyContainer','welcomeSpacer','OqaMz','iDpfo','vLCRk','lIBRP','lQUkb','sWMtY','lPIDk','zeTvr','NECln','qESRt','GbyqM','kZEdH','🔑\x20[SDK]\x20Auth\x20data\x20retrieved\x20in\x20parallel\x20for\x20returning\x20user','⚠️\x20[SDK]\x20No\x20token/email\x20found\x20for\x20returning\x20user','NKWsK','qUvvu','xXyaT','hNPsq','JINLL','tmRBy','szpwa','QzTCN','uiqeW','flex-end','rgba(0,\x200,\x200,\x200.5)','#FAFAFA','hidden','100%','center','transparent','rgba(0,0,0,0.85)','#fff','700','row','#666','#F5F5F5','bold','600','#333','#000000','space-between','#E5E5E5','#E9C46A','#000','#FFFFFF','#F0F0F0','flex-start','#1BA9D4','#FF3B30','italic','#FFF5F5','#FEB2B2','#F0F9FF','#D1D5DB','500','#FF6B6B','#F8F9FA','#0EA5E9','#0369A1'];_0x3118=function(){return _0x4283f0;};return _0x3118();}import _0x48e0cf from'./PrimaryButton';import _0x43aa42 from'./SignInStep';import _0x56414d from'./VerificationStep';import _0x1a3d64 from'./PlatformConnectorsStep';import _0x1128c2 from'./PersonalizationConsentScreen';import{initiateOAuth,initiateNativeAuth,hasNativeSDK,isOAuthCallback}from'../services/platformAuthService';import{getUniversalOnboardingIcon}from'../utils/assetRegistry';import{signInWithGoogle}from'../services/googleAuthService';import{triggerHaptic,HapticType}from'../utils/haptics';import{getOnairosUsername,getAuthToken,sendEmailVerificationCode,confirmEmailVerificationCode}from'../services/authService';import{io}from'socket.io-client';function _0x4736(_0x3118e2,_0x4736ca){_0x3118e2=_0x3118e2-0x0;const _0x530037=_0x3118();let _0x3b5108=_0x530037[_0x3118e2];return _0x3b5108;}import{setTemporaryPin,clearTemporaryPin}from'../services/pinStorageUtils';import{getEncryptedPinForAPI}from'../services/pinEncryptionService';import{startEnochTrainingWithYouTubeCheck}from'../services/mobileTrainingService';import{sendLLMDataToBackend}from'../services/llmDataStorage';import{getConnectedAccountsSmart}from'../services/connectedAccountsService';import{API_CONFIG}from'../config/api';import{getJWT,storeJWT}from'../services/jwtStorageService';import{refreshYouTubeTokens}from'../services/platformAuthService';const {height,width}=Dimensions[_0x4736(0x0)]('window');export const UniversalOnboarding=({visible:_0x2e847a,onClose:_0x443a04,AppName:_0x631071,requestData:_0x325ec7,returnLink:_0x59bada,onComplete:_0x84d24a,embedd:embedd=![],debug:debug=![],test:test=![],preferredPlatform:_0x9972b4,primaryAuthOnly:primaryAuthOnly=![],allowedPlatforms:_0x2b7ef4,recommendedPlatforms:_0x3b6366,allowSkip:allowSkip=!![]})=>{const _0x54244c={'TyNWW':'🔍\x20UniversalOnboarding:\x20visible\x20prop\x20changed\x20to:','TvaGf':'Processing...','frGSP':_0x4736(0x1),'tfJuw':_0x4736(0x2),'WsdBw':function(_0x3b3aae,_0x26b62e){return _0x3b3aae===_0x26b62e;},'OulPA':_0x4736(0x3),'ywzXz':_0x4736(0x4),'SosmY':_0x4736(0x5),'xTpBq':'🍎\x20[APPLE\x20FIX]\x20Current\x20step\x20was:','jTZEV':function(_0x2d083b,_0x5b2a31){return _0x2d083b(_0x5b2a31);},'yIDno':function(_0x19b80d,_0x4ed0f2){return _0x19b80d(_0x4ed0f2);},'IbGYM':_0x4736(0x6),'fHGOQ':function(_0x2563dc){return _0x2563dc();},'VkhOK':function(_0x3d1f0b,_0x33b795){return _0x3d1f0b(_0x33b795);},'TGrfX':'pin','tGXBZ':_0x4736(0x7),'ukQzf':_0x4736(0x8),'dnfRU':_0x4736(0x9),'IHxkI':'🔐\x20Encryption\x20enabled:','dzLDx':_0x4736(0xa),'nIJfw':function(_0x53dbd6,_0x3f68a4){return _0x53dbd6!==_0x3f68a4;},'bUfrU':_0x4736(0xb),'Zhphb':_0x4736(0xc),'dtmfj':_0x4736(0xd),'PcgSe':_0x4736(0xe),'sZBzS':_0x4736(0xf),'zDLiE':_0x4736(0x10),'ZsGsr':function(_0xacd84b,_0x15361c){return _0xacd84b===_0x15361c;},'qWUiU':function(_0x5bae7b,_0x2d7815){return _0x5bae7b===_0x2d7815;},'uTHCe':function(_0x2ce3bd,_0x3648e8){return _0x2ce3bd(_0x3648e8);},'PHtGk':function(_0x5606fb,_0x6d871c){return _0x5606fb(_0x6d871c);},'qOJDb':_0x4736(0x11),'NrGQl':_0x4736(0x12),'aeDsL':_0x4736(0x13),'zMWgB':_0x4736(0x14),'NRenU':_0x4736(0x15),'tkdDl':_0x4736(0x16),'wJMWp':function(_0x291238){return _0x291238();},'dzJFw':_0x4736(0x17),'TRAXe':'BpMkJ','fadzu':_0x4736(0x18),'aqNuQ':_0x4736(0x19),'EPVUq':function(_0x5af771){return _0x5af771();},'hQJBd':'Error\x20disconnecting\x20platform:','uEzFH':_0x4736(0x1a),'QNjGJ':_0x4736(0x1b),'Osrxb':_0x4736(0x1c),'qMROG':_0x4736(0x1d),'mQWKi':function(_0x35ce23,_0x36fda9){return _0x35ce23(_0x36fda9);},'WaleP':_0x4736(0x1e),'MOJYO':'Invalid\x20verification\x20code.\x20Please\x20try\x20again.','xeLLo':_0x4736(0x1f),'AsFGo':function(_0x23085f,_0x3eab06){return _0x23085f===_0x3eab06;},'JHswm':function(_0x52ab08,_0x2b66a6){return _0x52ab08(_0x2b66a6);},'loURa':function(_0x466a2a,_0x582d11){return _0x466a2a+_0x582d11;},'KEOIM':function(_0x5a3ce4,_0x374b57){return _0x5a3ce4!==_0x374b57;},'kMLkY':_0x4736(0x20),'XyaBU':_0x4736(0x21),'woXXP':_0x4736(0x22),'wUTwG':function(_0x4627b1,_0x700c67){return _0x4627b1(_0x700c67);},'yFMWo':function(_0x34de11,_0x238695){return _0x34de11!==_0x238695;},'vcjvt':_0x4736(0x23),'AFrbR':function(_0x1d5bee,_0x231bb3,_0x449443){return _0x1d5bee(_0x231bb3,_0x449443);},'eqrNw':function(_0x24c6e6,_0x2dea1d){return _0x24c6e6!==_0x2dea1d;},'laoJb':_0x4736(0x24),'RhAPL':_0x4736(0x25),'aheAJ':function(_0x2eadc1,_0x1003e3){return _0x2eadc1(_0x1003e3);},'ZZsdX':_0x4736(0x26),'vHciN':function(_0x5612df,_0xfbd5f1){return _0x5612df(_0xfbd5f1);},'KBvkP':'WUZaz','knzin':'LUojf','QAvPX':function(_0x2a4c84,_0x305a66){return _0x2a4c84(_0x305a66);},'muhSQ':function(_0x69dc0d,_0x437eb4){return _0x69dc0d!==_0x437eb4;},'BnFHr':_0x4736(0x27),'oCxWo':_0x4736(0x28),'Tryxy':_0x4736(0x29),'FQFhI':function(_0x47ba70,_0x4e9d72){return _0x47ba70===_0x4e9d72;},'Tjoow':function(_0x31fb97,_0x2cb073,_0xe9e85d){return _0x31fb97(_0x2cb073,_0xe9e85d);},'aGUcm':function(_0x127493,_0x5646b4){return _0x127493!==_0x5646b4;},'bWeAn':_0x4736(0x2a),'GbGLi':function(_0x4ef60c){return _0x4ef60c();},'qqLPX':_0x4736(0x2b),'ZQrub':_0x4736(0x2c),'SmwJZ':function(_0x440e20,_0x340185){return _0x440e20(_0x340185);},'noRWZ':function(_0x3a06a5){return _0x3a06a5();},'oCWkg':_0x4736(0x2d),'JBTBj':'GETEB','nocgq':_0x4736(0x2e),'bgybD':function(_0x594a5a){return _0x594a5a();},'Xtkhw':function(_0x5a9a95,_0x894522){return _0x5a9a95===_0x894522;},'DIvJM':'🔑\x20[CACHED\x20LOGIN]\x20User\x20has\x20existing\x20connections:','pgiXy':'🔑\x20[CACHED\x20LOGIN]\x20Skipping\x20to\x20consent\x20screen','QDQLG':function(_0x502755,_0x1369a8){return _0x502755(_0x1369a8);},'zcFOa':function(_0x128358,_0x3d96b8){return _0x128358===_0x3d96b8;},'VYjTy':function(_0x1db58a,_0x3131e2){return _0x1db58a===_0x3131e2;},'vdmps':'rYTKN','flsZx':_0x4736(0x2f),'dHCau':'❌\x20Error\x20in\x20startPersonaCreation:','gqXqV':function(_0x24f6ed,_0x1b9bd2){return _0x24f6ed(_0x1b9bd2);},'DUyVr':_0x4736(0x30),'GvfEu':function(_0x1c421f,_0x55393e){return _0x1c421f===_0x55393e;},'Heuyj':_0x4736(0x31),'zUCRo':function(_0x2fa4a9,_0x5088ba){return _0x2fa4a9!==_0x5088ba;},'Foenl':'fibRO','hWHeM':function(_0x3d85ff,_0x42a42f){return _0x3d85ff(_0x42a42f);},'KHzjz':'Platform\x20toggles\x20set:','mQARp':_0x4736(0x32),'hMTaP':'Error\x20loading\x20initial\x20connection\x20status:','hRgHy':function(_0x1f5626,_0x5568d3){return _0x1f5626===_0x5568d3;},'xYHwb':function(_0x2787de,_0x44a49f){return _0x2787de(_0x44a49f);},'CVpjb':'xyMOD','WZckB':function(_0x4be003){return _0x4be003();},'iTKQH':_0x4736(0x33),'ssBgm':function(_0x31c447,_0x5d0c9b){return _0x31c447&&_0x5d0c9b;},'aOYZg':function(_0x5ae291,_0x226481){return _0x5ae291(_0x226481);},'LOivO':function(_0x24a64b,_0x409d6e){return _0x24a64b(_0x409d6e);},'eCpSt':_0x4736(0x34),'UJGTd':function(_0x4a95ef,_0x2918d3,_0x29e460){return _0x4a95ef(_0x2918d3,_0x29e460);},'lgkvp':function(_0x55c533,_0x429c35){return _0x55c533(_0x429c35);},'FHqVH':function(_0x573204,_0x23e0ef){return _0x573204===_0x23e0ef;},'kyTfE':_0x4736(0x35),'yjqxz':_0x4736(0x36),'InxZF':'🔐\x20[BACKGROUND]\x20PIN\x20validation\x20-\x20continuing\x20with\x20existing\x20training\x20session','fQPAE':_0x4736(0x37),'BGVGg':_0x4736(0x38),'oGjZd':_0x4736(0x39),'qQzrA':_0x4736(0x3a),'slOnZ':_0x4736(0x3b),'PTUth':'🍎\x20Get\x20Started\x20pressed\x20(Apple\x20user)\x20-\x20skipping\x20signin,\x20going\x20to\x20platforms','yHHNT':function(_0x598175,_0x4ece39){return _0x598175(_0x4ece39);},'PFVWQ':function(_0x56cf9e,_0xa06a2c){return _0x56cf9e(_0xa06a2c);},'hyllA':function(_0x52ac3e,_0x38ff3a){return _0x52ac3e(_0x38ff3a);},'RIFcZ':function(_0x26a253,_0x2e8a82){return _0x26a253(_0x2e8a82);},'BkwfZ':_0x4736(0x3c),'kycrL':_0x4736(0x3d),'pGwsz':_0x4736(0x3e),'rXDxb':_0x4736(0x3f),'iKQMF':function(_0x1abedc,_0x2be1cb){return _0x1abedc(_0x2be1cb);},'xeNxW':function(_0x54faa4,_0x1ca043){return _0x54faa4(_0x1ca043);},'BHKnr':function(_0x5c4f76,_0x1bf610){return _0x5c4f76===_0x1bf610;},'aYYvD':_0x4736(0x40),'LUvjn':'🧪\x20Test\x20bypass\x20detected\x20-\x20skipping\x20to\x20verification\x20screen','UqUTL':function(_0x3396a1,_0x508078){return _0x3396a1(_0x508078);},'UUcCp':_0x4736(0x41),'OxWJg':function(_0xbfe262,_0x13112d){return _0xbfe262(_0x13112d);},'CXpYT':function(_0x54b640,_0x3bb844){return _0x54b640(_0x3bb844);},'KdCeR':function(_0x4b4021,_0xbdafd2){return _0x4b4021(_0xbdafd2);},'qoTmi':_0x4736(0x42),'gyjBr':_0x4736(0x43),'FniHT':_0x4736(0x44),'Rbcjp':_0x4736(0x45),'VNzuE':_0x4736(0x46),'jwdDj':_0x4736(0x47),'IOUjZ':_0x4736(0x48),'kVwVV':'⚠️\x20Could\x20not\x20get\x20encrypted\x20PIN\x20for\x20training:','ZqWJI':_0x4736(0x49),'SpNyp':'❌\x20Socket\x20connection\x20timeout\x20after\x2020\x20seconds','NOzVl':function(_0x7b62c0,_0x4389a3){return _0x7b62c0(_0x4389a3);},'jtSDz':function(_0x2c9af6,_0x19e0b6){return _0x2c9af6(_0x19e0b6);},'QxqVZ':_0x4736(0x4a),'dzJwI':_0x4736(0x4b),'mHWTw':function(_0x261be2,_0x293da3){return _0x261be2(_0x293da3);},'bMUop':function(_0x3ca833,_0x2adfeb){return _0x3ca833(_0x2adfeb);},'qsVOt':_0x4736(0x4c),'ZApfz':function(_0x2d0d62,_0x384a9d){return _0x2d0d62===_0x384a9d;},'EEjiu':_0x4736(0x4d),'aNilH':function(_0x5847f1,_0x243df9){return _0x5847f1>_0x243df9;},'dKbEi':_0x4736(0x4e),'kPdCl':_0x4736(0x4f),'zAtoe':function(_0x3dc1df,_0x77c0c0){return _0x3dc1df(_0x77c0c0);},'OVxUf':function(_0x377625,_0x3f8d7d){return _0x377625(_0x3f8d7d);},'WLCCV':function(_0x3f864b,_0x1773a7){return _0x3f864b(_0x1773a7);},'WHHKF':_0x4736(0x50),'gEroi':_0x4736(0x51),'ENUzv':function(_0x4b32f5,_0x2934f8){return _0x4b32f5(_0x2934f8);},'RcHPL':_0x4736(0x52),'Iqjvh':function(_0x219348,_0x369ce1){return _0x219348===_0x369ce1;},'mAEHD':_0x4736(0x53),'aDEBY':_0x4736(0x54),'KBOGy':function(_0x457486,_0x4d05a4){return _0x457486(_0x4d05a4);},'YasdO':_0x4736(0x55),'TpGyB':function(_0x349bcc,_0x3f81e0){return _0x349bcc(_0x3f81e0);},'FKvTi':function(_0x416536,_0x276b24){return _0x416536(_0x276b24);},'EueXU':_0x4736(0x56),'tROuA':function(_0x2b2957,_0x34d20c,_0x276463,_0x4ddfbf){return _0x2b2957(_0x34d20c,_0x276463,_0x4ddfbf);},'jbVVc':function(_0x18360e,_0x273dac){return _0x18360e(_0x273dac);},'TtsHv':_0x4736(0x57),'VWZhq':_0x4736(0x58),'WIuQA':function(_0x21e070,_0x227ac8){return _0x21e070(_0x227ac8);},'PMAtS':_0x4736(0x59),'oBSld':_0x4736(0x5a),'Nhlzx':function(_0x493aa7,_0x19c22f){return _0x493aa7===_0x19c22f;},'PBBEu':_0x4736(0x5b),'OmjlW':function(_0x176036,_0x530ce6){return _0x176036===_0x530ce6;},'UjqPZ':function(_0x5d87c1,_0x1f6a1e){return _0x5d87c1===_0x1f6a1e;},'hEugs':function(_0x1aa75a,_0x550130){return _0x1aa75a>_0x550130;},'ZWXMN':_0x4736(0x5c),'XRxNm':function(_0x157b87,_0xc720e1){return _0x157b87===_0xc720e1;},'FIHqI':_0x4736(0x5d),'TMLot':'❌\x20Error\x20verifying\x20email\x20code:','GnjFe':_0x4736(0x5e),'DGlbk':_0x4736(0x5f),'OFkOC':_0x4736(0x60),'OPKZT':function(_0xb7e8d7,_0x2912da){return _0xb7e8d7(_0x2912da);},'GSpkB':function(_0x5f3892,_0x2b313b){return _0x5f3892(_0x2b313b);},'rQOMY':_0x4736(0x61),'yrJRS':_0x4736(0x62),'EWwSf':_0x4736(0x63),'lAbEB':function(_0x28c84b,_0x26aa9c){return _0x28c84b(_0x26aa9c);},'FGKFG':function(_0x2a5639,_0x3554bd){return _0x2a5639===_0x3554bd;},'kgYqU':_0x4736(0x64),'RSvzG':_0x4736(0x65),'IlYOw':function(_0xd62353,_0x27168b){return _0xd62353(_0x27168b);},'xJUms':function(_0x4a0c03,_0x5d6ba9){return _0x4a0c03(_0x5d6ba9);},'JhNWF':function(_0x736493,_0x309124){return _0x736493!==_0x309124;},'wiQXl':_0x4736(0x66),'mYJvM':_0x4736(0x67),'ayiFF':_0x4736(0x68),'UpWQa':function(_0x303e79,_0xdea4e3){return _0x303e79(_0xdea4e3);},'uWCjM':'Almost\x20done','WGgrE':'✅\x20Onboarding\x20complete!\x20Connected\x20platforms:','UysIT':'pYdbe','jBHJF':function(_0x1998da){return _0x1998da();},'nxCPI':_0x4736(0x69),'KBSvZ':function(_0x506484){return _0x506484();},'aiZPj':'🔑\x20[SDK]\x20Auth\x20data\x20retrieved\x20in\x20parallel','JsIjc':_0x4736(0x6a),'ZhGDP':_0x4736(0x6b),'dYiVJ':function(_0x5245ba,_0x3ce0fe){return _0x5245ba&&_0x3ce0fe;},'SEOmt':_0x4736(0x6c),'ZVXfq':_0x4736(0x6d),'ZzxDa':_0x4736(0x6e),'VzJCi':function(_0x5f4f2d,_0x3a3caf){return _0x5f4f2d===_0x3a3caf;},'JBNoi':function(_0x3f8d14,_0x3350b6,_0x116f2b,_0x40e63e){return _0x3f8d14(_0x3350b6,_0x116f2b,_0x40e63e);},'TsiLU':_0x4736(0x6f),'zinyV':function(_0x3b6f96,_0x513198){return _0x3b6f96===_0x513198;},'xUrCe':'DQjvn','pJuLO':_0x4736(0x70),'DLXWM':function(_0x5689ba,_0x2b48e9){return _0x5689ba===_0x2b48e9;},'WxGsw':_0x4736(0x71),'Ryzty':_0x4736(0x72),'SJMgT':function(_0x5a95cc,_0xdc4f92){return _0x5a95cc!==_0xdc4f92;},'ADcmF':_0x4736(0x73),'WtGtD':function(_0x2780c0){return _0x2780c0();},'ytCmE':function(_0x46ac3c){return _0x46ac3c();},'ezcgT':function(_0x484aa6,_0xc105fb,_0x409115,_0x2632bf){return _0x484aa6(_0xc105fb,_0x409115,_0x2632bf);},'Ntuzu':_0x4736(0x74),'AVRGB':function(_0x167a76,_0x2b9036){return _0x167a76===_0x2b9036;},'yuKhQ':function(_0x46d6d9,_0x10d042){return _0x46d6d9===_0x10d042;},'nYUxJ':function(_0x3f259f,_0x184c50,_0x2f9426,_0x468ac3){return _0x3f259f(_0x184c50,_0x2f9426,_0x468ac3);},'sKVhe':_0x4736(0x75),'zRHQN':function(_0x126a30,_0xcfc6c4,_0x3d2d32,_0x2d1ed5){return _0x126a30(_0xcfc6c4,_0x3d2d32,_0x2d1ed5);},'KylmN':_0x4736(0x76),'zjNOk':function(_0x1fac99,_0xcd31dd){return _0x1fac99!==_0xcd31dd;},'zwXOe':_0x4736(0x77),'FDemt':_0x4736(0x78),'UaEKa':function(_0x4cd3e5,_0x231d28){return _0x4cd3e5(_0x231d28);},'seiDb':function(_0xe104b5,_0xc2b23b){return _0xe104b5!==_0xc2b23b;},'rZkNM':_0x4736(0x79),'zMeyI':function(_0x53a076,_0x51346c){return _0x53a076(_0x51346c);},'izjyl':_0x4736(0x7a),'TVGdW':_0x4736(0x7b),'QThEY':_0x4736(0x7c),'tGUIb':'❌\x20[BACKGROUND]\x20Background\x20training\x20failed:','ChZzm':function(_0x52f62d,_0x2656f9){return _0x52f62d(_0x2656f9);},'TyuLO':_0x4736(0x7d),'SApvM':_0x4736(0x7e),'gITQd':function(_0x14818c,_0x234b30,_0x4bef36){return _0x14818c(_0x234b30,_0x4bef36);},'lDVri':function(_0x4ad024,_0x5e1399){return _0x4ad024!==_0x5e1399;},'ADQTp':_0x4736(0x7f),'IZjSK':function(_0x306a57,_0x185b33){return _0x306a57(_0x185b33);},'kFqLu':function(_0x186715,_0x9cdf3c){return _0x186715===_0x9cdf3c;},'wqGWe':_0x4736(0x80),'ZOEeN':_0x4736(0x81),'RJFfV':function(_0x5c741e,_0x4260f2){return _0x5c741e(_0x4260f2);},'wlmkd':_0x4736(0x82),'BSQij':function(_0x1616c3,_0x4facfd){return _0x1616c3(_0x4facfd);},'LEtUh':function(_0x247279,_0x30a977){return _0x247279(_0x30a977);},'uJWXl':_0x4736(0x83),'rTbNk':_0x4736(0x84),'VKhHh':_0x4736(0x85),'nhaMp':'Training\x20model...','IWoCz':_0x4736(0x86),'owFaa':_0x4736(0x87),'Zzjgb':_0x4736(0x88),'yMjSX':_0x4736(0x89),'mqZBD':function(_0xa715f9,_0x20dff5){return _0xa715f9(_0x20dff5);},'NPlJh':function(_0x15c5ad,_0x1a2d29){return _0x15c5ad(_0x1a2d29);},'mjgnh':function(_0x54b416,_0x3c639c){return _0x54b416(_0x3c639c);},'eXdJe':_0x4736(0x8a),'uimtW':_0x4736(0x8b),'qNCGI':_0x4736(0x8c),'huQTz':function(_0x5afa02,_0x3fdcf9){return _0x5afa02||_0x3fdcf9;},'fGdmE':function(_0x482985,_0xfdfa04){return _0x482985(_0xfdfa04);},'QXsQd':_0x4736(0x8d),'srgTt':_0x4736(0x8e),'axvXk':function(_0x261c53,_0x47759a){return _0x261c53(_0x47759a);},'fvDoH':'ooIVe','bBPAa':_0x4736(0x8f),'PimvN':function(_0x41cec5,_0x40930d){return _0x41cec5(_0x40930d);},'NVNvG':function(_0x56c472,_0x4a653b,_0xdf2f29){return _0x56c472(_0x4a653b,_0xdf2f29);},'htYEm':function(_0x4f830d,_0x509033){return _0x4f830d!==_0x509033;},'VNGaV':'brWhO','lzZIb':'QjIId','ZqDFk':function(_0x4c8193,_0x134d03){return _0x4c8193(_0x134d03);},'eTabn':_0x4736(0x90),'eYmUm':_0x4736(0x91),'teEBi':function(_0x5e670c,_0x4138ab){return _0x5e670c(_0x4138ab);},'jIpMe':function(_0x556866,_0x32f6ea){return _0x556866(_0x32f6ea);},'MADAr':'kuAXQ','rSQSU':_0x4736(0x92),'EKXWs':function(_0x25f89f,_0x480bfd){return _0x25f89f&&_0x480bfd;},'KimDp':function(_0x113a6f,_0x263b64){return _0x113a6f(_0x263b64);},'Qamtk':_0x4736(0x93),'LfUXe':function(_0x47afa2,_0x3e6223){return _0x47afa2===_0x3e6223;},'uCWpK':'BEUdu','mNbQI':_0x4736(0x94),'iLTaY':_0x4736(0x95),'rGTNP':function(_0x3df08a,_0x1d36b6){return _0x3df08a(_0x1d36b6);},'XDZKD':'🔄\x20Returning\x20to\x20connect\x20step','vhplc':function(_0x309bcf,_0x1e4b77){return _0x309bcf(_0x1e4b77);},'cPexi':_0x4736(0x96),'KpPTB':function(_0x298466,_0x58ff3d){return _0x298466(_0x58ff3d);},'DoeZQ':function(_0x457986,_0x1b9fd6){return _0x457986!==_0x1b9fd6;},'Wkdep':_0x4736(0x97),'EvkLw':_0x4736(0x98),'FaQRR':_0x4736(0x99),'LmErV':'persona','Srmut':_0x4736(0x9a),'jTSjO':function(_0x30d5e8,_0x2ebc5c){return _0x30d5e8(_0x2ebc5c);},'fsptd':_0x4736(0x9b),'NjHMU':function(_0x57c8cf,_0x1e2bfa){return _0x57c8cf(_0x1e2bfa);},'xcVxK':_0x4736(0x9c),'cMLKa':function(_0x4ce234,_0xeb3c2c){return _0x4ce234(_0xeb3c2c);},'ZoBQY':_0x4736(0x9d),'ttJph':_0x4736(0x9e),'UgpEH':'1|3|5|2|4|0','HWXkd':function(_0x2d8754,_0x2fee09){return _0x2d8754(_0x2fee09);},'tpvgH':'Starting\x20training...','PGMRS':_0x4736(0x9f),'JNzrh':_0x4736(0xa0),'zbmwm':_0x4736(0xa1),'hpbVU':_0x4736(0xa2),'YnDVQ':function(_0x15ada1){return _0x15ada1();},'Uyuks':_0x4736(0xa3),'yNQQU':_0x4736(0xa4),'xpcED':function(_0x240ac5,_0x15c80a){return _0x240ac5===_0x15c80a;},'LoAJK':_0x4736(0xa5),'qYZar':_0x4736(0xa6),'KQGcL':function(_0x1c96ee,_0x489b06){return _0x1c96ee(_0x489b06);},'ZaTYO':function(_0x5ca561,_0x956dc6){return _0x5ca561(_0x956dc6);},'fvIrp':function(_0x1a7b73,_0x136fc7){return _0x1a7b73(_0x136fc7);},'WKqRe':function(_0xd3af3b){return _0xd3af3b();},'MNVQT':_0x4736(0xa7),'KwjJB':_0x4736(0xa8),'iMSpu':_0x4736(0xa9),'ntqAm':function(_0x47bf95,_0x467e4){return _0x47bf95(_0x467e4);},'fDWRK':_0x4736(0xaa),'vCrYo':function(_0x4c2df5,_0x4f6e54){return _0x4c2df5(_0x4f6e54);},'LKnTr':'Training\x20failed\x20to\x20start','INMsX':function(_0x21de1c,_0x4d58bb){return _0x21de1c(_0x4d58bb);},'jrBIL':_0x4736(0xab),'YqHoy':function(_0x436ab6,_0x3b9056){return _0x436ab6(_0x3b9056);},'ucygZ':_0x4736(0xac),'YbhVr':_0x4736(0xad),'cFrvG':function(_0x1d1121,_0x454ed3){return _0x1d1121===_0x454ed3;},'cZIoS':function(_0xf2c6ab,_0x95b78c){return _0xf2c6ab===_0x95b78c;},'RjUFB':_0x4736(0xae),'QweKZ':function(_0x5b1401,_0xbe7cf5){return _0x5b1401!==_0xbe7cf5;},'lvtbO':_0x4736(0xaf),'YRqRy':_0x4736(0xb0),'ZtFLw':function(_0x3fda65,_0x26e988){return _0x3fda65===_0x26e988;},'cYbph':function(_0x346ef5,_0xfe82e7){return _0x346ef5===_0xfe82e7;},'qoCUL':_0x4736(0xb1),'jMWNH':_0x4736(0xb2),'OerWo':'hErzQ','OoUxY':_0x4736(0xb3),'LxPSK':function(_0x4d4fcf,_0x4897cd){return _0x4d4fcf===_0x4897cd;},'eOzJS':function(_0x450e09,_0x22b96a){return _0x450e09===_0x22b96a;},'OYtZV':_0x4736(0xb4),'AyLIA':function(_0x384082,_0x242f53){return _0x384082===_0x242f53;},'CgeWv':'TPHRQ','KaQqP':_0x4736(0xb5),'FGCgK':_0x4736(0xb6),'PpYvy':'Connection\x20error.\x20Please\x20try\x20again.','QtZDE':_0x4736(0xb7),'MqyOz':'🧠\x20Inference\x20Complete:','qOFOH':function(_0x1d7e11,_0x1dd668){return _0x1d7e11(_0x1dd668);},'arsuW':_0x4736(0xb8),'Ukdsv':_0x4736(0xb9),'hjVUS':'OiQFF','BeaNV':_0x4736(0xba),'FeuRU':_0x4736(0xbb),'FEeDc':_0x4736(0xbc),'BufrG':_0x4736(0xbd),'QqRcp':function(_0x404c07,_0x134207){return _0x404c07(_0x134207);},'pKRmI':function(_0x29d73d,_0x4775e4){return _0x29d73d(_0x4775e4);},'vNYjk':_0x4736(0xbe),'pDhhh':_0x4736(0xbf),'YWNmT':function(_0x567fa7,_0x342dc8){return _0x567fa7===_0x342dc8;},'yeMXk':_0x4736(0xc0),'yKCdE':_0x4736(0xc1),'BlNpF':function(_0x579570,_0xa19483){return _0x579570(_0xa19483);},'MTIIe':_0x4736(0xc2),'xxodE':function(_0x7ab60,_0x52e09a){return _0x7ab60===_0x52e09a;},'UjDyU':_0x4736(0xc3),'CCCUU':function(_0x50e291,_0x55a326){return _0x50e291(_0x55a326);},'kfVAb':function(_0x15a77e,_0x72627a){return _0x15a77e(_0x72627a);},'hLHql':function(_0x219f94,_0x5cb849){return _0x219f94(_0x5cb849);},'fpbAZ':_0x4736(0xc4),'epllf':function(_0x28bf33,_0x1758ce){return _0x28bf33(_0x1758ce);},'jUplA':function(_0x3c6ee3,_0x4de208){return _0x3c6ee3===_0x4de208;},'pTrAh':_0x4736(0xc5),'wbJvS':function(_0x108c81,_0x364979){return _0x108c81===_0x364979;},'iGxVN':_0x4736(0xc6),'bbXXx':_0x4736(0xc7),'vGRYQ':function(_0x3ec7d2,_0x9e1fc2){return _0x3ec7d2(_0x9e1fc2);},'DJZVt':_0x4736(0xc8),'mBPNx':_0x4736(0xc9),'uYOAA':function(_0x52a91b,_0x49d22a){return _0x52a91b(_0x49d22a);},'pfFaX':function(_0x58b0a6,_0x2b20b4){return _0x58b0a6===_0x2b20b4;},'aTsNW':_0x4736(0xca),'DblLF':'Creating\x20your\x20persona\x20with\x20available\x20data','WZCcD':function(_0x25c6c3,_0x2d210d){return _0x25c6c3(_0x2d210d);},'dyKiV':_0x4736(0xcb),'HCMHe':function(_0xb49b8e,_0x531dd7){return _0xb49b8e(_0x531dd7);},'EFQsO':_0x4736(0xcc),'DYnWr':'❌\x20Training\x20update\x20error:','cyBbl':function(_0x146b91,_0x206d50){return _0x146b91(_0x206d50);},'iBVwM':function(_0x55299c,_0x1f0d96){return _0x55299c===_0x1f0d96;},'VjnBb':'FBkfK','XUUaU':function(_0x486811,_0x548c33){return _0x486811(_0x548c33);},'xsqJx':_0x4736(0xcd),'ieLzf':function(_0x3ec19a,_0x1c80e5){return _0x3ec19a(_0x1c80e5);},'CkQdY':function(_0x53aa69,_0x5e83bd){return _0x53aa69(_0x5e83bd);},'FjZba':_0x4736(0xce),'ofYcG':'🔍\x20Socket\x20state\x20after\x205\x20seconds:','ZgEzR':function(_0x10cea8,_0x4eed3b){return _0x10cea8===_0x4eed3b;},'LBDAh':function(_0x4065a4,_0x22583f){return _0x4065a4===_0x22583f;},'nocUo':function(_0x19aed3,_0x20d071){return _0x19aed3===_0x20d071;},'JcoNs':function(_0x11f832,_0x30abf7){return _0x11f832===_0x30abf7;},'AdujL':function(_0xfb4529,_0x14877c){return _0xfb4529===_0x14877c;},'lhrBf':_0x4736(0xcf),'CZnKQ':_0x4736(0xd0),'zUevN':_0x4736(0xd1),'XSalf':'❌\x20Background\x20training\x20start\x20error:','lKBmV':function(_0x3005b4,_0xe816ac){return _0x3005b4 instanceof _0xe816ac;},'tVJQs':function(_0x136b6a,_0x576970){return _0x136b6a(_0x576970);},'MvCZZ':function(_0x35f73e,_0x423469){return _0x35f73e===_0x423469;},'wEhTC':function(_0x4b24f2,_0x3e4eca){return _0x4b24f2*_0x3e4eca;},'XXFrC':_0x4736(0xd2),'GuLFH':_0x4736(0xd3),'oMgwk':function(_0x255bd9,_0x5f0249){return _0x255bd9===_0x5f0249;},'uuCDh':function(_0x2504cc,_0x2739fa){return _0x2504cc===_0x2739fa;},'bfemK':function(_0x132e41,_0x52f62e){return _0x132e41(_0x52f62e);},'IusaH':'Starting\x20training','ymuzE':function(_0x341af8,_0x307ead){return _0x341af8===_0x307ead;},'cowSc':'UflVO','Viurn':function(_0x5f0eef){return _0x5f0eef();},'HwhlV':_0x4736(0xd4),'yHhqd':'🔄\x20Socket\x20reconnected\x20after','BrjBZ':_0x4736(0xd5),'WSbYp':_0x4736(0xd6),'xuzgx':_0x4736(0xd7),'wfzFz':'Network\x20error.\x20Please\x20try\x20again.','CKOLs':_0x4736(0xd8),'hWHHx':'❌\x20Socket\x20reconnection\x20failed\x20after\x20all\x20attempts','QZLMM':'🔌\x20Cleaning\x20up\x20socket\x20connection...','pEeNJ':'aXNnX','QfKLv':'✅\x20YouTube\x20tokens\x20refreshed,\x20but\x20training\x20restart\x20disabled','btzkh':_0x4736(0xd9),'qZfLy':'MAgGb','oIubg':_0x4736(0xda),'pHFjE':'YouTube\x20reconnected\x20-\x20please\x20restart\x20from\x20connector\x20screen','rKPvU':function(_0x2e688c,_0x6445b5){return _0x2e688c(_0x6445b5);},'jWKcX':function(_0x8d33a9,_0x1c2e8c){return _0x8d33a9(_0x1c2e8c);},'LugsL':_0x4736(0xdb),'akwmW':function(_0x268fc1,_0xc05a03){return _0x268fc1(_0xc05a03);},'gnYRn':function(_0x2b7552,_0x568838){return _0x2b7552(_0x568838);},'oWkWs':function(_0x4d41f0,_0x578234){return _0x4d41f0(_0x578234);},'yYWAA':'🔍\x20Socket\x20state\x20after\x201\x20second:','vMQbA':function(_0x4d7109,_0x360a09){return _0x4d7109===_0x360a09;},'QeWtr':function(_0x445441,_0x162dfe){return _0x445441===_0x162dfe;},'aIvqf':_0x4736(0xdc),'joQtl':function(_0xa05ce9,_0x3cfb1b){return _0xa05ce9(_0x3cfb1b);},'sitCx':function(_0x1bf7f3){return _0x1bf7f3();},'HFKBm':function(_0x3aaac7,_0x21a9e7){return _0x3aaac7!==_0x21a9e7;},'vczYE':'PAVyR','bCexb':'Failed\x20to\x20create\x20or\x20retrieve\x20authentication\x20token','GsSRu':'✅\x20Authentication\x20token\x20set\x20in\x20state:','YUtwu':_0x4736(0xdd),'hNKJl':_0x4736(0xde),'vztGC':_0x4736(0xdf),'HXoqG':_0x4736(0xe0),'wmFeE':function(_0x2a996b,_0x1734ab){return _0x2a996b===_0x1734ab;},'zqKaQ':function(_0x169968,_0x4dc615){return _0x169968===_0x4dc615;},'heWyN':function(_0x34f16c,_0x1c12ea){return _0x34f16c(_0x1c12ea);},'ucnSu':_0x4736(0xe1),'bDnUE':function(_0x507362,_0xd3213c){return _0x507362||_0xd3213c;},'NwUZJ':function(_0x4e4e3f,_0x37cbc0){return _0x4e4e3f===_0x37cbc0;},'ulmpn':function(_0xf90a29,_0xd07025){return _0xf90a29===_0xd07025;},'EBkph':function(_0x406509,_0x186a13){return _0x406509===_0x186a13;},'ccLip':_0x4736(0xe2),'aUzxp':_0x4736(0xe3),'EQcwK':_0x4736(0xe4),'aAqOd':_0x4736(0xe5),'wSgKJ':_0x4736(0xe6),'YUpAv':_0x4736(0xe7),'dyAeg':function(_0x461481,_0xd2ce58){return _0x461481(_0xd2ce58);},'lXizy':'Connecting','gGNmH':'polling','GpecD':_0x4736(0xe8),'BUfuT':_0x4736(0xe9),'TgvTm':_0x4736(0xea),'pLObk':_0x4736(0xeb),'BdiSE':_0x4736(0xec),'OMyeh':_0x4736(0xed),'ygGqi':_0x4736(0xee),'fSaYz':_0x4736(0xef),'nlWUk':_0x4736(0xf0),'GfbRv':function(_0x56c8f8,_0x68e83a,_0x143a88){return _0x56c8f8(_0x68e83a,_0x143a88);},'FBBiW':function(_0x3718af,_0x1dddfe,_0x260e83){return _0x3718af(_0x1dddfe,_0x260e83);},'sMfdc':function(_0x246ee1,_0x2c9dcb){return _0x246ee1(_0x2c9dcb);},'gaoFW':_0x4736(0xf1),'VNVLy':'❌\x20Socket\x20error\x20details:','QnRYh':'❌\x20No\x20real\x20authentication\x20token\x20found\x20after\x20training\x20completion','NBVyA':_0x4736(0xf2),'HWDkm':function(_0x2cef52,_0x5c8486){return _0x2cef52===_0x5c8486;},'ktowc':_0x4736(0xf3),'bBIny':'🔍\x20UniversalOnboarding:\x20current\x20step\x20is:','DpIWL':'🔍\x20UniversalOnboarding:\x20primaryAuthOnly\x20is:','LUfIr':_0x4736(0xf4),'UunCD':function(_0x2e8c7b,_0x4a5cf2){return _0x2e8c7b<_0x4a5cf2;},'kttNN':_0x4736(0xf5),'oxxMW':function(_0x3fbf37,_0x31dd33){return _0x3fbf37<_0x31dd33;},'zykeq':function(_0x29a163,_0x4fa3ae){return _0x29a163===_0x4fa3ae;},'FhHAS':'doBJa','TJDqr':_0x4736(0xf6),'JyLOZ':function(_0x498791,_0x59a686){return _0x498791!==_0x59a686;},'FKYMC':_0x4736(0xf7),'VEjpR':_0x4736(0xf8),'hckmP':function(_0x1cfff5,_0x8c4376){return _0x1cfff5===_0x8c4376;},'OnIvO':_0x4736(0xf9),'zcfBD':_0x4736(0xfa),'VxtqL':_0x4736(0xfb),'DILyN':_0x4736(0xfc),'yAGJq':function(_0x9bdcf2,_0x6b4452){return _0x9bdcf2+_0x6b4452;},'RHban':function(_0x1aae0c,_0x31bf64){return _0x1aae0c(_0x31bf64);},'lPGJv':function(_0x5cc4c2,_0x4c354f){return _0x5cc4c2(_0x4c354f);},'nkjhb':'Complete!','UlNLx':function(_0x4c8236,_0x5e8b42){return _0x4c8236(_0x5e8b42);},'zORWX':function(_0x183cfd,_0x1c2855){return _0x183cfd(_0x1c2855);},'tlZOl':function(_0x576f6d,_0x20874f){return _0x576f6d(_0x20874f);},'aKakq':function(_0x3b5adb){return _0x3b5adb();},'IDssR':function(_0x336c9d,_0x54989a){return _0x336c9d(_0x54989a);},'YwLLb':function(_0x327dfd,_0x151008){return _0x327dfd instanceof _0x151008;},'uiqeW':_0x4736(0xfd),'zsIhf':function(_0x572d81,_0x709c02){return _0x572d81(_0x709c02);},'eyXUK':'tGvpl','qpzJo':_0x4736(0xfe),'ULzlX':'MEnvp','JFZdD':function(_0x3ae64f){return _0x3ae64f();},'CNlkg':_0x4736(0xff),'fyCiJ':_0x4736(0x100),'cyZFr':function(_0x3e3c67){return _0x3e3c67();},'lQzwj':function(_0x563703,_0x150db6){return _0x563703===_0x150db6;},'CPmmn':_0x4736(0x101),'moJjv':_0x4736(0x102),'sUccT':function(_0x1adbef,_0x3ec012){return _0x1adbef===_0x3ec012;},'tmPBR':function(_0xf4df18,_0x5b4588){return _0xf4df18!==_0x5b4588;},'NGDQY':_0x4736(0x103),'mAzpJ':function(_0xd71b25,_0x2cf5df){return _0xd71b25===_0x2cf5df;},'eopcr':function(_0x4c0db8,_0x4f5526){return _0x4c0db8===_0x4f5526;},'phnGZ':function(_0x2f1200,_0x3d07cc,_0x49cce9,_0x510dd4){return _0x2f1200(_0x3d07cc,_0x49cce9,_0x510dd4);},'hCdES':function(_0x4dff78,_0x2d9fed){return _0x4dff78===_0x2d9fed;},'fcQLj':_0x4736(0x104),'KOVIg':function(_0x2b2c09,_0x3f28ab){return _0x2b2c09===_0x3f28ab;},'NBwtg':function(_0x388fbf,_0x171476){return _0x388fbf===_0x171476;},'VslOa':function(_0x4d2847){return _0x4d2847();},'JHfYL':function(_0x3b37ef,_0x473f72){return _0x3b37ef!==_0x473f72;},'zjexk':'uutJD','NVuWn':function(_0x254f62){return _0x254f62();},'ETuob':_0x4736(0x105),'zpiej':_0x4736(0x106),'wyZes':function(_0x48a52b,_0x35d0e2){return _0x48a52b(_0x35d0e2);},'KxdqU':function(_0x16ece2,_0x157213){return _0x16ece2(_0x157213);},'ipkwS':_0x4736(0x107),'iPHvi':function(_0x587cc6,_0x2052f2){return _0x587cc6!==_0x2052f2;},'EqhkG':_0x4736(0x108),'nKpvj':function(_0x390641,_0x1f04ed){return _0x390641(_0x1f04ed);},'XIdtB':function(_0x35dc61,_0x17c9bc){return _0x35dc61(_0x17c9bc);},'bKtBz':function(_0xf75797){return _0xf75797();},'bBWcF':_0x4736(0x109),'zcLCg':function(_0x2775bb,_0x199ff7){return _0x2775bb!==_0x199ff7;},'ykoKH':_0x4736(0x10a),'NScOh':_0x4736(0x10b),'rnwiB':function(_0xe15d3,_0x1e18f0){return _0xe15d3||_0x1e18f0;},'nWjdl':_0x4736(0x10c),'EFDLE':_0x4736(0x10d),'hMuYq':'🚀\x20[BACKGROUND]\x20Starting\x20background\x20training\x20optimization...','fxXQm':_0x4736(0x10e),'raBKQ':_0x4736(0x10f),'XIsHs':function(_0x19371c,_0x288edf){return _0x19371c(_0x288edf);},'woHfO':function(_0x2dc9fd,_0x221173){return _0x2dc9fd===_0x221173;},'MITkl':function(_0x477624,_0x51b82f){return _0x477624===_0x51b82f;},'xfeaJ':function(_0x16a89c,_0x25c289){return _0x16a89c===_0x25c289;},'rGTWW':function(_0xf53ea1,_0x1254a4){return _0xf53ea1===_0x1254a4;},'eziVI':function(_0x21bf22,_0x599f1a){return _0x21bf22===_0x599f1a;},'yQmam':function(_0x5983c5,_0x3fa587){return _0x5983c5(_0x3fa587);},'CzObZ':_0x4736(0x110),'fZOtd':'🔌\x20[BACKGROUND]\x20Setting\x20up\x20socket\x20for\x20background\x20training...','QYMoT':_0x4736(0x111),'ybNtJ':function(_0x3984bf,_0x4e4850,_0x231f80){return _0x3984bf(_0x4e4850,_0x231f80);},'XnoCn':_0x4736(0x112),'xKciQ':'disconnect','rkGIX':function(_0x5c4a55,_0x1f6db8){return _0x5c4a55(_0x1f6db8);},'oWUpV':_0x4736(0x113),'aYKMf':'ZjdAH','oLBin':_0x4736(0x114),'CPvUF':function(_0x8cb36f,_0x128556){return _0x8cb36f===_0x128556;},'wklem':_0x4736(0x115),'ojTPX':function(_0x3e884e,_0x22e916){return _0x3e884e(_0x22e916);},'nzHIP':'📡\x20Background\x20training\x20API\x20response:','ZQlpJ':function(_0x1ce6a9,_0x6cf83e){return _0x1ce6a9===_0x6cf83e;},'jbTEz':'imVfX','nootz':'xJdqa','yUpBv':_0x4736(0x116),'oBVNf':function(_0x558bfa,_0x219c9d){return _0x558bfa(_0x219c9d);},'KcZYx':'🚀\x20Background\x20training\x20started:','imlzn':_0x4736(0x117),'SsyAt':_0x4736(0x118),'WBoKt':function(_0xda2902,_0x1a328c){return _0xda2902(_0x1a328c);},'enxXl':_0x4736(0x119),'pyoGM':function(_0x494144,_0x5a9d57){return _0x494144(_0x5a9d57);},'QJZpR':'❌\x20Background\x20training\x20start\x20failed:','keZMs':_0x4736(0x11a),'qPAzn':function(_0x253e3b,_0xf3c246){return _0x253e3b instanceof _0xf3c246;},'dirDM':function(_0x1afcf3,_0x40a5d8){return _0x1afcf3(_0x40a5d8);},'lQUkb':function(_0x3e4541,_0x446491){return _0x3e4541(_0x446491);},'sWMtY':function(_0x181683,_0x41b018){return _0x181683%_0x41b018;},'lPIDk':function(_0x348e6e,_0x149360){return _0x348e6e+_0x149360;},'vvVpf':function(_0x2480e7,_0x78cca2){return _0x2480e7!==_0x78cca2;},'zeTvr':_0x4736(0x11b),'TpvUk':_0x4736(0x11c),'qESRt':function(_0xc5087c,_0xaef42e){return _0xc5087c!==_0xaef42e;},'GbyqM':_0x4736(0x11d),'NKWsK':function(_0x2efdae,_0x28708a){return _0x2efdae===_0x28708a;},'qUvvu':_0x4736(0x11e),'xXyaT':function(_0x5a010f,_0x1ceae8){return _0x5a010f===_0x1ceae8;},'hNPsq':_0x4736(0x11f),'JINLL':'❌\x20Returning\x20user\x20declined\x20consent','xwQlg':function(_0x5b77c2){return _0x5b77c2();},'tmRBy':function(_0x1c3b78,_0x1f6252){return _0x1c3b78!==_0x1f6252;},'szpwa':_0x4736(0x120),'FbmEX':'Medium','ZRqWA':function(_0x54e460,_0x1ce52f){return _0x54e460(_0x1ce52f);},'pEBFj':function(_0x3b95b2,_0x2f853f){return _0x3b95b2(_0x2f853f);},'MOuXK':function(_0x145f54,_0x59f07f){return _0x145f54(_0x59f07f);},'lIJYa':function(_0x402e2c,_0x900d5f){return _0x402e2c(_0x900d5f);},'xMovn':function(_0x1dad6c,_0x947d9e){return _0x1dad6c(_0x947d9e);},'SNPir':function(_0x2f4f13,_0x33f72,_0x265206){return _0x2f4f13(_0x33f72,_0x265206);},'JyXGj':function(_0x52a605,_0x38ad87){return _0x52a605(_0x38ad87);},'YAgvn':function(_0x45a2c9,_0x3fd02d){return _0x45a2c9(_0x3fd02d);},'ijZCb':'Initializing...','RPlAt':function(_0x1a848f,_0x270b77){return _0x1a848f(_0x270b77);},'bgujA':function(_0x2a5408,_0x3579ec){return _0x2a5408(_0x3579ec);},'suofq':function(_0xbdb305,_0x16f5bf){return _0xbdb305(_0x16f5bf);},'BZmfz':function(_0xebf150,_0x3a8bbb){return _0xebf150(_0x3a8bbb);},'ntPoa':function(_0x2d3e22,_0x4dd39e){return _0x2d3e22(_0x4dd39e);},'MsjGA':function(_0x125b43,_0x544328){return _0x125b43(_0x544328);},'jFQiX':'pinterest','lgIwa':_0x4736(0x121),'XsZSe':'youtube','jptBm':'YouTube','LJqNg':'#FFFFFF','rbttO':_0x4736(0x122),'LQXjt':'#0077B5','vKaIe':'reddit','CfQDM':_0x4736(0x123),'MPgEs':_0x4736(0x124),'JtMmk':_0x4736(0x125),'ZAjIX':_0x4736(0x126),'wpGJr':function(_0x3d366b,_0x5eb695,_0x2def17){return _0x3d366b(_0x5eb695,_0x2def17);},'GHZdJ':function(_0x4a884e,_0x58881f,_0x5b0380){return _0x4a884e(_0x58881f,_0x5b0380);},'KmoOm':_0x4736(0x127),'IVBHV':_0x4736(0x128),'VKuCA':_0x4736(0x129),'WbjeW':_0x4736(0x12a),'OqaMz':'Get\x20Started','iDpfo':'welcome-get-started-button','vLCRk':function(_0x4790a8,_0x487184){return _0x4790a8===_0x487184;},'lIBRP':function(_0x5a32a4,_0x5c24db){return _0x5a32a4===_0x5c24db;}},[_0x4d4279,_0x5a1a64]=_0x54244c['WBoKt'](useState,primaryAuthOnly?_0x54244c['WaleP']:_0x54244c['oCWkg']),[_0x4a3858,_0x15954f]=_0x54244c[_0x4736(0x12b)](useState,{}),[_0x56f9f8,_0xabd65b]=useState(''),[_0x51ca98,_0x5cfe60]=_0x54244c[_0x4736(0x12c)](useState,_0x54244c[_0x4736(0x12d)]),[_0x2bca7b]=_0x54244c['hyllA'](useState,new Animated['Value'](height)),[_0x35ab8c]=_0x54244c[_0x4736(0x12e)](useState,new Animated[(_0x4736(0x12f))](0x0)),[_0x116319,_0x318cf9]=_0x54244c[_0x4736(0x130)](useState,{}),[_0x5ab3e7,_0x5e5177]=_0x54244c['qOFOH'](useState,''),[_0xd2b40c,_0x2d3de1]=_0x54244c['pEBFj'](useState,''),[_0x33b4a5,_0x2cc310]=useState(''),[_0x5004a7,_0x14e273]=_0x54244c[_0x4736(0x131)](useState,''),[_0x4c462d,_0xec8f81]=_0x54244c[_0x4736(0x132)](useState,![]),[_0x1e4c42,_0x1afa7a]=_0x54244c[_0x4736(0x133)](useState,''),[_0x37a6db,_0x5ae708]=_0x54244c[_0x4736(0x134)](useState,![]),[_0x4722e0,_0x280660]=_0x54244c[_0x4736(0x135)](useState,[]),[_0x28ec4e,_0x5c2d9e]=_0x54244c['aOYZg'](useState,null),[_0xb2ccc4,_0x499d56]=useState(![]),[_0x39e88d,_0xaf0419]=useState(![]),[_0x4090f3,_0x18823e]=useState(![]),[_0x51213f,_0x1e9e33]=_0x54244c[_0x4736(0x136)](useState,0x0),[_0x520e92,_0x1c22ac]=_0x54244c['aheAJ'](useState,0x8),[_0x23ac9a,_0x2fb104]=useState(0x6);_0x54244c[_0x4736(0x137)](useEffect,()=>{console['log'](_0x54244c[_0x4736(0x138)],_0x2e847a),console[_0x4736(0x139)]('🔍\x20UniversalOnboarding:\x20modalVisible\x20state\x20is:',_0xb2ccc4),console[_0x4736(0x139)](_0x4736(0x13a),_0x4d4279),console['log'](_0x4736(0x13b),primaryAuthOnly);},[_0x2e847a,_0xb2ccc4,_0x4d4279,primaryAuthOnly]),useEffect(()=>{_0x54244c['tfJuw']!==_0x4736(0x2)?_0x479020[_0x4736(0x13c)]&&(_0x37a6a1(_0x20a83b[_0x4736(0x13d)]||_0x54244c[_0x4736(0x13e)]),_0x3fd71e[_0x4736(0x139)](_0x54244c[_0x4736(0x13f)],_0x5d4594['progress'],'%')):primaryAuthOnly&&_0x2e847a&&(_0x54244c[_0x4736(0x140)](_0x4d4279,_0x54244c['OulPA'])||_0x4d4279===_0x54244c[_0x4736(0x141)])&&(console[_0x4736(0x139)](_0x54244c[_0x4736(0x142)]),console['log'](_0x54244c[_0x4736(0x143)],_0x4d4279,_0x4736(0x144)),_0x54244c[_0x4736(0x145)](_0x5a1a64,_0x4736(0x2d)));},[primaryAuthOnly,_0x2e847a]);const _0x4f00f9=_0x54244c['JyXGj'](useRef,![]),[_0x50bcc0,_0xbcd0e0]=_0x54244c[_0x4736(0x12c)](useState,0x5),[_0x3d4963,_0x26d625]=_0x54244c['YAgvn'](useState,![]),[_0x5a08fb]=useState(new Animated[(_0x4736(0x12f))](0x0)),_0x201aa3=_0x54244c[_0x4736(0x146)](useRef,null),_0x3a415c=null,[_0xcdf6d4,_0x18cd6b]=useState(''),[_0x440119,_0x403d6a]=useState(0x0),[_0x55cbe8,_0x515483]=useState(_0x54244c['ijZCb']),[_0x5c326b,_0x3a2dd1]=useState(![]),[_0x4c10e9,_0x15de8b]=_0x54244c[_0x4736(0x147)](useState,![]),[_0x428ec4,_0x4fbcfa]=_0x54244c[_0x4736(0x148)](useState,![]),[_0xf3e21b,_0xe3f9dd]=_0x54244c['suofq'](useState,null),[_0x1770d6,_0x1038e1]=_0x54244c[_0x4736(0x149)](useState,null),[_0x259429,_0x5422a0]=_0x54244c[_0x4736(0x14a)](useState,null),[_0x433d63,_0x33bc65]=_0x54244c['BZmfz'](useState,null),[_0x265f4b,_0x3814d3]=_0x54244c[_0x4736(0x14b)](useState,''),_0x1955c8=_0x54244c[_0x4736(0x14c)](useRef,null),_0x2a3524=useRef(null),[_0x16ce24,_0x5674fc]=_0x54244c[_0x4736(0x14d)](useState,![]),[_0xa2d784,_0x370bec]=useState(null),[_0x3632ad,_0x7f1044]=_0x54244c[_0x4736(0x14e)](useState,null),[_0x2267fd,_0x13cb98]=useState(null),[_0x225407,_0x587bd5]=useState(null),[_0x2dec86,_0x29622f]=_0x54244c[_0x4736(0x14f)](useState,![]),[_0x55d03e,_0x1eb0ce]=_0x54244c[_0x4736(0x150)](useState,![]),[_0x17a218,_0x2895a2]=_0x54244c['HCMHe'](useState,''),[_0x2d0a47,_0x581302]=_0x54244c[_0x4736(0x14c)](useState,null),_0x4f5d8a=async _0x1a568a=>{const _0x31d84a={'vLMza':_0x54244c[_0x4736(0x151)],'Oabhy':_0x54244c[_0x4736(0x152)],'auPhv':_0x54244c['dnfRU'],'bkvqq':_0x4736(0x84),'acwtr':_0x54244c[_0x4736(0x153)],'RBpqY':_0x4736(0xa9),'kDpwM':_0x54244c['dzLDx']};if(_0x54244c['nIJfw'](_0x4736(0x154),_0x54244c[_0x4736(0x155)]))try{if(_0x54244c['WsdBw'](_0x4736(0x156),_0x54244c[_0x4736(0x157)]))_0x65bec3&&(_0x54244c[_0x4736(0x158)](_0x1da37f,_0x194f05['BUTTON_PRESS']),_0x8738b[_0x4736(0x139)](_0x54244c[_0x4736(0x159)]),_0x54244c[_0x4736(0x15a)](_0x408b97)['catch'](_0x5eac79=>{_0x4b85d6[_0x4736(0x15b)](_0x31d84a[_0x4736(0x15c)],_0x5eac79);}),_0x54244c[_0x4736(0x15d)](_0x4d22ec,_0x54244c[_0x4736(0x15e)]));else{const _0x53f066=await AsyncStorage[_0x4736(0x15f)](_0x54244c[_0x4736(0x160)]);let _0x4a6a69=_0x53f066?JSON['parse'](_0x53f066):[];!_0x4a6a69[_0x4736(0x161)](_0x1a568a)&&(_0x4a6a69[_0x4736(0x162)](_0x1a568a),await AsyncStorage['setItem'](_0x54244c[_0x4736(0x160)],JSON[_0x4736(0x163)](_0x4a6a69)),console[_0x4736(0x139)](_0x54244c['PcgSe'],_0x1a568a,_0x54244c['sZBzS'],_0x4a6a69));}}catch(_0x464a16){console[_0x4736(0x15b)](_0x54244c[_0x4736(0x164)],_0x464a16);}else{const _0x16c83b='0|1|4|3|2|5|6'[_0x4736(0x165)]('|');let _0x25dec1=0x0;while(!![]){switch(_0x16c83b[_0x25dec1++]){case'0':_0x4a6192['log'](_0x31d84a[_0x4736(0x166)],_0x5eefb2['features'][_0x4736(0x167)]);continue;case'1':_0x48363c['log'](_0x31d84a[_0x4736(0x168)],_0xe6c052[_0x4736(0x169)][_0x4736(0x16a)]);continue;case'2':_0x1ccdef[_0x4736(0x139)](_0x31d84a['bkvqq'],_0x1723bb[_0x4736(0x169)][_0x4736(0x16b)]);continue;case'3':_0x3b691e[_0x4736(0x139)](_0x31d84a[_0x4736(0x16c)],_0x170665[_0x4736(0x169)][_0x4736(0x16d)]);continue;case'4':_0x394930[_0x4736(0x139)](_0x31d84a[_0x4736(0x16e)],_0x11071f[_0x4736(0x169)][_0x4736(0x16f)]);continue;case'5':_0x12a618[_0x4736(0x139)](_0x31d84a[_0x4736(0x170)],_0x14f193[_0x4736(0x169)]['databases']);continue;case'6':_0x40325d[_0x4736(0x139)](_0x4736(0x85),_0x5eea57[_0x4736(0x169)]['queryScores']);continue;}break;}}},_0x4a8c1b=async _0x3642ed=>{const _0x3f306d={'PxLIK':function(_0x347516,_0x17a029){return _0x54244c['ZsGsr'](_0x347516,_0x17a029);},'LljRT':function(_0x4f80ad,_0x506b9f){return _0x54244c[_0x4736(0x171)](_0x4f80ad,_0x506b9f);},'HEbCI':function(_0x1bee69,_0x1841cb){return _0x1bee69===_0x1841cb;},'rLdBc':function(_0x593d10,_0x16fefc){return _0x54244c[_0x4736(0x140)](_0x593d10,_0x16fefc);},'shqdn':function(_0x44407c,_0x7aa557){return _0x54244c[_0x4736(0x172)](_0x44407c,_0x7aa557);},'cCFxO':function(_0x2947a5,_0xb478bd){return _0x54244c[_0x4736(0x173)](_0x2947a5,_0xb478bd);},'iAYWQ':_0x4736(0x174),'oDRbD':function(_0xbad750,_0x2ff47e){return _0x54244c[_0x4736(0x175)](_0xbad750,_0x2ff47e);},'jXrbR':_0x54244c[_0x4736(0x176)],'nhZAj':_0x54244c[_0x4736(0x177)],'ZTYbu':_0x54244c[_0x4736(0x178)],'fxrlF':_0x54244c['zMWgB'],'BQuDn':function(_0x514e7c,_0x5d9607){return _0x54244c[_0x4736(0x175)](_0x514e7c,_0x5d9607);},'pVDDs':_0x54244c[_0x4736(0x179)],'NvrGQ':_0x54244c[_0x4736(0x17a)],'iJmDo':'Connection\x20error.\x20Please\x20try\x20again.','aebpe':function(_0x52b9cf){return _0x54244c['wJMWp'](_0x52b9cf);}};try{if(_0x54244c[_0x4736(0x17b)](_0x54244c['dzJFw'],_0x54244c[_0x4736(0x17c)])){const _0x517833=await AsyncStorage[_0x4736(0x15f)](_0x54244c[_0x4736(0x160)]);let _0x48cb10=_0x517833?JSON[_0x4736(0x17d)](_0x517833):[];_0x48cb10=_0x48cb10[_0x4736(0x17e)](_0x2a0459=>_0x2a0459!==_0x3642ed),await AsyncStorage['setItem'](_0x54244c[_0x4736(0x160)],JSON[_0x4736(0x163)](_0x48cb10)),console['log'](_0x4736(0x17f),_0x3642ed,_0x4736(0x180),_0x48cb10);}else{var _0x29bc63,_0x406209,_0x3a1fb6,_0x4f30e4;_0x5d7f98['log'](_0x4736(0xd2)),_0x4fb690[_0x4736(0x139)](_0x4736(0xd3),{'id':_0x3f306d[_0x4736(0x181)](_0x29bc63=_0x1ed074[_0x4736(0x182)],null)||_0x3f306d[_0x4736(0x183)](_0x29bc63,void 0x0)?void 0x0:_0x29bc63['id'],'connected':_0x3f306d[_0x4736(0x184)](_0x406209=_0x1bf594[_0x4736(0x182)],null)||_0x406209===void 0x0?void 0x0:_0x406209[_0x4736(0x113)],'transport':(_0x3a1fb6=_0x51b926[_0x4736(0x182)])===null||_0x3f306d['PxLIK'](_0x3a1fb6,void 0x0)||_0x3f306d[_0x4736(0x183)](_0x3a1fb6=_0x3a1fb6['io'],null)||_0x3a1fb6===void 0x0||_0x3f306d[_0x4736(0x185)](_0x3a1fb6=_0x3a1fb6[_0x4736(0x186)],null)||_0x3a1fb6===void 0x0||_0x3f306d[_0x4736(0x181)](_0x3a1fb6=_0x3a1fb6[_0x4736(0x187)],null)||_0x3f306d[_0x4736(0x188)](_0x3a1fb6,void 0x0)?void 0x0:_0x3a1fb6[_0x4736(0x189)]}),_0x3f306d[_0x4736(0x18a)](_0x5a5ad3,!![]),_0x3f306d['cCFxO'](_0x2c8964,_0x3f306d['iAYWQ']),_0x3f306d[_0x4736(0x18b)](_0x3f5247,0xa);const _0x108c3e=_0x3f306d[_0x4736(0x183)](_0x4f30e4=_0x1831c3[_0x4736(0x182)],null)||_0x4f30e4===void 0x0?void 0x0:_0x4f30e4['id'];_0x16fee3[_0x4736(0x139)](_0x3f306d[_0x4736(0x18c)],_0x108c3e),_0x108c3e?(_0xfe42b4[_0x4736(0x139)](_0x3f306d[_0x4736(0x18d)],_0x43590e?_0x29b6d5[_0x4736(0x18e)](0x0,0x14)+'...':_0x3f306d['ZTYbu']),_0x43f6aa['log'](_0x3f306d[_0x4736(0x18f)]),_0x3f306d[_0x4736(0x190)](_0x4c9ca1,_0x3f306d[_0x4736(0x191)])):(_0x37f089['error'](_0x3f306d['NvrGQ']),_0xdb7338(_0x3f306d[_0x4736(0x192)]),_0x3f306d[_0x4736(0x18b)](_0x257ed4,!![]),_0x3f306d['aebpe'](_0x3b45bf));}}catch(_0x43042d){console[_0x4736(0x15b)](_0x54244c['fadzu'],_0x43042d);}},_0x119e1a=(_0x14bc99,_0x4528ad)=>{const _0x18d7b9={'hMTJh':_0x54244c[_0x4736(0x193)],'JJIaf':function(_0x5db30d,_0x302a93){return _0x54244c['uTHCe'](_0x5db30d,_0x302a93);},'RYFvV':function(_0x472cfb){return _0x54244c['EPVUq'](_0x472cfb);},'skODj':_0x54244c['hQJBd']};Alert[_0x4736(0x194)](_0x54244c[_0x4736(0x195)],_0x4736(0x196)+_0x4528ad+'?',[{'text':'No','style':_0x54244c[_0x4736(0x197)]},{'text':'Yes','style':_0x54244c[_0x4736(0x198)],'onPress':async()=>{const _0x4bfccc={'STWPQ':_0x4736(0xf8)};if(_0x4736(0x199)!==_0x18d7b9[_0x4736(0x19a)])try{_0x375114(_0x59452c=>({..._0x59452c,[_0x14bc99]:_0x4736(0x19b)})),_0x18d7b9[_0x4736(0x19c)](_0x15954f,_0x6d3521=>{const _0x3df242={..._0x6d3521};return delete _0x3df242[_0x14bc99],_0x3df242;}),_0x318cf9(_0x2786bf=>({..._0x2786bf,[_0x14bc99]:![]})),await _0x4a8c1b(_0x14bc99),await _0x18d7b9['RYFvV'](_0x1ac135),console[_0x4736(0x139)](_0x4736(0x19d),_0x14bc99);}catch(_0x28c6df){console[_0x4736(0x15b)](_0x18d7b9[_0x4736(0x19e)],_0x28c6df);}else _0x85c012=_0x4bfccc[_0x4736(0x19f)];}}]);},_0x244fe2=()=>{const _0x35b40b={'aAbTk':function(_0x536ab9,_0x3e2e56){return _0x54244c[_0x4736(0x1a0)](_0x536ab9,_0x3e2e56);},'SpHdP':_0x54244c[_0x4736(0x1a1)],'lsKbf':'❌\x20Socket\x20disconnected,\x20reason:','vxSdG':_0x54244c[_0x4736(0x1a2)],'BHnkD':function(_0x1fcbc7,_0x21d0f8){return _0x54244c[_0x4736(0x1a3)](_0x1fcbc7,_0x21d0f8);},'UWqkj':function(_0x4b6cec,_0x3edcba){return _0x54244c[_0x4736(0x1a4)](_0x4b6cec,_0x3edcba);},'MSbXI':function(_0x43a5e7,_0x57ef3c){return _0x43a5e7%_0x57ef3c;},'KglqW':function(_0x180bbf,_0x31c67e){return _0x54244c[_0x4736(0x1a5)](_0x180bbf,_0x31c67e);},'NAhFK':function(_0x1fce59,_0x4b965a){return _0x1fce59===_0x4b965a;},'YRbBC':function(_0x1b495a,_0x569614){return _0x54244c['KEOIM'](_0x1b495a,_0x569614);},'LJbau':_0x54244c['kMLkY'],'eBlNc':function(_0x1a59ba,_0x55724e){return _0x54244c[_0x4736(0x17b)](_0x1a59ba,_0x55724e);},'TiwLp':_0x54244c['XyaBU'],'TqiQx':_0x54244c['woXXP'],'geqiI':function(_0x29f066,_0x4fdf12){return _0x54244c[_0x4736(0x1a6)](_0x29f066,_0x4fdf12);}};_0x2a3524[_0x4736(0x182)]&&(_0x54244c[_0x4736(0x1a7)](_0x54244c[_0x4736(0x1a8)],_0x54244c[_0x4736(0x1a8)])?(_0x36e397[_0x4736(0x139)](_0x54244c[_0x4736(0x1a9)]),_0x54244c[_0x4736(0x1a0)](_0x567bb0,![]),_0x54244c[_0x4736(0x175)](_0x192b39,[]),_0x54244c[_0x4736(0x173)](_0x1e74fb,_0x54244c[_0x4736(0x1aa)])):_0x54244c['JHswm'](clearInterval,_0x2a3524[_0x4736(0x182)]));let _0x397d25=0x0;_0x2a3524[_0x4736(0x182)]=_0x54244c[_0x4736(0x1ab)](setInterval,()=>{const _0x10b3d4={'qltbM':_0x35b40b['lsKbf'],'Cgkju':_0x35b40b[_0x4736(0x1ac)],'mScUm':function(_0x1c085f,_0x315bde){return _0x35b40b[_0x4736(0x1ad)](_0x1c085f,_0x315bde);},'afykI':function(_0x4cc920,_0x21676f){return _0x4cc920===_0x21676f;},'mKuvH':function(_0x1d34b4,_0x5ad3bd){return _0x35b40b[_0x4736(0x1ae)](_0x1d34b4,_0x5ad3bd);}};_0x397d25=_0x35b40b[_0x4736(0x1af)](_0x35b40b['KglqW'](_0x397d25,0x1),0x4);if(_0x35b40b[_0x4736(0x1b0)](_0x397d25,0x0)){if(_0x35b40b[_0x4736(0x1b1)](_0x35b40b['LJbau'],_0x35b40b[_0x4736(0x1b2)])){var _0xfb58fb;_0x3897e7['log'](_0x10b3d4[_0x4736(0x1b3)],_0x45daa1),_0x1a205e['log'](_0x10b3d4['Cgkju'],{'reason':_0x4d768b,'wasConnected':_0x22c180,'socketId':_0x10b3d4[_0x4736(0x1b4)](_0xfb58fb=_0xfe6ac0[_0x4736(0x182)],null)||_0x10b3d4[_0x4736(0x1b5)](_0xfb58fb,void 0x0)?void 0x0:_0xfb58fb['id']}),_0x10b3d4['mKuvH'](_0x27b4fb,![]);}else _0x3814d3('');}else _0x35b40b[_0x4736(0x1b6)](_0x35b40b[_0x4736(0x1b7)],_0x35b40b['TqiQx'])?_0x35b40b['geqiI'](_0x3814d3,'.'[_0x4736(0x1b8)](_0x397d25)):(_0x94839[_0x4736(0x139)](_0x4736(0x5c),_0x4cb3a6[_0x4736(0x1b9)]),_0x35b40b[_0x4736(0x1ba)](_0x354918,_0x231b06[_0x4736(0x1b9)]||_0x35b40b[_0x4736(0x1bb)]));},0x1f4);},_0x143b77=()=>{_0x54244c['eqrNw']('WpVzR',_0x4736(0x1bc))?(_0x2a3524[_0x4736(0x182)]&&(_0x54244c[_0x4736(0x1bd)]!==_0x54244c[_0x4736(0x1be)]?(_0x54244c[_0x4736(0x1bf)](clearInterval,_0x2a3524[_0x4736(0x182)]),_0x2a3524[_0x4736(0x182)]=null):_0x4f10f0[_0x4736(0x182)]=_0x2a19d1),_0x54244c['yIDno'](_0x3814d3,'')):(_0x57dd2e(_0x297a16[_0x4736(0x13d)]||_0x4736(0x1c0)),_0x1c2406['log'](_0x4736(0x1),_0x230f07['progress'],'%'));},_0x5a77a8=[{'id':_0x54244c[_0x4736(0x1c1)],'name':_0x54244c[_0x4736(0x1c2)],'color':_0x4736(0x1c3)},{'id':_0x54244c[_0x4736(0x1c4)],'name':_0x54244c[_0x4736(0x1c5)],'color':_0x54244c['LJqNg']},{'id':_0x54244c[_0x4736(0x1c6)],'name':'LinkedIn','color':_0x54244c[_0x4736(0x1c7)]}],_0x581669=[{'id':_0x54244c[_0x4736(0x1c8)],'name':_0x54244c[_0x4736(0x1c9)],'color':_0x54244c[_0x4736(0x1ca)]},{'id':_0x54244c[_0x4736(0x1cb)],'name':_0x54244c[_0x4736(0x1cc)],'color':_0x4736(0x1cd)},{'id':_0x54244c[_0x4736(0x1ce)],'name':_0x54244c[_0x4736(0x1cf)],'color':_0x4736(0x1d0)}],_0x3ce5ed=[..._0x5a77a8,..._0x581669],_0x21961c=async()=>{},_0x1ac135=async()=>{},_0x4910c6=()=>_0x4736(0x19b),_0x2c4912=![],_0x59e7da=()=>![],[_0x2f2c0f,_0x375114]=_0x54244c[_0x4736(0x1d1)](useState,{}),[_0x456b46,_0x24fcfa]=useState(null),_0x5681=_0x381292=>{return _0x54244c['uTHCe'](getUniversalOnboardingIcon,_0x381292);},_0x504dda=_0x54244c[_0x4736(0x1d2)](useRef,![]),_0x1ae3c9=useRef(_0x443a04);useEffect(()=>{_0x54244c[_0x4736(0x1d3)]!==_0x54244c['knzin']?_0x1ae3c9[_0x4736(0x182)]=_0x443a04:(_0x75faac[_0x4736(0x15b)](_0x54244c[_0x4736(0x1d4)],_0x369289),_0x54244c['vHciN'](_0xe49c84,_0x4736(0x47)));},[_0x443a04]),useEffect(()=>{const _0x6bd9fe={'KUNnM':_0x4736(0xe3),'ATGWx':_0x54244c['Tryxy'],'dtIcK':function(_0x9429eb,_0x4dc3d7){return _0x54244c[_0x4736(0x1d5)](_0x9429eb,_0x4dc3d7);},'pMDBf':'BvGgo','lhBFo':function(_0x456c91,_0x2da5f0){return _0x54244c['aheAJ'](_0x456c91,_0x2da5f0);},'qDFsh':function(_0x2aa154,_0x9babe7){return _0x54244c['FQFhI'](_0x2aa154,_0x9babe7);},'xEluX':_0x54244c[_0x4736(0x164)],'mnojk':function(_0x36cd74,_0x4ce1c9,_0x68e4ff){return _0x54244c[_0x4736(0x1d6)](_0x36cd74,_0x4ce1c9,_0x68e4ff);}};if(_0x2e847a){if(_0x54244c['aGUcm'](_0x54244c[_0x4736(0x1d7)],_0x54244c[_0x4736(0x1d7)]))_0x54244c[_0x4736(0x1d8)](_0x29b798,_0x37820b['current']);else{_0x504dda[_0x4736(0x182)]=!![],_0x4f00f9[_0x4736(0x182)]=![],_0x35ab8c['setValue'](0x0),_0x54244c['uTHCe'](_0x499d56,!![]),_0x54244c[_0x4736(0x1d9)](_0x1020db),_0x54244c['QAvPX'](requestAnimationFrame,()=>{Animated['timing'](_0x35ab8c,{'toValue':0x1,'duration':0x12c,'useNativeDriver':!![]})[_0x4736(0x1da)]();});const _0x461ede=Linking[_0x4736(0x1db)](_0x54244c[_0x4736(0x1dc)],_0x2c217c);return()=>{if(_0x54244c[_0x4736(0x1dd)](_0x54244c['BnFHr'],_0x54244c[_0x4736(0x1de)]))_0x461ede['remove']();else{_0x50e17f[_0x4736(0x15b)](_0x6bd9fe[_0x4736(0x1df)]);throw new _0x243c71(_0x6bd9fe[_0x4736(0x1e0)]);}};}}else{if(_0x504dda['current']&&!_0x4f00f9[_0x4736(0x182)])Animated['timing'](_0x35ab8c,{'toValue':0x0,'duration':0xfa,'useNativeDriver':!![]})[_0x4736(0x1da)](()=>{const _0x950d4e={'vluvp':_0x6bd9fe['xEluX']};_0x6bd9fe[_0x4736(0x1e1)](setTimeout,()=>{if(_0x6bd9fe[_0x4736(0x1e2)](_0x6bd9fe['pMDBf'],_0x4736(0x1e3)))_0x181d16[_0x4736(0x15b)](_0x950d4e[_0x4736(0x1e4)],_0x2906e1);else{var _0x200358;_0x6bd9fe['lhBFo'](_0x499d56,![]),_0x6bd9fe[_0x4736(0x1e5)](_0x200358=_0x1ae3c9[_0x4736(0x182)],null)||_0x6bd9fe[_0x4736(0x1e5)](_0x200358,void 0x0)||_0x200358['call'](_0x1ae3c9);}},0x10);});else _0x504dda[_0x4736(0x182)]&&_0x4f00f9['current']&&(_0x54244c[_0x4736(0x175)](_0x499d56,![]),_0x4f00f9[_0x4736(0x182)]=![]);}},[_0x2e847a]),useEffect(()=>{return()=>{_0x1955c8[_0x4736(0x182)]&&(console[_0x4736(0x139)](_0x4736(0x1e6)),_0x1955c8[_0x4736(0x182)][_0x4736(0x1e7)](),_0x1955c8[_0x4736(0x182)]=null),_0x54244c['GbGLi'](_0x143b77);};},[_0x2e847a]);const _0x2c217c=_0x54244c[_0x4736(0x1e8)](useCallback,({url:_0x3ae6db})=>{const _0x24a508={'WHXYs':_0x54244c['ZQrub']};_0x54244c['AsFGo'](_0x4736(0x1e9),_0x4736(0x1e9))?_0x54244c[_0x4736(0x1bf)](isOAuthCallback,_0x3ae6db)&&_0x54244c[_0x4736(0x1ea)](_0x1e3166,_0x3ae6db):_0x179e9e=_0x24a508[_0x4736(0x1eb)];},[]);_0x54244c[_0x4736(0x1ec)](useEffect,()=>{const _0x325d44={'WTVup':'🍎\x20[APPLE\x20FIX]\x20primaryAuthOnly\x20detected\x20-\x20resetting\x20to\x20welcome\x20step','bwXtw':_0x4736(0x144),'WdfWK':_0x54244c[_0x4736(0x1ed)],'tPyJy':function(_0x19e8db,_0x4471be){return _0x19e8db!==_0x4471be;},'maaeN':'FpzhH','KZfcE':_0x54244c['JBTBj'],'fYxDR':_0x54244c[_0x4736(0x1ee)],'lfzTO':_0x4736(0x1ef),'kDfrb':function(_0x3cc45b,_0x1321de){return _0x3cc45b&&_0x1321de;},'oYyhz':function(_0x2fa562,_0x32b9aa){return _0x54244c[_0x4736(0x173)](_0x2fa562,_0x32b9aa);},'foAXU':function(_0x3f6847){return _0x54244c[_0x4736(0x1f0)](_0x3f6847);},'HrNWf':function(_0x52dd9f,_0x2f39ea){return _0x54244c[_0x4736(0x173)](_0x52dd9f,_0x2f39ea);},'TPahE':_0x4736(0x69),'nHPdN':function(_0x2223ba,_0x452be2){return _0x54244c['qWUiU'](_0x2223ba,_0x452be2);},'DvJsc':function(_0x4a2d23,_0x38f7f0){return _0x54244c[_0x4736(0x1f1)](_0x4a2d23,_0x38f7f0);},'FaHYD':function(_0x14bfd0,_0x568704){return _0x54244c[_0x4736(0x140)](_0x14bfd0,_0x568704);},'nPHeg':function(_0x47e48e,_0x9226a8){return _0x47e48e===_0x9226a8;},'lnRXI':_0x4736(0x1f2),'SwmGK':function(_0x1bc233,_0xf6157c){return _0x54244c[_0x4736(0x1a3)](_0x1bc233,_0xf6157c);},'XRMoQ':function(_0x5c561c,_0x3bc544){return _0x54244c[_0x4736(0x140)](_0x5c561c,_0x3bc544);},'oWlAr':_0x54244c['DIvJM'],'fEGJY':function(_0xaf272b,_0x20faec){return _0x54244c[_0x4736(0x1a4)](_0xaf272b,_0x20faec);},'SFVKP':_0x54244c[_0x4736(0x1f3)],'iwmCZ':function(_0x4c6124,_0x31d135){return _0x54244c[_0x4736(0x1f4)](_0x4c6124,_0x31d135);},'nfbro':function(_0x423816,_0x217196){return _0x54244c[_0x4736(0x1bf)](_0x423816,_0x217196);},'rsEFp':_0x4736(0x93),'QuhQC':function(_0x39bedb,_0x5a32c0){return _0x54244c[_0x4736(0x1f5)](_0x39bedb,_0x5a32c0);},'iRfNn':function(_0x5a1523,_0x3daedc){return _0x54244c['VYjTy'](_0x5a1523,_0x3daedc);},'OGuIn':_0x4736(0xa1)},_0x242efb=async()=>{if(_0x325d44[_0x4736(0x1f6)](_0x325d44[_0x4736(0x1f7)],_0x325d44[_0x4736(0x1f8)]))try{const _0x87bcfb=await AsyncStorage[_0x4736(0x15f)](_0x325d44[_0x4736(0x1f9)]),_0x26f609=await AsyncStorage[_0x4736(0x15f)](_0x325d44['lfzTO']);_0x325d44['kDfrb'](_0x87bcfb,_0x26f609)&&(console[_0x4736(0x139)](_0x4736(0x1fa)),_0x325d44[_0x4736(0x1fb)](_0x5674fc,!![]),_0x325d44[_0x4736(0x1fb)](_0x370bec,_0x87bcfb),_0x7f1044(JSON[_0x4736(0x17d)](_0x26f609)),await AsyncStorage[_0x4736(0x1fc)](_0x4736(0x2e)),await AsyncStorage[_0x4736(0x1fc)](_0x325d44[_0x4736(0x1fd)]));const _0x553caa=await _0x325d44[_0x4736(0x1fe)](getJWT);_0x325d44[_0x4736(0x1ff)](_0x5422a0,_0x553caa);if(_0x553caa){var _0x3073cf;const _0x3d6c77=await getOnairosUsername(),_0x523cb8=await AsyncStorage[_0x4736(0x15f)](_0x325d44['TPahE']),_0x27933a=_0x3d6c77||(_0x325d44[_0x4736(0x200)](_0x3a415c,null)||_0x3a415c===void 0x0||_0x325d44[_0x4736(0x201)](_0x3073cf=_0x3a415c['email'],null)||_0x325d44[_0x4736(0x202)](_0x3073cf,void 0x0)?void 0x0:_0x3073cf['split']('@')[0x0])||(_0x325d44[_0x4736(0x203)](_0x3a415c,null)||_0x325d44[_0x4736(0x200)](_0x3a415c,void 0x0)?void 0x0:_0x3a415c['name'])||_0x4736(0xa1);console[_0x4736(0x139)](_0x325d44[_0x4736(0x204)],_0x27933a),_0x325d44[_0x4736(0x1fb)](_0x33bc65,{'username':_0x27933a,'email':_0x523cb8||(_0x3a415c===null||_0x325d44[_0x4736(0x205)](_0x3a415c,void 0x0)?void 0x0:_0x3a415c['email'])||null,'id':null}),_0x325d44[_0x4736(0x1fb)](_0x18cd6b,_0x27933a);if(_0x523cb8&&_0x325d44[_0x4736(0x206)](_0x4d4279,'welcome')&&!primaryAuthOnly){console['log'](_0x4736(0x207),_0x523cb8);const _0x38e3f2=await AsyncStorage[_0x4736(0x15f)](_0x4736(0xd)),_0x4a101a=_0x38e3f2?JSON[_0x4736(0x17d)](_0x38e3f2):[];if(_0x4a101a[_0x4736(0x208)]>0x0){const _0x4832f4=_0x4736(0x209)[_0x4736(0x165)]('|');let _0x5269fa=0x0;while(!![]){switch(_0x4832f4[_0x5269fa++]){case'0':console[_0x4736(0x139)](_0x325d44[_0x4736(0x20a)],_0x4a101a);continue;case'1':_0x325d44[_0x4736(0x20b)](_0x280660,_0x4a101a);continue;case'2':_0x5a1a64(_0x4736(0x4f));continue;case'3':console[_0x4736(0x139)](_0x325d44['SFVKP']);continue;case'4':_0x325d44[_0x4736(0x20c)](_0x5ae708,!![]);continue;case'5':_0x325d44['oYyhz'](_0x14e273,_0x523cb8);continue;}break;}}else console[_0x4736(0x139)](_0x4736(0x20d)),_0x325d44[_0x4736(0x20e)](_0x14e273,_0x523cb8),_0x325d44['nfbro'](_0x5a1a64,_0x4736(0x1e));}}}catch(_0x21e274){var _0x38da23;console[_0x4736(0x15b)](_0x325d44['rsEFp'],_0x21e274);const _0x7bff18=(_0x325d44['QuhQC'](_0x3a415c,null)||_0x325d44[_0x4736(0x203)](_0x3a415c,void 0x0)||_0x325d44[_0x4736(0x20f)](_0x38da23=_0x3a415c['email'],null)||_0x38da23===void 0x0?void 0x0:_0x38da23[_0x4736(0x165)]('@')[0x0])||(_0x325d44[_0x4736(0x205)](_0x3a415c,null)||_0x325d44[_0x4736(0x210)](_0x3a415c,void 0x0)?void 0x0:_0x3a415c[_0x4736(0x189)])||_0x325d44[_0x4736(0x211)];_0x33bc65({'username':_0x7bff18,'email':(_0x325d44[_0x4736(0x200)](_0x3a415c,null)||_0x325d44[_0x4736(0x205)](_0x3a415c,void 0x0)?void 0x0:_0x3a415c[_0x4736(0x212)])||null,'id':null}),_0x325d44[_0x4736(0x20e)](_0x18cd6b,_0x7bff18);}else _0x1808b0[_0x4736(0x139)](_0x325d44[_0x4736(0x213)]),_0x5817cc[_0x4736(0x139)]('🍎\x20[APPLE\x20FIX]\x20Current\x20step\x20was:',_0x2d233b,_0x325d44[_0x4736(0x214)]),_0x365f4e(_0x325d44[_0x4736(0x215)]);};_0x2e847a&&(_0x54244c[_0x4736(0x216)](_0x54244c[_0x4736(0x217)],_0x54244c[_0x4736(0x218)])?_0x242efb():(_0x39cd4c[_0x4736(0x139)]('❌\x20Returning\x20user\x20declined\x20consent'),_0x54244c[_0x4736(0x219)](_0x1e6436)));},[_0x2e847a,_0x3a415c,_0x4d4279,primaryAuthOnly]);const _0x1020db=async()=>{const _0x5f04c4={'OnbRk':function(_0x4bc00e,_0xef218b){return _0x4bc00e(_0xef218b);},'upijd':_0x54244c[_0x4736(0x21a)]};try{if(_0x54244c[_0x4736(0x21b)](_0x4736(0x21c),_0x54244c[_0x4736(0x21d)]))_0x586366[_0x4736(0x15b)](_0x54244c[_0x4736(0x21e)],_0x2e3389),_0x54244c[_0x4736(0x21f)](_0x5ca0be,_0x54244c['DUyVr']),_0x385bd0(!![]),_0x3e6c53();else{const _0x2fd063=await _0x54244c[_0x4736(0x219)](getOnairosUsername),_0x182034=(_0x54244c[_0x4736(0x1d5)](_0x3a415c,null)||_0x54244c[_0x4736(0x220)](_0x3a415c,void 0x0)?void 0x0:_0x3a415c[_0x4736(0x212)])||(_0x54244c[_0x4736(0x1f1)](_0x3a415c,null)||_0x3a415c===void 0x0?void 0x0:_0x3a415c[_0x4736(0x189)])||_0x4736(0x221)+Math[_0x4736(0x222)](Math[_0x4736(0x223)]()*0x2710),_0x2cf52b=_0x2fd063||_0x182034;console['log']('🔍\x20Loading\x20username\x20for\x20data\x20connections:',{'storedUsername':_0x2fd063,'fallbackUsername':_0x182034,'finalUsername':_0x2cf52b}),_0x54244c[_0x4736(0x145)](_0x18cd6b,_0x2cf52b);const _0x409d1e=await _0x4910c6();console[_0x4736(0x139)](_0x4736(0x224),_0x409d1e),_0x54244c['aheAJ'](_0x15954f,_0x409d1e);const _0x45efac={};Object[_0x4736(0x225)](_0x409d1e)[_0x4736(0x226)](_0x539d4d=>{var _0x3f1aeb;_0x45efac[_0x539d4d]=(_0x3f1aeb=_0x409d1e[_0x539d4d])!==null&&_0x54244c['KEOIM'](_0x3f1aeb,void 0x0)&&_0x3f1aeb[_0x4736(0x113)]?_0x4736(0x113):_0x4736(0x19b);}),_0x54244c['hWHeM'](_0x375114,_0x45efac);const _0x5ac69b={};Object['keys'](_0x409d1e)[_0x4736(0x226)](_0x5d3f20=>{var _0x1f997c;_0x5ac69b[_0x5d3f20]=(_0x54244c[_0x4736(0x1f1)](_0x1f997c=_0x409d1e[_0x5d3f20],null)||_0x54244c[_0x4736(0x227)](_0x1f997c,void 0x0)?void 0x0:_0x1f997c[_0x4736(0x113)])||![];}),_0x54244c[_0x4736(0x1bf)](_0x318cf9,_0x5ac69b),console[_0x4736(0x139)](_0x4736(0x228),_0x45efac),console[_0x4736(0x139)](_0x54244c[_0x4736(0x229)],_0x5ac69b);}}catch(_0x3cb589){if(_0x4736(0x22a)===_0x54244c[_0x4736(0x22b)])_0x5f04c4[_0x4736(0x22c)](_0xd13c6,_0x768152),_0x5f04c4[_0x4736(0x22c)](_0x5752a4,_0x5f04c4[_0x4736(0x22d)]);else{console[_0x4736(0x15b)](_0x54244c[_0x4736(0x22e)],_0x3cb589),_0x15954f({}),_0x54244c[_0x4736(0x1f4)](_0x375114,{}),_0x54244c[_0x4736(0x173)](_0x318cf9,{});const _0x2d01b5=(_0x54244c[_0x4736(0x140)](_0x3a415c,null)||_0x3a415c===void 0x0?void 0x0:_0x3a415c['email'])||(_0x54244c['hRgHy'](_0x3a415c,null)||_0x54244c[_0x4736(0x140)](_0x3a415c,void 0x0)?void 0x0:_0x3a415c['name'])||_0x4736(0x221)+Math[_0x4736(0x222)](Math[_0x4736(0x223)]()*0x2710);_0x54244c[_0x4736(0x22f)](_0x18cd6b,_0x2d01b5);}}},_0x40f5c6=()=>{const _0x2ebba0={'FLfYd':function(_0x324f9a,_0x278961){return _0x324f9a(_0x278961);},'EWFhB':function(_0xc54ae,_0x3e31d0){return _0xc54ae===_0x3e31d0;},'wytZN':_0x54244c[_0x4736(0x230)],'kdsjE':_0x4736(0x231),'gqGPK':function(_0x6288ab){return _0x54244c[_0x4736(0x232)](_0x6288ab);},'sfMJb':_0x54244c['iTKQH'],'RnLvW':function(_0x443477,_0x3dc863){return _0x54244c[_0x4736(0x233)](_0x443477,_0x3dc863);},'yswvH':function(_0x2cba90,_0x52ab35){return _0x54244c[_0x4736(0x234)](_0x2cba90,_0x52ab35);},'sasfv':function(_0x1f058a,_0x446850){return _0x54244c[_0x4736(0x235)](_0x1f058a,_0x446850);},'vnVZP':_0x54244c[_0x4736(0x236)],'qPXGa':function(_0x361741,_0x42fc78,_0x11c191){return _0x54244c['UJGTd'](_0x361741,_0x42fc78,_0x11c191);},'TLsIx':function(_0x36a96c,_0x38d012){return _0x54244c['mQWKi'](_0x36a96c,_0x38d012);},'aVKel':function(_0x4e1df1,_0x44e3dd){return _0x54244c[_0x4736(0x131)](_0x4e1df1,_0x44e3dd);}};if(_0x54244c[_0x4736(0x237)](_0x4736(0x35),_0x54244c[_0x4736(0x238)])){const _0x3b8093=_0x4f00f9['current'];Animated['timing'](_0x35ab8c,{'toValue':0x0,'duration':0xfa,'useNativeDriver':!![]})[_0x4736(0x1da)](()=>{const _0x2cc6c6={'WxDHy':_0x2ebba0['sfMJb'],'Dmygh':function(_0x5b03b6,_0x12c70f){return _0x2ebba0[_0x4736(0x239)](_0x5b03b6,_0x12c70f);},'zkAtx':function(_0x1fa77b,_0xa470c5){return _0x1fa77b(_0xa470c5);},'yRlFu':function(_0x2862e4,_0x18b43e){return _0x2ebba0[_0x4736(0x23a)](_0x2862e4,_0x18b43e);},'XjgbP':function(_0x157015,_0x198482){return _0x2ebba0['sasfv'](_0x157015,_0x198482);},'fMJPE':_0x2ebba0[_0x4736(0x23b)]};_0x2ebba0[_0x4736(0x23c)](setTimeout,()=>{_0x2ebba0['FLfYd'](_0x499d56,![]);if(!_0x3b8093){if(_0x2ebba0[_0x4736(0x23d)](_0x2ebba0[_0x4736(0x23e)],_0x2ebba0[_0x4736(0x23f)])){const _0xc4e824=new _0x1a8b66(_0xa60171),_0x2d7506=_0xc4e824[_0x4736(0x240)][_0x4736(0x0)](_0x2cc6c6[_0x4736(0x241)]),_0xb96b27=_0xc4e824[_0x4736(0x240)][_0x4736(0x0)](_0x4736(0x92))||_0x598202;_0x2cc6c6['Dmygh'](_0x2d7506,_0xb96b27)&&(_0x2cc6c6[_0x4736(0x242)](_0x23eb3d,_0x5b7a23=>({..._0x5b7a23,[_0xb96b27]:{'userName':_0x46d6aa,'connected':!![]}})),_0x2cc6c6[_0x4736(0x243)](_0x134064,_0x143285=>({..._0x143285,[_0xb96b27]:!![]})),_0x2cc6c6[_0x4736(0x244)](_0x404788,_0x2cc6c6[_0x4736(0x245)]));}else _0x2ebba0[_0x4736(0x246)](_0x443a04);}},0x64);});}else _0x2ebba0[_0x4736(0x247)](_0x1d7173,_0x4c8d88=>({..._0x4c8d88,[_0x4603aa]:!_0x4c8d88[_0x2eec21]})),_0x2ebba0['aVKel'](_0x50246c,_0x1b4bb7=>{const _0x4d5cae={..._0x1b4bb7};return delete _0x4d5cae[_0xc6e5c8],_0x4d5cae;});},_0x2fcfed=()=>{if(_0x54244c[_0x4736(0x216)](_0x54244c['qQzrA'],_0x54244c[_0x4736(0x248)])){_0x54244c['aheAJ'](triggerHaptic,HapticType[_0x4736(0x249)]);if(primaryAuthOnly){console[_0x4736(0x139)](_0x54244c[_0x4736(0x24a)]),_0x54244c['lgkvp'](_0x5a1a64,_0x54244c['WaleP']);return;}console[_0x4736(0x139)](_0x4736(0x72)),_0x54244c[_0x4736(0x24b)](_0x5a1a64,_0x54244c[_0x4736(0x24c)]);}else{const _0x46f4ad=_0x54244c[_0x4736(0x24d)][_0x4736(0x165)]('|');let _0x370be9=0x0;while(!![]){switch(_0x46f4ad[_0x370be9++]){case'0':_0x4b2777[_0x4736(0x139)](_0x54244c[_0x4736(0x24e)]);continue;case'1':_0x4c7bad[_0x4736(0x139)](_0x54244c[_0x4736(0x24f)]);continue;case'2':if(!_0x6c0718)throw new _0x295260(_0x54244c[_0x4736(0x250)]);continue;case'3':_0x329d06[_0x4736(0x139)](_0x4736(0xa0),(_0x489726===null||_0x2e07de===void 0x0?void 0x0:_0x2e6e09[_0x4736(0x18e)](0x0,0x14))+_0x4736(0x251));continue;case'4':_0x245300[_0x4736(0x139)](_0x54244c[_0x4736(0x252)],_0x2f6551);continue;case'5':_0x3b91c8['log'](_0x4736(0xad));continue;}break;}}},_0x4fd1e2=async _0x51ec8e=>{_0x54244c['PFVWQ'](triggerHaptic,HapticType[_0x4736(0x249)]),_0x54244c[_0x4736(0x253)](_0xec8f81,!![]),_0x54244c['RIFcZ'](_0x1afa7a,'');try{if(_0x54244c[_0x4736(0x172)](_0x51ec8e,_0x54244c[_0x4736(0x254)])){console['log'](_0x54244c[_0x4736(0x255)]),await AsyncStorage[_0x4736(0x256)](_0x54244c[_0x4736(0x257)],_0x54244c[_0x4736(0x258)]),await _0x54244c['iKQMF'](storeJWT,_0x4736(0x7a)),_0x54244c[_0x4736(0x1ea)](_0x14e273,_0x51ec8e),_0x54244c[_0x4736(0x12b)](_0x5a1a64,_0x54244c['WaleP']),_0x54244c[_0x4736(0x14a)](_0xec8f81,![]);return;}if(_0x54244c[_0x4736(0x259)](_0x51ec8e,'test@bypass.com')){const _0x15ab33=_0x54244c[_0x4736(0x25a)][_0x4736(0x165)]('|');let _0x4174be=0x0;while(!![]){switch(_0x15ab33[_0x4174be++]){case'0':console['log'](_0x54244c[_0x4736(0x25b)]);continue;case'1':_0x54244c[_0x4736(0x25c)](_0x14e273,_0x54244c[_0x4736(0x25d)]);continue;case'2':_0x54244c[_0x4736(0x146)](_0x5a1a64,'verification');continue;case'3':_0x54244c[_0x4736(0x25e)](_0xec8f81,![]);continue;case'4':return;}break;}}console[_0x4736(0x139)](_0x4736(0x25f),_0x51ec8e);const _0x3e256a=await _0x54244c['KdCeR'](sendEmailVerificationCode,_0x51ec8e);_0x3e256a[_0x4736(0x260)]?(console[_0x4736(0x139)](_0x54244c[_0x4736(0x261)]),_0x54244c[_0x4736(0x262)](_0x14e273,_0x51ec8e),_0x54244c[_0x4736(0x158)](_0x5a1a64,_0x54244c['ywzXz'])):(console[_0x4736(0x139)](_0x54244c[_0x4736(0x263)],_0x3e256a[_0x4736(0x1b9)]),_0x54244c[_0x4736(0x24b)](_0x1afa7a,_0x3e256a[_0x4736(0x1b9)]||_0x54244c['FniHT']));}catch(_0x2a5885){if(_0x54244c[_0x4736(0x264)]===_0x54244c[_0x4736(0x265)]){_0x10daf9['log']('🧪\x20Test\x20bypass\x20-\x20skipping\x20code\x20verification,\x20going\x20to\x20platforms'),_0x3ac48c(_0x54244c[_0x4736(0x1aa)]),_0x54244c[_0x4736(0x266)](_0x40d7fd,![]);return;}else console[_0x4736(0x15b)](_0x54244c[_0x4736(0x1d4)],_0x2a5885),_0x1afa7a(_0x54244c[_0x4736(0x267)]);}finally{_0xec8f81(![]);}},_0x239f75=async()=>{const _0x4cdab3={'YArNt':_0x54244c[_0x4736(0x268)],'FQgvN':_0x54244c[_0x4736(0x269)],'sMTGC':function(_0x47cdee){return _0x54244c['fHGOQ'](_0x47cdee);},'LNQrS':_0x54244c['SpNyp'],'CXpAI':function(_0x5c5af3,_0x4a9033){return _0x54244c[_0x4736(0x26a)](_0x5c5af3,_0x4a9033);},'aNqvl':_0x4736(0xd1),'SDsDz':function(_0x3cd15a,_0x3c6329){return _0x54244c[_0x4736(0x26b)](_0x3cd15a,_0x3c6329);},'cBIyf':function(_0x217126){return _0x54244c['noRWZ'](_0x217126);}};_0x54244c[_0x4736(0x12b)](triggerHaptic,HapticType[_0x4736(0x249)]),_0x54244c[_0x4736(0x26c)](_0xec8f81,!![]),_0x1afa7a('');try{console[_0x4736(0x139)](_0x4736(0x26d));const _0xd4a596=await _0x54244c[_0x4736(0x26e)](signInWithGoogle);if(_0xd4a596[_0x4736(0x260)]&&_0xd4a596[_0x4736(0x26f)]){console[_0x4736(0x139)](_0x54244c[_0x4736(0x270)],_0xd4a596['user'][_0x4736(0x212)]),console[_0x4736(0x139)](_0x54244c['dzJwI'],_0xd4a596[_0x4736(0x271)]),_0x54244c['mHWTw'](_0x14e273,_0xd4a596['user'][_0x4736(0x212)]);const _0x4f102b=_0xd4a596[_0x4736(0x26f)][_0x4736(0x272)]||_0xd4a596[_0x4736(0x26f)]['email'][_0x4736(0x165)]('@')[0x0];_0x54244c[_0x4736(0x273)](_0x18cd6b,_0x4f102b);if(_0x54244c[_0x4736(0x220)](_0xd4a596['isNewUser'],![])){if(_0x54244c[_0x4736(0x274)]===_0x54244c['qsVOt']){console['log'](_0x4736(0x275));try{if(_0x54244c[_0x4736(0x276)](_0x54244c[_0x4736(0x277)],_0x54244c[_0x4736(0x277)])){const _0x2ba5e0=await getConnectedAccountsSmart(_0xd4a596[_0x4736(0x26f)][_0x4736(0x212)],_0xd4a596[_0x4736(0x26f)]['id'],_0x4f102b);if(_0x2ba5e0&&_0x54244c[_0x4736(0x278)](_0x2ba5e0[_0x4736(0x208)],0x0)){const _0x1f220a=_0x54244c[_0x4736(0x279)][_0x4736(0x165)]('|');let _0x4b281b=0x0;while(!![]){switch(_0x1f220a[_0x4b281b++]){case'0':_0x54244c[_0x4736(0x1ea)](_0x5a1a64,_0x54244c[_0x4736(0x27a)]);continue;case'1':return;case'2':_0x54244c[_0x4736(0x27b)](_0x5ae708,!![]);continue;case'3':console['log']('✅\x20Found\x20'+_0x2ba5e0['length']+_0x4736(0x27c));continue;case'4':_0x54244c['OVxUf'](_0x280660,_0x2ba5e0[_0x4736(0x27d)](_0x335ce1=>_0x335ce1[_0x4736(0x92)]));continue;case'5':_0x54244c['WLCCV'](triggerHaptic,HapticType[_0x4736(0x27e)]);continue;}break;}}else console[_0x4736(0x139)](_0x54244c['WHHKF']);}else throw new _0x1a4bc8('No\x20background\x20socket\x20ID\x20available');}catch(_0x586452){console['log'](_0x54244c[_0x4736(0x27f)],_0x586452);}}else return _0xe021f2[_0x4736(0x280)](_0x4cdab3[_0x4736(0x281)],_0x32e262),null;}_0x54244c[_0x4736(0x173)](_0x5a1a64,_0x54244c[_0x4736(0x1aa)]),_0x54244c['ENUzv'](triggerHaptic,HapticType[_0x4736(0x27e)]);}else _0xd4a596[_0x4736(0x282)]?console[_0x4736(0x139)](_0x54244c[_0x4736(0x283)]):_0x54244c[_0x4736(0x284)]===_0x4736(0x285)?(_0x217f45['error']('❌\x20YouTube\x20token\x20refresh/reconnection\x20error:',_0xe5d0e5),_0x2b7936(_0x4cdab3[_0x4736(0x286)]),_0x496564(!![]),_0x4cdab3[_0x4736(0x287)](_0x55d8e0)):(_0x54244c[_0x4736(0x288)](_0x1afa7a,_0xd4a596[_0x4736(0x1b9)]||_0x4736(0x54)),triggerHaptic(HapticType[_0x4736(0x289)]));}catch(_0x5bd89b){_0x54244c[_0x4736(0x28a)](_0x4736(0x28b),_0x4736(0x28c))?_0x5ec547[_0x4736(0x139)](_0x54244c[_0x4736(0x283)]):(console[_0x4736(0x15b)](_0x54244c[_0x4736(0x28d)],_0x5bd89b),_0x1afa7a(_0x5bd89b[_0x4736(0x1b9)]||_0x54244c['aDEBY']),_0x54244c[_0x4736(0x28e)](triggerHaptic,HapticType['ERROR']),_0x54244c[_0x4736(0x235)](_0x1afa7a,_0x54244c[_0x4736(0x28f)]));}finally{_0x54244c[_0x4736(0x172)](_0x54244c['YasdO'],_0x54244c['YasdO'])?_0x54244c['TpGyB'](_0xec8f81,![]):(_0x5a3062['error'](_0x4cdab3[_0x4736(0x290)]),_0x11c855[_0x4736(0x15b)]('🔍\x20Socket\x20state:',{'connected':_0x4473ff['current'][_0x4736(0x113)],'disconnected':_0x377c3c[_0x4736(0x182)][_0x4736(0x19b)],'id':_0x26eed2[_0x4736(0x182)]['id']}),_0x4cdab3[_0x4736(0x291)](_0x4c90fa,_0x4cdab3['aNqvl']),_0x4cdab3['SDsDz'](_0x25a6ea,!![]),_0x4cdab3[_0x4736(0x292)](_0xfefb8b),_0x2fcfb0[_0x4736(0x182)]&&(_0x8bf134[_0x4736(0x182)][_0x4736(0x1e7)](),_0x244281[_0x4736(0x182)]=null));}},_0xb6b2cc=async _0x29fc05=>{const _0x2ec3f9={'hpysT':_0x54244c[_0x4736(0x293)],'nRQxw':function(_0x11708b,_0x4361b5){return _0x11708b===_0x4361b5;},'IJWZj':function(_0x53af1c,_0x144108,_0xa479d7,_0xb9a6d8){return _0x54244c[_0x4736(0x294)](_0x53af1c,_0x144108,_0xa479d7,_0xb9a6d8);}};_0x54244c[_0x4736(0x295)](triggerHaptic,HapticType[_0x4736(0x249)]),_0x54244c['jbVVc'](_0xec8f81,!![]),_0x54244c[_0x4736(0x26a)](_0x1afa7a,'');try{if(_0x54244c[_0x4736(0x1f1)](_0x5004a7,_0x54244c[_0x4736(0x25d)])){if(_0x54244c['FHqVH'](_0x54244c[_0x4736(0x296)],_0x54244c[_0x4736(0x297)]))_0x54244c[_0x4736(0x298)](_0x538c94,'.'['repeat'](_0x2a9e08));else{console[_0x4736(0x139)](_0x4736(0x299)),_0x54244c[_0x4736(0x29a)](_0x5a1a64,_0x54244c['WaleP']),_0xec8f81(![]);return;}}console[_0x4736(0x139)](_0x54244c[_0x4736(0x29b)],_0x5004a7,_0x29fc05),console[_0x4736(0x139)](_0x54244c['oBSld'],_0x631071);const _0x328502=await _0x54244c[_0x4736(0x1ab)](confirmEmailVerificationCode,_0x5004a7,_0x29fc05);if(_0x328502[_0x4736(0x260)]){var _0x2ca3c1,_0x5a1d9b,_0x5bb787,_0x43e998;console[_0x4736(0x139)](_0x4736(0x29c)),console[_0x4736(0x139)]('🔍\x20Checking\x20for\x20returning\x20user\x20data...',{'isNewUser':_0x328502[_0x4736(0x271)],'flowType':_0x328502[_0x4736(0x29d)],'hasExistingData':_0x54244c[_0x4736(0x259)](_0x2ca3c1=_0x328502[_0x4736(0x29e)],null)||_0x54244c[_0x4736(0x1f5)](_0x2ca3c1,void 0x0)?void 0x0:_0x2ca3c1['hasExistingData'],'connectionsCount':((_0x5a1d9b=_0x328502[_0x4736(0x29e)])===null||_0x5a1d9b===void 0x0||_0x54244c[_0x4736(0x29f)](_0x5a1d9b=_0x5a1d9b['connections'],null)||_0x54244c[_0x4736(0x259)](_0x5a1d9b,void 0x0)?void 0x0:_0x5a1d9b['length'])||0x0});const _0x275559=_0x328502[_0x4736(0x271)]===![]||_0x328502[_0x4736(0x29d)]===_0x54244c['PBBEu'],_0x1e0f13=_0x54244c['OmjlW'](_0x5bb787=_0x328502['existingUserData'],null)||_0x54244c[_0x4736(0x2a0)](_0x5bb787,void 0x0)?void 0x0:_0x5bb787[_0x4736(0x2a1)],_0x1f9c09=Array[_0x4736(0x2a2)](_0x1e0f13)?_0x1e0f13:[],_0x1ee696=_0x1f9c09['filter'](_0x4e6c3b=>_0x4e6c3b&&(_0x4e6c3b[_0x4736(0x2a3)]||_0x4e6c3b[_0x4736(0x13d)]===_0x4736(0x2a4)))[_0x4736(0x27d)](_0x597659=>_0x597659===null||_0x597659===void 0x0?void 0x0:_0x597659[_0x4736(0x92)])[_0x4736(0x17e)](Boolean);console[_0x4736(0x139)]('🔍\x20Returning\x20user\x20check:',{'isReturning':_0x275559,'connectedPlatformNames':_0x1ee696,'showWelcomeBack':_0x54244c[_0x4736(0x2a0)](_0x43e998=_0x328502['enochInstructions'],null)||_0x54244c['BHKnr'](_0x43e998,void 0x0)?void 0x0:_0x43e998['showWelcomeBack']}),_0x275559&&_0x54244c[_0x4736(0x2a5)](_0x1ee696[_0x4736(0x208)],0x0)?(console[_0x4736(0x139)](_0x4736(0x96)),_0x5ae708(!![]),_0x280660(_0x1ee696),_0x54244c['xYHwb'](_0x5a1a64,_0x54244c[_0x4736(0x27a)])):(console[_0x4736(0x139)](_0x4736(0x1d)),_0x54244c['SmwJZ'](_0x5ae708,![]),_0x54244c[_0x4736(0x234)](_0x280660,[]),_0x5a1a64(_0x4736(0x1e)));}else console[_0x4736(0x139)](_0x54244c[_0x4736(0x2a6)],_0x328502['message']),_0x54244c[_0x4736(0x298)](_0x1afa7a,_0x328502['message']||_0x4736(0x2a7));}catch(_0x40e308){_0x54244c['XRxNm'](_0x54244c[_0x4736(0x2a8)],_0x54244c['FIHqI'])?(console['error'](_0x54244c[_0x4736(0x2a9)],_0x40e308),_0x54244c[_0x4736(0x2aa)](_0x1afa7a,_0x4736(0x2ab))):(_0x2c28ba[_0x4736(0x139)](_0x2ec3f9[_0x4736(0x2ac)],_0x1c01cf['substring'](0x0,0x1e)+_0x4736(0x251)),_0x2ec3f9[_0x4736(0x2ad)](_0x27777c,null)||_0x2ec3f9[_0x4736(0x2ad)](_0x8483a0,void 0x0)||_0x2ec3f9['IJWZj'](_0x1fe2ad,_0x350665['BASE_URL'],_0x2bb406,{'email':(_0x2ec3f9[_0x4736(0x2ad)](_0x1d9b64,null)||_0x1aa866===void 0x0?void 0x0:_0x1ccf0e['email'])||'',..._0x188f71}));}finally{_0x54244c['LOivO'](_0xec8f81,![]);}},_0x2f643a=()=>{const _0x17833e={'AvUhy':_0x4736(0x42),'UenlI':function(_0x586565,_0x52b053){return _0x54244c[_0x4736(0x1a0)](_0x586565,_0x52b053);},'wEcqY':function(_0x164666,_0x17d6fd){return _0x54244c[_0x4736(0x288)](_0x164666,_0x17d6fd);}};_0x4736(0x5e)!==_0x54244c[_0x4736(0x2ae)]?(_0x5b56ca[_0x4736(0x139)](_0x17833e[_0x4736(0x2af)]),_0x17833e['UenlI'](_0x209db6,_0x53d9f8),_0x17833e[_0x4736(0x2b0)](_0x5707f3,'verification')):(triggerHaptic(HapticType[_0x4736(0x249)]),_0x1afa7a(''),_0x5a1a64(_0x54244c[_0x4736(0x24c)]));},_0x17f30a=async()=>{triggerHaptic(HapticType[_0x4736(0x249)]),console[_0x4736(0x139)](_0x54244c['DGlbk']);try{const _0x58f8c4=_0x54244c['OFkOC'][_0x4736(0x165)]('|');let _0x20b5aa=0x0;while(!![]){switch(_0x58f8c4[_0x20b5aa++]){case'0':_0x54244c[_0x4736(0x1d1)](_0x5422a0,null);continue;case'1':_0x280660([]);continue;case'2':_0x54244c['WLCCV'](_0x14e273,'');continue;case'3':_0x54244c[_0x4736(0x262)](_0x33bc65,null);continue;case'4':_0x54244c['GSpkB'](_0x1afa7a,'');continue;case'5':await AsyncStorage[_0x4736(0x2b1)]([_0x54244c['rQOMY'],_0x54244c[_0x4736(0x2b2)],_0x4736(0x69),'onairos_username',_0x54244c[_0x4736(0x2b3)],_0x54244c[_0x4736(0x257)]]);continue;case'6':console[_0x4736(0x139)]('✅\x20Logout\x20complete\x20-\x20user\x20is\x20now\x20on\x20login\x20page');continue;case'7':_0x54244c['lAbEB'](_0x5a1a64,_0x54244c[_0x4736(0x24c)]);continue;case'8':_0x54244c[_0x4736(0x175)](_0x5ae708,![]);continue;}break;}}catch(_0x4531d5){_0x54244c['FGKFG'](_0x4736(0x2b4),_0x54244c[_0x4736(0x2b5)])?_0x18fa87[_0x4736(0x139)](_0x4736(0x10b)):(console['error'](_0x54244c[_0x4736(0x2b6)],_0x4531d5),_0x5a1a64(_0x54244c['OulPA']));}},_0x52b222=async()=>{_0x54244c[_0x4736(0x14a)](triggerHaptic,HapticType[_0x4736(0x249)]),_0x54244c['aOYZg'](_0xec8f81,!![]),_0x1afa7a('');try{console['log']('🔄\x20Resending\x20verification\x20code\x20to:',_0x5004a7);const _0x4db71c=await _0x54244c['xJUms'](sendEmailVerificationCode,_0x5004a7);_0x4db71c[_0x4736(0x260)]?_0x54244c[_0x4736(0x2b7)](_0x54244c[_0x4736(0x2b8)],_0x4736(0x66))?(_0xe70721(_0x495f30['BUTTON_PRESS']),_0x54244c[_0x4736(0x1d8)](_0x2fe644,''),_0x54244c[_0x4736(0x2b9)](_0x342a80,_0x54244c[_0x4736(0x24c)])):console['log'](_0x54244c[_0x4736(0x2ba)]):_0x54244c[_0x4736(0x1d1)](_0x1afa7a,_0x4db71c[_0x4736(0x1b9)]||_0x54244c['ayiFF']);}catch(_0x177cca){console[_0x4736(0x15b)](_0x4736(0xd7),_0x177cca),_0x54244c['UpWQa'](_0x1afa7a,'Network\x20error.\x20Please\x20try\x20again.');}finally{_0x54244c[_0x4736(0x2bb)](_0xec8f81,![]);}},_0x4c5d31=async _0x11228c=>{const _0x48a73a={'IDTnM':_0x54244c[_0x4736(0x2bc)]};_0x54244c[_0x4736(0x12b)](triggerHaptic,HapticType[_0x4736(0x27e)]),console[_0x4736(0x139)](_0x54244c[_0x4736(0x2bd)],_0x11228c);try{if(_0x54244c[_0x4736(0x1a7)](_0x54244c['UysIT'],_0x4736(0x2be))){const [_0x452940,_0x394090,_0xf15bab]=await Promise[_0x4736(0x2bf)]([_0x54244c[_0x4736(0x2c0)](getAuthToken),AsyncStorage[_0x4736(0x15f)](_0x54244c[_0x4736(0x2c1)]),_0x54244c[_0x4736(0x2c2)](getOnairosUsername)]);console[_0x4736(0x139)](_0x54244c[_0x4736(0x2c3)]),console[_0x4736(0x139)](_0x54244c[_0x4736(0x2c4)],_0x452940?_0x452940[_0x4736(0x18e)](0x0,0x14)+_0x4736(0x251):'NO'),console[_0x4736(0x139)](_0x54244c['ZhGDP'],_0x394090||'NO'),_0x4f00f9[_0x4736(0x182)]=!![];const _0x2b4006={'connectedPlatforms':_0x11228c};_0x394090&&(_0x2b4006[_0x4736(0x212)]=_0x394090,_0x2b4006[_0x4736(0x272)]=_0xf15bab||_0x394090[_0x4736(0x165)]('@')[0x0]);if(_0x54244c[_0x4736(0x2c5)](_0x452940,_0x394090))console[_0x4736(0x139)](_0x54244c[_0x4736(0x2c6)]),await(_0x84d24a===null||_0x84d24a===void 0x0?void 0x0:_0x84d24a(API_CONFIG[_0x4736(0x2c7)],_0x452940,_0x2b4006));else _0x394090?_0x54244c[_0x4736(0x216)](_0x54244c[_0x4736(0x2c8)],_0x54244c[_0x4736(0x2c9)])?(console[_0x4736(0x139)](_0x4736(0x2ca)),await(_0x54244c[_0x4736(0x1f5)](_0x84d24a,null)||_0x54244c[_0x4736(0x2cb)](_0x84d24a,void 0x0)?void 0x0:_0x54244c[_0x4736(0x2cc)](_0x84d24a,API_CONFIG[_0x4736(0x2c7)],'',_0x2b4006))):_0x432f8d=_0x48a73a[_0x4736(0x2cd)]:(console[_0x4736(0x280)](_0x54244c['TsiLU']),await(_0x54244c[_0x4736(0x1f5)](_0x84d24a,null)||_0x54244c['zinyV'](_0x84d24a,void 0x0)?void 0x0:_0x54244c[_0x4736(0x294)](_0x84d24a,API_CONFIG[_0x4736(0x2c7)],'',_0x2b4006)));}else _0x5c24de[_0x4736(0x15b)](_0x54244c['RSvzG'],_0x3c8ed8),_0xdae320(_0x54244c['OulPA']);}catch(_0x1ac7b6){if(_0x54244c['xUrCe']===_0x54244c['xUrCe']){console[_0x4736(0x15b)](_0x54244c['pJuLO'],_0x1ac7b6);const _0x50b4dc=await AsyncStorage[_0x4736(0x15f)](_0x54244c[_0x4736(0x2c1)])['catch'](()=>null);await(_0x54244c['Nhlzx'](_0x84d24a,null)||_0x54244c[_0x4736(0x2ce)](_0x84d24a,void 0x0)?void 0x0:_0x84d24a(API_CONFIG[_0x4736(0x2c7)],'',{'connectedPlatforms':_0x11228c,..._0x54244c[_0x4736(0x2c5)](_0x50b4dc,{'email':_0x50b4dc})}));}else _0x34c10c[_0x4736(0x139)](_0x54244c[_0x4736(0x27f)],_0x7ebbfa);}console[_0x4736(0x139)](_0x54244c[_0x4736(0x2cf)]);},_0x5519b8=async()=>{const _0x43eae1={'pnZcJ':_0x54244c[_0x4736(0x24a)],'uPmne':function(_0x9cad02,_0x19b235){return _0x54244c[_0x4736(0x173)](_0x9cad02,_0x19b235);},'dKOwu':_0x54244c[_0x4736(0x1aa)],'RKXHR':_0x54244c[_0x4736(0x2d0)],'hXsyz':_0x54244c[_0x4736(0x24c)]};_0x54244c[_0x4736(0x1a4)](triggerHaptic,HapticType[_0x4736(0x249)]),console[_0x4736(0x139)](_0x4736(0x2d1));try{if(_0x54244c[_0x4736(0x2d2)]('MWIhU',_0x54244c[_0x4736(0x2d3)])){_0x4a1871(_0x320266[_0x4736(0x249)]);if(_0x3d145f){_0x2e6e92['log'](_0x43eae1['pnZcJ']),_0x43eae1[_0x4736(0x2d4)](_0x21dc75,_0x43eae1[_0x4736(0x2d5)]);return;}_0x1b13a9[_0x4736(0x139)](_0x43eae1[_0x4736(0x2d6)]),_0x43eae1[_0x4736(0x2d4)](_0x5cabdc,_0x43eae1['hXsyz']);}else{const [_0x20424b,_0x541666,_0x222574]=await Promise[_0x4736(0x2bf)]([_0x54244c['WtGtD'](getAuthToken),AsyncStorage[_0x4736(0x15f)](_0x54244c[_0x4736(0x2c1)]),_0x54244c['ytCmE'](getOnairosUsername)]);_0x4f00f9[_0x4736(0x182)]=!![],_0x20424b&&_0x541666?(console['log'](_0x4736(0x2d7)),await(_0x84d24a===null||_0x54244c['Nhlzx'](_0x84d24a,void 0x0)?void 0x0:_0x54244c[_0x4736(0x2d8)](_0x84d24a,API_CONFIG[_0x4736(0x2c7)],_0x20424b,{'email':_0x541666,'connectedPlatforms':[],'username':_0x222574||_0x541666[_0x4736(0x165)]('@')[0x0],'skipped':!![]}))):(console['warn'](_0x54244c[_0x4736(0x2d9)]),await(_0x54244c[_0x4736(0x2da)](_0x84d24a,null)||_0x54244c['yuKhQ'](_0x84d24a,void 0x0)?void 0x0:_0x54244c[_0x4736(0x2db)](_0x84d24a,API_CONFIG[_0x4736(0x2c7)],'',{'connectedPlatforms':[],'skipped':!![]})));}}catch(_0x1e5318){console[_0x4736(0x15b)](_0x54244c[_0x4736(0x2dc)],_0x1e5318),await(_0x84d24a===null||_0x54244c[_0x4736(0x237)](_0x84d24a,void 0x0)?void 0x0:_0x54244c['zRHQN'](_0x84d24a,API_CONFIG[_0x4736(0x2c7)],'',{'connectedPlatforms':[],'skipped':!![]}));}console['log'](_0x54244c[_0x4736(0x2dd)]);},_0x548acd=async()=>{const _0x3466de={'uNCIO':function(_0x39c370,_0x57d977){return _0x39c370(_0x57d977);}};if(_0x54244c[_0x4736(0x2de)](_0x54244c[_0x4736(0x2df)],'WHkkV'))_0x3466de[_0x4736(0x2e0)](_0x18ac23,null);else{console[_0x4736(0x139)](_0x54244c[_0x4736(0x2e1)]),_0x54244c[_0x4736(0x2e2)](triggerHaptic,HapticType[_0x4736(0x249)]);try{_0x54244c[_0x4736(0x2e3)](_0x54244c[_0x4736(0x2e4)],_0x54244c[_0x4736(0x2e4)])?_0x3939fe[_0x4736(0x2e5)]():(await AsyncStorage[_0x4736(0x256)](_0x54244c[_0x4736(0x257)],_0x54244c['rXDxb']),await _0x54244c[_0x4736(0x2e6)](storeJWT,_0x54244c[_0x4736(0x2e7)]),console[_0x4736(0x139)](_0x54244c[_0x4736(0x2e8)]),_0x40f5c6());}catch(_0x5b55ae){console['error'](_0x54244c['QThEY'],_0x5b55ae),_0x54244c[_0x4736(0x2e9)](_0x40f5c6);}}},_0x2328a8=async _0x3fbcf1=>{triggerHaptic(HapticType['BUTTON_PRESS']),_0x54244c[_0x4736(0x1f4)](_0x24fcfa,_0x3fbcf1);try{if(_0x54244c[_0x4736(0x2ea)](hasNativeSDK,_0x3fbcf1)){if(_0x54244c['SJMgT'](_0x54244c[_0x4736(0x2eb)],_0x54244c[_0x4736(0x2ec)])){_0x54244c['PHtGk'](_0x2d3de1,_0x3fbcf1);const _0x46e70d=await _0x54244c[_0x4736(0x2ed)](initiateNativeAuth,_0x3fbcf1,_0xcdf6d4);if(_0x46e70d){if(_0x54244c[_0x4736(0x2ee)](_0x4736(0x7f),_0x54244c[_0x4736(0x2ef)])){_0x54e98a[_0x4736(0x15b)](_0x54244c[_0x4736(0x2f0)],_0x46e693),_0x54244c[_0x4736(0x2f1)](_0x1fcf46,'');throw _0x48e0d5;}else _0x54244c[_0x4736(0x173)](_0x15954f,_0x127886=>({..._0x127886,[_0x3fbcf1]:{'userName':_0xcdf6d4,'connected':!![]}})),_0x318cf9(_0x532432=>({..._0x532432,[_0x3fbcf1]:!![]})),_0x375114(_0x206d6c=>({..._0x206d6c,[_0x3fbcf1]:'connected'})),await _0x54244c[_0x4736(0x2f2)](_0x4f5d8a,_0x3fbcf1);}}else _0x27b816(![]);}else{if(_0x54244c['kFqLu'](_0x54244c[_0x4736(0x2f3)],_0x54244c[_0x4736(0x2f4)]))_0x2b5792[_0x4736(0x15b)](_0x4736(0x2f5)+_0x24a2ef+':',_0x1d7e7d);else{_0x54244c[_0x4736(0x1a0)](_0x2d3de1,_0x3fbcf1);const _0x59e410=await _0x54244c['gITQd'](initiateOAuth,_0x3fbcf1,_0xcdf6d4);_0x59e410&&(_0x54244c[_0x4736(0x2f6)](_0x5e5177,_0x59e410),_0x54244c[_0x4736(0x295)](_0x5a1a64,_0x54244c['Heuyj']));}}}catch(_0x162b01){console[_0x4736(0x15b)](_0x4736(0x2f5)+_0x3fbcf1+':',_0x162b01);}finally{if(_0x54244c[_0x4736(0x2f7)]===_0x54244c[_0x4736(0x2f7)])_0x24fcfa(null);else throw new _0x4129df('Failed\x20to\x20send\x20LLM\x20data\x20to\x20backend:\x20'+_0x4f1c9a[_0x4736(0x1b9)]);}},_0x29f7c5=_0x54244c['Tjoow'](useCallback,async _0x1990d2=>{const _0x4af6d0={'WLOdK':_0x54244c['LUvjn'],'TrRGs':function(_0xee0f94,_0x9ef13e){return _0x54244c[_0x4736(0x262)](_0xee0f94,_0x9ef13e);},'zjpcw':_0x54244c[_0x4736(0x25d)],'zyFzs':function(_0x39d9d7,_0x3365d7){return _0x54244c[_0x4736(0x2f8)](_0x39d9d7,_0x3365d7);},'dyzyO':function(_0x4da3b6,_0x4c8cd7){return _0x54244c[_0x4736(0x2f9)](_0x4da3b6,_0x4c8cd7);},'Yicga':_0x54244c['uJWXl'],'NvqJz':_0x54244c[_0x4736(0x2fa)],'IdlCV':_0x4736(0xa9),'NbiWl':_0x54244c[_0x4736(0x153)],'ItBDp':_0x54244c[_0x4736(0x2fb)],'GYgZB':_0x54244c[_0x4736(0x2fc)],'Hgklq':_0x54244c[_0x4736(0x2fd)],'oUBnv':_0x54244c[_0x4736(0x2fe)],'srnAl':_0x4736(0x2ff),'mOqnX':_0x54244c[_0x4736(0x300)],'QFMoq':function(_0x54e534,_0x28691e){return _0x54e534===_0x28691e;},'rHtdz':_0x54244c[_0x4736(0x301)]};if(_0x54244c[_0x4736(0x1a7)](_0x4736(0x302),_0x54244c['Zzjgb'])){if(!_0x116319[_0x1990d2])try{if(_0x54244c[_0x4736(0x1f1)](_0x1990d2,_0x54244c[_0x4736(0x303)])){_0x54244c[_0x4736(0x304)](_0x318cf9,_0x123262=>({..._0x123262,[_0x1990d2]:!_0x123262[_0x1990d2]})),_0x54244c[_0x4736(0x305)](_0x15954f,_0x52d261=>({..._0x52d261,[_0x1990d2]:{'userName':_0x1990d2+_0x4736(0x306),'connected':!![]}})),await _0x54244c['mjgnh'](_0x4f5d8a,_0x1990d2);return;}if(_0x1990d2===_0x54244c['eXdJe']||_0x1990d2===_0x54244c[_0x4736(0x307)]){console[_0x4736(0x139)](_0x54244c[_0x4736(0x308)]);const _0x109fd0={'userId':_0x54244c[_0x4736(0x309)](_0x33b4a5,_0xcdf6d4),'email':_0x33b4a5||_0xcdf6d4+'@temp.com','appName':_0x631071,'timestamp':Date[_0x4736(0x30a)](),'data':{'conversations':[],'chatHistory':[],'preferences':{},'customData':{}},'accessToken':undefined,'refreshToken':undefined,'tokenExpiry':undefined},_0x1393c3=await _0x54244c[_0x4736(0x30b)](sendLLMDataToBackend,_0x109fd0);if(_0x1393c3['success'])console[_0x4736(0x139)](_0x54244c[_0x4736(0x30c)]),console[_0x4736(0x139)](_0x54244c[_0x4736(0x30d)],_0x1393c3[_0x4736(0x30e)]),_0x54244c[_0x4736(0x30f)](_0x318cf9,_0x45744f=>({..._0x45744f,[_0x1990d2]:!![]})),_0x54244c[_0x4736(0x304)](_0x15954f,_0xa29190=>({..._0xa29190,[_0x1990d2]:{'userName':_0xcdf6d4,'connected':!![],'connectionId':_0x1393c3[_0x4736(0x30e)],'storedInBackend':!![]}})),await _0x54244c[_0x4736(0x288)](_0x4f5d8a,_0x1990d2),console[_0x4736(0x139)]('✅\x20'+_0x1990d2+_0x4736(0x310));else throw new Error('Failed\x20to\x20send\x20LLM\x20data\x20to\x20backend:\x20'+_0x1393c3['message']);return;}if(hasNativeSDK(_0x1990d2)){_0x2d3de1(_0x1990d2);const _0x46c78c=await _0x54244c[_0x4736(0x1ab)](initiateNativeAuth,_0x1990d2,_0xcdf6d4);_0x46c78c&&(_0x54244c[_0x4736(0x220)](_0x54244c[_0x4736(0x311)],_0x54244c[_0x4736(0x312)])?_0x109ba1[_0x4736(0x15b)](_0x54244c['tGXBZ'],_0x59f890):(_0x54244c['lgkvp'](_0x15954f,_0x17a539=>({..._0x17a539,[_0x1990d2]:{'userName':_0xcdf6d4,'connected':!![]}})),_0x54244c[_0x4736(0x313)](_0x318cf9,_0x5b42da=>({..._0x5b42da,[_0x1990d2]:!![]})),await _0x54244c[_0x4736(0x314)](_0x4f5d8a,_0x1990d2)));return;}_0x54244c[_0x4736(0x146)](_0x2d3de1,_0x1990d2);const _0x1d2910=await _0x54244c[_0x4736(0x315)](initiateOAuth,_0x1990d2,_0xcdf6d4);if(_0x1d2910){if(_0x54244c[_0x4736(0x316)](_0x54244c[_0x4736(0x317)],_0x54244c[_0x4736(0x318)]))_0x54244c[_0x4736(0x14b)](_0x5e5177,_0x1d2910),_0x5a1a64(_0x54244c['Heuyj']);else{_0x5bcca7[_0x4736(0x139)](_0x4af6d0[_0x4736(0x319)]),_0x4af6d0[_0x4736(0x31a)](_0x319b23,_0x4af6d0[_0x4736(0x31b)]),_0x4af6d0[_0x4736(0x31c)](_0x200d05,'verification'),_0x4af6d0[_0x4736(0x31d)](_0x5ab5ca,![]);return;}}}catch(_0xe14fce){if(_0x54244c['eTabn']===_0x54244c['eYmUm'])_0x54244c[_0x4736(0x29a)](_0x58b179,![]),!_0x2ccb22&&_0x449ee9();else{console[_0x4736(0x15b)]('Error\x20initiating\x20OAuth\x20for\x20'+_0x1990d2+':',_0xe14fce);return;}}else _0x54244c[_0x4736(0x31e)](_0x318cf9,_0x56b854=>({..._0x56b854,[_0x1990d2]:!_0x56b854[_0x1990d2]})),_0x54244c[_0x4736(0x2aa)](_0x15954f,_0xa7d566=>{if(_0x4af6d0[_0x4736(0x31f)](_0x4736(0x87),_0x4af6d0[_0x4736(0x320)])){const _0x1760ae={..._0xa7d566};return delete _0x1760ae[_0x1990d2],_0x1760ae;}else{const _0xbb5ada=_0x4af6d0[_0x4736(0x321)][_0x4736(0x165)]('|');let _0x1efb47=0x0;while(!![]){switch(_0xbb5ada[_0x1efb47++]){case'0':_0x2c19f1[_0x4736(0x169)]&&(_0x3f204c[_0x4736(0x139)](_0x4736(0x8),_0x56d7b9[_0x4736(0x169)]['inference']),_0x287d37[_0x4736(0x139)](_0x4af6d0['NvqJz'],_0x4e6c1d[_0x4736(0x169)]['storage']),_0x3975dd[_0x4736(0x139)](_0x4af6d0[_0x4736(0x322)],_0x100ad4[_0x4736(0x169)][_0x4736(0x16f)]),_0x41813d[_0x4736(0x139)](_0x4af6d0['NbiWl'],_0x18836b[_0x4736(0x169)][_0x4736(0x16d)]),_0x1a11ce[_0x4736(0x139)](_0x4af6d0[_0x4736(0x323)],_0x48e2a4['features'][_0x4736(0x16b)]),_0x53b4d9[_0x4736(0x139)](_0x4af6d0[_0x4736(0x324)],_0xc8fa8[_0x4736(0x169)]['databases']),_0x1f8634[_0x4736(0x139)](_0x4af6d0[_0x4736(0x325)],_0x186210[_0x4736(0x169)]['queryScores']));continue;case'1':_0x6923ed(0x19);continue;case'2':_0x4af6d0[_0x4736(0x31d)](_0x106255,_0x4af6d0[_0x4736(0x326)]);continue;case'3':_0x4d07ae[_0x4736(0x139)](_0x4af6d0[_0x4736(0x327)],_0x35338b[_0x4736(0x1b9)]);continue;case'4':_0x1c1beb['log'](_0x4af6d0['mOqnX'],_0x520de6[_0x4736(0x169)]);continue;}break;}}});}else _0x1034d9['error'](_0x54244c[_0x4736(0x328)],_0x113df4);},[_0x116319,_0xcdf6d4]),_0x1e3166=_0x54244c[_0x4736(0x315)](useCallback,_0x2a65ea=>{const _0x19a638={'VmzGx':function(_0x453613,_0x471b21){return _0x54244c[_0x4736(0x329)](_0x453613,_0x471b21);}};try{if(_0x54244c[_0x4736(0x2ee)](_0x54244c[_0x4736(0x32a)],_0x54244c[_0x4736(0x32a)]))return _0x19a638[_0x4736(0x32b)](_0x5aa9bb,_0x591a8a);else{const _0x10cff3=new URL(_0x2a65ea),_0x316153=_0x10cff3[_0x4736(0x240)][_0x4736(0x0)](_0x54244c[_0x4736(0x32c)]),_0xf16f4c=_0x10cff3[_0x4736(0x240)][_0x4736(0x0)](_0x54244c[_0x4736(0x32d)])||_0xd2b40c;_0x54244c['EKXWs'](_0x316153,_0xf16f4c)&&(_0x15954f(_0x250ef2=>({..._0x250ef2,[_0xf16f4c]:{'userName':_0xcdf6d4,'connected':!![]}})),_0x54244c[_0x4736(0x32e)](_0x318cf9,_0x10c603=>({..._0x10c603,[_0xf16f4c]:!![]})),_0x5a1a64(_0x54244c[_0x4736(0x236)]));}}catch(_0x239894){console['error']('Error\x20handling\x20OAuth\x20callback:',_0x239894);}},[_0xd2b40c,_0xcdf6d4]),_0x1d2806=_0x54244c[_0x4736(0x1d6)](useCallback,async _0x2d397c=>{const _0x3160cb={'VcMBU':_0x54244c[_0x4736(0x32f)],'UHIUB':function(_0x210fac,_0xd2b02d){return _0x54244c['Xtkhw'](_0x210fac,_0xd2b02d);},'eAqhq':function(_0x362c00,_0x577779){return _0x54244c['hWHeM'](_0x362c00,_0x577779);},'IskwR':function(_0x1c159e,_0x1c9eff){return _0x54244c[_0x4736(0x330)](_0x1c159e,_0x1c9eff);},'mJmrd':function(_0x42b3c4,_0x5cfbce){return _0x54244c['UjqPZ'](_0x42b3c4,_0x5cfbce);}};console[_0x4736(0x139)](_0x4736(0x331)+_0xd2b40c+_0x4736(0x332)),console[_0x4736(0x139)](_0x4736(0x333),_0x2d397c);if(_0xd2b40c){if(_0x54244c[_0x4736(0x334)](_0x54244c[_0x4736(0x335)],_0x54244c[_0x4736(0x336)])){var _0x4c4ad3;_0x5b4a10[_0x4736(0x15b)](_0x3160cb['VcMBU'],_0x358526);const _0x46067d=(_0x3160cb[_0x4736(0x337)](_0x5446ec,null)||_0x3160cb[_0x4736(0x337)](_0x39e41d,void 0x0)||_0x3160cb[_0x4736(0x337)](_0x4c4ad3=_0x1f2001[_0x4736(0x212)],null)||_0x4c4ad3===void 0x0?void 0x0:_0x4c4ad3[_0x4736(0x165)]('@')[0x0])||(_0x49e851===null||_0x3160cb[_0x4736(0x337)](_0x18f135,void 0x0)?void 0x0:_0x12b640['name'])||_0x4736(0xa1);_0x3160cb[_0x4736(0x338)](_0x2b5216,{'username':_0x46067d,'email':(_0x3160cb[_0x4736(0x339)](_0x10beaa,null)||_0x3160cb['mJmrd'](_0x243620,void 0x0)?void 0x0:_0x48ebfd[_0x4736(0x212)])||null,'id':null}),_0x3160cb[_0x4736(0x338)](_0x3f31c6,_0x46067d);}else{const _0x3190f8=_0x54244c[_0x4736(0x33a)][_0x4736(0x165)]('|');let _0x4b109a=0x0;while(!![]){switch(_0x3190f8[_0x4b109a++]){case'0':console[_0x4736(0x139)](_0x4736(0x33b)+_0xd2b40c+'\x20connection\x20stored\x20successfully');continue;case'1':_0x318cf9(_0x5591ea=>({..._0x5591ea,[_0xd2b40c]:!![]}));continue;case'2':_0x54244c[_0x4736(0x33c)](_0x15954f,_0x14098a=>({..._0x14098a,[_0xd2b40c]:{'userName':_0xcdf6d4,'connected':!![]}}));continue;case'3':await _0x54244c[_0x4736(0x26b)](_0x4f5d8a,_0xd2b40c);continue;case'4':_0x54244c[_0x4736(0x314)](_0x375114,_0x3dc4a2=>({..._0x3dc4a2,[_0xd2b40c]:_0x4736(0x113)}));continue;case'5':console[_0x4736(0x139)](_0x4736(0x33d)+_0xd2b40c);continue;}break;}}}console[_0x4736(0x139)](_0x54244c[_0x4736(0x33e)]),_0x54244c[_0x4736(0x33f)](_0x5e5177,''),_0x54244c[_0x4736(0x31e)](_0x5a1a64,_0x54244c[_0x4736(0x236)]);},[_0xd2b40c,_0xcdf6d4,_0x4f5d8a]),_0x56ece0=_0x54244c[_0x4736(0x1ab)](useCallback,async _0x4e950c=>{const _0x1ca361={'CnFBp':_0x4736(0x340),'vaYTx':_0x54244c[_0x4736(0x341)],'yzGfC':function(_0x3bbc11,_0x3a3028){return _0x54244c['mqZBD'](_0x3bbc11,_0x3a3028);},'WHOUK':function(_0x10d97f,_0x29f111){return _0x54244c[_0x4736(0x342)](_0x10d97f,_0x29f111);},'gEjXr':_0x54244c['kPdCl']};if(_0x54244c[_0x4736(0x343)]('tGDvn',_0x4736(0x344)))_0x2a1726['log'](_0x1ca361[_0x4736(0x345)],_0x4e1ecf[_0x4736(0x346)]['join'](',\x20'));else{_0xabd65b(_0x4e950c),setTemporaryPin(_0x4e950c),console[_0x4736(0x139)](_0x54244c[_0x4736(0x347)]);if(_0x54244c['ssBgm'](_0x55d03e,_0x2d0a47)){if(_0x54244c[_0x4736(0x348)]===_0x54244c[_0x4736(0x348)]){console[_0x4736(0x139)](_0x54244c['FaQRR']);try{await _0x54244c[_0x4736(0x349)](_0x507b0b,_0x4e950c),_0x54244c['yIDno'](_0x5a1a64,_0x54244c[_0x4736(0x34a)]);}catch(_0xa08716){console['error'](_0x54244c[_0x4736(0x34b)],_0xa08716),_0x54244c['mqZBD'](_0x5a1a64,'persona'),_0x54244c[_0x4736(0x34c)](_0x515483,_0x54244c['fsptd']),_0x54244c['NjHMU'](_0x4fbcfa,!![]);}}else _0x45918f[_0x4736(0x139)](_0x1ca361[_0x4736(0x34d)]),_0x1ca361[_0x4736(0x34e)](_0x546f15,!![]),_0x1ca361[_0x4736(0x34f)](_0x115b6d,_0x293d7f),_0x1ca361['yzGfC'](_0x7677c5,_0x1ca361[_0x4736(0x350)]);}else console[_0x4736(0x139)](_0x54244c['xcVxK']),_0x54244c['KdCeR'](_0x5a1a64,_0x54244c[_0x4736(0x34a)]),_0x54244c[_0x4736(0x351)](_0x515483,_0x54244c[_0x4736(0x352)]),_0x4fbcfa(!![]);console[_0x4736(0x139)](_0x4736(0x353));}},[_0x55d03e,_0x2d0a47]),_0xfd0040=async(_0x6dcfef,_0x5037f7)=>{const _0x2129a3={'vHIXO':'HPIBk','Ysfyd':_0x54244c['ttJph'],'jbtZO':_0x54244c[_0x4736(0x268)],'WurGA':_0x54244c[_0x4736(0x354)],'XDape':function(_0x4ad62c,_0xdedd00){return _0x54244c[_0x4736(0x355)](_0x4ad62c,_0xdedd00);},'uUHFk':_0x54244c[_0x4736(0x27a)],'Ztciv':function(_0x302520,_0x4023c7){return _0x302520(_0x4023c7);}};try{_0x54244c[_0x4736(0x266)](_0x515483,_0x54244c['tpvgH']),_0x403d6a(0xf);const _0x40058d=_0x5037f7||await _0x54244c[_0x4736(0x2c0)](getJWT);if(!_0x40058d){console['error'](_0x4736(0x356));throw new Error(_0x54244c[_0x4736(0x357)]);}console['log'](_0x54244c[_0x4736(0x358)],_0x6dcfef),console[_0x4736(0x139)](_0x54244c[_0x4736(0x359)],_0x40058d?_0x40058d[_0x4736(0x18e)](0x0,0x14)+_0x4736(0x251):_0x54244c[_0x4736(0x178)]);const _0x112144=await getOnairosUsername(),_0x6cc429=_0x112144||(_0x54244c[_0x4736(0x35a)](_0x433d63,null)||_0x54244c[_0x4736(0x259)](_0x433d63,void 0x0)?void 0x0:_0x433d63[_0x4736(0x272)])||(_0x54244c[_0x4736(0x171)](_0x433d63,null)||_0x433d63===void 0x0?void 0x0:_0x433d63[_0x4736(0x189)])||_0xcdf6d4||_0x54244c[_0x4736(0x35b)],_0x1a43e8=await AsyncStorage[_0x4736(0x15f)](_0x54244c[_0x4736(0x160)]),_0x3d99cf=_0x1a43e8?JSON[_0x4736(0x17d)](_0x1a43e8):[];console['log'](_0x54244c[_0x4736(0x35c)],_0x3d99cf);const _0x596215=await _0x54244c[_0x4736(0x35d)](getEncryptedPinForAPI)[_0x4736(0x35e)](_0x33dff7=>{const _0x897a8b={'EDSKH':_0x4736(0xae)};if(_0x2129a3[_0x4736(0x35f)]===_0x2129a3[_0x4736(0x360)]){_0x5a19fa[_0x4736(0x15b)](_0x897a8b['EDSKH'],_0x5f5201);throw _0x2f528d;}else return console[_0x4736(0x280)](_0x2129a3[_0x4736(0x361)],_0x33dff7),null;}),_0x7b035d={'socketId':_0x6dcfef,'username':_0x6cc429,'email':(_0x433d63===null||_0x433d63===void 0x0?void 0x0:_0x433d63[_0x4736(0x212)])||null,'modelKey':null,'connectedPlatforms':_0x3d99cf,'platformConnections':_0x4a3858,..._0x596215&&{'encryptedPin':_0x596215,'hasPinData':!![]}};console[_0x4736(0x139)](_0x54244c[_0x4736(0x362)],_0x7b035d);const _0x2c8465=await startEnochTrainingWithYouTubeCheck(_0x7b035d);console[_0x4736(0x139)](_0x54244c[_0x4736(0x363)],_0x2c8465);if(_0x2c8465[_0x4736(0x364)]||_0x54244c[_0x4736(0x365)](_0x2c8465[_0x4736(0x33)],_0x54244c['LoAJK'])){console[_0x4736(0x139)](_0x54244c['qYZar']),_0x54244c[_0x4736(0x366)](_0x13cb98,_0x54244c[_0x4736(0x367)]),_0x54244c['ZaTYO'](_0x587bd5,_0x2c8465),_0x54244c[_0x4736(0x368)](_0x29622f,!![]),_0x54244c['vhplc'](_0x515483,_0x4736(0xc4)),_0x4fbcfa(!![]),_0x54244c[_0x4736(0x369)](_0x143b77);return;}if(_0x2c8465['success']){console['log'](_0x4736(0x2ff),_0x2c8465[_0x4736(0x1b9)]),console[_0x4736(0x139)](_0x54244c['IWoCz'],_0x2c8465[_0x4736(0x169)]);if(_0x2c8465[_0x4736(0x169)]){if(_0x54244c[_0x4736(0x36a)]===_0x54244c[_0x4736(0x36a)]){const _0x327ff6=_0x54244c[_0x4736(0x36b)][_0x4736(0x165)]('|');let _0x3101d9=0x0;while(!![]){switch(_0x327ff6[_0x3101d9++]){case'0':console[_0x4736(0x139)](_0x4736(0x85),_0x2c8465[_0x4736(0x169)]['queryScores']);continue;case'1':console[_0x4736(0x139)](_0x4736(0x36c),_0x2c8465[_0x4736(0x169)][_0x4736(0x16d)]);continue;case'2':console['log'](_0x54244c[_0x4736(0x152)],_0x2c8465[_0x4736(0x169)][_0x4736(0x167)]);continue;case'3':console[_0x4736(0x139)](_0x54244c[_0x4736(0x2fc)],_0x2c8465[_0x4736(0x169)][_0x4736(0x346)]);continue;case'4':console[_0x4736(0x139)](_0x54244c[_0x4736(0x36d)],_0x2c8465[_0x4736(0x169)][_0x4736(0x16f)]);continue;case'5':console[_0x4736(0x139)](_0x54244c[_0x4736(0x2fa)],_0x2c8465[_0x4736(0x169)][_0x4736(0x16a)]);continue;case'6':console[_0x4736(0x139)]('📊\x20Training\x20type:',_0x2c8465['features'][_0x4736(0x16b)]);continue;}break;}}else{const _0x3df433=_0x2129a3[_0x4736(0x36e)]['split']('|');let _0x4d582c=0x0;while(!![]){switch(_0x3df433[_0x4d582c++]){case'0':return;case'1':_0x32d8bc[_0x4736(0x139)](_0x4736(0x36f)+_0x3794b7[_0x4736(0x208)]+_0x4736(0x27c));continue;case'2':_0x2129a3['XDape'](_0x153523,_0x2129a3[_0x4736(0x370)]);continue;case'3':_0x2129a3[_0x4736(0x371)](_0x5bc8f0,!![]);continue;case'4':_0x32e83c(_0x5a5bde[_0x4736(0x27e)]);continue;case'5':_0x2129a3[_0x4736(0x372)](_0x174905,_0x360436[_0x4736(0x27d)](_0x816c51=>_0x816c51[_0x4736(0x92)]));continue;}break;}}}_0x54244c[_0x4736(0x373)](_0x515483,_0x4736(0x374)),_0x54244c[_0x4736(0x273)](_0x403d6a,0x19);}else console[_0x4736(0x15b)](_0x54244c[_0x4736(0x375)],_0x2c8465[_0x4736(0x15b)]),_0x54244c[_0x4736(0x376)](_0x515483,_0x4736(0x377)+(_0x2c8465[_0x4736(0x15b)]||_0x54244c[_0x4736(0x378)])),_0x54244c[_0x4736(0x379)](_0x4fbcfa,!![]),_0x143b77();}catch(_0x58fcfe){console['error'](_0x54244c[_0x4736(0x37a)],_0x58fcfe),_0x54244c[_0x4736(0x288)](_0x515483,_0x4736(0x377)+(_0x58fcfe instanceof Error?_0x58fcfe['message']:_0x4736(0x37b))),_0x54244c['YqHoy'](_0x4fbcfa,!![]),_0x143b77();}},_0x507b0b=async _0x4bdb45=>{const _0x4e6b5a={'SJaAc':function(_0x20ff1b,_0x39782c){return _0x20ff1b(_0x39782c);}};if(_0x54244c[_0x4736(0x37c)]('GJCuk',_0x4736(0x37d)))try{if(_0x54244c[_0x4736(0x365)](_0x54244c[_0x4736(0x37e)],_0x54244c[_0x4736(0x37f)]))_0x28e011[_0x4736(0x212)]=_0x14307d,_0x1bd916['username']=_0x37c7b7||_0x3ea584[_0x4736(0x165)]('@')[0x0];else{console[_0x4736(0x139)](_0x54244c['fQPAE']),console[_0x4736(0x139)](_0x54244c[_0x4736(0x359)],(_0x54244c[_0x4736(0x380)](_0x259429,null)||_0x54244c['cYbph'](_0x259429,void 0x0)?void 0x0:_0x259429[_0x4736(0x18e)](0x0,0x14))+'...');if(!_0x2d0a47){if(_0x54244c[_0x4736(0x1d5)](_0x54244c['qoCUL'],_0x54244c[_0x4736(0x381)]))_0x54244c[_0x4736(0x2f6)](_0x46a2f2,_0x228f78[_0x4736(0x182)]),_0x4bbe6e['current']=null;else throw new Error(_0x54244c[_0x4736(0x250)]);}console[_0x4736(0x139)](_0x54244c[_0x4736(0x24e)]),console[_0x4736(0x139)](_0x54244c[_0x4736(0x252)],_0x2d0a47),console[_0x4736(0x139)](_0x54244c[_0x4736(0x382)]);}}catch(_0x562807){if(_0x54244c['OerWo']===_0x4736(0x383)){console[_0x4736(0x15b)](_0x54244c[_0x4736(0x384)],_0x562807);throw _0x562807;}else try{const _0x12ac3e=_0x54244c[_0x4736(0x385)][_0x4736(0x165)]('|');let _0x47efa3=0x0;while(!![]){switch(_0x12ac3e[_0x47efa3++]){case'0':_0x148113[_0x4736(0x139)](_0x54244c['InxZF']);continue;case'1':_0x2f1f33[_0x4736(0x139)](_0x54244c[_0x4736(0x382)]);continue;case'2':_0x4c711a[_0x4736(0x139)](_0x4736(0x39),_0x1bc335);continue;case'3':_0x24f39a[_0x4736(0x139)](_0x54244c[_0x4736(0x24f)]);continue;case'4':_0x4f0c84[_0x4736(0x139)](_0x54244c[_0x4736(0x359)],(_0x54244c[_0x4736(0x386)](_0x3fb7c0,null)||_0x54244c[_0x4736(0x387)](_0x51dff1,void 0x0)?void 0x0:_0x41efb8[_0x4736(0x18e)](0x0,0x14))+'...');continue;case'5':if(!_0x55b159)throw new _0x272325(_0x54244c[_0x4736(0x250)]);continue;}break;}}catch(_0x45824f){_0x4e85c9['error'](_0x54244c['RjUFB'],_0x45824f);throw _0x45824f;}}else _0x4e6b5a[_0x4736(0x388)](_0x43abe0,![]);},_0x4c9d20=async()=>{const _0x3d2310={'xDkGu':_0x54244c[_0x4736(0x389)],'HpGfV':'💾\x20Storage\x20method:','GJqlU':_0x54244c['IHxkI'],'VzfeZ':_0x54244c[_0x4736(0x38a)],'PhLnJ':_0x54244c[_0x4736(0x38b)],'vbmtY':function(_0x56fd60,_0x1d6d5b){return _0x54244c['lKBmV'](_0x56fd60,_0x1d6d5b);},'xfbQi':'Unknown\x20error','okQBh':function(_0x35b8c1,_0xc93a15){return _0x54244c[_0x4736(0x149)](_0x35b8c1,_0xc93a15);},'OIAav':_0x54244c[_0x4736(0x22e)],'LJEPk':function(_0x1ad356,_0x494f31){return _0x1ad356(_0x494f31);},'bDNCZ':function(_0x3c43ff,_0x5eadd9){return _0x54244c[_0x4736(0x38c)](_0x3c43ff,_0x5eadd9);},'zoZrF':function(_0x5dd93f,_0x1c0e05){return _0x54244c[_0x4736(0x38d)](_0x5dd93f,_0x1c0e05);},'HOMqs':function(_0x934202,_0x320524){return _0x54244c[_0x4736(0x38e)](_0x934202,_0x320524);},'gCHDz':function(_0x44d716,_0x52a869){return _0x54244c[_0x4736(0x38f)](_0x44d716,_0x52a869);},'ioFfO':function(_0x28344f,_0x48791e){return _0x28344f(_0x48791e);},'TIUkW':_0x54244c[_0x4736(0x390)],'wMmre':_0x54244c[_0x4736(0x391)],'lyARn':function(_0x21e904,_0x154d46){return _0x54244c[_0x4736(0x392)](_0x21e904,_0x154d46);},'nMAiX':function(_0x36fe8f,_0x506dda){return _0x54244c['uuCDh'](_0x36fe8f,_0x506dda);},'qVKeZ':function(_0x48da2b,_0x481b8e){return _0x48da2b===_0x481b8e;},'SQWMb':function(_0x10b74e,_0x41887e){return _0x54244c[_0x4736(0x393)](_0x10b74e,_0x41887e);},'UdzDF':function(_0x1907d6,_0x5378f8){return _0x54244c[_0x4736(0x2a0)](_0x1907d6,_0x5378f8);},'aLNTm':function(_0x3cb9a3,_0x39e35c){return _0x54244c[_0x4736(0x394)](_0x3cb9a3,_0x39e35c);},'QLDiQ':_0x54244c[_0x4736(0x395)],'fvEEq':function(_0x2831d0,_0x4e714a){return _0x54244c['UaEKa'](_0x2831d0,_0x4e714a);},'odUiC':function(_0x2ef29d,_0x5197fb){return _0x54244c[_0x4736(0x396)](_0x2ef29d,_0x5197fb);},'YMEel':_0x54244c[_0x4736(0x397)],'poiDz':'🔄\x20Socket\x20ready\x20for\x20persona\x20display\x20with\x20token:','GlmXN':_0x54244c[_0x4736(0x178)],'PGEfh':_0x4736(0x14),'MQetL':function(_0x21b6c1,_0x358516){return _0x54244c['FKvTi'](_0x21b6c1,_0x358516);},'OZImA':'Waiting\x20for\x20training\x20to\x20start\x20from\x20connector→PIN\x20transition','tNzlD':_0x54244c[_0x4736(0x17a)],'oKgGx':_0x54244c[_0x4736(0x398)],'qyzjv':function(_0x625956){return _0x54244c[_0x4736(0x399)](_0x625956);},'cIKzg':_0x54244c[_0x4736(0x357)],'ImtgD':function(_0x197c84,_0x1cc82d){return _0x54244c[_0x4736(0x2e3)](_0x197c84,_0x1cc82d);},'qIRTS':_0x54244c[_0x4736(0x39a)],'UxzRX':_0x54244c['yHhqd'],'sirNK':_0x54244c[_0x4736(0x39b)],'LQqLG':function(_0x46bf2e,_0x340cfd){return _0x54244c['HCMHe'](_0x46bf2e,_0x340cfd);},'IsrsC':_0x54244c['WSbYp'],'Zmtcv':_0x54244c[_0x4736(0x39c)],'EGBDM':_0x54244c[_0x4736(0x39d)],'BpyoJ':_0x54244c[_0x4736(0x39e)],'pSaLH':_0x54244c[_0x4736(0x39f)],'vhxXW':_0x4736(0x3a0),'vIWCl':function(_0x73e975){return _0x54244c['WZckB'](_0x73e975);},'QBAnK':_0x54244c['QZLMM'],'NiwzN':function(_0x1917ae,_0xfd025a){return _0x1917ae===_0xfd025a;},'lYbNc':_0x54244c['pEeNJ'],'nLtsN':_0x4736(0x3a1),'uBdTf':_0x54244c[_0x4736(0x3a2)],'XplyG':_0x4736(0x3a3),'Zinot':function(_0x5f11e4,_0x3d2094){return _0x54244c[_0x4736(0x31e)](_0x5f11e4,_0x3d2094);},'qRTai':_0x4736(0x3a4),'XuOwC':_0x54244c['dzLDx'],'vhRkT':_0x54244c[_0x4736(0x152)],'DBOTo':_0x54244c[_0x4736(0x2fb)],'HZMXG':_0x4736(0x85),'mNyxy':_0x4736(0x3a5),'PuHwD':_0x54244c['QfKLv'],'FsMgc':_0x54244c[_0x4736(0x3a6)],'oruiE':function(_0xac3eed,_0x1e8a31){return _0x54244c['gqXqV'](_0xac3eed,_0x1e8a31);},'NoDWv':function(_0x623359,_0x38068d){return _0x54244c['OmjlW'](_0x623359,_0x38068d);},'pDArM':'OyCPE','twzBT':_0x54244c[_0x4736(0x3a7)],'gJyqp':_0x54244c[_0x4736(0x3a8)],'SNqsk':_0x4736(0x3a9),'fzUAH':_0x54244c[_0x4736(0x3aa)],'mNeZR':function(_0x1f97d9,_0x4f3104){return _0x54244c[_0x4736(0x3ab)](_0x1f97d9,_0x4f3104);},'OUDVO':function(_0x34e131,_0x5d3363){return _0x54244c[_0x4736(0x3ac)](_0x34e131,_0x5d3363);},'aKsEQ':_0x54244c[_0x4736(0x3ad)],'CYYch':function(_0x213cb9,_0x4f22a2){return _0x54244c[_0x4736(0x33f)](_0x213cb9,_0x4f22a2);},'XvslS':_0x4736(0x3ae),'yPGNO':_0x54244c[_0x4736(0x269)],'XWrzn':function(_0x32917b,_0x3ba3ac){return _0x54244c[_0x4736(0x3af)](_0x32917b,_0x3ba3ac);},'xZMbU':function(_0x50a358,_0x37d2eb){return _0x54244c['gnYRn'](_0x50a358,_0x37d2eb);},'yiOBC':function(_0x231a79,_0x275b8a){return _0x54244c['oWkWs'](_0x231a79,_0x275b8a);},'iGbId':_0x54244c['yYWAA'],'laoFu':function(_0x5e9b8f,_0x229aa6){return _0x54244c['ZApfz'](_0x5e9b8f,_0x229aa6);},'kfJoG':function(_0x3e1c9d,_0x42ee28){return _0x54244c[_0x4736(0x3b0)](_0x3e1c9d,_0x42ee28);},'gDukO':function(_0x270107,_0x3bdba3){return _0x270107===_0x3bdba3;},'DlrIy':function(_0x25768,_0x2ade0b){return _0x54244c[_0x4736(0x38e)](_0x25768,_0x2ade0b);},'JfDDT':function(_0x3b96bb,_0x56cd4e){return _0x54244c[_0x4736(0x3b1)](_0x3b96bb,_0x56cd4e);}};if(_0x54244c['QeWtr']('luUhq',_0x54244c['aIvqf'])){const _0x25bfa6=_0x4736(0x3b2)[_0x4736(0x165)]('|');let _0x8d3c25=0x0;while(!![]){switch(_0x25bfa6[_0x8d3c25++]){case'0':_0x4aabe0[_0x4736(0x139)](_0x4736(0xbb),_0x56ca52['inference']);continue;case'1':_0x487f90[_0x4736(0x139)](_0x3d2310[_0x4736(0x3b3)],_0x327e4d[_0x4736(0x1b9)]);continue;case'2':_0xd7ce36['log'](_0x3d2310[_0x4736(0x3b4)],_0x5ca07c[_0x4736(0x16a)]);continue;case'3':_0x461364[_0x4736(0x139)](_0x3d2310['GJqlU'],_0x1eb774[_0x4736(0x16d)]);continue;case'4':_0x565df1['databases']&&_0x53e74b[_0x4736(0x2a2)](_0x4b9f76[_0x4736(0x346)])&&_0x1955b5[_0x4736(0x139)](_0x4736(0x340),_0x1becca[_0x4736(0x346)]['join'](',\x20'));continue;case'5':_0x5c3381[_0x4736(0x3b5)]&&_0x57d04b[_0x4736(0x139)](_0x3d2310[_0x4736(0x3b6)]);continue;}break;}}else{_0x403d6a(0x0),_0x54244c[_0x4736(0x158)](_0x515483,'Initializing'),_0x54244c['ZaTYO'](_0x3a2dd1,![]),_0x54244c[_0x4736(0x3b7)](_0x4fbcfa,![]),_0x54244c[_0x4736(0x3b8)](_0x244fe2);try{var _0x4d49d3;console[_0x4736(0x139)](_0x4736(0x3b9)),console[_0x4736(0x139)](_0x4736(0x3ba));const _0x5e7ace=await _0x54244c[_0x4736(0x3bb)](_0x188285);if(!_0x5e7ace){if(_0x54244c[_0x4736(0x3bc)](_0x4736(0x3bd),_0x54244c[_0x4736(0x3be)]))throw new Error(_0x54244c['bCexb']);else _0x17e969['error'](_0x3d2310[_0x4736(0x3bf)],_0x11c8b1),_0x433dc3(_0x4736(0x377)+(_0x3d2310['vbmtY'](_0x3acc31,_0x47da25)?_0x200817[_0x4736(0x1b9)]:_0x3d2310[_0x4736(0x3c0)])),_0x3d2310['okQBh'](_0x2dca1c,!![]),_0x9d8679();}_0x54244c[_0x4736(0x15d)](_0x5422a0,_0x5e7ace),console['log'](_0x54244c['GsSRu'],_0x5e7ace[_0x4736(0x18e)](0x0,0x14)+_0x4736(0x251)),console[_0x4736(0x139)](_0x54244c[_0x4736(0x3c1)],_0x5e7ace[_0x4736(0x208)]);const _0x2a3616=await getJWT();console[_0x4736(0x139)](_0x54244c[_0x4736(0x3c2)],_0x2a3616?_0x2a3616['substring'](0x0,0x14)+_0x4736(0x251):_0x54244c[_0x4736(0x3c3)]);if(!_0x433d63){var _0x11bf21;console[_0x4736(0x139)](_0x54244c['HXoqG']);const _0x521164=await _0x54244c[_0x4736(0x232)](getOnairosUsername),_0x5d3b69=_0x521164||(_0x54244c[_0x4736(0x1a3)](_0x3a415c,null)||_0x3a415c===void 0x0||_0x54244c[_0x4736(0x3c4)](_0x11bf21=_0x3a415c[_0x4736(0x212)],null)||_0x11bf21===void 0x0?void 0x0:_0x11bf21[_0x4736(0x165)]('@')[0x0])||(_0x54244c[_0x4736(0x3c5)](_0x3a415c,null)||_0x54244c[_0x4736(0x3c6)](_0x3a415c,void 0x0)?void 0x0:_0x3a415c[_0x4736(0x189)])||_0x54244c[_0x4736(0x35b)],_0x27d627={'username':_0x5d3b69,'email':(_0x3a415c===null||_0x3a415c===void 0x0?void 0x0:_0x3a415c[_0x4736(0x212)])||null,'id':null};_0x54244c[_0x4736(0x2e2)](_0x33bc65,_0x27d627),_0x54244c[_0x4736(0x3c7)](_0x18cd6b,_0x5d3b69),console[_0x4736(0x139)](_0x54244c[_0x4736(0x3c8)],_0x27d627),await new Promise(_0x1cb265=>setTimeout(()=>_0x1cb265(),0xc8));}const _0x4e29a4=_0x54244c[_0x4736(0x3c9)](_0x433d63,{'username':_0xcdf6d4||(_0x3a415c===null||_0x3a415c===void 0x0||_0x54244c[_0x4736(0x3ca)](_0x4d49d3=_0x3a415c[_0x4736(0x212)],null)||_0x54244c['ulmpn'](_0x4d49d3,void 0x0)?void 0x0:_0x4d49d3[_0x4736(0x165)]('@')[0x0])||(_0x3a415c===null||_0x3a415c===void 0x0?void 0x0:_0x3a415c[_0x4736(0x189)])||_0x54244c['zbmwm'],'email':(_0x54244c['EBkph'](_0x3a415c,null)||_0x54244c['wbJvS'](_0x3a415c,void 0x0)?void 0x0:_0x3a415c['email'])||null,'id':null});if(!_0x5e7ace){if(_0x4736(0xe2)!==_0x54244c[_0x4736(0x3cb)])_0xcd7823(![]),_0x4310bd['current']=![];else{console[_0x4736(0x15b)](_0x54244c[_0x4736(0x3cc)]);throw new Error(_0x54244c['Tryxy']);}}console[_0x4736(0x139)](_0x4736(0x3cd)),console[_0x4736(0x139)](_0x54244c[_0x4736(0x3ce)],_0x4e29a4),console[_0x4736(0x139)]('🔑\x20Token\x20available:',!!_0x5e7ace),console['log'](_0x54244c[_0x4736(0x3cf)]),console[_0x4736(0x139)](_0x54244c['wSgKJ'],Platform['OS']),console[_0x4736(0x139)](_0x54244c[_0x4736(0x3d0)]),_0x54244c['dyAeg'](_0x515483,_0x54244c[_0x4736(0x3d1)]),_0x403d6a(0x5),_0x1955c8[_0x4736(0x182)]=_0x54244c[_0x4736(0x1ab)](io,API_CONFIG['BASE_URL'],{'transports':[_0x4736(0x112),_0x54244c[_0x4736(0x3d2)]],'autoConnect':![],'timeout':0x3a98,'reconnection':!![],'reconnectionAttempts':0x3,'reconnectionDelay':0x3e8,'forceNew':!![]}),console[_0x4736(0x139)](_0x4736(0x3d3),{'connected':_0x1955c8['current'][_0x4736(0x113)],'id':_0x1955c8[_0x4736(0x182)]['id'],'disconnected':_0x1955c8[_0x4736(0x182)][_0x4736(0x19b)]}),_0x1955c8[_0x4736(0x182)]['on'](_0x54244c[_0x4736(0x236)],()=>{var _0x2c7015,_0x19e4b9,_0x36a62b,_0x776bbc;console[_0x4736(0x139)](_0x3d2310[_0x4736(0x3d4)]),console[_0x4736(0x139)](_0x3d2310['wMmre'],{'id':_0x3d2310[_0x4736(0x3d5)](_0x2c7015=_0x1955c8[_0x4736(0x182)],null)||_0x3d2310[_0x4736(0x3d6)](_0x2c7015,void 0x0)?void 0x0:_0x2c7015['id'],'connected':_0x3d2310['nMAiX'](_0x19e4b9=_0x1955c8['current'],null)||_0x3d2310[_0x4736(0x3d7)](_0x19e4b9,void 0x0)?void 0x0:_0x19e4b9[_0x4736(0x113)],'transport':_0x3d2310[_0x4736(0x3d8)](_0x36a62b=_0x1955c8[_0x4736(0x182)],null)||_0x3d2310[_0x4736(0x3d7)](_0x36a62b,void 0x0)||_0x3d2310[_0x4736(0x3d9)](_0x36a62b=_0x36a62b['io'],null)||_0x3d2310[_0x4736(0x3da)](_0x36a62b,void 0x0)||_0x3d2310[_0x4736(0x3db)](_0x36a62b=_0x36a62b[_0x4736(0x186)],null)||_0x3d2310[_0x4736(0x3d5)](_0x36a62b,void 0x0)||_0x3d2310[_0x4736(0x3d5)](_0x36a62b=_0x36a62b[_0x4736(0x187)],null)||_0x3d2310[_0x4736(0x3dc)](_0x36a62b,void 0x0)?void 0x0:_0x36a62b[_0x4736(0x189)]}),_0x3d2310['okQBh'](_0x15de8b,!![]),_0x3d2310['aLNTm'](_0x515483,_0x3d2310[_0x4736(0x3dd)]),_0x3d2310[_0x4736(0x3de)](_0x403d6a,0xa);const _0x6b884a=_0x3d2310[_0x4736(0x3df)](_0x776bbc=_0x1955c8[_0x4736(0x182)],null)||_0x3d2310[_0x4736(0x3db)](_0x776bbc,void 0x0)?void 0x0:_0x776bbc['id'];console[_0x4736(0x139)](_0x4736(0x11),_0x6b884a);if(_0x6b884a){if(_0x3d2310[_0x4736(0x3e0)]===_0x3d2310[_0x4736(0x3e0)])console[_0x4736(0x139)](_0x3d2310[_0x4736(0x3e1)],_0x5e7ace?_0x5e7ace['substring'](0x0,0x14)+_0x4736(0x251):_0x3d2310[_0x4736(0x3e2)]),console[_0x4736(0x139)](_0x3d2310[_0x4736(0x3e3)]),_0x3d2310[_0x4736(0x3e4)](_0x515483,_0x3d2310[_0x4736(0x3e5)]);else{_0x3d5aab['error'](_0x3d2310[_0x4736(0x3e6)],_0x156d4d),_0x3d2310[_0x4736(0x3e7)](_0x6b6ed4,{}),_0x4f830({}),_0x3d2310[_0x4736(0x3e8)](_0x8cd31a,{});const _0x448b9e=(_0x3d2310[_0x4736(0x3db)](_0x56188f,null)||_0x3d2310[_0x4736(0x3dc)](_0x8392e1,void 0x0)?void 0x0:_0x45f4e9['email'])||(_0x3d2310[_0x4736(0x3d8)](_0x1ee036,null)||_0x3d2310[_0x4736(0x3db)](_0x3f1b57,void 0x0)?void 0x0:_0x213d61[_0x4736(0x189)])||_0x4736(0x221)+_0x3f5232['floor'](_0x3d2310[_0x4736(0x3e9)](_0x118007['random'](),0x2710));_0x3d2310['ioFfO'](_0x245b23,_0x448b9e);}}else console[_0x4736(0x15b)](_0x3d2310[_0x4736(0x3ea)]),_0x3d2310[_0x4736(0x3e8)](_0x515483,_0x3d2310[_0x4736(0x3eb)]),_0x3d2310['aLNTm'](_0x4fbcfa,!![]),_0x3d2310['qyzjv'](_0x143b77);}),_0x1955c8[_0x4736(0x182)]['on'](_0x4736(0x1e7),_0x2f073e=>{var _0x3680a5;console[_0x4736(0x139)](_0x54244c[_0x4736(0x3ec)],_0x2f073e),console['log'](_0x54244c[_0x4736(0x1a2)],{'reason':_0x2f073e,'wasConnected':_0x4c10e9,'socketId':_0x54244c[_0x4736(0x38e)](_0x3680a5=_0x1955c8[_0x4736(0x182)],null)||_0x54244c['eOzJS'](_0x3680a5,void 0x0)?void 0x0:_0x3680a5['id']}),_0x54244c['bMUop'](_0x15de8b,![]);}),_0x1955c8['current']['on'](_0x54244c[_0x4736(0x3ed)],_0x4dec80=>{const _0x38ddb7={'rslRP':_0x3d2310[_0x4736(0x3ee)]};if(_0x3d2310[_0x4736(0x3ef)](_0x4736(0xd4),_0x3d2310['qIRTS'])){_0x201139[_0x4736(0x15b)](_0x4736(0x356));throw new _0x5c2408(_0x38ddb7[_0x4736(0x3f0)]);}else console[_0x4736(0x139)](_0x3d2310[_0x4736(0x3f1)],_0x4dec80,_0x3d2310[_0x4736(0x3f2)]),_0x3d2310[_0x4736(0x3f3)](_0x15de8b,!![]);}),_0x1955c8['current']['on'](_0x4736(0x3f4),_0x18114f=>{console[_0x4736(0x139)](_0x4736(0x3f5),_0x18114f),_0x54244c[_0x4736(0x158)](_0x515483,_0x4736(0x3f6)+_0x18114f+'/3)');}),_0x1955c8[_0x4736(0x182)]['on']('reconnect_error',_0x4d0bc3=>{console[_0x4736(0x15b)](_0x3d2310[_0x4736(0x3f7)],_0x4d0bc3);}),_0x1955c8[_0x4736(0x182)]['on'](_0x54244c[_0x4736(0x3f8)],()=>{_0x3d2310[_0x4736(0x3d6)](_0x4736(0x3f9),_0x3d2310[_0x4736(0x3fa)])?(_0x5d521c['error'](_0x3d2310['Zmtcv'],_0x55f514),_0x15d79b(_0x3d2310[_0x4736(0x3fb)])):(console[_0x4736(0x15b)](_0x3d2310[_0x4736(0x3fc)]),_0x3d2310[_0x4736(0x3de)](_0x515483,_0x3d2310[_0x4736(0x3fd)]),_0x4fbcfa(!![]),_0x3d2310[_0x4736(0x3fe)](_0x143b77));}),_0x1955c8[_0x4736(0x182)]['on'](_0x54244c[_0x4736(0x3ff)],_0x1bda30=>{const _0x159152={'XXRtJ':_0x54244c[_0x4736(0x400)]};if(_0x54244c[_0x4736(0x401)](_0x54244c[_0x4736(0x402)],_0x54244c['KaQqP'])){_0x39c558[_0x4736(0x15b)](_0x159152[_0x4736(0x403)],_0x4bcac0);throw _0x4c6967;}else{const _0x46caec=_0x4736(0x404)[_0x4736(0x165)]('|');let _0x51355d=0x0;while(!![]){switch(_0x46caec[_0x51355d++]){case'0':console[_0x4736(0x15b)](_0x54244c['FGCgK'],_0x1bda30);continue;case'1':_0x4fbcfa(!![]);continue;case'2':_0x54244c[_0x4736(0x366)](_0x515483,_0x54244c[_0x4736(0x398)]);continue;case'3':console[_0x4736(0x15b)](_0x4736(0x405),{'message':_0x1bda30[_0x4736(0x1b9)],'name':_0x1bda30['name'],'stack':_0x1bda30[_0x4736(0x406)],'errorObject':_0x1bda30});continue;case'4':_0x143b77();continue;}break;}}}),_0x1955c8[_0x4736(0x182)]['on'](_0x54244c[_0x4736(0x407)],_0x3cb092=>{const _0x58a271={'EvBCa':_0x3d2310[_0x4736(0x408)],'MOpYh':function(_0x485482){return _0x485482();}};if(_0x3d2310['NiwzN'](_0x3d2310[_0x4736(0x409)],_0x3d2310[_0x4736(0x40a)]))return()=>{_0x5a5697[_0x4736(0x182)]&&(_0x40200b['log'](_0x58a271[_0x4736(0x40b)]),_0x16ad9a[_0x4736(0x182)][_0x4736(0x1e7)](),_0x180b15[_0x4736(0x182)]=null),_0x58a271[_0x4736(0x40c)](_0xc42823);};else console[_0x4736(0x139)](_0x3d2310[_0x4736(0x40d)],_0x3cb092),_0x515483(_0x3d2310[_0x4736(0x40e)]),_0x3d2310[_0x4736(0x40f)](_0x403d6a,0x3c);}),_0x1955c8[_0x4736(0x182)]['on'](_0x4736(0x410),_0x305434=>{const _0x48b505=_0x54244c[_0x4736(0x411)][_0x4736(0x165)]('|');let _0x35167e=0x0;while(!![]){switch(_0x48b505[_0x35167e++]){case'0':console['log'](_0x54244c['MqyOz'],_0x305434);continue;case'1':_0x515483(_0x4736(0x412));continue;case'2':_0x54244c[_0x4736(0x33f)](_0xe3f9dd,_0x305434[_0x4736(0x413)]);continue;case'3':_0x403d6a(0x50);continue;case'4':_0x54244c[_0x4736(0x414)](_0x1038e1,_0x305434[_0x4736(0x415)]);continue;}break;}}),_0x1955c8[_0x4736(0x182)]['on'](_0x54244c[_0x4736(0x416)],_0x1430b2=>{const _0x213bf9={'yyxIX':'🍎\x20Get\x20Started\x20pressed\x20(Apple\x20user)\x20-\x20skipping\x20signin,\x20going\x20to\x20platforms'};console[_0x4736(0x139)](_0x54244c[_0x4736(0x417)],_0x1430b2);if(_0x1430b2['completed']){if(_0x54244c[_0x4736(0x418)]===_0x54244c[_0x4736(0x419)]){const _0x4a8b04=_0x3d2310[_0x4736(0x41a)][_0x4736(0x165)]('|');let _0xb6aea3=0x0;while(!![]){switch(_0x4a8b04[_0xb6aea3++]){case'0':_0x15d9e5[_0x4736(0x139)]('🔒\x20Compression\x20enabled:',_0x2aeef5[_0x4736(0x169)]['compression']);continue;case'1':_0x28e3fe[_0x4736(0x139)](_0x4736(0x9),_0x8c1cee[_0x4736(0x169)][_0x4736(0x16a)]);continue;case'2':_0x87e02b['log'](_0x3d2310[_0x4736(0x41b)],_0x4337d4['features'][_0x4736(0x346)]);continue;case'3':_0x9e812f[_0x4736(0x139)](_0x3d2310['vhRkT'],_0x1fd3bb['features'][_0x4736(0x167)]);continue;case'4':_0x5adb53['log'](_0x3d2310[_0x4736(0x41c)],_0x1c2cdc[_0x4736(0x169)][_0x4736(0x16d)]);continue;case'5':_0xb20083[_0x4736(0x139)](_0x3d2310[_0x4736(0x41d)],_0xa89342[_0x4736(0x169)][_0x4736(0x16b)]);continue;case'6':_0x2c3316[_0x4736(0x139)](_0x3d2310[_0x4736(0x41e)],_0x4d3026['features']['queryScores']);continue;}break;}}else{console['log'](_0x54244c[_0x4736(0x389)],_0x1430b2[_0x4736(0x1b9)]),console[_0x4736(0x139)](_0x4736(0x9),_0x1430b2[_0x4736(0x16a)]),console[_0x4736(0x139)](_0x54244c[_0x4736(0x153)],_0x1430b2[_0x4736(0x16d)]),console[_0x4736(0x139)](_0x54244c[_0x4736(0x41f)],_0x1430b2[_0x4736(0x167)]);_0x1430b2[_0x4736(0x346)]&&Array[_0x4736(0x2a2)](_0x1430b2[_0x4736(0x346)])&&console[_0x4736(0x139)]('🗄️\x20Databases\x20used:',_0x1430b2['databases'][_0x4736(0x420)](',\x20'));if(_0x1430b2[_0x4736(0x3b5)]){if(_0x54244c[_0x4736(0x343)](_0x54244c[_0x4736(0x421)],_0x4736(0xbc))){_0x2f65ea['log'](_0x213bf9['yyxIX']),_0x37f76a(_0x4736(0x1e));return;}else console[_0x4736(0x139)](_0x54244c[_0x4736(0x38a)]);}}}_0x54244c['QqRcp'](_0x3a2dd1,!![]),_0x515483(_0x4736(0x422)),_0x54244c[_0x4736(0x136)](_0x403d6a,0x64),_0x54244c['YnDVQ'](_0x143b77);}),_0x1955c8['current']['on'](_0x54244c[_0x4736(0x423)],_0x18750d=>{const _0x5a062e={'bRApl':'❌\x20Training\x20start\x20failed:','NNXnp':function(_0x3bf3f7,_0x4d1603){return _0x3bf3f7(_0x4d1603);},'kVZCe':_0x54244c[_0x4736(0x378)],'xrYrp':function(_0x31467c,_0x441ec1){return _0x54244c['hyllA'](_0x31467c,_0x441ec1);},'LotuT':function(_0x21abc3){return _0x21abc3();},'OCEPq':_0x54244c[_0x4736(0x3a2)],'LIdpM':_0x4736(0x3a3)};console['log'](_0x54244c[_0x4736(0x424)],_0x18750d);if(_0x18750d['error']&&_0x18750d[_0x4736(0x15b)][_0x4736(0x161)](_0x4736(0x425))){if(_0x54244c[_0x4736(0x426)](_0x54244c['yeMXk'],_0x54244c[_0x4736(0x427)])){console[_0x4736(0x139)](_0x54244c['yKCdE']),_0x54244c['BlNpF'](_0x13cb98,null),_0x29622f(![]),_0x515483(_0x54244c['MTIIe']),_0x54244c[_0x4736(0x315)](setTimeout,async()=>{try{console[_0x4736(0x139)](_0x3d2310[_0x4736(0x428)]);const _0x1cfbf8=await refreshYouTubeTokens();if(_0x1cfbf8)console[_0x4736(0x139)](_0x3d2310[_0x4736(0x429)]),_0x3d2310[_0x4736(0x3e7)](_0x515483,_0x3d2310['FsMgc']),_0x3d2310[_0x4736(0x42a)](_0x4fbcfa,!![]);else{if(_0x3d2310[_0x4736(0x42b)](_0x3d2310[_0x4736(0x42c)],_0x3d2310[_0x4736(0x42d)]))_0xf713c9(![]);else{console[_0x4736(0x139)](_0x3d2310[_0x4736(0x42e)]),_0x515483(_0x4736(0x42f));try{await _0x3d2310[_0x4736(0x430)](_0x2328a8,_0x3d2310[_0x4736(0x431)]),console[_0x4736(0x139)](_0x4736(0x432)),_0x3d2310['aLNTm'](_0x515483,_0x3d2310[_0x4736(0x433)]),_0x3d2310['mNeZR'](_0x4fbcfa,!![]);}catch(_0x42ad2c){console['error'](_0x4736(0x434),_0x42ad2c),_0x3d2310[_0x4736(0x435)](_0x515483,_0x3d2310[_0x4736(0x436)]),_0x3d2310[_0x4736(0x437)](_0x4fbcfa,!![]),_0x3d2310[_0x4736(0x3fe)](_0x143b77);}}}}catch(_0x5b6ad2){console[_0x4736(0x15b)](_0x3d2310['XvslS'],_0x5b6ad2),_0x3d2310[_0x4736(0x3de)](_0x515483,_0x3d2310[_0x4736(0x438)]),_0x3d2310[_0x4736(0x439)](_0x4fbcfa,!![]),_0x143b77();}},0x3e8);return;}else{_0x3bf715['error'](_0x4736(0x43a)+_0x474165+':',_0x5acfd5);return;}}if(_0x18750d[_0x4736(0x364)]||_0x54244c[_0x4736(0x43b)](_0x18750d[_0x4736(0x33)],_0x54244c['LoAJK'])){const _0x4024eb=_0x4736(0x43c)[_0x4736(0x165)]('|');let _0x36e9e8=0x0;while(!![]){switch(_0x4024eb[_0x36e9e8++]){case'0':console[_0x4736(0x139)](_0x54244c[_0x4736(0x43d)]);continue;case'1':return;case'2':_0x54244c[_0x4736(0x43e)](_0x4fbcfa,!![]);continue;case'3':_0x54244c[_0x4736(0x43f)](_0x13cb98,_0x4736(0xa5));continue;case'4':_0x54244c['hLHql'](_0x515483,_0x54244c[_0x4736(0x440)]);continue;case'5':_0x54244c[_0x4736(0x26b)](_0x29622f,!![]);continue;case'6':_0x54244c[_0x4736(0x441)](_0x587bd5,_0x18750d);continue;case'7':_0x54244c['WtGtD'](_0x143b77);continue;}break;}}if(_0x54244c[_0x4736(0x442)](_0x18750d['code'],_0x54244c[_0x4736(0x443)])){if(_0x54244c[_0x4736(0x444)](_0x54244c[_0x4736(0x445)],_0x54244c['iGxVN'])){const _0x4add85=_0x54244c['bbXXx']['split']('|');let _0x80abee=0x0;while(!![]){switch(_0x4add85[_0x80abee++]){case'0':return;case'1':_0x54244c[_0x4736(0x446)](_0x4fbcfa,!![]);continue;case'2':console[_0x4736(0x139)](_0x54244c[_0x4736(0x447)]);continue;case'3':_0x54244c[_0x4736(0x1d9)](_0x143b77);continue;case'4':_0x54244c[_0x4736(0x1ea)](_0x515483,_0x54244c[_0x4736(0x448)]);continue;case'5':_0x54244c[_0x4736(0x449)](_0x587bd5,_0x18750d[_0x4736(0x44a)]);continue;case'6':_0x54244c['uYOAA'](_0x29622f,!![]);continue;case'7':_0x54244c[_0x4736(0x366)](_0x13cb98,_0x54244c[_0x4736(0x443)]);continue;}break;}}else _0x4544e5['error'](_0x5a062e['bRApl'],_0x3afcad['error']),_0x5a062e[_0x4736(0x44b)](_0x197cd8,_0x4736(0x377)+(_0x48a214[_0x4736(0x15b)]||_0x5a062e[_0x4736(0x44c)])),_0x5a062e['xrYrp'](_0x1de925,!![]),_0x5a062e[_0x4736(0x44d)](_0x590391);}if(_0x54244c['pfFaX'](_0x18750d['code'],_0x4736(0xcc))){const _0xb538e5=_0x54244c[_0x4736(0x44e)][_0x4736(0x165)]('|');let _0x351f0c=0x0;while(!![]){switch(_0xb538e5[_0x351f0c++]){case'0':_0x54244c[_0x4736(0x44f)](_0x515483,_0x54244c[_0x4736(0x450)]);continue;case'1':_0x54244c[_0x4736(0x451)](_0x587bd5,_0x18750d[_0x4736(0x44a)]);continue;case'2':console[_0x4736(0x139)](_0x54244c[_0x4736(0x452)]);continue;case'3':_0x54244c[_0x4736(0x24b)](_0x29622f,!![]);continue;case'4':return;case'5':_0x54244c[_0x4736(0x453)](_0x13cb98,_0x54244c[_0x4736(0x454)]);continue;}break;}}if(_0x18750d[_0x4736(0x15b)])console['error'](_0x54244c[_0x4736(0x455)],_0x18750d[_0x4736(0x15b)]),_0x54244c[_0x4736(0x14b)](_0x515483,_0x4736(0x377)+_0x18750d[_0x4736(0x15b)]),_0x54244c['cyBbl'](_0x4fbcfa,!![]),_0x54244c[_0x4736(0x3b8)](_0x143b77);else{if(_0x18750d['progress']){if(_0x54244c[_0x4736(0x456)](_0x4736(0x457),_0x54244c[_0x4736(0x458)]))_0x54244c['ZqDFk'](_0x403d6a,_0x18750d[_0x4736(0x13c)]),_0x54244c[_0x4736(0x12c)](_0x515483,_0x18750d[_0x4736(0x13d)]||_0x4736(0x459)),_0x2dec86&&_0x54244c['aNilH'](_0x18750d[_0x4736(0x13c)],0x1e)&&(_0x54244c[_0x4736(0x45a)](_0x54244c[_0x4736(0x45b)],_0x54244c[_0x4736(0x45b)])?_0x54244c[_0x4736(0x45c)](_0x29622f,![]):(_0x52754b[_0x4736(0x139)](_0x5a062e[_0x4736(0x45d)],_0x19ec25),_0x5a062e[_0x4736(0x45e)](_0x29667f,_0x5a062e[_0x4736(0x45f)]),_0x5a062e[_0x4736(0x45e)](_0x1366eb,0x3c)));else{_0x2fdfe3[_0x4736(0x139)](_0x4736(0xc8)),_0x3d2310[_0x4736(0x460)](_0x2fcb19,_0x4736(0xc5)),_0x3d2310[_0x4736(0x3e4)](_0x553ad4,_0x4ab2de[_0x4736(0x44a)]),_0xce9fe3(!![]),_0x3d2310[_0x4736(0x461)](_0x46a102,_0x4736(0xc9)),_0x3edf7f(!![]),_0x3d2310[_0x4736(0x462)](_0xfd0428);return;}}}}),console[_0x4736(0x139)](_0x54244c['ygGqi']),console[_0x4736(0x139)](_0x54244c[_0x4736(0x463)],{'url':API_CONFIG[_0x4736(0x2c7)],'transports':['websocket'],'autoConnect':![],'timeout':0x2710,'reconnection':![]}),_0x1955c8[_0x4736(0x182)][_0x4736(0x34)](),console[_0x4736(0x139)](_0x54244c[_0x4736(0x464)]),setTimeout(()=>{var _0x3079c4,_0x1d143b,_0x4e7a91,_0x40fdb9;console['log'](_0x3d2310[_0x4736(0x465)],{'connected':_0x3d2310[_0x4736(0x466)](_0x3079c4=_0x1955c8['current'],null)||_0x3d2310[_0x4736(0x3d7)](_0x3079c4,void 0x0)?void 0x0:_0x3079c4[_0x4736(0x113)],'disconnected':(_0x1d143b=_0x1955c8['current'])===null||_0x3d2310['kfJoG'](_0x1d143b,void 0x0)?void 0x0:_0x1d143b['disconnected'],'id':(_0x4e7a91=_0x1955c8[_0x4736(0x182)])===null||_0x3d2310[_0x4736(0x467)](_0x4e7a91,void 0x0)?void 0x0:_0x4e7a91['id'],'engineConnected':_0x3d2310[_0x4736(0x467)](_0x40fdb9=_0x1955c8[_0x4736(0x182)],null)||_0x40fdb9===void 0x0||_0x3d2310[_0x4736(0x3d6)](_0x40fdb9=_0x40fdb9['io'],null)||_0x3d2310['DlrIy'](_0x40fdb9,void 0x0)||_0x3d2310['JfDDT'](_0x40fdb9=_0x40fdb9['engine'],null)||_0x40fdb9===void 0x0?void 0x0:_0x40fdb9['readyState']});},0x3e8),_0x54244c[_0x4736(0x468)](setTimeout,()=>{const _0x2a8ff1={'FmWyK':function(_0x36f905,_0x32622e){return _0x54244c[_0x4736(0x469)](_0x36f905,_0x32622e);}};if(_0x54244c[_0x4736(0x46a)]!==_0x4736(0x46b)){var _0x489a4b,_0x4f1487,_0x5a068a,_0x2c7be3;console[_0x4736(0x139)](_0x54244c['ofYcG'],{'connected':_0x54244c['ZgEzR'](_0x489a4b=_0x1955c8[_0x4736(0x182)],null)||_0x54244c['ZgEzR'](_0x489a4b,void 0x0)?void 0x0:_0x489a4b[_0x4736(0x113)],'disconnected':(_0x4f1487=_0x1955c8[_0x4736(0x182)])===null||_0x4f1487===void 0x0?void 0x0:_0x4f1487[_0x4736(0x19b)],'id':_0x54244c[_0x4736(0x46c)](_0x5a068a=_0x1955c8[_0x4736(0x182)],null)||_0x54244c[_0x4736(0x171)](_0x5a068a,void 0x0)?void 0x0:_0x5a068a['id'],'engineConnected':_0x54244c[_0x4736(0x393)](_0x2c7be3=_0x1955c8['current'],null)||_0x2c7be3===void 0x0||_0x54244c['JcoNs'](_0x2c7be3=_0x2c7be3['io'],null)||_0x54244c['eOzJS'](_0x2c7be3,void 0x0)||_0x54244c['AdujL'](_0x2c7be3=_0x2c7be3[_0x4736(0x186)],null)||_0x54244c[_0x4736(0x45a)](_0x2c7be3,void 0x0)?void 0x0:_0x2c7be3[_0x4736(0x46d)]});}else _0x2a8ff1['FmWyK'](_0x4b5106,_0x4fbfb3);},0x1388),_0x54244c[_0x4736(0x46e)](setTimeout,()=>{if(!_0x4c10e9&&_0x1955c8['current']&&!_0x1955c8['current']['connected']){const _0x4ca9c6=_0x54244c[_0x4736(0x46f)][_0x4736(0x165)]('|');let _0x5b6abc=0x0;while(!![]){switch(_0x4ca9c6[_0x5b6abc++]){case'0':_0x1955c8['current']&&(_0x1955c8[_0x4736(0x182)][_0x4736(0x1e7)](),_0x1955c8[_0x4736(0x182)]=null);continue;case'1':console['error'](_0x54244c[_0x4736(0x470)],{'connected':_0x1955c8[_0x4736(0x182)]['connected'],'disconnected':_0x1955c8[_0x4736(0x182)][_0x4736(0x19b)],'id':_0x1955c8[_0x4736(0x182)]['id']});continue;case'2':_0x54244c[_0x4736(0x451)](_0x515483,_0x54244c[_0x4736(0x471)]);continue;case'3':_0x143b77();continue;case'4':console[_0x4736(0x15b)](_0x54244c[_0x4736(0x472)]);continue;case'5':_0x4fbcfa(!![]);continue;}break;}}},0x4e20);}catch(_0x559e08){console[_0x4736(0x15b)](_0x4736(0x473),_0x559e08),_0x54244c[_0x4736(0x474)](_0x515483,_0x54244c[_0x4736(0x475)]),_0x54244c[_0x4736(0x45c)](_0x4fbcfa,!![]),_0x143b77();}}},_0x57c56d=_0x1de3cb=>{if('eDXXA'===_0x54244c['LUfIr']){if(_0x428ec4)return _0x4736(0x476);if(_0x5c326b)return'Your\x20persona\x20is\x20ready!\x20🎉';let _0x2e60ff='';if(_0x54244c['UunCD'](_0x1de3cb,0x14))_0x2e60ff=_0x54244c[_0x4736(0x477)];else{if(_0x54244c[_0x4736(0x478)](_0x1de3cb,0x28)){if(_0x54244c['zykeq'](_0x54244c['FhHAS'],_0x4736(0x479))){const _0x2dfbd4=_0x54244c['gaoFW'][_0x4736(0x165)]('|');let _0x559c39=0x0;while(!![]){switch(_0x2dfbd4[_0x559c39++]){case'0':_0x3c164c();continue;case'1':_0x1eb9cd[_0x4736(0x15b)](_0x54244c['VNVLy'],{'message':_0x4fac51[_0x4736(0x1b9)],'name':_0x4a7919[_0x4736(0x189)],'stack':_0x247581[_0x4736(0x406)],'errorObject':_0x56a47c});continue;case'2':_0x105d62(!![]);continue;case'3':_0x4b7ce9(_0x4736(0x47a));continue;case'4':_0x2f5e34[_0x4736(0x15b)](_0x54244c[_0x4736(0x47b)],_0x198dfd);continue;}break;}}else _0x2e60ff=_0x54244c['TJDqr'];}else{if(_0x54244c[_0x4736(0x478)](_0x1de3cb,0x3c))_0x54244c[_0x4736(0x47c)]('dpgxW',_0x54244c[_0x4736(0x47d)])?_0x2e60ff=_0x54244c[_0x4736(0x47e)]:(_0x20e6a0[_0x4736(0x15b)](_0x54244c[_0x4736(0x47f)]),_0x54244c[_0x4736(0x3b0)](_0x596e1e,null)||_0x54244c[_0x4736(0x480)](_0x261662,void 0x0)||_0x54244c[_0x4736(0x481)](_0x20aa5a,_0x2bac6a[_0x4736(0x2c7)],_0x54244c[_0x4736(0x482)],{'email':(_0x54244c[_0x4736(0x483)](_0x1ee105,null)||_0x54244c[_0x4736(0x35a)](_0x5e02c7,void 0x0)?void 0x0:_0x5e54dc[_0x4736(0x212)])||'',..._0x50db05}));else{if(_0x1de3cb<0x50)_0x54244c[_0x4736(0x484)](_0x54244c['OnIvO'],_0x54244c[_0x4736(0x485)])?(_0xa41482[_0x4736(0x139)](_0x54244c['TyNWW'],_0xe1fa1b),_0x119de9[_0x4736(0x139)](_0x54244c[_0x4736(0x486)],_0x20a75b),_0x3b1085[_0x4736(0x139)](_0x54244c[_0x4736(0x487)],_0x85eab1),_0x540c54[_0x4736(0x139)](_0x54244c[_0x4736(0x488)],_0x4801f0)):_0x2e60ff=_0x54244c[_0x4736(0x489)];else _0x1de3cb<0x5f?_0x4736(0xfb)===_0x54244c[_0x4736(0x48a)]?_0x2e60ff=_0x54244c[_0x4736(0x2bc)]:(_0x55f537['log'](_0x54244c[_0x4736(0x263)],_0x461782[_0x4736(0x1b9)]),_0x2e8909(_0x116b95['message']||_0x4736(0x44))):_0x2e60ff=_0x54244c[_0x4736(0x48b)];}}}return _0x54244c[_0x4736(0x48c)](_0x2e60ff,_0x265f4b);}else{const _0x426451={'bxaeg':function(_0x4d5714,_0x24088e){return _0x4d5714(_0x24088e);}};Animated[_0x4736(0x48d)](_0x1a0e94,{'toValue':0x0,'duration':0xfa,'useNativeDriver':!![]})[_0x4736(0x1da)](()=>{_0x375d13(()=>{var _0xed51b8;_0x426451[_0x4736(0x48e)](_0x1a2ae9,![]),(_0xed51b8=_0x2d5ac7['current'])===null||_0xed51b8===void 0x0||_0xed51b8[_0x4736(0x48f)](_0x5f54f0);},0x10);});}},_0x2c42e6=async()=>{const _0x59b49f={'JPvFO':'❌\x20Training\x20start\x20error:','lmVUG':function(_0x154b52,_0x1f4b45){return _0x54244c['IDssR'](_0x154b52,_0x1f4b45);},'xeTdw':function(_0x9288ce,_0x1692d1){return _0x54244c[_0x4736(0x490)](_0x9288ce,_0x1692d1);},'wGeBY':function(_0x3111db,_0x4bf3ad){return _0x3111db(_0x4bf3ad);},'coBjm':function(_0x536b2c){return _0x54244c[_0x4736(0x369)](_0x536b2c);},'BBlfs':_0x54244c['uiqeW'],'ICLIi':_0x54244c[_0x4736(0x1aa)],'iOvpT':function(_0x53c01c,_0x242200){return _0x54244c[_0x4736(0x14f)](_0x53c01c,_0x242200);}};if(_0x54244c[_0x4736(0x2de)](_0x54244c[_0x4736(0x491)],_0x54244c[_0x4736(0x491)]))_0x170e37['error'](_0x59b49f[_0x4736(0x492)],_0x3f1df7),_0x59b49f[_0x4736(0x493)](_0x14eaed,_0x4736(0x377)+(_0x59b49f['xeTdw'](_0x2d234d,_0x480781)?_0x3c60e1[_0x4736(0x1b9)]:_0x4736(0x37b))),_0x59b49f[_0x4736(0x494)](_0x145aac,!![]),_0x59b49f[_0x4736(0x495)](_0x260c5f);else{console['log'](_0x54244c[_0x4736(0x496)]);_0x1955c8[_0x4736(0x182)]&&(_0x54244c[_0x4736(0x497)]===_0x54244c[_0x4736(0x497)]?(console[_0x4736(0x139)](_0x4736(0x498)),_0x1955c8['current'][_0x4736(0x1e7)](),_0x1955c8[_0x4736(0x182)]=null):(_0x26b4e7[_0x4736(0x139)](_0x59b49f[_0x4736(0x499)]),_0x9fe6bf(_0x59b49f['ICLIi'])));_0x54244c[_0x4736(0x49a)](clearTemporaryPin),_0x4f00f9[_0x4736(0x182)]=!![];try{if(_0x54244c[_0x4736(0x444)](_0x54244c[_0x4736(0x49b)],_0x54244c[_0x4736(0x49c)])){const _0x21013d='3|4|1|5|0|2'['split']('|');let _0x545899=0x0;while(!![]){switch(_0x21013d[_0x545899++]){case'0':_0x54244c['RHban'](_0x3ed8d7,0x64);continue;case'1':_0x54244c['lPGJv'](_0x4ea857,!![]);continue;case'2':_0x15b7f5();continue;case'3':_0x1de284['log']('🎉\x20All\x20Complete:',_0x24da24);continue;case'4':_0x4943b9[_0x4736(0x49d)]&&(_0x946eaa[_0x4736(0x139)](_0x54244c[_0x4736(0x389)],_0x225d35[_0x4736(0x1b9)]),_0x1610bb[_0x4736(0x139)](_0x4736(0x9),_0x30c481[_0x4736(0x16a)]),_0x59a742[_0x4736(0x139)](_0x54244c[_0x4736(0x153)],_0x4d47a5['encryption']),_0x2a83a4[_0x4736(0x139)](_0x4736(0xbb),_0x3f6451[_0x4736(0x167)]),_0x2e6a61['databases']&&_0x1f9649[_0x4736(0x2a2)](_0x559899[_0x4736(0x346)])&&_0x4155ab[_0x4736(0x139)](_0x4736(0x340),_0x260b68[_0x4736(0x346)][_0x4736(0x420)](',\x20')),_0x2d55cb['testing']&&_0x521ea1[_0x4736(0x139)](_0x4736(0xbd)));continue;case'5':_0x54244c['PHtGk'](_0x101df0,_0x54244c[_0x4736(0x49e)]);continue;}break;}}else{const _0x442435=await _0x54244c[_0x4736(0x49f)](getJWT);if(_0x442435){if(_0x54244c[_0x4736(0x4a0)](_0x54244c[_0x4736(0x4a1)],_0x54244c[_0x4736(0x4a2)])){_0x33dc72['log'](_0x4736(0x116)),_0x54244c[_0x4736(0x4a3)](_0x26e995,_0x54244c[_0x4736(0x367)]),_0x54244c[_0x4736(0x4a4)](_0x46c1e0,_0x27ff30),_0x54244c[_0x4736(0x451)](_0x327ceb,!![]),_0x54244c['KpPTB'](_0x41c448,_0x54244c[_0x4736(0x440)]),_0x54244c[_0x4736(0x4a5)](_0x3a1763,!![]),_0x54244c[_0x4736(0x4a6)](_0xc03778);return;}else console[_0x4736(0x139)](_0x54244c['EueXU'],_0x442435[_0x4736(0x18e)](0x0,0x1e)+'...'),_0x54244c[_0x4736(0x38e)](_0x84d24a,null)||_0x54244c[_0x4736(0x4a7)](_0x84d24a,void 0x0)||_0x84d24a(API_CONFIG[_0x4736(0x2c7)],_0x442435,{'email':(_0x54244c[_0x4736(0x365)](_0x433d63,null)||_0x54244c['wbJvS'](_0x433d63,void 0x0)?void 0x0:_0x433d63['email'])||'',..._0x433d63});}else{if(_0x54244c[_0x4736(0x4a8)](_0x54244c[_0x4736(0x4a9)],_0x54244c[_0x4736(0x4a9)])){const _0x1a3973={'vHOkv':function(_0xf3354c,_0x4983bb){return _0x59b49f[_0x4736(0x4aa)](_0xf3354c,_0x4983bb);},'IFMyU':function(_0x125ca6){return _0x125ca6();}};_0x2be0da(()=>{_0x1a3973[_0x4736(0x4ab)](_0x1ba651,![]),!_0x37b38e&&_0x1a3973[_0x4736(0x4ac)](_0x3ff099);},0x64);}else console['error'](_0x54244c['QnRYh']),_0x54244c['mAzpJ'](_0x84d24a,null)||_0x54244c[_0x4736(0x4ad)](_0x84d24a,void 0x0)||_0x54244c[_0x4736(0x4ae)](_0x84d24a,API_CONFIG['BASE_URL'],_0x54244c[_0x4736(0x482)],{'email':(_0x433d63===null||_0x54244c[_0x4736(0x4af)](_0x433d63,void 0x0)?void 0x0:_0x433d63[_0x4736(0x212)])||'',..._0x433d63});}}}catch(_0x47fa53){console[_0x4736(0x15b)](_0x54244c['fcQLj'],_0x47fa53),_0x54244c[_0x4736(0x4b0)](_0x84d24a,null)||_0x54244c[_0x4736(0x4b1)](_0x84d24a,void 0x0)||_0x54244c[_0x4736(0x2d8)](_0x84d24a,API_CONFIG[_0x4736(0x2c7)],_0x54244c[_0x4736(0x482)],{'email':(_0x433d63===null||_0x54244c['yuKhQ'](_0x433d63,void 0x0)?void 0x0:_0x433d63[_0x4736(0x212)])||'',..._0x433d63});}}},_0x188285=async()=>{if(_0x54244c['JHfYL'](_0x54244c['zjexk'],_0x4736(0x4b2)))try{const _0x50c0bd=await _0x54244c[_0x4736(0x4b3)](getJWT);if(_0x50c0bd&&_0x50c0bd[_0x4736(0x4b4)]()[_0x4736(0x208)]>0x14)return console[_0x4736(0x139)]('✅\x20Authentication\x20token\x20already\x20exists:',_0x50c0bd[_0x4736(0x18e)](0x0,0x14)+_0x4736(0x251)),console[_0x4736(0x139)](_0x54244c['YUtwu'],_0x50c0bd['length']),_0x50c0bd;return console[_0x4736(0x280)](_0x54244c[_0x4736(0x4b5)]),console[_0x4736(0x280)](_0x54244c['zpiej']),console[_0x4736(0x280)]('ℹ️\x20User\x20should\x20authenticate\x20first\x20via\x20Google/Apple/Email'),null;}catch(_0x5aee98){console[_0x4736(0x15b)]('❌\x20Error\x20checking\x20authentication\x20token:',_0x5aee98);throw _0x5aee98;}else _0x4f4466[_0x4736(0x15b)](_0x4736(0x7c),_0x1f2b56),_0x54244c[_0x4736(0x4b6)](_0x2e65d6);},_0x151e5d=Object[_0x4736(0x4b7)](_0x116319)[_0x4736(0x4b8)](_0x1852f1=>_0x1852f1),_0x57ab8d=()=>{const _0x43c4a7={'RMVxa':function(_0x2b7fce,_0x39f7d5){return _0x54244c['JcoNs'](_0x2b7fce,_0x39f7d5);},'sLITJ':_0x54244c[_0x4736(0x4b9)],'FhRRc':_0x54244c[_0x4736(0x151)]};if(_0x151e5d){if(_0x54244c[_0x4736(0x4ba)](_0x54244c[_0x4736(0x4bb)],_0x4736(0x4bc)))triggerHaptic(HapticType[_0x4736(0x249)]),console['log'](_0x54244c[_0x4736(0x159)]),_0x54244c[_0x4736(0x49a)](_0x35520e)[_0x4736(0x35e)](_0x4b0b66=>{const _0x21e2d1={'IljND':function(_0x2e1e2c,_0x31eabd){return _0x43c4a7['RMVxa'](_0x2e1e2c,_0x31eabd);}};if(_0x43c4a7[_0x4736(0x4bd)](_0x43c4a7[_0x4736(0x4be)],_0x43c4a7[_0x4736(0x4be)]))console[_0x4736(0x15b)](_0x43c4a7[_0x4736(0x4bf)],_0x4b0b66);else{var _0x29ee77;_0x99d869[_0x1007f1]=((_0x29ee77=_0x41ffda[_0x5eade4])===null||_0x21e2d1[_0x4736(0x4c0)](_0x29ee77,void 0x0)?void 0x0:_0x29ee77['connected'])||![];}}),_0x54244c['vHciN'](_0x5a1a64,_0x54244c[_0x4736(0x15e)]);else{_0x33247e[_0x4736(0x182)]=!![],_0x465a67[_0x4736(0x182)]=![],_0x189d7a[_0x4736(0x4c1)](0x0),_0x54244c[_0x4736(0x4c2)](_0x1175e6,!![]),_0x54244c[_0x4736(0x369)](_0x328c1b),_0x54244c[_0x4736(0x4c3)](_0x4fbc12,()=>{Animated[_0x4736(0x48d)](_0x2a8356,{'toValue':0x1,'duration':0x12c,'useNativeDriver':!![]})[_0x4736(0x1da)]();});const _0x2d5222=Linking[_0x4736(0x1db)](_0x54244c[_0x4736(0x1dc)],_0x5326c2);return()=>{_0x2d5222[_0x4736(0x2e5)]();};}}},_0x35520e=_0x54244c[_0x4736(0x1d6)](useCallback,async()=>{const _0x3b5cff={'qyFjn':function(_0x3e109b,_0x2a7710){return _0x54244c[_0x4736(0x4c4)](_0x3e109b,_0x2a7710);},'xShkf':function(_0x40b987,_0x215785){return _0x54244c[_0x4736(0x368)](_0x40b987,_0x215785);},'uiWIA':function(_0x33570b,_0x39e3ab,_0x1c3488){return _0x54244c[_0x4736(0x1ab)](_0x33570b,_0x39e3ab,_0x1c3488);},'AlEuC':_0x54244c[_0x4736(0x48b)],'AcQWM':_0x54244c[_0x4736(0x4c5)]};if(_0x54244c[_0x4736(0x4c6)]===_0x54244c[_0x4736(0x4c7)])_0x56c639[_0x4736(0x15b)](_0x54244c[_0x4736(0x17a)]),_0x54244c[_0x4736(0x4c8)](_0x40730f,_0x54244c['PpYvy']),_0x54244c['XIdtB'](_0x5e994b,!![]),_0x54244c[_0x4736(0x4c9)](_0xf001fe);else try{console[_0x4736(0x139)](_0x54244c[_0x4736(0x4ca)]),_0x54244c['KxdqU'](_0x2895a2,_0x54244c[_0x4736(0x4cb)]);const _0x4df6d0=await _0x188285();if(!_0x4df6d0)throw new Error(_0x54244c[_0x4736(0x4cc)]);console[_0x4736(0x139)](_0x4736(0x4cd),_0x4df6d0[_0x4736(0x18e)](0x0,0x14)+_0x4736(0x251)),_0x54244c['XIsHs'](_0x5422a0,_0x4df6d0);if(!_0x433d63){var _0x19a62f;const _0x3d4508=await _0x54244c['VslOa'](getOnairosUsername),_0x4a95d4=_0x3d4508||(_0x54244c[_0x4736(0x4ce)](_0x3a415c,null)||_0x3a415c===void 0x0||_0x54244c[_0x4736(0x4cf)](_0x19a62f=_0x3a415c[_0x4736(0x212)],null)||_0x19a62f===void 0x0?void 0x0:_0x19a62f['split']('@')[0x0])||(_0x54244c[_0x4736(0x4d0)](_0x3a415c,null)||_0x54244c['rGTWW'](_0x3a415c,void 0x0)?void 0x0:_0x3a415c['name'])||'mobile_user',_0x1f494e={'username':_0x4a95d4,'email':(_0x54244c[_0x4736(0x4d1)](_0x3a415c,null)||_0x54244c[_0x4736(0x4d2)](_0x3a415c,void 0x0)?void 0x0:_0x3a415c[_0x4736(0x212)])||null,'id':null};_0x54244c[_0x4736(0x4d3)](_0x33bc65,_0x1f494e),_0x54244c[_0x4736(0x25c)](_0x18cd6b,_0x4a95d4),console['log'](_0x54244c['CzObZ'],_0x1f494e);}console[_0x4736(0x139)](_0x54244c[_0x4736(0x4d4)]),_0x54244c[_0x4736(0x45c)](_0x2895a2,_0x54244c[_0x4736(0x4d5)]);const _0x6fe740=_0x54244c[_0x4736(0x4d6)](io,API_CONFIG[_0x4736(0x2c7)],{'transports':[_0x54244c[_0x4736(0x4d7)],_0x54244c[_0x4736(0x3d2)]],'autoConnect':![],'timeout':0x3a98,'reconnection':!![],'reconnectionAttempts':0x3,'reconnectionDelay':0x3e8,'forceNew':!![]});_0x6fe740['on'](_0x54244c['eCpSt'],async()=>{console[_0x4736(0x139)](_0x4736(0x4d8));const _0x4d5075=_0x6fe740['id'];_0x581302(_0x3b5cff[_0x4736(0x4d9)](_0x4d5075,null)),_0x3b5cff['xShkf'](_0x2895a2,_0x4736(0x4da)),_0x4d5075&&await _0x3b5cff[_0x4736(0x4db)](_0x2f5c46,_0x4d5075,_0x4df6d0);}),_0x6fe740['on'](_0x54244c[_0x4736(0x423)],_0x23da1b=>{_0x54244c['bBWcF']!==_0x4736(0x4dc)?_0x23da1b['progress']&&(_0x2895a2(_0x23da1b[_0x4736(0x13d)]||_0x54244c['TvaGf']),console['log'](_0x4736(0x1),_0x23da1b[_0x4736(0x13c)],'%')):_0x68a44e=_0x3b5cff[_0x4736(0x4dd)];}),_0x6fe740['on'](_0x54244c['xKciQ'],()=>{_0x54244c[_0x4736(0x4de)](_0x54244c['ykoKH'],_0x54244c[_0x4736(0x4df)])?(_0x53bb14[_0x4736(0x139)](_0x3b5cff[_0x4736(0x4e0)]),_0x490862[_0x4736(0x182)]['disconnect'](),_0xecf9dd['current']=null):console[_0x4736(0x139)](_0x54244c['NScOh']);}),_0x1955c8[_0x4736(0x182)]=_0x6fe740,_0x6fe740[_0x4736(0x34)](),console[_0x4736(0x139)](_0x4736(0x4e1));}catch(_0x5d5bf4){console[_0x4736(0x15b)](_0x4736(0x4e2),_0x5d5bf4),_0x54244c[_0x4736(0x4e3)](_0x2895a2,'');throw _0x5d5bf4;}},[_0x433d63,_0xcdf6d4,_0x3a415c]),_0x2f5c46=async(_0x57dc5c,_0x543fef)=>{const _0x511b80={'UAjdu':function(_0x379050,_0x37010c){return _0x379050!==_0x37010c;},'yriIw':function(_0x4cc8d2,_0x5de10b){return _0x4cc8d2!==_0x5de10b;},'TBIun':_0x54244c[_0x4736(0x4e4)]};if(_0x54244c[_0x4736(0x4e5)]!=='cBzHD')try{console['log'](_0x54244c[_0x4736(0x4e6)],_0x57dc5c),console[_0x4736(0x139)](_0x54244c[_0x4736(0x359)],_0x543fef[_0x4736(0x18e)](0x0,0x14)+_0x4736(0x251));const _0x4222bf={'socketId':_0x57dc5c,'username':(_0x54244c[_0x4736(0x4d2)](_0x433d63,null)||_0x54244c[_0x4736(0x4e7)](_0x433d63,void 0x0)?void 0x0:_0x433d63['username'])||(_0x54244c[_0x4736(0x330)](_0x433d63,null)||_0x54244c[_0x4736(0x4af)](_0x433d63,void 0x0)?void 0x0:_0x433d63[_0x4736(0x189)])||_0xcdf6d4||_0x54244c[_0x4736(0x35b)],'email':(_0x54244c[_0x4736(0x29f)](_0x433d63,null)||_0x54244c[_0x4736(0x4e8)](_0x433d63,void 0x0)?void 0x0:_0x433d63[_0x4736(0x212)])||null,'modelKey':null,'connectedPlatforms':[],'platformConnections':{}};console[_0x4736(0x139)](_0x54244c['wklem'],_0x4222bf);const _0x2fbed6=await _0x54244c['ojTPX'](startEnochTrainingWithYouTubeCheck,_0x4222bf);console[_0x4736(0x139)](_0x54244c[_0x4736(0x4e9)],_0x2fbed6);if(_0x2fbed6[_0x4736(0x364)]||_0x54244c['ZQlpJ'](_0x2fbed6[_0x4736(0x33)],_0x4736(0xa5))){if(_0x54244c[_0x4736(0x4ea)](_0x54244c[_0x4736(0x4eb)],_0x54244c['nootz'])){var _0x557482;_0x201bc0[_0x58a17e]=_0x511b80[_0x4736(0x4ec)](_0x557482=_0x264292[_0x6c930b],null)&&_0x511b80[_0x4736(0x4ed)](_0x557482,void 0x0)&&_0x557482[_0x4736(0x113)]?_0x511b80['TBIun']:_0x4736(0x19b);}else{console[_0x4736(0x139)](_0x54244c[_0x4736(0x4ee)]),_0x54244c[_0x4736(0x1ea)](_0x13cb98,_0x54244c[_0x4736(0x367)]),_0x587bd5(_0x2fbed6),_0x54244c['IZjSK'](_0x29622f,!![]),_0x54244c['KBOGy'](_0x515483,_0x54244c['fpbAZ']),_0x54244c['oBVNf'](_0x4fbcfa,!![]),_0x54244c[_0x4736(0x49a)](_0x143b77);return;}}if(_0x2fbed6[_0x4736(0x260)]){console['log'](_0x54244c[_0x4736(0x4ef)],_0x2fbed6['message']),console[_0x4736(0x139)](_0x54244c[_0x4736(0x4f0)],_0x2fbed6[_0x4736(0x169)]),_0x54244c[_0x4736(0x33c)](_0x1eb0ce,!![]);if(_0x2fbed6[_0x4736(0x169)]){const _0x59d2bd=_0x54244c['SsyAt'][_0x4736(0x165)]('|');let _0x35639a=0x0;while(!![]){switch(_0x59d2bd[_0x35639a++]){case'0':console[_0x4736(0x139)](_0x54244c[_0x4736(0x152)],_0x2fbed6['features'][_0x4736(0x167)]);continue;case'1':console[_0x4736(0x139)](_0x54244c['dnfRU'],_0x2fbed6[_0x4736(0x169)]['storage']);continue;case'2':console[_0x4736(0x139)](_0x54244c['dzLDx'],_0x2fbed6[_0x4736(0x169)][_0x4736(0x346)]);continue;case'3':console[_0x4736(0x139)](_0x54244c[_0x4736(0x153)],_0x2fbed6[_0x4736(0x169)]['encryption']);continue;case'4':console[_0x4736(0x139)](_0x54244c[_0x4736(0x2fd)],_0x2fbed6[_0x4736(0x169)]['queryScores']);continue;case'5':console[_0x4736(0x139)](_0x54244c['iMSpu'],_0x2fbed6[_0x4736(0x169)]['compression']);continue;case'6':console[_0x4736(0x139)](_0x54244c[_0x4736(0x2fb)],_0x2fbed6['features'][_0x4736(0x16b)]);continue;}break;}}_0x54244c[_0x4736(0x4f1)](_0x515483,_0x54244c[_0x4736(0x4f2)]),_0x54244c[_0x4736(0x4f3)](_0x403d6a,0x19);}else console[_0x4736(0x15b)](_0x54244c[_0x4736(0x4f4)],_0x2fbed6[_0x4736(0x15b)]),_0x515483(_0x4736(0x377)+(_0x2fbed6[_0x4736(0x15b)]||_0x54244c[_0x4736(0x4f5)])),_0x54244c[_0x4736(0x266)](_0x4fbcfa,!![]),_0x143b77();}catch(_0x66d102){console[_0x4736(0x15b)](_0x54244c['XSalf'],_0x66d102),_0x54244c[_0x4736(0x355)](_0x515483,_0x4736(0x377)+(_0x54244c['qPAzn'](_0x66d102,Error)?_0x66d102[_0x4736(0x1b9)]:_0x4736(0x37b))),_0x54244c['dirDM'](_0x4fbcfa,!![]),_0x54244c[_0x4736(0x399)](_0x143b77);}else _0x5f5432['log'](_0x4736(0x67));};return React['createElement'](Modal,{'transparent':!![],'visible':_0xb2ccc4,'animationType':_0x54244c[_0x4736(0x4f6)],'onRequestClose':_0x40f5c6,'statusBarTranslucent':!![]},React['createElement'](View,{'style':styles[_0x4736(0x4f7)]},React[_0x4736(0x4f8)](TouchableWithoutFeedback,{'onPress':_0x40f5c6},React[_0x4736(0x4f8)](Animated['View'],{'style':[styles[_0x4736(0x4f9)],{'opacity':_0x35ab8c}]})),React[_0x4736(0x4f8)](View,{'style':styles['bottomSheet']},React[_0x4736(0x4f8)](View,{'style':styles[_0x4736(0x4fa)]},React[_0x4736(0x4f8)](View,{'style':styles[_0x4736(0x4fb)]},React[_0x4736(0x4f8)](TouchableOpacity,{'onPress':_0x40f5c6,'style':styles[_0x4736(0x4fc)]},React[_0x4736(0x4f8)](View,{'style':styles[_0x4736(0x4fd)]}))),_0x4090f3&&_0x54244c[_0x4736(0x220)](_0x4d4279,_0x54244c['WaleP'])&&React[_0x4736(0x4f8)](View,{'style':styles[_0x4736(0x4fe)]},React[_0x4736(0x4f8)](Text,{'style':styles[_0x4736(0x4ff)]},'Debug\x20Padding'),React[_0x4736(0x4f8)](View,{'style':styles[_0x4736(0x500)]},React['createElement'](Text,{'style':styles['debugLabel']},_0x54244c[_0x4736(0x501)],_0x51213f),React[_0x4736(0x4f8)](TouchableOpacity,{'onPress':()=>_0x1e9e33(_0x313117=>Math[_0x4736(0x502)](0x0,_0x313117-0x2)),'style':styles[_0x4736(0x503)]},React[_0x4736(0x4f8)](Text,null,'-')),React[_0x4736(0x4f8)](TouchableOpacity,{'onPress':()=>_0x1e9e33(_0x3997e3=>_0x3997e3+0x2),'style':styles['debugBtn']},React[_0x4736(0x4f8)](Text,null,'+'))),React[_0x4736(0x4f8)](View,{'style':styles[_0x4736(0x500)]},React['createElement'](Text,{'style':styles[_0x4736(0x504)]},'Container\x20Bottom:\x20',_0x520e92),React[_0x4736(0x4f8)](TouchableOpacity,{'onPress':()=>_0x1c22ac(_0x3d826f=>Math[_0x4736(0x502)](0x0,_0x3d826f-0x2)),'style':styles[_0x4736(0x503)]},React['createElement'](Text,null,'-')),React['createElement'](TouchableOpacity,{'onPress':()=>_0x1c22ac(_0x487b56=>_0x487b56+0x2),'style':styles[_0x4736(0x503)]},React[_0x4736(0x4f8)](Text,null,'+'))),React[_0x4736(0x4f8)](View,{'style':styles['debugRow']},React['createElement'](Text,{'style':styles[_0x4736(0x504)]},_0x54244c[_0x4736(0x505)],_0x23ac9a),React[_0x4736(0x4f8)](TouchableOpacity,{'onPress':()=>_0x2fb104(_0x554318=>Math[_0x4736(0x502)](0x0,_0x554318-0x2)),'style':styles[_0x4736(0x503)]},React[_0x4736(0x4f8)](Text,null,'-')),React[_0x4736(0x4f8)](TouchableOpacity,{'onPress':()=>_0x2fb104(_0x56cafe=>_0x56cafe+0x2),'style':styles[_0x4736(0x503)]},React[_0x4736(0x4f8)](Text,null,'+'))),React[_0x4736(0x4f8)](TouchableOpacity,{'onPress':()=>_0x18823e(![]),'style':styles['debugCloseBtn']},React['createElement'](Text,{'style':styles[_0x4736(0x506)]},_0x54244c['WbjeW']))),_0x4d4279===_0x4736(0x2d)&&React[_0x4736(0x4f8)](View,{'style':styles['welcomeContainer']},React['createElement'](View,{'style':styles[_0x4736(0x507)]},React['createElement'](_0x117441,null)),React[_0x4736(0x4f8)](View,{'style':styles[_0x4736(0x508)]},React[_0x4736(0x4f8)](_0x418f1f,null)),React[_0x4736(0x4f8)](View,{'style':styles[_0x4736(0x509)]},React['createElement'](_0x558898,null)),React[_0x4736(0x4f8)](View,{'style':styles[_0x4736(0x50a)]}),React['createElement'](View,{'style':styles['welcomeButtonContainer']},React['createElement'](_0x48e0cf,{'label':_0x54244c[_0x4736(0x50b)],'onPress':_0x2fcfed,'testID':_0x54244c[_0x4736(0x50c)]}))),_0x54244c[_0x4736(0x50d)](_0x4d4279,_0x54244c['OulPA'])&&React[_0x4736(0x4f8)](_0x43aa42,{'onEmailSubmit':_0x4fd1e2,'onGoogleSignIn':_0x239f75,'onContinue':()=>_0x5a1a64(_0x4736(0x4)),'loading':_0x4c462d,'error':_0x1e4c42,'initialEmail':_0x5004a7}),_0x4d4279===_0x54244c[_0x4736(0x141)]&&React[_0x4736(0x4f8)](_0x56414d,{'email':_0x5004a7,'onCodeSubmit':_0xb6b2cc,'onBack':_0x2f643a,'loading':_0x4c462d,'error':_0x1e4c42,'onResendCode':_0x52b222}),_0x54244c['wbJvS'](_0x4d4279,_0x54244c[_0x4736(0x1aa)])&&React[_0x4736(0x4f8)](_0x1a3d64,{'onUpdate':_0x4c5d31,'onSkip':allowSkip?_0x5519b8:undefined,'onReviewerBypass':_0x548acd,'onLogout':_0x17f30a,'allowedPlatforms':_0x2b7ef4,'recommendedPlatforms':_0x3b6366,'initialConnectedPlatforms':_0x4722e0}),_0x54244c[_0x4736(0x50e)](_0x4d4279,_0x54244c[_0x4736(0x27a)])&&React[_0x4736(0x4f8)](_0x1128c2,{'visible':!![],'loading':_0x39e88d,'onLogout':_0x17f30a,'onAccept':async()=>{const _0x16e930={'NECln':function(_0x3fc942,_0x50a479){return _0x3fc942(_0x50a479);},'kZEdH':function(_0x54bbd2,_0x36f1df){return _0x54244c[_0x4736(0x50f)](_0x54bbd2,_0x36f1df);},'kZtPV':_0x54244c[_0x4736(0x21a)],'qQcBd':function(_0x118d20,_0x1c34c6){return _0x54244c[_0x4736(0x510)](_0x118d20,_0x1c34c6);},'qSpNW':function(_0x5ed907,_0x6a3d64){return _0x54244c[_0x4736(0x511)](_0x5ed907,_0x6a3d64);},'TXWAP':function(_0x1696fc,_0x35fa38){return _0x54244c[_0x4736(0x220)](_0x1696fc,_0x35fa38);}};if(_0x54244c['vvVpf'](_0x54244c[_0x4736(0x512)],_0x54244c[_0x4736(0x512)]))_0x16e930[_0x4736(0x513)](_0xfd3af2,_0x2aa070),_0x16e930['kZEdH'](_0x50cdcc,_0x16e930['kZtPV']);else{console['log'](_0x54244c['TpvUk']),_0x54244c[_0x4736(0x149)](_0xaf0419,!![]),await new Promise(_0x2c8e2d=>setTimeout(_0x2c8e2d,0x32));try{if(_0x54244c[_0x4736(0x514)](_0x54244c[_0x4736(0x515)],_0x54244c[_0x4736(0x515)]))_0x2b4252=_0x16e930['qQcBd'](_0x16e930['qSpNW'](_0x16be7b,0x1),0x4),_0x16e930['TXWAP'](_0x21ddb7,0x0)?_0x16e930[_0x4736(0x516)](_0x11e190,''):_0x16e930[_0x4736(0x516)](_0x3d418d,'.'[_0x4736(0x1b8)](_0x17bdee));else{const [_0x3cd788,_0x2793e0,_0x5a3093]=await Promise[_0x4736(0x2bf)]([_0x54244c['WtGtD'](getAuthToken),AsyncStorage['getItem'](_0x54244c[_0x4736(0x2c1)]),getOnairosUsername()]);console[_0x4736(0x139)](_0x4736(0x517)),_0x4f00f9[_0x4736(0x182)]=!![],_0x54244c[_0x4736(0x233)](_0x3cd788,_0x2793e0)?(console[_0x4736(0x139)]('✅\x20[SDK]\x20Calling\x20onComplete\x20for\x20returning\x20user'),await(_0x84d24a===null||_0x84d24a===void 0x0?void 0x0:_0x54244c[_0x4736(0x294)](_0x84d24a,API_CONFIG['BASE_URL'],_0x3cd788,{'email':_0x2793e0,'connectedPlatforms':_0x4722e0,'username':_0x5a3093||_0x2793e0[_0x4736(0x165)]('@')[0x0],'isReturningUser':!![]}))):(console[_0x4736(0x280)](_0x4736(0x518)),await(_0x54244c[_0x4736(0x2a0)](_0x84d24a,null)||_0x54244c[_0x4736(0x519)](_0x84d24a,void 0x0)?void 0x0:_0x54244c['zRHQN'](_0x84d24a,API_CONFIG['BASE_URL'],'',{'connectedPlatforms':_0x4722e0,'isReturningUser':!![]})));}}catch(_0x2f755a){console[_0x4736(0x15b)](_0x54244c[_0x4736(0x51a)],_0x2f755a),await(_0x54244c[_0x4736(0x51b)](_0x84d24a,null)||_0x54244c[_0x4736(0x392)](_0x84d24a,void 0x0)?void 0x0:_0x84d24a(API_CONFIG['BASE_URL'],'',{'connectedPlatforms':_0x4722e0,'isReturningUser':!![]}));}console[_0x4736(0x139)](_0x54244c[_0x4736(0x51c)]);}},'onDecline':()=>{console['log'](_0x54244c[_0x4736(0x51d)]),_0x54244c['xwQlg'](_0x40f5c6);},'connectedPlatforms':_0x4722e0,'onConnectMore':()=>{_0x54244c[_0x4736(0x51e)](_0x54244c[_0x4736(0x51f)],_0x4736(0x520))?(console[_0x4736(0x139)](_0x54244c[_0x4736(0x521)]),_0x5a1a64(_0x54244c[_0x4736(0x1aa)])):_0x5a773b[_0x4736(0x139)](_0x4736(0x50));},'isReturningUser':_0x37a6db,'appName':_0x631071})))));};const LEGACY_REMOVED=!![],styles=StyleSheet['create']({'modalOverlay':{'flex':0x1,'justifyContent':_0x4736(0x522)},'backdrop':{...StyleSheet['absoluteFillObject'],'backgroundColor':_0x4736(0x523)},'bottomSheet':{'backgroundColor':_0x4736(0x524),'borderTopLeftRadius':0x18,'borderTopRightRadius':0x18,'paddingTop':0x0,'paddingBottom':0x0,'minHeight':height*0.86,'overflow':_0x4736(0x525),'width':_0x4736(0x526)},'container':{'flex':0x1,'backgroundColor':'#FAFAFA'},'welcomeContainer':{'flex':0x1,'alignItems':_0x4736(0x527),'paddingTop':0x46,'paddingHorizontal':0x18},'brandMarkContainer':{'marginBottom':0x20},'headingContainer':{'marginBottom':0x18},'bodyContainer':{'marginBottom':0x20,'width':_0x4736(0x526)},'welcomeSpacer':{'flex':0x1,'minHeight':0x14},'welcomeButtonContainer':{'width':_0x4736(0x526),'paddingBottom':0x14},'handleContainer':{'alignItems':_0x4736(0x527),'paddingTop':0xc,'paddingBottom':0x4,'backgroundColor':_0x4736(0x528)},'handleButton':{'padding':0x0,'width':0x78,'alignItems':_0x4736(0x527)},'handle':{'width':0x64,'height':0x6,'borderRadius':0x3,'backgroundColor':'#D0D0D0'},'debugPanel':{'position':'absolute','top':0x3c,'right':0xa,'backgroundColor':_0x4736(0x529),'padding':0xc,'borderRadius':0x8,'zIndex':0x270f,'minWidth':0xc8},'debugTitle':{'color':_0x4736(0x52a),'fontSize':0xe,'fontWeight':_0x4736(0x52b),'marginBottom':0x8},'debugRow':{'flexDirection':_0x4736(0x52c),'alignItems':_0x4736(0x527),'marginBottom':0x6},'debugLabel':{'color':_0x4736(0x52a),'fontSize':0xc,'flex':0x1},'debugBtn':{'backgroundColor':'#444','paddingHorizontal':0xc,'paddingVertical':0x4,'borderRadius':0x4,'marginLeft':0x4},'debugCloseBtn':{'backgroundColor':_0x4736(0x52d),'paddingVertical':0x6,'borderRadius':0x4,'marginTop':0x8,'alignItems':_0x4736(0x527)},'debugCloseBtnText':{'color':_0x4736(0x52a),'fontSize':0xc},'header':{'alignItems':_0x4736(0x527),'marginBottom':0x14,'paddingHorizontal':0x18},'headerContent':{'flexDirection':'row','alignItems':_0x4736(0x527),'justifyContent':'center','marginBottom':0x18},'appIcon':{'width':0x30,'height':0x30,'borderRadius':0x18,'backgroundColor':_0x4736(0x52e),'alignItems':_0x4736(0x527),'justifyContent':_0x4736(0x527)},'appIconText':{'fontSize':0x18,'fontWeight':_0x4736(0x52f),'color':'#333'},'arrow':{'marginHorizontal':0x10,'fontSize':0x18,'color':_0x4736(0x52d)},'onairosIcon':{'width':0x36,'height':0x36,'borderRadius':0x20,'backgroundColor':'transparent','alignItems':_0x4736(0x527),'justifyContent':_0x4736(0x527)},'onairosIconText':{'fontSize':0x18,'fontWeight':_0x4736(0x52f),'color':_0x4736(0x52a)},'onairosIconImage':{'width':0x36,'height':0x36},'titleContainer':{'alignItems':_0x4736(0x527)},'mainTitle':{'fontSize':0x18,'fontWeight':_0x4736(0x530),'color':_0x4736(0x531),'textAlign':_0x4736(0x527),'marginBottom':0xc},'privacyMessage':{'fontSize':0xe,'color':_0x4736(0x52d),'textAlign':_0x4736(0x527),'marginBottom':0x14},'privacyLink':{'color':_0x4736(0x532),'fontWeight':_0x4736(0x530),'textDecorationLine':'underline'},'boldText':{'fontWeight':_0x4736(0x52f)},'content':{'flex':0x1,'paddingHorizontal':0x18},'platformsScrollView':{'flex':0x1,'width':_0x4736(0x526)},'platformsScrollContent':{'paddingBottom':0x0,'paddingHorizontal':0x18},'platformsContainer':{'marginTop':0x10},'platformItem':{'flexDirection':'row','alignItems':_0x4736(0x527),'justifyContent':_0x4736(0x533),'paddingVertical':0x10,'paddingHorizontal':0x8,'borderBottomWidth':0x1,'borderBottomColor':_0x4736(0x534)},'platformInfo':{'flexDirection':_0x4736(0x52c),'alignItems':_0x4736(0x527)},'platformIcon':{'width':0x28,'height':0x28,'borderRadius':0x14,'backgroundColor':_0x4736(0x52e),'alignItems':_0x4736(0x527),'justifyContent':'center','marginRight':0x10},'platformIconText':{'fontSize':0x12,'fontWeight':'bold','color':_0x4736(0x531),'textAlign':'center','textAlignVertical':_0x4736(0x527)},'platformIconImage':{'width':0x18,'height':0x18},'youtubeIconImage':{'width':0x3a,'height':0x3a},'redditIconImage':{'width':0x22,'height':0x22},'pinterestIconImage':{'width':0x30,'height':0x30},'gmailIconImage':{'width':0x20,'height':0x20},'linkedinPlatformIcon':{'width':0x28,'height':0x28,'borderRadius':0x8,'backgroundColor':'#F5F5F5','alignItems':_0x4736(0x527),'justifyContent':_0x4736(0x527),'marginRight':0x10},'pinterestPlatformIcon':{'width':0x22,'height':0x22,'borderRadius':0x11,'backgroundColor':_0x4736(0x52e),'alignItems':_0x4736(0x527),'justifyContent':'center','marginRight':0x10},'platformName':{'fontSize':0x10,'color':_0x4736(0x531),'textAlignVertical':'center'},'footer':{'flexDirection':'row','alignItems':_0x4736(0x527),'justifyContent':'space-between','padding':0x18,'borderTopWidth':0x1,'borderTopColor':_0x4736(0x534)},'footerButtonCancel':{'paddingVertical':0xc,'paddingHorizontal':0x10},'footerButtonText':{'color':_0x4736(0x52d),'fontSize':0x10},'footerButtonConfirm':{'paddingVertical':0xc,'paddingHorizontal':0x18,'backgroundColor':_0x4736(0x532),'borderRadius':0x8,'marginTop':0x14},'footerButtonConnected':{'paddingVertical':0xc,'paddingHorizontal':0x18,'backgroundColor':_0x4736(0x535),'borderRadius':0x8},'footerButtonDisabled':{'backgroundColor':_0x4736(0x534)},'footerButtonTextConfirm':{'color':_0x4736(0x52a),'fontSize':0x10,'fontWeight':_0x4736(0x530)},'footerButtonTextConnected':{'color':_0x4736(0x536),'fontSize':0x10,'fontWeight':_0x4736(0x530)},'connectContainer':{'flex':0x1},'modalContent':{'flex':0x1,'backgroundColor':_0x4736(0x537),'borderTopLeftRadius':0x14,'borderTopRightRadius':0x14,'padding':0x18},'backButton':{'padding':0x8,'width':0x28},'backButtonText':{'fontSize':0x18,'color':'#000000'},'backButtonSpacer':{'width':0x28},'headerTitle':{'fontSize':0x12,'fontWeight':'600','color':_0x4736(0x531),'textAlign':_0x4736(0x527)},'privacyHeader':{'flexDirection':_0x4736(0x52c),'alignItems':_0x4736(0x527),'justifyContent':_0x4736(0x533),'paddingHorizontal':0x10,'paddingVertical':0x14,'backgroundColor':_0x4736(0x537),'borderBottomWidth':0x1,'borderBottomColor':_0x4736(0x538)},'privacyDetailsContainer':{'paddingHorizontal':0x18,'paddingVertical':0x8,'flex':0x1,'marginTop':0x14},'privacyDetailsTitle':{'fontSize':0x14,'fontWeight':_0x4736(0x530),'color':'#333','marginBottom':0x0},'privacyBulletPoint':{'flexDirection':'row','marginBottom':0x10,'alignItems':_0x4736(0x539)},'bulletPoint':{'fontSize':0x12,'marginRight':0x8,'color':_0x4736(0x531)},'privacyBulletText':{'fontSize':0x10,'color':_0x4736(0x531),'flex':0x1,'lineHeight':0x18},'connectionsCountText':{'fontSize':0x12,'fontWeight':'600','color':_0x4736(0x531),'marginBottom':0x18},'personaContainer':{'flex':0x1,'padding':0x10,'backgroundColor':_0x4736(0x52a),'justifyContent':_0x4736(0x539)},'personaHeaderWithBack':{'flexDirection':'row','alignItems':_0x4736(0x527),'justifyContent':'space-between','marginBottom':0x10,'paddingVertical':0x8},'personaBackButton':{'padding':0x8},'personaHeader':{'alignItems':_0x4736(0x527),'marginBottom':0x20,'paddingHorizontal':0x18},'personaTitle':{'fontSize':0x14,'fontWeight':'600','color':_0x4736(0x531),'textAlign':_0x4736(0x527),'flex':0x1,'marginBottom':0x8},'personaSubtitle':{'fontSize':0xe,'color':'#666','marginBottom':0x18,'textAlign':_0x4736(0x527)},'personaProgressContainer':{'marginBottom':0x18,'paddingHorizontal':0x0},'personaProgressBar':{'height':0x8,'backgroundColor':_0x4736(0x52e),'borderRadius':0x4,'overflow':_0x4736(0x525),'marginBottom':0xc},'personaProgressFill':{'height':_0x4736(0x526),'backgroundColor':_0x4736(0x53a),'borderRadius':0x4},'personaProgressText':{'fontSize':0x10,'fontWeight':'600','color':_0x4736(0x531),'textAlign':_0x4736(0x527),'marginBottom':0x8},'personaStatusText':{'fontSize':0xe,'color':_0x4736(0x52d),'textAlign':_0x4736(0x527)},'personaCompleteContainer':{'alignItems':_0x4736(0x527),'paddingHorizontal':0x0},'personaCompleteTitle':{'fontSize':0x14,'fontWeight':_0x4736(0x530),'color':_0x4736(0x531),'marginBottom':0x8,'textAlign':_0x4736(0x527)},'personaCompleteSubtitle':{'fontSize':0xe,'color':'#666','textAlign':'center','marginBottom':0x28},'personaContinueButton':{'backgroundColor':_0x4736(0x532),'paddingVertical':0x10,'paddingHorizontal':0x30,'borderRadius':0x10,'alignItems':_0x4736(0x527),'width':'100%','marginTop':0x20,'shadowColor':_0x4736(0x536),'shadowOffset':{'width':0x0,'height':0x2},'shadowOpacity':0.1,'shadowRadius':0x4,'elevation':0x3},'personaContinueButtonText':{'color':_0x4736(0x52a),'fontSize':0x10,'fontWeight':'600'},'progressError':{'backgroundColor':_0x4736(0x53b)},'dataWarningContainer':{'padding':0x10,'borderRadius':0xc,'marginTop':0x10,'borderWidth':0x1,'shadowColor':'#000','shadowOffset':{'width':0x0,'height':0x2},'shadowOpacity':0.1,'shadowRadius':0x4,'elevation':0x3},'dataWarningHeader':{'flexDirection':_0x4736(0x52c),'alignItems':_0x4736(0x527),'marginBottom':0x8},'dataWarningIcon':{'fontSize':0x14,'marginRight':0x8},'dataWarningTitle':{'fontSize':0x10,'fontWeight':_0x4736(0x530),'flex':0x1},'dataWarningMessage':{'fontSize':0xe,'marginBottom':0x0,'lineHeight':0x14},'dataWarningSuggestions':{'marginTop':0xc,'paddingTop':0xc,'borderTopWidth':0x1},'dataWarningSuggestionsTitle':{'fontSize':0xe,'fontWeight':_0x4736(0x530),'marginBottom':0x6},'dataWarningSuggestionItem':{'fontSize':0xd,'marginBottom':0x4,'lineHeight':0x12},'dataWarningContinueNote':{'fontSize':0xd,'fontWeight':'500','marginTop':0xc,'fontStyle':_0x4736(0x53c)},'dataWarningError':{'backgroundColor':_0x4736(0x53d),'borderColor':_0x4736(0x53e)},'dataInfoContainer':{'backgroundColor':_0x4736(0x53f),'borderColor':'#BAE6FD'},'dataConnectionsRequired':{'backgroundColor':'#F5F5F5','borderColor':_0x4736(0x540),'shadowColor':'#6B7280','shadowOffset':{'width':0x0,'height':0x0},'shadowOpacity':0.15,'shadowRadius':0x8},'highlightedBackButton':{'backgroundColor':'#F5F5F5','borderRadius':0x14,'borderWidth':0x2,'borderColor':_0x4736(0x532),'shadowColor':_0x4736(0x532),'shadowOffset':{'width':0x0,'height':0x0},'shadowOpacity':0.3,'shadowRadius':0x8,'elevation':0x5},'highlightedBackArrow':{'color':_0x4736(0x532),'fontWeight':_0x4736(0x52f)},'goBackButton':{'backgroundColor':'#000000','paddingVertical':0xc,'paddingHorizontal':0x10,'borderRadius':0x8,'marginTop':0xc,'alignItems':_0x4736(0x527),'shadowColor':_0x4736(0x532),'shadowOffset':{'width':0x0,'height':0x0},'shadowOpacity':0.3,'shadowRadius':0x6,'elevation':0x3},'goBackButtonText':{'color':_0x4736(0x537),'fontSize':0xe,'fontWeight':'600'},'additionalPlatformsToggle':{'paddingVertical':0x10,'paddingHorizontal':0x8,'alignItems':_0x4736(0x527),'borderBottomWidth':0x1,'borderBottomColor':_0x4736(0x534)},'additionalPlatformsText':{'fontSize':0xe,'color':_0x4736(0x52d),'fontWeight':_0x4736(0x541)},'asterisk':{'color':_0x4736(0x542),'fontSize':0x10,'fontWeight':_0x4736(0x52f),'marginLeft':0x2},'linkedinRequirementContainer':{'backgroundColor':_0x4736(0x543),'borderWidth':0x1,'borderColor':'#E5E7EB','borderRadius':0x8,'paddingHorizontal':0xc,'paddingVertical':0x8,'marginTop':0x8,'marginHorizontal':0x4},'linkedinRequirementText':{'fontSize':0xc,'fontStyle':_0x4736(0x53c),'textAlign':_0x4736(0x527)},'linkedinRequirementAsterisk':{'color':_0x4736(0x542),'fontWeight':_0x4736(0x52f)},'linkedinRequirementMessage':{'color':'#6B7280'},'existingUserBanner':{'backgroundColor':_0x4736(0x53f),'borderWidth':0x1,'borderColor':_0x4736(0x544),'borderRadius':0xc,'paddingHorizontal':0x10,'paddingVertical':0xc,'marginTop':0xc},'existingUserText':{'fontSize':0xe,'fontWeight':_0x4736(0x530),'color':_0x4736(0x545),'marginBottom':0x4},'existingUserSubtext':{'fontSize':0xc,'color':'#0C4A6E','lineHeight':0x10}});
1
+ import React, { useCallback, useEffect, useState, useRef } from 'react';
2
+ import { View, Text, StyleSheet, Dimensions, TouchableOpacity, TouchableWithoutFeedback, Platform, Modal, Animated, Linking, Alert } from 'react-native';
3
+ // Removed navigation dependencies for SDK compatibility
4
+ import AsyncStorage from '@react-native-async-storage/async-storage';
5
+ // Import components and hooks
6
+
7
+ // Import Enoch-style UI components
8
+ import BrandMark from './BrandMark';
9
+ import HeadingGroup from './HeadingGroup';
10
+ import BodyText from './BodyText';
11
+ import PrimaryButton from './PrimaryButton';
12
+ import SignInStep from './SignInStep';
13
+ import VerificationStep from './VerificationStep';
14
+ import PlatformConnectorsStep from './PlatformConnectorsStep';
15
+ import PersonalizationConsentScreen from './PersonalizationConsentScreen';
16
+ // import { useConnections } from '../../hooks/useConnections'; // Commented out - file path issue
17
+ // import { useAuth } from '../../context/AuthContext'; // Commented out - file path issue
18
+ import { initiateOAuth, initiateNativeAuth, hasNativeSDK, isOAuthCallback } from '../services/platformAuthService';
19
+ import { getUniversalOnboardingIcon } from '../utils/assetRegistry';
20
+ import { signInWithGoogle } from '../services/googleAuthService';
21
+ import { triggerHaptic, HapticType } from '../utils/haptics';
22
+ import { getOnairosUsername, getAuthToken, sendEmailVerificationCode, confirmEmailVerificationCode } from '../services/authService';
23
+ import { io } from 'socket.io-client';
24
+ import { setTemporaryPin, clearTemporaryPin } from '../services/pinStorageUtils';
25
+ import { getEncryptedPinForAPI } from '../services/pinEncryptionService';
26
+ import { startEnochTrainingWithYouTubeCheck } from '../services/mobileTrainingService';
27
+ import { sendLLMDataToBackend } from '../services/llmDataStorage';
28
+ import { getConnectedAccountsSmart, getConnectedAccountsLookup } from '../services/connectedAccountsService';
29
+ import { API_CONFIG } from '../config/api';
30
+ // CRITICAL FIX: Use static imports to avoid Hermes transpilation issues with await import()
31
+ import { getJWT, storeJWT } from '../services/jwtStorageService';
32
+ import { refreshYouTubeTokens } from '../services/platformAuthService';
33
+
34
+ // Import types
35
+ // import type { ConnectionStatus } from '../../hooks/useConnections'; // Commented out - file path issue
36
+ // Removed App-specific navigation types
37
+
38
+ const {
39
+ height,
40
+ width
41
+ } = Dimensions.get('window');
42
+ // ConnectionStatus interface is now imported from hooks/useConnections
43
+
44
+ export const UniversalOnboarding = ({
45
+ visible,
46
+ onClose,
47
+ AppName,
48
+ requestData,
49
+ returnLink,
50
+ onComplete,
51
+ embedd = false,
52
+ debug = false,
53
+ test = false,
54
+ preferredPlatform,
55
+ primaryAuthOnly = false,
56
+ allowedPlatforms,
57
+ recommendedPlatforms,
58
+ allowSkip = true
59
+ }) => {
60
+ const [step, setStep] = useState(primaryAuthOnly ? 'platforms' : 'welcome');
61
+ const [connections, setConnections] = useState({});
62
+ const [pin, setPin] = useState('');
63
+ const [selectedTier, setSelectedTier] = useState('Medium');
64
+ // Training state is now handled by TrainingModal
65
+ const [slideAnim] = useState(new Animated.Value(height));
66
+ const [backdropOpacity] = useState(new Animated.Value(0));
67
+ const [platformToggles, setPlatformToggles] = useState({});
68
+ const [oauthUrl, setOauthUrl] = useState('');
69
+ const [currentPlatform, setCurrentPlatform] = useState('');
70
+ const [email, setEmail] = useState('');
71
+ const [userEmail, setUserEmail] = useState(''); // For verification flow
72
+ const [authLoading, setAuthLoading] = useState(false);
73
+ const [authError, setAuthError] = useState('');
74
+
75
+ // Returning user state
76
+ const [isReturningUser, setIsReturningUser] = useState(false);
77
+ const [returningUserConnections, setReturningUserConnections] = useState([]);
78
+ const [longPressTimer, setLongPressTimer] = useState(null);
79
+ // 🔧 FIX: Always initialize as false - let useEffect control visibility to prevent double animation glitch
80
+ const [modalVisible, setModalVisible] = useState(false);
81
+
82
+ // Consent screen loading state
83
+ const [isConsentLoading, setIsConsentLoading] = useState(false);
84
+
85
+ // DEBUG: Padding adjustment state (set to false to hide)
86
+ const [showDebugPanel, setShowDebugPanel] = useState(false);
87
+ const [debugPaddingTop, setDebugPaddingTop] = useState(0);
88
+ const [debugPaddingBottom, setDebugPaddingBottom] = useState(8);
89
+ const [debugHandlePaddingTop, setDebugHandlePaddingTop] = useState(6);
90
+
91
+ // Debug logging for modal visibility
92
+ useEffect(() => {
93
+ console.log('🔍 UniversalOnboarding: visible prop changed to:', visible);
94
+ console.log('🔍 UniversalOnboarding: modalVisible state is:', modalVisible);
95
+ console.log('🔍 UniversalOnboarding: current step is:', step);
96
+ console.log('🔍 UniversalOnboarding: primaryAuthOnly is:', primaryAuthOnly);
97
+ }, [visible, modalVisible, step, primaryAuthOnly]);
98
+
99
+ // 🔄 FIX: Reset step when modal re-opens (visible goes false → true)
100
+ // This prevents stale step state from a previous session (e.g., stuck on 'platforms' after sign-out)
101
+ const prevVisibleRef = useRef(visible);
102
+ useEffect(() => {
103
+ if (visible && !prevVisibleRef.current && !primaryAuthOnly) {
104
+ console.log('🔄 [RESET] Modal re-opened - resetting step to welcome');
105
+ setStep('welcome');
106
+ }
107
+ prevVisibleRef.current = visible;
108
+ }, [visible, primaryAuthOnly]);
109
+
110
+ // 🍎 FIX: Watch for primaryAuthOnly prop changes (Apple Sign-In flow)
111
+ // When primaryAuthOnly becomes true AFTER the component mounts, go to welcome step
112
+ // This handles the case where Apple sign-in completes and then opens the SDK modal
113
+ // User will see "Welcome to Onairos" then click "Get Started" to go to platforms (skipping signin)
114
+ useEffect(() => {
115
+ if (primaryAuthOnly && visible && (step === 'signin' || step === 'verification')) {
116
+ console.log('🍎 [APPLE FIX] primaryAuthOnly detected - resetting to welcome step');
117
+ console.log('🍎 [APPLE FIX] Current step was:', step, '-> Setting to: welcome');
118
+ setStep('welcome');
119
+ }
120
+ }, [primaryAuthOnly, visible]);
121
+ const isCompletingRef = useRef(false);
122
+ const [connectionsCount, setConnectionsCount] = useState(5); // Simulated connections count
123
+
124
+ // Add state for showing additional platforms
125
+ const [showAdditionalPlatforms, setShowAdditionalPlatforms] = useState(false);
126
+ const [additionalPlatformsOpacity] = useState(new Animated.Value(0));
127
+
128
+ // Add ref for ScrollView to control scroll position
129
+ const scrollViewRef = useRef(null);
130
+ // Get the authenticated user from auth context
131
+ // const { user } = useAuth(); // Hook not available
132
+ const user = null;
133
+
134
+ // State for storing the correct username
135
+ const [username, setUsername] = useState('');
136
+
137
+ // Real training state variables (replacing fake persona state)
138
+ const [personaProgress, setPersonaProgress] = useState(0);
139
+ const [personaStatus, setPersonaStatus] = useState('Initializing...');
140
+ const [isPersonaComplete, setIsPersonaComplete] = useState(false);
141
+ const [socketConnected, setSocketConnected] = useState(false);
142
+ const [hasError, setHasError] = useState(false);
143
+ const [userTraits, setUserTraits] = useState(null);
144
+ const [inferenceResults, setInferenceResults] = useState(null);
145
+ const [userToken, setUserToken] = useState(null);
146
+ const [userInfo, setUserInfo] = useState(null);
147
+ const [animatedDots, setAnimatedDots] = useState('');
148
+ const socketRef = useRef(null);
149
+ const dotsAnimationRef = useRef(null);
150
+
151
+ // Existing user state
152
+ const [isExistingUser, setIsExistingUser] = useState(false);
153
+ const [existingUserToken, setExistingUserToken] = useState(null);
154
+ const [existingUserInfo, setExistingUserInfo] = useState(null);
155
+
156
+ // Data scenario states
157
+ const [dataScenario, setDataScenario] = useState(null);
158
+ const [dataDetails, setDataDetails] = useState(null);
159
+ const [showDataWarning, setShowDataWarning] = useState(false);
160
+
161
+ // ✅ NEW: Background training state
162
+ const [isBackgroundTrainingStarted, setIsBackgroundTrainingStarted] = useState(false);
163
+ const [backgroundTrainingProgress, setBackgroundTrainingProgress] = useState('');
164
+ const [backgroundSocketId, setBackgroundSocketId] = useState(null);
165
+
166
+ // Function to store connected platforms (writes to BOTH keys for consistency)
167
+ const storeConnectedPlatform = async platformId => {
168
+ try {
169
+ const storedPlatforms = await AsyncStorage.getItem('connectedPlatforms');
170
+ let platforms = storedPlatforms ? JSON.parse(storedPlatforms) : [];
171
+
172
+ // Add platform if not already in the list
173
+ if (!platforms.includes(platformId)) {
174
+ platforms.push(platformId);
175
+ await AsyncStorage.setItem('connectedPlatforms', JSON.stringify(platforms));
176
+ await AsyncStorage.setItem('user_connected_platforms', JSON.stringify(platforms));
177
+ console.log('📱 Stored connected platform:', platformId, 'Total platforms:', platforms);
178
+ }
179
+ } catch (error) {
180
+ console.error('Error storing connected platform:', error);
181
+ }
182
+ };
183
+
184
+ // Function to remove connected platform from storage (removes from BOTH keys)
185
+ const removeConnectedPlatform = async platformId => {
186
+ try {
187
+ const storedPlatforms = await AsyncStorage.getItem('connectedPlatforms');
188
+ let platforms = storedPlatforms ? JSON.parse(storedPlatforms) : [];
189
+
190
+ // Remove platform from the list
191
+ platforms = platforms.filter(platform => platform !== platformId);
192
+ await AsyncStorage.setItem('connectedPlatforms', JSON.stringify(platforms));
193
+ await AsyncStorage.setItem('user_connected_platforms', JSON.stringify(platforms));
194
+ console.log('📱 Removed connected platform:', platformId, 'Remaining platforms:', platforms);
195
+ } catch (error) {
196
+ console.error('Error removing connected platform:', error);
197
+ }
198
+ };
199
+
200
+ // Function to handle disconnect confirmation
201
+ const handleDisconnectPlatform = (platformId, platformName) => {
202
+ Alert.alert('Disconnect Platform', `Are you sure you want to disconnect ${platformName}?`, [{
203
+ text: 'No',
204
+ style: 'cancel'
205
+ }, {
206
+ text: 'Yes',
207
+ style: 'destructive',
208
+ onPress: async () => {
209
+ try {
210
+ // Update local state to show disconnected
211
+ setConnectionStatuses(prev => ({
212
+ ...prev,
213
+ [platformId]: 'disconnected'
214
+ }));
215
+ setConnections(prev => {
216
+ const newConnections = {
217
+ ...prev
218
+ };
219
+ delete newConnections[platformId];
220
+ return newConnections;
221
+ });
222
+ setPlatformToggles(prev => ({
223
+ ...prev,
224
+ [platformId]: false
225
+ }));
226
+
227
+ // Remove from storage
228
+ await removeConnectedPlatform(platformId);
229
+
230
+ // Call the disconnect function from the hook
231
+ await disconnectPlatform();
232
+ console.log('🔌 Disconnected platform:', platformId);
233
+ } catch (error) {
234
+ console.error('Error disconnecting platform:', error);
235
+ }
236
+ }
237
+ }]);
238
+ };
239
+
240
+ // Function to start animated dots
241
+ const startDotsAnimation = () => {
242
+ if (dotsAnimationRef.current) {
243
+ clearInterval(dotsAnimationRef.current);
244
+ }
245
+ let dotCount = 0;
246
+ dotsAnimationRef.current = setInterval(() => {
247
+ dotCount = (dotCount + 1) % 4; // 0, 1, 2, 3, then back to 0
248
+ if (dotCount === 0) {
249
+ setAnimatedDots('');
250
+ } else {
251
+ setAnimatedDots('.'.repeat(dotCount));
252
+ }
253
+ }, 500); // Change every 500ms
254
+ };
255
+
256
+ // Function to stop animated dots
257
+ const stopDotsAnimation = () => {
258
+ if (dotsAnimationRef.current) {
259
+ clearInterval(dotsAnimationRef.current);
260
+ dotsAnimationRef.current = null;
261
+ }
262
+ setAnimatedDots('');
263
+ };
264
+
265
+ // Split platforms into main and additional
266
+ const mainPlatforms = [{
267
+ id: 'pinterest',
268
+ name: 'Pinterest',
269
+ color: '#E60023'
270
+ }, {
271
+ id: 'youtube',
272
+ name: 'YouTube',
273
+ color: '#FFFFFF'
274
+ }, {
275
+ id: 'linkedin',
276
+ name: 'LinkedIn',
277
+ color: '#0077B5'
278
+ }];
279
+ const additionalPlatforms = [{
280
+ id: 'reddit',
281
+ name: 'Reddit',
282
+ color: '#FFFFFF'
283
+ }, {
284
+ id: 'gmail',
285
+ name: 'Gmail',
286
+ color: '#EA4335'
287
+ }, {
288
+ id: 'chatgpt',
289
+ name: 'ChatGPT',
290
+ color: '#10A37F'
291
+ }];
292
+
293
+ // Keep the original platforms array for compatibility
294
+ const platforms = [...mainPlatforms, ...additionalPlatforms];
295
+
296
+ // const {
297
+ // connectPlatform,
298
+ // disconnectPlatform,
299
+ // getConnectionStatus,
300
+ // isConnecting,
301
+ // } = useConnections(); // Hook not available
302
+ const connectPlatform = async () => {};
303
+ const disconnectPlatform = async () => {};
304
+ const getConnectionStatus = () => 'disconnected';
305
+ const isConnecting = false;
306
+ const isConnected = () => false;
307
+
308
+ // Track connection statuses and currently connecting platform
309
+ const [connectionStatuses, setConnectionStatuses] = useState({});
310
+ const [connectingPlatform, setConnectingPlatform] = useState(null);
311
+
312
+ // Function to get the platform icon based on platform ID
313
+ const getPlatformIcon = platformId => {
314
+ return getUniversalOnboardingIcon(platformId);
315
+ };
316
+
317
+ // Track if the modal has ever been visible to prevent initial onClose call
318
+ const hasBeenVisibleRef = useRef(false);
319
+
320
+ // Store onClose in a ref to avoid dependency issues in useEffect
321
+ const onCloseRef = useRef(onClose);
322
+ useEffect(() => {
323
+ onCloseRef.current = onClose;
324
+ }, [onClose]);
325
+ useEffect(() => {
326
+ if (visible) {
327
+ hasBeenVisibleRef.current = true; // Mark that modal has been visible
328
+ isCompletingRef.current = false; // Reset flag when becoming visible
329
+
330
+ // 🔧 FIX: Reset backdrop opacity before showing to prevent stale state
331
+ backdropOpacity.setValue(0);
332
+ setModalVisible(true);
333
+ loadInitialStatus();
334
+ // Fade in backdrop (slide is handled by Modal's animationType="slide")
335
+ // Small delay to ensure modal is mounted before animating backdrop
336
+ requestAnimationFrame(() => {
337
+ Animated.timing(backdropOpacity, {
338
+ toValue: 1,
339
+ duration: 300,
340
+ useNativeDriver: true
341
+ }).start();
342
+ });
343
+ const subscription = Linking.addEventListener('url', handleUrl);
344
+ return () => {
345
+ subscription.remove();
346
+ };
347
+ } else if (hasBeenVisibleRef.current && !isCompletingRef.current) {
348
+ // Only animate out if NOT completing - prevents flicker during successful completion
349
+ // Fade out backdrop (slide is handled by Modal's animationType="slide")
350
+ Animated.timing(backdropOpacity, {
351
+ toValue: 0,
352
+ duration: 250,
353
+ useNativeDriver: true
354
+ }).start(() => {
355
+ // Use a timeout to prevent animation state updates during unmount
356
+ setTimeout(() => {
357
+ var _onCloseRef$current;
358
+ setModalVisible(false);
359
+ (_onCloseRef$current = onCloseRef.current) === null || _onCloseRef$current === void 0 || _onCloseRef$current.call(onCloseRef); // Call onClose from ref to avoid stale closure
360
+ }, 16);
361
+ });
362
+ } else if (hasBeenVisibleRef.current && isCompletingRef.current) {
363
+ // If completing, hide modal immediately without any animation or delay
364
+ setModalVisible(false);
365
+ // Don't call onClose() when completing - let parent handle the navigation
366
+ isCompletingRef.current = false; // Reset for next time
367
+ }
368
+ }, [visible]); // Removed onClose from dependency array - using ref instead
369
+
370
+ // Cleanup socket connection and dots animation when component unmounts or becomes invisible
371
+ useEffect(() => {
372
+ return () => {
373
+ if (socketRef.current) {
374
+ console.log('🔌 Cleaning up socket connection...');
375
+ socketRef.current.disconnect();
376
+ socketRef.current = null;
377
+ }
378
+ stopDotsAnimation();
379
+ };
380
+ }, [visible]);
381
+
382
+ // Set up deep link listener for OAuth callbacks
383
+ const handleUrl = useCallback(({
384
+ url
385
+ }) => {
386
+ if (isOAuthCallback(url)) {
387
+ handleOAuthCallback(url);
388
+ }
389
+ }, []);
390
+
391
+ // Load user data and authentication token when modal becomes visible
392
+ // Also implements cached login - skip to consent for returning users with valid JWT
393
+ useEffect(() => {
394
+ const loadUserData = async () => {
395
+ try {
396
+ // Check for existing user info first
397
+ const existingToken = await AsyncStorage.getItem('existing_user_token');
398
+ const existingInfo = await AsyncStorage.getItem('existing_user_info');
399
+ if (existingToken && existingInfo) {
400
+ console.log('🔍 Found existing user info - user wants to add more data');
401
+ setIsExistingUser(true);
402
+ setExistingUserToken(existingToken);
403
+ setExistingUserInfo(JSON.parse(existingInfo));
404
+
405
+ // Clear the temporary storage
406
+ await AsyncStorage.removeItem('existing_user_token');
407
+ await AsyncStorage.removeItem('existing_user_info');
408
+ }
409
+
410
+ // Use simplified JWT storage
411
+ const token = await getJWT();
412
+ setUserToken(token);
413
+ if (token) {
414
+ var _user$email;
415
+ // Use provided username or get stored username
416
+ const storedUsername = await getOnairosUsername();
417
+ const storedEmail = await AsyncStorage.getItem('user_email');
418
+ const fallbackUsername = storedUsername || (user === null || user === void 0 || (_user$email = user.email) === null || _user$email === void 0 ? void 0 : _user$email.split('@')[0]) || (user === null || user === void 0 ? void 0 : user.name) || 'mobile_user';
419
+ console.log('🔍 Using username for training:', fallbackUsername);
420
+ setUserInfo({
421
+ username: fallbackUsername,
422
+ email: storedEmail || (user === null || user === void 0 ? void 0 : user.email) || null,
423
+ id: null // Will be filled by backend during training
424
+ });
425
+ setUsername(fallbackUsername);
426
+
427
+ // 🔑 CACHED LOGIN: Check if this is a returning user with a valid token
428
+ // Skip directly to consent screen like other normal logins
429
+ if (storedEmail && step === 'welcome' && !primaryAuthOnly) {
430
+ console.log('🔑 [CACHED LOGIN] Found valid token for user:', storedEmail);
431
+
432
+ // Check local storage AND server for connected platforms
433
+ const connectedPlatformsJson = await AsyncStorage.getItem('connectedPlatforms');
434
+ const cachedConnections = connectedPlatformsJson ? JSON.parse(connectedPlatformsJson) : [];
435
+
436
+ // Also fetch server-side connections for returning users
437
+ let serverConnections = [];
438
+ try {
439
+ const serverAccounts = await getConnectedAccountsLookup(storedEmail);
440
+ serverConnections = serverAccounts.map(a => a.platform.toLowerCase());
441
+ console.log('🔑 [CACHED LOGIN] Server connections:', serverConnections);
442
+ } catch (err) {
443
+ console.warn('🔑 [CACHED LOGIN] Server lookup failed, using local only:', err);
444
+ }
445
+
446
+ // Merge local + server connections (deduplicated)
447
+ const allConnections = Array.from(new Set([...cachedConnections, ...serverConnections]));
448
+
449
+ // Sync merged connections back to local storage
450
+ if (allConnections.length > 0) {
451
+ await AsyncStorage.setItem('connectedPlatforms', JSON.stringify(allConnections));
452
+ await AsyncStorage.setItem('user_connected_platforms', JSON.stringify(allConnections));
453
+ }
454
+ if (allConnections.length > 0) {
455
+ // User has existing connections - skip to consent screen
456
+ console.log('🔑 [CACHED LOGIN] User has existing connections:', allConnections);
457
+ console.log('🔑 [CACHED LOGIN] Skipping to consent screen');
458
+ setUserEmail(storedEmail);
459
+ setIsReturningUser(true);
460
+ setReturningUserConnections(allConnections);
461
+ setStep('consent');
462
+ } else {
463
+ // User has token but no connections - skip to platforms
464
+ console.log('🔑 [CACHED LOGIN] User authenticated but no connections - skipping to platforms');
465
+ setUserEmail(storedEmail);
466
+ setStep('platforms');
467
+ }
468
+ }
469
+ }
470
+ } catch (error) {
471
+ var _user$email2;
472
+ console.error('Error loading user data:', error);
473
+ // Fallback user info
474
+ const fallbackUsername = (user === null || user === void 0 || (_user$email2 = user.email) === null || _user$email2 === void 0 ? void 0 : _user$email2.split('@')[0]) || (user === null || user === void 0 ? void 0 : user.name) || 'mobile_user';
475
+ setUserInfo({
476
+ username: fallbackUsername,
477
+ email: (user === null || user === void 0 ? void 0 : user.email) || null,
478
+ id: null
479
+ });
480
+ setUsername(fallbackUsername);
481
+ }
482
+ };
483
+ if (visible) {
484
+ loadUserData();
485
+ }
486
+ }, [visible, user, step, primaryAuthOnly]);
487
+ const loadInitialStatus = async () => {
488
+ try {
489
+ // Get the stored Onairos username first
490
+ const storedUsername = await getOnairosUsername();
491
+ const fallbackUsername = (user === null || user === void 0 ? void 0 : user.email) || (user === null || user === void 0 ? void 0 : user.name) || `user_${Math.floor(Math.random() * 10000)}`;
492
+ const finalUsername = storedUsername || fallbackUsername;
493
+ console.log('🔍 Loading username for data connections:', {
494
+ storedUsername,
495
+ fallbackUsername,
496
+ finalUsername
497
+ });
498
+ setUsername(finalUsername);
499
+
500
+ // Initialize connection statuses
501
+ const connectionStatus = await getConnectionStatus();
502
+ console.log('Initial connection status:', connectionStatus);
503
+
504
+ // Update the main connections state
505
+ setConnections(connectionStatus);
506
+
507
+ // Convert connections object to status strings
508
+ const statuses = {};
509
+ Object.keys(connectionStatus).forEach(platform => {
510
+ var _connectionStatus$pla;
511
+ statuses[platform] = (_connectionStatus$pla = connectionStatus[platform]) !== null && _connectionStatus$pla !== void 0 && _connectionStatus$pla.connected ? 'connected' : 'disconnected';
512
+ });
513
+ setConnectionStatuses(statuses);
514
+
515
+ // Initialize platform toggles based on connection statuses
516
+ const toggles = {};
517
+ Object.keys(connectionStatus).forEach(platform => {
518
+ var _connectionStatus$pla2;
519
+ toggles[platform] = ((_connectionStatus$pla2 = connectionStatus[platform]) === null || _connectionStatus$pla2 === void 0 ? void 0 : _connectionStatus$pla2.connected) || false;
520
+ });
521
+ setPlatformToggles(toggles);
522
+ console.log('Connection statuses set:', statuses);
523
+ console.log('Platform toggles set:', toggles);
524
+ } catch (error) {
525
+ console.error('Error loading initial connection status:', error);
526
+ // Set empty objects as fallback
527
+ setConnections({});
528
+ setConnectionStatuses({});
529
+ setPlatformToggles({});
530
+
531
+ // Still set a fallback username even if other loading fails
532
+ const fallbackUsername = (user === null || user === void 0 ? void 0 : user.email) || (user === null || user === void 0 ? void 0 : user.name) || `user_${Math.floor(Math.random() * 10000)}`;
533
+ setUsername(fallbackUsername);
534
+ }
535
+ };
536
+ const handleClose = () => {
537
+ const currentlyCompleting = isCompletingRef.current; // Capture ref's current value
538
+
539
+ // Fade out backdrop (slide out is handled by Modal's animationType="slide")
540
+ Animated.timing(backdropOpacity, {
541
+ toValue: 0,
542
+ duration: 250,
543
+ useNativeDriver: true
544
+ }).start(() => {
545
+ // Small delay before closing modal to ensure animation completes fully
546
+ setTimeout(() => {
547
+ setModalVisible(false);
548
+ if (!currentlyCompleting) {
549
+ // Use the captured value
550
+ onClose();
551
+ }
552
+ // Do NOT reset isCompletingRef.current here. The useEffect watching props.visible is responsible for that.
553
+ }, 100);
554
+ });
555
+ };
556
+
557
+ // ============================================
558
+ // ENOCH-STYLE FLOW HANDLERS
559
+ // ============================================
560
+
561
+ const handleGetStarted = () => {
562
+ triggerHaptic(HapticType.BUTTON_PRESS);
563
+
564
+ // 🍎 Apple Sign-In flow: Skip signin step since user already authenticated
565
+ if (primaryAuthOnly) {
566
+ console.log('🍎 Get Started pressed (Apple user) - skipping signin, going to platforms');
567
+ setStep('platforms');
568
+ return;
569
+ }
570
+ console.log('🚀 Get Started pressed - moving to signin');
571
+ setStep('signin');
572
+ };
573
+ const handleEmailSubmit = async emailInput => {
574
+ triggerHaptic(HapticType.BUTTON_PRESS);
575
+ setAuthLoading(true);
576
+ setAuthError('');
577
+ try {
578
+ // Check for reviewer bypass
579
+ if (emailInput === 'reviewer@bypass.com') {
580
+ console.log('🔍 Reviewer bypass detected');
581
+ await AsyncStorage.setItem('onairos_user', 'true');
582
+ // Note: Reviewer bypass uses a placeholder token
583
+ // Store a valid-looking placeholder JWT for reviewer bypass
584
+ await storeJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXZpZXdlciI6dHJ1ZSwiaWF0IjoxNzA0MDY3MjAwfQ.reviewer-bypass-signature-placeholder');
585
+ setUserEmail(emailInput);
586
+ setStep('platforms');
587
+ setAuthLoading(false);
588
+ return;
589
+ }
590
+
591
+ // Check for test bypass - skip to verification screen without sending email
592
+ if (emailInput === 'test@bypass.com') {
593
+ console.log('🧪 Test bypass detected - skipping to verification screen');
594
+ setUserEmail('test@example.com');
595
+ setStep('verification');
596
+ setAuthLoading(false);
597
+ return;
598
+ }
599
+ console.log('📧 Sending verification code to:', emailInput);
600
+
601
+ // Use the email verification API
602
+ const result = await sendEmailVerificationCode(emailInput);
603
+ if (result.success) {
604
+ console.log('✅ Verification code sent successfully');
605
+ setUserEmail(emailInput);
606
+ setStep('verification');
607
+ } else {
608
+ console.log('❌ Failed to send verification code:', result.message);
609
+ setAuthError(result.message || 'Failed to send verification code. Please try again.');
610
+ }
611
+ } catch (error) {
612
+ console.error('❌ Error sending verification code:', error);
613
+ setAuthError('Network error. Please check your connection and try again.');
614
+ } finally {
615
+ setAuthLoading(false);
616
+ }
617
+ };
618
+ const handleGoogleSignIn = async () => {
619
+ triggerHaptic(HapticType.BUTTON_PRESS);
620
+ setAuthLoading(true);
621
+ setAuthError('');
622
+ try {
623
+ console.log('🔗 Initiating Google Sign-In');
624
+
625
+ // Use the Google Auth Service to trigger native Google Sign-In
626
+ const result = await signInWithGoogle();
627
+ if (result.success && result.user) {
628
+ console.log('✅ Google Sign-In successful:', result.user.email);
629
+ console.log('🔍 Is new user?', result.isNewUser);
630
+
631
+ // Store the user email for later use
632
+ setUserEmail(result.user.email);
633
+
634
+ // Store username in state
635
+ const derivedUsername = result.user.username || result.user.email.split('@')[0];
636
+ setUsername(derivedUsername);
637
+
638
+ // ✅ FIX: Check if user is returning (already has an account)
639
+ if (result.isNewUser === false) {
640
+ console.log('👤 Returning user detected via Google Sign-In - checking for existing connections');
641
+ try {
642
+ // Try to fetch existing connected accounts
643
+ const existingConnections = await getConnectedAccountsSmart(result.user.email, result.user.id, derivedUsername);
644
+ if (existingConnections && existingConnections.length > 0) {
645
+ console.log(`✅ Found ${existingConnections.length} existing connections - skipping to consent`);
646
+ // Store connections for the consent screen and mark as returning user
647
+ setIsReturningUser(true);
648
+ setReturningUserConnections(existingConnections.map(c => c.platform));
649
+ setStep('consent');
650
+ triggerHaptic(HapticType.SUCCESS);
651
+ return;
652
+ } else {
653
+ console.log('ℹ️ No existing connections found - proceeding to platforms step');
654
+ }
655
+ } catch (connError) {
656
+ console.log('⚠️ Could not fetch existing connections, proceeding to platforms:', connError);
657
+ }
658
+ }
659
+
660
+ // New user or no existing connections - proceed to platforms step
661
+ setStep('platforms');
662
+ triggerHaptic(HapticType.SUCCESS);
663
+ } else if (result.cancelled) {
664
+ // User cancelled - just return without error
665
+ console.log('ℹ️ Google Sign-In cancelled by user');
666
+ } else {
667
+ // Show error message
668
+ setAuthError(result.message || 'Google Sign-In failed. Please try again.');
669
+ triggerHaptic(HapticType.ERROR);
670
+ }
671
+ } catch (error) {
672
+ console.error('❌ Google Sign-In error:', error);
673
+ setAuthError(error.message || 'Google Sign-In failed. Please try again.');
674
+ triggerHaptic(HapticType.ERROR);
675
+ setAuthError('Google Sign-In failed. Please try again.');
676
+ } finally {
677
+ setAuthLoading(false);
678
+ }
679
+ };
680
+ const handleCodeSubmit = async code => {
681
+ triggerHaptic(HapticType.BUTTON_PRESS);
682
+ setAuthLoading(true);
683
+ setAuthError('');
684
+ try {
685
+ // Test bypass - any code works for test@example.com
686
+ if (userEmail === 'test@example.com') {
687
+ console.log('🧪 Test bypass - skipping code verification, going to platforms');
688
+ setStep('platforms');
689
+ setAuthLoading(false);
690
+ return;
691
+ }
692
+ console.log('🔍 Verifying email code:', userEmail, code);
693
+ console.log('🔍 App name:', AppName);
694
+ const result = await confirmEmailVerificationCode(userEmail, code);
695
+ if (result.success) {
696
+ var _result$existingUserD, _result$existingUserD2, _result$existingUserD3, _result$enochInstruct;
697
+ console.log('✅ Email verification successful');
698
+ console.log('🔍 Checking for returning user data...', {
699
+ isNewUser: result.isNewUser,
700
+ flowType: result.flowType,
701
+ hasExistingData: (_result$existingUserD = result.existingUserData) === null || _result$existingUserD === void 0 ? void 0 : _result$existingUserD.hasExistingData,
702
+ connectionsCount: ((_result$existingUserD2 = result.existingUserData) === null || _result$existingUserD2 === void 0 || (_result$existingUserD2 = _result$existingUserD2.connections) === null || _result$existingUserD2 === void 0 ? void 0 : _result$existingUserD2.length) || 0
703
+ });
704
+
705
+ // Check if this is a returning user with existing connections
706
+ const isReturning = result.isNewUser === false || result.flowType === 'returning_user';
707
+ // 🔧 FIX: Ensure connections is always an array to prevent crash
708
+ const rawConnections = (_result$existingUserD3 = result.existingUserData) === null || _result$existingUserD3 === void 0 ? void 0 : _result$existingUserD3.connections;
709
+ const existingConnections = Array.isArray(rawConnections) ? rawConnections : [];
710
+
711
+ // Extract platform names from connections
712
+ // 🔧 FIX: Add null check for each connection item
713
+ const connectedPlatformNames = existingConnections.filter(conn => conn && (conn.hasData || conn.status === 'active')).map(conn => conn === null || conn === void 0 ? void 0 : conn.platform).filter(Boolean); // Remove any undefined platform names
714
+
715
+ console.log('🔍 Returning user check:', {
716
+ isReturning,
717
+ connectedPlatformNames,
718
+ showWelcomeBack: (_result$enochInstruct = result.enochInstructions) === null || _result$enochInstruct === void 0 ? void 0 : _result$enochInstruct.showWelcomeBack
719
+ });
720
+ if (isReturning && connectedPlatformNames.length > 0) {
721
+ // Returning user with connected platforms - skip to consent screen
722
+ console.log('👋 Welcome back! User has existing connections, skipping to consent screen');
723
+ setIsReturningUser(true);
724
+ setReturningUserConnections(connectedPlatformNames);
725
+ setStep('consent');
726
+ } else {
727
+ // New user or returning user without connections - show platform connection
728
+ console.log('🆕 New user or no existing connections, showing platform connection screen');
729
+ setIsReturningUser(false);
730
+ setReturningUserConnections([]);
731
+ setStep('platforms');
732
+ }
733
+ } else {
734
+ console.log('❌ Email verification failed:', result.message);
735
+ setAuthError(result.message || 'Invalid verification code. Please try again.');
736
+ }
737
+ } catch (error) {
738
+ console.error('❌ Error verifying email code:', error);
739
+ setAuthError('Verification failed. Please try again.');
740
+ } finally {
741
+ setAuthLoading(false);
742
+ }
743
+ };
744
+ const handleBackToSignIn = () => {
745
+ triggerHaptic(HapticType.BUTTON_PRESS);
746
+ setAuthError('');
747
+ setStep('signin');
748
+ };
749
+
750
+ // Handle logout - clears token and navigates to login page (not close overlay)
751
+ const handleLogout = async () => {
752
+ triggerHaptic(HapticType.BUTTON_PRESS);
753
+ console.log('👋 Logout requested - clearing tokens and navigating to login');
754
+ try {
755
+ // Clear all auth tokens AND SDK-specific storage keys
756
+ await AsyncStorage.multiRemove(['sdk_jwt_token', 'onairos_jwt_token', 'user_email', 'onairos_username', 'auth_method', 'onairos_user', 'connectedPlatforms', 'user_connected_platforms', 'platform_account_details']);
757
+
758
+ // Clear LLM and LinkedIn connection keys
759
+ const llmPlatforms = ['chatgpt', 'claude', 'gemini', 'grok'];
760
+ for (const llm of llmPlatforms) {
761
+ await AsyncStorage.removeItem(`@onairos:llm_connected:${llm}`);
762
+ }
763
+ await AsyncStorage.removeItem('@onairos:linkedin_connected');
764
+
765
+ // Clear state
766
+ setUserToken(null);
767
+ setUserInfo(null);
768
+ setUserEmail('');
769
+ setIsReturningUser(false);
770
+ setReturningUserConnections([]);
771
+
772
+ // Navigate to signin step (NOT close the overlay)
773
+ setAuthError('');
774
+ setStep('signin');
775
+ console.log('✅ Logout complete - user is now on login page');
776
+ } catch (error) {
777
+ console.error('❌ Error during logout:', error);
778
+ // Still navigate to signin even on error
779
+ setStep('signin');
780
+ }
781
+ };
782
+ const handleResendCode = async () => {
783
+ triggerHaptic(HapticType.BUTTON_PRESS);
784
+ setAuthLoading(true);
785
+ setAuthError('');
786
+ try {
787
+ console.log('🔄 Resending verification code to:', userEmail);
788
+ const result = await sendEmailVerificationCode(userEmail);
789
+ if (result.success) {
790
+ console.log('✅ Verification code resent successfully');
791
+ } else {
792
+ setAuthError(result.message || 'Failed to resend verification code.');
793
+ }
794
+ } catch (error) {
795
+ console.error('❌ Error resending verification code:', error);
796
+ setAuthError('Network error. Please try again.');
797
+ } finally {
798
+ setAuthLoading(false);
799
+ }
800
+ };
801
+ const handlePlatformUpdate = async connectedPlatforms => {
802
+ triggerHaptic(HapticType.SUCCESS);
803
+ console.log('✅ Onboarding complete! Connected platforms:', connectedPlatforms);
804
+
805
+ // 🚀 OPTIMIZATION: Load auth data in parallel (fast!)
806
+ try {
807
+ const [token, email, storedUsername] = await Promise.all([getAuthToken(), AsyncStorage.getItem('user_email'), getOnairosUsername()]);
808
+ console.log('🔑 [SDK] Auth data retrieved in parallel');
809
+ console.log('🔑 [SDK] Token available:', token ? `${token.substring(0, 20)}...` : 'NO');
810
+ console.log('📧 [SDK] Email available:', email || 'NO');
811
+
812
+ // Set completing flag before closing
813
+ isCompletingRef.current = true;
814
+
815
+ // 🍎 FIX: Always include email if available (critical for Apple sign-in)
816
+ // Apple auth may not have SDK token, but app needs email for platform sync
817
+ const userData = {
818
+ connectedPlatforms
819
+ };
820
+ if (email) {
821
+ userData.email = email;
822
+ userData.username = storedUsername || email.split('@')[0];
823
+ }
824
+ if (token && email) {
825
+ // Full data available - include token
826
+ console.log('✅ [SDK] Calling onComplete with token and user data');
827
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, token, userData));
828
+ } else if (email) {
829
+ // 🍎 Apple sign-in case: Email available but no SDK token
830
+ // App can still sync platforms using email
831
+ console.log('🍎 [SDK] Calling onComplete with email (no SDK token - Apple auth)');
832
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, '', userData));
833
+ } else {
834
+ // Fallback: No email available
835
+ console.warn('⚠️ [SDK] No email found - calling onComplete with limited data');
836
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, '', userData));
837
+ }
838
+ } catch (error) {
839
+ console.error('❌ [SDK] Error retrieving auth data for onComplete:', error);
840
+ // Still close the modal even on error - try to get email one more time
841
+ const fallbackEmail = await AsyncStorage.getItem('user_email').catch(() => null);
842
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, '', {
843
+ connectedPlatforms,
844
+ ...(fallbackEmail && {
845
+ email: fallbackEmail
846
+ })
847
+ }));
848
+ }
849
+
850
+ // NOTE: Modal closes when parent sets visible={false} after onComplete finishes
851
+ // Do NOT call handleClose() here - let the loading animation stay visible
852
+ console.log('✅ [SDK] onComplete finished - waiting for parent to close modal');
853
+ };
854
+ const handlePlatformSkip = async () => {
855
+ triggerHaptic(HapticType.BUTTON_PRESS);
856
+ console.log('⏭️ Skipping platform connections');
857
+
858
+ // Even when skipping, pass back the token so the app can register the user
859
+ try {
860
+ // 🚀 OPTIMIZATION: Load data in parallel (fast!)
861
+ const [token, email, storedUsername] = await Promise.all([getAuthToken(), AsyncStorage.getItem('user_email'), getOnairosUsername()]);
862
+
863
+ // Set completing flag before closing
864
+ isCompletingRef.current = true;
865
+ if (token && email) {
866
+ console.log('✅ [SDK] User skipped platforms - still calling onComplete with auth data');
867
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, token, {
868
+ email,
869
+ connectedPlatforms: [],
870
+ username: storedUsername || email.split('@')[0],
871
+ skipped: true
872
+ }));
873
+ } else {
874
+ console.warn('⚠️ [SDK] User skipped - no auth data available');
875
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, '', {
876
+ connectedPlatforms: [],
877
+ skipped: true
878
+ }));
879
+ }
880
+ } catch (error) {
881
+ console.error('❌ [SDK] Error during skip:', error);
882
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, '', {
883
+ connectedPlatforms: [],
884
+ skipped: true
885
+ }));
886
+ }
887
+
888
+ // NOTE: Modal closes when parent sets visible={false} after onComplete finishes
889
+ console.log('✅ [SDK] Skip complete - waiting for parent to close modal');
890
+ };
891
+ const handleReviewerBypass = async () => {
892
+ console.log('🔍 Reviewer bypass triggered from platforms');
893
+ triggerHaptic(HapticType.BUTTON_PRESS);
894
+ try {
895
+ await AsyncStorage.setItem('onairos_user', 'true');
896
+ // Note: Reviewer bypass uses a placeholder token
897
+ await storeJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXZpZXdlciI6dHJ1ZSwiaWF0IjoxNzA0MDY3MjAwfQ.reviewer-bypass-signature-placeholder');
898
+ console.log('✅ Stored reviewer bypass markers');
899
+ handleClose();
900
+ } catch (error) {
901
+ console.error('❌ Failed to store reviewer bypass:', error);
902
+ handleClose();
903
+ }
904
+ };
905
+
906
+ // ============================================
907
+ // END ENOCH-STYLE FLOW HANDLERS
908
+ // ============================================
909
+
910
+ const handleConnectPlatform = async platformId => {
911
+ // Trigger haptic feedback when connect button is pressed
912
+ triggerHaptic(HapticType.BUTTON_PRESS);
913
+ setConnectingPlatform(platformId);
914
+ try {
915
+ // Check if the platform has a native SDK
916
+ if (hasNativeSDK(platformId)) {
917
+ // Use native SDK authentication
918
+ setCurrentPlatform(platformId);
919
+ const success = await initiateNativeAuth(platformId, username);
920
+ if (success) {
921
+ // Update connections state
922
+ setConnections(prev => ({
923
+ ...prev,
924
+ [platformId]: {
925
+ userName: username,
926
+ connected: true
927
+ }
928
+ }));
929
+
930
+ // Update platform toggles
931
+ setPlatformToggles(prev => ({
932
+ ...prev,
933
+ [platformId]: true
934
+ }));
935
+
936
+ // Update connection statuses
937
+ setConnectionStatuses(prev => ({
938
+ ...prev,
939
+ [platformId]: 'connected'
940
+ }));
941
+
942
+ // Store the connected platform
943
+ await storeConnectedPlatform(platformId);
944
+ }
945
+ } else {
946
+ // For other platforms, use the web OAuth flow
947
+ setCurrentPlatform(platformId);
948
+ const oauthUrl = await initiateOAuth(platformId, username);
949
+ if (oauthUrl) {
950
+ setOauthUrl(oauthUrl);
951
+ setStep('oauth');
952
+ }
953
+ }
954
+ } catch (error) {
955
+ console.error(`Error connecting to ${platformId}:`, error);
956
+ } finally {
957
+ setConnectingPlatform(null);
958
+ }
959
+ };
960
+ const togglePlatform = useCallback(async platformId => {
961
+ // If toggling on, initiate the OAuth flow for the platform
962
+ if (!platformToggles[platformId]) {
963
+ try {
964
+ // Special case for Instagram which uses the existing flow
965
+ if (platformId === 'instagram') {
966
+ setPlatformToggles(prev => ({
967
+ ...prev,
968
+ [platformId]: !prev[platformId]
969
+ }));
970
+ setConnections(prev => ({
971
+ ...prev,
972
+ [platformId]: {
973
+ userName: `${platformId}_user`,
974
+ connected: true
975
+ }
976
+ }));
977
+ // Store the connected platform
978
+ await storeConnectedPlatform(platformId);
979
+ return;
980
+ }
981
+
982
+ // ChatGPT/LLM: Full backend implementation - send data directly to backend
983
+ if (platformId === 'chatgpt' || platformId === 'llm') {
984
+ console.log('🤖 Handling LLM/ChatGPT connection - sending to backend...');
985
+
986
+ // In production, this would trigger OAuth flow to get actual ChatGPT data
987
+ // For now, using mock data structure
988
+ const llmData = {
989
+ userId: email || username,
990
+ email: email || `${username}@temp.com`,
991
+ appName: AppName,
992
+ timestamp: Date.now(),
993
+ data: {
994
+ conversations: [],
995
+ chatHistory: [],
996
+ preferences: {},
997
+ customData: {}
998
+ },
999
+ // These would come from actual OAuth flow
1000
+ accessToken: undefined,
1001
+ refreshToken: undefined,
1002
+ tokenExpiry: undefined
1003
+ };
1004
+
1005
+ // Send LLM data directly to backend for processing and storage
1006
+ const result = await sendLLMDataToBackend(llmData);
1007
+ if (result.success) {
1008
+ console.log('✅ Backend received and stored LLM data');
1009
+ console.log('📝 Connection ID:', result.connectionId);
1010
+
1011
+ // Update platform toggle state
1012
+ setPlatformToggles(prev => ({
1013
+ ...prev,
1014
+ [platformId]: true
1015
+ }));
1016
+
1017
+ // Update connections state
1018
+ setConnections(prev => ({
1019
+ ...prev,
1020
+ [platformId]: {
1021
+ userName: username,
1022
+ connected: true,
1023
+ connectionId: result.connectionId,
1024
+ storedInBackend: true
1025
+ }
1026
+ }));
1027
+
1028
+ // Store the connected platform
1029
+ await storeConnectedPlatform(platformId);
1030
+ console.log(`✅ ${platformId} successfully connected and stored in backend`);
1031
+ } else {
1032
+ throw new Error(`Failed to send LLM data to backend: ${result.message}`);
1033
+ }
1034
+ return;
1035
+ }
1036
+
1037
+ // Check if the platform has a native SDK
1038
+ if (hasNativeSDK(platformId)) {
1039
+ // Use native SDK authentication
1040
+ setCurrentPlatform(platformId);
1041
+ const success = await initiateNativeAuth(platformId, username);
1042
+ if (success) {
1043
+ // Update connections state
1044
+ setConnections(prev => ({
1045
+ ...prev,
1046
+ [platformId]: {
1047
+ userName: username,
1048
+ connected: true
1049
+ }
1050
+ }));
1051
+
1052
+ // Update platform toggles
1053
+ setPlatformToggles(prev => ({
1054
+ ...prev,
1055
+ [platformId]: true
1056
+ }));
1057
+
1058
+ // Store the connected platform
1059
+ await storeConnectedPlatform(platformId);
1060
+ }
1061
+ return;
1062
+ }
1063
+
1064
+ // For other platforms, use the web OAuth flow
1065
+ setCurrentPlatform(platformId);
1066
+ const oauthUrl = await initiateOAuth(platformId, username);
1067
+
1068
+ // If oauthUrl is null, it means we should use native SDK (which should have been caught above)
1069
+ if (oauthUrl) {
1070
+ setOauthUrl(oauthUrl);
1071
+ setStep('oauth');
1072
+ }
1073
+ } catch (error) {
1074
+ console.error(`Error initiating OAuth for ${platformId}:`, error);
1075
+ // If there's an error, don't toggle the platform
1076
+ return;
1077
+ }
1078
+ } else {
1079
+ // If toggling off, just update the state
1080
+ setPlatformToggles(prev => ({
1081
+ ...prev,
1082
+ [platformId]: !prev[platformId]
1083
+ }));
1084
+
1085
+ // Remove connection
1086
+ setConnections(prev => {
1087
+ const newConnections = {
1088
+ ...prev
1089
+ };
1090
+ delete newConnections[platformId];
1091
+ return newConnections;
1092
+ });
1093
+ }
1094
+ }, [platformToggles, username]);
1095
+
1096
+ /**
1097
+ * Handles OAuth callback URLs
1098
+ */
1099
+ const handleOAuthCallback = useCallback(url => {
1100
+ try {
1101
+ // Extract the authorization code from the URL
1102
+ const parsedUrl = new URL(url);
1103
+ const code = parsedUrl.searchParams.get('code');
1104
+ const platform = parsedUrl.searchParams.get('platform') || currentPlatform;
1105
+ if (code && platform) {
1106
+ // Update connections state
1107
+ setConnections(prev => ({
1108
+ ...prev,
1109
+ [platform]: {
1110
+ userName: username,
1111
+ connected: true
1112
+ }
1113
+ }));
1114
+
1115
+ // Update platform toggles
1116
+ setPlatformToggles(prev => ({
1117
+ ...prev,
1118
+ [platform]: true
1119
+ }));
1120
+
1121
+ // Return to the connect step
1122
+ setStep('connect');
1123
+ }
1124
+ } catch (error) {
1125
+ console.error('Error handling OAuth callback:', error);
1126
+ }
1127
+ }, [currentPlatform, username]);
1128
+
1129
+ /**
1130
+ * Handles successful OAuth authentication from the OAuthWebView
1131
+ */
1132
+ const handleOAuthSuccess = useCallback(async code => {
1133
+ console.log(`🎉 OAuth success for ${currentPlatform} - backend callback completed`);
1134
+ console.log(`📝 Received result:`, code);
1135
+ if (currentPlatform) {
1136
+ console.log(`✅ Updating connection state for ${currentPlatform}`);
1137
+
1138
+ // Update connections state
1139
+ setConnections(prev => ({
1140
+ ...prev,
1141
+ [currentPlatform]: {
1142
+ userName: username,
1143
+ connected: true
1144
+ }
1145
+ }));
1146
+
1147
+ // Update platform toggles
1148
+ setPlatformToggles(prev => ({
1149
+ ...prev,
1150
+ [currentPlatform]: true
1151
+ }));
1152
+
1153
+ // Update connection statuses
1154
+ setConnectionStatuses(prev => ({
1155
+ ...prev,
1156
+ [currentPlatform]: 'connected'
1157
+ }));
1158
+
1159
+ // Store the connected platform
1160
+ await storeConnectedPlatform(currentPlatform);
1161
+ console.log(`💾 ${currentPlatform} connection stored successfully`);
1162
+ }
1163
+
1164
+ // Close the OAuth window by returning to the connect step
1165
+ console.log('🔄 Returning to connect step');
1166
+ setOauthUrl('');
1167
+ setStep('connect');
1168
+ }, [currentPlatform, username, storeConnectedPlatform]);
1169
+ const handlePinSubmit = useCallback(async userPin => {
1170
+ setPin(userPin);
1171
+
1172
+ // Store PIN temporarily for training component access
1173
+ setTemporaryPin(userPin);
1174
+ console.log('🔐 [PIN SUBMIT] PIN submitted, checking for background training...');
1175
+
1176
+ // ✅ NEW: Check if background training is already running
1177
+ if (isBackgroundTrainingStarted && backgroundSocketId) {
1178
+ console.log('✅ [PIN SUBMIT] Background training detected, continuing with PIN validation...');
1179
+
1180
+ // Continue with existing training by sending PIN validation
1181
+ try {
1182
+ await continueBackgroundTrainingWithPin(userPin);
1183
+ setStep('persona'); // Move to persona step to show training progress
1184
+ } catch (error) {
1185
+ console.error('❌ [PIN SUBMIT] Failed to continue background training:', error);
1186
+ // ❌ DISABLED: Don't start new training when PIN is submitted
1187
+ // Just show persona step with error state
1188
+ setStep('persona');
1189
+ setPersonaStatus('Error: Failed to continue training');
1190
+ setHasError(true);
1191
+ }
1192
+ } else {
1193
+ console.log('ℹ️ [PIN SUBMIT] No background training detected');
1194
+ // ❌ DISABLED: Don't start training when PIN is submitted
1195
+ // Training should only start during connector→PIN transition
1196
+ setStep('persona');
1197
+ setPersonaStatus('No training in progress. Please restart the flow.');
1198
+ setHasError(true);
1199
+ }
1200
+ console.log('🔐 [PIN SUBMIT] PIN stored securely, moved to persona step');
1201
+ }, [isBackgroundTrainingStarted, backgroundSocketId]);
1202
+
1203
+ // Start real Enoch training via API (restored for backwards compatibility)
1204
+ const startEnochTraining = async (socketId, authToken) => {
1205
+ try {
1206
+ setPersonaStatus('Starting training...');
1207
+ setPersonaProgress(15);
1208
+
1209
+ // Use provided token or get from simplified JWT storage
1210
+ const token = authToken || (await getJWT());
1211
+ if (!token) {
1212
+ console.error('❌ No authentication token available');
1213
+ throw new Error('No authentication token available');
1214
+ }
1215
+ console.log('🚀 Starting Enoch training with socketId:', socketId);
1216
+ console.log('🔑 Using auth token:', token ? `${token.substring(0, 20)}...` : 'None');
1217
+
1218
+ // Get stored Onairos username for API calls
1219
+ const storedUsername = await getOnairosUsername();
1220
+ const finalUsername = storedUsername || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || username || 'mobile_user';
1221
+
1222
+ // Get connected platforms information
1223
+ const connectedPlatforms = await AsyncStorage.getItem('connectedPlatforms');
1224
+ const platformsList = connectedPlatforms ? JSON.parse(connectedPlatforms) : [];
1225
+ console.log('📱 Connected platforms for training:', platformsList);
1226
+
1227
+ // Get encrypted PIN for training (if available)
1228
+ const encryptedPin = await getEncryptedPinForAPI().catch(error => {
1229
+ console.warn('⚠️ Could not get encrypted PIN for training:', error);
1230
+ return null;
1231
+ });
1232
+
1233
+ // Prepare user data for training - match backend expected format
1234
+ const trainingData = {
1235
+ socketId,
1236
+ username: finalUsername,
1237
+ email: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || null,
1238
+ modelKey: null,
1239
+ connectedPlatforms: platformsList,
1240
+ platformConnections: connections,
1241
+ ...(encryptedPin && {
1242
+ encryptedPin: encryptedPin,
1243
+ hasPinData: true
1244
+ })
1245
+ };
1246
+ console.log('📤 Sending training data to /mobile-training/enoch:', trainingData);
1247
+
1248
+ // Use the new training function that includes YouTube migration check
1249
+ const result = await startEnochTrainingWithYouTubeCheck(trainingData);
1250
+ console.log('📡 Training API response:', result);
1251
+
1252
+ // Handle CONNECTIONS_REQUIRED scenario (pre-training validation)
1253
+ if (result.requiresConnections || result.code === 'CONNECTIONS_REQUIRED') {
1254
+ console.log('🔗 Connections required detected from HTTP response');
1255
+ setDataScenario('CONNECTIONS_REQUIRED');
1256
+ setDataDetails(result);
1257
+ setShowDataWarning(true);
1258
+ setPersonaStatus('Connections required');
1259
+ setHasError(true);
1260
+ stopDotsAnimation();
1261
+ return;
1262
+ }
1263
+ if (result.success) {
1264
+ console.log('🚀 Training Started:', result.message);
1265
+ console.log('🎯 Training Features:', result.features);
1266
+
1267
+ // Log the new features from the spec
1268
+ if (result.features) {
1269
+ console.log('✅ Inference enabled:', result.features.inference);
1270
+ console.log('💾 Storage method:', result.features.storage);
1271
+ console.log('🔒 Compression enabled:', result.features.compression);
1272
+ console.log('🔐 Encryption enabled:', result.features.encryption);
1273
+ console.log('📊 Training type:', result.features.type);
1274
+ console.log('🗄️ Databases:', result.features.databases);
1275
+ console.log('📈 Query scores enabled:', result.features.queryScores);
1276
+ }
1277
+ setPersonaStatus('Training model...');
1278
+ setPersonaProgress(25);
1279
+ } else {
1280
+ console.error('❌ Training start failed:', result.error);
1281
+ setPersonaStatus(`Error: ${result.error || 'Training failed to start'}`);
1282
+ setHasError(true);
1283
+ stopDotsAnimation();
1284
+ }
1285
+ } catch (error) {
1286
+ console.error('❌ Training start error:', error);
1287
+ setPersonaStatus(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
1288
+ setHasError(true);
1289
+ stopDotsAnimation();
1290
+ }
1291
+ };
1292
+
1293
+ // ✅ NEW: Continue background training with PIN validation
1294
+ const continueBackgroundTrainingWithPin = async userPin => {
1295
+ try {
1296
+ console.log('🔐 [BACKGROUND] Continuing existing background training with PIN validation');
1297
+ console.log('🔑 Using auth token:', `${userToken === null || userToken === void 0 ? void 0 : userToken.substring(0, 20)}...`);
1298
+
1299
+ // Check if we have a valid socket ID
1300
+ if (!backgroundSocketId) {
1301
+ throw new Error('No background socket ID available');
1302
+ }
1303
+
1304
+ // ❌ REMOVED: Don't send new training signal - training already started!
1305
+ // We should just validate the PIN with the existing training, not start new training
1306
+
1307
+ console.log('🔐 [BACKGROUND] PIN validation - continuing with existing training session');
1308
+ console.log('🔌 [BACKGROUND] Using existing socket ID:', backgroundSocketId);
1309
+
1310
+ // Just log that we're continuing - the existing training should handle PIN internally
1311
+ console.log('✅ [BACKGROUND] PIN submitted for existing training session');
1312
+ } catch (error) {
1313
+ console.error('❌ [BACKGROUND] Failed to continue background training:', error);
1314
+ throw error;
1315
+ }
1316
+ };
1317
+
1318
+ // Replace fake persona creation with real training setup
1319
+ const startPersonaCreation = async () => {
1320
+ setPersonaProgress(0);
1321
+ setPersonaStatus('Initializing');
1322
+ setIsPersonaComplete(false);
1323
+ setHasError(false);
1324
+
1325
+ // Start the dots animation
1326
+ startDotsAnimation();
1327
+ try {
1328
+ var _user$email4;
1329
+ console.log('🚀 Starting persona creation...');
1330
+
1331
+ // Ensure we have a valid authentication token before starting
1332
+ console.log('🔐 Step 1: Ensuring authentication token...');
1333
+ const authToken = await ensureAuthToken();
1334
+ if (!authToken) {
1335
+ throw new Error('Failed to create or retrieve authentication token');
1336
+ }
1337
+
1338
+ // Set the token in state
1339
+ setUserToken(authToken);
1340
+ console.log('✅ Authentication token set in state:', `${authToken.substring(0, 20)}...`);
1341
+ console.log('🔍 Token length:', authToken.length);
1342
+
1343
+ // Also verify it was stored properly using simplified JWT storage
1344
+ const storedToken = await getJWT();
1345
+ console.log('🔑 Token stored verification:', storedToken ? `${storedToken.substring(0, 20)}...` : 'Not stored');
1346
+
1347
+ // If userInfo is not set, try to reload it
1348
+ if (!userInfo) {
1349
+ var _user$email3;
1350
+ console.log('🔄 UserInfo not available, attempting to reload...');
1351
+ const storedUsername = await getOnairosUsername();
1352
+ const fallbackUsername = storedUsername || (user === null || user === void 0 || (_user$email3 = user.email) === null || _user$email3 === void 0 ? void 0 : _user$email3.split('@')[0]) || (user === null || user === void 0 ? void 0 : user.name) || 'mobile_user';
1353
+ const newUserInfo = {
1354
+ username: fallbackUsername,
1355
+ email: (user === null || user === void 0 ? void 0 : user.email) || null,
1356
+ id: null
1357
+ };
1358
+ setUserInfo(newUserInfo);
1359
+ setUsername(fallbackUsername);
1360
+ console.log('🧑‍💻 Set user info:', newUserInfo);
1361
+
1362
+ // Give a moment for state to update
1363
+ await new Promise(resolve => setTimeout(() => resolve(), 200));
1364
+ }
1365
+
1366
+ // Check again after potential reload
1367
+ const currentUserInfo = userInfo || {
1368
+ username: username || (user === null || user === void 0 || (_user$email4 = user.email) === null || _user$email4 === void 0 ? void 0 : _user$email4.split('@')[0]) || (user === null || user === void 0 ? void 0 : user.name) || 'mobile_user',
1369
+ email: (user === null || user === void 0 ? void 0 : user.email) || null,
1370
+ id: null
1371
+ };
1372
+ if (!authToken) {
1373
+ console.error('❌ No authentication token available after ensureAuthToken');
1374
+ throw new Error('No authentication token available');
1375
+ }
1376
+ console.log('🔧 Setting up socket connection for real training...');
1377
+ console.log('🧑‍💻 User info available:', currentUserInfo);
1378
+ console.log('🔑 Token available:', !!authToken);
1379
+ console.log('🌐 Attempting to connect to: ${API_CONFIG.BASE_URL}');
1380
+ console.log('📱 Device platform:', Platform.OS);
1381
+ console.log('🔗 Network connectivity check starting...');
1382
+ setPersonaStatus('Connecting');
1383
+ setPersonaProgress(5);
1384
+
1385
+ // Initialize socket connection with enhanced configuration
1386
+ socketRef.current = io(API_CONFIG.BASE_URL, {
1387
+ transports: ['websocket', 'polling'],
1388
+ // Add polling as fallback
1389
+ autoConnect: false,
1390
+ timeout: 15000,
1391
+ // Increase timeout to 15 seconds
1392
+ reconnection: true,
1393
+ // Enable reconnection with limits
1394
+ reconnectionAttempts: 3,
1395
+ reconnectionDelay: 1000,
1396
+ forceNew: true // Force a new connection
1397
+ });
1398
+ console.log('🔌 Socket instance created:', {
1399
+ connected: socketRef.current.connected,
1400
+ id: socketRef.current.id,
1401
+ disconnected: socketRef.current.disconnected
1402
+ });
1403
+
1404
+ // Socket event listeners with enhanced error handling
1405
+ socketRef.current.on('connect', () => {
1406
+ var _socketRef$current, _socketRef$current2, _socketRef$current3, _socketRef$current4;
1407
+ console.log('✅ Socket connected for training');
1408
+ console.log('🔌 Socket connection details:', {
1409
+ id: (_socketRef$current = socketRef.current) === null || _socketRef$current === void 0 ? void 0 : _socketRef$current.id,
1410
+ connected: (_socketRef$current2 = socketRef.current) === null || _socketRef$current2 === void 0 ? void 0 : _socketRef$current2.connected,
1411
+ transport: (_socketRef$current3 = socketRef.current) === null || _socketRef$current3 === void 0 || (_socketRef$current3 = _socketRef$current3.io) === null || _socketRef$current3 === void 0 || (_socketRef$current3 = _socketRef$current3.engine) === null || _socketRef$current3 === void 0 || (_socketRef$current3 = _socketRef$current3.transport) === null || _socketRef$current3 === void 0 ? void 0 : _socketRef$current3.name
1412
+ });
1413
+ setSocketConnected(true);
1414
+ setPersonaStatus('Starting training');
1415
+ setPersonaProgress(10);
1416
+ const socketId = (_socketRef$current4 = socketRef.current) === null || _socketRef$current4 === void 0 ? void 0 : _socketRef$current4.id;
1417
+ console.log('🔌 Socket ID for training:', socketId);
1418
+ if (socketId) {
1419
+ // Add a small delay to ensure socket is fully ready and registered on backend
1420
+ console.log('🔄 Socket ready for persona display with token:', authToken ? `${authToken.substring(0, 20)}...` : 'None');
1421
+ console.log('⏰ Socket registered but training will not start from persona screen...');
1422
+ // ❌ DISABLED: Don't start training from persona screen
1423
+ // Training should only start during connector→PIN transition
1424
+ // setTimeout(() => {
1425
+ // console.log('🚀 Now starting training with socket ID:', socketId);
1426
+ // startEnochTraining(socketId, authToken);
1427
+ // }, 2000);
1428
+
1429
+ // Just show the persona screen without starting training
1430
+ setPersonaStatus('Waiting for training to start from connector→PIN transition');
1431
+ } else {
1432
+ console.error('❌ No socket ID available after connection');
1433
+ setPersonaStatus('Connection error. Please try again.');
1434
+ setHasError(true);
1435
+ stopDotsAnimation();
1436
+ }
1437
+ });
1438
+ socketRef.current.on('disconnect', reason => {
1439
+ var _socketRef$current5;
1440
+ console.log('❌ Socket disconnected, reason:', reason);
1441
+ console.log('🔍 Disconnect details:', {
1442
+ reason: reason,
1443
+ wasConnected: socketConnected,
1444
+ socketId: (_socketRef$current5 = socketRef.current) === null || _socketRef$current5 === void 0 ? void 0 : _socketRef$current5.id
1445
+ });
1446
+ setSocketConnected(false);
1447
+ });
1448
+ socketRef.current.on('reconnect', attemptNumber => {
1449
+ console.log('🔄 Socket reconnected after', attemptNumber, 'attempts');
1450
+ setSocketConnected(true);
1451
+ });
1452
+ socketRef.current.on('reconnect_attempt', attemptNumber => {
1453
+ console.log('🔄 Socket reconnection attempt:', attemptNumber);
1454
+ setPersonaStatus(`Reconnecting... (${attemptNumber}/3)`);
1455
+ });
1456
+ socketRef.current.on('reconnect_error', error => {
1457
+ console.error('❌ Socket reconnection error:', error);
1458
+ });
1459
+ socketRef.current.on('reconnect_failed', () => {
1460
+ console.error('❌ Socket reconnection failed after all attempts');
1461
+ setPersonaStatus('Connection failed. Please try again.');
1462
+ setHasError(true);
1463
+ stopDotsAnimation();
1464
+ });
1465
+ socketRef.current.on('connect_error', error => {
1466
+ console.error('❌ Socket connection error:', error);
1467
+ console.error('❌ Socket error details:', {
1468
+ message: error.message,
1469
+ name: error.name,
1470
+ stack: error.stack,
1471
+ errorObject: error
1472
+ });
1473
+ setPersonaStatus('Connection error. Please try again.');
1474
+ setHasError(true);
1475
+ stopDotsAnimation();
1476
+ });
1477
+ socketRef.current.on('trainingCompleted', data => {
1478
+ console.log('✅ Training Complete:', data);
1479
+ setPersonaStatus('Running test inference');
1480
+ setPersonaProgress(60);
1481
+ });
1482
+ socketRef.current.on('inferenceCompleted', data => {
1483
+ console.log('🧠 Inference Complete:', data);
1484
+ setPersonaStatus('Uploading to S3');
1485
+ setPersonaProgress(80);
1486
+ setUserTraits(data.traits);
1487
+ setInferenceResults(data.inferenceResults);
1488
+ });
1489
+ socketRef.current.on('modelStandby', data => {
1490
+ console.log('🎉 All Complete:', data);
1491
+
1492
+ // Log completion details based on new spec
1493
+ if (data.completed) {
1494
+ console.log('✅ Training completed:', data.message);
1495
+ console.log('💾 Storage method:', data.storage);
1496
+ console.log('🔐 Encryption enabled:', data.encryption);
1497
+ console.log('🧠 Inference enabled:', data.inference);
1498
+
1499
+ // Log database info for Enoch mode
1500
+ if (data.databases && Array.isArray(data.databases)) {
1501
+ console.log('🗄️ Databases used:', data.databases.join(', '));
1502
+ }
1503
+
1504
+ // Log testing mode
1505
+ if (data.testing) {
1506
+ console.log('🧪 Testing mode enabled');
1507
+ }
1508
+ }
1509
+ setIsPersonaComplete(true);
1510
+ setPersonaStatus('Complete!');
1511
+ setPersonaProgress(100);
1512
+ stopDotsAnimation();
1513
+ });
1514
+ socketRef.current.on('trainingUpdate', data => {
1515
+ console.log('📊 Training update:', data);
1516
+
1517
+ // Handle YouTube token expiry
1518
+ if (data.error && data.error.includes('YouTube access token has expired')) {
1519
+ console.log('🔄 YouTube token expired, triggering reconnection...');
1520
+ setDataScenario(null);
1521
+ setShowDataWarning(false);
1522
+ setPersonaStatus('YouTube token expired - reconnecting...');
1523
+
1524
+ // Try to refresh tokens first before full reconnection
1525
+ setTimeout(async () => {
1526
+ try {
1527
+ console.log('🔄 Attempting to refresh YouTube tokens...');
1528
+ const refreshSuccess = await refreshYouTubeTokens();
1529
+ if (refreshSuccess) {
1530
+ console.log('✅ YouTube tokens refreshed, but training restart disabled');
1531
+ setPersonaStatus('YouTube tokens refreshed - but training only starts from connector→PIN');
1532
+
1533
+ // ❌ DISABLED: Don't restart training from persona screen
1534
+ // Training should only start during connector→PIN transition
1535
+ // if (socketRef.current?.id) {
1536
+ // startEnochTraining(socketRef.current.id, userToken ?? undefined);
1537
+ // }
1538
+
1539
+ setHasError(true); // Show error so user can restart flow properly
1540
+ } else {
1541
+ console.log('❌ Token refresh failed, attempting full reconnection...');
1542
+ setPersonaStatus('Token refresh failed - please restart from connector screen');
1543
+
1544
+ // ❌ DISABLED: Don't restart training from persona screen
1545
+ // Fall back to full reconnection
1546
+ try {
1547
+ await handleConnectPlatform('youtube');
1548
+ console.log('✅ YouTube reconnected, but training restart disabled');
1549
+ setPersonaStatus('YouTube reconnected - please restart from connector screen');
1550
+
1551
+ // ❌ DISABLED: Don't restart training from persona screen
1552
+ // Training should only start during connector→PIN transition
1553
+ // if (socketRef.current?.id) {
1554
+ // startEnochTraining(socketRef.current.id, userToken ?? undefined);
1555
+ // }
1556
+
1557
+ setHasError(true); // Show error so user can restart flow properly
1558
+ } catch (reconnectError) {
1559
+ console.error('❌ YouTube reconnection failed:', reconnectError);
1560
+ setPersonaStatus('YouTube reconnection failed. Please restart from connector screen.');
1561
+ setHasError(true);
1562
+ stopDotsAnimation();
1563
+ }
1564
+ }
1565
+ } catch (error) {
1566
+ console.error('❌ YouTube token refresh/reconnection error:', error);
1567
+ setPersonaStatus('YouTube connection failed. Please try again.');
1568
+ setHasError(true);
1569
+ stopDotsAnimation();
1570
+ }
1571
+ }, 1000);
1572
+ return;
1573
+ }
1574
+
1575
+ // Handle connections required scenario (pre-training validation)
1576
+ if (data.requiresConnections || data.code === 'CONNECTIONS_REQUIRED') {
1577
+ console.log('🔗 Connections required detected from socket');
1578
+ setDataScenario('CONNECTIONS_REQUIRED');
1579
+ setDataDetails(data);
1580
+ setShowDataWarning(true);
1581
+ setPersonaStatus('Connections required');
1582
+ setHasError(true);
1583
+ stopDotsAnimation();
1584
+ return;
1585
+ }
1586
+
1587
+ // Handle data scenario responses
1588
+ if (data.code === 'NO_DATA') {
1589
+ console.log('🚫 No data scenario detected');
1590
+ setDataScenario('NO_DATA');
1591
+ setDataDetails(data.details);
1592
+ setShowDataWarning(true);
1593
+ setPersonaStatus('No interaction data found');
1594
+ setHasError(true);
1595
+ stopDotsAnimation();
1596
+ return;
1597
+ }
1598
+ if (data.code === 'LIMITED_DATA') {
1599
+ console.log('ℹ️ Limited data scenario detected');
1600
+ setDataScenario('LIMITED_DATA');
1601
+ setDataDetails(data.details);
1602
+ setShowDataWarning(true);
1603
+ setPersonaStatus('Creating your persona with available data');
1604
+ // Don't set hasError - training continues
1605
+ return;
1606
+ }
1607
+
1608
+ // Handle regular training updates
1609
+ if (data.error) {
1610
+ console.error('❌ Training update error:', data.error);
1611
+ setPersonaStatus(`Error: ${data.error}`);
1612
+ setHasError(true);
1613
+ stopDotsAnimation();
1614
+ } else if (data.progress) {
1615
+ setPersonaProgress(data.progress);
1616
+ setPersonaStatus(data.status || 'Training in progress');
1617
+ // Clear data warning if training progresses normally
1618
+ if (showDataWarning && data.progress > 30) {
1619
+ setShowDataWarning(false);
1620
+ }
1621
+ }
1622
+ });
1623
+
1624
+ // Connect to socket with timeout
1625
+ console.log('🔌 Attempting to connect to socket...');
1626
+ console.log('🔌 Socket config:', {
1627
+ url: API_CONFIG.BASE_URL,
1628
+ transports: ['websocket'],
1629
+ autoConnect: false,
1630
+ timeout: 10000,
1631
+ reconnection: false
1632
+ });
1633
+ socketRef.current.connect();
1634
+ console.log('🔌 Socket connect() called - waiting for connection...');
1635
+
1636
+ // Add immediate state check
1637
+ setTimeout(() => {
1638
+ var _socketRef$current6, _socketRef$current7, _socketRef$current8, _socketRef$current9;
1639
+ console.log('🔍 Socket state after 1 second:', {
1640
+ connected: (_socketRef$current6 = socketRef.current) === null || _socketRef$current6 === void 0 ? void 0 : _socketRef$current6.connected,
1641
+ disconnected: (_socketRef$current7 = socketRef.current) === null || _socketRef$current7 === void 0 ? void 0 : _socketRef$current7.disconnected,
1642
+ id: (_socketRef$current8 = socketRef.current) === null || _socketRef$current8 === void 0 ? void 0 : _socketRef$current8.id,
1643
+ engineConnected: (_socketRef$current9 = socketRef.current) === null || _socketRef$current9 === void 0 || (_socketRef$current9 = _socketRef$current9.io) === null || _socketRef$current9 === void 0 || (_socketRef$current9 = _socketRef$current9.engine) === null || _socketRef$current9 === void 0 ? void 0 : _socketRef$current9.readyState
1644
+ });
1645
+ }, 1000);
1646
+ setTimeout(() => {
1647
+ var _socketRef$current0, _socketRef$current1, _socketRef$current10, _socketRef$current11;
1648
+ console.log('🔍 Socket state after 5 seconds:', {
1649
+ connected: (_socketRef$current0 = socketRef.current) === null || _socketRef$current0 === void 0 ? void 0 : _socketRef$current0.connected,
1650
+ disconnected: (_socketRef$current1 = socketRef.current) === null || _socketRef$current1 === void 0 ? void 0 : _socketRef$current1.disconnected,
1651
+ id: (_socketRef$current10 = socketRef.current) === null || _socketRef$current10 === void 0 ? void 0 : _socketRef$current10.id,
1652
+ engineConnected: (_socketRef$current11 = socketRef.current) === null || _socketRef$current11 === void 0 || (_socketRef$current11 = _socketRef$current11.io) === null || _socketRef$current11 === void 0 || (_socketRef$current11 = _socketRef$current11.engine) === null || _socketRef$current11 === void 0 ? void 0 : _socketRef$current11.readyState
1653
+ });
1654
+ }, 5000);
1655
+
1656
+ // Set a timeout for socket connection with enhanced fallback
1657
+ setTimeout(() => {
1658
+ if (!socketConnected && socketRef.current && !socketRef.current.connected) {
1659
+ console.error('❌ Socket connection timeout after 20 seconds');
1660
+ console.error('🔍 Socket state:', {
1661
+ connected: socketRef.current.connected,
1662
+ disconnected: socketRef.current.disconnected,
1663
+ id: socketRef.current.id
1664
+ });
1665
+ setPersonaStatus('Connection timeout. Please check your internet and try again.');
1666
+ setHasError(true);
1667
+ stopDotsAnimation();
1668
+
1669
+ // Cleanup socket
1670
+ if (socketRef.current) {
1671
+ socketRef.current.disconnect();
1672
+ socketRef.current = null;
1673
+ }
1674
+ }
1675
+ }, 20000); // Increased timeout to 20 seconds
1676
+ } catch (error) {
1677
+ console.error('❌ Error in startPersonaCreation:', error);
1678
+ setPersonaStatus('Failed to initialize training. Please try again.');
1679
+ setHasError(true);
1680
+ stopDotsAnimation();
1681
+ }
1682
+ };
1683
+
1684
+ // Get user-friendly status message based on progress (updated for real training)
1685
+ const getPersonaStatusMessage = progress => {
1686
+ if (hasError) return 'Something went wrong. Please try again.';
1687
+ if (isPersonaComplete) return 'Your persona is ready! 🎉';
1688
+ let baseMessage = '';
1689
+ if (progress < 20) {
1690
+ baseMessage = 'Keeping your data private';
1691
+ } else if (progress < 40) {
1692
+ baseMessage = 'Trying to understand your mind';
1693
+ } else if (progress < 60) {
1694
+ baseMessage = 'You\'re more interesting than I expected';
1695
+ } else if (progress < 80) {
1696
+ baseMessage = 'Finalizing your unique persona';
1697
+ } else if (progress < 95) {
1698
+ baseMessage = 'Almost done';
1699
+ } else {
1700
+ baseMessage = 'Just a few more seconds';
1701
+ }
1702
+ return baseMessage + animatedDots;
1703
+ };
1704
+
1705
+ // Handle persona completion - now continues the onboarding flow instead of going to separate training
1706
+ const handlePersonaComplete = async () => {
1707
+ console.log('🎉 Real persona creation completed successfully');
1708
+ // Cleanup socket connection
1709
+ if (socketRef.current) {
1710
+ console.log('🔌 Disconnecting training socket...');
1711
+ socketRef.current.disconnect();
1712
+ socketRef.current = null;
1713
+ }
1714
+ // Clear temporary PIN since training is complete
1715
+ clearTemporaryPin();
1716
+ // Set the completion flag BEFORE calling onComplete
1717
+ isCompletingRef.current = true;
1718
+
1719
+ // Get the real authentication token using simplified JWT storage
1720
+ try {
1721
+ const realToken = await getJWT();
1722
+ if (realToken) {
1723
+ console.log('✅ Using real authentication token for onComplete:', `${realToken.substring(0, 30)}...`);
1724
+ // Call onComplete with the REAL token that was created during ensureAuthToken
1725
+ onComplete === null || onComplete === void 0 || onComplete(API_CONFIG.BASE_URL, realToken, {
1726
+ email: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || '',
1727
+ ...userInfo
1728
+ });
1729
+ } else {
1730
+ console.error('❌ No real authentication token found after training completion');
1731
+ // Fallback to placeholder token if no real token exists
1732
+ onComplete === null || onComplete === void 0 || onComplete(API_CONFIG.BASE_URL, 'training-complete-token', {
1733
+ email: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || '',
1734
+ ...userInfo
1735
+ });
1736
+ }
1737
+ } catch (error) {
1738
+ console.error('❌ Error retrieving real token for onComplete:', error);
1739
+ // Fallback to placeholder token on error
1740
+ onComplete === null || onComplete === void 0 || onComplete(API_CONFIG.BASE_URL, 'training-complete-token', {
1741
+ email: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || '',
1742
+ ...userInfo
1743
+ });
1744
+ }
1745
+ };
1746
+
1747
+ // Ensure authentication token exists before training
1748
+ // NOTE: SDK no longer creates users - user should be authenticated first via Google/Apple/Email
1749
+ const ensureAuthToken = async () => {
1750
+ try {
1751
+ // Use simplified JWT storage to check for existing token
1752
+ const existingToken = await getJWT();
1753
+ if (existingToken && existingToken.trim().length > 20) {
1754
+ console.log('✅ Authentication token already exists:', `${existingToken.substring(0, 20)}...`);
1755
+ console.log('🔍 Token length:', existingToken.length);
1756
+ return existingToken;
1757
+ }
1758
+
1759
+ // NOTE: SDK no longer creates users during onboarding
1760
+ // User should be authenticated first via Google/Apple/Email
1761
+ console.warn('⚠️ No authentication token found');
1762
+ console.warn('ℹ️ SDK does not create users during onboarding');
1763
+ console.warn('ℹ️ User should authenticate first via Google/Apple/Email');
1764
+
1765
+ // Return null - consuming app is responsible for ensuring user is authenticated
1766
+ return null;
1767
+ } catch (error) {
1768
+ console.error('❌ Error checking authentication token:', error);
1769
+ throw error;
1770
+ }
1771
+ };
1772
+ const canProceed = Object.values(platformToggles).some(value => value);
1773
+ const handleProceed = () => {
1774
+ if (canProceed) {
1775
+ // Trigger haptic feedback when continue button is pressed
1776
+ triggerHaptic(HapticType.BUTTON_PRESS);
1777
+
1778
+ // ✅ NEW: Start background training when transitioning from connectors to PIN screen
1779
+ console.log('🚀 [TRANSITION] Starting background training during connect → pin transition');
1780
+ startBackgroundTraining().catch(error => {
1781
+ console.error('❌ [TRANSITION] Background training failed during transition:', error);
1782
+ // Continue to PIN screen even if training fails
1783
+ });
1784
+ setStep('pin');
1785
+ }
1786
+ };
1787
+
1788
+ // Removed navigation dependency for SDK compatibility
1789
+
1790
+ // Training is now handled by the TrainingModal component
1791
+
1792
+ // ✅ NEW: Background training function - starts when PIN screen appears
1793
+ const startBackgroundTraining = useCallback(async () => {
1794
+ try {
1795
+ console.log('🚀 [BACKGROUND] Starting background training optimization...');
1796
+ setBackgroundTrainingProgress('Connecting...');
1797
+
1798
+ // Step 1: Ensure authentication token exists
1799
+ const authToken = await ensureAuthToken();
1800
+ if (!authToken) {
1801
+ throw new Error('Failed to create authentication token for background training');
1802
+ }
1803
+ console.log('✅ [BACKGROUND] Auth token ready:', `${authToken.substring(0, 20)}...`);
1804
+ setUserToken(authToken);
1805
+
1806
+ // Step 2: Set up user info if not available
1807
+ if (!userInfo) {
1808
+ var _user$email5;
1809
+ const storedUsername = await getOnairosUsername();
1810
+ const fallbackUsername = storedUsername || (user === null || user === void 0 || (_user$email5 = user.email) === null || _user$email5 === void 0 ? void 0 : _user$email5.split('@')[0]) || (user === null || user === void 0 ? void 0 : user.name) || 'mobile_user';
1811
+ const newUserInfo = {
1812
+ username: fallbackUsername,
1813
+ email: (user === null || user === void 0 ? void 0 : user.email) || null,
1814
+ id: null
1815
+ };
1816
+ setUserInfo(newUserInfo);
1817
+ setUsername(fallbackUsername);
1818
+ console.log('🧑‍💻 [BACKGROUND] User info set:', newUserInfo);
1819
+ }
1820
+
1821
+ // Step 3: Initialize socket connection for background training
1822
+ console.log('🔌 [BACKGROUND] Setting up socket for background training...');
1823
+ setBackgroundTrainingProgress('Initializing data collection...');
1824
+ const backgroundSocket = io(API_CONFIG.BASE_URL, {
1825
+ transports: ['websocket', 'polling'],
1826
+ autoConnect: false,
1827
+ timeout: 15000,
1828
+ reconnection: true,
1829
+ reconnectionAttempts: 3,
1830
+ reconnectionDelay: 1000,
1831
+ forceNew: true
1832
+ });
1833
+
1834
+ // Set up socket event listeners for background training
1835
+ backgroundSocket.on('connect', async () => {
1836
+ console.log('✅ [BACKGROUND] Socket connected, starting background data collection...');
1837
+ const socketId = backgroundSocket.id;
1838
+ setBackgroundSocketId(socketId || null);
1839
+ setBackgroundTrainingProgress('Collecting your data...');
1840
+ if (socketId) {
1841
+ // Step 4: Start background training WITHOUT PIN (per backend instructions)
1842
+ await startBackgroundEnochTraining(socketId, authToken);
1843
+ }
1844
+ });
1845
+ backgroundSocket.on('trainingUpdate', data => {
1846
+ if (data.progress) {
1847
+ setBackgroundTrainingProgress(data.status || 'Processing...');
1848
+ console.log('📊 [BACKGROUND] Training progress:', data.progress, '%');
1849
+ }
1850
+ });
1851
+ backgroundSocket.on('disconnect', () => {
1852
+ console.log('❌ [BACKGROUND] Socket disconnected');
1853
+ });
1854
+
1855
+ // Store socket reference for later use
1856
+ socketRef.current = backgroundSocket;
1857
+
1858
+ // Connect the socket to start background training
1859
+ backgroundSocket.connect();
1860
+ console.log('✅ [BACKGROUND] Background training initiated successfully');
1861
+ } catch (error) {
1862
+ console.error('❌ [BACKGROUND] Background training failed:', error);
1863
+ setBackgroundTrainingProgress('');
1864
+ throw error;
1865
+ }
1866
+ }, [userInfo, username, user]);
1867
+
1868
+ // ✅ NEW: Background training API call - starts data collection without PIN
1869
+ const startBackgroundEnochTraining = async (socketId, authToken) => {
1870
+ try {
1871
+ console.log('🚀 [BACKGROUND] Starting background training with socketId:', socketId);
1872
+ console.log('🔑 Using auth token:', `${authToken.substring(0, 20)}...`);
1873
+
1874
+ // Prepare background training data
1875
+ const backgroundData = {
1876
+ socketId,
1877
+ username: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || username || 'mobile_user',
1878
+ email: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.email) || null,
1879
+ modelKey: null,
1880
+ connectedPlatforms: [],
1881
+ // No connected platforms for background training
1882
+ platformConnections: {} // No platform connections for background training
1883
+ // No encrypted PIN for background training
1884
+ };
1885
+ console.log('📤 Sending background training data to /mobile-training/enoch:', backgroundData);
1886
+
1887
+ // Use the new training function that includes YouTube migration check
1888
+ const backgroundResult = await startEnochTrainingWithYouTubeCheck(backgroundData);
1889
+ console.log('📡 Background training API response:', backgroundResult);
1890
+
1891
+ // Handle CONNECTIONS_REQUIRED scenario (pre-training validation)
1892
+ if (backgroundResult.requiresConnections || backgroundResult.code === 'CONNECTIONS_REQUIRED') {
1893
+ console.log('🔗 Connections required detected from background training');
1894
+ setDataScenario('CONNECTIONS_REQUIRED');
1895
+ setDataDetails(backgroundResult);
1896
+ setShowDataWarning(true);
1897
+ setPersonaStatus('Connections required');
1898
+ setHasError(true);
1899
+ stopDotsAnimation();
1900
+ return;
1901
+ }
1902
+ if (backgroundResult.success) {
1903
+ console.log('🚀 Background training started:', backgroundResult.message);
1904
+ console.log('🎯 Background training Features:', backgroundResult.features);
1905
+
1906
+ // ✅ CRITICAL: Set background training started flag
1907
+ setIsBackgroundTrainingStarted(true);
1908
+
1909
+ // Log the new features from the spec
1910
+ if (backgroundResult.features) {
1911
+ console.log('✅ Inference enabled:', backgroundResult.features.inference);
1912
+ console.log('💾 Storage method:', backgroundResult.features.storage);
1913
+ console.log('🔒 Compression enabled:', backgroundResult.features.compression);
1914
+ console.log('🔐 Encryption enabled:', backgroundResult.features.encryption);
1915
+ console.log('📊 Training type:', backgroundResult.features.type);
1916
+ console.log('🗄️ Databases:', backgroundResult.features.databases);
1917
+ console.log('📈 Query scores enabled:', backgroundResult.features.queryScores);
1918
+ }
1919
+ setPersonaStatus('Background training model...');
1920
+ setPersonaProgress(25);
1921
+ } else {
1922
+ console.error('❌ Background training start failed:', backgroundResult.error);
1923
+ setPersonaStatus(`Error: ${backgroundResult.error || 'Background training failed to start'}`);
1924
+ setHasError(true);
1925
+ stopDotsAnimation();
1926
+ }
1927
+ } catch (error) {
1928
+ console.error('❌ Background training start error:', error);
1929
+ setPersonaStatus(`Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
1930
+ setHasError(true);
1931
+ stopDotsAnimation();
1932
+ }
1933
+ };
1934
+ return /*#__PURE__*/React.createElement(Modal, {
1935
+ transparent: true,
1936
+ visible: modalVisible,
1937
+ animationType: "slide",
1938
+ onRequestClose: handleClose,
1939
+ statusBarTranslucent: true
1940
+ }, /*#__PURE__*/React.createElement(View, {
1941
+ style: styles.modalOverlay
1942
+ }, /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
1943
+ onPress: handleClose
1944
+ }, /*#__PURE__*/React.createElement(Animated.View, {
1945
+ style: [styles.backdrop, {
1946
+ opacity: backdropOpacity
1947
+ }]
1948
+ })), /*#__PURE__*/React.createElement(View, {
1949
+ style: styles.bottomSheet
1950
+ }, /*#__PURE__*/React.createElement(View, {
1951
+ style: styles.container
1952
+ }, /*#__PURE__*/React.createElement(View, {
1953
+ style: styles.handleContainer
1954
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
1955
+ onPress: handleClose,
1956
+ style: styles.handleButton
1957
+ }, /*#__PURE__*/React.createElement(View, {
1958
+ style: styles.handle
1959
+ }))), showDebugPanel && step === 'platforms' && /*#__PURE__*/React.createElement(View, {
1960
+ style: styles.debugPanel
1961
+ }, /*#__PURE__*/React.createElement(Text, {
1962
+ style: styles.debugTitle
1963
+ }, "Debug Padding"), /*#__PURE__*/React.createElement(View, {
1964
+ style: styles.debugRow
1965
+ }, /*#__PURE__*/React.createElement(Text, {
1966
+ style: styles.debugLabel
1967
+ }, "Container Top: ", debugPaddingTop), /*#__PURE__*/React.createElement(TouchableOpacity, {
1968
+ onPress: () => setDebugPaddingTop(p => Math.max(0, p - 2)),
1969
+ style: styles.debugBtn
1970
+ }, /*#__PURE__*/React.createElement(Text, null, "-")), /*#__PURE__*/React.createElement(TouchableOpacity, {
1971
+ onPress: () => setDebugPaddingTop(p => p + 2),
1972
+ style: styles.debugBtn
1973
+ }, /*#__PURE__*/React.createElement(Text, null, "+"))), /*#__PURE__*/React.createElement(View, {
1974
+ style: styles.debugRow
1975
+ }, /*#__PURE__*/React.createElement(Text, {
1976
+ style: styles.debugLabel
1977
+ }, "Container Bottom: ", debugPaddingBottom), /*#__PURE__*/React.createElement(TouchableOpacity, {
1978
+ onPress: () => setDebugPaddingBottom(p => Math.max(0, p - 2)),
1979
+ style: styles.debugBtn
1980
+ }, /*#__PURE__*/React.createElement(Text, null, "-")), /*#__PURE__*/React.createElement(TouchableOpacity, {
1981
+ onPress: () => setDebugPaddingBottom(p => p + 2),
1982
+ style: styles.debugBtn
1983
+ }, /*#__PURE__*/React.createElement(Text, null, "+"))), /*#__PURE__*/React.createElement(View, {
1984
+ style: styles.debugRow
1985
+ }, /*#__PURE__*/React.createElement(Text, {
1986
+ style: styles.debugLabel
1987
+ }, "Handle Top: ", debugHandlePaddingTop), /*#__PURE__*/React.createElement(TouchableOpacity, {
1988
+ onPress: () => setDebugHandlePaddingTop(p => Math.max(0, p - 2)),
1989
+ style: styles.debugBtn
1990
+ }, /*#__PURE__*/React.createElement(Text, null, "-")), /*#__PURE__*/React.createElement(TouchableOpacity, {
1991
+ onPress: () => setDebugHandlePaddingTop(p => p + 2),
1992
+ style: styles.debugBtn
1993
+ }, /*#__PURE__*/React.createElement(Text, null, "+"))), /*#__PURE__*/React.createElement(TouchableOpacity, {
1994
+ onPress: () => setShowDebugPanel(false),
1995
+ style: styles.debugCloseBtn
1996
+ }, /*#__PURE__*/React.createElement(Text, {
1997
+ style: styles.debugCloseBtnText
1998
+ }, "Hide Debug"))), step === 'welcome' && /*#__PURE__*/React.createElement(View, {
1999
+ style: styles.welcomeContainer
2000
+ }, /*#__PURE__*/React.createElement(View, {
2001
+ style: styles.brandMarkContainer
2002
+ }, /*#__PURE__*/React.createElement(BrandMark, null)), /*#__PURE__*/React.createElement(View, {
2003
+ style: styles.headingContainer
2004
+ }, /*#__PURE__*/React.createElement(HeadingGroup, null)), /*#__PURE__*/React.createElement(View, {
2005
+ style: styles.bodyContainer
2006
+ }, /*#__PURE__*/React.createElement(BodyText, null)), /*#__PURE__*/React.createElement(View, {
2007
+ style: styles.welcomeSpacer
2008
+ }), /*#__PURE__*/React.createElement(View, {
2009
+ style: styles.welcomeButtonContainer
2010
+ }, /*#__PURE__*/React.createElement(PrimaryButton, {
2011
+ label: "Get Started",
2012
+ onPress: handleGetStarted,
2013
+ testID: "welcome-get-started-button"
2014
+ }))), step === 'signin' && /*#__PURE__*/React.createElement(SignInStep, {
2015
+ onEmailSubmit: handleEmailSubmit,
2016
+ onGoogleSignIn: handleGoogleSignIn,
2017
+ onContinue: () => setStep('verification'),
2018
+ loading: authLoading,
2019
+ error: authError,
2020
+ initialEmail: userEmail
2021
+ }), step === 'verification' && /*#__PURE__*/React.createElement(VerificationStep, {
2022
+ email: userEmail,
2023
+ onCodeSubmit: handleCodeSubmit,
2024
+ onBack: handleBackToSignIn,
2025
+ loading: authLoading,
2026
+ error: authError,
2027
+ onResendCode: handleResendCode
2028
+ }), step === 'platforms' && /*#__PURE__*/React.createElement(PlatformConnectorsStep, {
2029
+ onUpdate: handlePlatformUpdate,
2030
+ onSkip: allowSkip ? handlePlatformSkip : undefined,
2031
+ onReviewerBypass: handleReviewerBypass,
2032
+ onLogout: handleLogout,
2033
+ allowedPlatforms: allowedPlatforms,
2034
+ recommendedPlatforms: recommendedPlatforms,
2035
+ initialConnectedPlatforms: returningUserConnections,
2036
+ userEmail: userEmail
2037
+ }), step === 'consent' && /*#__PURE__*/React.createElement(PersonalizationConsentScreen, {
2038
+ visible: true,
2039
+ loading: isConsentLoading,
2040
+ onLogout: handleLogout,
2041
+ onAccept: async () => {
2042
+ console.log('✅ Returning user accepted consent');
2043
+
2044
+ // 🚀 Show loading on button immediately
2045
+ setIsConsentLoading(true);
2046
+
2047
+ // Small delay to ensure React renders the loading state
2048
+ await new Promise(resolve => setTimeout(resolve, 50));
2049
+
2050
+ // Call onComplete with the returning user's data
2051
+ try {
2052
+ // 🚀 OPTIMIZATION: Load data in parallel (fast!)
2053
+ const [token, email, storedUsername] = await Promise.all([getAuthToken(), AsyncStorage.getItem('user_email'), getOnairosUsername()]);
2054
+ console.log('🔑 [SDK] Auth data retrieved in parallel for returning user');
2055
+
2056
+ // Set completing flag before calling onComplete
2057
+ isCompletingRef.current = true;
2058
+ if (token && email) {
2059
+ console.log('✅ [SDK] Calling onComplete for returning user');
2060
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, token, {
2061
+ email,
2062
+ connectedPlatforms: returningUserConnections,
2063
+ username: storedUsername || email.split('@')[0],
2064
+ isReturningUser: true
2065
+ }));
2066
+ } else {
2067
+ console.warn('⚠️ [SDK] No token/email found for returning user');
2068
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, '', {
2069
+ connectedPlatforms: returningUserConnections,
2070
+ isReturningUser: true
2071
+ }));
2072
+ }
2073
+ } catch (error) {
2074
+ console.error('❌ [SDK] Error during returning user consent:', error);
2075
+ await (onComplete === null || onComplete === void 0 ? void 0 : onComplete(API_CONFIG.BASE_URL, '', {
2076
+ connectedPlatforms: returningUserConnections,
2077
+ isReturningUser: true
2078
+ }));
2079
+ }
2080
+ // NOTE: Keep loading=true - modal stays open until parent sets visible={false}
2081
+ console.log('✅ [SDK] Returning user onComplete finished - waiting for parent to close modal');
2082
+ },
2083
+ onDecline: () => {
2084
+ console.log('❌ Returning user declined consent');
2085
+ handleClose();
2086
+ },
2087
+ connectedPlatforms: returningUserConnections,
2088
+ onConnectMore: () => {
2089
+ // Allow returning users to connect more platforms
2090
+ console.log('➕ Returning user wants to connect more platforms');
2091
+ setStep('platforms');
2092
+ },
2093
+ isReturningUser: isReturningUser,
2094
+ appName: AppName
2095
+ })))));
2096
+ };
2097
+
2098
+ // ============================================
2099
+ // LEGACY CODE REMOVED - The following step handlers were removed:
2100
+ // - step === 'connect' (old platform connection UI)
2101
+ // - step === 'pin' (old PIN input)
2102
+ // - step === 'persona' (old persona screen)
2103
+ // - step === 'oauth' (moved to PlatformConnectorsStep)
2104
+ // - step === 'privacy' (old privacy screen)
2105
+ // - step === 'connections' (old connections screen)
2106
+ // ============================================
2107
+
2108
+ const LEGACY_REMOVED = true; // Marker for removed legacy code
2109
+
2110
+ const styles = StyleSheet.create({
2111
+ modalOverlay: {
2112
+ flex: 1,
2113
+ justifyContent: 'flex-end'
2114
+ },
2115
+ backdrop: {
2116
+ ...StyleSheet.absoluteFillObject,
2117
+ backgroundColor: 'rgba(0, 0, 0, 0.5)'
2118
+ },
2119
+ bottomSheet: {
2120
+ backgroundColor: '#FAFAFA',
2121
+ borderTopLeftRadius: 24,
2122
+ borderTopRightRadius: 24,
2123
+ paddingTop: 0,
2124
+ paddingBottom: 0,
2125
+ minHeight: height * .86,
2126
+ overflow: 'hidden',
2127
+ width: '100%'
2128
+ },
2129
+ container: {
2130
+ flex: 1,
2131
+ backgroundColor: '#FAFAFA'
2132
+ },
2133
+ // ============================================
2134
+ // ENOCH-STYLE WELCOME FLOW STYLES
2135
+ // ============================================
2136
+ welcomeContainer: {
2137
+ flex: 1,
2138
+ alignItems: 'center',
2139
+ paddingTop: 70,
2140
+ paddingHorizontal: 24
2141
+ },
2142
+ brandMarkContainer: {
2143
+ marginBottom: 32
2144
+ },
2145
+ headingContainer: {
2146
+ marginBottom: 24
2147
+ },
2148
+ bodyContainer: {
2149
+ marginBottom: 32,
2150
+ width: '100%'
2151
+ },
2152
+ welcomeSpacer: {
2153
+ flex: 1,
2154
+ minHeight: 20
2155
+ },
2156
+ welcomeButtonContainer: {
2157
+ width: '100%',
2158
+ paddingBottom: 20
2159
+ },
2160
+ // ============================================
2161
+ handleContainer: {
2162
+ alignItems: 'center',
2163
+ paddingTop: 12,
2164
+ paddingBottom: 4,
2165
+ backgroundColor: 'transparent'
2166
+ },
2167
+ handleButton: {
2168
+ padding: 0,
2169
+ width: 120,
2170
+ alignItems: 'center'
2171
+ },
2172
+ handle: {
2173
+ width: 100,
2174
+ height: 6,
2175
+ borderRadius: 3,
2176
+ backgroundColor: '#D0D0D0'
2177
+ },
2178
+ debugPanel: {
2179
+ position: 'absolute',
2180
+ top: 60,
2181
+ right: 10,
2182
+ backgroundColor: 'rgba(0,0,0,0.85)',
2183
+ padding: 12,
2184
+ borderRadius: 8,
2185
+ zIndex: 9999,
2186
+ minWidth: 200
2187
+ },
2188
+ debugTitle: {
2189
+ color: '#fff',
2190
+ fontSize: 14,
2191
+ fontWeight: '700',
2192
+ marginBottom: 8
2193
+ },
2194
+ debugRow: {
2195
+ flexDirection: 'row',
2196
+ alignItems: 'center',
2197
+ marginBottom: 6
2198
+ },
2199
+ debugLabel: {
2200
+ color: '#fff',
2201
+ fontSize: 12,
2202
+ flex: 1
2203
+ },
2204
+ debugBtn: {
2205
+ backgroundColor: '#444',
2206
+ paddingHorizontal: 12,
2207
+ paddingVertical: 4,
2208
+ borderRadius: 4,
2209
+ marginLeft: 4
2210
+ },
2211
+ debugCloseBtn: {
2212
+ backgroundColor: '#666',
2213
+ paddingVertical: 6,
2214
+ borderRadius: 4,
2215
+ marginTop: 8,
2216
+ alignItems: 'center'
2217
+ },
2218
+ debugCloseBtnText: {
2219
+ color: '#fff',
2220
+ fontSize: 12
2221
+ },
2222
+ header: {
2223
+ alignItems: 'center',
2224
+ marginBottom: 20,
2225
+ paddingHorizontal: 24
2226
+ },
2227
+ headerContent: {
2228
+ flexDirection: 'row',
2229
+ alignItems: 'center',
2230
+ justifyContent: 'center',
2231
+ marginBottom: 24
2232
+ },
2233
+ appIcon: {
2234
+ width: 48,
2235
+ height: 48,
2236
+ borderRadius: 24,
2237
+ backgroundColor: '#F5F5F5',
2238
+ alignItems: 'center',
2239
+ justifyContent: 'center'
2240
+ },
2241
+ appIconText: {
2242
+ fontSize: 24,
2243
+ fontWeight: 'bold',
2244
+ color: '#333'
2245
+ },
2246
+ arrow: {
2247
+ marginHorizontal: 16,
2248
+ fontSize: 24,
2249
+ color: '#666'
2250
+ },
2251
+ onairosIcon: {
2252
+ width: 54,
2253
+ height: 54,
2254
+ borderRadius: 32,
2255
+ backgroundColor: 'transparent',
2256
+ alignItems: 'center',
2257
+ justifyContent: 'center'
2258
+ },
2259
+ onairosIconText: {
2260
+ fontSize: 24,
2261
+ fontWeight: 'bold',
2262
+ color: '#fff'
2263
+ },
2264
+ onairosIconImage: {
2265
+ width: 54,
2266
+ height: 54
2267
+ },
2268
+ titleContainer: {
2269
+ alignItems: 'center'
2270
+ },
2271
+ mainTitle: {
2272
+ fontSize: 24,
2273
+ fontWeight: '600',
2274
+ color: '#333',
2275
+ textAlign: 'center',
2276
+ marginBottom: 12
2277
+ },
2278
+ privacyMessage: {
2279
+ fontSize: 14,
2280
+ color: '#666',
2281
+ textAlign: 'center',
2282
+ marginBottom: 20
2283
+ },
2284
+ privacyLink: {
2285
+ color: '#000000',
2286
+ fontWeight: '600',
2287
+ textDecorationLine: 'underline'
2288
+ },
2289
+ boldText: {
2290
+ fontWeight: 'bold'
2291
+ },
2292
+ content: {
2293
+ flex: 1,
2294
+ paddingHorizontal: 24
2295
+ },
2296
+ platformsScrollView: {
2297
+ flex: 1,
2298
+ width: '100%'
2299
+ },
2300
+ platformsScrollContent: {
2301
+ paddingBottom: 0,
2302
+ paddingHorizontal: 24
2303
+ },
2304
+ platformsContainer: {
2305
+ marginTop: 16
2306
+ },
2307
+ platformItem: {
2308
+ flexDirection: 'row',
2309
+ alignItems: 'center',
2310
+ justifyContent: 'space-between',
2311
+ paddingVertical: 16,
2312
+ paddingHorizontal: 8,
2313
+ borderBottomWidth: 1,
2314
+ borderBottomColor: '#E5E5E5'
2315
+ },
2316
+ platformInfo: {
2317
+ flexDirection: 'row',
2318
+ alignItems: 'center'
2319
+ },
2320
+ platformIcon: {
2321
+ width: 40,
2322
+ height: 40,
2323
+ borderRadius: 20,
2324
+ backgroundColor: '#F5F5F5',
2325
+ alignItems: 'center',
2326
+ justifyContent: 'center',
2327
+ marginRight: 16
2328
+ },
2329
+ platformIconText: {
2330
+ fontSize: 18,
2331
+ fontWeight: 'bold',
2332
+ color: '#333',
2333
+ textAlign: 'center',
2334
+ textAlignVertical: 'center'
2335
+ },
2336
+ platformIconImage: {
2337
+ width: 24,
2338
+ height: 24
2339
+ },
2340
+ youtubeIconImage: {
2341
+ width: 58,
2342
+ height: 58
2343
+ },
2344
+ redditIconImage: {
2345
+ width: 34,
2346
+ height: 34
2347
+ },
2348
+ pinterestIconImage: {
2349
+ width: 48,
2350
+ height: 48
2351
+ },
2352
+ gmailIconImage: {
2353
+ width: 32,
2354
+ height: 32
2355
+ },
2356
+ linkedinPlatformIcon: {
2357
+ width: 40,
2358
+ height: 40,
2359
+ borderRadius: 8,
2360
+ backgroundColor: '#F5F5F5',
2361
+ alignItems: 'center',
2362
+ justifyContent: 'center',
2363
+ marginRight: 16
2364
+ },
2365
+ pinterestPlatformIcon: {
2366
+ width: 34,
2367
+ height: 34,
2368
+ borderRadius: 17,
2369
+ backgroundColor: '#F5F5F5',
2370
+ alignItems: 'center',
2371
+ justifyContent: 'center',
2372
+ marginRight: 16
2373
+ },
2374
+ platformName: {
2375
+ fontSize: 16,
2376
+ color: '#333',
2377
+ textAlignVertical: 'center'
2378
+ },
2379
+ footer: {
2380
+ flexDirection: 'row',
2381
+ alignItems: 'center',
2382
+ justifyContent: 'space-between',
2383
+ padding: 24,
2384
+ borderTopWidth: 1,
2385
+ borderTopColor: '#E5E5E5'
2386
+ },
2387
+ footerButtonCancel: {
2388
+ paddingVertical: 12,
2389
+ paddingHorizontal: 16
2390
+ },
2391
+ footerButtonText: {
2392
+ color: '#666',
2393
+ fontSize: 16
2394
+ },
2395
+ footerButtonConfirm: {
2396
+ paddingVertical: 12,
2397
+ paddingHorizontal: 24,
2398
+ backgroundColor: '#000000',
2399
+ borderRadius: 8,
2400
+ marginTop: 20
2401
+ },
2402
+ footerButtonConnected: {
2403
+ paddingVertical: 12,
2404
+ paddingHorizontal: 24,
2405
+ backgroundColor: '#E9C46A',
2406
+ borderRadius: 8
2407
+ },
2408
+ footerButtonDisabled: {
2409
+ backgroundColor: '#E5E5E5'
2410
+ },
2411
+ footerButtonTextConfirm: {
2412
+ color: '#fff',
2413
+ fontSize: 16,
2414
+ fontWeight: '600'
2415
+ },
2416
+ footerButtonTextConnected: {
2417
+ color: '#000',
2418
+ fontSize: 16,
2419
+ fontWeight: '600'
2420
+ },
2421
+ connectContainer: {
2422
+ flex: 1
2423
+ },
2424
+ modalContent: {
2425
+ flex: 1,
2426
+ backgroundColor: '#FFFFFF',
2427
+ borderTopLeftRadius: 20,
2428
+ borderTopRightRadius: 20,
2429
+ padding: 24
2430
+ },
2431
+ backButton: {
2432
+ padding: 8,
2433
+ width: 40
2434
+ },
2435
+ backButtonText: {
2436
+ fontSize: 24,
2437
+ color: '#000000'
2438
+ },
2439
+ backButtonSpacer: {
2440
+ width: 40
2441
+ },
2442
+ headerTitle: {
2443
+ fontSize: 18,
2444
+ fontWeight: '600',
2445
+ color: '#333',
2446
+ textAlign: 'center'
2447
+ },
2448
+ privacyHeader: {
2449
+ flexDirection: 'row',
2450
+ alignItems: 'center',
2451
+ justifyContent: 'space-between',
2452
+ paddingHorizontal: 16,
2453
+ paddingVertical: 20,
2454
+ backgroundColor: '#FFFFFF',
2455
+ borderBottomWidth: 1,
2456
+ borderBottomColor: '#F0F0F0'
2457
+ },
2458
+ privacyDetailsContainer: {
2459
+ paddingHorizontal: 24,
2460
+ paddingVertical: 8,
2461
+ flex: 1,
2462
+ marginTop: 20
2463
+ },
2464
+ privacyDetailsTitle: {
2465
+ fontSize: 20,
2466
+ fontWeight: '600',
2467
+ color: '#333',
2468
+ marginBottom: 0
2469
+ },
2470
+ privacyBulletPoint: {
2471
+ flexDirection: 'row',
2472
+ marginBottom: 16,
2473
+ alignItems: 'flex-start'
2474
+ },
2475
+ bulletPoint: {
2476
+ fontSize: 18,
2477
+ marginRight: 8,
2478
+ color: '#333'
2479
+ },
2480
+ privacyBulletText: {
2481
+ fontSize: 16,
2482
+ color: '#333',
2483
+ flex: 1,
2484
+ lineHeight: 24
2485
+ },
2486
+ connectionsCountText: {
2487
+ fontSize: 18,
2488
+ fontWeight: '600',
2489
+ color: '#333',
2490
+ marginBottom: 24
2491
+ },
2492
+ personaContainer: {
2493
+ flex: 1,
2494
+ padding: 16,
2495
+ backgroundColor: '#fff',
2496
+ justifyContent: 'flex-start'
2497
+ },
2498
+ personaHeaderWithBack: {
2499
+ flexDirection: 'row',
2500
+ alignItems: 'center',
2501
+ justifyContent: 'space-between',
2502
+ marginBottom: 16,
2503
+ paddingVertical: 8
2504
+ },
2505
+ personaBackButton: {
2506
+ padding: 8
2507
+ },
2508
+ personaHeader: {
2509
+ alignItems: 'center',
2510
+ marginBottom: 32,
2511
+ paddingHorizontal: 24
2512
+ },
2513
+ personaTitle: {
2514
+ fontSize: 20,
2515
+ fontWeight: '600',
2516
+ color: '#333',
2517
+ textAlign: 'center',
2518
+ flex: 1,
2519
+ marginBottom: 8
2520
+ },
2521
+ personaSubtitle: {
2522
+ fontSize: 14,
2523
+ color: '#666',
2524
+ marginBottom: 24,
2525
+ textAlign: 'center'
2526
+ },
2527
+ personaProgressContainer: {
2528
+ marginBottom: 24,
2529
+ paddingHorizontal: 0
2530
+ },
2531
+ personaProgressBar: {
2532
+ height: 8,
2533
+ backgroundColor: '#F5F5F5',
2534
+ borderRadius: 4,
2535
+ overflow: 'hidden',
2536
+ marginBottom: 12
2537
+ },
2538
+ personaProgressFill: {
2539
+ height: '100%',
2540
+ backgroundColor: '#1BA9D4',
2541
+ borderRadius: 4
2542
+ },
2543
+ personaProgressText: {
2544
+ fontSize: 16,
2545
+ fontWeight: '600',
2546
+ color: '#333',
2547
+ textAlign: 'center',
2548
+ marginBottom: 8
2549
+ },
2550
+ personaStatusText: {
2551
+ fontSize: 14,
2552
+ color: '#666',
2553
+ textAlign: 'center'
2554
+ },
2555
+ personaCompleteContainer: {
2556
+ alignItems: 'center',
2557
+ paddingHorizontal: 0
2558
+ },
2559
+ personaCompleteTitle: {
2560
+ fontSize: 20,
2561
+ fontWeight: '600',
2562
+ color: '#333',
2563
+ marginBottom: 8,
2564
+ textAlign: 'center'
2565
+ },
2566
+ personaCompleteSubtitle: {
2567
+ fontSize: 14,
2568
+ color: '#666',
2569
+ textAlign: 'center',
2570
+ marginBottom: 40
2571
+ },
2572
+ personaContinueButton: {
2573
+ backgroundColor: '#000000',
2574
+ paddingVertical: 16,
2575
+ paddingHorizontal: 48,
2576
+ borderRadius: 16,
2577
+ alignItems: 'center',
2578
+ width: '100%',
2579
+ marginTop: 32,
2580
+ shadowColor: '#000',
2581
+ shadowOffset: {
2582
+ width: 0,
2583
+ height: 2
2584
+ },
2585
+ shadowOpacity: 0.1,
2586
+ shadowRadius: 4,
2587
+ elevation: 3
2588
+ },
2589
+ personaContinueButtonText: {
2590
+ color: '#fff',
2591
+ fontSize: 16,
2592
+ fontWeight: '600'
2593
+ },
2594
+ progressError: {
2595
+ backgroundColor: '#FF3B30'
2596
+ },
2597
+ dataWarningContainer: {
2598
+ padding: 16,
2599
+ borderRadius: 12,
2600
+ marginTop: 16,
2601
+ borderWidth: 1,
2602
+ shadowColor: '#000',
2603
+ shadowOffset: {
2604
+ width: 0,
2605
+ height: 2
2606
+ },
2607
+ shadowOpacity: 0.1,
2608
+ shadowRadius: 4,
2609
+ elevation: 3
2610
+ },
2611
+ dataWarningHeader: {
2612
+ flexDirection: 'row',
2613
+ alignItems: 'center',
2614
+ marginBottom: 8
2615
+ },
2616
+ dataWarningIcon: {
2617
+ fontSize: 20,
2618
+ marginRight: 8
2619
+ },
2620
+ dataWarningTitle: {
2621
+ fontSize: 16,
2622
+ fontWeight: '600',
2623
+ flex: 1
2624
+ },
2625
+ dataWarningMessage: {
2626
+ fontSize: 14,
2627
+ marginBottom: 0,
2628
+ lineHeight: 20
2629
+ },
2630
+ dataWarningSuggestions: {
2631
+ marginTop: 12,
2632
+ paddingTop: 12,
2633
+ borderTopWidth: 1
2634
+ },
2635
+ dataWarningSuggestionsTitle: {
2636
+ fontSize: 14,
2637
+ fontWeight: '600',
2638
+ marginBottom: 6
2639
+ },
2640
+ dataWarningSuggestionItem: {
2641
+ fontSize: 13,
2642
+ marginBottom: 4,
2643
+ lineHeight: 18
2644
+ },
2645
+ dataWarningContinueNote: {
2646
+ fontSize: 13,
2647
+ fontWeight: '500',
2648
+ marginTop: 12,
2649
+ fontStyle: 'italic'
2650
+ },
2651
+ dataWarningError: {
2652
+ backgroundColor: '#FFF5F5',
2653
+ borderColor: '#FEB2B2'
2654
+ },
2655
+ dataInfoContainer: {
2656
+ backgroundColor: '#F0F9FF',
2657
+ borderColor: '#BAE6FD'
2658
+ },
2659
+ dataConnectionsRequired: {
2660
+ backgroundColor: '#F5F5F5',
2661
+ borderColor: '#D1D5DB',
2662
+ shadowColor: '#6B7280',
2663
+ shadowOffset: {
2664
+ width: 0,
2665
+ height: 0
2666
+ },
2667
+ shadowOpacity: 0.15,
2668
+ shadowRadius: 8
2669
+ },
2670
+ highlightedBackButton: {
2671
+ backgroundColor: '#F5F5F5',
2672
+ borderRadius: 20,
2673
+ borderWidth: 2,
2674
+ borderColor: '#000000',
2675
+ shadowColor: '#000000',
2676
+ shadowOffset: {
2677
+ width: 0,
2678
+ height: 0
2679
+ },
2680
+ shadowOpacity: 0.3,
2681
+ shadowRadius: 8,
2682
+ elevation: 5
2683
+ },
2684
+ highlightedBackArrow: {
2685
+ color: '#000000',
2686
+ fontWeight: 'bold'
2687
+ },
2688
+ goBackButton: {
2689
+ backgroundColor: '#000000',
2690
+ paddingVertical: 12,
2691
+ paddingHorizontal: 16,
2692
+ borderRadius: 8,
2693
+ marginTop: 12,
2694
+ alignItems: 'center',
2695
+ shadowColor: '#000000',
2696
+ shadowOffset: {
2697
+ width: 0,
2698
+ height: 0
2699
+ },
2700
+ shadowOpacity: 0.3,
2701
+ shadowRadius: 6,
2702
+ elevation: 3
2703
+ },
2704
+ goBackButtonText: {
2705
+ color: '#FFFFFF',
2706
+ fontSize: 14,
2707
+ fontWeight: '600'
2708
+ },
2709
+ additionalPlatformsToggle: {
2710
+ paddingVertical: 16,
2711
+ paddingHorizontal: 8,
2712
+ alignItems: 'center',
2713
+ borderBottomWidth: 1,
2714
+ borderBottomColor: '#E5E5E5'
2715
+ },
2716
+ additionalPlatformsText: {
2717
+ fontSize: 14,
2718
+ color: '#666',
2719
+ fontWeight: '500'
2720
+ },
2721
+ asterisk: {
2722
+ color: '#FF6B6B',
2723
+ fontSize: 16,
2724
+ fontWeight: 'bold',
2725
+ marginLeft: 2
2726
+ },
2727
+ linkedinRequirementContainer: {
2728
+ backgroundColor: '#F8F9FA',
2729
+ borderWidth: 1,
2730
+ borderColor: '#E5E7EB',
2731
+ borderRadius: 8,
2732
+ paddingHorizontal: 12,
2733
+ paddingVertical: 8,
2734
+ marginTop: 8,
2735
+ marginHorizontal: 4
2736
+ },
2737
+ linkedinRequirementText: {
2738
+ fontSize: 12,
2739
+ fontStyle: 'italic',
2740
+ textAlign: 'center'
2741
+ },
2742
+ linkedinRequirementAsterisk: {
2743
+ color: '#FF6B6B',
2744
+ fontWeight: 'bold'
2745
+ },
2746
+ linkedinRequirementMessage: {
2747
+ color: '#6B7280'
2748
+ },
2749
+ existingUserBanner: {
2750
+ backgroundColor: '#F0F9FF',
2751
+ borderWidth: 1,
2752
+ borderColor: '#0EA5E9',
2753
+ borderRadius: 12,
2754
+ paddingHorizontal: 16,
2755
+ paddingVertical: 12,
2756
+ marginTop: 12
2757
+ },
2758
+ existingUserText: {
2759
+ fontSize: 14,
2760
+ fontWeight: '600',
2761
+ color: '#0369A1',
2762
+ marginBottom: 4
2763
+ },
2764
+ existingUserSubtext: {
2765
+ fontSize: 12,
2766
+ color: '#0C4A6E',
2767
+ lineHeight: 16
2768
+ }
2769
+ });
2770
+ //# sourceMappingURL=UniversalOnboarding.js.map