@onairos/react-native 3.7.2 → 3.7.3

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.
Files changed (237) hide show
  1. package/lib/commonjs/api/index.js +219 -9
  2. package/lib/commonjs/components/BodyText.js +27 -9
  3. package/lib/commonjs/components/BrandMark.js +111 -10
  4. package/lib/commonjs/components/CodeInput.js +116 -9
  5. package/lib/commonjs/components/EmailInput.js +30 -8
  6. package/lib/commonjs/components/GoogleButton.js +56 -9
  7. package/lib/commonjs/components/HeadingGroup.js +43 -9
  8. package/lib/commonjs/components/LLMDataInputModal.js +664 -14
  9. package/lib/commonjs/components/ModalHeader.js +99 -9
  10. package/lib/commonjs/components/ModalSheet.js +47 -9
  11. package/lib/commonjs/components/Onairos.js +380 -14
  12. package/lib/commonjs/components/OnairosButton.js +313 -13
  13. package/lib/commonjs/components/OnairosSignInButton.js +130 -12
  14. package/lib/commonjs/components/Overlay.js +465 -13
  15. package/lib/commonjs/components/PersonaImage.js +137 -10
  16. package/lib/commonjs/components/PersonaLoadingScreen.js +318 -12
  17. package/lib/commonjs/components/PersonalizationConsentScreen.js +467 -13
  18. package/lib/commonjs/components/PinCreationScreen.js +403 -12
  19. package/lib/commonjs/components/PinInput.js +464 -9
  20. package/lib/commonjs/components/PlatformConnectorsStep.js +1311 -23
  21. package/lib/commonjs/components/PlatformList.js +137 -10
  22. package/lib/commonjs/components/PlatformToggle.js +180 -9
  23. package/lib/commonjs/components/PrimaryButton.js +180 -10
  24. package/lib/commonjs/components/SignInMatchAnimation.js +197 -9
  25. package/lib/commonjs/components/SignInStep.js +345 -12
  26. package/lib/commonjs/components/UniversalOnboarding.js +2780 -30
  27. package/lib/commonjs/components/VerificationStep.js +176 -11
  28. package/lib/commonjs/components/WelcomeScreen.js +461 -22
  29. package/lib/commonjs/components/icons/Basicproficon.js +37 -8
  30. package/lib/commonjs/components/icons/Basicprofile.js +21 -8
  31. package/lib/commonjs/components/icons/Checkbox.js +21 -8
  32. package/lib/commonjs/components/icons/Checkmark.js +27 -8
  33. package/lib/commonjs/components/icons/Contentanalysis.js +21 -8
  34. package/lib/commonjs/components/icons/Contenticon.js +39 -8
  35. package/lib/commonjs/components/icons/EnochE.js +41 -8
  36. package/lib/commonjs/components/icons/Personalityicon.js +30 -8
  37. package/lib/commonjs/components/icons/Personalityprofile.js +21 -8
  38. package/lib/commonjs/components/icons/Personalitytraits.js +21 -8
  39. package/lib/commonjs/components/icons/Userpreferences.js +21 -8
  40. package/lib/commonjs/components/icons/index.js +84 -17
  41. package/lib/commonjs/components/onboarding/OAuthWebView.js +1754 -18
  42. package/lib/commonjs/components/onboarding/OnboardingHeader.js +74 -10
  43. package/lib/commonjs/components/onboarding/PinInput.js +283 -10
  44. package/lib/commonjs/components/onboarding/PlatformConnector.js +249 -11
  45. package/lib/commonjs/config/PLATFORM_APIS.md +849 -0
  46. package/lib/commonjs/config/api.js +56 -7
  47. package/lib/commonjs/constants/index.js +120 -7
  48. package/lib/commonjs/context/AuthContext.js +345 -10
  49. package/lib/commonjs/hooks/useConnectedAccounts.js +111 -9
  50. package/lib/commonjs/hooks/useConnections.js +102 -8
  51. package/lib/commonjs/hooks/useCredentials.js +178 -10
  52. package/lib/commonjs/hooks/useUserConnections.js +148 -10
  53. package/lib/commonjs/index.js +439 -34
  54. package/lib/commonjs/services/apiClient.js +298 -8
  55. package/lib/commonjs/services/biometricPinService.js +180 -8
  56. package/lib/commonjs/services/chatGPTConversationExtractor.js +155 -8
  57. package/lib/commonjs/services/chatGPTConversationService.js +275 -9
  58. package/lib/commonjs/services/claudeConversationExtractor.js +103 -8
  59. package/lib/commonjs/services/claudeConversationService.js +158 -9
  60. package/lib/commonjs/services/connectedAccountsService.js +310 -10
  61. package/lib/commonjs/services/googleAuthService.js +252 -11
  62. package/lib/commonjs/services/hingeDataExtractor.js +105 -8
  63. package/lib/commonjs/services/hingeDataService.js +150 -9
  64. package/lib/commonjs/services/imageCompressionService.js +260 -7
  65. package/lib/commonjs/services/instagramDataExtractor.js +126 -8
  66. package/lib/commonjs/services/instagramDataService.js +163 -9
  67. package/lib/commonjs/services/jwtStorageService.js +276 -7
  68. package/lib/commonjs/services/linkedinDOMExtractor.js +245 -7
  69. package/lib/commonjs/services/linkedinProfileService.js +222 -9
  70. package/lib/commonjs/services/linkedinScrapingService.js +230 -8
  71. package/lib/commonjs/services/llmDataStorage.js +294 -8
  72. package/lib/commonjs/services/mobileTrainingService.js +186 -8
  73. package/lib/commonjs/services/netflixDataExtractor.js +120 -8
  74. package/lib/commonjs/services/netflixDataService.js +198 -9
  75. package/lib/commonjs/services/pinEncryptionService.js +84 -8
  76. package/lib/commonjs/services/pinStorageUtils.js +105 -7
  77. package/lib/commonjs/services/platformAuthService.js +1484 -12
  78. package/lib/commonjs/services/sephoraDataExtractor.js +140 -8
  79. package/lib/commonjs/services/sephoraDataService.js +200 -9
  80. package/lib/commonjs/services/spotifyDataExtractor.js +148 -8
  81. package/lib/commonjs/services/spotifyDataService.js +241 -9
  82. package/lib/commonjs/services/storageService.js +404 -8
  83. package/lib/commonjs/services/telegramDataExtractor.js +115 -8
  84. package/lib/commonjs/services/telegramDataService.js +499 -9
  85. package/lib/commonjs/services/trainingApiHelpers.js +73 -7
  86. package/lib/commonjs/services/userConnectionsService.js +340 -10
  87. package/lib/commonjs/services/youtubeMigrationService.js +416 -10
  88. package/lib/commonjs/theme/index.js +250 -7
  89. package/lib/commonjs/types/ambient.d.js +2 -1
  90. package/lib/commonjs/types/declarations.d.js +2 -1
  91. package/lib/commonjs/types/index.js +6 -1
  92. package/lib/commonjs/types/node-fix.d.js +2 -1
  93. package/lib/commonjs/types/node-override.d.js +2 -1
  94. package/lib/commonjs/types/opacity.d.js +2 -1
  95. package/lib/commonjs/types.js +14 -1
  96. package/lib/commonjs/utils/Portal.js +98 -8
  97. package/lib/commonjs/utils/api.js +130 -9
  98. package/lib/commonjs/utils/assetRegistry.js +210 -35
  99. package/lib/commonjs/utils/auth.js +112 -9
  100. package/lib/commonjs/utils/connectorTests.js +613 -29
  101. package/lib/commonjs/utils/crypto.js +62 -8
  102. package/lib/commonjs/utils/debugHelper.js +64 -1
  103. package/lib/commonjs/utils/encryption.js +76 -7
  104. package/lib/commonjs/utils/eventUtils.js +288 -1
  105. package/lib/commonjs/utils/haptics.js +66 -9
  106. package/lib/commonjs/utils/imagePreloader.js +6 -1
  107. package/lib/commonjs/utils/networkDiagnostics.js +226 -8
  108. package/lib/commonjs/utils/onairosApi.js +350 -9
  109. package/lib/commonjs/utils/programmaticFlow.js +117 -9
  110. package/lib/commonjs/utils/retryHelper.js +220 -1
  111. package/lib/commonjs/utils/secureStorage.js +349 -10
  112. package/lib/commonjs/utils/webviewScripts/chatgpt.js +551 -1
  113. package/lib/commonjs/utils/webviewScripts/claude.js +376 -1
  114. package/lib/commonjs/utils/webviewScripts/hinge.js +411 -1
  115. package/lib/commonjs/utils/webviewScripts/index.js +698 -15
  116. package/lib/commonjs/utils/webviewScripts/instagram.js +454 -1
  117. package/lib/commonjs/utils/webviewScripts/linkedin.js +880 -1
  118. package/lib/commonjs/utils/webviewScripts/netflix.js +382 -1
  119. package/lib/commonjs/utils/webviewScripts/sephora.js +516 -1
  120. package/lib/commonjs/utils/webviewScripts/spotify.js +419 -1
  121. package/lib/commonjs/utils/webviewScripts/telegram.js +678 -1
  122. package/lib/module/api/index.js +211 -1
  123. package/lib/module/components/BodyText.js +20 -1
  124. package/lib/module/components/BrandMark.js +104 -1
  125. package/lib/module/components/CodeInput.js +109 -1
  126. package/lib/module/components/EmailInput.js +23 -1
  127. package/lib/module/components/GoogleButton.js +49 -1
  128. package/lib/module/components/HeadingGroup.js +36 -1
  129. package/lib/module/components/LLMDataInputModal.js +656 -7
  130. package/lib/module/components/ModalHeader.js +92 -1
  131. package/lib/module/components/ModalSheet.js +39 -1
  132. package/lib/module/components/Onairos.js +373 -1
  133. package/lib/module/components/OnairosButton.js +305 -1
  134. package/lib/module/components/OnairosSignInButton.js +121 -1
  135. package/lib/module/components/Overlay.js +456 -1
  136. package/lib/module/components/PersonaImage.js +129 -1
  137. package/lib/module/components/PersonaLoadingScreen.js +310 -1
  138. package/lib/module/components/PersonalizationConsentScreen.js +460 -1
  139. package/lib/module/components/PinCreationScreen.js +396 -1
  140. package/lib/module/components/PinInput.js +456 -1
  141. package/lib/module/components/PlatformConnectorsStep.js +1302 -6
  142. package/lib/module/components/PlatformList.js +129 -1
  143. package/lib/module/components/PlatformToggle.js +173 -1
  144. package/lib/module/components/PrimaryButton.js +172 -1
  145. package/lib/module/components/SignInMatchAnimation.js +189 -1
  146. package/lib/module/components/SignInStep.js +338 -1
  147. package/lib/module/components/UniversalOnboarding.js +2770 -1
  148. package/lib/module/components/VerificationStep.js +168 -1
  149. package/lib/module/components/WelcomeScreen.js +453 -1
  150. package/lib/module/components/icons/Basicproficon.js +30 -1
  151. package/lib/module/components/icons/Basicprofile.js +14 -1
  152. package/lib/module/components/icons/Checkbox.js +14 -1
  153. package/lib/module/components/icons/Checkmark.js +20 -1
  154. package/lib/module/components/icons/Contentanalysis.js +14 -1
  155. package/lib/module/components/icons/Contenticon.js +32 -1
  156. package/lib/module/components/icons/EnochE.js +34 -1
  157. package/lib/module/components/icons/Personalityicon.js +23 -1
  158. package/lib/module/components/icons/Personalityprofile.js +14 -1
  159. package/lib/module/components/icons/Personalitytraits.js +14 -1
  160. package/lib/module/components/icons/Userpreferences.js +14 -1
  161. package/lib/module/components/icons/index.js +13 -1
  162. package/lib/module/components/onboarding/OAuthWebView.js +1746 -1
  163. package/lib/module/components/onboarding/OnboardingHeader.js +66 -1
  164. package/lib/module/components/onboarding/PinInput.js +274 -1
  165. package/lib/module/components/onboarding/PlatformConnector.js +240 -1
  166. package/lib/module/config/PLATFORM_APIS.md +849 -0
  167. package/lib/module/config/api.js +47 -1
  168. package/lib/module/constants/index.js +114 -1
  169. package/lib/module/context/AuthContext.js +335 -1
  170. package/lib/module/hooks/useConnectedAccounts.js +106 -1
  171. package/lib/module/hooks/useConnections.js +95 -1
  172. package/lib/module/hooks/useCredentials.js +171 -6
  173. package/lib/module/hooks/useUserConnections.js +140 -1
  174. package/lib/module/index.js +172 -1
  175. package/lib/module/services/apiClient.js +295 -1
  176. package/lib/module/services/biometricPinService.js +169 -1
  177. package/lib/module/services/chatGPTConversationExtractor.js +149 -1
  178. package/lib/module/services/chatGPTConversationService.js +268 -1
  179. package/lib/module/services/claudeConversationExtractor.js +97 -1
  180. package/lib/module/services/claudeConversationService.js +151 -1
  181. package/lib/module/services/connectedAccountsService.js +293 -1
  182. package/lib/module/services/googleAuthService.js +241 -1
  183. package/lib/module/services/hingeDataExtractor.js +99 -1
  184. package/lib/module/services/hingeDataService.js +143 -1
  185. package/lib/module/services/imageCompressionService.js +250 -1
  186. package/lib/module/services/instagramDataExtractor.js +120 -1
  187. package/lib/module/services/instagramDataService.js +156 -1
  188. package/lib/module/services/jwtStorageService.js +257 -1
  189. package/lib/module/services/linkedinDOMExtractor.js +234 -1
  190. package/lib/module/services/linkedinProfileService.js +210 -1
  191. package/lib/module/services/linkedinScrapingService.js +219 -1
  192. package/lib/module/services/llmDataStorage.js +277 -1
  193. package/lib/module/services/mobileTrainingService.js +173 -1
  194. package/lib/module/services/netflixDataExtractor.js +114 -1
  195. package/lib/module/services/netflixDataService.js +191 -1
  196. package/lib/module/services/pinEncryptionService.js +74 -6
  197. package/lib/module/services/pinStorageUtils.js +93 -1
  198. package/lib/module/services/platformAuthService.js +1461 -1
  199. package/lib/module/services/sephoraDataExtractor.js +134 -1
  200. package/lib/module/services/sephoraDataService.js +193 -1
  201. package/lib/module/services/spotifyDataExtractor.js +142 -1
  202. package/lib/module/services/spotifyDataService.js +234 -1
  203. package/lib/module/services/storageService.js +383 -1
  204. package/lib/module/services/telegramDataExtractor.js +109 -1
  205. package/lib/module/services/telegramDataService.js +493 -1
  206. package/lib/module/services/trainingApiHelpers.js +67 -1
  207. package/lib/module/services/userConnectionsService.js +329 -1
  208. package/lib/module/services/youtubeMigrationService.js +405 -1
  209. package/lib/module/theme/index.js +245 -1
  210. package/lib/module/types.js +10 -1
  211. package/lib/module/utils/Portal.js +90 -1
  212. package/lib/module/utils/api.js +118 -1
  213. package/lib/module/utils/assetRegistry.js +200 -34
  214. package/lib/module/utils/auth.js +100 -1
  215. package/lib/module/utils/connectorTests.js +600 -27
  216. package/lib/module/utils/crypto.js +54 -1
  217. package/lib/module/utils/debugHelper.js +54 -1
  218. package/lib/module/utils/encryption.js +67 -1
  219. package/lib/module/utils/eventUtils.js +270 -1
  220. package/lib/module/utils/haptics.js +59 -8
  221. package/lib/module/utils/imagePreloader.js +3 -1
  222. package/lib/module/utils/networkDiagnostics.js +217 -1
  223. package/lib/module/utils/onairosApi.js +333 -1
  224. package/lib/module/utils/programmaticFlow.js +111 -1
  225. package/lib/module/utils/retryHelper.js +211 -1
  226. package/lib/module/utils/secureStorage.js +330 -6
  227. package/lib/module/utils/webviewScripts/chatgpt.js +545 -1
  228. package/lib/module/utils/webviewScripts/claude.js +370 -1
  229. package/lib/module/utils/webviewScripts/hinge.js +405 -1
  230. package/lib/module/utils/webviewScripts/index.js +434 -1
  231. package/lib/module/utils/webviewScripts/instagram.js +448 -1
  232. package/lib/module/utils/webviewScripts/linkedin.js +874 -1
  233. package/lib/module/utils/webviewScripts/netflix.js +376 -1
  234. package/lib/module/utils/webviewScripts/sephora.js +510 -1
  235. package/lib/module/utils/webviewScripts/spotify.js +413 -1
  236. package/lib/module/utils/webviewScripts/telegram.js +672 -1
  237. package/package.json +2 -2
