@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.
- 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/SDK_API_KEY_VALIDATION.md +31 -38
- package/lib/commonjs/services/apiClient.js +8 -0
- package/lib/commonjs/services/apiKeyService.js +9 -946
- 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/SDK_API_KEY_VALIDATION.md +31 -38
- package/lib/module/services/apiClient.js +1 -0
- package/lib/module/services/apiKeyService.js +1 -919
- 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 -428
- package/src/services/apiKeyService.ts +0 -979
- 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,66 +1 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
-
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
4
|
-
import { COLORS } from '../../constants';
|
|
5
|
-
export const OnboardingHeader = ({
|
|
6
|
-
title,
|
|
7
|
-
subtitle,
|
|
8
|
-
showBackButton = false,
|
|
9
|
-
onBack,
|
|
10
|
-
onClose
|
|
11
|
-
}) => {
|
|
12
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
13
|
-
style: styles.header
|
|
14
|
-
}, showBackButton && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
15
|
-
style: styles.backButton,
|
|
16
|
-
onPress: onBack
|
|
17
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
18
|
-
name: "arrow-back",
|
|
19
|
-
size: 24,
|
|
20
|
-
color: "#000"
|
|
21
|
-
})), /*#__PURE__*/React.createElement(View, {
|
|
22
|
-
style: styles.titleContainer
|
|
23
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
24
|
-
style: styles.title
|
|
25
|
-
}, title), subtitle && /*#__PURE__*/React.createElement(Text, {
|
|
26
|
-
style: styles.subtitle
|
|
27
|
-
}, subtitle)), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
28
|
-
style: styles.closeButton,
|
|
29
|
-
onPress: onClose
|
|
30
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
31
|
-
name: "close",
|
|
32
|
-
size: 24,
|
|
33
|
-
color: "#000"
|
|
34
|
-
})));
|
|
35
|
-
};
|
|
36
|
-
const styles = StyleSheet.create({
|
|
37
|
-
header: {
|
|
38
|
-
flexDirection: 'row',
|
|
39
|
-
alignItems: 'center',
|
|
40
|
-
padding: 16,
|
|
41
|
-
backgroundColor: COLORS.headerBg,
|
|
42
|
-
borderTopLeftRadius: 16,
|
|
43
|
-
borderTopRightRadius: 16
|
|
44
|
-
},
|
|
45
|
-
backButton: {
|
|
46
|
-
padding: 8,
|
|
47
|
-
marginRight: 8
|
|
48
|
-
},
|
|
49
|
-
titleContainer: {
|
|
50
|
-
flex: 1
|
|
51
|
-
},
|
|
52
|
-
title: {
|
|
53
|
-
fontSize: 18,
|
|
54
|
-
fontWeight: '600',
|
|
55
|
-
color: '#000'
|
|
56
|
-
},
|
|
57
|
-
subtitle: {
|
|
58
|
-
fontSize: 14,
|
|
59
|
-
color: '#666',
|
|
60
|
-
marginTop: 4
|
|
61
|
-
},
|
|
62
|
-
closeButton: {
|
|
63
|
-
padding: 8
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=OnboardingHeader.js.map
|
|
1
|
+
import React from'react';import{View,Text,StyleSheet,TouchableOpacity}from'react-native';import _0x106294 from'react-native-vector-icons/MaterialIcons';import{COLORS}from'../../constants';function _0x4329(){const _0x90582a=['arrow-back','close','createElement','header','titleContainer','title','subtitle','closeButton','jDPin','create','row','center','headerBg','600','#666'];_0x4329=function(){return _0x90582a;};return _0x4329();}function _0x15d9(_0x432958,_0x15d973){_0x432958=_0x432958-0x0;const _0xebca40=_0x4329();let _0x5a1259=_0xebca40[_0x432958];return _0x5a1259;}export const OnboardingHeader=({title:_0x3cecd5,subtitle:_0x4bc201,showBackButton:showBackButton=![],onBack:_0x24d0e2,onClose:_0x4477f4})=>{const _0x581528={'CgmaF':_0x15d9(0x0),'jDPin':_0x15d9(0x1),'Maffg':'#000'};return React[_0x15d9(0x2)](View,{'style':styles[_0x15d9(0x3)]},showBackButton&&React[_0x15d9(0x2)](TouchableOpacity,{'style':styles['backButton'],'onPress':_0x24d0e2},React[_0x15d9(0x2)](_0x106294,{'name':_0x581528['CgmaF'],'size':0x18,'color':'#000'})),React[_0x15d9(0x2)](View,{'style':styles[_0x15d9(0x4)]},React[_0x15d9(0x2)](Text,{'style':styles[_0x15d9(0x5)]},_0x3cecd5),_0x4bc201&&React[_0x15d9(0x2)](Text,{'style':styles[_0x15d9(0x6)]},_0x4bc201)),React[_0x15d9(0x2)](TouchableOpacity,{'style':styles[_0x15d9(0x7)],'onPress':_0x4477f4},React['createElement'](_0x106294,{'name':_0x581528[_0x15d9(0x8)],'size':0x18,'color':_0x581528['Maffg']})));};const styles=StyleSheet[_0x15d9(0x9)]({'header':{'flexDirection':_0x15d9(0xa),'alignItems':_0x15d9(0xb),'padding':0x10,'backgroundColor':COLORS[_0x15d9(0xc)],'borderTopLeftRadius':0x10,'borderTopRightRadius':0x10},'backButton':{'padding':0x8,'marginRight':0x8},'titleContainer':{'flex':0x1},'title':{'fontSize':0x12,'fontWeight':_0x15d9(0xd),'color':'#000'},'subtitle':{'fontSize':0xe,'color':_0x15d9(0xe),'marginTop':0x4},'closeButton':{'padding':0x8}});
|
|
@@ -1,274 +1 @@
|
|
|
1
|
-
import React, { useState, useCallback, useEffect } from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, TextInput, TouchableOpacity, Keyboard, KeyboardAvoidingView, Platform } from 'react-native';
|
|
3
|
-
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
4
|
-
import { COLORS } from '../../constants';
|
|
5
|
-
export const PinInput = ({
|
|
6
|
-
onSubmit,
|
|
7
|
-
minLength = 6,
|
|
8
|
-
requireSpecialChar = true,
|
|
9
|
-
requireNumber = true
|
|
10
|
-
}) => {
|
|
11
|
-
const [pin, setPin] = useState('');
|
|
12
|
-
const [confirmPin, setConfirmPin] = useState('');
|
|
13
|
-
const [showPin, setShowPin] = useState(false);
|
|
14
|
-
const [errors, setErrors] = useState([]);
|
|
15
|
-
const [step, setStep] = useState('create');
|
|
16
|
-
|
|
17
|
-
// Validate pin whenever it changes
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (step === 'create') {
|
|
20
|
-
validatePin(pin);
|
|
21
|
-
}
|
|
22
|
-
}, [pin, step]);
|
|
23
|
-
|
|
24
|
-
// Validate PIN strength and requirements
|
|
25
|
-
const validatePin = useCallback(value => {
|
|
26
|
-
const newErrors = [];
|
|
27
|
-
if (value.length < minLength) {
|
|
28
|
-
newErrors.push(`PIN must be at least ${minLength} characters`);
|
|
29
|
-
}
|
|
30
|
-
if (requireNumber && !/\d/.test(value)) {
|
|
31
|
-
newErrors.push('PIN must include at least one number');
|
|
32
|
-
}
|
|
33
|
-
if (requireSpecialChar && !/[!@#$%^&*(),.?":{}|<>]/.test(value)) {
|
|
34
|
-
newErrors.push('PIN must include at least one special character');
|
|
35
|
-
}
|
|
36
|
-
setErrors(newErrors);
|
|
37
|
-
return newErrors.length === 0;
|
|
38
|
-
}, [minLength, requireNumber, requireSpecialChar]);
|
|
39
|
-
|
|
40
|
-
// Handle PIN submission
|
|
41
|
-
const handleSubmit = useCallback(() => {
|
|
42
|
-
if (step === 'create') {
|
|
43
|
-
if (validatePin(pin)) {
|
|
44
|
-
setStep('confirm');
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
// Confirm PIN
|
|
48
|
-
if (pin === confirmPin) {
|
|
49
|
-
Keyboard.dismiss();
|
|
50
|
-
onSubmit(pin);
|
|
51
|
-
} else {
|
|
52
|
-
setErrors(['PINs do not match']);
|
|
53
|
-
setConfirmPin('');
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}, [pin, confirmPin, step, validatePin, onSubmit]);
|
|
57
|
-
|
|
58
|
-
// Go back to PIN creation step
|
|
59
|
-
const handleBack = useCallback(() => {
|
|
60
|
-
setStep('create');
|
|
61
|
-
setConfirmPin('');
|
|
62
|
-
setErrors([]);
|
|
63
|
-
}, []);
|
|
64
|
-
|
|
65
|
-
// Toggle PIN visibility
|
|
66
|
-
const togglePinVisibility = useCallback(() => {
|
|
67
|
-
setShowPin(!showPin);
|
|
68
|
-
}, [showPin]);
|
|
69
|
-
return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
|
|
70
|
-
behavior: Platform.OS === 'ios' ? 'padding' : 'height',
|
|
71
|
-
style: styles.container
|
|
72
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
73
|
-
style: styles.content
|
|
74
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
75
|
-
style: styles.title
|
|
76
|
-
}, step === 'create' ? 'Create a PIN' : 'Confirm your PIN'), /*#__PURE__*/React.createElement(Text, {
|
|
77
|
-
style: styles.subtitle
|
|
78
|
-
}, step === 'create' ? 'This PIN will protect your Onairos account' : 'Please re-enter your PIN to confirm'), /*#__PURE__*/React.createElement(View, {
|
|
79
|
-
style: styles.inputContainer
|
|
80
|
-
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
81
|
-
style: styles.input,
|
|
82
|
-
value: step === 'create' ? pin : confirmPin,
|
|
83
|
-
onChangeText: step === 'create' ? setPin : setConfirmPin,
|
|
84
|
-
secureTextEntry: !showPin,
|
|
85
|
-
keyboardType: "default",
|
|
86
|
-
autoCapitalize: "none",
|
|
87
|
-
autoCorrect: false,
|
|
88
|
-
placeholder: step === 'create' ? 'Enter PIN' : 'Confirm PIN',
|
|
89
|
-
placeholderTextColor: "#999",
|
|
90
|
-
returnKeyType: "done",
|
|
91
|
-
onSubmitEditing: handleSubmit
|
|
92
|
-
}), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
93
|
-
style: styles.visibilityToggle,
|
|
94
|
-
onPress: togglePinVisibility
|
|
95
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
96
|
-
name: showPin ? 'visibility-off' : 'visibility',
|
|
97
|
-
size: 24,
|
|
98
|
-
color: "#999"
|
|
99
|
-
}))), errors.length > 0 && /*#__PURE__*/React.createElement(View, {
|
|
100
|
-
style: styles.errorContainer
|
|
101
|
-
}, errors.map((error, index) => /*#__PURE__*/React.createElement(View, {
|
|
102
|
-
key: index,
|
|
103
|
-
style: styles.errorItem
|
|
104
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
105
|
-
name: "error-outline",
|
|
106
|
-
size: 16,
|
|
107
|
-
color: "#f44336"
|
|
108
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
109
|
-
style: styles.errorText
|
|
110
|
-
}, error)))), step === 'create' && /*#__PURE__*/React.createElement(View, {
|
|
111
|
-
style: styles.requirementsContainer
|
|
112
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
113
|
-
style: styles.requirementsTitle
|
|
114
|
-
}, "PIN Requirements:"), /*#__PURE__*/React.createElement(View, {
|
|
115
|
-
style: styles.requirement
|
|
116
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
117
|
-
name: pin.length >= minLength ? 'check-circle' : 'radio-button-unchecked',
|
|
118
|
-
size: 16,
|
|
119
|
-
color: pin.length >= minLength ? '#4caf50' : '#999'
|
|
120
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
121
|
-
style: [styles.requirementText, {
|
|
122
|
-
color: pin.length >= minLength ? '#4caf50' : '#999'
|
|
123
|
-
}]
|
|
124
|
-
}, "At least ", minLength, " characters")), requireNumber && /*#__PURE__*/React.createElement(View, {
|
|
125
|
-
style: styles.requirement
|
|
126
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
127
|
-
name: /\d/.test(pin) ? 'check-circle' : 'radio-button-unchecked',
|
|
128
|
-
size: 16,
|
|
129
|
-
color: /\d/.test(pin) ? '#4caf50' : '#999'
|
|
130
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
131
|
-
style: [styles.requirementText, {
|
|
132
|
-
color: /\d/.test(pin) ? '#4caf50' : '#999'
|
|
133
|
-
}]
|
|
134
|
-
}, "Include at least one number")), requireSpecialChar && /*#__PURE__*/React.createElement(View, {
|
|
135
|
-
style: styles.requirement
|
|
136
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
137
|
-
name: /[!@#$%^&*(),.?":{}|<>]/.test(pin) ? 'check-circle' : 'radio-button-unchecked',
|
|
138
|
-
size: 16,
|
|
139
|
-
color: /[!@#$%^&*(),.?":{}|<>]/.test(pin) ? '#4caf50' : '#999'
|
|
140
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
141
|
-
style: [styles.requirementText, {
|
|
142
|
-
color: /[!@#$%^&*(),.?":{}|<>]/.test(pin) ? '#4caf50' : '#999'
|
|
143
|
-
}]
|
|
144
|
-
}, "Include at least one special character"))), /*#__PURE__*/React.createElement(View, {
|
|
145
|
-
style: styles.buttonContainer
|
|
146
|
-
}, step === 'confirm' && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
147
|
-
style: [styles.button, styles.backButton],
|
|
148
|
-
onPress: handleBack
|
|
149
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
150
|
-
name: "arrow-back",
|
|
151
|
-
size: 20,
|
|
152
|
-
color: COLORS.primary
|
|
153
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
154
|
-
style: [styles.buttonText, styles.backButtonText]
|
|
155
|
-
}, "Back")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
156
|
-
style: [styles.button, styles.nextButton, step === 'create' && errors.length > 0 || step === 'confirm' && !confirmPin ? styles.disabledButton : null],
|
|
157
|
-
onPress: handleSubmit,
|
|
158
|
-
disabled: step === 'create' && errors.length > 0 || step === 'confirm' && !confirmPin
|
|
159
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
160
|
-
style: [styles.buttonText, styles.nextButtonText]
|
|
161
|
-
}, step === 'create' ? 'Next' : 'Submit'), /*#__PURE__*/React.createElement(Icon, {
|
|
162
|
-
name: "arrow-forward",
|
|
163
|
-
size: 20,
|
|
164
|
-
color: "#fff"
|
|
165
|
-
})))));
|
|
166
|
-
};
|
|
167
|
-
const styles = StyleSheet.create({
|
|
168
|
-
container: {
|
|
169
|
-
flex: 1
|
|
170
|
-
},
|
|
171
|
-
content: {
|
|
172
|
-
padding: 24
|
|
173
|
-
},
|
|
174
|
-
title: {
|
|
175
|
-
fontSize: 24,
|
|
176
|
-
fontWeight: 'bold',
|
|
177
|
-
marginBottom: 8,
|
|
178
|
-
color: '#000'
|
|
179
|
-
},
|
|
180
|
-
subtitle: {
|
|
181
|
-
fontSize: 16,
|
|
182
|
-
color: '#666',
|
|
183
|
-
marginBottom: 24
|
|
184
|
-
},
|
|
185
|
-
inputContainer: {
|
|
186
|
-
flexDirection: 'row',
|
|
187
|
-
alignItems: 'center',
|
|
188
|
-
borderWidth: 1,
|
|
189
|
-
borderColor: '#ddd',
|
|
190
|
-
borderRadius: 8,
|
|
191
|
-
backgroundColor: '#f9f9f9',
|
|
192
|
-
marginBottom: 16
|
|
193
|
-
},
|
|
194
|
-
input: {
|
|
195
|
-
flex: 1,
|
|
196
|
-
paddingHorizontal: 16,
|
|
197
|
-
paddingVertical: 12,
|
|
198
|
-
fontSize: 16,
|
|
199
|
-
color: '#000'
|
|
200
|
-
},
|
|
201
|
-
visibilityToggle: {
|
|
202
|
-
padding: 12
|
|
203
|
-
},
|
|
204
|
-
errorContainer: {
|
|
205
|
-
marginBottom: 16
|
|
206
|
-
},
|
|
207
|
-
errorItem: {
|
|
208
|
-
flexDirection: 'row',
|
|
209
|
-
alignItems: 'center',
|
|
210
|
-
marginBottom: 4
|
|
211
|
-
},
|
|
212
|
-
errorText: {
|
|
213
|
-
color: '#f44336',
|
|
214
|
-
marginLeft: 6
|
|
215
|
-
},
|
|
216
|
-
requirementsContainer: {
|
|
217
|
-
backgroundColor: '#f5f5f5',
|
|
218
|
-
padding: 16,
|
|
219
|
-
borderRadius: 8,
|
|
220
|
-
marginBottom: 24
|
|
221
|
-
},
|
|
222
|
-
requirementsTitle: {
|
|
223
|
-
fontSize: 14,
|
|
224
|
-
fontWeight: '600',
|
|
225
|
-
marginBottom: 8,
|
|
226
|
-
color: '#000'
|
|
227
|
-
},
|
|
228
|
-
requirement: {
|
|
229
|
-
flexDirection: 'row',
|
|
230
|
-
alignItems: 'center',
|
|
231
|
-
marginBottom: 8
|
|
232
|
-
},
|
|
233
|
-
requirementText: {
|
|
234
|
-
marginLeft: 8,
|
|
235
|
-
fontSize: 14
|
|
236
|
-
},
|
|
237
|
-
buttonContainer: {
|
|
238
|
-
flexDirection: 'row',
|
|
239
|
-
justifyContent: 'space-between'
|
|
240
|
-
},
|
|
241
|
-
button: {
|
|
242
|
-
flexDirection: 'row',
|
|
243
|
-
alignItems: 'center',
|
|
244
|
-
paddingVertical: 12,
|
|
245
|
-
paddingHorizontal: 20,
|
|
246
|
-
borderRadius: 25
|
|
247
|
-
},
|
|
248
|
-
backButton: {
|
|
249
|
-
backgroundColor: 'transparent',
|
|
250
|
-
borderWidth: 1,
|
|
251
|
-
borderColor: COLORS.primary
|
|
252
|
-
},
|
|
253
|
-
nextButton: {
|
|
254
|
-
backgroundColor: COLORS.primary,
|
|
255
|
-
minWidth: 120,
|
|
256
|
-
justifyContent: 'center'
|
|
257
|
-
},
|
|
258
|
-
disabledButton: {
|
|
259
|
-
backgroundColor: '#ccc'
|
|
260
|
-
},
|
|
261
|
-
buttonText: {
|
|
262
|
-
fontSize: 16,
|
|
263
|
-
fontWeight: '600'
|
|
264
|
-
},
|
|
265
|
-
backButtonText: {
|
|
266
|
-
color: COLORS.primary,
|
|
267
|
-
marginLeft: 8
|
|
268
|
-
},
|
|
269
|
-
nextButtonText: {
|
|
270
|
-
color: '#fff',
|
|
271
|
-
marginRight: 8
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
//# sourceMappingURL=PinInput.js.map
|
|
1
|
+
import React,{useState,useCallback,useEffect}from'react';function _0x42df(_0x2bbf34,_0x42df5a){_0x2bbf34=_0x2bbf34-0x0;const _0x1910b2=_0x2bbf();let _0x455092=_0x1910b2[_0x2bbf34];return _0x455092;}import{View,Text,StyleSheet,TextInput,TouchableOpacity,Keyboard,KeyboardAvoidingView,Platform}from'react-native';function _0x2bbf(){const _0x8d50e2=['PINs\x20do\x20not\x20match','OGHLp','create','PIN\x20must\x20include\x20at\x20least\x20one\x20number','dGOXp','zuUJM','DhMTo','joeZL','onIFp','apeMx','height','Create\x20a\x20PIN','Confirm\x20your\x20PIN','Enter\x20PIN','Confirm\x20PIN','#999','visibility-off','check-circle','radio-button-unchecked','#4caf50','At\x20least\x20','\x20characters','Include\x20at\x20least\x20one\x20number','Include\x20at\x20least\x20one\x20special\x20character','arrow-back','Back','Next','#fff','NXgsC','Dduoj','lyxhp','QFrIM','BaVWH','XQunE','sHUkL','pRMoM','dismiss','JYJua','lRZaU','AEnsN','PIN\x20must\x20include\x20at\x20least\x20one\x20special\x20character','length','QFUNK','push','PIN\x20must\x20be\x20at\x20least\x20','zuWwZ','test','Kzbjo','eSzOx','sYtya','THHDK','RxjRy','FfztT','LaVyM','zCKMv','GKcFu','iNfgr','hNSnP','uomzM','lQzEc','CHhGt','qZhTQ','GMAsZ','confirm','qnwEM','OhZZQ','AXdMj','MOtPk','PkXMi','YWdBq','PQvRL','PLIIO','qxuvg','lSlkG','ios','padding','content','createElement','title','waqLA','AUfXH','subtitle','This\x20PIN\x20will\x20protect\x20your\x20Onairos\x20account','inputContainer','input','xvpSV','done','usQyZ','peajh','TVPax','QAQlj','map','errorItem','error-outline','errorText','requirementsTitle','DLXyh','requirement','lYQOj','GoKzb','dYYMO','XAFdu','requirementText','rvMNB','iSsMK','HTqbH','bcvnw','buttonContainer','HqfiY','button','UDSvT','primary','buttonText','backButtonText','XcNkp','RgErW','disabledButton','kfpWY','nextButtonText','LUprs','dvdso','Lnirw','bold','#000','#666','row','center','#ddd','#f9f9f9','#f44336','#f5f5f5','transparent','#ccc'];_0x2bbf=function(){return _0x8d50e2;};return _0x2bbf();}import _0x35d9f3 from'react-native-vector-icons/MaterialIcons';import{COLORS}from'../../constants';export const PinInput=({onSubmit:_0x28d4f4,minLength:minLength=0x6,requireSpecialChar:requireSpecialChar=!![],requireNumber:requireNumber=!![]})=>{const _0x4f9812={'pRMoM':function(_0x52e6ab,_0x5955d1){return _0x52e6ab===_0x5955d1;},'sHUkL':function(_0x4b999e,_0x49ac24){return _0x4b999e(_0x49ac24);},'JYJua':_0x42df(0x0),'ISBmF':function(_0x59eb43,_0x434efa){return _0x59eb43!==_0x434efa;},'XQunE':_0x42df(0x1),'lyxhp':_0x42df(0x2),'zuWwZ':function(_0x5db689,_0x5901e6){return _0x5db689(_0x5901e6);},'lRZaU':function(_0x4a37a5,_0x4b21d3){return _0x4a37a5<_0x4b21d3;},'AEnsN':_0x42df(0x3),'kypaw':function(_0x53ca68,_0x1d1022){return _0x53ca68<_0x1d1022;},'ISIAG':_0x42df(0x4),'Kzbjo':'IRUOV','FfztT':_0x42df(0x5),'LaVyM':function(_0x4c1890,_0x239907){return _0x4c1890(_0x239907);},'zCKMv':'confirm','GKcFu':function(_0x31a7c0,_0xd9407a){return _0x31a7c0===_0xd9407a;},'iNfgr':_0x42df(0x6),'ohxDn':function(_0x27f41f,_0x310b6a){return _0x27f41f===_0x310b6a;},'dJuit':function(_0x4e0601,_0x68c884){return _0x4e0601!==_0x68c884;},'hNSnP':_0x42df(0x7),'CHhGt':function(_0x5653f9,_0x298731){return _0x5653f9===_0x298731;},'GMAsZ':function(_0x4dbc82,_0x2c05bf){return _0x4dbc82(_0x2c05bf);},'lSlkG':function(_0x170417,_0x33722c){return _0x170417(_0x33722c);},'qxuvg':_0x42df(0x8),'pxjxZ':_0x42df(0x9),'QYKuc':function(_0x59177b,_0x295528){return _0x59177b(_0x295528);},'NXgsC':function(_0x35b394,_0x1f06a4){return _0x35b394(_0x1f06a4);},'Dduoj':function(_0x494a79,_0x12d16){return _0x494a79(_0x12d16);},'HJvjp':function(_0x5e1c90,_0x4c0896){return _0x5e1c90(_0x4c0896);},'DHedl':function(_0x4f4301,_0x5a1d42){return _0x4f4301(_0x5a1d42);},'QFrIM':function(_0x17ed13,_0x1ce7de,_0x326cdc){return _0x17ed13(_0x1ce7de,_0x326cdc);},'PkXMi':function(_0x45deed,_0x6e241a,_0x5ae1c6){return _0x45deed(_0x6e241a,_0x5ae1c6);},'CePbR':_0x42df(0xa),'waqLA':_0x42df(0xb),'AUfXH':_0x42df(0xc),'ADKTJ':function(_0x1e8026,_0x275a47){return _0x1e8026===_0x275a47;},'dlwOn':'none','xvpSV':_0x42df(0xd),'MSaVL':_0x42df(0xe),'TVPax':_0x42df(0xf),'usQyZ':_0x42df(0x10),'peajh':'visibility','QAQlj':function(_0x1d562c,_0x1a907f){return _0x1d562c>_0x1a907f;},'DLXyh':'PIN\x20Requirements:','dYYMO':function(_0x432cba,_0x27a24f){return _0x432cba>=_0x27a24f;},'lYQOj':_0x42df(0x11),'GoKzb':_0x42df(0x12),'XAFdu':_0x42df(0x13),'rvMNB':function(_0x5c0668,_0x1fb6f2){return _0x5c0668>=_0x1fb6f2;},'iSsMK':_0x42df(0x14),'OKBwL':_0x42df(0x15),'HTqbH':_0x42df(0x16),'bcvnw':_0x42df(0x17),'HqfiY':function(_0x186b48,_0x18b7a9){return _0x186b48===_0x18b7a9;},'UDSvT':_0x42df(0x18),'XcNkp':_0x42df(0x19),'ccHgs':function(_0x2ea6b2,_0x4641d5){return _0x2ea6b2===_0x4641d5;},'RgErW':function(_0x40d957,_0x5162dc){return _0x40d957>_0x5162dc;},'kfpWY':function(_0x2de6f4,_0x3790ca){return _0x2de6f4>_0x3790ca;},'eJGGa':function(_0x454528,_0x501b24){return _0x454528===_0x501b24;},'LUprs':_0x42df(0x1a),'dvdso':'Submit','Lnirw':_0x42df(0x1b)},[_0x49ec30,_0x5ec6ab]=_0x4f9812['QYKuc'](useState,''),[_0x1aa96e,_0x42970e]=_0x4f9812[_0x42df(0x1c)](useState,''),[_0x5950f5,_0x475799]=_0x4f9812[_0x42df(0x1d)](useState,![]),[_0x44da4,_0x315489]=_0x4f9812['HJvjp'](useState,[]),[_0x1a3b49,_0x261550]=_0x4f9812['DHedl'](useState,_0x4f9812[_0x42df(0x1e)]);_0x4f9812[_0x42df(0x1f)](useEffect,()=>{_0x4f9812['ISBmF'](_0x42df(0x20),_0x4f9812[_0x42df(0x21)])?_0x4f9812['pRMoM'](_0x1a3b49,_0x4f9812[_0x42df(0x1e)])&&_0x4f9812[_0x42df(0x22)](_0x48c4d3,_0x49ec30):_0x4f9812[_0x42df(0x23)](_0x14ebc9,_0x5f4280)?(_0x403527[_0x42df(0x24)](),_0x4f9812[_0x42df(0x22)](_0x31cd2e,_0x178ddd)):(_0x4f9812[_0x42df(0x22)](_0x4b3703,[_0x4f9812[_0x42df(0x25)]]),_0x4aeb9c(''));},[_0x49ec30,_0x1a3b49]);const _0x48c4d3=useCallback(_0x25b71d=>{const _0x105c33={'eSzOx':function(_0x548d45,_0x1ee47f){return _0x4f9812[_0x42df(0x26)](_0x548d45,_0x1ee47f);},'sYtya':_0x4f9812[_0x42df(0x27)],'THHDK':_0x42df(0x28),'RxjRy':function(_0x404d18,_0x4d8ae0){return _0x4f9812['pRMoM'](_0x404d18,_0x4d8ae0);}},_0x69fc02=[];_0x4f9812['kypaw'](_0x25b71d[_0x42df(0x29)],minLength)&&(_0x42df(0x2a)!=='Avmcd'?_0x69fc02[_0x42df(0x2b)](_0x42df(0x2c)+minLength+_0x42df(0x15)):(_0x3b0e61(_0x42df(0x2)),_0x4f9812[_0x42df(0x2d)](_0x52db21,''),_0x4f9812[_0x42df(0x2d)](_0x2e145b,[])));requireNumber&&!/\d/['test'](_0x25b71d)&&_0x69fc02[_0x42df(0x2b)](_0x4f9812['AEnsN']);if(requireSpecialChar&&!/[!@#$%^&*(),.?":{}|<>]/[_0x42df(0x2e)](_0x25b71d)){if(_0x4f9812[_0x42df(0x23)](_0x4f9812['ISIAG'],_0x4f9812[_0x42df(0x2f)])){const _0x539f96=[];return _0x105c33[_0x42df(0x30)](_0x2d385e[_0x42df(0x29)],_0x1dd3fc)&&_0x539f96[_0x42df(0x2b)]('PIN\x20must\x20be\x20at\x20least\x20'+_0x3eeca8+_0x42df(0x15)),_0x25b5e3&&!/\d/[_0x42df(0x2e)](_0x5ec20a)&&_0x539f96['push'](_0x105c33[_0x42df(0x31)]),_0x40709f&&!/[!@#$%^&*(),.?":{}|<>]/[_0x42df(0x2e)](_0x125a61)&&_0x539f96[_0x42df(0x2b)](_0x105c33[_0x42df(0x32)]),_0x2dcb2e(_0x539f96),_0x105c33[_0x42df(0x33)](_0x539f96[_0x42df(0x29)],0x0);}else _0x69fc02[_0x42df(0x2b)](_0x42df(0x28));}return _0x315489(_0x69fc02),_0x69fc02[_0x42df(0x29)]===0x0;},[minLength,requireNumber,requireSpecialChar]),_0x31bb94=_0x4f9812['PkXMi'](useCallback,()=>{const _0x40f886={'lQzEc':function(_0x343e50,_0x32fbc){return _0x4f9812['zuWwZ'](_0x343e50,_0x32fbc);},'uomzM':_0x4f9812[_0x42df(0x25)],'qnwEM':function(_0x31c8c5,_0x1e4379){return _0x31c8c5===_0x1e4379;},'OhZZQ':_0x4f9812['lyxhp'],'AXdMj':function(_0x5f3ccd,_0x120503){return _0x4f9812['zuWwZ'](_0x5f3ccd,_0x120503);},'MOtPk':function(_0x31345c,_0x434ee4){return _0x4f9812[_0x42df(0x2d)](_0x31345c,_0x434ee4);}};_0x4f9812['pRMoM'](_0x4f9812[_0x42df(0x34)],_0x4f9812[_0x42df(0x34)])?_0x1a3b49===_0x4f9812[_0x42df(0x1e)]?_0x4f9812[_0x42df(0x2d)](_0x48c4d3,_0x49ec30)&&_0x4f9812[_0x42df(0x35)](_0x261550,_0x4f9812[_0x42df(0x36)]):_0x4f9812[_0x42df(0x37)](_0x4f9812[_0x42df(0x38)],_0x42df(0x6))?_0x4f9812['ohxDn'](_0x49ec30,_0x1aa96e)?_0x4f9812['dJuit'](_0x4f9812[_0x42df(0x39)],_0x4f9812[_0x42df(0x39)])?(_0x40f886['lQzEc'](_0x4c9a9b,[_0x40f886[_0x42df(0x3a)]]),_0x40f886[_0x42df(0x3b)](_0x48ddd8,'')):(Keyboard['dismiss'](),_0x4f9812[_0x42df(0x22)](_0x28d4f4,_0x49ec30)):_0x4f9812[_0x42df(0x3c)]('qZhTQ',_0x42df(0x3d))?(_0x4f9812[_0x42df(0x3e)](_0x315489,[_0x4f9812[_0x42df(0x25)]]),_0x4f9812['zuWwZ'](_0x42970e,'')):_0x11393e(_0x42df(0x3f)):_0x40f886[_0x42df(0x40)](_0x1431b4,_0x40f886[_0x42df(0x41)])&&_0x40f886[_0x42df(0x42)](_0x73f145,_0x16ebe4):_0x40f886[_0x42df(0x43)](_0x2ff3d3,!_0x49318e);},[_0x49ec30,_0x1aa96e,_0x1a3b49,_0x48c4d3,_0x28d4f4]),_0x5e26b9=_0x4f9812[_0x42df(0x44)](useCallback,()=>{const _0x9c5a39={'PLIIO':function(_0x5118d6,_0x2f042c){return _0x4f9812[_0x42df(0x35)](_0x5118d6,_0x2f042c);}};_0x4f9812[_0x42df(0x3c)](_0x42df(0x45),_0x42df(0x46))?_0x9c5a39[_0x42df(0x47)](_0x3ef585,_0x174198):(_0x4f9812['sHUkL'](_0x261550,_0x4f9812['lyxhp']),_0x4f9812[_0x42df(0x2d)](_0x42970e,''),_0x4f9812['lSlkG'](_0x315489,[]));},[]),_0x1eae25=_0x4f9812[_0x42df(0x1f)](useCallback,()=>{_0x4f9812[_0x42df(0x48)]!==_0x4f9812['pxjxZ']?_0x4f9812[_0x42df(0x49)](_0x475799,!_0x5950f5):_0x34cf3a[_0x42df(0x2b)](_0x4f9812[_0x42df(0x27)]);},[_0x5950f5]);return React['createElement'](KeyboardAvoidingView,{'behavior':Platform['OS']===_0x42df(0x4a)?_0x42df(0x4b):_0x4f9812['CePbR'],'style':styles['container']},React['createElement'](View,{'style':styles[_0x42df(0x4c)]},React[_0x42df(0x4d)](Text,{'style':styles[_0x42df(0x4e)]},_0x4f9812[_0x42df(0x37)](_0x1a3b49,'create')?_0x4f9812[_0x42df(0x4f)]:_0x4f9812[_0x42df(0x50)]),React[_0x42df(0x4d)](Text,{'style':styles[_0x42df(0x51)]},_0x4f9812['ADKTJ'](_0x1a3b49,_0x42df(0x2))?_0x42df(0x52):'Please\x20re-enter\x20your\x20PIN\x20to\x20confirm'),React[_0x42df(0x4d)](View,{'style':styles[_0x42df(0x53)]},React['createElement'](TextInput,{'style':styles[_0x42df(0x54)],'value':_0x4f9812[_0x42df(0x37)](_0x1a3b49,_0x4f9812['lyxhp'])?_0x49ec30:_0x1aa96e,'onChangeText':_0x4f9812['ADKTJ'](_0x1a3b49,_0x42df(0x2))?_0x5ec6ab:_0x42970e,'secureTextEntry':!_0x5950f5,'keyboardType':'default','autoCapitalize':_0x4f9812['dlwOn'],'autoCorrect':![],'placeholder':_0x1a3b49===_0x4f9812[_0x42df(0x1e)]?_0x4f9812[_0x42df(0x55)]:_0x4f9812['MSaVL'],'placeholderTextColor':_0x4f9812['TVPax'],'returnKeyType':_0x42df(0x56),'onSubmitEditing':_0x31bb94}),React[_0x42df(0x4d)](TouchableOpacity,{'style':styles['visibilityToggle'],'onPress':_0x1eae25},React[_0x42df(0x4d)](_0x35d9f3,{'name':_0x5950f5?_0x4f9812[_0x42df(0x57)]:_0x4f9812[_0x42df(0x58)],'size':0x18,'color':_0x4f9812[_0x42df(0x59)]}))),_0x4f9812[_0x42df(0x5a)](_0x44da4[_0x42df(0x29)],0x0)&&React[_0x42df(0x4d)](View,{'style':styles['errorContainer']},_0x44da4[_0x42df(0x5b)]((_0x3807a7,_0xa9a01b)=>React['createElement'](View,{'key':_0xa9a01b,'style':styles[_0x42df(0x5c)]},React[_0x42df(0x4d)](_0x35d9f3,{'name':_0x42df(0x5d),'size':0x10,'color':'#f44336'}),React[_0x42df(0x4d)](Text,{'style':styles[_0x42df(0x5e)]},_0x3807a7)))),_0x4f9812[_0x42df(0x37)](_0x1a3b49,_0x4f9812[_0x42df(0x1e)])&&React['createElement'](View,{'style':styles['requirementsContainer']},React[_0x42df(0x4d)](Text,{'style':styles[_0x42df(0x5f)]},_0x4f9812[_0x42df(0x60)]),React[_0x42df(0x4d)](View,{'style':styles[_0x42df(0x61)]},React[_0x42df(0x4d)](_0x35d9f3,{'name':_0x4f9812['dYYMO'](_0x49ec30[_0x42df(0x29)],minLength)?_0x4f9812[_0x42df(0x62)]:_0x4f9812[_0x42df(0x63)],'size':0x10,'color':_0x4f9812[_0x42df(0x64)](_0x49ec30[_0x42df(0x29)],minLength)?_0x4f9812[_0x42df(0x65)]:_0x42df(0xf)}),React[_0x42df(0x4d)](Text,{'style':[styles[_0x42df(0x66)],{'color':_0x4f9812[_0x42df(0x67)](_0x49ec30[_0x42df(0x29)],minLength)?_0x4f9812['XAFdu']:_0x4f9812[_0x42df(0x59)]}]},_0x4f9812[_0x42df(0x68)],minLength,_0x4f9812['OKBwL'])),requireNumber&&React[_0x42df(0x4d)](View,{'style':styles['requirement']},React[_0x42df(0x4d)](_0x35d9f3,{'name':/\d/['test'](_0x49ec30)?_0x4f9812[_0x42df(0x62)]:_0x4f9812[_0x42df(0x63)],'size':0x10,'color':/\d/[_0x42df(0x2e)](_0x49ec30)?_0x4f9812['XAFdu']:_0x4f9812['TVPax']}),React['createElement'](Text,{'style':[styles[_0x42df(0x66)],{'color':/\d/[_0x42df(0x2e)](_0x49ec30)?_0x4f9812[_0x42df(0x65)]:_0x4f9812[_0x42df(0x59)]}]},_0x4f9812[_0x42df(0x69)])),requireSpecialChar&&React[_0x42df(0x4d)](View,{'style':styles['requirement']},React[_0x42df(0x4d)](_0x35d9f3,{'name':/[!@#$%^&*(),.?":{}|<>]/[_0x42df(0x2e)](_0x49ec30)?_0x4f9812[_0x42df(0x62)]:_0x4f9812[_0x42df(0x63)],'size':0x10,'color':/[!@#$%^&*(),.?":{}|<>]/[_0x42df(0x2e)](_0x49ec30)?_0x4f9812[_0x42df(0x65)]:_0x4f9812[_0x42df(0x59)]}),React[_0x42df(0x4d)](Text,{'style':[styles[_0x42df(0x66)],{'color':/[!@#$%^&*(),.?":{}|<>]/['test'](_0x49ec30)?_0x4f9812[_0x42df(0x65)]:_0x4f9812[_0x42df(0x59)]}]},_0x4f9812[_0x42df(0x6a)]))),React[_0x42df(0x4d)](View,{'style':styles[_0x42df(0x6b)]},_0x4f9812[_0x42df(0x6c)](_0x1a3b49,'confirm')&&React['createElement'](TouchableOpacity,{'style':[styles[_0x42df(0x6d)],styles['backButton']],'onPress':_0x5e26b9},React[_0x42df(0x4d)](_0x35d9f3,{'name':_0x4f9812[_0x42df(0x6e)],'size':0x14,'color':COLORS[_0x42df(0x6f)]}),React[_0x42df(0x4d)](Text,{'style':[styles[_0x42df(0x70)],styles[_0x42df(0x71)]]},_0x4f9812[_0x42df(0x72)])),React[_0x42df(0x4d)](TouchableOpacity,{'style':[styles['button'],styles['nextButton'],_0x4f9812['ccHgs'](_0x1a3b49,_0x4f9812['lyxhp'])&&_0x4f9812[_0x42df(0x73)](_0x44da4[_0x42df(0x29)],0x0)||_0x1a3b49===_0x4f9812['zCKMv']&&!_0x1aa96e?styles[_0x42df(0x74)]:null],'onPress':_0x31bb94,'disabled':_0x1a3b49===_0x4f9812[_0x42df(0x1e)]&&_0x4f9812[_0x42df(0x75)](_0x44da4[_0x42df(0x29)],0x0)||_0x4f9812['eJGGa'](_0x1a3b49,_0x42df(0x3f))&&!_0x1aa96e},React[_0x42df(0x4d)](Text,{'style':[styles[_0x42df(0x70)],styles[_0x42df(0x76)]]},_0x4f9812[_0x42df(0x6c)](_0x1a3b49,_0x4f9812[_0x42df(0x1e)])?_0x4f9812[_0x42df(0x77)]:_0x4f9812[_0x42df(0x78)]),React[_0x42df(0x4d)](_0x35d9f3,{'name':'arrow-forward','size':0x14,'color':_0x4f9812[_0x42df(0x79)]})))));};const styles=StyleSheet[_0x42df(0x2)]({'container':{'flex':0x1},'content':{'padding':0x18},'title':{'fontSize':0x18,'fontWeight':_0x42df(0x7a),'marginBottom':0x8,'color':_0x42df(0x7b)},'subtitle':{'fontSize':0x10,'color':_0x42df(0x7c),'marginBottom':0x18},'inputContainer':{'flexDirection':_0x42df(0x7d),'alignItems':_0x42df(0x7e),'borderWidth':0x1,'borderColor':_0x42df(0x7f),'borderRadius':0x8,'backgroundColor':_0x42df(0x80),'marginBottom':0x10},'input':{'flex':0x1,'paddingHorizontal':0x10,'paddingVertical':0xc,'fontSize':0x10,'color':'#000'},'visibilityToggle':{'padding':0xc},'errorContainer':{'marginBottom':0x10},'errorItem':{'flexDirection':_0x42df(0x7d),'alignItems':_0x42df(0x7e),'marginBottom':0x4},'errorText':{'color':_0x42df(0x81),'marginLeft':0x6},'requirementsContainer':{'backgroundColor':_0x42df(0x82),'padding':0x10,'borderRadius':0x8,'marginBottom':0x18},'requirementsTitle':{'fontSize':0xe,'fontWeight':'600','marginBottom':0x8,'color':_0x42df(0x7b)},'requirement':{'flexDirection':_0x42df(0x7d),'alignItems':'center','marginBottom':0x8},'requirementText':{'marginLeft':0x8,'fontSize':0xe},'buttonContainer':{'flexDirection':_0x42df(0x7d),'justifyContent':'space-between'},'button':{'flexDirection':_0x42df(0x7d),'alignItems':_0x42df(0x7e),'paddingVertical':0xc,'paddingHorizontal':0x14,'borderRadius':0x19},'backButton':{'backgroundColor':_0x42df(0x83),'borderWidth':0x1,'borderColor':COLORS[_0x42df(0x6f)]},'nextButton':{'backgroundColor':COLORS[_0x42df(0x6f)],'minWidth':0x78,'justifyContent':_0x42df(0x7e)},'disabledButton':{'backgroundColor':_0x42df(0x84)},'buttonText':{'fontSize':0x10,'fontWeight':'600'},'backButtonText':{'color':COLORS['primary'],'marginLeft':0x8},'nextButtonText':{'color':'#fff','marginRight':0x8}});
|
|
@@ -1,240 +1 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, TouchableOpacity, ActivityIndicator, ScrollView } from 'react-native';
|
|
3
|
-
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
4
|
-
import { COLORS } from '../../constants';
|
|
5
|
-
import { OAuthWebView } from './OAuthWebView';
|
|
6
|
-
// Platform definitions
|
|
7
|
-
const PLATFORMS = {
|
|
8
|
-
instagram: {
|
|
9
|
-
name: 'Instagram',
|
|
10
|
-
icon: 'photo-camera',
|
|
11
|
-
color: '#E1306C',
|
|
12
|
-
description: 'Connect to share and analyze your Instagram content'
|
|
13
|
-
},
|
|
14
|
-
youtube: {
|
|
15
|
-
name: 'YouTube',
|
|
16
|
-
icon: 'smart-display',
|
|
17
|
-
color: '#FF0000',
|
|
18
|
-
description: 'Connect for YouTube video recommendations and analysis'
|
|
19
|
-
},
|
|
20
|
-
pinterest: {
|
|
21
|
-
name: 'Pinterest',
|
|
22
|
-
icon: 'push-pin',
|
|
23
|
-
color: '#E60023',
|
|
24
|
-
description: 'Connect to enhance Pinterest board recommendations'
|
|
25
|
-
},
|
|
26
|
-
reddit: {
|
|
27
|
-
name: 'Reddit',
|
|
28
|
-
icon: 'forum',
|
|
29
|
-
color: '#FF4500',
|
|
30
|
-
description: 'Connect to personalize Reddit content insights'
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export const PlatformConnector = ({
|
|
34
|
-
connections,
|
|
35
|
-
onConnect,
|
|
36
|
-
onDisconnect,
|
|
37
|
-
isLoading,
|
|
38
|
-
canProceed,
|
|
39
|
-
onProceed
|
|
40
|
-
}) => {
|
|
41
|
-
const [activeWebview, setActiveWebview] = useState(null);
|
|
42
|
-
const handleConnectPress = async platform => {
|
|
43
|
-
setActiveWebview(platform);
|
|
44
|
-
};
|
|
45
|
-
const handleWebViewComplete = () => {
|
|
46
|
-
setActiveWebview(null);
|
|
47
|
-
};
|
|
48
|
-
const handleWebViewClose = () => {
|
|
49
|
-
setActiveWebview(null);
|
|
50
|
-
};
|
|
51
|
-
const handleDisconnectPress = async platform => {
|
|
52
|
-
await onDisconnect(platform);
|
|
53
|
-
};
|
|
54
|
-
const getPlatformStatus = platform => {
|
|
55
|
-
const platformKey = platform;
|
|
56
|
-
return connections[platformKey] ? true : false;
|
|
57
|
-
};
|
|
58
|
-
const getConnectedCount = () => {
|
|
59
|
-
return Object.values(connections).filter(Boolean).length;
|
|
60
|
-
};
|
|
61
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
62
|
-
style: styles.container
|
|
63
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
64
|
-
style: styles.title
|
|
65
|
-
}, "Connect Your Platforms"), /*#__PURE__*/React.createElement(Text, {
|
|
66
|
-
style: styles.subtitle
|
|
67
|
-
}, "Connect at least 2 platforms to create your Onairos account"), /*#__PURE__*/React.createElement(ScrollView, {
|
|
68
|
-
style: styles.platformList
|
|
69
|
-
}, Object.keys(PLATFORMS).map(platform => {
|
|
70
|
-
var _connections;
|
|
71
|
-
const platformInfo = PLATFORMS[platform];
|
|
72
|
-
const isConnected = getPlatformStatus(platform);
|
|
73
|
-
const userName = isConnected ? (_connections = connections[platform]) === null || _connections === void 0 ? void 0 : _connections.userName : null;
|
|
74
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
75
|
-
key: platform,
|
|
76
|
-
style: styles.platformItem
|
|
77
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
78
|
-
style: styles.platformInfo
|
|
79
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
80
|
-
style: [styles.platformIcon, {
|
|
81
|
-
backgroundColor: platformInfo.color
|
|
82
|
-
}]
|
|
83
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
84
|
-
name: platformInfo.icon,
|
|
85
|
-
size: 24,
|
|
86
|
-
color: "#fff"
|
|
87
|
-
})), /*#__PURE__*/React.createElement(View, {
|
|
88
|
-
style: styles.platformText
|
|
89
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
90
|
-
style: styles.platformName
|
|
91
|
-
}, platformInfo.name), /*#__PURE__*/React.createElement(Text, {
|
|
92
|
-
style: styles.platformDescription
|
|
93
|
-
}, isConnected ? `Connected as ${userName}` : platformInfo.description))), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
94
|
-
style: [styles.platformButton, isConnected ? styles.disconnectButton : styles.connectButton],
|
|
95
|
-
onPress: () => isConnected ? handleDisconnectPress(platform) : handleConnectPress(platform),
|
|
96
|
-
disabled: isLoading
|
|
97
|
-
}, isLoading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
98
|
-
size: "small",
|
|
99
|
-
color: "#fff"
|
|
100
|
-
}) : /*#__PURE__*/React.createElement(Text, {
|
|
101
|
-
style: styles.buttonText
|
|
102
|
-
}, isConnected ? 'Disconnect' : 'Connect')));
|
|
103
|
-
})), /*#__PURE__*/React.createElement(View, {
|
|
104
|
-
style: styles.footer
|
|
105
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
106
|
-
style: styles.connectionStatus
|
|
107
|
-
}, getConnectedCount(), " of ", Object.keys(PLATFORMS).length, " platforms connected"), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
108
|
-
style: [styles.proceedButton, canProceed ? styles.proceedActive : styles.proceedInactive],
|
|
109
|
-
onPress: onProceed,
|
|
110
|
-
disabled: !canProceed
|
|
111
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
112
|
-
style: [styles.proceedText, canProceed ? styles.proceedTextActive : styles.proceedTextInactive]
|
|
113
|
-
}, "Continue"), /*#__PURE__*/React.createElement(Icon, {
|
|
114
|
-
name: "arrow-forward",
|
|
115
|
-
size: 20,
|
|
116
|
-
color: canProceed ? '#fff' : '#999'
|
|
117
|
-
}))), activeWebview && /*#__PURE__*/React.createElement(OAuthWebView, {
|
|
118
|
-
url: `https://oauth.example.com/${activeWebview}` // This would be replaced with actual OAuth URL
|
|
119
|
-
,
|
|
120
|
-
platform: activeWebview,
|
|
121
|
-
onComplete: handleWebViewComplete,
|
|
122
|
-
onClose: handleWebViewClose,
|
|
123
|
-
onSuccess: code => {
|
|
124
|
-
console.log(`Received authorization code for ${activeWebview}: ${code}`);
|
|
125
|
-
// In a real implementation, we'd pass this code to our API service
|
|
126
|
-
handleWebViewComplete();
|
|
127
|
-
}
|
|
128
|
-
}));
|
|
129
|
-
};
|
|
130
|
-
const styles = StyleSheet.create({
|
|
131
|
-
container: {
|
|
132
|
-
flex: 1,
|
|
133
|
-
padding: 16
|
|
134
|
-
},
|
|
135
|
-
title: {
|
|
136
|
-
fontSize: 24,
|
|
137
|
-
fontWeight: 'bold',
|
|
138
|
-
marginBottom: 8,
|
|
139
|
-
color: '#000'
|
|
140
|
-
},
|
|
141
|
-
subtitle: {
|
|
142
|
-
fontSize: 16,
|
|
143
|
-
color: '#666',
|
|
144
|
-
marginBottom: 24
|
|
145
|
-
},
|
|
146
|
-
platformList: {
|
|
147
|
-
flex: 1
|
|
148
|
-
},
|
|
149
|
-
platformItem: {
|
|
150
|
-
flexDirection: 'row',
|
|
151
|
-
alignItems: 'center',
|
|
152
|
-
marginBottom: 16,
|
|
153
|
-
padding: 12,
|
|
154
|
-
backgroundColor: '#f8f8f8',
|
|
155
|
-
borderRadius: 12,
|
|
156
|
-
borderWidth: 1,
|
|
157
|
-
borderColor: '#eee'
|
|
158
|
-
},
|
|
159
|
-
platformInfo: {
|
|
160
|
-
flex: 1,
|
|
161
|
-
flexDirection: 'row',
|
|
162
|
-
alignItems: 'center'
|
|
163
|
-
},
|
|
164
|
-
platformIcon: {
|
|
165
|
-
width: 40,
|
|
166
|
-
height: 40,
|
|
167
|
-
borderRadius: 20,
|
|
168
|
-
justifyContent: 'center',
|
|
169
|
-
alignItems: 'center',
|
|
170
|
-
marginRight: 12
|
|
171
|
-
},
|
|
172
|
-
platformText: {
|
|
173
|
-
flex: 1
|
|
174
|
-
},
|
|
175
|
-
platformName: {
|
|
176
|
-
fontSize: 16,
|
|
177
|
-
fontWeight: '600',
|
|
178
|
-
marginBottom: 4,
|
|
179
|
-
color: '#000'
|
|
180
|
-
},
|
|
181
|
-
platformDescription: {
|
|
182
|
-
fontSize: 14,
|
|
183
|
-
color: '#666'
|
|
184
|
-
},
|
|
185
|
-
platformButton: {
|
|
186
|
-
paddingHorizontal: 16,
|
|
187
|
-
paddingVertical: 8,
|
|
188
|
-
borderRadius: 20,
|
|
189
|
-
justifyContent: 'center',
|
|
190
|
-
alignItems: 'center',
|
|
191
|
-
minWidth: 100
|
|
192
|
-
},
|
|
193
|
-
connectButton: {
|
|
194
|
-
backgroundColor: COLORS.primary
|
|
195
|
-
},
|
|
196
|
-
disconnectButton: {
|
|
197
|
-
backgroundColor: '#f44336'
|
|
198
|
-
},
|
|
199
|
-
buttonText: {
|
|
200
|
-
color: '#fff',
|
|
201
|
-
fontWeight: '600'
|
|
202
|
-
},
|
|
203
|
-
footer: {
|
|
204
|
-
flexDirection: 'row',
|
|
205
|
-
alignItems: 'center',
|
|
206
|
-
justifyContent: 'space-between',
|
|
207
|
-
paddingTop: 16,
|
|
208
|
-
borderTopWidth: 1,
|
|
209
|
-
borderTopColor: '#eee',
|
|
210
|
-
marginTop: 16
|
|
211
|
-
},
|
|
212
|
-
connectionStatus: {
|
|
213
|
-
fontSize: 14,
|
|
214
|
-
color: '#666'
|
|
215
|
-
},
|
|
216
|
-
proceedButton: {
|
|
217
|
-
flexDirection: 'row',
|
|
218
|
-
alignItems: 'center',
|
|
219
|
-
paddingHorizontal: 16,
|
|
220
|
-
paddingVertical: 10,
|
|
221
|
-
borderRadius: 24
|
|
222
|
-
},
|
|
223
|
-
proceedActive: {
|
|
224
|
-
backgroundColor: COLORS.primary
|
|
225
|
-
},
|
|
226
|
-
proceedInactive: {
|
|
227
|
-
backgroundColor: '#eee'
|
|
228
|
-
},
|
|
229
|
-
proceedText: {
|
|
230
|
-
fontWeight: '600',
|
|
231
|
-
marginRight: 8
|
|
232
|
-
},
|
|
233
|
-
proceedTextActive: {
|
|
234
|
-
color: '#fff'
|
|
235
|
-
},
|
|
236
|
-
proceedTextInactive: {
|
|
237
|
-
color: '#999'
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
//# sourceMappingURL=PlatformConnector.js.map
|
|
1
|
+
import React,{useState}from'react';function _0x5b26(_0x517188,_0x5b26c2){_0x517188=_0x517188-0x0;const _0x1d3d28=_0x5171();let _0x1e1b65=_0x1d3d28[_0x517188];return _0x1e1b65;}import{View,Text,StyleSheet,TouchableOpacity,ActivityIndicator,ScrollView}from'react-native';import _0x12647e from'react-native-vector-icons/MaterialIcons';import{COLORS}from'../../constants';function _0x5171(){const _0x2b8491=['Instagram','photo-camera','#E1306C','smart-display','#FF0000','Pinterest','push-pin','Reddit','Connect\x20to\x20personalize\x20Reddit\x20content\x20insights','#fff','small','Disconnect','Connect','xinVN','Connect\x20Your\x20Platforms','Connect\x20at\x20least\x202\x20platforms\x20to\x20create\x20your\x20Onairos\x20account','Continue','KBTRj','Xyurc','gOMHD','KupSI','xFSeu','values','filter','length','hKHvV','lATWS','container','createElement','title','ujydt','platformList','keys','map','rJiOU','wLVRF','log','Received\x20authorization\x20code\x20for\x20','UPRau','gpylI','etjmM','userName','platformItem','platformIcon','color','icon','hhCYW','platformText','platformName','name','platformDescription','Connected\x20as\x20','description','disconnectButton','connectButton','wgDzl','iGdVf','footer','connectionStatus','UcWEe','ZBULS','proceedActive','proceedInactive','proceedText','xOyNm','qUVMz','#999','https://oauth.example.com/','PKZaD','zRAnF','Ashza','QorOu','kDeRZ','platformInfo','platformButton','hhvIa','buttonText','itayf','create','bold','row','center','#f8f8f8','#eee','#666','primary','#f44336','600','space-between'];_0x5171=function(){return _0x2b8491;};return _0x5171();}import{OAuthWebView}from'./OAuthWebView';const PLATFORMS={'instagram':{'name':_0x5b26(0x0),'icon':_0x5b26(0x1),'color':_0x5b26(0x2),'description':'Connect\x20to\x20share\x20and\x20analyze\x20your\x20Instagram\x20content'},'youtube':{'name':'YouTube','icon':_0x5b26(0x3),'color':_0x5b26(0x4),'description':'Connect\x20for\x20YouTube\x20video\x20recommendations\x20and\x20analysis'},'pinterest':{'name':_0x5b26(0x5),'icon':_0x5b26(0x6),'color':'#E60023','description':'Connect\x20to\x20enhance\x20Pinterest\x20board\x20recommendations'},'reddit':{'name':_0x5b26(0x7),'icon':'forum','color':'#FF4500','description':_0x5b26(0x8)}};export const PlatformConnector=({connections:_0x2e42a6,onConnect:_0x5cd289,onDisconnect:_0xbd79d8,isLoading:_0x219021,canProceed:_0x38cd6a,onProceed:_0x40ac31})=>{const _0x33ea9e={'Xyurc':function(_0x247527,_0x286779){return _0x247527(_0x286779);},'gOMHD':function(_0x383ce8,_0x2e5330){return _0x383ce8(_0x2e5330);},'KupSI':function(_0x150ea9,_0x2d5406){return _0x150ea9(_0x2d5406);},'xFSeu':'JSiXA','hKHvV':'gtSQo','QorOu':function(_0x15c925){return _0x15c925();},'NOaVo':function(_0x63032f,_0x32b5ea){return _0x63032f===_0x32b5ea;},'wLVRF':'fMFcF','gpylI':function(_0x5b4269,_0x455643){return _0x5b4269===_0x455643;},'etjmM':function(_0x17ceb0,_0x20d3e6){return _0x17ceb0===_0x20d3e6;},'hhCYW':_0x5b26(0x9),'wgDzl':_0x5b26(0xa),'iGdVf':_0x5b26(0xb),'PKZaD':_0x5b26(0xc),'zRAnF':function(_0x36b233,_0x574203){return _0x36b233!==_0x574203;},'Ashza':_0x5b26(0xd),'KBTRj':function(_0x4fb85d,_0x550ed1){return _0x4fb85d(_0x550ed1);},'uXMiK':_0x5b26(0xe),'ujydt':_0x5b26(0xf),'UcWEe':'\x20of\x20','ZBULS':'\x20platforms\x20connected','xOyNm':_0x5b26(0x10),'qUVMz':'arrow-forward'},[_0x21798c,_0x34dc88]=_0x33ea9e[_0x5b26(0x11)](useState,null),_0x17bff5=async _0x41534c=>{_0x33ea9e[_0x5b26(0x12)](_0x34dc88,_0x41534c);},_0x42d0fa=()=>{_0x33ea9e[_0x5b26(0x13)](_0x34dc88,null);},_0x282f1c=()=>{_0x33ea9e[_0x5b26(0x14)](_0x34dc88,null);},_0x28554f=async _0x3a9652=>{if(_0x33ea9e[_0x5b26(0x15)]===_0x33ea9e[_0x5b26(0x15)])await _0xbd79d8(_0x3a9652);else return _0x182af7[_0x5b26(0x16)](_0x22087f)[_0x5b26(0x17)](_0x3e9d62)[_0x5b26(0x18)];},_0x1edae6=_0x1f21cd=>{const _0x21762b=_0x1f21cd;return _0x2e42a6[_0x21762b]?!![]:![];},_0x498c2a=()=>{if(_0x33ea9e[_0x5b26(0x19)]!==_0x5b26(0x1a))return Object[_0x5b26(0x16)](_0x2e42a6)[_0x5b26(0x17)](Boolean)[_0x5b26(0x18)];else{const _0x2075f0=_0x30b98b;return _0x591468[_0x2075f0]?!![]:![];}};return React['createElement'](View,{'style':styles[_0x5b26(0x1b)]},React[_0x5b26(0x1c)](Text,{'style':styles[_0x5b26(0x1d)]},_0x33ea9e['uXMiK']),React[_0x5b26(0x1c)](Text,{'style':styles['subtitle']},_0x33ea9e[_0x5b26(0x1e)]),React[_0x5b26(0x1c)](ScrollView,{'style':styles[_0x5b26(0x1f)]},Object[_0x5b26(0x20)](PLATFORMS)[_0x5b26(0x21)](_0x1608e8=>{const _0x58321c={'UPRau':function(_0x1a00d2){return _0x33ea9e['QorOu'](_0x1a00d2);}};if(_0x33ea9e['NOaVo'](_0x5b26(0x22),_0x33ea9e[_0x5b26(0x23)]))_0x5c1a23[_0x5b26(0x24)](_0x5b26(0x25)+_0x2b4540+':\x20'+_0x11f0d3),_0x58321c[_0x5b26(0x26)](_0x305b3d);else{var _0x5f0825;const _0x39a1b9=PLATFORMS[_0x1608e8],_0x35bfd0=_0x1edae6(_0x1608e8),_0x28458e=_0x35bfd0?_0x33ea9e[_0x5b26(0x27)](_0x5f0825=_0x2e42a6[_0x1608e8],null)||_0x33ea9e[_0x5b26(0x28)](_0x5f0825,void 0x0)?void 0x0:_0x5f0825[_0x5b26(0x29)]:null;return React[_0x5b26(0x1c)](View,{'key':_0x1608e8,'style':styles[_0x5b26(0x2a)]},React['createElement'](View,{'style':styles['platformInfo']},React[_0x5b26(0x1c)](View,{'style':[styles[_0x5b26(0x2b)],{'backgroundColor':_0x39a1b9[_0x5b26(0x2c)]}]},React[_0x5b26(0x1c)](_0x12647e,{'name':_0x39a1b9[_0x5b26(0x2d)],'size':0x18,'color':_0x33ea9e[_0x5b26(0x2e)]})),React[_0x5b26(0x1c)](View,{'style':styles[_0x5b26(0x2f)]},React[_0x5b26(0x1c)](Text,{'style':styles[_0x5b26(0x30)]},_0x39a1b9[_0x5b26(0x31)]),React[_0x5b26(0x1c)](Text,{'style':styles[_0x5b26(0x32)]},_0x35bfd0?_0x5b26(0x33)+_0x28458e:_0x39a1b9[_0x5b26(0x34)]))),React['createElement'](TouchableOpacity,{'style':[styles['platformButton'],_0x35bfd0?styles[_0x5b26(0x35)]:styles[_0x5b26(0x36)]],'onPress':()=>_0x35bfd0?_0x28554f(_0x1608e8):_0x17bff5(_0x1608e8),'disabled':_0x219021},_0x219021?React[_0x5b26(0x1c)](ActivityIndicator,{'size':_0x33ea9e[_0x5b26(0x37)],'color':_0x33ea9e[_0x5b26(0x2e)]}):React[_0x5b26(0x1c)](Text,{'style':styles['buttonText']},_0x35bfd0?_0x33ea9e[_0x5b26(0x38)]:_0x5b26(0xc))));}})),React['createElement'](View,{'style':styles[_0x5b26(0x39)]},React[_0x5b26(0x1c)](Text,{'style':styles[_0x5b26(0x3a)]},_0x498c2a(),_0x33ea9e[_0x5b26(0x3b)],Object[_0x5b26(0x20)](PLATFORMS)[_0x5b26(0x18)],_0x33ea9e[_0x5b26(0x3c)]),React[_0x5b26(0x1c)](TouchableOpacity,{'style':[styles['proceedButton'],_0x38cd6a?styles[_0x5b26(0x3d)]:styles[_0x5b26(0x3e)]],'onPress':_0x40ac31,'disabled':!_0x38cd6a},React[_0x5b26(0x1c)](Text,{'style':[styles[_0x5b26(0x3f)],_0x38cd6a?styles['proceedTextActive']:styles['proceedTextInactive']]},_0x33ea9e[_0x5b26(0x40)]),React[_0x5b26(0x1c)](_0x12647e,{'name':_0x33ea9e[_0x5b26(0x41)],'size':0x14,'color':_0x38cd6a?_0x33ea9e[_0x5b26(0x2e)]:_0x5b26(0x42)}))),_0x21798c&&React[_0x5b26(0x1c)](OAuthWebView,{'url':_0x5b26(0x43)+_0x21798c,'platform':_0x21798c,'onComplete':_0x42d0fa,'onClose':_0x282f1c,'onSuccess':_0xadcca=>{const _0x2a656e={'kDeRZ':function(_0x340313,_0x81b5f0){return _0x340313(_0x81b5f0);},'bMzVj':'#fff','hhvIa':_0x33ea9e[_0x5b26(0x37)],'itayf':_0x33ea9e[_0x5b26(0x44)]};if(_0x33ea9e[_0x5b26(0x45)](_0x33ea9e[_0x5b26(0x46)],'nSvpM'))console[_0x5b26(0x24)]('Received\x20authorization\x20code\x20for\x20'+_0x21798c+':\x20'+_0xadcca),_0x33ea9e[_0x5b26(0x47)](_0x42d0fa);else{var _0x49832;const _0x4e6c44=_0x194497[_0x1364ee],_0x3e8821=_0x2a656e[_0x5b26(0x48)](_0x336a12,_0x2b742c),_0x4709c3=_0x3e8821?(_0x49832=_0x5c79c0[_0x2e4f16])===null||_0x49832===void 0x0?void 0x0:_0x49832[_0x5b26(0x29)]:null;return React[_0x5b26(0x1c)](View,{'key':_0xb52a96,'style':_0x3399fb[_0x5b26(0x2a)]},React['createElement'](View,{'style':_0x4b0886[_0x5b26(0x49)]},React[_0x5b26(0x1c)](View,{'style':[_0x3b64ed[_0x5b26(0x2b)],{'backgroundColor':_0x4e6c44[_0x5b26(0x2c)]}]},React['createElement'](_0x15cec4,{'name':_0x4e6c44['icon'],'size':0x18,'color':_0x2a656e['bMzVj']})),React[_0x5b26(0x1c)](View,{'style':_0x28a55f[_0x5b26(0x2f)]},React[_0x5b26(0x1c)](Text,{'style':_0x150173[_0x5b26(0x30)]},_0x4e6c44[_0x5b26(0x31)]),React[_0x5b26(0x1c)](Text,{'style':_0x516513[_0x5b26(0x32)]},_0x3e8821?_0x5b26(0x33)+_0x4709c3:_0x4e6c44[_0x5b26(0x34)]))),React[_0x5b26(0x1c)](TouchableOpacity,{'style':[_0x53c1e5[_0x5b26(0x4a)],_0x3e8821?_0x3f85e1['disconnectButton']:_0x408ae3[_0x5b26(0x36)]],'onPress':()=>_0x3e8821?_0xbd16c6(_0x292f25):_0x135f22(_0xcb3b0d),'disabled':_0x3cc31c},_0x591c28?React[_0x5b26(0x1c)](ActivityIndicator,{'size':_0x2a656e[_0x5b26(0x4b)],'color':_0x5b26(0x9)}):React[_0x5b26(0x1c)](Text,{'style':_0x3f1598[_0x5b26(0x4c)]},_0x3e8821?_0x5b26(0xb):_0x2a656e[_0x5b26(0x4d)])));}}}));};const styles=StyleSheet[_0x5b26(0x4e)]({'container':{'flex':0x1,'padding':0x10},'title':{'fontSize':0x18,'fontWeight':_0x5b26(0x4f),'marginBottom':0x8,'color':'#000'},'subtitle':{'fontSize':0x10,'color':'#666','marginBottom':0x18},'platformList':{'flex':0x1},'platformItem':{'flexDirection':_0x5b26(0x50),'alignItems':_0x5b26(0x51),'marginBottom':0x10,'padding':0xc,'backgroundColor':_0x5b26(0x52),'borderRadius':0xc,'borderWidth':0x1,'borderColor':_0x5b26(0x53)},'platformInfo':{'flex':0x1,'flexDirection':_0x5b26(0x50),'alignItems':'center'},'platformIcon':{'width':0x28,'height':0x28,'borderRadius':0x14,'justifyContent':'center','alignItems':_0x5b26(0x51),'marginRight':0xc},'platformText':{'flex':0x1},'platformName':{'fontSize':0x10,'fontWeight':'600','marginBottom':0x4,'color':'#000'},'platformDescription':{'fontSize':0xe,'color':_0x5b26(0x54)},'platformButton':{'paddingHorizontal':0x10,'paddingVertical':0x8,'borderRadius':0x14,'justifyContent':_0x5b26(0x51),'alignItems':_0x5b26(0x51),'minWidth':0x64},'connectButton':{'backgroundColor':COLORS[_0x5b26(0x55)]},'disconnectButton':{'backgroundColor':_0x5b26(0x56)},'buttonText':{'color':_0x5b26(0x9),'fontWeight':_0x5b26(0x57)},'footer':{'flexDirection':_0x5b26(0x50),'alignItems':_0x5b26(0x51),'justifyContent':_0x5b26(0x58),'paddingTop':0x10,'borderTopWidth':0x1,'borderTopColor':_0x5b26(0x53),'marginTop':0x10},'connectionStatus':{'fontSize':0xe,'color':_0x5b26(0x54)},'proceedButton':{'flexDirection':_0x5b26(0x50),'alignItems':_0x5b26(0x51),'paddingHorizontal':0x10,'paddingVertical':0xa,'borderRadius':0x18},'proceedActive':{'backgroundColor':COLORS['primary']},'proceedInactive':{'backgroundColor':_0x5b26(0x53)},'proceedText':{'fontWeight':_0x5b26(0x57),'marginRight':0x8},'proceedTextActive':{'color':_0x5b26(0x9)},'proceedTextInactive':{'color':'#999'}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getAuthToken}from'../services/authService';export const API_CONFIG={'BASE_URL':'https://api3.onairos.uk','ENDPOINTS':{'AUTH':_0xcf5b(0x0),'USER':_0xcf5b(0x1),'CONNECTIONS':_0xcf5b(0x2),'TRAINING':_0xcf5b(0x3),'OAUTH':_0xcf5b(0x4)},'TIMEOUT':0x7530};export const getApiHeaders=()=>({'Content-Type':'application/json','Accept':'application/json'});export const getAuthHeaders=_0x52ffac=>({...getApiHeaders(),..._0x52ffac&&{'Authorization':_0xcf5b(0x5)+_0x52ffac}});function _0xcf5b(_0x5c0ba7,_0xcf5bc6){_0x5c0ba7=_0x5c0ba7-0x0;const _0x2908ac=_0x5c0b();let _0x87f356=_0x2908ac[_0x5c0ba7];return _0x87f356;}export const getUserAuthHeaders=async()=>{const _0x3c3be1={'Ejfnu':function(_0x1b3955){return _0x1b3955();},'EPNwJ':_0xcf5b(0x6)},_0x4a348d=await _0x3c3be1[_0xcf5b(0x7)](getAuthToken);if(!_0x4a348d)throw new Error(_0x3c3be1['EPNwJ']);return{..._0x3c3be1[_0xcf5b(0x7)](getApiHeaders),'Authorization':_0xcf5b(0x5)+_0x4a348d};};function _0x5c0b(){const _0x46c854=['/auth','/user','/connections','/training','/oauth','Bearer\x20','User\x20not\x20authenticated\x20-\x20no\x20JWT\x20token\x20found','Ejfnu'];_0x5c0b=function(){return _0x46c854;};return _0x5c0b();}
|