@onairos/react-native 3.4.0 → 3.5.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 (546) hide show
  1. package/README.md +62 -13
  2. package/lib/commonjs/api/index.js +9 -145
  3. package/lib/commonjs/assets/animations/loaderani.json +1 -0
  4. package/lib/commonjs/assets/animations/persona-animation.json +1 -0
  5. package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  6. package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  7. package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
  8. package/lib/commonjs/assets/icons/Gmail.png +0 -0
  9. package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
  10. package/lib/commonjs/assets/icons/Redditicon.png +0 -0
  11. package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
  12. package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
  13. package/lib/commonjs/assets/icons/chatgpt.png +0 -0
  14. package/lib/commonjs/assets/icons/claude.png +0 -0
  15. package/lib/commonjs/assets/icons/gemini.png +0 -0
  16. package/lib/commonjs/assets/icons/grok.png +0 -0
  17. package/lib/commonjs/assets/images/Checkbox.svg +3 -0
  18. package/lib/commonjs/assets/images/EnochE.svg +19 -0
  19. package/lib/commonjs/assets/images/Enochicon1.png +0 -0
  20. package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
  21. package/lib/commonjs/assets/images/Facebookicon.png +0 -0
  22. package/lib/commonjs/assets/images/Gmail.png +0 -0
  23. package/lib/commonjs/assets/images/Googlelogo.png +0 -0
  24. package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
  25. package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
  26. package/lib/commonjs/assets/images/Personalityprofile.svg +3 -0
  27. package/lib/commonjs/assets/images/Personalitytraits.svg +3 -0
  28. package/lib/commonjs/assets/images/Redditicon.png +0 -0
  29. package/lib/commonjs/assets/images/Userpreferences.svg +3 -0
  30. package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
  31. package/lib/commonjs/assets/images/arrow.svg +20 -0
  32. package/lib/commonjs/assets/images/basicproficon.svg +43 -0
  33. package/lib/commonjs/assets/images/basicprofile.svg +3 -0
  34. package/lib/commonjs/assets/images/chatgpt.png +0 -0
  35. package/lib/commonjs/assets/images/checkmark.svg +4 -0
  36. package/lib/commonjs/assets/images/claude.png +0 -0
  37. package/lib/commonjs/assets/images/contentanalysis.svg +3 -0
  38. package/lib/commonjs/assets/images/contenticon.svg +23 -0
  39. package/lib/commonjs/assets/images/gemini.png +0 -0
  40. package/lib/commonjs/assets/images/grok.png +0 -0
  41. package/lib/commonjs/assets/images/persona1.png +0 -0
  42. package/lib/commonjs/assets/images/persona2.png +0 -0
  43. package/lib/commonjs/assets/images/persona3.png +0 -0
  44. package/lib/commonjs/assets/images/persona4.png +0 -0
  45. package/lib/commonjs/assets/images/persona5.png +0 -0
  46. package/lib/commonjs/assets/images/personalityicon.svg +18 -0
  47. package/lib/commonjs/assets/images/x-close.svg +3 -0
  48. package/lib/commonjs/components/BodyText.js +9 -0
  49. package/lib/commonjs/components/BrandMark.js +10 -0
  50. package/lib/commonjs/components/CodeInput.js +9 -0
  51. package/lib/commonjs/components/EmailInput.js +8 -0
  52. package/lib/commonjs/components/GoogleButton.js +9 -0
  53. package/lib/commonjs/components/HeadingGroup.js +9 -0
  54. package/lib/commonjs/components/LLMDataInputModal.js +14 -0
  55. package/lib/commonjs/components/ModalHeader.js +9 -0
  56. package/lib/commonjs/components/ModalSheet.js +9 -0
  57. package/lib/commonjs/components/Onairos.js +14 -374
  58. package/lib/commonjs/components/OnairosButton.js +13 -309
  59. package/lib/commonjs/components/OnairosSignInButton.js +12 -0
  60. package/lib/commonjs/components/Overlay.js +13 -483
  61. package/lib/commonjs/components/PersonaImage.js +10 -0
  62. package/lib/commonjs/components/PersonaLoadingScreen.js +12 -0
  63. package/lib/commonjs/components/PersonalizationConsentScreen.js +13 -0
  64. package/lib/commonjs/components/PinCreationScreen.js +12 -0
  65. package/lib/commonjs/components/PinInput.js +9 -302
  66. package/lib/commonjs/components/PlatformConnectorsStep.js +22 -0
  67. package/lib/commonjs/components/PlatformList.js +10 -137
  68. package/lib/commonjs/components/PlatformToggle.js +9 -0
  69. package/lib/commonjs/components/PrimaryButton.js +10 -0
  70. package/lib/commonjs/components/SignInMatchAnimation.js +9 -0
  71. package/lib/commonjs/components/SignInStep.js +12 -0
  72. package/lib/commonjs/components/UniversalOnboarding.js +29 -1702
  73. package/lib/commonjs/components/VerificationStep.js +11 -0
  74. package/lib/commonjs/components/WelcomeScreen.js +21 -0
  75. package/lib/commonjs/components/icons/Basicproficon.js +8 -0
  76. package/lib/commonjs/components/icons/Basicprofile.js +8 -0
  77. package/lib/commonjs/components/icons/Checkbox.js +8 -0
  78. package/lib/commonjs/components/icons/Checkmark.js +8 -0
  79. package/lib/commonjs/components/icons/Contentanalysis.js +8 -0
  80. package/lib/commonjs/components/icons/Contenticon.js +8 -0
  81. package/lib/commonjs/components/icons/EnochE.js +8 -0
  82. package/lib/commonjs/components/icons/Personalityicon.js +8 -0
  83. package/lib/commonjs/components/icons/Personalityprofile.js +8 -0
  84. package/lib/commonjs/components/icons/Personalitytraits.js +8 -0
  85. package/lib/commonjs/components/icons/Userpreferences.js +8 -0
  86. package/lib/commonjs/components/icons/index.js +17 -0
  87. package/lib/commonjs/components/onboarding/OAuthWebView.js +14 -827
  88. package/lib/commonjs/components/onboarding/OnboardingHeader.js +10 -74
  89. package/lib/commonjs/components/onboarding/PinInput.js +10 -283
  90. package/lib/commonjs/components/onboarding/PlatformConnector.js +11 -249
  91. package/lib/commonjs/config/api.js +7 -0
  92. package/lib/commonjs/constants/index.js +7 -83
  93. package/lib/commonjs/context/AuthContext.js +10 -0
  94. package/lib/commonjs/hooks/useConnectedAccounts.js +9 -0
  95. package/lib/commonjs/hooks/useConnections.js +8 -159
  96. package/lib/commonjs/hooks/useCredentials.js +10 -177
  97. package/lib/commonjs/hooks/useUserConnections.js +10 -0
  98. package/lib/commonjs/index.js +35 -106
  99. package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +31 -38
  100. package/lib/commonjs/services/apiClient.js +8 -0
  101. package/lib/commonjs/services/apiKeyService.js +9 -946
  102. package/lib/commonjs/services/authService.js +10 -0
  103. package/lib/commonjs/services/biometricPinService.js +8 -0
  104. package/lib/commonjs/services/chatGPTConversationExtractor.js +8 -0
  105. package/lib/commonjs/services/chatGPTConversationService.js +9 -0
  106. package/lib/commonjs/services/claudeConversationExtractor.js +8 -0
  107. package/lib/commonjs/services/claudeConversationService.js +9 -0
  108. package/lib/commonjs/services/connectedAccountsService.js +10 -0
  109. package/lib/commonjs/services/googleAuthService.js +11 -0
  110. package/lib/commonjs/services/imageCompressionService.js +7 -0
  111. package/lib/commonjs/services/jwtStorageService.js +7 -0
  112. package/lib/commonjs/services/linkedinDOMExtractor.js +7 -0
  113. package/lib/commonjs/services/linkedinProfileService.js +9 -0
  114. package/lib/commonjs/services/linkedinScrapingService.js +8 -0
  115. package/lib/commonjs/services/llmDataStorage.js +8 -0
  116. package/lib/commonjs/services/mobileTrainingService.js +8 -0
  117. package/lib/commonjs/services/oauthService.js +11 -390
  118. package/lib/commonjs/services/pinEncryptionService.js +8 -0
  119. package/lib/commonjs/services/pinStorageUtils.js +7 -0
  120. package/lib/commonjs/services/platformAuthService.js +12 -1067
  121. package/lib/commonjs/services/storageService.js +8 -0
  122. package/lib/commonjs/services/trainingApiHelpers.js +7 -0
  123. package/lib/commonjs/services/userConnectionsService.js +10 -0
  124. package/lib/commonjs/services/youtubeMigrationService.js +10 -0
  125. package/lib/commonjs/theme/index.js +7 -0
  126. package/lib/commonjs/types/ambient.d.js +1 -2
  127. package/lib/commonjs/types/declarations.d.js +1 -2
  128. package/lib/commonjs/types/index.js +1 -6
  129. package/lib/commonjs/types/node-fix.d.js +1 -2
  130. package/lib/commonjs/types/node-override.d.js +1 -2
  131. package/lib/commonjs/types/opacity.d.js +1 -2
  132. package/lib/commonjs/types.js +1 -14
  133. package/lib/commonjs/utils/Portal.js +8 -98
  134. package/lib/commonjs/utils/api.js +9 -129
  135. package/lib/commonjs/utils/assetRegistry.js +33 -0
  136. package/lib/commonjs/utils/auth.js +9 -111
  137. package/lib/commonjs/utils/crypto.js +8 -62
  138. package/lib/commonjs/utils/debugHelper.js +1 -64
  139. package/lib/commonjs/utils/encryption.js +7 -76
  140. package/lib/commonjs/utils/eventUtils.js +1 -0
  141. package/lib/commonjs/utils/haptics.js +9 -0
  142. package/lib/commonjs/utils/imagePreloader.js +1 -0
  143. package/lib/commonjs/utils/networkDiagnostics.js +8 -0
  144. package/lib/commonjs/utils/onairosApi.js +9 -350
  145. package/lib/commonjs/utils/programmaticFlow.js +9 -117
  146. package/lib/commonjs/utils/retryHelper.js +1 -220
  147. package/lib/commonjs/utils/secureStorage.js +10 -349
  148. package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -0
  149. package/lib/commonjs/utils/webviewScripts/claude.js +1 -0
  150. package/lib/commonjs/utils/webviewScripts/index.js +9 -0
  151. package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -0
  152. package/lib/module/api/index.js +1 -139
  153. package/lib/module/assets/animations/loaderani.json +1 -0
  154. package/lib/module/assets/animations/persona-animation.json +1 -0
  155. package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
  156. package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  157. package/lib/module/assets/icons/Facebookicon.png +0 -0
  158. package/lib/module/assets/icons/Gmail.png +0 -0
  159. package/lib/module/assets/icons/Linkedinicon.png +0 -0
  160. package/lib/module/assets/icons/Redditicon.png +0 -0
  161. package/lib/module/assets/icons/YouTubeicon2.png +0 -0
  162. package/lib/module/assets/icons/YouTubeicon3.png +0 -0
  163. package/lib/module/assets/icons/chatgpt.png +0 -0
  164. package/lib/module/assets/icons/claude.png +0 -0
  165. package/lib/module/assets/icons/farcaster.png +0 -0
  166. package/lib/module/assets/icons/gemini.png +0 -0
  167. package/lib/module/assets/icons/grok.png +0 -0
  168. package/lib/module/assets/icons/instagram.png +0 -0
  169. package/lib/module/assets/icons/pinterest.png +0 -0
  170. package/lib/module/assets/icons/swerv_logo.png +0 -0
  171. package/lib/module/assets/icons/twitter.jpg +0 -0
  172. package/lib/module/assets/images/Checkbox.svg +3 -0
  173. package/lib/module/assets/images/EnochE.svg +19 -0
  174. package/lib/module/assets/images/Enochicon1.png +0 -0
  175. package/lib/module/assets/images/Face_ID_logo.png +0 -0
  176. package/lib/module/assets/images/Facebookicon.png +0 -0
  177. package/lib/module/assets/images/Gmail.png +0 -0
  178. package/lib/module/assets/images/Googlelogo.png +0 -0
  179. package/lib/module/assets/images/Linkedinicon.png +0 -0
  180. package/lib/module/assets/images/Onairoslogo.png +0 -0
  181. package/lib/module/assets/images/Personalityprofile.svg +3 -0
  182. package/lib/module/assets/images/Personalitytraits.svg +3 -0
  183. package/lib/module/assets/images/Redditicon.png +0 -0
  184. package/lib/module/assets/images/Userpreferences.svg +3 -0
  185. package/lib/module/assets/images/YouTubeicon3.png +0 -0
  186. package/lib/module/assets/images/arrow.svg +20 -0
  187. package/lib/module/assets/images/basicproficon.svg +43 -0
  188. package/lib/module/assets/images/basicprofile.svg +3 -0
  189. package/lib/module/assets/images/chatgpt.png +0 -0
  190. package/lib/module/assets/images/checkmark.svg +4 -0
  191. package/lib/module/assets/images/claude.png +0 -0
  192. package/lib/module/assets/images/contentanalysis.svg +3 -0
  193. package/lib/module/assets/images/contenticon.svg +23 -0
  194. package/lib/module/assets/images/gemini.png +0 -0
  195. package/lib/module/assets/images/grok.png +0 -0
  196. package/lib/module/assets/images/persona1.png +0 -0
  197. package/lib/module/assets/images/persona2.png +0 -0
  198. package/lib/module/assets/images/persona3.png +0 -0
  199. package/lib/module/assets/images/persona4.png +0 -0
  200. package/lib/module/assets/images/persona5.png +0 -0
  201. package/lib/module/assets/images/personalityicon.svg +18 -0
  202. package/lib/module/assets/images/x-close.svg +3 -0
  203. package/lib/module/components/BodyText.js +1 -0
  204. package/lib/module/components/BrandMark.js +1 -0
  205. package/lib/module/components/CodeInput.js +1 -0
  206. package/lib/module/components/EmailInput.js +1 -0
  207. package/lib/module/components/GoogleButton.js +1 -0
  208. package/lib/module/components/HeadingGroup.js +1 -0
  209. package/lib/module/components/LLMDataInputModal.js +8 -0
  210. package/lib/module/components/ModalHeader.js +1 -0
  211. package/lib/module/components/ModalSheet.js +1 -0
  212. package/lib/module/components/Onairos.js +1 -367
  213. package/lib/module/components/OnairosButton.js +1 -302
  214. package/lib/module/components/OnairosSignInButton.js +1 -0
  215. package/lib/module/components/Overlay.js +1 -474
  216. package/lib/module/components/PersonaImage.js +1 -0
  217. package/lib/module/components/PersonaLoadingScreen.js +1 -0
  218. package/lib/module/components/PersonalizationConsentScreen.js +1 -0
  219. package/lib/module/components/PinCreationScreen.js +1 -0
  220. package/lib/module/components/PinInput.js +1 -293
  221. package/lib/module/components/PlatformConnectorsStep.js +1 -0
  222. package/lib/module/components/PlatformList.js +1 -129
  223. package/lib/module/components/PlatformToggle.js +1 -0
  224. package/lib/module/components/PrimaryButton.js +1 -0
  225. package/lib/module/components/SignInMatchAnimation.js +1 -0
  226. package/lib/module/components/SignInStep.js +1 -0
  227. package/lib/module/components/UniversalOnboarding.js +1 -1693
  228. package/lib/module/components/VerificationStep.js +1 -0
  229. package/lib/module/components/WelcomeScreen.js +1 -0
  230. package/lib/module/components/icons/Basicproficon.js +1 -0
  231. package/lib/module/components/icons/Basicprofile.js +1 -0
  232. package/lib/module/components/icons/Checkbox.js +1 -0
  233. package/lib/module/components/icons/Checkmark.js +1 -0
  234. package/lib/module/components/icons/Contentanalysis.js +1 -0
  235. package/lib/module/components/icons/Contenticon.js +1 -0
  236. package/lib/module/components/icons/EnochE.js +1 -0
  237. package/lib/module/components/icons/Personalityicon.js +1 -0
  238. package/lib/module/components/icons/Personalityprofile.js +1 -0
  239. package/lib/module/components/icons/Personalitytraits.js +1 -0
  240. package/lib/module/components/icons/Userpreferences.js +1 -0
  241. package/lib/module/components/icons/index.js +1 -0
  242. package/lib/module/components/onboarding/OAuthWebView.js +1 -818
  243. package/lib/module/components/onboarding/OnboardingHeader.js +1 -66
  244. package/lib/module/components/onboarding/PinInput.js +1 -274
  245. package/lib/module/components/onboarding/PlatformConnector.js +1 -240
  246. package/lib/module/config/api.js +1 -0
  247. package/lib/module/constants/index.js +1 -77
  248. package/lib/module/context/AuthContext.js +1 -0
  249. package/lib/module/hooks/useConnectedAccounts.js +1 -0
  250. package/lib/module/hooks/useConnections.js +1 -152
  251. package/lib/module/hooks/useCredentials.js +6 -169
  252. package/lib/module/hooks/useUserConnections.js +1 -0
  253. package/lib/module/index.js +1 -32
  254. package/lib/module/services/SDK_API_KEY_VALIDATION.md +31 -38
  255. package/lib/module/services/apiClient.js +1 -0
  256. package/lib/module/services/apiKeyService.js +1 -919
  257. package/lib/module/services/authService.js +1 -0
  258. package/lib/module/services/biometricPinService.js +1 -0
  259. package/lib/module/services/chatGPTConversationExtractor.js +1 -0
  260. package/lib/module/services/chatGPTConversationService.js +1 -0
  261. package/lib/module/services/claudeConversationExtractor.js +1 -0
  262. package/lib/module/services/claudeConversationService.js +1 -0
  263. package/lib/module/services/connectedAccountsService.js +1 -0
  264. package/lib/module/services/googleAuthService.js +1 -0
  265. package/lib/module/services/imageCompressionService.js +1 -0
  266. package/lib/module/services/jwtStorageService.js +1 -0
  267. package/lib/module/services/linkedinDOMExtractor.js +1 -0
  268. package/lib/module/services/linkedinProfileService.js +1 -0
  269. package/lib/module/services/linkedinScrapingService.js +1 -0
  270. package/lib/module/services/llmDataStorage.js +1 -0
  271. package/lib/module/services/mobileTrainingService.js +1 -0
  272. package/lib/module/services/oauthService.js +1 -380
  273. package/lib/module/services/pinEncryptionService.js +7 -0
  274. package/lib/module/services/pinStorageUtils.js +1 -0
  275. package/lib/module/services/platformAuthService.js +1 -1041
  276. package/lib/module/services/storageService.js +1 -0
  277. package/lib/module/services/trainingApiHelpers.js +1 -0
  278. package/lib/module/services/userConnectionsService.js +1 -0
  279. package/lib/module/services/youtubeMigrationService.js +1 -0
  280. package/lib/module/theme/index.js +1 -0
  281. package/lib/module/types.js +1 -10
  282. package/lib/module/utils/Portal.js +1 -90
  283. package/lib/module/utils/api.js +1 -117
  284. package/lib/module/utils/assetRegistry.js +33 -0
  285. package/lib/module/utils/auth.js +1 -99
  286. package/lib/module/utils/crypto.js +1 -54
  287. package/lib/module/utils/debugHelper.js +1 -54
  288. package/lib/module/utils/encryption.js +1 -67
  289. package/lib/module/utils/eventUtils.js +1 -0
  290. package/lib/module/utils/haptics.js +8 -0
  291. package/lib/module/utils/imagePreloader.js +1 -0
  292. package/lib/module/utils/networkDiagnostics.js +1 -0
  293. package/lib/module/utils/onairosApi.js +1 -333
  294. package/lib/module/utils/programmaticFlow.js +1 -111
  295. package/lib/module/utils/retryHelper.js +1 -211
  296. package/lib/module/utils/secureStorage.js +6 -330
  297. package/lib/module/utils/webviewScripts/chatgpt.js +1 -0
  298. package/lib/module/utils/webviewScripts/claude.js +1 -0
  299. package/lib/module/utils/webviewScripts/index.js +1 -0
  300. package/lib/module/utils/webviewScripts/linkedin.js +1 -0
  301. package/package.json +62 -39
  302. package/lib/commonjs/api/index.js.map +0 -1
  303. package/lib/commonjs/assets/images/email.png +0 -0
  304. package/lib/commonjs/assets/images/linkedin.png +0 -0
  305. package/lib/commonjs/assets/images/reddit.png +0 -0
  306. package/lib/commonjs/assets/images/youtube.png +0 -0
  307. package/lib/commonjs/components/DataRequestModal.js +0 -228
  308. package/lib/commonjs/components/DataRequestModal.js.map +0 -1
  309. package/lib/commonjs/components/DataRequestScreen.js +0 -329
  310. package/lib/commonjs/components/DataRequestScreen.js.map +0 -1
  311. package/lib/commonjs/components/EmailVerificationModal.js +0 -320
  312. package/lib/commonjs/components/EmailVerificationModal.js.map +0 -1
  313. package/lib/commonjs/components/Onairos.js.map +0 -1
  314. package/lib/commonjs/components/OnairosButton.js.map +0 -1
  315. package/lib/commonjs/components/Overlay.js.map +0 -1
  316. package/lib/commonjs/components/PinInput.js.map +0 -1
  317. package/lib/commonjs/components/PlatformList.js.map +0 -1
  318. package/lib/commonjs/components/TrainingModal.js +0 -717
  319. package/lib/commonjs/components/TrainingModal.js.map +0 -1
  320. package/lib/commonjs/components/UniversalOnboarding.js.map +0 -1
  321. package/lib/commonjs/components/UniversalOnboarding.tsx.new +0 -455
  322. package/lib/commonjs/components/onboarding/OAuthWebView.js.map +0 -1
  323. package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +0 -1
  324. package/lib/commonjs/components/onboarding/PinInput.js.map +0 -1
  325. package/lib/commonjs/components/onboarding/PlatformConnector.js.map +0 -1
  326. package/lib/commonjs/components/screens/ConnectorScreen.js +0 -146
  327. package/lib/commonjs/components/screens/ConnectorScreen.js.map +0 -1
  328. package/lib/commonjs/components/screens/LoadingScreen.js +0 -91
  329. package/lib/commonjs/components/screens/LoadingScreen.js.map +0 -1
  330. package/lib/commonjs/components/screens/PinCreationScreen.js +0 -61
  331. package/lib/commonjs/components/screens/PinCreationScreen.js.map +0 -1
  332. package/lib/commonjs/constants/index.js.map +0 -1
  333. package/lib/commonjs/hooks/useConnections.js.map +0 -1
  334. package/lib/commonjs/hooks/useCredentials.js.map +0 -1
  335. package/lib/commonjs/index.js.map +0 -1
  336. package/lib/commonjs/services/apiKeyService.js.map +0 -1
  337. package/lib/commonjs/services/oauthService.js.map +0 -1
  338. package/lib/commonjs/services/platformAuthService.js.map +0 -1
  339. package/lib/commonjs/types/ambient.d.js.map +0 -1
  340. package/lib/commonjs/types/declarations.d.js.map +0 -1
  341. package/lib/commonjs/types/index.d.js.map +0 -1
  342. package/lib/commonjs/types/index.js.map +0 -1
  343. package/lib/commonjs/types/node-fix.d.js.map +0 -1
  344. package/lib/commonjs/types/node-override.d.js.map +0 -1
  345. package/lib/commonjs/types/opacity.d.js.map +0 -1
  346. package/lib/commonjs/types/types.d.js.map +0 -1
  347. package/lib/commonjs/types.js.map +0 -1
  348. package/lib/commonjs/utils/Portal.js.map +0 -1
  349. package/lib/commonjs/utils/api.js.map +0 -1
  350. package/lib/commonjs/utils/auth.js.map +0 -1
  351. package/lib/commonjs/utils/crypto.js.map +0 -1
  352. package/lib/commonjs/utils/debugHelper.js.map +0 -1
  353. package/lib/commonjs/utils/encryption.js.map +0 -1
  354. package/lib/commonjs/utils/onairosApi.js.map +0 -1
  355. package/lib/commonjs/utils/programmaticFlow.js.map +0 -1
  356. package/lib/commonjs/utils/retryHelper.js.map +0 -1
  357. package/lib/commonjs/utils/secureStorage.js.map +0 -1
  358. package/lib/module/api/index.js.map +0 -1
  359. package/lib/module/assets/images/email.png +0 -0
  360. package/lib/module/assets/images/linkedin.png +0 -0
  361. package/lib/module/assets/images/reddit.png +0 -0
  362. package/lib/module/assets/images/youtube.png +0 -0
  363. package/lib/module/components/DataRequestModal.js +0 -220
  364. package/lib/module/components/DataRequestModal.js.map +0 -1
  365. package/lib/module/components/DataRequestScreen.js +0 -321
  366. package/lib/module/components/DataRequestScreen.js.map +0 -1
  367. package/lib/module/components/EmailVerificationModal.js +0 -311
  368. package/lib/module/components/EmailVerificationModal.js.map +0 -1
  369. package/lib/module/components/Onairos.js.map +0 -1
  370. package/lib/module/components/OnairosButton.js.map +0 -1
  371. package/lib/module/components/Overlay.js.map +0 -1
  372. package/lib/module/components/PinInput.js.map +0 -1
  373. package/lib/module/components/PlatformList.js.map +0 -1
  374. package/lib/module/components/TrainingModal.js +0 -708
  375. package/lib/module/components/TrainingModal.js.map +0 -1
  376. package/lib/module/components/UniversalOnboarding.js.map +0 -1
  377. package/lib/module/components/UniversalOnboarding.tsx.new +0 -455
  378. package/lib/module/components/onboarding/OAuthWebView.js.map +0 -1
  379. package/lib/module/components/onboarding/OnboardingHeader.js.map +0 -1
  380. package/lib/module/components/onboarding/PinInput.js.map +0 -1
  381. package/lib/module/components/onboarding/PlatformConnector.js.map +0 -1
  382. package/lib/module/components/screens/ConnectorScreen.js +0 -138
  383. package/lib/module/components/screens/ConnectorScreen.js.map +0 -1
  384. package/lib/module/components/screens/LoadingScreen.js +0 -83
  385. package/lib/module/components/screens/LoadingScreen.js.map +0 -1
  386. package/lib/module/components/screens/PinCreationScreen.js +0 -53
  387. package/lib/module/components/screens/PinCreationScreen.js.map +0 -1
  388. package/lib/module/constants/index.js.map +0 -1
  389. package/lib/module/hooks/useConnections.js.map +0 -1
  390. package/lib/module/hooks/useCredentials.js.map +0 -1
  391. package/lib/module/index.js.map +0 -1
  392. package/lib/module/services/apiKeyService.js.map +0 -1
  393. package/lib/module/services/oauthService.js.map +0 -1
  394. package/lib/module/services/platformAuthService.js.map +0 -1
  395. package/lib/module/types/ambient.d.js.map +0 -1
  396. package/lib/module/types/declarations.d.js.map +0 -1
  397. package/lib/module/types/index.d.js.map +0 -1
  398. package/lib/module/types/index.js.map +0 -1
  399. package/lib/module/types/node-fix.d.js.map +0 -1
  400. package/lib/module/types/node-override.d.js.map +0 -1
  401. package/lib/module/types/opacity.d.js.map +0 -1
  402. package/lib/module/types/types.d.js.map +0 -1
  403. package/lib/module/types.js.map +0 -1
  404. package/lib/module/utils/Portal.js.map +0 -1
  405. package/lib/module/utils/api.js.map +0 -1
  406. package/lib/module/utils/auth.js.map +0 -1
  407. package/lib/module/utils/crypto.js.map +0 -1
  408. package/lib/module/utils/debugHelper.js.map +0 -1
  409. package/lib/module/utils/encryption.js.map +0 -1
  410. package/lib/module/utils/onairosApi.js.map +0 -1
  411. package/lib/module/utils/programmaticFlow.js.map +0 -1
  412. package/lib/module/utils/retryHelper.js.map +0 -1
  413. package/lib/module/utils/secureStorage.js.map +0 -1
  414. package/lib/typescript/api/index.d.ts +0 -8
  415. package/lib/typescript/api/index.d.ts.map +0 -1
  416. package/lib/typescript/components/DataRequestModal.d.ts +0 -11
  417. package/lib/typescript/components/DataRequestModal.d.ts.map +0 -1
  418. package/lib/typescript/components/DataRequestScreen.d.ts +0 -11
  419. package/lib/typescript/components/DataRequestScreen.d.ts.map +0 -1
  420. package/lib/typescript/components/EmailVerificationModal.d.ts +0 -11
  421. package/lib/typescript/components/EmailVerificationModal.d.ts.map +0 -1
  422. package/lib/typescript/components/Onairos.d.ts +0 -4
  423. package/lib/typescript/components/Onairos.d.ts.map +0 -1
  424. package/lib/typescript/components/OnairosButton.d.ts +0 -12
  425. package/lib/typescript/components/OnairosButton.d.ts.map +0 -1
  426. package/lib/typescript/components/Overlay.d.ts +0 -4
  427. package/lib/typescript/components/Overlay.d.ts.map +0 -1
  428. package/lib/typescript/components/PinInput.d.ts +0 -4
  429. package/lib/typescript/components/PinInput.d.ts.map +0 -1
  430. package/lib/typescript/components/PlatformList.d.ts +0 -4
  431. package/lib/typescript/components/PlatformList.d.ts.map +0 -1
  432. package/lib/typescript/components/TrainingModal.d.ts +0 -4
  433. package/lib/typescript/components/TrainingModal.d.ts.map +0 -1
  434. package/lib/typescript/components/UniversalOnboarding.d.ts +0 -4
  435. package/lib/typescript/components/UniversalOnboarding.d.ts.map +0 -1
  436. package/lib/typescript/components/onboarding/OAuthWebView.d.ts +0 -10
  437. package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +0 -1
  438. package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +0 -11
  439. package/lib/typescript/components/onboarding/OnboardingHeader.d.ts.map +0 -1
  440. package/lib/typescript/components/onboarding/PinInput.d.ts +0 -4
  441. package/lib/typescript/components/onboarding/PinInput.d.ts.map +0 -1
  442. package/lib/typescript/components/onboarding/PlatformConnector.d.ts +0 -13
  443. package/lib/typescript/components/onboarding/PlatformConnector.d.ts.map +0 -1
  444. package/lib/typescript/components/screens/ConnectorScreen.d.ts +0 -9
  445. package/lib/typescript/components/screens/ConnectorScreen.d.ts.map +0 -1
  446. package/lib/typescript/components/screens/LoadingScreen.d.ts +0 -9
  447. package/lib/typescript/components/screens/LoadingScreen.d.ts.map +0 -1
  448. package/lib/typescript/components/screens/PinCreationScreen.d.ts +0 -10
  449. package/lib/typescript/components/screens/PinCreationScreen.d.ts.map +0 -1
  450. package/lib/typescript/constants/index.d.ts +0 -53
  451. package/lib/typescript/constants/index.d.ts.map +0 -1
  452. package/lib/typescript/hooks/useConnections.d.ts +0 -9
  453. package/lib/typescript/hooks/useConnections.d.ts.map +0 -1
  454. package/lib/typescript/hooks/useCredentials.d.ts +0 -9
  455. package/lib/typescript/hooks/useCredentials.d.ts.map +0 -1
  456. package/lib/typescript/index.d.ts +0 -18
  457. package/lib/typescript/index.d.ts.map +0 -1
  458. package/lib/typescript/services/apiKeyService.d.ts +0 -132
  459. package/lib/typescript/services/apiKeyService.d.ts.map +0 -1
  460. package/lib/typescript/services/oauthService.d.ts +0 -50
  461. package/lib/typescript/services/oauthService.d.ts.map +0 -1
  462. package/lib/typescript/services/platformAuthService.d.ts +0 -144
  463. package/lib/typescript/services/platformAuthService.d.ts.map +0 -1
  464. package/lib/typescript/types/index.d.ts +0 -231
  465. package/lib/typescript/types/index.d.ts.map +0 -1
  466. package/lib/typescript/types.d.ts +0 -270
  467. package/lib/typescript/types.d.ts.map +0 -1
  468. package/lib/typescript/utils/Portal.d.ts +0 -14
  469. package/lib/typescript/utils/Portal.d.ts.map +0 -1
  470. package/lib/typescript/utils/api.d.ts +0 -6
  471. package/lib/typescript/utils/api.d.ts.map +0 -1
  472. package/lib/typescript/utils/auth.d.ts +0 -6
  473. package/lib/typescript/utils/auth.d.ts.map +0 -1
  474. package/lib/typescript/utils/crypto.d.ts +0 -4
  475. package/lib/typescript/utils/crypto.d.ts.map +0 -1
  476. package/lib/typescript/utils/debugHelper.d.ts +0 -29
  477. package/lib/typescript/utils/debugHelper.d.ts.map +0 -1
  478. package/lib/typescript/utils/encryption.d.ts +0 -19
  479. package/lib/typescript/utils/encryption.d.ts.map +0 -1
  480. package/lib/typescript/utils/onairosApi.d.ts +0 -87
  481. package/lib/typescript/utils/onairosApi.d.ts.map +0 -1
  482. package/lib/typescript/utils/programmaticFlow.d.ts +0 -23
  483. package/lib/typescript/utils/programmaticFlow.d.ts.map +0 -1
  484. package/lib/typescript/utils/retryHelper.d.ts +0 -69
  485. package/lib/typescript/utils/retryHelper.d.ts.map +0 -1
  486. package/lib/typescript/utils/secureStorage.d.ts +0 -94
  487. package/lib/typescript/utils/secureStorage.d.ts.map +0 -1
  488. package/src/api/index.ts +0 -111
  489. package/src/assets/images/email.png +0 -0
  490. package/src/assets/images/linkedin.png +0 -0
  491. package/src/assets/images/onairos_logo.png +0 -0
  492. package/src/assets/images/reddit.png +0 -0
  493. package/src/assets/images/youtube.png +0 -0
  494. package/src/components/DataRequestModal.tsx +0 -227
  495. package/src/components/DataRequestScreen.tsx +0 -356
  496. package/src/components/EmailVerificationModal.tsx +0 -364
  497. package/src/components/Onairos.tsx +0 -425
  498. package/src/components/OnairosButton.tsx +0 -359
  499. package/src/components/Overlay.tsx +0 -506
  500. package/src/components/PinInput.tsx +0 -343
  501. package/src/components/PlatformList.tsx +0 -145
  502. package/src/components/TrainingModal.tsx +0 -737
  503. package/src/components/UniversalOnboarding.tsx +0 -1839
  504. package/src/components/UniversalOnboarding.tsx.new +0 -455
  505. package/src/components/onboarding/OAuthWebView.tsx +0 -838
  506. package/src/components/onboarding/OnboardingHeader.tsx +0 -70
  507. package/src/components/onboarding/PinInput.tsx +0 -356
  508. package/src/components/onboarding/PlatformConnector.tsx +0 -302
  509. package/src/components/screens/ConnectorScreen.tsx +0 -153
  510. package/src/components/screens/LoadingScreen.tsx +0 -100
  511. package/src/components/screens/PinCreationScreen.tsx +0 -67
  512. package/src/constants/index.ts +0 -83
  513. package/src/hooks/useConnections.ts +0 -163
  514. package/src/hooks/useCredentials.ts +0 -175
  515. package/src/index.js +0 -14
  516. package/src/index.ts +0 -50
  517. package/src/services/SDK_API_KEY_VALIDATION.md +0 -428
  518. package/src/services/apiKeyService.ts +0 -979
  519. package/src/services/oauthService.ts +0 -412
  520. package/src/services/platformAuthService.ts +0 -1113
  521. package/src/types/ambient.d.ts +0 -29
  522. package/src/types/declarations.d.ts +0 -26
  523. package/src/types/index.d.ts +0 -274
  524. package/src/types/index.ts +0 -244
  525. package/src/types/node-fix.d.ts +0 -19
  526. package/src/types/node-override.d.ts +0 -24
  527. package/src/types/opacity.d.ts +0 -16
  528. package/src/types/types.d.ts +0 -18
  529. package/src/types.ts +0 -298
  530. package/src/utils/Portal.tsx +0 -83
  531. package/src/utils/api.js +0 -112
  532. package/src/utils/auth.js +0 -104
  533. package/src/utils/crypto.js +0 -60
  534. package/src/utils/debugHelper.ts +0 -53
  535. package/src/utils/encryption.ts +0 -69
  536. package/src/utils/onairosApi.ts +0 -391
  537. package/src/utils/programmaticFlow.ts +0 -113
  538. package/src/utils/retryHelper.ts +0 -275
  539. package/src/utils/secureStorage.ts +0 -361
  540. package/types/index.d.ts +0 -218
  541. package/types/node-env.d.ts +0 -15
  542. /package/{src/assets/images → lib/commonjs/assets/icons}/farcaster.png +0 -0
  543. /package/{src/assets/images → lib/commonjs/assets/icons}/instagram.png +0 -0
  544. /package/{src/assets/images → lib/commonjs/assets/icons}/pinterest.png +0 -0
  545. /package/{src/assets/images → lib/commonjs/assets/icons}/swerv_logo.png +0 -0
  546. /package/{src/assets/images → lib/commonjs/assets/icons}/twitter.jpg +0 -0
