@onairos/react-native 3.7.2 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +120 -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 +113 -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,66 @@
1
- function _0x560f(){const _0x3df059=['#000','header','createElement','backButton','arrow-back','svyCg','titleContainer','title','subtitle','closeButton','Atcvj','create','row','center','headerBg','600','#666'];_0x560f=function(){return _0x3df059;};return _0x560f();}import React from'react';import{View,Text,StyleSheet,TouchableOpacity}from'react-native';import _0x3a24a8 from'react-native-vector-icons/MaterialIcons';import{COLORS}from'../../constants';function _0x587e(_0x560fe0,_0x587e05){_0x560fe0=_0x560fe0-0x0;const _0x5d11bf=_0x560f();let _0x4428d3=_0x5d11bf[_0x560fe0];return _0x4428d3;}export const OnboardingHeader=({title:_0x340bac,subtitle:_0x5a40a5,showBackButton:showBackButton=![],onBack:_0x17f476,onClose:_0x37820e})=>{const _0x52125f={'svyCg':_0x587e(0x0),'Atcvj':'close'};return React['createElement'](View,{'style':styles[_0x587e(0x1)]},showBackButton&&React[_0x587e(0x2)](TouchableOpacity,{'style':styles[_0x587e(0x3)],'onPress':_0x17f476},React[_0x587e(0x2)](_0x3a24a8,{'name':_0x587e(0x4),'size':0x18,'color':_0x52125f[_0x587e(0x5)]})),React[_0x587e(0x2)](View,{'style':styles[_0x587e(0x6)]},React['createElement'](Text,{'style':styles[_0x587e(0x7)]},_0x340bac),_0x5a40a5&&React[_0x587e(0x2)](Text,{'style':styles[_0x587e(0x8)]},_0x5a40a5)),React[_0x587e(0x2)](TouchableOpacity,{'style':styles[_0x587e(0x9)],'onPress':_0x37820e},React['createElement'](_0x3a24a8,{'name':_0x52125f[_0x587e(0xa)],'size':0x18,'color':_0x587e(0x0)})));};const styles=StyleSheet[_0x587e(0xb)]({'header':{'flexDirection':_0x587e(0xc),'alignItems':_0x587e(0xd),'padding':0x10,'backgroundColor':COLORS[_0x587e(0xe)],'borderTopLeftRadius':0x10,'borderTopRightRadius':0x10},'backButton':{'padding':0x8,'marginRight':0x8},'titleContainer':{'flex':0x1},'title':{'fontSize':0x12,'fontWeight':_0x587e(0xf),'color':_0x587e(0x0)},'subtitle':{'fontSize':0xe,'color':_0x587e(0x10),'marginTop':0x4},'closeButton':{'padding':0x8}});
1
+ import React from 'react';
2
+ import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
3
+ import Icon from 'react-native-vector-icons/MaterialIcons';
4
+ import { COLORS } from '../../constants';
5
+ export const OnboardingHeader = ({
6
+ title,
7
+ subtitle,
8
+ showBackButton = false,
9
+ onBack,
10
+ onClose
11
+ }) => {
12
+ return /*#__PURE__*/React.createElement(View, {
13
+ style: styles.header
14
+ }, showBackButton && /*#__PURE__*/React.createElement(TouchableOpacity, {
15
+ style: styles.backButton,
16
+ onPress: onBack
17
+ }, /*#__PURE__*/React.createElement(Icon, {
18
+ name: "arrow-back",
19
+ size: 24,
20
+ color: "#000"
21
+ })), /*#__PURE__*/React.createElement(View, {
22
+ style: styles.titleContainer
23
+ }, /*#__PURE__*/React.createElement(Text, {
24
+ style: styles.title
25
+ }, title), subtitle && /*#__PURE__*/React.createElement(Text, {
26
+ style: styles.subtitle
27
+ }, subtitle)), /*#__PURE__*/React.createElement(TouchableOpacity, {
28
+ style: styles.closeButton,
29
+ onPress: onClose
30
+ }, /*#__PURE__*/React.createElement(Icon, {
31
+ name: "close",
32
+ size: 24,
33
+ color: "#000"
34
+ })));
35
+ };
36
+ const styles = StyleSheet.create({
37
+ header: {
38
+ flexDirection: 'row',
39
+ alignItems: 'center',
40
+ padding: 16,
41
+ backgroundColor: COLORS.headerBg,
42
+ borderTopLeftRadius: 16,
43
+ borderTopRightRadius: 16
44
+ },
45
+ backButton: {
46
+ padding: 8,
47
+ marginRight: 8
48
+ },
49
+ titleContainer: {
50
+ flex: 1
51
+ },
52
+ title: {
53
+ fontSize: 18,
54
+ fontWeight: '600',
55
+ color: '#000'
56
+ },
57
+ subtitle: {
58
+ fontSize: 14,
59
+ color: '#666',
60
+ marginTop: 4
61
+ },
62
+ closeButton: {
63
+ padding: 8
64
+ }
65
+ });
66
+ //# sourceMappingURL=OnboardingHeader.js.map
@@ -1 +1,274 @@
1
- import React,{useState,useCallback,useEffect}from'react';import{View,Text,StyleSheet,TextInput,TouchableOpacity,Keyboard,KeyboardAvoidingView,Platform}from'react-native';import _0x683525 from'react-native-vector-icons/MaterialIcons';function _0x17e5(){const _0x49d6ef=['dyRLm','bZxSx','TfjXU','XOwhF','BvYJo','confirm','PINs\x20do\x20not\x20match','create','height','Confirm\x20your\x20PIN','This\x20PIN\x20will\x20protect\x20your\x20Onairos\x20account','default','Enter\x20PIN','#999','done','visibility','PIN\x20Requirements:','check-circle','At\x20least\x20','\x20characters','Include\x20at\x20least\x20one\x20number','Include\x20at\x20least\x20one\x20special\x20character','arrow-back','Submit','arrow-forward','#fff','HntCA','oADVN','Mrhpb','wbLKT','QcAcx','ydIhw','vZIHQ','jvTuK','nCmHF','dismiss','FEYRq','HMePK','vBhpY','CLoiz','eQFmT','SqvQa','length','push','PIN\x20must\x20be\x20at\x20least\x20','test','lXwLQ','GjtRL','pKPkS','TMTWu','nPuCu','PIN\x20must\x20include\x20at\x20least\x20one\x20number','LpAwL','FSlKO','flTTf','FSjDE','dsADb','SiVAd','OqzmY','zXNrg','jONky','gZgxX','ASNye','MRtlM','SJZpA','createElement','QzjOt','padding','upaLc','title','subtitle','NvmLs','FcxCj','input','mFAGJ','OwVYo','WQFrX','RQiWF','Confirm\x20PIN','visibility-off','jgTuL','SLllX','errorContainer','map','errorItem','#f44336','errorText','requirementsContainer','requirementsTitle','jSiQJ','requirement','eAIpH','KdoOc','rKWJw','#4caf50','requirementText','tYvEQ','JEWTd','miHMX','JjJmo','EbgDT','buttonContainer','button','backButton','primary','buttonText','backButtonText','COiZL','zZXWU','disabledButton','tdmQK','nextButtonText','UlTAF','mJTjx','heebr','nULSF','FYkji','bold','#000','#666','row','center','#ddd','#f9f9f9','#f5f5f5','600','space-between','transparent'];_0x17e5=function(){return _0x49d6ef;};return _0x17e5();}function _0x3116(_0x17e5fb,_0x311697){_0x17e5fb=_0x17e5fb-0x0;const _0x280a48=_0x17e5();let _0x28d8e2=_0x280a48[_0x17e5fb];return _0x28d8e2;}import{COLORS}from'../../constants';export const PinInput=({onSubmit:_0x114784,minLength:minLength=0x6,requireSpecialChar:requireSpecialChar=!![],requireNumber:requireNumber=!![]})=>{const _0x57835e={'Mrhpb':function(_0x4a4531,_0x45daca){return _0x4a4531(_0x45daca);},'vZIHQ':function(_0x9edd5f,_0x4cbc45){return _0x9edd5f(_0x4cbc45);},'jvTuK':_0x3116(0x0),'eQFmT':function(_0x1767a1,_0x3aa8ca){return _0x1767a1===_0x3aa8ca;},'HntCA':function(_0x3bc450,_0xd90bfb){return _0x3bc450(_0xd90bfb);},'SqvQa':function(_0x1ff1fe,_0x1d9ee6){return _0x1ff1fe<_0x1d9ee6;},'lXwLQ':function(_0xbcf857,_0x12c209){return _0xbcf857===_0x12c209;},'GjtRL':'pKPkS','AZRKh':'PIN\x20must\x20include\x20at\x20least\x20one\x20number','nPuCu':'PIN\x20must\x20include\x20at\x20least\x20one\x20special\x20character','wbLKT':function(_0x341f22,_0x43fd0a){return _0x341f22(_0x43fd0a);},'LpAwL':_0x3116(0x1),'bFztg':_0x3116(0x2),'flTTf':function(_0x500e55,_0x575de9){return _0x500e55===_0x575de9;},'FSjDE':function(_0x32accf,_0x52fd59){return _0x32accf===_0x52fd59;},'dsADb':_0x3116(0x3),'SiVAd':function(_0x111499,_0x5686d7){return _0x111499(_0x5686d7);},'OqzmY':'cqomo','sDTuh':_0x3116(0x4),'zXNrg':function(_0x5a2d2b,_0x2fd8d6){return _0x5a2d2b(_0x2fd8d6);},'jONky':_0x3116(0x5),'ASNye':_0x3116(0x6),'QcAcx':_0x3116(0x7),'oADVN':function(_0x1ebc66,_0x2121d2){return _0x1ebc66(_0x2121d2);},'SJZpA':function(_0x102a02,_0x2b50e2){return _0x102a02(_0x2b50e2);},'ydIhw':function(_0x252ed8,_0x253890,_0x258a77){return _0x252ed8(_0x253890,_0x258a77);},'nQZQH':function(_0x2392aa,_0x421d09,_0x2652f6){return _0x2392aa(_0x421d09,_0x2652f6);},'MRtlM':function(_0x4e917a,_0x2c2097,_0x51d6ee){return _0x4e917a(_0x2c2097,_0x51d6ee);},'QzjOt':function(_0x54dd8e,_0x1a3afc){return _0x54dd8e===_0x1a3afc;},'upaLc':_0x3116(0x8),'AsclE':_0x3116(0x9),'NvmLs':_0x3116(0xa),'FcxCj':'Please\x20re-enter\x20your\x20PIN\x20to\x20confirm','mFAGJ':function(_0x14ef1f,_0x1606fe){return _0x14ef1f===_0x1606fe;},'fbkBg':_0x3116(0xb),'OwVYo':'none','WQFrX':function(_0x12cf4b,_0x37ea39){return _0x12cf4b===_0x37ea39;},'RQiWF':_0x3116(0xc),'SLllX':_0x3116(0xd),'zalvc':_0x3116(0xe),'jgTuL':_0x3116(0xf),'VAsbr':function(_0x46fbcf,_0x314008){return _0x46fbcf>_0x314008;},'jSiQJ':_0x3116(0x10),'eAIpH':function(_0x380bff,_0x16d07a){return _0x380bff>=_0x16d07a;},'KdoOc':_0x3116(0x11),'miHMX':'radio-button-unchecked','rKWJw':function(_0x88447b,_0x52e3e3){return _0x88447b>=_0x52e3e3;},'AOpGa':function(_0x5d793b,_0x2d7d35){return _0x5d793b>=_0x2d7d35;},'tYvEQ':'#4caf50','JEWTd':_0x3116(0x12),'WbFEh':_0x3116(0x13),'JjJmo':_0x3116(0x14),'EbgDT':_0x3116(0x15),'VQodb':_0x3116(0x16),'COiZL':'Back','zZXWU':function(_0x4e8eda,_0x4014b1){return _0x4e8eda===_0x4014b1;},'tdmQK':function(_0x5b9ffd,_0xed3333){return _0x5b9ffd===_0xed3333;},'UlTAF':function(_0x3218f1,_0x137c5d){return _0x3218f1===_0x137c5d;},'mJTjx':'Next','heebr':_0x3116(0x17),'nULSF':_0x3116(0x18),'FYkji':_0x3116(0x19)},[_0x501fb3,_0x508b7e]=_0x57835e[_0x3116(0x1a)](useState,''),[_0x10285e,_0x508a47]=useState(''),[_0x420a6e,_0x470925]=_0x57835e[_0x3116(0x1b)](useState,![]),[_0xc50038,_0x9165c3]=_0x57835e[_0x3116(0x1c)](useState,[]),[_0x2a52a1,_0x1a37bf]=_0x57835e[_0x3116(0x1d)](useState,_0x57835e[_0x3116(0x1e)]);_0x57835e[_0x3116(0x1f)](useEffect,()=>{const _0x267c2b={'nCmHF':function(_0x2339a6,_0x1cb9ed){return _0x2339a6===_0x1cb9ed;},'FEYRq':function(_0x2cc24c,_0x330c06){return _0x57835e[_0x3116(0x1c)](_0x2cc24c,_0x330c06);},'HMePK':function(_0x11ff94,_0x1c6c66){return _0x57835e[_0x3116(0x1c)](_0x11ff94,_0x1c6c66);},'vBhpY':_0x3116(0x6),'CLoiz':function(_0xe0ba35,_0x4866e4){return _0x57835e[_0x3116(0x20)](_0xe0ba35,_0x4866e4);}};_0x57835e[_0x3116(0x21)]!==_0x57835e[_0x3116(0x21)]?_0x267c2b[_0x3116(0x22)](_0x205743,_0x1b5aaf)?(_0x52a163[_0x3116(0x23)](),_0x267c2b[_0x3116(0x24)](_0x2b6fbd,_0x45d5ab)):(_0x267c2b[_0x3116(0x25)](_0x19a6fb,[_0x267c2b[_0x3116(0x26)]]),_0x267c2b[_0x3116(0x27)](_0x2bce2e,'')):_0x57835e[_0x3116(0x28)](_0x2a52a1,_0x3116(0x7))&&_0x57835e['HntCA'](_0x116f6c,_0x501fb3);},[_0x501fb3,_0x2a52a1]);const _0x116f6c=_0x57835e[_0x3116(0x1f)](useCallback,_0x17d475=>{const _0x12f195={'TMTWu':function(_0x511d1b,_0x1cca09){return _0x57835e[_0x3116(0x20)](_0x511d1b,_0x1cca09);}},_0xb317f7=[];return _0x57835e[_0x3116(0x29)](_0x17d475[_0x3116(0x2a)],minLength)&&_0xb317f7[_0x3116(0x2b)](_0x3116(0x2c)+minLength+_0x3116(0x13)),requireNumber&&!/\d/[_0x3116(0x2d)](_0x17d475)&&(_0x57835e[_0x3116(0x2e)](_0x57835e[_0x3116(0x2f)],_0x3116(0x30))?_0xb317f7['push'](_0x57835e['AZRKh']):(_0x19fbc8[_0x3116(0x23)](),_0x12f195[_0x3116(0x31)](_0x4cdd21,_0x530fc1))),requireSpecialChar&&!/[!@#$%^&*(),.?":{}|<>]/[_0x3116(0x2d)](_0x17d475)&&_0xb317f7[_0x3116(0x2b)](_0x57835e[_0x3116(0x32)]),_0x57835e[_0x3116(0x1d)](_0x9165c3,_0xb317f7),_0xb317f7[_0x3116(0x2a)]===0x0;},[minLength,requireNumber,requireSpecialChar]),_0x2e43b1=_0x57835e['nQZQH'](useCallback,()=>{const _0x29d963={'FSlKO':_0x3116(0x33),'gZgxX':function(_0x20102b,_0xe859e8){return _0x57835e[_0x3116(0x28)](_0x20102b,_0xe859e8);}};_0x57835e[_0x3116(0x2e)](_0x57835e[_0x3116(0x34)],_0x57835e['bFztg'])?_0x101bee[_0x3116(0x2b)](_0x29d963[_0x3116(0x35)]):_0x57835e[_0x3116(0x36)](_0x2a52a1,_0x3116(0x7))?_0x57835e[_0x3116(0x37)](_0x57835e[_0x3116(0x38)],_0x57835e[_0x3116(0x38)])?_0x57835e[_0x3116(0x39)](_0x116f6c,_0x501fb3)&&(_0x57835e[_0x3116(0x3a)]!==_0x57835e['sDTuh']?_0x57835e[_0x3116(0x3b)](_0x1a37bf,_0x57835e[_0x3116(0x3c)]):_0x29d963[_0x3116(0x3d)](_0x577d69,_0x3116(0x7))&&_0x41c11d(_0x14c399)):_0x10f9fa['push'](_0x3116(0x2c)+_0x40aca6+'\x20characters'):_0x57835e[_0x3116(0x2e)](_0x501fb3,_0x10285e)?(Keyboard[_0x3116(0x23)](),_0x114784(_0x501fb3)):(_0x9165c3([_0x57835e[_0x3116(0x3e)]]),_0x508a47(''));},[_0x501fb3,_0x10285e,_0x2a52a1,_0x116f6c,_0x114784]),_0x42b8b0=useCallback(()=>{_0x1a37bf(_0x57835e[_0x3116(0x1e)]),_0x508a47(''),_0x57835e[_0x3116(0x1b)](_0x9165c3,[]);},[]),_0xdcd6be=_0x57835e[_0x3116(0x3f)](useCallback,()=>{_0x57835e[_0x3116(0x40)](_0x470925,!_0x420a6e);},[_0x420a6e]);return React[_0x3116(0x41)](KeyboardAvoidingView,{'behavior':_0x57835e[_0x3116(0x42)](Platform['OS'],'ios')?_0x3116(0x43):_0x57835e[_0x3116(0x44)],'style':styles['container']},React[_0x3116(0x41)](View,{'style':styles['content']},React[_0x3116(0x41)](Text,{'style':styles[_0x3116(0x45)]},_0x57835e['flTTf'](_0x2a52a1,_0x57835e['QcAcx'])?'Create\x20a\x20PIN':_0x57835e['AsclE']),React['createElement'](Text,{'style':styles[_0x3116(0x46)]},_0x2a52a1===_0x3116(0x7)?_0x57835e[_0x3116(0x47)]:_0x57835e[_0x3116(0x48)]),React[_0x3116(0x41)](View,{'style':styles['inputContainer']},React[_0x3116(0x41)](TextInput,{'style':styles[_0x3116(0x49)],'value':_0x57835e[_0x3116(0x4a)](_0x2a52a1,_0x57835e[_0x3116(0x1e)])?_0x501fb3:_0x10285e,'onChangeText':_0x2a52a1===_0x57835e['QcAcx']?_0x508b7e:_0x508a47,'secureTextEntry':!_0x420a6e,'keyboardType':_0x57835e['fbkBg'],'autoCapitalize':_0x57835e[_0x3116(0x4b)],'autoCorrect':![],'placeholder':_0x57835e[_0x3116(0x4c)](_0x2a52a1,_0x57835e[_0x3116(0x1e)])?_0x57835e[_0x3116(0x4d)]:_0x3116(0x4e),'placeholderTextColor':_0x57835e['SLllX'],'returnKeyType':_0x57835e['zalvc'],'onSubmitEditing':_0x2e43b1}),React[_0x3116(0x41)](TouchableOpacity,{'style':styles['visibilityToggle'],'onPress':_0xdcd6be},React['createElement'](_0x683525,{'name':_0x420a6e?_0x3116(0x4f):_0x57835e[_0x3116(0x50)],'size':0x18,'color':_0x57835e[_0x3116(0x51)]}))),_0x57835e['VAsbr'](_0xc50038[_0x3116(0x2a)],0x0)&&React[_0x3116(0x41)](View,{'style':styles[_0x3116(0x52)]},_0xc50038[_0x3116(0x53)]((_0x27f240,_0x531fc4)=>React[_0x3116(0x41)](View,{'key':_0x531fc4,'style':styles[_0x3116(0x54)]},React['createElement'](_0x683525,{'name':'error-outline','size':0x10,'color':_0x3116(0x55)}),React[_0x3116(0x41)](Text,{'style':styles[_0x3116(0x56)]},_0x27f240)))),_0x57835e[_0x3116(0x2e)](_0x2a52a1,_0x3116(0x7))&&React['createElement'](View,{'style':styles[_0x3116(0x57)]},React[_0x3116(0x41)](Text,{'style':styles[_0x3116(0x58)]},_0x57835e[_0x3116(0x59)]),React[_0x3116(0x41)](View,{'style':styles[_0x3116(0x5a)]},React[_0x3116(0x41)](_0x683525,{'name':_0x57835e[_0x3116(0x5b)](_0x501fb3[_0x3116(0x2a)],minLength)?_0x57835e[_0x3116(0x5c)]:_0x57835e['miHMX'],'size':0x10,'color':_0x57835e[_0x3116(0x5d)](_0x501fb3['length'],minLength)?_0x3116(0x5e):_0x57835e[_0x3116(0x51)]}),React[_0x3116(0x41)](Text,{'style':[styles[_0x3116(0x5f)],{'color':_0x57835e['AOpGa'](_0x501fb3[_0x3116(0x2a)],minLength)?_0x57835e[_0x3116(0x60)]:_0x57835e[_0x3116(0x51)]}]},_0x57835e[_0x3116(0x61)],minLength,_0x57835e['WbFEh'])),requireNumber&&React[_0x3116(0x41)](View,{'style':styles[_0x3116(0x5a)]},React['createElement'](_0x683525,{'name':/\d/[_0x3116(0x2d)](_0x501fb3)?_0x57835e[_0x3116(0x5c)]:_0x57835e[_0x3116(0x62)],'size':0x10,'color':/\d/[_0x3116(0x2d)](_0x501fb3)?_0x3116(0x5e):_0x57835e[_0x3116(0x51)]}),React[_0x3116(0x41)](Text,{'style':[styles['requirementText'],{'color':/\d/[_0x3116(0x2d)](_0x501fb3)?_0x57835e[_0x3116(0x60)]:_0x57835e[_0x3116(0x51)]}]},_0x57835e[_0x3116(0x63)])),requireSpecialChar&&React[_0x3116(0x41)](View,{'style':styles[_0x3116(0x5a)]},React[_0x3116(0x41)](_0x683525,{'name':/[!@#$%^&*(),.?":{}|<>]/[_0x3116(0x2d)](_0x501fb3)?_0x57835e[_0x3116(0x5c)]:_0x57835e['miHMX'],'size':0x10,'color':/[!@#$%^&*(),.?":{}|<>]/[_0x3116(0x2d)](_0x501fb3)?_0x57835e[_0x3116(0x60)]:_0x57835e[_0x3116(0x51)]}),React[_0x3116(0x41)](Text,{'style':[styles[_0x3116(0x5f)],{'color':/[!@#$%^&*(),.?":{}|<>]/[_0x3116(0x2d)](_0x501fb3)?_0x57835e[_0x3116(0x60)]:_0x3116(0xd)}]},_0x57835e[_0x3116(0x64)]))),React['createElement'](View,{'style':styles[_0x3116(0x65)]},_0x2a52a1===_0x57835e[_0x3116(0x3c)]&&React[_0x3116(0x41)](TouchableOpacity,{'style':[styles[_0x3116(0x66)],styles[_0x3116(0x67)]],'onPress':_0x42b8b0},React['createElement'](_0x683525,{'name':_0x57835e['VQodb'],'size':0x14,'color':COLORS[_0x3116(0x68)]}),React[_0x3116(0x41)](Text,{'style':[styles[_0x3116(0x69)],styles[_0x3116(0x6a)]]},_0x57835e[_0x3116(0x6b)])),React['createElement'](TouchableOpacity,{'style':[styles['button'],styles['nextButton'],_0x2a52a1===_0x57835e[_0x3116(0x1e)]&&_0xc50038['length']>0x0||_0x57835e[_0x3116(0x6c)](_0x2a52a1,_0x57835e[_0x3116(0x3c)])&&!_0x10285e?styles[_0x3116(0x6d)]:null],'onPress':_0x2e43b1,'disabled':_0x2a52a1===_0x57835e['QcAcx']&&_0x57835e['VAsbr'](_0xc50038[_0x3116(0x2a)],0x0)||_0x57835e[_0x3116(0x6e)](_0x2a52a1,_0x57835e[_0x3116(0x3c)])&&!_0x10285e},React[_0x3116(0x41)](Text,{'style':[styles['buttonText'],styles[_0x3116(0x6f)]]},_0x57835e[_0x3116(0x70)](_0x2a52a1,_0x3116(0x7))?_0x57835e[_0x3116(0x71)]:_0x57835e[_0x3116(0x72)]),React[_0x3116(0x41)](_0x683525,{'name':_0x57835e[_0x3116(0x73)],'size':0x14,'color':_0x57835e[_0x3116(0x74)]})))));};const styles=StyleSheet['create']({'container':{'flex':0x1},'content':{'padding':0x18},'title':{'fontSize':0x18,'fontWeight':_0x3116(0x75),'marginBottom':0x8,'color':_0x3116(0x76)},'subtitle':{'fontSize':0x10,'color':_0x3116(0x77),'marginBottom':0x18},'inputContainer':{'flexDirection':_0x3116(0x78),'alignItems':_0x3116(0x79),'borderWidth':0x1,'borderColor':_0x3116(0x7a),'borderRadius':0x8,'backgroundColor':_0x3116(0x7b),'marginBottom':0x10},'input':{'flex':0x1,'paddingHorizontal':0x10,'paddingVertical':0xc,'fontSize':0x10,'color':_0x3116(0x76)},'visibilityToggle':{'padding':0xc},'errorContainer':{'marginBottom':0x10},'errorItem':{'flexDirection':_0x3116(0x78),'alignItems':_0x3116(0x79),'marginBottom':0x4},'errorText':{'color':_0x3116(0x55),'marginLeft':0x6},'requirementsContainer':{'backgroundColor':_0x3116(0x7c),'padding':0x10,'borderRadius':0x8,'marginBottom':0x18},'requirementsTitle':{'fontSize':0xe,'fontWeight':_0x3116(0x7d),'marginBottom':0x8,'color':_0x3116(0x76)},'requirement':{'flexDirection':_0x3116(0x78),'alignItems':_0x3116(0x79),'marginBottom':0x8},'requirementText':{'marginLeft':0x8,'fontSize':0xe},'buttonContainer':{'flexDirection':_0x3116(0x78),'justifyContent':_0x3116(0x7e)},'button':{'flexDirection':_0x3116(0x78),'alignItems':_0x3116(0x79),'paddingVertical':0xc,'paddingHorizontal':0x14,'borderRadius':0x19},'backButton':{'backgroundColor':_0x3116(0x7f),'borderWidth':0x1,'borderColor':COLORS['primary']},'nextButton':{'backgroundColor':COLORS[_0x3116(0x68)],'minWidth':0x78,'justifyContent':'center'},'disabledButton':{'backgroundColor':'#ccc'},'buttonText':{'fontSize':0x10,'fontWeight':_0x3116(0x7d)},'backButtonText':{'color':COLORS[_0x3116(0x68)],'marginLeft':0x8},'nextButtonText':{'color':'#fff','marginRight':0x8}});
1
+ import React, { useState, useCallback, useEffect } from 'react';
2
+ import { View, Text, StyleSheet, TextInput, TouchableOpacity, Keyboard, KeyboardAvoidingView, Platform } from 'react-native';
3
+ import Icon from 'react-native-vector-icons/MaterialIcons';
4
+ import { COLORS } from '../../constants';
5
+ export const PinInput = ({
6
+ onSubmit,
7
+ minLength = 6,
8
+ requireSpecialChar = true,
9
+ requireNumber = true
10
+ }) => {
11
+ const [pin, setPin] = useState('');
12
+ const [confirmPin, setConfirmPin] = useState('');
13
+ const [showPin, setShowPin] = useState(false);
14
+ const [errors, setErrors] = useState([]);
15
+ const [step, setStep] = useState('create');
16
+
17
+ // Validate pin whenever it changes
18
+ useEffect(() => {
19
+ if (step === 'create') {
20
+ validatePin(pin);
21
+ }
22
+ }, [pin, step]);
23
+
24
+ // Validate PIN strength and requirements
25
+ const validatePin = useCallback(value => {
26
+ const newErrors = [];
27
+ if (value.length < minLength) {
28
+ newErrors.push(`PIN must be at least ${minLength} characters`);
29
+ }
30
+ if (requireNumber && !/\d/.test(value)) {
31
+ newErrors.push('PIN must include at least one number');
32
+ }
33
+ if (requireSpecialChar && !/[!@#$%^&*(),.?":{}|<>]/.test(value)) {
34
+ newErrors.push('PIN must include at least one special character');
35
+ }
36
+ setErrors(newErrors);
37
+ return newErrors.length === 0;
38
+ }, [minLength, requireNumber, requireSpecialChar]);
39
+
40
+ // Handle PIN submission
41
+ const handleSubmit = useCallback(() => {
42
+ if (step === 'create') {
43
+ if (validatePin(pin)) {
44
+ setStep('confirm');
45
+ }
46
+ } else {
47
+ // Confirm PIN
48
+ if (pin === confirmPin) {
49
+ Keyboard.dismiss();
50
+ onSubmit(pin);
51
+ } else {
52
+ setErrors(['PINs do not match']);
53
+ setConfirmPin('');
54
+ }
55
+ }
56
+ }, [pin, confirmPin, step, validatePin, onSubmit]);
57
+
58
+ // Go back to PIN creation step
59
+ const handleBack = useCallback(() => {
60
+ setStep('create');
61
+ setConfirmPin('');
62
+ setErrors([]);
63
+ }, []);
64
+
65
+ // Toggle PIN visibility
66
+ const togglePinVisibility = useCallback(() => {
67
+ setShowPin(!showPin);
68
+ }, [showPin]);
69
+ return /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
70
+ behavior: Platform.OS === 'ios' ? 'padding' : 'height',
71
+ style: styles.container
72
+ }, /*#__PURE__*/React.createElement(View, {
73
+ style: styles.content
74
+ }, /*#__PURE__*/React.createElement(Text, {
75
+ style: styles.title
76
+ }, step === 'create' ? 'Create a PIN' : 'Confirm your PIN'), /*#__PURE__*/React.createElement(Text, {
77
+ style: styles.subtitle
78
+ }, step === 'create' ? 'This PIN will protect your Onairos account' : 'Please re-enter your PIN to confirm'), /*#__PURE__*/React.createElement(View, {
79
+ style: styles.inputContainer
80
+ }, /*#__PURE__*/React.createElement(TextInput, {
81
+ style: styles.input,
82
+ value: step === 'create' ? pin : confirmPin,
83
+ onChangeText: step === 'create' ? setPin : setConfirmPin,
84
+ secureTextEntry: !showPin,
85
+ keyboardType: "default",
86
+ autoCapitalize: "none",
87
+ autoCorrect: false,
88
+ placeholder: step === 'create' ? 'Enter PIN' : 'Confirm PIN',
89
+ placeholderTextColor: "#999",
90
+ returnKeyType: "done",
91
+ onSubmitEditing: handleSubmit
92
+ }), /*#__PURE__*/React.createElement(TouchableOpacity, {
93
+ style: styles.visibilityToggle,
94
+ onPress: togglePinVisibility
95
+ }, /*#__PURE__*/React.createElement(Icon, {
96
+ name: showPin ? 'visibility-off' : 'visibility',
97
+ size: 24,
98
+ color: "#999"
99
+ }))), errors.length > 0 && /*#__PURE__*/React.createElement(View, {
100
+ style: styles.errorContainer
101
+ }, errors.map((error, index) => /*#__PURE__*/React.createElement(View, {
102
+ key: index,
103
+ style: styles.errorItem
104
+ }, /*#__PURE__*/React.createElement(Icon, {
105
+ name: "error-outline",
106
+ size: 16,
107
+ color: "#f44336"
108
+ }), /*#__PURE__*/React.createElement(Text, {
109
+ style: styles.errorText
110
+ }, error)))), step === 'create' && /*#__PURE__*/React.createElement(View, {
111
+ style: styles.requirementsContainer
112
+ }, /*#__PURE__*/React.createElement(Text, {
113
+ style: styles.requirementsTitle
114
+ }, "PIN Requirements:"), /*#__PURE__*/React.createElement(View, {
115
+ style: styles.requirement
116
+ }, /*#__PURE__*/React.createElement(Icon, {
117
+ name: pin.length >= minLength ? 'check-circle' : 'radio-button-unchecked',
118
+ size: 16,
119
+ color: pin.length >= minLength ? '#4caf50' : '#999'
120
+ }), /*#__PURE__*/React.createElement(Text, {
121
+ style: [styles.requirementText, {
122
+ color: pin.length >= minLength ? '#4caf50' : '#999'
123
+ }]
124
+ }, "At least ", minLength, " characters")), requireNumber && /*#__PURE__*/React.createElement(View, {
125
+ style: styles.requirement
126
+ }, /*#__PURE__*/React.createElement(Icon, {
127
+ name: /\d/.test(pin) ? 'check-circle' : 'radio-button-unchecked',
128
+ size: 16,
129
+ color: /\d/.test(pin) ? '#4caf50' : '#999'
130
+ }), /*#__PURE__*/React.createElement(Text, {
131
+ style: [styles.requirementText, {
132
+ color: /\d/.test(pin) ? '#4caf50' : '#999'
133
+ }]
134
+ }, "Include at least one number")), requireSpecialChar && /*#__PURE__*/React.createElement(View, {
135
+ style: styles.requirement
136
+ }, /*#__PURE__*/React.createElement(Icon, {
137
+ name: /[!@#$%^&*(),.?":{}|<>]/.test(pin) ? 'check-circle' : 'radio-button-unchecked',
138
+ size: 16,
139
+ color: /[!@#$%^&*(),.?":{}|<>]/.test(pin) ? '#4caf50' : '#999'
140
+ }), /*#__PURE__*/React.createElement(Text, {
141
+ style: [styles.requirementText, {
142
+ color: /[!@#$%^&*(),.?":{}|<>]/.test(pin) ? '#4caf50' : '#999'
143
+ }]
144
+ }, "Include at least one special character"))), /*#__PURE__*/React.createElement(View, {
145
+ style: styles.buttonContainer
146
+ }, step === 'confirm' && /*#__PURE__*/React.createElement(TouchableOpacity, {
147
+ style: [styles.button, styles.backButton],
148
+ onPress: handleBack
149
+ }, /*#__PURE__*/React.createElement(Icon, {
150
+ name: "arrow-back",
151
+ size: 20,
152
+ color: COLORS.primary
153
+ }), /*#__PURE__*/React.createElement(Text, {
154
+ style: [styles.buttonText, styles.backButtonText]
155
+ }, "Back")), /*#__PURE__*/React.createElement(TouchableOpacity, {
156
+ style: [styles.button, styles.nextButton, step === 'create' && errors.length > 0 || step === 'confirm' && !confirmPin ? styles.disabledButton : null],
157
+ onPress: handleSubmit,
158
+ disabled: step === 'create' && errors.length > 0 || step === 'confirm' && !confirmPin
159
+ }, /*#__PURE__*/React.createElement(Text, {
160
+ style: [styles.buttonText, styles.nextButtonText]
161
+ }, step === 'create' ? 'Next' : 'Submit'), /*#__PURE__*/React.createElement(Icon, {
162
+ name: "arrow-forward",
163
+ size: 20,
164
+ color: "#fff"
165
+ })))));
166
+ };
167
+ const styles = StyleSheet.create({
168
+ container: {
169
+ flex: 1
170
+ },
171
+ content: {
172
+ padding: 24
173
+ },
174
+ title: {
175
+ fontSize: 24,
176
+ fontWeight: 'bold',
177
+ marginBottom: 8,
178
+ color: '#000'
179
+ },
180
+ subtitle: {
181
+ fontSize: 16,
182
+ color: '#666',
183
+ marginBottom: 24
184
+ },
185
+ inputContainer: {
186
+ flexDirection: 'row',
187
+ alignItems: 'center',
188
+ borderWidth: 1,
189
+ borderColor: '#ddd',
190
+ borderRadius: 8,
191
+ backgroundColor: '#f9f9f9',
192
+ marginBottom: 16
193
+ },
194
+ input: {
195
+ flex: 1,
196
+ paddingHorizontal: 16,
197
+ paddingVertical: 12,
198
+ fontSize: 16,
199
+ color: '#000'
200
+ },
201
+ visibilityToggle: {
202
+ padding: 12
203
+ },
204
+ errorContainer: {
205
+ marginBottom: 16
206
+ },
207
+ errorItem: {
208
+ flexDirection: 'row',
209
+ alignItems: 'center',
210
+ marginBottom: 4
211
+ },
212
+ errorText: {
213
+ color: '#f44336',
214
+ marginLeft: 6
215
+ },
216
+ requirementsContainer: {
217
+ backgroundColor: '#f5f5f5',
218
+ padding: 16,
219
+ borderRadius: 8,
220
+ marginBottom: 24
221
+ },
222
+ requirementsTitle: {
223
+ fontSize: 14,
224
+ fontWeight: '600',
225
+ marginBottom: 8,
226
+ color: '#000'
227
+ },
228
+ requirement: {
229
+ flexDirection: 'row',
230
+ alignItems: 'center',
231
+ marginBottom: 8
232
+ },
233
+ requirementText: {
234
+ marginLeft: 8,
235
+ fontSize: 14
236
+ },
237
+ buttonContainer: {
238
+ flexDirection: 'row',
239
+ justifyContent: 'space-between'
240
+ },
241
+ button: {
242
+ flexDirection: 'row',
243
+ alignItems: 'center',
244
+ paddingVertical: 12,
245
+ paddingHorizontal: 20,
246
+ borderRadius: 25
247
+ },
248
+ backButton: {
249
+ backgroundColor: 'transparent',
250
+ borderWidth: 1,
251
+ borderColor: COLORS.primary
252
+ },
253
+ nextButton: {
254
+ backgroundColor: COLORS.primary,
255
+ minWidth: 120,
256
+ justifyContent: 'center'
257
+ },
258
+ disabledButton: {
259
+ backgroundColor: '#ccc'
260
+ },
261
+ buttonText: {
262
+ fontSize: 16,
263
+ fontWeight: '600'
264
+ },
265
+ backButtonText: {
266
+ color: COLORS.primary,
267
+ marginLeft: 8
268
+ },
269
+ nextButtonText: {
270
+ color: '#fff',
271
+ marginRight: 8
272
+ }
273
+ });
274
+ //# sourceMappingURL=PinInput.js.map
@@ -1 +1,240 @@
1
- import React,{useState}from'react';import{View,Text,StyleSheet,TouchableOpacity,ActivityIndicator,ScrollView}from'react-native';function _0x5cd2(_0x5b4951,_0x5cd22c){_0x5b4951=_0x5b4951-0x0;const _0x211372=_0x5b49();let _0x591691=_0x211372[_0x5b4951];return _0x591691;}import _0xafb2ea from'react-native-vector-icons/MaterialIcons';import{COLORS}from'../../constants';import{OAuthWebView}from'./OAuthWebView';function _0x5b49(){const _0x4e14d7=['Instagram','photo-camera','#E1306C','smart-display','#FF0000','Pinterest','push-pin','#E60023','Reddit','#FF4500','Connect\x20to\x20personalize\x20Reddit\x20content\x20insights','trcuY','#fff','Disconnect','Connect','TkhzC','small','TGslA','Connect\x20Your\x20Platforms','Connect\x20at\x20least\x202\x20platforms\x20to\x20create\x20your\x20Onairos\x20account','arrow-forward','#999','jiyRz','gFafj','log','VvIII','fGNDR','mQMjT','BHejq','qiFyK','uRwTL','sbZck','umfWI','svFaN','uWUVh','lusXE','userName','createElement','platformItem','platformInfo','platformIcon','icon','koJpe','platformText','name','Connected\x20as\x20','platformButton','connectButton','dwfdc','values','filter','length','container','title','neovq','subtitle','keys','map','fHKMk','kTKZR','FpnLP','color','platformName','platformDescription','buttonText','oNCnZ','footer','\x20of\x20','proceedButton','proceedActive','proceedInactive','proceedTextActive','proceedTextInactive','Continue','BsPkI','tBCCN','GBnAc','Received\x20authorization\x20code\x20for\x20','create','bold','#000','row','#eee','center','600','#666','#f44336','space-between','primary'];_0x5b49=function(){return _0x4e14d7;};return _0x5b49();}const PLATFORMS={'instagram':{'name':_0x5cd2(0x0),'icon':_0x5cd2(0x1),'color':_0x5cd2(0x2),'description':'Connect\x20to\x20share\x20and\x20analyze\x20your\x20Instagram\x20content'},'youtube':{'name':'YouTube','icon':_0x5cd2(0x3),'color':_0x5cd2(0x4),'description':'Connect\x20for\x20YouTube\x20video\x20recommendations\x20and\x20analysis'},'pinterest':{'name':_0x5cd2(0x5),'icon':_0x5cd2(0x6),'color':_0x5cd2(0x7),'description':'Connect\x20to\x20enhance\x20Pinterest\x20board\x20recommendations'},'reddit':{'name':_0x5cd2(0x8),'icon':'forum','color':_0x5cd2(0x9),'description':_0x5cd2(0xa)}};export const PlatformConnector=({connections:_0x5ec8ce,onConnect:_0x266ac5,onDisconnect:_0xaa9489,isLoading:_0x2df8c7,canProceed:_0x5dcc56,onProceed:_0x85d1c3})=>{const _0xcf589d={'VvIII':function(_0x1e07ab){return _0x1e07ab();},'jiyRz':function(_0x4ab07d,_0x3bb0da){return _0x4ab07d===_0x3bb0da;},'gFafj':_0x5cd2(0xb),'fHKMk':function(_0x393512,_0x46861a){return _0x393512(_0x46861a);},'mQMjT':function(_0x39df14,_0x1a65b7){return _0x39df14(_0x1a65b7);},'fGNDR':function(_0x4b6f93,_0x1e5660){return _0x4b6f93===_0x1e5660;},'tPqsT':'bDbSF','IqaHo':'lDfKg','BHejq':function(_0x183296,_0x1c02b4){return _0x183296(_0x1c02b4);},'qiFyK':function(_0x49d90,_0x37ce84){return _0x49d90(_0x37ce84);},'VznWh':function(_0x93e712,_0x7a1765){return _0x93e712===_0x7a1765;},'uRwTL':_0x5cd2(0xc),'oNCnZ':_0x5cd2(0xd),'sbZck':_0x5cd2(0xe),'svFaN':_0x5cd2(0xf),'kTKZR':function(_0x38a340,_0x471bf9){return _0x38a340===_0x471bf9;},'FpnLP':function(_0x15939b,_0x2eeafb){return _0x15939b===_0x2eeafb;},'rpJUz':_0x5cd2(0x10),'GBnAc':_0x5cd2(0x11),'sgGYa':function(_0x480553){return _0x480553();},'neovq':_0x5cd2(0x12),'pelbo':_0x5cd2(0x13),'XUOFe':function(_0x279a84){return _0x279a84();},'BsPkI':_0x5cd2(0x14),'tBCCN':_0x5cd2(0x15)},[_0x13aefc,_0x100bb6]=useState(null),_0x51e401=async _0x451947=>{_0xcf589d[_0x5cd2(0x16)](_0xcf589d['gFafj'],_0xcf589d[_0x5cd2(0x17)])?_0xcf589d['fHKMk'](_0x100bb6,_0x451947):(_0x9bc28f[_0x5cd2(0x18)]('Received\x20authorization\x20code\x20for\x20'+_0x45999b+':\x20'+_0x5430f0),_0xcf589d[_0x5cd2(0x19)](_0xac327d));},_0x3e2170=()=>{_0xcf589d[_0x5cd2(0x1a)](_0xcf589d['tPqsT'],_0xcf589d['IqaHo'])?_0xcf589d[_0x5cd2(0x1b)](_0x47f1f1,null):_0xcf589d[_0x5cd2(0x1c)](_0x100bb6,null);},_0x156908=()=>{_0x100bb6(null);},_0x4ce60a=async _0x49070f=>{await _0xcf589d[_0x5cd2(0x1d)](_0xaa9489,_0x49070f);},_0x450599=_0x510dce=>{const _0xf2f528={'uWUVh':function(_0x139915,_0x3b8020){return _0x139915(_0x3b8020);},'lusXE':function(_0x5046c1,_0x4b7fc5){return _0xcf589d['VznWh'](_0x5046c1,_0x4b7fc5);},'QChre':function(_0x5e0533,_0x1ab064){return _0x5e0533===_0x1ab064;},'koJpe':_0xcf589d[_0x5cd2(0x1e)],'wvEsm':_0x5cd2(0x10),'dwfdc':_0xcf589d['oNCnZ'],'JOqsr':_0xcf589d[_0x5cd2(0x1f)]};if(_0x5cd2(0x20)===_0xcf589d[_0x5cd2(0x21)]){var _0x3439a8;const _0x415fd5=_0x14305d[_0x4977d7],_0x2a60d7=_0xf2f528[_0x5cd2(0x22)](_0x5cf2ba,_0x42a083),_0x418251=_0x2a60d7?_0xf2f528[_0x5cd2(0x23)](_0x3439a8=_0x5e1825[_0x1819e5],null)||_0xf2f528['QChre'](_0x3439a8,void 0x0)?void 0x0:_0x3439a8[_0x5cd2(0x24)]:null;return React[_0x5cd2(0x25)](View,{'key':_0x48f68d,'style':_0x40b3c9[_0x5cd2(0x26)]},React[_0x5cd2(0x25)](View,{'style':_0x8ae9a9[_0x5cd2(0x27)]},React[_0x5cd2(0x25)](View,{'style':[_0x15c8ae[_0x5cd2(0x28)],{'backgroundColor':_0x415fd5['color']}]},React[_0x5cd2(0x25)](_0x500fd8,{'name':_0x415fd5[_0x5cd2(0x29)],'size':0x18,'color':_0xf2f528[_0x5cd2(0x2a)]})),React[_0x5cd2(0x25)](View,{'style':_0x39f139[_0x5cd2(0x2b)]},React[_0x5cd2(0x25)](Text,{'style':_0x1c8df0['platformName']},_0x415fd5[_0x5cd2(0x2c)]),React[_0x5cd2(0x25)](Text,{'style':_0x3c6265['platformDescription']},_0x2a60d7?_0x5cd2(0x2d)+_0x418251:_0x415fd5['description']))),React[_0x5cd2(0x25)](TouchableOpacity,{'style':[_0x56fec9[_0x5cd2(0x2e)],_0x2a60d7?_0x2acfbf['disconnectButton']:_0x53dd40[_0x5cd2(0x2f)]],'onPress':()=>_0x2a60d7?_0x5c8c58(_0x1c4151):_0x42164a(_0x814f61),'disabled':_0x3909c8},_0x44b3dd?React[_0x5cd2(0x25)](ActivityIndicator,{'size':_0xf2f528['wvEsm'],'color':_0xf2f528[_0x5cd2(0x2a)]}):React[_0x5cd2(0x25)](Text,{'style':_0x18a762['buttonText']},_0x2a60d7?_0xf2f528[_0x5cd2(0x30)]:_0xf2f528['JOqsr'])));}else{const _0xdb28a6=_0x510dce;return _0x5ec8ce[_0xdb28a6]?!![]:![];}},_0x36f4cf=()=>{return Object[_0x5cd2(0x31)](_0x5ec8ce)[_0x5cd2(0x32)](Boolean)[_0x5cd2(0x33)];};return React[_0x5cd2(0x25)](View,{'style':styles[_0x5cd2(0x34)]},React[_0x5cd2(0x25)](Text,{'style':styles[_0x5cd2(0x35)]},_0xcf589d[_0x5cd2(0x36)]),React[_0x5cd2(0x25)](Text,{'style':styles[_0x5cd2(0x37)]},_0xcf589d['pelbo']),React[_0x5cd2(0x25)](ScrollView,{'style':styles['platformList']},Object[_0x5cd2(0x38)](PLATFORMS)[_0x5cd2(0x39)](_0x584791=>{var _0x3ab207;const _0x48a1bf=PLATFORMS[_0x584791],_0x16643a=_0xcf589d[_0x5cd2(0x3a)](_0x450599,_0x584791),_0x16b485=_0x16643a?_0xcf589d[_0x5cd2(0x3b)](_0x3ab207=_0x5ec8ce[_0x584791],null)||_0xcf589d[_0x5cd2(0x3c)](_0x3ab207,void 0x0)?void 0x0:_0x3ab207[_0x5cd2(0x24)]:null;return React[_0x5cd2(0x25)](View,{'key':_0x584791,'style':styles[_0x5cd2(0x26)]},React['createElement'](View,{'style':styles[_0x5cd2(0x27)]},React[_0x5cd2(0x25)](View,{'style':[styles[_0x5cd2(0x28)],{'backgroundColor':_0x48a1bf[_0x5cd2(0x3d)]}]},React[_0x5cd2(0x25)](_0xafb2ea,{'name':_0x48a1bf[_0x5cd2(0x29)],'size':0x18,'color':_0xcf589d['uRwTL']})),React[_0x5cd2(0x25)](View,{'style':styles[_0x5cd2(0x2b)]},React[_0x5cd2(0x25)](Text,{'style':styles[_0x5cd2(0x3e)]},_0x48a1bf[_0x5cd2(0x2c)]),React['createElement'](Text,{'style':styles[_0x5cd2(0x3f)]},_0x16643a?_0x5cd2(0x2d)+_0x16b485:_0x48a1bf['description']))),React[_0x5cd2(0x25)](TouchableOpacity,{'style':[styles[_0x5cd2(0x2e)],_0x16643a?styles['disconnectButton']:styles[_0x5cd2(0x2f)]],'onPress':()=>_0x16643a?_0x4ce60a(_0x584791):_0x51e401(_0x584791),'disabled':_0x2df8c7},_0x2df8c7?React[_0x5cd2(0x25)](ActivityIndicator,{'size':_0xcf589d['rpJUz'],'color':_0xcf589d[_0x5cd2(0x1e)]}):React[_0x5cd2(0x25)](Text,{'style':styles[_0x5cd2(0x40)]},_0x16643a?_0xcf589d[_0x5cd2(0x41)]:_0xcf589d[_0x5cd2(0x1f)])));})),React[_0x5cd2(0x25)](View,{'style':styles[_0x5cd2(0x42)]},React[_0x5cd2(0x25)](Text,{'style':styles['connectionStatus']},_0xcf589d['XUOFe'](_0x36f4cf),_0x5cd2(0x43),Object[_0x5cd2(0x38)](PLATFORMS)[_0x5cd2(0x33)],'\x20platforms\x20connected'),React[_0x5cd2(0x25)](TouchableOpacity,{'style':[styles[_0x5cd2(0x44)],_0x5dcc56?styles[_0x5cd2(0x45)]:styles[_0x5cd2(0x46)]],'onPress':_0x85d1c3,'disabled':!_0x5dcc56},React['createElement'](Text,{'style':[styles['proceedText'],_0x5dcc56?styles[_0x5cd2(0x47)]:styles[_0x5cd2(0x48)]]},_0x5cd2(0x49)),React[_0x5cd2(0x25)](_0xafb2ea,{'name':_0xcf589d[_0x5cd2(0x4a)],'size':0x14,'color':_0x5dcc56?_0xcf589d[_0x5cd2(0x1e)]:_0xcf589d[_0x5cd2(0x4b)]}))),_0x13aefc&&React['createElement'](OAuthWebView,{'url':'https://oauth.example.com/'+_0x13aefc,'platform':_0x13aefc,'onComplete':_0x3e2170,'onClose':_0x156908,'onSuccess':_0x256871=>{if(_0xcf589d[_0x5cd2(0x1a)]('TGslA',_0xcf589d[_0x5cd2(0x4c)]))console[_0x5cd2(0x18)](_0x5cd2(0x4d)+_0x13aefc+':\x20'+_0x256871),_0xcf589d['sgGYa'](_0x3e2170);else{const _0x39e674=_0x8cbdcc;return _0x78a6ac[_0x39e674]?!![]:![];}}}));};const styles=StyleSheet[_0x5cd2(0x4e)]({'container':{'flex':0x1,'padding':0x10},'title':{'fontSize':0x18,'fontWeight':_0x5cd2(0x4f),'marginBottom':0x8,'color':_0x5cd2(0x50)},'subtitle':{'fontSize':0x10,'color':'#666','marginBottom':0x18},'platformList':{'flex':0x1},'platformItem':{'flexDirection':_0x5cd2(0x51),'alignItems':'center','marginBottom':0x10,'padding':0xc,'backgroundColor':'#f8f8f8','borderRadius':0xc,'borderWidth':0x1,'borderColor':_0x5cd2(0x52)},'platformInfo':{'flex':0x1,'flexDirection':_0x5cd2(0x51),'alignItems':_0x5cd2(0x53)},'platformIcon':{'width':0x28,'height':0x28,'borderRadius':0x14,'justifyContent':_0x5cd2(0x53),'alignItems':'center','marginRight':0xc},'platformText':{'flex':0x1},'platformName':{'fontSize':0x10,'fontWeight':_0x5cd2(0x54),'marginBottom':0x4,'color':_0x5cd2(0x50)},'platformDescription':{'fontSize':0xe,'color':_0x5cd2(0x55)},'platformButton':{'paddingHorizontal':0x10,'paddingVertical':0x8,'borderRadius':0x14,'justifyContent':_0x5cd2(0x53),'alignItems':_0x5cd2(0x53),'minWidth':0x64},'connectButton':{'backgroundColor':COLORS['primary']},'disconnectButton':{'backgroundColor':_0x5cd2(0x56)},'buttonText':{'color':_0x5cd2(0xc),'fontWeight':_0x5cd2(0x54)},'footer':{'flexDirection':_0x5cd2(0x51),'alignItems':_0x5cd2(0x53),'justifyContent':_0x5cd2(0x57),'paddingTop':0x10,'borderTopWidth':0x1,'borderTopColor':_0x5cd2(0x52),'marginTop':0x10},'connectionStatus':{'fontSize':0xe,'color':_0x5cd2(0x55)},'proceedButton':{'flexDirection':_0x5cd2(0x51),'alignItems':_0x5cd2(0x53),'paddingHorizontal':0x10,'paddingVertical':0xa,'borderRadius':0x18},'proceedActive':{'backgroundColor':COLORS[_0x5cd2(0x58)]},'proceedInactive':{'backgroundColor':'#eee'},'proceedText':{'fontWeight':'600','marginRight':0x8},'proceedTextActive':{'color':_0x5cd2(0xc)},'proceedTextInactive':{'color':_0x5cd2(0x15)}});
1
+ import React, { useState } from 'react';
2
+ import { View, Text, StyleSheet, TouchableOpacity, ActivityIndicator, ScrollView } from 'react-native';
3
+ import Icon from 'react-native-vector-icons/MaterialIcons';
4
+ import { COLORS } from '../../constants';
5
+ import { OAuthWebView } from './OAuthWebView';
6
+ // Platform definitions
7
+ const PLATFORMS = {
8
+ instagram: {
9
+ name: 'Instagram',
10
+ icon: 'photo-camera',
11
+ color: '#E1306C',
12
+ description: 'Connect to share and analyze your Instagram content'
13
+ },
14
+ youtube: {
15
+ name: 'YouTube',
16
+ icon: 'smart-display',
17
+ color: '#FF0000',
18
+ description: 'Connect for YouTube video recommendations and analysis'
19
+ },
20
+ pinterest: {
21
+ name: 'Pinterest',
22
+ icon: 'push-pin',
23
+ color: '#E60023',
24
+ description: 'Connect to enhance Pinterest board recommendations'
25
+ },
26
+ reddit: {
27
+ name: 'Reddit',
28
+ icon: 'forum',
29
+ color: '#FF4500',
30
+ description: 'Connect to personalize Reddit content insights'
31
+ }
32
+ };
33
+ export const PlatformConnector = ({
34
+ connections,
35
+ onConnect,
36
+ onDisconnect,
37
+ isLoading,
38
+ canProceed,
39
+ onProceed
40
+ }) => {
41
+ const [activeWebview, setActiveWebview] = useState(null);
42
+ const handleConnectPress = async platform => {
43
+ setActiveWebview(platform);
44
+ };
45
+ const handleWebViewComplete = () => {
46
+ setActiveWebview(null);
47
+ };
48
+ const handleWebViewClose = () => {
49
+ setActiveWebview(null);
50
+ };
51
+ const handleDisconnectPress = async platform => {
52
+ await onDisconnect(platform);
53
+ };
54
+ const getPlatformStatus = platform => {
55
+ const platformKey = platform;
56
+ return connections[platformKey] ? true : false;
57
+ };
58
+ const getConnectedCount = () => {
59
+ return Object.values(connections).filter(Boolean).length;
60
+ };
61
+ return /*#__PURE__*/React.createElement(View, {
62
+ style: styles.container
63
+ }, /*#__PURE__*/React.createElement(Text, {
64
+ style: styles.title
65
+ }, "Connect Your Platforms"), /*#__PURE__*/React.createElement(Text, {
66
+ style: styles.subtitle
67
+ }, "Connect at least 2 platforms to create your Onairos account"), /*#__PURE__*/React.createElement(ScrollView, {
68
+ style: styles.platformList
69
+ }, Object.keys(PLATFORMS).map(platform => {
70
+ var _connections;
71
+ const platformInfo = PLATFORMS[platform];
72
+ const isConnected = getPlatformStatus(platform);
73
+ const userName = isConnected ? (_connections = connections[platform]) === null || _connections === void 0 ? void 0 : _connections.userName : null;
74
+ return /*#__PURE__*/React.createElement(View, {
75
+ key: platform,
76
+ style: styles.platformItem
77
+ }, /*#__PURE__*/React.createElement(View, {
78
+ style: styles.platformInfo
79
+ }, /*#__PURE__*/React.createElement(View, {
80
+ style: [styles.platformIcon, {
81
+ backgroundColor: platformInfo.color
82
+ }]
83
+ }, /*#__PURE__*/React.createElement(Icon, {
84
+ name: platformInfo.icon,
85
+ size: 24,
86
+ color: "#fff"
87
+ })), /*#__PURE__*/React.createElement(View, {
88
+ style: styles.platformText
89
+ }, /*#__PURE__*/React.createElement(Text, {
90
+ style: styles.platformName
91
+ }, platformInfo.name), /*#__PURE__*/React.createElement(Text, {
92
+ style: styles.platformDescription
93
+ }, isConnected ? `Connected as ${userName}` : platformInfo.description))), /*#__PURE__*/React.createElement(TouchableOpacity, {
94
+ style: [styles.platformButton, isConnected ? styles.disconnectButton : styles.connectButton],
95
+ onPress: () => isConnected ? handleDisconnectPress(platform) : handleConnectPress(platform),
96
+ disabled: isLoading
97
+ }, isLoading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
98
+ size: "small",
99
+ color: "#fff"
100
+ }) : /*#__PURE__*/React.createElement(Text, {
101
+ style: styles.buttonText
102
+ }, isConnected ? 'Disconnect' : 'Connect')));
103
+ })), /*#__PURE__*/React.createElement(View, {
104
+ style: styles.footer
105
+ }, /*#__PURE__*/React.createElement(Text, {
106
+ style: styles.connectionStatus
107
+ }, getConnectedCount(), " of ", Object.keys(PLATFORMS).length, " platforms connected"), /*#__PURE__*/React.createElement(TouchableOpacity, {
108
+ style: [styles.proceedButton, canProceed ? styles.proceedActive : styles.proceedInactive],
109
+ onPress: onProceed,
110
+ disabled: !canProceed
111
+ }, /*#__PURE__*/React.createElement(Text, {
112
+ style: [styles.proceedText, canProceed ? styles.proceedTextActive : styles.proceedTextInactive]
113
+ }, "Continue"), /*#__PURE__*/React.createElement(Icon, {
114
+ name: "arrow-forward",
115
+ size: 20,
116
+ color: canProceed ? '#fff' : '#999'
117
+ }))), activeWebview && /*#__PURE__*/React.createElement(OAuthWebView, {
118
+ url: `https://oauth.example.com/${activeWebview}` // This would be replaced with actual OAuth URL
119
+ ,
120
+ platform: activeWebview,
121
+ onComplete: handleWebViewComplete,
122
+ onClose: handleWebViewClose,
123
+ onSuccess: code => {
124
+ console.log(`Received authorization code for ${activeWebview}: ${code}`);
125
+ // In a real implementation, we'd pass this code to our API service
126
+ handleWebViewComplete();
127
+ }
128
+ }));
129
+ };
130
+ const styles = StyleSheet.create({
131
+ container: {
132
+ flex: 1,
133
+ padding: 16
134
+ },
135
+ title: {
136
+ fontSize: 24,
137
+ fontWeight: 'bold',
138
+ marginBottom: 8,
139
+ color: '#000'
140
+ },
141
+ subtitle: {
142
+ fontSize: 16,
143
+ color: '#666',
144
+ marginBottom: 24
145
+ },
146
+ platformList: {
147
+ flex: 1
148
+ },
149
+ platformItem: {
150
+ flexDirection: 'row',
151
+ alignItems: 'center',
152
+ marginBottom: 16,
153
+ padding: 12,
154
+ backgroundColor: '#f8f8f8',
155
+ borderRadius: 12,
156
+ borderWidth: 1,
157
+ borderColor: '#eee'
158
+ },
159
+ platformInfo: {
160
+ flex: 1,
161
+ flexDirection: 'row',
162
+ alignItems: 'center'
163
+ },
164
+ platformIcon: {
165
+ width: 40,
166
+ height: 40,
167
+ borderRadius: 20,
168
+ justifyContent: 'center',
169
+ alignItems: 'center',
170
+ marginRight: 12
171
+ },
172
+ platformText: {
173
+ flex: 1
174
+ },
175
+ platformName: {
176
+ fontSize: 16,
177
+ fontWeight: '600',
178
+ marginBottom: 4,
179
+ color: '#000'
180
+ },
181
+ platformDescription: {
182
+ fontSize: 14,
183
+ color: '#666'
184
+ },
185
+ platformButton: {
186
+ paddingHorizontal: 16,
187
+ paddingVertical: 8,
188
+ borderRadius: 20,
189
+ justifyContent: 'center',
190
+ alignItems: 'center',
191
+ minWidth: 100
192
+ },
193
+ connectButton: {
194
+ backgroundColor: COLORS.primary
195
+ },
196
+ disconnectButton: {
197
+ backgroundColor: '#f44336'
198
+ },
199
+ buttonText: {
200
+ color: '#fff',
201
+ fontWeight: '600'
202
+ },
203
+ footer: {
204
+ flexDirection: 'row',
205
+ alignItems: 'center',
206
+ justifyContent: 'space-between',
207
+ paddingTop: 16,
208
+ borderTopWidth: 1,
209
+ borderTopColor: '#eee',
210
+ marginTop: 16
211
+ },
212
+ connectionStatus: {
213
+ fontSize: 14,
214
+ color: '#666'
215
+ },
216
+ proceedButton: {
217
+ flexDirection: 'row',
218
+ alignItems: 'center',
219
+ paddingHorizontal: 16,
220
+ paddingVertical: 10,
221
+ borderRadius: 24
222
+ },
223
+ proceedActive: {
224
+ backgroundColor: COLORS.primary
225
+ },
226
+ proceedInactive: {
227
+ backgroundColor: '#eee'
228
+ },
229
+ proceedText: {
230
+ fontWeight: '600',
231
+ marginRight: 8
232
+ },
233
+ proceedTextActive: {
234
+ color: '#fff'
235
+ },
236
+ proceedTextInactive: {
237
+ color: '#999'
238
+ }
239
+ });
240
+ //# sourceMappingURL=PlatformConnector.js.map