@onairos/react-native 3.4.1 → 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.
- package/README.md +62 -13
- package/lib/commonjs/api/index.js +9 -145
- package/lib/commonjs/assets/animations/loaderani.json +1 -0
- package/lib/commonjs/assets/animations/persona-animation.json +1 -0
- package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
- package/lib/commonjs/assets/icons/Gmail.png +0 -0
- package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/icons/Redditicon.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/icons/chatgpt.png +0 -0
- package/lib/commonjs/assets/icons/claude.png +0 -0
- package/lib/commonjs/assets/icons/gemini.png +0 -0
- package/lib/commonjs/assets/icons/grok.png +0 -0
- package/lib/commonjs/assets/images/Checkbox.svg +3 -0
- package/lib/commonjs/assets/images/EnochE.svg +19 -0
- package/lib/commonjs/assets/images/Enochicon1.png +0 -0
- package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
- package/lib/commonjs/assets/images/Facebookicon.png +0 -0
- package/lib/commonjs/assets/images/Gmail.png +0 -0
- package/lib/commonjs/assets/images/Googlelogo.png +0 -0
- package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
- package/lib/commonjs/assets/images/Personalityprofile.svg +3 -0
- package/lib/commonjs/assets/images/Personalitytraits.svg +3 -0
- package/lib/commonjs/assets/images/Redditicon.png +0 -0
- package/lib/commonjs/assets/images/Userpreferences.svg +3 -0
- package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/images/arrow.svg +20 -0
- package/lib/commonjs/assets/images/basicproficon.svg +43 -0
- package/lib/commonjs/assets/images/basicprofile.svg +3 -0
- package/lib/commonjs/assets/images/chatgpt.png +0 -0
- package/lib/commonjs/assets/images/checkmark.svg +4 -0
- package/lib/commonjs/assets/images/claude.png +0 -0
- package/lib/commonjs/assets/images/contentanalysis.svg +3 -0
- package/lib/commonjs/assets/images/contenticon.svg +23 -0
- package/lib/commonjs/assets/images/gemini.png +0 -0
- package/lib/commonjs/assets/images/grok.png +0 -0
- package/lib/commonjs/assets/images/persona1.png +0 -0
- package/lib/commonjs/assets/images/persona2.png +0 -0
- package/lib/commonjs/assets/images/persona3.png +0 -0
- package/lib/commonjs/assets/images/persona4.png +0 -0
- package/lib/commonjs/assets/images/persona5.png +0 -0
- package/lib/commonjs/assets/images/personalityicon.svg +18 -0
- package/lib/commonjs/assets/images/x-close.svg +3 -0
- package/lib/commonjs/components/BodyText.js +9 -0
- package/lib/commonjs/components/BrandMark.js +10 -0
- package/lib/commonjs/components/CodeInput.js +9 -0
- package/lib/commonjs/components/EmailInput.js +8 -0
- package/lib/commonjs/components/GoogleButton.js +9 -0
- package/lib/commonjs/components/HeadingGroup.js +9 -0
- package/lib/commonjs/components/LLMDataInputModal.js +14 -0
- package/lib/commonjs/components/ModalHeader.js +9 -0
- package/lib/commonjs/components/ModalSheet.js +9 -0
- package/lib/commonjs/components/Onairos.js +14 -374
- package/lib/commonjs/components/OnairosButton.js +13 -309
- package/lib/commonjs/components/OnairosSignInButton.js +12 -0
- package/lib/commonjs/components/Overlay.js +13 -483
- package/lib/commonjs/components/PersonaImage.js +10 -0
- package/lib/commonjs/components/PersonaLoadingScreen.js +12 -0
- package/lib/commonjs/components/PersonalizationConsentScreen.js +13 -0
- package/lib/commonjs/components/PinCreationScreen.js +12 -0
- package/lib/commonjs/components/PinInput.js +9 -302
- package/lib/commonjs/components/PlatformConnectorsStep.js +22 -0
- package/lib/commonjs/components/PlatformList.js +10 -137
- package/lib/commonjs/components/PlatformToggle.js +9 -0
- package/lib/commonjs/components/PrimaryButton.js +10 -0
- package/lib/commonjs/components/SignInMatchAnimation.js +9 -0
- package/lib/commonjs/components/SignInStep.js +12 -0
- package/lib/commonjs/components/UniversalOnboarding.js +29 -1702
- package/lib/commonjs/components/VerificationStep.js +11 -0
- package/lib/commonjs/components/WelcomeScreen.js +21 -0
- package/lib/commonjs/components/icons/Basicproficon.js +8 -0
- package/lib/commonjs/components/icons/Basicprofile.js +8 -0
- package/lib/commonjs/components/icons/Checkbox.js +8 -0
- package/lib/commonjs/components/icons/Checkmark.js +8 -0
- package/lib/commonjs/components/icons/Contentanalysis.js +8 -0
- package/lib/commonjs/components/icons/Contenticon.js +8 -0
- package/lib/commonjs/components/icons/EnochE.js +8 -0
- package/lib/commonjs/components/icons/Personalityicon.js +8 -0
- package/lib/commonjs/components/icons/Personalityprofile.js +8 -0
- package/lib/commonjs/components/icons/Personalitytraits.js +8 -0
- package/lib/commonjs/components/icons/Userpreferences.js +8 -0
- package/lib/commonjs/components/icons/index.js +17 -0
- package/lib/commonjs/components/onboarding/OAuthWebView.js +14 -827
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +10 -74
- package/lib/commonjs/components/onboarding/PinInput.js +10 -283
- package/lib/commonjs/components/onboarding/PlatformConnector.js +11 -249
- package/lib/commonjs/config/api.js +7 -0
- package/lib/commonjs/constants/index.js +7 -83
- package/lib/commonjs/context/AuthContext.js +10 -0
- package/lib/commonjs/hooks/useConnectedAccounts.js +9 -0
- package/lib/commonjs/hooks/useConnections.js +8 -159
- package/lib/commonjs/hooks/useCredentials.js +10 -177
- package/lib/commonjs/hooks/useUserConnections.js +10 -0
- package/lib/commonjs/index.js +35 -106
- package/lib/commonjs/services/apiClient.js +8 -0
- package/lib/commonjs/services/apiKeyService.js +9 -952
- package/lib/commonjs/services/authService.js +10 -0
- package/lib/commonjs/services/biometricPinService.js +8 -0
- package/lib/commonjs/services/chatGPTConversationExtractor.js +8 -0
- package/lib/commonjs/services/chatGPTConversationService.js +9 -0
- package/lib/commonjs/services/claudeConversationExtractor.js +8 -0
- package/lib/commonjs/services/claudeConversationService.js +9 -0
- package/lib/commonjs/services/connectedAccountsService.js +10 -0
- package/lib/commonjs/services/googleAuthService.js +11 -0
- package/lib/commonjs/services/imageCompressionService.js +7 -0
- package/lib/commonjs/services/jwtStorageService.js +7 -0
- package/lib/commonjs/services/linkedinDOMExtractor.js +7 -0
- package/lib/commonjs/services/linkedinProfileService.js +9 -0
- package/lib/commonjs/services/linkedinScrapingService.js +8 -0
- package/lib/commonjs/services/llmDataStorage.js +8 -0
- package/lib/commonjs/services/mobileTrainingService.js +8 -0
- package/lib/commonjs/services/oauthService.js +11 -390
- package/lib/commonjs/services/pinEncryptionService.js +8 -0
- package/lib/commonjs/services/pinStorageUtils.js +7 -0
- package/lib/commonjs/services/platformAuthService.js +12 -1067
- package/lib/commonjs/services/storageService.js +8 -0
- package/lib/commonjs/services/trainingApiHelpers.js +7 -0
- package/lib/commonjs/services/userConnectionsService.js +10 -0
- package/lib/commonjs/services/youtubeMigrationService.js +10 -0
- package/lib/commonjs/theme/index.js +7 -0
- package/lib/commonjs/types/ambient.d.js +1 -2
- package/lib/commonjs/types/declarations.d.js +1 -2
- package/lib/commonjs/types/index.js +1 -6
- package/lib/commonjs/types/node-fix.d.js +1 -2
- package/lib/commonjs/types/node-override.d.js +1 -2
- package/lib/commonjs/types/opacity.d.js +1 -2
- package/lib/commonjs/types.js +1 -14
- package/lib/commonjs/utils/Portal.js +8 -98
- package/lib/commonjs/utils/api.js +9 -129
- package/lib/commonjs/utils/assetRegistry.js +33 -0
- package/lib/commonjs/utils/auth.js +9 -111
- package/lib/commonjs/utils/crypto.js +8 -62
- package/lib/commonjs/utils/debugHelper.js +1 -64
- package/lib/commonjs/utils/encryption.js +7 -76
- package/lib/commonjs/utils/eventUtils.js +1 -0
- package/lib/commonjs/utils/haptics.js +9 -0
- package/lib/commonjs/utils/imagePreloader.js +1 -0
- package/lib/commonjs/utils/networkDiagnostics.js +8 -0
- package/lib/commonjs/utils/onairosApi.js +9 -350
- package/lib/commonjs/utils/programmaticFlow.js +9 -117
- package/lib/commonjs/utils/retryHelper.js +1 -220
- package/lib/commonjs/utils/secureStorage.js +10 -349
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -0
- package/lib/commonjs/utils/webviewScripts/claude.js +1 -0
- package/lib/commonjs/utils/webviewScripts/index.js +9 -0
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -0
- package/lib/module/api/index.js +1 -139
- package/lib/module/assets/animations/loaderani.json +1 -0
- package/lib/module/assets/animations/persona-animation.json +1 -0
- package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/module/assets/icons/Facebookicon.png +0 -0
- package/lib/module/assets/icons/Gmail.png +0 -0
- package/lib/module/assets/icons/Linkedinicon.png +0 -0
- package/lib/module/assets/icons/Redditicon.png +0 -0
- package/lib/module/assets/icons/YouTubeicon2.png +0 -0
- package/lib/module/assets/icons/YouTubeicon3.png +0 -0
- package/lib/module/assets/icons/chatgpt.png +0 -0
- package/lib/module/assets/icons/claude.png +0 -0
- package/lib/module/assets/icons/farcaster.png +0 -0
- package/lib/module/assets/icons/gemini.png +0 -0
- package/lib/module/assets/icons/grok.png +0 -0
- package/lib/module/assets/icons/instagram.png +0 -0
- package/lib/module/assets/icons/pinterest.png +0 -0
- package/lib/module/assets/icons/swerv_logo.png +0 -0
- package/lib/module/assets/icons/twitter.jpg +0 -0
- package/lib/module/assets/images/Checkbox.svg +3 -0
- package/lib/module/assets/images/EnochE.svg +19 -0
- package/lib/module/assets/images/Enochicon1.png +0 -0
- package/lib/module/assets/images/Face_ID_logo.png +0 -0
- package/lib/module/assets/images/Facebookicon.png +0 -0
- package/lib/module/assets/images/Gmail.png +0 -0
- package/lib/module/assets/images/Googlelogo.png +0 -0
- package/lib/module/assets/images/Linkedinicon.png +0 -0
- package/lib/module/assets/images/Onairoslogo.png +0 -0
- package/lib/module/assets/images/Personalityprofile.svg +3 -0
- package/lib/module/assets/images/Personalitytraits.svg +3 -0
- package/lib/module/assets/images/Redditicon.png +0 -0
- package/lib/module/assets/images/Userpreferences.svg +3 -0
- package/lib/module/assets/images/YouTubeicon3.png +0 -0
- package/lib/module/assets/images/arrow.svg +20 -0
- package/lib/module/assets/images/basicproficon.svg +43 -0
- package/lib/module/assets/images/basicprofile.svg +3 -0
- package/lib/module/assets/images/chatgpt.png +0 -0
- package/lib/module/assets/images/checkmark.svg +4 -0
- package/lib/module/assets/images/claude.png +0 -0
- package/lib/module/assets/images/contentanalysis.svg +3 -0
- package/lib/module/assets/images/contenticon.svg +23 -0
- package/lib/module/assets/images/gemini.png +0 -0
- package/lib/module/assets/images/grok.png +0 -0
- package/lib/module/assets/images/persona1.png +0 -0
- package/lib/module/assets/images/persona2.png +0 -0
- package/lib/module/assets/images/persona3.png +0 -0
- package/lib/module/assets/images/persona4.png +0 -0
- package/lib/module/assets/images/persona5.png +0 -0
- package/lib/module/assets/images/personalityicon.svg +18 -0
- package/lib/module/assets/images/x-close.svg +3 -0
- package/lib/module/components/BodyText.js +1 -0
- package/lib/module/components/BrandMark.js +1 -0
- package/lib/module/components/CodeInput.js +1 -0
- package/lib/module/components/EmailInput.js +1 -0
- package/lib/module/components/GoogleButton.js +1 -0
- package/lib/module/components/HeadingGroup.js +1 -0
- package/lib/module/components/LLMDataInputModal.js +8 -0
- package/lib/module/components/ModalHeader.js +1 -0
- package/lib/module/components/ModalSheet.js +1 -0
- package/lib/module/components/Onairos.js +1 -367
- package/lib/module/components/OnairosButton.js +1 -302
- package/lib/module/components/OnairosSignInButton.js +1 -0
- package/lib/module/components/Overlay.js +1 -474
- package/lib/module/components/PersonaImage.js +1 -0
- package/lib/module/components/PersonaLoadingScreen.js +1 -0
- package/lib/module/components/PersonalizationConsentScreen.js +1 -0
- package/lib/module/components/PinCreationScreen.js +1 -0
- package/lib/module/components/PinInput.js +1 -293
- package/lib/module/components/PlatformConnectorsStep.js +1 -0
- package/lib/module/components/PlatformList.js +1 -129
- package/lib/module/components/PlatformToggle.js +1 -0
- package/lib/module/components/PrimaryButton.js +1 -0
- package/lib/module/components/SignInMatchAnimation.js +1 -0
- package/lib/module/components/SignInStep.js +1 -0
- package/lib/module/components/UniversalOnboarding.js +1 -1693
- package/lib/module/components/VerificationStep.js +1 -0
- package/lib/module/components/WelcomeScreen.js +1 -0
- package/lib/module/components/icons/Basicproficon.js +1 -0
- package/lib/module/components/icons/Basicprofile.js +1 -0
- package/lib/module/components/icons/Checkbox.js +1 -0
- package/lib/module/components/icons/Checkmark.js +1 -0
- package/lib/module/components/icons/Contentanalysis.js +1 -0
- package/lib/module/components/icons/Contenticon.js +1 -0
- package/lib/module/components/icons/EnochE.js +1 -0
- package/lib/module/components/icons/Personalityicon.js +1 -0
- package/lib/module/components/icons/Personalityprofile.js +1 -0
- package/lib/module/components/icons/Personalitytraits.js +1 -0
- package/lib/module/components/icons/Userpreferences.js +1 -0
- package/lib/module/components/icons/index.js +1 -0
- package/lib/module/components/onboarding/OAuthWebView.js +1 -818
- package/lib/module/components/onboarding/OnboardingHeader.js +1 -66
- package/lib/module/components/onboarding/PinInput.js +1 -274
- package/lib/module/components/onboarding/PlatformConnector.js +1 -240
- package/lib/module/config/api.js +1 -0
- package/lib/module/constants/index.js +1 -77
- package/lib/module/context/AuthContext.js +1 -0
- package/lib/module/hooks/useConnectedAccounts.js +1 -0
- package/lib/module/hooks/useConnections.js +1 -152
- package/lib/module/hooks/useCredentials.js +6 -169
- package/lib/module/hooks/useUserConnections.js +1 -0
- package/lib/module/index.js +1 -32
- package/lib/module/services/apiClient.js +1 -0
- package/lib/module/services/apiKeyService.js +1 -925
- package/lib/module/services/authService.js +1 -0
- package/lib/module/services/biometricPinService.js +1 -0
- package/lib/module/services/chatGPTConversationExtractor.js +1 -0
- package/lib/module/services/chatGPTConversationService.js +1 -0
- package/lib/module/services/claudeConversationExtractor.js +1 -0
- package/lib/module/services/claudeConversationService.js +1 -0
- package/lib/module/services/connectedAccountsService.js +1 -0
- package/lib/module/services/googleAuthService.js +1 -0
- package/lib/module/services/imageCompressionService.js +1 -0
- package/lib/module/services/jwtStorageService.js +1 -0
- package/lib/module/services/linkedinDOMExtractor.js +1 -0
- package/lib/module/services/linkedinProfileService.js +1 -0
- package/lib/module/services/linkedinScrapingService.js +1 -0
- package/lib/module/services/llmDataStorage.js +1 -0
- package/lib/module/services/mobileTrainingService.js +1 -0
- package/lib/module/services/oauthService.js +1 -380
- package/lib/module/services/pinEncryptionService.js +7 -0
- package/lib/module/services/pinStorageUtils.js +1 -0
- package/lib/module/services/platformAuthService.js +1 -1041
- package/lib/module/services/storageService.js +1 -0
- package/lib/module/services/trainingApiHelpers.js +1 -0
- package/lib/module/services/userConnectionsService.js +1 -0
- package/lib/module/services/youtubeMigrationService.js +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/types.js +1 -10
- package/lib/module/utils/Portal.js +1 -90
- package/lib/module/utils/api.js +1 -117
- package/lib/module/utils/assetRegistry.js +33 -0
- package/lib/module/utils/auth.js +1 -99
- package/lib/module/utils/crypto.js +1 -54
- package/lib/module/utils/debugHelper.js +1 -54
- package/lib/module/utils/encryption.js +1 -67
- package/lib/module/utils/eventUtils.js +1 -0
- package/lib/module/utils/haptics.js +8 -0
- package/lib/module/utils/imagePreloader.js +1 -0
- package/lib/module/utils/networkDiagnostics.js +1 -0
- package/lib/module/utils/onairosApi.js +1 -333
- package/lib/module/utils/programmaticFlow.js +1 -111
- package/lib/module/utils/retryHelper.js +1 -211
- package/lib/module/utils/secureStorage.js +6 -330
- package/lib/module/utils/webviewScripts/chatgpt.js +1 -0
- package/lib/module/utils/webviewScripts/claude.js +1 -0
- package/lib/module/utils/webviewScripts/index.js +1 -0
- package/lib/module/utils/webviewScripts/linkedin.js +1 -0
- package/package.json +62 -39
- package/lib/commonjs/api/index.js.map +0 -1
- package/lib/commonjs/assets/images/email.png +0 -0
- package/lib/commonjs/assets/images/linkedin.png +0 -0
- package/lib/commonjs/assets/images/reddit.png +0 -0
- package/lib/commonjs/assets/images/youtube.png +0 -0
- package/lib/commonjs/components/DataRequestModal.js +0 -228
- package/lib/commonjs/components/DataRequestModal.js.map +0 -1
- package/lib/commonjs/components/DataRequestScreen.js +0 -329
- package/lib/commonjs/components/DataRequestScreen.js.map +0 -1
- package/lib/commonjs/components/EmailVerificationModal.js +0 -320
- package/lib/commonjs/components/EmailVerificationModal.js.map +0 -1
- package/lib/commonjs/components/Onairos.js.map +0 -1
- package/lib/commonjs/components/OnairosButton.js.map +0 -1
- package/lib/commonjs/components/Overlay.js.map +0 -1
- package/lib/commonjs/components/PinInput.js.map +0 -1
- package/lib/commonjs/components/PlatformList.js.map +0 -1
- package/lib/commonjs/components/TrainingModal.js +0 -717
- package/lib/commonjs/components/TrainingModal.js.map +0 -1
- package/lib/commonjs/components/UniversalOnboarding.js.map +0 -1
- package/lib/commonjs/components/UniversalOnboarding.tsx.new +0 -455
- package/lib/commonjs/components/onboarding/OAuthWebView.js.map +0 -1
- package/lib/commonjs/components/onboarding/OnboardingHeader.js.map +0 -1
- package/lib/commonjs/components/onboarding/PinInput.js.map +0 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js.map +0 -1
- package/lib/commonjs/components/screens/ConnectorScreen.js +0 -146
- package/lib/commonjs/components/screens/ConnectorScreen.js.map +0 -1
- package/lib/commonjs/components/screens/LoadingScreen.js +0 -91
- package/lib/commonjs/components/screens/LoadingScreen.js.map +0 -1
- package/lib/commonjs/components/screens/PinCreationScreen.js +0 -61
- package/lib/commonjs/components/screens/PinCreationScreen.js.map +0 -1
- package/lib/commonjs/constants/index.js.map +0 -1
- package/lib/commonjs/hooks/useConnections.js.map +0 -1
- package/lib/commonjs/hooks/useCredentials.js.map +0 -1
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/services/apiKeyService.js.map +0 -1
- package/lib/commonjs/services/oauthService.js.map +0 -1
- package/lib/commonjs/services/platformAuthService.js.map +0 -1
- package/lib/commonjs/types/ambient.d.js.map +0 -1
- package/lib/commonjs/types/declarations.d.js.map +0 -1
- package/lib/commonjs/types/index.d.js.map +0 -1
- package/lib/commonjs/types/index.js.map +0 -1
- package/lib/commonjs/types/node-fix.d.js.map +0 -1
- package/lib/commonjs/types/node-override.d.js.map +0 -1
- package/lib/commonjs/types/opacity.d.js.map +0 -1
- package/lib/commonjs/types/types.d.js.map +0 -1
- package/lib/commonjs/types.js.map +0 -1
- package/lib/commonjs/utils/Portal.js.map +0 -1
- package/lib/commonjs/utils/api.js.map +0 -1
- package/lib/commonjs/utils/auth.js.map +0 -1
- package/lib/commonjs/utils/crypto.js.map +0 -1
- package/lib/commonjs/utils/debugHelper.js.map +0 -1
- package/lib/commonjs/utils/encryption.js.map +0 -1
- package/lib/commonjs/utils/onairosApi.js.map +0 -1
- package/lib/commonjs/utils/programmaticFlow.js.map +0 -1
- package/lib/commonjs/utils/retryHelper.js.map +0 -1
- package/lib/commonjs/utils/secureStorage.js.map +0 -1
- package/lib/module/api/index.js.map +0 -1
- package/lib/module/assets/images/email.png +0 -0
- package/lib/module/assets/images/linkedin.png +0 -0
- package/lib/module/assets/images/reddit.png +0 -0
- package/lib/module/assets/images/youtube.png +0 -0
- package/lib/module/components/DataRequestModal.js +0 -220
- package/lib/module/components/DataRequestModal.js.map +0 -1
- package/lib/module/components/DataRequestScreen.js +0 -321
- package/lib/module/components/DataRequestScreen.js.map +0 -1
- package/lib/module/components/EmailVerificationModal.js +0 -311
- package/lib/module/components/EmailVerificationModal.js.map +0 -1
- package/lib/module/components/Onairos.js.map +0 -1
- package/lib/module/components/OnairosButton.js.map +0 -1
- package/lib/module/components/Overlay.js.map +0 -1
- package/lib/module/components/PinInput.js.map +0 -1
- package/lib/module/components/PlatformList.js.map +0 -1
- package/lib/module/components/TrainingModal.js +0 -708
- package/lib/module/components/TrainingModal.js.map +0 -1
- package/lib/module/components/UniversalOnboarding.js.map +0 -1
- package/lib/module/components/UniversalOnboarding.tsx.new +0 -455
- package/lib/module/components/onboarding/OAuthWebView.js.map +0 -1
- package/lib/module/components/onboarding/OnboardingHeader.js.map +0 -1
- package/lib/module/components/onboarding/PinInput.js.map +0 -1
- package/lib/module/components/onboarding/PlatformConnector.js.map +0 -1
- package/lib/module/components/screens/ConnectorScreen.js +0 -138
- package/lib/module/components/screens/ConnectorScreen.js.map +0 -1
- package/lib/module/components/screens/LoadingScreen.js +0 -83
- package/lib/module/components/screens/LoadingScreen.js.map +0 -1
- package/lib/module/components/screens/PinCreationScreen.js +0 -53
- package/lib/module/components/screens/PinCreationScreen.js.map +0 -1
- package/lib/module/constants/index.js.map +0 -1
- package/lib/module/hooks/useConnections.js.map +0 -1
- package/lib/module/hooks/useCredentials.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/services/apiKeyService.js.map +0 -1
- package/lib/module/services/oauthService.js.map +0 -1
- package/lib/module/services/platformAuthService.js.map +0 -1
- package/lib/module/types/ambient.d.js.map +0 -1
- package/lib/module/types/declarations.d.js.map +0 -1
- package/lib/module/types/index.d.js.map +0 -1
- package/lib/module/types/index.js.map +0 -1
- package/lib/module/types/node-fix.d.js.map +0 -1
- package/lib/module/types/node-override.d.js.map +0 -1
- package/lib/module/types/opacity.d.js.map +0 -1
- package/lib/module/types/types.d.js.map +0 -1
- package/lib/module/types.js.map +0 -1
- package/lib/module/utils/Portal.js.map +0 -1
- package/lib/module/utils/api.js.map +0 -1
- package/lib/module/utils/auth.js.map +0 -1
- package/lib/module/utils/crypto.js.map +0 -1
- package/lib/module/utils/debugHelper.js.map +0 -1
- package/lib/module/utils/encryption.js.map +0 -1
- package/lib/module/utils/onairosApi.js.map +0 -1
- package/lib/module/utils/programmaticFlow.js.map +0 -1
- package/lib/module/utils/retryHelper.js.map +0 -1
- package/lib/module/utils/secureStorage.js.map +0 -1
- package/lib/typescript/api/index.d.ts +0 -8
- package/lib/typescript/api/index.d.ts.map +0 -1
- package/lib/typescript/components/DataRequestModal.d.ts +0 -11
- package/lib/typescript/components/DataRequestModal.d.ts.map +0 -1
- package/lib/typescript/components/DataRequestScreen.d.ts +0 -11
- package/lib/typescript/components/DataRequestScreen.d.ts.map +0 -1
- package/lib/typescript/components/EmailVerificationModal.d.ts +0 -11
- package/lib/typescript/components/EmailVerificationModal.d.ts.map +0 -1
- package/lib/typescript/components/Onairos.d.ts +0 -4
- package/lib/typescript/components/Onairos.d.ts.map +0 -1
- package/lib/typescript/components/OnairosButton.d.ts +0 -12
- package/lib/typescript/components/OnairosButton.d.ts.map +0 -1
- package/lib/typescript/components/Overlay.d.ts +0 -4
- package/lib/typescript/components/Overlay.d.ts.map +0 -1
- package/lib/typescript/components/PinInput.d.ts +0 -4
- package/lib/typescript/components/PinInput.d.ts.map +0 -1
- package/lib/typescript/components/PlatformList.d.ts +0 -4
- package/lib/typescript/components/PlatformList.d.ts.map +0 -1
- package/lib/typescript/components/TrainingModal.d.ts +0 -4
- package/lib/typescript/components/TrainingModal.d.ts.map +0 -1
- package/lib/typescript/components/UniversalOnboarding.d.ts +0 -4
- package/lib/typescript/components/UniversalOnboarding.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts +0 -10
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +0 -11
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/PinInput.d.ts +0 -4
- package/lib/typescript/components/onboarding/PinInput.d.ts.map +0 -1
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts +0 -13
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts.map +0 -1
- package/lib/typescript/components/screens/ConnectorScreen.d.ts +0 -9
- package/lib/typescript/components/screens/ConnectorScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/LoadingScreen.d.ts +0 -9
- package/lib/typescript/components/screens/LoadingScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/PinCreationScreen.d.ts +0 -10
- package/lib/typescript/components/screens/PinCreationScreen.d.ts.map +0 -1
- package/lib/typescript/constants/index.d.ts +0 -53
- package/lib/typescript/constants/index.d.ts.map +0 -1
- package/lib/typescript/hooks/useConnections.d.ts +0 -9
- package/lib/typescript/hooks/useConnections.d.ts.map +0 -1
- package/lib/typescript/hooks/useCredentials.d.ts +0 -9
- package/lib/typescript/hooks/useCredentials.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -18
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/services/apiKeyService.d.ts +0 -132
- package/lib/typescript/services/apiKeyService.d.ts.map +0 -1
- package/lib/typescript/services/oauthService.d.ts +0 -50
- package/lib/typescript/services/oauthService.d.ts.map +0 -1
- package/lib/typescript/services/platformAuthService.d.ts +0 -144
- package/lib/typescript/services/platformAuthService.d.ts.map +0 -1
- package/lib/typescript/types/index.d.ts +0 -231
- package/lib/typescript/types/index.d.ts.map +0 -1
- package/lib/typescript/types.d.ts +0 -270
- package/lib/typescript/types.d.ts.map +0 -1
- package/lib/typescript/utils/Portal.d.ts +0 -14
- package/lib/typescript/utils/Portal.d.ts.map +0 -1
- package/lib/typescript/utils/api.d.ts +0 -6
- package/lib/typescript/utils/api.d.ts.map +0 -1
- package/lib/typescript/utils/auth.d.ts +0 -6
- package/lib/typescript/utils/auth.d.ts.map +0 -1
- package/lib/typescript/utils/crypto.d.ts +0 -4
- package/lib/typescript/utils/crypto.d.ts.map +0 -1
- package/lib/typescript/utils/debugHelper.d.ts +0 -29
- package/lib/typescript/utils/debugHelper.d.ts.map +0 -1
- package/lib/typescript/utils/encryption.d.ts +0 -19
- package/lib/typescript/utils/encryption.d.ts.map +0 -1
- package/lib/typescript/utils/onairosApi.d.ts +0 -87
- package/lib/typescript/utils/onairosApi.d.ts.map +0 -1
- package/lib/typescript/utils/programmaticFlow.d.ts +0 -23
- package/lib/typescript/utils/programmaticFlow.d.ts.map +0 -1
- package/lib/typescript/utils/retryHelper.d.ts +0 -69
- package/lib/typescript/utils/retryHelper.d.ts.map +0 -1
- package/lib/typescript/utils/secureStorage.d.ts +0 -94
- package/lib/typescript/utils/secureStorage.d.ts.map +0 -1
- package/src/api/index.ts +0 -111
- package/src/assets/images/email.png +0 -0
- package/src/assets/images/linkedin.png +0 -0
- package/src/assets/images/onairos_logo.png +0 -0
- package/src/assets/images/reddit.png +0 -0
- package/src/assets/images/youtube.png +0 -0
- package/src/components/DataRequestModal.tsx +0 -227
- package/src/components/DataRequestScreen.tsx +0 -356
- package/src/components/EmailVerificationModal.tsx +0 -364
- package/src/components/Onairos.tsx +0 -425
- package/src/components/OnairosButton.tsx +0 -359
- package/src/components/Overlay.tsx +0 -506
- package/src/components/PinInput.tsx +0 -343
- package/src/components/PlatformList.tsx +0 -145
- package/src/components/TrainingModal.tsx +0 -737
- package/src/components/UniversalOnboarding.tsx +0 -1839
- package/src/components/UniversalOnboarding.tsx.new +0 -455
- package/src/components/onboarding/OAuthWebView.tsx +0 -838
- package/src/components/onboarding/OnboardingHeader.tsx +0 -70
- package/src/components/onboarding/PinInput.tsx +0 -356
- package/src/components/onboarding/PlatformConnector.tsx +0 -302
- package/src/components/screens/ConnectorScreen.tsx +0 -153
- package/src/components/screens/LoadingScreen.tsx +0 -100
- package/src/components/screens/PinCreationScreen.tsx +0 -67
- package/src/constants/index.ts +0 -83
- package/src/hooks/useConnections.ts +0 -163
- package/src/hooks/useCredentials.ts +0 -175
- package/src/index.js +0 -14
- package/src/index.ts +0 -50
- package/src/services/SDK_API_KEY_VALIDATION.md +0 -421
- package/src/services/apiKeyService.ts +0 -984
- package/src/services/oauthService.ts +0 -412
- package/src/services/platformAuthService.ts +0 -1113
- package/src/types/ambient.d.ts +0 -29
- package/src/types/declarations.d.ts +0 -26
- package/src/types/index.d.ts +0 -274
- package/src/types/index.ts +0 -244
- package/src/types/node-fix.d.ts +0 -19
- package/src/types/node-override.d.ts +0 -24
- package/src/types/opacity.d.ts +0 -16
- package/src/types/types.d.ts +0 -18
- package/src/types.ts +0 -298
- package/src/utils/Portal.tsx +0 -83
- package/src/utils/api.js +0 -112
- package/src/utils/auth.js +0 -104
- package/src/utils/crypto.js +0 -60
- package/src/utils/debugHelper.ts +0 -53
- package/src/utils/encryption.ts +0 -69
- package/src/utils/onairosApi.ts +0 -391
- package/src/utils/programmaticFlow.ts +0 -113
- package/src/utils/retryHelper.ts +0 -275
- package/src/utils/secureStorage.ts +0 -361
- package/types/index.d.ts +0 -218
- package/types/node-env.d.ts +0 -15
- /package/{src/assets/images → lib/commonjs/assets/icons}/farcaster.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/instagram.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/pinterest.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/swerv_logo.png +0 -0
- /package/{src/assets/images → lib/commonjs/assets/icons}/twitter.jpg +0 -0
|
@@ -1,309 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
-
/**
|
|
15
|
-
* OnairosButton Component - A sign-in button similar to Google/Apple sign-in
|
|
16
|
-
*/
|
|
17
|
-
const OnairosButton = exports.OnairosButton = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
18
|
-
AppName,
|
|
19
|
-
appIcon,
|
|
20
|
-
requestData,
|
|
21
|
-
returnLink,
|
|
22
|
-
prefillUrl,
|
|
23
|
-
buttonType = 'normal',
|
|
24
|
-
buttonWidth = 180,
|
|
25
|
-
buttonHeight = 48,
|
|
26
|
-
hasStroke = false,
|
|
27
|
-
enabled = true,
|
|
28
|
-
buttonForm = 'default',
|
|
29
|
-
auto = false,
|
|
30
|
-
onRejection,
|
|
31
|
-
onResolved,
|
|
32
|
-
preCheck,
|
|
33
|
-
color,
|
|
34
|
-
swerv = false,
|
|
35
|
-
debug = false,
|
|
36
|
-
preferredPlatform,
|
|
37
|
-
testMode = false,
|
|
38
|
-
darkMode = false
|
|
39
|
-
}, ref) => {
|
|
40
|
-
const [showOnboarding, setShowOnboarding] = (0, _react.useState)(false);
|
|
41
|
-
const [showOverlay, setShowOverlay] = (0, _react.useState)(false);
|
|
42
|
-
const [storedCredentials, setStoredCredentials] = (0, _react.useState)(null);
|
|
43
|
-
const [isLoading, setIsLoading] = (0, _react.useState)(false);
|
|
44
|
-
const [isPressed, setIsPressed] = (0, _react.useState)(false);
|
|
45
|
-
|
|
46
|
-
// Expose methods via ref
|
|
47
|
-
(0, _react.useImperativeHandle)(ref, () => ({
|
|
48
|
-
trigger: async () => {
|
|
49
|
-
await handlePress();
|
|
50
|
-
},
|
|
51
|
-
reset: async () => {
|
|
52
|
-
await (0, _secureStorage.deleteCredentials)();
|
|
53
|
-
}
|
|
54
|
-
}));
|
|
55
|
-
|
|
56
|
-
// Compute button text based on buttonForm
|
|
57
|
-
const getButtonText = () => {
|
|
58
|
-
if (buttonForm === 'connect' || buttonForm === 'signup') {
|
|
59
|
-
return 'Connect with Onairos';
|
|
60
|
-
} else {
|
|
61
|
-
return 'Sign in with Onairos';
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// Calculate background color based on props and state
|
|
66
|
-
const getBackgroundColor = () => {
|
|
67
|
-
if (!enabled) {
|
|
68
|
-
return darkMode ? '#3A3A3A' : '#e0e0e0';
|
|
69
|
-
}
|
|
70
|
-
if (isPressed) {
|
|
71
|
-
return color ? typeof color === 'string' ? `${color}80` : color : darkMode ? '#32323280' : '#f5f5f580';
|
|
72
|
-
}
|
|
73
|
-
return color || (darkMode ? '#2A2A2A' : '#ffffff');
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// Calculate text color based on background luminance
|
|
77
|
-
const getTextColor = () => {
|
|
78
|
-
if (!enabled) {
|
|
79
|
-
return darkMode ? '#777777' : '#AAAAAA';
|
|
80
|
-
}
|
|
81
|
-
if (darkMode) {
|
|
82
|
-
return '#FFFFFF';
|
|
83
|
-
}
|
|
84
|
-
const bgColor = getBackgroundColor();
|
|
85
|
-
// Simple luminance check
|
|
86
|
-
return bgColor === '#ffffff' || bgColor === '#f5f5f580' || bgColor.includes('#f') ? '#000000' : '#FFFFFF';
|
|
87
|
-
};
|
|
88
|
-
const handlePress = async () => {
|
|
89
|
-
if (!enabled || isLoading) return;
|
|
90
|
-
setIsLoading(true);
|
|
91
|
-
try {
|
|
92
|
-
// If auto is enabled, make API call automatically and return result
|
|
93
|
-
if (auto) {
|
|
94
|
-
try {
|
|
95
|
-
// Check if credentials exist
|
|
96
|
-
const hasStoredCreds = await (0, _secureStorage.hasCredentials)();
|
|
97
|
-
if (hasStoredCreds) {
|
|
98
|
-
const credentials = await (0, _secureStorage.getCredentials)();
|
|
99
|
-
if (!credentials || !credentials.username) {
|
|
100
|
-
throw new Error('Invalid credentials');
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Call the API directly and return result
|
|
104
|
-
const result = await fetch(`https://api2.onairos.uk/api/inference`, {
|
|
105
|
-
method: 'POST',
|
|
106
|
-
headers: {
|
|
107
|
-
'Content-Type': 'application/json',
|
|
108
|
-
'Authorization': `Bearer ${credentials.userPin || ''}`
|
|
109
|
-
},
|
|
110
|
-
body: JSON.stringify({
|
|
111
|
-
username: credentials.username,
|
|
112
|
-
modelKey: credentials.userPin || '',
|
|
113
|
-
requestData: requestData || {},
|
|
114
|
-
appName: AppName
|
|
115
|
-
})
|
|
116
|
-
}).then(res => res.json());
|
|
117
|
-
if (result && result.success) {
|
|
118
|
-
if (onResolved) {
|
|
119
|
-
onResolved(result.apiUrl || 'https://api2.onairos.uk', result.token || '', result.data || {});
|
|
120
|
-
}
|
|
121
|
-
setIsLoading(false);
|
|
122
|
-
return;
|
|
123
|
-
} else {
|
|
124
|
-
throw new Error((result === null || result === void 0 ? void 0 : result.error) || 'API call failed');
|
|
125
|
-
}
|
|
126
|
-
} else {
|
|
127
|
-
// No credentials, proceed with normal flow
|
|
128
|
-
console.log('No credentials found, proceeding with normal flow');
|
|
129
|
-
}
|
|
130
|
-
} catch (automaticError) {
|
|
131
|
-
console.error('Automatic API call error:', automaticError);
|
|
132
|
-
// Fall back to normal flow on error
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
if (preCheck) {
|
|
136
|
-
const shouldProceed = await preCheck();
|
|
137
|
-
if (!shouldProceed) {
|
|
138
|
-
onRejection === null || onRejection === void 0 || onRejection('Precheck validation failed');
|
|
139
|
-
setIsLoading(false);
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// Check if credentials exist
|
|
145
|
-
const hasStoredCreds = await (0, _secureStorage.hasCredentials)();
|
|
146
|
-
if (hasStoredCreds) {
|
|
147
|
-
// If credentials exist, fetch them and verify
|
|
148
|
-
const credentials = await (0, _secureStorage.getCredentials)();
|
|
149
|
-
if (!credentials || !credentials.username) {
|
|
150
|
-
// Invalid credentials, clear and start fresh
|
|
151
|
-
await (0, _secureStorage.deleteCredentials)();
|
|
152
|
-
setShowOnboarding(true);
|
|
153
|
-
setIsLoading(false);
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
try {
|
|
157
|
-
// Validate credentials with server
|
|
158
|
-
const isValid = await _api.onairosApi.validateCredentials(credentials.username);
|
|
159
|
-
if (!isValid) {
|
|
160
|
-
// Clear invalid credentials
|
|
161
|
-
await (0, _secureStorage.deleteCredentials)();
|
|
162
|
-
setShowOnboarding(true);
|
|
163
|
-
setIsLoading(false);
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// Store and display overlay with valid credentials
|
|
168
|
-
setStoredCredentials(credentials);
|
|
169
|
-
setShowOverlay(true);
|
|
170
|
-
} catch (validationError) {
|
|
171
|
-
console.warn('Validation error, proceeding to onboarding:', validationError);
|
|
172
|
-
setShowOnboarding(true);
|
|
173
|
-
}
|
|
174
|
-
} else {
|
|
175
|
-
// If no credentials, show onboarding
|
|
176
|
-
setShowOnboarding(true);
|
|
177
|
-
}
|
|
178
|
-
} catch (error) {
|
|
179
|
-
console.error('Error during button press flow:', error);
|
|
180
|
-
// Only call onRejection for actual errors, not when user cancels
|
|
181
|
-
// The onboarding component will handle user cancellation separately
|
|
182
|
-
setShowOnboarding(true);
|
|
183
|
-
} finally {
|
|
184
|
-
setIsLoading(false);
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
const handleOnboardingComplete = (0, _react.useCallback)((apiUrl, token, data) => {
|
|
188
|
-
setShowOnboarding(false);
|
|
189
|
-
if (onResolved) {
|
|
190
|
-
onResolved(apiUrl, token, data);
|
|
191
|
-
}
|
|
192
|
-
}, [onResolved]);
|
|
193
|
-
const handleOverlayResolved = (0, _react.useCallback)((apiUrl, token, data) => {
|
|
194
|
-
setShowOverlay(false);
|
|
195
|
-
if (onResolved) {
|
|
196
|
-
onResolved(apiUrl, token, data);
|
|
197
|
-
}
|
|
198
|
-
}, [onResolved]);
|
|
199
|
-
|
|
200
|
-
// Calculate button styles based on props
|
|
201
|
-
const buttonStyle = [styles.button, buttonType === 'pill' && styles.pillButton, hasStroke && styles.strokedButton, {
|
|
202
|
-
width: buttonWidth,
|
|
203
|
-
height: buttonHeight,
|
|
204
|
-
backgroundColor: getBackgroundColor(),
|
|
205
|
-
borderColor: darkMode ? '#555555' : '#000000'
|
|
206
|
-
}, swerv && styles.swervButton, !enabled && styles.disabledButton].filter(Boolean);
|
|
207
|
-
|
|
208
|
-
// Calculate button text color
|
|
209
|
-
const buttonTextColor = getTextColor();
|
|
210
|
-
|
|
211
|
-
// Render components
|
|
212
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
213
|
-
style: buttonStyle,
|
|
214
|
-
onPress: handlePress,
|
|
215
|
-
disabled: !enabled || isLoading,
|
|
216
|
-
accessibilityLabel: `Sign in with Onairos`,
|
|
217
|
-
onPressIn: () => setIsPressed(true),
|
|
218
|
-
onPressOut: () => setIsPressed(false)
|
|
219
|
-
}, isLoading ? /*#__PURE__*/_react.default.createElement(_reactNative.ActivityIndicator, {
|
|
220
|
-
size: "small",
|
|
221
|
-
color: buttonTextColor
|
|
222
|
-
}) : /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
223
|
-
style: styles.buttonContent
|
|
224
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
|
|
225
|
-
source: require('../assets/images/onairos_logo.png'),
|
|
226
|
-
style: styles.logo,
|
|
227
|
-
resizeMode: "contain"
|
|
228
|
-
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
229
|
-
style: [styles.buttonText, {
|
|
230
|
-
color: buttonTextColor
|
|
231
|
-
}]
|
|
232
|
-
}, getButtonText()))), showOnboarding && /*#__PURE__*/_react.default.createElement(_UniversalOnboarding.UniversalOnboarding, {
|
|
233
|
-
visible: showOnboarding,
|
|
234
|
-
onClose: () => {
|
|
235
|
-
setShowOnboarding(false);
|
|
236
|
-
onRejection === null || onRejection === void 0 || onRejection('User closed onboarding');
|
|
237
|
-
},
|
|
238
|
-
AppName: AppName,
|
|
239
|
-
appIcon: appIcon,
|
|
240
|
-
requestData: requestData,
|
|
241
|
-
returnLink: returnLink || '',
|
|
242
|
-
onComplete: handleOnboardingComplete,
|
|
243
|
-
debug: debug,
|
|
244
|
-
testMode: testMode,
|
|
245
|
-
preferredPlatform: preferredPlatform
|
|
246
|
-
}), showOverlay && storedCredentials && /*#__PURE__*/_react.default.createElement(_Overlay.Overlay, {
|
|
247
|
-
data: requestData || {},
|
|
248
|
-
username: storedCredentials.username,
|
|
249
|
-
modelKey: storedCredentials.userPin || '',
|
|
250
|
-
onResolved: handleOverlayResolved,
|
|
251
|
-
appName: AppName,
|
|
252
|
-
darkMode: darkMode
|
|
253
|
-
}));
|
|
254
|
-
});
|
|
255
|
-
const styles = _reactNative.StyleSheet.create({
|
|
256
|
-
button: {
|
|
257
|
-
flexDirection: 'row',
|
|
258
|
-
alignItems: 'center',
|
|
259
|
-
justifyContent: 'center',
|
|
260
|
-
paddingVertical: 12,
|
|
261
|
-
paddingHorizontal: 16,
|
|
262
|
-
borderRadius: 8,
|
|
263
|
-
shadowColor: '#000',
|
|
264
|
-
shadowOffset: {
|
|
265
|
-
width: 0,
|
|
266
|
-
height: 2
|
|
267
|
-
},
|
|
268
|
-
shadowOpacity: 0.1,
|
|
269
|
-
shadowRadius: 4,
|
|
270
|
-
elevation: 2
|
|
271
|
-
},
|
|
272
|
-
buttonContent: {
|
|
273
|
-
flexDirection: 'row',
|
|
274
|
-
alignItems: 'center',
|
|
275
|
-
justifyContent: 'center'
|
|
276
|
-
},
|
|
277
|
-
logo: {
|
|
278
|
-
width: 24,
|
|
279
|
-
height: 24,
|
|
280
|
-
marginRight: 8
|
|
281
|
-
},
|
|
282
|
-
pillButton: {
|
|
283
|
-
borderRadius: 24
|
|
284
|
-
},
|
|
285
|
-
strokedButton: {
|
|
286
|
-
backgroundColor: 'transparent',
|
|
287
|
-
borderWidth: 1
|
|
288
|
-
},
|
|
289
|
-
swervButton: {
|
|
290
|
-
transform: [{
|
|
291
|
-
rotate: '0deg'
|
|
292
|
-
}]
|
|
293
|
-
},
|
|
294
|
-
disabledButton: {
|
|
295
|
-
opacity: 0.6
|
|
296
|
-
},
|
|
297
|
-
buttonText: {
|
|
298
|
-
fontSize: 16,
|
|
299
|
-
fontWeight: '600',
|
|
300
|
-
textAlign: 'center'
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
// Add displayName for better debugging
|
|
305
|
-
OnairosButton.displayName = 'OnairosButton';
|
|
306
|
-
|
|
307
|
-
// Ensure the component is properly exported
|
|
308
|
-
var _default = exports.default = OnairosButton;
|
|
309
|
-
//# sourceMappingURL=OnairosButton.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
// Onairos SDK - Asset Registry (auto-generated)
|
|
3
|
+
var __ONAIROS_REQ_REGISTRY__ = [
|
|
4
|
+
require("react"),
|
|
5
|
+
require("react-native"),
|
|
6
|
+
require("react-native-linear-gradient"),
|
|
7
|
+
require("./UniversalOnboarding"),
|
|
8
|
+
require("./WelcomeScreen"),
|
|
9
|
+
require("../services/apiKeyService"),
|
|
10
|
+
require("../utils/assetRegistry")
|
|
11
|
+
];
|
|
12
|
+
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
13
|
+
Object['defineProperty'](exports,_0x43ef(0x0),{'value':!![]}),exports[_0x43ef(0x1)]=exports[_0x43ef(0x2)]=void 0x0;var _react=_interopRequireWildcard(__ONAIROS_REQ_FUNC__(0x0)),_reactNative=__ONAIROS_REQ_FUNC__(0x1),_reactNativeLinearGradient=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x2)),_UniversalOnboarding=__ONAIROS_REQ_FUNC__(0x3),_WelcomeScreen=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x4)),_apiKeyService=__ONAIROS_REQ_FUNC__(0x5),_assetRegistry=__ONAIROS_REQ_FUNC__(0x6);function _0x4616(){const _0x361988=['__esModule','default','OnairosButton','vFTOx','nOmcI','function','get','set','lKMIs','hasOwnProperty','getOwnPropertyDescriptor','oDLlv','Dimensions','window','forwardRef','normal','#1BA9D4','right','black','[OnairosButton]\x20LogEffect:\x20showOnboarding\x20state\x20changed\x20to:','[OnairosButton]\x20Error\x20in\x20handlePress:','Connect\x20Onairos','Sign\x20up\x20with\x20Onairos','[OnairosButton]\x20handlePress\x20called.','Onairos\x20SDK\x20not\x20initialized.\x20Developers\x20must\x20call\x20initializeApiKey()\x20with\x20a\x20valid\x20API\x20key\x20before\x20using\x20SDK\x20components.\x20Get\x20your\x20API\x20key\x20from\x20https://dashboard.onairos.uk','❌\x20[OnairosButton]\x20SDK\x20NOT\x20INITIALIZED:','XWOCu','The\x20Onairos\x20SDK\x20requires\x20initialization\x20with\x20a\x20valid\x20API\x20key.\x0a\x0aDevelopers:\x20Please\x20call\x20initializeApiKey()\x20before\x20using\x20OnairosButton.','glCZm','[OnairosButton]\x20SDK\x20initialized\x20with\x20API\x20key:','...','pieYz','qOqOk','SRkeX','[OnairosButton]\x20handlePress:\x20Setting\x20showOnboarding\x20to\x20true.','jgppD','Unknown\x20error','connect','login','Tfced','[OnairosButton]\x20handleOnboardingComplete:\x20Setting\x20showOnboarding\x20to\x20false.','[OnairosButton]\x20Rendering\x20JSX\x20with\x20props:','pill','#f5e7c1','#C7A047','#8B6914','absolute','small','contain','Small','Medium','Premium\x20tier','Full\x20personalization','useState','log','[OnairosButton]\x20Initializing.\x20Initial\x20showOnboarding:','oJdkp','liKGL','WwrQJ','useImperativeHandle','HCJye','resolve','bIrTx','gwatc','Ziykm','DxjWa','LKkDZ','YWtxd','OYNCN','isApiKeyInitialized','error','SAiVp','CezAl','Tbfin','Alert','yvlyE','QMbDc','getApiConfig','gYYOj','EqKcn','hEgmc','HHDzv','ftSJr','JasZW','apiKey','gERnS','Gibgf','fyhHJ','pjvZD','EbRCm','Precheck\x20validation\x20failed','xyVNR','PPJms','qxGDV','CVqTM','sRnsg','ReUjj','jzWNA','iSOaC','VhVXT','BOqKB','cmoDL','Leouv','FnwQM','UowaR','dQqhA','yeFbX','PvXLN','Sign\x20in\x20with\x20Onairos','RlJcc','sLvZE','tSlRz','PAPIL','vguHe','Eswkx','WJwkH','useCallback','RiKJw','XbZSH','sHHfb','BgHUu','createElement','View','TouchableOpacity','erUKj','pbbcl','strokedButton','swervButton','disabledButton','xpLNo','fQVzV','ActivityIndicator','bZniv','BvOuV','buttonContent','logoContainer','BRAND_IMAGES','onairosLogoAlt','logoImage','gtUSx','Text','buttonText','#FFFFFF','UniversalOnboarding','vNTyd','Basic\x20tier','Free\x20access','HegOl','jwgrd','Large','FsIyg','KxPTJ','Onync','onairosevents://auth/callback','StyleSheet','row','center','#000','hidden','transparent','-2deg','600'];_0x4616=function(){return _0x361988;};return _0x4616();}function _0x43ef(_0x4616d8,_0x43efb3){_0x4616d8=_0x4616d8-0x0;const _0x390647=_0x4616();let _0x4a4518=_0x390647[_0x4616d8];return _0x4a4518;}function _interopRequireDefault(_0x13ad2f){return _0x13ad2f&&_0x13ad2f[_0x43ef(0x0)]?_0x13ad2f:{'default':_0x13ad2f};}function _interopRequireWildcard(_0xbdab8d,_0x499e00){const _0x5c23ad={'SLjPo':function(_0x440cba,_0x5c521d){return _0x440cba===_0x5c521d;},'vFTOx':'object','nOmcI':function(_0x3a90eb,_0x56487c){return _0x3a90eb!=_0x56487c;},'dAccT':function(_0x36130c,_0x50fd07){return _0x36130c!==_0x50fd07;},'lKMIs':_0x43ef(0x1),'oDLlv':function(_0x70f8f9,_0x3e2266,_0x5a3692,_0x2f7d76){return _0x70f8f9(_0x3e2266,_0x5a3692,_0x2f7d76);}};if('function'==typeof WeakMap)var _0x37742c=new WeakMap(),_0xca3b58=new WeakMap();return(_interopRequireWildcard=function(_0x43dc19,_0x1715a6){if(!_0x1715a6&&_0x43dc19&&_0x43dc19[_0x43ef(0x0)])return _0x43dc19;var _0x2bbad1,_0x1dbf9d,_0x1a4826={'__proto__':null,'default':_0x43dc19};if(_0x5c23ad['SLjPo'](null,_0x43dc19)||_0x5c23ad[_0x43ef(0x3)]!=typeof _0x43dc19&&_0x5c23ad[_0x43ef(0x4)](_0x43ef(0x5),typeof _0x43dc19))return _0x1a4826;if(_0x2bbad1=_0x1715a6?_0xca3b58:_0x37742c){if(_0x2bbad1['has'](_0x43dc19))return _0x2bbad1[_0x43ef(0x6)](_0x43dc19);_0x2bbad1[_0x43ef(0x7)](_0x43dc19,_0x1a4826);}for(const _0x15721d in _0x43dc19)_0x5c23ad['dAccT'](_0x5c23ad[_0x43ef(0x8)],_0x15721d)&&{}[_0x43ef(0x9)]['call'](_0x43dc19,_0x15721d)&&((_0x1dbf9d=(_0x2bbad1=Object['defineProperty'])&&Object[_0x43ef(0xa)](_0x43dc19,_0x15721d))&&(_0x1dbf9d[_0x43ef(0x6)]||_0x1dbf9d[_0x43ef(0x7)])?_0x5c23ad[_0x43ef(0xb)](_0x2bbad1,_0x1a4826,_0x15721d,_0x1dbf9d):_0x1a4826[_0x15721d]=_0x43dc19[_0x15721d]);return _0x1a4826;})(_0xbdab8d,_0x499e00);}const {width}=_reactNative[_0x43ef(0xc)]['get'](_0x43ef(0xd)),OnairosButton=exports[_0x43ef(0x2)]=(0x0,_react[_0x43ef(0xe)])(({AppName:_0x42eabd,buttonType:buttonType=_0x43ef(0xf),buttonWidth:buttonWidth=0xb4,buttonHeight:buttonHeight=0x30,hasStroke:hasStroke=![],enabled:enabled=!![],buttonForm:buttonForm=_0x43ef(0x1),onResolved:_0x21fcac,onRejection:_0x1dd7c7,preCheck:_0x3e8837,color:color=_0x43ef(0x10),swerv:swerv=![],darkMode:darkMode=![],returnLink:_0x1ee6be,preferredPlatform:_0x33307a,autoFetch:autoFetch=![],inferenceData:_0x1a9abb,textLayout:textLayout=_0x43ef(0x11),textColor:textColor=_0x43ef(0x12),proofMode:proofMode=![],webpageName:_0x5b3235,debug:debug=![],testMode:testMode=![],requestData:_0x4e7ca9,onPress:_0x11fb0c,primaryAuthOnly:primaryAuthOnly=![],useNewWelcomeFlow:useNewWelcomeFlow=![]},_0x1629bf)=>{const _0x29f56b={'WwrQJ':_0x43ef(0x13),'oJdkp':function(_0x119689,_0x1058ea){return _0x119689!==_0x1058ea;},'liKGL':'uzkrL','HCJye':function(_0x3fe98d){return _0x3fe98d();},'QMbDc':'[OnairosButton]\x20handleOnboardingClose:\x20Setting\x20showOnboarding\x20to\x20false.','CezAl':function(_0x32af9c,_0x3e1633){return _0x32af9c(_0x3e1633);},'vMfHc':'User\x20closed\x20onboarding','xyVNR':_0x43ef(0x14),'JasZW':function(_0x29b8e3,_0x1add26){return _0x29b8e3===_0x1add26;},'jzWNA':function(_0x22572b,_0x2e68b6){return _0x22572b===_0x2e68b6;},'iSOaC':function(_0x568759,_0x1ce9d6){return _0x568759===_0x1ce9d6;},'bIrTx':_0x43ef(0x15),'gwatc':'signup','RlJcc':_0x43ef(0x16),'Ziykm':function(_0x1bd9f7,_0x43885d){return _0x1bd9f7===_0x43885d;},'LKkDZ':'DxjWa','YWtxd':_0x43ef(0x17),'OYNCN':function(_0x2d6037,_0x17b83b){return _0x2d6037||_0x17b83b;},'slnRB':_0x43ef(0x18),'SAiVp':_0x43ef(0x19),'Tbfin':_0x43ef(0x1a),'yvlyE':_0x43ef(0x1b),'gYYOj':'qUEkJ','EqKcn':_0x43ef(0x1c),'hEgmc':_0x43ef(0x1d),'HHDzv':function(_0x35e501,_0x3f52e9){return _0x35e501+_0x3f52e9;},'ftSJr':function(_0x4def70,_0x4bf922){return _0x4def70===_0x4bf922;},'gERnS':function(_0x2efd83,_0x2f9513){return _0x2efd83===_0x2f9513;},'Gibgf':_0x43ef(0x1e),'vMtFA':_0x43ef(0x1f),'fyhHJ':_0x43ef(0x20),'pjvZD':function(_0x3c20cf){return _0x3c20cf();},'qWuxG':'ZSzCY','EbRCm':_0x43ef(0x21),'YaZom':'[OnairosButton]\x20Precheck\x20failed.\x20Setting\x20showOnboarding\x20to\x20false\x20(indirectly,\x20by\x20not\x20setting\x20to\x20true).','PPJms':_0x43ef(0x22),'Eswkx':function(_0x72bfff,_0x11e4e0){return _0x72bfff(_0x11e4e0);},'qxGDV':function(_0x7857e4,_0x20939d){return _0x7857e4(_0x20939d);},'CVqTM':function(_0x1d1f5a,_0x4cd406){return _0x1d1f5a===_0x4cd406;},'sRnsg':_0x43ef(0x23),'VhVXT':function(_0xe45a8b,_0x580235){return _0xe45a8b===_0x580235;},'BOqKB':function(_0x19dfe3,_0x4b957a){return _0x19dfe3 instanceof _0x4b957a;},'cmoDL':_0x43ef(0x24),'yeFbX':_0x43ef(0x25),'PvXLN':_0x43ef(0x26),'sLvZE':function(_0x469a5e){return _0x469a5e();},'PAPIL':_0x43ef(0x27),'vguHe':_0x43ef(0x28),'ewlQi':function(_0x5db700,_0x5c4770,_0x53db01){return _0x5db700(_0x5c4770,_0x53db01);},'WJwkH':function(_0x3da48c){return _0x3da48c();},'XbZSH':function(_0x35309d){return _0x35309d();},'RiKJw':function(_0x1869a,_0x389d56){return _0x1869a(_0x389d56);},'DMdIl':function(_0x2708e3,_0xabd045){return _0x2708e3===_0xabd045;},'RqosX':'InfvW','sHHfb':function(_0xa5e587,_0x225932){return _0xa5e587(_0x225932);},'BgHUu':_0x43ef(0x29),'erUKj':function(_0x54b65a,_0x5d325c){return _0x54b65a===_0x5d325c;},'pbbcl':_0x43ef(0x2a),'FPKcM':_0x43ef(0x2b),'xpLNo':_0x43ef(0x2c),'fQVzV':_0x43ef(0x2d),'nbsUx':_0x43ef(0x2e),'bZniv':_0x43ef(0x2f),'BvOuV':'#FFFFFF','gtUSx':_0x43ef(0x30),'vNTyd':_0x43ef(0x31),'vdNad':_0x43ef(0x32),'HegOl':'Standard\x20tier','jwgrd':'Premium\x20features','FsIyg':_0x43ef(0x33),'KxPTJ':_0x43ef(0x34),'Onync':function(_0x34eaf7,_0x4a81af){return _0x34eaf7||_0x4a81af;}},[_0x59439e,_0x37303b]=(0x0,_react[_0x43ef(0x35)])(![]),[_0x2fabf4,_0x22eb47]=(0x0,_react[_0x43ef(0x35)])(![]),[_0x2897ea,_0x8db694]=(0x0,_react[_0x43ef(0x35)])(![]);console[_0x43ef(0x36)](_0x43ef(0x37),_0x2897ea),(0x0,_react['useEffect'])(()=>{_0x29f56b[_0x43ef(0x38)](_0x29f56b[_0x43ef(0x39)],'wgVuK')?console[_0x43ef(0x36)](_0x29f56b['WwrQJ'],_0x2897ea):_0x4868ea[_0x43ef(0x36)](_0x29f56b[_0x43ef(0x3a)],_0x42b156);},[_0x2897ea]),(0x0,_react[_0x43ef(0x3b)])(_0x1629bf,()=>({'trigger':async()=>{return await _0x29f56b[_0x43ef(0x3c)](_0x4cce36),Promise[_0x43ef(0x3d)]();},'reset':async()=>{return Promise['resolve']();}}));const _0x4cce36=async()=>{const _0xa12b93={'nLyxe':_0x43ef(0x25),'Leouv':_0x29f56b[_0x43ef(0x3e)],'FnwQM':'Sign\x20in\x20with\x20Onairos','UowaR':_0x29f56b[_0x43ef(0x3f)],'dQqhA':_0x29f56b['RlJcc']};if(_0x29f56b[_0x43ef(0x40)](_0x43ef(0x41),_0x29f56b[_0x43ef(0x42)])){console[_0x43ef(0x36)](_0x29f56b[_0x43ef(0x43)]);if(_0x29f56b[_0x43ef(0x44)](!enabled,_0x59439e))return;_0x37303b(!![]);try{if(!(0x0,_apiKeyService[_0x43ef(0x45)])()){const _0x47b397=_0x29f56b['slnRB'];console[_0x43ef(0x46)](_0x29f56b[_0x43ef(0x47)],_0x47b397);_0x1dd7c7?_0x29f56b[_0x43ef(0x48)](_0x1dd7c7,_0x47b397):_0x29f56b['Ziykm'](_0x29f56b[_0x43ef(0x49)],_0x29f56b['Tbfin'])?_reactNative[_0x43ef(0x4a)]['alert']('SDK\x20Not\x20Initialized',_0x29f56b[_0x43ef(0x4b)],[{'text':'OK'}]):(_0xd29480[_0x43ef(0x36)](_0x29f56b[_0x43ef(0x4c)]),_0x2b62cf(![]),_0x44a92c&&_0x29f56b[_0x43ef(0x48)](_0xb6a169,_0x29f56b['vMfHc']));_0x37303b(![]);return;}const _0x1d3ec3=(0x0,_apiKeyService[_0x43ef(0x4d)])();if(debug){if(_0x29f56b[_0x43ef(0x40)](_0x29f56b[_0x43ef(0x4e)],_0x29f56b[_0x43ef(0x4f)])){if(_0x229373['has'](_0x319d02))return _0x5ec00f['get'](_0x3758a4);_0x4408d5[_0x43ef(0x7)](_0x4a3964,_0x29d199);}else{var _0x5e7220;console['log'](_0x29f56b[_0x43ef(0x50)],_0x29f56b[_0x43ef(0x51)](_0x1d3ec3===null||_0x29f56b[_0x43ef(0x52)](_0x1d3ec3,void 0x0)||_0x29f56b[_0x43ef(0x53)](_0x5e7220=_0x1d3ec3[_0x43ef(0x54)],null)||_0x29f56b[_0x43ef(0x55)](_0x5e7220,void 0x0)?void 0x0:_0x5e7220['substring'](0x0,0x8),_0x29f56b[_0x43ef(0x56)]));}}if(_0x3e8837){if(_0x29f56b['vMtFA']!==_0x29f56b[_0x43ef(0x57)]){const _0x50ce9f=await _0x29f56b[_0x43ef(0x58)](_0x3e8837);if(!_0x50ce9f){if(_0x29f56b['qWuxG']!==_0x29f56b[_0x43ef(0x59)]){console['log'](_0x29f56b['YaZom']),_0x1dd7c7===null||_0x1dd7c7===void 0x0||_0x29f56b[_0x43ef(0x48)](_0x1dd7c7,_0x43ef(0x5a)),_0x37303b(![]);return;}else _0x227a72['error'](_0x29f56b[_0x43ef(0x5b)],_0x582ad0),_0x5d7c4f===null||_0x29f56b[_0x43ef(0x53)](_0x4e31c7,void 0x0)||_0x29f56b[_0x43ef(0x48)](_0x276326,_0x34b0dd instanceof _0x2a8bb1?_0x45f5da['message']:_0x43ef(0x24)),_0x29f56b[_0x43ef(0x48)](_0x33199b,![]);}}else _0x5b7fe1(_0x48a154,_0x29a537);}console[_0x43ef(0x36)](_0x29f56b[_0x43ef(0x5c)]),_0x29f56b['Eswkx'](_0x8db694,!![]),_0x29f56b[_0x43ef(0x5d)](_0x37303b,![]);}catch(_0x3b33b0){if(_0x29f56b[_0x43ef(0x5e)](_0x29f56b[_0x43ef(0x5f)],_0x43ef(0x60))){var _0x453c0c;_0x33388b[_0x43ef(0x36)]('[OnairosButton]\x20SDK\x20initialized\x20with\x20API\x20key:',(_0x29f56b[_0x43ef(0x61)](_0x116a2e,null)||_0x10a5c9===void 0x0||_0x29f56b[_0x43ef(0x61)](_0x453c0c=_0x4056ce[_0x43ef(0x54)],null)||_0x29f56b[_0x43ef(0x62)](_0x453c0c,void 0x0)?void 0x0:_0x453c0c['substring'](0x0,0x8))+_0x43ef(0x1e));}else console[_0x43ef(0x46)](_0x29f56b['xyVNR'],_0x3b33b0),_0x1dd7c7===null||_0x29f56b[_0x43ef(0x63)](_0x1dd7c7,void 0x0)||_0x29f56b[_0x43ef(0x48)](_0x1dd7c7,_0x29f56b[_0x43ef(0x64)](_0x3b33b0,Error)?_0x3b33b0['message']:_0x29f56b[_0x43ef(0x65)]),_0x29f56b[_0x43ef(0x5d)](_0x37303b,![]);}}else switch(_0x4be643){case _0xa12b93['nLyxe']:return _0xa12b93[_0x43ef(0x66)];case'login':return _0xa12b93[_0x43ef(0x67)];case _0xa12b93[_0x43ef(0x68)]:return _0xa12b93[_0x43ef(0x69)];default:return _0x43ef(0x15);}},_0xdbbd1c=()=>{switch(buttonForm){case _0x29f56b[_0x43ef(0x6a)]:return _0x29f56b['bIrTx'];case _0x29f56b[_0x43ef(0x6b)]:return _0x43ef(0x6c);case'signup':return _0x29f56b[_0x43ef(0x6d)];default:return _0x29f56b[_0x43ef(0x3e)];}},_0x330fca=(0x0,_react['useCallback'])((_0x5cc217,_0x30d436)=>{const _0xf3bf56={'qjbqV':function(_0x3becf4){return _0x29f56b[_0x43ef(0x6e)](_0x3becf4);}};_0x29f56b[_0x43ef(0x53)](_0x43ef(0x6f),_0x29f56b[_0x43ef(0x70)])?(_0x36c302[_0x43ef(0x36)]('[OnairosButton]\x20handleOnboardingComplete:\x20Setting\x20showOnboarding\x20to\x20false.'),_0x11923c(![]),_0x29fb20&&_0x4540af(_0x44e8ea,_0x4bd1bd),_0x5de928&&_0xf3bf56['qjbqV'](_0x14eae5)):(console[_0x43ef(0x36)](_0x29f56b[_0x43ef(0x71)]),_0x29f56b[_0x43ef(0x72)](_0x8db694,![]),_0x21fcac&&_0x29f56b['ewlQi'](_0x21fcac,_0x5cc217,_0x30d436),_0x11fb0c&&_0x29f56b[_0x43ef(0x73)](_0x11fb0c));},[_0x21fcac,_0x11fb0c]),_0x389b6b=(0x0,_react[_0x43ef(0x74)])(()=>{console[_0x43ef(0x36)]('[OnairosButton]\x20handleOnboardingClose:\x20Setting\x20showOnboarding\x20to\x20false.'),_0x29f56b[_0x43ef(0x75)](_0x8db694,![]),_0x1dd7c7&&(_0x29f56b['DMdIl'](_0x29f56b['RqosX'],'qXhEs')?_0x29f56b[_0x43ef(0x76)](_0x5a2769):_0x29f56b[_0x43ef(0x77)](_0x1dd7c7,_0x29f56b['vMfHc']));},[_0x1dd7c7]);return console[_0x43ef(0x36)](_0x29f56b[_0x43ef(0x78)],{'AppName':_0x42eabd,'buttonType':buttonType,'buttonWidth':buttonWidth,'buttonHeight':buttonHeight,'hasStroke':hasStroke,'enabled':enabled,'buttonForm':buttonForm,'onResolved':_0x21fcac,'onRejection':_0x1dd7c7,'preCheck':_0x3e8837,'color':color,'swerv':swerv,'darkMode':darkMode,'returnLink':_0x1ee6be,'preferredPlatform':_0x33307a,'autoFetch':autoFetch,'inferenceData':_0x1a9abb,'textLayout':textLayout,'textColor':textColor,'proofMode':proofMode,'webpageName':_0x5b3235,'debug':debug,'testMode':testMode,'requestData':_0x4e7ca9,'onPress':_0x11fb0c,'primaryAuthOnly':primaryAuthOnly,'useNewWelcomeFlow':useNewWelcomeFlow}),_react[_0x43ef(0x1)][_0x43ef(0x79)](_react[_0x43ef(0x1)]['Fragment'],null,_react[_0x43ef(0x1)][_0x43ef(0x79)](_reactNative[_0x43ef(0x7a)],null,_react[_0x43ef(0x1)][_0x43ef(0x79)](_reactNative[_0x43ef(0x7b)],{'style':[styles['button'],_0x29f56b[_0x43ef(0x7c)](buttonType,_0x29f56b[_0x43ef(0x7d)])&&styles['pillButton'],hasStroke&&styles[_0x43ef(0x7e)],{'width':buttonWidth,'height':buttonHeight},swerv&&styles[_0x43ef(0x7f)],!enabled&&styles[_0x43ef(0x80)]],'onPress':_0x4cce36,'disabled':!enabled||_0x59439e,'onPressIn':()=>_0x22eb47(!![]),'onPressOut':()=>_0x22eb47(![])},_react['default'][_0x43ef(0x79)](_reactNativeLinearGradient[_0x43ef(0x1)],{'colors':[_0x29f56b['FPKcM'],_0x29f56b[_0x43ef(0x81)],_0x29f56b[_0x43ef(0x82)]],'start':{'x':0x0,'y':0x0},'end':{'x':0x1,'y':0x0},'style':{'position':_0x29f56b['nbsUx'],'left':0x0,'right':0x0,'top':0x0,'bottom':0x0,'borderRadius':_0x29f56b[_0x43ef(0x61)](buttonType,_0x29f56b[_0x43ef(0x7d)])?0x18:0x8}}),_0x59439e?_react[_0x43ef(0x1)][_0x43ef(0x79)](_reactNative[_0x43ef(0x83)],{'size':_0x29f56b[_0x43ef(0x84)],'color':_0x29f56b[_0x43ef(0x85)]}):_react[_0x43ef(0x1)][_0x43ef(0x79)](_reactNative[_0x43ef(0x7a)],{'style':styles[_0x43ef(0x86)]},_react['default']['createElement'](_reactNative['View'],{'style':styles[_0x43ef(0x87)]},_react[_0x43ef(0x1)][_0x43ef(0x79)](_reactNative['Image'],{'source':_assetRegistry[_0x43ef(0x88)][_0x43ef(0x89)],'style':styles[_0x43ef(0x8a)],'resizeMode':_0x29f56b[_0x43ef(0x8b)]})),_react[_0x43ef(0x1)][_0x43ef(0x79)](_reactNative[_0x43ef(0x8c)],{'style':[styles[_0x43ef(0x8d)],{'color':_0x43ef(0x8e)}]},_0x29f56b['pjvZD'](_0xdbbd1c))))),useNewWelcomeFlow?_react[_0x43ef(0x1)][_0x43ef(0x79)](_WelcomeScreen[_0x43ef(0x1)],{'visible':_0x2897ea,'onClose':_0x389b6b,'onComplete':_0x330fca}):_react[_0x43ef(0x1)][_0x43ef(0x79)](_UniversalOnboarding[_0x43ef(0x8f)],{'visible':_0x2897ea,'onClose':_0x389b6b,'AppName':_0x42eabd,'requestData':_0x4e7ca9||{'Small':{'type':_0x29f56b[_0x43ef(0x90)],'descriptions':_0x43ef(0x91),'reward':_0x43ef(0x92)},'Medium':{'type':_0x29f56b['vdNad'],'descriptions':_0x29f56b[_0x43ef(0x93)],'reward':_0x29f56b[_0x43ef(0x94)]},'Large':{'type':_0x43ef(0x95),'descriptions':_0x29f56b[_0x43ef(0x96)],'reward':_0x29f56b[_0x43ef(0x97)]}},'returnLink':_0x29f56b[_0x43ef(0x98)](_0x1ee6be,_0x43ef(0x99)),'onComplete':_0x330fca,'debug':debug,'test':testMode,'preferredPlatform':_0x33307a,'primaryAuthOnly':primaryAuthOnly}));}),styles=_reactNative[_0x43ef(0x9a)]['create']({'button':{'flexDirection':_0x43ef(0x9b),'alignItems':_0x43ef(0x9c),'justifyContent':'center','paddingVertical':0xc,'paddingHorizontal':0x10,'borderRadius':0x8,'shadowColor':_0x43ef(0x9d),'shadowOffset':{'width':0x0,'height':0x2},'shadowOpacity':0.2,'shadowRadius':0x4,'elevation':0x3,'overflow':_0x43ef(0x9e)},'buttonContent':{'flexDirection':_0x43ef(0x9b),'alignItems':_0x43ef(0x9c),'justifyContent':'center'},'logoContainer':{'width':0x18,'height':0x18,'alignItems':'center','justifyContent':_0x43ef(0x9c),'marginRight':0x4},'logoText':{'color':_0x43ef(0x2c),'fontWeight':'bold','fontSize':0xe},'logoImage':{'width':0x14,'height':0x14},'pillButton':{'borderRadius':0x18},'strokedButton':{'backgroundColor':_0x43ef(0x9f),'borderWidth':0x1},'swervButton':{'transform':[{'rotate':_0x43ef(0xa0)}]},'disabledButton':{'opacity':0.6},'buttonText':{'fontSize':0x10,'fontWeight':_0x43ef(0xa1),'textAlign':_0x43ef(0x9c)}});var _default=exports['default']=OnairosButton;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// Onairos SDK - Asset Registry (auto-generated)
|
|
3
|
+
var __ONAIROS_REQ_REGISTRY__ = [
|
|
4
|
+
require("react"),
|
|
5
|
+
require("react-native"),
|
|
6
|
+
require("@react-native-async-storage/async-storage"),
|
|
7
|
+
require("./WelcomeScreen"),
|
|
8
|
+
require("../utils/haptics"),
|
|
9
|
+
require("../utils/assetRegistry")
|
|
10
|
+
];
|
|
11
|
+
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
12
|
+
Object[_0x90ff(0x0)](exports,'__esModule',{'value':!![]}),exports['OnairosSignInButton']=void 0x0;function _0xbb0f(){const _0x4a7360=['defineProperty','__esModule','🔑\x20OnairosSignInButton:\x20Returning\x20JWT\x20token\x20with\x20email:','object','function','xPyrn','default','Nknpi','ASIlz','aRvuX','rDUlv','dDSjv','bmDKO','PVmrv','log','lxQmW','TmqAb','has','get','set','nKcaQ','hasOwnProperty','call','getOwnPropertyDescriptor','OAHWG','#D4A536','#000','🔑\x20Received\x20JWT\x20token\x20from\x20WelcomeScreen,\x20completing\x20sign-in','user_email','🔑\x20Received\x20placeholder\x20token\x20from\x20WelcomeScreen,\x20completing\x20sign-in','🔍\x20OnairosSignInButton:\x20Is\x20JWT\x20token?','wVlns','PrFFQ','User\x20closed\x20welcome\x20screen','🔘\x20showWelcomeScreen\x20state\x20set\x20to\x20true','Tsrcl','Sign\x20in\x20with\x20Onairos','useState','QEDNL','cdSle','XvqSf','qFFad','includes','ReySP','split','length','cgmXu','KGSOg','TDcrV','OpzML','iOyLA','pkBcM','ZgitT','kLIbD','zHGMc','MNVqo','then','pGciL','jttqE','mxdlw','neBfz','useCallback','urdtT','betCH','hpRoK','qzUHZ','createElement','View','container','TouchableOpacity','button','dOWyY','GlTrI','Heghu','dlUPV','triggerHaptic','HapticType','PeIWu','BUTTON_PRESS','contentRow','Image','BRAND_IMAGES','onairosLogoAlt','contain','Onairos\x20logo','buttonText','JGPhE','OnairosSignInButton','StyleSheet','create','center','row'];_0xbb0f=function(){return _0x4a7360;};return _0xbb0f();}var _react=_interopRequireWildcard(__ONAIROS_REQ_FUNC__(0x0)),_reactNative=__ONAIROS_REQ_FUNC__(0x1),_asyncStorage=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x2)),_WelcomeScreen=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x3)),_haptics=__ONAIROS_REQ_FUNC__(0x4),_assetRegistry=__ONAIROS_REQ_FUNC__(0x5);function _interopRequireDefault(_0xf97444){return _0xf97444&&_0xf97444[_0x90ff(0x1)]?_0xf97444:{'default':_0xf97444};}function _0x90ff(_0xbb0f76,_0x90ffe2){_0xbb0f76=_0xbb0f76-0x0;const _0x2cb4c5=_0xbb0f();let _0x321d12=_0x2cb4c5[_0xbb0f76];return _0x321d12;}function _interopRequireWildcard(_0x528525,_0x30191a){const _0x59bef8={'PVmrv':function(_0xf70198,_0x4e081a){return _0xf70198||_0x4e081a;},'lxQmW':_0x90ff(0x2),'TmqAb':function(_0x3878af,_0x5cad45,_0x1a36a7){return _0x3878af(_0x5cad45,_0x1a36a7);},'ASIlz':function(_0x5b2df2,_0x58a8a4){return _0x5b2df2&&_0x58a8a4;},'aRvuX':function(_0x2d561e,_0x57b85d){return _0x2d561e===_0x57b85d;},'rDUlv':function(_0x114a29,_0x17eace){return _0x114a29!=_0x17eace;},'dDSjv':_0x90ff(0x3),'Nknpi':_0x90ff(0x4),'bmDKO':function(_0x28fd72,_0x1792e8){return _0x28fd72!==_0x1792e8;},'kgCHh':_0x90ff(0x5),'KUVxv':function(_0x354da3,_0x1db394){return _0x354da3!==_0x1db394;},'nKcaQ':_0x90ff(0x6),'OAHWG':function(_0x19c243,_0x55512e,_0x782821,_0x49d077){return _0x19c243(_0x55512e,_0x782821,_0x49d077);},'rabOh':function(_0x135dc1,_0x48afc0){return _0x135dc1==_0x48afc0;}};if(_0x59bef8['rabOh'](_0x59bef8[_0x90ff(0x7)],typeof WeakMap))var _0x499dbc=new WeakMap(),_0x38ca51=new WeakMap();return(_interopRequireWildcard=function(_0x1f3505,_0x31ad82){if(_0x59bef8[_0x90ff(0x8)](!_0x31ad82,_0x1f3505)&&_0x1f3505[_0x90ff(0x1)])return _0x1f3505;var _0x32af14,_0x48af36,_0x25e023={'__proto__':null,'default':_0x1f3505};if(_0x59bef8[_0x90ff(0x9)](null,_0x1f3505)||_0x59bef8[_0x90ff(0xa)](_0x59bef8[_0x90ff(0xb)],typeof _0x1f3505)&&_0x59bef8[_0x90ff(0xa)](_0x59bef8[_0x90ff(0x7)],typeof _0x1f3505))return _0x25e023;if(_0x32af14=_0x31ad82?_0x38ca51:_0x499dbc){if(_0x59bef8[_0x90ff(0xc)](_0x59bef8['kgCHh'],_0x90ff(0x5))){const _0x3d93c7=_0x59bef8[_0x90ff(0xd)](_0x30ecb6,_0x381f8d)||_0x37774e;_0x6d514e[_0x90ff(0xe)](_0x59bef8[_0x90ff(0xf)],_0x3d93c7),_0x59bef8[_0x90ff(0x10)](_0x3c16dd,_0x476c43,_0x3d93c7);}else{if(_0x32af14[_0x90ff(0x11)](_0x1f3505))return _0x32af14[_0x90ff(0x12)](_0x1f3505);_0x32af14[_0x90ff(0x13)](_0x1f3505,_0x25e023);}}for(const _0xecfd51 in _0x1f3505)_0x59bef8['KUVxv'](_0x59bef8[_0x90ff(0x14)],_0xecfd51)&&{}[_0x90ff(0x15)][_0x90ff(0x16)](_0x1f3505,_0xecfd51)&&((_0x48af36=(_0x32af14=Object[_0x90ff(0x0)])&&Object[_0x90ff(0x17)](_0x1f3505,_0xecfd51))&&(_0x48af36[_0x90ff(0x12)]||_0x48af36[_0x90ff(0x13)])?_0x59bef8[_0x90ff(0x18)](_0x32af14,_0x25e023,_0xecfd51,_0x48af36):_0x25e023[_0xecfd51]=_0x1f3505[_0xecfd51]);return _0x25e023;})(_0x528525,_0x30191a);}const OnairosSignInButton=({AppName:_0x5e59ef,buttonWidth:buttonWidth=0x118,buttonHeight:buttonHeight=0x2c,color:color=_0x90ff(0x19),textColor:textColor=_0x90ff(0x1a),onResolved:_0x328545,onRejection:_0x4f87ed,autoFocusEmailInput:autoFocusEmailInput=!![]})=>{const _0x20eeed={'pGciL':function(_0x377ac9,_0x35819e){return _0x377ac9||_0x35819e;},'EGNyR':_0x90ff(0x2),'jttqE':function(_0x481909,_0x3f544e,_0x22095d){return _0x481909(_0x3f544e,_0x22095d);},'QEDNL':function(_0x91ab53,_0x1ef8a7){return _0x91ab53||_0x1ef8a7;},'cdSle':_0x90ff(0x1b),'MNVqo':_0x90ff(0x1c),'XvqSf':_0x90ff(0x1d),'qFFad':'🔍\x20OnairosSignInButton:\x20handleWelcomeComplete\x20called\x20with:','ReySP':function(_0x53b987,_0x2209d7){return _0x53b987===_0x2209d7;},'cgmXu':_0x90ff(0x1e),'UwTEc':function(_0x48b02b,_0x3bea22){return _0x48b02b(_0x3bea22);},'KGSOg':function(_0x5a31a1,_0x4aa161){return _0x5a31a1!==_0x4aa161;},'TDcrV':_0x90ff(0x1f),'mxdlw':function(_0x1355ae,_0x2bbeb4){return _0x1355ae||_0x2bbeb4;},'neBfz':'🔑\x20OnairosSignInButton:\x20Returning\x20token\x20with\x20email:','urdtT':function(_0x5d7f35,_0x365b7d){return _0x5d7f35(_0x365b7d);},'betCH':function(_0x20da88,_0x9e3dbf){return _0x20da88!==_0x9e3dbf;},'MEpGx':_0x90ff(0x20),'hpRoK':function(_0x400f17,_0x13d302){return _0x400f17(_0x13d302);},'qzUHZ':_0x90ff(0x21),'dOWyY':'🔘\x20OnairosSignInButton\x20pressed,\x20showing\x20WelcomeScreen','GlTrI':function(_0xaf808e,_0x5155bf){return _0xaf808e(_0x5155bf);},'wTRVF':_0x90ff(0x22),'Heghu':_0x90ff(0x23),'lyweh':function(_0x37935e,_0x45f8a6){return _0x37935e(_0x45f8a6);},'JGPhE':_0x90ff(0x24)},[_0x55a9b5,_0x12f14b]=(0x0,_react[_0x90ff(0x25)])(![]),[_0x262e30,_0x10f7d6]=(0x0,_react['useState'])(''),_0x272007=(0x0,_react['useCallback'])((_0x812566,_0x1fadbb)=>{const _0x42fc0e={'OpzML':function(_0x13cf62,_0x225543){return _0x20eeed[_0x90ff(0x26)](_0x13cf62,_0x225543);},'zHGMc':function(_0x519f0a,_0x10465e,_0x2a87ae){return _0x20eeed['jttqE'](_0x519f0a,_0x10465e,_0x2a87ae);},'cuzVV':_0x20eeed[_0x90ff(0x27)],'iOyLA':_0x20eeed['MNVqo'],'ZgitT':_0x20eeed[_0x90ff(0x28)],'kLIbD':'🔑\x20OnairosSignInButton:\x20Returning\x20token\x20with\x20email:'};console['log'](_0x20eeed[_0x90ff(0x29)],{'token':_0x812566,'email':_0x1fadbb});const _0x38140e=_0x812566&&_0x812566[_0x90ff(0x2a)]('.')&&_0x20eeed[_0x90ff(0x2b)](_0x812566[_0x90ff(0x2c)]('.')[_0x90ff(0x2d)],0x3);console[_0x90ff(0xe)](_0x20eeed[_0x90ff(0x2e)],_0x38140e),_0x20eeed['UwTEc'](_0x12f14b,![]);if(_0x328545){if(_0x38140e){if(_0x20eeed[_0x90ff(0x2f)](_0x20eeed[_0x90ff(0x30)],_0x20eeed[_0x90ff(0x30)])){const _0x4f88c5={'pkBcM':function(_0x182149,_0x599955){return _0x42fc0e[_0x90ff(0x31)](_0x182149,_0x599955);},'LnPVK':function(_0x4686aa,_0x5ac084,_0x325d92){return _0x42fc0e['zHGMc'](_0x4686aa,_0x5ac084,_0x325d92);}};if(_0x4bedeb)_0x13abbb['log'](_0x42fc0e['cuzVV']),_0xd17b2b[_0x90ff(0x6)]['getItem'](_0x42fc0e[_0x90ff(0x32)])['then'](_0x3e94a8=>{const _0x217ada=_0x4f88c5[_0x90ff(0x33)](_0x1e3765,_0x3e94a8)||_0x198171;_0x49dd22['log']('🔑\x20OnairosSignInButton:\x20Returning\x20JWT\x20token\x20with\x20email:',_0x217ada),_0x4f88c5['LnPVK'](_0x3ccaaa,_0x17e722,_0x217ada);});else{_0x4cd15d[_0x90ff(0xe)](_0x42fc0e[_0x90ff(0x34)]);const _0x2552fe=_0x47cba5||_0x44d209;_0x230aa5[_0x90ff(0xe)](_0x42fc0e[_0x90ff(0x35)],_0x2552fe),_0x42fc0e[_0x90ff(0x36)](_0x2b778d,_0x122d84,_0x2552fe);}}else console[_0x90ff(0xe)](_0x20eeed[_0x90ff(0x27)]),_asyncStorage[_0x90ff(0x6)]['getItem'](_0x20eeed[_0x90ff(0x37)])[_0x90ff(0x38)](_0x44dcb8=>{const _0x4e75ea=_0x20eeed[_0x90ff(0x39)](_0x1fadbb,_0x44dcb8)||_0x262e30;console['log'](_0x20eeed['EGNyR'],_0x4e75ea),_0x20eeed[_0x90ff(0x3a)](_0x328545,_0x812566,_0x4e75ea);});}else{console[_0x90ff(0xe)](_0x20eeed[_0x90ff(0x28)]);const _0x31f5b2=_0x20eeed[_0x90ff(0x3b)](_0x1fadbb,_0x262e30);console[_0x90ff(0xe)](_0x20eeed[_0x90ff(0x3c)],_0x31f5b2),_0x328545(_0x812566,_0x31f5b2);}}},[_0x328545,_0x262e30]),_0xbdac73=(0x0,_react[_0x90ff(0x3d)])(()=>{_0x20eeed[_0x90ff(0x3e)](_0x12f14b,![]);if(_0x4f87ed){if(_0x20eeed[_0x90ff(0x3f)](_0x20eeed['MEpGx'],_0x20eeed['MEpGx']))return _0x55808e&&_0xdf0993[_0x90ff(0x1)]?_0x5e1939:{'default':_0x2de0a8};else _0x20eeed[_0x90ff(0x40)](_0x4f87ed,_0x20eeed[_0x90ff(0x41)]);}},[_0x4f87ed]);return _react[_0x90ff(0x6)][_0x90ff(0x42)](_reactNative[_0x90ff(0x43)],{'style':styles[_0x90ff(0x44)]},_react[_0x90ff(0x6)][_0x90ff(0x42)](_reactNative[_0x90ff(0x45)],{'style':[styles[_0x90ff(0x46)],{'width':buttonWidth,'height':buttonHeight,'backgroundColor':color}],'onPress':()=>{const _0x4861ab={'dlUPV':_0x20eeed[_0x90ff(0x47)],'rsJgu':function(_0x336406,_0x438982){return _0x20eeed[_0x90ff(0x48)](_0x336406,_0x438982);},'PeIWu':_0x20eeed['wTRVF']};_0x20eeed[_0x90ff(0x3f)](_0x20eeed[_0x90ff(0x49)],_0x20eeed[_0x90ff(0x49)])?(_0x3abd70['log'](_0x4861ab[_0x90ff(0x4a)]),(0x0,_0x48d93c[_0x90ff(0x4b)])(_0x3b7efd[_0x90ff(0x4c)]['BUTTON_PRESS']),_0x4861ab['rsJgu'](_0x2fc695,!![]),_0x485b33['log'](_0x4861ab[_0x90ff(0x4d)])):(console[_0x90ff(0xe)](_0x20eeed[_0x90ff(0x47)]),(0x0,_haptics[_0x90ff(0x4b)])(_haptics[_0x90ff(0x4c)][_0x90ff(0x4e)]),_0x20eeed['lyweh'](_0x12f14b,!![]),console[_0x90ff(0xe)](_0x90ff(0x22)));},'activeOpacity':0.85},_react['default'][_0x90ff(0x42)](_reactNative['View'],{'style':styles[_0x90ff(0x4f)]},_react[_0x90ff(0x6)]['createElement'](_reactNative[_0x90ff(0x50)],{'source':_assetRegistry[_0x90ff(0x51)][_0x90ff(0x52)],'style':styles['logo'],'resizeMode':_0x90ff(0x53),'accessibilityLabel':_0x90ff(0x54)}),_react[_0x90ff(0x6)][_0x90ff(0x42)](_reactNative['Text'],{'style':[styles[_0x90ff(0x55)],{'color':textColor}]},_0x20eeed[_0x90ff(0x56)]))),_react[_0x90ff(0x6)]['createElement'](_WelcomeScreen['default'],{'visible':_0x55a9b5,'onClose':_0xbdac73,'onComplete':_0x272007}));};exports[_0x90ff(0x57)]=OnairosSignInButton;const styles=_reactNative[_0x90ff(0x58)][_0x90ff(0x59)]({'button':{'borderRadius':0x18,'justifyContent':_0x90ff(0x5a),'alignItems':_0x90ff(0x5a),'shadowColor':_0x90ff(0x1a),'shadowOffset':{'width':0x0,'height':0x2},'shadowOpacity':0.1,'shadowRadius':0x4,'elevation':0x2,'marginVertical':0x8},'contentRow':{'flexDirection':_0x90ff(0x5b),'alignItems':_0x90ff(0x5a),'justifyContent':'center'},'logo':{'width':0x1a,'height':0x1a,'marginRight':0xa},'buttonText':{'fontSize':0x10,'fontWeight':'600','textAlign':'center'},'container':{}});
|