@@ -0,0 +1 @@
1
+ import React from'react';function _0x3bf1(_0x3a633d,_0x3bf18f){_0x3a633d=_0x3a633d-0x0;const _0x3110ba=_0x3a63();let _0x27239f=_0x3110ba[_0x3a633d];return _0x27239f;}function _0x3a63(){const _0x4d6516=['Go\x20back','button','Close','createElement','Fragment','grabberContainer','container','closeButton','ddYwM','backText','centerSpacer','spacer','create','100%','center','#D0D0D0','row','flex-start','grey800','500'];_0x3a63=function(){return _0x4d6516;};return _0x3a63();}import{View,StyleSheet,TouchableOpacity,Text}from'react-native';import{COLORS,SPACING}from'../theme';const ModalHeader=({onClose:_0x6e8c59,onBack:_0x42c905,showGrabber:showGrabber=!![],showBackButton:showBackButton=![]})=>{const _0x23490b={'Xwyry':_0x3bf1(0x0),'ddYwM':_0x3bf1(0x1),'KEvwy':_0x3bf1(0x2)};return React[_0x3bf1(0x3)](React[_0x3bf1(0x4)],null,showGrabber&&React[_0x3bf1(0x3)](View,{'style':styles[_0x3bf1(0x5)]},React[_0x3bf1(0x3)](View,{'style':styles['grabber']})),React['createElement'](View,{'style':styles[_0x3bf1(0x6)]},showBackButton?React['createElement'](TouchableOpacity,{'style':styles[_0x3bf1(0x7)],'onPress':_0x42c905,'activeOpacity':0.7,'accessibilityLabel':_0x23490b['Xwyry'],'accessibilityRole':_0x23490b[_0x3bf1(0x8)]},React[_0x3bf1(0x3)](Text,{'style':styles[_0x3bf1(0x9)]},'←')):React[_0x3bf1(0x3)](TouchableOpacity,{'style':styles[_0x3bf1(0x7)],'onPress':_0x6e8c59,'activeOpacity':0.7,'accessibilityLabel':_0x23490b['KEvwy'],'accessibilityRole':_0x23490b[_0x3bf1(0x8)]},React[_0x3bf1(0x3)](Text,{'style':styles['closeText']},'✕')),React[_0x3bf1(0x3)](View,{'style':styles[_0x3bf1(0xa)]}),React[_0x3bf1(0x3)](View,{'style':styles[_0x3bf1(0xb)]})));},styles=StyleSheet[_0x3bf1(0xc)]({'grabberContainer':{'width':_0x3bf1(0xd),'alignItems':_0x3bf1(0xe),'paddingTop':0xc,'paddingBottom':0x4},'grabber':{'width':0x64,'height':0x6,'backgroundColor':_0x3bf1(0xf),'borderRadius':0x3},'container':{'flexDirection':_0x3bf1(0x10),'alignItems':_0x3bf1(0x11),'justifyContent':_0x3bf1(0x11),'height':0x2c,'paddingTop':0x0,'paddingLeft':0x4,'marginBottom':SPACING['md']},'closeButton':{'width':0x24,'height':0x24,'justifyContent':_0x3bf1(0xe),'alignItems':'center','marginTop':0x0},'closeText':{'fontSize':0x14,'color':COLORS[_0x3bf1(0x12)],'fontWeight':_0x3bf1(0x13)},'backText':{'fontSize':0x18,'color':COLORS['grey800'],'fontWeight':'500'},'centerSpacer':{'flex':0x1},'spacer':{'width':0x2c,'height':0x2c}});export{ModalHeader};export default ModalHeader;
@@ -0,0 +1 @@
1
+ function _0x1d49(){const _0x280048=['modalTopPadding','createElement','surface','modalTop','80%'];_0x1d49=function(){return _0x280048;};return _0x1d49();}import React from'react';import{View,StyleSheet}from'react-native';import{COLORS,BORDER_RADIUS,SPACING}from'../theme';const ModalSheet=({children:_0x3e9c49,topPadding:topPadding=SPACING[_0x52fc(0x0)],onClose:_0x2f7de3,showGrabber:showGrabber=!![],style:_0x3376c7})=>{const _0x58b33d={'bottom':0x14};return React[_0x52fc(0x1)](View,{'style':[styles['container'],{'paddingTop':topPadding,'paddingBottom':_0x58b33d['bottom']||SPACING['lg']},_0x3376c7]},_0x3e9c49);},styles=StyleSheet['create']({'container':{'backgroundColor':COLORS[_0x52fc(0x2)],'borderTopLeftRadius':BORDER_RADIUS[_0x52fc(0x3)],'borderTopRightRadius':BORDER_RADIUS[_0x52fc(0x3)],'borderBottomLeftRadius':0x0,'borderBottomRightRadius':0x0,'paddingHorizontal':SPACING['modalHorizontal'],'flex':0x1,'minHeight':_0x52fc(0x4)}});function _0x52fc(_0x1d49f7,_0x52fc16){_0x1d49f7=_0x1d49f7-0x0;const _0x469a70=_0x1d49();let _0x36ec2c=_0x469a70[_0x1d49f7];return _0x36ec2c;}export{ModalSheet};export default ModalSheet;
@@ -1,367 +1 @@
1
- import React, { forwardRef, useImperativeHandle, useState, useCallback, useEffect } from 'react';
2
- import { StyleSheet, View, TouchableOpacity, Text, Image, Alert } from 'react-native';
3
- import { UniversalOnboarding } from './UniversalOnboarding';
4
- import { COLORS } from '../constants';
5
- import { hasCredentials, getCredentials } from '../utils/secureStorage';
6
- import { Portal } from '../utils/Portal';
7
- import { initializeApiKey, isApiKeyInitialized, getApiConfig } from '../services/apiKeyService';
8
- export const Onairos = /*#__PURE__*/forwardRef((props, ref) => {
9
- const {
10
- returnLink,
11
- prefillUrl,
12
- AppName,
13
- buttonType = 'normal',
14
- requestData,
15
- buttonWidth = 200,
16
- buttonHeight = 48,
17
- hasStroke = false,
18
- enabled = true,
19
- buttonForm = 'default',
20
- onRejection,
21
- onResolved,
22
- preCheck,
23
- color = COLORS.primary,
24
- debug = false,
25
- darkMode = false,
26
- preferredPlatform,
27
- testMode = false,
28
- // API Key props
29
- apiKey,
30
- environment = 'production',
31
- enableLogging = true,
32
- timeout = 30000,
33
- retryAttempts = 3
34
- } = props;
35
- const [showOverlay, setShowOverlay] = useState(false);
36
- const [isInitialized, setIsInitialized] = useState(false);
37
- const [initializationError, setInitializationError] = useState(null);
38
- const [isInitializing, setIsInitializing] = useState(false);
39
-
40
- // Initialize API key when component mounts or API key changes
41
- useEffect(() => {
42
- var _getApiConfig;
43
- let isMounted = true;
44
- const initializeApi = async () => {
45
- // Skip if already initializing
46
- if (isInitializing) return;
47
- setIsInitializing(true);
48
- setInitializationError(null);
49
- try {
50
- console.log('🚀 Onairos SDK: Starting API key initialization...');
51
- if (!apiKey) {
52
- throw new Error('API key is required. Please provide a valid API key from your Onairos dashboard.');
53
- }
54
- const config = {
55
- apiKey,
56
- environment,
57
- enableLogging,
58
- timeout,
59
- retryAttempts
60
- };
61
-
62
- // Initialize the API key service
63
- await initializeApiKey(config);
64
- if (isMounted) {
65
- setIsInitialized(true);
66
- setInitializationError(null);
67
- if (enableLogging) {
68
- console.log('✅ Onairos SDK: API key initialization completed successfully');
69
- console.log('📊 Configuration:', {
70
- environment,
71
- enableLogging,
72
- timeout,
73
- retryAttempts,
74
- apiKeyLength: apiKey.length
75
- });
76
- }
77
- }
78
- } catch (error) {
79
- const errorMessage = error instanceof Error ? error.message : 'Unknown initialization error';
80
- console.error('❌ Onairos SDK: API key initialization failed:', errorMessage);
81
- if (isMounted) {
82
- setIsInitialized(false);
83
- setInitializationError(errorMessage);
84
-
85
- // Show developer-friendly error
86
- if (enableLogging) {
87
- console.group('🔧 API Key Troubleshooting Guide');
88
- console.log('1. Check that your API key is correct and not expired');
89
- console.log('2. Verify you have the right permissions for your use case');
90
- console.log('3. Ensure your environment setting matches your API key');
91
- console.log('4. Check your internet connection');
92
- console.log('5. Visit https://dashboard.onairos.uk to manage your API keys');
93
- console.groupEnd();
94
- }
95
-
96
- // Call rejection callback if provided
97
- if (onRejection) {
98
- onRejection(`SDK initialization failed: ${errorMessage}`);
99
- }
100
- }
101
- } finally {
102
- if (isMounted) {
103
- setIsInitializing(false);
104
- }
105
- }
106
- };
107
-
108
- // Only initialize if we have an API key and aren't already initialized correctly
109
- if (apiKey && (!isApiKeyInitialized() || ((_getApiConfig = getApiConfig()) === null || _getApiConfig === void 0 ? void 0 : _getApiConfig.apiKey) !== apiKey)) {
110
- initializeApi();
111
- }
112
- return () => {
113
- isMounted = false;
114
- };
115
- }, [apiKey, environment, enableLogging, timeout, retryAttempts, onRejection]);
116
-
117
- // Imperative methods
118
- useImperativeHandle(ref, () => ({
119
- openOverlay: handleShowOverlay,
120
- closeOverlay: handleCloseOverlay,
121
- isInitialized: () => isInitialized,
122
- getApiConfig: () => getApiConfig()
123
- }));
124
- const handleShowOverlay = useCallback(async () => {
125
- try {
126
- // Check if SDK is initialized
127
- if (!isInitialized) {
128
- const errorMessage = initializationError || 'SDK not initialized. Please check your API key.';
129
- console.error('❌ Cannot open overlay: SDK not initialized');
130
- if (onRejection) {
131
- onRejection(errorMessage);
132
- } else {
133
- Alert.alert('SDK Error', errorMessage, [{
134
- text: 'OK'
135
- }]);
136
- }
137
- return;
138
- }
139
-
140
- // Run pre-check if provided
141
- if (preCheck) {
142
- if (enableLogging) {
143
- console.log('🔍 Running pre-check validation...');
144
- }
145
- try {
146
- const preCheckPassed = await preCheck();
147
- if (!preCheckPassed) {
148
- if (enableLogging) {
149
- console.log('⛔ Pre-check failed, aborting overlay');
150
- }
151
- return;
152
- }
153
- if (enableLogging) {
154
- console.log('✅ Pre-check passed');
155
- }
156
- } catch (preCheckError) {
157
- console.error('❌ Pre-check error:', preCheckError);
158
- if (onRejection) {
159
- onRejection(`Pre-check failed: ${preCheckError.message}`);
160
- }
161
- return;
162
- }
163
- }
164
-
165
- // Check for existing credentials
166
- if (enableLogging) {
167
- console.log('🔍 Checking for existing credentials...');
168
- }
169
- const hasExistingCredentials = await hasCredentials();
170
- if (hasExistingCredentials) {
171
- if (enableLogging) {
172
- console.log('🔑 Existing credentials found, attempting automatic resolution...');
173
- }
174
- try {
175
- const credentials = await getCredentials();
176
- if (credentials && onResolved) {
177
- // For existing users, we can resolve immediately with cached data
178
- const mockApiUrl = 'https://api2.onairos.uk/user/data';
179
- const mockToken = 'existing_user_token';
180
- if (enableLogging) {
181
- console.log('✅ Resolving with existing credentials');
182
- }
183
- onResolved(mockApiUrl, mockToken, credentials);
184
- return;
185
- }
186
- } catch (credentialsError) {
187
- console.warn('⚠️ Failed to retrieve existing credentials:', credentialsError);
188
- // Continue with normal flow
189
- }
190
- }
191
- if (enableLogging) {
192
- console.log('🎨 Opening Onairos overlay...');
193
- }
194
- setShowOverlay(true);
195
- } catch (error) {
196
- console.error('❌ Error opening overlay:', error);
197
- if (onRejection) {
198
- onRejection(`Failed to open overlay: ${error.message}`);
199
- }
200
- }
201
- }, [isInitialized, initializationError, preCheck, enableLogging, onRejection, onResolved]);
202
- const handleCloseOverlay = useCallback(result => {
203
- if (enableLogging) {
204
- console.log('🔽 Closing Onairos overlay');
205
- }
206
- setShowOverlay(false);
207
- if (result && onResolved) {
208
- onResolved(result.apiUrl, result.token, result.userData);
209
- }
210
- }, [enableLogging, onResolved]);
211
- const handleOverlayRejection = useCallback(error => {
212
- if (enableLogging) {
213
- console.log('❌ Overlay rejected:', error);
214
- }
215
- setShowOverlay(false);
216
- if (onRejection) {
217
- onRejection(error);
218
- }
219
- }, [enableLogging, onRejection]);
220
-
221
- // Show error state if initialization failed
222
- if (initializationError && !isInitializing) {
223
- return /*#__PURE__*/React.createElement(View, {
224
- style: styles.errorContainer
225
- }, /*#__PURE__*/React.createElement(TouchableOpacity, {
226
- style: [styles.errorButton, {
227
- backgroundColor: '#FF6B6B'
228
- }],
229
- onPress: () => {
230
- Alert.alert('SDK Error', `Onairos SDK initialization failed:\n\n${initializationError}\n\nPlease check your API key and try again.`, [{
231
- text: 'OK'
232
- }]);
233
- }
234
- }, /*#__PURE__*/React.createElement(Text, {
235
- style: styles.errorButtonText
236
- }, "\u26A0\uFE0F SDK Error")));
237
- }
238
-
239
- // Show loading state while initializing
240
- if (isInitializing || !isInitialized) {
241
- return /*#__PURE__*/React.createElement(View, {
242
- style: styles.loadingContainer
243
- }, /*#__PURE__*/React.createElement(TouchableOpacity, {
244
- style: [styles.loadingButton, {
245
- backgroundColor: '#999'
246
- }],
247
- disabled: true
248
- }, /*#__PURE__*/React.createElement(Text, {
249
- style: styles.loadingButtonText
250
- }, "\uD83D\uDD04 Initializing...")));
251
- }
252
-
253
- // Get button style based on type
254
- const getButtonStyle = () => {
255
- const baseStyle = {
256
- width: buttonWidth,
257
- height: buttonHeight,
258
- backgroundColor: color,
259
- borderRadius: buttonType === 'pill' ? buttonHeight / 2 : 8,
260
- alignItems: 'center',
261
- justifyContent: 'center',
262
- flexDirection: 'row',
263
- opacity: enabled ? 1 : 0.6
264
- };
265
- if (hasStroke) {
266
- baseStyle.borderWidth = 2;
267
- baseStyle.borderColor = darkMode ? '#fff' : '#000';
268
- }
269
- return baseStyle;
270
- };
271
- const getButtonText = () => {
272
- switch (buttonForm) {
273
- case 'connect':
274
- return 'Connect with Onairos';
275
- default:
276
- return 'Continue with Onairos';
277
- }
278
- };
279
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
280
- style: getButtonStyle(),
281
- onPress: handleShowOverlay,
282
- disabled: !enabled || isInitializing || !isInitialized,
283
- activeOpacity: 0.8
284
- }, /*#__PURE__*/React.createElement(Image, {
285
- source: require('../assets/images/onairos_logo.png'),
286
- style: styles.logo,
287
- resizeMode: "contain"
288
- }), /*#__PURE__*/React.createElement(Text, {
289
- style: [styles.buttonText, {
290
- color: darkMode ? '#000' : '#fff'
291
- }]
292
- }, getButtonText())), showOverlay && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(UniversalOnboarding, {
293
- visible: showOverlay,
294
- onClose: handleCloseOverlay,
295
- AppName: AppName,
296
- requestData: requestData || {},
297
- returnLink: returnLink,
298
- prefillUrl: prefillUrl,
299
- onComplete: handleCloseOverlay,
300
- embedd: false,
301
- debug: debug,
302
- testMode: testMode,
303
- preferredPlatform: preferredPlatform,
304
- config: getApiConfig() || undefined
305
- })));
306
- });
307
- const styles = StyleSheet.create({
308
- button: {
309
- flexDirection: 'row',
310
- alignItems: 'center',
311
- justifyContent: 'center',
312
- paddingVertical: 12,
313
- paddingHorizontal: 16,
314
- shadowColor: '#000',
315
- shadowOffset: {
316
- width: 0,
317
- height: 2
318
- },
319
- shadowOpacity: 0.1,
320
- shadowRadius: 4,
321
- elevation: 2
322
- },
323
- buttonContent: {
324
- flexDirection: 'row',
325
- alignItems: 'center',
326
- justifyContent: 'center'
327
- },
328
- logo: {
329
- width: 24,
330
- height: 24,
331
- marginRight: 8
332
- },
333
- buttonText: {
334
- fontSize: 16,
335
- fontWeight: '600',
336
- textAlign: 'center'
337
- },
338
- errorContainer: {
339
- flex: 1,
340
- justifyContent: 'center',
341
- alignItems: 'center'
342
- },
343
- errorButton: {
344
- padding: 16,
345
- borderRadius: 8
346
- },
347
- errorButtonText: {
348
- fontSize: 16,
349
- fontWeight: '600',
350
- color: '#fff'
351
- },
352
- loadingContainer: {
353
- flex: 1,
354
- justifyContent: 'center',
355
- alignItems: 'center'
356
- },
357
- loadingButton: {
358
- padding: 16,
359
- borderRadius: 8
360
- },
361
- loadingButtonText: {
362
- fontSize: 16,
363
- fontWeight: '600',
364
- color: '#fff'
365
- }
366
- });
367
- //# sourceMappingURL=Onairos.js.map
1
+ import React,{forwardRef,useImperativeHandle,useState,useCallback,useEffect}from'react';function _0x51ea(){const _0x5abe63=['🚀\x20Onairos\x20SDK:\x20Starting\x20API\x20key\x20initialization...','YgZJr','uwcyY','Unknown\x20initialization\x20error','❌\x20Onairos\x20SDK:\x20API\x20key\x20initialization\x20failed:','5|3|0|4|1|6|2','4.\x20Check\x20your\x20internet\x20connection','🔧\x20API\x20Key\x20Troubleshooting\x20Guide','GcWiz','SDK\x20not\x20initialized.\x20Please\x20check\x20your\x20API\x20key.','❌\x20Cannot\x20open\x20overlay:\x20SDK\x20not\x20initialized','SDK\x20Error','pill','center','row','#fff','#000','🔑\x20Existing\x20credentials\x20found,\x20attempting\x20automatic\x20resolution...','KhMnS','isInitializing:','showOverlay:','ulojq','kpsim','wciQv','XfHvu','RSViV','wmtLx','mcPKP','GKbbJ','rUpnm','🔍\x20Checking\x20for\x20existing\x20credentials...','Htvvj','ITlgj','✅\x20Resolving\x20with\x20existing\x20credentials','usGmX','❌\x20Error\x20opening\x20overlay:','0|1|6|4|2|3|5','POhnj','🔽\x20showOverlay\x20set\x20to\x20false','CskHL','jJbOY','normal','#FF6B6B','⚠️\x20SDK\x20Error','#999','🔄\x20Initializing...','contain','JYSVr','aWxOW','primary','FqjUm','wdYIN','BmRhn','JLcQk','hDEqI','OFfJy','YFQGX','log','nBgzC','pTIDj','LfCLl','nJoJz','cZVor','nuACr','SWOJb','length','message','VhkqZ','error','JCkdS','AwbWY','split','oQsHG','GHNri','1.\x20Check\x20that\x20your\x20API\x20key\x20is\x20correct\x20and\x20not\x20expired','group','xKTJX','rVWeu','tsPGK','ARuZy','bROMs','jTFZl','fzRxB','✅\x20Onairos\x20component:\x20SDK\x20already\x20initialized,\x20syncing\x20state','tCCSk','EDxVE','XXXdk','ddOet','hQmzv','sMSpt','besBb','hMjVp','sckKB','NFGjl','nViet','HXVBE','Mcaal','alert','thsWv','oWZjF','aEnXC','ayOjH','DISmq','⛔\x20Pre-check\x20failed,\x20aborting\x20overlay','NiraO','Failed\x20to\x20open\x20overlay:\x20','vZphZ','xGfRO','VQAHa','❌\x20Pre-check\x20error:','zGujF','FxPTv','mAHnP','onmhB','TTpwr','eQrOX','BASE_URL','existing_user_token','HxIzz','LeCnf','wAgdb','warn','🎨\x20Opening\x20Onairos\x20overlay...','FnAyK','JOBFI','FdOwW','Pre-check\x20failed:\x20','GTSmY','meXHC','jbHkN','RDUAI','RjbWi','WdrQm','lZfQb','SVPdc','aMfEe','UGxeD','🔽\x20Closing\x20Onairos\x20overlay,\x20result:','LptML','rHPXw','LsYtf','apiUrl','token','userData','OFRmK','ZyDOC','zTCCQ','ztYIj','CkVOW','groupEnd','QmviE','HWqPj','HKeGB','Onairos\x20SDK\x20initialization\x20failed:\x0a\x0a','\x0a\x0aPlease\x20check\x20your\x20API\x20key\x20and\x20try\x20again.','GVDIN','AQPJE','❌\x20Overlay\x20rejected:','hirZL','lkKvv','ZHqRs','qvtwS','uGVNg','createElement','errorContainer','errorButton','tLdtw','FjPVq','FWUwH','XRfRh','loadingContainer','loadingButton','kMgxx','loadingButtonText','XYAMI','uPQGE','QUPYf','qqVGy','IaONA','borderColor','hOncs','connect','Connect\x20with\x20Onairos','Fragment','sqZUk','logo','cNmNx','600'];_0x51ea=function(){return _0x5abe63;};return _0x51ea();}import{StyleSheet,View,TouchableOpacity,Text,Image,Alert}from'react-native';import{UniversalOnboarding}from'./UniversalOnboarding';import{COLORS}from'../constants';import{hasCredentials,getCredentials}from'../utils/secureStorage';import{initializeApiKey,isApiKeyInitialized,getApiConfig}from'../services/apiKeyService';import{API_CONFIG}from'../config/api';import{BRAND_IMAGES}from'../utils/assetRegistry';function _0x1f37(_0x51ea8a,_0x1f3749){_0x51ea8a=_0x51ea8a-0x0;const _0x348776=_0x51ea();let _0x526630=_0x348776[_0x51ea8a];return _0x526630;}export const Onairos=forwardRef((_0x2acd26,_0x3929c3)=>{const _0x20f0fe={'OFfJy':function(_0x594a68,_0x2ee22c){return _0x594a68(_0x2ee22c);},'YFQGX':function(_0x1e2c1b,_0xab1e1){return _0x1e2c1b(_0xab1e1);},'aftGz':_0x1f37(0x0),'nBgzC':'efYzl','LfCLl':'API\x20key\x20is\x20required.\x20Please\x20provide\x20a\x20valid\x20API\x20key\x20from\x20your\x20Onairos\x20dashboard.','nJoJz':function(_0x2524fa,_0x54eeaa){return _0x2524fa!==_0x54eeaa;},'cZVor':_0x1f37(0x1),'cUIXB':_0x1f37(0x2),'nuACr':function(_0x3237ec,_0x5f4b5c){return _0x3237ec(_0x5f4b5c);},'SWOJb':'📊\x20Configuration:','VhkqZ':_0x1f37(0x3),'JCkdS':_0x1f37(0x4),'BmRhn':function(_0x30f71e,_0x115c40){return _0x30f71e(_0x115c40);},'AwbWY':_0x1f37(0x5),'oQsHG':'2.\x20Verify\x20you\x20have\x20the\x20right\x20permissions\x20for\x20your\x20use\x20case','GHNri':_0x1f37(0x6),'SVPdc':'3.\x20Ensure\x20your\x20environment\x20setting\x20matches\x20your\x20API\x20key','xKTJX':_0x1f37(0x7),'rVWeu':'5.\x20Visit\x20https://dashboard.onairos.uk\x20to\x20manage\x20your\x20API\x20keys','JXEIK':function(_0x245015,_0x10c234){return _0x245015(_0x10c234);},'tsPGK':function(_0x3d9c12,_0x4c7a5b){return _0x3d9c12(_0x4c7a5b);},'XUyYE':_0x1f37(0x8),'ARuZy':function(_0x11bbad){return _0x11bbad();},'bROMs':function(_0x448e55,_0xf40ff){return _0x448e55===_0xf40ff;},'jTFZl':function(_0x42bcc3){return _0x42bcc3();},'fzRxB':function(_0x10dfb0,_0x321214){return _0x10dfb0(_0x321214);},'CxlBc':function(_0x319e94,_0x5c2379){return _0x319e94||_0x5c2379;},'VQAHa':_0x1f37(0x9),'NFGjl':_0x1f37(0xa),'thsWv':_0x1f37(0xb),'Mcaal':function(_0x316321,_0x151b47){return _0x316321(_0x151b47);},'ddOet':function(_0x4c637d,_0x3ffb32){return _0x4c637d===_0x3ffb32;},'uPQGE':_0x1f37(0xc),'meXHC':function(_0x5d1f99,_0x5f443e){return _0x5d1f99/_0x5f443e;},'jbHkN':_0x1f37(0xd),'RDUAI':_0x1f37(0xe),'VejrT':_0x1f37(0xf),'RjbWi':_0x1f37(0x10),'XXXdk':_0x1f37(0x11),'hQmzv':_0x1f37(0x12),'sMSpt':'🔘\x20Button\x20pressed!\x20isInitialized:','besBb':_0x1f37(0x13),'qnZzR':_0x1f37(0x14),'hMjVp':function(_0x33a484,_0x1b2e37){return _0x33a484===_0x1b2e37;},'BIZqj':_0x1f37(0x15),'sckKB':function(_0x319687,_0x3199a8){return _0x319687||_0x3199a8;},'nViet':_0x1f37(0x16),'HXVBE':_0x1f37(0x17),'hOncs':'🔍\x20Running\x20pre-check\x20validation...','oWZjF':function(_0x2a42ed,_0xbdd9f4){return _0x2a42ed===_0xbdd9f4;},'gYaVi':_0x1f37(0x18),'aEnXC':_0x1f37(0x19),'ayOjH':_0x1f37(0x1a),'DISmq':_0x1f37(0x1b),'vZphZ':function(_0x3ead22,_0x43b28e){return _0x3ead22!==_0x43b28e;},'xGfRO':_0x1f37(0x1c),'cciOP':_0x1f37(0x1d),'FWUwH':'✅\x20Pre-check\x20passed','zGujF':function(_0x248d8b,_0x3fe739){return _0x248d8b(_0x3fe739);},'FxPTv':_0x1f37(0x1e),'mAHnP':function(_0x5bd568){return _0x5bd568();},'onmhB':function(_0x2e236f,_0x5c1b07){return _0x2e236f===_0x5c1b07;},'TTpwr':_0x1f37(0x1f),'eQrOX':_0x1f37(0x20),'HxIzz':_0x1f37(0x21),'LeCnf':function(_0x14b793,_0x1dded1,_0x165d87,_0x4abb99){return _0x14b793(_0x1dded1,_0x165d87,_0x4abb99);},'besOz':'UikSp','wAgdb':_0x1f37(0x22),'iJKzw':'⚠️\x20Failed\x20to\x20retrieve\x20existing\x20credentials:','FnAyK':function(_0x2a38b4,_0x448dcc){return _0x2a38b4(_0x448dcc);},'JOBFI':function(_0x3647b9,_0x55d41a){return _0x3647b9!==_0x55d41a;},'FdOwW':'wamhZ','GTSmY':_0x1f37(0x23),'wdYIN':function(_0x54d3c0,_0x48c2cd){return _0x54d3c0(_0x48c2cd);},'lZfQb':_0x1f37(0x24),'aMfEe':function(_0x5e87b5,_0x519678){return _0x5e87b5===_0x519678;},'UGxeD':_0x1f37(0x25),'LptML':function(_0x4a2854,_0x5d110d){return _0x4a2854(_0x5d110d);},'rHPXw':_0x1f37(0x26),'LsYtf':function(_0x42a65b,_0x12194d){return _0x42a65b&&_0x12194d;},'HWqPj':function(_0x4857cf,_0x51134c){return _0x4857cf(_0x51134c);},'HKeGB':_0x1f37(0x27),'GVDIN':function(_0x332166,_0x1e0234){return _0x332166===_0x1e0234;},'yqAan':'AQPJE','FqjUm':function(_0x2c07d7,_0x10a1bd){return _0x2c07d7(_0x10a1bd);},'ZHqRs':function(_0xa7e244,_0x5e1be5){return _0xa7e244===_0x5e1be5;},'FjPVq':'rIWaI','Ogual':function(_0x1d5cbc,_0x348509){return _0x1d5cbc/_0x348509;},'QUPYf':function(_0x35ef6f,_0x548650){return _0x35ef6f!==_0x548650;},'qqVGy':_0x1f37(0x28),'JYSVr':_0x1f37(0x29),'aWxOW':'default','qQpjd':'production','JLcQk':function(_0x593640,_0x24123c){return _0x593640(_0x24123c);},'hDEqI':function(_0x6743a0,_0x5ae9a1,_0x29a08b){return _0x6743a0(_0x5ae9a1,_0x29a08b);},'EDxVE':function(_0x38e891,_0x5a4372,_0x4e59ef){return _0x38e891(_0x5a4372,_0x4e59ef);},'PSHfQ':function(_0x539647,_0x594f7d,_0xb14b97){return _0x539647(_0x594f7d,_0xb14b97);},'WdrQm':function(_0x47d3f6,_0x5195bb,_0x3bc8b0){return _0x47d3f6(_0x5195bb,_0x3bc8b0);},'QmviE':function(_0x2ecf6b,_0x57c503,_0x4de007){return _0x2ecf6b(_0x57c503,_0x4de007);},'uGVNg':function(_0x4af05a,_0x298f08){return _0x4af05a&&_0x298f08;},'tLdtw':_0x1f37(0x2a),'ajjco':_0x1f37(0x2b),'XRfRh':function(_0x550dd4,_0x5bd16f){return _0x550dd4||_0x5bd16f;},'kMgxx':_0x1f37(0x2c),'XYAMI':_0x1f37(0x2d),'sqZUk':function(_0x43c119,_0xb18c21){return _0x43c119||_0xb18c21;},'cNmNx':_0x1f37(0x2e),'zMHsO':function(_0x410ac8,_0x154107){return _0x410ac8||_0x154107;}},{returnLink:_0xccef6b,prefillUrl:_0x34c35a,AppName:_0x5d8173,buttonType:buttonType=_0x20f0fe[_0x1f37(0x2f)],requestData:_0x23ff9b,buttonWidth:buttonWidth=0xc8,buttonHeight:buttonHeight=0x30,hasStroke:hasStroke=![],enabled:enabled=!![],buttonForm:buttonForm=_0x20f0fe[_0x1f37(0x30)],onRejection:_0x1ca495,onResolved:_0x540fa3,preCheck:_0x1ace32,color:color=COLORS[_0x1f37(0x31)],debug:debug=![],darkMode:darkMode=![],preferredPlatform:_0x4eba42,testMode:testMode=![],apiKey:_0x382cee,environment:environment=_0x20f0fe['qQpjd'],enableLogging:enableLogging=!![],timeout:timeout=0x7530,retryAttempts:retryAttempts=0x3}=_0x2acd26,[_0x1e13ae,_0xc9663f]=_0x20f0fe[_0x1f37(0x32)](useState,![]),[_0x2843bc,_0x25f4fb]=_0x20f0fe[_0x1f37(0x33)](useState,![]),[_0x2cf840,_0xd0aa1]=_0x20f0fe[_0x1f37(0x34)](useState,null),[_0x45b60c,_0x5af7d2]=_0x20f0fe[_0x1f37(0x35)](useState,![]);_0x20f0fe[_0x1f37(0x36)](useEffect,()=>{const _0x2a132b={'pTIDj':function(_0x4b2045,_0x1ad4f5){return _0x4b2045(_0x1ad4f5);},'SDVGM':_0x20f0fe['XUyYE']};var _0x4e1612;let _0x22f004=!![];const _0x4918f6=async()=>{if(_0x45b60c)return;_0x20f0fe[_0x1f37(0x37)](_0x5af7d2,!![]),_0x20f0fe[_0x1f37(0x38)](_0xd0aa1,null);try{console[_0x1f37(0x39)](_0x20f0fe['aftGz']);if(!_0x382cee){if(_0x20f0fe[_0x1f37(0x3a)]!==_0x20f0fe[_0x1f37(0x3a)])_0x291fe5&&_0x2a132b[_0x1f37(0x3b)](_0x230231,![]);else throw new Error(_0x20f0fe[_0x1f37(0x3c)]);}const _0x438245={'apiKey':_0x382cee,'environment':environment,'enableLogging':enableLogging,'timeout':timeout,'retryAttempts':retryAttempts};await initializeApiKey(_0x438245),_0x22f004&&(_0x20f0fe[_0x1f37(0x3d)](_0x20f0fe[_0x1f37(0x3e)],_0x20f0fe['cUIXB'])?(_0x20f0fe[_0x1f37(0x3f)](_0x25f4fb,!![]),_0x20f0fe[_0x1f37(0x38)](_0xd0aa1,null),enableLogging&&(console[_0x1f37(0x39)]('✅\x20Onairos\x20SDK:\x20API\x20key\x20initialization\x20completed\x20successfully'),console['log'](_0x20f0fe[_0x1f37(0x40)],{'environment':environment,'enableLogging':enableLogging,'timeout':timeout,'retryAttempts':retryAttempts,'apiKeyLength':_0x382cee[_0x1f37(0x41)]}))):Alert['alert'](_0x1f37(0xb),_0x5bd208,[{'text':'OK'}]));}catch(_0x4b0cb5){const _0x32e437=_0x4b0cb5 instanceof Error?_0x4b0cb5[_0x1f37(0x42)]:_0x20f0fe[_0x1f37(0x43)];console[_0x1f37(0x44)](_0x20f0fe[_0x1f37(0x45)],_0x32e437);if(_0x22f004){_0x20f0fe[_0x1f37(0x37)](_0x25f4fb,![]),_0x20f0fe[_0x1f37(0x34)](_0xd0aa1,_0x32e437);if(enableLogging){const _0xd4c61f=_0x20f0fe[_0x1f37(0x46)][_0x1f37(0x47)]('|');let _0x4f5748=0x0;while(!![]){switch(_0xd4c61f[_0x4f5748++]){case'0':console[_0x1f37(0x39)](_0x20f0fe[_0x1f37(0x48)]);continue;case'1':console[_0x1f37(0x39)](_0x20f0fe[_0x1f37(0x49)]);continue;case'2':console['groupEnd']();continue;case'3':console[_0x1f37(0x39)](_0x1f37(0x4a));continue;case'4':console[_0x1f37(0x39)](_0x20f0fe['SVPdc']);continue;case'5':console[_0x1f37(0x4b)](_0x20f0fe[_0x1f37(0x4c)]);continue;case'6':console[_0x1f37(0x39)](_0x20f0fe[_0x1f37(0x4d)]);continue;}break;}}_0x1ca495&&_0x20f0fe['JXEIK'](_0x1ca495,'SDK\x20initialization\x20failed:\x20'+_0x32e437);}}finally{_0x22f004&&_0x20f0fe[_0x1f37(0x4e)](_0x5af7d2,![]);}};if(_0x382cee&&(!_0x20f0fe[_0x1f37(0x4f)](isApiKeyInitialized)||(_0x20f0fe['bROMs'](_0x4e1612=getApiConfig(),null)||_0x20f0fe[_0x1f37(0x50)](_0x4e1612,void 0x0)?void 0x0:_0x4e1612['apiKey'])!==_0x382cee))_0x20f0fe[_0x1f37(0x51)](_0x4918f6);else _0x20f0fe['jTFZl'](isApiKeyInitialized)&&(_0x20f0fe[_0x1f37(0x52)](_0x25f4fb,!![]),_0x20f0fe['tsPGK'](_0x5af7d2,![]),enableLogging&&console['log'](_0x1f37(0x53)));return()=>{const _0x3259c5={'tCCSk':function(_0x4e4d32,_0x4268b1){return _0x2a132b['pTIDj'](_0x4e4d32,_0x4268b1);}};_0x1f37(0x8)!==_0x2a132b['SDVGM']?_0x3259c5[_0x1f37(0x54)](_0x34df10,_0x2ceebb):_0x22f004=![];};},[_0x382cee,environment,enableLogging,timeout,retryAttempts,_0x1ca495]),_0x20f0fe[_0x1f37(0x55)](useImperativeHandle,_0x3929c3,()=>({'openOverlay':_0x551afb,'closeOverlay':_0x50dc9d,'isInitialized':()=>_0x2843bc,'getApiConfig':()=>getApiConfig()}));const _0x551afb=_0x20f0fe['PSHfQ'](useCallback,async()=>{const _0x53f6dc={'olshr':_0x20f0fe[_0x1f37(0x56)],'NiraO':_0x1f37(0x23)};if(_0x20f0fe[_0x1f37(0x57)](_0x20f0fe[_0x1f37(0x58)],_0x20f0fe[_0x1f37(0x58)])){console['log'](_0x20f0fe[_0x1f37(0x59)],_0x2843bc,_0x20f0fe[_0x1f37(0x5a)],_0x45b60c,_0x20f0fe['qnZzR'],_0x1e13ae);try{if(_0x20f0fe[_0x1f37(0x5b)](_0x20f0fe['BIZqj'],_0x20f0fe['BIZqj'])){if(!_0x2843bc){const _0x1832bc=_0x20f0fe[_0x1f37(0x5c)](_0x2cf840,_0x1f37(0x9));console[_0x1f37(0x44)](_0x20f0fe[_0x1f37(0x5d)]);_0x1ca495?_0x20f0fe[_0x1f37(0x3d)](_0x20f0fe[_0x1f37(0x5e)],_0x20f0fe[_0x1f37(0x5f)])?_0x20f0fe[_0x1f37(0x60)](_0x1ca495,_0x1832bc):_0xf97332[_0x1f37(0x39)](_0x53f6dc['olshr']):Alert[_0x1f37(0x61)](_0x20f0fe[_0x1f37(0x62)],_0x1832bc,[{'text':'OK'}]);return;}if(_0x1ace32){enableLogging&&console[_0x1f37(0x39)](_0x20f0fe['hOncs']);try{if(_0x20f0fe[_0x1f37(0x63)](_0x20f0fe['gYaVi'],_0x20f0fe[_0x1f37(0x64)]))_0x20f0fe[_0x1f37(0x51)](_0x525824);else{const _0x4c25e2=await _0x1ace32();if(!_0x4c25e2){enableLogging&&(_0x20f0fe[_0x1f37(0x3d)](_0x20f0fe[_0x1f37(0x65)],_0x20f0fe[_0x1f37(0x66)])?console[_0x1f37(0x39)](_0x1f37(0x67)):(_0x402c6e[_0x1f37(0x44)](_0x53f6dc[_0x1f37(0x68)],_0x2ca6f0),_0x4d5f93&&_0x7af43e(_0x1f37(0x69)+_0x26e909[_0x1f37(0x42)])));return;}if(enableLogging){if(_0x20f0fe[_0x1f37(0x6a)](_0x20f0fe[_0x1f37(0x6b)],_0x20f0fe['cciOP']))console[_0x1f37(0x39)](_0x20f0fe['FWUwH']);else{const _0x6af5ae=_0x20f0fe['CxlBc'](_0x426aa3,_0x20f0fe[_0x1f37(0x6c)]);_0x4fa44b[_0x1f37(0x44)](_0x20f0fe[_0x1f37(0x5d)]);_0x55f52b?_0x104793(_0x6af5ae):Alert[_0x1f37(0x61)](_0x20f0fe[_0x1f37(0x62)],_0x6af5ae,[{'text':'OK'}]);return;}}}}catch(_0x507337){console['error'](_0x1f37(0x6d),_0x507337);_0x1ca495&&_0x20f0fe[_0x1f37(0x6e)](_0x1ca495,'Pre-check\x20failed:\x20'+_0x507337[_0x1f37(0x42)]);return;}}enableLogging&&console[_0x1f37(0x39)](_0x20f0fe[_0x1f37(0x6f)]);const _0x57467a=await _0x20f0fe[_0x1f37(0x70)](hasCredentials);if(_0x57467a){enableLogging&&console['log'](_0x20f0fe[_0x1f37(0x56)]);try{const _0x396c7f=await getCredentials();if(_0x396c7f&&_0x540fa3){if(_0x20f0fe[_0x1f37(0x71)](_0x20f0fe[_0x1f37(0x72)],_0x20f0fe[_0x1f37(0x73)]))_0x20f0fe[_0x1f37(0x3f)](_0xc0d103,'Failed\x20to\x20open\x20overlay:\x20'+_0x57753f[_0x1f37(0x42)]);else{const _0x3b4a26=API_CONFIG[_0x1f37(0x74)]+'/user/data',_0x11f9c5=_0x1f37(0x75);enableLogging&&console[_0x1f37(0x39)](_0x20f0fe[_0x1f37(0x76)]);_0x20f0fe[_0x1f37(0x77)](_0x540fa3,_0x3b4a26,_0x11f9c5,_0x396c7f);return;}}}catch(_0x45b66b){_0x20f0fe[_0x1f37(0x3d)](_0x20f0fe['besOz'],_0x20f0fe[_0x1f37(0x78)])?console[_0x1f37(0x79)](_0x20f0fe['iJKzw'],_0x45b66b):_0x212895[_0x1f37(0x39)](_0x1f37(0x53));}}enableLogging&&console[_0x1f37(0x39)](_0x1f37(0x7a)),_0x20f0fe[_0x1f37(0x7b)](_0xc9663f,!![]);}else _0x105666(![]);}catch(_0x191b3b){_0x20f0fe[_0x1f37(0x7c)](_0x20f0fe[_0x1f37(0x7d)],_0x20f0fe[_0x1f37(0x7d)])?_0x20f0fe[_0x1f37(0x60)](_0x450ead,_0x1f37(0x7e)+_0x55fc36[_0x1f37(0x42)]):(console[_0x1f37(0x44)](_0x20f0fe[_0x1f37(0x7f)],_0x191b3b),_0x1ca495&&_0x20f0fe[_0x1f37(0x33)](_0x1ca495,_0x1f37(0x69)+_0x191b3b[_0x1f37(0x42)]));}}else{const _0x1ae2b8={'width':_0x321880,'height':_0x2104c8,'backgroundColor':_0x328b3f,'borderRadius':_0x20f0fe[_0x1f37(0x57)](_0x5a9c27,_0x20f0fe['uPQGE'])?_0x20f0fe[_0x1f37(0x80)](_0xde2b07,0x2):0x8,'alignItems':_0x1f37(0xd),'justifyContent':_0x20f0fe[_0x1f37(0x81)],'flexDirection':_0x20f0fe[_0x1f37(0x82)],'opacity':_0x2941ba?0x1:0.6};return _0x2cb42e&&(_0x1ae2b8['borderWidth']=0x2,_0x1ae2b8['borderColor']=_0x1aff9c?_0x20f0fe['VejrT']:_0x20f0fe[_0x1f37(0x83)]),_0x1ae2b8;}},[_0x2843bc,_0x2cf840,_0x1ace32,enableLogging,_0x1ca495,_0x540fa3]),_0x50dc9d=_0x20f0fe[_0x1f37(0x84)](useCallback,_0x4bc9bf=>{const _0x190094={'OFRmK':_0x20f0fe[_0x1f37(0x85)],'ZyDOC':_0x20f0fe[_0x1f37(0x4c)],'zTCCQ':'1.\x20Check\x20that\x20your\x20API\x20key\x20is\x20correct\x20and\x20not\x20expired','gwycG':_0x20f0fe[_0x1f37(0x49)],'ztYIj':_0x20f0fe[_0x1f37(0x4d)],'CkVOW':_0x20f0fe[_0x1f37(0x86)],'ydnOT':_0x20f0fe[_0x1f37(0x48)]};if(_0x20f0fe[_0x1f37(0x87)](_0x20f0fe[_0x1f37(0x88)],_0x20f0fe[_0x1f37(0x88)]))console['log'](_0x1f37(0x89),_0x4bc9bf),_0x20f0fe[_0x1f37(0x8a)](_0xc9663f,![]),console['log'](_0x20f0fe[_0x1f37(0x8b)]),_0x20f0fe[_0x1f37(0x8c)](_0x4bc9bf,_0x540fa3)&&_0x540fa3(_0x4bc9bf[_0x1f37(0x8d)],_0x4bc9bf[_0x1f37(0x8e)],_0x4bc9bf[_0x1f37(0x8f)]);else{const _0x53e48f=_0x190094[_0x1f37(0x90)][_0x1f37(0x47)]('|');let _0x23e7c7=0x0;while(!![]){switch(_0x53e48f[_0x23e7c7++]){case'0':_0xbbc9a8[_0x1f37(0x4b)](_0x190094[_0x1f37(0x91)]);continue;case'1':_0x9cbce7['log'](_0x190094[_0x1f37(0x92)]);continue;case'2':_0x20b87d[_0x1f37(0x39)](_0x190094['gwycG']);continue;case'3':_0x4ab6aa[_0x1f37(0x39)](_0x190094[_0x1f37(0x93)]);continue;case'4':_0x2eda8b[_0x1f37(0x39)](_0x190094[_0x1f37(0x94)]);continue;case'5':_0x281cf8[_0x1f37(0x95)]();continue;case'6':_0x2a719a[_0x1f37(0x39)](_0x190094['ydnOT']);continue;}break;}}},[enableLogging,_0x540fa3]),_0x395c54=_0x20f0fe[_0x1f37(0x96)](useCallback,_0x3d72b2=>{const _0xacba98={'hyBdw':'SDK\x20Error','hirZL':function(_0x34e01a,_0x53bd29){return _0x20f0fe[_0x1f37(0x97)](_0x34e01a,_0x53bd29);},'lkKvv':_0x20f0fe[_0x1f37(0x40)]};_0x20f0fe[_0x1f37(0x7c)](_0x20f0fe[_0x1f37(0x98)],_0x20f0fe[_0x1f37(0x98)])?Alert[_0x1f37(0x61)](_0xacba98['hyBdw'],_0x1f37(0x99)+_0x3d59a1+_0x1f37(0x9a),[{'text':'OK'}]):(enableLogging&&(_0x20f0fe[_0x1f37(0x9b)](_0x20f0fe['yqAan'],_0x1f37(0x9c))?console[_0x1f37(0x39)](_0x1f37(0x9d),_0x3d72b2):(_0x12d69a(!![]),_0xacba98[_0x1f37(0x9e)](_0x1264f2,null),_0x35f0be&&(_0x552ca5['log']('✅\x20Onairos\x20SDK:\x20API\x20key\x20initialization\x20completed\x20successfully'),_0x21d177[_0x1f37(0x39)](_0xacba98[_0x1f37(0x9f)],{'environment':_0x473097,'enableLogging':_0x3247ca,'timeout':_0xf8797d,'retryAttempts':_0x8b7a,'apiKeyLength':_0x206c8e['length']})))),_0x20f0fe[_0x1f37(0x32)](_0xc9663f,![]),_0x1ca495&&(_0x20f0fe[_0x1f37(0xa0)](_0x1f37(0xa1),_0x1f37(0xa1))?_0x20f0fe[_0x1f37(0x4e)](_0x1ca495,_0x3d72b2):_0x2516a7[_0x1f37(0x79)]('⚠️\x20Failed\x20to\x20retrieve\x20existing\x20credentials:',_0x358a85)));},[enableLogging,_0x1ca495]);if(_0x20f0fe[_0x1f37(0xa2)](_0x2cf840,!_0x45b60c))return React[_0x1f37(0xa3)](View,{'style':styles[_0x1f37(0xa4)]},React[_0x1f37(0xa3)](TouchableOpacity,{'style':[styles[_0x1f37(0xa5)],{'backgroundColor':_0x20f0fe[_0x1f37(0xa6)]}],'onPress':()=>{_0x20f0fe[_0x1f37(0x9b)](_0x20f0fe[_0x1f37(0xa7)],'rIWaI')?Alert[_0x1f37(0x61)](_0x1f37(0xb),_0x1f37(0x99)+_0x2cf840+_0x1f37(0x9a),[{'text':'OK'}]):_0x3df4a7[_0x1f37(0x39)](_0x20f0fe[_0x1f37(0xa8)]);}},React[_0x1f37(0xa3)](Text,{'style':styles['errorButtonText']},_0x20f0fe['ajjco'])));if(_0x20f0fe[_0x1f37(0xa9)](_0x45b60c,!_0x2843bc))return React[_0x1f37(0xa3)](View,{'style':styles[_0x1f37(0xaa)]},React[_0x1f37(0xa3)](TouchableOpacity,{'style':[styles[_0x1f37(0xab)],{'backgroundColor':_0x20f0fe[_0x1f37(0xac)]}],'disabled':!![]},React['createElement'](Text,{'style':styles[_0x1f37(0xad)]},_0x20f0fe[_0x1f37(0xae)])));const _0x2e51b6=()=>{const _0x30a5b4={'width':buttonWidth,'height':buttonHeight,'backgroundColor':color,'borderRadius':_0x20f0fe[_0x1f37(0x63)](buttonType,_0x20f0fe[_0x1f37(0xaf)])?_0x20f0fe['Ogual'](buttonHeight,0x2):0x8,'alignItems':_0x20f0fe[_0x1f37(0x81)],'justifyContent':_0x20f0fe[_0x1f37(0x81)],'flexDirection':_0x1f37(0xe),'opacity':enabled?0x1:0.6};return hasStroke&&(_0x20f0fe[_0x1f37(0xb0)](_0x20f0fe[_0x1f37(0xb1)],_0x1f37(0xb2))?(_0x30a5b4['borderWidth']=0x2,_0x30a5b4[_0x1f37(0xb3)]=darkMode?_0x20f0fe['VejrT']:_0x20f0fe['RjbWi']):_0x10b63a['log'](_0x20f0fe[_0x1f37(0xb4)])),_0x30a5b4;},_0x100d9d=()=>{switch(buttonForm){case _0x1f37(0xb5):return _0x1f37(0xb6);default:return'Continue\x20with\x20Onairos';}};return React[_0x1f37(0xa3)](React[_0x1f37(0xb7)],null,React['createElement'](TouchableOpacity,{'style':_0x20f0fe[_0x1f37(0x51)](_0x2e51b6),'onPress':_0x551afb,'disabled':_0x20f0fe[_0x1f37(0xb8)](!enabled,_0x45b60c)||!_0x2843bc,'activeOpacity':0.8},React['createElement'](Image,{'source':BRAND_IMAGES['onairosLogoAlt'],'style':styles[_0x1f37(0xb9)],'resizeMode':_0x20f0fe[_0x1f37(0xba)]}),React[_0x1f37(0xa3)](Text,{'style':[styles['buttonText'],{'color':darkMode?'#000':_0x1f37(0xf)}]},_0x100d9d())),React[_0x1f37(0xa3)](UniversalOnboarding,{'visible':_0x1e13ae,'onClose':_0x50dc9d,'AppName':_0x5d8173,'requestData':_0x20f0fe['zMHsO'](_0x23ff9b,{}),'returnLink':_0xccef6b,'onComplete':_0x50dc9d,'embedd':![],'debug':debug,'testMode':testMode,'preferredPlatform':_0x4eba42}));});const styles=StyleSheet['create']({'button':{'flexDirection':_0x1f37(0xe),'alignItems':_0x1f37(0xd),'justifyContent':_0x1f37(0xd),'paddingVertical':0xc,'paddingHorizontal':0x10,'shadowColor':_0x1f37(0x10),'shadowOffset':{'width':0x0,'height':0x2},'shadowOpacity':0.1,'shadowRadius':0x4,'elevation':0x2},'buttonContent':{'flexDirection':_0x1f37(0xe),'alignItems':_0x1f37(0xd),'justifyContent':'center'},'logo':{'width':0x18,'height':0x18,'marginRight':0x8},'buttonText':{'fontSize':0x10,'fontWeight':_0x1f37(0xbb),'textAlign':'center'},'errorContainer':{'flex':0x1,'justifyContent':_0x1f37(0xd),'alignItems':'center'},'errorButton':{'padding':0x10,'borderRadius':0x8},'errorButtonText':{'fontSize':0x10,'fontWeight':'600','color':'#fff'},'loadingContainer':{'flex':0x1,'justifyContent':_0x1f37(0xd),'alignItems':'center'},'loadingButton':{'padding':0x10,'borderRadius':0x8},'loadingButtonText':{'fontSize':0x10,'fontWeight':_0x1f37(0xbb),'color':_0x1f37(0xf)}});