@onairos/react-native 3.4.1 โ 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +423 -374
- 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/OnairosNewLogo.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 +23 -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 +30 -1702
- package/lib/commonjs/components/VerificationStep.js +11 -0
- package/lib/commonjs/components/WelcomeScreen.js +22 -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 +18 -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 +34 -106
- package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +421 -421
- 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/hingeDataExtractor.js +8 -0
- package/lib/commonjs/services/hingeDataService.js +9 -0
- package/lib/commonjs/services/imageCompressionService.js +7 -0
- package/lib/commonjs/services/instagramDataExtractor.js +8 -0
- package/lib/commonjs/services/instagramDataService.js +9 -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/sephoraDataExtractor.js +8 -0
- package/lib/commonjs/services/sephoraDataService.js +9 -0
- package/lib/commonjs/services/storageService.js +8 -0
- package/lib/commonjs/services/telegramDataExtractor.js +8 -0
- package/lib/commonjs/services/telegramDataService.js +11 -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/connectorTests.js +29 -0
- 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/hinge.js +1 -0
- package/lib/commonjs/utils/webviewScripts/index.js +13 -0
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -0
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -0
- package/lib/commonjs/utils/webviewScripts/sephora.js +1 -0
- package/lib/commonjs/utils/webviewScripts/telegram.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/OnairosNewLogo.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 +7 -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 +421 -421
- 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/hingeDataExtractor.js +1 -0
- package/lib/module/services/hingeDataService.js +1 -0
- package/lib/module/services/imageCompressionService.js +1 -0
- package/lib/module/services/instagramDataExtractor.js +1 -0
- package/lib/module/services/instagramDataService.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/sephoraDataExtractor.js +1 -0
- package/lib/module/services/sephoraDataService.js +1 -0
- package/lib/module/services/storageService.js +1 -0
- package/lib/module/services/telegramDataExtractor.js +1 -0
- package/lib/module/services/telegramDataService.js +8 -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/connectorTests.js +28 -0
- 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/hinge.js +1 -0
- package/lib/module/utils/webviewScripts/index.js +1 -0
- package/lib/module/utils/webviewScripts/instagram.js +1 -0
- package/lib/module/utils/webviewScripts/linkedin.js +1 -0
- package/lib/module/utils/webviewScripts/sephora.js +1 -0
- package/lib/module/utils/webviewScripts/telegram.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,1067 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// - JWT tokens for user-authenticated requests after email verification
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Initialize the platform auth service
|
|
16
|
-
* This service now uses the two-tier authentication system
|
|
17
|
-
*/
|
|
18
|
-
const initializePlatformAuthService = async () => {
|
|
19
|
-
try {
|
|
20
|
-
// Check if app is already initialized with API key
|
|
21
|
-
const existingConfig = (0, _apiKeyService.getApiConfig)();
|
|
22
|
-
if (existingConfig && existingConfig.apiKey) {
|
|
23
|
-
console.log('๐ Platform auth service using existing app configuration');
|
|
24
|
-
console.log(`โ
Environment: ${existingConfig.environment}`);
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// If no app initialization, we can't proceed
|
|
29
|
-
console.error('โ Platform auth service requires app-level API key initialization');
|
|
30
|
-
throw new Error('Platform auth service requires app-level API key initialization. Please call initializeApiKey() first.');
|
|
31
|
-
} catch (error) {
|
|
32
|
-
console.error('โ Failed to initialize platform auth service:', error);
|
|
33
|
-
throw error;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// Configuration for each platform's authentication
|
|
38
|
-
exports.initializePlatformAuthService = initializePlatformAuthService;
|
|
39
|
-
let PLATFORM_AUTH_CONFIG = {
|
|
40
|
-
instagram: {
|
|
41
|
-
hasNativeSDK: false,
|
|
42
|
-
// Instagram uses OAuth WebView flow
|
|
43
|
-
authEndpoint: '/instagram/authorize',
|
|
44
|
-
color: '#E1306C'
|
|
45
|
-
},
|
|
46
|
-
youtube: {
|
|
47
|
-
hasNativeSDK: true,
|
|
48
|
-
// Native Google Sign-In SDK enabled
|
|
49
|
-
nativeSDKPackage: '@react-native-google-signin/google-signin',
|
|
50
|
-
authEndpoint: '/youtube/authorize',
|
|
51
|
-
color: '#FF0000',
|
|
52
|
-
clientId: '1030678346906-lovkuds2ouqmoc8eu5qpo98spa6edv4o.apps.googleusercontent.com',
|
|
53
|
-
redirectUri: 'onairosevents://auth/callback',
|
|
54
|
-
scope: 'https://www.googleapis.com/auth/youtube.readonly',
|
|
55
|
-
responseType: 'code'
|
|
56
|
-
},
|
|
57
|
-
reddit: {
|
|
58
|
-
hasNativeSDK: false,
|
|
59
|
-
authEndpoint: '/reddit/authorize',
|
|
60
|
-
color: '#FF4500'
|
|
61
|
-
},
|
|
62
|
-
pinterest: {
|
|
63
|
-
hasNativeSDK: false,
|
|
64
|
-
authEndpoint: '/pinterest/authorize',
|
|
65
|
-
color: '#E60023'
|
|
66
|
-
},
|
|
67
|
-
email: {
|
|
68
|
-
hasNativeSDK: false,
|
|
69
|
-
authEndpoint: '/gmail/authorize',
|
|
70
|
-
color: '#4285F4'
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Checks if a native SDK is available for the given platform
|
|
76
|
-
*/
|
|
77
|
-
const hasNativeSDK = platform => {
|
|
78
|
-
const config = PLATFORM_AUTH_CONFIG[platform];
|
|
79
|
-
return (config === null || config === void 0 ? void 0 : config.hasNativeSDK) || false;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Gets the auth endpoint URL for a platform
|
|
84
|
-
*/
|
|
85
|
-
exports.hasNativeSDK = hasNativeSDK;
|
|
86
|
-
const getAuthEndpoint = platform => {
|
|
87
|
-
const config = PLATFORM_AUTH_CONFIG[platform];
|
|
88
|
-
return (config === null || config === void 0 ? void 0 : config.authEndpoint) || '';
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Gets the color associated with a platform
|
|
93
|
-
*/
|
|
94
|
-
exports.getAuthEndpoint = getAuthEndpoint;
|
|
95
|
-
const getPlatformColor = platform => {
|
|
96
|
-
const config = PLATFORM_AUTH_CONFIG[platform];
|
|
97
|
-
return (config === null || config === void 0 ? void 0 : config.color) || '#000000';
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Initiates the OAuth flow for a platform
|
|
102
|
-
* @param platform The platform to authenticate with
|
|
103
|
-
* @param username The username to associate with the authentication
|
|
104
|
-
* @param appName The app name to use for the OAuth session (optional)
|
|
105
|
-
* @returns A Promise that resolves to the OAuth URL to open in a WebView or null if using native SDK
|
|
106
|
-
*/
|
|
107
|
-
exports.getPlatformColor = getPlatformColor;
|
|
108
|
-
const initiateOAuth = async (platform, username, appName) => {
|
|
109
|
-
try {
|
|
110
|
-
console.log('๐ Initiating OAuth for platform:', platform);
|
|
111
|
-
console.log('๐ค Username:', username);
|
|
112
|
-
console.log('๐ฑ App name:', appName);
|
|
113
|
-
|
|
114
|
-
// Check if the platform is supported
|
|
115
|
-
if (!PLATFORM_AUTH_CONFIG[platform]) {
|
|
116
|
-
console.error('โ Unsupported platform:', platform);
|
|
117
|
-
throw new Error(`Unsupported platform: ${platform}`);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// Check if platform has a native SDK
|
|
121
|
-
if (PLATFORM_AUTH_CONFIG[platform].hasNativeSDK) {
|
|
122
|
-
console.log('๐ฑ Platform uses native SDK, returning null');
|
|
123
|
-
// Return null to indicate that we should use the native SDK
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
console.log('๐ Platform uses OAuth WebView flow');
|
|
127
|
-
console.log('๐ Auth endpoint:', PLATFORM_AUTH_CONFIG[platform].authEndpoint);
|
|
128
|
-
|
|
129
|
-
// Pre-flight connectivity check
|
|
130
|
-
console.log('๐ Performing pre-flight connectivity check...');
|
|
131
|
-
const connectivityResult = await testApiConnectivity();
|
|
132
|
-
if (!connectivityResult.success) {
|
|
133
|
-
console.error('โ Pre-flight connectivity check failed:', connectivityResult.error);
|
|
134
|
-
throw new Error(`Cannot reach authentication server: ${connectivityResult.error}`);
|
|
135
|
-
}
|
|
136
|
-
console.log('โ
Pre-flight connectivity check passed');
|
|
137
|
-
|
|
138
|
-
// Handle Instagram with specific API format
|
|
139
|
-
if (platform === 'instagram') {
|
|
140
|
-
const state = 'djksbfds';
|
|
141
|
-
const jsonData = {
|
|
142
|
-
session: {
|
|
143
|
-
oauthState: state,
|
|
144
|
-
username: username || 'Avatar'
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
console.log('๐ค Sending Instagram OAuth request:', jsonData);
|
|
148
|
-
const response = await (0, _apiKeyService.makeDeveloperRequest)(PLATFORM_AUTH_CONFIG[platform].authEndpoint, {
|
|
149
|
-
method: 'POST',
|
|
150
|
-
body: JSON.stringify(jsonData)
|
|
151
|
-
});
|
|
152
|
-
console.log('๐ก Instagram OAuth response status:', response.status);
|
|
153
|
-
if (!response.ok) {
|
|
154
|
-
const errorText = await response.text();
|
|
155
|
-
console.error('โ Instagram OAuth API error:', errorText);
|
|
156
|
-
throw new Error(`Instagram OAuth API error: ${response.status} - ${errorText}`);
|
|
157
|
-
}
|
|
158
|
-
const responseData = await response.json();
|
|
159
|
-
console.log('๐ฅ Instagram OAuth response data:', responseData);
|
|
160
|
-
if (responseData.instagramURL) {
|
|
161
|
-
console.log('โ
Instagram OAuth URL received:', responseData.instagramURL);
|
|
162
|
-
|
|
163
|
-
// Validate the URL before returning
|
|
164
|
-
if (await validateOAuthUrl(responseData.instagramURL)) {
|
|
165
|
-
return responseData.instagramURL;
|
|
166
|
-
} else {
|
|
167
|
-
throw new Error('Received invalid Instagram OAuth URL');
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
console.error('โ No Instagram URL found in response');
|
|
171
|
-
throw new Error('No Instagram URL found in response');
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Prepare the request body for other platforms
|
|
175
|
-
const jsonData = {
|
|
176
|
-
session: {
|
|
177
|
-
oauthState: 'djksbfds',
|
|
178
|
-
// Use same state for all platforms
|
|
179
|
-
username: username || 'Avatar',
|
|
180
|
-
appName: appName || 'DefaultApp'
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
console.log(`๐ค Sending ${platform} OAuth request:`, jsonData);
|
|
184
|
-
|
|
185
|
-
// Make the authenticated request to get the OAuth URL
|
|
186
|
-
const response = await (0, _apiKeyService.makeDeveloperRequest)(PLATFORM_AUTH_CONFIG[platform].authEndpoint, {
|
|
187
|
-
method: 'POST',
|
|
188
|
-
body: JSON.stringify(jsonData)
|
|
189
|
-
});
|
|
190
|
-
console.log(`๐ก ${platform} OAuth response status:`, response.status);
|
|
191
|
-
if (!response.ok) {
|
|
192
|
-
const errorText = await response.text();
|
|
193
|
-
console.error(`โ ${platform} OAuth API error:`, errorText);
|
|
194
|
-
throw new Error(`${platform} OAuth API error: ${response.status} - ${errorText}`);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
// Parse the response
|
|
198
|
-
const data = await response.json();
|
|
199
|
-
console.log(`๐ฅ ${platform} OAuth response data:`, data);
|
|
200
|
-
|
|
201
|
-
// Extra logging for Gmail to help debug
|
|
202
|
-
if (platform === 'email') {
|
|
203
|
-
console.log('๐ Gmail OAuth response keys:', Object.keys(data));
|
|
204
|
-
console.log('๐ Gmail OAuth full response:', JSON.stringify(data, null, 2));
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// Check if the response contains the OAuth URL based on platform
|
|
208
|
-
let oauthUrl = null;
|
|
209
|
-
switch (platform) {
|
|
210
|
-
case 'reddit':
|
|
211
|
-
oauthUrl = data.redditURL;
|
|
212
|
-
break;
|
|
213
|
-
case 'pinterest':
|
|
214
|
-
oauthUrl = data.pinterestURL;
|
|
215
|
-
break;
|
|
216
|
-
case 'youtube':
|
|
217
|
-
oauthUrl = data.youtubeURL;
|
|
218
|
-
break;
|
|
219
|
-
case 'email':
|
|
220
|
-
// Gmail might return under different field names
|
|
221
|
-
oauthUrl = data.emailURL || data.gmailURL || data.authUrl || data.url;
|
|
222
|
-
break;
|
|
223
|
-
default:
|
|
224
|
-
oauthUrl = data.url;
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
if (!oauthUrl) {
|
|
228
|
-
console.error(`โ No OAuth URL found in response for ${platform}. Response:`, data);
|
|
229
|
-
throw new Error(`No OAuth URL found in response for ${platform}`);
|
|
230
|
-
}
|
|
231
|
-
console.log(`โ
${platform} OAuth URL received:`, oauthUrl);
|
|
232
|
-
|
|
233
|
-
// Validate the URL before returning
|
|
234
|
-
if (await validateOAuthUrl(oauthUrl)) {
|
|
235
|
-
return oauthUrl;
|
|
236
|
-
} else {
|
|
237
|
-
throw new Error(`Received invalid ${platform} OAuth URL`);
|
|
238
|
-
}
|
|
239
|
-
} catch (error) {
|
|
240
|
-
console.error(`Error initiating OAuth for ${platform}:`, error);
|
|
241
|
-
throw error;
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Validates an OAuth URL to ensure it's reachable
|
|
247
|
-
* @param url The OAuth URL to validate
|
|
248
|
-
* @returns Promise<boolean> indicating if the URL is valid and reachable
|
|
249
|
-
*/
|
|
250
|
-
exports.initiateOAuth = initiateOAuth;
|
|
251
|
-
const validateOAuthUrl = async url => {
|
|
252
|
-
try {
|
|
253
|
-
console.log('๐ Validating OAuth URL:', url);
|
|
254
|
-
|
|
255
|
-
// Basic URL format validation
|
|
256
|
-
if (!url || typeof url !== 'string') {
|
|
257
|
-
console.error('โ Invalid URL format:', url);
|
|
258
|
-
return false;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// Check if URL starts with https
|
|
262
|
-
if (!url.startsWith('https://')) {
|
|
263
|
-
console.error('โ URL must use HTTPS:', url);
|
|
264
|
-
return false;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// Try to parse the URL
|
|
268
|
-
try {
|
|
269
|
-
new URL(url);
|
|
270
|
-
} catch (parseError) {
|
|
271
|
-
console.error('โ URL parsing failed:', parseError);
|
|
272
|
-
return false;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// Make a HEAD request to check if the URL is reachable
|
|
276
|
-
const controller = new AbortController();
|
|
277
|
-
const timeoutId = setTimeout(() => controller.abort(), 10000); // 10 second timeout
|
|
278
|
-
|
|
279
|
-
try {
|
|
280
|
-
const response = await fetch(url, {
|
|
281
|
-
method: 'HEAD',
|
|
282
|
-
signal: controller.signal
|
|
283
|
-
});
|
|
284
|
-
clearTimeout(timeoutId);
|
|
285
|
-
|
|
286
|
-
// Accept any response that's not a network error
|
|
287
|
-
// OAuth pages might return various status codes
|
|
288
|
-
console.log('โ
OAuth URL validation successful, status:', response.status);
|
|
289
|
-
return true;
|
|
290
|
-
} catch (fetchError) {
|
|
291
|
-
clearTimeout(timeoutId);
|
|
292
|
-
if (fetchError.name === 'AbortError') {
|
|
293
|
-
console.warn('โ ๏ธ OAuth URL validation timeout, but proceeding anyway');
|
|
294
|
-
return true; // Allow timeout as URLs might be slow to respond
|
|
295
|
-
}
|
|
296
|
-
console.warn('โ ๏ธ OAuth URL validation failed, but proceeding anyway:', fetchError.message);
|
|
297
|
-
return true; // Allow network errors as they might be temporary
|
|
298
|
-
}
|
|
299
|
-
} catch (error) {
|
|
300
|
-
console.warn('โ ๏ธ OAuth URL validation error, but proceeding anyway:', error);
|
|
301
|
-
return true; // Allow validation errors to not block the flow
|
|
302
|
-
}
|
|
303
|
-
};
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* Initiates the native SDK authentication flow for a platform
|
|
307
|
-
* @param platform The platform to authenticate with
|
|
308
|
-
* @returns A Promise that resolves to the authentication result
|
|
309
|
-
*/
|
|
310
|
-
const initiateNativeAuth = async (platform, username) => {
|
|
311
|
-
if (platform === 'youtube') {
|
|
312
|
-
console.log('๐ Initiating native Google Sign-In for YouTube');
|
|
313
|
-
try {
|
|
314
|
-
var _currentUser$user, _userInfo$user4, _userInfo$user6, _userInfo$user7, _userInfo$user8;
|
|
315
|
-
// Check if Google Sign-In package is available
|
|
316
|
-
let GoogleSignin, statusCodes;
|
|
317
|
-
try {
|
|
318
|
-
const googleSignInModule = require('@react-native-google-signin/google-signin');
|
|
319
|
-
GoogleSignin = googleSignInModule.GoogleSignin;
|
|
320
|
-
statusCodes = googleSignInModule.statusCodes;
|
|
321
|
-
} catch (importError) {
|
|
322
|
-
console.error('โ Google Sign-In package not available:', importError);
|
|
323
|
-
throw new Error('Google Sign-In SDK not installed. Please install @react-native-google-signin/google-signin');
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
// Configure Google Sign-In with better error handling
|
|
327
|
-
try {
|
|
328
|
-
const youtubeConfig = PLATFORM_AUTH_CONFIG.youtube;
|
|
329
|
-
const webClientId = youtubeConfig.clientId || '1030678346906-lovkuds2ouqmoc8eu5qpo98spa6edv4o.apps.googleusercontent.com';
|
|
330
|
-
const iosClientId = youtubeConfig.iosClientId || webClientId;
|
|
331
|
-
await GoogleSignin.configure({
|
|
332
|
-
webClientId: webClientId,
|
|
333
|
-
iosClientId: iosClientId,
|
|
334
|
-
scopes: ['https://www.googleapis.com/auth/youtube.readonly'],
|
|
335
|
-
offlineAccess: true,
|
|
336
|
-
hostedDomain: '',
|
|
337
|
-
forceCodeForRefreshToken: true,
|
|
338
|
-
accountName: ''
|
|
339
|
-
});
|
|
340
|
-
console.log('โ
Google Sign-In configured successfully with client ID:', webClientId.substring(0, 20) + '...');
|
|
341
|
-
} catch (configError) {
|
|
342
|
-
console.error('โ Google Sign-In configuration failed:', configError);
|
|
343
|
-
throw new Error(`Google Sign-In configuration failed: ${configError.message || configError}`);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
// Check if Google Play Services are available (Android only)
|
|
347
|
-
try {
|
|
348
|
-
await GoogleSignin.hasPlayServices({
|
|
349
|
-
showPlayServicesUpdateDialog: true
|
|
350
|
-
});
|
|
351
|
-
console.log('โ
Google Play Services available');
|
|
352
|
-
} catch (playServicesError) {
|
|
353
|
-
console.error('โ Google Play Services error:', playServicesError);
|
|
354
|
-
throw new Error(`Google Play Services not available: ${playServicesError.message || playServicesError}`);
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
// Sign in with Google
|
|
358
|
-
let userInfo;
|
|
359
|
-
try {
|
|
360
|
-
var _userInfo$user;
|
|
361
|
-
userInfo = await GoogleSignin.signIn();
|
|
362
|
-
console.log('โ
Google Sign-In successful:', (_userInfo$user = userInfo.user) === null || _userInfo$user === void 0 ? void 0 : _userInfo$user.email);
|
|
363
|
-
} catch (signInError) {
|
|
364
|
-
console.error('โ Google Sign-In failed:', signInError);
|
|
365
|
-
|
|
366
|
-
// Handle specific error codes
|
|
367
|
-
if (signInError.code === statusCodes.SIGN_IN_CANCELLED) {
|
|
368
|
-
throw new Error('Google Sign-In was cancelled by user');
|
|
369
|
-
} else if (signInError.code === statusCodes.IN_PROGRESS) {
|
|
370
|
-
throw new Error('Google Sign-In already in progress');
|
|
371
|
-
} else if (signInError.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
|
|
372
|
-
throw new Error('Google Play Services not available or outdated');
|
|
373
|
-
} else {
|
|
374
|
-
throw new Error(`Google Sign-In failed: ${signInError.message || signInError}`);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
// Get access token for API calls
|
|
379
|
-
const tokens = await GoogleSignin.getTokens();
|
|
380
|
-
console.log('๐ Got Google tokens');
|
|
381
|
-
|
|
382
|
-
// Get current user info with refresh token
|
|
383
|
-
const currentUser = await GoogleSignin.getCurrentUser();
|
|
384
|
-
console.log('๐ค Current user info:', currentUser === null || currentUser === void 0 || (_currentUser$user = currentUser.user) === null || _currentUser$user === void 0 ? void 0 : _currentUser$user.email);
|
|
385
|
-
|
|
386
|
-
// Extract refresh token from server auth code
|
|
387
|
-
let refreshToken = null;
|
|
388
|
-
if (currentUser !== null && currentUser !== void 0 && currentUser.serverAuthCode) {
|
|
389
|
-
console.log('๐ Server auth code available for refresh token');
|
|
390
|
-
refreshToken = currentUser.serverAuthCode;
|
|
391
|
-
}
|
|
392
|
-
if (!refreshToken) {
|
|
393
|
-
console.warn('โ ๏ธ No refresh token available - token refresh may fail later');
|
|
394
|
-
} else {
|
|
395
|
-
console.log('โ
Refresh token available for YouTube connection');
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
// Fetch YouTube channel information
|
|
399
|
-
let channelName = 'Unknown Channel';
|
|
400
|
-
let channelId = null;
|
|
401
|
-
try {
|
|
402
|
-
console.log('๐บ Fetching YouTube channel information...');
|
|
403
|
-
const channelResponse = await fetch('https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true', {
|
|
404
|
-
headers: {
|
|
405
|
-
'Authorization': `Bearer ${tokens.accessToken}`,
|
|
406
|
-
'Accept': 'application/json'
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
if (channelResponse.ok) {
|
|
410
|
-
const channelData = await channelResponse.json();
|
|
411
|
-
if (channelData.items && channelData.items.length > 0) {
|
|
412
|
-
channelName = channelData.items[0].snippet.title;
|
|
413
|
-
channelId = channelData.items[0].id;
|
|
414
|
-
console.log('โ
YouTube channel found:', channelName);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
} catch (channelError) {
|
|
418
|
-
var _userInfo$user2, _userInfo$user3;
|
|
419
|
-
console.log('โ ๏ธ Error fetching YouTube channel info:', channelError);
|
|
420
|
-
channelName = ((_userInfo$user2 = userInfo.user) === null || _userInfo$user2 === void 0 ? void 0 : _userInfo$user2.name) || ((_userInfo$user3 = userInfo.user) === null || _userInfo$user3 === void 0 ? void 0 : _userInfo$user3.email) || 'Unknown Channel';
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
// Get authentication info
|
|
424
|
-
let authToken = (await _asyncStorage.default.getItem('onairos_jwt_token')) || (await _asyncStorage.default.getItem('enoch_token')) || (await _asyncStorage.default.getItem('auth_token'));
|
|
425
|
-
const storedUsername = await _asyncStorage.default.getItem('onairos_username');
|
|
426
|
-
const finalUsername = storedUsername || username || ((_userInfo$user4 = userInfo.user) === null || _userInfo$user4 === void 0 ? void 0 : _userInfo$user4.email) || 'youtube_user';
|
|
427
|
-
|
|
428
|
-
// Create auth token if needed
|
|
429
|
-
if (!authToken || authToken.trim().length < 20) {
|
|
430
|
-
console.log('๐ Creating authentication token for YouTube...');
|
|
431
|
-
try {
|
|
432
|
-
var _userInfo$user5;
|
|
433
|
-
const fallbackEmail = ((_userInfo$user5 = userInfo.user) === null || _userInfo$user5 === void 0 ? void 0 : _userInfo$user5.email) || `${finalUsername}@youtube.temp`;
|
|
434
|
-
|
|
435
|
-
// Create user accounts and get JWT token
|
|
436
|
-
const onairosSignupResponse = await fetch('https://api2.onairos.uk/register/enoch', {
|
|
437
|
-
method: 'POST',
|
|
438
|
-
headers: {
|
|
439
|
-
'Content-Type': 'application/json'
|
|
440
|
-
},
|
|
441
|
-
body: JSON.stringify({
|
|
442
|
-
email: fallbackEmail,
|
|
443
|
-
username: finalUsername,
|
|
444
|
-
name: finalUsername
|
|
445
|
-
})
|
|
446
|
-
});
|
|
447
|
-
if (onairosSignupResponse.ok) {
|
|
448
|
-
var _onairosResponseData$;
|
|
449
|
-
const onairosResponseData = await onairosSignupResponse.json();
|
|
450
|
-
|
|
451
|
-
// Extract token from response
|
|
452
|
-
authToken = onairosResponseData.token || ((_onairosResponseData$ = onairosResponseData.data) === null || _onairosResponseData$ === void 0 ? void 0 : _onairosResponseData$.token) || onairosResponseData.jwt;
|
|
453
|
-
if (authToken) {
|
|
454
|
-
// Store tokens
|
|
455
|
-
await _asyncStorage.default.setItem('onairos_jwt_token', authToken);
|
|
456
|
-
await _asyncStorage.default.setItem('enoch_token', authToken);
|
|
457
|
-
await _asyncStorage.default.setItem('auth_token', authToken);
|
|
458
|
-
await _asyncStorage.default.setItem('onairos_username', onairosResponseData.username || finalUsername);
|
|
459
|
-
console.log('โ
Successfully created and stored authentication token');
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
} catch (tokenError) {
|
|
463
|
-
console.warn('โ ๏ธ Error creating auth token:', tokenError);
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
console.log('๐ Linking YouTube data to user:', finalUsername);
|
|
467
|
-
console.log('๐บ YouTube channel name:', channelName);
|
|
468
|
-
|
|
469
|
-
// Send tokens to backend for YouTube data processing
|
|
470
|
-
const backendResponse = await fetch('https://api2.onairos.uk/youtube/native-auth', {
|
|
471
|
-
method: 'POST',
|
|
472
|
-
headers: {
|
|
473
|
-
'Content-Type': 'application/json',
|
|
474
|
-
...(authToken && {
|
|
475
|
-
'Authorization': `Bearer ${authToken}`
|
|
476
|
-
})
|
|
477
|
-
},
|
|
478
|
-
body: JSON.stringify({
|
|
479
|
-
session: {
|
|
480
|
-
username: finalUsername,
|
|
481
|
-
platform: 'youtube',
|
|
482
|
-
timestamp: new Date().toISOString(),
|
|
483
|
-
channelName: channelName,
|
|
484
|
-
channelId: channelId
|
|
485
|
-
},
|
|
486
|
-
googleUser: userInfo.user,
|
|
487
|
-
accessToken: tokens.accessToken,
|
|
488
|
-
idToken: tokens.idToken,
|
|
489
|
-
refreshToken: refreshToken,
|
|
490
|
-
// CRITICAL: Include refresh token
|
|
491
|
-
serverAuthCode: currentUser === null || currentUser === void 0 ? void 0 : currentUser.serverAuthCode,
|
|
492
|
-
userAccountInfo: {
|
|
493
|
-
username: finalUsername,
|
|
494
|
-
email: (_userInfo$user6 = userInfo.user) === null || _userInfo$user6 === void 0 ? void 0 : _userInfo$user6.email,
|
|
495
|
-
authToken: authToken,
|
|
496
|
-
channelName: channelName,
|
|
497
|
-
channelId: channelId,
|
|
498
|
-
userIdentifier: authToken ? `user-${authToken.substring(0, 10)}` : `youtube-${(_userInfo$user7 = userInfo.user) === null || _userInfo$user7 === void 0 ? void 0 : _userInfo$user7.email}`,
|
|
499
|
-
googleId: (_userInfo$user8 = userInfo.user) === null || _userInfo$user8 === void 0 ? void 0 : _userInfo$user8.id
|
|
500
|
-
},
|
|
501
|
-
tokenExpiry: new Date(Date.now() + 3600 * 1000).toISOString(),
|
|
502
|
-
// 1 hour from now
|
|
503
|
-
requestRefreshToken: true
|
|
504
|
-
})
|
|
505
|
-
});
|
|
506
|
-
if (backendResponse.ok) {
|
|
507
|
-
const responseData = await backendResponse.json();
|
|
508
|
-
console.log('โ
YouTube connection processed by backend:', responseData);
|
|
509
|
-
return true;
|
|
510
|
-
} else {
|
|
511
|
-
const errorData = await backendResponse.text();
|
|
512
|
-
console.error('โ Backend processing failed:', backendResponse.status, errorData);
|
|
513
|
-
return false;
|
|
514
|
-
}
|
|
515
|
-
} catch (error) {
|
|
516
|
-
console.error('โ Google Sign-In error:', error);
|
|
517
|
-
const {
|
|
518
|
-
statusCodes: StatusCodes
|
|
519
|
-
} = require('@react-native-google-signin/google-signin');
|
|
520
|
-
if (error.code === StatusCodes.SIGN_IN_CANCELLED) {
|
|
521
|
-
console.log('User cancelled Google Sign-In');
|
|
522
|
-
} else if (error.code === StatusCodes.IN_PROGRESS) {
|
|
523
|
-
console.log('Google Sign-In already in progress');
|
|
524
|
-
} else if (error.code === StatusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
|
|
525
|
-
console.log('Google Play Services not available');
|
|
526
|
-
}
|
|
527
|
-
return false;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
return false;
|
|
531
|
-
};
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Handles the OAuth callback
|
|
535
|
-
* @param url The callback URL
|
|
536
|
-
* @returns The authorization code extracted from the URL
|
|
537
|
-
*/
|
|
538
|
-
exports.initiateNativeAuth = initiateNativeAuth;
|
|
539
|
-
const handleOAuthCallback = url => {
|
|
540
|
-
try {
|
|
541
|
-
// Parse the URL
|
|
542
|
-
const parsedUrl = new URL(url);
|
|
543
|
-
|
|
544
|
-
// Extract the authorization code
|
|
545
|
-
return parsedUrl.searchParams.get('code');
|
|
546
|
-
} catch (error) {
|
|
547
|
-
console.error('Error handling OAuth callback:', error);
|
|
548
|
-
return null;
|
|
549
|
-
}
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Checks if a URL is an OAuth callback
|
|
554
|
-
* @param url The URL to check
|
|
555
|
-
* @returns True if the URL is an OAuth callback
|
|
556
|
-
*/
|
|
557
|
-
exports.handleOAuthCallback = handleOAuthCallback;
|
|
558
|
-
const isOAuthCallback = url => {
|
|
559
|
-
// Check if the URL starts with our redirect URI
|
|
560
|
-
return url.startsWith('onairosanime://auth/');
|
|
561
|
-
};
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* Test connectivity to the Onairos API server
|
|
565
|
-
*/
|
|
566
|
-
exports.isOAuthCallback = isOAuthCallback;
|
|
567
|
-
const testApiConnectivity = async () => {
|
|
568
|
-
try {
|
|
569
|
-
console.log('๐ Testing connectivity to Onairos API...');
|
|
570
|
-
|
|
571
|
-
// Test multiple endpoints for better reliability
|
|
572
|
-
const testEndpoints = ['https://api2.onairos.uk/health', 'https://api2.onairos.uk' // Base URL
|
|
573
|
-
];
|
|
574
|
-
let lastError = null;
|
|
575
|
-
for (const endpoint of testEndpoints) {
|
|
576
|
-
try {
|
|
577
|
-
console.log(`๐ Testing endpoint: ${endpoint}`);
|
|
578
|
-
const controller = new AbortController();
|
|
579
|
-
const timeoutId = setTimeout(() => controller.abort(), 10000); // 10 second timeout
|
|
580
|
-
|
|
581
|
-
const response = await fetch(endpoint, {
|
|
582
|
-
method: 'GET',
|
|
583
|
-
headers: {
|
|
584
|
-
'Content-Type': 'application/json',
|
|
585
|
-
'User-Agent': 'OnairosReactNative/1.0'
|
|
586
|
-
},
|
|
587
|
-
signal: controller.signal
|
|
588
|
-
});
|
|
589
|
-
clearTimeout(timeoutId);
|
|
590
|
-
console.log(`๐ API connectivity test response for ${endpoint}:`, response.status);
|
|
591
|
-
if (response.ok || response.status === 404) {
|
|
592
|
-
// Accept 404 as it means the server is reachable
|
|
593
|
-
console.log('โ
API server is reachable');
|
|
594
|
-
return {
|
|
595
|
-
success: true
|
|
596
|
-
};
|
|
597
|
-
} else {
|
|
598
|
-
console.log(`โ ๏ธ API server responded with status ${response.status} for ${endpoint}`);
|
|
599
|
-
lastError = `API server error: ${response.status}`;
|
|
600
|
-
// Continue to next endpoint
|
|
601
|
-
}
|
|
602
|
-
} catch (fetchError) {
|
|
603
|
-
console.log(`โ Failed to reach ${endpoint}:`, fetchError);
|
|
604
|
-
if (fetchError.name === 'AbortError') {
|
|
605
|
-
lastError = 'Connection timeout - API server took too long to respond';
|
|
606
|
-
} else if (fetchError.message.includes('Network request failed')) {
|
|
607
|
-
lastError = 'Network error - check your internet connection';
|
|
608
|
-
} else if (fetchError.message.includes('not connected to the internet')) {
|
|
609
|
-
lastError = 'No internet connection';
|
|
610
|
-
} else {
|
|
611
|
-
lastError = `Network error: ${fetchError.message}`;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
// Continue to next endpoint
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
console.error('โ All API connectivity tests failed');
|
|
618
|
-
return {
|
|
619
|
-
success: false,
|
|
620
|
-
error: lastError || 'Cannot reach API server'
|
|
621
|
-
};
|
|
622
|
-
} catch (error) {
|
|
623
|
-
console.error('โ API connectivity test failed:', error);
|
|
624
|
-
return {
|
|
625
|
-
success: false,
|
|
626
|
-
error: error instanceof Error ? error.message : 'Unknown error'
|
|
627
|
-
};
|
|
628
|
-
}
|
|
629
|
-
};
|
|
630
|
-
|
|
631
|
-
/**
|
|
632
|
-
* ๐ REFRESH GOOGLE TOKENS
|
|
633
|
-
*/
|
|
634
|
-
exports.testApiConnectivity = testApiConnectivity;
|
|
635
|
-
const refreshGoogleTokens = async () => {
|
|
636
|
-
try {
|
|
637
|
-
console.log('๐ Attempting to refresh Google tokens...');
|
|
638
|
-
const {
|
|
639
|
-
GoogleSignin
|
|
640
|
-
} = require('@react-native-google-signin/google-signin');
|
|
641
|
-
const currentUser = await GoogleSignin.getCurrentUser();
|
|
642
|
-
if (!currentUser) {
|
|
643
|
-
console.log('โ User not signed in to Google, cannot refresh tokens');
|
|
644
|
-
return null;
|
|
645
|
-
}
|
|
646
|
-
const tokens = await GoogleSignin.getTokens();
|
|
647
|
-
console.log('โ
Successfully refreshed Google tokens');
|
|
648
|
-
return {
|
|
649
|
-
accessToken: tokens.accessToken,
|
|
650
|
-
idToken: tokens.idToken
|
|
651
|
-
};
|
|
652
|
-
} catch (error) {
|
|
653
|
-
console.error('โ Failed to refresh Google tokens:', error);
|
|
654
|
-
|
|
655
|
-
// If refresh fails, try to sign in again
|
|
656
|
-
try {
|
|
657
|
-
console.log('๐ Refresh failed, attempting re-authentication...');
|
|
658
|
-
const {
|
|
659
|
-
GoogleSignin
|
|
660
|
-
} = require('@react-native-google-signin/google-signin');
|
|
661
|
-
const userInfo = await GoogleSignin.signIn();
|
|
662
|
-
const tokens = await GoogleSignin.getTokens();
|
|
663
|
-
console.log('โ
Re-authentication successful');
|
|
664
|
-
return {
|
|
665
|
-
accessToken: tokens.accessToken,
|
|
666
|
-
idToken: tokens.idToken
|
|
667
|
-
};
|
|
668
|
-
} catch (signInError) {
|
|
669
|
-
console.error('โ Re-authentication also failed:', signInError);
|
|
670
|
-
return null;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
};
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* ๐ REFRESH YOUTUBE TOKENS
|
|
677
|
-
*/
|
|
678
|
-
exports.refreshGoogleTokens = refreshGoogleTokens;
|
|
679
|
-
const refreshYouTubeTokens = async () => {
|
|
680
|
-
try {
|
|
681
|
-
var _currentUser$user2;
|
|
682
|
-
console.log('๐ Refreshing YouTube tokens...');
|
|
683
|
-
|
|
684
|
-
// Get fresh tokens from Google SDK
|
|
685
|
-
const freshTokens = await refreshGoogleTokens();
|
|
686
|
-
if (!freshTokens) {
|
|
687
|
-
console.error('โ Failed to get fresh tokens from Google SDK');
|
|
688
|
-
return false;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
// Get current user info
|
|
692
|
-
const {
|
|
693
|
-
GoogleSignin
|
|
694
|
-
} = require('@react-native-google-signin/google-signin');
|
|
695
|
-
const currentUser = await GoogleSignin.getCurrentUser();
|
|
696
|
-
if (!currentUser) {
|
|
697
|
-
console.error('โ No current Google user found');
|
|
698
|
-
return false;
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
// Get stored auth token
|
|
702
|
-
const authToken = (await _asyncStorage.default.getItem('onairos_jwt_token')) || (await _asyncStorage.default.getItem('enoch_token')) || (await _asyncStorage.default.getItem('auth_token'));
|
|
703
|
-
if (!authToken) {
|
|
704
|
-
console.error('โ No auth token found for YouTube refresh');
|
|
705
|
-
return false;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
// Send refreshed tokens to backend
|
|
709
|
-
const refreshResponse = await fetch('https://api2.onairos.uk/youtube/refresh-token', {
|
|
710
|
-
method: 'POST',
|
|
711
|
-
headers: {
|
|
712
|
-
'Content-Type': 'application/json',
|
|
713
|
-
'Authorization': `Bearer ${authToken}`
|
|
714
|
-
},
|
|
715
|
-
body: JSON.stringify({
|
|
716
|
-
accessToken: freshTokens.accessToken,
|
|
717
|
-
idToken: freshTokens.idToken,
|
|
718
|
-
refreshToken: currentUser.serverAuthCode,
|
|
719
|
-
userEmail: (_currentUser$user2 = currentUser.user) === null || _currentUser$user2 === void 0 ? void 0 : _currentUser$user2.email,
|
|
720
|
-
tokenExpiry: new Date(Date.now() + 3600 * 1000).toISOString(),
|
|
721
|
-
timestamp: new Date().toISOString()
|
|
722
|
-
})
|
|
723
|
-
});
|
|
724
|
-
if (refreshResponse.ok) {
|
|
725
|
-
const responseData = await refreshResponse.json();
|
|
726
|
-
console.log('โ
YouTube tokens refreshed successfully:', responseData);
|
|
727
|
-
return true;
|
|
728
|
-
} else {
|
|
729
|
-
const errorData = await refreshResponse.text();
|
|
730
|
-
console.error('โ YouTube token refresh failed:', refreshResponse.status, errorData);
|
|
731
|
-
return false;
|
|
732
|
-
}
|
|
733
|
-
} catch (error) {
|
|
734
|
-
console.error('โ Error refreshing YouTube tokens:', error);
|
|
735
|
-
return false;
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* ๐ฏ ENHANCED OAUTH CALLBACK HANDLER
|
|
741
|
-
*/
|
|
742
|
-
exports.refreshYouTubeTokens = refreshYouTubeTokens;
|
|
743
|
-
const handleOAuthCallbackUrl = url => {
|
|
744
|
-
try {
|
|
745
|
-
console.log('๐ Processing OAuth callback URL:', url);
|
|
746
|
-
|
|
747
|
-
// Parse the URL
|
|
748
|
-
const parsedUrl = new URL(url);
|
|
749
|
-
|
|
750
|
-
// Extract platform and code
|
|
751
|
-
const platform = parsedUrl.searchParams.get('platform') || parsedUrl.pathname.split('/').find(segment => ['instagram', 'youtube', 'reddit', 'pinterest', 'email'].includes(segment));
|
|
752
|
-
const code = parsedUrl.searchParams.get('code');
|
|
753
|
-
const error = parsedUrl.searchParams.get('error');
|
|
754
|
-
if (error) {
|
|
755
|
-
console.error('โ OAuth error in callback:', error);
|
|
756
|
-
return {
|
|
757
|
-
success: false
|
|
758
|
-
};
|
|
759
|
-
}
|
|
760
|
-
if (code && platform) {
|
|
761
|
-
console.log(`โ
OAuth callback processed: ${platform} with code: ${code.substring(0, 10)}...`);
|
|
762
|
-
return {
|
|
763
|
-
platform,
|
|
764
|
-
code,
|
|
765
|
-
success: true
|
|
766
|
-
};
|
|
767
|
-
}
|
|
768
|
-
console.warn('โ ๏ธ OAuth callback missing platform or code');
|
|
769
|
-
return {
|
|
770
|
-
success: false
|
|
771
|
-
};
|
|
772
|
-
} catch (error) {
|
|
773
|
-
console.error('โ Error processing OAuth callback:', error);
|
|
774
|
-
return {
|
|
775
|
-
success: false
|
|
776
|
-
};
|
|
777
|
-
}
|
|
778
|
-
};
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* ๐ง UPDATE GOOGLE CLIENT IDS
|
|
782
|
-
* Allows apps to configure their own Google client IDs
|
|
783
|
-
*/
|
|
784
|
-
exports.handleOAuthCallbackUrl = handleOAuthCallbackUrl;
|
|
785
|
-
const updateGoogleClientIds = config => {
|
|
786
|
-
console.log('๐ง Updating Google client IDs configuration');
|
|
787
|
-
if (config.webClientId || config.iosClientId) {
|
|
788
|
-
// Update the YouTube configuration
|
|
789
|
-
PLATFORM_AUTH_CONFIG.youtube = {
|
|
790
|
-
...PLATFORM_AUTH_CONFIG.youtube,
|
|
791
|
-
clientId: config.webClientId || PLATFORM_AUTH_CONFIG.youtube.clientId,
|
|
792
|
-
iosClientId: config.iosClientId || PLATFORM_AUTH_CONFIG.youtube.iosClientId
|
|
793
|
-
};
|
|
794
|
-
console.log('โ
Google client IDs updated successfully');
|
|
795
|
-
console.log(' - Web Client ID:', config.webClientId ? config.webClientId.substring(0, 20) + '...' : 'not provided');
|
|
796
|
-
console.log(' - iOS Client ID:', config.iosClientId ? config.iosClientId.substring(0, 20) + '...' : 'not provided');
|
|
797
|
-
}
|
|
798
|
-
};
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
* Request email verification using developer API key
|
|
802
|
-
* @param email Email address to verify
|
|
803
|
-
* @param testMode Whether to use test mode
|
|
804
|
-
* @returns Promise with verification result
|
|
805
|
-
*/
|
|
806
|
-
exports.updateGoogleClientIds = updateGoogleClientIds;
|
|
807
|
-
const requestEmailVerification = async (email, testMode = false) => {
|
|
808
|
-
try {
|
|
809
|
-
console.log('๐ง Requesting email verification for:', email);
|
|
810
|
-
const response = await (0, _apiKeyService.makeDeveloperRequest)('/email/verification', {
|
|
811
|
-
method: 'POST',
|
|
812
|
-
body: JSON.stringify({
|
|
813
|
-
email,
|
|
814
|
-
action: 'request',
|
|
815
|
-
testMode
|
|
816
|
-
})
|
|
817
|
-
});
|
|
818
|
-
const data = await response.json();
|
|
819
|
-
if (response.ok && data.success) {
|
|
820
|
-
console.log('โ
Email verification requested successfully');
|
|
821
|
-
return {
|
|
822
|
-
success: true,
|
|
823
|
-
message: data.message || 'Verification code sent to your email'
|
|
824
|
-
};
|
|
825
|
-
} else {
|
|
826
|
-
console.error('โ Email verification request failed:', data.error);
|
|
827
|
-
return {
|
|
828
|
-
success: false,
|
|
829
|
-
error: data.error || 'Failed to send verification code'
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
} catch (error) {
|
|
833
|
-
console.error('โ Error requesting email verification:', error);
|
|
834
|
-
return {
|
|
835
|
-
success: false,
|
|
836
|
-
error: error instanceof Error ? error.message : 'Network error'
|
|
837
|
-
};
|
|
838
|
-
}
|
|
839
|
-
};
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* Verify email code and store JWT token
|
|
843
|
-
* @param email Email address
|
|
844
|
-
* @param code Verification code
|
|
845
|
-
* @param testMode Whether to use test mode
|
|
846
|
-
* @returns Promise with verification result and JWT token
|
|
847
|
-
*/
|
|
848
|
-
exports.requestEmailVerification = requestEmailVerification;
|
|
849
|
-
const verifyEmailCode = async (email, code, testMode = false) => {
|
|
850
|
-
try {
|
|
851
|
-
console.log('๐ Verifying email code for:', email);
|
|
852
|
-
const response = await (0, _apiKeyService.makeDeveloperRequest)('/email/verification', {
|
|
853
|
-
method: 'POST',
|
|
854
|
-
body: JSON.stringify({
|
|
855
|
-
email,
|
|
856
|
-
action: 'verify',
|
|
857
|
-
code,
|
|
858
|
-
testMode
|
|
859
|
-
})
|
|
860
|
-
});
|
|
861
|
-
const data = await response.json();
|
|
862
|
-
if (response.ok && data.success) {
|
|
863
|
-
console.log('โ
Email verification successful');
|
|
864
|
-
|
|
865
|
-
// Store JWT token if received
|
|
866
|
-
if (data.token || data.jwtToken) {
|
|
867
|
-
const jwtToken = data.token || data.jwtToken;
|
|
868
|
-
await (0, _apiKeyService.storeJWT)(jwtToken);
|
|
869
|
-
console.log('๐ซ JWT token stored successfully');
|
|
870
|
-
}
|
|
871
|
-
return {
|
|
872
|
-
success: true,
|
|
873
|
-
message: data.message || 'Email verified successfully',
|
|
874
|
-
existingUser: data.existingUser || false,
|
|
875
|
-
token: data.token || data.jwtToken
|
|
876
|
-
};
|
|
877
|
-
} else {
|
|
878
|
-
console.error('โ Email verification failed:', data.error);
|
|
879
|
-
return {
|
|
880
|
-
success: false,
|
|
881
|
-
error: data.error || 'Invalid verification code'
|
|
882
|
-
};
|
|
883
|
-
}
|
|
884
|
-
} catch (error) {
|
|
885
|
-
console.error('โ Error verifying email code:', error);
|
|
886
|
-
return {
|
|
887
|
-
success: false,
|
|
888
|
-
error: error instanceof Error ? error.message : 'Network error'
|
|
889
|
-
};
|
|
890
|
-
}
|
|
891
|
-
};
|
|
892
|
-
|
|
893
|
-
/**
|
|
894
|
-
* Check email verification status
|
|
895
|
-
* @param email Email address
|
|
896
|
-
* @param testMode Whether to use test mode
|
|
897
|
-
* @returns Promise with status result
|
|
898
|
-
*/
|
|
899
|
-
exports.verifyEmailCode = verifyEmailCode;
|
|
900
|
-
const checkEmailVerificationStatus = async (email, testMode = false) => {
|
|
901
|
-
try {
|
|
902
|
-
console.log('๐ Checking email verification status for:', email);
|
|
903
|
-
const response = await (0, _apiKeyService.makeDeveloperRequest)('/email/verification/status', {
|
|
904
|
-
method: 'POST',
|
|
905
|
-
body: JSON.stringify({
|
|
906
|
-
email,
|
|
907
|
-
testMode
|
|
908
|
-
})
|
|
909
|
-
});
|
|
910
|
-
const data = await response.json();
|
|
911
|
-
if (response.ok && data.success) {
|
|
912
|
-
return {
|
|
913
|
-
success: true,
|
|
914
|
-
isPending: data.isPending || false
|
|
915
|
-
};
|
|
916
|
-
} else {
|
|
917
|
-
return {
|
|
918
|
-
success: false,
|
|
919
|
-
error: data.error || 'Failed to check verification status'
|
|
920
|
-
};
|
|
921
|
-
}
|
|
922
|
-
} catch (error) {
|
|
923
|
-
console.error('โ Error checking email verification status:', error);
|
|
924
|
-
return {
|
|
925
|
-
success: false,
|
|
926
|
-
error: error instanceof Error ? error.message : 'Network error'
|
|
927
|
-
};
|
|
928
|
-
}
|
|
929
|
-
};
|
|
930
|
-
|
|
931
|
-
/**
|
|
932
|
-
* Disconnect a platform (uses developer API key)
|
|
933
|
-
* @param platform Platform to disconnect
|
|
934
|
-
* @param username Username associated with the platform
|
|
935
|
-
* @returns Promise with disconnect result
|
|
936
|
-
*/
|
|
937
|
-
exports.checkEmailVerificationStatus = checkEmailVerificationStatus;
|
|
938
|
-
const disconnectPlatform = async (platform, username) => {
|
|
939
|
-
try {
|
|
940
|
-
console.log('๐ Disconnecting platform:', platform, 'for user:', username);
|
|
941
|
-
|
|
942
|
-
// Make authenticated API call to disconnect platform
|
|
943
|
-
const response = await (0, _apiKeyService.makeDeveloperRequest)('/revoke', {
|
|
944
|
-
method: 'POST',
|
|
945
|
-
body: JSON.stringify({
|
|
946
|
-
platform,
|
|
947
|
-
username
|
|
948
|
-
})
|
|
949
|
-
});
|
|
950
|
-
const data = await response.json();
|
|
951
|
-
if (response.ok && data.success) {
|
|
952
|
-
console.log(`โ
${platform} disconnected successfully`);
|
|
953
|
-
return {
|
|
954
|
-
success: true
|
|
955
|
-
};
|
|
956
|
-
} else {
|
|
957
|
-
console.error(`โ Failed to disconnect ${platform}:`, data.error);
|
|
958
|
-
return {
|
|
959
|
-
success: false,
|
|
960
|
-
error: data.error || 'Failed to disconnect platform'
|
|
961
|
-
};
|
|
962
|
-
}
|
|
963
|
-
} catch (error) {
|
|
964
|
-
console.error(`โ Error disconnecting ${platform}:`, error);
|
|
965
|
-
return {
|
|
966
|
-
success: false,
|
|
967
|
-
error: error instanceof Error ? error.message : 'Network error'
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
};
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* Store PIN for user (uses JWT authentication and extracts username from JWT)
|
|
974
|
-
* @param pin User PIN
|
|
975
|
-
* @param username Optional username (if not provided, extracts from JWT)
|
|
976
|
-
* @returns Promise with result
|
|
977
|
-
*/
|
|
978
|
-
exports.disconnectPlatform = disconnectPlatform;
|
|
979
|
-
const storePIN = async (pin, username) => {
|
|
980
|
-
try {
|
|
981
|
-
// Extract username from JWT if not provided
|
|
982
|
-
const userToStore = username || (0, _apiKeyService.extractUsernameFromJWT)();
|
|
983
|
-
if (!userToStore) {
|
|
984
|
-
console.error('โ No username available - either provide username or ensure JWT token is valid');
|
|
985
|
-
return {
|
|
986
|
-
success: false,
|
|
987
|
-
error: 'No username available for PIN storage'
|
|
988
|
-
};
|
|
989
|
-
}
|
|
990
|
-
console.log('๐ Storing PIN for user:', userToStore);
|
|
991
|
-
|
|
992
|
-
// Make authenticated request to store PIN (using developer API key for now)
|
|
993
|
-
const response = await (0, _apiKeyService.makeDeveloperRequest)('/store-pin/web', {
|
|
994
|
-
method: 'POST',
|
|
995
|
-
headers: {
|
|
996
|
-
'Content-Type': 'application/json'
|
|
997
|
-
},
|
|
998
|
-
body: JSON.stringify({
|
|
999
|
-
username: userToStore,
|
|
1000
|
-
pin
|
|
1001
|
-
})
|
|
1002
|
-
});
|
|
1003
|
-
const data = await response.json();
|
|
1004
|
-
if (response.ok && data.success) {
|
|
1005
|
-
console.log('โ
PIN stored successfully for user:', userToStore);
|
|
1006
|
-
return {
|
|
1007
|
-
success: true
|
|
1008
|
-
};
|
|
1009
|
-
} else {
|
|
1010
|
-
console.error('โ Failed to store PIN:', data.error);
|
|
1011
|
-
return {
|
|
1012
|
-
success: false,
|
|
1013
|
-
error: data.error || 'Failed to store PIN'
|
|
1014
|
-
};
|
|
1015
|
-
}
|
|
1016
|
-
} catch (error) {
|
|
1017
|
-
console.error('โ Error storing PIN:', error);
|
|
1018
|
-
return {
|
|
1019
|
-
success: false,
|
|
1020
|
-
error: error instanceof Error ? error.message : 'Network error'
|
|
1021
|
-
};
|
|
1022
|
-
}
|
|
1023
|
-
};
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* ๐ซ GET STORED JWT TOKEN
|
|
1027
|
-
* Helper function to retrieve stored JWT token from email verification or other sources
|
|
1028
|
-
*/
|
|
1029
|
-
exports.storePIN = storePIN;
|
|
1030
|
-
const getStoredJwtToken = async () => {
|
|
1031
|
-
try {
|
|
1032
|
-
console.log('๐ซ Retrieving stored JWT token...');
|
|
1033
|
-
|
|
1034
|
-
// Try different storage keys in order of preference
|
|
1035
|
-
const tokenSources = ['email_verification_token', 'onairos_jwt_token', 'enoch_token', 'auth_token'];
|
|
1036
|
-
for (const source of tokenSources) {
|
|
1037
|
-
const token = await _asyncStorage.default.getItem(source);
|
|
1038
|
-
if (token && token.length > 20) {
|
|
1039
|
-
console.log(`โ
JWT token found in ${source}:`, token.substring(0, 20) + '...');
|
|
1040
|
-
return token;
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
console.warn('โ ๏ธ No JWT token found in storage');
|
|
1044
|
-
return null;
|
|
1045
|
-
} catch (error) {
|
|
1046
|
-
console.error('โ Error retrieving JWT token:', error);
|
|
1047
|
-
return null;
|
|
1048
|
-
}
|
|
1049
|
-
};
|
|
1050
|
-
|
|
1051
|
-
/**
|
|
1052
|
-
* ๐ซ CLEAR STORED TOKENS
|
|
1053
|
-
* Helper function to clear all stored tokens (useful for logout)
|
|
1054
|
-
*/
|
|
1055
|
-
exports.getStoredJwtToken = getStoredJwtToken;
|
|
1056
|
-
const clearStoredTokens = async () => {
|
|
1057
|
-
try {
|
|
1058
|
-
console.log('๐งน Clearing all stored tokens...');
|
|
1059
|
-
const tokenKeys = ['email_verification_token', 'onairos_jwt_token', 'enoch_token', 'auth_token', 'email_verification_email', 'email_verification_request_id', 'email_verification_request_email', 'token_timestamp', 'user_pin_stored', 'pin_storage_timestamp'];
|
|
1060
|
-
await Promise.all(tokenKeys.map(key => _asyncStorage.default.removeItem(key)));
|
|
1061
|
-
console.log('โ
All tokens cleared successfully');
|
|
1062
|
-
} catch (error) {
|
|
1063
|
-
console.error('โ Error clearing tokens:', error);
|
|
1064
|
-
}
|
|
1065
|
-
};
|
|
1066
|
-
exports.clearStoredTokens = clearStoredTokens;
|
|
1067
|
-
//# sourceMappingURL=platformAuthService.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
// Onairos SDK - Asset Registry (auto-generated)
|
|
3
|
+
var __ONAIROS_REQ_REGISTRY__ = [
|
|
4
|
+
require("react-native"),
|
|
5
|
+
require("@react-native-google-signin/google-signin"),
|
|
6
|
+
require("@react-native-async-storage/async-storage"),
|
|
7
|
+
require("../config/api"),
|
|
8
|
+
require("./apiKeyService"),
|
|
9
|
+
require("./jwtStorageService")
|
|
10
|
+
];
|
|
11
|
+
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
12
|
+
Object[_0x1690(0x0)](exports,_0x1690(0x1),{'value':!![]}),exports[_0x1690(0x2)]=exports[_0x1690(0x3)]=exports[_0x1690(0x4)]=exports[_0x1690(0x5)]=exports[_0x1690(0x6)]=exports[_0x1690(0x7)]=exports['isOAuthCallback']=exports[_0x1690(0x8)]=exports[_0x1690(0x9)]=exports['initializePlatformAuthService']=exports[_0x1690(0xa)]=exports[_0x1690(0xb)]=exports[_0x1690(0xc)]=exports[_0x1690(0xd)]=exports[_0x1690(0xe)]=exports[_0x1690(0xf)]=void 0x0;var _reactNative=__ONAIROS_REQ_FUNC__(0x0),_googleSignin=__ONAIROS_REQ_FUNC__(0x1),_asyncStorage=_interopRequireDefault(__ONAIROS_REQ_FUNC__(0x2)),_api=__ONAIROS_REQ_FUNC__(0x3),_apiKeyService=__ONAIROS_REQ_FUNC__(0x4),_jwtStorageService=__ONAIROS_REQ_FUNC__(0x5);function _interopRequireDefault(_0x5ac63e){return _0x5ac63e&&_0x5ac63e['__esModule']?_0x5ac63e:{'default':_0x5ac63e};}const getDeveloperAuthHeaders=()=>{const _0x11609e={'lcZwF':_0x1690(0x10),'vnHzm':function(_0x210400,_0x294f91){return _0x210400!==_0x294f91;},'krvUq':function(_0x58f716,_0x206b00){return _0x58f716!==_0x206b00;},'cskgg':_0x1690(0x11)};if(!(0x0,_apiKeyService[_0x1690(0x12)])())throw new Error(_0x11609e[_0x1690(0x13)]);const _0x7b1c3b=(0x0,_apiKeyService[_0x1690(0x14)])();if(!(_0x11609e[_0x1690(0x15)](_0x7b1c3b,null)&&_0x11609e[_0x1690(0x16)](_0x7b1c3b,void 0x0)&&_0x7b1c3b[_0x1690(0x17)]))throw new Error(_0x1690(0x18));return{...(0x0,_api[_0x1690(0x19)])(),'Authorization':_0x1690(0x1a)+_0x7b1c3b[_0x1690(0x17)],'X-SDK-Version':_0x11609e[_0x1690(0x1b)],'X-SDK-Platform':'react-native'};},WEB_CLIENT_ID=_0x1690(0x1c),IOS_CLIENT_ID=_0x1690(0x1c),OAUTH_CONFIG={'instagram':{'authUrl':_0x1690(0x1d),'clientId':_0x1690(0x1e),'redirectUri':'onairosevents://auth/callback','scope':_0x1690(0x1f),'responseType':_0x1690(0x20),'hasNativeSDK':![]},'youtube':{'authUrl':_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x23),'clientId':_0x1690(0x1c),'redirectUri':_0x1690(0x24),'scope':_0x1690(0x25),'responseType':_0x1690(0x20),'hasNativeSDK':!![]},'reddit':{'authUrl':_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x26),'clientId':'demo_reddit_client_id','redirectUri':_0x1690(0x24),'scope':_0x1690(0x27),'responseType':_0x1690(0x20),'hasNativeSDK':![]},'pinterest':{'authUrl':_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x28),'clientId':'demo_pinterest_client_id','redirectUri':_0x1690(0x24),'scope':_0x1690(0x29),'responseType':_0x1690(0x20),'hasNativeSDK':![]},'facebook':{'authUrl':_0x1690(0x2a),'clientId':_0x1690(0x2b),'redirectUri':_0x1690(0x24),'scope':_0x1690(0x2c),'responseType':_0x1690(0x20),'hasNativeSDK':![]},'linkedin':{'authUrl':_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x2d),'clientId':'','redirectUri':_0x1690(0x24),'scope':_0x1690(0x2e),'responseType':_0x1690(0x20),'hasNativeSDK':![]},'gmail':{'authUrl':_api['API_CONFIG'][_0x1690(0x22)]+_0x1690(0x2f),'clientId':_0x1690(0x30),'redirectUri':_0x1690(0x24),'scope':_0x1690(0x31),'responseType':_0x1690(0x20),'hasNativeSDK':![]},'email':{'hasNativeSDK':![],'authUrl':_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x32)},'chatgpt':{'authUrl':_0x1690(0x33),'clientId':'','redirectUri':'','scope':'','responseType':'','hasNativeSDK':![]},'claude':{'authUrl':_0x1690(0x34),'clientId':'','redirectUri':'','scope':'','responseType':'','hasNativeSDK':![]},'gemini':{'authUrl':_0x1690(0x35),'clientId':'','redirectUri':'','scope':'','responseType':'','hasNativeSDK':![]},'grok':{'authUrl':_0x1690(0x36),'clientId':'','redirectUri':'','scope':'','responseType':'','hasNativeSDK':![]},'hinge':{'authUrl':_0x1690(0x37),'clientId':'','redirectUri':'','scope':'','responseType':'','hasNativeSDK':![]},'instagram_webview':{'authUrl':_0x1690(0x38),'clientId':'','redirectUri':'','scope':'','responseType':'','hasNativeSDK':![]},'sephora':{'authUrl':_0x1690(0x39),'clientId':'','redirectUri':'','scope':'','responseType':'','hasNativeSDK':![]},'telegram':{'authUrl':_0x1690(0x3a),'clientId':'','redirectUri':'','scope':'','responseType':'','hasNativeSDK':![]}},hasNativeSDK=_0x1b40b1=>{const _0x5430ed={'TiBtu':function(_0x5f25d7,_0x536f3f){return _0x5f25d7===_0x536f3f;}};var _0x562bd2;return((_0x562bd2=OAUTH_CONFIG[_0x1b40b1])===null||_0x5430ed[_0x1690(0x3b)](_0x562bd2,void 0x0)?void 0x0:_0x562bd2[_0x1690(0xa)])||![];};exports[_0x1690(0xa)]=hasNativeSDK;const testApiConnectivity=async()=>{const _0x307404={'BMwMJ':'๐\x20[CONNECTIVITY]\x20Running\x20comprehensive\x20network\x20diagnostics...','BkRei':_0x1690(0x3c),'Djqov':function(_0x9f6ab,_0x2f1d90){return _0x9f6ab!==_0x2f1d90;},'xSUeD':_0x1690(0x3d),'paeGE':_0x1690(0x3e),'lsiKq':_0x1690(0x3f),'TSYQK':'no-cors','ognbi':'โ
\x20[CONNECTIVITY]\x20Google\x20is\x20reachable\x20-\x20internet\x20is\x20working','HvAxy':_0x1690(0x40),'EldlD':_0x1690(0x41),'YWKgF':function(_0x492291,_0x9b76f0){return _0x492291===_0x9b76f0;},'wvqHj':'CJtLo','wacds':function(_0x18de5a,_0x2a1570,_0x143cf5){return _0x18de5a(_0x2a1570,_0x143cf5);},'WSvQf':function(_0x3a388d,_0x124a66){return _0x3a388d(_0x124a66);},'kRrTW':_0x1690(0x42),'XLTWJ':function(_0x33652e,_0x191a37){return _0x33652e===_0x191a37;},'CGKBL':_0x1690(0x43),'uSsxp':function(_0x3a1a37,_0x25fd35){return _0x3a1a37!==_0x25fd35;},'UZNys':function(_0x3e382a,_0x14fb21){return _0x3e382a!==_0x14fb21;},'QREFP':function(_0x1f32fb,_0x19ce5b){return _0x1f32fb!==_0x19ce5b;},'kLuwX':_0x1690(0x44),'HbbUw':_0x1690(0x45),'DDLlB':_0x1690(0x46),'tAdix':_0x1690(0x47)},_0x3c1ed6={'googleTest':null,'api2Test':null};try{var _0x5387b8,_0x192ab8;console[_0x1690(0x48)](_0x307404[_0x1690(0x49)]),console[_0x1690(0x48)](_0x307404[_0x1690(0x4a)]);try{if(_0x307404[_0x1690(0x4b)](_0x307404['xSUeD'],_0x307404[_0x1690(0x4c)])){const _0x52b326=await fetch(_0x307404[_0x1690(0x4d)],{'method':_0x1690(0x4e),'mode':_0x307404[_0x1690(0x4f)]});_0x3c1ed6['googleTest']={'success':!![],'status':'reachable'},console[_0x1690(0x48)](_0x307404[_0x1690(0x50)]);}else return _0x542e1f&&_0x35be45[_0x1690(0x1)]?_0x40dae0:{'default':_0x4a2b78};}catch(_0x30fbc1){_0x3c1ed6[_0x1690(0x51)]={'success':![],'error':_0x30fbc1[_0x1690(0x52)]},console[_0x1690(0x53)](_0x307404[_0x1690(0x54)],_0x30fbc1[_0x1690(0x52)]);}console[_0x1690(0x48)](_0x307404[_0x1690(0x55)]);try{if(_0x307404[_0x1690(0x56)](_0x307404[_0x1690(0x57)],_0x307404['wvqHj'])){const _0x51374b=new AbortController(),_0x51a4b8=_0x307404['wacds'](setTimeout,()=>_0x51374b[_0x1690(0x58)](),0x7530),_0x1c47d3=await fetch(_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x59),{'method':'GET','signal':_0x51374b[_0x1690(0x5a)]});_0x307404[_0x1690(0x5b)](clearTimeout,_0x51a4b8);const _0x29e9da=await _0x1c47d3[_0x1690(0x5c)]()[_0x1690(0x5d)](()=>_0x1690(0x5e));_0x3c1ed6['api2Test']={'success':_0x1c47d3['ok'],'status':_0x1c47d3[_0x1690(0x5f)],'statusText':_0x1c47d3[_0x1690(0x60)],'response':_0x29e9da['substring'](0x0,0xc8)};if(_0x1c47d3['ok'])console[_0x1690(0x48)](_0x307404[_0x1690(0x61)]);else{if(_0x307404['XLTWJ'](_0x1690(0x62),_0x1690(0x63)))return _0x270097[_0x1690(0x53)](_0x1690(0x64)),![];else console['log'](_0x1690(0x65)+_0x1c47d3['status']);}}else return _0x3d8c5c[_0x1690(0x48)]('โ
\x20'+_0x15bb00+_0x1690(0x66)),!![];}catch(_0x4bf200){_0x3c1ed6[_0x1690(0x67)]={'success':![],'error':_0x4bf200[_0x1690(0x52)],'name':_0x4bf200[_0x1690(0x68)]},console['error'](_0x307404[_0x1690(0x69)],_0x4bf200[_0x1690(0x52)]);}if((_0x5387b8=_0x3c1ed6[_0x1690(0x67)])!==null&&_0x307404['uSsxp'](_0x5387b8,void 0x0)&&_0x5387b8[_0x1690(0x6a)])return{'success':!![],'message':'API\x20is\x20reachable','details':_0x3c1ed6};else return _0x307404['UZNys'](_0x192ab8=_0x3c1ed6[_0x1690(0x51)],null)&&_0x192ab8!==void 0x0&&_0x192ab8[_0x1690(0x6a)]?_0x307404[_0x1690(0x6b)](_0x307404[_0x1690(0x6c)],_0x307404[_0x1690(0x6c)])?(_0x575dd4[_0x1690(0x53)]('โ\x20Error\x20refreshing\x20YouTube\x20tokens:',_0x12cf05),![]):{'success':![],'message':_0x307404[_0x1690(0x6d)],'details':_0x3c1ed6}:{'success':![],'message':_0x307404[_0x1690(0x6e)],'details':_0x3c1ed6};}catch(_0x571f81){return console[_0x1690(0x53)](_0x307404[_0x1690(0x6f)],_0x571f81[_0x1690(0x52)]),{'success':![],'message':_0x1690(0x70)+_0x571f81[_0x1690(0x52)],'details':{'error':_0x571f81['message'],'results':_0x3c1ed6}};}};function _0x1fe5(){const _0x76e14b=['defineProperty','__esModule','verifyEmailCode','testYouTubeRefreshToken','testApiConnectivity','requestEmailVerification','refreshYouTubeTokens','reconnectYouTube','initiateOAuth','initiateNativeAuth','hasNativeSDK','forceYouTubeReconnectionWithRevoke','forceYouTubeReconnectionWithConsent','fixUserYouTubeConnection','exchangeCodeForToken','checkEmailVerificationStatus','SDK\x20not\x20initialized.\x20Developers\x20must\x20call\x20initializeApiKey()\x20before\x20using\x20auth\x20features.','3.0.72','isApiKeyInitialized','lcZwF','getApiConfig','vnHzm','krvUq','apiKey','No\x20API\x20key\x20configured.\x20Please\x20initialize\x20the\x20SDK\x20with\x20a\x20valid\x20developer\x20API\x20key.','getApiHeaders','Bearer\x20','cskgg','1030678346906-lovkuds2ouqmoc8eu5qpo98spa6edv4o.apps.googleusercontent.com','https://api.instagram.com/oauth/authorize','demo_instagram_client_id','user_profile,user_media','code','API_CONFIG','BASE_URL','/youtube/authorize','onairosevents://auth/callback','https://www.googleapis.com/auth/youtube.readonly','/reddit/authorize','identity,read','/pinterest/authorize','boards:read,pins:read','https://www.facebook.com/v12.0/dialog/oauth','demo_facebook_client_id','public_profile,email','/linkedin/authorize','openid\x20profile\x20email','/gmail/authorize','demo_gmail_client_id','https://www.googleapis.com/auth/gmail.readonly','/email/authorize','https://chat.openai.com','https://claude.ai/login','https://gemini.google.com','https://x.com/i/grok','https://hinge.co','https://www.instagram.com','https://www.sephora.com','https://web.telegram.org/k/','TiBtu','๐\x20[CONNECTIVITY]\x20Test\x201:\x20Checking\x20general\x20internet\x20(google.com)...','NUZJA','GlIQW','https://www.google.com','โ\x20[CONNECTIVITY]\x20Cannot\x20reach\x20Google\x20-\x20internet\x20may\x20be\x20down:','๐\x20[CONNECTIVITY]\x20Test\x202:\x20Checking\x20API\x20server...','โ
\x20[CONNECTIVITY]\x20API\x20server\x20is\x20reachable','โ\x20[CONNECTIVITY]\x20Cannot\x20reach\x20API\x20server:','mUByv','Internet\x20works\x20but\x20API\x20server\x20is\x20unreachable.\x20The\x20server\x20may\x20be\x20blocking\x20requests\x20from\x20this\x20device/simulator.','No\x20internet\x20connectivity\x20detected.\x20Check\x20your\x20network\x20connection.','โ\x20[CONNECTIVITY]\x20Connectivity\x20test\x20failed:','log','BMwMJ','BkRei','Djqov','paeGE','lsiKq','HEAD','TSYQK','ognbi','googleTest','message','error','HvAxy','EldlD','YWKgF','wvqHj','abort','/health','signal','WSvQf','text','catch','Unable\x20to\x20read\x20response','status','statusText','kRrTW','uWmAF','EwYVO','โ\x20Failed\x20to\x20get\x20fresh\x20tokens\x20from\x20Google\x20SDK','โ ๏ธ\x20[CONNECTIVITY]\x20API\x20server\x20responded\x20with\x20status:\x20','\x20YouTube\x20connection\x20fixed\x20via\x20Method\x201!','api2Test','name','CGKBL','success','QREFP','kLuwX','HbbUw','DDLlB','tAdix','Network\x20error:\x20','โ
\x20Found\x20existing\x20authentication\x20token\x20for\x20YouTube\x20auth','๐\x20Token\x20preview:','email','dPNmf','XuCeq','Network\x20request\x20failed','\x20\x20\x201.\x20No\x20internet\x20connection\x20on\x20device/simulator','\x20\x20\x202.\x20API\x20server\x20(API\x20server)\x20is\x20unreachable','\x20\x20\x204.\x20SSL/TLS\x20certificate\x20issue','\x20\x20\x205.\x20iOS\x20simulator\x20network\x20sandbox\x20issue\x20-\x20try\x20on\x20physical\x20device','๐\x20[OAUTH]\x20Starting\x20OAuth\x20for\x20platform:\x20','๐ฑ\x20[OAUTH]\x20Platform:\x20','Platform','Version','ZAXzn','YLAbU','WGPar','/email/authorize?action=verify','getUserAuthHeaders','๐\x20[OAUTH]\x20Using\x20User\x20JWT\x20for\x20authentication','โ\x20[OAUTH]\x20User\x20not\x20authenticated\x20-\x20cannot\x20initiate\x20','โ\x20[OAUTH]\x20Please\x20log\x20in\x20first\x20before\x20connecting\x20platforms','/authorize','๐\x20[OAUTH]\x20Proxy\x20URL:\x20','๐ค\x20[OAUTH]\x20Request\x20body:','โฐ\x20[OAUTH]\x20Request\x20timeout\x20for\x20','PXXyj','stringify','๐ก\x20[OAUTH]\x20Response\x20status:\x20','iKHaw','yEkiY','RIWfp','bqsvD','substring','โ\x20[OAUTH]\x20Error\x20initiating\x20OAuth\x20for\x20','\x20-\x20','json','URL','url','๐\x20[OAUTH]\x20Auth\x20URL\x20for\x20','SuPHM','AbortError','\x20-\x20the\x20server\x20took\x20too\x20long\x20to\x20respond','lYtAt','dqIQa','includes','ZWQJg','โ\x20[OAUTH]\x20Network\x20request\x20failed\x20for\x20','.\x20Possible\x20causes:','ZFdCK','\x20\x20\x203.\x20DNS\x20resolution\x20failed','dDrgD','profile','GoogleSignin','configure','bPMtt','wkMZE','cIPNq','Initiating\x20Facebook\x20Login\x20for\x20Instagram','๐\x20[YOUTUBE\x20AUTH]\x20Response\x20data\x20keys:','โน๏ธ\x20Already\x20signed\x20out\x20or\x20sign\x20out\x20failed:','โ
\x20Refresh\x20token\x20confirmed:','โ\x20Error\x20forcing\x20YouTube\x20consent:','โ\x20Sign-in\x20already\x20in\x20progress','๐\x20Creating\x20authentication\x20token\x20for\x20YouTube\x20connection...','temp_token_for_youtube_connection','๐\x20Refresh\x20token\x20preview:','๐ค\x20User:','โน๏ธ\x20Sign\x20out\x20not\x20needed:','rUUvQ','โ
\x20Token\x20cache\x20cleared','โน๏ธ\x20No\x20token\x20cache\x20to\x20clear','๐ง\x20Configuring\x20Google\x20Sign-In\x20for\x20forced\x20consent...','โ
\x20Play\x20Services\x20available','๐ฑ\x20User\x20should\x20see:\x20\x22Allow\x20[App]\x20to\x20access\x20your\x20YouTube\x20account\x20when\x20you\x27re\x20not\x20using\x20the\x20app?\x22','๐ค\x20User\x20email:','๐\x20FULL\x20userInfo\x20object\x20from\x20forceYouTubeReconnectionWithConsent:','๐\x20FULL\x20currentUser\x20object\x20from\x20forceYouTubeReconnectionWithConsent:','-\x20Access\x20token:','Missing','-\x20ID\x20token:','-\x20ServerAuthCode\x20(userInfo):','-\x20ServerAuthCode\x20(currentUser):','CjAKh','โ
\x20SUCCESS:\x20Got\x20refresh\x20token\x20after\x20consent!','refreshToken','LtiIv','wgaMR','๐บ\x20Fetching\x20YouTube\x20channel\x20information...','https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true','โ
\x20YouTube\x20channel\x20found:','ID:','aKHac','No\x20Channel','OXetu','ubrWu','๐ค\x20Sending\x20comprehensive\x20payload\x20with\x20REFRESH\x20TOKEN\x20to\x20backend:','๐\x20[YOUTUBE\x20REAUTH]\x20=====\x20SENDING\x20REAUTH\x20SIGNAL\x20TO\x20BACKEND\x20=====','๐\x20[YOUTUBE\x20REAUTH]\x20Endpoint:\x20https://API\x20server/youtube/native-auth','๐\x20[YOUTUBE\x20REAUTH]\x20Headers:','๐\x20[YOUTUBE\x20REAUTH]\x20Payload\x20Summary:','๐ก\x20[YOUTUBE\x20REAUTH]\x20Response\x20Status:','๐ก\x20[YOUTUBE\x20REAUTH]\x20Response\x20Status\x20Text:','๐ก\x20[YOUTUBE\x20REAUTH]\x20Response\x20Headers:','temporary\x20access\x20token\x20mode','๐\x20[YOUTUBE\x20REAUTH]\x20YouTube\x20connected\x20in\x20temporary\x20mode','โ
\x20[YOUTUBE\x20REAUTH]\x20Training\x20will\x20work,\x20but\x20connection\x20expires\x20in\x20~1\x20hour','๐\x20[YOUTUBE\x20REAUTH]\x20SUCCESS:\x20Temporary\x20YouTube\x20connection\x20established!','๐\x20[YOUTUBE\x20REAUTH]\x20Connection\x20Details:','4|2|0|5|6|3|1','๐\x20[YOUTUBE\x20REAUTH]\x20SUCCESS:\x20Full\x20YouTube\x20connection\x20with\x20refresh\x20tokens!','๐\x20[YOUTUBE\x20REAUTH]\x20Refresh\x20token\x20length:','๐\x20[YOUTUBE\x20REAUTH]\x20Refresh\x20token\x20type:','โ ๏ธ\x20[YOUTUBE\x20REAUTH]\x20Response\x20data:','โ ๏ธ\x20[YOUTUBE\x20REAUTH]\x20Expected\x20hasRefreshToken\x20or\x20refreshTokenReceived\x20in\x20response','๐\x20[YOUTUBE\x20REAUTH]\x20Signaling\x20training\x20system\x20to\x20restart...','โ ๏ธ\x20[YOUTUBE\x20REAUTH]\x20Training\x20restart\x20signal\x20failed:','โ ๏ธ\x20[YOUTUBE\x20REAUTH]\x20User\x20may\x20need\x20to\x20manually\x20restart\x20training','YeNgZ','โ\x20[YOUTUBE\x20REAUTH]\x20This\x20means\x20the\x20reauth\x20signal\x20was\x20not\x20processed','4|3|0|6|1|2|5','\x20\x20\x202.\x20Check\x20Google\x20Console\x20OAuth\x20configuration','โ\x20This\x20means\x20consent\x20screen\x20did\x20not\x20appear\x20or\x20user\x20denied\x20permissions','๐\x20FORCING\x20fresh\x20YouTube\x20consent\x20for\x20refresh\x20token...','axRsO','signOut','FUdCQ','getTokens','accessToken','tEKft','zkvbD','tVdBM','muzHR','cuPHZ','ZEbfu','uevnD','LQcbI','hasPlayServices','cYRGd','๐\x20Initiating\x20sign-in\x20-\x20consent\x20screen\x20should\x20appear...','dDbyQ','โ
\x20Sign-in\x20completed\x20-\x20checking\x20for\x20refresh\x20token...','SwHaC','gWsWO','data','PmkDy','user','TtGHR','getCurrentUser','ahZLw','๐\x20FULL\x20tokens\x20object\x20from\x20forceYouTubeReconnectionWithConsent:','๐\x20Token\x20analysis:','...','Cjcwa','xThey','tUxmw','serverAuthCode','NJCar','aUjCv','ASXtJ','FVxZd','AGKae','tfLyj','startsWith','mDThr','EENWy','Unknown\x20Channel','Fhhqs','GsHdo','QBOOW','hBjJi','fIzqp','YMXuv','UOfNT','XrhFs','items','CUosm','ywmsW','QvCuc','title','SGMqI','vahkW','puONL','PKiRe','MBFMj','PReRX','jOlVk','wMrpx','ShWBc','fkKXZ','dZWQO','dGEVl','warn','โ ๏ธ\x20[YOUTUBE\x20AUTH]\x20Backend\x20did\x20not\x20confirm\x20refresh\x20token','keys','โ ๏ธ\x20[YOUTUBE\x20AUTH]\x20Connection\x20may\x20fail\x20when\x20tokens\x20expire','OyWNe','beLZg','ZoeGW','HBmwc','UpSXY','IKWBT','DROkZ','๐ง\x20[OAUTH]\x20Email\x20platform\x20selected,\x20returning\x20mock\x20auth\x20URL','KBAVb','โ ๏ธ\x20Error\x20fetching\x20YouTube\x20channel\x20info:','jKntG','getJWT','mVZXn','trim','length','mBivJ','RSJlG','HfxYo','toISOString','ZrFkW','fCQLj','idToken','yUzvZ','youtube-','srZkK','mOQVM','now','TWWZx','debugInfo','wdNmg','zynkm','wqFuk','refreshTokenType','RQTUT','/youtube/native-auth','QGOjJ','jxuMd','PULIU','NLPZN','isTemporaryMode','plKwN','SdLEU','temporaryMode','eNozp','gnlYi','ETizB','SWypC','CBxOD','OzysQ','XLXrV','JIWnD','NiUOG','statusCodes','โ\x20User\x20cancelled\x20sign-in\x20-\x20no\x20refresh\x20token\x20obtained','qfCFM','IN_PROGRESS','PLAY_SERVICES_NOT_AVAILABLE','โ\x20Google\x20Play\x20Services\x20not\x20available','hasRefreshToken','lwhRb','ammAJ','qfOAy','ulQvA','CBVpz','nxZiY','GioYU','๐\x20[YOUTUBE\x20REAUTH]\x20REFRESH\x20TOKEN\x20SENT\x20TO\x20BACKEND:','๐\x20[YOUTUBE\x20REAUTH]\x20Full\x20refresh\x20token:','aLhkZ','qwnjq','ZPNtp','UbASB','ivRLj','RnoBT','ivivq','yeILn','wsURe','EvwIW','kAGGL','PYfad','TvTvT','wIdNt','\x20\x20\x203.\x20Ensure\x20user\x20clicks\x20\x22Allow\x22\x20on\x20consent\x20screen','tcnJs','IWZPQ','\x20\x20\x201.\x20Try\x20the\x20revoke\x20method:\x20forceYouTubeReconnectionWithRevoke()','WPzZR','YgJHm','XuGbd','HCjZc','nOeSZ','SIGN_IN_CANCELLED','KOabY','foOIF','โ ๏ธ\x20[YOUTUBE\x20REAUTH]\x20Backend\x20did\x20NOT\x20confirm\x20refresh\x20token\x20reception','โ\x20No\x20auth\x20token\x20found\x20for\x20YouTube\x20refresh','โ
\x20Revoked\x20existing\x20permissions\x20-\x20fresh\x20consent\x20REQUIRED','โน๏ธ\x20No\x20existing\x20permissions\x20to\x20revoke:','๐\x20Signing\x20in\x20after\x20revoke\x20-\x20consent\x20screen\x20MUST\x20appear...','OlKlJ','โ\x20Still\x20no\x20refresh\x20token\x20after\x20revoke\x20method','Qaqqn','UvBTe','iIQoK','BHLMa','wttBE','veKnJ','revokeAccess','CWRRe','NYDNb','JDXNp','ncDOH','YrTdH','MGmNn','YPHbr','VlTzK','BpNrH','โ
\x20SUCCESS:\x20Got\x20refresh\x20token\x20after\x20REVOKE\x20+\x20consent!','KpTht','nLszJ','evwnh','โ\x20Error\x20with\x20revoke\x20method:','๐\x20Method\x202:\x20Trying\x20forced\x20consent\x20via\x20revoke...','๐ง\x20Fixing\x20YouTube\x20connection\x20for\x20user:\x20','KpaaU','vQKUb','NYyAF','fujSw','jSghk','RJRci','amviS','\x20YouTube\x20connection\x20fixed\x20via\x20Method\x202!','โ\x20Failed\x20to\x20fix\x20','\x20YouTube\x20connection\x20with\x20both\x20methods','RSRtA','โ
\x20Successfully\x20refreshed\x20Google\x20tokens','lfvSQ','โ\x20Re-authentication\x20also\x20failed:','IQhkB','YdiDI','OxSKh','๐\x20Attempting\x20to\x20refresh\x20Google\x20tokens...','QyOQd','EoILi','โ\x20Error\x20testing\x20YouTube\x20refresh\x20token:','MGLlz','IMChh','wpWrm','๐\x20Refresh\x20failed,\x20attempting\x20re-authentication...','โ
\x20Re-authentication\x20successful','lNLcq','๐\x20YouTube\x20Token\x20Debug:','none','โ\x20Debug\x20tokens\x20failed:','ALAeW','PVygf','qkbCj','jZuNm','Cnkmu','rcTFO','nakpW','yaExQ','RCHxZ','jEGDc','dBqdv','โ\x20User\x20not\x20signed\x20in\x20to\x20Google,\x20cannot\x20refresh\x20tokens','Verification\x20code\x20sent\x20to\x20your\x20email','โ\x20YouTube\x20reconnection\x20failed','โน๏ธ\x20Token\x20clearing\x20failed\x20or\x20not\x20needed:','โ
\x20Got\x20serverAuthCode\x20(refresh\x20token\x20mechanism)','๐\x20[YOUTUBE\x20AUTH]\x20YouTube\x20connected\x20in\x20temporary\x20mode','โ
\x20[YOUTUBE\x20AUTH]\x20Training\x20will\x20work,\x20but\x20connection\x20expires\x20in\x20~1\x20hour','โน๏ธ\x20[YOUTUBE\x20AUTH]\x20User\x20can\x20reconnect\x20later\x20for\x20refresh\x20tokens\x20if\x20needed','DpaPa','๐\x20Forcing\x20fresh\x20YouTube\x20reconnection\x20for\x20refresh\x20token...','xKXft','โ
\x20Signed\x20out\x20from\x20Google','โ
\x20Cleared\x20cached\x20access\x20token','youtube','hyDau','VNfSa','vOZfd','โ ๏ธ\x20Still\x20no\x20refresh\x20token\x20after\x20reconnection','vkHul','โ\x20YouTube\x20reconnection\x20error:','kJDnk','qNWVo','HKhOM','uFPTy','aAtDN','beAPw','hAJCC','sFAWX','clearCachedAccessToken','qffxX','wLjPK','YvjhS','MzHkZ','fwvQC','bCXBv','VqcMi','fVpIY','AZfIF','geAyt','wZwQz','FwxTx','zAXih','NNfoo','Google\x20Sign-In\x20already\x20in\x20progress','โ\x20Error\x20requesting\x20email\x20verification:','0|5|2|3|1|6|4','โ\x20CRITICAL:\x20No\x20refresh\x20token\x20even\x20after\x20consent\x20screen','๐ก\x20Solutions:','โ\x20[YOUTUBE\x20AUTH]\x20Username\x20is\x20required\x20for\x20YouTube\x20authentication','Email\x20verified\x20successfully','aNZgD','๐\x20Signed\x20out\x20to\x20force\x20fresh\x20consent','โ
\x20Google\x20Sign-In\x20successful:','๐\x20FULL\x20userInfo\x20object:','๐\x20Got\x20Google\x20tokens','๐\x20REFRESH\x20TOKEN\x20EXTRACTION:','-\x20userInfo.data?.serverAuthCode:','-\x20tokens.idToken:','-\x20tokens.accessToken:','โ\x20CRITICAL:\x20No\x20refresh\x20token\x20available\x20-\x20YouTube\x20connection\x20will\x20fail\x20when\x20token\x20expires','๐ก\x20Check\x20Google\x20Sign-In\x20configuration:\x20offlineAccess,\x20forceCodeForRefreshToken','โ ๏ธ\x20Continuing\x20without\x20refresh\x20token\x20-\x20connection\x20may\x20fail\x20later','cenRO','pPClN','โ
\x20Refresh\x20token\x20available\x20for\x20YouTube\x20connection','cPOIy','tdAXu','โ ๏ธ\x20No\x20YouTube\x20channel\x20found\x20for\x20user','youtube_user','yUbYc','โน๏ธ\x20No\x20valid\x20authentication\x20token\x20found\x20for\x20YouTube\x20connection','โน๏ธ\x20NOTE:\x20SDK\x20does\x20not\x20create\x20users\x20during\x20YouTube\x20connection','โน๏ธ\x20User\x20should\x20authenticate\x20first\x20via\x20Google/Apple/Email\x20before\x20connecting\x20YouTube','๐บ\x20YouTube\x20channel\x20name:','apple','๐ค\x20BACKEND\x20PAYLOAD\x20SUMMARY:','-\x20hasAccessToken:','-\x20refreshTokenType:','-\x20userEmail:','-\x20channelName:','๐\x20COMPLETE\x20BACKEND\x20PAYLOAD:','๐ก\x20Backend\x20response\x20status:','โ
\x20[YOUTUBE\x20AUTH]\x20Backend\x20confirmed\x20refresh\x20token\x20received','โ
\x20[YOUTUBE\x20AUTH]\x20Full\x20YouTube\x20connection\x20with\x20persistent\x20access','MyRPD','โ\x20YouTube\x20auth\x20failed:','Google\x20Play\x20Services\x20not\x20available','Mptce','mUxNN','XvnxV','AqwDr','UzlHr','HKpZj','cOAvX','MFIMz','WiSxs','signIn','qnLVN','steUd','sZWun','dBByl','๐\x20FULL\x20tokens\x20object:','EEXKa','๐\x20FULL\x20currentUser\x20object:','tvwfY','wubiw','Present:\x20','-\x20currentUser?.serverAuthCode:','ZMnpn','nuMQA','OfytZ','SdNSc','mGQms','EYOTz','LLTgH','PEXzc','mWxvr','WogJZ','etMFn','bJqVw','beuxc','Tqmic','Tsbpz','FiwSR','piZLb','FCqmJ','Network\x20error.\x20Please\x20check\x20your\x20connection\x20and\x20try\x20again.','SXPQY','xxBqn','ArTsM','CJnxe','fTUyE','lcknn','JOhMg','pKdIM','split','dAzpt','CMjqG','JqvqP','TkqzT','JgqQl','bfKCd','JbwiZ','DSjLk','AjOGn','dpsFz','KpMmk','ZYdAp','hMMXH','efzWj','BeKvx','kZlpz','default','gnDMl','SeQHm','dqmXe','kYvqw','EqBCE','ARXDO','MAcAO','AVmuQ','MEWsN','yxGbb','tTtny','๐\x20Using\x20auth\x20token\x20for\x20linking:','No\x20token','twqkw','IDrWW','mBRSQ','NUoJw','HZjCF','dvSlN','-\x20hasServerAuthCode:','RaOTA','QQXpm','๐ค\x20Sending\x20YouTube\x20auth\x20to\x20backend\x20with\x20refresh\x20token:','DucGz','uWbXY','VDiti','headers','QYpEO','๐\x20COMPLETE\x20BACKEND\x20RESPONSE:','uWwgc','enabled','Ngwdp','BZcJg','wUqPv','PcTrN','refreshTokenReceived','iwoFq','jViOi','fARXV','token','XjKtP','DIXur','wOhGi','AgGic','BMWkD','xidpG','hkRxi','iqHdm','tNMwz','sDVvj','VdDbb','hNcCO','instagram','enslA','QnIMH','fXQcX','BpiFX','ReXvH','uXLne','IAXRU','oOOLw','nRAsd','TRbOi','code=','OTQYI','FIJpV','NxWFb','cwVod','Exchanging\x20code\x20for\x20token\x20for\x20platform:\x20','/token','Error\x20exchanging\x20code\x20for\x20token:\x20','Token\x20exchange\x20failed\x20with\x20status\x20','GwHKI','MxPyl','Error\x20exchanging\x20code\x20for\x20token:','Falling\x20back\x20to\x20simulated\x20token\x20response','_access_token_','_refresh_token_','random','toString','yEJfr','๐\x20Refresh\x20token\x20type:','tssBr','YMyTB','rzsdy','โ\x20YouTube\x20token\x20refresh\x20failed:','โ\x20Error\x20refreshing\x20YouTube\x20tokens:','theiD','ejWjK','lmsou','FsHhz','yHBsF','hazjm','MRzjs','RyPdB','NgTbv','โ
\x20YouTube\x20tokens\x20refreshed\x20successfully:','ACYbU','YnvGb','Cbtxs','VRqOz','โ\x20[OAUTH]\x20Request\x20timeout\x20for\x20','IuRAa','๐\x20[TRAINING\x20RESTART]\x20Triggering\x20training\x20restart\x20for\x20user:','โ\x20[TRAINING\x20RESTART]\x20Error\x20triggering\x20training\x20restart:','xsEXM','VBIFV','/mobile-training/restart','youtube_reauth','MYBuW','โ
\x20[TRAINING\x20RESTART]\x20Training\x20restart\x20successful:','โ\x20[TRAINING\x20RESTART]\x20Training\x20restart\x20failed:','Training\x20restart\x20failed:\x20','jaSvO','๐\x20Current\x20token\x20status:','โ
\x20YouTube\x20connection\x20fixed!\x20Testing\x20again...','๐\x20New\x20token\x20status:','hPgyD','โ\x20Failed\x20to\x20fix\x20YouTube\x20connection','REXPK','fotkL','aBFqX','ISueO','RgjpC','PKrjM','ZuGvn','TjYxm','cifnd','WZtiu','JOpKN','rBVHR','ZImEV','sJOBv','wiAVK','aDEXf','PNAXv','ImIam','โ
\x20Refresh\x20token\x20already\x20available','KxbyI','kRFMm','HwROj','ZRkVu','5|2|4|6|3|1|0','๐\x20[YOUTUBE\x20REAUTH]\x20Refresh\x20token\x20sent:','๐\x20[YOUTUBE\x20REAUTH]\x20Training\x20Ready:\x20Yes','qMTUe','๐ง\x20Requesting\x20email\x20verification\x20for:','tFvWx','Failed\x20to\x20send\x20verification\x20code','vakTZ','HGgtv','wXtFI','request','VFMJu','arRwa','JMyGc','BLEea','prEeZ','pGFxN','LaGBP','aYkwC','IkKEz','ZTdaK','DTBvL','BqetP','ZkhVg','wgSmH','FMUxv','RYEHr','zVuLj','wWBhF','dAKNJ','PhctN','jmndA','Yes','zsJbE','nOUTv','EXsMl','XCczT','User\x20cancelled\x20Google\x20Sign-In','verify','Invalid\x20verification\x20code','โ\x20Error\x20verifying\x20email\x20code:','๐\x20Verifying\x20email\x20code\x20for:','MXClI','/email/verification','hFzse','ZDGlj','bEqWR','wvIYU','existingUser','KrJWJ','mnCeE','GSLbH','GvvCg','eZKQC','โ\x20Error\x20checking\x20email\x20verification\x20status:','hODMI','WsQSI','zesPQ','KIxoD','adiCy','Network\x20error','\x20-\x20aborting','QavUC','initializePlatformAuthService'];_0x1fe5=function(){return _0x76e14b;};return _0x1fe5();}exports[_0x1690(0x4)]=testApiConnectivity;const initiateOAuth=async(_0x2cb8a3,_0xe9a6e1)=>{const _0x1cb182={'RIWfp':_0x1690(0x71),'bqsvD':_0x1690(0x72),'ZAXzn':function(_0x64cbd1,_0x38a174){return _0x64cbd1===_0x38a174;},'YLAbU':_0x1690(0x73),'WGPar':'๐ง\x20[OAUTH]\x20Email\x20platform\x20selected,\x20returning\x20mock\x20auth\x20URL','PXXyj':function(_0x33e510,_0x581386,_0x215cf2){return _0x33e510(_0x581386,_0x215cf2);},'iKHaw':_0x1690(0x74),'yEkiY':_0x1690(0x75),'SuPHM':function(_0x5a0bef,_0x48dfa3){return _0x5a0bef===_0x48dfa3;},'lYtAt':function(_0x58d102,_0x12043e){return _0x58d102!==_0x12043e;},'dqIQa':function(_0x479f0a,_0x2d77ad){return _0x479f0a!==_0x2d77ad;},'ZWQJg':_0x1690(0x76),'ZFdCK':_0x1690(0x77),'nyMWN':_0x1690(0x78),'dDrgD':_0x1690(0x79),'xNgIy':_0x1690(0x7a)};try{console[_0x1690(0x48)](_0x1690(0x7b)+_0x2cb8a3),console['log'](_0x1690(0x7c)+_reactNative[_0x1690(0x7d)]['OS']+',\x20Version:\x20'+_reactNative[_0x1690(0x7d)][_0x1690(0x7e)]);if(_0x1cb182[_0x1690(0x7f)](_0x2cb8a3,_0x1cb182[_0x1690(0x80)]))return console[_0x1690(0x48)](_0x1cb182[_0x1690(0x81)]),_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x82);let _0x5a1c6f;try{_0x5a1c6f=await(0x0,_api[_0x1690(0x83)])(),console[_0x1690(0x48)](_0x1690(0x84));}catch(_0x81fa40){return console[_0x1690(0x53)](_0x1690(0x85)+_0x2cb8a3+'\x20OAuth'),console[_0x1690(0x53)](_0x1690(0x86)),null;}const _0x1921d1=_api['API_CONFIG'][_0x1690(0x22)]+'/'+_0x2cb8a3+_0x1690(0x87);console[_0x1690(0x48)](_0x1690(0x88)+_0x1921d1),console['log']('๐\x20[OAUTH]\x20About\x20to\x20make\x20fetch\x20request...');const _0x30da42={'platform':_0x2cb8a3,'timestamp':new Date()['toISOString']()};console[_0x1690(0x48)](_0x1690(0x89),_0x30da42);const _0xd32712=new AbortController(),_0x2db183=setTimeout(()=>{console[_0x1690(0x48)](_0x1690(0x8a)+_0x2cb8a3+'\x20-\x20aborting'),_0xd32712['abort']();},0x7530),_0x10034f=await _0x1cb182[_0x1690(0x8b)](fetch,_0x1921d1,{'method':'POST','headers':_0x5a1c6f,'body':JSON[_0x1690(0x8c)](_0x30da42),'signal':_0xd32712['signal']});clearTimeout(_0x2db183),console[_0x1690(0x48)](_0x1690(0x8d)+_0x10034f[_0x1690(0x5f)]+'\x20'+_0x10034f['statusText']);if(!_0x10034f['ok']){if(_0x1cb182['ZAXzn'](_0x1cb182[_0x1690(0x8e)],_0x1cb182[_0x1690(0x8f)]))_0x52d359[_0x1690(0x48)](_0x1cb182[_0x1690(0x90)]),_0x4e516a[_0x1690(0x48)](_0x1cb182[_0x1690(0x91)],_0x3c92ac[_0x1690(0x92)](0x0,0x14)+'...');else{const _0x168c8d=await _0x10034f[_0x1690(0x5c)]();return console[_0x1690(0x53)](_0x1690(0x93)+_0x2cb8a3+':\x20'+_0x10034f[_0x1690(0x5f)]+_0x1690(0x94)+_0x168c8d),null;}}const _0x4a60ff=await _0x10034f[_0x1690(0x95)]();console[_0x1690(0x48)]('๐\x20[OAUTH]\x20Response\x20data\x20for\x20'+_0x2cb8a3+':',_0x4a60ff);const _0x579726=_0x2cb8a3+_0x1690(0x96),_0x44aa73=_0x4a60ff[_0x579726]||_0x4a60ff[_0x1690(0x97)]||null;return console[_0x1690(0x48)](_0x1690(0x98)+_0x2cb8a3+'\x20(key:\x20'+_0x579726+'):',_0x44aa73),_0x44aa73;}catch(_0x58221b){var _0x3674ee;if(_0x1cb182[_0x1690(0x99)](_0x58221b[_0x1690(0x68)],_0x1690(0x9a)))console[_0x1690(0x53)]('โ\x20[OAUTH]\x20Request\x20timeout\x20for\x20'+_0x2cb8a3+_0x1690(0x9b));else _0x1cb182[_0x1690(0x9c)](_0x3674ee=_0x58221b['message'],null)&&_0x1cb182[_0x1690(0x9d)](_0x3674ee,void 0x0)&&_0x3674ee[_0x1690(0x9e)](_0x1cb182[_0x1690(0x9f)])?(console[_0x1690(0x53)](_0x1690(0xa0)+_0x2cb8a3+_0x1690(0xa1)),console[_0x1690(0x53)](_0x1cb182[_0x1690(0xa2)]),console[_0x1690(0x53)](_0x1cb182['nyMWN']),console[_0x1690(0x53)](_0x1690(0xa3)),console[_0x1690(0x53)](_0x1cb182[_0x1690(0xa4)]),console['error'](_0x1cb182['xNgIy'])):console[_0x1690(0x53)](_0x1690(0x93)+_0x2cb8a3+':',_0x58221b);return null;}};exports[_0x1690(0x8)]=initiateOAuth;const initializeGoogleSignIn=()=>{const _0x2fc43f={'bPMtt':_0x1690(0x25),'yJADP':'openid','wkMZE':_0x1690(0xa5),'cIPNq':_0x1690(0x73)};_googleSignin[_0x1690(0xa6)][_0x1690(0xa7)]({'webClientId':WEB_CLIENT_ID,'iosClientId':IOS_CLIENT_ID,'offlineAccess':!![],'forceCodeForRefreshToken':!![],'scopes':[_0x2fc43f[_0x1690(0xa8)],_0x2fc43f['yJADP'],_0x2fc43f[_0x1690(0xa9)],_0x2fc43f[_0x1690(0xaa)]],'hostedDomain':'','accountName':''});},forceYouTubeReconnectionWithConsent=async _0xfa90d9=>{const _0x5c2b30={'hBjJi':function(_0x5c8887,_0x2f9276,_0x1130e2){return _0x5c8887(_0x2f9276,_0x1130e2);},'UOfNT':_0x1690(0xab),'ySgbp':_0x1690(0x40),'JVKpj':_0x1690(0xac),'KBAVb':_0x1690(0xad),'lsXoM':_0x1690(0xae),'JIWnD':_0x1690(0xaf),'NiUOG':function(_0x255935,_0x28185b){return _0x255935===_0x28185b;},'qfCFM':'๐ก\x20User\x20must\x20click\x20\x22Allow\x22\x20to\x20get\x20refresh\x20token','RbPnk':_0x1690(0xb0),'jOlVk':function(_0x335dcc,_0x530cfa){return _0x335dcc===_0x530cfa;},'TtGHR':function(_0x54bb9f,_0xd07636){return _0x54bb9f===_0xd07636;},'wsURe':function(_0x5db3e0,_0xee9b41){return _0x5db3e0===_0xee9b41;},'fkKXZ':function(_0x4762e7,_0x20de59){return _0x4762e7===_0x20de59;},'EvwIW':function(_0x4a017d,_0xaf5b7f){return _0x4a017d===_0xaf5b7f;},'DROkZ':'Unknown\x20Channel','RSJlG':_0x1690(0xb1),'kAGGL':_0x1690(0xb2),'WPzZR':'โ
\x20Got\x20serverAuthCode\x20from\x20sign-in\x20response','EENWy':_0x1690(0xb3),'PReRX':'โ ๏ธ\x20No\x20YouTube\x20channel\x20found\x20for\x20user','HCjZc':function(_0x2879bb,_0x3f46a6){return _0x2879bb===_0x3f46a6;},'nOeSZ':function(_0x14ab0b,_0x4826d0){return _0x14ab0b===_0x4826d0;},'wdNmg':function(_0x50c034,_0x449d3e){return _0x50c034===_0x449d3e;},'dGEVl':function(_0x4a7b1e,_0x3a401d){return _0x4a7b1e===_0x3a401d;},'HBmwc':function(_0x45e300,_0x304581){return _0x45e300===_0x304581;},'axRsO':_0x1690(0xb4),'BMJxD':'โ
\x20Signed\x20out\x20-\x20consent\x20cache\x20cleared','FUdCQ':_0x1690(0xb5),'tEKft':function(_0x59bf3c,_0x5755aa){return _0x59bf3c!==_0x5755aa;},'zkvbD':_0x1690(0xb6),'tVdBM':_0x1690(0xb7),'muzHR':_0x1690(0xb8),'cuPHZ':_0x1690(0xb9),'ZEbfu':_0x1690(0x25),'uevnD':'openid','LQcbI':_0x1690(0xa5),'KkEHU':_0x1690(0x73),'cYRGd':_0x1690(0xba),'dDbyQ':_0x1690(0xbb),'SwHaC':_0x1690(0xbc),'gWsWO':function(_0x3d3e8d,_0x150769){return _0x3d3e8d===_0x150769;},'PmkDy':function(_0xcdab34,_0x14a48c){return _0xcdab34===_0x14a48c;},'ahZLw':_0x1690(0xbd),'vqKUh':_0x1690(0xbe),'bFdMW':_0x1690(0xbf),'Cjcwa':_0x1690(0xc0),'xThey':_0x1690(0xc1),'HfPno':'Present','QYHNW':_0x1690(0xc2),'puONL':function(_0x4d85f5,_0x133f4c){return _0x4d85f5!==_0x133f4c;},'tUxmw':function(_0x4f8201,_0x1c0813){return _0x4f8201!==_0x1c0813;},'RrhnA':_0x1690(0xc3),'NJCar':function(_0x4a2d48,_0x834e3a){return _0x4a2d48===_0x834e3a;},'aUjCv':function(_0x4e7e3b,_0x78de64){return _0x4e7e3b!==_0x78de64;},'ASXtJ':_0x1690(0xc4),'FVxZd':'hLdiC','AGKae':_0x1690(0xc5),'tfLyj':'๐\x20Refresh\x20token\x20type:','mDThr':_0x1690(0xc6),'Fhhqs':function(_0x2fea77,_0x3a2f64){return _0x2fea77!==_0x3a2f64;},'GsHdo':_0x1690(0xc7),'AEQgs':_0x1690(0xc8),'QBOOW':_0x1690(0xc9),'aGdXK':_0x1690(0xca),'CUosm':function(_0xb712bb,_0x486c11){return _0xb712bb>_0x486c11;},'ywmsW':function(_0x325982,_0x10ec1c){return _0x325982===_0x10ec1c;},'SGMqI':_0x1690(0xcb),'vahkW':_0x1690(0xcc),'PKiRe':_0x1690(0xcd),'wMrpx':function(_0x1732bd,_0xfe236b){return _0x1732bd===_0xfe236b;},'ShWBc':function(_0x481253,_0x1b32c1){return _0x481253===_0x1b32c1;},'dZWQO':function(_0x421380,_0x15d56b){return _0x421380===_0x15d56b;},'FRSJn':_0x1690(0xce),'OyWNe':function(_0x190073,_0xf5ecb2){return _0x190073!==_0xf5ecb2;},'beLZg':_0x1690(0xcf),'cHSyF':_0x1690(0xd0),'ZoeGW':'โ ๏ธ\x20Failed\x20to\x20fetch\x20YouTube\x20channel\x20info:','UpSXY':function(_0x478906,_0x1abec4){return _0x478906===_0x1abec4;},'IKWBT':function(_0xa6bf98,_0x11d8b5){return _0xa6bf98===_0x11d8b5;},'jKntG':function(_0x55d8d1,_0x5773ec){return _0x55d8d1===_0x5773ec;},'pNwfd':function(_0x15bfb0,_0x2fb973){return _0x15bfb0===_0x2fb973;},'mVZXn':function(_0x475e60,_0x24eccd){return _0x475e60<_0x24eccd;},'mBivJ':'UfQQJ','HfxYo':'youtube','ZrFkW':function(_0xcf0019,_0x55de15){return _0xcf0019===_0x55de15;},'fCQLj':function(_0x4f09f0,_0x5bf891){return _0x4f09f0===_0x5bf891;},'ubKEz':function(_0x3e1d26,_0x5c3c42){return _0x3e1d26===_0x5c3c42;},'yUzvZ':function(_0x4e7ec4,_0x32b1ed){return _0x4e7ec4===_0x32b1ed;},'srZkK':function(_0x3cbebd,_0x23647f){return _0x3cbebd===_0x23647f;},'oTagZ':function(_0x23d9d9,_0x19fae5){return _0x23d9d9===_0x19fae5;},'mOQVM':function(_0x3103f0,_0x426250){return _0x3103f0===_0x426250;},'SQlrv':function(_0x2c79a1,_0x4024b7){return _0x2c79a1+_0x4024b7;},'TWWZx':'signOut_and_configure','XQiZS':_0x1690(0xd1),'gEzwP':_0x1690(0xd2),'zynkm':_0x1690(0xd3),'wqFuk':_0x1690(0xd4),'NqrlW':'NO\x20AUTH\x20TOKEN','WEemH':_0x1690(0xd5),'PZclU':'๐\x20[YOUTUBE\x20REAUTH]\x20FULL\x20PAYLOAD:','RQTUT':function(_0x4b9de2,_0x4e1185,_0x7fff33){return _0x4b9de2(_0x4e1185,_0x7fff33);},'QGOjJ':function(_0x40f420,_0x233c00){return _0x40f420&&_0x233c00;},'KmIsL':_0x1690(0xd6),'ERGHE':_0x1690(0xd7),'jxuMd':_0x1690(0xd8),'PULIU':'โ
\x20[YOUTUBE\x20REAUTH]\x20Backend\x20Response\x20SUCCESS:','NLPZN':function(_0x383d1a,_0xdf2da){return _0x383d1a===_0xdf2da;},'plKwN':function(_0x17e1a9,_0x1d3a53){return _0x17e1a9===_0x1d3a53;},'SdLEU':function(_0x2e3af0,_0x7e8bed){return _0x2e3af0===_0x7e8bed;},'eNozp':function(_0x3660cd,_0x31ca42){return _0x3660cd===_0x31ca42;},'gnlYi':function(_0x5dcbcf,_0x1dad5e){return _0x5dcbcf===_0x1dad5e;},'Razqr':_0x1690(0xd9),'ETizB':'Dwjqe','HiPPf':_0x1690(0xda),'jTwYN':_0x1690(0xdb),'pEaUV':_0x1690(0xdc),'SWypC':_0x1690(0xdd),'CBxOD':'๐\x20[YOUTUBE\x20REAUTH]\x20Mode:\x20Temporary\x20(expires\x20~1\x20hour)','OzysQ':'๐\x20[YOUTUBE\x20REAUTH]\x20Refresh\x20token\x20sent:','XLXrV':'Yes','lwhRb':_0x1690(0xde),'ammAJ':_0x1690(0xdf),'qfOAy':_0x1690(0xe0),'ulQvA':'โ
\x20[YOUTUBE\x20REAUTH]\x20Response\x20hasRefreshToken:','CBVpz':_0x1690(0xe1),'nxZiY':'serverAuthCode','GioYU':'โ
\x20[YOUTUBE\x20REAUTH]\x20Backend\x20CONFIRMED\x20refresh\x20token\x20received','aLhkZ':'โ ๏ธ\x20[YOUTUBE\x20REAUTH]\x20Backend\x20did\x20NOT\x20confirm\x20refresh\x20token\x20reception','qwnjq':_0x1690(0xe2),'ZPNtp':_0x1690(0xe3),'UbASB':_0x1690(0xe4),'ivRLj':function(_0x353acc,_0x1974a3,_0x27f439){return _0x353acc(_0x1974a3,_0x27f439);},'DzGJo':'โ
\x20[YOUTUBE\x20REAUTH]\x20Training\x20restart\x20signal\x20sent\x20successfully','RnoBT':_0x1690(0xe5),'ybAje':_0x1690(0xe6),'EIlbz':function(_0xecc24a,_0x3ff6f2){return _0xecc24a===_0x3ff6f2;},'ivivq':_0x1690(0xe7),'yeILn':'โ\x20[YOUTUBE\x20REAUTH]\x20Backend\x20processing\x20FAILED:','Sglef':_0x1690(0xe8),'LDHqa':function(_0xadd3d5,_0x3cb438){return _0xadd3d5!==_0x3cb438;},'ooGhe':_0x1690(0xe9),'wIdNt':_0x1690(0xea),'tcnJs':_0x1690(0xeb),'IWZPQ':'โ\x20CRITICAL:\x20No\x20refresh\x20token\x20even\x20after\x20consent\x20screen','XuGbd':'YgJHm','KOabY':'โ\x20User\x20cancelled\x20sign-in\x20-\x20no\x20refresh\x20token\x20obtained','foOIF':function(_0x2cb6cd,_0xe9a7ed){return _0x2cb6cd===_0xe9a7ed;}};try{var _0x1730c0,_0x2a46cb,_0x317189;console[_0x1690(0x48)](_0x1690(0xec)),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0xed)],_0xfa90d9);try{await _googleSignin[_0x1690(0xa6)][_0x1690(0xee)](),console[_0x1690(0x48)](_0x5c2b30['BMJxD']);}catch(_0x232f89){console[_0x1690(0x48)](_0x5c2b30[_0x1690(0xef)],_0x232f89);}try{const _0x556570=await _googleSignin[_0x1690(0xa6)][_0x1690(0xf0)]();_0x556570[_0x1690(0xf1)]&&(_0x5c2b30[_0x1690(0xf2)](_0x5c2b30[_0x1690(0xf3)],_0x5c2b30[_0x1690(0xf3)])?_0x1840da[_0x1690(0x48)](_0x1690(0x65)+_0x2de1b2[_0x1690(0x5f)]):(await _googleSignin['GoogleSignin']['clearCachedAccessToken'](_0x556570[_0x1690(0xf1)]),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0xf4)])));}catch(_0x5e3345){console[_0x1690(0x48)](_0x5c2b30[_0x1690(0xf5)]);}console[_0x1690(0x48)](_0x5c2b30[_0x1690(0xf6)]),_googleSignin[_0x1690(0xa6)][_0x1690(0xa7)]({'webClientId':WEB_CLIENT_ID,'iosClientId':IOS_CLIENT_ID,'offlineAccess':!![],'forceCodeForRefreshToken':!![],'scopes':[_0x5c2b30[_0x1690(0xf7)],_0x5c2b30[_0x1690(0xf8)],_0x5c2b30[_0x1690(0xf9)],_0x5c2b30['KkEHU']],'hostedDomain':'','accountName':''}),await _googleSignin[_0x1690(0xa6)][_0x1690(0xfa)](),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0xfb)]),console['log'](_0x1690(0xfc)),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0xfd)]);const _0x1dec3b=await _googleSignin['GoogleSignin']['signIn']();console[_0x1690(0x48)](_0x1690(0xfe)),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0xff)],_0x5c2b30[_0x1690(0x100)](_0x1730c0=_0x1dec3b[_0x1690(0x101)],null)||_0x5c2b30['wdNmg'](_0x1730c0,void 0x0)||_0x5c2b30[_0x1690(0x102)](_0x1730c0=_0x1730c0[_0x1690(0x103)],null)||_0x5c2b30[_0x1690(0x104)](_0x1730c0,void 0x0)?void 0x0:_0x1730c0[_0x1690(0x73)]);const _0x282f68=await _googleSignin['GoogleSignin'][_0x1690(0xf0)](),_0x1c7254=await _googleSignin[_0x1690(0xa6)][_0x1690(0x105)]();console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x106)]),console[_0x1690(0x48)](JSON[_0x1690(0x8c)](_0x1dec3b,null,0x2)),console[_0x1690(0x48)](_0x1690(0x107)),console[_0x1690(0x48)](JSON[_0x1690(0x8c)](_0x282f68,null,0x2)),console[_0x1690(0x48)](_0x5c2b30['vqKUh']),console[_0x1690(0x48)](JSON[_0x1690(0x8c)](_0x1c7254,null,0x2)),console[_0x1690(0x48)](_0x1690(0x108)),console[_0x1690(0x48)](_0x5c2b30['bFdMW'],_0x282f68[_0x1690(0xf1)]?_0x282f68[_0x1690(0xf1)]['substring'](0x0,0x14)+_0x1690(0x109):_0x5c2b30[_0x1690(0x10a)]),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x10b)],_0x282f68['idToken']?_0x5c2b30['HfPno']:_0x5c2b30[_0x1690(0x10a)]),console['log'](_0x5c2b30['QYHNW'],_0x5c2b30['puONL'](_0x2a46cb=_0x1dec3b[_0x1690(0x101)],null)&&_0x5c2b30[_0x1690(0x10c)](_0x2a46cb,void 0x0)&&_0x2a46cb[_0x1690(0x10d)]?_0x1dec3b[_0x1690(0x101)][_0x1690(0x10d)][_0x1690(0x92)](0x0,0x14)+_0x1690(0x109):_0x5c2b30[_0x1690(0x10a)]),console[_0x1690(0x48)](_0x5c2b30['RrhnA'],_0x1c7254!==null&&_0x5c2b30[_0x1690(0x10c)](_0x1c7254,void 0x0)&&_0x1c7254[_0x1690(0x10d)]?_0x1c7254[_0x1690(0x10d)][_0x1690(0x92)](0x0,0x14)+_0x1690(0x109):_0x5c2b30[_0x1690(0x10a)]);const _0x273fb5=((_0x317189=_0x1dec3b[_0x1690(0x101)])===null||_0x5c2b30[_0x1690(0x104)](_0x317189,void 0x0)?void 0x0:_0x317189[_0x1690(0x10d)])||(_0x1c7254===null||_0x5c2b30[_0x1690(0x10e)](_0x1c7254,void 0x0)?void 0x0:_0x1c7254[_0x1690(0x10d)]);if(_0x273fb5){if(_0x5c2b30[_0x1690(0x10f)](_0x5c2b30[_0x1690(0x110)],_0x5c2b30[_0x1690(0x111)])){var _0x591f62,_0x56eaf7,_0x364b5a,_0x1c6976,_0x1e81bb,_0x15ca7d;console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x112)]),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x113)],_0x273fb5[_0x1690(0x114)]('4/')?'serverAuthCode':_0x5c2b30[_0x1690(0x115)]),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x116)],_0x273fb5[_0x1690(0x92)](0x0,0x14)+_0x1690(0x109));let _0x3a9a34=_0x1690(0x117),_0x713e38=null;try{if(_0x5c2b30[_0x1690(0x118)](_0x5c2b30[_0x1690(0x119)],_0x5c2b30['AEQgs'])){console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x11a)]);const _0x5ecb98=await _0x5c2b30[_0x1690(0x11b)](fetch,_0x5c2b30['aGdXK'],{'headers':{'Authorization':_0x1690(0x1a)+_0x282f68[_0x1690(0xf1)],'Accept':'application/json'}});if(_0x5ecb98['ok']){if(_0x5c2b30['jOlVk'](_0x1690(0x11c),_0x1690(0x11d))){const _0x448b88={'XrhFs':function(_0x15452a,_0xe51e50,_0x30a096){return _0x5c2b30[_0x1690(0x11b)](_0x15452a,_0xe51e50,_0x30a096);}};return _0x5d4463[_0x1690(0x48)](_0x5c2b30[_0x1690(0x11e)]),new _0x49d858(_0xdc25ac=>{_0x448b88[_0x1690(0x11f)](_0x3e1cb6,()=>{_0xab30a6[_0x1690(0x48)]('Facebook\x20Login\x20completed\x20successfully'),_0xdc25ac(!![]);},0x3e8);});}else{const _0x2173ef=await _0x5ecb98[_0x1690(0x95)]();if(_0x2173ef[_0x1690(0x120)]&&_0x5c2b30[_0x1690(0x121)](_0x2173ef['items']['length'],0x0))_0x5c2b30[_0x1690(0x122)](_0x1690(0x123),'FkOBC')?(_0x56daed['googleTest']={'success':![],'error':_0x49ffdd[_0x1690(0x52)]},_0x417164['error'](_0x5c2b30['ySgbp'],_0x4e6679[_0x1690(0x52)])):(_0x3a9a34=_0x2173ef[_0x1690(0x120)][0x0]['snippet'][_0x1690(0x124)],_0x713e38=_0x2173ef[_0x1690(0x120)][0x0]['id'],console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x125)],_0x3a9a34,_0x5c2b30[_0x1690(0x126)],_0x713e38));else{if(_0x5c2b30[_0x1690(0x127)](_0x5c2b30[_0x1690(0x128)],_0x1690(0x129))){var _0x41a373,_0x3c93b0;console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x12a)]),_0x3a9a34=(_0x5c2b30[_0x1690(0x12b)](_0x41a373=_0x1dec3b['data'],null)||_0x5c2b30[_0x1690(0x12c)](_0x41a373,void 0x0)||_0x5c2b30[_0x1690(0x12d)](_0x41a373=_0x41a373[_0x1690(0x103)],null)||_0x5c2b30[_0x1690(0x12e)](_0x41a373,void 0x0)?void 0x0:_0x41a373[_0x1690(0x68)])||(_0x5c2b30[_0x1690(0x12f)](_0x3c93b0=_0x1dec3b[_0x1690(0x101)],null)||_0x5c2b30[_0x1690(0x102)](_0x3c93b0,void 0x0)||_0x5c2b30[_0x1690(0x130)](_0x3c93b0=_0x3c93b0[_0x1690(0x103)],null)||_0x5c2b30['NiUOG'](_0x3c93b0,void 0x0)?void 0x0:_0x3c93b0[_0x1690(0x73)])||_0x5c2b30['FRSJn'];}else _0x412a7e[_0x1690(0x131)](_0x1690(0x132)),_0x4ad73b[_0x1690(0x131)](_0x5c2b30['JVKpj'],_0x4f7db2[_0x1690(0x133)](_0x413a67)),_0x428bea[_0x1690(0x131)](_0x1690(0x134));}}}else{if(_0x5c2b30[_0x1690(0x135)](_0x5c2b30[_0x1690(0x136)],_0x5c2b30['cHSyF'])){var _0x5b8718,_0x5cb31d;console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x137)],_0x5ecb98[_0x1690(0x5f)]),_0x3a9a34=(_0x5c2b30[_0x1690(0x138)](_0x5b8718=_0x1dec3b[_0x1690(0x101)],null)||_0x5c2b30[_0x1690(0x139)](_0x5b8718,void 0x0)||(_0x5b8718=_0x5b8718[_0x1690(0x103)])===null||_0x5c2b30[_0x1690(0x12e)](_0x5b8718,void 0x0)?void 0x0:_0x5b8718[_0x1690(0x68)])||(_0x5c2b30[_0x1690(0x13a)](_0x5cb31d=_0x1dec3b['data'],null)||_0x5cb31d===void 0x0||(_0x5cb31d=_0x5cb31d[_0x1690(0x103)])===null||_0x5cb31d===void 0x0?void 0x0:_0x5cb31d[_0x1690(0x73)])||_0x5c2b30[_0x1690(0x13b)];}else return _0x254f13['log'](_0x1690(0x13c)),_0x74613b[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x82);}}else _0x27cc93['log'](_0x5c2b30[_0x1690(0x13d)],_0x369ef1);}catch(_0x4abecd){var _0x5cb467,_0x333c89;console[_0x1690(0x48)](_0x1690(0x13e),_0x4abecd),_0x3a9a34=((_0x5cb467=_0x1dec3b[_0x1690(0x101)])===null||_0x5cb467===void 0x0||(_0x5cb467=_0x5cb467[_0x1690(0x103)])===null||_0x5cb467===void 0x0?void 0x0:_0x5cb467[_0x1690(0x68)])||(_0x5c2b30[_0x1690(0x13f)](_0x333c89=_0x1dec3b[_0x1690(0x101)],null)||_0x5c2b30['pNwfd'](_0x333c89,void 0x0)||(_0x333c89=_0x333c89[_0x1690(0x103)])===null||_0x333c89===void 0x0?void 0x0:_0x333c89['email'])||'Unknown\x20Channel';}let _0x278716=await(0x0,_jwtStorageService[_0x1690(0x140)])();(!_0x278716||_0x5c2b30[_0x1690(0x141)](_0x278716[_0x1690(0x142)]()[_0x1690(0x143)],0x14))&&(_0x5c2b30['dZWQO'](_0x5c2b30[_0x1690(0x144)],'HZllI')?_0x9ab2a0[_0x1690(0x48)](_0x5c2b30['lsXoM'],_0x430eee['refreshTokenType']):(console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x145)]),_0x278716=_0x1690(0xb2)));const _0x40ecda={'session':{'username':_0xfa90d9,'platform':_0x5c2b30[_0x1690(0x146)],'timestamp':new Date()[_0x1690(0x147)](),'channelName':_0x3a9a34,'channelId':_0x713e38,'forceConsent':!![]},'googleUser':_0x5c2b30[_0x1690(0x148)](_0x591f62=_0x1dec3b[_0x1690(0x101)],null)||_0x5c2b30[_0x1690(0x149)](_0x591f62,void 0x0)?void 0x0:_0x591f62['user'],'accessToken':_0x282f68[_0x1690(0xf1)],'idToken':_0x282f68[_0x1690(0x14a)],'refreshToken':_0x273fb5,'serverAuthCode':_0x273fb5,'refresh_token':_0x273fb5,'server_auth_code':_0x273fb5,'authCode':_0x273fb5,'userAccountInfo':{'username':_0xfa90d9,'email':_0x5c2b30['ubKEz'](_0x56eaf7=_0x1dec3b[_0x1690(0x101)],null)||_0x56eaf7===void 0x0||_0x5c2b30[_0x1690(0x14b)](_0x56eaf7=_0x56eaf7[_0x1690(0x103)],null)||_0x56eaf7===void 0x0?void 0x0:_0x56eaf7[_0x1690(0x73)],'authToken':_0x278716,'channelName':_0x3a9a34,'channelId':_0x713e38,'userIdentifier':_0x278716?'user-'+_0x278716[_0x1690(0x92)](0x0,0xa):_0x1690(0x14c)+(_0x5c2b30[_0x1690(0x12c)](_0x364b5a=_0x1dec3b[_0x1690(0x101)],null)||_0x5c2b30[_0x1690(0x13a)](_0x364b5a,void 0x0)||_0x5c2b30[_0x1690(0x14d)](_0x364b5a=_0x364b5a[_0x1690(0x103)],null)||_0x5c2b30['oTagZ'](_0x364b5a,void 0x0)?void 0x0:_0x364b5a['email']),'googleId':(_0x1c6976=_0x1dec3b[_0x1690(0x101)])===null||_0x5c2b30[_0x1690(0x14e)](_0x1c6976,void 0x0)||(_0x1c6976=_0x1c6976[_0x1690(0x103)])===null||_0x1c6976===void 0x0?void 0x0:_0x1c6976['id'],'refreshToken':_0x273fb5,'serverAuthCode':_0x273fb5},'tokenExpiry':new Date(_0x5c2b30['SQlrv'](Date[_0x1690(0x14f)](),0xe10*0x3e8))[_0x1690(0x147)](),'requestRefreshToken':!![],'debugInfo':{'hasRefreshToken':!![],'refreshTokenType':_0x273fb5[_0x1690(0x114)]('4/')?_0x1690(0x10d):_0x5c2b30[_0x1690(0x115)],'configuredForRefresh':!![],'forcedConsent':!![],'consentMethod':_0x5c2b30[_0x1690(0x150)],'refreshTokenValue':_0x273fb5}};console[_0x1690(0x48)](_0x5c2b30['XQiZS'],{'hasAccessToken':!!_0x40ecda[_0x1690(0xf1)],'hasRefreshToken':!!_0x40ecda['refreshToken'],'hasServerAuthCode':!!_0x40ecda[_0x1690(0x10d)],'refreshTokenType':_0x40ecda[_0x1690(0x151)]['refreshTokenType'],'userEmail':_0x5c2b30[_0x1690(0x104)](_0x1e81bb=_0x1dec3b[_0x1690(0x101)],null)||_0x1e81bb===void 0x0||(_0x1e81bb=_0x1e81bb[_0x1690(0x103)])===null||_0x5c2b30[_0x1690(0x152)](_0x1e81bb,void 0x0)?void 0x0:_0x1e81bb[_0x1690(0x73)],'forcedConsent':!![]}),console[_0x1690(0x48)](_0x5c2b30['gEzwP']),console['log'](_0x5c2b30[_0x1690(0x153)]),console['log']('\uD83D\uDE80 [YOUTUBE REAUTH] Method: POST'),console['log'](_0x5c2b30[_0x1690(0x154)],{'Content-Type':'application/json','Authorization':_0x278716?_0x278716[_0x1690(0x92)](0x0,0x14)+_0x1690(0x109):_0x5c2b30['NqrlW']}),console[_0x1690(0x48)](_0x5c2b30['WEemH'],{'hasAccessToken':!!_0x40ecda[_0x1690(0xf1)],'hasRefreshToken':!!_0x40ecda[_0x1690(0xc6)],'hasServerAuthCode':!!_0x40ecda['serverAuthCode'],'refreshTokenType':_0x40ecda['debugInfo'][_0x1690(0x155)],'userEmail':(_0x15ca7d=_0x1dec3b[_0x1690(0x101)])===null||_0x15ca7d===void 0x0||_0x5c2b30[_0x1690(0x149)](_0x15ca7d=_0x15ca7d[_0x1690(0x103)],null)||_0x15ca7d===void 0x0?void 0x0:_0x15ca7d[_0x1690(0x73)],'channelName':_0x3a9a34,'forcedConsent':!![],'requestRefreshToken':!![]}),console['log'](_0x5c2b30['PZclU'],JSON[_0x1690(0x8c)](_0x40ecda,null,0x2));const _0xcdcbf=await _0x5c2b30[_0x1690(0x156)](fetch,_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x157),{'method':'POST','headers':{'Content-Type':'application/json',..._0x5c2b30[_0x1690(0x158)](_0x278716,{'Authorization':_0x278716})},'body':JSON[_0x1690(0x8c)](_0x40ecda)});console[_0x1690(0x48)](_0x5c2b30['KmIsL'],_0xcdcbf[_0x1690(0x5f)]),console['log'](_0x5c2b30['ERGHE'],_0xcdcbf[_0x1690(0x60)]),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x159)],_0xcdcbf['headers']);if(_0xcdcbf['ok']){var _0x3b3eda,_0x374c8b;const _0x3197c5=await _0xcdcbf[_0x1690(0x95)]();console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x15a)],JSON[_0x1690(0x8c)](_0x3197c5,null,0x2));const _0x28f583=_0x5c2b30[_0x1690(0x15b)]((_0x3b3eda=_0x3197c5['validation'])===null||_0x3b3eda===void 0x0?void 0x0:_0x3b3eda[_0x1690(0x15c)],!![])||_0x5c2b30[_0x1690(0x15d)](_0x5c2b30[_0x1690(0x15e)](_0x374c8b=_0x3197c5[_0x1690(0x15f)],null)||_0x5c2b30[_0x1690(0x160)](_0x374c8b,void 0x0)?void 0x0:_0x374c8b['enabled'],!![])||_0x5c2b30[_0x1690(0x161)](_0x3197c5['isTemporaryMode'],!![])||_0x3197c5['message']&&_0x3197c5[_0x1690(0x52)]['includes'](_0x5c2b30['Razqr']);if(_0x28f583){if(_0x5c2b30[_0x1690(0x100)](_0x5c2b30[_0x1690(0x162)],_0x5c2b30['ETizB']))console[_0x1690(0x48)](_0x5c2b30['HiPPf']),console[_0x1690(0x48)](_0x5c2b30['jTwYN']),console[_0x1690(0x48)](_0x5c2b30['pEaUV']),console['log'](_0x5c2b30[_0x1690(0x163)]),console['log'](_0x5c2b30[_0x1690(0x164)]),console[_0x1690(0x48)]('๐\x20[YOUTUBE\x20REAUTH]\x20Training\x20Ready:\x20Yes'),console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x165)],_0x273fb5?_0x5c2b30[_0x1690(0x166)]:'No');else{_0xbb5366[_0x1690(0x53)](_0x5c2b30[_0x1690(0x167)],_0xd96ba7);if(_0x5c2b30[_0x1690(0x168)](_0x36a9c8[_0x1690(0x20)],_0x502dda[_0x1690(0x169)]['SIGN_IN_CANCELLED']))_0xe2240c['error'](_0x1690(0x16a)),_0x1c7136[_0x1690(0x53)](_0x5c2b30[_0x1690(0x16b)]);else{if(_0x5c2b30[_0x1690(0x168)](_0x146f9b[_0x1690(0x20)],_0x5e6527[_0x1690(0x169)][_0x1690(0x16c)]))_0x46bd0b[_0x1690(0x53)](_0x5c2b30['RbPnk']);else _0x5c2b30[_0x1690(0x12b)](_0x4e3fec[_0x1690(0x20)],_0x28c1f4['statusCodes'][_0x1690(0x16d)])&&_0x4903c6[_0x1690(0x53)](_0x1690(0x16e));}return![];}}else{if(_0x3197c5[_0x1690(0x16f)]||_0x3197c5['refreshTokenReceived']){const _0x532194=_0x5c2b30[_0x1690(0x170)]['split']('|');let _0xb582f8=0x0;while(!![]){switch(_0x532194[_0xb582f8++]){case'0':console['log'](_0x5c2b30[_0x1690(0x171)]);continue;case'1':console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x172)],_0x273fb5['length']);continue;case'2':console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x173)],_0x3197c5['hasRefreshToken']);continue;case'3':console['log'](_0x5c2b30[_0x1690(0x174)],_0x273fb5[_0x1690(0x114)]('4/')?_0x5c2b30[_0x1690(0x175)]:_0x5c2b30['mDThr']);continue;case'4':console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x176)]);continue;case'5':console[_0x1690(0x48)](_0x1690(0x177));continue;case'6':console['log'](_0x1690(0x178),_0x273fb5);continue;}break;}}else return console['warn'](_0x5c2b30[_0x1690(0x179)]),console['warn'](_0x5c2b30[_0x1690(0x17a)],_0x3197c5),console[_0x1690(0x131)](_0x5c2b30[_0x1690(0x17b)]),![];}console[_0x1690(0x48)](_0x5c2b30[_0x1690(0x17c)]);try{await _0x5c2b30[_0x1690(0x17d)](triggerTrainingRestart,_0xfa90d9,_0x278716),console['log'](_0x5c2b30['DzGJo']);}catch(_0x176b85){console[_0x1690(0x131)](_0x5c2b30[_0x1690(0x17e)],_0x176b85),console['warn'](_0x5c2b30['ybAje']);}return!![];}else{if(_0x5c2b30['EIlbz'](_0x5c2b30[_0x1690(0x17f)],'YeNgZ')){const _0x5b0643=await _0xcdcbf[_0x1690(0x5c)]();return console['error'](_0x5c2b30[_0x1690(0x180)],_0xcdcbf[_0x1690(0x5f)],_0x5b0643),console[_0x1690(0x53)](_0x5c2b30['Sglef']),![];}else{var _0x38de25,_0x56bf60;_0x552fbd[_0x1690(0x48)](_0x1690(0x13e),_0x47270d),_0x51b9d9=(_0x5c2b30[_0x1690(0x168)](_0x38de25=_0x2c6ef8['data'],null)||_0x5c2b30[_0x1690(0x12b)](_0x38de25,void 0x0)||_0x5c2b30[_0x1690(0x104)](_0x38de25=_0x38de25['user'],null)||_0x5c2b30[_0x1690(0x181)](_0x38de25,void 0x0)?void 0x0:_0x38de25['name'])||(_0x5c2b30[_0x1690(0x181)](_0x56bf60=_0x353756[_0x1690(0x101)],null)||_0x5c2b30['fkKXZ'](_0x56bf60,void 0x0)||(_0x56bf60=_0x56bf60[_0x1690(0x103)])===null||_0x5c2b30[_0x1690(0x182)](_0x56bf60,void 0x0)?void 0x0:_0x56bf60[_0x1690(0x73)])||_0x5c2b30['DROkZ'];}}}else _0x1c8fdb['log'](_0x5c2b30[_0x1690(0x145)]),_0x2f53b7=_0x5c2b30[_0x1690(0x183)];}else{if(_0x5c2b30['LDHqa'](_0x1690(0x184),_0x1690(0x185))){const _0x2d7b8a=_0x5c2b30['ooGhe']['split']('|');let _0x3e1473=0x0;while(!![]){switch(_0x2d7b8a[_0x3e1473++]){case'0':console[_0x1690(0x53)]('๐ก\x20Solutions:');continue;case'1':console[_0x1690(0x53)](_0x5c2b30[_0x1690(0x186)]);continue;case'2':console[_0x1690(0x53)](_0x1690(0x187));continue;case'3':console[_0x1690(0x53)](_0x5c2b30[_0x1690(0x188)]);continue;case'4':console[_0x1690(0x53)](_0x5c2b30[_0x1690(0x189)]);continue;case'5':return![];case'6':console[_0x1690(0x53)](_0x1690(0x18a));continue;}break;}}else _0x34563b=_0x108e16['data'][_0x1690(0x10d)],_0x33a2f8['log'](_0x5c2b30[_0x1690(0x18b)]),_0x425e03[_0x1690(0x48)](_0x5c2b30[_0x1690(0x116)],_0x356b44[_0x1690(0x92)](0x0,0x14)+_0x1690(0x109));}}catch(_0x481970){if(_0x5c2b30[_0x1690(0x10c)](_0x1690(0x18c),_0x5c2b30[_0x1690(0x18d)])){var _0x1a46fe,_0x52117e;_0x18280f[_0x1690(0x48)](_0x5c2b30[_0x1690(0x12a)]),_0x26c0f7=(_0x5c2b30[_0x1690(0x18e)](_0x1a46fe=_0x1d0d86['data'],null)||_0x5c2b30[_0x1690(0x18f)](_0x1a46fe,void 0x0)||_0x5c2b30['wdNmg'](_0x1a46fe=_0x1a46fe['user'],null)||_0x5c2b30[_0x1690(0x130)](_0x1a46fe,void 0x0)?void 0x0:_0x1a46fe[_0x1690(0x68)])||(_0x5c2b30[_0x1690(0x12e)](_0x52117e=_0x3fa44f[_0x1690(0x101)],null)||_0x5c2b30[_0x1690(0x138)](_0x52117e,void 0x0)||_0x5c2b30[_0x1690(0x130)](_0x52117e=_0x52117e['user'],null)||_0x52117e===void 0x0?void 0x0:_0x52117e[_0x1690(0x73)])||_0x1690(0xce);}else{console[_0x1690(0x53)](_0x5c2b30[_0x1690(0x167)],_0x481970);if(_0x5c2b30['fkKXZ'](_0x481970['code'],_googleSignin['statusCodes'][_0x1690(0x190)]))console['error'](_0x5c2b30[_0x1690(0x191)]),console[_0x1690(0x53)](_0x5c2b30[_0x1690(0x16b)]);else{if(_0x5c2b30[_0x1690(0x12c)](_0x481970[_0x1690(0x20)],_googleSignin['statusCodes'][_0x1690(0x16c)]))console[_0x1690(0x53)](_0x5c2b30['RbPnk']);else _0x5c2b30[_0x1690(0x192)](_0x481970[_0x1690(0x20)],_googleSignin[_0x1690(0x169)][_0x1690(0x16d)])&&console[_0x1690(0x53)]('โ\x20Google\x20Play\x20Services\x20not\x20available');}return![];}}};exports[_0x1690(0xc)]=forceYouTubeReconnectionWithConsent;const forceYouTubeReconnectionWithRevoke=async _0x4a207f=>{const _0x2b95a3={'NYDNb':_0x1690(0x193),'JDXNp':'โ ๏ธ\x20[YOUTUBE\x20REAUTH]\x20Response\x20data:','BpNrH':_0x1690(0x194),'Qaqqn':'๐\x20FORCING\x20YouTube\x20consent\x20via\x20REVOKE\x20method...','UvBTe':'๐ค\x20User:','iIQoK':function(_0x5c8529){return _0x5c8529();},'BHLMa':function(_0x587782,_0xbc47e1){return _0x587782!==_0xbc47e1;},'CWRRe':_0x1690(0x195),'GRQpl':_0x1690(0x196),'ncDOH':_0x1690(0x197),'YrTdH':function(_0x32e4c2,_0x1def93){return _0x32e4c2===_0x1def93;},'EGBwO':function(_0xcb7cfa,_0x466f1e){return _0xcb7cfa===_0x466f1e;},'MGmNn':function(_0x97e2e3,_0x304f4f){return _0x97e2e3===_0x304f4f;},'YPHbr':'QoBuS','VlTzK':_0x1690(0x198),'KpTht':_0x1690(0x199),'nLszJ':'evwnh'};try{var _0x59429f;console['log'](_0x2b95a3[_0x1690(0x19a)]),console[_0x1690(0x48)](_0x2b95a3[_0x1690(0x19b)],_0x4a207f),_0x2b95a3[_0x1690(0x19c)](initializeGoogleSignIn),await _googleSignin[_0x1690(0xa6)][_0x1690(0xfa)]();try{if(_0x2b95a3[_0x1690(0x19d)](_0x1690(0x19e),_0x1690(0x19f)))await _googleSignin['GoogleSignin'][_0x1690(0x1a0)](),console[_0x1690(0x48)](_0x2b95a3[_0x1690(0x1a1)]);else return _0x1cbdb3['warn'](_0x2b95a3[_0x1690(0x1a2)]),_0x2cec1a[_0x1690(0x131)](_0x2b95a3[_0x1690(0x1a3)],_0x5e2cdd),_0x19a9e2[_0x1690(0x131)](_0x1690(0xe3)),![];}catch(_0x2dddbb){console[_0x1690(0x48)](_0x2b95a3['GRQpl'],_0x2dddbb);}await _googleSignin['GoogleSignin'][_0x1690(0xee)](),console[_0x1690(0x48)]('โ
\x20Signed\x20out\x20completely'),console[_0x1690(0x48)](_0x2b95a3[_0x1690(0x1a4)]);const _0x951ad3=await _googleSignin[_0x1690(0xa6)]['signIn'](),_0x465082=await _googleSignin[_0x1690(0xa6)][_0x1690(0xf0)](),_0x5735dc=await _googleSignin['GoogleSignin']['getCurrentUser'](),_0xca223c=(_0x2b95a3[_0x1690(0x1a5)](_0x59429f=_0x951ad3[_0x1690(0x101)],null)||_0x2b95a3[_0x1690(0x1a5)](_0x59429f,void 0x0)?void 0x0:_0x59429f[_0x1690(0x10d)])||(_0x2b95a3['EGBwO'](_0x5735dc,null)||_0x2b95a3[_0x1690(0x1a6)](_0x5735dc,void 0x0)?void 0x0:_0x5735dc['serverAuthCode']);return _0xca223c?_0x2b95a3[_0x1690(0x1a6)](_0x2b95a3[_0x1690(0x1a7)],_0x2b95a3[_0x1690(0x1a8)])?(_0x2d4ae1[_0x1690(0x53)](_0x2b95a3[_0x1690(0x1a9)]),![]):(console['log'](_0x1690(0x1aa)),console['log']('๐\x20Refresh\x20token\x20preview:',_0xca223c['substring'](0x0,0x14)+_0x1690(0x109)),!![]):(console[_0x1690(0x53)](_0x2b95a3[_0x1690(0x1ab)]),![]);}catch(_0xfcea09){return _0x2b95a3['BHLMa'](_0x2b95a3[_0x1690(0x1ac)],_0x1690(0x1ad))?{'success':![],'message':_0x1690(0x46),'details':_0xbdf916}:(console[_0x1690(0x53)](_0x1690(0x1ae),_0xfcea09),![]);}};exports[_0x1690(0xb)]=forceYouTubeReconnectionWithRevoke;function _0x1690(_0x1fe5fc,_0x16908c){_0x1fe5fc=_0x1fe5fc-0x0;const _0x4bc6c3=_0x1fe5();let _0x517481=_0x4bc6c3[_0x1fe5fc];return _0x517481;}const fixUserYouTubeConnection=async _0xe31ceb=>{const _0x1fbebb={'jSghk':function(_0xf0078b,_0x6cd780){return _0xf0078b===_0x6cd780;},'RJRci':function(_0x42bb52,_0x34d43d){return _0x42bb52===_0x34d43d;},'KpaaU':'๐\x20Method\x201:\x20Trying\x20forced\x20consent\x20via\x20configuration...','vQKUb':function(_0x555273,_0x5f3b4b){return _0x555273(_0x5f3b4b);},'vMtTI':function(_0x15be54,_0x44976d){return _0x15be54!==_0x44976d;},'fujSw':'himCT','PEkHn':_0x1690(0x1af),'amviS':function(_0x36aadc,_0x31c22a){return _0x36aadc(_0x31c22a);}};console[_0x1690(0x48)](_0x1690(0x1b0)+_0xe31ceb),console[_0x1690(0x48)](_0x1fbebb[_0x1690(0x1b1)]);let _0xa5bc40=await _0x1fbebb[_0x1690(0x1b2)](forceYouTubeReconnectionWithConsent,_0xe31ceb);if(_0xa5bc40){if(_0x1fbebb['vMtTI'](_0x1690(0x1b3),_0x1fbebb[_0x1690(0x1b4)]))return console[_0x1690(0x48)]('โ
\x20'+_0xe31ceb+_0x1690(0x66)),!![];else{var _0x3f18e5,_0x56c8a2;_0x38fadf[_0x1690(0x48)]('โ ๏ธ\x20Failed\x20to\x20fetch\x20YouTube\x20channel\x20info:',_0x158c29[_0x1690(0x5f)]),_0x3cd9be=((_0x3f18e5=_0x3b3efd[_0x1690(0x101)])===null||_0x1fbebb[_0x1690(0x1b5)](_0x3f18e5,void 0x0)||(_0x3f18e5=_0x3f18e5['user'])===null||_0x1fbebb[_0x1690(0x1b5)](_0x3f18e5,void 0x0)?void 0x0:_0x3f18e5[_0x1690(0x68)])||(_0x1fbebb['RJRci'](_0x56c8a2=_0x124f32[_0x1690(0x101)],null)||_0x1fbebb['RJRci'](_0x56c8a2,void 0x0)||_0x1fbebb[_0x1690(0x1b6)](_0x56c8a2=_0x56c8a2[_0x1690(0x103)],null)||_0x1fbebb[_0x1690(0x1b6)](_0x56c8a2,void 0x0)?void 0x0:_0x56c8a2[_0x1690(0x73)])||_0x1690(0x117);}}console[_0x1690(0x48)](_0x1fbebb['PEkHn']),_0xa5bc40=await _0x1fbebb[_0x1690(0x1b7)](forceYouTubeReconnectionWithRevoke,_0xe31ceb);if(_0xa5bc40)return console['log']('โ
\x20'+_0xe31ceb+_0x1690(0x1b8)),!![];return console[_0x1690(0x53)](_0x1690(0x1b9)+_0xe31ceb+_0x1690(0x1ba)),![];};exports[_0x1690(0xd)]=fixUserYouTubeConnection;const refreshGoogleTokens=async()=>{const _0x21b97a={'IMChh':_0x1690(0x42),'IQhkB':function(_0x4b0879,_0x564ed3){return _0x4b0879!==_0x564ed3;},'YdiDI':_0x1690(0x1bb),'QyOQd':'โ\x20User\x20not\x20signed\x20in\x20to\x20Google,\x20cannot\x20refresh\x20tokens','EoILi':_0x1690(0x1bc),'MGLlz':function(_0xe88e6d,_0x55bbee){return _0xe88e6d===_0x55bbee;},'tZVTu':'trRtM','jLnAc':_0x1690(0x1bd),'wpWrm':'โ\x20Failed\x20to\x20refresh\x20Google\x20tokens:','lNLcq':_0x1690(0x1be)};try{if(_0x21b97a[_0x1690(0x1bf)](_0x21b97a[_0x1690(0x1c0)],_0x1690(0x1c1))){console[_0x1690(0x48)](_0x1690(0x1c2));const _0x3300f5=await _googleSignin['GoogleSignin'][_0x1690(0x105)]();if(!_0x3300f5)return console[_0x1690(0x48)](_0x21b97a[_0x1690(0x1c3)]),null;const _0x3403ba=await _googleSignin[_0x1690(0xa6)][_0x1690(0xf0)]();return console[_0x1690(0x48)](_0x21b97a[_0x1690(0x1c4)]),{'accessToken':_0x3403ba[_0x1690(0xf1)],'idToken':_0x3403ba[_0x1690(0x14a)]};}else _0x15c024[_0x1690(0x53)](_0x1690(0x1c5),_0x4e5880);}catch(_0x43315a){if(_0x21b97a[_0x1690(0x1c6)](_0x21b97a['tZVTu'],_0x21b97a['jLnAc']))_0x4ca1e7['log'](_0x21b97a[_0x1690(0x1c7)]);else{console['error'](_0x21b97a[_0x1690(0x1c8)],_0x43315a);try{console[_0x1690(0x48)](_0x1690(0x1c9));const _0x14da6f=await _googleSignin['GoogleSignin']['signIn'](),_0x59ba6b=await _googleSignin[_0x1690(0xa6)][_0x1690(0xf0)]();return console[_0x1690(0x48)](_0x1690(0x1ca)),{'accessToken':_0x59ba6b[_0x1690(0xf1)],'idToken':_0x59ba6b[_0x1690(0x14a)]};}catch(_0x560a1a){return console[_0x1690(0x53)](_0x21b97a[_0x1690(0x1cb)],_0x560a1a),null;}}}},debugYouTubeTokens=async()=>{const _0x142fda={'ALAeW':_0x1690(0x1cc),'PVygf':_0x1690(0xc0),'mvbHF':'Present','qkbCj':function(_0x5e43d8,_0x35d134){return _0x5e43d8!==_0x35d134;},'jZuNm':function(_0x44400d,_0x54c038){return _0x44400d===_0x54c038;},'Cnkmu':function(_0x531168,_0x48322b){return _0x531168===_0x48322b;},'rcTFO':function(_0x5792f7,_0xa615a5){return _0x5792f7!==_0xa615a5;},'nakpW':function(_0x10b83d,_0x255a54){return _0x10b83d!==_0x255a54;},'yaExQ':function(_0x38b209,_0x51b66c){return _0x38b209!==_0x51b66c;},'RCHxZ':function(_0x28740a,_0xeffa52){return _0x28740a!==_0xeffa52;},'jfWGn':_0x1690(0x1cd),'jEGDc':_0x1690(0x1ce),'dBqdv':_0x1690(0x53)};try{var _0x5c679d;const _0x3c0f7d=await _googleSignin[_0x1690(0xa6)][_0x1690(0xf0)](),_0x171a63=await _googleSignin[_0x1690(0xa6)][_0x1690(0x105)]();return console[_0x1690(0x48)](_0x142fda[_0x1690(0x1cf)],{'accessToken':_0x3c0f7d[_0x1690(0xf1)]?_0x3c0f7d[_0x1690(0xf1)]['substring'](0x0,0x14)+_0x1690(0x109):_0x142fda[_0x1690(0x1d0)],'idToken':_0x3c0f7d[_0x1690(0x14a)]?_0x142fda['mvbHF']:_0x142fda[_0x1690(0x1d0)],'serverAuthCode':_0x142fda[_0x1690(0x1d1)](_0x171a63,null)&&_0x171a63!==void 0x0&&_0x171a63[_0x1690(0x10d)]?_0x171a63[_0x1690(0x10d)][_0x1690(0x92)](0x0,0x14)+_0x1690(0x109):_0x142fda[_0x1690(0x1d0)],'userEmail':(_0x142fda['jZuNm'](_0x171a63,null)||_0x142fda[_0x1690(0x1d2)](_0x171a63,void 0x0)||_0x142fda[_0x1690(0x1d3)](_0x5c679d=_0x171a63[_0x1690(0x103)],null)||_0x5c679d===void 0x0?void 0x0:_0x5c679d[_0x1690(0x73)])||_0x142fda[_0x1690(0x1d0)]}),{'hasRefreshToken':!!(_0x142fda[_0x1690(0x1d4)](_0x171a63,null)&&_0x142fda[_0x1690(0x1d5)](_0x171a63,void 0x0)&&_0x171a63[_0x1690(0x10d)]),'refreshTokenType':_0x142fda[_0x1690(0x1d6)](_0x171a63,null)&&_0x142fda[_0x1690(0x1d7)](_0x171a63,void 0x0)&&_0x171a63['serverAuthCode']?_0x1690(0x10d):_0x142fda['jfWGn']};}catch(_0x46b48b){return console['error'](_0x142fda[_0x1690(0x1d8)],_0x46b48b),{'hasRefreshToken':![],'refreshTokenType':_0x142fda[_0x1690(0x1d9)]};}},reconnectYouTube=async _0x4626ce=>{const _0x29156d={'aAtDN':_0x1690(0x53),'sFAWX':_0x1690(0x1da),'fwvQC':_0x1690(0x1db),'VqcMi':_0x1690(0x1dc),'qffxX':_0x1690(0x1dd),'AZfIF':_0x1690(0x1de),'geAyt':'๐\x20Refresh\x20token\x20preview:','rYeNf':_0x1690(0x1df),'wZwQz':_0x1690(0x1e0),'FwxTx':_0x1690(0x1e1),'xAJDN':_0x1690(0x10),'zhFLd':_0x1690(0x1e2),'qNWVo':_0x1690(0x1e3),'HKhOM':function(_0x2a448,_0x576702){return _0x2a448!==_0x576702;},'uFPTy':_0x1690(0x1e4),'beAPw':_0x1690(0x1e5),'HTQOj':_0x1690(0x1e6),'QFsPb':function(_0x767d45,_0x5aefa2,_0x1dc92a){return _0x767d45(_0x5aefa2,_0x1dc92a);},'gubcS':_0x1690(0x1e7),'wLjPK':function(_0x4bdd7d,_0xa73f5){return _0x4bdd7d!==_0xa73f5;},'FdNiv':'โ
\x20YouTube\x20reconnected\x20successfully\x20with\x20refresh\x20token','jRzxF':function(_0x32e83d){return _0x32e83d();},'GYJVy':_0x1690(0x1e8),'jHFxY':_0x1690(0x1e9),'inQiT':_0x1690(0xae),'bCXBv':_0x1690(0x1ea),'RtSXa':'aPyMZ','TTMOz':_0x1690(0x1eb),'fVpIY':_0x1690(0x1ec),'zAXih':function(_0x5da2ff,_0x2ddba8){return _0x5da2ff!==_0x2ddba8;},'LZiyS':_0x1690(0x1ed)};try{if(_0x1690(0x1ee)!==_0x29156d['zhFLd']){console[_0x1690(0x48)](_0x29156d[_0x1690(0x1ef)]);try{if(_0x29156d[_0x1690(0x1f0)](_0x29156d[_0x1690(0x1f1)],_0x29156d['uFPTy']))return _0x431061['error'](_0x1690(0x1ce),_0x3a58c6),{'hasRefreshToken':![],'refreshTokenType':_0x29156d[_0x1690(0x1f2)]};else await _googleSignin['GoogleSignin'][_0x1690(0xee)](),console['log'](_0x29156d[_0x1690(0x1f3)]);}catch(_0x41bcec){if(_0x29156d[_0x1690(0x1f0)]('BJKqO',_0x1690(0x1f4)))console['log'](_0x1690(0xad),_0x41bcec);else return _0x31892b[_0x1690(0x48)](_0x29156d[_0x1690(0x1f5)]),null;}try{const _0x309b62=await _googleSignin[_0x1690(0xa6)][_0x1690(0xf0)]();_0x309b62[_0x1690(0xf1)]&&(await _googleSignin[_0x1690(0xa6)][_0x1690(0x1f6)](_0x309b62[_0x1690(0xf1)]),console['log'](_0x29156d['HTQOj']));}catch(_0x546cb5){console[_0x1690(0x48)](_0x29156d[_0x1690(0x1f7)],_0x546cb5);}const _0x2748fa=await _0x29156d['QFsPb'](initiateNativeAuth,_0x29156d['gubcS'],_0x4626ce);if(_0x2748fa){if(_0x29156d[_0x1690(0x1f8)](_0x1690(0x1f9),_0x1690(0x1fa))){console[_0x1690(0x48)](_0x29156d['FdNiv']);const _0x40f57e=await _0x29156d['jRzxF'](debugYouTubeTokens);if(_0x40f57e['hasRefreshToken']){if(_0x29156d['GYJVy']===_0x29156d['jHFxY'])return{'success':!![],'message':_0x1ab96f[_0x1690(0x52)]||_0x29156d[_0x1690(0x1fb)]};else console[_0x1690(0x48)](_0x29156d['inQiT'],_0x40f57e[_0x1690(0x155)]);}else{if(_0x29156d[_0x1690(0x1f8)](_0x29156d[_0x1690(0x1fc)],_0x29156d['RtSXa']))console[_0x1690(0x131)](_0x29156d['TTMOz']);else return _0x687510[_0x1690(0x53)](_0x29156d[_0x1690(0x1fd)]),![];}return!![];}else _0x7c9297[_0x1690(0x48)](_0x29156d[_0x1690(0x1f7)],_0x476a9b);}else{if(_0x29156d[_0x1690(0x1fe)]!==_0x29156d['fVpIY'])_0x464764=_0x3bc48d[_0x1690(0x10d)],_0x490834[_0x1690(0x48)](_0x29156d[_0x1690(0x1ff)]),_0xf5695a[_0x1690(0x48)](_0x29156d[_0x1690(0x200)],_0x4ec62d[_0x1690(0x92)](0x0,0x14)+'...');else return console[_0x1690(0x53)](_0x1690(0x1dc)),![];}}else _0x20d305[_0x1690(0x48)](_0x29156d['rYeNf']),_0x364ee7[_0x1690(0x48)](_0x29156d[_0x1690(0x201)]),_0x1039b5[_0x1690(0x48)](_0x29156d[_0x1690(0x202)]);}catch(_0x1d2a0a){if(_0x29156d[_0x1690(0x203)](_0x1690(0x204),'NnfBy'))return console[_0x1690(0x53)](_0x29156d['LZiyS'],_0x1d2a0a),![];else throw new _0x3c2892(_0x29156d['xAJDN']);}};exports['reconnectYouTube']=reconnectYouTube;const initiateNativeAuth=async(_0x3a0f8a,_0x4a9e20)=>{const _0x2e1384={'MFIMz':_0x1690(0x1aa),'WiSxs':_0x1690(0xb3),'beuxc':_0x1690(0x205),'FCqmJ':_0x1690(0x206),'pKdIM':_0x1690(0x207),'PCgDI':_0x1690(0x208),'YHBqa':_0x1690(0xea),'dAzpt':_0x1690(0x209),'CMjqG':_0x1690(0x18a),'JqvqP':_0x1690(0xeb),'TkqzT':_0x1690(0x187),'DSjLk':'โ\x20Sign-in\x20already\x20in\x20progress','jhSZH':_0x1690(0x20a),'fARXV':_0x1690(0x20b),'wOhGi':'Facebook\x20Login\x20completed\x20successfully','DucGz':function(_0x4f1873,_0x3c55a6,_0xdd8ba8){return _0x4f1873(_0x3c55a6,_0xdd8ba8);},'fXQcX':_0x1690(0x1ed),'UzlHr':function(_0x18e5bb,_0x2ba298){return _0x18e5bb!==_0x2ba298;},'BpiFX':_0x1690(0x20c),'ReXvH':function(_0x589ebf,_0x567a99){return _0x589ebf(_0x567a99);},'TRbOi':'Invalid\x20verification\x20code','mUxNN':function(_0x57f8f9,_0x1f4eb7){return _0x57f8f9===_0x1f4eb7;},'XvnxV':function(_0xb8e1cc){return _0xb8e1cc();},'AqwDr':_0x1690(0x20d),'HKpZj':'cOAvX','QpBQQ':'โน๏ธ\x20Sign\x20out\x20not\x20needed\x20or\x20failed:','qnLVN':_0x1690(0x20e),'steUd':function(_0x5a43c5,_0xfeb51e){return _0x5a43c5===_0xfeb51e;},'sZWun':_0x1690(0x20f),'dBByl':_0x1690(0x210),'axNPt':'๐ค\x20Current\x20user\x20info:','EEXKa':function(_0x35c8f8,_0x1057d6){return _0x35c8f8===_0x1057d6;},'tvwfY':_0x1690(0x211),'wubiw':_0x1690(0x212),'ZMnpn':function(_0x577085,_0x59cc77){return _0x577085!==_0x59cc77;},'nuMQA':_0x1690(0xc0),'OfytZ':_0x1690(0x213),'SdNSc':_0x1690(0x214),'mGQms':'โ
\x20Got\x20serverAuthCode\x20(refresh\x20token\x20mechanism)','EYOTz':function(_0xbd7cb5,_0x559371){return _0xbd7cb5!==_0x559371;},'LLTgH':'โ
\x20Got\x20serverAuthCode\x20from\x20sign-in\x20response','PEXzc':_0x1690(0x215),'kFZTp':'๐ก\x20User\x20needs\x20to\x20reconnect\x20with\x20proper\x20consent\x20screen','mWxvr':_0x1690(0x216),'WogJZ':_0x1690(0x217),'etMFn':_0x1690(0x218),'bJqVw':_0x1690(0x219),'Tqmic':_0x1690(0x21a),'Tsbpz':'๐\x20Refresh\x20token\x20type:','FiwSR':'serverAuthCode','piZLb':_0x1690(0xc6),'KpMmk':'Unknown\x20Channel','GuGkm':_0x1690(0x21b),'SXPQY':'๐บ\x20Fetching\x20YouTube\x20channel\x20information...','Tunbc':_0x1690(0xca),'xxBqn':function(_0x5728e9,_0x175d6b){return _0x5728e9===_0x175d6b;},'ArTsM':function(_0x563a89,_0x35fece){return _0x563a89>_0x35fece;},'CJnxe':function(_0xb9124f,_0x43a202){return _0xb9124f===_0x43a202;},'fTUyE':_0x1690(0x21c),'lcknn':_0x1690(0xcb),'JOhMg':_0x1690(0xcc),'JgqQl':_0x1690(0x21d),'bfKCd':function(_0x202d04,_0x573728){return _0x202d04===_0x573728;},'JbwiZ':function(_0x4f3708,_0x39c800){return _0x4f3708===_0x39c800;},'SlFwD':_0x1690(0xce),'efzWj':function(_0x1b2567,_0x14d88a){return _0x1b2567===_0x14d88a;},'hMMXH':function(_0x275eb8,_0x372d86){return _0x275eb8===_0x372d86;},'AjOGn':function(_0x40f503,_0x1bda29){return _0x40f503===_0x1bda29;},'dpsFz':function(_0x5e68f8,_0x231c0a){return _0x5e68f8===_0x231c0a;},'ZYdAp':_0x1690(0x13e),'mBRSQ':function(_0x44bdb3,_0xcfc6c2){return _0x44bdb3===_0xcfc6c2;},'BeKvx':function(_0x3c7307,_0x5ac262){return _0x3c7307===_0x5ac262;},'iqHdm':function(_0x50b76c,_0x5aa5d4){return _0x50b76c===_0x5aa5d4;},'kZlpz':function(_0x1a8a48,_0x352112){return _0x1a8a48===_0x352112;},'gnDMl':function(_0x57dc67,_0x286663){return _0x57dc67||_0x286663;},'Iklud':function(_0x46deaf,_0xb81e5d){return _0x46deaf===_0xb81e5d;},'SeQHm':function(_0x32c8ae,_0x2cefaa){return _0x32c8ae===_0x2cefaa;},'dqmXe':function(_0x385a38,_0x49b428){return _0x385a38===_0x49b428;},'kYvqw':function(_0x38bb5d,_0x2e18cc){return _0x38bb5d===_0x2e18cc;},'EqBCE':_0x1690(0x21e),'ARXDO':function(_0xc99191,_0x255dfb){return _0xc99191<_0x255dfb;},'Ngpga':_0x1690(0x21f),'MAcAO':_0x1690(0x220),'AVmuQ':_0x1690(0x221),'MEWsN':_0x1690(0x222),'yxGbb':_0x1690(0x72),'tTtny':'๐\x20Linking\x20YouTube\x20data\x20to\x20user:','twqkw':_0x1690(0x223),'dfuph':'youtube','IDrWW':function(_0x5b290c,_0x2c043b){return _0x5b290c===_0x2c043b;},'NUoJw':function(_0xb92d13,_0x1147bf){return _0xb92d13===_0x1147bf;},'HZjCF':function(_0x3b7513,_0x4505bc){return _0x3b7513===_0x4505bc;},'tGxCf':function(_0x52bf2b,_0x2e38c8){return _0x52bf2b===_0x2e38c8;},'dvSlN':_0x1690(0x224),'sZvBu':function(_0x188bd6,_0x3c99e0){return _0x188bd6+_0x3c99e0;},'CToWD':_0x1690(0x225),'zVLjK':_0x1690(0x226),'mlQse':_0x1690(0x227),'LSiPI':_0x1690(0x228),'RaOTA':_0x1690(0x229),'QQXpm':_0x1690(0x22a),'uWbXY':_0x1690(0x22b),'VDiti':'๐ก\x20Backend\x20response\x20headers:','QYpEO':'โ
\x20YouTube\x20connection\x20successful','uWwgc':function(_0xe5663d,_0x23c943){return _0xe5663d===_0x23c943;},'Ngwdp':function(_0x57a394,_0x5a6542){return _0x57a394===_0x5a6542;},'czGMs':_0x1690(0xd9),'BZcJg':'๐\x20[YOUTUBE\x20AUTH]\x20YouTube\x20connected\x20in\x20temporary\x20mode','wUqPv':_0x1690(0x1e0),'PcTrN':_0x1690(0x1e1),'jViOi':'iwoFq','WmAQq':_0x1690(0x22c),'XjKtP':_0x1690(0x22d),'DIXur':_0x1690(0x22e),'AgGic':_0x1690(0x132),'BMWkD':_0x1690(0xac),'TIsHj':_0x1690(0x134),'xidpG':_0x1690(0x22f),'hkRxi':'๐\x20BACKEND\x20ERROR\x20RESPONSE:','GLbhJ':'โ\x20Google\x20Sign-In\x20error:','tNMwz':'User\x20cancelled\x20Google\x20Sign-In','sDVvj':function(_0x195b34,_0x48e65d){return _0x195b34===_0x48e65d;},'VdDbb':function(_0x21ec58,_0xe67d66){return _0x21ec58===_0xe67d66;},'hNcCO':_0x1690(0x230),'enslA':_0x1690(0x231),'QnIMH':_0x1690(0xab)};if(_0x2e1384[_0x1690(0x232)](_0x3a0f8a,_0x1690(0x1e7))){console['log']('๐\x20Initiating\x20native\x20Google\x20Sign-In\x20for\x20YouTube');if(!_0x4a9e20||_0x4a9e20[_0x1690(0x142)]()==='')return console['error'](_0x2e1384['jhSZH']),![];try{var _0x24c595,_0x2f35c3,_0x370148,_0x2fe678,_0x5b9350,_0x18a699,_0x17b5b6,_0x1dc902,_0x3bf048,_0x2c574b;_0x2e1384[_0x1690(0x233)](initializeGoogleSignIn),await _googleSignin[_0x1690(0xa6)][_0x1690(0xfa)]();try{await _googleSignin[_0x1690(0xa6)][_0x1690(0xee)](),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x234)]);}catch(_0x59f580){if(_0x2e1384[_0x1690(0x235)](_0x2e1384[_0x1690(0x236)],_0x1690(0x237)))return _0x31dfee['log'](_0x2e1384[_0x1690(0x238)]),_0xa1634b[_0x1690(0x48)](_0x2e1384[_0x1690(0x239)],_0x21951f[_0x1690(0x92)](0x0,0x14)+_0x1690(0x109)),!![];else console[_0x1690(0x48)](_0x2e1384['QpBQQ'],_0x59f580);}const _0x2e6e46=await _googleSignin[_0x1690(0xa6)][_0x1690(0x23a)]();console[_0x1690(0x48)](_0x2e1384[_0x1690(0x23b)],_0x2e1384[_0x1690(0x23c)](_0x24c595=_0x2e6e46[_0x1690(0x101)],null)||_0x24c595===void 0x0||_0x2e1384[_0x1690(0x232)](_0x24c595=_0x24c595[_0x1690(0x103)],null)||_0x24c595===void 0x0?void 0x0:_0x24c595[_0x1690(0x73)]),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x23d)]),console[_0x1690(0x48)](JSON[_0x1690(0x8c)](_0x2e6e46,null,0x2));const _0x53a24c=await _googleSignin['GoogleSignin']['getTokens']();console[_0x1690(0x48)](_0x2e1384[_0x1690(0x23e)]),console[_0x1690(0x48)](_0x1690(0x23f)),console[_0x1690(0x48)](JSON[_0x1690(0x8c)](_0x53a24c,null,0x2));const _0x4a3bfe=await _googleSignin[_0x1690(0xa6)][_0x1690(0x105)]();console[_0x1690(0x48)](_0x2e1384['axNPt'],_0x4a3bfe===null||_0x2e1384[_0x1690(0x232)](_0x4a3bfe,void 0x0)||_0x2e1384[_0x1690(0x240)](_0x2f35c3=_0x4a3bfe[_0x1690(0x103)],null)||_0x2e1384[_0x1690(0x240)](_0x2f35c3,void 0x0)?void 0x0:_0x2f35c3['email']),console[_0x1690(0x48)](_0x1690(0x241)),console[_0x1690(0x48)](JSON['stringify'](_0x4a3bfe,null,0x2));let _0x52ff5f=null;console[_0x1690(0x48)](_0x2e1384[_0x1690(0x242)]),console['log'](_0x2e1384[_0x1690(0x243)],(_0x370148=_0x2e6e46[_0x1690(0x101)])!==null&&_0x370148!==void 0x0&&_0x370148[_0x1690(0x10d)]?_0x1690(0x244)+_0x2e6e46[_0x1690(0x101)][_0x1690(0x10d)][_0x1690(0x92)](0x0,0x14)+_0x1690(0x109):_0x1690(0xc0)),console[_0x1690(0x48)](_0x1690(0x245),_0x2e1384[_0x1690(0x246)](_0x4a3bfe,null)&&_0x2e1384[_0x1690(0x235)](_0x4a3bfe,void 0x0)&&_0x4a3bfe[_0x1690(0x10d)]?'Present:\x20'+_0x4a3bfe[_0x1690(0x10d)][_0x1690(0x92)](0x0,0x14)+_0x1690(0x109):_0x2e1384[_0x1690(0x247)]),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x248)],_0x53a24c[_0x1690(0x14a)]?'Present:\x20'+_0x53a24c[_0x1690(0x14a)][_0x1690(0x92)](0x0,0x14)+_0x1690(0x109):_0x1690(0xc0)),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x249)],_0x53a24c[_0x1690(0xf1)]?'Present:\x20'+_0x53a24c[_0x1690(0xf1)][_0x1690(0x92)](0x0,0x14)+_0x1690(0x109):_0x2e1384[_0x1690(0x247)]);if(_0x2e1384['UzlHr'](_0x4a3bfe,null)&&_0x2e1384[_0x1690(0x235)](_0x4a3bfe,void 0x0)&&_0x4a3bfe[_0x1690(0x10d)])_0x52ff5f=_0x4a3bfe[_0x1690(0x10d)],console['log'](_0x2e1384[_0x1690(0x24a)]),console['log'](_0x2e1384['WiSxs'],_0x52ff5f['substring'](0x0,0x14)+_0x1690(0x109));else _0x2e1384[_0x1690(0x24b)](_0x2fe678=_0x2e6e46[_0x1690(0x101)],null)&&_0x2e1384[_0x1690(0x246)](_0x2fe678,void 0x0)&&_0x2fe678[_0x1690(0x10d)]&&(_0x52ff5f=_0x2e6e46[_0x1690(0x101)][_0x1690(0x10d)],console['log'](_0x2e1384[_0x1690(0x24c)]),console['log'](_0x2e1384[_0x1690(0x239)],_0x52ff5f[_0x1690(0x92)](0x0,0x14)+_0x1690(0x109)));!_0x52ff5f?(console[_0x1690(0x53)](_0x2e1384[_0x1690(0x24d)]),console[_0x1690(0x53)](_0x2e1384['kFZTp']),console[_0x1690(0x53)](_0x2e1384[_0x1690(0x24e)]),console['warn'](_0x2e1384[_0x1690(0x24f)])):_0x2e1384[_0x1690(0x232)](_0x2e1384[_0x1690(0x250)],_0x2e1384[_0x1690(0x251)])?_0x5e2056[_0x1690(0x48)](_0x2e1384[_0x1690(0x252)]):(console[_0x1690(0x48)](_0x2e1384[_0x1690(0x253)]),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x254)],_0x52ff5f[_0x1690(0x114)]('4/')?_0x2e1384[_0x1690(0x255)]:_0x2e1384[_0x1690(0x256)]));let _0x24059b=_0x2e1384['KpMmk'],_0x1586dd=null;try{if(_0x2e1384['GuGkm']!=='cPOIy')return _0x26be20[_0x1690(0x53)](_0x2e1384[_0x1690(0x257)],_0x28f54e),{'success':![],'error':_0x1690(0x258)};else{console['log'](_0x2e1384[_0x1690(0x259)]);const _0x1c5377=await _0x2e1384['DucGz'](fetch,_0x2e1384['Tunbc'],{'headers':{'Authorization':_0x1690(0x1a)+_0x53a24c[_0x1690(0xf1)],'Accept':'application/json'}});if(_0x1c5377['ok']){if(_0x2e1384[_0x1690(0x25a)]('gqfKV','gqfKV')){const _0x3b9bf5=await _0x1c5377['json']();if(_0x3b9bf5[_0x1690(0x120)]&&_0x2e1384[_0x1690(0x25b)](_0x3b9bf5['items']['length'],0x0)){if(_0x2e1384[_0x1690(0x25c)](_0x2e1384[_0x1690(0x25d)],_0x2e1384[_0x1690(0x25d)]))_0x24059b=_0x3b9bf5[_0x1690(0x120)][0x0]['snippet'][_0x1690(0x124)],_0x1586dd=_0x3b9bf5[_0x1690(0x120)][0x0]['id'],console[_0x1690(0x48)](_0x2e1384[_0x1690(0x25e)],_0x24059b,_0x2e1384[_0x1690(0x25f)],_0x1586dd);else{const _0x53d9bb=_0x2e1384[_0x1690(0x260)][_0x1690(0x261)]('|');let _0x4de17f=0x0;while(!![]){switch(_0x53d9bb[_0x4de17f++]){case'0':_0x362ab3[_0x1690(0x53)](_0x2e1384['PCgDI']);continue;case'1':_0x457c25[_0x1690(0x53)](_0x2e1384['YHBqa']);continue;case'2':_0x3f5cfd[_0x1690(0x53)](_0x2e1384[_0x1690(0x262)]);continue;case'3':_0x426367[_0x1690(0x53)](_0x2e1384[_0x1690(0x263)]);continue;case'4':return![];case'5':_0x1cfe10[_0x1690(0x53)](_0x2e1384[_0x1690(0x264)]);continue;case'6':_0x468e7a[_0x1690(0x53)](_0x2e1384[_0x1690(0x265)]);continue;}break;}}}else{var _0x1987e0,_0x26b2ea;console['log'](_0x2e1384[_0x1690(0x266)]),_0x24059b=((_0x1987e0=_0x2e6e46[_0x1690(0x101)])===null||_0x2e1384[_0x1690(0x25a)](_0x1987e0,void 0x0)||(_0x1987e0=_0x1987e0[_0x1690(0x103)])===null||_0x1987e0===void 0x0?void 0x0:_0x1987e0[_0x1690(0x68)])||(_0x2e1384[_0x1690(0x267)](_0x26b2ea=_0x2e6e46[_0x1690(0x101)],null)||_0x26b2ea===void 0x0||_0x2e1384[_0x1690(0x240)](_0x26b2ea=_0x26b2ea[_0x1690(0x103)],null)||_0x2e1384[_0x1690(0x268)](_0x26b2ea,void 0x0)?void 0x0:_0x26b2ea[_0x1690(0x73)])||_0x2e1384['SlFwD'];}}else _0x2b65c4[_0x1690(0x53)](_0x2e1384[_0x1690(0x269)]);}else{var _0x591da4,_0x2a3680;console['log']('โ ๏ธ\x20Failed\x20to\x20fetch\x20YouTube\x20channel\x20info:',_0x1c5377[_0x1690(0x5f)]),_0x24059b=(_0x2e1384['efzWj'](_0x591da4=_0x2e6e46[_0x1690(0x101)],null)||_0x591da4===void 0x0||_0x2e1384['hMMXH'](_0x591da4=_0x591da4['user'],null)||_0x2e1384[_0x1690(0x26a)](_0x591da4,void 0x0)?void 0x0:_0x591da4[_0x1690(0x68)])||(_0x2e1384[_0x1690(0x26b)](_0x2a3680=_0x2e6e46[_0x1690(0x101)],null)||_0x2a3680===void 0x0||(_0x2a3680=_0x2a3680[_0x1690(0x103)])===null||_0x2e1384[_0x1690(0x26a)](_0x2a3680,void 0x0)?void 0x0:_0x2a3680[_0x1690(0x73)])||_0x2e1384[_0x1690(0x26c)];}}}catch(_0x2d4d17){var _0x4d3ed1,_0x19ca21;console[_0x1690(0x48)](_0x2e1384[_0x1690(0x26d)],_0x2d4d17),_0x24059b=(_0x2e1384[_0x1690(0x26e)](_0x4d3ed1=_0x2e6e46[_0x1690(0x101)],null)||_0x2e1384[_0x1690(0x26f)](_0x4d3ed1,void 0x0)||_0x2e1384['mBRSQ'](_0x4d3ed1=_0x4d3ed1[_0x1690(0x103)],null)||_0x2e1384[_0x1690(0x270)](_0x4d3ed1,void 0x0)?void 0x0:_0x4d3ed1[_0x1690(0x68)])||((_0x19ca21=_0x2e6e46['data'])===null||_0x2e1384['dpsFz'](_0x19ca21,void 0x0)||_0x2e1384['iqHdm'](_0x19ca21=_0x19ca21[_0x1690(0x103)],null)||_0x2e1384[_0x1690(0x271)](_0x19ca21,void 0x0)?void 0x0:_0x19ca21[_0x1690(0x73)])||_0x2e1384['KpMmk'];}let _0x313787=await(0x0,_jwtStorageService[_0x1690(0x140)])();const _0x1371eb=await _asyncStorage[_0x1690(0x272)]['getItem']('onairos_username'),_0x94fd76=_0x2e1384[_0x1690(0x273)](_0x1371eb,_0x4a9e20)||(_0x2e1384['Iklud'](_0x5b9350=_0x2e6e46[_0x1690(0x101)],null)||_0x2e1384[_0x1690(0x274)](_0x5b9350,void 0x0)||_0x2e1384[_0x1690(0x275)](_0x5b9350=_0x5b9350['user'],null)||_0x2e1384[_0x1690(0x276)](_0x5b9350,void 0x0)?void 0x0:_0x5b9350[_0x1690(0x73)])||_0x2e1384[_0x1690(0x277)];if(!_0x313787||_0x2e1384[_0x1690(0x278)](_0x313787['trim']()['length'],0x14)){if(_0x2e1384['ZMnpn'](_0x2e1384['Ngpga'],_0x2e1384['Ngpga']))return _0x3ee19c[_0x1690(0x53)](_0x2e1384['jhSZH']),![];else console[_0x1690(0x48)](_0x2e1384[_0x1690(0x279)]),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x27a)]),console['log'](_0x2e1384[_0x1690(0x27b)]);}else console[_0x1690(0x48)]('โ
\x20Found\x20existing\x20authentication\x20token\x20for\x20YouTube\x20auth'),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x27c)],_0x313787[_0x1690(0x92)](0x0,0x14)+_0x1690(0x109));console[_0x1690(0x48)](_0x2e1384[_0x1690(0x27d)],_0x94fd76),console[_0x1690(0x48)](_0x1690(0x27e),_0x313787?_0x313787[_0x1690(0x92)](0x0,0x14)+_0x1690(0x109):_0x1690(0x27f)),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x280)],_0x24059b);const _0x557939={'session':{'username':_0x94fd76,'platform':_0x2e1384['dfuph'],'timestamp':new Date()['toISOString'](),'channelName':_0x24059b,'channelId':_0x1586dd},'googleUser':_0x2e1384[_0x1690(0x25c)](_0x18a699=_0x2e6e46['data'],null)||_0x2e1384[_0x1690(0x281)](_0x18a699,void 0x0)?void 0x0:_0x18a699[_0x1690(0x103)],'accessToken':_0x53a24c[_0x1690(0xf1)],'idToken':_0x53a24c['idToken'],'refreshToken':_0x52ff5f,'serverAuthCode':_0x52ff5f,'refresh_token':_0x52ff5f,'server_auth_code':_0x52ff5f,'authCode':_0x52ff5f,'userAccountInfo':{'username':_0x94fd76,'email':_0x2e1384[_0x1690(0x26b)](_0x17b5b6=_0x2e6e46[_0x1690(0x101)],null)||_0x17b5b6===void 0x0||_0x2e1384[_0x1690(0x275)](_0x17b5b6=_0x17b5b6[_0x1690(0x103)],null)||_0x2e1384[_0x1690(0x270)](_0x17b5b6,void 0x0)?void 0x0:_0x17b5b6[_0x1690(0x73)],'authToken':_0x313787,'channelName':_0x24059b,'channelId':_0x1586dd,'userIdentifier':_0x313787?'user-'+_0x313787[_0x1690(0x92)](0x0,0xa):_0x1690(0x14c)+(_0x2e1384[_0x1690(0x282)](_0x1dc902=_0x2e6e46[_0x1690(0x101)],null)||_0x2e1384['BeKvx'](_0x1dc902,void 0x0)||(_0x1dc902=_0x1dc902[_0x1690(0x103)])===null||_0x2e1384[_0x1690(0x283)](_0x1dc902,void 0x0)?void 0x0:_0x1dc902[_0x1690(0x73)]),'googleId':_0x2e1384[_0x1690(0x284)](_0x3bf048=_0x2e6e46[_0x1690(0x101)],null)||_0x2e1384['CJnxe'](_0x3bf048,void 0x0)||_0x2e1384['tGxCf'](_0x3bf048=_0x3bf048[_0x1690(0x103)],null)||_0x3bf048===void 0x0?void 0x0:_0x3bf048['id'],'appleUserId':_0x313787!==null&&_0x2e1384[_0x1690(0x24b)](_0x313787,void 0x0)&&_0x313787[_0x1690(0x9e)](_0x2e1384[_0x1690(0x285)])?_0x313787[_0x1690(0x261)]('.')[0x1]:null,'refreshToken':_0x52ff5f,'serverAuthCode':_0x52ff5f},'tokenExpiry':new Date(_0x2e1384['sZvBu'](Date[_0x1690(0x14f)](),0xe10*0x3e8))[_0x1690(0x147)](),'requestRefreshToken':!![],'debugInfo':{'hasRefreshToken':!!_0x52ff5f,'refreshTokenType':_0x52ff5f?_0x52ff5f['startsWith']('4/')?_0x2e1384[_0x1690(0x255)]:_0x1690(0xc6):'none','configuredForRefresh':!![],'forcedConsent':!![],'refreshTokenValue':_0x52ff5f}};console[_0x1690(0x48)](_0x2e1384['CToWD']),console['log'](_0x2e1384['zVLjK'],!!_0x557939['accessToken']),console['log']('-\x20hasRefreshToken:',!!_0x557939[_0x1690(0xc6)]),console['log'](_0x1690(0x286),!!_0x557939['serverAuthCode']),console['log'](_0x2e1384['mlQse'],_0x557939['debugInfo'][_0x1690(0x155)]),console[_0x1690(0x48)](_0x2e1384['LSiPI'],_0x2e1384['Iklud'](_0x2c574b=_0x2e6e46[_0x1690(0x101)],null)||_0x2c574b===void 0x0||_0x2e1384[_0x1690(0x25c)](_0x2c574b=_0x2c574b[_0x1690(0x103)],null)||_0x2c574b===void 0x0?void 0x0:_0x2c574b[_0x1690(0x73)]),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x287)],_0x24059b),console['log'](_0x2e1384[_0x1690(0x288)]),console[_0x1690(0x48)](JSON[_0x1690(0x8c)](_0x557939,null,0x2)),console[_0x1690(0x48)](_0x1690(0x289),!!_0x52ff5f);const _0xd45f=await _0x2e1384[_0x1690(0x28a)](fetch,_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x157),{'method':'POST','headers':{'Content-Type':'application/json',..._0x313787&&{'Authorization':_0x313787}},'body':JSON[_0x1690(0x8c)](_0x557939)});console[_0x1690(0x48)](_0x2e1384[_0x1690(0x28b)],_0xd45f[_0x1690(0x5f)]),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x28c)],_0xd45f[_0x1690(0x28d)]);if(_0xd45f['ok']){var _0x2cbddb,_0x10b8ca;const _0x75866c=await _0xd45f[_0x1690(0x95)]();console[_0x1690(0x48)](_0x2e1384[_0x1690(0x28e)]),console[_0x1690(0x48)](_0x1690(0x28f)),console['log'](JSON['stringify'](_0x75866c,null,0x2));const _0x58b8be=_0x2e1384['HZjCF']((_0x2cbddb=_0x75866c['validation'])===null||_0x2e1384[_0x1690(0x276)](_0x2cbddb,void 0x0)?void 0x0:_0x2cbddb[_0x1690(0x15c)],!![])||_0x2e1384['tGxCf']((_0x10b8ca=_0x75866c[_0x1690(0x15f)])===null||_0x2e1384[_0x1690(0x290)](_0x10b8ca,void 0x0)?void 0x0:_0x10b8ca[_0x1690(0x291)],!![])||_0x2e1384[_0x1690(0x292)](_0x75866c[_0x1690(0x15c)],!![])||_0x75866c[_0x1690(0x52)]&&_0x75866c[_0x1690(0x52)][_0x1690(0x9e)](_0x2e1384['czGMs']);if(_0x58b8be)console[_0x1690(0x48)](_0x2e1384[_0x1690(0x293)]),console['log'](_0x2e1384[_0x1690(0x294)]),console[_0x1690(0x48)](_0x2e1384[_0x1690(0x295)]);else{if(_0x75866c[_0x1690(0x16f)]||_0x75866c[_0x1690(0x296)]){if(_0x2e1384[_0x1690(0x246)](_0x1690(0x297),_0x2e1384[_0x1690(0x298)]))return{'success':!![],'message':_0x5177f7[_0x1690(0x52)]||_0x2e1384[_0x1690(0x299)],'existingUser':_0x5c0152['existingUser']||![],'token':_0x5984ff[_0x1690(0x29a)]};else console[_0x1690(0x48)](_0x2e1384['WmAQq']),console['log'](_0x2e1384[_0x1690(0x29b)]);}else _0x2e1384['DIXur']!==_0x2e1384[_0x1690(0x29c)]?_0x2e1384[_0x1690(0x28a)](_0x3b2175,()=>{_0x59b4c4[_0x1690(0x48)](_0x2e1384[_0x1690(0x29d)]),_0x1b1d84(!![]);},0x3e8):(console[_0x1690(0x131)](_0x2e1384[_0x1690(0x29e)]),console[_0x1690(0x131)](_0x2e1384[_0x1690(0x29f)],Object[_0x1690(0x133)](_0x75866c)),console[_0x1690(0x131)](_0x2e1384['TIsHj']));}return!![];}else{const _0x879f84=await _0xd45f[_0x1690(0x5c)]();return console['error'](_0x2e1384[_0x1690(0x2a0)],_0xd45f['status']),console[_0x1690(0x53)](_0x2e1384[_0x1690(0x2a1)]),console['error'](_0x879f84),![];}}catch(_0x40d313){console['error'](_0x2e1384['GLbhJ'],_0x40d313);if(_0x2e1384[_0x1690(0x2a2)](_0x40d313[_0x1690(0x20)],_googleSignin[_0x1690(0x169)][_0x1690(0x190)]))console[_0x1690(0x48)](_0x2e1384[_0x1690(0x2a3)]);else{if(_0x2e1384[_0x1690(0x2a4)](_0x40d313[_0x1690(0x20)],_googleSignin[_0x1690(0x169)]['IN_PROGRESS']))console[_0x1690(0x48)](_0x2e1384[_0x1690(0x252)]);else _0x2e1384[_0x1690(0x2a5)](_0x40d313[_0x1690(0x20)],_googleSignin[_0x1690(0x169)][_0x1690(0x16d)])&&console[_0x1690(0x48)](_0x2e1384[_0x1690(0x2a6)]);}return![];}}if(_0x2e1384[_0x1690(0x240)](_0x3a0f8a,_0x1690(0x2a7)))return _0x2e1384['enslA']===_0x2e1384[_0x1690(0x2a8)]?(console[_0x1690(0x48)](_0x2e1384[_0x1690(0x2a9)]),new Promise(_0x2e4f20=>{const _0x4c819e={'oOOLw':_0x2e1384[_0x1690(0x2aa)],'uXLne':function(_0x4fdb86,_0x28ec2e){return _0x2e1384[_0x1690(0x235)](_0x4fdb86,_0x28ec2e);},'IAXRU':_0x2e1384[_0x1690(0x2ab)],'nRAsd':function(_0x19db57,_0x2043f7){return _0x2e1384[_0x1690(0x2ac)](_0x19db57,_0x2043f7);}};setTimeout(()=>{if(_0x4c819e[_0x1690(0x2ad)](_0x4c819e['IAXRU'],_0x4c819e[_0x1690(0x2ae)]))return _0x39b2c1[_0x1690(0x53)](_0x4c819e[_0x1690(0x2af)],_0x7d6f93),![];else console['log']('Facebook\x20Login\x20completed\x20successfully'),_0x4c819e[_0x1690(0x2b0)](_0x2e4f20,!![]);},0x3e8);})):{'success':![],'error':_0x1a4d99[_0x1690(0x52)]||_0x2e1384[_0x1690(0x2b1)]};return![];};exports[_0x1690(0x9)]=initiateNativeAuth;const isOAuthCallback=_0x3c3d9f=>{const _0x425150={'OTQYI':'auth/callback','FIJpV':_0x1690(0x2b2)};return _0x3c3d9f[_0x1690(0x9e)](_0x425150[_0x1690(0x2b3)])||_0x3c3d9f[_0x1690(0x9e)](_0x425150[_0x1690(0x2b4)]);};exports['isOAuthCallback']=isOAuthCallback;const exchangeCodeForToken=async(_0x2a7aae,_0x1557ed)=>{const _0x547017={'cyENz':'๐ง\x20Platform\x20auth\x20service\x20initialized','yEJfr':function(_0x349836){return _0x349836();},'GwHKI':function(_0x28258c,_0x1cc9b5){return _0x28258c!==_0x1cc9b5;},'MxPyl':_0x1690(0x2b5),'ogQwU':_0x1690(0x2b6)};console['log'](_0x1690(0x2b7)+_0x1557ed);try{const _0x2fe4f5=_api['API_CONFIG'][_0x1690(0x22)]+'/'+_0x1557ed+_0x1690(0x2b8),_0x3dce99=await fetch(_0x2fe4f5,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x1690(0x8c)]({'code':_0x2a7aae,'platform':_0x1557ed})});if(!_0x3dce99['ok']){console['error'](_0x1690(0x2b9)+_0x3dce99[_0x1690(0x5f)]);throw new Error(_0x1690(0x2ba)+_0x3dce99[_0x1690(0x5f)]);}const _0x560d7a=await _0x3dce99[_0x1690(0x95)]();return console[_0x1690(0x48)]('Token\x20exchange\x20successful\x20for\x20'+_0x1557ed),_0x560d7a;}catch(_0x5e4341){if(_0x547017[_0x1690(0x2bb)](_0x547017[_0x1690(0x2bc)],_0x547017['ogQwU']))return console['error'](_0x1690(0x2bd),_0x5e4341),console[_0x1690(0x48)](_0x1690(0x2be)),{'access_token':_0x1557ed+_0x1690(0x2bf)+Math['random']()['toString'](0x24)[_0x1690(0x92)](0x7),'refresh_token':_0x1557ed+_0x1690(0x2c0)+Math[_0x1690(0x2c1)]()[_0x1690(0x2c2)](0x24)['substring'](0x7),'expires_in':0xe10};else _0x2b2a0e[_0x1690(0x48)](_0x547017['cyENz']),_0x547017[_0x1690(0x2c3)](_0x26b4d1);}};exports[_0x1690(0xe)]=exchangeCodeForToken;const refreshYouTubeTokens=async()=>{const _0x3a3644={'lmsou':_0x1690(0x2c4),'theiD':function(_0x45560f,_0x134228){return _0x45560f!==_0x134228;},'ejWjK':_0x1690(0x2c5),'FsHhz':'๐\x20Refreshing\x20YouTube\x20tokens...','yHBsF':_0x1690(0x64),'hazjm':_0x1690(0x194),'MRzjs':function(_0x499821,_0x561a8c,_0x4ebadf){return _0x499821(_0x561a8c,_0x4ebadf);},'RyPdB':function(_0x50a83a,_0xd4d4){return _0x50a83a===_0xd4d4;},'NBIVE':function(_0x1f3bd4,_0x85e748){return _0x1f3bd4+_0x85e748;},'NgTbv':function(_0x4556e7,_0x791462){return _0x4556e7*_0x791462;},'ACYbU':function(_0x513932,_0x408991){return _0x513932!==_0x408991;},'YnvGb':_0x1690(0x2c6),'Cbtxs':_0x1690(0x2c7),'VRqOz':_0x1690(0x2c8),'IuRAa':_0x1690(0x2c9)};try{if(_0x3a3644[_0x1690(0x2ca)](_0x3a3644['ejWjK'],_0x3a3644[_0x1690(0x2cb)]))_0x41984d['log'](_0x1690(0x21a)),_0xdb3e22[_0x1690(0x48)](_0x3a3644[_0x1690(0x2cc)],_0x1a9cf4[_0x1690(0x114)]('4/')?'serverAuthCode':'refreshToken');else{var _0x17b69d;console[_0x1690(0x48)](_0x3a3644[_0x1690(0x2cd)]);const _0x4baac4=await _googleSignin['GoogleSignin']['getTokens']();if(!_0x4baac4)return console[_0x1690(0x53)](_0x3a3644[_0x1690(0x2ce)]),![];const _0x5de9f0=await _googleSignin['GoogleSignin'][_0x1690(0x105)]();if(!_0x5de9f0)return console[_0x1690(0x53)]('โ\x20No\x20current\x20Google\x20user\x20found'),![];const _0x43d626=await(0x0,_jwtStorageService[_0x1690(0x140)])();if(!_0x43d626)return console[_0x1690(0x53)](_0x3a3644[_0x1690(0x2cf)]),![];const _0x14fa50=await _0x3a3644[_0x1690(0x2d0)](fetch,_api['API_CONFIG'][_0x1690(0x22)]+'/youtube/refresh-token',{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x43d626},'body':JSON[_0x1690(0x8c)]({'accessToken':_0x4baac4[_0x1690(0xf1)],'idToken':_0x4baac4[_0x1690(0x14a)],'refreshToken':_0x5de9f0['serverAuthCode'],'userEmail':_0x3a3644[_0x1690(0x2d1)](_0x17b69d=_0x5de9f0['user'],null)||_0x3a3644[_0x1690(0x2d1)](_0x17b69d,void 0x0)?void 0x0:_0x17b69d['email'],'tokenExpiry':new Date(_0x3a3644['NBIVE'](Date[_0x1690(0x14f)](),_0x3a3644[_0x1690(0x2d2)](0xe10,0x3e8)))[_0x1690(0x147)](),'timestamp':new Date()[_0x1690(0x147)]()})});if(_0x14fa50['ok']){const _0x254045=await _0x14fa50['json']();return console[_0x1690(0x48)](_0x1690(0x2d3),_0x254045),!![];}else{if(_0x3a3644[_0x1690(0x2d4)](_0x3a3644[_0x1690(0x2d5)],_0x3a3644[_0x1690(0x2d6)])){const _0x2d10bf=await _0x14fa50['text']();return console[_0x1690(0x53)](_0x3a3644[_0x1690(0x2d7)],_0x14fa50['status'],_0x2d10bf),![];}else _0x223fb8[_0x1690(0x53)](_0x1690(0x2d8)+_0x1a74e4+_0x1690(0x9b));}}}catch(_0x1279bc){return console[_0x1690(0x53)](_0x3a3644[_0x1690(0x2d9)],_0x1279bc),![];}};exports[_0x1690(0x6)]=refreshYouTubeTokens;const triggerTrainingRestart=async(_0x1c87ee,_0x584856)=>{const _0x4e0a90={'xsEXM':_0x1690(0x2da),'VBIFV':function(_0x47bc35,_0x424b69,_0x1b2d46){return _0x47bc35(_0x424b69,_0x1b2d46);},'MYBuW':_0x1690(0x1e7),'jaSvO':_0x1690(0x2db)};try{console[_0x1690(0x48)](_0x4e0a90[_0x1690(0x2dc)],_0x1c87ee);const _0x4640b1=await _0x4e0a90[_0x1690(0x2dd)](fetch,_api[_0x1690(0x21)][_0x1690(0x22)]+_0x1690(0x2de),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x584856},'body':JSON['stringify']({'username':_0x1c87ee,'reason':_0x1690(0x2df),'platform':_0x4e0a90[_0x1690(0x2e0)],'timestamp':new Date()[_0x1690(0x147)](),'requestNewTraining':!![]})});if(_0x4640b1['ok']){const _0x3ecd3c=await _0x4640b1['json']();console[_0x1690(0x48)](_0x1690(0x2e1),_0x3ecd3c);}else{const _0x4349af=await _0x4640b1[_0x1690(0x5c)]();console['error'](_0x1690(0x2e2),_0x4640b1[_0x1690(0x5f)],_0x4349af);throw new Error(_0x1690(0x2e3)+_0x4640b1[_0x1690(0x5f)]);}}catch(_0x2272e0){console[_0x1690(0x53)](_0x4e0a90[_0x1690(0x2e4)],_0x2272e0);throw _0x2272e0;}},testYouTubeRefreshToken=async _0x15024c=>{const _0x4ea28e={'rBVHR':_0x1690(0x47),'PNAXv':_0x1690(0x196),'KxbyI':'auth/callback','qsRVe':'code=','ZRkVu':_0x1690(0x43),'aBFqX':'๐งช\x20Testing\x20YouTube\x20refresh\x20token\x20functionality...','ISueO':_0x1690(0xb4),'RgjpC':function(_0x2b55ab){return _0x2b55ab();},'PKrjM':_0x1690(0x2e5),'ZuGvn':'โ ๏ธ\x20No\x20refresh\x20token\x20found\x20-\x20attempting\x20to\x20fix...','GQeQq':function(_0x187184,_0x2e20c7){return _0x187184(_0x2e20c7);},'WZtiu':_0x1690(0x2e6),'JOpKN':_0x1690(0x2e7),'ZImEV':function(_0x55f579,_0x4ad3a5){return _0x55f579!==_0x4ad3a5;},'sJOBv':'kfcda','wiAVK':_0x1690(0x2e8),'aDEXf':_0x1690(0x2e9),'uMVEI':_0x1690(0x2ea),'ImIam':'qjSGW','kRFMm':_0x1690(0x2eb),'HwROj':'yfGcc'};console[_0x1690(0x48)](_0x4ea28e[_0x1690(0x2ec)]),console[_0x1690(0x48)](_0x4ea28e[_0x1690(0x2ed)],_0x15024c);try{const _0x28a847=await _0x4ea28e[_0x1690(0x2ee)](debugYouTubeTokens);console[_0x1690(0x48)](_0x4ea28e[_0x1690(0x2ef)],_0x28a847);if(!_0x28a847[_0x1690(0x16f)]){console[_0x1690(0x48)](_0x4ea28e[_0x1690(0x2f0)]);const _0x18471e=await _0x4ea28e['GQeQq'](fixUserYouTubeConnection,_0x15024c);if(_0x18471e){if(_0x1690(0x2f1)!==_0x1690(0x2f2)){console[_0x1690(0x48)](_0x4ea28e[_0x1690(0x2f3)]);const _0x2632ae=await _0x4ea28e[_0x1690(0x2ee)](debugYouTubeTokens);console[_0x1690(0x48)](_0x4ea28e[_0x1690(0x2f4)],_0x2632ae);}else return _0x2da82e[_0x1690(0x53)](_0x4ea28e[_0x1690(0x2f5)],_0x1d1c10[_0x1690(0x52)]),{'success':![],'message':_0x1690(0x70)+_0x2e8a6d[_0x1690(0x52)],'details':{'error':_0x319140[_0x1690(0x52)],'results':_0x28b5cf}};}else _0x4ea28e[_0x1690(0x2f6)](_0x4ea28e[_0x1690(0x2f7)],_0x4ea28e[_0x1690(0x2f8)])?console['error'](_0x4ea28e[_0x1690(0x2f9)]):_0x3e3042['log'](_0x4ea28e[_0x1690(0x2fa)],_0x5c0e05);}else{if(_0x4ea28e[_0x1690(0x2f6)](_0x4ea28e['uMVEI'],_0x4ea28e[_0x1690(0x2fb)]))console[_0x1690(0x48)](_0x1690(0x2fc));else return _0x1646ca['includes'](_0x4ea28e[_0x1690(0x2fd)])||_0x5dfc01[_0x1690(0x9e)](_0x4ea28e['qsRVe']);}}catch(_0x50957e){_0x4ea28e[_0x1690(0x2fe)]===_0x4ea28e[_0x1690(0x2ff)]?(_0x430212[_0x1690(0x67)]={'success':![],'error':_0x5b04b9['message'],'name':_0x21420d[_0x1690(0x68)]},_0x425443[_0x1690(0x53)](_0x4ea28e[_0x1690(0x300)],_0x3015f7['message'])):console[_0x1690(0x53)](_0x1690(0x1c5),_0x50957e);}};exports[_0x1690(0x3)]=testYouTubeRefreshToken;const requestEmailVerification=async(_0x1e6dcc,_0x816a27=![])=>{const _0x5e72fc={'BLEea':_0x1690(0x1eb),'LaGBP':_0x1690(0x1ae),'aYkwC':function(_0x456b3a,_0x14d8eb){return _0x456b3a===_0x14d8eb;},'obbrp':_0x1690(0x9a),'IkKEz':function(_0x2199ae,_0x10bf21){return _0x2199ae!==_0x10bf21;},'VFMJu':function(_0x85314c,_0x2197d6){return _0x85314c!==_0x2197d6;},'ZTdaK':_0x1690(0x76),'DTBvL':'0|3|5|4|2|1','BqetP':_0x1690(0x7a),'ZkhVg':_0x1690(0x79),'fmNOb':_0x1690(0x77),'wgSmH':_0x1690(0xa3),'FMUxv':_0x1690(0x78),'PhctN':_0x1690(0x301),'jmndA':_0x1690(0x302),'zsJbE':_0x1690(0x303),'nOUTv':_0x1690(0xdb),'aijOO':'๐\x20[YOUTUBE\x20REAUTH]\x20Mode:\x20Temporary\x20(expires\x20~1\x20hour)','EXsMl':_0x1690(0xdc),'XCczT':'๐\x20[YOUTUBE\x20REAUTH]\x20YouTube\x20connected\x20in\x20temporary\x20mode','DwjUi':_0x1690(0xdd),'KpMEE':_0x1690(0x304),'HGgtv':_0x1690(0x305),'wXtFI':function(_0x502f86,_0x598a54,_0x32c08c){return _0x502f86(_0x598a54,_0x32c08c);},'GtoMj':function(_0x50efe5){return _0x50efe5();},'arRwa':'nHtEW','JMyGc':'Verification\x20code\x20sent\x20to\x20your\x20email','evwZV':'ZXOmB','prEeZ':_0x1690(0x306),'pGFxN':_0x1690(0x307),'RYEHr':function(_0x5d5086,_0x38bf3f){return _0x5d5086!==_0x38bf3f;},'wWBhF':_0x1690(0x308),'mwhHU':_0x1690(0x206),'dAKNJ':'Network\x20error.\x20Please\x20check\x20your\x20connection\x20and\x20try\x20again.'};try{if(_0x5e72fc['KpMEE']===_0x5e72fc['KpMEE']){console[_0x1690(0x48)](_0x5e72fc[_0x1690(0x309)],_0x1e6dcc);const _0x2c8b06=await _0x5e72fc[_0x1690(0x30a)](fetch,_api[_0x1690(0x21)][_0x1690(0x22)]+'/email/verification',{'method':'POST','headers':_0x5e72fc['GtoMj'](getDeveloperAuthHeaders),'body':JSON[_0x1690(0x8c)]({'email':_0x1e6dcc,'action':_0x1690(0x30b),'testMode':_0x816a27})}),_0x3d0c72=await _0x2c8b06['json']();if(_0x2c8b06['ok']){if(_0x5e72fc[_0x1690(0x30c)](_0x5e72fc[_0x1690(0x30d)],'rBPzx'))return{'success':!![],'message':_0x3d0c72[_0x1690(0x52)]||_0x5e72fc[_0x1690(0x30e)]};else _0x5554cb['warn'](_0x5e72fc[_0x1690(0x30f)]);}else return _0x5e72fc[_0x1690(0x30c)](_0x5e72fc['evwZV'],_0x5e72fc[_0x1690(0x310)])?{'success':![],'error':_0x3d0c72['message']||_0x5e72fc[_0x1690(0x311)]}:(_0x4e1d0e[_0x1690(0x53)](_0x5e72fc[_0x1690(0x312)],_0x567a16),![]);}else{var _0x3df534;if(_0x5e72fc[_0x1690(0x313)](_0x3f458b['name'],_0x5e72fc['obbrp']))_0x59f187[_0x1690(0x53)]('โ\x20[OAUTH]\x20Request\x20timeout\x20for\x20'+_0x8eadde+_0x1690(0x9b));else{if(_0x5e72fc[_0x1690(0x314)](_0x3df534=_0xe76673[_0x1690(0x52)],null)&&_0x5e72fc['VFMJu'](_0x3df534,void 0x0)&&_0x3df534[_0x1690(0x9e)](_0x5e72fc[_0x1690(0x315)])){const _0x39c6b5=_0x5e72fc[_0x1690(0x316)]['split']('|');let _0x195c88=0x0;while(!![]){switch(_0x39c6b5[_0x195c88++]){case'0':_0x4b15a2['error']('โ\x20[OAUTH]\x20Network\x20request\x20failed\x20for\x20'+_0x346b41+_0x1690(0xa1));continue;case'1':_0x41a58f[_0x1690(0x53)](_0x5e72fc[_0x1690(0x317)]);continue;case'2':_0x2941a0[_0x1690(0x53)](_0x5e72fc[_0x1690(0x318)]);continue;case'3':_0x44e574[_0x1690(0x53)](_0x5e72fc['fmNOb']);continue;case'4':_0x2dbf43[_0x1690(0x53)](_0x5e72fc[_0x1690(0x319)]);continue;case'5':_0x54689a[_0x1690(0x53)](_0x5e72fc[_0x1690(0x31a)]);continue;}break;}}else _0x3c8f56['error'](_0x1690(0x93)+_0x2bb19b+':',_0x5cbea7);}return null;}}catch(_0x2dc6af){if(_0x5e72fc[_0x1690(0x31b)](_0x1690(0x31c),_0x5e72fc[_0x1690(0x31d)]))return console[_0x1690(0x53)](_0x5e72fc['mwhHU'],_0x2dc6af),{'success':![],'error':_0x5e72fc[_0x1690(0x31e)]};else{const _0x106909=_0x5e72fc[_0x1690(0x31f)][_0x1690(0x261)]('|');let _0x51818d=0x0;while(!![]){switch(_0x106909[_0x51818d++]){case'0':_0x3b7758[_0x1690(0x48)](_0x5e72fc[_0x1690(0x320)],_0x2dace1?_0x1690(0x321):'No');continue;case'1':_0x4d7159['log'](_0x5e72fc[_0x1690(0x322)]);continue;case'2':_0x26e1a8[_0x1690(0x48)](_0x5e72fc[_0x1690(0x323)]);continue;case'3':_0x58eec1[_0x1690(0x48)](_0x5e72fc['aijOO']);continue;case'4':_0x588f9d[_0x1690(0x48)](_0x5e72fc[_0x1690(0x324)]);continue;case'5':_0x1b8050[_0x1690(0x48)](_0x5e72fc[_0x1690(0x325)]);continue;case'6':_0x2edec6[_0x1690(0x48)](_0x5e72fc['DwjUi']);continue;}break;}}}};exports[_0x1690(0x5)]=requestEmailVerification;const verifyEmailCode=async(_0x55f8f4,_0x436f80,_0x3391d7=![])=>{const _0x25de61={'KrJWJ':_0x1690(0x326),'MXClI':function(_0x4c6459,_0xb9def0,_0x57a5b3){return _0x4c6459(_0xb9def0,_0x57a5b3);},'hFzse':_0x1690(0x327),'ZDGlj':function(_0x596a4c,_0x44b67e){return _0x596a4c!==_0x44b67e;},'bEqWR':'cKlni','mnCeE':_0x1690(0x328),'GSLbH':_0x1690(0x329),'GvvCg':_0x1690(0x258)};try{console[_0x1690(0x48)](_0x1690(0x32a),_0x55f8f4);const _0xe0a4b1=await _0x25de61[_0x1690(0x32b)](fetch,_api['API_CONFIG'][_0x1690(0x22)]+_0x1690(0x32c),{'method':'POST','headers':getDeveloperAuthHeaders(),'body':JSON[_0x1690(0x8c)]({'email':_0x55f8f4,'code':_0x436f80,'action':_0x25de61[_0x1690(0x32d)],'testMode':_0x3391d7})}),_0x387acb=await _0xe0a4b1[_0x1690(0x95)]();if(_0xe0a4b1['ok']){if(_0x25de61[_0x1690(0x32e)](_0x25de61[_0x1690(0x32f)],_0x1690(0x330)))return{'success':!![],'message':_0x387acb[_0x1690(0x52)]||_0x1690(0x20b),'existingUser':_0x387acb[_0x1690(0x331)]||![],'token':_0x387acb['token']};else _0x52af5a[_0x1690(0x48)](_0x25de61[_0x1690(0x332)]);}else return{'success':![],'error':_0x387acb[_0x1690(0x52)]||_0x25de61[_0x1690(0x333)]};}catch(_0x432a88){return console[_0x1690(0x53)](_0x25de61[_0x1690(0x334)],_0x432a88),{'success':![],'error':_0x25de61[_0x1690(0x335)]};}};exports[_0x1690(0x2)]=verifyEmailCode;const checkEmailVerificationStatus=async(_0x507aba,_0x14a5c1=![])=>{const _0x418688={'hODMI':function(_0x391c2d,_0x2c0714,_0x523902){return _0x391c2d(_0x2c0714,_0x523902);},'WsQSI':function(_0x5df268){return _0x5df268();},'vWdbq':function(_0x52ea1b,_0x942b40){return _0x52ea1b!==_0x942b40;},'zesPQ':_0x1690(0x336),'adiCy':_0x1690(0x337)};try{const _0x3938e=await _0x418688[_0x1690(0x338)](fetch,_api[_0x1690(0x21)][_0x1690(0x22)]+'/email/verification/status',{'method':'POST','headers':_0x418688[_0x1690(0x339)](getDeveloperAuthHeaders),'body':JSON['stringify']({'email':_0x507aba,'testMode':_0x14a5c1})}),_0x2c6ff6=await _0x3938e[_0x1690(0x95)]();return{'success':_0x3938e['ok'],'isPending':_0x2c6ff6['isPending']||![],'message':_0x2c6ff6[_0x1690(0x52)]};}catch(_0x46d007){if(_0x418688['vWdbq'](_0x418688[_0x1690(0x33a)],_0x1690(0x33b)))return console[_0x1690(0x53)](_0x418688[_0x1690(0x33c)],_0x46d007),{'success':![],'isPending':![],'error':_0x1690(0x33d)};else _0x5da3f8[_0x1690(0x48)](_0x1690(0x8a)+_0x58aca8+_0x1690(0x33e)),_0x57831d[_0x1690(0x58)]();}};exports['checkEmailVerificationStatus']=checkEmailVerificationStatus;const initializePlatformAuthService=()=>{const _0x5ae917={'QavUC':'๐ง\x20Platform\x20auth\x20service\x20initialized'};console[_0x1690(0x48)](_0x5ae917[_0x1690(0x33f)]),initializeGoogleSignIn();};exports[_0x1690(0x340)]=initializePlatformAuthService;
|