@onairos/react-native 3.6.6 → 3.6.8
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/lib/commonjs/api/index.js +1 -1
- 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/apiClient.js +1 -1
- 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/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/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 +1 -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 +1 -1
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -1
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
- package/lib/commonjs/utils/webviewScripts/sephora.js +1 -1
- package/lib/commonjs/utils/webviewScripts/telegram.js +1 -1
- package/lib/module/api/index.js +1 -1
- 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/apiClient.js +1 -1
- 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/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/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 +1 -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/sephora.js +1 -1
- package/lib/module/utils/webviewScripts/telegram.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from'react';import{View,Text,StyleSheet,TouchableOpacity}from'react-native';function
|
|
1
|
+
function _0x3be1(_0x2259d8,_0x3be1dc){_0x2259d8=_0x2259d8-0x0;const _0x1c6279=_0x2259();let _0xb0582=_0x1c6279[_0x2259d8];return _0xb0582;}import React from'react';import{View,Text,StyleSheet,TouchableOpacity}from'react-native';import _0x113899 from'react-native-vector-icons/MaterialIcons';import{COLORS}from'../../constants';function _0x2259(){const _0x1c4f37=['arrow-back','#000','header','createElement','HbjNz','subtitle','closeButton','XEpLT','row','center','headerBg','600'];_0x2259=function(){return _0x1c4f37;};return _0x2259();}export const OnboardingHeader=({title:_0x4ce2f2,subtitle:_0x477683,showBackButton:showBackButton=![],onBack:_0xb4defe,onClose:_0x11bbf2})=>{const _0x337c6c={'HbjNz':_0x3be1(0x0),'XEpLT':_0x3be1(0x1)};return React['createElement'](View,{'style':styles[_0x3be1(0x2)]},showBackButton&&React['createElement'](TouchableOpacity,{'style':styles['backButton'],'onPress':_0xb4defe},React[_0x3be1(0x3)](_0x113899,{'name':_0x337c6c[_0x3be1(0x4)],'size':0x18,'color':_0x337c6c['XEpLT']})),React['createElement'](View,{'style':styles['titleContainer']},React[_0x3be1(0x3)](Text,{'style':styles['title']},_0x4ce2f2),_0x477683&&React['createElement'](Text,{'style':styles[_0x3be1(0x5)]},_0x477683)),React[_0x3be1(0x3)](TouchableOpacity,{'style':styles[_0x3be1(0x6)],'onPress':_0x11bbf2},React[_0x3be1(0x3)](_0x113899,{'name':'close','size':0x18,'color':_0x337c6c[_0x3be1(0x7)]})));};const styles=StyleSheet['create']({'header':{'flexDirection':_0x3be1(0x8),'alignItems':_0x3be1(0x9),'padding':0x10,'backgroundColor':COLORS[_0x3be1(0xa)],'borderTopLeftRadius':0x10,'borderTopRightRadius':0x10},'backButton':{'padding':0x8,'marginRight':0x8},'titleContainer':{'flex':0x1},'title':{'fontSize':0x12,'fontWeight':_0x3be1(0xb),'color':'#000'},'subtitle':{'fontSize':0xe,'color':'#666','marginTop':0x4},'closeButton':{'padding':0x8}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x684b(_0x4b8ebf,_0x684bfa){_0x4b8ebf=_0x4b8ebf-0x0;const _0x186451=_0x4b8e();let _0xdd82d3=_0x186451[_0x4b8ebf];return _0xdd82d3;}import React,{useState,useCallback,useEffect}from'react';import{View,Text,StyleSheet,TextInput,TouchableOpacity,Keyboard,KeyboardAvoidingView,Platform}from'react-native';import _0x2e31a6 from'react-native-vector-icons/MaterialIcons';function _0x4b8e(){const _0x45dd93=['create','PINs\x20do\x20not\x20match','confirm','JwQsU','cghoh','padding','height','Confirm\x20your\x20PIN','This\x20PIN\x20will\x20protect\x20your\x20Onairos\x20account','Please\x20re-enter\x20your\x20PIN\x20to\x20confirm','default','none','Enter\x20PIN','visibility-off','PIN\x20Requirements:','check-circle','radio-button-unchecked','At\x20least\x20','Next','arrow-forward','Vxphv','DLwna','qGnpM','zjjkS','qmKjW','LJqhU','length','\x20characters','PIN\x20must\x20be\x20at\x20least\x20','push','cXlfp','CXJxA','TBxww','NivdU','HXZfQ','ANwER','TdUcO','ZuYbb','LldAO','vtuRe','mZNdp','dismiss','bKRww','fFXPH','oXeKh','ZGZtl','Jwzic','mANbq','eNNSI','gwpqO','riifd','avSME','DOyly','createElement','nVlTP','ios','FullI','container','content','title','XyhWj','subtitle','oeYuM','OLJnb','WWvMA','inputContainer','input','QTFXa','CUejA','KSjDt','oVitb','Confirm\x20PIN','done','visibilityToggle','xuCxi','zSvUW','#999','ZZXsk','errorContainer','map','errorItem','error-outline','#f44336','errorText','requirementsContainer','DNAoW','requirement','mcPeQ','kNigK','XZtvs','kqblF','requirementText','lqoyk','test','#4caf50','TKDeI','Include\x20at\x20least\x20one\x20special\x20character','buttonContainer','backButton','primary','buttonText','backButtonText','gXrTL','nextButton','CWdRa','nextButtonText','EpIvp','PKLio','MbQla','bold','#000','#666','center','#ddd','#f9f9f9','row','600','space-between','transparent','#fff'];_0x4b8e=function(){return _0x45dd93;};return _0x4b8e();}import{COLORS}from'../../constants';export const PinInput=({onSubmit:_0x11987d,minLength:minLength=0x6,requireSpecialChar:requireSpecialChar=!![],requireNumber:requireNumber=!![]})=>{const _0x54cf5c={'zjjkS':function(_0x12a88a,_0x47e743){return _0x12a88a===_0x47e743;},'qGnpM':_0x684b(0x0),'qmKjW':function(_0x3e1c95,_0x5bba41){return _0x3e1c95(_0x5bba41);},'ANwER':function(_0x247a1c,_0x2a8185){return _0x247a1c===_0x2a8185;},'CRPAX':'RzNoj','cXlfp':'PIN\x20must\x20include\x20at\x20least\x20one\x20number','CXJxA':'PIN\x20must\x20include\x20at\x20least\x20one\x20special\x20character','TBxww':function(_0x32d77f,_0x316f58){return _0x32d77f(_0x316f58);},'HXZfQ':_0x684b(0x1),'TdUcO':_0x684b(0x2),'GdLwl':function(_0x33e635,_0x36609e){return _0x33e635!==_0x36609e;},'ZuYbb':_0x684b(0x3),'Nmxwa':function(_0x1eeba3,_0xa9e147){return _0x1eeba3===_0xa9e147;},'vtuRe':'mZNdp','Jwzic':function(_0xa31bdc,_0x477208){return _0xa31bdc(_0x477208);},'eNNSI':function(_0x39cc1c,_0x2f01b4){return _0x39cc1c===_0x2f01b4;},'riifd':_0x684b(0x4),'FUdUh':function(_0x5036f7,_0x23daff){return _0x5036f7(_0x23daff);},'DOyly':function(_0x122338,_0x4bc4f8){return _0x122338(_0x4bc4f8);},'PLZNT':function(_0x195bd9,_0x4b8edb){return _0x195bd9(_0x4b8edb);},'Vxphv':function(_0x177f53,_0x43bd53){return _0x177f53(_0x43bd53);},'DLwna':function(_0x5bd0f2,_0x19a1eb){return _0x5bd0f2(_0x19a1eb);},'LJqhU':function(_0x57d742,_0x251828,_0x2c8b36){return _0x57d742(_0x251828,_0x2c8b36);},'NivdU':function(_0x27f467,_0x538b08,_0x1dac71){return _0x27f467(_0x538b08,_0x1dac71);},'mANbq':function(_0x501fed,_0x2e8312,_0x226dba){return _0x501fed(_0x2e8312,_0x226dba);},'avSME':function(_0x2b1804,_0x1e9327,_0x2575f3){return _0x2b1804(_0x1e9327,_0x2575f3);},'nVlTP':function(_0x3042d6,_0x581ced){return _0x3042d6===_0x581ced;},'yCsFY':_0x684b(0x5),'FullI':_0x684b(0x6),'XyhWj':'Create\x20a\x20PIN','RKFPp':_0x684b(0x7),'oeYuM':function(_0x40e427,_0x303159){return _0x40e427===_0x303159;},'OLJnb':_0x684b(0x8),'WWvMA':_0x684b(0x9),'QTFXa':function(_0xce57d,_0x37a1f4){return _0xce57d===_0x37a1f4;},'CUejA':_0x684b(0xa),'KSjDt':_0x684b(0xb),'oVitb':function(_0x520f7a,_0x417f3d){return _0x520f7a===_0x417f3d;},'GPgYV':_0x684b(0xc),'kqblF':'#999','xuCxi':_0x684b(0xd),'zSvUW':'visibility','ZZXsk':function(_0x24add6,_0x181e31){return _0x24add6>_0x181e31;},'DNAoW':_0x684b(0xe),'mcPeQ':_0x684b(0xf),'TKDeI':_0x684b(0x10),'kNigK':function(_0x384848,_0x2a6bb9){return _0x384848>=_0x2a6bb9;},'XZtvs':'#4caf50','lqoyk':_0x684b(0x11),'Ggdpv':'Include\x20at\x20least\x20one\x20number','wcKxz':function(_0x534345,_0x5dc43c){return _0x534345===_0x5dc43c;},'Ddtrb':'arrow-back','gXrTL':'Back','CWdRa':function(_0x40fba5,_0x32dbce){return _0x40fba5===_0x32dbce;},'rjHDQ':function(_0x17a32a,_0x5504c7){return _0x17a32a>_0x5504c7;},'EpIvp':_0x684b(0x12),'PKLio':_0x684b(0x13),'MbQla':'#fff'},[_0x30a123,_0x41b132]=_0x54cf5c['PLZNT'](useState,''),[_0x424e23,_0x5b4654]=_0x54cf5c[_0x684b(0x14)](useState,''),[_0x7f355b,_0x241d69]=useState(![]),[_0x3bf920,_0x271cfc]=_0x54cf5c[_0x684b(0x15)](useState,[]),[_0x3c7522,_0x1a7d8c]=useState(_0x54cf5c[_0x684b(0x16)]);_0x54cf5c['LJqhU'](useEffect,()=>{_0x54cf5c[_0x684b(0x17)](_0x3c7522,_0x54cf5c[_0x684b(0x16)])&&_0x54cf5c[_0x684b(0x18)](_0x344cb4,_0x30a123);},[_0x30a123,_0x3c7522]);const _0x344cb4=_0x54cf5c[_0x684b(0x19)](useCallback,_0x1e1f59=>{const _0x1cc3af=[];return _0x1e1f59[_0x684b(0x1a)]<minLength&&(_0x54cf5c['ANwER'](_0x54cf5c['CRPAX'],_0x54cf5c['CRPAX'])?_0x1cc3af['push']('PIN\x20must\x20be\x20at\x20least\x20'+minLength+_0x684b(0x1b)):_0x3e245e['push'](_0x684b(0x1c)+_0x7054ae+_0x684b(0x1b))),requireNumber&&!/\d/['test'](_0x1e1f59)&&_0x1cc3af[_0x684b(0x1d)](_0x54cf5c[_0x684b(0x1e)]),requireSpecialChar&&!/[!@#$%^&*(),.?":{}|<>]/['test'](_0x1e1f59)&&_0x1cc3af[_0x684b(0x1d)](_0x54cf5c[_0x684b(0x1f)]),_0x54cf5c[_0x684b(0x20)](_0x271cfc,_0x1cc3af),_0x54cf5c[_0x684b(0x17)](_0x1cc3af[_0x684b(0x1a)],0x0);},[minLength,requireNumber,requireSpecialChar]),_0x4ea34c=_0x54cf5c[_0x684b(0x21)](useCallback,()=>{const _0x48c7e9={'LldAO':_0x54cf5c[_0x684b(0x1f)],'bKRww':function(_0x34375e,_0x45102b){return _0x54cf5c[_0x684b(0x17)](_0x34375e,_0x45102b);},'fFXPH':function(_0x18963e,_0x5c79dc){return _0x54cf5c[_0x684b(0x18)](_0x18963e,_0x5c79dc);},'oXeKh':_0x54cf5c[_0x684b(0x22)],'ZGZtl':function(_0x1affab,_0x279db1){return _0x1affab(_0x279db1);}};_0x54cf5c[_0x684b(0x23)](_0x3c7522,_0x684b(0x0))?_0x54cf5c['TBxww'](_0x344cb4,_0x30a123)&&_0x1a7d8c(_0x54cf5c[_0x684b(0x24)]):_0x54cf5c['GdLwl'](_0x54cf5c[_0x684b(0x25)],_0x54cf5c[_0x684b(0x25)])?_0x36dc96[_0x684b(0x1d)](_0x48c7e9[_0x684b(0x26)]):_0x30a123===_0x424e23?_0x54cf5c['Nmxwa'](_0x54cf5c[_0x684b(0x27)],_0x684b(0x28))?(Keyboard[_0x684b(0x29)](),_0x54cf5c[_0x684b(0x20)](_0x11987d,_0x30a123)):_0x48c7e9[_0x684b(0x2a)](_0x50212c,_0x23cf8f)?(_0x12162d['dismiss'](),_0x48c7e9[_0x684b(0x2b)](_0x28558c,_0x27bb36)):(_0x1da750([_0x48c7e9[_0x684b(0x2c)]]),_0x48c7e9[_0x684b(0x2d)](_0x40698e,'')):(_0x54cf5c[_0x684b(0x2e)](_0x271cfc,[_0x54cf5c[_0x684b(0x22)]]),_0x5b4654(''));},[_0x30a123,_0x424e23,_0x3c7522,_0x344cb4,_0x11987d]),_0x5ce48b=_0x54cf5c[_0x684b(0x2f)](useCallback,()=>{_0x54cf5c[_0x684b(0x30)](_0x684b(0x31),_0x54cf5c[_0x684b(0x32)])?_0xd9df64[_0x684b(0x1d)](_0x54cf5c[_0x684b(0x1e)]):(_0x54cf5c[_0x684b(0x2e)](_0x1a7d8c,_0x54cf5c[_0x684b(0x16)]),_0x5b4654(''),_0x54cf5c['FUdUh'](_0x271cfc,[]));},[]),_0x1cfac1=_0x54cf5c[_0x684b(0x33)](useCallback,()=>{_0x54cf5c[_0x684b(0x34)](_0x241d69,!_0x7f355b);},[_0x7f355b]);return React[_0x684b(0x35)](KeyboardAvoidingView,{'behavior':_0x54cf5c[_0x684b(0x36)](Platform['OS'],_0x684b(0x37))?_0x54cf5c['yCsFY']:_0x54cf5c[_0x684b(0x38)],'style':styles[_0x684b(0x39)]},React[_0x684b(0x35)](View,{'style':styles[_0x684b(0x3a)]},React['createElement'](Text,{'style':styles[_0x684b(0x3b)]},_0x3c7522===_0x54cf5c[_0x684b(0x16)]?_0x54cf5c[_0x684b(0x3c)]:_0x54cf5c['RKFPp']),React['createElement'](Text,{'style':styles[_0x684b(0x3d)]},_0x54cf5c[_0x684b(0x3e)](_0x3c7522,_0x54cf5c[_0x684b(0x16)])?_0x54cf5c[_0x684b(0x3f)]:_0x54cf5c[_0x684b(0x40)]),React[_0x684b(0x35)](View,{'style':styles[_0x684b(0x41)]},React[_0x684b(0x35)](TextInput,{'style':styles[_0x684b(0x42)],'value':_0x54cf5c[_0x684b(0x43)](_0x3c7522,_0x54cf5c[_0x684b(0x16)])?_0x30a123:_0x424e23,'onChangeText':_0x3c7522===_0x54cf5c[_0x684b(0x16)]?_0x41b132:_0x5b4654,'secureTextEntry':!_0x7f355b,'keyboardType':_0x54cf5c[_0x684b(0x44)],'autoCapitalize':_0x54cf5c[_0x684b(0x45)],'autoCorrect':![],'placeholder':_0x54cf5c[_0x684b(0x46)](_0x3c7522,_0x54cf5c[_0x684b(0x16)])?_0x54cf5c['GPgYV']:_0x684b(0x47),'placeholderTextColor':_0x54cf5c['kqblF'],'returnKeyType':_0x684b(0x48),'onSubmitEditing':_0x4ea34c}),React[_0x684b(0x35)](TouchableOpacity,{'style':styles[_0x684b(0x49)],'onPress':_0x1cfac1},React[_0x684b(0x35)](_0x2e31a6,{'name':_0x7f355b?_0x54cf5c[_0x684b(0x4a)]:_0x54cf5c[_0x684b(0x4b)],'size':0x18,'color':_0x684b(0x4c)}))),_0x54cf5c[_0x684b(0x4d)](_0x3bf920[_0x684b(0x1a)],0x0)&&React[_0x684b(0x35)](View,{'style':styles[_0x684b(0x4e)]},_0x3bf920[_0x684b(0x4f)]((_0x375461,_0x175d70)=>React[_0x684b(0x35)](View,{'key':_0x175d70,'style':styles[_0x684b(0x50)]},React[_0x684b(0x35)](_0x2e31a6,{'name':_0x684b(0x51),'size':0x10,'color':_0x684b(0x52)}),React['createElement'](Text,{'style':styles[_0x684b(0x53)]},_0x375461)))),_0x3c7522===_0x54cf5c[_0x684b(0x16)]&&React[_0x684b(0x35)](View,{'style':styles[_0x684b(0x54)]},React[_0x684b(0x35)](Text,{'style':styles['requirementsTitle']},_0x54cf5c[_0x684b(0x55)]),React[_0x684b(0x35)](View,{'style':styles[_0x684b(0x56)]},React[_0x684b(0x35)](_0x2e31a6,{'name':_0x30a123['length']>=minLength?_0x54cf5c[_0x684b(0x57)]:_0x54cf5c['TKDeI'],'size':0x10,'color':_0x54cf5c[_0x684b(0x58)](_0x30a123[_0x684b(0x1a)],minLength)?_0x54cf5c[_0x684b(0x59)]:_0x54cf5c[_0x684b(0x5a)]}),React[_0x684b(0x35)](Text,{'style':[styles[_0x684b(0x5b)],{'color':_0x30a123[_0x684b(0x1a)]>=minLength?_0x54cf5c['XZtvs']:_0x54cf5c[_0x684b(0x5a)]}]},_0x54cf5c[_0x684b(0x5c)],minLength,_0x684b(0x1b))),requireNumber&&React['createElement'](View,{'style':styles[_0x684b(0x56)]},React['createElement'](_0x2e31a6,{'name':/\d/[_0x684b(0x5d)](_0x30a123)?_0x54cf5c[_0x684b(0x57)]:_0x684b(0x10),'size':0x10,'color':/\d/[_0x684b(0x5d)](_0x30a123)?_0x684b(0x5e):_0x54cf5c[_0x684b(0x5a)]}),React[_0x684b(0x35)](Text,{'style':[styles['requirementText'],{'color':/\d/['test'](_0x30a123)?_0x54cf5c['XZtvs']:_0x54cf5c[_0x684b(0x5a)]}]},_0x54cf5c['Ggdpv'])),requireSpecialChar&&React['createElement'](View,{'style':styles['requirement']},React[_0x684b(0x35)](_0x2e31a6,{'name':/[!@#$%^&*(),.?":{}|<>]/[_0x684b(0x5d)](_0x30a123)?_0x684b(0xf):_0x54cf5c[_0x684b(0x5f)],'size':0x10,'color':/[!@#$%^&*(),.?":{}|<>]/[_0x684b(0x5d)](_0x30a123)?_0x54cf5c[_0x684b(0x59)]:_0x54cf5c[_0x684b(0x5a)]}),React[_0x684b(0x35)](Text,{'style':[styles['requirementText'],{'color':/[!@#$%^&*(),.?":{}|<>]/[_0x684b(0x5d)](_0x30a123)?_0x54cf5c['XZtvs']:_0x684b(0x4c)}]},_0x684b(0x60)))),React[_0x684b(0x35)](View,{'style':styles[_0x684b(0x61)]},_0x54cf5c['wcKxz'](_0x3c7522,_0x54cf5c[_0x684b(0x24)])&&React[_0x684b(0x35)](TouchableOpacity,{'style':[styles['button'],styles[_0x684b(0x62)]],'onPress':_0x5ce48b},React['createElement'](_0x2e31a6,{'name':_0x54cf5c['Ddtrb'],'size':0x14,'color':COLORS[_0x684b(0x63)]}),React[_0x684b(0x35)](Text,{'style':[styles[_0x684b(0x64)],styles[_0x684b(0x65)]]},_0x54cf5c[_0x684b(0x66)])),React[_0x684b(0x35)](TouchableOpacity,{'style':[styles['button'],styles[_0x684b(0x67)],_0x54cf5c[_0x684b(0x68)](_0x3c7522,_0x54cf5c[_0x684b(0x16)])&&_0x3bf920[_0x684b(0x1a)]>0x0||_0x3c7522===_0x54cf5c['TdUcO']&&!_0x424e23?styles['disabledButton']:null],'onPress':_0x4ea34c,'disabled':_0x54cf5c[_0x684b(0x3e)](_0x3c7522,_0x684b(0x0))&&_0x54cf5c['rjHDQ'](_0x3bf920['length'],0x0)||_0x54cf5c['eNNSI'](_0x3c7522,_0x54cf5c[_0x684b(0x24)])&&!_0x424e23},React[_0x684b(0x35)](Text,{'style':[styles[_0x684b(0x64)],styles[_0x684b(0x69)]]},_0x54cf5c['eNNSI'](_0x3c7522,_0x684b(0x0))?_0x54cf5c[_0x684b(0x6a)]:'Submit'),React[_0x684b(0x35)](_0x2e31a6,{'name':_0x54cf5c[_0x684b(0x6b)],'size':0x14,'color':_0x54cf5c[_0x684b(0x6c)]})))));};const styles=StyleSheet[_0x684b(0x0)]({'container':{'flex':0x1},'content':{'padding':0x18},'title':{'fontSize':0x18,'fontWeight':_0x684b(0x6d),'marginBottom':0x8,'color':_0x684b(0x6e)},'subtitle':{'fontSize':0x10,'color':_0x684b(0x6f),'marginBottom':0x18},'inputContainer':{'flexDirection':'row','alignItems':_0x684b(0x70),'borderWidth':0x1,'borderColor':_0x684b(0x71),'borderRadius':0x8,'backgroundColor':_0x684b(0x72),'marginBottom':0x10},'input':{'flex':0x1,'paddingHorizontal':0x10,'paddingVertical':0xc,'fontSize':0x10,'color':_0x684b(0x6e)},'visibilityToggle':{'padding':0xc},'errorContainer':{'marginBottom':0x10},'errorItem':{'flexDirection':_0x684b(0x73),'alignItems':_0x684b(0x70),'marginBottom':0x4},'errorText':{'color':'#f44336','marginLeft':0x6},'requirementsContainer':{'backgroundColor':'#f5f5f5','padding':0x10,'borderRadius':0x8,'marginBottom':0x18},'requirementsTitle':{'fontSize':0xe,'fontWeight':_0x684b(0x74),'marginBottom':0x8,'color':_0x684b(0x6e)},'requirement':{'flexDirection':'row','alignItems':_0x684b(0x70),'marginBottom':0x8},'requirementText':{'marginLeft':0x8,'fontSize':0xe},'buttonContainer':{'flexDirection':_0x684b(0x73),'justifyContent':_0x684b(0x75)},'button':{'flexDirection':_0x684b(0x73),'alignItems':'center','paddingVertical':0xc,'paddingHorizontal':0x14,'borderRadius':0x19},'backButton':{'backgroundColor':_0x684b(0x76),'borderWidth':0x1,'borderColor':COLORS[_0x684b(0x63)]},'nextButton':{'backgroundColor':COLORS[_0x684b(0x63)],'minWidth':0x78,'justifyContent':_0x684b(0x70)},'disabledButton':{'backgroundColor':'#ccc'},'buttonText':{'fontSize':0x10,'fontWeight':_0x684b(0x74)},'backButtonText':{'color':COLORS[_0x684b(0x63)],'marginLeft':0x8},'nextButtonText':{'color':_0x684b(0x77),'marginRight':0x8}});
|
|
1
|
+
import React,{useState,useCallback,useEffect}from'react';import{View,Text,StyleSheet,TextInput,TouchableOpacity,Keyboard,KeyboardAvoidingView,Platform}from'react-native';import _0x4761fc from'react-native-vector-icons/MaterialIcons';import{COLORS}from'../../constants';export const PinInput=({onSubmit:_0x1b9ee1,minLength:minLength=0x6,requireSpecialChar:requireSpecialChar=!![],requireNumber:requireNumber=!![]})=>{const _0x1f79eb={'hSItM':function(_0x12596e,_0x22a3bc){return _0x12596e(_0x22a3bc);},'dgWpI':_0x4e31(0x0),'sRBtx':function(_0xfe5fbe,_0x16341b){return _0xfe5fbe(_0x16341b);},'zMaNf':function(_0x342a03,_0x2b111f){return _0x342a03!==_0x2b111f;},'ZdehO':_0x4e31(0x1),'vjOKY':function(_0x2ae3af,_0x968e2a){return _0x2ae3af===_0x968e2a;},'kOyYG':_0x4e31(0x2),'Twbzy':function(_0x45a594,_0x4061d4){return _0x45a594(_0x4061d4);},'NGRHX':function(_0x2fa057,_0x201910){return _0x2fa057<_0x201910;},'OaLpT':'PIN\x20must\x20include\x20at\x20least\x20one\x20number','pWvTC':function(_0x2593a0,_0x199cad){return _0x2593a0(_0x199cad);},'bMmpp':_0x4e31(0x3),'yoENY':function(_0x318571,_0xf13f9e){return _0x318571(_0xf13f9e);},'vypLe':function(_0x382dea,_0x48e79a){return _0x382dea===_0x48e79a;},'wKGVH':_0x4e31(0x4),'AQXMv':function(_0x674189,_0x47c468){return _0x674189(_0x47c468);},'ZXarj':_0x4e31(0x5),'RZCQP':function(_0x1f933c,_0x4b44ec){return _0x1f933c===_0x4b44ec;},'DPtoA':_0x4e31(0x6),'JjSdR':function(_0x1b5330,_0x38d88a){return _0x1b5330(_0x38d88a);},'MFrvd':function(_0x4a1d6b,_0x3c08f2){return _0x4a1d6b(_0x3c08f2);},'YaIyv':function(_0x4ea441,_0x289635){return _0x4ea441(_0x289635);},'xECyS':function(_0x323b5f,_0x135dbb){return _0x323b5f(_0x135dbb);},'wgNhd':'UdvJw','cGrxV':function(_0x57226f,_0x1536f8,_0x26b6be){return _0x57226f(_0x1536f8,_0x26b6be);},'Aktdb':function(_0x338063,_0x29e55d,_0x2d8b92){return _0x338063(_0x29e55d,_0x2d8b92);},'rlzQR':_0x4e31(0x7),'jJSVw':_0x4e31(0x8),'tUfzd':_0x4e31(0x9),'NEhut':function(_0x4f3d98,_0x50f004){return _0x4f3d98===_0x50f004;},'eviAj':_0x4e31(0xa),'sBRKF':_0x4e31(0xb),'OhBlP':function(_0x544454,_0x4519bc){return _0x544454===_0x4519bc;},'KWMfp':_0x4e31(0xc),'Bpvxf':_0x4e31(0xd),'cfIVe':_0x4e31(0xe),'NOHEf':_0x4e31(0xf),'fAqrl':'visibility-off','Cajzm':'visibility','uZBNJ':function(_0x57fe5e,_0x1e9570){return _0x57fe5e>_0x1e9570;},'DwbVn':_0x4e31(0x10),'dMOcP':function(_0x19398c,_0x1cc4bc){return _0x19398c>=_0x1cc4bc;},'tVJsx':_0x4e31(0x11),'WAtLm':_0x4e31(0x12),'HuOPi':'#4caf50','ZbbkG':_0x4e31(0x13),'UVzlu':_0x4e31(0x14),'LVMGd':_0x4e31(0x15),'JnWOH':_0x4e31(0x16),'fntIc':'Back','nRDMh':_0x4e31(0x17),'CBigC':'Submit','CYvOV':_0x4e31(0x18),'bMHrG':_0x4e31(0x19)},[_0x129595,_0x13a60f]=_0x1f79eb[_0x4e31(0x1a)](useState,''),[_0x3d7911,_0x3388ef]=useState(''),[_0xcf9932,_0x2da9ef]=_0x1f79eb['AQXMv'](useState,![]),[_0x5298a6,_0x2adb93]=useState([]),[_0x223e1f,_0x108831]=useState(_0x1f79eb[_0x4e31(0x1b)]);_0x1f79eb['cGrxV'](useEffect,()=>{const _0x43e96b={'vHFBJ':function(_0x41f8e3,_0x5ca8bf){return _0x1f79eb[_0x4e31(0x1c)](_0x41f8e3,_0x5ca8bf);},'npqev':_0x1f79eb[_0x4e31(0x1b)],'melul':function(_0x52aeb5,_0x2e76f2){return _0x1f79eb[_0x4e31(0x1c)](_0x52aeb5,_0x2e76f2);},'vqOJk':function(_0x240638,_0x360e7b){return _0x1f79eb[_0x4e31(0x1d)](_0x240638,_0x360e7b);}};_0x1f79eb[_0x4e31(0x1e)](_0x1f79eb[_0x4e31(0x1f)],_0x1f79eb[_0x4e31(0x1f)])?(_0x43e96b[_0x4e31(0x20)](_0x217fb9,_0x43e96b[_0x4e31(0x21)]),_0x43e96b[_0x4e31(0x22)](_0x48954a,''),_0x43e96b[_0x4e31(0x23)](_0x494606,[])):_0x1f79eb[_0x4e31(0x24)](_0x223e1f,'create')&&(_0x1f79eb[_0x4e31(0x24)](_0x1f79eb[_0x4e31(0x25)],_0x1f79eb['kOyYG'])?_0x1f79eb[_0x4e31(0x26)](_0x201937,_0x129595):_0x271ca2[_0x4e31(0x27)]('PIN\x20must\x20include\x20at\x20least\x20one\x20special\x20character'));},[_0x129595,_0x223e1f]);const _0x201937=_0x1f79eb[_0x4e31(0x28)](useCallback,_0x22003d=>{const _0x4e0335=[];return _0x1f79eb['NGRHX'](_0x22003d[_0x4e31(0x29)],minLength)&&_0x4e0335[_0x4e31(0x27)](_0x4e31(0x2a)+minLength+_0x4e31(0x14)),requireNumber&&!/\d/[_0x4e31(0x2b)](_0x22003d)&&_0x4e0335[_0x4e31(0x27)](_0x1f79eb[_0x4e31(0x2c)]),requireSpecialChar&&!/[!@#$%^&*(),.?":{}|<>]/['test'](_0x22003d)&&_0x4e0335[_0x4e31(0x27)](_0x4e31(0x2d)),_0x1f79eb[_0x4e31(0x1d)](_0x2adb93,_0x4e0335),_0x4e0335['length']===0x0;},[minLength,requireNumber,requireSpecialChar]),_0x2e983e=_0x1f79eb['Aktdb'](useCallback,()=>{_0x1f79eb[_0x4e31(0x2e)](_0x223e1f,_0x1f79eb['dgWpI'])?_0x1f79eb[_0x4e31(0x1e)](_0x1f79eb['wKGVH'],_0x1f79eb['wKGVH'])?_0x258ced('confirm'):_0x1f79eb[_0x4e31(0x1d)](_0x201937,_0x129595)&&_0x1f79eb[_0x4e31(0x2f)](_0x108831,_0x1f79eb['ZXarj']):_0x1f79eb[_0x4e31(0x30)](_0x1f79eb[_0x4e31(0x31)],_0x1f79eb[_0x4e31(0x31)])?_0x1f79eb[_0x4e31(0x2e)](_0x129595,_0x3d7911)?(Keyboard[_0x4e31(0x32)](),_0x1f79eb['JjSdR'](_0x1b9ee1,_0x129595)):(_0x1f79eb['Twbzy'](_0x2adb93,[_0x1f79eb[_0x4e31(0x33)]]),_0x1f79eb['MFrvd'](_0x3388ef,'')):_0x1f79eb[_0x4e31(0x24)](_0x599dac,_0x4f7558)?(_0x2dbe5d['dismiss'](),_0x1f79eb[_0x4e31(0x26)](_0x5b09b1,_0x1768c6)):(_0x1f79eb[_0x4e31(0x34)](_0x2a7591,[_0x1f79eb['bMmpp']]),_0x1f79eb[_0x4e31(0x35)](_0x38c456,''));},[_0x129595,_0x3d7911,_0x223e1f,_0x201937,_0x1b9ee1]),_0x3e8467=_0x1f79eb[_0x4e31(0x36)](useCallback,()=>{_0x1f79eb[_0x4e31(0x37)](_0x108831,_0x4e31(0x0)),_0x1f79eb[_0x4e31(0x1d)](_0x3388ef,''),_0x1f79eb[_0x4e31(0x38)](_0x2adb93,[]);},[]),_0x617501=useCallback(()=>{const _0x415fcc={'htkso':_0x1f79eb[_0x4e31(0x2c)]};'UdvJw'!==_0x1f79eb[_0x4e31(0x39)]?_0x18ae6d['push'](_0x415fcc[_0x4e31(0x3a)]):_0x2da9ef(!_0xcf9932);},[_0xcf9932]);return React['createElement'](KeyboardAvoidingView,{'behavior':Platform['OS']===_0x4e31(0x3b)?_0x1f79eb[_0x4e31(0x3c)]:_0x1f79eb[_0x4e31(0x3d)],'style':styles[_0x4e31(0x3e)]},React[_0x4e31(0x3f)](View,{'style':styles[_0x4e31(0x40)]},React[_0x4e31(0x3f)](Text,{'style':styles[_0x4e31(0x41)]},_0x1f79eb[_0x4e31(0x30)](_0x223e1f,_0x1f79eb['dgWpI'])?_0x1f79eb[_0x4e31(0x42)]:_0x4e31(0x43)),React['createElement'](Text,{'style':styles['subtitle']},_0x1f79eb['NEhut'](_0x223e1f,_0x1f79eb[_0x4e31(0x1b)])?_0x1f79eb[_0x4e31(0x44)]:_0x1f79eb[_0x4e31(0x45)]),React[_0x4e31(0x3f)](View,{'style':styles[_0x4e31(0x46)]},React['createElement'](TextInput,{'style':styles[_0x4e31(0x47)],'value':_0x1f79eb[_0x4e31(0x48)](_0x223e1f,_0x1f79eb[_0x4e31(0x1b)])?_0x129595:_0x3d7911,'onChangeText':_0x1f79eb[_0x4e31(0x48)](_0x223e1f,_0x1f79eb['dgWpI'])?_0x13a60f:_0x3388ef,'secureTextEntry':!_0xcf9932,'keyboardType':_0x1f79eb[_0x4e31(0x49)],'autoCapitalize':_0x4e31(0x4a),'autoCorrect':![],'placeholder':_0x1f79eb['OhBlP'](_0x223e1f,_0x1f79eb['dgWpI'])?_0x1f79eb[_0x4e31(0x4b)]:_0x4e31(0x4c),'placeholderTextColor':_0x1f79eb[_0x4e31(0x4d)],'returnKeyType':_0x1f79eb['NOHEf'],'onSubmitEditing':_0x2e983e}),React[_0x4e31(0x3f)](TouchableOpacity,{'style':styles[_0x4e31(0x4e)],'onPress':_0x617501},React[_0x4e31(0x3f)](_0x4761fc,{'name':_0xcf9932?_0x1f79eb[_0x4e31(0x4f)]:_0x1f79eb[_0x4e31(0x50)],'size':0x18,'color':_0x1f79eb[_0x4e31(0x4d)]}))),_0x1f79eb[_0x4e31(0x51)](_0x5298a6['length'],0x0)&&React[_0x4e31(0x3f)](View,{'style':styles[_0x4e31(0x52)]},_0x5298a6[_0x4e31(0x53)]((_0x172ca0,_0x3d6592)=>React[_0x4e31(0x3f)](View,{'key':_0x3d6592,'style':styles[_0x4e31(0x54)]},React[_0x4e31(0x3f)](_0x4761fc,{'name':_0x4e31(0x55),'size':0x10,'color':_0x4e31(0x56)}),React[_0x4e31(0x3f)](Text,{'style':styles['errorText']},_0x172ca0)))),_0x1f79eb[_0x4e31(0x57)](_0x223e1f,_0x4e31(0x0))&&React[_0x4e31(0x3f)](View,{'style':styles[_0x4e31(0x58)]},React['createElement'](Text,{'style':styles['requirementsTitle']},_0x1f79eb['DwbVn']),React[_0x4e31(0x3f)](View,{'style':styles['requirement']},React[_0x4e31(0x3f)](_0x4761fc,{'name':_0x1f79eb[_0x4e31(0x59)](_0x129595[_0x4e31(0x29)],minLength)?_0x1f79eb[_0x4e31(0x5a)]:_0x1f79eb['WAtLm'],'size':0x10,'color':_0x129595[_0x4e31(0x29)]>=minLength?_0x1f79eb[_0x4e31(0x5b)]:_0x1f79eb[_0x4e31(0x4d)]}),React[_0x4e31(0x3f)](Text,{'style':[styles[_0x4e31(0x5c)],{'color':_0x1f79eb['dMOcP'](_0x129595[_0x4e31(0x29)],minLength)?_0x1f79eb[_0x4e31(0x5b)]:_0x1f79eb[_0x4e31(0x4d)]}]},_0x1f79eb['ZbbkG'],minLength,_0x1f79eb[_0x4e31(0x5d)])),requireNumber&&React[_0x4e31(0x3f)](View,{'style':styles['requirement']},React[_0x4e31(0x3f)](_0x4761fc,{'name':/\d/[_0x4e31(0x2b)](_0x129595)?_0x1f79eb[_0x4e31(0x5a)]:_0x1f79eb[_0x4e31(0x5e)],'size':0x10,'color':/\d/['test'](_0x129595)?_0x1f79eb[_0x4e31(0x5b)]:_0x1f79eb[_0x4e31(0x4d)]}),React['createElement'](Text,{'style':[styles[_0x4e31(0x5c)],{'color':/\d/[_0x4e31(0x2b)](_0x129595)?_0x1f79eb[_0x4e31(0x5b)]:_0x1f79eb[_0x4e31(0x4d)]}]},'Include\x20at\x20least\x20one\x20number')),requireSpecialChar&&React[_0x4e31(0x3f)](View,{'style':styles[_0x4e31(0x5f)]},React[_0x4e31(0x3f)](_0x4761fc,{'name':/[!@#$%^&*(),.?":{}|<>]/['test'](_0x129595)?_0x1f79eb['tVJsx']:_0x1f79eb[_0x4e31(0x5e)],'size':0x10,'color':/[!@#$%^&*(),.?":{}|<>]/[_0x4e31(0x2b)](_0x129595)?_0x1f79eb[_0x4e31(0x5b)]:_0x4e31(0xe)}),React[_0x4e31(0x3f)](Text,{'style':[styles['requirementText'],{'color':/[!@#$%^&*(),.?":{}|<>]/['test'](_0x129595)?_0x1f79eb[_0x4e31(0x5b)]:_0x1f79eb['cfIVe']}]},_0x1f79eb[_0x4e31(0x60)]))),React[_0x4e31(0x3f)](View,{'style':styles[_0x4e31(0x61)]},_0x1f79eb['RZCQP'](_0x223e1f,_0x1f79eb[_0x4e31(0x62)])&&React[_0x4e31(0x3f)](TouchableOpacity,{'style':[styles['button'],styles[_0x4e31(0x63)]],'onPress':_0x3e8467},React['createElement'](_0x4761fc,{'name':_0x1f79eb[_0x4e31(0x64)],'size':0x14,'color':COLORS[_0x4e31(0x65)]}),React['createElement'](Text,{'style':[styles[_0x4e31(0x66)],styles[_0x4e31(0x67)]]},_0x1f79eb[_0x4e31(0x68)])),React[_0x4e31(0x3f)](TouchableOpacity,{'style':[styles[_0x4e31(0x69)],styles[_0x4e31(0x6a)],_0x223e1f===_0x1f79eb['dgWpI']&&_0x1f79eb[_0x4e31(0x51)](_0x5298a6[_0x4e31(0x29)],0x0)||_0x1f79eb[_0x4e31(0x48)](_0x223e1f,_0x1f79eb[_0x4e31(0x62)])&&!_0x3d7911?styles[_0x4e31(0x6b)]:null],'onPress':_0x2e983e,'disabled':_0x223e1f===_0x4e31(0x0)&&_0x1f79eb[_0x4e31(0x51)](_0x5298a6[_0x4e31(0x29)],0x0)||_0x1f79eb[_0x4e31(0x2e)](_0x223e1f,_0x4e31(0x5))&&!_0x3d7911},React[_0x4e31(0x3f)](Text,{'style':[styles[_0x4e31(0x66)],styles[_0x4e31(0x6c)]]},_0x223e1f===_0x1f79eb[_0x4e31(0x1b)]?_0x1f79eb[_0x4e31(0x6d)]:_0x1f79eb[_0x4e31(0x6e)]),React['createElement'](_0x4761fc,{'name':_0x1f79eb[_0x4e31(0x6f)],'size':0x14,'color':_0x1f79eb['bMHrG']})))));};const styles=StyleSheet[_0x4e31(0x0)]({'container':{'flex':0x1},'content':{'padding':0x18},'title':{'fontSize':0x18,'fontWeight':_0x4e31(0x70),'marginBottom':0x8,'color':'#000'},'subtitle':{'fontSize':0x10,'color':_0x4e31(0x71),'marginBottom':0x18},'inputContainer':{'flexDirection':_0x4e31(0x72),'alignItems':_0x4e31(0x73),'borderWidth':0x1,'borderColor':_0x4e31(0x74),'borderRadius':0x8,'backgroundColor':_0x4e31(0x75),'marginBottom':0x10},'input':{'flex':0x1,'paddingHorizontal':0x10,'paddingVertical':0xc,'fontSize':0x10,'color':_0x4e31(0x76)},'visibilityToggle':{'padding':0xc},'errorContainer':{'marginBottom':0x10},'errorItem':{'flexDirection':_0x4e31(0x72),'alignItems':'center','marginBottom':0x4},'errorText':{'color':_0x4e31(0x56),'marginLeft':0x6},'requirementsContainer':{'backgroundColor':_0x4e31(0x77),'padding':0x10,'borderRadius':0x8,'marginBottom':0x18},'requirementsTitle':{'fontSize':0xe,'fontWeight':_0x4e31(0x78),'marginBottom':0x8,'color':_0x4e31(0x76)},'requirement':{'flexDirection':_0x4e31(0x72),'alignItems':_0x4e31(0x73),'marginBottom':0x8},'requirementText':{'marginLeft':0x8,'fontSize':0xe},'buttonContainer':{'flexDirection':_0x4e31(0x72),'justifyContent':_0x4e31(0x79)},'button':{'flexDirection':'row','alignItems':_0x4e31(0x73),'paddingVertical':0xc,'paddingHorizontal':0x14,'borderRadius':0x19},'backButton':{'backgroundColor':_0x4e31(0x7a),'borderWidth':0x1,'borderColor':COLORS[_0x4e31(0x65)]},'nextButton':{'backgroundColor':COLORS[_0x4e31(0x65)],'minWidth':0x78,'justifyContent':_0x4e31(0x73)},'disabledButton':{'backgroundColor':_0x4e31(0x7b)},'buttonText':{'fontSize':0x10,'fontWeight':_0x4e31(0x78)},'backButtonText':{'color':COLORS['primary'],'marginLeft':0x8},'nextButtonText':{'color':_0x4e31(0x19),'marginRight':0x8}});function _0x4e31(_0x1d2f1e,_0x4e3138){_0x1d2f1e=_0x1d2f1e-0x0;const _0x5ecf45=_0x1d2f();let _0x35b6f0=_0x5ecf45[_0x1d2f1e];return _0x35b6f0;}function _0x1d2f(){const _0x36c042=['create','GEHGK','llkaX','PINs\x20do\x20not\x20match','IqADi','confirm','SLRZb','padding','height','Create\x20a\x20PIN','This\x20PIN\x20will\x20protect\x20your\x20Onairos\x20account','Please\x20re-enter\x20your\x20PIN\x20to\x20confirm','default','Enter\x20PIN','#999','done','PIN\x20Requirements:','check-circle','radio-button-unchecked','At\x20least\x20','\x20characters','Include\x20at\x20least\x20one\x20special\x20character','arrow-back','Next','arrow-forward','#fff','MFrvd','dgWpI','hSItM','sRBtx','zMaNf','ZdehO','vHFBJ','npqev','melul','vqOJk','vjOKY','kOyYG','Twbzy','push','cGrxV','length','PIN\x20must\x20be\x20at\x20least\x20','test','OaLpT','PIN\x20must\x20include\x20at\x20least\x20one\x20special\x20character','vypLe','AQXMv','RZCQP','DPtoA','dismiss','bMmpp','pWvTC','yoENY','Aktdb','YaIyv','xECyS','wgNhd','htkso','ios','rlzQR','jJSVw','container','createElement','content','title','tUfzd','Confirm\x20your\x20PIN','eviAj','sBRKF','inputContainer','input','OhBlP','KWMfp','none','Bpvxf','Confirm\x20PIN','cfIVe','visibilityToggle','fAqrl','Cajzm','uZBNJ','errorContainer','map','errorItem','error-outline','#f44336','NEhut','requirementsContainer','dMOcP','tVJsx','HuOPi','requirementText','UVzlu','WAtLm','requirement','LVMGd','buttonContainer','ZXarj','backButton','JnWOH','primary','buttonText','backButtonText','fntIc','button','nextButton','disabledButton','nextButtonText','nRDMh','CBigC','CYvOV','bold','#666','row','center','#ddd','#f9f9f9','#000','#f5f5f5','600','space-between','transparent','#ccc'];_0x1d2f=function(){return _0x36c042;};return _0x1d2f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React,{useState}from'react';function
|
|
1
|
+
import React,{useState}from'react';import{View,Text,StyleSheet,TouchableOpacity,ActivityIndicator,ScrollView}from'react-native';function _0x30c7(_0x134aa5,_0x30c7b4){_0x134aa5=_0x134aa5-0x0;const _0x3b77c7=_0x134a();let _0x110c83=_0x3b77c7[_0x134aa5];return _0x110c83;}import _0x20eafa from'react-native-vector-icons/MaterialIcons';function _0x134a(){const _0x63b599=['photo-camera','#E1306C','YouTube','smart-display','Connect\x20for\x20YouTube\x20video\x20recommendations\x20and\x20analysis','Pinterest','push-pin','#E60023','Reddit','forum','#FF4500','Connect\x20to\x20personalize\x20Reddit\x20content\x20insights','#fff','small','Disconnect','Connect','Urufk','Connect\x20Your\x20Platforms','\x20of\x20','\x20platforms\x20connected','Continue','arrow-forward','#999','iPinu','zbGba','uekbp','CmdEF','XqHob','LwrZr','QlqLF','JdJwM','createElement','platformInfo','platformIcon','color','icon','tBmuD','platformText','name','platformDescription','Connected\x20as\x20','description','platformButton','disconnectButton','connectButton','buttonText','Hubbt','nUpUe','xVwxc','gkIkm','URAsg','qjNbD','values','filter','length','container','title','FucBS','subtitle','yTaSL','platformList','keys','platformItem','footer','connectionStatus','iYZhZ','qltLz','proceedButton','proceedInactive','proceedTextActive','proceedTextInactive','hHpkQ','ZuEqz','https://oauth.example.com/','log','#000','#666','row','center','#f8f8f8','#f44336','600','space-between','primary','#eee'];_0x134a=function(){return _0x63b599;};return _0x134a();}import{COLORS}from'../../constants';import{OAuthWebView}from'./OAuthWebView';const PLATFORMS={'instagram':{'name':'Instagram','icon':_0x30c7(0x0),'color':_0x30c7(0x1),'description':'Connect\x20to\x20share\x20and\x20analyze\x20your\x20Instagram\x20content'},'youtube':{'name':_0x30c7(0x2),'icon':_0x30c7(0x3),'color':'#FF0000','description':_0x30c7(0x4)},'pinterest':{'name':_0x30c7(0x5),'icon':_0x30c7(0x6),'color':_0x30c7(0x7),'description':'Connect\x20to\x20enhance\x20Pinterest\x20board\x20recommendations'},'reddit':{'name':_0x30c7(0x8),'icon':_0x30c7(0x9),'color':_0x30c7(0xa),'description':_0x30c7(0xb)}};export const PlatformConnector=({connections:_0x428353,onConnect:_0x2b9f01,onDisconnect:_0x444e31,isLoading:_0x1b5b21,canProceed:_0x363091,onProceed:_0x113ffe})=>{const _0x3d503f={'zbGba':function(_0x3a2e1d,_0x417e4d){return _0x3a2e1d===_0x417e4d;},'uekbp':_0x30c7(0xc),'CmdEF':_0x30c7(0xd),'XqHob':_0x30c7(0xe),'LwrZr':_0x30c7(0xf),'sqxAJ':function(_0x48530d,_0x5f0718){return _0x48530d!==_0x5f0718;},'QlqLF':'wrzEx','xVwxc':function(_0x459188,_0x215df8){return _0x459188(_0x215df8);},'gkIkm':_0x30c7(0x10),'qjNbD':function(_0x354b93,_0x8b2045){return _0x354b93(_0x8b2045);},'FubPi':function(_0x25f546){return _0x25f546();},'iPinu':function(_0x14d5b8,_0x7e53f3){return _0x14d5b8(_0x7e53f3);},'FucBS':_0x30c7(0x11),'yTaSL':'Connect\x20at\x20least\x202\x20platforms\x20to\x20create\x20your\x20Onairos\x20account','iYZhZ':function(_0x5887da){return _0x5887da();},'TcoYM':_0x30c7(0x12),'qltLz':_0x30c7(0x13),'hHpkQ':_0x30c7(0x14),'HwqNX':_0x30c7(0x15),'ZuEqz':_0x30c7(0x16)},[_0x18e82b,_0x2fc984]=_0x3d503f[_0x30c7(0x17)](useState,null),_0x2d0cf1=async _0x164a7d=>{const _0xfb12c7={'JdJwM':function(_0x1019ac,_0x1d627a){return _0x3d503f[_0x30c7(0x18)](_0x1019ac,_0x1d627a);},'tBmuD':_0x3d503f[_0x30c7(0x19)],'fnVad':_0x3d503f[_0x30c7(0x1a)],'Hubbt':_0x3d503f[_0x30c7(0x1b)],'nUpUe':_0x3d503f[_0x30c7(0x1c)]};if(_0x3d503f['sqxAJ'](_0x3d503f[_0x30c7(0x1d)],_0x3d503f[_0x30c7(0x1d)])){var _0x6ffffa;const _0x5a6b32=_0x25f41d[_0x23ee79],_0x8191f9=_0x53decb(_0x36943e),_0x17286a=_0x8191f9?(_0x6ffffa=_0x3b85a5[_0x177852])===null||_0xfb12c7[_0x30c7(0x1e)](_0x6ffffa,void 0x0)?void 0x0:_0x6ffffa['userName']:null;return React[_0x30c7(0x1f)](View,{'key':_0x2f6a7d,'style':_0x5d6469['platformItem']},React['createElement'](View,{'style':_0x174789[_0x30c7(0x20)]},React['createElement'](View,{'style':[_0x4e96de[_0x30c7(0x21)],{'backgroundColor':_0x5a6b32[_0x30c7(0x22)]}]},React[_0x30c7(0x1f)](_0x45040e,{'name':_0x5a6b32[_0x30c7(0x23)],'size':0x18,'color':_0xfb12c7[_0x30c7(0x24)]})),React['createElement'](View,{'style':_0xd36b8f[_0x30c7(0x25)]},React[_0x30c7(0x1f)](Text,{'style':_0x32a7fa['platformName']},_0x5a6b32[_0x30c7(0x26)]),React[_0x30c7(0x1f)](Text,{'style':_0x4cf53f[_0x30c7(0x27)]},_0x8191f9?_0x30c7(0x28)+_0x17286a:_0x5a6b32[_0x30c7(0x29)]))),React[_0x30c7(0x1f)](TouchableOpacity,{'style':[_0x1a1ef1[_0x30c7(0x2a)],_0x8191f9?_0x1ed86a[_0x30c7(0x2b)]:_0x5a85f6[_0x30c7(0x2c)]],'onPress':()=>_0x8191f9?_0x5d48e2(_0x35cae3):_0x52754d(_0x1a29d1),'disabled':_0x25244c},_0x41161b?React[_0x30c7(0x1f)](ActivityIndicator,{'size':_0xfb12c7['fnVad'],'color':_0xfb12c7['tBmuD']}):React[_0x30c7(0x1f)](Text,{'style':_0x5c9fe3[_0x30c7(0x2d)]},_0x8191f9?_0xfb12c7[_0x30c7(0x2e)]:_0xfb12c7[_0x30c7(0x2f)])));}else _0x3d503f[_0x30c7(0x30)](_0x2fc984,_0x164a7d);},_0x3879f4=()=>{_0x3d503f['zbGba'](_0x3d503f[_0x30c7(0x31)],_0x30c7(0x32))?_0x54a236(null):_0x3d503f[_0x30c7(0x30)](_0x2fc984,null);},_0x14ec08=()=>{_0x3d503f[_0x30c7(0x30)](_0x2fc984,null);},_0x31cf93=async _0x243320=>{await _0x3d503f[_0x30c7(0x33)](_0x444e31,_0x243320);},_0x32ba0d=_0x533b28=>{const _0x12f094=_0x533b28;return _0x428353[_0x12f094]?!![]:![];},_0x511be4=()=>{return Object[_0x30c7(0x34)](_0x428353)[_0x30c7(0x35)](Boolean)[_0x30c7(0x36)];};return React[_0x30c7(0x1f)](View,{'style':styles[_0x30c7(0x37)]},React[_0x30c7(0x1f)](Text,{'style':styles[_0x30c7(0x38)]},_0x3d503f[_0x30c7(0x39)]),React['createElement'](Text,{'style':styles[_0x30c7(0x3a)]},_0x3d503f[_0x30c7(0x3b)]),React[_0x30c7(0x1f)](ScrollView,{'style':styles[_0x30c7(0x3c)]},Object[_0x30c7(0x3d)](PLATFORMS)['map'](_0x46c3b2=>{var _0x2506de;const _0x2bf96a=PLATFORMS[_0x46c3b2],_0x510e22=_0x32ba0d(_0x46c3b2),_0x2aaf13=_0x510e22?_0x3d503f['zbGba'](_0x2506de=_0x428353[_0x46c3b2],null)||_0x2506de===void 0x0?void 0x0:_0x2506de['userName']:null;return React['createElement'](View,{'key':_0x46c3b2,'style':styles[_0x30c7(0x3e)]},React['createElement'](View,{'style':styles[_0x30c7(0x20)]},React[_0x30c7(0x1f)](View,{'style':[styles[_0x30c7(0x21)],{'backgroundColor':_0x2bf96a['color']}]},React['createElement'](_0x20eafa,{'name':_0x2bf96a['icon'],'size':0x18,'color':_0x3d503f[_0x30c7(0x19)]})),React[_0x30c7(0x1f)](View,{'style':styles[_0x30c7(0x25)]},React['createElement'](Text,{'style':styles['platformName']},_0x2bf96a[_0x30c7(0x26)]),React[_0x30c7(0x1f)](Text,{'style':styles[_0x30c7(0x27)]},_0x510e22?'Connected\x20as\x20'+_0x2aaf13:_0x2bf96a['description']))),React['createElement'](TouchableOpacity,{'style':[styles[_0x30c7(0x2a)],_0x510e22?styles[_0x30c7(0x2b)]:styles[_0x30c7(0x2c)]],'onPress':()=>_0x510e22?_0x31cf93(_0x46c3b2):_0x2d0cf1(_0x46c3b2),'disabled':_0x1b5b21},_0x1b5b21?React[_0x30c7(0x1f)](ActivityIndicator,{'size':_0x30c7(0xd),'color':_0x3d503f[_0x30c7(0x19)]}):React[_0x30c7(0x1f)](Text,{'style':styles[_0x30c7(0x2d)]},_0x510e22?_0x30c7(0xe):_0x3d503f['LwrZr'])));})),React[_0x30c7(0x1f)](View,{'style':styles[_0x30c7(0x3f)]},React[_0x30c7(0x1f)](Text,{'style':styles[_0x30c7(0x40)]},_0x3d503f[_0x30c7(0x41)](_0x511be4),_0x3d503f['TcoYM'],Object[_0x30c7(0x3d)](PLATFORMS)[_0x30c7(0x36)],_0x3d503f[_0x30c7(0x42)]),React[_0x30c7(0x1f)](TouchableOpacity,{'style':[styles[_0x30c7(0x43)],_0x363091?styles['proceedActive']:styles[_0x30c7(0x44)]],'onPress':_0x113ffe,'disabled':!_0x363091},React['createElement'](Text,{'style':[styles['proceedText'],_0x363091?styles[_0x30c7(0x45)]:styles[_0x30c7(0x46)]]},_0x3d503f[_0x30c7(0x47)]),React['createElement'](_0x20eafa,{'name':_0x3d503f['HwqNX'],'size':0x14,'color':_0x363091?_0x3d503f[_0x30c7(0x19)]:_0x3d503f[_0x30c7(0x48)]}))),_0x18e82b&&React[_0x30c7(0x1f)](OAuthWebView,{'url':_0x30c7(0x49)+_0x18e82b,'platform':_0x18e82b,'onComplete':_0x3879f4,'onClose':_0x14ec08,'onSuccess':_0x5257e0=>{console[_0x30c7(0x4a)]('Received\x20authorization\x20code\x20for\x20'+_0x18e82b+':\x20'+_0x5257e0),_0x3d503f['FubPi'](_0x3879f4);}}));};const styles=StyleSheet['create']({'container':{'flex':0x1,'padding':0x10},'title':{'fontSize':0x18,'fontWeight':'bold','marginBottom':0x8,'color':_0x30c7(0x4b)},'subtitle':{'fontSize':0x10,'color':_0x30c7(0x4c),'marginBottom':0x18},'platformList':{'flex':0x1},'platformItem':{'flexDirection':_0x30c7(0x4d),'alignItems':_0x30c7(0x4e),'marginBottom':0x10,'padding':0xc,'backgroundColor':_0x30c7(0x4f),'borderRadius':0xc,'borderWidth':0x1,'borderColor':'#eee'},'platformInfo':{'flex':0x1,'flexDirection':'row','alignItems':_0x30c7(0x4e)},'platformIcon':{'width':0x28,'height':0x28,'borderRadius':0x14,'justifyContent':_0x30c7(0x4e),'alignItems':_0x30c7(0x4e),'marginRight':0xc},'platformText':{'flex':0x1},'platformName':{'fontSize':0x10,'fontWeight':'600','marginBottom':0x4,'color':'#000'},'platformDescription':{'fontSize':0xe,'color':'#666'},'platformButton':{'paddingHorizontal':0x10,'paddingVertical':0x8,'borderRadius':0x14,'justifyContent':_0x30c7(0x4e),'alignItems':_0x30c7(0x4e),'minWidth':0x64},'connectButton':{'backgroundColor':COLORS['primary']},'disconnectButton':{'backgroundColor':_0x30c7(0x50)},'buttonText':{'color':'#fff','fontWeight':_0x30c7(0x51)},'footer':{'flexDirection':_0x30c7(0x4d),'alignItems':_0x30c7(0x4e),'justifyContent':_0x30c7(0x52),'paddingTop':0x10,'borderTopWidth':0x1,'borderTopColor':'#eee','marginTop':0x10},'connectionStatus':{'fontSize':0xe,'color':'#666'},'proceedButton':{'flexDirection':_0x30c7(0x4d),'alignItems':_0x30c7(0x4e),'paddingHorizontal':0x10,'paddingVertical':0xa,'borderRadius':0x18},'proceedActive':{'backgroundColor':COLORS[_0x30c7(0x53)]},'proceedInactive':{'backgroundColor':_0x30c7(0x54)},'proceedText':{'fontWeight':_0x30c7(0x51),'marginRight':0x8},'proceedTextActive':{'color':_0x30c7(0xc)},'proceedTextInactive':{'color':'#999'}});
|
package/lib/module/config/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAuthToken}from'../services/authService';function
|
|
1
|
+
function _0x45fc(_0x1bd59a,_0x45fc11){_0x1bd59a=_0x1bd59a-0x0;const _0x2a54da=_0x1bd5();let _0x53eec5=_0x2a54da[_0x1bd59a];return _0x53eec5;}import{getAuthToken}from'../services/authService';function _0x1bd5(){const _0xc030dd=['/auth','/user','/connections','/training','/oauth','User\x20not\x20authenticated\x20-\x20no\x20JWT\x20token\x20found','WkONn','Pjcsz','Bearer\x20'];_0x1bd5=function(){return _0xc030dd;};return _0x1bd5();}export const API_CONFIG={'BASE_URL':'https://api2.onairos.uk','ENDPOINTS':{'AUTH':_0x45fc(0x0),'USER':_0x45fc(0x1),'CONNECTIONS':_0x45fc(0x2),'TRAINING':_0x45fc(0x3),'OAUTH':_0x45fc(0x4)},'TIMEOUT':0x7530};export const getApiHeaders=()=>({'Content-Type':'application/json','Accept':'application/json'});export const getAuthHeaders=_0x37650a=>({...getApiHeaders(),..._0x37650a&&{'Authorization':'Bearer\x20'+_0x37650a}});export const getUserAuthHeaders=async()=>{const _0x4cc6f1={'WkONn':_0x45fc(0x5),'Pjcsz':function(_0x207dbc){return _0x207dbc();}},_0x59dd15=await getAuthToken();if(!_0x59dd15)throw new Error(_0x4cc6f1[_0x45fc(0x6)]);return{..._0x4cc6f1[_0x45fc(0x7)](getApiHeaders),'Authorization':_0x45fc(0x8)+_0x59dd15};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{API_CONFIG}from'../config/api';export const COLORS={'primary':
|
|
1
|
+
import{API_CONFIG}from'../config/api';export const COLORS={'primary':_0x100a(0x0),'headerBg':'#F8F9FA','text':{'primary':'#000000','secondary':_0x100a(0x1)},'border':_0x100a(0x2),'success':_0x100a(0x3),'error':_0x100a(0x4),'instagram':_0x100a(0x5),'pinterest':_0x100a(0x6),'reddit':_0x100a(0x7),'youtube':_0x100a(0x8),'chatgpt':_0x100a(0x9),'llm':'#10A37F','white':_0x100a(0xa),'black':_0x100a(0xb),'gray':_0x100a(0x1),'lightGray':_0x100a(0x2)};export const PLATFORMS={'instagram':{'name':_0x100a(0xc),'icon':_0x100a(0xd),'color':COLORS[_0x100a(0xd)],'description':_0x100a(0xe)},'pinterest':{'name':'Pinterest','icon':_0x100a(0xf),'color':COLORS[_0x100a(0xf)],'description':_0x100a(0x10)},'reddit':{'name':_0x100a(0x11),'icon':'reddit','color':COLORS[_0x100a(0x12)],'description':'Connect\x20Reddit\x20to\x20enhance\x20your\x20AI\x20model'},'youtube':{'name':_0x100a(0x13),'icon':_0x100a(0x14),'color':COLORS[_0x100a(0x14)],'description':'Use\x20YouTube\x20data\x20to\x20improve\x20AI\x20recommendations'},'chatgpt':{'name':_0x100a(0x15),'icon':_0x100a(0x16),'color':COLORS['chatgpt'],'description':_0x100a(0x17)},'llm':{'name':_0x100a(0x18),'icon':_0x100a(0x19),'color':COLORS[_0x100a(0x1a)],'description':_0x100a(0x1b)}};export const API_ENDPOINTS={'base':API_CONFIG['BASE_URL'],'oauth':{'instagram':_0x100a(0x1c),'pinterest':_0x100a(0x1d),'reddit':'/reddit/auth','youtube':_0x100a(0x1e),'chatgpt':_0x100a(0x1f),'llm':'/chatgpt/auth'},'callback':{'instagram':'/instagram/callback','pinterest':_0x100a(0x20),'reddit':'/reddit/callback','youtube':'/youtube/callback','chatgpt':_0x100a(0x21),'llm':_0x100a(0x21)},'llm':{'dataIngest':'/llmdata','dataRequest':_0x100a(0x22)}};export const STORAGE_KEYS={'credentials':_0x100a(0x23),'connections':'onairos_connections'};export const PIN_REQUIREMENTS={'minLength':0x8,'requireUppercase':!![],'requireLowercase':!![],'requireNumber':!![],'requireSpecialChar':!![]};function _0x100a(_0x3c4401,_0x100a14){_0x3c4401=_0x3c4401-0x0;const _0x53b3d7=_0x3c44();let _0x26e651=_0x53b3d7[_0x3c4401];return _0x26e651;}export const DEEP_LINK_CONFIG={'scheme':_0x100a(0x24),'host':_0x100a(0x25),'redirectUri':_0x100a(0x26)};function _0x3c44(){const _0x5b57da=['#1BA9D4','#666666','#E5E5E5','#34C759','#FF3B30','#E1306C','#E60023','#FF4500','#FF0000','#10A37F','#FFFFFF','#000000','Instagram','instagram','Connect\x20your\x20Instagram\x20account\x20to\x20train\x20your\x20AI\x20model','pinterest','Use\x20your\x20Pinterest\x20boards\x20for\x20AI\x20training','Reddit','reddit','YouTube','youtube','ChatGPT','chat','Connect\x20your\x20ChatGPT\x20conversations\x20for\x20AI\x20insights','LLM\x20Data','psychology','llm','Connect\x20your\x20AI\x20conversation\x20data','/instagram/auth','/pinterest/auth','/youtube/auth','/chatgpt/auth','/pinterest/callback','/chatgpt/callback','/llmdata/request','onairos_credentials','onairosanime','authenticate','onairosanime://auth/'];_0x3c44=function(){return _0x5b57da;};return _0x3c44();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React,{createContext,useState,useEffect,useContext}from'react';import AsyncStorage from'@react-native-async-storage/async-storage';import{saveAuthToken,getAuthToken,removeAuthToken,verifyToken,getUserProfile,authenticateWithApple,authenticateWithOnairos,updateUserOnboardedStatus}from'../services/authService';import{saveAuthState,clearUserData,getResumeTarget,markStepCompleted,updateLastScreen,isReturningUser,markEventPageReached,hasEventAccessToken}from'../services/storageService';const AuthContext=createContext(undefined);export const AuthProvider=({children:_0xc2aa8f})=>{const _0x1348e2={'Imbzo':_0x416a(0x0),'iPYjv':function(_0x572756,_0x34deb9){return _0x572756(_0x34deb9);},'LoIdK':function(_0x457255){return _0x457255();},'VEFjQ':function(_0x4879fd,_0x25fe08){return _0x4879fd&&_0x25fe08;},'RvzLw':function(_0x4a6085,_0x170d27){return _0x4a6085===_0x170d27;},'HawIf':_0x416a(0x1),'moftt':_0x416a(0x2),'myETQ':'2|1|0|4|3|5','Hvxgh':function(_0x37c934,_0x58176b){return _0x37c934(_0x58176b);},'LNFIu':_0x416a(0x3),'cJiEU':function(_0x369caf,_0x38a7a3){return _0x369caf(_0x38a7a3);},'PaFpK':'DldSl','aNRSt':_0x416a(0x4),'KKkpm':function(_0x5e25c4,_0x375046){return _0x5e25c4===_0x375046;},'JLJUc':_0x416a(0x5),'vsnrr':_0x416a(0x6),'AVtGH':_0x416a(0x7),'qGEru':_0x416a(0x8),'OSoYX':'user','GIpdb':'vcFMQ','XKjvN':_0x416a(0x9),'WOpTn':function(_0x1032b8,_0x2d38c1){return _0x1032b8 instanceof _0x2d38c1;},'kzwrJ':_0x416a(0xa),'zzRvw':function(_0x5a3d10){return _0x5a3d10();},'rDjsK':_0x416a(0xb),'lFmMY':_0x416a(0xc),'twXQO':_0x416a(0xd),'VYLMO':function(_0x5cf1f8,_0xc33cbe){return _0x5cf1f8!==_0xc33cbe;},'Trads':_0x416a(0xe),'RfPpI':function(_0x521945,_0x136dc6){return _0x521945===_0x136dc6;},'UmZtd':'true','rkLHx':function(_0x63f191,_0x1809f4){return _0x63f191!==_0x1809f4;},'LOKkt':_0x416a(0xf),'jzCIy':function(_0x21c2e8,_0x189699){return _0x21c2e8(_0x189699);},'CWDLv':function(_0x29ea11,_0x5a57bd){return _0x29ea11(_0x5a57bd);},'QOmLs':'Apple\x20sign-in\x20failed:','yOQeZ':function(_0x3c190a,_0x170129){return _0x3c190a(_0x170129);},'LQxLE':function(_0x5b8cb5,_0x52c85f){return _0x5b8cb5(_0x52c85f);},'Hqpqu':function(_0x487bf5,_0x2d9293){return _0x487bf5(_0x2d9293);},'rWBxm':function(_0x46c3e1,_0x59695f){return _0x46c3e1!==_0x59695f;},'MmPLe':'apple','zKKHb':_0x416a(0x10),'wvlGw':_0x416a(0x11),'xYBHY':function(_0x27c0fb,_0x2cdebe){return _0x27c0fb(_0x2cdebe);},'XbmUX':_0x416a(0x12),'efvNb':function(_0x371cbe,_0x504dbc){return _0x371cbe(_0x504dbc);},'hwwVY':function(_0x421d96,_0x9b8a48){return _0x421d96(_0x9b8a48);},'UmHik':'auth_method','ZKNiJ':_0x416a(0x13),'VLaVk':_0x416a(0x14),'RaCLQ':_0x416a(0x15),'ScAWO':_0x416a(0x16),'cQqpc':_0x416a(0x17),'BLhXw':_0x416a(0x18),'wLGUx':_0x416a(0x19),'mfTFG':'MpJIT','ANruR':_0x416a(0x1a),'AcIop':_0x416a(0x1b),'yUyUS':_0x416a(0x1c),'AgUWA':function(_0x22f914,_0x57ff5b){return _0x22f914(_0x57ff5b);},'HuktY':_0x416a(0x1d),'bqgaH':function(_0x560f47,_0x14455a){return _0x560f47!==_0x14455a;},'UYqfB':_0x416a(0x1e),'mczSq':_0x416a(0x1f),'qhNPH':function(_0xd33ceb,_0x367bbc){return _0xd33ceb===_0x367bbc;},'HHgFA':_0x416a(0x20),'fNGKq':_0x416a(0x21),'crLCn':function(_0x2946e6,_0x47ae16){return _0x2946e6(_0x47ae16);},'rWgJP':function(_0x30c175,_0x199c32){return _0x30c175(_0x199c32);},'aAThP':_0x416a(0x22),'zXcPU':function(_0x5be5c6,_0x1f4345){return _0x5be5c6(_0x1f4345);},'wziMu':_0x416a(0x23),'mpYcK':_0x416a(0x24),'oCyTB':'Onairos\x20sign-in\x20failed:','afBVv':_0x416a(0x25),'QGssU':_0x416a(0x26),'ouRgh':function(_0x1a3f91,_0x514d67){return _0x1a3f91(_0x514d67);},'uYUBi':_0x416a(0x27),'Tjgwo':'aRZfP','xsFTM':'Failed\x20to\x20update\x20user\x20data:','ZpYcu':'WucdD','QtSqQ':function(_0x3f9c46,_0x42d8b9){return _0x3f9c46!==_0x42d8b9;},'vcOeP':_0x416a(0x28),'wxPgZ':_0x416a(0x29),'JTSgj':_0x416a(0x2a),'pvnrY':function(_0x28cccc,_0x50b9b0){return _0x28cccc(_0x50b9b0);},'FajTR':_0x416a(0x2b),'pFikd':'Mmfxd','zbwQO':_0x416a(0x2c),'jKYpW':function(_0x5801d2,_0x352be4){return _0x5801d2(_0x352be4);},'bOMhk':_0x416a(0x2d),'iSuzD':function(_0x152e3a){return _0x152e3a();},'dKDjQ':function(_0x2ef6c5,_0x5d74eb){return _0x2ef6c5(_0x5d74eb);}},[_0x20b1d4,_0x26c9d1]=_0x1348e2[_0x416a(0x2e)](useState,null),[_0x4ec526,_0x1b5707]=_0x1348e2[_0x416a(0x2f)](useState,!![]),[_0x38399e,_0x546dfe]=_0x1348e2['CWDLv'](useState,![]),[_0x4bce88,_0x20c99a]=_0x1348e2[_0x416a(0x30)](useState,![]);useEffect(()=>{const _0x45c6af={'qIdzN':function(_0x564245,_0x19954f){return _0x1348e2[_0x416a(0x30)](_0x564245,_0x19954f);},'cnvtr':function(_0x4996b4,_0x1ed969){return _0x1348e2[_0x416a(0x31)](_0x4996b4,_0x1ed969);},'wxyOJ':_0x416a(0x32)},_0x57a991=async()=>{const _0x25d23b={'zDweQ':_0x1348e2[_0x416a(0x33)],'ZVysd':function(_0x315cb2,_0x5a7258){return _0x1348e2[_0x416a(0x34)](_0x315cb2,_0x5a7258);}};try{const _0x4979ba=await _0x1348e2[_0x416a(0x35)](hasEventAccessToken),_0x4fdb70=await AsyncStorage['getItem'](_0x416a(0x36));if(_0x1348e2[_0x416a(0x37)](_0x4979ba,_0x4fdb70)){if(_0x1348e2[_0x416a(0x38)](_0x1348e2[_0x416a(0x39)],_0x1348e2[_0x416a(0x3a)])){_0x25fe36[_0x416a(0x3b)]('Failed\x20to\x20update\x20onboarded\x20status:',_0x4cc22f);throw _0x53033c;}else{const _0x5be8da=_0x1348e2[_0x416a(0x3c)]['split']('|');let _0x2ec7d7=0x0;while(!![]){switch(_0x5be8da[_0x2ec7d7++]){case'0':_0x1348e2[_0x416a(0x3d)](_0x20c99a,!![]);continue;case'1':_0x1348e2[_0x416a(0x34)](_0x26c9d1,JSON[_0x416a(0x3e)](_0x4fdb70));continue;case'2':console[_0x416a(0x3f)](_0x1348e2[_0x416a(0x40)]);continue;case'3':_0x1348e2[_0x416a(0x3d)](_0x1b5707,![]);continue;case'4':_0x1348e2[_0x416a(0x2e)](_0x546dfe,!![]);continue;case'5':return;}break;}}}const _0x29ae9b=await _0x1348e2[_0x416a(0x35)](getAuthToken);if(_0x29ae9b){if(_0x416a(0x41)===_0x1348e2[_0x416a(0x42)])_0x788227['error'](_0x25d23b[_0x416a(0x43)],_0x59fe6a);else{let _0x89ef72=![];try{_0x89ef72=await _0x1348e2[_0x416a(0x35)](verifyToken);}catch(_0x371edd){console[_0x416a(0x44)](_0x1348e2[_0x416a(0x45)],_0x371edd);if(_0x4fdb70){if(_0x1348e2[_0x416a(0x46)](_0x1348e2[_0x416a(0x47)],_0x1348e2[_0x416a(0x48)]))throw new _0x27b026(_0x416a(0x20));else console[_0x416a(0x3f)](_0x416a(0x2a)),_0x89ef72=!![];}}if(_0x89ef72){if(_0x4fdb70)_0x1348e2[_0x416a(0x46)](_0x1348e2[_0x416a(0x49)],_0x1348e2[_0x416a(0x4a)])?(_0x45c6af[_0x416a(0x4b)](_0x1b8e19,_0x572fec[_0x416a(0x3e)](_0x121a15)),_0x45c6af[_0x416a(0x4c)](_0x433032,!![])):(_0x1348e2[_0x416a(0x3d)](_0x26c9d1,JSON['parse'](_0x4fdb70)),_0x20c99a(!![]));else try{const _0xeb7578=await getUserProfile();await AsyncStorage['setItem'](_0x1348e2['OSoYX'],JSON['stringify'](_0xeb7578)),_0x1348e2[_0x416a(0x2e)](_0x26c9d1,_0xeb7578),_0x20c99a(!![]);}catch(_0x2c5c14){if(_0x1348e2[_0x416a(0x38)](_0x416a(0x4d),_0x1348e2['GIpdb'])){console[_0x416a(0x3b)](_0x1348e2['XKjvN'],_0x2c5c14);const _0x149610=_0x1348e2[_0x416a(0x4e)](_0x2c5c14,Error)?_0x2c5c14[_0x416a(0x4f)]:String(_0x2c5c14);if(_0x149610[_0x416a(0x50)](_0x416a(0x51))||_0x149610['includes'](_0x1348e2[_0x416a(0x52)]))await _0x1348e2[_0x416a(0x53)](removeAuthToken);else{console['log'](_0x1348e2['rDjsK']);if(_0x29ae9b){const _0x380b2a={'id':_0x1348e2[_0x416a(0x54)],'name':'Onairos\x20User','email':_0x1348e2[_0x416a(0x55)],'onboarded':![]};await AsyncStorage[_0x416a(0x56)](_0x1348e2[_0x416a(0x57)],JSON[_0x416a(0x58)](_0x380b2a)),_0x1348e2[_0x416a(0x3d)](_0x26c9d1,_0x380b2a),_0x1348e2[_0x416a(0x2e)](_0x20c99a,!![]);}}}else _0x25d23b['ZVysd'](_0x1659e9,![]);}}else{if(_0x1348e2[_0x416a(0x59)](_0x416a(0x5a),'hVzJQ')){_0x4436c9['error'](_0x45c6af[_0x416a(0x5b)],_0xa35615);throw _0x44dad;}else await removeAuthToken();}}}const _0x256524=await AsyncStorage[_0x416a(0x5c)](_0x1348e2[_0x416a(0x5d)]);_0x1348e2[_0x416a(0x5e)](_0x256524,_0x1348e2[_0x416a(0x5f)])&&_0x1348e2[_0x416a(0x3d)](_0x546dfe,!![]);}catch(_0x4edadd){_0x1348e2[_0x416a(0x60)]('yTTqP',_0x416a(0x61))?console['error'](_0x1348e2['LOKkt'],_0x4edadd):(_0x39df00['log'](_0x416a(0x2a)),_0x1d1c13=!![]);}finally{_0x1b5707(![]);}};_0x57a991();},[]);const _0x5769a0=async _0x3a69f2=>{if(_0x1348e2[_0x416a(0x46)]('OjSef',_0x416a(0x62)))try{var _0x2e6ed5;const _0x1b7417={..._0x3a69f2,'onboarded':![]};await AsyncStorage[_0x416a(0x56)](_0x1348e2[_0x416a(0x57)],JSON['stringify'](_0x1b7417)),_0x1348e2[_0x416a(0x63)](_0x26c9d1,_0x1b7417),_0x1348e2['LQxLE'](_0x20c99a,!![]),await _0x1348e2[_0x416a(0x64)](saveAuthState,{'isAuthenticated':!![],'authMethod':_0x1348e2['rWBxm'](_0x2e6ed5=_0x3a69f2[_0x416a(0x65)],null)&&_0x1348e2[_0x416a(0x59)](_0x2e6ed5,void 0x0)&&_0x2e6ed5['includes'](_0x416a(0x66))?_0x1348e2[_0x416a(0x67)]:_0x416a(0x22),'hasValidToken':!![],'userEmail':_0x3a69f2[_0x416a(0x65)],'userName':_0x3a69f2[_0x416a(0x68)]}),await _0x1348e2[_0x416a(0x3d)](markStepCompleted,_0x1348e2[_0x416a(0x69)]),console[_0x416a(0x3f)](_0x1348e2[_0x416a(0x6a)],_0x1b7417);}catch(_0x47c402){console[_0x416a(0x3b)](_0x1348e2[_0x416a(0x33)],_0x47c402);}else{_0x1a8343['error'](_0x1348e2[_0x416a(0x6b)],_0x488fe2);throw _0x3b4ea0;}},_0x8ef9d5=async _0x271767=>{const _0x22aca7={'MmfBK':'5|1|4|3|0|2','CSOjE':function(_0x53de18,_0x198dec){return _0x53de18(_0x198dec);},'VIQtB':_0x1348e2[_0x416a(0x40)]};try{_0x1348e2[_0x416a(0x6c)](_0x1b5707,!![]);const _0x14f65f=await authenticateWithApple(_0x271767);await saveAuthToken(_0x14f65f[_0x416a(0x6d)]),await AsyncStorage['setItem'](_0x1348e2['UmHik'],'apple');if(_0x14f65f['onairos']){await AsyncStorage['setItem'](_0x1348e2['ZKNiJ'],_0x14f65f[_0x416a(0x22)][_0x416a(0x13)][_0x416a(0x6e)]());if(_0x14f65f['onairos']['onairosUserId']){if(_0x1348e2[_0x416a(0x6f)]===_0x1348e2['RaCLQ']){const _0x474ca=_0x22aca7[_0x416a(0x70)][_0x416a(0x71)]('|');let _0x3d73ce=0x0;while(!![]){switch(_0x474ca[_0x3d73ce++]){case'0':_0xf31e58(![]);continue;case'1':_0x22aca7['CSOjE'](_0x59e6c1,_0x51f95f[_0x416a(0x3e)](_0x40ac69));continue;case'2':return;case'3':_0x5cfc09(!![]);continue;case'4':_0xa3c155(!![]);continue;case'5':_0x4afe28[_0x416a(0x3f)](_0x22aca7[_0x416a(0x72)]);continue;}break;}}else await AsyncStorage['setItem'](_0x416a(0x73),_0x14f65f[_0x416a(0x22)][_0x416a(0x73)]);}_0x14f65f[_0x416a(0x22)][_0x416a(0x18)]&&(_0x1348e2[_0x416a(0x60)](_0x1348e2[_0x416a(0x74)],_0x1348e2[_0x416a(0x75)])?await AsyncStorage['setItem'](_0x1348e2['BLhXw'],_0x14f65f[_0x416a(0x22)][_0x416a(0x18)]):_0x1348e2[_0x416a(0x76)](_0x43b146,![])),console[_0x416a(0x3f)](_0x1348e2[_0x416a(0x77)],_0x14f65f['onairos'][_0x416a(0x13)]);}else _0x1348e2['VYLMO'](_0x1348e2[_0x416a(0x78)],_0x1348e2['mfTFG'])?_0x5e0e91['error'](_0x1348e2['XbmUX'],_0x11e369):(await AsyncStorage['setItem'](_0x1348e2[_0x416a(0x79)],_0x1348e2[_0x416a(0x7a)]),console[_0x416a(0x3f)](_0x1348e2[_0x416a(0x7b)]));const _0x315c0c={'id':_0x14f65f[_0x416a(0x36)]['id'],'name':_0x14f65f[_0x416a(0x36)][_0x416a(0x68)]||_0x1348e2[_0x416a(0x7c)],'email':_0x14f65f[_0x416a(0x36)][_0x416a(0x65)],'profilePicture':_0x14f65f['user']['profilePicture'],'onboarded':![]};return await AsyncStorage[_0x416a(0x56)]('user',JSON['stringify'](_0x315c0c)),_0x1348e2[_0x416a(0x3d)](_0x26c9d1,_0x315c0c),_0x1348e2[_0x416a(0x7d)](_0x20c99a,!![]),console[_0x416a(0x3f)](_0x1348e2[_0x416a(0x7e)]),_0x315c0c;}catch(_0x5c47ab){console[_0x416a(0x3b)](_0x416a(0x7f),_0x5c47ab);throw _0x5c47ab;}finally{_0x1348e2['bqgaH'](_0x1348e2[_0x416a(0x80)],_0x1348e2[_0x416a(0x81)])?_0x1b5707(![]):_0x1348e2[_0x416a(0x82)](_0x468d1a,![]);}},_0x1da29d=async _0x59d777=>{const _0x5a1b83={'keMWe':function(_0x21da4d,_0x27995d){return _0x21da4d(_0x27995d);},'DDpPa':function(_0x534ee1,_0x42b751){return _0x1348e2[_0x416a(0x83)](_0x534ee1,_0x42b751);},'cuTmM':_0x1348e2[_0x416a(0x84)],'ZqgfL':_0x416a(0xf)};if(_0x1348e2['fNGKq']===_0x416a(0x85))_0x5a1b83[_0x416a(0x86)](_0x5f5613,![]);else try{_0x1348e2['CWDLv'](_0x1b5707,!![]);const _0x36b076=await _0x1348e2[_0x416a(0x87)](authenticateWithOnairos,_0x59d777);await _0x1348e2['rWgJP'](saveAuthToken,_0x36b076[_0x416a(0x6d)]),await AsyncStorage['setItem'](_0x1348e2[_0x416a(0x88)],_0x1348e2['aAThP']);const _0x148ece={'id':_0x36b076['user']['id'],'name':_0x36b076[_0x416a(0x36)]['name']||_0x1348e2[_0x416a(0x7c)],'email':_0x36b076[_0x416a(0x36)][_0x416a(0x65)],'profilePicture':_0x36b076[_0x416a(0x36)][_0x416a(0x89)],'onboarded':![]};return await AsyncStorage[_0x416a(0x56)](_0x1348e2[_0x416a(0x57)],JSON['stringify'](_0x148ece)),_0x1348e2['yOQeZ'](_0x26c9d1,_0x148ece),_0x1348e2[_0x416a(0x8a)](_0x20c99a,!![]),console[_0x416a(0x3f)](_0x1348e2[_0x416a(0x8b)]),_0x148ece;}catch(_0xbd327d){if(_0x1348e2[_0x416a(0x38)](_0x1348e2[_0x416a(0x8c)],_0x416a(0x8d))){const _0x3ded72=useContext(_0x224bc6);if(_0x5a1b83[_0x416a(0x8e)](_0x3ded72,_0x3aa466))throw new _0x4ab537(_0x5a1b83[_0x416a(0x8f)]);return _0x3ded72;}else{console[_0x416a(0x3b)](_0x1348e2[_0x416a(0x90)],_0xbd327d);throw _0xbd327d;}}finally{_0x1348e2['RvzLw'](_0x1348e2[_0x416a(0x91)],_0x1348e2['QGssU'])?_0x5c6188[_0x416a(0x3b)](_0x5a1b83[_0x416a(0x92)],_0x3eaa45):_0x1348e2['ouRgh'](_0x1b5707,![]);}},_0x2c8633=async()=>{try{await _0x1348e2[_0x416a(0x53)](clearUserData),_0x1348e2[_0x416a(0x64)](_0x26c9d1,null),_0x1348e2[_0x416a(0x93)](_0x20c99a,![]);}catch(_0x4a6803){if(_0x1348e2[_0x416a(0x94)]!==_0x1348e2[_0x416a(0x94)]){_0x1afb9e['error'](_0x1348e2['uYUBi'],_0x480f54);throw _0x1b9142;}else console['error'](_0x1348e2[_0x416a(0x95)],_0x4a6803);}},_0x3f07d6=async _0x41892d=>{try{if(_0x416a(0x96)!==_0x1348e2[_0x416a(0x97)]){const _0x553d11={..._0x20b1d4,..._0x41892d};await AsyncStorage[_0x416a(0x56)](_0x1348e2[_0x416a(0x57)],JSON[_0x416a(0x58)](_0x553d11)),_0x1348e2[_0x416a(0x6c)](_0x26c9d1,_0x553d11),await _0x38535e();}else{_0x3a360b['error'](_0x1348e2['oCyTB'],_0x2be023);throw _0x225502;}}catch(_0x795381){if(_0x1348e2[_0x416a(0x98)](_0x1348e2['vcOeP'],_0x1348e2[_0x416a(0x99)])){console[_0x416a(0x3b)](_0x1348e2['uYUBi'],_0x795381);throw _0x795381;}else _0x11d22b[_0x416a(0x3b)](_0x1348e2[_0x416a(0x9a)],_0x538c7d);}},_0x1170c4=async _0x4a28c2=>{try{if(!_0x20b1d4)return;const _0x18d546={..._0x20b1d4,..._0x4a28c2};await AsyncStorage[_0x416a(0x56)](_0x1348e2[_0x416a(0x57)],JSON[_0x416a(0x58)](_0x18d546)),_0x26c9d1(_0x18d546);}catch(_0x403fa2){console['error'](_0x1348e2[_0x416a(0x9a)],_0x403fa2);}},_0x38535e=async()=>{const _0x1c10de={'zetnC':function(_0x5e1eb9,_0x5e0a5e){return _0x1348e2[_0x416a(0x9b)](_0x5e1eb9,_0x5e0a5e);}};if(_0x1348e2[_0x416a(0x9c)]!==_0x1348e2[_0x416a(0x9c)])_0x309a55[_0x416a(0x44)](_0x1348e2[_0x416a(0x45)],_0x5b0f8b),_0x3cdbb5&&(_0x247d17['log'](_0x1348e2[_0x416a(0x9d)]),_0x226268=!![]);else try{_0x1348e2[_0x416a(0x87)](_0x1b5707,!![]),await updateUserOnboardedStatus();if(_0x20b1d4){if('pXbJd'===_0x1348e2[_0x416a(0x9e)])_0x1c10de['zetnC'](_0x19d12e,!![]);else{const _0x285d65={..._0x20b1d4,'onboarded':!![]};await AsyncStorage[_0x416a(0x56)](_0x1348e2[_0x416a(0x57)],JSON['stringify'](_0x285d65)),_0x26c9d1(_0x285d65);}}}catch(_0x1c741a){console[_0x416a(0x3b)](_0x1348e2[_0x416a(0x9f)],_0x1c741a);throw _0x1c741a;}finally{_0x1348e2[_0x416a(0xa0)](_0x1b5707,![]);}},_0x4d4e1c=async()=>{try{const _0x529f9a=_0x416a(0xa1)['split']('|');let _0x243f15=0x0;while(!![]){switch(_0x529f9a[_0x243f15++]){case'0':console[_0x416a(0x3f)](_0x1348e2[_0x416a(0xa2)]);continue;case'1':await AsyncStorage['removeItem'](_0x416a(0xe));continue;case'2':_0x1348e2['pvnrY'](_0x20c99a,![]);continue;case'3':_0x546dfe(![]);continue;case'4':await AsyncStorage[_0x416a(0xa3)](_0x1348e2[_0x416a(0x57)]);continue;case'5':_0x26c9d1(null);continue;case'6':await _0x1348e2[_0x416a(0xa4)](removeAuthToken);continue;}break;}}catch(_0x1074ec){console['error']('Failed\x20to\x20delete\x20account:',_0x1074ec);throw _0x1074ec;}};return React[_0x416a(0xa5)](AuthContext[_0x416a(0xa6)],{'value':{'user':_0x20b1d4,'isLoading':_0x4ec526,'hasCompletedOnboarding':_0x38399e,'login':_0x5769a0,'logout':_0x2c8633,'deleteAccount':_0x4d4e1c,'completeOnboarding':_0x3f07d6,'updateUser':_0x1170c4,'appleSignIn':_0x8ef9d5,'onairosSignIn':_0x1da29d,'isAuthenticated':_0x4bce88,'updateOnboardedStatus':_0x38535e,'getResumeTarget':getResumeTarget,'markStepCompleted':markStepCompleted,'updateLastScreen':updateLastScreen,'isReturningUser':isReturningUser,'markEventPageReached':markEventPageReached,'hasEventAccessToken':hasEventAccessToken}},_0xc2aa8f);};function _0x416a(_0x2a6298,_0x416a94){_0x2a6298=_0x2a6298-0x0;const _0x26ac9e=_0x2a62();let _0x91df5=_0x26ac9e[_0x2a6298];return _0x91df5;}export const useAuth=()=>{const _0x2d8753={'UHHNj':function(_0x36b29f,_0x18a082){return _0x36b29f(_0x18a082);},'SEvEP':function(_0x2deae0,_0x13a100){return _0x2deae0===_0x13a100;}},_0x4e0f75=_0x2d8753['UHHNj'](useContext,AuthContext);if(_0x2d8753[_0x416a(0xa7)](_0x4e0f75,undefined))throw new Error(_0x416a(0x20));return _0x4e0f75;};function _0x2a62(){const _0x2ac674=['Failed\x20to\x20save\x20user\x20data:','PgkjA','RCsKb','🎯\x20Found\x20event\x20access\x20token\x20-\x20user\x20has\x20completed\x20onboarding,\x20authentication\x20confirmed','🌐\x20Network\x20verification\x20failed,\x20using\x20local\x20token\x20validation:','dVLML','kWceH','KeNCk','ijufc','Failed\x20to\x20fetch\x20user\x20profile:','403','🌐\x20Profile\x20fetch\x20failed\x20(likely\x20network),\x20keeping\x20authentication\x20state','offline_user','user@onairos.com','onboardingCompleted','Failed\x20to\x20load\x20authentication\x20state:','authentication','User\x20logged\x20in\x20with\x20onboarded=false:','Failed\x20to\x20remove\x20user\x20data:','hasConnectedOnairos','CkIMo','MuaZs','ugpAc','qjXbk','lastConnectedAt','🔗\x20Stored\x20Onairos\x20connection\x20status:','false','🔗\x20No\x20Onairos\x20connection\x20info\x20from\x20backend,\x20defaulting\x20to\x20false','Onairos\x20User','🍎\x20Apple\x20sign-in\x20completed\x20-\x20auth_method\x20set\x20to\x20\x22apple\x22','pdaPL','TLYvP','useAuth\x20must\x20be\x20used\x20within\x20an\x20AuthProvider','OOlyN','onairos','🔑\x20Onairos\x20sign-in\x20completed\x20-\x20auth_method\x20set\x20to\x20\x22onairos\x22','eVdCt','htXnq','pQZYe','Failed\x20to\x20complete\x20onboarding:','XNoaU','qsfAP','💾\x20Network\x20unreachable,\x20trusting\x20local\x20authentication\x20state','UEioe','Failed\x20to\x20update\x20onboarded\x20status:','Account\x20deleted\x20successfully','cJiEU','dKDjQ','jzCIy','CWDLv','Failed\x20to\x20delete\x20account:','Imbzo','iPYjv','LoIdK','user','VEFjQ','RvzLw','HawIf','moftt','error','myETQ','Hvxgh','parse','log','LNFIu','MSrJW','PaFpK','zDweQ','warn','aNRSt','KKkpm','JLJUc','vsnrr','AVtGH','qGEru','qIdzN','cnvtr','vcFMQ','WOpTn','message','includes','401','kzwrJ','zzRvw','lFmMY','twXQO','setItem','OSoYX','stringify','VYLMO','hVzJQ','wxyOJ','getItem','Trads','RfPpI','UmZtd','rkLHx','JYOAv','OjSef','yOQeZ','Hqpqu','email','apple','MmPLe','name','zKKHb','wvlGw','QOmLs','hwwVY','token','toString','VLaVk','MmfBK','split','VIQtB','onairosUserId','ScAWO','cQqpc','xYBHY','wLGUx','mfTFG','ZKNiJ','ANruR','AcIop','yUyUS','AgUWA','HuktY','Apple\x20sign-in\x20failed:','UYqfB','mczSq','efvNb','qhNPH','HHgFA','poVtN','keMWe','crLCn','UmHik','profilePicture','zXcPU','wziMu','mpYcK','xZsvj','DDpPa','cuTmM','oCyTB','afBVv','ZqgfL','ouRgh','Tjgwo','XbmUX','sroaP','ZpYcu','QtSqQ','wxPgZ','xsFTM','pvnrY','FajTR','JTSgj','pFikd','zbwQO','jKYpW','4|6|1|5|2|3|0','bOMhk','removeItem','iSuzD','createElement','Provider','SEvEP'];_0x2a62=function(){return _0x2ac674;};return _0x2a62();}
|
|
1
|
+
import React,{createContext,useState,useEffect,useContext}from'react';import AsyncStorage from'@react-native-async-storage/async-storage';import{saveAuthToken,getAuthToken,removeAuthToken,verifyToken,getUserProfile,authenticateWithApple,authenticateWithOnairos,updateUserOnboardedStatus}from'../services/authService';import{saveAuthState,clearUserData,getResumeTarget,markStepCompleted,updateLastScreen,isReturningUser,markEventPageReached,hasEventAccessToken}from'../services/storageService';const AuthContext=createContext(undefined);function _0x2193(_0x5979e6,_0x2193c1){_0x5979e6=_0x5979e6-0x0;const _0x22484e=_0x5979();let _0x4d2e66=_0x22484e[_0x5979e6];return _0x4d2e66;}function _0x5979(){const _0x2665be=['Onairos\x20sign-in\x20failed:','🌐\x20Network\x20verification\x20failed,\x20using\x20local\x20token\x20validation:','💾\x20Network\x20unreachable,\x20trusting\x20local\x20authentication\x20state','Failed\x20to\x20delete\x20account:','user','🎯\x20Found\x20event\x20access\x20token\x20-\x20user\x20has\x20completed\x20onboarding,\x20authentication\x20confirmed','FvNVY','OLlHg','ETCDX','Failed\x20to\x20fetch\x20user\x20profile:','401','403','Xaqds','user@onairos.com','gIyVT','onboardingCompleted','true','mKxpV','Failed\x20to\x20save\x20user\x20data:','BPxXd','wmUhj','apple','onairos','authentication','User\x20logged\x20in\x20with\x20onboarded=false:','oICxa','Failed\x20to\x20update\x20user\x20data:','Failed\x20to\x20load\x20authentication\x20state:','ZyAEW','auth_method','RtTBn','onairosUserId','lastConnectedAt','🔗\x20Stored\x20Onairos\x20connection\x20status:','false','🔗\x20No\x20Onairos\x20connection\x20info\x20from\x20backend,\x20defaulting\x20to\x20false','🍎\x20Apple\x20sign-in\x20completed\x20-\x20auth_method\x20set\x20to\x20\x22apple\x22','aSIlN','🔑\x20Onairos\x20sign-in\x20completed\x20-\x20auth_method\x20set\x20to\x20\x22onairos\x22','bMoEZ','ZxHxl','rmpTN','LRvDh','Failed\x20to\x20complete\x20onboarding:','KWFHa','fysPV','sEBbX','Failed\x20to\x20update\x20onboarded\x20status:','vZZzE','TSxAI','ygPYk','wQBGD','VSNPt','Apple\x20sign-in\x20failed:','GiukT','eGBvF','wxIDp','split','WWjPq','log','feZnL','parse','OvsIW','ncgpk','error','BxWYb','qweEH','Ffeqp','Failed\x20to\x20remove\x20user\x20data:','setItem','stringify','fTotJ','hsibV','includes','yLCkD','bhkdf','iwdNa','zcFmc','DjRvs','WZLVy','REkSl','wBpWN','warn','woyLp','rvZlV','cySPP','xaSVH','jMeLl','getItem','vzaxY','ERkrO','hsPIs','iadpK','FffVI','PmIqF','hfpJv','Kedhr','QhNmE','desvX','email','DFfTR','LSYTd','vhPep','OCMug','Uiugf','ISDRP','IHthi','cVpGC','token','AvPmc','hasConnectedOnairos','toString','fRtHB','mqVjJ','RyLsU','cdgus','pvIrJ','EWTvk','NiEuc','jUIoD','zVJNb','name','Onairos\x20User','profilePicture','bIdQe','IqyJv','gfGPx','fsHoH','vFSEc','bvPuO','zictX','OqgWk','VWbdf','askoj','UJGST','JsXDV','tlJMB','uGPlp','iYzdo','igmaJ','OipFD','Dohtn','1|4|3|2|0|5','mEruL','RXTiK','OQKzB','IpOYl','aYRTG','wKgGp','WaOJi','JdFnL','sPosN','tZPIE','DXSbG','xsrXF','removeItem','FTJmb','Account\x20deleted\x20successfully','useAuth\x20must\x20be\x20used\x20within\x20an\x20AuthProvider','NUsNQ'];_0x5979=function(){return _0x2665be;};return _0x5979();}export const AuthProvider=({children:_0xcd05fc})=>{const _0x5d9448={'VSNPt':_0x2193(0x0),'qweEH':_0x2193(0x1),'dpppL':_0x2193(0x2),'GiukT':_0x2193(0x3),'eGBvF':function(_0x56ca4e){return _0x56ca4e();},'wxIDp':_0x2193(0x4),'lGUtr':function(_0x41864e,_0x4feedd){return _0x41864e&&_0x4feedd;},'wnCvi':'2|3|4|5|1|0','WWjPq':function(_0x3c3c14,_0x1597fd){return _0x3c3c14(_0x1597fd);},'feZnL':_0x2193(0x5),'OvsIW':_0x2193(0x6),'ncgpk':_0x2193(0x7),'rvZlV':function(_0x19f5dc,_0x27c905){return _0x19f5dc!==_0x27c905;},'Ffeqp':_0x2193(0x8),'fTotJ':function(_0x514940,_0x556f16){return _0x514940(_0x556f16);},'hsibV':_0x2193(0x9),'yLCkD':_0x2193(0xa),'bhkdf':_0x2193(0xb),'iwdNa':function(_0x5cc7da,_0x11cfe6){return _0x5cc7da===_0x11cfe6;},'zcFmc':_0x2193(0xc),'QGZPM':'OIHsL','DjRvs':'EDsjG','WZLVy':'🌐\x20Profile\x20fetch\x20failed\x20(likely\x20network),\x20keeping\x20authentication\x20state','REkSl':'Onairos\x20User','bHGLQ':_0x2193(0xd),'wBpWN':function(_0x54a2a9,_0x2d72a4){return _0x54a2a9(_0x2d72a4);},'cySPP':_0x2193(0xe),'VHfce':'rSnvI','xaSVH':function(_0x139366){return _0x139366();},'XFdFG':_0x2193(0xf),'vzaxY':_0x2193(0x10),'ERkrO':function(_0x51b80a,_0x16c9c4){return _0x51b80a!==_0x16c9c4;},'hsPIs':_0x2193(0x11),'iadpK':function(_0x1a0dca){return _0x1a0dca();},'Uiugf':_0x2193(0x12),'desvX':function(_0x152907,_0x1d7f93){return _0x152907(_0x1d7f93);},'FffVI':function(_0x4b4217,_0x9582b4){return _0x4b4217===_0x9582b4;},'PmIqF':'RlGlQ','NaDRp':'ZdmAI','hfpJv':_0x2193(0x13),'Kedhr':_0x2193(0x14),'AvPmc':_0x2193(0x15),'DFfTR':_0x2193(0x16),'LSYTd':_0x2193(0x17),'vhPep':_0x2193(0x18),'OCMug':_0x2193(0x19),'RyLsU':_0x2193(0x1a),'IqyJv':_0x2193(0x1b),'TSxAI':function(_0x960d8f,_0x5ed8c5){return _0x960d8f(_0x5ed8c5);},'ISDRP':function(_0x3590a2,_0x24013c){return _0x3590a2!==_0x24013c;},'IHthi':_0x2193(0x1c),'askoj':function(_0x4c0ed8,_0x728d1b){return _0x4c0ed8(_0x728d1b);},'JcTcE':_0x2193(0x1d),'fRtHB':_0x2193(0x1e),'mqVjJ':_0x2193(0x1f),'cdgus':_0x2193(0x20),'pvIrJ':_0x2193(0x21),'jUIoD':_0x2193(0x22),'zVJNb':_0x2193(0x23),'bIdQe':function(_0x199e25,_0x504455){return _0x199e25(_0x504455);},'CMZdT':_0x2193(0x24),'gfGPx':function(_0x52ede1,_0x4504e8){return _0x52ede1!==_0x4504e8;},'vFSEc':_0x2193(0x25),'bvPuO':'Apple\x20sign-in\x20failed:','zictX':function(_0x13bda0,_0x2a032a){return _0x13bda0(_0x2a032a);},'PTiqr':function(_0x26a719,_0x782715){return _0x26a719(_0x782715);},'YiVoJ':function(_0x5f1bf7,_0x4c2d30){return _0x5f1bf7(_0x4c2d30);},'OqgWk':_0x2193(0x26),'VWbdf':_0x2193(0x27),'UXOjP':_0x2193(0x28),'UJGST':'gQbHK','AZvSt':_0x2193(0x29),'JsXDV':'RJsDX','rUZZv':function(_0x7d53ae){return _0x7d53ae();},'DXSbG':function(_0x40a546,_0x38c502){return _0x40a546(_0x38c502);},'tlJMB':function(_0x3b6326,_0x2e7bb4){return _0x3b6326(_0x2e7bb4);},'uGPlp':function(_0x1dec5a,_0x83b1d6){return _0x1dec5a===_0x83b1d6;},'iYzdo':'Efrdp','igmaJ':'tRAms','Dohtn':_0x2193(0x2a),'CyhsE':_0x2193(0x2b),'oioOu':function(_0x2b3aea,_0x427d5a){return _0x2b3aea===_0x427d5a;},'mEruL':_0x2193(0x2c),'RXTiK':function(_0x4e8d09,_0x3b48d7){return _0x4e8d09!==_0x3b48d7;},'OQKzB':_0x2193(0x2d),'IpOYl':_0x2193(0x2e),'aYRTG':function(_0x21d12c,_0x337e12){return _0x21d12c(_0x337e12);},'xsrXF':_0x2193(0x2f),'FTJmb':function(_0x5d63b7,_0x1d7fff){return _0x5d63b7(_0x1d7fff);},'vZZzE':function(_0xc46144,_0x1d8b00){return _0xc46144(_0x1d8b00);},'ygPYk':function(_0x50fba5,_0x32f5ab){return _0x50fba5(_0x32f5ab);},'wQBGD':function(_0x3f1ead,_0x4af9d3,_0xf9127f){return _0x3f1ead(_0x4af9d3,_0xf9127f);}},[_0xacdc5e,_0x107f2e]=_0x5d9448[_0x2193(0x30)](useState,null),[_0x4b92f2,_0x3f290e]=_0x5d9448[_0x2193(0x31)](useState,!![]),[_0x4a25f1,_0x5abdef]=useState(![]),[_0x266481,_0x98d47d]=_0x5d9448[_0x2193(0x32)](useState,![]);_0x5d9448[_0x2193(0x33)](useEffect,()=>{const _0x4cfc2a=async()=>{const _0x7ebfec={'BxWYb':_0x5d9448[_0x2193(0x34)],'wmbAN':_0x2193(0x35),'xSDPU':_0x5d9448['qweEH'],'woyLp':_0x5d9448['dpppL'],'jMeLl':_0x5d9448[_0x2193(0x36)]};try{const _0xf65549=await _0x5d9448[_0x2193(0x37)](hasEventAccessToken),_0x10d301=await AsyncStorage['getItem'](_0x5d9448[_0x2193(0x38)]);if(_0x5d9448['lGUtr'](_0xf65549,_0x10d301)){const _0x3527af=_0x5d9448['wnCvi'][_0x2193(0x39)]('|');let _0x3890c7=0x0;while(!![]){switch(_0x3527af[_0x3890c7++]){case'0':return;case'1':_0x5d9448[_0x2193(0x3a)](_0x3f290e,![]);continue;case'2':console[_0x2193(0x3b)](_0x5d9448[_0x2193(0x3c)]);continue;case'3':_0x5d9448[_0x2193(0x3a)](_0x107f2e,JSON[_0x2193(0x3d)](_0x10d301));continue;case'4':_0x5d9448[_0x2193(0x3a)](_0x98d47d,!![]);continue;case'5':_0x5d9448[_0x2193(0x3a)](_0x5abdef,!![]);continue;}break;}}const _0x345399=await getAuthToken();if(_0x345399){let _0x4de992=![];try{_0x4de992=await _0x5d9448['eGBvF'](verifyToken);}catch(_0x2aba19){if(_0x5d9448[_0x2193(0x3e)]===_0x5d9448[_0x2193(0x3f)]){_0xebf839[_0x2193(0x40)](_0x7ebfec[_0x2193(0x41)],_0x406e8);throw _0x4eccb9;}else console['warn'](_0x5d9448[_0x2193(0x42)],_0x2aba19),_0x10d301&&(_0x5d9448['rvZlV'](_0x5d9448['Ffeqp'],_0x5d9448[_0x2193(0x43)])?_0x30caa4['error'](_0x2193(0x44),_0x21468d):(console[_0x2193(0x3b)](_0x5d9448['dpppL']),_0x4de992=!![]));}if(_0x4de992){if(_0x10d301)_0x107f2e(JSON['parse'](_0x10d301)),_0x5d9448[_0x2193(0x3a)](_0x98d47d,!![]);else try{const _0x247839=await _0x5d9448['eGBvF'](getUserProfile);await AsyncStorage[_0x2193(0x45)](_0x5d9448[_0x2193(0x38)],JSON[_0x2193(0x46)](_0x247839)),_0x5d9448['fTotJ'](_0x107f2e,_0x247839),_0x5d9448[_0x2193(0x47)](_0x98d47d,!![]);}catch(_0x1a7ebc){console[_0x2193(0x40)](_0x5d9448[_0x2193(0x48)],_0x1a7ebc);const _0x66cfeb=_0x1a7ebc instanceof Error?_0x1a7ebc['message']:String(_0x1a7ebc);if(_0x66cfeb[_0x2193(0x49)](_0x5d9448[_0x2193(0x4a)])||_0x66cfeb[_0x2193(0x49)](_0x5d9448[_0x2193(0x4b)])){if(_0x5d9448[_0x2193(0x4c)](_0x5d9448[_0x2193(0x4d)],'Xaqds'))await removeAuthToken();else{_0x49dcb1[_0x2193(0x40)](_0x7ebfec['wmbAN'],_0x45d22b);throw _0x425847;}}else{if(_0x5d9448['QGZPM']!==_0x5d9448[_0x2193(0x4e)]){console['log'](_0x5d9448[_0x2193(0x4f)]);if(_0x345399){const _0x2cd5cd={'id':'offline_user','name':_0x5d9448[_0x2193(0x50)],'email':_0x5d9448['bHGLQ'],'onboarded':![]};await AsyncStorage[_0x2193(0x45)](_0x5d9448['wxIDp'],JSON[_0x2193(0x46)](_0x2cd5cd)),_0x5d9448[_0x2193(0x51)](_0x107f2e,_0x2cd5cd),_0x5d9448[_0x2193(0x3a)](_0x98d47d,!![]);}}else _0x3c6c36[_0x2193(0x52)](_0x7ebfec['xSDPU'],_0x313cc0),_0xe0804f&&(_0x2c7425[_0x2193(0x3b)](_0x7ebfec[_0x2193(0x53)]),_0x59045d=!![]);}}}else{if(_0x5d9448[_0x2193(0x54)](_0x5d9448[_0x2193(0x55)],_0x5d9448['VHfce']))await _0x5d9448[_0x2193(0x56)](removeAuthToken);else{_0x524a9a['error'](_0x7ebfec[_0x2193(0x57)],_0xdc0209);throw _0x4d9466;}}}const _0x3af504=await AsyncStorage[_0x2193(0x58)](_0x5d9448['XFdFG']);_0x3af504===_0x5d9448[_0x2193(0x59)]&&_0x5d9448[_0x2193(0x47)](_0x5abdef,!![]);}catch(_0x1614c3){console[_0x2193(0x40)](_0x2193(0x1b),_0x1614c3);}finally{_0x5d9448[_0x2193(0x5a)](_0x5d9448['hsPIs'],_0x5d9448[_0x2193(0x5b)])?_0x4995ab(![]):_0x5d9448[_0x2193(0x47)](_0x3f290e,![]);}};_0x5d9448[_0x2193(0x5c)](_0x4cfc2a);},[]);const _0x4eed7f=async _0x56176e=>{const _0x298826={'QhNmE':_0x2193(0x2)};if(_0x5d9448[_0x2193(0x5d)](_0x5d9448[_0x2193(0x5e)],_0x5d9448['NaDRp']))_0x3e7adc['error'](_0x5d9448['Uiugf'],_0x17d6f2);else try{if(_0x5d9448[_0x2193(0x4c)](_0x5d9448[_0x2193(0x5f)],_0x5d9448[_0x2193(0x60)]))_0x5020da[_0x2193(0x3b)](_0x298826[_0x2193(0x61)]),_0xb25524=!![];else{var _0x345183;const _0x36b5fd={..._0x56176e,'onboarded':![]};await AsyncStorage['setItem'](_0x2193(0x4),JSON['stringify'](_0x36b5fd)),_0x107f2e(_0x36b5fd),_0x5d9448[_0x2193(0x62)](_0x98d47d,!![]),await saveAuthState({'isAuthenticated':!![],'authMethod':_0x5d9448[_0x2193(0x5a)](_0x345183=_0x56176e[_0x2193(0x63)],null)&&_0x345183!==void 0x0&&_0x345183['includes'](_0x5d9448['AvPmc'])?_0x5d9448['AvPmc']:_0x5d9448[_0x2193(0x64)],'hasValidToken':!![],'userEmail':_0x56176e[_0x2193(0x63)],'userName':_0x56176e['name']}),await markStepCompleted(_0x5d9448[_0x2193(0x65)]),console[_0x2193(0x3b)](_0x5d9448[_0x2193(0x66)],_0x36b5fd);}}catch(_0x1cfc0d){_0x5d9448[_0x2193(0x67)]===_0x5d9448[_0x2193(0x67)]?console[_0x2193(0x40)](_0x5d9448[_0x2193(0x68)],_0x1cfc0d):(_0x5d9448[_0x2193(0x3a)](_0x4c5e3f,_0x28e44d[_0x2193(0x3d)](_0x1c781e)),_0x5d9448[_0x2193(0x62)](_0xe21c48,!![]));}},_0x18c558=async _0x2d0721=>{const _0x246fff={'IJZZc':function(_0x2f9955,_0x347362){return _0x5d9448['wBpWN'](_0x2f9955,_0x347362);}};try{if(_0x5d9448[_0x2193(0x69)](_0x5d9448[_0x2193(0x6a)],_0x2193(0x6b))){_0x3f290e(!![]);const _0x44839f=await _0x5d9448[_0x2193(0x51)](authenticateWithApple,_0x2d0721);await _0x5d9448['askoj'](saveAuthToken,_0x44839f[_0x2193(0x6c)]),await AsyncStorage[_0x2193(0x45)](_0x5d9448['JcTcE'],_0x5d9448[_0x2193(0x6d)]);_0x44839f[_0x2193(0x16)]?(await AsyncStorage[_0x2193(0x45)](_0x2193(0x6e),_0x44839f[_0x2193(0x16)][_0x2193(0x6e)][_0x2193(0x6f)]()),_0x44839f[_0x2193(0x16)][_0x2193(0x1f)]&&(_0x5d9448[_0x2193(0x4c)](_0x5d9448[_0x2193(0x70)],_0x5d9448['fRtHB'])?await AsyncStorage[_0x2193(0x45)](_0x5d9448[_0x2193(0x71)],_0x44839f[_0x2193(0x16)][_0x2193(0x1f)]):_0x27299f[_0x2193(0x40)](_0x5d9448[_0x2193(0x72)],_0x3c25af)),_0x44839f['onairos'][_0x2193(0x20)]&&await AsyncStorage[_0x2193(0x45)](_0x5d9448[_0x2193(0x73)],_0x44839f[_0x2193(0x16)][_0x2193(0x20)]),console[_0x2193(0x3b)](_0x5d9448[_0x2193(0x74)],_0x44839f[_0x2193(0x16)][_0x2193(0x6e)])):_0x2193(0x75)===_0x2193(0x76)?_0x246fff['IJZZc'](_0x55de10,![]):(await AsyncStorage[_0x2193(0x45)](_0x2193(0x6e),_0x5d9448[_0x2193(0x77)]),console[_0x2193(0x3b)](_0x5d9448[_0x2193(0x78)]));const _0x1d464a={'id':_0x44839f[_0x2193(0x4)]['id'],'name':_0x44839f[_0x2193(0x4)][_0x2193(0x79)]||_0x2193(0x7a),'email':_0x44839f['user'][_0x2193(0x63)],'profilePicture':_0x44839f[_0x2193(0x4)][_0x2193(0x7b)],'onboarded':![]};return await AsyncStorage[_0x2193(0x45)](_0x5d9448[_0x2193(0x38)],JSON['stringify'](_0x1d464a)),_0x5d9448[_0x2193(0x7c)](_0x107f2e,_0x1d464a),_0x5d9448[_0x2193(0x51)](_0x98d47d,!![]),console['log'](_0x5d9448['CMZdT']),_0x1d464a;}else _0x24599d[_0x2193(0x40)](_0x5d9448[_0x2193(0x7d)],_0x50c46d);}catch(_0x1410f5){if(_0x5d9448[_0x2193(0x7e)](_0x2193(0x7f),_0x5d9448[_0x2193(0x80)])){console[_0x2193(0x40)](_0x5d9448[_0x2193(0x81)],_0x1410f5);throw _0x1410f5;}else _0x5d9448[_0x2193(0x31)](_0x1ccde8,![]);}finally{_0x5d9448[_0x2193(0x82)](_0x3f290e,![]);}},_0x52d0fd=async _0x1a502d=>{try{_0x5d9448['PTiqr'](_0x3f290e,!![]);const _0x4ec3ed=await _0x5d9448[_0x2193(0x62)](authenticateWithOnairos,_0x1a502d);await saveAuthToken(_0x4ec3ed[_0x2193(0x6c)]),await AsyncStorage[_0x2193(0x45)](_0x5d9448['JcTcE'],_0x5d9448['DFfTR']);const _0xcf695a={'id':_0x4ec3ed[_0x2193(0x4)]['id'],'name':_0x4ec3ed['user'][_0x2193(0x79)]||_0x5d9448[_0x2193(0x50)],'email':_0x4ec3ed['user']['email'],'profilePicture':_0x4ec3ed[_0x2193(0x4)][_0x2193(0x7b)],'onboarded':![]};return await AsyncStorage['setItem'](_0x2193(0x4),JSON[_0x2193(0x46)](_0xcf695a)),_0x5d9448['YiVoJ'](_0x107f2e,_0xcf695a),_0x5d9448[_0x2193(0x82)](_0x98d47d,!![]),console[_0x2193(0x3b)](_0x5d9448[_0x2193(0x83)]),_0xcf695a;}catch(_0x552699){if(_0x5d9448['iwdNa'](_0x5d9448[_0x2193(0x84)],_0x5d9448[_0x2193(0x84)])){console[_0x2193(0x40)]('Onairos\x20sign-in\x20failed:',_0x552699);throw _0x552699;}else _0xfacc2d(![]);}finally{_0x5d9448[_0x2193(0x85)](_0x3f290e,![]);}},_0x40a8ab=async()=>{const _0x13e017={'EwHAE':_0x2193(0x2b)};if(_0x5d9448['UXOjP']===_0x5d9448[_0x2193(0x86)]){_0x3d49d5['error'](_0x13e017['EwHAE'],_0x1a4234);throw _0x4f6817;}else try{if(_0x5d9448['AZvSt']===_0x5d9448[_0x2193(0x87)])throw new _0x2048ec('useAuth\x20must\x20be\x20used\x20within\x20an\x20AuthProvider');else await _0x5d9448['rUZZv'](clearUserData),_0x5d9448['DXSbG'](_0x107f2e,null),_0x5d9448[_0x2193(0x88)](_0x98d47d,![]);}catch(_0x31b1ba){console['error']('Failed\x20to\x20remove\x20user\x20data:',_0x31b1ba);}},_0x20bff5=async _0x3e74d4=>{const _0x27d46e={'OipFD':function(_0x5a6b54,_0xd31c6c){return _0x5a6b54(_0xd31c6c);}};if(_0x5d9448[_0x2193(0x89)](_0x5d9448[_0x2193(0x8a)],_0x5d9448[_0x2193(0x8b)]))_0x27d46e[_0x2193(0x8c)](_0x4f8e72,!![]);else try{if(_0x5d9448[_0x2193(0x8d)]===_0x5d9448[_0x2193(0x8d)]){const _0x8a891b={..._0xacdc5e,..._0x3e74d4};await AsyncStorage['setItem'](_0x2193(0x4),JSON[_0x2193(0x46)](_0x8a891b)),_0x107f2e(_0x8a891b),await _0x5d9448[_0x2193(0x5c)](_0x260958);}else{_0x3ecd1a[_0x2193(0x40)](_0x2193(0x2f),_0x16e856);throw _0x265d6a;}}catch(_0x57d47e){console[_0x2193(0x40)](_0x5d9448['CyhsE'],_0x57d47e);throw _0x57d47e;}},_0x34f9f6=async _0x3c3e1e=>{const _0x53b13e={'wKgGp':_0x2193(0x8e),'WaOJi':function(_0xfe8b97,_0x4824a2){return _0x5d9448['bIdQe'](_0xfe8b97,_0x4824a2);},'JdFnL':_0x2193(0x5),'sPosN':function(_0x3402b1,_0x254b16){return _0x3402b1(_0x254b16);},'tZPIE':function(_0x451859,_0x52ba59){return _0x5d9448[_0x2193(0x4c)](_0x451859,_0x52ba59);}};if(_0x5d9448['oioOu'](_0x5d9448[_0x2193(0x8f)],_0x2193(0x2c)))try{if(_0x5d9448[_0x2193(0x90)](_0x5d9448[_0x2193(0x91)],_0x5d9448[_0x2193(0x92)])){if(!_0xacdc5e)return;const _0x31d17c={..._0xacdc5e,..._0x3c3e1e};await AsyncStorage[_0x2193(0x45)](_0x5d9448[_0x2193(0x38)],JSON[_0x2193(0x46)](_0x31d17c)),_0x5d9448[_0x2193(0x93)](_0x107f2e,_0x31d17c);}else{const _0x36690a=_0x53b13e[_0x2193(0x94)]['split']('|');let _0x25f25f=0x0;while(!![]){switch(_0x36690a[_0x25f25f++]){case'0':_0x53b13e[_0x2193(0x95)](_0x3a4741,![]);continue;case'1':_0x107d4c[_0x2193(0x3b)](_0x53b13e[_0x2193(0x96)]);continue;case'2':_0x515ec9(!![]);continue;case'3':_0x53b13e[_0x2193(0x95)](_0x10d39e,!![]);continue;case'4':_0x53b13e[_0x2193(0x97)](_0x398230,_0x12f775[_0x2193(0x3d)](_0x1efe46));continue;case'5':return;}break;}}}catch(_0x4bde89){console[_0x2193(0x40)](_0x5d9448[_0x2193(0x72)],_0x4bde89);}else{const _0x592f80=_0x53b13e[_0x2193(0x97)](useContext,_0x44135c);if(_0x53b13e[_0x2193(0x98)](_0x592f80,_0x2ad2f6))throw new _0x275463('useAuth\x20must\x20be\x20used\x20within\x20an\x20AuthProvider');return _0x592f80;}},_0x260958=async()=>{try{_0x5d9448['PTiqr'](_0x3f290e,!![]),await _0x5d9448['iadpK'](updateUserOnboardedStatus);if(_0xacdc5e){const _0x4316ae={..._0xacdc5e,'onboarded':!![]};await AsyncStorage[_0x2193(0x45)](_0x5d9448['wxIDp'],JSON[_0x2193(0x46)](_0x4316ae)),_0x5d9448[_0x2193(0x99)](_0x107f2e,_0x4316ae);}}catch(_0x26b02e){console[_0x2193(0x40)](_0x5d9448[_0x2193(0x9a)],_0x26b02e);throw _0x26b02e;}finally{_0x3f290e(![]);}},_0x40a14a=async()=>{try{await AsyncStorage[_0x2193(0x9b)]('user'),await _0x5d9448[_0x2193(0x37)](removeAuthToken),await AsyncStorage['removeItem'](_0x2193(0xf)),_0x107f2e(null),_0x5d9448[_0x2193(0x9c)](_0x98d47d,![]),_0x5abdef(![]),console[_0x2193(0x3b)](_0x2193(0x9d));}catch(_0x50362){console[_0x2193(0x40)](_0x5d9448['GiukT'],_0x50362);throw _0x50362;}};return React['createElement'](AuthContext['Provider'],{'value':{'user':_0xacdc5e,'isLoading':_0x4b92f2,'hasCompletedOnboarding':_0x4a25f1,'login':_0x4eed7f,'logout':_0x40a8ab,'deleteAccount':_0x40a14a,'completeOnboarding':_0x20bff5,'updateUser':_0x34f9f6,'appleSignIn':_0x18c558,'onairosSignIn':_0x52d0fd,'isAuthenticated':_0x266481,'updateOnboardedStatus':_0x260958,'getResumeTarget':getResumeTarget,'markStepCompleted':markStepCompleted,'updateLastScreen':updateLastScreen,'isReturningUser':isReturningUser,'markEventPageReached':markEventPageReached,'hasEventAccessToken':hasEventAccessToken}},_0xcd05fc);};export const useAuth=()=>{const _0x4d3a49={'NUsNQ':_0x2193(0x9e)},_0x30b3e0=useContext(AuthContext);if(_0x30b3e0===undefined)throw new Error(_0x4d3a49[_0x2193(0x9f)]);return _0x30b3e0;};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useState,useEffect,useCallback}from'react';import{getConnectedAccountsSmart}from'../services/connectedAccountsService';
|
|
1
|
+
import{useState,useEffect,useCallback}from'react';import{getConnectedAccountsSmart}from'../services/connectedAccountsService';function _0x69e9(){const _0x14d560=['🔍\x20No\x20user\x20available\x20for\x20fetching\x20connected\x20accounts','Failed\x20to\x20load\x20connected\x20accounts','UXkwX','🔄\x20[HOOK]\x20Refreshing\x20connected\x20accounts...','✅\x20[HOOK]\x20Account\x20added\x20locally:','jVSwg','SOQJj','lNEyE','gxVkL','log','rVNix','ZuCgv','rxBOl','email','name','length','\x20accounts','error','❌\x20[HOOK]\x20Error\x20fetching\x20connected\x20accounts:','EVlLO','ofdpl','qpyQj','aOhGl','AnAhn','YcZtt','toLowerCase','.com/','some','platform','map','WlZlJ','Ifkdj','filter','✅\x20[HOOK]\x20Account\x20removed\x20locally:','RHyJF'];_0x69e9=function(){return _0x14d560;};return _0x69e9();}import{useAuth}from'../context/AuthContext';function _0x35e4(_0x69e9f9,_0x35e43c){_0x69e9f9=_0x69e9f9-0x0;const _0x39cadd=_0x69e9();let _0x3dc617=_0x39cadd[_0x69e9f9];return _0x3dc617;}export const useConnectedAccounts=()=>{const _0x2c9e1c={'ofdpl':_0x35e4(0x0),'rVNix':function(_0x4e4b44,_0x1283eb){return _0x4e4b44(_0x1283eb);},'ZuCgv':function(_0x360b1d,_0x50b0c2){return _0x360b1d(_0x50b0c2);},'rxBOl':function(_0x2b8f8a,_0xaba52b){return _0x2b8f8a(_0xaba52b);},'aJGYU':'🚀\x20[HOOK]\x20Starting\x20connected\x20accounts\x20fetch\x20with\x20new\x20smart\x20API...','JXViS':_0x35e4(0x1),'qpyQj':function(_0x3e5eb4,_0x31779a){return _0x3e5eb4===_0x31779a;},'aOhGl':_0x35e4(0x2),'PPWYv':_0x35e4(0x3),'WlZlJ':_0x35e4(0x4),'Ifkdj':function(_0x2d23c4,_0x59d195){return _0x2d23c4(_0x59d195);},'RHyJF':function(_0x1042cb,_0x395738){return _0x1042cb===_0x395738;},'NIFUS':_0x35e4(0x5),'SOQJj':function(_0x580462){return _0x580462();},'lNEyE':function(_0x2f1845,_0x5ec7d5){return _0x2f1845(_0x5ec7d5);},'gxVkL':function(_0xd050b4,_0xc71d4f,_0x11e275){return _0xd050b4(_0xc71d4f,_0x11e275);},'EVlLO':function(_0x1170dc,_0x2df8dc,_0x112656){return _0x1170dc(_0x2df8dc,_0x112656);},'NJhFH':function(_0x13b045,_0x58fd56,_0x4b056e){return _0x13b045(_0x58fd56,_0x4b056e);}},{user:_0x21a1fe}=_0x2c9e1c[_0x35e4(0x6)](useAuth),[_0x31df34,_0x3a8c37]=_0x2c9e1c[_0x35e4(0x7)](useState,[]),[_0x156a2c,_0x4c04f1]=useState(!![]),[_0x31eb5b,_0x4197ef]=_0x2c9e1c['ZuCgv'](useState,null),_0x31514b=_0x2c9e1c[_0x35e4(0x8)](useCallback,async()=>{if(!_0x21a1fe){console[_0x35e4(0x9)](_0x2c9e1c['ofdpl']),_0x2c9e1c[_0x35e4(0xa)](_0x4c04f1,![]);return;}try{_0x2c9e1c[_0x35e4(0xb)](_0x4c04f1,!![]),_0x2c9e1c[_0x35e4(0xc)](_0x4197ef,null),console['log'](_0x2c9e1c['aJGYU']),console[_0x35e4(0x9)]('🚀\x20[HOOK]\x20User\x20info\x20available:',{'email':_0x21a1fe[_0x35e4(0xd)],'id':_0x21a1fe['id'],'name':_0x21a1fe[_0x35e4(0xe)]});const _0x255dc9=await getConnectedAccountsSmart(_0x21a1fe['email'],_0x21a1fe['id'],_0x21a1fe[_0x35e4(0xe)]);console['log']('✅\x20[HOOK]\x20Connected\x20accounts\x20loaded\x20via\x20smart\x20API:\x20'+_0x255dc9[_0x35e4(0xf)]+_0x35e4(0x10)),_0x3a8c37(_0x255dc9);}catch(_0x315645){console[_0x35e4(0x11)](_0x35e4(0x12),_0x315645),_0x2c9e1c['rxBOl'](_0x4197ef,_0x2c9e1c['JXViS']);}finally{_0x2c9e1c[_0x35e4(0xc)](_0x4c04f1,![]);}},[_0x21a1fe]),_0x4b2b03=_0x2c9e1c[_0x35e4(0x13)](useCallback,async()=>{const _0xc4d40f={'lSNEg':_0x2c9e1c[_0x35e4(0x14)],'YcZtt':function(_0x88ae48,_0x19efef){return _0x88ae48(_0x19efef);}};if(_0x2c9e1c[_0x35e4(0x15)](_0x2c9e1c[_0x35e4(0x16)],_0x35e4(0x17))){_0x41465d[_0x35e4(0x9)](_0xc4d40f['lSNEg']),_0xc4d40f[_0x35e4(0x18)](_0x246159,![]);return;}else console[_0x35e4(0x9)](_0x2c9e1c['PPWYv']),await _0x31514b();},[_0x31514b]),_0x4de18c=_0x2c9e1c['NJhFH'](useCallback,(_0x33b2d4,_0x452cf5)=>{const _0x244016='https://'+_0x33b2d4[_0x35e4(0x19)]()+_0x35e4(0x1a)+_0x452cf5,_0x404c61={'platform':_0x33b2d4,'username':_0x452cf5,'url':_0x244016};_0x2c9e1c[_0x35e4(0xa)](_0x3a8c37,_0x1a9cbf=>{const _0x3a05a3=_0x1a9cbf[_0x35e4(0x1b)](_0x4cee62=>_0x4cee62[_0x35e4(0x1c)][_0x35e4(0x19)]()===_0x33b2d4[_0x35e4(0x19)]());return _0x3a05a3?_0x1a9cbf[_0x35e4(0x1d)](_0x510a8c=>_0x510a8c['platform'][_0x35e4(0x19)]()===_0x33b2d4[_0x35e4(0x19)]()?_0x404c61:_0x510a8c):[..._0x1a9cbf,_0x404c61];}),console[_0x35e4(0x9)](_0x2c9e1c[_0x35e4(0x1e)],_0x404c61);},[]),_0x209b78=useCallback(_0x1bc07f=>{_0x2c9e1c[_0x35e4(0x1f)](_0x3a8c37,_0x2d6a8d=>_0x2d6a8d[_0x35e4(0x20)](_0x389a53=>_0x389a53['platform'][_0x35e4(0x19)]()!==_0x1bc07f[_0x35e4(0x19)]())),console[_0x35e4(0x9)](_0x35e4(0x21),_0x1bc07f);},[]);return _0x2c9e1c[_0x35e4(0x13)](useEffect,()=>{if(_0x2c9e1c[_0x35e4(0x22)](_0x2c9e1c['NIFUS'],_0x35e4(0x5)))_0x2c9e1c['SOQJj'](_0x31514b);else return _0x5dc198[_0x35e4(0x1d)](_0x4d844e=>_0x4d844e[_0x35e4(0x1c)][_0x35e4(0x19)]()===_0x403805['toLowerCase']()?_0x248c8c:_0x4d844e);},[_0x31514b]),{'connectedAccounts':_0x31df34,'isLoading':_0x156a2c,'error':_0x31eb5b,'refreshAccounts':_0x4b2b03,'addAccount':_0x4de18c,'removeAccount':_0x209b78};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x3df3(){const _0x132f8d=['ℹ️\x20NOTE:\x20Backend\x20sync\x20removed\x20from\x20SDK\x20-\x20app\x20should\x20call\x20/enoch/users/update\x20if\x20needed','youtube','zfaxw','xrOez','KZygr','YEnwH','twszM','JzkEx','WEuBu','YAtMd','rKGOD','MrJwn','WFXLO','xByFh','IOfIv','YJXaj','instagram','DAdSs','iavZM','YWZsp','\x20connected\x20locally','zHeYg','yDsHH','vtzpQ','TjKsQ','dYxBB','ZZyPX','log','✅\x20Platform\x20','\x20disconnected\x20locally','error','Error\x20disconnecting\x20platform\x20','Error\x20connecting\x20platform\x20','DOJYA','SbOMY','sAsah','wqfqL'];_0x3df3=function(){return _0x132f8d;};return _0x3df3();}function _0x8f50(_0x3df3b2,_0x8f5089){_0x3df3b2=_0x3df3b2-0x0;const _0x29fa13=_0x3df3();let _0x3e251f=_0x29fa13[_0x3df3b2];return _0x3e251f;}import{useState,useCallback}from'react';import{initiateNativeAuth}from'../services/platformAuthService';export const useConnections=()=>{const _0x39d89c={'WFXLO':function(_0x47565b,_0x21b2e9){return _0x47565b(_0x21b2e9);},'xByFh':_0x8f50(0x0),'Dpanm':function(_0x424bb8,_0x149990){return _0x424bb8(_0x149990);},'YJXaj':function(_0x19e050,_0x32b41f){return _0x19e050===_0x32b41f;},'IOfIv':_0x8f50(0x1),'yDsHH':function(_0x308449,_0x1ce1d5){return _0x308449!==_0x1ce1d5;},'DAdSs':_0x8f50(0x2),'iavZM':_0x8f50(0x3),'tHoIq':_0x8f50(0x4),'vtzpQ':_0x8f50(0x5),'TjKsQ':'UKSoZ','dYxBB':_0x8f50(0x6),'ZZyPX':function(_0xa318a8,_0x5ba843){return _0xa318a8(_0x5ba843);},'MKlNn':function(_0x1a59e8,_0x56bd86){return _0x1a59e8(_0x56bd86);},'SbOMY':_0x8f50(0x7),'eueRl':_0x8f50(0x8),'sAsah':'uRCEy','wqfqL':_0x8f50(0x9),'rKGOD':function(_0x37476a,_0x1cce03){return _0x37476a(_0x1cce03);},'MrJwn':function(_0x4094ce,_0x1058ff,_0x1ba2d6){return _0x4094ce(_0x1058ff,_0x1ba2d6);},'DOJYA':function(_0x22ef0d,_0x57cc0c,_0x57fc9e){return _0x22ef0d(_0x57cc0c,_0x57fc9e);}},[_0x363ef2,_0x5bc736]=_0x39d89c[_0x8f50(0xa)](useState,{}),[_0x540e70,_0x45dfa0]=useState(![]),_0x52eaf0=_0x39d89c[_0x8f50(0xb)](useCallback,async(_0x35fb5a,_0x1f049c)=>{const _0x4f438a={'YWZsp':function(_0x3a0d45,_0x1cf701){return _0x39d89c[_0x8f50(0xc)](_0x3a0d45,_0x1cf701);},'zHeYg':_0x39d89c[_0x8f50(0xd)]};try{_0x39d89c['Dpanm'](_0x45dfa0,!![]);const useNativeSDK=_0x39d89c['YJXaj'](_0x35fb5a,_0x39d89c[_0x8f50(0xe)])||_0x39d89c[_0x8f50(0xf)](_0x35fb5a,_0x8f50(0x10));let _0x2fd381=![];if(useNativeSDK){if(_0x39d89c['yDsHH'](_0x39d89c[_0x8f50(0x11)],_0x39d89c[_0x8f50(0x12)]))_0x2fd381=await initiateNativeAuth(_0x35fb5a,_0x1f049c);else return _0x4f438a[_0x8f50(0x13)](_0x2a729b,_0x4ff97d=>({..._0x4ff97d,[_0x42a81b]:{'userName':_0x2b384f,'connected':!![]}})),_0x5b6d43['log']('✅\x20Platform\x20'+_0x4190d5+_0x8f50(0x14)),_0x2d53cb['log'](_0x4f438a[_0x8f50(0x15)]),!![];}else{if(_0x39d89c[_0x8f50(0x16)](_0x39d89c['tHoIq'],_0x39d89c[_0x8f50(0x17)]))await new Promise(_0x360b82=>setTimeout(()=>_0x360b82(undefined),0x3e8)),_0x2fd381=!![];else return _0x4d1d75;}if(_0x2fd381){if(_0x39d89c[_0x8f50(0x16)](_0x39d89c[_0x8f50(0x18)],_0x39d89c[_0x8f50(0x19)]))return _0x39d89c[_0x8f50(0x1a)](_0x5bc736,_0x268647=>({..._0x268647,[_0x35fb5a]:{'userName':_0x1f049c,'connected':!![]}})),console[_0x8f50(0x1b)]('✅\x20Platform\x20'+_0x35fb5a+_0x8f50(0x14)),console[_0x8f50(0x1b)](_0x39d89c['xByFh']),!![];else try{return _0x39d89c[_0x8f50(0xc)](_0x613a66,_0xff116d=>{const _0x579ef0={..._0xff116d};return delete _0x579ef0[_0x1c3e93],_0x579ef0;}),_0x4a6f23[_0x8f50(0x1b)](_0x8f50(0x1c)+_0x5d5b0e+_0x8f50(0x1d)),_0x28b65e['log'](_0x39d89c[_0x8f50(0xd)]),!![];}catch(_0x3d7d20){return _0x2947ce[_0x8f50(0x1e)](_0x8f50(0x1f)+_0x201237+':',_0x3d7d20),![];}}return![];}catch(_0x1093ae){return console[_0x8f50(0x1e)](_0x8f50(0x20)+_0x35fb5a+':',_0x1093ae),![];}finally{_0x39d89c['MKlNn'](_0x45dfa0,![]);}},[]),_0x14d59e=_0x39d89c[_0x8f50(0x21)](useCallback,async(_0xd4a040,_0x3d5055)=>{if(_0x39d89c['yDsHH'](_0x39d89c[_0x8f50(0x22)],_0x39d89c['eueRl']))try{return _0x39d89c[_0x8f50(0xc)](_0x5bc736,_0xd55cf8=>{const _0x52d2a4={..._0xd55cf8};return delete _0x52d2a4[_0xd4a040],_0x52d2a4;}),console[_0x8f50(0x1b)](_0x8f50(0x1c)+_0xd4a040+_0x8f50(0x1d)),console[_0x8f50(0x1b)](_0x39d89c['xByFh']),!![];}catch(_0x1785b7){return console['error'](_0x8f50(0x1f)+_0xd4a040+':',_0x1785b7),![];}else return _0x437637[_0x8f50(0x1e)]('Error\x20connecting\x20platform\x20'+_0x31b61c+':',_0x30374e),![];},[]),_0x4e9478=_0x39d89c['MrJwn'](useCallback,async()=>{if(_0x39d89c[_0x8f50(0xf)](_0x39d89c[_0x8f50(0x23)],_0x39d89c[_0x8f50(0x24)]))_0x124291(![]);else return _0x363ef2;},[_0x363ef2]);return{'connections':_0x363ef2,'connectPlatform':_0x52eaf0,'disconnectPlatform':_0x14d59e,'getConnectionStatus':_0x4e9478,'isConnecting':_0x540e70};};
|
|
@@ -4,4 +4,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
4
4
|
require('react-native-keychain')
|
|
5
5
|
];
|
|
6
6
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
7
|
-
function _0x14c3(_0x561666,_0x14c382){_0x561666=_0x561666-0x0;const _0x44aca5=_0x5616();let _0x192517=_0x44aca5[_0x561666];return _0x192517;}import{useCallback}from'react';import{STORAGE_KEYS}from'../constants';function _0x5616(){const _0x4baae4=['function','BpZfO','getGenericPassword','xNFPU','RPBNa','PxpBb','default','RLqDP','ZMGVN','service','warn','AQBRR','mNdhZ','TwwXs','Error\x20getting\x20credentials:','TONiF','JEFyG','Tvxut','asOaM','RvsRO','setGenericPassword','atGJU','TanSV','Ccypw','VPfxG','BtVAy','sFUcU','Error\x20validating\x20credentials:','IgWzt','Keychain\x20access\x20failed,\x20using\x20mock\x20storage','oBYEX','LEOxH','fJwfh','bRpgG','iPhfc','resetGenericPassword','NfFGW','aEGlH','urPfT','EFFtL','YUiiJ','OwLOF','oLllk','FKDFu','Error\x20clearing\x20credentials:','nOCyA','lORgm','Error\x20storing\x20credentials:','ZlmSL','CQWdn','CbFjJ','nNveh','KzvUz','credentials','UYRWl','dtBwh','jJQiF','BFQji','error','Error\x20checking\x20credentials:','nSZoh','parse','password','uYPok','ooYjo','GNIrQ','accessControl','BIOMETRY_ANY','ACCESSIBLE','WHEN_UNLOCKED','ACCESS_CONTROL','accessible','MrefY','stringify','veQEs','GwKaN','iSjlQ','FgTJD','ofeii','UGAZu','BASE_URL','/validate','json','valid','qoZKJ','dxLrn','awBoQ','YNHdv'];_0x5616=function(){return _0x4baae4;};return _0x5616();}import{API_CONFIG}from'../config/api';const mockCredentialStorage={};let Keychain=null;try{Keychain=__ONAIROS_REQ_FUNC__(0x0);}catch(_0x3a8f48){console['warn']('react-native-keychain module not available in useCredentials, using mock storage');}const isKeychainAvailable=()=>{const _0x39a55c={'BpZfO':function(_0x2dbc84,_0x256e03){return _0x2dbc84===_0x256e03;},'xNFPU':_0x14c3(0x0),'PxpBb':'gXUSr'};try{return Keychain&&_0x39a55c[_0x14c3(0x1)](typeof Keychain[_0x14c3(0x2)],_0x39a55c[_0x14c3(0x3)]);}catch(_0x2bc6d8){if(_0x14c3(0x4)!==_0x39a55c[_0x14c3(0x5)])return![];else Keychain=_0x3b1fcc(0x0);}},safeGetGenericPassword=async _0x53580e=>{const _0x3502df={'RLqDP':function(_0x2831e2){return _0x2831e2();},'ZMGVN':function(_0x2c3337,_0x446243){return _0x2c3337===_0x446243;},'AQBRR':'Keychain\x20access\x20failed,\x20using\x20mock\x20storage','mNdhZ':function(_0x4f586d,_0x1dc989){return _0x4f586d===_0x1dc989;},'TwwXs':_0x14c3(0x6)};try{if(_0x3502df[_0x14c3(0x7)](isKeychainAvailable))return await Keychain[_0x14c3(0x2)](_0x53580e);else{const _0x4e0d3a=(_0x3502df[_0x14c3(0x8)](_0x53580e,null)||_0x3502df[_0x14c3(0x8)](_0x53580e,void 0x0)?void 0x0:_0x53580e[_0x14c3(0x9)])||'default';return mockCredentialStorage[_0x4e0d3a]||null;}}catch(_0x1fac9d){console[_0x14c3(0xa)](_0x3502df[_0x14c3(0xb)],_0x1fac9d);const _0x5ed957=(_0x53580e===null||_0x3502df[_0x14c3(0xc)](_0x53580e,void 0x0)?void 0x0:_0x53580e[_0x14c3(0x9)])||_0x3502df[_0x14c3(0xd)];return mockCredentialStorage[_0x5ed957]||null;}},safeSetGenericPassword=async(_0xe8ab93,_0x2145c1,_0x45f119)=>{const _0x4af4b0={'TanSV':function(_0x47f797,_0x472741){return _0x47f797===_0x472741;},'Ccypw':'default','VPfxG':_0x14c3(0xe),'Tvxut':_0x14c3(0xf),'asOaM':function(_0xc34b41,_0xff9738){return _0xc34b41===_0xff9738;},'atGJU':'nERan','BtVAy':_0x14c3(0x10),'BUDAf':'Keychain\x20access\x20failed,\x20using\x20mock\x20storage','sFUcU':function(_0x343444,_0x1f2b65){return _0x343444===_0x1f2b65;}};try{if(_0x4af4b0[_0x14c3(0x11)]===_0x4af4b0[_0x14c3(0x11)]){if(isKeychainAvailable()){if(_0x4af4b0[_0x14c3(0x12)](_0x14c3(0x13),_0x14c3(0x13)))return await Keychain[_0x14c3(0x14)](_0xe8ab93,_0x2145c1,_0x45f119);else{const _0x28c151=(_0x5360e1===null||_0x5598a5===void 0x0?void 0x0:_0x268fc9[_0x14c3(0x9)])||_0x14c3(0x6);return delete _0x4bbcc6[_0x28c151],!![];}}else{if(_0x4af4b0['asOaM'](_0x4af4b0[_0x14c3(0x15)],_0x4af4b0[_0x14c3(0x15)])){const _0x2b6ff5=(_0x45f119===null||_0x4af4b0['asOaM'](_0x45f119,void 0x0)?void 0x0:_0x45f119[_0x14c3(0x9)])||_0x4af4b0['Ccypw'];return mockCredentialStorage[_0x2b6ff5]={'username':_0xe8ab93,'password':_0x2145c1},!![];}else{const _0x3fddd6=(_0x4af4b0[_0x14c3(0x16)](_0x31a682,null)||_0x22616a===void 0x0?void 0x0:_0x18ad17[_0x14c3(0x9)])||_0x4af4b0[_0x14c3(0x17)];return _0x324582[_0x3fddd6]={'username':_0x3615f1,'password':_0x59c8fb},!![];}}}else return _0x5bea87['error'](_0x4af4b0[_0x14c3(0x18)],_0x54ca40),null;}catch(_0x2f973d){if(_0x4af4b0['asOaM'](_0x4af4b0['BtVAy'],_0x4af4b0[_0x14c3(0x19)])){console[_0x14c3(0xa)](_0x4af4b0['BUDAf'],_0x2f973d);const _0x559834=(_0x4af4b0[_0x14c3(0x1a)](_0x45f119,null)||_0x4af4b0[_0x14c3(0x12)](_0x45f119,void 0x0)?void 0x0:_0x45f119['service'])||_0x4af4b0[_0x14c3(0x17)];return mockCredentialStorage[_0x559834]={'username':_0xe8ab93,'password':_0x2145c1},!![];}else return _0x33d7a7['error']('Error\x20storing\x20credentials:',_0x4cd7ed),![];}},safeResetGenericPassword=async _0x31517b=>{const _0x3ffce1={'LEOxH':function(_0x1823a2,_0x54dc72){return _0x1823a2===_0x54dc72;},'fJwfh':function(_0x3393b9,_0x411786){return _0x3393b9===_0x411786;},'bRpgG':_0x14c3(0x6),'OFCHr':_0x14c3(0x1b),'oBYEX':'QaCau','OrrtR':function(_0xa6a0b1){return _0xa6a0b1();},'NfFGW':function(_0x1e529b,_0x4ec871){return _0x1e529b!==_0x4ec871;},'aEGlH':_0x14c3(0x1c),'EFFtL':_0x14c3(0x1d),'YUiiJ':function(_0x461e7c,_0x3b43b4){return _0x461e7c===_0x3b43b4;}};try{if(_0x3ffce1[_0x14c3(0x1e)]!==_0x3ffce1['oBYEX']){_0x52944d['warn'](_0x14c3(0x1d),_0x1276d5);const _0x473868=(_0x3ffce1[_0x14c3(0x1f)](_0x3a3ce3,null)||_0x3ffce1[_0x14c3(0x20)](_0x5d6ff0,void 0x0)?void 0x0:_0x1397d7['service'])||_0x3ffce1[_0x14c3(0x21)];return delete _0x34a7d2[_0x473868],!![];}else{if(_0x3ffce1['OrrtR'](isKeychainAvailable))return _0x3ffce1['NfFGW']('iPhfc',_0x14c3(0x22))?![]:await Keychain[_0x14c3(0x23)](_0x31517b);else{const _0x461184=(_0x3ffce1[_0x14c3(0x20)](_0x31517b,null)||_0x31517b===void 0x0?void 0x0:_0x31517b[_0x14c3(0x9)])||_0x14c3(0x6);return delete mockCredentialStorage[_0x461184],!![];}}}catch(_0x25c95b){if(_0x3ffce1[_0x14c3(0x24)](_0x3ffce1[_0x14c3(0x25)],_0x14c3(0x26))){console[_0x14c3(0xa)](_0x3ffce1[_0x14c3(0x27)],_0x25c95b);const _0xc7d6d=(_0x31517b===null||_0x3ffce1[_0x14c3(0x28)](_0x31517b,void 0x0)?void 0x0:_0x31517b[_0x14c3(0x9)])||_0x3ffce1[_0x14c3(0x21)];return delete mockCredentialStorage[_0xc7d6d],!![];}else return _0x141f78['error'](_0x3ffce1['OFCHr'],_0x3606a0),{'success':![],'isValid':![]};}};export const useCredentials=()=>{const _0x5a22bb={'UYRWl':function(_0x3ac0c9,_0x4f15f0){return _0x3ac0c9===_0x4f15f0;},'BFQji':_0x14c3(0x0),'KzvUz':_0x14c3(0x29),'dtBwh':_0x14c3(0x2a),'jJQiF':_0x14c3(0x2b),'uYPok':_0x14c3(0x2c),'nSZoh':_0x14c3(0x2d),'ooYjo':function(_0x5ed70d){return _0x5ed70d();},'GNIrQ':_0x14c3(0x2e),'vFKOM':function(_0x1336c2,_0xd72f18){return _0x1336c2===_0xd72f18;},'awBoQ':function(_0x117f3e,_0xf06554){return _0x117f3e===_0xf06554;},'MrefY':function(_0x53d915,_0x282380,_0x524c03,_0x4772b8){return _0x53d915(_0x282380,_0x524c03,_0x4772b8);},'veQEs':_0x14c3(0x2f),'RArfJ':_0x14c3(0x1d),'muCwb':function(_0x9b2a62,_0x5608fc){return _0x9b2a62===_0x5608fc;},'ofeii':_0x14c3(0x6),'pLxnN':function(_0x350149,_0x3f8334){return _0x350149===_0x3f8334;},'FgTJD':_0x14c3(0x30),'UGAZu':_0x14c3(0x31),'nNveh':function(_0x4db9b7,_0xe66895,_0x5b30b5){return _0x4db9b7(_0xe66895,_0x5b30b5);},'qoZKJ':'kQUAM','dxLrn':_0x14c3(0x32),'YNHdv':_0x14c3(0x1b),'GwKaN':function(_0x491c5f,_0x37b4f5,_0x3eb529){return _0x491c5f(_0x37b4f5,_0x3eb529);}},_0x5613ee=_0x5a22bb[_0x14c3(0x33)](useCallback,async()=>{if(_0x14c3(0x29)!==_0x5a22bb[_0x14c3(0x34)])_0x4b488f[_0x14c3(0xa)]('react-native-keychain module not available in useCredentials, using mock storage');else try{const _0x50637f=await safeGetGenericPassword({'service':STORAGE_KEYS[_0x14c3(0x35)]});return!!_0x50637f;}catch(_0x587a8e){return _0x5a22bb[_0x14c3(0x36)](_0x5a22bb[_0x14c3(0x37)],_0x5a22bb[_0x14c3(0x38)])?Keychain&&_0x5a22bb[_0x14c3(0x36)](typeof Keychain[_0x14c3(0x2)],_0x5a22bb[_0x14c3(0x39)]):(console[_0x14c3(0x3a)](_0x14c3(0x3b),_0x587a8e),![]);}},[]),_0x2bab92=useCallback(async()=>{try{const _0x37a98e=await safeGetGenericPassword({'service':STORAGE_KEYS['credentials']});if(_0x37a98e){if(_0x5a22bb[_0x14c3(0x36)](_0x5a22bb[_0x14c3(0x3c)],_0x5a22bb[_0x14c3(0x3c)]))return JSON[_0x14c3(0x3d)](_0x37a98e[_0x14c3(0x3e)]);else _0x12a894[_0x14c3(0x3a)](_0x5a22bb[_0x14c3(0x3f)],_0xf6fd58);}return null;}catch(_0x102e1a){return console[_0x14c3(0x3a)](_0x14c3(0xe),_0x102e1a),null;}},[]),_0x4d46e8=useCallback(async(_0x4fc3ef,_0x26a9b1,_0x558b79)=>{try{const _0x53cc50={'service':STORAGE_KEYS[_0x14c3(0x35)]};if(_0x5a22bb[_0x14c3(0x40)](isKeychainAvailable)){if(_0x5a22bb[_0x14c3(0x36)](_0x5a22bb[_0x14c3(0x41)],_0x5a22bb[_0x14c3(0x41)])){var _0x7026f7,_0xeb63dc;_0x53cc50[_0x14c3(0x42)]=_0x5a22bb['vFKOM'](_0x7026f7=Keychain['ACCESS_CONTROL'],null)||_0x7026f7===void 0x0?void 0x0:_0x7026f7[_0x14c3(0x43)],_0x53cc50['accessible']=_0x5a22bb['awBoQ'](_0xeb63dc=Keychain[_0x14c3(0x44)],null)||_0xeb63dc===void 0x0?void 0x0:_0xeb63dc[_0x14c3(0x45)];}else{var _0x53c6dc,_0x418852;_0x5bd0ca[_0x14c3(0x42)]=(_0x53c6dc=Keychain[_0x14c3(0x46)])===null||_0x5a22bb[_0x14c3(0x36)](_0x53c6dc,void 0x0)?void 0x0:_0x53c6dc[_0x14c3(0x43)],_0xeaacf9[_0x14c3(0x47)]=_0x5a22bb[_0x14c3(0x36)](_0x418852=Keychain['ACCESSIBLE'],null)||_0x5a22bb[_0x14c3(0x36)](_0x418852,void 0x0)?void 0x0:_0x418852['WHEN_UNLOCKED'];}}return await _0x5a22bb[_0x14c3(0x48)](safeSetGenericPassword,_0x4fc3ef,JSON[_0x14c3(0x49)]({'userPin':_0x26a9b1,'accessToken':_0x558b79}),_0x53cc50),!![];}catch(_0xf836fe){return console[_0x14c3(0x3a)](_0x5a22bb[_0x14c3(0x4a)],_0xf836fe),![];}},[]),_0x4821cf=useCallback(async()=>{try{await safeResetGenericPassword({'service':STORAGE_KEYS[_0x14c3(0x35)]});}catch(_0x327721){console['error'](_0x5a22bb[_0x14c3(0x3f)],_0x327721);}},[]),_0x1f04d1=_0x5a22bb[_0x14c3(0x4b)](useCallback,async _0x4d8a8d=>{if(_0x5a22bb['UYRWl'](_0x14c3(0x4c),_0x5a22bb[_0x14c3(0x4d)])){_0x473e4e[_0x14c3(0xa)](_0x5a22bb['RArfJ'],_0x241990);const _0x5f2d18=(_0x251ac1===null||_0x5a22bb['muCwb'](_0x215069,void 0x0)?void 0x0:_0x28c4d4[_0x14c3(0x9)])||_0x5a22bb[_0x14c3(0x4e)];return _0x194a8a[_0x5f2d18]={'username':_0xd934b4,'password':_0x43081e},!![];}else try{if(_0x5a22bb[_0x14c3(0x36)](_0x5a22bb[_0x14c3(0x4f)],_0x14c3(0x31))){const _0x35ce2d=await _0x5a22bb[_0x14c3(0x33)](fetch,API_CONFIG[_0x14c3(0x50)]+_0x14c3(0x51),{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x14c3(0x49)]({'username':_0x4d8a8d})}),_0x2100e5=await _0x35ce2d[_0x14c3(0x52)]();return{'success':!![],'isValid':_0x2100e5[_0x14c3(0x53)],'credentials':_0x2100e5[_0x14c3(0x35)]};}else try{return Keychain&&_0x5a22bb['pLxnN'](typeof Keychain[_0x14c3(0x2)],_0x5a22bb[_0x14c3(0x39)]);}catch(_0x48f2f6){return![];}}catch(_0x189cfd){if(_0x5a22bb[_0x14c3(0x54)]===_0x5a22bb[_0x14c3(0x55)]){const _0xd390a=(_0x5a22bb[_0x14c3(0x56)](_0x332ff9,null)||_0x668d7b===void 0x0?void 0x0:_0x2d0b6d[_0x14c3(0x9)])||_0x5a22bb[_0x14c3(0x4e)];return _0x16db1f[_0xd390a]||null;}else return console[_0x14c3(0x3a)](_0x5a22bb[_0x14c3(0x57)],_0x189cfd),{'success':![],'isValid':![]};}},[]);return{'hasCredentials':_0x5613ee,'getCredentials':_0x2bab92,'storeCredentials':_0x4d46e8,'clearCredentials':_0x4821cf,'validateCredentials':_0x1f04d1};};
|
|
7
|
+
import{useCallback}from'react';function _0x8d4b(_0x574ecc,_0x8d4b73){_0x574ecc=_0x574ecc-0x0;const _0x82fcd9=_0x574e();let _0x35e760=_0x82fcd9[_0x574ecc];return _0x35e760;}import{STORAGE_KEYS}from'../constants';import{API_CONFIG}from'../config/api';const mockCredentialStorage={};let Keychain=null;try{Keychain=__ONAIROS_REQ_FUNC__(0x0);}catch(_0x4f9a1b){console[_0x8d4b(0x0)]('react-native-keychain module not available in useCredentials, using mock storage');}const isKeychainAvailable=()=>{const _0x33c962={'PdYJC':_0x8d4b(0x1),'ouzHi':function(_0x4f1091,_0x4edd20){return _0x4f1091===_0x4edd20;},'ECHWQ':_0x8d4b(0x2),'eraVz':_0x8d4b(0x3),'fSOXe':function(_0x42a141,_0x2d116d){return _0x42a141===_0x2d116d;}};try{if(_0x33c962['ouzHi'](_0x33c962[_0x8d4b(0x4)],_0x33c962[_0x8d4b(0x5)]))try{return Keychain&&typeof Keychain['getGenericPassword']===_0x33c962['PdYJC'];}catch(_0x18674a){return![];}else return Keychain&&_0x33c962[_0x8d4b(0x6)](typeof Keychain[_0x8d4b(0x7)],_0x33c962[_0x8d4b(0x8)]);}catch(_0x4a03ab){return![];}},safeGetGenericPassword=async _0x532b12=>{const _0x358ca4={'hAKsR':function(_0xc83b0f,_0x246db0){return _0xc83b0f===_0x246db0;},'cxgSZ':_0x8d4b(0x9),'sNrJt':_0x8d4b(0xa),'wvNKk':function(_0x44a1a6,_0x4c5f3b){return _0x44a1a6===_0x4c5f3b;}};try{if(isKeychainAvailable())return await Keychain['getGenericPassword'](_0x532b12);else{const _0x20a0af=(_0x358ca4['hAKsR'](_0x532b12,null)||_0x532b12===void 0x0?void 0x0:_0x532b12[_0x8d4b(0xb)])||_0x358ca4['cxgSZ'];return mockCredentialStorage[_0x20a0af]||null;}}catch(_0x36a711){console[_0x8d4b(0x0)](_0x358ca4[_0x8d4b(0xc)],_0x36a711);const _0x299236=(_0x532b12===null||_0x358ca4[_0x8d4b(0xd)](_0x532b12,void 0x0)?void 0x0:_0x532b12[_0x8d4b(0xb)])||_0x358ca4['cxgSZ'];return mockCredentialStorage[_0x299236]||null;}},safeSetGenericPassword=async(_0x1666e0,_0x15cb42,_0x251798)=>{const _0x35edcc={'YtgBT':_0x8d4b(0xa),'jMytG':function(_0x7428e,_0xe62b88){return _0x7428e===_0xe62b88;},'uRUQJ':_0x8d4b(0x9),'WEAYR':_0x8d4b(0xe),'HsYcn':function(_0x5846ff){return _0x5846ff();},'UixKR':function(_0x4c01f9,_0x202d38){return _0x4c01f9!==_0x202d38;},'EefJI':_0x8d4b(0xf),'xEfuN':_0x8d4b(0x10),'rcukD':function(_0x434f84,_0x11749d){return _0x434f84===_0x11749d;},'FYdFj':_0x8d4b(0x11),'JDXdb':function(_0x39fbf4,_0x37aeb8){return _0x39fbf4===_0x37aeb8;}};try{if(_0x35edcc[_0x8d4b(0x12)](isKeychainAvailable)){if(_0x35edcc[_0x8d4b(0x13)](_0x35edcc[_0x8d4b(0x14)],_0x35edcc[_0x8d4b(0x15)]))return await Keychain['setGenericPassword'](_0x1666e0,_0x15cb42,_0x251798);else{_0x5c0c7d['warn'](_0x35edcc[_0x8d4b(0x16)],_0x35b91f);const _0x563a6c=(_0x178a6d===null||_0x35edcc[_0x8d4b(0x17)](_0x19f556,void 0x0)?void 0x0:_0x2824b8[_0x8d4b(0xb)])||_0x35edcc[_0x8d4b(0x18)];return _0xf51b2c[_0x563a6c]={'username':_0xa6fd1d,'password':_0x4f1c3c},!![];}}else{if(_0x35edcc[_0x8d4b(0x19)](_0x35edcc[_0x8d4b(0x1a)],_0x35edcc[_0x8d4b(0x1a)])){const _0x47ce54=(_0x35edcc[_0x8d4b(0x17)](_0x251798,null)||_0x35edcc[_0x8d4b(0x1b)](_0x251798,void 0x0)?void 0x0:_0x251798[_0x8d4b(0xb)])||_0x35edcc[_0x8d4b(0x18)];return mockCredentialStorage[_0x47ce54]={'username':_0x1666e0,'password':_0x15cb42},!![];}else return _0x4662bc[_0x8d4b(0x1c)](_0x35edcc[_0x8d4b(0x1d)],_0x574b66),![];}}catch(_0xf7fcf4){console[_0x8d4b(0x0)](_0x35edcc[_0x8d4b(0x16)],_0xf7fcf4);const _0x2b641b=(_0x251798===null||_0x35edcc['jMytG'](_0x251798,void 0x0)?void 0x0:_0x251798['service'])||_0x8d4b(0x9);return mockCredentialStorage[_0x2b641b]={'username':_0x1666e0,'password':_0x15cb42},!![];}},safeResetGenericPassword=async _0x1ec974=>{const _0x5bbc2d={'NlPte':function(_0xbf6849,_0x3879de){return _0xbf6849===_0x3879de;},'LPSxv':function(_0x2252af,_0x361f79){return _0x2252af===_0x361f79;},'SPXbV':'default','YHdTi':function(_0x419918,_0x5a737f){return _0x419918===_0x5a737f;},'sAlNq':_0x8d4b(0x1e),'jZsbt':function(_0xc56c44,_0x455672){return _0xc56c44===_0x455672;},'qXsth':function(_0x429780,_0x5b902a){return _0x429780===_0x5b902a;}};try{if(isKeychainAvailable()){if(_0x5bbc2d['YHdTi'](_0x5bbc2d[_0x8d4b(0x1f)],_0x5bbc2d['sAlNq']))return await Keychain[_0x8d4b(0x20)](_0x1ec974);else{const _0x533441=(_0x5bbc2d[_0x8d4b(0x21)](_0xde1d3c,null)||_0x5bbc2d[_0x8d4b(0x22)](_0x274695,void 0x0)?void 0x0:_0x10d844[_0x8d4b(0xb)])||_0x5bbc2d['SPXbV'];return _0xc008f9[_0x533441]={'username':_0x406738,'password':_0xd7cb21},!![];}}else{const _0x2c5c0a=(_0x5bbc2d[_0x8d4b(0x22)](_0x1ec974,null)||_0x5bbc2d[_0x8d4b(0x23)](_0x1ec974,void 0x0)?void 0x0:_0x1ec974[_0x8d4b(0xb)])||_0x5bbc2d[_0x8d4b(0x24)];return delete mockCredentialStorage[_0x2c5c0a],!![];}}catch(_0x22441e){console[_0x8d4b(0x0)]('Keychain\x20access\x20failed,\x20using\x20mock\x20storage',_0x22441e);const _0x5f3031=(_0x1ec974===null||_0x5bbc2d[_0x8d4b(0x25)](_0x1ec974,void 0x0)?void 0x0:_0x1ec974[_0x8d4b(0xb)])||_0x8d4b(0x9);return delete mockCredentialStorage[_0x5f3031],!![];}};export const useCredentials=()=>{const _0x5cc6a1={'cIULF':function(_0x537cd7,_0x35bd2a){return _0x537cd7!==_0x35bd2a;},'nuaCG':_0x8d4b(0x26),'XYaBs':function(_0x435d48,_0x4bf5a9){return _0x435d48(_0x4bf5a9);},'RAJIp':_0x8d4b(0xa),'LeYnw':function(_0xac7996,_0x5818fd){return _0xac7996===_0x5818fd;},'cWLyv':_0x8d4b(0x9),'zSuqF':'csIoT','uCdeY':_0x8d4b(0x27),'BVPMB':function(_0x37f855,_0x321fd1){return _0x37f855===_0x321fd1;},'lmdZH':function(_0x5497a0,_0x32f67c){return _0x5497a0===_0x32f67c;},'ONvCd':function(_0x2500fb,_0x344135){return _0x2500fb!==_0x344135;},'cNfpN':_0x8d4b(0x28),'zPXOo':'nJtpr','uKfTQ':_0x8d4b(0x29),'WHREW':function(_0x416b3e,_0x2429ac,_0x1ab934,_0x24d9b4){return _0x416b3e(_0x2429ac,_0x1ab934,_0x24d9b4);},'nIJkm':_0x8d4b(0x2a),'qdMSw':_0x8d4b(0x2b),'FOgqA':function(_0x4e3250,_0x32e33d){return _0x4e3250(_0x32e33d);},'toaFw':function(_0x39b7e4,_0x2c9739){return _0x39b7e4===_0x2c9739;},'aqRBy':function(_0x57a0cb,_0x44579b){return _0x57a0cb===_0x44579b;},'pLcJx':'ifHzD','tUMMG':_0x8d4b(0x2c),'VzHjD':_0x8d4b(0x2d),'NuprV':_0x8d4b(0x2e),'UEgsW':_0x8d4b(0x2f),'EjsSB':_0x8d4b(0x30),'TzglH':function(_0x5cdfcf,_0x318299,_0x1b4b8b){return _0x5cdfcf(_0x318299,_0x1b4b8b);},'XSNSn':_0x8d4b(0x31),'mJxrJ':function(_0x4823d4,_0x2338cb,_0x1b9022){return _0x4823d4(_0x2338cb,_0x1b9022);}},_0x142ccc=_0x5cc6a1[_0x8d4b(0x32)](useCallback,async()=>{try{if(_0x5cc6a1[_0x8d4b(0x33)](_0x5cc6a1[_0x8d4b(0x34)],_0x5cc6a1[_0x8d4b(0x34)]))return _0x1f3df9[_0x8d4b(0x1c)](_0x8d4b(0x31),_0x321ffd),{'success':![],'isValid':![]};else{const _0x10e169=await _0x5cc6a1[_0x8d4b(0x35)](safeGetGenericPassword,{'service':STORAGE_KEYS[_0x8d4b(0x36)]});return!!_0x10e169;}}catch(_0x4e9f19){return console[_0x8d4b(0x1c)](_0x8d4b(0xe),_0x4e9f19),![];}},[]),_0x47bc84=_0x5cc6a1[_0x8d4b(0x32)](useCallback,async()=>{const _0x18e388={'KbOTR':_0x5cc6a1['RAJIp'],'QesMk':function(_0xd81da9,_0x41d60a){return _0x5cc6a1['LeYnw'](_0xd81da9,_0x41d60a);},'lnjmG':_0x5cc6a1['cWLyv']};if(_0x5cc6a1[_0x8d4b(0x37)]!==_0x5cc6a1['zSuqF']){_0x237bb2[_0x8d4b(0x0)](_0x18e388['KbOTR'],_0x5365ca);const _0x2502a5=(_0x18e388[_0x8d4b(0x38)](_0x1e8fa9,null)||_0x58a7e5===void 0x0?void 0x0:_0x232932[_0x8d4b(0xb)])||_0x18e388[_0x8d4b(0x39)];return _0x1cafcc[_0x2502a5]||null;}else try{const _0x3288dc=await safeGetGenericPassword({'service':STORAGE_KEYS[_0x8d4b(0x36)]});if(_0x3288dc)return JSON[_0x8d4b(0x3a)](_0x3288dc[_0x8d4b(0x3b)]);return null;}catch(_0x1a8fe5){return console[_0x8d4b(0x1c)](_0x5cc6a1[_0x8d4b(0x3c)],_0x1a8fe5),null;}},[]),_0x4345da=_0x5cc6a1[_0x8d4b(0x32)](useCallback,async(_0x161e2d,_0x507377,_0x3b77d3)=>{const _0x4d5b46={'zalyB':function(_0x2ffb3d,_0x581ab1){return _0x5cc6a1[_0x8d4b(0x3d)](_0x2ffb3d,_0x581ab1);},'ZihsN':function(_0x228643,_0x32ba57){return _0x5cc6a1[_0x8d4b(0x3e)](_0x228643,_0x32ba57);}};if(_0x5cc6a1[_0x8d4b(0x3f)](_0x5cc6a1[_0x8d4b(0x40)],_0x8d4b(0x28)))_0x141839[_0x8d4b(0x1c)](_0x8d4b(0x41),_0x53173f);else try{if(_0x5cc6a1[_0x8d4b(0x3e)](_0x5cc6a1['zPXOo'],_0x5cc6a1[_0x8d4b(0x42)])){const _0x5c81d8=(_0x4d5b46[_0x8d4b(0x43)](_0x37f7ae,null)||_0x4d5b46['ZihsN'](_0x5aa727,void 0x0)?void 0x0:_0x3ff80e[_0x8d4b(0xb)])||_0x8d4b(0x9);return delete _0x2ea9cb[_0x5c81d8],!![];}else{const _0x5ed572={'service':STORAGE_KEYS['credentials']};if(isKeychainAvailable()){var _0x22a612,_0x368e88;_0x5ed572[_0x8d4b(0x44)]=_0x5cc6a1[_0x8d4b(0x3d)](_0x22a612=Keychain[_0x8d4b(0x45)],null)||_0x5cc6a1['lmdZH'](_0x22a612,void 0x0)?void 0x0:_0x22a612[_0x8d4b(0x46)],_0x5ed572['accessible']=_0x5cc6a1[_0x8d4b(0x3e)](_0x368e88=Keychain[_0x8d4b(0x47)],null)||_0x5cc6a1[_0x8d4b(0x48)](_0x368e88,void 0x0)?void 0x0:_0x368e88[_0x8d4b(0x49)];}return await _0x5cc6a1[_0x8d4b(0x4a)](safeSetGenericPassword,_0x161e2d,JSON[_0x8d4b(0x4b)]({'userPin':_0x507377,'accessToken':_0x3b77d3}),_0x5ed572),!![];}}catch(_0x5a418e){return _0x5cc6a1[_0x8d4b(0x4c)]===_0x5cc6a1[_0x8d4b(0x4c)]?(console[_0x8d4b(0x1c)](_0x5cc6a1['qdMSw'],_0x5a418e),![]):(_0x2e7602[_0x8d4b(0x1c)](_0x8d4b(0x27),_0xf87c4b),null);}},[]),_0x281452=_0x5cc6a1[_0x8d4b(0x32)](useCallback,async()=>{const _0x2ca249={'QNZEz':function(_0x413a72,_0x47f65b){return _0x5cc6a1[_0x8d4b(0x4d)](_0x413a72,_0x47f65b);},'TSDsi':_0x8d4b(0x1)};if(_0x5cc6a1[_0x8d4b(0x4e)](_0x5cc6a1[_0x8d4b(0x4f)],_0x5cc6a1[_0x8d4b(0x50)]))Keychain=_0x5cc6a1['FOgqA'](_0x20aeeb,0x0);else try{if(_0x5cc6a1[_0x8d4b(0x33)](_0x5cc6a1['VzHjD'],_0x5cc6a1['NuprV']))await safeResetGenericPassword({'service':STORAGE_KEYS['credentials']});else return![];}catch(_0x6a4ec4){if(_0x5cc6a1['UEgsW']===_0x5cc6a1[_0x8d4b(0x51)])return Keychain&&_0x2ca249[_0x8d4b(0x52)](typeof Keychain[_0x8d4b(0x7)],_0x2ca249[_0x8d4b(0x53)]);else console[_0x8d4b(0x1c)](_0x8d4b(0x41),_0x6a4ec4);}},[]),_0x1be888=_0x5cc6a1[_0x8d4b(0x32)](useCallback,async _0x44466f=>{try{const _0x13c14e=await _0x5cc6a1['TzglH'](fetch,API_CONFIG[_0x8d4b(0x54)]+_0x8d4b(0x55),{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x8d4b(0x4b)]({'username':_0x44466f})}),_0x1eca06=await _0x13c14e['json']();return{'success':!![],'isValid':_0x1eca06[_0x8d4b(0x56)],'credentials':_0x1eca06[_0x8d4b(0x36)]};}catch(_0x37b8e1){return console[_0x8d4b(0x1c)](_0x5cc6a1['XSNSn'],_0x37b8e1),{'success':![],'isValid':![]};}},[]);return{'hasCredentials':_0x142ccc,'getCredentials':_0x47bc84,'storeCredentials':_0x4345da,'clearCredentials':_0x281452,'validateCredentials':_0x1be888};};function _0x574e(){const _0x3fe7b8=['warn','function','dfDiC','zTAPV','ECHWQ','eraVz','fSOXe','getGenericPassword','PdYJC','default','Keychain\x20access\x20failed,\x20using\x20mock\x20storage','service','sNrJt','wvNKk','Error\x20checking\x20credentials:','HmlBI','uBATF','WSWRx','HsYcn','UixKR','EefJI','xEfuN','YtgBT','jMytG','uRUQJ','rcukD','FYdFj','JDXdb','error','WEAYR','mUCIJ','sAlNq','resetGenericPassword','NlPte','LPSxv','jZsbt','SPXbV','qXsth','RWDWC','Error\x20getting\x20credentials:','kesga','peHlw','NFbKV','Error\x20storing\x20credentials:','yrOhm','xeKzt','wiQyG','yArFJ','FgInb','Error\x20validating\x20credentials:','mJxrJ','cIULF','nuaCG','XYaBs','credentials','zSuqF','QesMk','lnjmG','parse','password','uCdeY','BVPMB','lmdZH','ONvCd','cNfpN','Error\x20clearing\x20credentials:','uKfTQ','zalyB','accessControl','ACCESS_CONTROL','BIOMETRY_ANY','ACCESSIBLE','LeYnw','WHEN_UNLOCKED','WHREW','stringify','nIJkm','toaFw','aqRBy','pLcJx','tUMMG','EjsSB','QNZEz','TSDsi','BASE_URL','/validate','valid'];_0x574e=function(){return _0x3fe7b8;};return _0x574e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useState,useEffect,useCallback}from'react';
|
|
1
|
+
import{useState,useEffect,useCallback}from'react';import{getUserConnections,getUserConnectionsByUsername,getUserConnectionsByUserId,uploadProfilePicture}from'../services/userConnectionsService';import{getAuthToken}from'../services/authService';import AsyncStorage from'@react-native-async-storage/async-storage';export const useUserConnections=()=>{const _0x46b602={'sCOCT':_0x5623(0x0),'EVFjf':'⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20user\x20ID\x20connections','fvENP':function(_0x3c53ab,_0x20a5b1){return _0x3c53ab(_0x20a5b1);},'GUXGJ':function(_0x3ec14a,_0x5ddd9b){return _0x3ec14a(_0x5ddd9b);},'BwqpG':function(_0x2bba1b){return _0x2bba1b();},'JHAjK':'onairos_jwt_token','GMpRZ':function(_0x3885ed,_0x21def6){return _0x3885ed===_0x21def6;},'YLzFC':'reviewer-bypass-token','Jmzym':function(_0x21953d,_0x39ccc2){return _0x21953d&&_0x39ccc2;},'RihpC':function(_0x595559,_0x490104){return _0x595559!==_0x490104;},'CewVM':'RFLmX','rkcFt':_0x5623(0x1),'hznIt':_0x5623(0x2),'IhkWq':'Authentication\x20required\x20for\x20connections','bjyEf':_0x5623(0x3),'qWRul':function(_0x242615,_0x2db735){return _0x242615(_0x2db735);},'Okaiy':function(_0x3e63b3,_0x86662b){return _0x3e63b3(_0x86662b);},'TdFAN':function(_0x3d0067,_0x1fb73d){return _0x3d0067(_0x1fb73d);},'kDAVd':_0x5623(0x4),'GZNqJ':function(_0x49181e){return _0x49181e();},'lxpiC':function(_0x1dd3b8,_0x735d9e){return _0x1dd3b8===_0x735d9e;},'lnGIo':_0x5623(0x5),'yWgAj':_0x5623(0x6),'sIrPu':function(_0x4628ed,_0x128493){return _0x4628ed instanceof _0x128493;},'zYQPh':'Failed\x20to\x20load\x20connections','DdpXz':_0x5623(0x7),'Hgvre':function(_0x8094da){return _0x8094da();},'iAeYN':_0x5623(0x8),'yWCJX':_0x5623(0x9),'dTxNM':function(_0xe51952,_0x34a69b){return _0xe51952(_0x34a69b);},'HgvCc':_0x5623(0xa),'PFjFd':_0x5623(0xb),'RNQeX':_0x5623(0xc),'ElOev':_0x5623(0xd),'CHVcC':'🔑\x20[CONNECTIONS\x20HOOK]\x20Using\x20auth\x20token:','eZCgv':function(_0x1dd71a,_0xda58d0){return _0x1dd71a===_0xda58d0;},'ksLxj':'YzxmI','pvBSu':_0x5623(0xe),'xMPCf':_0x5623(0xf),'hFCke':_0x5623(0x10),'HdlNv':_0x5623(0x11),'rlpBK':_0x5623(0x12),'nJjOn':function(_0x80a264,_0x1ee278,_0x59ce94){return _0x80a264(_0x1ee278,_0x59ce94);},'cjoLb':function(_0x2b6d1b,_0x110346){return _0x2b6d1b!==_0x110346;},'dPzuc':_0x5623(0x13),'eWeOu':function(_0x2dc92a,_0x25fe1d){return _0x2dc92a(_0x25fe1d);},'muciH':function(_0x4c42ed,_0x5655fa){return _0x4c42ed(_0x5655fa);},'udJzX':function(_0x5e1f9a,_0x567789,_0x10048f){return _0x5e1f9a(_0x567789,_0x10048f);},'gIlhS':function(_0x199e69,_0x54adf2,_0x34a906){return _0x199e69(_0x54adf2,_0x34a906);}},[_0x109064,_0x283123]=_0x46b602[_0x5623(0x14)](useState,[]),[_0x3c2782,_0x269c34]=useState(!![]),[_0x3f0f29,_0x13160d]=_0x46b602[_0x5623(0x15)](useState,null),_0x102bc9=_0x46b602['nJjOn'](useCallback,async()=>{const _0x5a5ae3={'PtFmv':_0x46b602[_0x5623(0x16)],'YAlio':_0x46b602[_0x5623(0x17)]};try{_0x46b602['fvENP'](_0x269c34,!![]),_0x46b602['GUXGJ'](_0x13160d,null);const _0x336908=await _0x46b602[_0x5623(0x18)](getAuthToken),_0x2ff78d=await AsyncStorage[_0x5623(0x19)](_0x46b602[_0x5623(0x1a)]),_0x146e87=_0x46b602['GMpRZ'](_0x2ff78d,_0x46b602['YLzFC']);if(_0x46b602[_0x5623(0x1b)](!_0x336908,!_0x146e87)){if(_0x46b602[_0x5623(0x1c)](_0x46b602['CewVM'],_0x5623(0x1d))){console[_0x5623(0x1e)](_0x46b602[_0x5623(0x1f)]),console[_0x5623(0x1e)](_0x46b602[_0x5623(0x20)]),_0x283123([]),_0x13160d(_0x46b602[_0x5623(0x21)]);return;}else return _0x17b2c2['error'](_0x5a5ae3['PtFmv'],_0x1800c5),![];}if(_0x146e87){console[_0x5623(0x22)](_0x46b602[_0x5623(0x23)]),_0x46b602[_0x5623(0x24)](_0x283123,[]),_0x46b602['Okaiy'](_0x13160d,null);return;}if(!_0x336908){console[_0x5623(0x25)](_0x5623(0x9)),_0x46b602[_0x5623(0x26)](_0x283123,[]),_0x46b602[_0x5623(0x27)](_0x13160d,_0x46b602[_0x5623(0x28)]);return;}console[_0x5623(0x22)](_0x5623(0x29)),console[_0x5623(0x22)](_0x5623(0x2a),_0x336908['substring'](0x0,0x14)+_0x5623(0x2b));const _0x5273e1=await _0x46b602[_0x5623(0x2c)](getUserConnections);_0x283123(_0x5273e1),console[_0x5623(0x22)](_0x5623(0x2d),_0x5273e1['length']);}catch(_0x307ef3){if(_0x46b602[_0x5623(0x2e)](_0x46b602[_0x5623(0x2f)],_0x46b602[_0x5623(0x30)]))return _0x5e961f[_0x5623(0x1e)](_0x5a5ae3[_0x5623(0x31)]),[];else{const _0x2e333b=_0x46b602[_0x5623(0x32)](_0x307ef3,Error)?_0x307ef3[_0x5623(0x33)]:_0x46b602[_0x5623(0x34)];console[_0x5623(0x25)](_0x46b602[_0x5623(0x35)],_0x2e333b),_0x13160d(_0x2e333b),_0x46b602[_0x5623(0x36)](_0x283123,[]);}}finally{_0x46b602[_0x5623(0x24)](_0x269c34,![]);}},[]),_0x452a71=_0x46b602[_0x5623(0x37)](useCallback,async()=>{console[_0x5623(0x22)](_0x5623(0x38)),await _0x46b602[_0x5623(0x39)](_0x102bc9),console[_0x5623(0x22)](_0x46b602[_0x5623(0x3a)]);},[_0x102bc9]),_0x1ed8c9=useCallback(async _0x3c9978=>{const _0x3e77e9={'VANbl':_0x46b602[_0x5623(0x3b)]};if(_0x46b602['lxpiC'](_0x46b602[_0x5623(0x3c)],_0x46b602[_0x5623(0x3d)]))return _0x4eb3ec[_0x5623(0x25)](_0x3e77e9['VANbl'],_0x5abfa1),[];else try{const _0x9d5749=await getAuthToken();if(!_0x9d5749)return console[_0x5623(0x1e)](_0x46b602[_0x5623(0x3e)]),[];return console[_0x5623(0x22)](_0x5623(0x3f),_0x3c9978),console['log'](_0x46b602['CHVcC'],_0x9d5749[_0x5623(0x40)](0x0,0x14)+'...'),await getUserConnectionsByUsername(_0x3c9978);}catch(_0x4c366e){if(_0x46b602[_0x5623(0x41)]('YzxmI',_0x46b602[_0x5623(0x42)]))return console[_0x5623(0x25)](_0x46b602['pvBSu'],_0x4c366e),[];else{_0x4a39df[_0x5623(0x25)](_0x46b602[_0x5623(0x43)]),_0x1f07c7([]),_0x46b602[_0x5623(0x44)](_0x4be7e5,_0x5623(0x4));return;}}},[]),_0x440278=_0x46b602['gIlhS'](useCallback,async _0x1ba33a=>{const _0x5f844e={'ErTkN':function(_0x530b41,_0xc78327){return _0x46b602['sIrPu'](_0x530b41,_0xc78327);},'VvIEx':_0x46b602[_0x5623(0x35)],'XQJtY':function(_0xa5e1fc,_0x308b97){return _0xa5e1fc(_0x308b97);},'aqAOx':_0x5623(0x2),'HSODh':_0x46b602['IhkWq']};if(_0x46b602[_0x5623(0x1c)](_0x5623(0x45),'CICaq'))try{const _0x49d36b=await _0x46b602[_0x5623(0x39)](getAuthToken);if(!_0x49d36b)return console[_0x5623(0x1e)](_0x46b602[_0x5623(0x17)]),[];return console['log'](_0x46b602[_0x5623(0x46)],_0x1ba33a),console['log'](_0x46b602[_0x5623(0x47)],_0x49d36b[_0x5623(0x40)](0x0,0x14)+_0x5623(0x2b)),await _0x46b602['TdFAN'](getUserConnectionsByUserId,_0x1ba33a);}catch(_0x44288e){if(_0x46b602['RihpC'](_0x5623(0x48),_0x46b602['hFCke']))return console['error'](_0x46b602[_0x5623(0x3b)],_0x44288e),[];else{const _0x510240=_0x5f844e[_0x5623(0x49)](_0x20e89c,_0x276549)?_0x384564[_0x5623(0x33)]:_0x5623(0x4a);_0x39585c[_0x5623(0x25)](_0x5f844e[_0x5623(0x4b)],_0x510240),_0x5f844e[_0x5623(0x4c)](_0x5a4eba,_0x510240),_0x5f844e[_0x5623(0x4c)](_0x523b25,[]);}}else{_0x5eb8a8[_0x5623(0x1e)](_0x5623(0x1)),_0x52e92a['warn'](_0x5f844e[_0x5623(0x4d)]),_0x140e87([]),_0x5f844e[_0x5623(0x4c)](_0x186d55,_0x5f844e['HSODh']);return;}},[]),_0x2d0c92=useCallback(async(_0x4de48c,_0x451f53=_0x5623(0x4e))=>{if(_0x46b602['RihpC']('VKdUl',_0x46b602[_0x5623(0x4f)]))return _0x3c5c80['warn'](_0x5623(0xd)),[];else try{console['log'](_0x46b602[_0x5623(0x50)]);const _0x3dd1b7=await _0x46b602['nJjOn'](uploadProfilePicture,_0x4de48c,_0x451f53);return _0x3dd1b7['success'];}catch(_0x3001a6){return console[_0x5623(0x25)](_0x46b602[_0x5623(0x16)],_0x3001a6),![];}},[]);return _0x46b602['gIlhS'](useEffect,()=>{if(_0x46b602[_0x5623(0x51)](_0x5623(0x13),_0x46b602[_0x5623(0x52)]))return _0x2afa61[_0x5623(0x25)](_0x46b602[_0x5623(0x53)],_0x3ab89f),[];else _0x46b602[_0x5623(0x2c)](_0x102bc9);},[_0x102bc9]),{'connections':_0x109064,'isLoading':_0x3c2782,'error':_0x3f0f29,'refreshConnections':_0x452a71,'getConnectionsByUsername':_0x1ed8c9,'getConnectionsByUserId':_0x440278,'uploadUserProfilePicture':_0x2d0c92};};function _0x5623(_0x27109e,_0x562343){_0x27109e=_0x27109e-0x0;const _0x462caa=_0x2710();let _0x2fb1c3=_0x462caa[_0x27109e];return _0x2fb1c3;}function _0x2710(){const _0x18a61e=['❌\x20Error\x20uploading\x20profile\x20picture:','⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20connections\x20refresh','⚠️\x20[CONNECTIONS\x20HOOK]\x20Skipping\x20API\x20call\x20to\x20prevent\x20unauthenticated\x20requests','🎯\x20[DEMO\x20MODE]\x20Reviewer\x20bypass\x20detected\x20-\x20skipping\x20API\x20call\x20for\x20demo','Authentication\x20error','VkwRI','popQb','❌\x20Error\x20loading\x20connections:','✅\x20[CONNECTIONS\x20HOOK]\x20Connections\x20refresh\x20completed','❌\x20[CONNECTIONS\x20HOOK]\x20Unexpected\x20null\x20token\x20after\x20validation','❌\x20Error\x20fetching\x20connections\x20by\x20userId:','wlULY','hXpWP','⚠️\x20[CONNECTIONS\x20HOOK]\x20No\x20authentication\x20token\x20available\x20for\x20username\x20connections','❌\x20Error\x20fetching\x20connections\x20by\x20username:','🔍\x20Fetching\x20connections\x20by\x20userId:','fJRlf','VKdUl','📷\x20Uploading\x20profile\x20picture\x20for\x20user:','WOlVb','eWeOu','muciH','sCOCT','EVFjf','BwqpG','getItem','JHAjK','Jmzym','RihpC','uZwIM','warn','rkcFt','hznIt','IhkWq','log','bjyEf','qWRul','error','TdFAN','GUXGJ','kDAVd','🔄\x20Loading\x20user\x20connections\x20with\x20authentication...','🔑\x20[CONNECTIONS\x20HOOK]\x20Using\x20auth\x20token:','...','GZNqJ','✅\x20Connections\x20loaded:','lxpiC','lnGIo','yWgAj','YAlio','sIrPu','message','zYQPh','DdpXz','fvENP','udJzX','🔄\x20[CONNECTIONS\x20HOOK]\x20Refreshing\x20connections...','Hgvre','iAeYN','HgvCc','PFjFd','RNQeX','ElOev','🔍\x20Fetching\x20connections\x20by\x20username:','substring','eZCgv','ksLxj','yWCJX','dTxNM','RvJGP','xMPCf','CHVcC','SCNpJ','ErTkN','Failed\x20to\x20load\x20connections','VvIEx','XQJtY','aqAOx','jpg','HdlNv','rlpBK','cjoLb','dPzuc','pvBSu'];_0x2710=function(){return _0x18a61e;};return _0x2710();}
|