@@ -1 +1,456 @@
1
- function _0x3ce2(_0x11fd0b,_0x3ce296){_0x11fd0b=_0x11fd0b-0x0;const _0xb869d9=_0x11fd();let _0x524fe9=_0xb869d9[_0x11fd0b];return _0x524fe9;}import React,{useState,useCallback}from'react';function _0x11fd(){const _0x3221e5=['window','Training\x20is\x20starting\x20in\x20the\x20background...','This\x20device\x20does\x20not\x20support\x20Face\x20ID\x20or\x20Touch\x20ID.\x20Please\x20enable\x20biometric\x20authentication\x20in\x20your\x20device\x20settings\x20to\x20secure\x20your\x20PIN.','warning','biometric-failed','Please\x20complete\x20biometric\x20authentication\x20to\x20secure\x20your\x20PIN.','info','Secure\x20PIN\x20Storage','biometric-unavailable','NpPoj','authenticating','AiFGI','storage-error','FuxLG','impqu','Biometric\x20authentication\x20was\x20cancelled\x20or\x20failed.\x20Your\x20PIN\x20needs\x20to\x20be\x20secured\x20with\x20biometric\x20authentication\x20to\x20proceed.','Storage\x20Error','error','Your\x20PIN\x20will\x20be\x20securely\x20stored\x20locally\x20on\x20your\x20device\x20using\x20biometric\x20authentication\x20(Face\x20ID\x20or\x20Touch\x20ID)\x20for\x20enhanced\x20security.','Create\x20a\x20PIN','small','#007AFF','e.g.\x20MyPin123!','none','done','•\x20At\x20least\x20','Continue\x20Without\x20Biometric','Back','Continue','Krbhm','UuGkO','uroVo','PlHxi','useEffect','log','catch','AOMJW','dyyRz','HTXSX','FMVZo','BNDAl','An\x20error\x20occurred\x20while\x20securing\x20your\x20PIN.\x20Would\x20you\x20like\x20to\x20try\x20again?','ImHqq','gKpla','BcWBk','VNgFN','QZhvr','length','\x20characters','PsdAz','Mmeox','KPHFV','EOZmT','hDKHm','uebHB','cICBX','xfxGl','pCibc','tWbjC','XAqJd','test','PYOfx','PIN\x20must\x20include\x20a\x20number','IZEjS','qfIAL','FWSug','tltJP','KfHzb','vUBPA','XCsHm','RStuN','AZiIq','PIN\x20must\x20be\x20at\x20least\x20','PIN\x20must\x20include\x20a\x20special\x20character','UFBjC','isBiometricAvailable','bTHig','storePinWithBiometric','cAuRO','sCLfk','bNzeI','isPinStored','DLLwC','oWAfJ','klYLS','BFJAS','ncpKs','ktaBk','HBIWy','TqklL','QeNhg','GMgTx','mxBKe','UoVla','warn','HSSws','YfScl','JwAES','cjcby','uDhnK','bkVrc','Biometric\x20Authentication\x20Not\x20Available','EaDKu','RgzQf','VrfHP','HLriT','ipnOM','xXgRE','createElement','container','title','iKdPs','subtitle','A\x20PIN\x20so\x20only\x20you\x20have\x20access\x20to\x20your\x20data','backgroundProgressText','backgroundProgressIndicator','inputContainer','input','jsCfq','lotmI','visibilityButton','👁️','👁️‍🗨️','requirements','requirement','fvWMc','requirementMet','VpCxE','•\x20Include\x20a\x20number','infoContainer','qdOwM','type','infoContainerInfo','GrWhu','infoTitle','nyvEO','infoTitleInfo','infoTitleWarning','infoTitleError','infoMessageError','message','showActions','infoActions','infoActionButton','infoActionButtonText','Try\x20Again','infoActionButtonSecondary','NJRcy','cancelButton','submitButton','GsQop','submitButtonDisabled','submitButtonText','fpMmG','create','#fff','flex-start','100%','row','center','600','#333','#E3F2FD','#2196F3','#FFF3E0','#FFEBEE','#F44336','#F57C00','#D32F2F','#E65100','#C62828','space-between','transparent','#34C759','#eee','#666','#000000'];_0x11fd=function(){return _0x3221e5;};return _0x11fd();}import{View,Text,StyleSheet,TextInput,TouchableOpacity,Dimensions,Keyboard,ActivityIndicator}from'react-native';import{biometricPinService}from'../services/biometricPinService';const {width}=Dimensions['get'](_0x3ce2(0x0));export const PinInput=({onSubmit:_0x581e73,minLength:minLength=0x8,requireSpecialChar:requireSpecialChar=!![],requireNumber:requireNumber=!![],onBack:_0x58c808,enableBiometricStorage:enableBiometricStorage=!![],onBackgroundTrainingStart:_0x23f63b,showBackgroundProgress:showBackgroundProgress=![],backgroundProgressText:backgroundProgressText=_0x3ce2(0x1)})=>{const _0x86c923={'bTHig':function(_0x589dde,_0x94f0bc){return _0x589dde(_0x94f0bc);},'ktaBk':function(_0x3a777b,_0xc9c9ac){return _0x3a777b&&_0xc9c9ac;},'HTXSX':'Biometric\x20Authentication\x20Not\x20Available','FMVZo':_0x3ce2(0x2),'BNDAl':_0x3ce2(0x3),'EaDKu':_0x3ce2(0x4),'RgzQf':'Biometric\x20Authentication\x20Failed','ImHqq':'Authenticating...','gKpla':_0x3ce2(0x5),'BcWBk':_0x3ce2(0x6),'VNgFN':_0x3ce2(0x7),'Krbhm':function(_0x39420a,_0x2c9205){return _0x39420a(_0x2c9205);},'QZhvr':function(_0x2ef20f,_0x1e0d37){return _0x2ef20f<_0x1e0d37;},'cAuRO':function(_0x193880,_0x76210f){return _0x193880===_0x76210f;},'PsdAz':'FhAWq','Mmeox':'PIN\x20must\x20include\x20a\x20special\x20character','PYOfx':'sXzKB','FWSug':function(_0x406579,_0x3d239b){return _0x406579(_0x3d239b);},'bNzeI':_0x3ce2(0x8),'XCsHm':function(_0x33f8d1,_0x5cad7a){return _0x33f8d1(_0x5cad7a);},'HBIWy':function(_0x4a70e0){return _0x4a70e0();},'tltJP':function(_0x18947a,_0x3b030c){return _0x18947a!==_0x3b030c;},'QWoFO':_0x3ce2(0x9),'vUBPA':function(_0x5bef4f,_0x5e33f7){return _0x5bef4f(_0x5e33f7);},'RStuN':'ZrfqT','UFBjC':_0x3ce2(0xa),'NcPGz':function(_0x481eed,_0x558ca7){return _0x481eed(_0x558ca7);},'DLLwC':_0x3ce2(0xb),'klYLS':'oWAfJ','mxBKe':function(_0x97c0bf,_0x552858){return _0x97c0bf(_0x552858);},'fwUrE':function(_0x1b7f8e,_0x2a3532){return _0x1b7f8e(_0x2a3532);},'ncpKs':_0x3ce2(0xc),'vyJiW':function(_0x349771,_0x52b3ad){return _0x349771(_0x52b3ad);},'TqklL':function(_0x1487b7,_0xdf9ae0){return _0x1487b7===_0xdf9ae0;},'QeNhg':_0x3ce2(0xd),'PlHxi':'default','HSSws':function(_0x5d08bb,_0x237457){return _0x5d08bb(_0x237457);},'juANl':function(_0x207f6e,_0x4099b1){return _0x207f6e(_0x4099b1);},'YfScl':_0x3ce2(0xe),'JwAES':function(_0x48925e){return _0x48925e();},'VrfHP':_0x3ce2(0xf),'WVrLC':_0x3ce2(0x10),'HLriT':'An\x20error\x20occurred\x20while\x20securing\x20your\x20PIN.\x20Would\x20you\x20like\x20to\x20try\x20again?','ipnOM':_0x3ce2(0x11),'xXgRE':_0x3ce2(0x12),'UuGkO':function(_0x41057e,_0x3146c5){return _0x41057e(_0x3146c5);},'uroVo':function(_0x4a06c3,_0x2796cc){return _0x4a06c3(_0x2796cc);},'UoVSV':function(_0x1c21d0,_0x35177e){return _0x1c21d0(_0x35177e);},'dyyRz':function(_0x33d50d,_0x595bf2,_0x3cd8e0){return _0x33d50d(_0x595bf2,_0x3cd8e0);},'qfIAL':function(_0x2cf8bc,_0x2463c9,_0x5d5827){return _0x2cf8bc(_0x2463c9,_0x5d5827);},'UoVla':function(_0x4af53a,_0x2edc21,_0x271d1f){return _0x4af53a(_0x2edc21,_0x271d1f);},'iKdPs':_0x3ce2(0x13),'yPmYy':_0x3ce2(0x14),'aCeJA':_0x3ce2(0x15),'rclYH':_0x3ce2(0x16),'jsCfq':_0x3ce2(0x17),'lotmI':_0x3ce2(0x18),'fvWMc':_0x3ce2(0x19),'VpCxE':'•\x20Include\x20a\x20special\x20character','qdOwM':function(_0x5596ad,_0x7fe46b){return _0x5596ad===_0x7fe46b;},'GrWhu':function(_0x3159ab,_0xd1d1a7){return _0x3159ab===_0xd1d1a7;},'nyvEO':function(_0x17087d,_0x564221){return _0x17087d===_0x564221;},'yAUvY':function(_0x1e9e6c,_0x1a7b51){return _0x1e9e6c===_0x1a7b51;},'NJRcy':_0x3ce2(0x1a),'YfDKp':_0x3ce2(0x1b),'GsQop':function(_0x505a7a,_0x4acf2a){return _0x505a7a||_0x4acf2a;},'fpMmG':_0x3ce2(0x1c)},[_0x50eea9,_0xdde28d]=_0x86c923[_0x3ce2(0x1d)](useState,''),[_0x38622e,_0x19aa89]=_0x86c923[_0x3ce2(0x1e)](useState,null),[_0x423680,_0x19900a]=useState(![]),[_0x24d10b,_0x288ace]=_0x86c923[_0x3ce2(0x1f)](useState,![]),[_0x568789,_0x2c6a25]=_0x86c923['UoVSV'](useState,_0x86c923[_0x3ce2(0x20)]),[_0x3224ba,_0x3cf132]=useState(![]);React[_0x3ce2(0x21)](()=>{const _0x372e99={'AOMJW':function(_0x5254ae,_0x35b8f2){return _0x86c923['bTHig'](_0x5254ae,_0x35b8f2);}};_0x86c923['ktaBk'](_0x23f63b,!_0x3224ba)&&showBackgroundProgress&&(console[_0x3ce2(0x22)]('\uD83D\uDE80 [PIN INPUT] Background training explicitly requested...'),_0x86c923['bTHig'](_0x3cf132,!![]),_0x23f63b()[_0x3ce2(0x23)](_0x9066ef=>{console[_0x3ce2(0x11)]('\u274C [PIN INPUT] Background training failed:',_0x9066ef),_0x372e99[_0x3ce2(0x24)](_0x3cf132,![]);}));},[_0x23f63b,_0x3224ba,showBackgroundProgress]);const _0x4f6e3d=_0x86c923[_0x3ce2(0x25)](useCallback,_0x2850c5=>{const _0x371669={'KPHFV':_0x86c923[_0x3ce2(0x26)],'EOZmT':_0x86c923[_0x3ce2(0x27)],'cICBX':_0x86c923[_0x3ce2(0x28)],'bcZmW':_0x86c923['EaDKu'],'hDKHm':_0x86c923['RgzQf'],'uebHB':'Biometric\x20authentication\x20was\x20cancelled\x20or\x20failed.\x20Your\x20PIN\x20needs\x20to\x20be\x20secured\x20with\x20biometric\x20authentication\x20to\x20proceed.','xfxGl':_0x3ce2(0x29),'aXvYE':_0x86c923[_0x3ce2(0x2a)],'pCibc':_0x86c923[_0x3ce2(0x2b)],'tWbjC':_0x86c923[_0x3ce2(0x2c)],'XAqJd':_0x86c923[_0x3ce2(0x2d)],'IZEjS':function(_0x2efa8b,_0x38b883){return _0x86c923[_0x3ce2(0x1d)](_0x2efa8b,_0x38b883);}};if(_0x86c923[_0x3ce2(0x2e)](_0x2850c5[_0x3ce2(0x2f)],minLength))return'PIN\x20must\x20be\x20at\x20least\x20'+minLength+_0x3ce2(0x30);if(requireSpecialChar&&!/[!@#$%^&*(),.?":{}|<>]/['test'](_0x2850c5)){if(_0x86c923['cAuRO'](_0x86c923[_0x3ce2(0x31)],_0x86c923[_0x3ce2(0x31)]))return _0x86c923[_0x3ce2(0x32)];else switch(_0x5663bc){case _0x3ce2(0x8):return{'title':_0x371669[_0x3ce2(0x33)],'message':_0x371669[_0x3ce2(0x34)],'type':_0x371669['cICBX'],'showActions':!![]};case _0x371669['bcZmW']:return{'title':_0x371669[_0x3ce2(0x35)],'message':_0x371669[_0x3ce2(0x36)],'type':_0x371669[_0x3ce2(0x37)],'showActions':!![]};case _0x3ce2(0xc):return{'title':_0x3ce2(0x10),'message':_0x371669[_0x3ce2(0x38)],'type':'error','showActions':!![]};case _0x3ce2(0xa):return{'title':_0x371669['aXvYE'],'message':_0x371669[_0x3ce2(0x39)],'type':_0x371669[_0x3ce2(0x3a)],'showActions':![]};default:return{'title':_0x371669[_0x3ce2(0x3b)],'message':_0x3ce2(0x12),'type':_0x3ce2(0x6),'showActions':![]};}}if(requireNumber&&!/\d/[_0x3ce2(0x3c)](_0x2850c5)){if(_0x86c923[_0x3ce2(0x3d)]===_0x86c923[_0x3ce2(0x3d)])return _0x3ce2(0x3e);else{_0x4f796e['log']('\u274C [PIN INPUT] Validation failed:',_0x5b6ebc),_0x371669[_0x3ce2(0x3f)](_0x134b8b,_0x113891);return;}}return null;},[minLength,requireSpecialChar,requireNumber]),_0x5832c3=_0x86c923[_0x3ce2(0x40)](useCallback,async()=>{const _0x47dbd9={'AZiIq':function(_0x4f4d0f,_0x5d4e01){return _0x86c923[_0x3ce2(0x2e)](_0x4f4d0f,_0x5d4e01);},'BFJAS':function(_0x25ed37,_0x5937fb){return _0x86c923[_0x3ce2(0x41)](_0x25ed37,_0x5937fb);}};if(_0x86c923[_0x3ce2(0x42)](_0x3ce2(0x43),_0x86c923['QWoFO'])){console[_0x3ce2(0x22)]('\uD83D\uDD0D [PIN INPUT] handleSubmit called with PIN length:',_0x50eea9[_0x3ce2(0x2f)]);const _0x4cc0af=_0x86c923[_0x3ce2(0x44)](_0x4f6e3d,_0x50eea9);if(_0x4cc0af){console['log']('\u274C [PIN INPUT] Validation failed:',_0x4cc0af),_0x86c923[_0x3ce2(0x45)](_0x19aa89,_0x4cc0af);return;}console['log']('\u2705 [PIN INPUT] PIN validation passed');if(enableBiometricStorage){if(_0x86c923[_0x3ce2(0x42)](_0x86c923[_0x3ce2(0x46)],_0x86c923[_0x3ce2(0x46)])){if(_0x47dbd9[_0x3ce2(0x47)](_0x5da000[_0x3ce2(0x2f)],_0x281c8a))return _0x3ce2(0x48)+_0x412043+_0x3ce2(0x30);if(_0x1515c2&&!/[!@#$%^&*(),.?":{}|<>]/[_0x3ce2(0x3c)](_0x321acf))return _0x3ce2(0x49);if(_0x37a596&&!/\d/[_0x3ce2(0x3c)](_0x4a99b3))return'PIN\x20must\x20include\x20a\x20number';return null;}else{console[_0x3ce2(0x22)]('\uD83D\uDD10 [PIN INPUT] Biometric storage enabled, starting biometric flow...'),_0x86c923[_0x3ce2(0x44)](_0x288ace,!![]),_0x2c6a25(_0x86c923[_0x3ce2(0x4a)]);try{const _0x4f9916=await biometricPinService[_0x3ce2(0x4b)]();console[_0x3ce2(0x22)]('\uD83D\uDCF1 [PIN INPUT] Biometric available:',_0x4f9916);if(!_0x4f9916){console[_0x3ce2(0x11)]('\u274C [PIN INPUT] Face ID not available on this device'),_0x86c923[_0x3ce2(0x4c)](_0x2c6a25,'biometric-unavailable'),_0x86c923['NcPGz'](_0x288ace,![]);return;}console[_0x3ce2(0x22)]('\uD83D\uDD10 [PIN INPUT] Triggering biometric authentication for PIN storage...');const _0x5d2139=await biometricPinService[_0x3ce2(0x4d)](_0x50eea9);if(_0x5d2139){if(_0x86c923[_0x3ce2(0x4e)](_0x3ce2(0x4f),'npjYN')){_0x3f40fa[_0x3ce2(0x11)]('\u274C [PIN INPUT] Face ID not available on this device'),_0x86c923[_0x3ce2(0x41)](_0x3fbdf4,_0x86c923[_0x3ce2(0x50)]),_0x86c923[_0x3ce2(0x45)](_0x3fc18a,![]);return;}else{console['log']('\u2705 [PIN INPUT] PIN stored successfully with biometric protection');const _0x551412=await biometricPinService[_0x3ce2(0x51)]();if(_0x551412){if('yHKua'===_0x86c923[_0x3ce2(0x52)])return _0x86c923[_0x3ce2(0x32)];else console['log']('\u2705 [PIN INPUT] PIN storage verified - proceeding with onboarding'),_0x86c923[_0x3ce2(0x44)](_0x581e73,_0x50eea9);}else _0x86c923[_0x3ce2(0x4e)](_0x3ce2(0x53),_0x86c923[_0x3ce2(0x54)])?(console['error']('\u274C [PIN INPUT] PIN storage verification failed'),_0x86c923['mxBKe'](_0x2c6a25,_0x3ce2(0xc)),_0x288ace(![])):(_0x302383[_0x3ce2(0x22)]('\uD83D\uDE80 [PIN INPUT] Background training explicitly requested...'),_0x5b4b8b(!![]),_0x86c923['HBIWy'](_0x2e82de)['catch'](_0xe1fa0a=>{_0x3fc078[_0x3ce2(0x11)]('\u274C [PIN INPUT] Background training failed:',_0xe1fa0a),_0x47dbd9[_0x3ce2(0x55)](_0x27f0e2,![]);}));}}else console['warn']('\u26A0️ [PIN INPUT] Biometric authentication failed or was cancelled'),_0x86c923['fwUrE'](_0x2c6a25,_0x86c923['EaDKu']),_0x86c923['NcPGz'](_0x288ace,![]);}catch(_0x3ea04c){console[_0x3ce2(0x11)]('\u274C [PIN INPUT] Error handling biometric PIN storage:',_0x3ea04c),_0x2c6a25(_0x86c923[_0x3ce2(0x56)]),_0x86c923['vyJiW'](_0x288ace,![]);}}}else console[_0x3ce2(0x22)]('\uD83D\uDD10 [PIN INPUT] Biometric storage disabled, proceeding normally'),_0x581e73(_0x50eea9);}else{const _0x105463={'xJnfb':function(_0x43ed99,_0x2dcef8){return _0x86c923[_0x3ce2(0x45)](_0x43ed99,_0x2dcef8);}};_0x86c923[_0x3ce2(0x57)](_0x5d2fcd,!_0xfd9d2e)&&_0x21f97e&&(_0x25a0b5[_0x3ce2(0x22)]('\uD83D\uDE80 [PIN INPUT] Background training explicitly requested...'),_0x86c923[_0x3ce2(0x45)](_0xeeb946,!![]),_0x86c923[_0x3ce2(0x58)](_0x1acf89)[_0x3ce2(0x23)](_0x34e909=>{_0x8983be[_0x3ce2(0x11)]('\u274C [PIN INPUT] Background training failed:',_0x34e909),_0x105463['xJnfb'](_0x52a535,![]);}));}},[_0x50eea9,_0x4f6e3d,_0x581e73,enableBiometricStorage]),_0xe46895=_0x86c923[_0x3ce2(0x25)](useCallback,_0x5ca196=>{if(_0x86c923[_0x3ce2(0x59)](_0x86c923[_0x3ce2(0x5a)],_0x3ce2(0x5b)))return _0x3ce2(0x48)+_0x298e61+'\x20characters';else _0x86c923[_0x3ce2(0x5c)](_0xdde28d,_0x5ca196),_0x86c923['FWSug'](_0x19aa89,null),_0x86c923['mxBKe'](_0x2c6a25,_0x86c923['PlHxi']),console[_0x3ce2(0x22)]('\uD83D\uDD0D [PIN INPUT] PIN changed:',{'length':_0x5ca196[_0x3ce2(0x2f)],'hasSpecialChar':/[!@#$%^&*(),.?":{}|<>]/[_0x3ce2(0x3c)](_0x5ca196),'hasNumber':/\d/[_0x3ce2(0x3c)](_0x5ca196),'isValid':!_0x4f6e3d(_0x5ca196)});},[_0x4f6e3d]),_0x1ed0b7=_0x86c923[_0x3ce2(0x5d)](useCallback,()=>{console[_0x3ce2(0x5e)]('\u26A0️ [PIN INPUT] User chose to continue without biometric security'),_0x86c923[_0x3ce2(0x5f)](_0x581e73,_0x50eea9);},[_0x50eea9,_0x581e73]),_0x3de5e9=useCallback(()=>{const _0x35c571={'cjcby':function(_0x4bcd18,_0x309ece){return _0x86c923['juANl'](_0x4bcd18,_0x309ece);},'uDhnK':_0x86c923['PlHxi'],'bkVrc':function(_0x3f6153){return _0x3f6153();}};_0x86c923[_0x3ce2(0x4e)](_0x3ce2(0xe),_0x86c923[_0x3ce2(0x60)])?(_0x2c6a25(_0x86c923[_0x3ce2(0x20)]),_0x86c923[_0x3ce2(0x61)](_0x5832c3)):(_0x35c571[_0x3ce2(0x62)](_0x40a991,_0x35c571[_0x3ce2(0x63)]),_0x35c571[_0x3ce2(0x64)](_0x56b142));},[_0x5832c3]),_0x35b2d5=()=>{switch(_0x568789){case'biometric-unavailable':return{'title':_0x3ce2(0x65),'message':_0x86c923['FMVZo'],'type':_0x86c923[_0x3ce2(0x28)],'showActions':!![]};case _0x86c923[_0x3ce2(0x66)]:return{'title':_0x86c923[_0x3ce2(0x67)],'message':_0x86c923[_0x3ce2(0x68)],'type':_0x86c923[_0x3ce2(0x28)],'showActions':!![]};case _0x86c923[_0x3ce2(0x56)]:return{'title':_0x86c923['WVrLC'],'message':_0x86c923[_0x3ce2(0x69)],'type':_0x86c923[_0x3ce2(0x6a)],'showActions':!![]};case _0x86c923[_0x3ce2(0x4a)]:return{'title':_0x86c923['ImHqq'],'message':_0x86c923[_0x3ce2(0x2b)],'type':_0x86c923[_0x3ce2(0x2c)],'showActions':![]};default:return{'title':_0x86c923[_0x3ce2(0x2d)],'message':_0x86c923[_0x3ce2(0x6b)],'type':_0x86c923[_0x3ce2(0x2c)],'showActions':![]};}},_0x49aa30=_0x86c923[_0x3ce2(0x61)](_0x35b2d5);return React[_0x3ce2(0x6c)](View,{'style':styles[_0x3ce2(0x6d)]},React[_0x3ce2(0x6c)](View,{'style':styles['inputSection']},React[_0x3ce2(0x6c)](View,{'style':styles['header']},_0x58c808&&React['createElement'](TouchableOpacity,{'style':styles['backButton'],'onPress':_0x58c808},React[_0x3ce2(0x6c)](Text,{'style':{'fontSize':0x18}},'←')),React['createElement'](Text,{'style':styles[_0x3ce2(0x6e)]},_0x86c923[_0x3ce2(0x6f)])),React[_0x3ce2(0x6c)](Text,{'style':styles[_0x3ce2(0x70)]},_0x3ce2(0x71)),_0x86c923[_0x3ce2(0x57)](showBackgroundProgress,_0x3224ba)&&React[_0x3ce2(0x6c)](View,{'style':styles['backgroundProgressContainer']},React['createElement'](Text,{'style':styles[_0x3ce2(0x72)]},backgroundProgressText),React[_0x3ce2(0x6c)](View,{'style':styles[_0x3ce2(0x73)]},React['createElement'](ActivityIndicator,{'size':_0x86c923['yPmYy'],'color':_0x86c923['aCeJA']}))),React[_0x3ce2(0x6c)](View,{'style':styles[_0x3ce2(0x74)]},React['createElement'](TextInput,{'style':styles[_0x3ce2(0x75)],'value':_0x50eea9,'onChangeText':_0xe46895,'secureTextEntry':!_0x423680,'placeholder':_0x86c923['rclYH'],'keyboardType':_0x86c923[_0x3ce2(0x20)],'maxLength':0x14,'autoCapitalize':_0x86c923[_0x3ce2(0x76)],'autoCorrect':![],'returnKeyType':_0x86c923[_0x3ce2(0x77)],'onSubmitEditing':()=>Keyboard['dismiss']()}),React[_0x3ce2(0x6c)](TouchableOpacity,{'style':styles[_0x3ce2(0x78)],'onPress':()=>_0x19900a(!_0x423680)},React[_0x3ce2(0x6c)](Text,null,_0x423680?_0x3ce2(0x79):_0x3ce2(0x7a))))),_0x38622e&&React[_0x3ce2(0x6c)](Text,{'style':styles[_0x3ce2(0x11)]},_0x38622e),React['createElement'](View,{'style':styles[_0x3ce2(0x7b)]},React[_0x3ce2(0x6c)](Text,{'style':styles['requirementTitle']},'PIN\x20Requirements:'),React[_0x3ce2(0x6c)](Text,{'style':[styles[_0x3ce2(0x7c)],_0x50eea9[_0x3ce2(0x2f)]>=minLength&&styles['requirementMet']]},_0x86c923[_0x3ce2(0x7d)],minLength,'\x20characters'),requireSpecialChar&&React[_0x3ce2(0x6c)](Text,{'style':[styles[_0x3ce2(0x7c)],/[!@#$%^&*(),.?":{}|<>]/[_0x3ce2(0x3c)](_0x50eea9)&&styles[_0x3ce2(0x7e)]]},_0x86c923[_0x3ce2(0x7f)]),requireNumber&&React[_0x3ce2(0x6c)](Text,{'style':[styles[_0x3ce2(0x7c)],/\d/['test'](_0x50eea9)&&styles[_0x3ce2(0x7e)]]},_0x3ce2(0x80))),React[_0x3ce2(0x6c)](View,{'style':[styles[_0x3ce2(0x81)],_0x86c923[_0x3ce2(0x82)](_0x49aa30[_0x3ce2(0x83)],'info')&&styles[_0x3ce2(0x84)],_0x86c923[_0x3ce2(0x85)](_0x49aa30[_0x3ce2(0x83)],_0x86c923['BNDAl'])&&styles['infoContainerWarning'],_0x86c923[_0x3ce2(0x4e)](_0x49aa30['type'],'error')&&styles['infoContainerError']]},React[_0x3ce2(0x6c)](Text,{'style':[styles[_0x3ce2(0x86)],_0x86c923[_0x3ce2(0x87)](_0x49aa30[_0x3ce2(0x83)],_0x86c923['BcWBk'])&&styles[_0x3ce2(0x88)],_0x86c923['cAuRO'](_0x49aa30[_0x3ce2(0x83)],_0x86c923[_0x3ce2(0x28)])&&styles[_0x3ce2(0x89)],_0x86c923[_0x3ce2(0x85)](_0x49aa30[_0x3ce2(0x83)],_0x86c923[_0x3ce2(0x6a)])&&styles[_0x3ce2(0x8a)]]},_0x49aa30[_0x3ce2(0x6e)]),React[_0x3ce2(0x6c)](Text,{'style':[styles['infoMessage'],_0x49aa30[_0x3ce2(0x83)]===_0x86c923[_0x3ce2(0x2c)]&&styles['infoMessageInfo'],_0x86c923['yAUvY'](_0x49aa30[_0x3ce2(0x83)],_0x86c923['BNDAl'])&&styles['infoMessageWarning'],_0x49aa30[_0x3ce2(0x83)]===_0x86c923[_0x3ce2(0x6a)]&&styles[_0x3ce2(0x8b)]]},_0x49aa30[_0x3ce2(0x8c)]),_0x49aa30[_0x3ce2(0x8d)]&&React[_0x3ce2(0x6c)](View,{'style':styles[_0x3ce2(0x8e)]},React[_0x3ce2(0x6c)](TouchableOpacity,{'style':styles[_0x3ce2(0x8f)],'onPress':_0x3de5e9},React[_0x3ce2(0x6c)](Text,{'style':styles[_0x3ce2(0x90)]},_0x3ce2(0x91))),React['createElement'](TouchableOpacity,{'style':[styles[_0x3ce2(0x8f)],styles[_0x3ce2(0x92)]],'onPress':_0x1ed0b7},React[_0x3ce2(0x6c)](Text,{'style':[styles[_0x3ce2(0x90)],styles['infoActionButtonSecondaryText']]},_0x86c923[_0x3ce2(0x93)])))),React[_0x3ce2(0x6c)](View,{'style':styles['footer']},_0x58c808&&React[_0x3ce2(0x6c)](TouchableOpacity,{'style':styles[_0x3ce2(0x94)],'onPress':_0x58c808},React[_0x3ce2(0x6c)](Text,{'style':styles['cancelButtonText']},_0x86c923['YfDKp'])),React['createElement'](TouchableOpacity,{'style':[styles[_0x3ce2(0x95)],(_0x86c923[_0x3ce2(0x96)](!_0x50eea9,_0x24d10b)||_0x86c923['FWSug'](_0x4f6e3d,_0x50eea9))&&styles[_0x3ce2(0x97)]],'onPress':_0x5832c3,'disabled':_0x86c923['GsQop'](!_0x50eea9,_0x24d10b)||!!_0x4f6e3d(_0x50eea9)},React[_0x3ce2(0x6c)](Text,{'style':styles[_0x3ce2(0x98)]},_0x24d10b?_0x86c923[_0x3ce2(0x2a)]:_0x86c923[_0x3ce2(0x99)]))));};const styles=StyleSheet[_0x3ce2(0x9a)]({'container':{'flex':0x1,'padding':0x10,'width':width,'backgroundColor':_0x3ce2(0x9b),'justifyContent':_0x3ce2(0x9c)},'inputSection':{'width':_0x3ce2(0x9d),'marginTop':0x0,'paddingTop':0x0},'header':{'flexDirection':_0x3ce2(0x9e),'alignItems':_0x3ce2(0x9f),'justifyContent':'space-between','marginBottom':0x10,'paddingVertical':0x8},'backButton':{'padding':0x8},'title':{'fontSize':0x14,'fontWeight':_0x3ce2(0xa0),'color':_0x3ce2(0xa1),'textAlign':_0x3ce2(0x9f),'flex':0x1,'marginBottom':0x8},'subtitle':{'fontSize':0xe,'color':'#666','marginBottom':0x18,'textAlign':'center'},'inputContainer':{'flexDirection':_0x3ce2(0x9e),'alignItems':_0x3ce2(0x9f),'borderWidth':0x1,'borderColor':'#CCCCCC','borderRadius':0x8,'marginBottom':0x10},'input':{'flex':0x1,'padding':0xc,'fontSize':0x10},'visibilityButton':{'padding':0xc},'infoContainer':{'padding':0x10,'borderRadius':0xc,'marginBottom':0x10,'borderWidth':0x1},'infoContainerInfo':{'backgroundColor':_0x3ce2(0xa2),'borderColor':_0x3ce2(0xa3)},'infoContainerWarning':{'backgroundColor':_0x3ce2(0xa4),'borderColor':'#FF9800'},'infoContainerError':{'backgroundColor':_0x3ce2(0xa5),'borderColor':_0x3ce2(0xa6)},'infoTitle':{'fontSize':0x10,'fontWeight':_0x3ce2(0xa0),'marginBottom':0x8},'infoTitleInfo':{'color':'#1976D2'},'infoTitleWarning':{'color':_0x3ce2(0xa7)},'infoTitleError':{'color':_0x3ce2(0xa8)},'infoMessage':{'fontSize':0xe,'lineHeight':0x14,'marginBottom':0xc},'infoMessageInfo':{'color':'#1565C0'},'infoMessageWarning':{'color':_0x3ce2(0xa9)},'infoMessageError':{'color':_0x3ce2(0xaa)},'infoActions':{'flexDirection':'row','justifyContent':_0x3ce2(0xab),'marginTop':0x8},'infoActionButton':{'flex':0x1,'paddingVertical':0xa,'paddingHorizontal':0x10,'borderRadius':0x8,'backgroundColor':'#007AFF','marginHorizontal':0x4,'alignItems':_0x3ce2(0x9f)},'infoActionButtonSecondary':{'backgroundColor':_0x3ce2(0xac),'borderWidth':0x1,'borderColor':_0x3ce2(0x15)},'infoActionButtonText':{'color':'#fff','fontSize':0xe,'fontWeight':_0x3ce2(0xa0)},'infoActionButtonSecondaryText':{'color':_0x3ce2(0x15)},'error':{'color':'#FF3B30','marginBottom':0x10},'requirements':{'marginBottom':0x18},'requirementTitle':{'fontSize':0xe,'fontWeight':_0x3ce2(0xa0),'marginBottom':0x8,'color':'#333'},'requirement':{'fontSize':0xe,'color':'#666','marginBottom':0x4},'requirementMet':{'color':_0x3ce2(0xad)},'footer':{'flexDirection':'row','alignItems':_0x3ce2(0x9f),'justifyContent':'space-between','marginTop':0x18,'borderTopWidth':0x1,'borderTopColor':_0x3ce2(0xae),'paddingTop':0x10},'cancelButton':{'paddingVertical':0x8,'paddingHorizontal':0x10},'cancelButtonText':{'color':_0x3ce2(0xaf),'fontSize':0x10},'submitButton':{'paddingVertical':0x10,'paddingHorizontal':0x20,'borderRadius':0x10,'backgroundColor':_0x3ce2(0xb0),'alignItems':_0x3ce2(0x9f)},'submitButtonDisabled':{'opacity':0.5},'submitButtonText':{'color':_0x3ce2(0x9b),'fontSize':0x10,'fontWeight':_0x3ce2(0xa0)},'backgroundProgressContainer':{'flexDirection':_0x3ce2(0x9e),'alignItems':_0x3ce2(0x9f),'justifyContent':'center','marginBottom':0x10},'backgroundProgressText':{'fontSize':0xe,'color':_0x3ce2(0xaf),'marginRight':0xa},'backgroundProgressIndicator':{'padding':0x5}});
1
+ import React, { useState, useCallback } from 'react';
2
+ import { View, Text, StyleSheet, TextInput, TouchableOpacity, Dimensions, Keyboard, ActivityIndicator } from 'react-native';
3
+ import { biometricPinService } from '../services/biometricPinService';
4
+ const {
5
+ width
6
+ } = Dimensions.get('window');
7
+ export const PinInput = ({
8
+ onSubmit,
9
+ minLength = 8,
10
+ requireSpecialChar = true,
11
+ requireNumber = true,
12
+ onBack,
13
+ enableBiometricStorage = true,
14
+ // ✅ NEW: Background training optimization props
15
+ onBackgroundTrainingStart,
16
+ showBackgroundProgress = false,
17
+ backgroundProgressText = "Training is starting in the background..."
18
+ }) => {
19
+ const [pin, setPin] = useState('');
20
+ const [error, setError] = useState(null);
21
+ const [showPin, setShowPin] = useState(false);
22
+ const [isStoringPin, setIsStoringPin] = useState(false);
23
+ const [infoStatus, setInfoStatus] = useState('default');
24
+ // ✅ NEW: Background training state
25
+ const [isBackgroundTrainingStarted, setIsBackgroundTrainingStarted] = useState(false);
26
+
27
+ // ✅ UPDATED: Make background training conditional, not automatic on mount
28
+ React.useEffect(() => {
29
+ // Only start background training if explicitly requested and not already started
30
+ // This prevents automatic training on component mount
31
+ if (onBackgroundTrainingStart && !isBackgroundTrainingStarted && showBackgroundProgress) {
32
+ console.log('🚀 [PIN INPUT] Background training explicitly requested...');
33
+ setIsBackgroundTrainingStarted(true);
34
+ onBackgroundTrainingStart().catch(error => {
35
+ console.error('❌ [PIN INPUT] Background training failed:', error);
36
+ setIsBackgroundTrainingStarted(false);
37
+ });
38
+ }
39
+ }, [onBackgroundTrainingStart, isBackgroundTrainingStarted, showBackgroundProgress]);
40
+ const validatePin = useCallback(value => {
41
+ if (value.length < minLength) {
42
+ return `PIN must be at least ${minLength} characters`;
43
+ }
44
+ if (requireSpecialChar && !/[!@#$%^&*(),.?":{}|<>]/.test(value)) {
45
+ return 'PIN must include a special character';
46
+ }
47
+ if (requireNumber && !/\d/.test(value)) {
48
+ return 'PIN must include a number';
49
+ }
50
+ return null;
51
+ }, [minLength, requireSpecialChar, requireNumber]);
52
+ const handleSubmit = useCallback(async () => {
53
+ console.log('🔍 [PIN INPUT] handleSubmit called with PIN length:', pin.length);
54
+ const validationError = validatePin(pin);
55
+ if (validationError) {
56
+ console.log('❌ [PIN INPUT] Validation failed:', validationError);
57
+ setError(validationError);
58
+ return;
59
+ }
60
+ console.log('✅ [PIN INPUT] PIN validation passed');
61
+
62
+ // If biometric storage is enabled, store PIN securely
63
+ if (enableBiometricStorage) {
64
+ console.log('🔐 [PIN INPUT] Biometric storage enabled, starting biometric flow...');
65
+ setIsStoringPin(true);
66
+ setInfoStatus('authenticating');
67
+ try {
68
+ // Check if biometric is available
69
+ const biometricAvailable = await biometricPinService.isBiometricAvailable();
70
+ console.log('📱 [PIN INPUT] Biometric available:', biometricAvailable);
71
+ if (!biometricAvailable) {
72
+ console.error('❌ [PIN INPUT] Face ID not available on this device');
73
+ setInfoStatus('biometric-unavailable');
74
+ setIsStoringPin(false);
75
+ return;
76
+ }
77
+
78
+ // Immediately attempt to store PIN with biometric authentication
79
+ console.log('🔐 [PIN INPUT] Triggering biometric authentication for PIN storage...');
80
+ const stored = await biometricPinService.storePinWithBiometric(pin);
81
+ if (stored) {
82
+ console.log('✅ [PIN INPUT] PIN stored successfully with biometric protection');
83
+
84
+ // Verify the PIN was actually stored by checking if it can be retrieved
85
+ const isStored = await biometricPinService.isPinStored();
86
+ if (isStored) {
87
+ console.log('✅ [PIN INPUT] PIN storage verified - proceeding with onboarding');
88
+ onSubmit(pin);
89
+ } else {
90
+ console.error('❌ [PIN INPUT] PIN storage verification failed');
91
+ setInfoStatus('storage-error');
92
+ setIsStoringPin(false);
93
+ }
94
+ } else {
95
+ // Biometric authentication was cancelled or failed
96
+ console.warn('⚠️ [PIN INPUT] Biometric authentication failed or was cancelled');
97
+ setInfoStatus('biometric-failed');
98
+ setIsStoringPin(false);
99
+ }
100
+ } catch (error) {
101
+ console.error('❌ [PIN INPUT] Error handling biometric PIN storage:', error);
102
+ setInfoStatus('storage-error');
103
+ setIsStoringPin(false);
104
+ }
105
+ } else {
106
+ // Biometric storage disabled, proceed normally
107
+ console.log('🔐 [PIN INPUT] Biometric storage disabled, proceeding normally');
108
+ onSubmit(pin);
109
+ }
110
+ }, [pin, validatePin, onSubmit, enableBiometricStorage]);
111
+ const handlePinChange = useCallback(value => {
112
+ setPin(value);
113
+ setError(null);
114
+ setInfoStatus('default');
115
+
116
+ // Debug logging to help troubleshoot
117
+ console.log('🔍 [PIN INPUT] PIN changed:', {
118
+ length: value.length,
119
+ hasSpecialChar: /[!@#$%^&*(),.?":{}|<>]/.test(value),
120
+ hasNumber: /\d/.test(value),
121
+ isValid: !validatePin(value)
122
+ });
123
+ }, [validatePin]);
124
+ const handleContinueWithoutBiometric = useCallback(() => {
125
+ console.warn('⚠️ [PIN INPUT] User chose to continue without biometric security');
126
+ onSubmit(pin);
127
+ }, [pin, onSubmit]);
128
+ const handleRetry = useCallback(() => {
129
+ setInfoStatus('default');
130
+ handleSubmit();
131
+ }, [handleSubmit]);
132
+ const getInfoMessage = () => {
133
+ switch (infoStatus) {
134
+ case 'biometric-unavailable':
135
+ return {
136
+ title: 'Biometric Authentication Not Available',
137
+ message: 'This device does not support Face ID or Touch ID. Please enable biometric authentication in your device settings to secure your PIN.',
138
+ type: 'warning',
139
+ showActions: true
140
+ };
141
+ case 'biometric-failed':
142
+ return {
143
+ title: 'Biometric Authentication Failed',
144
+ message: 'Biometric authentication was cancelled or failed. Your PIN needs to be secured with biometric authentication to proceed.',
145
+ type: 'warning',
146
+ showActions: true
147
+ };
148
+ case 'storage-error':
149
+ return {
150
+ title: 'Storage Error',
151
+ message: 'An error occurred while securing your PIN. Would you like to try again?',
152
+ type: 'error',
153
+ showActions: true
154
+ };
155
+ case 'authenticating':
156
+ return {
157
+ title: 'Authenticating...',
158
+ message: 'Please complete biometric authentication to secure your PIN.',
159
+ type: 'info',
160
+ showActions: false
161
+ };
162
+ default:
163
+ return {
164
+ title: 'Secure PIN Storage',
165
+ message: 'Your PIN will be securely stored locally on your device using biometric authentication (Face ID or Touch ID) for enhanced security.',
166
+ type: 'info',
167
+ showActions: false
168
+ };
169
+ }
170
+ };
171
+ const infoMessage = getInfoMessage();
172
+ return /*#__PURE__*/React.createElement(View, {
173
+ style: styles.container
174
+ }, /*#__PURE__*/React.createElement(View, {
175
+ style: styles.inputSection
176
+ }, /*#__PURE__*/React.createElement(View, {
177
+ style: styles.header
178
+ }, onBack && /*#__PURE__*/React.createElement(TouchableOpacity, {
179
+ style: styles.backButton,
180
+ onPress: onBack
181
+ }, /*#__PURE__*/React.createElement(Text, {
182
+ style: {
183
+ fontSize: 24
184
+ }
185
+ }, "\u2190")), /*#__PURE__*/React.createElement(Text, {
186
+ style: styles.title
187
+ }, "Create a PIN")), /*#__PURE__*/React.createElement(Text, {
188
+ style: styles.subtitle
189
+ }, "A PIN so only you have access to your data"), showBackgroundProgress && isBackgroundTrainingStarted && /*#__PURE__*/React.createElement(View, {
190
+ style: styles.backgroundProgressContainer
191
+ }, /*#__PURE__*/React.createElement(Text, {
192
+ style: styles.backgroundProgressText
193
+ }, backgroundProgressText), /*#__PURE__*/React.createElement(View, {
194
+ style: styles.backgroundProgressIndicator
195
+ }, /*#__PURE__*/React.createElement(ActivityIndicator, {
196
+ size: "small",
197
+ color: "#007AFF"
198
+ }))), /*#__PURE__*/React.createElement(View, {
199
+ style: styles.inputContainer
200
+ }, /*#__PURE__*/React.createElement(TextInput, {
201
+ style: styles.input,
202
+ value: pin,
203
+ onChangeText: handlePinChange,
204
+ secureTextEntry: !showPin,
205
+ placeholder: "e.g. MyPin123!",
206
+ keyboardType: "default",
207
+ maxLength: 20,
208
+ autoCapitalize: "none",
209
+ autoCorrect: false,
210
+ returnKeyType: "done",
211
+ onSubmitEditing: () => Keyboard.dismiss()
212
+ }), /*#__PURE__*/React.createElement(TouchableOpacity, {
213
+ style: styles.visibilityButton,
214
+ onPress: () => setShowPin(!showPin)
215
+ }, /*#__PURE__*/React.createElement(Text, null, showPin ? '👁️' : '👁️‍🗨️')))), error && /*#__PURE__*/React.createElement(Text, {
216
+ style: styles.error
217
+ }, error), /*#__PURE__*/React.createElement(View, {
218
+ style: styles.requirements
219
+ }, /*#__PURE__*/React.createElement(Text, {
220
+ style: styles.requirementTitle
221
+ }, "PIN Requirements:"), /*#__PURE__*/React.createElement(Text, {
222
+ style: [styles.requirement, pin.length >= minLength && styles.requirementMet]
223
+ }, "\u2022 At least ", minLength, " characters"), requireSpecialChar && /*#__PURE__*/React.createElement(Text, {
224
+ style: [styles.requirement, /[!@#$%^&*(),.?":{}|<>]/.test(pin) && styles.requirementMet]
225
+ }, "\u2022 Include a special character"), requireNumber && /*#__PURE__*/React.createElement(Text, {
226
+ style: [styles.requirement, /\d/.test(pin) && styles.requirementMet]
227
+ }, "\u2022 Include a number")), /*#__PURE__*/React.createElement(View, {
228
+ style: [styles.infoContainer, infoMessage.type === 'info' && styles.infoContainerInfo, infoMessage.type === 'warning' && styles.infoContainerWarning, infoMessage.type === 'error' && styles.infoContainerError]
229
+ }, /*#__PURE__*/React.createElement(Text, {
230
+ style: [styles.infoTitle, infoMessage.type === 'info' && styles.infoTitleInfo, infoMessage.type === 'warning' && styles.infoTitleWarning, infoMessage.type === 'error' && styles.infoTitleError]
231
+ }, infoMessage.title), /*#__PURE__*/React.createElement(Text, {
232
+ style: [styles.infoMessage, infoMessage.type === 'info' && styles.infoMessageInfo, infoMessage.type === 'warning' && styles.infoMessageWarning, infoMessage.type === 'error' && styles.infoMessageError]
233
+ }, infoMessage.message), infoMessage.showActions && /*#__PURE__*/React.createElement(View, {
234
+ style: styles.infoActions
235
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
236
+ style: styles.infoActionButton,
237
+ onPress: handleRetry
238
+ }, /*#__PURE__*/React.createElement(Text, {
239
+ style: styles.infoActionButtonText
240
+ }, "Try Again")), /*#__PURE__*/React.createElement(TouchableOpacity, {
241
+ style: [styles.infoActionButton, styles.infoActionButtonSecondary],
242
+ onPress: handleContinueWithoutBiometric
243
+ }, /*#__PURE__*/React.createElement(Text, {
244
+ style: [styles.infoActionButtonText, styles.infoActionButtonSecondaryText]
245
+ }, "Continue Without Biometric")))), /*#__PURE__*/React.createElement(View, {
246
+ style: styles.footer
247
+ }, onBack && /*#__PURE__*/React.createElement(TouchableOpacity, {
248
+ style: styles.cancelButton,
249
+ onPress: onBack
250
+ }, /*#__PURE__*/React.createElement(Text, {
251
+ style: styles.cancelButtonText
252
+ }, "Back")), /*#__PURE__*/React.createElement(TouchableOpacity, {
253
+ style: [styles.submitButton, (!pin || isStoringPin || validatePin(pin)) && styles.submitButtonDisabled],
254
+ onPress: handleSubmit,
255
+ disabled: !pin || isStoringPin || !!validatePin(pin)
256
+ }, /*#__PURE__*/React.createElement(Text, {
257
+ style: styles.submitButtonText
258
+ }, isStoringPin ? 'Authenticating...' : 'Continue'))));
259
+ };
260
+ const styles = StyleSheet.create({
261
+ container: {
262
+ flex: 1,
263
+ padding: 16,
264
+ width: width,
265
+ backgroundColor: '#fff',
266
+ justifyContent: 'flex-start'
267
+ },
268
+ inputSection: {
269
+ width: '100%',
270
+ marginTop: 0,
271
+ paddingTop: 0
272
+ },
273
+ header: {
274
+ flexDirection: 'row',
275
+ alignItems: 'center',
276
+ justifyContent: 'space-between',
277
+ marginBottom: 16,
278
+ paddingVertical: 8
279
+ },
280
+ backButton: {
281
+ padding: 8
282
+ },
283
+ title: {
284
+ fontSize: 20,
285
+ fontWeight: '600',
286
+ color: '#333',
287
+ textAlign: 'center',
288
+ flex: 1,
289
+ marginBottom: 8
290
+ },
291
+ subtitle: {
292
+ fontSize: 14,
293
+ color: '#666',
294
+ marginBottom: 24,
295
+ textAlign: 'center'
296
+ },
297
+ inputContainer: {
298
+ flexDirection: 'row',
299
+ alignItems: 'center',
300
+ borderWidth: 1,
301
+ borderColor: '#CCCCCC',
302
+ borderRadius: 8,
303
+ marginBottom: 16
304
+ },
305
+ input: {
306
+ flex: 1,
307
+ padding: 12,
308
+ fontSize: 16
309
+ },
310
+ visibilityButton: {
311
+ padding: 12
312
+ },
313
+ // Info Container Styles
314
+ infoContainer: {
315
+ padding: 16,
316
+ borderRadius: 12,
317
+ marginBottom: 16,
318
+ borderWidth: 1
319
+ },
320
+ infoContainerInfo: {
321
+ backgroundColor: '#E3F2FD',
322
+ borderColor: '#2196F3'
323
+ },
324
+ infoContainerWarning: {
325
+ backgroundColor: '#FFF3E0',
326
+ borderColor: '#FF9800'
327
+ },
328
+ infoContainerError: {
329
+ backgroundColor: '#FFEBEE',
330
+ borderColor: '#F44336'
331
+ },
332
+ infoTitle: {
333
+ fontSize: 16,
334
+ fontWeight: '600',
335
+ marginBottom: 8
336
+ },
337
+ infoTitleInfo: {
338
+ color: '#1976D2'
339
+ },
340
+ infoTitleWarning: {
341
+ color: '#F57C00'
342
+ },
343
+ infoTitleError: {
344
+ color: '#D32F2F'
345
+ },
346
+ infoMessage: {
347
+ fontSize: 14,
348
+ lineHeight: 20,
349
+ marginBottom: 12
350
+ },
351
+ infoMessageInfo: {
352
+ color: '#1565C0'
353
+ },
354
+ infoMessageWarning: {
355
+ color: '#E65100'
356
+ },
357
+ infoMessageError: {
358
+ color: '#C62828'
359
+ },
360
+ infoActions: {
361
+ flexDirection: 'row',
362
+ justifyContent: 'space-between',
363
+ marginTop: 8
364
+ },
365
+ infoActionButton: {
366
+ flex: 1,
367
+ paddingVertical: 10,
368
+ paddingHorizontal: 16,
369
+ borderRadius: 8,
370
+ backgroundColor: '#007AFF',
371
+ marginHorizontal: 4,
372
+ alignItems: 'center'
373
+ },
374
+ infoActionButtonSecondary: {
375
+ backgroundColor: 'transparent',
376
+ borderWidth: 1,
377
+ borderColor: '#007AFF'
378
+ },
379
+ infoActionButtonText: {
380
+ color: '#fff',
381
+ fontSize: 14,
382
+ fontWeight: '600'
383
+ },
384
+ infoActionButtonSecondaryText: {
385
+ color: '#007AFF'
386
+ },
387
+ error: {
388
+ color: '#FF3B30',
389
+ marginBottom: 16
390
+ },
391
+ requirements: {
392
+ marginBottom: 24
393
+ },
394
+ requirementTitle: {
395
+ fontSize: 14,
396
+ fontWeight: '600',
397
+ marginBottom: 8,
398
+ color: '#333'
399
+ },
400
+ requirement: {
401
+ fontSize: 14,
402
+ color: '#666',
403
+ marginBottom: 4
404
+ },
405
+ requirementMet: {
406
+ color: '#34C759'
407
+ },
408
+ footer: {
409
+ flexDirection: 'row',
410
+ alignItems: 'center',
411
+ justifyContent: 'space-between',
412
+ marginTop: 24,
413
+ borderTopWidth: 1,
414
+ borderTopColor: '#eee',
415
+ paddingTop: 16
416
+ },
417
+ cancelButton: {
418
+ paddingVertical: 8,
419
+ paddingHorizontal: 16
420
+ },
421
+ cancelButtonText: {
422
+ color: '#666',
423
+ fontSize: 16
424
+ },
425
+ submitButton: {
426
+ paddingVertical: 16,
427
+ paddingHorizontal: 32,
428
+ borderRadius: 16,
429
+ backgroundColor: '#000000',
430
+ alignItems: 'center'
431
+ },
432
+ submitButtonDisabled: {
433
+ opacity: 0.5
434
+ },
435
+ submitButtonText: {
436
+ color: '#fff',
437
+ fontSize: 16,
438
+ fontWeight: '600'
439
+ },
440
+ // ✅ NEW: Background training progress styles
441
+ backgroundProgressContainer: {
442
+ flexDirection: 'row',
443
+ alignItems: 'center',
444
+ justifyContent: 'center',
445
+ marginBottom: 16
446
+ },
447
+ backgroundProgressText: {
448
+ fontSize: 14,
449
+ color: '#666',
450
+ marginRight: 10
451
+ },
452
+ backgroundProgressIndicator: {
453
+ padding: 5
454
+ }
455
+ });
456
+ //# sourceMappingURL=PinInput.js.map