@onairos/react-native 3.6.9 â 3.7.1
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 -423
- package/lib/commonjs/api/index.js +1 -1
- package/lib/commonjs/assets/icons/netflix.png +0 -0
- package/lib/commonjs/assets/images/Checkbox.svg +3 -3
- package/lib/commonjs/assets/images/EnochE.svg +19 -19
- package/lib/commonjs/assets/images/Personalityprofile.svg +3 -3
- package/lib/commonjs/assets/images/Personalitytraits.svg +3 -3
- package/lib/commonjs/assets/images/Userpreferences.svg +3 -3
- package/lib/commonjs/assets/images/arrow.svg +20 -20
- package/lib/commonjs/assets/images/basicproficon.svg +43 -43
- package/lib/commonjs/assets/images/basicprofile.svg +3 -3
- package/lib/commonjs/assets/images/checkmark.svg +4 -4
- package/lib/commonjs/assets/images/contentanalysis.svg +3 -3
- package/lib/commonjs/assets/images/contenticon.svg +23 -23
- package/lib/commonjs/assets/images/netflix.png +0 -0
- package/lib/commonjs/assets/images/personalityicon.svg +18 -18
- package/lib/commonjs/assets/images/x-close.svg +3 -3
- package/lib/commonjs/components/BodyText.js +1 -1
- package/lib/commonjs/components/BrandMark.js +1 -1
- package/lib/commonjs/components/CodeInput.js +1 -1
- package/lib/commonjs/components/EmailInput.js +1 -1
- package/lib/commonjs/components/GoogleButton.js +1 -1
- package/lib/commonjs/components/HeadingGroup.js +1 -1
- package/lib/commonjs/components/LLMDataInputModal.js +1 -1
- package/lib/commonjs/components/ModalHeader.js +1 -1
- package/lib/commonjs/components/ModalSheet.js +1 -1
- package/lib/commonjs/components/Onairos.js +1 -1
- package/lib/commonjs/components/OnairosButton.js +1 -1
- package/lib/commonjs/components/OnairosSignInButton.js +1 -1
- package/lib/commonjs/components/Overlay.js +1 -1
- package/lib/commonjs/components/PersonaImage.js +1 -1
- package/lib/commonjs/components/PersonaLoadingScreen.js +1 -1
- package/lib/commonjs/components/PersonalizationConsentScreen.js +1 -1
- package/lib/commonjs/components/PinCreationScreen.js +1 -1
- package/lib/commonjs/components/PinInput.js +1 -1
- package/lib/commonjs/components/PlatformConnectorsStep.js +1 -1
- package/lib/commonjs/components/PlatformList.js +1 -1
- package/lib/commonjs/components/PlatformToggle.js +1 -1
- package/lib/commonjs/components/PrimaryButton.js +1 -1
- package/lib/commonjs/components/SignInMatchAnimation.js +1 -1
- package/lib/commonjs/components/SignInStep.js +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +1 -1
- package/lib/commonjs/components/VerificationStep.js +1 -1
- package/lib/commonjs/components/WelcomeScreen.js +1 -1
- package/lib/commonjs/components/icons/Basicproficon.js +1 -1
- package/lib/commonjs/components/icons/Basicprofile.js +1 -1
- package/lib/commonjs/components/icons/Checkbox.js +1 -1
- package/lib/commonjs/components/icons/Checkmark.js +1 -1
- package/lib/commonjs/components/icons/Contentanalysis.js +1 -1
- package/lib/commonjs/components/icons/Contenticon.js +1 -1
- package/lib/commonjs/components/icons/EnochE.js +1 -1
- package/lib/commonjs/components/icons/Personalityicon.js +1 -1
- package/lib/commonjs/components/icons/Personalityprofile.js +1 -1
- package/lib/commonjs/components/icons/Personalitytraits.js +1 -1
- package/lib/commonjs/components/icons/Userpreferences.js +1 -1
- package/lib/commonjs/components/icons/index.js +1 -1
- package/lib/commonjs/components/onboarding/OAuthWebView.js +1 -1
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/commonjs/components/onboarding/PinInput.js +1 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js +1 -1
- package/lib/commonjs/config/api.js +1 -1
- package/lib/commonjs/constants/index.js +1 -1
- package/lib/commonjs/context/AuthContext.js +1 -1
- package/lib/commonjs/hooks/useConnectedAccounts.js +1 -1
- package/lib/commonjs/hooks/useConnections.js +1 -1
- package/lib/commonjs/hooks/useCredentials.js +1 -1
- package/lib/commonjs/hooks/useUserConnections.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/commonjs/services/apiClient.js +1 -1
- package/lib/commonjs/services/apiKeyService.js +99 -99
- package/lib/commonjs/services/authService.js +72 -72
- package/lib/commonjs/services/biometricPinService.js +1 -1
- package/lib/commonjs/services/chatGPTConversationExtractor.js +1 -1
- package/lib/commonjs/services/chatGPTConversationService.js +1 -1
- package/lib/commonjs/services/claudeConversationExtractor.js +1 -1
- package/lib/commonjs/services/claudeConversationService.js +1 -1
- package/lib/commonjs/services/connectedAccountsService.js +1 -1
- package/lib/commonjs/services/googleAuthService.js +1 -1
- package/lib/commonjs/services/hingeDataExtractor.js +1 -1
- package/lib/commonjs/services/hingeDataService.js +1 -1
- package/lib/commonjs/services/imageCompressionService.js +1 -1
- package/lib/commonjs/services/instagramDataExtractor.js +1 -1
- package/lib/commonjs/services/instagramDataService.js +1 -1
- package/lib/commonjs/services/jwtStorageService.js +1 -1
- package/lib/commonjs/services/linkedinDOMExtractor.js +1 -1
- package/lib/commonjs/services/linkedinProfileService.js +1 -1
- package/lib/commonjs/services/linkedinScrapingService.js +1 -1
- package/lib/commonjs/services/llmDataStorage.js +1 -1
- package/lib/commonjs/services/mobileTrainingService.js +1 -1
- package/lib/commonjs/services/netflixDataExtractor.js +8 -0
- package/lib/commonjs/services/netflixDataService.js +9 -0
- package/lib/commonjs/services/oauthService.js +20 -20
- package/lib/commonjs/services/pinEncryptionService.js +1 -1
- package/lib/commonjs/services/pinStorageUtils.js +1 -1
- package/lib/commonjs/services/platformAuthService.js +1 -1
- package/lib/commonjs/services/sephoraDataExtractor.js +1 -1
- package/lib/commonjs/services/sephoraDataService.js +1 -1
- package/lib/commonjs/services/spotifyDataExtractor.js +8 -0
- package/lib/commonjs/services/spotifyDataService.js +9 -0
- package/lib/commonjs/services/storageService.js +1 -1
- package/lib/commonjs/services/telegramDataExtractor.js +1 -1
- package/lib/commonjs/services/telegramDataService.js +1 -1
- package/lib/commonjs/services/trainingApiHelpers.js +1 -1
- package/lib/commonjs/services/userConnectionsService.js +1 -1
- package/lib/commonjs/services/youtubeMigrationService.js +1 -1
- package/lib/commonjs/theme/index.js +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types.js +1 -1
- package/lib/commonjs/utils/Portal.js +1 -1
- package/lib/commonjs/utils/api.js +1 -1
- package/lib/commonjs/utils/assetRegistry.js +3 -1
- package/lib/commonjs/utils/auth.js +1 -1
- package/lib/commonjs/utils/connectorTests.js +1 -1
- package/lib/commonjs/utils/crypto.js +1 -1
- package/lib/commonjs/utils/debugHelper.js +1 -1
- package/lib/commonjs/utils/encryption.js +1 -1
- package/lib/commonjs/utils/eventUtils.js +1 -1
- package/lib/commonjs/utils/haptics.js +1 -1
- package/lib/commonjs/utils/imagePreloader.js +1 -1
- package/lib/commonjs/utils/networkDiagnostics.js +1 -1
- package/lib/commonjs/utils/onairosApi.js +1 -1
- package/lib/commonjs/utils/programmaticFlow.js +1 -1
- package/lib/commonjs/utils/retryHelper.js +1 -1
- package/lib/commonjs/utils/secureStorage.js +1 -1
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/commonjs/utils/webviewScripts/claude.js +1 -1
- package/lib/commonjs/utils/webviewScripts/hinge.js +1 -1
- package/lib/commonjs/utils/webviewScripts/index.js +4 -2
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -1
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
- package/lib/commonjs/utils/webviewScripts/netflix.js +1 -0
- package/lib/commonjs/utils/webviewScripts/sephora.js +1 -1
- package/lib/commonjs/utils/webviewScripts/spotify.js +1 -0
- package/lib/commonjs/utils/webviewScripts/telegram.js +1 -1
- package/lib/module/api/index.js +1 -1
- package/lib/module/assets/icons/netflix.png +0 -0
- package/lib/module/assets/images/Checkbox.svg +3 -3
- package/lib/module/assets/images/EnochE.svg +19 -19
- package/lib/module/assets/images/Personalityprofile.svg +3 -3
- package/lib/module/assets/images/Personalitytraits.svg +3 -3
- package/lib/module/assets/images/Userpreferences.svg +3 -3
- package/lib/module/assets/images/arrow.svg +20 -20
- package/lib/module/assets/images/basicproficon.svg +43 -43
- package/lib/module/assets/images/basicprofile.svg +3 -3
- package/lib/module/assets/images/checkmark.svg +4 -4
- package/lib/module/assets/images/contentanalysis.svg +3 -3
- package/lib/module/assets/images/contenticon.svg +23 -23
- package/lib/module/assets/images/netflix.png +0 -0
- package/lib/module/assets/images/personalityicon.svg +18 -18
- package/lib/module/assets/images/x-close.svg +3 -3
- package/lib/module/components/BodyText.js +1 -1
- package/lib/module/components/BrandMark.js +1 -1
- package/lib/module/components/CodeInput.js +1 -1
- package/lib/module/components/EmailInput.js +1 -1
- package/lib/module/components/GoogleButton.js +1 -1
- package/lib/module/components/HeadingGroup.js +1 -1
- package/lib/module/components/LLMDataInputModal.js +1 -1
- package/lib/module/components/ModalHeader.js +1 -1
- package/lib/module/components/ModalSheet.js +1 -1
- package/lib/module/components/Onairos.js +1 -1
- package/lib/module/components/OnairosButton.js +1 -1
- package/lib/module/components/OnairosSignInButton.js +1 -1
- package/lib/module/components/Overlay.js +1 -1
- package/lib/module/components/PersonaImage.js +1 -1
- package/lib/module/components/PersonaLoadingScreen.js +1 -1
- package/lib/module/components/PersonalizationConsentScreen.js +1 -1
- package/lib/module/components/PinCreationScreen.js +1 -1
- package/lib/module/components/PinInput.js +1 -1
- package/lib/module/components/PlatformConnectorsStep.js +1 -1
- package/lib/module/components/PlatformList.js +1 -1
- package/lib/module/components/PlatformToggle.js +1 -1
- package/lib/module/components/PrimaryButton.js +1 -1
- package/lib/module/components/SignInMatchAnimation.js +1 -1
- package/lib/module/components/SignInStep.js +1 -1
- package/lib/module/components/UniversalOnboarding.js +1 -1
- package/lib/module/components/VerificationStep.js +1 -1
- package/lib/module/components/WelcomeScreen.js +1 -1
- package/lib/module/components/icons/Basicproficon.js +1 -1
- package/lib/module/components/icons/Basicprofile.js +1 -1
- package/lib/module/components/icons/Checkbox.js +1 -1
- package/lib/module/components/icons/Checkmark.js +1 -1
- package/lib/module/components/icons/Contentanalysis.js +1 -1
- package/lib/module/components/icons/Contenticon.js +1 -1
- package/lib/module/components/icons/EnochE.js +1 -1
- package/lib/module/components/icons/Personalityicon.js +1 -1
- package/lib/module/components/icons/Personalityprofile.js +1 -1
- package/lib/module/components/icons/Personalitytraits.js +1 -1
- package/lib/module/components/icons/Userpreferences.js +1 -1
- package/lib/module/components/onboarding/OAuthWebView.js +1 -1
- package/lib/module/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/module/components/onboarding/PinInput.js +1 -1
- package/lib/module/components/onboarding/PlatformConnector.js +1 -1
- package/lib/module/config/api.js +1 -1
- package/lib/module/constants/index.js +1 -1
- package/lib/module/context/AuthContext.js +1 -1
- package/lib/module/hooks/useConnectedAccounts.js +1 -1
- package/lib/module/hooks/useConnections.js +1 -1
- package/lib/module/hooks/useCredentials.js +1 -1
- package/lib/module/hooks/useUserConnections.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/module/services/apiClient.js +1 -1
- package/lib/module/services/apiKeyService.js +99 -99
- package/lib/module/services/authService.js +72 -72
- package/lib/module/services/biometricPinService.js +1 -1
- package/lib/module/services/chatGPTConversationExtractor.js +1 -1
- package/lib/module/services/chatGPTConversationService.js +1 -1
- package/lib/module/services/claudeConversationExtractor.js +1 -1
- package/lib/module/services/claudeConversationService.js +1 -1
- package/lib/module/services/connectedAccountsService.js +1 -1
- package/lib/module/services/googleAuthService.js +1 -1
- package/lib/module/services/hingeDataExtractor.js +1 -1
- package/lib/module/services/hingeDataService.js +1 -1
- package/lib/module/services/imageCompressionService.js +1 -1
- package/lib/module/services/instagramDataExtractor.js +1 -1
- package/lib/module/services/instagramDataService.js +1 -1
- package/lib/module/services/jwtStorageService.js +1 -1
- package/lib/module/services/linkedinDOMExtractor.js +1 -1
- package/lib/module/services/linkedinProfileService.js +1 -1
- package/lib/module/services/linkedinScrapingService.js +1 -1
- package/lib/module/services/llmDataStorage.js +1 -1
- package/lib/module/services/mobileTrainingService.js +1 -1
- package/lib/module/services/netflixDataExtractor.js +1 -0
- package/lib/module/services/netflixDataService.js +1 -0
- package/lib/module/services/oauthService.js +20 -20
- package/lib/module/services/pinEncryptionService.js +1 -1
- package/lib/module/services/pinStorageUtils.js +1 -1
- package/lib/module/services/platformAuthService.js +1 -1
- package/lib/module/services/sephoraDataExtractor.js +1 -1
- package/lib/module/services/sephoraDataService.js +1 -1
- package/lib/module/services/spotifyDataExtractor.js +1 -0
- package/lib/module/services/spotifyDataService.js +1 -0
- package/lib/module/services/storageService.js +1 -1
- package/lib/module/services/telegramDataExtractor.js +1 -1
- package/lib/module/services/telegramDataService.js +1 -1
- package/lib/module/services/trainingApiHelpers.js +1 -1
- package/lib/module/services/userConnectionsService.js +1 -1
- package/lib/module/services/youtubeMigrationService.js +1 -1
- package/lib/module/theme/index.js +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/utils/Portal.js +1 -1
- package/lib/module/utils/api.js +1 -1
- package/lib/module/utils/assetRegistry.js +3 -1
- package/lib/module/utils/auth.js +1 -1
- package/lib/module/utils/connectorTests.js +1 -1
- package/lib/module/utils/crypto.js +1 -1
- package/lib/module/utils/debugHelper.js +1 -1
- package/lib/module/utils/encryption.js +1 -1
- package/lib/module/utils/eventUtils.js +1 -1
- package/lib/module/utils/haptics.js +1 -1
- package/lib/module/utils/networkDiagnostics.js +1 -1
- package/lib/module/utils/onairosApi.js +1 -1
- package/lib/module/utils/programmaticFlow.js +1 -1
- package/lib/module/utils/retryHelper.js +1 -1
- package/lib/module/utils/secureStorage.js +1 -1
- package/lib/module/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/module/utils/webviewScripts/claude.js +1 -1
- package/lib/module/utils/webviewScripts/hinge.js +1 -1
- package/lib/module/utils/webviewScripts/index.js +1 -1
- package/lib/module/utils/webviewScripts/instagram.js +1 -1
- package/lib/module/utils/webviewScripts/linkedin.js +1 -1
- package/lib/module/utils/webviewScripts/netflix.js +1 -0
- package/lib/module/utils/webviewScripts/sephora.js +1 -1
- package/lib/module/utils/webviewScripts/spotify.js +1 -0
- package/lib/module/utils/webviewScripts/telegram.js +1 -1
- package/package.json +172 -172
- package/lib/commonjs/config/PLATFORM_APIS.md +0 -559
- package/lib/commonjs/config/telegramConfig.js +0 -8
- package/lib/commonjs/config/webchangelog/md +0 -607
- package/lib/module/config/PLATFORM_APIS.md +0 -559
- package/lib/module/config/telegramConfig.js +0 -8
- package/lib/module/config/webchangelog/md +0 -607
|
@@ -7,9 +7,9 @@ import { storeJWT, getJWT, clearJWT } from './jwtStorageService';
|
|
|
7
7
|
// API base URL
|
|
8
8
|
const API_BASE_URL = API_CONFIG.BASE_URL;
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Wait for SDK initialization to complete (up to maxWaitMs).
|
|
12
|
-
* Polls isApiKeyInitialized() every 500ms.
|
|
10
|
+
/**
|
|
11
|
+
* Wait for SDK initialization to complete (up to maxWaitMs).
|
|
12
|
+
* Polls isApiKeyInitialized() every 500ms.
|
|
13
13
|
*/
|
|
14
14
|
const waitForSDKInit = async (maxWaitMs = 8000) => {
|
|
15
15
|
if (isApiKeyInitialized()) return true;
|
|
@@ -31,20 +31,20 @@ const waitForSDKInit = async (maxWaitMs = 8000) => {
|
|
|
31
31
|
|
|
32
32
|
// Interface for Apple authentication payload
|
|
33
33
|
|
|
34
|
-
/**
|
|
35
|
-
* Generic SDK Authentication Response
|
|
36
|
-
* Used by all auth methods (Google, Apple, Email)
|
|
34
|
+
/**
|
|
35
|
+
* Generic SDK Authentication Response
|
|
36
|
+
* Used by all auth methods (Google, Apple, Email)
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
* Authenticate with Apple
|
|
41
|
-
* @param appleAuthData Data from Apple authentication
|
|
42
|
-
* @returns Authentication response with token and user data
|
|
39
|
+
/**
|
|
40
|
+
* Authenticate with Apple
|
|
41
|
+
* @param appleAuthData Data from Apple authentication
|
|
42
|
+
* @returns Authentication response with token and user data
|
|
43
43
|
*/
|
|
44
|
-
/**
|
|
45
|
-
* Authenticate with Onairos (similar to Apple authentication)
|
|
46
|
-
* @param onairosAuthData Data from Onairos authentication
|
|
47
|
-
* @returns Authentication response with token and user data
|
|
44
|
+
/**
|
|
45
|
+
* Authenticate with Onairos (similar to Apple authentication)
|
|
46
|
+
* @param onairosAuthData Data from Onairos authentication
|
|
47
|
+
* @returns Authentication response with token and user data
|
|
48
48
|
*/
|
|
49
49
|
export const authenticateWithOnairos = async onairosAuthData => {
|
|
50
50
|
try {
|
|
@@ -80,10 +80,10 @@ export const authenticateWithOnairos = async onairosAuthData => {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
/**
|
|
84
|
-
* Authenticate with Onairos using the standardized /login/signin endpoint
|
|
85
|
-
* @param credentials Email and password for Onairos sign-in
|
|
86
|
-
* @returns Authentication response with token and user data
|
|
83
|
+
/**
|
|
84
|
+
* Authenticate with Onairos using the standardized /login/signin endpoint
|
|
85
|
+
* @param credentials Email and password for Onairos sign-in
|
|
86
|
+
* @returns Authentication response with token and user data
|
|
87
87
|
*/
|
|
88
88
|
export const authenticateWithOnairosSignIn = async credentials => {
|
|
89
89
|
try {
|
|
@@ -129,10 +129,10 @@ export const authenticateWithOnairosSignIn = async credentials => {
|
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
-
/**
|
|
133
|
-
* Authenticate with Apple using generic SDK endpoint
|
|
134
|
-
* NOTE: This is generic SDK auth - does NOT create EnochUser
|
|
135
|
-
* Consuming apps should call /enoch/users/register after this if needed
|
|
132
|
+
/**
|
|
133
|
+
* Authenticate with Apple using generic SDK endpoint
|
|
134
|
+
* NOTE: This is generic SDK auth - does NOT create EnochUser
|
|
135
|
+
* Consuming apps should call /enoch/users/register after this if needed
|
|
136
136
|
*/
|
|
137
137
|
export const authenticateWithApple = async appleAuthData => {
|
|
138
138
|
try {
|
|
@@ -191,9 +191,9 @@ export const authenticateWithApple = async appleAuthData => {
|
|
|
191
191
|
}
|
|
192
192
|
};
|
|
193
193
|
|
|
194
|
-
/**
|
|
195
|
-
* Save authentication token
|
|
196
|
-
* @param token JWT token
|
|
194
|
+
/**
|
|
195
|
+
* Save authentication token
|
|
196
|
+
* @param token JWT token
|
|
197
197
|
*/
|
|
198
198
|
export const saveAuthToken = async token => {
|
|
199
199
|
try {
|
|
@@ -204,8 +204,8 @@ export const saveAuthToken = async token => {
|
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
/**
|
|
208
|
-
* Debug function to check all auth-related storage
|
|
207
|
+
/**
|
|
208
|
+
* Debug function to check all auth-related storage
|
|
209
209
|
*/
|
|
210
210
|
export const debugAuthStorage = async () => {
|
|
211
211
|
console.log('đ [AUTH STORAGE DEBUG] Checking all auth-related storage:');
|
|
@@ -225,8 +225,8 @@ export const debugAuthStorage = async () => {
|
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
227
|
|
|
228
|
-
/**
|
|
229
|
-
* Clear all auth tokens and start fresh
|
|
228
|
+
/**
|
|
229
|
+
* Clear all auth tokens and start fresh
|
|
230
230
|
*/
|
|
231
231
|
export const clearAllAuthTokens = async () => {
|
|
232
232
|
console.log('đ§š [AUTH] Clearing all auth tokens...');
|
|
@@ -237,9 +237,9 @@ export const clearAllAuthTokens = async () => {
|
|
|
237
237
|
console.log('â
[AUTH] All auth tokens and data cleared');
|
|
238
238
|
};
|
|
239
239
|
|
|
240
|
-
/**
|
|
241
|
-
* Get saved authentication token
|
|
242
|
-
* @returns Saved JWT token or null if not found
|
|
240
|
+
/**
|
|
241
|
+
* Get saved authentication token
|
|
242
|
+
* @returns Saved JWT token or null if not found
|
|
243
243
|
*/
|
|
244
244
|
export const getAuthToken = async () => {
|
|
245
245
|
try {
|
|
@@ -256,8 +256,8 @@ export const getAuthToken = async () => {
|
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
258
|
|
|
259
|
-
/**
|
|
260
|
-
* Remove authentication token (logout)
|
|
259
|
+
/**
|
|
260
|
+
* Remove authentication token (logout)
|
|
261
261
|
*/
|
|
262
262
|
export const removeAuthToken = async () => {
|
|
263
263
|
try {
|
|
@@ -267,9 +267,9 @@ export const removeAuthToken = async () => {
|
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
/**
|
|
271
|
-
* Validate if user is properly authenticated
|
|
272
|
-
* @returns boolean indicating if user has valid authentication
|
|
270
|
+
/**
|
|
271
|
+
* Validate if user is properly authenticated
|
|
272
|
+
* @returns boolean indicating if user has valid authentication
|
|
273
273
|
*/
|
|
274
274
|
export const isAuthenticated = async () => {
|
|
275
275
|
try {
|
|
@@ -281,10 +281,10 @@ export const isAuthenticated = async () => {
|
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
283
|
|
|
284
|
-
/**
|
|
285
|
-
* Ensure authentication is available before making API calls
|
|
286
|
-
* @param apiName - Name of the API being called (for logging)
|
|
287
|
-
* @returns boolean indicating if authentication is available
|
|
284
|
+
/**
|
|
285
|
+
* Ensure authentication is available before making API calls
|
|
286
|
+
* @param apiName - Name of the API being called (for logging)
|
|
287
|
+
* @returns boolean indicating if authentication is available
|
|
288
288
|
*/
|
|
289
289
|
export const ensureAuthentication = async apiName => {
|
|
290
290
|
const isAuth = await isAuthenticated();
|
|
@@ -300,9 +300,9 @@ export const ensureAuthentication = async apiName => {
|
|
|
300
300
|
// SDK now uses a single simplified token. Enoch-specific token management
|
|
301
301
|
// should be handled by the consuming app if needed.
|
|
302
302
|
|
|
303
|
-
/**
|
|
304
|
-
* Verify token with backend
|
|
305
|
-
* @returns Boolean indicating if token is valid
|
|
303
|
+
/**
|
|
304
|
+
* Verify token with backend
|
|
305
|
+
* @returns Boolean indicating if token is valid
|
|
306
306
|
*/
|
|
307
307
|
export const verifyToken = async () => {
|
|
308
308
|
try {
|
|
@@ -339,10 +339,10 @@ export const verifyToken = async () => {
|
|
|
339
339
|
// NOTE: getEventTimer has been removed from SDK - it's Enoch-specific.
|
|
340
340
|
// Consuming apps (like OnairosEvents) should call /enoch/event/timer directly.
|
|
341
341
|
|
|
342
|
-
/**
|
|
343
|
-
* Check if a user email has admin privileges
|
|
344
|
-
* @param email User email to check
|
|
345
|
-
* @returns True if user is an admin
|
|
342
|
+
/**
|
|
343
|
+
* Check if a user email has admin privileges
|
|
344
|
+
* @param email User email to check
|
|
345
|
+
* @returns True if user is an admin
|
|
346
346
|
*/
|
|
347
347
|
export const isAdminEmail = email => {
|
|
348
348
|
if (!email) {
|
|
@@ -359,9 +359,9 @@ export const isAdminEmail = email => {
|
|
|
359
359
|
return isAdmin;
|
|
360
360
|
};
|
|
361
361
|
|
|
362
|
-
/**
|
|
363
|
-
* Get the current admin status from AsyncStorage
|
|
364
|
-
* This could be used for caching admin status between sessions
|
|
362
|
+
/**
|
|
363
|
+
* Get the current admin status from AsyncStorage
|
|
364
|
+
* This could be used for caching admin status between sessions
|
|
365
365
|
*/
|
|
366
366
|
export const getAdminStatus = async () => {
|
|
367
367
|
try {
|
|
@@ -373,9 +373,9 @@ export const getAdminStatus = async () => {
|
|
|
373
373
|
}
|
|
374
374
|
};
|
|
375
375
|
|
|
376
|
-
/**
|
|
377
|
-
* Save admin status to AsyncStorage
|
|
378
|
-
* @param isAdmin Whether the user is an admin
|
|
376
|
+
/**
|
|
377
|
+
* Save admin status to AsyncStorage
|
|
378
|
+
* @param isAdmin Whether the user is an admin
|
|
379
379
|
*/
|
|
380
380
|
export const saveAdminStatus = async isAdmin => {
|
|
381
381
|
try {
|
|
@@ -385,10 +385,10 @@ export const saveAdminStatus = async isAdmin => {
|
|
|
385
385
|
}
|
|
386
386
|
};
|
|
387
387
|
|
|
388
|
-
/**
|
|
389
|
-
* Get stored Onairos username for API calls
|
|
390
|
-
* This is used for data connector APIs (Reddit, etc.) that need the username
|
|
391
|
-
* @returns Stored username or null if not found
|
|
388
|
+
/**
|
|
389
|
+
* Get stored Onairos username for API calls
|
|
390
|
+
* This is used for data connector APIs (Reddit, etc.) that need the username
|
|
391
|
+
* @returns Stored username or null if not found
|
|
392
392
|
*/
|
|
393
393
|
export const getOnairosUsername = async () => {
|
|
394
394
|
try {
|
|
@@ -399,9 +399,9 @@ export const getOnairosUsername = async () => {
|
|
|
399
399
|
}
|
|
400
400
|
};
|
|
401
401
|
|
|
402
|
-
/**
|
|
403
|
-
* Save Onairos username for API calls
|
|
404
|
-
* @param username Username to store
|
|
402
|
+
/**
|
|
403
|
+
* Save Onairos username for API calls
|
|
404
|
+
* @param username Username to store
|
|
405
405
|
*/
|
|
406
406
|
export const saveOnairosUsername = async username => {
|
|
407
407
|
try {
|
|
@@ -411,10 +411,10 @@ export const saveOnairosUsername = async username => {
|
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
413
|
|
|
414
|
-
/**
|
|
415
|
-
* Send email verification code
|
|
416
|
-
* @param email Email address to send verification code to
|
|
417
|
-
* @returns Result with success status and optional message
|
|
414
|
+
/**
|
|
415
|
+
* Send email verification code
|
|
416
|
+
* @param email Email address to send verification code to
|
|
417
|
+
* @returns Result with success status and optional message
|
|
418
418
|
*/
|
|
419
419
|
export const sendEmailVerificationCode = async email => {
|
|
420
420
|
const url = `${API_BASE_URL}/email/verification`;
|
|
@@ -494,13 +494,13 @@ export const sendEmailVerificationCode = async email => {
|
|
|
494
494
|
};
|
|
495
495
|
};
|
|
496
496
|
|
|
497
|
-
/**
|
|
498
|
-
* Confirm email verification code
|
|
499
|
-
* NOTE: This is generic SDK email verification - does NOT create EnochUser
|
|
500
|
-
* Consuming apps should call /enoch/users/register after this if needed
|
|
501
|
-
* @param email Email address that received the code
|
|
502
|
-
* @param code Verification code entered by user
|
|
503
|
-
* @returns Result with success status, optional token, and message
|
|
497
|
+
/**
|
|
498
|
+
* Confirm email verification code
|
|
499
|
+
* NOTE: This is generic SDK email verification - does NOT create EnochUser
|
|
500
|
+
* Consuming apps should call /enoch/users/register after this if needed
|
|
501
|
+
* @param email Email address that received the code
|
|
502
|
+
* @param code Verification code entered by user
|
|
503
|
+
* @returns Result with success status, optional token, and message
|
|
504
504
|
*/
|
|
505
505
|
export const confirmEmailVerificationCode = async (email, code) => {
|
|
506
506
|
console.log('đ [CODE VERIFY] Verifying code for:', email);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as Keychain from'react-native-keychain';import{Platform}from'react-native';const PIN_SERVICE_KEY=_0x1910(0x0),PIN_USERNAME=_0x1910(0x1);export const isBiometricAvailable=async()=>{const _0x4e5165={'SlHep':_0x1910(0x2),'CEDCh':function(_0x44cd3c,_0x297ec6){return _0x44cd3c===_0x297ec6;},'yoTAe':function(_0x2ab40f,_0xbfce09){return _0x2ab40f===_0xbfce09;},'dkxTo':function(_0x1a989e,_0x3b4ee1){return _0x1a989e===_0x3b4ee1;},'QmVQR':_0x1910(0x3)};try{const _0x418ffb=await Keychain[_0x1910(0x4)]();return console['log'](_0x4e5165[_0x1910(0x5)],_0x418ffb),_0x4e5165[_0x1910(0x6)](_0x418ffb,Keychain[_0x1910(0x7)][_0x1910(0x8)])||_0x4e5165[_0x1910(0x9)](_0x418ffb,Keychain[_0x1910(0x7)][_0x1910(0xa)])||_0x4e5165[_0x1910(0x9)](_0x418ffb,Keychain[_0x1910(0x7)]['FINGERPRINT'])||_0x4e5165['CEDCh'](_0x418ffb,Keychain['BIOMETRY_TYPE']['FACE'])||_0x4e5165['dkxTo'](_0x418ffb,Keychain[_0x1910(0x7)][_0x1910(0xb)]);}catch(_0x3d124b){return console[_0x1910(0xc)](_0x4e5165[_0x1910(0xd)],_0x3d124b),![];}};function _0x1910(_0x3721d8,_0x1910b5){_0x3721d8=_0x3721d8-0x0;const _0x2a5527=_0x3721();let _0x130c1b=_0x2a5527[_0x3721d8];return _0x130c1b;}export const storePinWithBiometric=async _0x3eef7f=>{const _0x344230={'dZxMO':_0x1910(0xe),'NGnIx':_0x1910(0xf),'kWuEc':_0x1910(0x3),'PTPPz':function(_0x50302f,_0x3033ac){return _0x50302f===_0x3033ac;},'znjyf':_0x1910(0x10),'skZMc':function(_0x3efc25){return _0x3efc25();},'aPztH':_0x1910(0x11),'GoPao':_0x1910(0x12),'VpFZr':_0x1910(0x13),'EMKDj':function(_0x44f3bb,_0xbde234){return _0x44f3bb===_0xbde234;},'Nbmxn':'Authenticate\x20with\x20Face\x20ID\x20to\x20secure\x20your\x20PIN','FtlpP':'Cancel','FYkYn':_0x1910(0x14),'SlLSF':_0x1910(0x15),'wkwyL':'â\x20Error\x20details:','ZkFax':function(_0x3caf6f,_0x477b58){return _0x3caf6f!==_0x477b58;},'rcSaT':function(_0xba99ed,_0x1eb9a9){return _0xba99ed!==_0x1eb9a9;},'nzMAn':_0x1910(0x16),'jGJGg':function(_0xc5c6f9,_0x1e77d5){return _0xc5c6f9===_0x1e77d5;},'Dmhpu':function(_0x46cd89,_0x349b2e){return _0x46cd89===_0x349b2e;},'GtMmQ':'đ¤\x20User\x20cancelled\x20Face\x20ID\x20authentication','aXNxB':function(_0x3f105b,_0x321abd){return _0x3f105b!==_0x321abd;},'glLVq':function(_0x38da69,_0x5d2a7e){return _0x38da69===_0x5d2a7e;},'qzbSx':function(_0x4b10bb,_0x573bab){return _0x4b10bb===_0x573bab;},'iWNYh':function(_0xbee361,_0x682686){return _0xbee361!==_0x682686;},'cLsBs':_0x1910(0x17),'VrrDW':function(_0x2d5ed0,_0x274a8d){return _0x2d5ed0===_0x274a8d;},'pRRjJ':function(_0x29464c,_0x44f6b8){return _0x29464c===_0x44f6b8;},'qYWNx':_0x1910(0x18),'SlCXO':_0x1910(0x19),'tUPcH':function(_0x343b8e,_0x202eb0){return _0x343b8e!==_0x202eb0;},'ngtmr':function(_0x48aa3e,_0x5a9973){return _0x48aa3e!==_0x5a9973;}};try{if(_0x344230['PTPPz'](_0x344230[_0x1910(0x1a)],_0x344230[_0x1910(0x1a)])){console[_0x1910(0x1b)]('đ\x20Starting\x20Face\x20ID\x20authentication\x20for\x20PIN\x20storage...');const _0x2b4f33=await _0x344230[_0x1910(0x1c)](isBiometricAvailable);if(!_0x2b4f33)return _0x344230[_0x1910(0x1d)]===_0x344230[_0x1910(0x1d)]?(console['error'](_0x344230[_0x1910(0x1e)]),![]):(_0x195ab4[_0x1910(0x1b)](_0x344230[_0x1910(0x1f)]),![]);console[_0x1910(0x1b)](_0x344230[_0x1910(0x20)]);const _0x3be160={'accessControl':Keychain[_0x1910(0x21)]['BIOMETRY_CURRENT_SET'],'authenticationType':Keychain[_0x1910(0x22)][_0x1910(0x23)],'touchID':!![],'showModal':!![],'kLocalizedFallbackTitle':'',..._0x344230[_0x1910(0x24)](Platform['OS'],'ios')&&{'localizedPrompt':_0x344230[_0x1910(0x25)],'localizedCancel':_0x344230[_0x1910(0x26)]},..._0x344230['PTPPz'](Platform['OS'],_0x1910(0x27))&&{'promptMessage':_0x344230['FYkYn'],'cancelButtonText':_0x344230['FtlpP']}};console['log'](_0x1910(0x28));const _0x46fd97=await Keychain[_0x1910(0x29)](PIN_USERNAME,_0x3eef7f,{'service':PIN_SERVICE_KEY,..._0x3be160});return console['log'](_0x1910(0x2a)),console[_0x1910(0x1b)](_0x344230[_0x1910(0x2b)],_0x46fd97),!![];}else return _0x265a56[_0x1910(0x1b)](_0x344230['NGnIx']),![];}catch(_0x45882c){var _0x4f0111,_0x608af4,_0x199f8b,_0x2d034c;console[_0x1910(0xc)](_0x1910(0x2c),_0x45882c),console['error'](_0x344230[_0x1910(0x2d)],{'message':_0x45882c[_0x1910(0x2e)],'code':_0x45882c[_0x1910(0x2f)],'domain':_0x45882c[_0x1910(0x30)],'userInfo':_0x45882c[_0x1910(0x31)]});if(_0x344230[_0x1910(0x32)](_0x45882c,null)&&_0x344230['ZkFax'](_0x45882c,void 0x0)&&_0x344230[_0x1910(0x33)](_0x4f0111=_0x45882c['message'],null)&&_0x4f0111!==void 0x0&&_0x4f0111[_0x1910(0x34)](_0x344230['nzMAn'])||_0x344230['PTPPz'](_0x344230[_0x1910(0x35)](_0x45882c,null)||_0x344230['Dmhpu'](_0x45882c,void 0x0)?void 0x0:_0x45882c[_0x1910(0x2f)],-0x80))return console[_0x1910(0x1b)](_0x344230[_0x1910(0x36)]),![];else{if(_0x45882c!==null&&_0x344230['ZkFax'](_0x45882c,void 0x0)&&_0x344230[_0x1910(0x32)](_0x608af4=_0x45882c['message'],null)&&_0x344230[_0x1910(0x37)](_0x608af4,void 0x0)&&_0x608af4[_0x1910(0x34)](_0x1910(0x38))||_0x344230[_0x1910(0x35)](_0x344230[_0x1910(0x39)](_0x45882c,null)||_0x344230['qzbSx'](_0x45882c,void 0x0)?void 0x0:_0x45882c[_0x1910(0x2f)],-0x6))return console[_0x1910(0x1b)](_0x344230['dZxMO']),![];else{if(_0x45882c!==null&&_0x344230[_0x1910(0x3a)](_0x45882c,void 0x0)&&(_0x199f8b=_0x45882c[_0x1910(0x2e)])!==null&&_0x344230[_0x1910(0x32)](_0x199f8b,void 0x0)&&_0x199f8b[_0x1910(0x34)](_0x344230[_0x1910(0x3b)])||_0x344230[_0x1910(0x3c)](_0x344230['pRRjJ'](_0x45882c,null)||_0x45882c===void 0x0?void 0x0:_0x45882c[_0x1910(0x2f)],-0x1))return _0x344230[_0x1910(0x37)](_0x344230[_0x1910(0x3d)],_0x344230[_0x1910(0x3d)])?(_0x353d2a[_0x1910(0xc)](_0x344230['kWuEc'],_0x480e9f),![]):(console['log'](_0x344230[_0x1910(0x3e)]),![]);else{if(_0x344230[_0x1910(0x3f)](_0x45882c,null)&&_0x344230[_0x1910(0x40)](_0x45882c,void 0x0)&&_0x344230[_0x1910(0x32)](_0x2d034c=_0x45882c[_0x1910(0x2e)],null)&&_0x2d034c!==void 0x0&&_0x2d034c[_0x1910(0x34)]('BiometryLockout')||(_0x45882c===null||_0x344230[_0x1910(0x41)](_0x45882c,void 0x0)?void 0x0:_0x45882c['code'])===-0x8)return console['log'](_0x344230['NGnIx']),![];}}}return console[_0x1910(0xc)](_0x1910(0x42),_0x45882c[_0x1910(0x2e)]),![];}};export const retrievePinWithBiometric=async()=>{const _0x4c2170={'Qhmhs':_0x1910(0x43),'xdMKy':_0x1910(0x44),'uvuDA':'â
\x20PIN\x20retrieved\x20successfully','ufKQG':function(_0x5e8323,_0x3e71bb){return _0x5e8323!==_0x3e71bb;},'hNCFv':function(_0x45dc89,_0x22d744){return _0x45dc89!==_0x22d744;},'UlpCJ':_0x1910(0x16),'botHu':_0x1910(0x45),'mFzmM':function(_0x1b30a4,_0x492111){return _0x1b30a4!==_0x492111;},'FLpUF':function(_0x4bfb81,_0x504397){return _0x4bfb81!==_0x504397;},'muyDa':function(_0x582b13,_0xae94){return _0x582b13!==_0xae94;},'pbbRM':_0x1910(0x38),'aVpia':_0x1910(0x46)};try{console[_0x1910(0x1b)](_0x1910(0x47));const _0x2befe6=await Keychain['getGenericPassword']({'service':PIN_SERVICE_KEY});return _0x2befe6&&_0x2befe6[_0x1910(0x48)]?_0x4c2170[_0x1910(0x49)]===_0x1910(0x4a)?(_0x52ebf0[_0x1910(0x1b)](_0x4c2170[_0x1910(0x4b)]),![]):(console['log'](_0x4c2170[_0x1910(0x4c)]),_0x2befe6['password']):(console[_0x1910(0x1b)](_0x1910(0x4d)),null);}catch(_0x1e1a1f){var _0x5d79c3,_0x16a48e;console['error'](_0x1910(0x4e),_0x1e1a1f);if(_0x1e1a1f!==null&&_0x4c2170[_0x1910(0x4f)](_0x1e1a1f,void 0x0)&&_0x4c2170['ufKQG'](_0x5d79c3=_0x1e1a1f[_0x1910(0x2e)],null)&&_0x4c2170['hNCFv'](_0x5d79c3,void 0x0)&&_0x5d79c3[_0x1910(0x34)](_0x4c2170['UlpCJ']))return console[_0x1910(0x1b)](_0x4c2170['botHu']),null;else{if(_0x4c2170[_0x1910(0x50)](_0x1e1a1f,null)&&_0x4c2170[_0x1910(0x50)](_0x1e1a1f,void 0x0)&&_0x4c2170['FLpUF'](_0x16a48e=_0x1e1a1f[_0x1910(0x2e)],null)&&_0x4c2170['muyDa'](_0x16a48e,void 0x0)&&_0x16a48e[_0x1910(0x34)](_0x4c2170['pbbRM']))return console[_0x1910(0x1b)](_0x4c2170[_0x1910(0x51)]),null;}return null;}};export const isPinStored=async()=>{const _0x2f3492={'OPlFs':_0x1910(0x4e),'eBaDW':function(_0x30e5ba,_0xdcce20){return _0x30e5ba!==_0xdcce20;},'kwQLx':_0x1910(0x45),'puBBs':_0x1910(0x38),'ZxUIb':'đą\x20Biometric\x20not\x20available','XYTeh':function(_0x1ffea0,_0x194a81){return _0x1ffea0===_0x194a81;},'sITnq':'zfJdj','NEiUe':'Ijhlw','KYUGB':_0x1910(0x52)};try{const _0x4a0cc5=await Keychain[_0x1910(0x53)]({'service':PIN_SERVICE_KEY});return!!(_0x4a0cc5&&_0x4a0cc5['password']);}catch(_0x4f0d5c){if(_0x2f3492[_0x1910(0x54)](_0x2f3492[_0x1910(0x55)],_0x2f3492[_0x1910(0x56)])){var _0x38c914,_0x143be9;_0x1cb8dd[_0x1910(0xc)](_0x2f3492['OPlFs'],_0x4a6a8d);if(_0x2f3492['eBaDW'](_0x453a88,null)&&_0x225654!==void 0x0&&_0x2f3492[_0x1910(0x57)](_0x38c914=_0x54e5a1['message'],null)&&_0x38c914!==void 0x0&&_0x38c914['includes'](_0x1910(0x16)))return _0x5de917[_0x1910(0x1b)](_0x2f3492[_0x1910(0x58)]),null;else{if(_0x5ec213!==null&&_0x240363!==void 0x0&&_0x2f3492[_0x1910(0x57)](_0x143be9=_0x44d678[_0x1910(0x2e)],null)&&_0x2f3492[_0x1910(0x57)](_0x143be9,void 0x0)&&_0x143be9[_0x1910(0x34)](_0x2f3492[_0x1910(0x59)]))return _0x2f8dec[_0x1910(0x1b)](_0x2f3492[_0x1910(0x5a)]),null;}return null;}else return console['error'](_0x2f3492[_0x1910(0x5b)],_0x4f0d5c),![];}};export const removePinFromStorage=async()=>{const _0x2288ae={'SGhSu':_0x1910(0x5c),'TrbOv':_0x1910(0x5d),'pjHYL':'đī¸\x20Removing\x20PIN\x20from\x20secure\x20storage...','krdBS':_0x1910(0x5e),'OyPhA':_0x1910(0x5f)};try{return _0x2288ae[_0x1910(0x60)]===_0x2288ae[_0x1910(0x61)]?(_0x1d8d1d['log'](_0x1910(0x4d)),null):(console[_0x1910(0x1b)](_0x2288ae[_0x1910(0x62)]),await Keychain[_0x1910(0x63)]({'service':PIN_SERVICE_KEY}),console['log'](_0x2288ae['krdBS']),!![]);}catch(_0x2beeec){return console[_0x1910(0xc)](_0x2288ae[_0x1910(0x64)],_0x2beeec),![];}};function _0x3721(){const _0x4f80d0=['OnairosEventsPIN','user_pin','đą\x20Biometric\x20support:','â\x20Error\x20checking\x20biometric\x20availability:','getSupportedBiometryType','SlHep','CEDCh','BIOMETRY_TYPE','FACE_ID','yoTAe','TOUCH_ID','IRIS','error','QmVQR','đą\x20Face\x20ID/Touch\x20ID\x20not\x20available','đ\x20Face\x20ID\x20locked\x20out\x20-\x20too\x20many\x20failed\x20attempts','hYYkk','hqNrC','â\x20Face\x20ID/Touch\x20ID\x20not\x20available\x20on\x20this\x20device','đą\x20Face\x20ID\x20available,\x20showing\x20authentication\x20prompt...','Authenticate\x20with\x20biometric\x20to\x20secure\x20your\x20PIN','đ\x20Keychain\x20storage\x20result:','UserCancel','AuthenticationFailed','AYJha','đĢ\x20Face\x20ID\x20authentication\x20failed','znjyf','log','skZMc','aPztH','GoPao','dZxMO','VpFZr','ACCESS_CONTROL','AUTHENTICATION_TYPE','BIOMETRICS','EMKDj','Nbmxn','FtlpP','android','đ¤\x20Requesting\x20Face\x20ID\x20authentication...','setGenericPassword','â
\x20Face\x20ID\x20authentication\x20successful\x20-\x20PIN\x20stored\x20securely','SlLSF','â\x20Face\x20ID\x20authentication\x20failed:','wkwyL','message','code','domain','userInfo','ZkFax','rcSaT','includes','jGJGg','GtMmQ','aXNxB','BiometryNotAvailable','glLVq','iWNYh','cLsBs','VrrDW','qYWNx','SlCXO','tUPcH','ngtmr','PTPPz','â\x20Unknown\x20Face\x20ID\x20error:','đ¤\x20User\x20cancelled\x20Face\x20ID\x20authentication','AjiZc','đ¤\x20User\x20cancelled\x20biometric\x20authentication','đą\x20Biometric\x20not\x20available','đ\x20Retrieving\x20PIN\x20with\x20biometric\x20authentication...','password','xdMKy','qVEpZ','Qhmhs','uvuDA','â ī¸\x20No\x20PIN\x20found\x20in\x20secure\x20storage','â\x20Error\x20retrieving\x20PIN\x20with\x20biometric:','ufKQG','mFzmM','aVpia','â\x20Error\x20checking\x20PIN\x20storage:','getGenericPassword','XYTeh','sITnq','NEiUe','eBaDW','kwQLx','puBBs','ZxUIb','KYUGB','hEYEZ','YaCLw','â
\x20PIN\x20removed\x20successfully','â\x20Error\x20removing\x20PIN\x20from\x20storage:','SGhSu','TrbOv','pjHYL','resetGenericPassword','OyPhA'];_0x3721=function(){return _0x4f80d0;};return _0x3721();}export const biometricPinService={'storePinWithBiometric':storePinWithBiometric,'retrievePinWithBiometric':retrievePinWithBiometric,'isPinStored':isPinStored,'removePinFromStorage':removePinFromStorage,'isBiometricAvailable':isBiometricAvailable};
|
|
1
|
+
import*as Keychain from'react-native-keychain';import{Platform}from'react-native';function _0x5e67(){const _0x454859=['OnairosEventsPIN','user_pin','đą\x20Biometric\x20not\x20available','đĢ\x20Face\x20ID\x20authentication\x20failed','suvay','aMJYd','Ufndl','ZINDV','xIavN','getSupportedBiometryType','uABuf','vuKwC','BIOMETRY_TYPE','TOUCH_ID','mxUjw','FINGERPRINT','FACE','tSvfC','log','etbpy','â\x20Error\x20checking\x20PIN\x20storage:','đą\x20Face\x20ID/Touch\x20ID\x20not\x20available','â\x20Error\x20removing\x20PIN\x20from\x20storage:','sTVqq','ENSNK','â\x20Face\x20ID/Touch\x20ID\x20not\x20available\x20on\x20this\x20device','đą\x20Face\x20ID\x20available,\x20showing\x20authentication\x20prompt...','ios','Cancel','Authenticate\x20with\x20biometric\x20to\x20secure\x20your\x20PIN','đ\x20Keychain\x20storage\x20result:','SqKMv','nXjqb','đ¤\x20User\x20cancelled\x20Face\x20ID\x20authentication','pIDZW','BiometryLockout','â\x20Unknown\x20Face\x20ID\x20error:','xgYwA','error','xeoMr','đ\x20Starting\x20Face\x20ID\x20authentication\x20for\x20PIN\x20storage...','kzldY','HJztg','ACCESS_CONTROL','BIOMETRY_CURRENT_SET','AUTHENTICATION_TYPE','BIOMETRICS','CRaPF','idfKC','Authenticate\x20with\x20Face\x20ID\x20to\x20secure\x20your\x20PIN','PfifR','lUzEF','đ¤\x20Requesting\x20Face\x20ID\x20authentication...','setGenericPassword','XOrqM','KEyrD','StcgT','hzUUw','ClGus','â\x20Face\x20ID\x20authentication\x20failed:','â\x20Error\x20details:','message','code','domain','userInfo','tyNnM','OKurK','kcPHW','includes','MjYQW','cjkMg','JvSHU','mqfzs','BiometryNotAvailable','ZBYhO','xzsaf','QTnsc','rfBfU','oSWYp','nMmbd','tkqvD','kvtTf','đ\x20Face\x20ID\x20locked\x20out\x20-\x20too\x20many\x20failed\x20attempts','â ī¸\x20No\x20PIN\x20found\x20in\x20secure\x20storage','yRZiD','đ\x20Retrieving\x20PIN\x20with\x20biometric\x20authentication...','xaqpj','ktEzA','â
\x20PIN\x20retrieved\x20successfully','ntYNu','rpECu','UserCancel','đ¤\x20User\x20cancelled\x20biometric\x20authentication','dvyvg','dzVCX','kDWXg','getGenericPassword','password','svTSE','XJSmG','TsLpj','aonRB','Jkiih','fOsFR','AuIvW','xJhcX','RCouR','UyWAo','jvcOb','ZjOBX','kPQdx','eRbuT','đī¸\x20Removing\x20PIN\x20from\x20secure\x20storage...','ZXKSC','resetGenericPassword','â
\x20PIN\x20removed\x20successfully','VOhAs','HDioI'];_0x5e67=function(){return _0x454859;};return _0x5e67();}function _0x31e0(_0x5e6767,_0x31e0e8){_0x5e6767=_0x5e6767-0x0;const _0x335064=_0x5e67();let _0x5101a2=_0x335064[_0x5e6767];return _0x5101a2;}const PIN_SERVICE_KEY=_0x31e0(0x0),PIN_USERNAME=_0x31e0(0x1);export const isBiometricAvailable=async()=>{const _0x27c43a={'HXYKQ':_0x31e0(0x2),'etbpy':_0x31e0(0x3),'Ufndl':function(_0x243514,_0x206216){return _0x243514!==_0x206216;},'xIavN':_0x31e0(0x4),'uABuf':'đą\x20Biometric\x20support:','vuKwC':function(_0x5124f4,_0xcfcfe3){return _0x5124f4===_0xcfcfe3;},'mxUjw':function(_0x34d6cf,_0x2b4b00){return _0x34d6cf===_0x2b4b00;},'pKriX':function(_0x4c1891,_0x49775a){return _0x4c1891===_0x49775a;},'tSvfC':_0x31e0(0x5),'MWPuW':'â\x20Error\x20checking\x20biometric\x20availability:'};try{if(_0x27c43a[_0x31e0(0x6)](_0x31e0(0x7),_0x27c43a[_0x31e0(0x8)])){const _0x5cedab=await Keychain[_0x31e0(0x9)]();return console['log'](_0x27c43a[_0x31e0(0xa)],_0x5cedab),_0x27c43a[_0x31e0(0xb)](_0x5cedab,Keychain[_0x31e0(0xc)]['FACE_ID'])||_0x5cedab===Keychain[_0x31e0(0xc)][_0x31e0(0xd)]||_0x27c43a[_0x31e0(0xe)](_0x5cedab,Keychain[_0x31e0(0xc)][_0x31e0(0xf)])||_0x27c43a['pKriX'](_0x5cedab,Keychain['BIOMETRY_TYPE'][_0x31e0(0x10)])||_0x27c43a['vuKwC'](_0x5cedab,Keychain['BIOMETRY_TYPE']['IRIS']);}else return _0x326323['log'](_0x27c43a['HXYKQ']),null;}catch(_0x4aecc3){return _0x27c43a[_0x31e0(0x6)](_0x27c43a[_0x31e0(0x11)],_0x27c43a[_0x31e0(0x11)])?(_0xb1c19d[_0x31e0(0x12)](_0x27c43a[_0x31e0(0x13)]),![]):(console['error'](_0x27c43a['MWPuW'],_0x4aecc3),![]);}};export const storePinWithBiometric=async _0x234a58=>{const _0x34ef29={'xeoMr':_0x31e0(0x14),'ClGus':_0x31e0(0x15),'QTnsc':_0x31e0(0x16),'ROJew':'â
\x20PIN\x20retrieved\x20successfully','DzuMz':_0x31e0(0x17),'xgYwA':_0x31e0(0x18),'kzldY':function(_0xd0a3b8){return _0xd0a3b8();},'HJztg':_0x31e0(0x19),'VOYJa':_0x31e0(0x1a),'CRaPF':function(_0x3c6c6d,_0x156128){return _0x3c6c6d===_0x156128;},'idfKC':_0x31e0(0x1b),'lUzEF':_0x31e0(0x1c),'PfifR':'android','TrRVD':_0x31e0(0x1d),'XOrqM':'â
\x20Face\x20ID\x20authentication\x20successful\x20-\x20PIN\x20stored\x20securely','KEyrD':_0x31e0(0x1e),'StcgT':_0x31e0(0x1f),'hzUUw':_0x31e0(0x20),'tyNnM':function(_0x5dc65e,_0xbd9578){return _0x5dc65e!==_0xbd9578;},'OKurK':function(_0x3a24ff,_0x37b394){return _0x3a24ff!==_0x37b394;},'kcPHW':function(_0x3aad32,_0xd3dbc6){return _0x3aad32!==_0xd3dbc6;},'IXzvu':'UserCancel','MjYQW':function(_0x2c63b5,_0x22d892){return _0x2c63b5===_0x22d892;},'cjkMg':_0x31e0(0x21),'JvSHU':function(_0x8d28ce,_0x38b3ca){return _0x8d28ce!==_0x38b3ca;},'mqfzs':function(_0x28944e,_0x514c5b){return _0x28944e!==_0x514c5b;},'ZBYhO':function(_0x305365,_0x5250b2){return _0x305365===_0x5250b2;},'xzsaf':'KZkxV','rfBfU':function(_0x415e92,_0x412d24){return _0x415e92!==_0x412d24;},'BYArt':'AuthenticationFailed','FZUZg':function(_0x53bd57,_0x4ea8a7){return _0x53bd57===_0x4ea8a7;},'sozXv':_0x31e0(0x22),'oSWYp':'mEsIC','rFVfp':_0x31e0(0x3),'nMmbd':function(_0x56e214,_0x35b954){return _0x56e214!==_0x35b954;},'tkqvD':_0x31e0(0x23),'kvtTf':function(_0x49f2d8,_0x387feb){return _0x49f2d8===_0x387feb;},'HCnRx':function(_0x39b4ad,_0x3e42f7){return _0x39b4ad===_0x3e42f7;},'JPDEV':_0x31e0(0x24)};try{if(_0x34ef29['DzuMz']===_0x34ef29[_0x31e0(0x25)])return _0x405510[_0x31e0(0x26)](_0x34ef29[_0x31e0(0x27)],_0x14ebcd),![];else{console[_0x31e0(0x12)](_0x31e0(0x28));const _0x24d336=await _0x34ef29[_0x31e0(0x29)](isBiometricAvailable);if(!_0x24d336)return console['error'](_0x34ef29[_0x31e0(0x2a)]),![];console[_0x31e0(0x12)](_0x34ef29['VOYJa']);const _0x275ef7={'accessControl':Keychain[_0x31e0(0x2b)][_0x31e0(0x2c)],'authenticationType':Keychain[_0x31e0(0x2d)][_0x31e0(0x2e)],'touchID':!![],'showModal':!![],'kLocalizedFallbackTitle':'',..._0x34ef29[_0x31e0(0x2f)](Platform['OS'],_0x34ef29[_0x31e0(0x30)])&&{'localizedPrompt':_0x31e0(0x31),'localizedCancel':_0x34ef29['lUzEF']},..._0x34ef29[_0x31e0(0x2f)](Platform['OS'],_0x34ef29[_0x31e0(0x32)])&&{'promptMessage':_0x34ef29['TrRVD'],'cancelButtonText':_0x34ef29[_0x31e0(0x33)]}};console[_0x31e0(0x12)](_0x31e0(0x34));const _0x280b72=await Keychain[_0x31e0(0x35)](PIN_USERNAME,_0x234a58,{'service':PIN_SERVICE_KEY,..._0x275ef7});return console[_0x31e0(0x12)](_0x34ef29[_0x31e0(0x36)]),console[_0x31e0(0x12)](_0x34ef29[_0x31e0(0x37)],_0x280b72),!![];}}catch(_0x56a8d8){if(_0x34ef29['CRaPF'](_0x34ef29[_0x31e0(0x38)],_0x34ef29[_0x31e0(0x39)]))return _0x8b6d7a[_0x31e0(0x12)](_0x34ef29[_0x31e0(0x3a)]),![];else{var _0x74ce89,_0xd90495,_0x5a5caf,_0x48319d;console[_0x31e0(0x26)](_0x31e0(0x3b),_0x56a8d8),console[_0x31e0(0x26)](_0x31e0(0x3c),{'message':_0x56a8d8[_0x31e0(0x3d)],'code':_0x56a8d8[_0x31e0(0x3e)],'domain':_0x56a8d8[_0x31e0(0x3f)],'userInfo':_0x56a8d8[_0x31e0(0x40)]});if(_0x56a8d8!==null&&_0x34ef29[_0x31e0(0x41)](_0x56a8d8,void 0x0)&&_0x34ef29[_0x31e0(0x42)](_0x74ce89=_0x56a8d8['message'],null)&&_0x34ef29[_0x31e0(0x43)](_0x74ce89,void 0x0)&&_0x74ce89[_0x31e0(0x44)](_0x34ef29['IXzvu'])||_0x34ef29[_0x31e0(0x45)](_0x34ef29[_0x31e0(0x45)](_0x56a8d8,null)||_0x34ef29['MjYQW'](_0x56a8d8,void 0x0)?void 0x0:_0x56a8d8[_0x31e0(0x3e)],-0x80))return console[_0x31e0(0x12)](_0x34ef29[_0x31e0(0x46)]),![];else{if(_0x34ef29[_0x31e0(0x47)](_0x56a8d8,null)&&_0x34ef29[_0x31e0(0x41)](_0x56a8d8,void 0x0)&&_0x34ef29[_0x31e0(0x48)](_0xd90495=_0x56a8d8['message'],null)&&_0x34ef29[_0x31e0(0x47)](_0xd90495,void 0x0)&&_0xd90495[_0x31e0(0x44)](_0x31e0(0x49))||_0x34ef29['CRaPF'](_0x34ef29[_0x31e0(0x2f)](_0x56a8d8,null)||_0x34ef29[_0x31e0(0x4a)](_0x56a8d8,void 0x0)?void 0x0:_0x56a8d8[_0x31e0(0x3e)],-0x6))return _0x34ef29[_0x31e0(0x47)](_0x34ef29[_0x31e0(0x4b)],'KZkxV')?(_0x1526b0['error'](_0x34ef29[_0x31e0(0x4c)],_0x546d8f),![]):(console['log'](_0x34ef29[_0x31e0(0x3a)]),![]);else{if(_0x56a8d8!==null&&_0x56a8d8!==void 0x0&&_0x34ef29[_0x31e0(0x4d)](_0x5a5caf=_0x56a8d8[_0x31e0(0x3d)],null)&&_0x34ef29[_0x31e0(0x4d)](_0x5a5caf,void 0x0)&&_0x5a5caf[_0x31e0(0x44)](_0x34ef29['BYArt'])||_0x34ef29['FZUZg'](_0x56a8d8===null||_0x34ef29[_0x31e0(0x45)](_0x56a8d8,void 0x0)?void 0x0:_0x56a8d8[_0x31e0(0x3e)],-0x1))return _0x34ef29[_0x31e0(0x43)](_0x34ef29['sozXv'],_0x34ef29[_0x31e0(0x4e)])?(console[_0x31e0(0x12)](_0x34ef29['rFVfp']),![]):(_0x3f34ab[_0x31e0(0x12)](_0x34ef29['ROJew']),_0x4f5bdd['password']);else{if(_0x34ef29[_0x31e0(0x4f)](_0x56a8d8,null)&&_0x34ef29['tyNnM'](_0x56a8d8,void 0x0)&&_0x34ef29[_0x31e0(0x42)](_0x48319d=_0x56a8d8[_0x31e0(0x3d)],null)&&_0x48319d!==void 0x0&&_0x48319d[_0x31e0(0x44)](_0x34ef29[_0x31e0(0x50)])||_0x34ef29[_0x31e0(0x51)](_0x34ef29['HCnRx'](_0x56a8d8,null)||_0x56a8d8===void 0x0?void 0x0:_0x56a8d8[_0x31e0(0x3e)],-0x8))return console[_0x31e0(0x12)](_0x31e0(0x52)),![];}}}return console[_0x31e0(0x26)](_0x34ef29['JPDEV'],_0x56a8d8[_0x31e0(0x3d)]),![];}}};export const retrievePinWithBiometric=async()=>{const _0x23d1b1={'aonRB':_0x31e0(0x52),'AuIvW':_0x31e0(0x21),'fOsFR':_0x31e0(0x53),'eRbuT':'â\x20Error\x20checking\x20biometric\x20availability:','dzVCX':function(_0x5135f1,_0x1fefa1){return _0x5135f1===_0x1fefa1;},'YkPlB':_0x31e0(0x54),'kDWXg':_0x31e0(0x55),'svTSE':function(_0x4b78a6,_0x38d966){return _0x4b78a6===_0x38d966;},'XJSmG':_0x31e0(0x56),'TsLpj':_0x31e0(0x57),'Jkiih':_0x31e0(0x58),'xJhcX':_0x31e0(0x59),'RCouR':_0x31e0(0x5a),'UyWAo':'â\x20Error\x20retrieving\x20PIN\x20with\x20biometric:','jvcOb':function(_0x336f50,_0x6cb586){return _0x336f50!==_0x6cb586;},'wWTmq':function(_0x4294d6,_0xbc2f69){return _0x4294d6!==_0xbc2f69;},'ZjOBX':_0x31e0(0x5b),'Evhxy':_0x31e0(0x5c),'UwOxd':function(_0x5c371c,_0x4384a1){return _0x5c371c!==_0x4384a1;},'kLNWO':_0x31e0(0x49),'kPQdx':_0x31e0(0x5d)};try{if(_0x23d1b1[_0x31e0(0x5e)](_0x31e0(0x54),_0x23d1b1['YkPlB'])){console[_0x31e0(0x12)](_0x23d1b1[_0x31e0(0x5f)]);const _0x1dfece=await Keychain[_0x31e0(0x60)]({'service':PIN_SERVICE_KEY});return _0x1dfece&&_0x1dfece[_0x31e0(0x61)]?_0x23d1b1[_0x31e0(0x62)](_0x23d1b1[_0x31e0(0x63)],_0x23d1b1[_0x31e0(0x64)])?(_0x4d4cb2['log'](_0x23d1b1[_0x31e0(0x65)]),![]):(console['log'](_0x23d1b1[_0x31e0(0x66)]),_0x1dfece['password']):(console['log'](_0x23d1b1[_0x31e0(0x67)]),null);}else return _0x51ee8a['log'](_0x23d1b1[_0x31e0(0x68)]),![];}catch(_0x285bd1){if(_0x23d1b1[_0x31e0(0x62)](_0x23d1b1[_0x31e0(0x69)],_0x23d1b1[_0x31e0(0x6a)]))return _0x24bcf2['log'](_0x23d1b1['fOsFR']),null;else{var _0x323472,_0x592cf6;console[_0x31e0(0x26)](_0x23d1b1[_0x31e0(0x6b)],_0x285bd1);if(_0x23d1b1[_0x31e0(0x6c)](_0x285bd1,null)&&_0x23d1b1['jvcOb'](_0x285bd1,void 0x0)&&_0x23d1b1['wWTmq'](_0x323472=_0x285bd1[_0x31e0(0x3d)],null)&&_0x23d1b1[_0x31e0(0x6c)](_0x323472,void 0x0)&&_0x323472[_0x31e0(0x44)](_0x23d1b1[_0x31e0(0x6d)]))return console[_0x31e0(0x12)](_0x23d1b1['Evhxy']),null;else{if(_0x23d1b1['UwOxd'](_0x285bd1,null)&&_0x23d1b1['jvcOb'](_0x285bd1,void 0x0)&&(_0x592cf6=_0x285bd1[_0x31e0(0x3d)])!==null&&_0x592cf6!==void 0x0&&_0x592cf6[_0x31e0(0x44)](_0x23d1b1['kLNWO']))return _0x23d1b1['jvcOb'](_0x23d1b1[_0x31e0(0x6e)],_0x31e0(0x5d))?(_0x18e310[_0x31e0(0x26)](_0x23d1b1[_0x31e0(0x6f)],_0x162a12),![]):(console[_0x31e0(0x12)]('đą\x20Biometric\x20not\x20available'),null);}return null;}}};export const isPinStored=async()=>{try{const _0x1ec558=await Keychain[_0x31e0(0x60)]({'service':PIN_SERVICE_KEY});return!!(_0x1ec558&&_0x1ec558['password']);}catch(_0x316113){return console[_0x31e0(0x26)](_0x31e0(0x14),_0x316113),![];}};export const removePinFromStorage=async()=>{const _0x3367e1={'jscQh':'â\x20Face\x20ID/Touch\x20ID\x20not\x20available\x20on\x20this\x20device','ZXKSC':_0x31e0(0x70),'HDioI':'CeCYA'};try{return console[_0x31e0(0x12)](_0x3367e1[_0x31e0(0x71)]),await Keychain[_0x31e0(0x72)]({'service':PIN_SERVICE_KEY}),console[_0x31e0(0x12)](_0x31e0(0x73)),!![];}catch(_0x5c429f){return _0x31e0(0x74)===_0x3367e1[_0x31e0(0x75)]?(_0x395f92[_0x31e0(0x26)](_0x3367e1['jscQh']),![]):(console[_0x31e0(0x26)](_0x31e0(0x16),_0x5c429f),![]);}};export const biometricPinService={'storePinWithBiometric':storePinWithBiometric,'retrievePinWithBiometric':retrievePinWithBiometric,'isPinStored':isPinStored,'removePinFromStorage':removePinFromStorage,'isBiometricAvailable':isBiometricAvailable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3589(){const _0x3df6e3=['mVrdy','niylM','â ī¸\x20[CHATGPT_EXTRACTOR]\x20Invalid\x20conversation:','â ī¸\x20[CHATGPT_EXTRACTOR]\x20No\x20memories\x20data\x20provided','No\x20valid\x20conversations\x20found\x20to\x20export.','default','đ\x20[CHATGPT_EXTRACTOR]\x20Initiating\x20conversation\x20export','â\x20[CHATGPT_EXTRACTOR]\x20Username\x20is\x20required','Error','Username\x20is\x20required\x20to\x20export\x20ChatGPT\x20conversations.','âšī¸\x20[CHATGPT_EXTRACTOR]\x20No\x20conversations\x20to\x20export\x20-\x20treating\x20as\x20success\x20(connected)','WVWbs','jwKIo','eVdHv','đĄ\x20[CHATGPT_EXTRACTOR]\x20Sending\x20to\x20backend...','â
\x20[CHATGPT_EXTRACTOR]\x20Export\x20completed\x20successfully','â\x20[CHATGPT_EXTRACTOR]\x20Backend\x20storage\x20failed:','Export\x20Failed','An\x20unknown\x20error\x20occurred\x20during\x20conversation\x20storage.','nFnOf','Export\x20Error','Failed\x20to\x20connect\x20to\x20the\x20conversation\x20storage\x20service.\x20Please\x20check\x20your\x20network\x20connection.','âšī¸\x20[CHATGPT_EXTRACTOR]\x20No\x20memories\x20to\x20store\x20-\x20treating\x20as\x20success','â\x20[CHATGPT_EXTRACTOR]\x20Unexpected\x20error\x20during\x20export:','log','đ¤\x20[CHATGPT_EXTRACTOR]\x20Username:','NQxMB','wXiof','OJhVY','error','alert','tAGjn','sHrET','rJvjG','Osaiw','length','IxzOw','filter','bsOGj','aedFy','conversation_id','title','isArray','user_messages','wihnD','warn','â ī¸\x20[CHATGPT_EXTRACTOR]\x20Filtered\x20out\x20','CdMSY','OSWzQ','ercGu','ySLjD','NUbki','GRknx','\x20invalid\x20conversations','dtEQz','EFqic','PjqGA','RqqNi','IeUZZ','data','qmuje','wvbpK','ePCFu','â\x20[CHATGPT_EXTRACTOR]\x20No\x20valid\x20conversations\x20after\x20filtering','IUOus','eJJvg','grhVf','NLkeY','đ§ \x20[CHATGPT_EXTRACTOR]\x20Storing\x20ChatGPT\x20memories...','items','rCTnf','KQXna','kJTHG','memory_entries','NMHIC','OgpQK','memories','\x20memory\x20entries,\x20','\x20memories','uLwSB','juKqz','FUCbn','memoriesCount','đ\x20[CHATGPT_EXTRACTOR]\x20Backend\x20stored\x20','â\x20[CHATGPT_EXTRACTOR]\x20Memories\x20storage\x20failed:'];_0x3589=function(){return _0x3df6e3;};return _0x3589();}function _0x3207(_0x358978,_0x3207aa){_0x358978=_0x358978-0x0;const _0x305b8a=_0x3589();let _0x14434e=_0x305b8a[_0x358978];return _0x14434e;}import{storeChatGPTConversations,storeChatGPTMemories}from'./chatGPTConversationService';import{Alert}from'react-native';export const useChatGPTConversationExtractor=()=>{const _0x1e36de={'bsOGj':_0x3207(0x0),'aedFy':_0x3207(0x1),'wihnD':_0x3207(0x2),'NUbki':'â\x20[CHATGPT_EXTRACTOR]\x20Unexpected\x20error\x20storing\x20memories:','EFqic':_0x3207(0x3),'OSWzQ':'Data\x20Error','IUOus':_0x3207(0x4),'rJvjG':_0x3207(0x5),'BMshY':_0x3207(0x6),'OBcUi':'đ\x20[CHATGPT_EXTRACTOR]\x20Conversations\x20to\x20send:','NQxMB':function(_0xf4bdc1,_0x39ac08){return _0xf4bdc1!==_0x39ac08;},'wXiof':'CWCDN','KfBcR':_0x3207(0x7),'tAGjn':_0x3207(0x8),'sHrET':_0x3207(0x9),'VBRKY':function(_0x410f76,_0x495655){return _0x410f76===_0x495655;},'IxzOw':_0x3207(0xa),'CdMSY':'â\x20[CHATGPT_EXTRACTOR]\x20No\x20valid\x20conversations\x20after\x20filtering','ercGu':function(_0x8923b2,_0x126837){return _0x8923b2===_0x126837;},'Zbjuu':_0x3207(0xb),'ySLjD':_0x3207(0xc),'GRknx':function(_0x31934f,_0x26db4f){return _0x31934f-_0x26db4f;},'RBpZk':_0x3207(0xd),'PjqGA':_0x3207(0xe),'RqqNi':function(_0x94418f,_0x590354,_0x52c058){return _0x94418f(_0x590354,_0x52c058);},'IeUZZ':_0x3207(0xf),'NLkeY':'đ\x20[CHATGPT_EXTRACTOR]\x20Backend\x20response:','qmuje':_0x3207(0x10),'KTjSn':_0x3207(0x11),'wvbpK':_0x3207(0x12),'ePCFu':_0x3207(0x13),'eJJvg':_0x3207(0x14),'grhVf':_0x3207(0x15),'rCTnf':function(_0x4da139,_0x37c4e8){return _0x4da139===_0x37c4e8;},'KQXna':function(_0x467065,_0x13729c){return _0x467065===_0x13729c;},'kJTHG':function(_0x549aad,_0x2bbc9f){return _0x549aad===_0x2bbc9f;},'NMHIC':function(_0xa0d4c7,_0x369e2d){return _0xa0d4c7===_0x369e2d;},'OgpQK':function(_0x47116a,_0x12d76a){return _0x47116a===_0x12d76a;},'uLwSB':function(_0x1cda12,_0x486f70){return _0x1cda12===_0x486f70;},'tTZtk':_0x3207(0x16),'FUCbn':function(_0xad422d,_0xff7fa6){return _0xad422d!==_0xff7fa6;}},_0x246b43=async(_0x3ff648,_0x1f9d11)=>{const _0x3c68bb={'Osaiw':_0x3207(0x17)};console[_0x3207(0x18)](_0x1e36de['BMshY']),console[_0x3207(0x18)](_0x3207(0x19),_0x3ff648),console[_0x3207(0x18)](_0x1e36de['OBcUi'],_0x1f9d11['length']);if(!_0x3ff648)return _0x1e36de[_0x3207(0x1a)](_0x1e36de[_0x3207(0x1b)],_0x3207(0x1c))?(console[_0x3207(0x1d)](_0x1e36de['KfBcR']),Alert[_0x3207(0x1e)](_0x1e36de[_0x3207(0x1f)],_0x1e36de[_0x3207(0x20)],[{'text':'OK','style':_0x1e36de[_0x3207(0x21)]}]),![]):(_0x21c509[_0x3207(0x1d)](_0x3c68bb[_0x3207(0x22)],_0xa58a0d),Alert[_0x3207(0x1e)](_0x3207(0x14),_0x3207(0x15),[{'text':'OK','style':_0x3207(0x5)}]),![]);if(!_0x1f9d11||_0x1e36de['VBRKY'](_0x1f9d11[_0x3207(0x23)],0x0))return console[_0x3207(0x18)](_0x1e36de[_0x3207(0x24)]),!![];const _0xb30f46=_0x1f9d11[_0x3207(0x25)](_0x368ff8=>{if(_0x1e36de[_0x3207(0x26)]!==_0x1e36de[_0x3207(0x27)]){const _0x2b7cb6=_0x368ff8[_0x3207(0x28)]&&_0x368ff8[_0x3207(0x29)]&&Array[_0x3207(0x2a)](_0x368ff8[_0x3207(0x2b)])&&_0x368ff8[_0x3207(0x2b)][_0x3207(0x23)]>0x0;return!_0x2b7cb6&&console['warn'](_0x1e36de[_0x3207(0x2c)],_0x368ff8),_0x2b7cb6;}else _0x1dc897[_0x3207(0x2d)](_0x3207(0x2e)+(_0x2d3380[_0x3207(0x23)]-_0x55ccee[_0x3207(0x23)])+'\x20invalid\x20conversations');});if(_0xb30f46[_0x3207(0x23)]===0x0)return console['error'](_0x1e36de[_0x3207(0x2f)]),Alert[_0x3207(0x1e)](_0x1e36de[_0x3207(0x30)],_0x1e36de['IUOus'],[{'text':'OK','style':_0x1e36de[_0x3207(0x21)]}]),![];if(_0xb30f46[_0x3207(0x23)]<_0x1f9d11['length']){if(_0x1e36de[_0x3207(0x31)](_0x1e36de['Zbjuu'],_0x1e36de[_0x3207(0x32)]))return _0x2b823d[_0x3207(0x1d)](_0x1e36de[_0x3207(0x33)],_0x41bbf5),![];else console[_0x3207(0x2d)](_0x3207(0x2e)+_0x1e36de[_0x3207(0x34)](_0x1f9d11[_0x3207(0x23)],_0xb30f46[_0x3207(0x23)])+_0x3207(0x35));}try{if(_0x1e36de[_0x3207(0x31)](_0x1e36de['RBpZk'],_0x3207(0x36)))return _0x432670[_0x3207(0x2d)](_0x1e36de[_0x3207(0x37)]),![];else{console[_0x3207(0x18)](_0x1e36de[_0x3207(0x38)]);const _0x4f0f74=await _0x1e36de[_0x3207(0x39)](storeChatGPTConversations,_0x3ff648,_0xb30f46);return _0x4f0f74['success']?(console[_0x3207(0x18)](_0x1e36de[_0x3207(0x3a)]),console[_0x3207(0x18)](_0x1e36de['NLkeY'],_0x4f0f74[_0x3207(0x3b)]),!![]):(console[_0x3207(0x1d)](_0x1e36de[_0x3207(0x3c)],_0x4f0f74['error']),Alert[_0x3207(0x1e)](_0x1e36de['KTjSn'],_0x4f0f74[_0x3207(0x1d)]||_0x1e36de[_0x3207(0x3d)],[{'text':'OK','style':_0x3207(0x5)}]),![]);}}catch(_0x5d3cde){return _0x1e36de['ePCFu']!==_0x1e36de[_0x3207(0x3e)]?(_0x65097b[_0x3207(0x1d)](_0x3207(0x3f)),Alert[_0x3207(0x1e)](_0x1e36de[_0x3207(0x30)],_0x1e36de[_0x3207(0x40)],[{'text':'OK','style':_0x1e36de[_0x3207(0x21)]}]),![]):(console[_0x3207(0x1d)](_0x3207(0x17),_0x5d3cde),Alert['alert'](_0x1e36de[_0x3207(0x41)],_0x1e36de[_0x3207(0x42)],[{'text':'OK','style':_0x1e36de[_0x3207(0x21)]}]),![]);}},_0xdc08f7=async _0x567036=>{const _0x7536b0={'juKqz':_0x1e36de[_0x3207(0x3a)],'BEaJA':_0x1e36de[_0x3207(0x43)]};var _0x5aca51,_0x281557,_0xbeea70;console[_0x3207(0x18)](_0x3207(0x44));if(!_0x567036)return console[_0x3207(0x2d)](_0x1e36de[_0x3207(0x37)]),![];const _0x430505=(_0x567036===null||_0x1e36de[_0x3207(0x31)](_0x567036,void 0x0)||(_0x5aca51=_0x567036[_0x3207(0x45)])===null||_0x1e36de['rCTnf'](_0x5aca51,void 0x0)?void 0x0:_0x5aca51[_0x3207(0x23)])||0x0,_0x4c8f4f=(_0x1e36de[_0x3207(0x46)](_0x567036,null)||_0x1e36de[_0x3207(0x47)](_0x567036,void 0x0)||_0x1e36de[_0x3207(0x48)](_0x281557=_0x567036[_0x3207(0x49)],null)||_0x1e36de[_0x3207(0x4a)](_0x281557,void 0x0)?void 0x0:_0x281557[_0x3207(0x23)])||0x0,_0x333df0=(_0x1e36de['KQXna'](_0x567036,null)||_0x1e36de[_0x3207(0x4b)](_0x567036,void 0x0)||_0x1e36de['kJTHG'](_0xbeea70=_0x567036[_0x3207(0x4c)],null)||_0x1e36de['uLwSB'](_0xbeea70,void 0x0)?void 0x0:_0xbeea70['length'])||0x0;console[_0x3207(0x18)]('đ\x20[CHATGPT_EXTRACTOR]\x20Found\x20'+_0x430505+'\x20memory\x20items,\x20'+_0x4c8f4f+_0x3207(0x4d)+_0x333df0+_0x3207(0x4e));if(_0x1e36de['kJTHG'](_0x430505,0x0)&&_0x4c8f4f===0x0&&_0x1e36de[_0x3207(0x4f)](_0x333df0,0x0))return'qAEsy'==='QbrTo'?(_0x212f67[_0x3207(0x18)](_0x7536b0[_0x3207(0x50)]),_0x59f4ce[_0x3207(0x18)](_0x7536b0['BEaJA'],_0x3d2cab[_0x3207(0x3b)]),!![]):(console[_0x3207(0x18)](_0x1e36de['tTZtk']),!![]);try{console['log']('đĄ\x20[CHATGPT_EXTRACTOR]\x20Sending\x20memories\x20to\x20backend...');const _0x3cc853=await storeChatGPTMemories(_0x567036);if(_0x3cc853['success']){var _0x115f25;return console['log']('â
\x20[CHATGPT_EXTRACTOR]\x20Memories\x20stored\x20successfully'),_0x1e36de[_0x3207(0x1a)](_0x115f25=_0x3cc853[_0x3207(0x3b)],null)&&_0x1e36de[_0x3207(0x51)](_0x115f25,void 0x0)&&_0x115f25[_0x3207(0x52)]&&console[_0x3207(0x18)](_0x3207(0x53)+_0x3cc853[_0x3207(0x3b)][_0x3207(0x52)]+_0x3207(0x4e)),!![];}else return console[_0x3207(0x1d)](_0x3207(0x54),_0x3cc853[_0x3207(0x1d)]),![];}catch(_0x1e106e){return console['error'](_0x1e36de['NUbki'],_0x1e106e),![];}};return{'initiateConversationExport':_0x246b43,'storeMemories':_0xdc08f7};};
|
|
1
|
+
import{storeChatGPTConversations,storeChatGPTMemories}from'./chatGPTConversationService';import{Alert}from'react-native';function _0x43fe(){const _0x54dd14=['Data\x20Error','No\x20valid\x20conversations\x20found\x20to\x20export.','â ī¸\x20[CHATGPT_EXTRACTOR]\x20Invalid\x20conversation:','đ\x20[CHATGPT_EXTRACTOR]\x20Initiating\x20conversation\x20export','đ¤\x20[CHATGPT_EXTRACTOR]\x20Username:','đ\x20[CHATGPT_EXTRACTOR]\x20Conversations\x20to\x20send:','grjWQ','UOQnZ','â\x20[CHATGPT_EXTRACTOR]\x20Username\x20is\x20required','Error','default','âšī¸\x20[CHATGPT_EXTRACTOR]\x20No\x20conversations\x20to\x20export\x20-\x20treating\x20as\x20success\x20(connected)','â\x20[CHATGPT_EXTRACTOR]\x20No\x20valid\x20conversations\x20after\x20filtering','Export\x20Failed','â\x20[CHATGPT_EXTRACTOR]\x20Unexpected\x20error\x20storing\x20memories:','âšī¸\x20[CHATGPT_EXTRACTOR]\x20No\x20memories\x20to\x20store\x20-\x20treating\x20as\x20success','â
\x20[CHATGPT_EXTRACTOR]\x20Memories\x20stored\x20successfully','â ī¸\x20[CHATGPT_EXTRACTOR]\x20No\x20memories\x20data\x20provided','lRUhH','đ§ \x20[CHATGPT_EXTRACTOR]\x20Storing\x20ChatGPT\x20memories...','HTwAB','oMpKq','đĄ\x20[CHATGPT_EXTRACTOR]\x20Sending\x20memories\x20to\x20backend...','hGKpX','totFG','HleqR','log','JNMJe','GUqgd','Jqsou','error','CyTfh','alert','ETPYC','LcGbV','SnXBw','txtiL','filter','title','isArray','user_messages','warn','NStpt','gdzaY','length','iXnlT','Oppiq','KDDwS','GDxsE','\x20invalid\x20conversations','đĄ\x20[CHATGPT_EXTRACTOR]\x20Sending\x20to\x20backend...','FheNP','success','đ\x20[CHATGPT_EXTRACTOR]\x20Backend\x20response:','data','â\x20[CHATGPT_EXTRACTOR]\x20Backend\x20storage\x20failed:','wwhKJ','An\x20unknown\x20error\x20occurred\x20during\x20conversation\x20storage.','â\x20[CHATGPT_EXTRACTOR]\x20Unexpected\x20error\x20during\x20export:','vPVCb','gYnsM','qMhoU','Export\x20Error','Fdpkl','vjkfM','yVRlS','bCOvk','vPVkb','YdNbb','items','JjUWr','memory_entries','UEiKn','BcZsC','đ\x20[CHATGPT_EXTRACTOR]\x20Found\x20','\x20memory\x20items,\x20','\x20memory\x20entries,\x20','\x20memories','SQhZx','EniVR','XgPfs','ClJNo','qZuSt','HJoTE','dCtzH','memoriesCount','SiHqT','NGgMQ','đ\x20[CHATGPT_EXTRACTOR]\x20Backend\x20stored\x20','peYTt','aAMyj','lBTLo','ZaUPI','TrMcr','TnRWs','mkNAX','wCLIt','â ī¸\x20[CHATGPT_EXTRACTOR]\x20Filtered\x20out\x20'];_0x43fe=function(){return _0x54dd14;};return _0x43fe();}function _0xe4e8(_0x43fe90,_0xe4e897){_0x43fe90=_0x43fe90-0x0;const _0x2acb40=_0x43fe();let _0x538d90=_0x2acb40[_0x43fe90];return _0x538d90;}export const useChatGPTConversationExtractor=()=>{const _0x2c11c8={'totFG':_0xe4e8(0x0),'Oppiq':_0xe4e8(0x1),'HleqR':_0xe4e8(0x2),'gKoLW':_0xe4e8(0x3),'igRBl':_0xe4e8(0x4),'JNMJe':_0xe4e8(0x5),'GUqgd':_0xe4e8(0x6),'Jqsou':_0xe4e8(0x7),'CyTfh':_0xe4e8(0x8),'ETPYC':_0xe4e8(0x9),'HRlHk':'Username\x20is\x20required\x20to\x20export\x20ChatGPT\x20conversations.','KDDwS':_0xe4e8(0xa),'txtiL':_0xe4e8(0xb),'gdzaY':function(_0x3b50ff,_0x118a93){return _0x3b50ff===_0x118a93;},'iXnlT':_0xe4e8(0xc),'xudJV':function(_0x5318ba,_0x4ded33){return _0x5318ba<_0x4ded33;},'GDxsE':function(_0xe4980c,_0xbade1d){return _0xe4980c-_0xbade1d;},'FheNP':function(_0x3c2f89,_0x5e8268,_0x144ead){return _0x3c2f89(_0x5e8268,_0x144ead);},'wwhKJ':_0xe4e8(0xd),'esqhj':'Export\x20Error','vPVCb':'Failed\x20to\x20connect\x20to\x20the\x20conversation\x20storage\x20service.\x20Please\x20check\x20your\x20network\x20connection.','qamzi':_0xe4e8(0xe),'EniVR':_0xe4e8(0xf),'RxONA':_0xe4e8(0x10),'gYnsM':function(_0x107d2d,_0x5e6feb){return _0x107d2d!==_0x5e6feb;},'qMhoU':_0xe4e8(0x11),'Fdpkl':function(_0x376a56,_0x406836){return _0x376a56!==_0x406836;},'vjkfM':_0xe4e8(0x12),'yVRlS':_0xe4e8(0x13),'bCOvk':_0xe4e8(0x14),'RJJgw':'VkBdc','vPVkb':function(_0x544751,_0x3d7d08){return _0x544751===_0x3d7d08;},'YdNbb':function(_0x39f8ac,_0x16626f){return _0x39f8ac===_0x16626f;},'JjUWr':function(_0x20bdec,_0x3e49b8){return _0x20bdec===_0x3e49b8;},'UEiKn':function(_0x5d50cb,_0x14e063){return _0x5d50cb===_0x14e063;},'BcZsC':function(_0x1951ef,_0x508411){return _0x1951ef===_0x508411;},'GPWLO':function(_0x475ff6,_0x42e7b2){return _0x475ff6===_0x42e7b2;},'SQhZx':function(_0x348a9e,_0x240197){return _0x348a9e===_0x240197;},'AxXyq':function(_0x1c6ac2,_0x32ccd1){return _0x1c6ac2!==_0x32ccd1;},'XgPfs':_0xe4e8(0x15),'qZuSt':_0xe4e8(0x16),'dCtzH':function(_0x41045e,_0x3bca9d){return _0x41045e!==_0x3bca9d;},'peYTt':_0xe4e8(0x17),'aAMyj':'â\x20[CHATGPT_EXTRACTOR]\x20Memories\x20storage\x20failed:','mkNAX':function(_0x35029d,_0x56176a){return _0x35029d===_0x56176a;},'wCLIt':'nJxaN'},_0x38f837=async(_0x2530f2,_0x5ab1c1)=>{const _0x414afe={'vTcvm':_0x2c11c8[_0xe4e8(0x18)],'LcGbV':_0x2c11c8['Oppiq'],'SnXBw':_0xe4e8(0xa),'NStpt':_0x2c11c8[_0xe4e8(0x19)]};console[_0xe4e8(0x1a)](_0x2c11c8['gKoLW']),console['log'](_0x2c11c8['igRBl'],_0x2530f2),console[_0xe4e8(0x1a)](_0x2c11c8[_0xe4e8(0x1b)],_0x5ab1c1['length']);if(!_0x2530f2)return _0x2c11c8[_0xe4e8(0x1c)]!==_0x2c11c8[_0xe4e8(0x1d)]?(console[_0xe4e8(0x1e)](_0x2c11c8[_0xe4e8(0x1f)]),Alert[_0xe4e8(0x20)](_0x2c11c8[_0xe4e8(0x21)],_0x2c11c8['HRlHk'],[{'text':'OK','style':_0x2c11c8['KDDwS']}]),![]):(_0x25473f[_0xe4e8(0x1e)](_0xe4e8(0xc)),Alert[_0xe4e8(0x20)](_0x414afe['vTcvm'],_0x414afe[_0xe4e8(0x22)],[{'text':'OK','style':_0x414afe[_0xe4e8(0x23)]}]),![]);if(!_0x5ab1c1||_0x5ab1c1['length']===0x0)return console['log'](_0x2c11c8[_0xe4e8(0x24)]),!![];const _0x3bdfc1=_0x5ab1c1[_0xe4e8(0x25)](_0x35c982=>{const _0x587902=_0x35c982['conversation_id']&&_0x35c982[_0xe4e8(0x26)]&&Array[_0xe4e8(0x27)](_0x35c982[_0xe4e8(0x28)])&&_0x35c982[_0xe4e8(0x28)]['length']>0x0;return!_0x587902&&console[_0xe4e8(0x29)](_0x414afe[_0xe4e8(0x2a)],_0x35c982),_0x587902;});if(_0x2c11c8[_0xe4e8(0x2b)](_0x3bdfc1[_0xe4e8(0x2c)],0x0))return console[_0xe4e8(0x1e)](_0x2c11c8[_0xe4e8(0x2d)]),Alert[_0xe4e8(0x20)](_0x2c11c8[_0xe4e8(0x18)],_0x2c11c8[_0xe4e8(0x2e)],[{'text':'OK','style':_0x2c11c8[_0xe4e8(0x2f)]}]),![];_0x2c11c8['xudJV'](_0x3bdfc1[_0xe4e8(0x2c)],_0x5ab1c1[_0xe4e8(0x2c)])&&console['warn']('â ī¸\x20[CHATGPT_EXTRACTOR]\x20Filtered\x20out\x20'+_0x2c11c8[_0xe4e8(0x30)](_0x5ab1c1['length'],_0x3bdfc1['length'])+_0xe4e8(0x31));try{console[_0xe4e8(0x1a)](_0xe4e8(0x32));const _0x3e96c2=await _0x2c11c8[_0xe4e8(0x33)](storeChatGPTConversations,_0x2530f2,_0x3bdfc1);return _0x3e96c2[_0xe4e8(0x34)]?(console[_0xe4e8(0x1a)]('â
\x20[CHATGPT_EXTRACTOR]\x20Export\x20completed\x20successfully'),console[_0xe4e8(0x1a)](_0xe4e8(0x35),_0x3e96c2[_0xe4e8(0x36)]),!![]):(console['error'](_0xe4e8(0x37),_0x3e96c2[_0xe4e8(0x1e)]),Alert[_0xe4e8(0x20)](_0x2c11c8[_0xe4e8(0x38)],_0x3e96c2['error']||_0xe4e8(0x39),[{'text':'OK','style':_0x2c11c8[_0xe4e8(0x2f)]}]),![]);}catch(_0x4e1a1a){return console['error'](_0xe4e8(0x3a),_0x4e1a1a),Alert['alert'](_0x2c11c8['esqhj'],_0x2c11c8[_0xe4e8(0x3b)],[{'text':'OK','style':_0x2c11c8[_0xe4e8(0x2f)]}]),![];}},_0x1cac9d=async _0x6ed3b9=>{const _0xd1d4b7={'SiHqT':_0x2c11c8['RxONA'],'NGgMQ':function(_0x25ea89,_0x21a341){return _0x2c11c8[_0xe4e8(0x3c)](_0x25ea89,_0x21a341);},'lBTLo':_0x2c11c8[_0xe4e8(0x3d)],'ZaUPI':_0xe4e8(0x3a),'TrMcr':_0xe4e8(0x3e),'TnRWs':'Failed\x20to\x20connect\x20to\x20the\x20conversation\x20storage\x20service.\x20Please\x20check\x20your\x20network\x20connection.'};if(_0x2c11c8[_0xe4e8(0x3f)](_0x2c11c8[_0xe4e8(0x40)],_0x2c11c8[_0xe4e8(0x40)]))return _0x516829[_0xe4e8(0x1e)](_0x2c11c8['qamzi'],_0x21895d),![];else{var _0x391f33,_0x35c81b,_0x36d924;console[_0xe4e8(0x1a)](_0x2c11c8[_0xe4e8(0x41)]);if(!_0x6ed3b9)return _0x2c11c8['Fdpkl'](_0x2c11c8[_0xe4e8(0x42)],_0x2c11c8['RJJgw'])?(console['warn'](_0x2c11c8['qMhoU']),![]):(_0x4aae10['log'](_0x2c11c8['EniVR']),!![]);const _0x9502c4=(_0x2c11c8[_0xe4e8(0x43)](_0x6ed3b9,null)||_0x2c11c8['YdNbb'](_0x6ed3b9,void 0x0)||_0x2c11c8[_0xe4e8(0x44)](_0x391f33=_0x6ed3b9[_0xe4e8(0x45)],null)||_0x2c11c8['YdNbb'](_0x391f33,void 0x0)?void 0x0:_0x391f33[_0xe4e8(0x2c)])||0x0,_0x5c18e0=(_0x2c11c8[_0xe4e8(0x46)](_0x6ed3b9,null)||_0x2c11c8['YdNbb'](_0x6ed3b9,void 0x0)||(_0x35c81b=_0x6ed3b9[_0xe4e8(0x47)])===null||_0x2c11c8[_0xe4e8(0x48)](_0x35c81b,void 0x0)?void 0x0:_0x35c81b[_0xe4e8(0x2c)])||0x0,_0x5e552f=(_0x2c11c8[_0xe4e8(0x49)](_0x6ed3b9,null)||_0x6ed3b9===void 0x0||_0x2c11c8[_0xe4e8(0x49)](_0x36d924=_0x6ed3b9['memories'],null)||_0x36d924===void 0x0?void 0x0:_0x36d924[_0xe4e8(0x2c)])||0x0;console[_0xe4e8(0x1a)](_0xe4e8(0x4a)+_0x9502c4+_0xe4e8(0x4b)+_0x5c18e0+_0xe4e8(0x4c)+_0x5e552f+_0xe4e8(0x4d));if(_0x2c11c8['GPWLO'](_0x9502c4,0x0)&&_0x5c18e0===0x0&&_0x2c11c8[_0xe4e8(0x4e)](_0x5e552f,0x0))return console['log'](_0x2c11c8[_0xe4e8(0x4f)]),!![];try{if(_0x2c11c8['AxXyq'](_0x2c11c8[_0xe4e8(0x50)],_0xe4e8(0x51))){console[_0xe4e8(0x1a)](_0x2c11c8[_0xe4e8(0x52)]);const _0x23fa26=await storeChatGPTMemories(_0x6ed3b9);if(_0x23fa26[_0xe4e8(0x34)]){if(_0xe4e8(0x53)===_0xe4e8(0x53)){var _0x5d9e9b;return console[_0xe4e8(0x1a)](_0x2c11c8['RxONA']),_0x2c11c8[_0xe4e8(0x54)](_0x5d9e9b=_0x23fa26[_0xe4e8(0x36)],null)&&_0x5d9e9b!==void 0x0&&_0x5d9e9b[_0xe4e8(0x55)]&&console[_0xe4e8(0x1a)]('đ\x20[CHATGPT_EXTRACTOR]\x20Backend\x20stored\x20'+_0x23fa26['data'][_0xe4e8(0x55)]+'\x20memories'),!![];}else{var _0x1b7099;return _0xa5073f['log'](_0xd1d4b7[_0xe4e8(0x56)]),_0xd1d4b7[_0xe4e8(0x57)](_0x1b7099=_0x290a40['data'],null)&&_0x1b7099!==void 0x0&&_0x1b7099[_0xe4e8(0x55)]&&_0xe7abb7[_0xe4e8(0x1a)](_0xe4e8(0x58)+_0x127e3f[_0xe4e8(0x36)][_0xe4e8(0x55)]+_0xe4e8(0x4d)),!![];}}else return _0x2c11c8['Fdpkl'](_0x2c11c8[_0xe4e8(0x59)],'xSZAo')?(console[_0xe4e8(0x1e)](_0x2c11c8[_0xe4e8(0x5a)],_0x23fa26[_0xe4e8(0x1e)]),![]):(_0x162e1b[_0xe4e8(0x29)](_0xd1d4b7[_0xe4e8(0x5b)]),![]);}else return _0x399f95['error'](_0xd1d4b7[_0xe4e8(0x5c)],_0x506811),Alert['alert'](_0xd1d4b7[_0xe4e8(0x5d)],_0xd1d4b7[_0xe4e8(0x5e)],[{'text':'OK','style':_0xe4e8(0xa)}]),![];}catch(_0x4c8c2d){if(_0x2c11c8[_0xe4e8(0x5f)]('nJxaN',_0x2c11c8[_0xe4e8(0x60)]))return console['error'](_0xe4e8(0xe),_0x4c8c2d),![];else _0x1cb309[_0xe4e8(0x29)](_0xe4e8(0x61)+(_0x28818a[_0xe4e8(0x2c)]-_0x401cdd[_0xe4e8(0x2c)])+'\x20invalid\x20conversations');}}};return{'initiateConversationExport':_0x38f837,'storeMemories':_0x1cac9d};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{API_CONFIG}from'../config/api';function _0x1c36(_0x4a8eac,_0x1c3659){_0x4a8eac=_0x4a8eac-0x0;const _0x39588f=_0x4a8e();let _0xa16df5=_0x39588f[_0x4a8eac];return _0xa16df5;}import AsyncStorage from'@react-native-async-storage/async-storage';import{Platform}from'react-native';function _0x4a8e(){const _0x5459d5=['â\x20[CHATGPT_SERVICE]\x20No\x20auth\x20token\x20found\x20in\x20any\x20storage\x20key','Authentication\x20token\x20not\x20found.\x20Please\x20log\x20in\x20again.','â\x20[CHATGPT_SERVICE]\x20Memories\x20network\x20error:','Invalid\x20input:\x20userId\x20or\x20conversations\x20missing.','đ\x20[CHATGPT_SERVICE]\x20Storing\x20ChatGPT\x20conversations\x20for:','đ\x20[CHATGPT_SERVICE]\x20Number\x20of\x20conversations:','đ\x20[CHATGPT_SERVICE]\x20Total\x20messages:','QLXrJ','â\x20[CHATGPT_SERVICE]\x20Invalid\x20input','aIHPn','onairos_jwt_token','enoch_token','đ\x20[CHATGPT_SERVICE]\x20Auth\x20token\x20found\x20for\x20conversations','ios','iPhone','Android','zTXYo','â\x20[CHATGPT_SERVICE]\x20Network\x20error:','log','FBHwp','BOMca','length','fSrhK','tmLEG','wGErw','oxMei','error','ckmYM','cGcMe','qFhwh','USAEH','message','MYygE','QgGSZ','getItem','JklcM','EGekg','MWsjz','DUJhq','QPBAo','XUGqF','qFhKw','kJuMg','TObHw','kiveF','bqIdC','now','user_messages','conversation_id','-msg-','user','toISOString','title','floor','ygYke','conversation','đĄ\x20[CHATGPT_SERVICE]\x20Sending\x20conversation\x20','abbIe','BASE_URL','/llm-data/store','Bearer\x20','OnairosSDK/1.0.0\x20(','stringify','json','RzUyA','ACNbi','â
\x20[CHATGPT_SERVICE]\x20Sent\x20conversation\x20','warn','â ī¸\x20[CHATGPT_SERVICE]\x20Failed\x20conversation\x20','status','â ī¸\x20[CHATGPT_SERVICE]\x20Network\x20error\x20for\x20conversation\x20','aIZeb','HXmIw','â ī¸\x20[CHATGPT_SERVICE]\x20Memories\x20backend\x20returned\x20status:\x20','PTbGW','đ\x20[CHATGPT_SERVICE]\x20Complete:\x20','\x20success,\x20','\x20failed','tufUf','Stored\x20','\x20of\x20','\x20conversations','\x20errors)','đ§ \x20[CHATGPT_SERVICE]\x20Storing\x20ChatGPT\x20memories...','Invalid\x20input:\x20memoriesData\x20missing.','1.0.0','mobile-chatgpt','2|4|3|0|1','Memories\x20stored\x20successfully','â
\x20[CHATGPT_SERVICE]\x20Successfully\x20sent\x20memories\x20to\x20backend','Unknown\x20error','Fcwnu','nSxtH','uPZnj','Ncvox','memory_entries','XySAX','đ\x20[CHATGPT_SERVICE]\x20Found\x20','\x20items,\x20','\x20entries,\x20','\x20memories\x20(total:\x20','QDvEz','Wgdoh','xQIBB','OVzOi','UdgLG','QhJEV','tXzSs','eCMVl','keys','NbRPr','đĄ\x20[CHATGPT_SERVICE]\x20Sending\x20memories\x20to\x20backend...','đ\x20[CHATGPT_SERVICE]\x20URL:\x20','/llm-data/store-memories','join','đĻ\x20[CHATGPT_SERVICE]\x20Raw\x20response\x20sent\x20as-is\x20(no\x20transformation)','OnairosSDK/','gWLVC','data','oTcnA','đ\x20[CHATGPT_SERVICE]\x20Stored\x20','memoriesCount','zAnLM','đ\x20[CHATGPT_SERVICE]\x20Backend\x20response:\x20','KSvIv','â ī¸\x20[CHATGPT_SERVICE]\x20Error:\x20','nIAKc','HTTP\x20','BVosw','OxHrW','Network\x20error.\x20Please\x20check\x20your\x20connection.'];_0x4a8e=function(){return _0x5459d5;};return _0x4a8e();}export const storeChatGPTConversations=async(_0x16c05a,_0x1997ea)=>{const _0x1f5ce4={'cGcMe':_0x1c36(0x0),'qFhwh':_0x1c36(0x1),'RGrMO':_0x1c36(0x2),'MYygE':'Network\x20error.\x20Please\x20check\x20your\x20connection.','ACNbi':_0x1c36(0x3),'PTbGW':'Unknown\x20error','FBHwp':_0x1c36(0x4),'BOMca':_0x1c36(0x5),'fSrhK':_0x1c36(0x6),'tmLEG':function(_0x1c6d3b,_0x77097a){return _0x1c6d3b||_0x77097a;},'wGErw':function(_0x4a50a1,_0x4b4a72){return _0x4a50a1===_0x4b4a72;},'oxMei':_0x1c36(0x7),'ckmYM':_0x1c36(0x8),'USAEH':_0x1c36(0x9),'QgGSZ':_0x1c36(0xa),'JklcM':_0x1c36(0xb),'EGekg':'auth_token','MWsjz':_0x1c36(0xc),'DUJhq':'1.0.0','QPBAo':function(_0x3486fd,_0x40aaec){return _0x3486fd===_0x40aaec;},'XUGqF':_0x1c36(0xd),'qFhKw':'17.0','kJuMg':function(_0x3da0cf,_0x43eb0d){return _0x3da0cf===_0x43eb0d;},'TObHw':_0x1c36(0xe),'kiveF':_0x1c36(0xf),'zkqrB':function(_0x168150,_0x50e991){return _0x168150!==_0x50e991;},'JUagQ':_0x1c36(0x10),'ygYke':'mobile-chatgpt','aIZeb':function(_0x242e5c,_0x5be05a){return _0x242e5c+_0x5be05a;},'abbIe':function(_0x46b78b,_0x374bbd,_0x3201cf){return _0x46b78b(_0x374bbd,_0x3201cf);},'IXjfm':'RzUyA','HXmIw':function(_0x26b5f8,_0x419667){return _0x26b5f8<_0x419667;},'wsfiO':function(_0x1a608c,_0x2096a6){return _0x1a608c-_0x2096a6;},'tufUf':function(_0x283305,_0x1d3708){return _0x283305>_0x1d3708;},'lHMAm':_0x1c36(0x11)};console[_0x1c36(0x12)](_0x1f5ce4[_0x1c36(0x13)],_0x16c05a),console[_0x1c36(0x12)](_0x1f5ce4[_0x1c36(0x14)],_0x1997ea[_0x1c36(0x15)]),console[_0x1c36(0x12)](_0x1f5ce4[_0x1c36(0x16)],_0x1997ea['reduce']((_0x555ebc,_0x695902)=>_0x555ebc+_0x695902['user_messages'][_0x1c36(0x15)],0x0));if(_0x1f5ce4[_0x1c36(0x17)](!_0x16c05a,!_0x1997ea)||_0x1f5ce4[_0x1c36(0x18)](_0x1997ea[_0x1c36(0x15)],0x0))return _0x1f5ce4[_0x1c36(0x19)]===_0x1c36(0x7)?(console[_0x1c36(0x1a)](_0x1f5ce4[_0x1c36(0x1b)]),{'success':![],'error':_0x1f5ce4['ACNbi']}):(_0x2487fb[_0x1c36(0x1a)](_0x1f5ce4[_0x1c36(0x1c)]),{'success':![],'error':_0x1f5ce4[_0x1c36(0x1d)]});try{if(_0x1f5ce4[_0x1c36(0x1e)]==='eWSZk')return _0x4a9ec1['error'](_0x1f5ce4['RGrMO'],_0x89e5a6),{'success':![],'error':_0x17377e[_0x1c36(0x1f)]||_0x1f5ce4[_0x1c36(0x20)]};else{const _0x34c4c0=await AsyncStorage['getItem'](_0x1f5ce4[_0x1c36(0x21)])||await AsyncStorage[_0x1c36(0x22)](_0x1f5ce4[_0x1c36(0x23)])||await AsyncStorage['getItem'](_0x1f5ce4[_0x1c36(0x24)]);if(!_0x34c4c0)return console['error'](_0x1f5ce4['cGcMe']),{'success':![],'error':_0x1f5ce4[_0x1c36(0x1d)]};console[_0x1c36(0x12)](_0x1f5ce4[_0x1c36(0x25)]);const _0x4af91f={'platform':Platform['OS'],'appVersion':_0x1f5ce4[_0x1c36(0x26)],'osVersion':_0x1f5ce4[_0x1c36(0x27)](Platform['OS'],_0x1f5ce4[_0x1c36(0x28)])?_0x1f5ce4[_0x1c36(0x29)]:Platform['OS'],'deviceModel':_0x1f5ce4[_0x1c36(0x2a)](Platform['OS'],_0x1f5ce4[_0x1c36(0x28)])?_0x1f5ce4[_0x1c36(0x2b)]:_0x1f5ce4[_0x1c36(0x2c)],'isOfflineSync':![]};let _0xf782c1=0x0,_0x204931=0x0;for(let _0x4fedb7=0x0;_0x4fedb7<_0x1997ea[_0x1c36(0x15)];_0x4fedb7++){if(_0x1f5ce4['zkqrB'](_0x1f5ce4['JUagQ'],_0x1c36(0x2d))){const _0xc0d440=_0x1997ea[_0x4fedb7],_0x1772b7=Date[_0x1c36(0x2e)](),_0x14028a=_0xc0d440[_0x1c36(0x2f)]['map']((_0x3b4dbc,_0x43727e)=>({'id':_0xc0d440[_0x1c36(0x30)]+_0x1c36(0x31)+_0x43727e,'role':_0x1c36(0x32),'content':_0x3b4dbc,'timestamp':new Date(_0x1772b7-(_0xc0d440[_0x1c36(0x2f)]['length']-_0x43727e)*0x3e8)[_0x1c36(0x33)](),'metadata':{}})),_0x54c53a={'conversationId':_0xc0d440[_0x1c36(0x30)],'messages':_0x14028a,'context':{'title':_0xc0d440[_0x1c36(0x34)],'create_time':Math[_0x1c36(0x35)](_0x1772b7/0x3e8),'update_time':Math['floor'](_0x1772b7/0x3e8)},'mobileMetadata':_0x4af91f},_0x12d0c8={'platform':_0x1f5ce4[_0x1c36(0x36)],'conversationData':_0x54c53a,'memoryType':_0x1c36(0x37)};console[_0x1c36(0x12)](_0x1c36(0x38)+_0x1f5ce4['aIZeb'](_0x4fedb7,0x1)+'/'+_0x1997ea[_0x1c36(0x15)]+':\x20'+_0xc0d440['title']);try{const _0x913f85=await _0x1f5ce4[_0x1c36(0x39)](fetch,API_CONFIG[_0x1c36(0x3a)]+_0x1c36(0x3b),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x1c36(0x3c)+_0x34c4c0,'User-Agent':_0x1c36(0x3d)+Platform['OS']+')'},'body':JSON[_0x1c36(0x3e)](_0x12d0c8)}),_0x3bef07=await _0x913f85[_0x1c36(0x3f)]();if(_0x913f85['ok']){if(_0x1c36(0x40)!==_0x1f5ce4['IXjfm'])return _0x5c72ac[_0x1c36(0x1a)]('â\x20[CHATGPT_SERVICE]\x20Invalid\x20input'),{'success':![],'error':_0x1f5ce4[_0x1c36(0x41)]};else console[_0x1c36(0x12)](_0x1c36(0x42)+(_0x4fedb7+0x1)+'/'+_0x1997ea['length']),_0xf782c1++;}else console[_0x1c36(0x43)](_0x1c36(0x44)+(_0x4fedb7+0x1)+'/'+_0x1997ea['length']+':',_0x3bef07[_0x1c36(0x1a)]||_0x913f85[_0x1c36(0x45)]),_0x204931++;}catch(_0x3a6991){console[_0x1c36(0x43)](_0x1c36(0x46)+_0x1f5ce4[_0x1c36(0x47)](_0x4fedb7,0x1)+':',_0x3a6991),_0x204931++;}_0x1f5ce4[_0x1c36(0x48)](_0x4fedb7,_0x1f5ce4['wsfiO'](_0x1997ea[_0x1c36(0x15)],0x1))&&await new Promise(_0x1deb82=>setTimeout(_0x1deb82,0x12c));}else return _0xd8257d[_0x1c36(0x43)](_0x1c36(0x49)+_0x42a9da[_0x1c36(0x45)]),_0x9d0e70[_0x1c36(0x43)]('â ī¸\x20[CHATGPT_SERVICE]\x20Error:\x20'+(_0x5d7245[_0x1c36(0x1a)]||_0x1f5ce4[_0x1c36(0x4a)])),{'success':![],'error':_0x535b24[_0x1c36(0x1a)]||'HTTP\x20'+_0x31cbd4[_0x1c36(0x45)]};}return console['log'](_0x1c36(0x4b)+_0xf782c1+_0x1c36(0x4c)+_0x204931+_0x1c36(0x4d)),_0x1f5ce4[_0x1c36(0x4e)](_0xf782c1,0x0)?{'success':!![],'message':_0x1c36(0x4f)+_0xf782c1+_0x1c36(0x50)+_0x1997ea[_0x1c36(0x15)]+_0x1c36(0x51)}:{'success':![],'error':'Failed\x20to\x20store\x20conversations\x20('+_0x204931+_0x1c36(0x52)};}}catch(_0x573730){return console['error'](_0x1f5ce4['lHMAm'],_0x573730),{'success':![],'error':_0x573730[_0x1c36(0x1f)]||_0x1f5ce4['MYygE']};}};export const storeChatGPTMemories=async _0x521d66=>{const _0x2566bc={'QhJEV':function(_0x433285,_0x124460){return _0x433285+_0x124460;},'Fcwnu':_0x1c36(0x53),'nSxtH':function(_0x303ccd,_0x6e93f7){return _0x303ccd===_0x6e93f7;},'XySAX':function(_0x52d41c,_0x5e02ba){return _0x52d41c===_0x5e02ba;},'uPZnj':function(_0x4044c1,_0x10b890){return _0x4044c1===_0x10b890;},'BVosw':function(_0x126e7f,_0x463476){return _0x126e7f===_0x463476;},'Ncvox':function(_0x2532df,_0x3d9cd5){return _0x2532df===_0x3d9cd5;},'KNsnV':function(_0x361910,_0xf4cb18){return _0x361910+_0xf4cb18;},'QDvEz':_0x1c36(0x54),'Wgdoh':_0x1c36(0xa),'kNcJH':function(_0xb7e0c4,_0x20553e){return _0xb7e0c4===_0x20553e;},'OVzOi':_0x1c36(0x0),'UdgLG':_0x1c36(0x1),'unwPU':'đ\x20[CHATGPT_SERVICE]\x20Auth\x20token\x20found\x20for\x20memories','tXzSs':_0x1c36(0x55),'eCMVl':_0x1c36(0x56),'NbRPr':function(_0x52ab79,_0x2ade66){return _0x52ab79||_0x2ade66;},'qTtwG':function(_0x11590d,_0x2c5362,_0x4b3ae1){return _0x11590d(_0x2c5362,_0x4b3ae1);},'gWLVC':_0x1c36(0x57),'oTcnA':function(_0x21e157,_0x4cdcab){return _0x21e157!==_0x4cdcab;},'zAnLM':_0x1c36(0x58),'KSvIv':_0x1c36(0x59),'nIAKc':_0x1c36(0x5a),'emnsF':'fjKiD','OxHrW':'pzCrg','CkICX':_0x1c36(0x2)};var _0x48d176,_0x17b1aa,_0x2ce644;console['log'](_0x2566bc[_0x1c36(0x5b)]);const _0x458356=(_0x521d66===null||_0x2566bc[_0x1c36(0x5c)](_0x521d66,void 0x0)||_0x2566bc['XySAX'](_0x48d176=_0x521d66['items'],null)||_0x2566bc[_0x1c36(0x5d)](_0x48d176,void 0x0)?void 0x0:_0x48d176[_0x1c36(0x15)])||0x0,_0x29fea7=(_0x2566bc['uPZnj'](_0x521d66,null)||_0x2566bc['BVosw'](_0x521d66,void 0x0)||_0x2566bc[_0x1c36(0x5e)](_0x17b1aa=_0x521d66[_0x1c36(0x5f)],null)||_0x2566bc['nSxtH'](_0x17b1aa,void 0x0)?void 0x0:_0x17b1aa[_0x1c36(0x15)])||0x0,_0x28793d=(_0x2566bc[_0x1c36(0x5c)](_0x521d66,null)||_0x521d66===void 0x0||_0x2566bc[_0x1c36(0x60)](_0x2ce644=_0x521d66['memories'],null)||_0x2566bc['BVosw'](_0x2ce644,void 0x0)?void 0x0:_0x2ce644[_0x1c36(0x15)])||0x0,_0x453fda=_0x2566bc['KNsnV'](_0x458356+_0x29fea7,_0x28793d);console[_0x1c36(0x12)](_0x1c36(0x61)+_0x458356+_0x1c36(0x62)+_0x29fea7+_0x1c36(0x63)+_0x28793d+_0x1c36(0x64)+_0x453fda+')');if(!_0x521d66)return console[_0x1c36(0x1a)]('â\x20[CHATGPT_SERVICE]\x20Invalid\x20input:\x20memoriesData\x20missing'),{'success':![],'error':_0x2566bc[_0x1c36(0x65)]};try{const _0x1b1b76=await AsyncStorage[_0x1c36(0x22)](_0x2566bc[_0x1c36(0x66)])||await AsyncStorage[_0x1c36(0x22)](_0x1c36(0xb))||await AsyncStorage[_0x1c36(0x22)]('auth_token');if(!_0x1b1b76){if(_0x2566bc['kNcJH']('xQIBB',_0x1c36(0x67)))return console[_0x1c36(0x1a)](_0x2566bc[_0x1c36(0x68)]),{'success':![],'error':_0x2566bc[_0x1c36(0x69)]};else _0x48adba['warn'](_0x1c36(0x46)+_0x2566bc[_0x1c36(0x6a)](_0x27e2a8,0x1)+':',_0xd2ceae),_0x20a548++;}console[_0x1c36(0x12)](_0x2566bc['unwPU']);const _0xc70c9a=_0x2566bc[_0x1c36(0x6b)],_0x164c33={'platform':_0x2566bc[_0x1c36(0x6c)],'memoriesData':_0x521d66,'metadata':{'source':'react-native-sdk','appVersion':_0xc70c9a,'fetchedAt':new Date()['toISOString']()}},_0x18a539=Object[_0x1c36(0x6d)](_0x2566bc[_0x1c36(0x6e)](_0x521d66,{}));console[_0x1c36(0x12)](_0x1c36(0x6f)),console['log'](_0x1c36(0x70)+API_CONFIG['BASE_URL']+_0x1c36(0x71)),console[_0x1c36(0x12)]('đĻ\x20[CHATGPT_SERVICE]\x20Raw\x20memoriesData\x20keys:\x20'+_0x18a539[_0x1c36(0x72)](',\x20')),console[_0x1c36(0x12)](_0x1c36(0x73));const _0x239f99=await _0x2566bc['qTtwG'](fetch,API_CONFIG[_0x1c36(0x3a)]+_0x1c36(0x71),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':'Bearer\x20'+_0x1b1b76,'User-Agent':_0x1c36(0x74)+_0xc70c9a+'\x20('+Platform['OS']+')'},'body':JSON[_0x1c36(0x3e)](_0x164c33)}),_0x46faff=await _0x239f99[_0x1c36(0x3f)]();if(_0x239f99['ok']){const _0x2520df=_0x2566bc[_0x1c36(0x75)]['split']('|');let _0x9c34cb=0x0;while(!![]){switch(_0x2520df[_0x9c34cb++]){case'0':(_0x2c6cf1=_0x46faff[_0x1c36(0x76)])!==null&&_0x2566bc[_0x1c36(0x77)](_0x2c6cf1,void 0x0)&&_0x2c6cf1['memoriesCount']&&console['log'](_0x1c36(0x78)+_0x46faff[_0x1c36(0x76)][_0x1c36(0x79)]+'\x20memory\x20items\x20in\x20database');continue;case'1':return{'success':!![],'message':_0x46faff[_0x1c36(0x1f)]||_0x2566bc[_0x1c36(0x7a)],'data':_0x46faff['data']};case'2':var _0x2c6cf1;continue;case'3':_0x46faff[_0x1c36(0x1f)]&&console[_0x1c36(0x12)](_0x1c36(0x7b)+_0x46faff[_0x1c36(0x1f)]);continue;case'4':console[_0x1c36(0x12)](_0x2566bc[_0x1c36(0x7c)]);continue;}break;}}else return console[_0x1c36(0x43)](_0x1c36(0x49)+_0x239f99[_0x1c36(0x45)]),console[_0x1c36(0x43)](_0x1c36(0x7d)+(_0x46faff[_0x1c36(0x1a)]||_0x2566bc[_0x1c36(0x7e)])),{'success':![],'error':_0x46faff[_0x1c36(0x1a)]||_0x1c36(0x7f)+_0x239f99[_0x1c36(0x45)]};}catch(_0x1b1452){if(_0x2566bc[_0x1c36(0x80)](_0x2566bc['emnsF'],_0x2566bc[_0x1c36(0x81)]))_0x1fa453[_0x1c36(0x12)](_0x1c36(0x7b)+_0x24ee43[_0x1c36(0x1f)]);else return console['error'](_0x2566bc['CkICX'],_0x1b1452),{'success':![],'error':_0x1b1452['message']||_0x1c36(0x82)};}};
|
|
1
|
+
import{API_CONFIG}from'../config/api';function _0x2de8(_0x563574,_0x2de864){_0x563574=_0x563574-0x0;const _0x629384=_0x5635();let _0x9d552e=_0x629384[_0x563574];return _0x9d552e;}import AsyncStorage from'@react-native-async-storage/async-storage';import{Platform}from'react-native';export const storeChatGPTConversations=async(_0xe939d1,_0x51b117)=>{const _0xae2ac={'xxxaL':_0x2de8(0x0),'kFJdK':'đ\x20[CHATGPT_SERVICE]\x20Storing\x20ChatGPT\x20conversations\x20for:','gXTBo':'đ\x20[CHATGPT_SERVICE]\x20Total\x20messages:','VtuQr':function(_0x3c0094,_0x4d28bd){return _0x3c0094||_0x4d28bd;},'mmszk':_0x2de8(0x1),'QRAXb':_0x2de8(0x2),'MGJma':_0x2de8(0x3),'bTpBW':'auth_token','tylrT':'poOQU','isifu':'KHtlt','NJRzb':_0x2de8(0x4),'aTXwD':_0x2de8(0x5),'YPxsH':'đ\x20[CHATGPT_SERVICE]\x20Auth\x20token\x20found\x20for\x20conversations','hzFCY':_0x2de8(0x6),'vVAgf':function(_0x56fa6d,_0x563114){return _0x56fa6d===_0x563114;},'PkpjY':_0x2de8(0x7),'hvNGJ':_0x2de8(0x8),'vomxK':function(_0x42ff3f,_0x1513dc){return _0x42ff3f===_0x1513dc;},'fvZih':_0x2de8(0x9),'HiNmC':function(_0x4d8302,_0x52e4ad){return _0x4d8302<_0x52e4ad;},'NnCcH':function(_0x43c4fc,_0x2ba2c8){return _0x43c4fc!==_0x2ba2c8;},'OtPRT':_0x2de8(0xa),'mhsff':function(_0x2c1d69,_0x47ac86){return _0x2c1d69/_0x47ac86;},'dUAMy':'mobile-chatgpt','NjmVl':_0x2de8(0xb),'FwqLG':function(_0x66ef33,_0x570ff9){return _0x66ef33+_0x570ff9;},'CFChN':function(_0x819bc1,_0x53f0c2,_0x5c319a){return _0x819bc1(_0x53f0c2,_0x5c319a);},'KNKKB':function(_0x1df85f,_0x5cf8a8){return _0x1df85f+_0x5cf8a8;},'gjNwy':function(_0x2afce,_0x35209c){return _0x2afce-_0x35209c;},'CdSiF':function(_0x4d8cd1,_0x48eeb6){return _0x4d8cd1>_0x48eeb6;}};console['log'](_0xae2ac[_0x2de8(0xc)],_0xe939d1),console[_0x2de8(0xd)](_0x2de8(0xe),_0x51b117[_0x2de8(0xf)]),console['log'](_0xae2ac[_0x2de8(0x10)],_0x51b117[_0x2de8(0x11)]((_0x4095ac,_0x2e8df6)=>_0x4095ac+_0x2e8df6['user_messages']['length'],0x0));if(_0xae2ac['VtuQr'](!_0xe939d1,!_0x51b117)||_0x51b117[_0x2de8(0xf)]===0x0)return console['error'](_0x2de8(0x12)),{'success':![],'error':_0xae2ac[_0x2de8(0x13)]};try{const _0x18f1ee=await AsyncStorage[_0x2de8(0x14)](_0xae2ac[_0x2de8(0x15)])||await AsyncStorage[_0x2de8(0x14)](_0xae2ac[_0x2de8(0x16)])||await AsyncStorage[_0x2de8(0x14)](_0xae2ac[_0x2de8(0x17)]);if(!_0x18f1ee)return _0xae2ac[_0x2de8(0x18)]!==_0xae2ac[_0x2de8(0x19)]?(console[_0x2de8(0x1a)](_0xae2ac[_0x2de8(0x1b)]),{'success':![],'error':_0xae2ac[_0x2de8(0x1c)]}):(_0xdce85f[_0x2de8(0x1a)](_0xae2ac[_0x2de8(0x1d)],_0x2c3922),{'success':![],'error':_0x241858[_0x2de8(0x1e)]||_0x2de8(0x1f)});console[_0x2de8(0xd)](_0xae2ac['YPxsH']);const _0x4748da={'platform':Platform['OS'],'appVersion':_0xae2ac['hzFCY'],'osVersion':_0xae2ac[_0x2de8(0x20)](Platform['OS'],_0xae2ac['PkpjY'])?_0xae2ac[_0x2de8(0x21)]:Platform['OS'],'deviceModel':_0xae2ac[_0x2de8(0x22)](Platform['OS'],_0xae2ac[_0x2de8(0x23)])?_0x2de8(0x24):_0xae2ac[_0x2de8(0x25)],'isOfflineSync':![]};let _0x42cb17=0x0,_0x192aff=0x0;for(let _0x4a0bc5=0x0;_0xae2ac['HiNmC'](_0x4a0bc5,_0x51b117['length']);_0x4a0bc5++){if(_0xae2ac[_0x2de8(0x26)]('ppzhd',_0xae2ac[_0x2de8(0x27)]))_0x387a5c[_0x2de8(0xd)](_0x2de8(0x28)+_0x2fb628['message']);else{const _0x2d4aec=_0x51b117[_0x4a0bc5],_0x1a32ad=Date[_0x2de8(0x29)](),_0x2a0195=_0x2d4aec[_0x2de8(0x2a)][_0x2de8(0x2b)]((_0x144888,_0x48996f)=>({'id':_0x2d4aec[_0x2de8(0x2c)]+_0x2de8(0x2d)+_0x48996f,'role':_0x2de8(0x2e),'content':_0x144888,'timestamp':new Date(_0x1a32ad-(_0x2d4aec[_0x2de8(0x2a)][_0x2de8(0xf)]-_0x48996f)*0x3e8)['toISOString'](),'metadata':{}})),_0xb9a1ce={'conversationId':_0x2d4aec[_0x2de8(0x2c)],'messages':_0x2a0195,'context':{'title':_0x2d4aec[_0x2de8(0x2f)],'create_time':Math[_0x2de8(0x30)](_0xae2ac[_0x2de8(0x31)](_0x1a32ad,0x3e8)),'update_time':Math[_0x2de8(0x30)](_0x1a32ad/0x3e8)},'mobileMetadata':_0x4748da},_0xdb5ffc={'platform':_0xae2ac[_0x2de8(0x32)],'conversationData':_0xb9a1ce,'memoryType':_0xae2ac[_0x2de8(0x33)]};console[_0x2de8(0xd)]('đĄ\x20[CHATGPT_SERVICE]\x20Sending\x20conversation\x20'+_0xae2ac[_0x2de8(0x34)](_0x4a0bc5,0x1)+'/'+_0x51b117[_0x2de8(0xf)]+':\x20'+_0x2d4aec[_0x2de8(0x2f)]);try{const _0x4ee392=await _0xae2ac[_0x2de8(0x35)](fetch,API_CONFIG['BASE_URL']+'/llm-data/store',{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x2de8(0x36)+_0x18f1ee,'User-Agent':_0x2de8(0x37)+Platform['OS']+')'},'body':JSON[_0x2de8(0x38)](_0xdb5ffc)}),_0x59a88a=await _0x4ee392[_0x2de8(0x39)]();_0x4ee392['ok']?(console[_0x2de8(0xd)]('â
\x20[CHATGPT_SERVICE]\x20Sent\x20conversation\x20'+_0xae2ac[_0x2de8(0x3a)](_0x4a0bc5,0x1)+'/'+_0x51b117[_0x2de8(0xf)]),_0x42cb17++):(console[_0x2de8(0x3b)](_0x2de8(0x3c)+(_0x4a0bc5+0x1)+'/'+_0x51b117['length']+':',_0x59a88a[_0x2de8(0x1a)]||_0x4ee392[_0x2de8(0x3d)]),_0x192aff++);}catch(_0x3bfc91){console[_0x2de8(0x3b)](_0x2de8(0x3e)+_0xae2ac[_0x2de8(0x3a)](_0x4a0bc5,0x1)+':',_0x3bfc91),_0x192aff++;}_0xae2ac[_0x2de8(0x3f)](_0x4a0bc5,_0xae2ac[_0x2de8(0x40)](_0x51b117[_0x2de8(0xf)],0x1))&&await new Promise(_0x430a37=>setTimeout(_0x430a37,0x12c));}}return console[_0x2de8(0xd)]('đ\x20[CHATGPT_SERVICE]\x20Complete:\x20'+_0x42cb17+_0x2de8(0x41)+_0x192aff+_0x2de8(0x42)),_0xae2ac[_0x2de8(0x43)](_0x42cb17,0x0)?{'success':!![],'message':'Stored\x20'+_0x42cb17+'\x20of\x20'+_0x51b117[_0x2de8(0xf)]+_0x2de8(0x44)}:{'success':![],'error':_0x2de8(0x45)+_0x192aff+'\x20errors)'};}catch(_0x542d24){return console['error'](_0x2de8(0x46),_0x542d24),{'success':![],'error':_0x542d24['message']||_0x2de8(0x1f)};}};export const storeChatGPTMemories=async _0xa632d4=>{const _0x509811={'XsoPk':function(_0x5f4292,_0x1b39a8){return _0x5f4292+_0x1b39a8;},'tjLtH':_0x2de8(0x1),'KEEhn':function(_0x538973,_0x18a817){return _0x538973===_0x18a817;},'XubPM':function(_0x42ef3d,_0x58509b){return _0x42ef3d===_0x58509b;},'RcdsK':function(_0x515d6e,_0x1834e8){return _0x515d6e===_0x1834e8;},'AlSrW':function(_0x152e44,_0x3e3de4){return _0x152e44===_0x3e3de4;},'gycyx':function(_0x5d9c9f,_0x25a554){return _0x5d9c9f===_0x25a554;},'ZZLaV':'â\x20[CHATGPT_SERVICE]\x20Invalid\x20input:\x20memoriesData\x20missing','UknxY':_0x2de8(0x47),'aIerW':'onairos_jwt_token','zVtDI':_0x2de8(0x3),'QUdrG':_0x2de8(0x48),'nXjvO':_0x2de8(0x49),'GxWfs':_0x2de8(0x4a),'FJIRh':_0x2de8(0x6),'CXqsU':function(_0x32158a,_0x25892a){return _0x32158a||_0x25892a;},'paxwD':function(_0x191cfb,_0x3cd8f6,_0x51a147){return _0x191cfb(_0x3cd8f6,_0x51a147);},'sqzrS':_0x2de8(0x4b),'pEaQv':function(_0x3c01e9,_0x2810a7){return _0x3c01e9!==_0x2810a7;},'HdWAE':_0x2de8(0x4c),'yEgKZ':'Memories\x20stored\x20successfully','BSmRB':function(_0x3e6b23,_0x4b2212){return _0x3e6b23!==_0x4b2212;},'rOXOS':'Unknown\x20error','SWnky':_0x2de8(0x0)};var _0x1c55a9,_0x529fed,_0x199e82;console[_0x2de8(0xd)](_0x2de8(0x4d));const _0x1690ea=(_0x509811[_0x2de8(0x4e)](_0xa632d4,null)||_0xa632d4===void 0x0||_0x509811[_0x2de8(0x4e)](_0x1c55a9=_0xa632d4[_0x2de8(0x4f)],null)||_0x1c55a9===void 0x0?void 0x0:_0x1c55a9[_0x2de8(0xf)])||0x0,_0x11c239=(_0x509811[_0x2de8(0x50)](_0xa632d4,null)||_0x509811['KEEhn'](_0xa632d4,void 0x0)||_0x509811['XubPM'](_0x529fed=_0xa632d4['memory_entries'],null)||_0x509811['RcdsK'](_0x529fed,void 0x0)?void 0x0:_0x529fed[_0x2de8(0xf)])||0x0,_0x2ddd62=(_0x509811[_0x2de8(0x51)](_0xa632d4,null)||_0x509811[_0x2de8(0x50)](_0xa632d4,void 0x0)||_0x509811[_0x2de8(0x52)](_0x199e82=_0xa632d4[_0x2de8(0x53)],null)||_0x509811['gycyx'](_0x199e82,void 0x0)?void 0x0:_0x199e82[_0x2de8(0xf)])||0x0,_0x3d63d6=_0x509811['XsoPk'](_0x1690ea+_0x11c239,_0x2ddd62);console[_0x2de8(0xd)]('đ\x20[CHATGPT_SERVICE]\x20Found\x20'+_0x1690ea+_0x2de8(0x54)+_0x11c239+'\x20entries,\x20'+_0x2ddd62+_0x2de8(0x55)+_0x3d63d6+')');if(!_0xa632d4)return console[_0x2de8(0x1a)](_0x509811['ZZLaV']),{'success':![],'error':_0x509811[_0x2de8(0x56)]};try{const _0x228cc5=await AsyncStorage['getItem'](_0x509811[_0x2de8(0x57)])||await AsyncStorage[_0x2de8(0x14)](_0x509811[_0x2de8(0x58)])||await AsyncStorage['getItem'](_0x509811[_0x2de8(0x59)]);if(!_0x228cc5){if(_0x509811['gycyx'](_0x509811[_0x2de8(0x5a)],_0x2de8(0x49)))return console[_0x2de8(0x1a)](_0x2de8(0x4)),{'success':![],'error':_0x2de8(0x5)};else _0x37d35a['log'](_0x2de8(0x5b)+_0x509811[_0x2de8(0x5c)](_0x37e96f,0x1)+'/'+_0x381698['length']),_0x2b518f++;}console[_0x2de8(0xd)](_0x509811[_0x2de8(0x5d)]);const _0x55959a=_0x509811['FJIRh'],_0x304528={'platform':_0x2de8(0x5e),'memoriesData':_0xa632d4,'metadata':{'source':'react-native-sdk','appVersion':_0x55959a,'fetchedAt':new Date()[_0x2de8(0x5f)]()}},_0x48b2cc=Object[_0x2de8(0x60)](_0x509811[_0x2de8(0x61)](_0xa632d4,{}));console[_0x2de8(0xd)](_0x2de8(0x62)),console[_0x2de8(0xd)](_0x2de8(0x63)+API_CONFIG[_0x2de8(0x64)]+_0x2de8(0x65)),console['log'](_0x2de8(0x66)+_0x48b2cc[_0x2de8(0x67)](',\x20')),console[_0x2de8(0xd)](_0x2de8(0x68));const _0x4d4453=await _0x509811['paxwD'](fetch,API_CONFIG[_0x2de8(0x64)]+_0x2de8(0x65),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x2de8(0x36)+_0x228cc5,'User-Agent':_0x2de8(0x69)+_0x55959a+'\x20('+Platform['OS']+')'},'body':JSON[_0x2de8(0x38)](_0x304528)}),_0x3a3ee0=await _0x4d4453[_0x2de8(0x39)]();if(_0x4d4453['ok']){var _0x177242;console[_0x2de8(0xd)](_0x509811['sqzrS']);_0x3a3ee0[_0x2de8(0x1e)]&&console[_0x2de8(0xd)](_0x2de8(0x28)+_0x3a3ee0[_0x2de8(0x1e)]);if(_0x509811[_0x2de8(0x6a)](_0x177242=_0x3a3ee0[_0x2de8(0x6b)],null)&&_0x177242!==void 0x0&&_0x177242['memoriesCount']){if(_0x509811[_0x2de8(0x50)]('oWaoM',_0x509811[_0x2de8(0x6c)]))return{'success':![],'error':_0x2de8(0x45)+_0x2628a3+_0x2de8(0x6d)};else console[_0x2de8(0xd)](_0x2de8(0x6e)+_0x3a3ee0['data'][_0x2de8(0x6f)]+'\x20memory\x20items\x20in\x20database');}return{'success':!![],'message':_0x3a3ee0[_0x2de8(0x1e)]||_0x509811[_0x2de8(0x70)],'data':_0x3a3ee0[_0x2de8(0x6b)]};}else return _0x509811[_0x2de8(0x71)](_0x2de8(0x72),_0x2de8(0x73))?(console[_0x2de8(0x3b)]('â ī¸\x20[CHATGPT_SERVICE]\x20Memories\x20backend\x20returned\x20status:\x20'+_0x4d4453[_0x2de8(0x3d)]),console['warn'](_0x2de8(0x74)+(_0x3a3ee0[_0x2de8(0x1a)]||_0x509811[_0x2de8(0x75)])),{'success':![],'error':_0x3a3ee0[_0x2de8(0x1a)]||_0x2de8(0x76)+_0x4d4453['status']}):(_0x397b5c[_0x2de8(0x1a)](_0x2de8(0x12)),{'success':![],'error':_0x509811[_0x2de8(0x77)]});}catch(_0x5753e8){return console[_0x2de8(0x1a)](_0x509811[_0x2de8(0x78)],_0x5753e8),{'success':![],'error':_0x5753e8[_0x2de8(0x1e)]||_0x2de8(0x1f)};}};function _0x5635(){const _0x5da64e=['â\x20[CHATGPT_SERVICE]\x20Memories\x20network\x20error:','Invalid\x20input:\x20userId\x20or\x20conversations\x20missing.','onairos_jwt_token','enoch_token','â\x20[CHATGPT_SERVICE]\x20No\x20auth\x20token\x20found\x20in\x20any\x20storage\x20key','Authentication\x20token\x20not\x20found.\x20Please\x20log\x20in\x20again.','1.0.0','ios','17.0','Android','ppzhd','conversation','kFJdK','log','đ\x20[CHATGPT_SERVICE]\x20Number\x20of\x20conversations:','length','gXTBo','reduce','â\x20[CHATGPT_SERVICE]\x20Invalid\x20input','mmszk','getItem','QRAXb','MGJma','bTpBW','tylrT','isifu','error','NJRzb','aTXwD','xxxaL','message','Network\x20error.\x20Please\x20check\x20your\x20connection.','vVAgf','hvNGJ','vomxK','PkpjY','iPhone','fvZih','NnCcH','OtPRT','đ\x20[CHATGPT_SERVICE]\x20Backend\x20response:\x20','now','user_messages','map','conversation_id','-msg-','user','title','floor','mhsff','dUAMy','NjmVl','FwqLG','CFChN','Bearer\x20','OnairosSDK/1.0.0\x20(','stringify','json','KNKKB','warn','â ī¸\x20[CHATGPT_SERVICE]\x20Failed\x20conversation\x20','status','â ī¸\x20[CHATGPT_SERVICE]\x20Network\x20error\x20for\x20conversation\x20','HiNmC','gjNwy','\x20success,\x20','\x20failed','CdSiF','\x20conversations','Failed\x20to\x20store\x20conversations\x20(','â\x20[CHATGPT_SERVICE]\x20Network\x20error:','Invalid\x20input:\x20memoriesData\x20missing.','auth_token','ZWtWB','đ\x20[CHATGPT_SERVICE]\x20Auth\x20token\x20found\x20for\x20memories','â
\x20[CHATGPT_SERVICE]\x20Successfully\x20sent\x20memories\x20to\x20backend','qAAPJ','đ§ \x20[CHATGPT_SERVICE]\x20Storing\x20ChatGPT\x20memories...','KEEhn','items','XubPM','RcdsK','AlSrW','memories','\x20items,\x20','\x20memories\x20(total:\x20','UknxY','aIerW','zVtDI','QUdrG','nXjvO','â
\x20[CHATGPT_SERVICE]\x20Sent\x20conversation\x20','XsoPk','GxWfs','mobile-chatgpt','toISOString','keys','CXqsU','đĄ\x20[CHATGPT_SERVICE]\x20Sending\x20memories\x20to\x20backend...','đ\x20[CHATGPT_SERVICE]\x20URL:\x20','BASE_URL','/llm-data/store-memories','đĻ\x20[CHATGPT_SERVICE]\x20Raw\x20memoriesData\x20keys:\x20','join','đĻ\x20[CHATGPT_SERVICE]\x20Raw\x20response\x20sent\x20as-is\x20(no\x20transformation)','OnairosSDK/','pEaQv','data','HdWAE','\x20errors)','đ\x20[CHATGPT_SERVICE]\x20Stored\x20','memoriesCount','yEgKZ','BSmRB','TXBVJ','DyuDD','â ī¸\x20[CHATGPT_SERVICE]\x20Error:\x20','rOXOS','HTTP\x20','tjLtH','SWnky'];_0x5635=function(){return _0x5da64e;};return _0x5635();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x44db(_0x5093c3,_0x44dbf9){_0x5093c3=_0x5093c3-0x0;const _0x25377b=_0x5093();let _0x547339=_0x25377b[_0x5093c3];return _0x547339;}import{storeClaudeConversations}from'./claudeConversationService';import{Alert}from'react-native';export const useClaudeConversationExtractor=()=>{const _0x508537={'pRyKi':'â\x20[CLAUDE_EXTRACTOR]\x20Backend\x20storage\x20failed:','LODFd':_0x44db(0x0),'YCzFm':function(_0x11fb01,_0x198a97){return _0x11fb01>_0x198a97;},'ZsuYU':_0x44db(0x1),'mjCmS':_0x44db(0x2),'HcEcU':'default','Kkjdb':function(_0x3334cd,_0x1af848){return _0x3334cd===_0x1af848;},'pxYCe':_0x44db(0x3),'vLLWR':_0x44db(0x4),'vKqzv':_0x44db(0x5),'KCTij':_0x44db(0x6),'IBPBE':_0x44db(0x7),'KlVLP':function(_0x102630,_0x4491aa){return _0x102630===_0x4491aa;},'OQvpj':_0x44db(0x8),'OOHjk':_0x44db(0x9),'vOqmT':'No\x20valid\x20conversations\x20found\x20to\x20export.','aAekN':function(_0x5f1e71,_0x3bf941){return _0x5f1e71<_0x3bf941;},'MtJaB':function(_0x80bef,_0x5a1167){return _0x80bef===_0x5a1167;},'eaLjO':_0x44db(0xa),'RMwdA':function(_0x3e4506,_0x30afe7){return _0x3e4506-_0x30afe7;},'FZzBi':function(_0x4f6929,_0x37803d,_0x1415cf){return _0x4f6929(_0x37803d,_0x1415cf);},'ZDntX':'GsLDS','HYMeY':_0x44db(0xb),'rIKgL':'â\x20[CLAUDE_EXTRACTOR]\x20Unexpected\x20error\x20during\x20export:','XllcA':'Export\x20Error'},_0x58dd4a=async(_0x520f90,_0x3451b6)=>{const _0x5761dc={'llKAK':_0x44db(0x7),'DPMGb':_0x508537[_0x44db(0xc)],'pFelv':_0x44db(0xb)};if(_0x508537[_0x44db(0xd)](_0x44db(0xe),_0x508537[_0x44db(0xf)]))return _0x1a0d2a[_0x44db(0x10)](_0x508537[_0x44db(0x11)],_0x4f5fdd[_0x44db(0x10)]),Alert[_0x44db(0x12)](_0x508537[_0x44db(0x13)],_0x1177b9[_0x44db(0x10)]||_0x44db(0x14),[{'text':'OK','style':_0x44db(0x15)}]),![];else{console[_0x44db(0x16)](_0x508537[_0x44db(0x17)]),console[_0x44db(0x16)](_0x44db(0x18),_0x520f90),console[_0x44db(0x16)](_0x508537[_0x44db(0x19)],_0x3451b6[_0x44db(0x1a)]);if(!_0x520f90)return console[_0x44db(0x10)](_0x508537['KCTij']),Alert[_0x44db(0x12)](_0x508537['IBPBE'],_0x44db(0x1b),[{'text':'OK','style':_0x508537[_0x44db(0xc)]}]),![];if(!_0x3451b6||_0x508537[_0x44db(0x1c)](_0x3451b6[_0x44db(0x1a)],0x0))return console[_0x44db(0x16)]('âšī¸\x20[CLAUDE_EXTRACTOR]\x20No\x20conversations\x20to\x20export\x20-\x20treating\x20as\x20success\x20(connected)'),!![];const _0x5d30a1=_0x3451b6[_0x44db(0x1d)](_0x4c6d6d=>{const _0x1c18d7=_0x4c6d6d[_0x44db(0x1e)]&&_0x4c6d6d['title']&&Array[_0x44db(0x1f)](_0x4c6d6d[_0x44db(0x20)])&&_0x508537[_0x44db(0x21)](_0x4c6d6d[_0x44db(0x20)][_0x44db(0x1a)],0x0);if(!_0x1c18d7){if(_0x508537[_0x44db(0x22)]!==_0x508537[_0x44db(0x22)])return _0x369388[_0x44db(0x10)](_0x44db(0x6)),Alert[_0x44db(0x12)](_0x5761dc[_0x44db(0x23)],_0x44db(0x1b),[{'text':'OK','style':_0x5761dc[_0x44db(0x24)]}]),![];else console[_0x44db(0x25)](_0x508537[_0x44db(0x26)],_0x4c6d6d);}return _0x1c18d7;});if(_0x508537[_0x44db(0x1c)](_0x5d30a1[_0x44db(0x1a)],0x0))return console['error'](_0x508537['OQvpj']),Alert[_0x44db(0x12)](_0x508537[_0x44db(0x27)],_0x508537[_0x44db(0x28)],[{'text':'OK','style':_0x44db(0x15)}]),![];if(_0x508537[_0x44db(0x29)](_0x5d30a1[_0x44db(0x1a)],_0x3451b6[_0x44db(0x1a)])){if(_0x508537['MtJaB'](_0x508537[_0x44db(0x2a)],'yWoQF'))return _0x12ca50[_0x44db(0x16)](_0x5761dc[_0x44db(0x2b)]),_0x5a526b[_0x44db(0x16)]('đ\x20[CLAUDE_EXTRACTOR]\x20Backend\x20response:',_0x52074c[_0x44db(0x2c)]),!![];else console[_0x44db(0x25)](_0x44db(0x2d)+_0x508537[_0x44db(0x2e)](_0x3451b6[_0x44db(0x1a)],_0x5d30a1['length'])+_0x44db(0x2f));}try{console[_0x44db(0x16)](_0x44db(0x30));const _0x52f432=await _0x508537[_0x44db(0x31)](storeClaudeConversations,_0x520f90,_0x5d30a1);if(_0x52f432[_0x44db(0x32)]){if(_0x508537[_0x44db(0x33)](_0x508537[_0x44db(0x34)],_0x508537[_0x44db(0x34)]))return console['log'](_0x508537[_0x44db(0x35)]),console[_0x44db(0x16)](_0x44db(0x36),_0x52f432['data']),!![];else _0x51a4ee[_0x44db(0x25)](_0x44db(0x2d)+(_0x34b1b8[_0x44db(0x1a)]-_0x4352a7[_0x44db(0x1a)])+_0x44db(0x2f));}else return console[_0x44db(0x10)](_0x44db(0x37),_0x52f432['error']),Alert[_0x44db(0x12)](_0x508537[_0x44db(0x13)],_0x52f432['error']||_0x44db(0x14),[{'text':'OK','style':_0x508537[_0x44db(0xc)]}]),![];}catch(_0x2723ae){return console[_0x44db(0x10)](_0x508537['rIKgL'],_0x2723ae),Alert[_0x44db(0x12)](_0x508537[_0x44db(0x38)],_0x44db(0x39),[{'text':'OK','style':_0x508537['HcEcU']}]),![];}}};return{'initiateConversationExport':_0x58dd4a};};function _0x5093(){const _0x10eb26=['Export\x20Failed','vqMBX','â ī¸\x20[CLAUDE_EXTRACTOR]\x20Invalid\x20conversation:','yraQz','đ\x20[CLAUDE_EXTRACTOR]\x20Initiating\x20conversation\x20export','đ\x20[CLAUDE_EXTRACTOR]\x20Conversations\x20to\x20send:','â\x20[CLAUDE_EXTRACTOR]\x20Username\x20is\x20required','Error','â\x20[CLAUDE_EXTRACTOR]\x20No\x20valid\x20conversations\x20after\x20filtering','Data\x20Error','VjscG','â
\x20[CLAUDE_EXTRACTOR]\x20Export\x20completed\x20successfully','HcEcU','Kkjdb','NaFkE','pxYCe','error','pRyKi','alert','LODFd','An\x20unknown\x20error\x20occurred\x20during\x20conversation\x20storage.','default','log','vLLWR','đ¤\x20[CLAUDE_EXTRACTOR]\x20Username:','vKqzv','length','Username\x20is\x20required\x20to\x20export\x20Claude\x20conversations.','KlVLP','filter','conversation_id','isArray','user_messages','YCzFm','ZsuYU','llKAK','DPMGb','warn','mjCmS','OOHjk','vOqmT','aAekN','eaLjO','pFelv','data','â ī¸\x20[CLAUDE_EXTRACTOR]\x20Filtered\x20out\x20','RMwdA','\x20invalid\x20conversations','đĄ\x20[CLAUDE_EXTRACTOR]\x20Sending\x20to\x20backend...','FZzBi','success','MtJaB','ZDntX','HYMeY','đ\x20[CLAUDE_EXTRACTOR]\x20Backend\x20response:','â\x20[CLAUDE_EXTRACTOR]\x20Backend\x20storage\x20failed:','XllcA','Failed\x20to\x20connect\x20to\x20the\x20conversation\x20storage\x20service.\x20Please\x20check\x20your\x20network\x20connection.'];_0x5093=function(){return _0x10eb26;};return _0x5093();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x40ef(){const _0xcb3b68=['Invalid\x20input:\x20userId\x20or\x20conversations\x20missing.','â\x20[CLAUDE_SERVICE]\x20No\x20auth\x20token\x20found\x20in\x20any\x20storage\x20key','đ\x20[CLAUDE_SERVICE]\x20Total\x20messages:','ancfc','onairos_jwt_token','enoch_token','đ\x20[CLAUDE_SERVICE]\x20Auth\x20token\x20found','ios','iPhone','Android','mobile-claude','WOvZm','adxPO','Network\x20error.\x20Please\x20check\x20your\x20connection.','log','EleUO','đ\x20[CLAUDE_SERVICE]\x20Number\x20of\x20conversations:','length','reduce','user_messages','error','LgwnD','PQQZe','yiMgz','getItem','UBwWQ','QxzOL','AhFSp','YiDgh','PqIBI','OkeXo','zpOtB','BksTy','qvQzL','now','map','conversation_id','-msg-','floor','conversation','đĄ\x20[CLAUDE_SERVICE]\x20Sending\x20conversation\x20','BASE_URL','Bearer\x20','stringify','json','busxq','TPAVe','warn','â ī¸\x20[CLAUDE_SERVICE]\x20Failed\x20conversation\x20','status','kbcAT','qDKia','ItnYQ','\x20conversations','â ī¸\x20[CLAUDE_SERVICE]\x20Network\x20error\x20for\x20conversation\x20','kuVnb','PNjuw','XWzTP','đ\x20[CLAUDE_SERVICE]\x20Complete:\x20','\x20success,\x20','\x20failed','WAEnP','Stored\x20','\x20of\x20','Failed\x20to\x20store\x20conversations\x20(','\x20errors)','CFRTK'];_0x40ef=function(){return _0xcb3b68;};return _0x40ef();}import{API_CONFIG}from'../config/api';import AsyncStorage from'@react-native-async-storage/async-storage';function _0x18cd(_0x40ef5a,_0x18cd89){_0x40ef5a=_0x40ef5a-0x0;const _0x127c61=_0x40ef();let _0x192347=_0x127c61[_0x40ef5a];return _0x192347;}import{Platform}from'react-native';export const storeClaudeConversations=async(_0x4a83dc,_0x432dc6)=>{const _0x42b4a6={'LgwnD':_0x18cd(0x0),'kuVnb':function(_0x103b0a,_0x18830e){return _0x103b0a+_0x18830e;},'FKHXk':_0x18cd(0x1),'QxzOL':'Authentication\x20token\x20not\x20found.\x20Please\x20log\x20in\x20again.','EleUO':'đ\x20[CLAUDE_SERVICE]\x20Storing\x20Claude\x20conversations\x20for:','rhNfb':_0x18cd(0x2),'YiDgh':function(_0x13d189,_0xd59bc5){return _0x13d189===_0xd59bc5;},'RwWme':'â\x20[CLAUDE_SERVICE]\x20Invalid\x20input','hUBzo':function(_0x44ed6c,_0x43fe7d){return _0x44ed6c!==_0x43fe7d;},'PQQZe':_0x18cd(0x3),'yiMgz':_0x18cd(0x4),'DcxMG':_0x18cd(0x5),'UBwWQ':'auth_token','AhFSp':_0x18cd(0x6),'zfvNC':'1.0.0','PqIBI':_0x18cd(0x7),'zTECu':'17.0','OkeXo':_0x18cd(0x8),'zpOtB':_0x18cd(0x9),'Kznfr':function(_0x44f1c0,_0x1e67f7){return _0x44f1c0<_0x1e67f7;},'qvQzL':'BksTy','PCfLP':function(_0x2e6cd5,_0x3a2a13){return _0x2e6cd5/_0x3a2a13;},'KUGvX':_0x18cd(0xa),'busxq':_0x18cd(0xb),'kbcAT':function(_0x551a56,_0x44199f){return _0x551a56+_0x44199f;},'qDKia':function(_0xcfeaf7,_0x162566){return _0xcfeaf7!==_0x162566;},'ItnYQ':_0x18cd(0xc),'PNjuw':function(_0x3d5c34,_0x45d2f8){return _0x3d5c34<_0x45d2f8;},'XWzTP':function(_0x2b2154,_0x20be7a){return _0x2b2154-_0x20be7a;},'WAEnP':function(_0x48d68c,_0x288e55){return _0x48d68c>_0x288e55;},'fXDgu':'â\x20[CLAUDE_SERVICE]\x20Network\x20error:','CFRTK':_0x18cd(0xd)};console[_0x18cd(0xe)](_0x42b4a6[_0x18cd(0xf)],_0x4a83dc),console[_0x18cd(0xe)](_0x18cd(0x10),_0x432dc6[_0x18cd(0x11)]),console[_0x18cd(0xe)](_0x42b4a6['rhNfb'],_0x432dc6[_0x18cd(0x12)]((_0x55223c,_0x473cbc)=>_0x55223c+_0x473cbc[_0x18cd(0x13)]['length'],0x0));if(!_0x4a83dc||!_0x432dc6||_0x42b4a6['YiDgh'](_0x432dc6[_0x18cd(0x11)],0x0))return console[_0x18cd(0x14)](_0x42b4a6['RwWme']),{'success':![],'error':_0x42b4a6[_0x18cd(0x15)]};try{if(_0x42b4a6['hUBzo'](_0x18cd(0x3),_0x42b4a6[_0x18cd(0x16)]))return _0x27b691[_0x18cd(0x14)]('â\x20[CLAUDE_SERVICE]\x20Invalid\x20input'),{'success':![],'error':_0x42b4a6[_0x18cd(0x15)]};else{const _0x141fe7=await AsyncStorage['getItem'](_0x42b4a6[_0x18cd(0x17)])||await AsyncStorage[_0x18cd(0x18)](_0x42b4a6['DcxMG'])||await AsyncStorage['getItem'](_0x42b4a6[_0x18cd(0x19)]);if(!_0x141fe7)return console['error'](_0x42b4a6['FKHXk']),{'success':![],'error':_0x42b4a6[_0x18cd(0x1a)]};console[_0x18cd(0xe)](_0x42b4a6[_0x18cd(0x1b)]);const _0x5a41ec={'platform':Platform['OS'],'appVersion':_0x42b4a6['zfvNC'],'osVersion':_0x42b4a6[_0x18cd(0x1c)](Platform['OS'],_0x42b4a6[_0x18cd(0x1d)])?_0x42b4a6['zTECu']:Platform['OS'],'deviceModel':_0x42b4a6[_0x18cd(0x1c)](Platform['OS'],_0x42b4a6[_0x18cd(0x1d)])?_0x42b4a6[_0x18cd(0x1e)]:_0x42b4a6[_0x18cd(0x1f)],'isOfflineSync':![]};let _0x53da5f=0x0,_0x4e43b9=0x0;for(let _0x1aa8c3=0x0;_0x42b4a6['Kznfr'](_0x1aa8c3,_0x432dc6[_0x18cd(0x11)]);_0x1aa8c3++){if(_0x42b4a6['YiDgh'](_0x18cd(0x20),_0x42b4a6[_0x18cd(0x21)])){const _0x373f22=_0x432dc6[_0x1aa8c3],_0x104bdf=Date[_0x18cd(0x22)](),_0x403ade=_0x373f22[_0x18cd(0x13)][_0x18cd(0x23)]((_0x46ed53,_0x3c3bfb)=>({'id':_0x373f22[_0x18cd(0x24)]+_0x18cd(0x25)+_0x3c3bfb,'role':'user','content':_0x46ed53,'timestamp':new Date(_0x104bdf-(_0x373f22[_0x18cd(0x13)]['length']-_0x3c3bfb)*0x3e8)['toISOString'](),'metadata':{}})),_0x41243f={'conversationId':_0x373f22[_0x18cd(0x24)],'messages':_0x403ade,'context':{'title':_0x373f22['title'],'create_time':Math[_0x18cd(0x26)](_0x104bdf/0x3e8),'update_time':Math[_0x18cd(0x26)](_0x42b4a6['PCfLP'](_0x104bdf,0x3e8))},'mobileMetadata':_0x5a41ec},_0x4d338f={'platform':_0x42b4a6['KUGvX'],'conversationData':_0x41243f,'memoryType':_0x18cd(0x27)};console[_0x18cd(0xe)](_0x18cd(0x28)+(_0x1aa8c3+0x1)+'/'+_0x432dc6[_0x18cd(0x11)]+':\x20'+_0x373f22['title']);try{const _0x1476ff=await fetch(API_CONFIG[_0x18cd(0x29)]+'/llm-data/store',{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0x18cd(0x2a)+_0x141fe7,'User-Agent':'OnairosSDK/1.0.0\x20('+Platform['OS']+')'},'body':JSON[_0x18cd(0x2b)](_0x4d338f)}),_0x1c0db7=await _0x1476ff[_0x18cd(0x2c)]();_0x1476ff['ok']?(console[_0x18cd(0xe)]('â
\x20[CLAUDE_SERVICE]\x20Sent\x20conversation\x20'+_0x42b4a6['kuVnb'](_0x1aa8c3,0x1)+'/'+_0x432dc6[_0x18cd(0x11)]),_0x53da5f++):_0x42b4a6[_0x18cd(0x2d)]===_0x18cd(0x2e)?(_0x4a6e3a[_0x18cd(0x2f)](_0x18cd(0x30)+_0x42b4a6['kuVnb'](_0x51a690,0x1)+'/'+_0xaac7c[_0x18cd(0x11)]+':',_0x4a66f5[_0x18cd(0x14)]||_0x581afc[_0x18cd(0x31)]),_0x44042c++):(console[_0x18cd(0x2f)](_0x18cd(0x30)+_0x42b4a6[_0x18cd(0x32)](_0x1aa8c3,0x1)+'/'+_0x432dc6['length']+':',_0x1c0db7[_0x18cd(0x14)]||_0x1476ff['status']),_0x4e43b9++);}catch(_0xb1d20){if(_0x42b4a6[_0x18cd(0x33)](_0x42b4a6[_0x18cd(0x34)],'adxPO'))return{'success':!![],'message':'Stored\x20'+_0x4988f6+'\x20of\x20'+_0x14c659[_0x18cd(0x11)]+_0x18cd(0x35)};else console[_0x18cd(0x2f)](_0x18cd(0x36)+_0x42b4a6[_0x18cd(0x37)](_0x1aa8c3,0x1)+':',_0xb1d20),_0x4e43b9++;}_0x42b4a6[_0x18cd(0x38)](_0x1aa8c3,_0x42b4a6[_0x18cd(0x39)](_0x432dc6['length'],0x1))&&await new Promise(_0x326000=>setTimeout(_0x326000,0x12c));}else return _0x3cd280[_0x18cd(0x14)](_0x42b4a6['FKHXk']),{'success':![],'error':_0x42b4a6[_0x18cd(0x1a)]};}return console[_0x18cd(0xe)](_0x18cd(0x3a)+_0x53da5f+_0x18cd(0x3b)+_0x4e43b9+_0x18cd(0x3c)),_0x42b4a6[_0x18cd(0x3d)](_0x53da5f,0x0)?{'success':!![],'message':_0x18cd(0x3e)+_0x53da5f+_0x18cd(0x3f)+_0x432dc6['length']+'\x20conversations'}:{'success':![],'error':_0x18cd(0x40)+_0x4e43b9+_0x18cd(0x41)};}}catch(_0x373e26){return console['error'](_0x42b4a6['fXDgu'],_0x373e26),{'success':![],'error':_0x373e26['message']||_0x42b4a6[_0x18cd(0x42)]};}};
|