@onairos/react-native 3.7.1 → 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 (241) hide show
  1. package/lib/commonjs/api/index.js +219 -9
  2. package/lib/commonjs/assets/icons/spotify.png +0 -0
  3. package/lib/commonjs/assets/images/spotify.png +0 -0
  4. package/lib/commonjs/components/BodyText.js +27 -9
  5. package/lib/commonjs/components/BrandMark.js +111 -10
  6. package/lib/commonjs/components/CodeInput.js +116 -9
  7. package/lib/commonjs/components/EmailInput.js +30 -8
  8. package/lib/commonjs/components/GoogleButton.js +56 -9
  9. package/lib/commonjs/components/HeadingGroup.js +43 -9
  10. package/lib/commonjs/components/LLMDataInputModal.js +664 -14
  11. package/lib/commonjs/components/ModalHeader.js +99 -9
  12. package/lib/commonjs/components/ModalSheet.js +47 -9
  13. package/lib/commonjs/components/Onairos.js +380 -14
  14. package/lib/commonjs/components/OnairosButton.js +313 -13
  15. package/lib/commonjs/components/OnairosSignInButton.js +130 -12
  16. package/lib/commonjs/components/Overlay.js +465 -13
  17. package/lib/commonjs/components/PersonaImage.js +137 -10
  18. package/lib/commonjs/components/PersonaLoadingScreen.js +318 -12
  19. package/lib/commonjs/components/PersonalizationConsentScreen.js +467 -13
  20. package/lib/commonjs/components/PinCreationScreen.js +403 -12
  21. package/lib/commonjs/components/PinInput.js +464 -9
  22. package/lib/commonjs/components/PlatformConnectorsStep.js +1311 -23
  23. package/lib/commonjs/components/PlatformList.js +137 -10
  24. package/lib/commonjs/components/PlatformToggle.js +180 -9
  25. package/lib/commonjs/components/PrimaryButton.js +180 -10
  26. package/lib/commonjs/components/SignInMatchAnimation.js +197 -9
  27. package/lib/commonjs/components/SignInStep.js +345 -12
  28. package/lib/commonjs/components/UniversalOnboarding.js +2780 -30
  29. package/lib/commonjs/components/VerificationStep.js +176 -11
  30. package/lib/commonjs/components/WelcomeScreen.js +461 -22
  31. package/lib/commonjs/components/icons/Basicproficon.js +37 -8
  32. package/lib/commonjs/components/icons/Basicprofile.js +21 -8
  33. package/lib/commonjs/components/icons/Checkbox.js +21 -8
  34. package/lib/commonjs/components/icons/Checkmark.js +27 -8
  35. package/lib/commonjs/components/icons/Contentanalysis.js +21 -8
  36. package/lib/commonjs/components/icons/Contenticon.js +39 -8
  37. package/lib/commonjs/components/icons/EnochE.js +41 -8
  38. package/lib/commonjs/components/icons/Personalityicon.js +30 -8
  39. package/lib/commonjs/components/icons/Personalityprofile.js +21 -8
  40. package/lib/commonjs/components/icons/Personalitytraits.js +21 -8
  41. package/lib/commonjs/components/icons/Userpreferences.js +21 -8
  42. package/lib/commonjs/components/icons/index.js +84 -17
  43. package/lib/commonjs/components/onboarding/OAuthWebView.js +1754 -18
  44. package/lib/commonjs/components/onboarding/OnboardingHeader.js +74 -10
  45. package/lib/commonjs/components/onboarding/PinInput.js +283 -10
  46. package/lib/commonjs/components/onboarding/PlatformConnector.js +249 -11
  47. package/lib/commonjs/config/PLATFORM_APIS.md +849 -0
  48. package/lib/commonjs/config/api.js +56 -7
  49. package/lib/commonjs/constants/index.js +120 -7
  50. package/lib/commonjs/context/AuthContext.js +345 -10
  51. package/lib/commonjs/hooks/useConnectedAccounts.js +111 -9
  52. package/lib/commonjs/hooks/useConnections.js +102 -8
  53. package/lib/commonjs/hooks/useCredentials.js +178 -10
  54. package/lib/commonjs/hooks/useUserConnections.js +148 -10
  55. package/lib/commonjs/index.js +439 -34
  56. package/lib/commonjs/services/apiClient.js +298 -8
  57. package/lib/commonjs/services/biometricPinService.js +180 -8
  58. package/lib/commonjs/services/chatGPTConversationExtractor.js +155 -8
  59. package/lib/commonjs/services/chatGPTConversationService.js +275 -9
  60. package/lib/commonjs/services/claudeConversationExtractor.js +103 -8
  61. package/lib/commonjs/services/claudeConversationService.js +158 -9
  62. package/lib/commonjs/services/connectedAccountsService.js +310 -10
  63. package/lib/commonjs/services/googleAuthService.js +252 -11
  64. package/lib/commonjs/services/hingeDataExtractor.js +105 -8
  65. package/lib/commonjs/services/hingeDataService.js +150 -9
  66. package/lib/commonjs/services/imageCompressionService.js +260 -7
  67. package/lib/commonjs/services/instagramDataExtractor.js +126 -8
  68. package/lib/commonjs/services/instagramDataService.js +163 -9
  69. package/lib/commonjs/services/jwtStorageService.js +276 -7
  70. package/lib/commonjs/services/linkedinDOMExtractor.js +245 -7
  71. package/lib/commonjs/services/linkedinProfileService.js +222 -9
  72. package/lib/commonjs/services/linkedinScrapingService.js +230 -8
  73. package/lib/commonjs/services/llmDataStorage.js +294 -8
  74. package/lib/commonjs/services/mobileTrainingService.js +186 -8
  75. package/lib/commonjs/services/netflixDataExtractor.js +120 -8
  76. package/lib/commonjs/services/netflixDataService.js +198 -9
  77. package/lib/commonjs/services/pinEncryptionService.js +84 -8
  78. package/lib/commonjs/services/pinStorageUtils.js +105 -7
  79. package/lib/commonjs/services/platformAuthService.js +1484 -12
  80. package/lib/commonjs/services/sephoraDataExtractor.js +140 -8
  81. package/lib/commonjs/services/sephoraDataService.js +200 -9
  82. package/lib/commonjs/services/spotifyDataExtractor.js +148 -8
  83. package/lib/commonjs/services/spotifyDataService.js +241 -9
  84. package/lib/commonjs/services/storageService.js +404 -8
  85. package/lib/commonjs/services/telegramDataExtractor.js +115 -8
  86. package/lib/commonjs/services/telegramDataService.js +499 -9
  87. package/lib/commonjs/services/trainingApiHelpers.js +73 -7
  88. package/lib/commonjs/services/userConnectionsService.js +340 -10
  89. package/lib/commonjs/services/youtubeMigrationService.js +416 -10
  90. package/lib/commonjs/theme/index.js +250 -7
  91. package/lib/commonjs/types/ambient.d.js +2 -1
  92. package/lib/commonjs/types/declarations.d.js +2 -1
  93. package/lib/commonjs/types/index.js +6 -1
  94. package/lib/commonjs/types/node-fix.d.js +2 -1
  95. package/lib/commonjs/types/node-override.d.js +2 -1
  96. package/lib/commonjs/types/opacity.d.js +2 -1
  97. package/lib/commonjs/types.js +14 -1
  98. package/lib/commonjs/utils/Portal.js +98 -8
  99. package/lib/commonjs/utils/api.js +130 -9
  100. package/lib/commonjs/utils/assetRegistry.js +210 -35
  101. package/lib/commonjs/utils/auth.js +112 -9
  102. package/lib/commonjs/utils/connectorTests.js +613 -29
  103. package/lib/commonjs/utils/crypto.js +62 -8
  104. package/lib/commonjs/utils/debugHelper.js +64 -1
  105. package/lib/commonjs/utils/encryption.js +76 -7
  106. package/lib/commonjs/utils/eventUtils.js +288 -1
  107. package/lib/commonjs/utils/haptics.js +66 -9
  108. package/lib/commonjs/utils/imagePreloader.js +6 -1
  109. package/lib/commonjs/utils/networkDiagnostics.js +226 -8
  110. package/lib/commonjs/utils/onairosApi.js +350 -9
  111. package/lib/commonjs/utils/programmaticFlow.js +117 -9
  112. package/lib/commonjs/utils/retryHelper.js +220 -1
  113. package/lib/commonjs/utils/secureStorage.js +349 -10
  114. package/lib/commonjs/utils/webviewScripts/chatgpt.js +551 -1
  115. package/lib/commonjs/utils/webviewScripts/claude.js +376 -1
  116. package/lib/commonjs/utils/webviewScripts/hinge.js +411 -1
  117. package/lib/commonjs/utils/webviewScripts/index.js +698 -15
  118. package/lib/commonjs/utils/webviewScripts/instagram.js +454 -1
  119. package/lib/commonjs/utils/webviewScripts/linkedin.js +880 -1
  120. package/lib/commonjs/utils/webviewScripts/netflix.js +382 -1
  121. package/lib/commonjs/utils/webviewScripts/sephora.js +516 -1
  122. package/lib/commonjs/utils/webviewScripts/spotify.js +419 -1
  123. package/lib/commonjs/utils/webviewScripts/telegram.js +678 -1
  124. package/lib/module/api/index.js +211 -1
  125. package/lib/module/assets/icons/spotify.png +0 -0
  126. package/lib/module/assets/images/spotify.png +0 -0
  127. package/lib/module/components/BodyText.js +20 -1
  128. package/lib/module/components/BrandMark.js +104 -1
  129. package/lib/module/components/CodeInput.js +109 -1
  130. package/lib/module/components/EmailInput.js +23 -1
  131. package/lib/module/components/GoogleButton.js +49 -1
  132. package/lib/module/components/HeadingGroup.js +36 -1
  133. package/lib/module/components/LLMDataInputModal.js +656 -7
  134. package/lib/module/components/ModalHeader.js +92 -1
  135. package/lib/module/components/ModalSheet.js +39 -1
  136. package/lib/module/components/Onairos.js +373 -1
  137. package/lib/module/components/OnairosButton.js +305 -1
  138. package/lib/module/components/OnairosSignInButton.js +121 -1
  139. package/lib/module/components/Overlay.js +456 -1
  140. package/lib/module/components/PersonaImage.js +129 -1
  141. package/lib/module/components/PersonaLoadingScreen.js +310 -1
  142. package/lib/module/components/PersonalizationConsentScreen.js +460 -1
  143. package/lib/module/components/PinCreationScreen.js +396 -1
  144. package/lib/module/components/PinInput.js +456 -1
  145. package/lib/module/components/PlatformConnectorsStep.js +1302 -6
  146. package/lib/module/components/PlatformList.js +129 -1
  147. package/lib/module/components/PlatformToggle.js +173 -1
  148. package/lib/module/components/PrimaryButton.js +172 -1
  149. package/lib/module/components/SignInMatchAnimation.js +189 -1
  150. package/lib/module/components/SignInStep.js +338 -1
  151. package/lib/module/components/UniversalOnboarding.js +2770 -1
  152. package/lib/module/components/VerificationStep.js +168 -1
  153. package/lib/module/components/WelcomeScreen.js +453 -1
  154. package/lib/module/components/icons/Basicproficon.js +30 -1
  155. package/lib/module/components/icons/Basicprofile.js +14 -1
  156. package/lib/module/components/icons/Checkbox.js +14 -1
  157. package/lib/module/components/icons/Checkmark.js +20 -1
  158. package/lib/module/components/icons/Contentanalysis.js +14 -1
  159. package/lib/module/components/icons/Contenticon.js +32 -1
  160. package/lib/module/components/icons/EnochE.js +34 -1
  161. package/lib/module/components/icons/Personalityicon.js +23 -1
  162. package/lib/module/components/icons/Personalityprofile.js +14 -1
  163. package/lib/module/components/icons/Personalitytraits.js +14 -1
  164. package/lib/module/components/icons/Userpreferences.js +14 -1
  165. package/lib/module/components/icons/index.js +13 -1
  166. package/lib/module/components/onboarding/OAuthWebView.js +1746 -1
  167. package/lib/module/components/onboarding/OnboardingHeader.js +66 -1
  168. package/lib/module/components/onboarding/PinInput.js +274 -1
  169. package/lib/module/components/onboarding/PlatformConnector.js +240 -1
  170. package/lib/module/config/PLATFORM_APIS.md +849 -0
  171. package/lib/module/config/api.js +47 -1
  172. package/lib/module/constants/index.js +114 -1
  173. package/lib/module/context/AuthContext.js +335 -1
  174. package/lib/module/hooks/useConnectedAccounts.js +106 -1
  175. package/lib/module/hooks/useConnections.js +95 -1
  176. package/lib/module/hooks/useCredentials.js +171 -6
  177. package/lib/module/hooks/useUserConnections.js +140 -1
  178. package/lib/module/index.js +172 -1
  179. package/lib/module/services/apiClient.js +295 -1
  180. package/lib/module/services/biometricPinService.js +169 -1
  181. package/lib/module/services/chatGPTConversationExtractor.js +149 -1
  182. package/lib/module/services/chatGPTConversationService.js +268 -1
  183. package/lib/module/services/claudeConversationExtractor.js +97 -1
  184. package/lib/module/services/claudeConversationService.js +151 -1
  185. package/lib/module/services/connectedAccountsService.js +293 -1
  186. package/lib/module/services/googleAuthService.js +241 -1
  187. package/lib/module/services/hingeDataExtractor.js +99 -1
  188. package/lib/module/services/hingeDataService.js +143 -1
  189. package/lib/module/services/imageCompressionService.js +250 -1
  190. package/lib/module/services/instagramDataExtractor.js +120 -1
  191. package/lib/module/services/instagramDataService.js +156 -1
  192. package/lib/module/services/jwtStorageService.js +257 -1
  193. package/lib/module/services/linkedinDOMExtractor.js +234 -1
  194. package/lib/module/services/linkedinProfileService.js +210 -1
  195. package/lib/module/services/linkedinScrapingService.js +219 -1
  196. package/lib/module/services/llmDataStorage.js +277 -1
  197. package/lib/module/services/mobileTrainingService.js +173 -1
  198. package/lib/module/services/netflixDataExtractor.js +114 -1
  199. package/lib/module/services/netflixDataService.js +191 -1
  200. package/lib/module/services/pinEncryptionService.js +74 -6
  201. package/lib/module/services/pinStorageUtils.js +93 -1
  202. package/lib/module/services/platformAuthService.js +1461 -1
  203. package/lib/module/services/sephoraDataExtractor.js +134 -1
  204. package/lib/module/services/sephoraDataService.js +193 -1
  205. package/lib/module/services/spotifyDataExtractor.js +142 -1
  206. package/lib/module/services/spotifyDataService.js +234 -1
  207. package/lib/module/services/storageService.js +383 -1
  208. package/lib/module/services/telegramDataExtractor.js +109 -1
  209. package/lib/module/services/telegramDataService.js +493 -1
  210. package/lib/module/services/trainingApiHelpers.js +67 -1
  211. package/lib/module/services/userConnectionsService.js +329 -1
  212. package/lib/module/services/youtubeMigrationService.js +405 -1
  213. package/lib/module/theme/index.js +245 -1
  214. package/lib/module/types.js +10 -1
  215. package/lib/module/utils/Portal.js +90 -1
  216. package/lib/module/utils/api.js +118 -1
  217. package/lib/module/utils/assetRegistry.js +200 -34
  218. package/lib/module/utils/auth.js +100 -1
  219. package/lib/module/utils/connectorTests.js +600 -27
  220. package/lib/module/utils/crypto.js +54 -1
  221. package/lib/module/utils/debugHelper.js +54 -1
  222. package/lib/module/utils/encryption.js +67 -1
  223. package/lib/module/utils/eventUtils.js +270 -1
  224. package/lib/module/utils/haptics.js +59 -8
  225. package/lib/module/utils/imagePreloader.js +3 -1
  226. package/lib/module/utils/networkDiagnostics.js +217 -1
  227. package/lib/module/utils/onairosApi.js +333 -1
  228. package/lib/module/utils/programmaticFlow.js +111 -1
  229. package/lib/module/utils/retryHelper.js +211 -1
  230. package/lib/module/utils/secureStorage.js +330 -6
  231. package/lib/module/utils/webviewScripts/chatgpt.js +545 -1
  232. package/lib/module/utils/webviewScripts/claude.js +370 -1
  233. package/lib/module/utils/webviewScripts/hinge.js +405 -1
  234. package/lib/module/utils/webviewScripts/index.js +434 -1
  235. package/lib/module/utils/webviewScripts/instagram.js +448 -1
  236. package/lib/module/utils/webviewScripts/linkedin.js +874 -1
  237. package/lib/module/utils/webviewScripts/netflix.js +376 -1
  238. package/lib/module/utils/webviewScripts/sephora.js +510 -1
  239. package/lib/module/utils/webviewScripts/spotify.js +413 -1
  240. package/lib/module/utils/webviewScripts/telegram.js +672 -1
  241. package/package.json +2 -2
@@ -1,8 +1,657 @@
1
+ /**
2
+ * LLMDataInputModal.tsx
3
+ *
4
+ * Modal for inputting LLM conversation data via file upload or paste.
5
+ * Supports ChatGPT, Claude, Gemini, and Grok data formats.
6
+ */
1
7
 
2
- // Onairos SDK - Asset Registry (auto-generated)
3
- var __ONAIROS_REQ_REGISTRY__ = [
4
- require('react-native-document-picker'),
5
- require('react-native-fs')
6
- ];
7
- function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
8
- import React,{useState}from'react';function _0x2c16(){const _0x458b35=['log','Connect\x20ChatGPT','Export\x20your\x20ChatGPT\x20conversations\x20from\x20Settings\x20→\x20Data\x20Controls\x20→\x20Export\x20data.\x20Then\x20upload\x20the\x20JSON\x20file\x20or\x20paste\x20your\x20conversation\x20data.','Paste\x20your\x20ChatGPT\x20conversation\x20JSON\x20here...','Connect\x20Claude','Export\x20your\x20Claude\x20conversations\x20and\x20paste\x20the\x20JSON\x20data\x20below,\x20or\x20upload\x20your\x20exported\x20file.','Paste\x20your\x20Claude\x20conversation\x20JSON\x20here...','gemini','Paste\x20your\x20Gemini\x20conversation\x20JSON\x20here...','grok','Export\x20your\x20Grok\x20conversations\x20from\x20X/Twitter\x20and\x20paste\x20the\x20data\x20below.','Paste\x20your\x20Grok\x20conversation\x20JSON\x20here...','Imported\x20Conversation','itopz','zTAyS','RKWLZ','DeayN','POZiv','Error\x20parsing\x20conversation\x20data:','Invalid\x20JSON\x20format.\x20Please\x20check\x20your\x20data\x20and\x20try\x20again.','string','qfFfU','MVJvq','jgEuv','pnSYx','jUpJX','human','File\x20upload\x20requires\x20additional\x20dependencies.\x20Please\x20paste\x20data\x20instead.','LHmES','cXiWm','zTXIt','Selected\x20file','utf8','DOCUMENT_PICKER_CANCELED','File\x20pick\x20error:','onairos_jwt_token','enoch_token','auth_token','kMTos','ceRzo','conversation','mobile_app_import','IqaGJ','ArsGS','Failed\x20to\x20import\x20any\x20conversations.\x20Please\x20check\x20your\x20data\x20format.','Submit\x20error:','Failed\x20to\x20import\x20data.\x20Please\x20try\x20again.','CDCJy','sKdMN','OfLYq','nODcA','slide','padding','height','Cancel','handled','Paste\x20Data','Upload\x20File\x20','top','none','Tap\x20to\x20select\x20a\x20file','...','#FFFFFF','small','Import\x20Conversations','xegMq','yVBXQ','GKRYO','chatgpt','AoHdH','exael','kaBvX','claude','KQiEY','RAiNn','SvIfx','UdeaF','Connect\x20Gemini','iKHRJ','LGOxx','Connect\x20Grok','eZpSA','Connect\x20','Paste\x20your\x20conversation\x20data\x20below\x20or\x20upload\x20a\x20JSON\x20file.','RREDB','cknmg','bCzxH','VSDhA','AoTdB','jTMSk','XuiOq','push','now','title','create_time','update_time','PnAjy','IVnnd','OxLPX','msg_','GDZTh','message','toISOString','parse','isArray','yWsCz','forEach','rmyEO','UGuPv','length','NpFPo','uNNby','conversation_id','conv_','name','Conversation\x20','MTJPc','created_at','updated_at','GxBjp','BUTTON_PRESS','conversations','XRwDT','IYusY','aovbZ','bWCGG','rerMo','mapping','messages','Saacp','cXVIN','biaIS','FlUuT','oVBQm','aqjbc','sUtHI','ZSaWH','error','fspNa','etKbi','pygvt','kfYcN','LyfMn','MQipy','meMHf','values','qQujq','DviZq','hqdIh','content','parts','trim','author','role','jteMM','pVhrD','xMhzL','atPHX','ERROR','eKpWK','TmhPb','text','oqgTX','xifcD','SkaQE','timestamp','VbotB','tqMSR','uBBUw','user','join','AarzG','PjMta','QPIgz','HhHkR','JsixV','chat_messages','ylids','tHReB','VPOMf','TPIoL','Arokf','UqCmB','FWKDX','cPOrn','LjCjp','QpHOH','assistant','gogtr','VbMdr','AKlDF','mXCnf','UgKgR','UYFcz','iegTQ','Itjmo','mHPuY','qPePV','Otzbh','kKAVv','HxyHI','plainText','allFiles','bqGtN','startsWith','content://','readFile','uri','AviUm','DSmay','SUCCESS','code','LwyRQ','kYMMc','riFeZ','Failed\x20to\x20read\x20file.\x20Please\x20try\x20again\x20or\x20paste\x20data\x20manually.','hKYvT','LfXbm','VAnhF','file','ERWhV','RXEeA','CqFGf','getItem','tSrnA','TUqPe','ZgBDg','Authentication\x20required.\x20Please\x20sign\x20in\x20first.','mobile-','tTgtB','XrfQm','yFWjC','GUbVV','BASE_URL','/llm-data/store','Bearer\x20','stringify','context','ybfat','Version','qmlpA','tEoZe','NYKjp','hUyUr','PxKGc','mjcGB','Failed\x20to\x20store\x20conversation\x20','QqKCJ','pgnvi','ypqHW','bRQzv','UrlOf','IykkV','Error\x20storing\x20conversation:','DHfyg','setItem','@onairos:llm_connected:','alert','Success!\x20🎉','Successfully\x20imported\x20','\x20conversation','mVGtq','Yxpxi','JHgGe','ubzoN','owUUy','KMVDn','UnFwl','OXsis','aAyXY','Aagso','HANyK','iVSwS','pageSheet','container','ios','CqYxH','tStZI','header','closeButton','createElement','closeButtonText','pOtlm','headerTitle','instructionsContainer','instructionsText','tabContainer','tab','VvsfL','tabActive','KmwUF','zprAF','paste','opTzk','zzwfR','jIjyF','kEUNN','CUrKt','tabText','tabTextActive','XUElf','tabDisabled','itlbG','KncnA','cdYxV','jcZum','tabTextDisabled','dhqtC','(N/A)','grey400','eAuyC','zefsm','fileInputContainer','filePickButton','filePickIcon','filePickText','Pbaah','fileSelectedContainer','fileSelectedText','dcCOK','MClCb','kYoqG','qlCBZ','previewInfo','toLocaleString','wjrQk','footer','DalVn','xRcMD','aTpYo','create','surface','center','#E5E7EB','600','IBM\x20Plex\x20Sans','#3B82F6','Inter','#F0F9FF','#0369A1','row','#F3F4F6','500','grey500','grey300','Menlo','monospace','grey800','grey600','#166534','#DC2626','#10B981'];_0x2c16=function(){return _0x458b35;};return _0x2c16();}import{View,Text,StyleSheet,Modal,TouchableOpacity,TextInput,ScrollView,ActivityIndicator,Alert,Platform,KeyboardAvoidingView}from'react-native';import{COLORS}from'../theme';import{triggerHaptic,HapticType}from'../utils/haptics';import AsyncStorage from'@react-native-async-storage/async-storage';import{API_CONFIG}from'../config/api';let DocumentPicker=null,RNFS=null;function _0xc180(_0x2c1637,_0xc18042){_0x2c1637=_0x2c1637-0x0;const _0x42cfa6=_0x2c16();let _0x4387e0=_0x42cfa6[_0x2c1637];return _0x4387e0;}try{DocumentPicker=__ONAIROS_REQ_FUNC__(0x0);}catch(_0x391379){console[_0xc180(0x0)]('react-native-document-picker not available - file upload disabled');}try{RNFS=__ONAIROS_REQ_FUNC__(0x1);}catch(_0x2d8718){console[_0xc180(0x0)]('react-native-fs not available - file upload disabled');}const FILE_UPLOAD_AVAILABLE=DocumentPicker!==null&&RNFS!==null,LLMDataInputModal=({visible:_0x1fb98c,platform:_0x38c206,platformName:_0x2f4670,onClose:_0x5495e1,onSuccess:_0x23b083})=>{const _0x2b4f3d={'AoHdH':_0xc180(0x1),'exael':_0xc180(0x2),'kaBvX':_0xc180(0x3),'KQiEY':_0xc180(0x4),'RAiNn':_0xc180(0x5),'SvIfx':_0xc180(0x6),'UdeaF':_0xc180(0x7),'iKHRJ':'Export\x20your\x20Gemini\x20(Google\x20AI)\x20conversations\x20and\x20paste\x20the\x20data\x20below.','LGOxx':_0xc180(0x8),'DhHDl':_0xc180(0x9),'AshpU':_0xc180(0xa),'eZpSA':_0xc180(0xb),'RREDB':'Paste\x20your\x20conversation\x20JSON\x20here...','aqjbc':_0xc180(0xc),'GDZTh':function(_0x56fc66,_0x49a171){return _0x56fc66===_0x49a171;},'jTMSk':function(_0x48c8a0,_0x38c401){return _0x48c8a0===_0x38c401;},'pygvt':'unknown','bCzxH':function(_0x283c8c,_0x1b3c56){return _0x283c8c(_0x1b3c56);},'rerMo':function(_0x4bcca1,_0x63a5db){return _0x4bcca1+_0x63a5db;},'jcZum':function(_0x12ded2,_0x93ee13){return _0x12ded2===_0x93ee13;},'WJYsx':_0xc180(0xd),'VSDhA':function(_0x1e8e8a,_0x221586){return _0x1e8e8a+_0x221586;},'AoTdB':'file','wucCd':_0xc180(0xe),'XuiOq':_0xc180(0xf),'PnAjy':function(_0x3205de,_0x9c82a5){return _0x3205de===_0x9c82a5;},'IVnnd':_0xc180(0x10),'OxLPX':'cYPrR','lkbmj':function(_0xf24463,_0x17d432){return _0xf24463===_0x17d432;},'yWsCz':_0xc180(0x11),'XRwDT':function(_0x23dc74,_0x33bd3e){return _0x23dc74===_0x33bd3e;},'IYusY':'otmer','Saacp':function(_0x20d00c,_0x597b34){return _0x20d00c(_0x597b34);},'vkSTy':function(_0x97d74,_0x18b472){return _0x97d74>_0x18b472;},'cXVIN':function(_0x495274,_0x4cdbe3){return _0x495274!==_0x4cdbe3;},'FlUuT':'biaIS','sUtHI':'NwHeO','Wncws':_0xc180(0x12),'fspNa':_0xc180(0x13),'TmhPb':'user','mXCnf':function(_0x53f335,_0x1835b7){return _0x53f335===_0x1835b7;},'oqgTX':_0xc180(0x14),'xifcD':_0xc180(0x15),'etKbi':function(_0x59b9bf,_0x2540e2){return _0x59b9bf!==_0x2540e2;},'VbotB':function(_0x3d9a43,_0x4b6cd4){return _0x3d9a43!==_0x4b6cd4;},'tqMSR':_0xc180(0x16),'AarzG':function(_0x3f1716,_0x35d76b){return _0x3f1716>_0x35d76b;},'PjMta':function(_0x1b8293,_0xa602af){return _0x1b8293+_0xa602af;},'VPOMf':function(_0x37d018,_0x4bd3fe){return _0x37d018(_0x4bd3fe);},'yVBXQ':'paste','TPIoL':function(_0x14f631,_0x3f1251){return _0x14f631===_0x3f1251;},'FGHLG':_0xc180(0x17),'tFFnZ':_0xc180(0x18),'Arokf':function(_0xa9ca98,_0x375ab5){return _0xa9ca98===_0x375ab5;},'UqCmB':_0xc180(0x19),'LjCjp':function(_0x46610b,_0xf94fa4){return _0x46610b===_0xf94fa4;},'QpHOH':_0xc180(0x1a),'uhgCH':'lbLAO','GKRYO':function(_0x157af6,_0x5c03f9){return _0x157af6(_0x5c03f9);},'kfYcN':_0xc180(0x1b),'LyfMn':function(_0xd59cb2,_0x592a22){return _0xd59cb2>_0x592a22;},'MQipy':function(_0xed5e44,_0x3a9b94){return _0xed5e44!==_0x3a9b94;},'RvuZX':_0xc180(0x1c),'meMHf':_0xc180(0x1d),'eKpWK':_0xc180(0x1e),'ylids':function(_0xb6316c,_0x144b60){return _0xb6316c===_0x144b60;},'tHReB':'NRrlh','VbMdr':function(_0xf1e1e6,_0x549fb9){return _0xf1e1e6!==_0x549fb9;},'AKlDF':function(_0x38bae2,_0xb4aeb2){return _0x38bae2!==_0xb4aeb2;},'UgKgR':function(_0x10b52a,_0x436cd7){return _0x10b52a===_0x436cd7;},'UYFcz':'txlBU','iegTQ':'Ikika','bqGtN':_0xc180(0x1f),'AviUm':_0xc180(0x20),'DSmay':function(_0x2c8227,_0x2547af){return _0x2c8227(_0x2547af);},'LwyRQ':_0xc180(0x21),'kYMMc':_0xc180(0x22),'riFeZ':function(_0x490e30,_0x35f365){return _0x490e30(_0x35f365);},'LClkY':function(_0x2574e9,_0x2dff88){return _0x2574e9!==_0x2dff88;},'aAyXY':function(_0x37f168,_0x2f47a3){return _0x37f168!==_0x2f47a3;},'hRavB':function(_0x83f9cf,_0xf2d05f){return _0x83f9cf!==_0xf2d05f;},'Aagso':function(_0x1a5681,_0xf5677){return _0x1a5681!==_0xf5677;},'HANyK':function(_0x54fb98,_0x445c18){return _0x54fb98===_0x445c18;},'hKYvT':function(_0x51424a,_0x2d1cb7){return _0x51424a!==_0x2d1cb7;},'LfXbm':'Authentication\x20required.\x20Please\x20sign\x20in\x20first.','VAnhF':function(_0x462028,_0x28dd76){return _0x462028+_0x28dd76;},'ERWhV':function(_0x54ab62,_0x3c94a0){return _0x54ab62(_0x3c94a0);},'RXEeA':function(_0x2faf6b,_0x5bd329){return _0x2faf6b(_0x5bd329);},'CqFGf':function(_0x25e65e,_0x3ce440){return _0x25e65e===_0x3ce440;},'gQySs':'No\x20valid\x20conversations\x20found\x20in\x20the\x20data.\x20Please\x20check\x20the\x20format.','tSrnA':_0xc180(0x23),'TUqPe':_0xc180(0x24),'ZgBDg':_0xc180(0x25),'eJSMz':_0xc180(0x26),'tTgtB':_0xc180(0x27),'XrfQm':function(_0x207107,_0x219264){return _0x207107===_0x219264;},'yFWjC':'zrHrV','GUbVV':function(_0x37ea7d,_0x5deffa,_0x50528e){return _0x37ea7d(_0x5deffa,_0x50528e);},'ybfat':'1.0.0','qmlpA':_0xc180(0x28),'tEoZe':_0xc180(0x29),'NYKjp':'tKUbr','hUyUr':'ZwsAQ','PxKGc':_0xc180(0x2a),'mjcGB':_0xc180(0x2b),'SUXvf':function(_0x4b153e,_0x515a96){return _0x4b153e>_0x515a96;},'mVGtq':function(_0xd19f2a,_0x53ad0b){return _0xd19f2a===_0x53ad0b;},'Yxpxi':'Slusa','JHgGe':_0xc180(0x2c),'owUUy':_0xc180(0x2d),'KMVDn':_0xc180(0x2e),'DKVrQ':'UnFwl','OXsis':function(_0x4b90f6,_0x5498f3){return _0x4b90f6(_0x5498f3);},'lJwqd':function(_0x4b6efb){return _0x4b6efb();},'zprAF':'KmwUF','oAVHJ':function(_0x587936,_0x56d210){return _0x587936(_0x56d210);},'opTzk':function(_0x1bb2d2,_0x158aeb){return _0x1bb2d2(_0x158aeb);},'VvsfL':function(_0x527211,_0x426858){return _0x527211===_0x426858;},'itlbG':_0xc180(0x2f),'KncnA':_0xc180(0x30),'xegMq':function(_0x4f2085,_0x2c0e16){return _0x4f2085(_0x2c0e16);},'cdYxV':function(_0x437b9d,_0x1d892e){return _0x437b9d!==_0x1d892e;},'WmoAl':_0xc180(0x31),'tsIuf':_0xc180(0x32),'AcJYQ':function(_0x4eb59e,_0x930b81){return _0x4eb59e(_0x930b81);},'cknmg':function(_0x372960){return _0x372960();},'iVSwS':_0xc180(0x33),'CqYxH':_0xc180(0x34),'tStZI':_0xc180(0x35),'pOtlm':_0xc180(0x36),'nOJJY':_0xc180(0x37),'XUElf':_0xc180(0x38),'dhqtC':_0xc180(0x39),'eAuyC':_0xc180(0x3a),'zefsm':_0xc180(0x3b),'Pbaah':_0xc180(0x3c),'dcCOK':function(_0x450eec,_0x386edd){return _0x450eec>_0x386edd;},'MClCb':'Data\x20Preview','kYoqG':function(_0x189138,_0xd21cc){return _0x189138>_0xd21cc;},'qlCBZ':_0xc180(0x3d),'wjrQk':'\x20characters','DalVn':_0xc180(0x3e),'xRcMD':_0xc180(0x3f),'aTpYo':_0xc180(0x40)},[_0x525471,_0x52916f]=_0x2b4f3d[_0xc180(0x41)](useState,_0x2b4f3d[_0xc180(0x42)]),[_0x209ff5,_0x2d0187]=useState(''),[_0x3816c5,_0x20a7ce]=useState(![]),[_0xbd9027,_0x5b96a2]=_0x2b4f3d['opTzk'](useState,null),[_0x31f9ba,_0x504097]=_0x2b4f3d['ERWhV'](useState,null),[_0x3713a8,_0x26743e]=_0x2b4f3d[_0xc180(0x43)](useState,null),_0x3891e5=()=>{switch(_0x38c206){case _0xc180(0x44):return{'title':_0x2b4f3d[_0xc180(0x45)],'instructions':_0x2b4f3d[_0xc180(0x46)],'placeholder':_0x2b4f3d[_0xc180(0x47)]};case _0xc180(0x48):return{'title':_0x2b4f3d[_0xc180(0x49)],'instructions':_0x2b4f3d[_0xc180(0x4a)],'placeholder':_0x2b4f3d[_0xc180(0x4b)]};case _0x2b4f3d[_0xc180(0x4c)]:return{'title':_0xc180(0x4d),'instructions':_0x2b4f3d[_0xc180(0x4e)],'placeholder':_0x2b4f3d[_0xc180(0x4f)]};case _0x2b4f3d['DhHDl']:return{'title':_0xc180(0x50),'instructions':_0x2b4f3d['AshpU'],'placeholder':_0x2b4f3d[_0xc180(0x51)]};default:return{'title':_0xc180(0x52)+_0x2f4670,'instructions':_0xc180(0x53),'placeholder':_0x2b4f3d[_0xc180(0x54)]};}},{title:_0x50eb00,instructions:_0x4e7475,placeholder:_0xcb7eb0}=_0x2b4f3d[_0xc180(0x55)](_0x3891e5),_0x428027=_0x340dfb=>{const _0x1b45bb={'rmyEO':function(_0xcfc7a1,_0x5b0e54){return _0x2b4f3d[_0xc180(0x56)](_0xcfc7a1,_0x5b0e54);},'UGuPv':function(_0x366679,_0x2d2855){return _0x366679>_0x2d2855;},'LJKEf':function(_0x46e332,_0x4a82f0){return _0x2b4f3d['jcZum'](_0x46e332,_0x4a82f0);},'NpFPo':_0x2b4f3d['WJYsx'],'MTJPc':function(_0x796a8,_0x40b66a){return _0x2b4f3d[_0xc180(0x57)](_0x796a8,_0x40b66a);},'GxBjp':_0x2b4f3d[_0xc180(0x58)],'aovbZ':function(_0x68c2d7,_0x2ae040){return _0x2b4f3d[_0xc180(0x56)](_0x68c2d7,_0x2ae040);},'bWCGG':function(_0x47b5bf,_0x518848){return _0x47b5bf+_0x518848;},'oVBQm':function(_0x4a4028,_0x57c80d){return _0x2b4f3d[_0xc180(0x57)](_0x4a4028,_0x57c80d);},'ZSaWH':function(_0x1ad34a,_0x250c72){return _0x1ad34a(_0x250c72);}};if(_0x2b4f3d[_0xc180(0x59)](_0x2b4f3d['wucCd'],_0x2b4f3d[_0xc180(0x5a)]))_0x465c2d[_0xc180(0x5b)]({'conversationId':_0x4a1db6['id']||'conv_'+_0x687b18[_0xc180(0x5c)](),'messages':_0x521ec8,'context':{'title':_0xb4976c[_0xc180(0x5d)]||_0x2b4f3d['aqjbc'],'create_time':_0x29590a[_0xc180(0x5e)],'update_time':_0x3b1047[_0xc180(0x5f)]}});else try{if(_0x2b4f3d[_0xc180(0x60)](_0x2b4f3d[_0xc180(0x61)],_0x2b4f3d[_0xc180(0x62)])){var _0x526b6f;_0x4e048d['push']({'id':_0x43f425['message']['id']||_0xc180(0x63)+_0x177dc2,'role':(_0x2b4f3d[_0xc180(0x64)](_0x526b6f=_0x293d7d[_0xc180(0x65)]['author'],null)||_0x2b4f3d[_0xc180(0x59)](_0x526b6f,void 0x0)?void 0x0:_0x526b6f['role'])||_0x2b4f3d['pygvt'],'content':_0x558338,'timestamp':_0xc78f5c[_0xc180(0x65)][_0xc180(0x5e)]?new _0x164fa9(_0x35184b[_0xc180(0x65)][_0xc180(0x5e)]*0x3e8)[_0xc180(0x66)]():_0x52af5c});}else{const _0x33675e=JSON[_0xc180(0x67)](_0x340dfb),_0x2f24f9=[];if(Array[_0xc180(0x68)](_0x33675e))_0x2b4f3d['lkbmj'](_0x2b4f3d[_0xc180(0x69)],_0x2b4f3d[_0xc180(0x69)])?_0x33675e[_0xc180(0x6a)]((_0x3d3759,_0x3e67e5)=>{const _0x27b303=_0x1b45bb[_0xc180(0x6b)](_0x34c44c,_0x3d3759);_0x1b45bb[_0xc180(0x6c)](_0x27b303[_0xc180(0x6d)],0x0)&&(_0x1b45bb['LJKEf'](_0x1b45bb[_0xc180(0x6e)],_0xc180(0x6f))?_0x54c0d5=_0x1b45bb[_0xc180(0x6b)](_0xf8c9ef,0x0):_0x2f24f9[_0xc180(0x5b)]({'conversationId':_0x3d3759['id']||_0x3d3759[_0xc180(0x70)]||_0xc180(0x71)+_0x3e67e5+'_'+Date[_0xc180(0x5c)](),'messages':_0x27b303,'context':{'title':_0x3d3759[_0xc180(0x5d)]||_0x3d3759[_0xc180(0x72)]||_0xc180(0x73)+_0x1b45bb[_0xc180(0x74)](_0x3e67e5,0x1),'create_time':_0x3d3759[_0xc180(0x5e)]||_0x3d3759[_0xc180(0x75)],'update_time':_0x3d3759[_0xc180(0x5f)]||_0x3d3759[_0xc180(0x76)]}}));}):(_0x1b45bb[_0xc180(0x6b)](_0x4bd426,_0x1b45bb[_0xc180(0x77)]),_0x1b45bb[_0xc180(0x6b)](_0x36afa2,_0x534ab2[_0xc180(0x78)]));else{if(_0x33675e[_0xc180(0x79)]&&Array[_0xc180(0x68)](_0x33675e['conversations'])){if(_0x2b4f3d[_0xc180(0x7a)](_0x2b4f3d[_0xc180(0x7b)],_0x2b4f3d[_0xc180(0x7b)]))_0x33675e[_0xc180(0x79)][_0xc180(0x6a)]((_0x2c1808,_0x29c583)=>{const _0x3f7db7=_0x1b45bb[_0xc180(0x7c)](_0x34c44c,_0x2c1808);_0x3f7db7['length']>0x0&&_0x2f24f9[_0xc180(0x5b)]({'conversationId':_0x2c1808['id']||'conv_'+_0x29c583+'_'+Date[_0xc180(0x5c)](),'messages':_0x3f7db7,'context':{'title':_0x2c1808[_0xc180(0x5d)]||_0xc180(0x73)+_0x1b45bb[_0xc180(0x7d)](_0x29c583,0x1),'create_time':_0x2c1808[_0xc180(0x5e)],'update_time':_0x2c1808[_0xc180(0x5f)]}});});else{const _0x365c61=_0x2b4f3d[_0xc180(0x56)](_0x2ad55b,_0x125fd8);_0x365c61[_0xc180(0x6d)]>0x0&&_0x1213f6[_0xc180(0x5b)]({'conversationId':_0x2d1071['id']||_0xc180(0x71)+_0x320a97+'_'+_0x4fb02a['now'](),'messages':_0x365c61,'context':{'title':_0x4112f1[_0xc180(0x5d)]||_0xc180(0x73)+_0x2b4f3d[_0xc180(0x7e)](_0x39f09c,0x1),'create_time':_0x1782fc[_0xc180(0x5e)],'update_time':_0x2f54b9[_0xc180(0x5f)]}});}}else{if(_0x33675e[_0xc180(0x7f)]||_0x33675e[_0xc180(0x80)]){const _0x19df60=_0x2b4f3d[_0xc180(0x81)](_0x34c44c,_0x33675e);_0x2b4f3d['vkSTy'](_0x19df60[_0xc180(0x6d)],0x0)&&(_0x2b4f3d[_0xc180(0x82)](_0xc180(0x83),_0x2b4f3d[_0xc180(0x84)])?_0x5efa1e['push']({'conversationId':_0x1fce07['id']||_0x395101[_0xc180(0x70)]||'conv_'+_0x48663f+'_'+_0x131b73[_0xc180(0x5c)](),'messages':_0x480299,'context':{'title':_0x23740c['title']||_0xc4d1d0[_0xc180(0x72)]||_0xc180(0x73)+_0x1b45bb[_0xc180(0x85)](_0x591c30,0x1),'create_time':_0x2a2c41[_0xc180(0x5e)]||_0x472137[_0xc180(0x75)],'update_time':_0x44bff5[_0xc180(0x5f)]||_0x19bc6d[_0xc180(0x76)]}}):_0x2f24f9[_0xc180(0x5b)]({'conversationId':_0x33675e['id']||_0xc180(0x71)+Date['now'](),'messages':_0x19df60,'context':{'title':_0x33675e['title']||_0x2b4f3d[_0xc180(0x86)],'create_time':_0x33675e[_0xc180(0x5e)],'update_time':_0x33675e[_0xc180(0x5f)]}}));}else{const _0x312d01=_0x2b4f3d[_0xc180(0x56)](_0x34c44c,_0x33675e);_0x312d01[_0xc180(0x6d)]>0x0&&(_0x2b4f3d[_0xc180(0x82)](_0x2b4f3d[_0xc180(0x87)],_0x2b4f3d[_0xc180(0x87)])?_0x17ceea[_0xc180(0x6a)]((_0x5be90b,_0x53f3a3)=>{const _0x4fa6f1=_0x1b45bb[_0xc180(0x88)](_0x3e2e00,_0x5be90b);_0x4fa6f1[_0xc180(0x6d)]>0x0&&_0x5846fd['push']({'conversationId':_0x5be90b['id']||_0x5be90b[_0xc180(0x70)]||_0xc180(0x71)+_0x53f3a3+'_'+_0x347a10[_0xc180(0x5c)](),'messages':_0x4fa6f1,'context':{'title':_0x5be90b[_0xc180(0x5d)]||_0x5be90b[_0xc180(0x72)]||_0xc180(0x73)+_0x1b45bb['oVBQm'](_0x53f3a3,0x1),'create_time':_0x5be90b[_0xc180(0x5e)]||_0x5be90b[_0xc180(0x75)],'update_time':_0x5be90b['update_time']||_0x5be90b[_0xc180(0x76)]}});}):_0x2f24f9['push']({'conversationId':_0xc180(0x71)+Date[_0xc180(0x5c)](),'messages':_0x312d01,'context':{'title':_0x33675e['title']||_0x2b4f3d[_0xc180(0x86)]}}));}}}return _0x2f24f9;}}catch(_0x4d0f19){console[_0xc180(0x89)](_0x2b4f3d['Wncws'],_0x4d0f19);throw new Error(_0x2b4f3d[_0xc180(0x8a)]);}},_0x34c44c=_0x39c9ac=>{const _0x367a90={'qQujq':_0x2b4f3d['uhgCH'],'DviZq':function(_0x3c441d,_0x4ceefc){return _0x2b4f3d[_0xc180(0x8b)](_0x3c441d,_0x4ceefc);},'hqdIh':function(_0x46580b,_0x588ad7){return _0x2b4f3d['cXVIN'](_0x46580b,_0x588ad7);},'jteMM':_0x2b4f3d[_0xc180(0x8c)],'pVhrD':function(_0xe00926,_0x5cb8cb){return _0xe00926*_0x5cb8cb;},'xMhzL':function(_0x492d3a,_0x47e02e){return _0x2b4f3d[_0xc180(0x43)](_0x492d3a,_0x47e02e);},'fBcEm':_0x2b4f3d[_0xc180(0x58)],'atPHX':_0x2b4f3d[_0xc180(0x8d)],'gogtr':function(_0xcb4c37,_0x446780){return _0x2b4f3d[_0xc180(0x8e)](_0xcb4c37,_0x446780);}},_0x5c4d49=[];_0x39c9ac['mapping']&&(_0x2b4f3d[_0xc180(0x8f)](_0x2b4f3d['RvuZX'],_0x2b4f3d[_0xc180(0x90)])?Object[_0xc180(0x91)](_0x39c9ac[_0xc180(0x7f)])[_0xc180(0x6a)]((_0x456fa2,_0x8eea71)=>{if(_0x367a90[_0xc180(0x92)]!==_0x367a90[_0xc180(0x92)])_0x4959f8++;else{var _0x56efa2;if(_0x456fa2!==null&&_0x456fa2!==void 0x0&&_0x367a90[_0xc180(0x93)](_0x56efa2=_0x456fa2[_0xc180(0x65)],null)&&_0x367a90[_0xc180(0x94)](_0x56efa2,void 0x0)&&_0x367a90['DviZq'](_0x56efa2=_0x56efa2[_0xc180(0x95)],null)&&_0x56efa2!==void 0x0&&_0x56efa2[_0xc180(0x96)]){const _0x29300b=_0x456fa2[_0xc180(0x65)][_0xc180(0x95)][_0xc180(0x96)]['join']('\x0a');if(_0x29300b[_0xc180(0x97)]()){var _0x34520b;_0x5c4d49[_0xc180(0x5b)]({'id':_0x456fa2[_0xc180(0x65)]['id']||_0xc180(0x63)+_0x8eea71,'role':((_0x34520b=_0x456fa2['message'][_0xc180(0x98)])===null||_0x34520b===void 0x0?void 0x0:_0x34520b[_0xc180(0x99)])||_0x367a90[_0xc180(0x9a)],'content':_0x29300b,'timestamp':_0x456fa2[_0xc180(0x65)][_0xc180(0x5e)]?new Date(_0x367a90[_0xc180(0x9b)](_0x456fa2[_0xc180(0x65)]['create_time'],0x3e8))[_0xc180(0x66)]():undefined});}}}}):_0x2e0bbc?(_0x367a90['xMhzL'](_0x57a2d9,_0x367a90['fBcEm']),_0x367a90[_0xc180(0x9c)](_0x39f0cb,_0x116356[_0xc180(0x78)])):(_0x367a90[_0xc180(0x9c)](_0x5177e9,_0x367a90[_0xc180(0x9d)]),_0x132f07(_0x5a3672[_0xc180(0x9e)])));if(_0x39c9ac['messages']&&Array['isArray'](_0x39c9ac[_0xc180(0x80)])){if(_0x2b4f3d['eKpWK']===_0x2b4f3d[_0xc180(0x9f)])_0x39c9ac[_0xc180(0x80)][_0xc180(0x6a)]((_0x5594f0,_0x2c8ad0)=>{const _0x6fb60b={'SkaQE':_0x2b4f3d[_0xc180(0xa0)],'uBBUw':_0xc180(0xc)};var _0x35cd88;const _0x3b7705=_0x5594f0[_0xc180(0x95)]||_0x5594f0[_0xc180(0xa1)]||_0x5594f0['message']||'';if(_0x2b4f3d['mXCnf'](typeof _0x3b7705,_0x2b4f3d[_0xc180(0xa2)])&&_0x3b7705['trim']())_0x2b4f3d[_0xc180(0x64)](_0xc180(0x15),_0x2b4f3d[_0xc180(0xa3)])?_0x5c4d49[_0xc180(0x5b)]({'id':_0x5594f0['id']||_0xc180(0x63)+_0x2c8ad0,'role':_0x5594f0[_0xc180(0x99)]||_0x5594f0[_0xc180(0x98)]||'user','content':_0x3b7705,'timestamp':_0x5594f0['timestamp']||_0x5594f0[_0xc180(0x75)]}):_0x2ef5f0[_0xc180(0x5b)]({'id':_0x490996['id']||'msg_'+_0x4f9947,'role':_0x31948e[_0xc180(0x99)]||_0x428147[_0xc180(0x98)]||_0x6fb60b[_0xc180(0xa4)],'content':_0x494420,'timestamp':_0x5822a8[_0xc180(0xa5)]||_0x5c1614[_0xc180(0x75)]});else _0x2b4f3d[_0xc180(0x8b)](_0x35cd88=_0x5594f0[_0xc180(0x95)],null)&&_0x2b4f3d[_0xc180(0xa6)](_0x35cd88,void 0x0)&&_0x35cd88[_0xc180(0x96)]&&(_0x2b4f3d[_0xc180(0xa7)]!==_0x2b4f3d[_0xc180(0xa7)]?_0x1fbebc[_0xc180(0x5b)]({'conversationId':_0xc180(0x71)+_0x1a33f8[_0xc180(0x5c)](),'messages':_0x5262b0,'context':{'title':_0x216079['title']||_0x6fb60b[_0xc180(0xa8)]}}):_0x5c4d49['push']({'id':_0x5594f0['id']||_0xc180(0x63)+_0x2c8ad0,'role':_0x5594f0['role']||_0xc180(0xa9),'content':_0x5594f0[_0xc180(0x95)][_0xc180(0x96)][_0xc180(0xaa)]('\x0a'),'timestamp':_0x5594f0[_0xc180(0xa5)]}));});else{const _0x1b934a={'QPIgz':function(_0x5ad5d7,_0x3db8b9){return _0x5ad5d7(_0x3db8b9);},'HhHkR':function(_0xdd30ab,_0xc4ed6c){return _0x2b4f3d[_0xc180(0xab)](_0xdd30ab,_0xc4ed6c);},'JsixV':function(_0x18cea2,_0x1e906a){return _0x2b4f3d[_0xc180(0xac)](_0x18cea2,_0x1e906a);}};_0xb3f719['conversations'][_0xc180(0x6a)]((_0x4cdfba,_0x2ca691)=>{const _0x2d0f88=_0x1b934a[_0xc180(0xad)](_0x12a277,_0x4cdfba);_0x1b934a[_0xc180(0xae)](_0x2d0f88[_0xc180(0x6d)],0x0)&&_0x45ea16[_0xc180(0x5b)]({'conversationId':_0x4cdfba['id']||_0xc180(0x71)+_0x2ca691+'_'+_0x57f169['now'](),'messages':_0x2d0f88,'context':{'title':_0x4cdfba[_0xc180(0x5d)]||_0xc180(0x73)+_0x1b934a[_0xc180(0xaf)](_0x2ca691,0x1),'create_time':_0x4cdfba[_0xc180(0x5e)],'update_time':_0x4cdfba['update_time']}});});}}if(_0x39c9ac['chat_messages']&&Array[_0xc180(0x68)](_0x39c9ac[_0xc180(0xb0)])){if(_0x2b4f3d[_0xc180(0xb1)](_0x2b4f3d[_0xc180(0xb2)],_0x2b4f3d[_0xc180(0xb2)]))_0x39c9ac[_0xc180(0xb0)][_0xc180(0x6a)]((_0x4762e3,_0x12f8f4)=>{const _0x26c019={'cPOrn':function(_0x26018f,_0x596925){return _0x2b4f3d[_0xc180(0xb3)](_0x26018f,_0x596925);},'shLrI':_0x2b4f3d[_0xc180(0x42)]};if(_0x2b4f3d[_0xc180(0xb4)](_0x2b4f3d['FGHLG'],_0x2b4f3d['tFFnZ'])){_0x367a90[_0xc180(0x9c)](_0x3bd974,'File upload requires react-native-document-picker and react-native-fs. Please paste data instead.');return;}else(_0x4762e3[_0xc180(0xa1)]||_0x4762e3[_0xc180(0x95)])&&(_0x2b4f3d[_0xc180(0xb5)](_0x2b4f3d[_0xc180(0xb6)],_0xc180(0xb7))?(_0x26c019[_0xc180(0xb8)](_0xef8b20,_0x26c019['shLrI']),_0x2fb277(_0x2988ba[_0xc180(0x78)])):_0x5c4d49[_0xc180(0x5b)]({'id':_0x4762e3['uuid']||_0xc180(0x63)+_0x12f8f4,'role':_0x2b4f3d[_0xc180(0xb9)](_0x4762e3['sender'],_0x2b4f3d[_0xc180(0xba)])?_0x2b4f3d['TmhPb']:_0xc180(0xbb),'content':_0x4762e3[_0xc180(0xa1)]||_0x4762e3['content'],'timestamp':_0x4762e3[_0xc180(0x75)]}));});else{const _0x192d1d=_0x367a90[_0xc180(0x9c)](_0x521781,_0x296b58);_0x367a90[_0xc180(0xbc)](_0x192d1d['length'],0x0)&&_0x4bdb6b[_0xc180(0x5b)]({'conversationId':_0x2bee20['id']||'conv_'+_0x576fe1[_0xc180(0x5c)](),'messages':_0x192d1d,'context':{'title':_0x1fa8df[_0xc180(0x5d)]||_0xc180(0xc),'create_time':_0x34215d[_0xc180(0x5e)],'update_time':_0x11d67a['update_time']}});}}return _0x5c4d49;},_0x562370=async()=>{const _0x372747={'Itjmo':function(_0x537d06,_0x329bd8){return _0x2b4f3d[_0xc180(0xbd)](_0x537d06,_0x329bd8);},'mHPuY':function(_0xe7a525,_0x4803b8){return _0x2b4f3d[_0xc180(0xbe)](_0xe7a525,_0x4803b8);},'qPePV':function(_0x34d7ad,_0x140c0c){return _0x2b4f3d[_0xc180(0xa6)](_0x34d7ad,_0x140c0c);},'leuxO':function(_0x3c77db,_0x1966fe){return _0x2b4f3d['AKlDF'](_0x3c77db,_0x1966fe);},'Otzbh':function(_0x4c75a9,_0x32ce43){return _0x4c75a9===_0x32ce43;},'kKAVv':function(_0x52696a,_0x2d43d2){return _0x2b4f3d[_0xc180(0xbf)](_0x52696a,_0x2d43d2);},'PYFzD':_0x2b4f3d['pygvt'],'HxyHI':function(_0x11cb5f,_0x48957a){return _0x11cb5f*_0x48957a;}};if(!FILE_UPLOAD_AVAILABLE){if(_0x2b4f3d[_0xc180(0xc0)](_0x2b4f3d[_0xc180(0xc1)],_0x2b4f3d[_0xc180(0xc2)]))_0x3fa543['values'](_0x4994fe[_0xc180(0x7f)])[_0xc180(0x6a)]((_0x59a550,_0x245407)=>{var _0x76393a;if(_0x372747[_0xc180(0xc3)](_0x59a550,null)&&_0x372747[_0xc180(0xc4)](_0x59a550,void 0x0)&&(_0x76393a=_0x59a550[_0xc180(0x65)])!==null&&_0x372747[_0xc180(0xc5)](_0x76393a,void 0x0)&&_0x372747['leuxO'](_0x76393a=_0x76393a[_0xc180(0x95)],null)&&_0x372747[_0xc180(0xc3)](_0x76393a,void 0x0)&&_0x76393a[_0xc180(0x96)]){const _0x42fb72=_0x59a550[_0xc180(0x65)][_0xc180(0x95)][_0xc180(0x96)][_0xc180(0xaa)]('\x0a');if(_0x42fb72[_0xc180(0x97)]()){var _0x3b3cbd;_0x50b361[_0xc180(0x5b)]({'id':_0x59a550['message']['id']||_0xc180(0x63)+_0x245407,'role':(_0x372747[_0xc180(0xc6)](_0x3b3cbd=_0x59a550[_0xc180(0x65)]['author'],null)||_0x372747[_0xc180(0xc7)](_0x3b3cbd,void 0x0)?void 0x0:_0x3b3cbd[_0xc180(0x99)])||_0x372747['PYFzD'],'content':_0x42fb72,'timestamp':_0x59a550['message'][_0xc180(0x5e)]?new _0x2324bb(_0x372747[_0xc180(0xc8)](_0x59a550[_0xc180(0x65)][_0xc180(0x5e)],0x3e8))[_0xc180(0x66)]():_0x4e7a1d});}}});else{_0x5b96a2('File upload requires react-native-document-picker and react-native-fs. Please paste data instead.');return;}}try{_0x2b4f3d[_0xc180(0xb3)](_0x5b96a2,null);const {pick:_0x4b690e,types:_0x264dcb}=DocumentPicker,_0x335be5=await _0x2b4f3d[_0xc180(0x43)](_0x4b690e,{'type':[_0x264dcb['json'],_0x264dcb[_0xc180(0xc9)],_0x264dcb[_0xc180(0xca)]]});if(_0x335be5&&_0x335be5[0x0]){const _0x425750=_0x335be5[0x0];_0x2b4f3d['GKRYO'](_0x504097,_0x425750[_0xc180(0x72)]||_0x2b4f3d[_0xc180(0xcb)]);let _0xe84e3d;_0x425750['uri'][_0xc180(0xcc)](_0xc180(0xcd))?_0xe84e3d=await RNFS[_0xc180(0xce)](_0x425750[_0xc180(0xcf)],_0x2b4f3d['AviUm']):_0xe84e3d=await RNFS[_0xc180(0xce)](_0x425750[_0xc180(0xcf)],_0x2b4f3d[_0xc180(0xd0)]),_0x2b4f3d['Saacp'](_0x26743e,_0xe84e3d),_0x2b4f3d[_0xc180(0xd1)](_0x2d0187,_0xe84e3d),triggerHaptic(HapticType[_0xc180(0xd2)]);}}catch(_0x1e8a8c){_0x1e8a8c[_0xc180(0xd3)]!==_0x2b4f3d[_0xc180(0xd4)]&&(console[_0xc180(0x89)](_0x2b4f3d[_0xc180(0xd5)],_0x1e8a8c),_0x2b4f3d[_0xc180(0xd6)](_0x5b96a2,_0xc180(0xd7)),_0x2b4f3d['Saacp'](triggerHaptic,HapticType[_0xc180(0x9e)]));}},_0xc3c16d=async()=>{const _0x3c46ea={'QqKCJ':function(_0x106df1,_0x515cc4){return _0x2b4f3d[_0xc180(0xc0)](_0x106df1,_0x515cc4);},'pgnvi':function(_0x49e360,_0x559b47){return _0x2b4f3d[_0xc180(0xd8)](_0x49e360,_0x559b47);},'ypqHW':_0xc180(0xa9),'DHfyg':_0x2b4f3d[_0xc180(0xd9)],'ubzoN':function(_0x1e2e84,_0x275318){return _0x2b4f3d[_0xc180(0xda)](_0x1e2e84,_0x275318);}},_0x2ca968=_0x525471===_0xc180(0xdb)&&_0x3713a8?_0x3713a8:_0x209ff5;if(!_0x2ca968[_0xc180(0x97)]()){_0x2b4f3d[_0xc180(0xdc)](_0x5b96a2,'Please\x20paste\x20or\x20upload\x20conversation\x20data\x20first.'),_0x2b4f3d[_0xc180(0xd6)](triggerHaptic,HapticType['ERROR']);return;}_0x2b4f3d['DSmay'](_0x20a7ce,!![]),_0x2b4f3d[_0xc180(0xdd)](_0x5b96a2,null);try{const _0x5c66f1=_0x2b4f3d[_0xc180(0xd6)](_0x428027,_0x2ca968);if(_0x2b4f3d[_0xc180(0xde)](_0x5c66f1[_0xc180(0x6d)],0x0))throw new Error(_0x2b4f3d['gQySs']);const _0x480297=await AsyncStorage[_0xc180(0xdf)](_0x2b4f3d[_0xc180(0xe0)])||await AsyncStorage[_0xc180(0xdf)](_0x2b4f3d[_0xc180(0xe1)])||await AsyncStorage[_0xc180(0xdf)](_0x2b4f3d[_0xc180(0xe2)]);if(!_0x480297)throw new Error(_0xc180(0xe3));const _0x235c8e=_0xc180(0xe4)+_0x38c206;let _0x70acbf=0x0;for(const _0xa8c00 of _0x5c66f1){if(_0x2b4f3d['eJSMz']!==_0x2b4f3d[_0xc180(0xe5)])try{if(_0x2b4f3d[_0xc180(0xe6)](_0x2b4f3d[_0xc180(0xe7)],_0x2b4f3d[_0xc180(0xe7)])){const _0x3c7f52=await _0x2b4f3d[_0xc180(0xe8)](fetch,API_CONFIG[_0xc180(0xe9)]+_0xc180(0xea),{'method':'POST','headers':{'Content-Type':'application/json','Authorization':_0xc180(0xeb)+_0x480297},'body':JSON[_0xc180(0xec)]({'platform':_0x235c8e,'conversationData':{'conversationId':_0xa8c00['conversationId'],'messages':_0xa8c00[_0xc180(0x80)],'context':_0xa8c00[_0xc180(0xed)],'mobileMetadata':{'platform':Platform['OS'],'appVersion':_0x2b4f3d[_0xc180(0xee)],'osVersion':Platform[_0xc180(0xef)],'isOfflineSync':![]}},'memoryType':_0x2b4f3d[_0xc180(0xf0)],'metadata':{'source':_0x2b4f3d[_0xc180(0xf1)],'importedAt':new Date()['toISOString'](),'originalPlatform':_0x38c206}})});if(_0x3c7f52['ok'])_0x2b4f3d[_0xc180(0xb1)](_0x2b4f3d[_0xc180(0xf2)],_0x2b4f3d[_0xc180(0xf3)])?_0x2b4f3d['LClkY'](_0xcd53f9[_0xc180(0xd3)],'DOCUMENT_PICKER_CANCELED')&&(_0x57db8c[_0xc180(0x89)](_0x2b4f3d[_0xc180(0xd5)],_0x29b5d0),_0x2b4f3d[_0xc180(0xd6)](_0xdd52e7,_0xc180(0xd7)),_0x2b4f3d['bCzxH'](_0x397639,_0x280aed['ERROR'])):_0x70acbf++;else{if(_0x2b4f3d[_0xc180(0xb1)](_0x2b4f3d[_0xc180(0xf4)],_0x2b4f3d[_0xc180(0xf5)]))_0xbb5fca[_0xc180(0x0)]('react-native-fs not available - file upload disabled');else{const _0x4cba46=await _0x3c7f52[_0xc180(0xa1)]();console['error'](_0xc180(0xf6)+_0xa8c00['conversationId']+':',_0x4cba46);}}}else{const _0x1c053e={'bRQzv':function(_0x44b8cd,_0x537399){return _0x3c46ea[_0xc180(0xf7)](_0x44b8cd,_0x537399);},'ogeVO':function(_0x33526a,_0x39a0bf){return _0x3c46ea[_0xc180(0xf8)](_0x33526a,_0x39a0bf);},'UrlOf':function(_0x1413ce,_0x219b0e){return _0x3c46ea[_0xc180(0xf8)](_0x1413ce,_0x219b0e);},'IykkV':_0x3c46ea[_0xc180(0xf9)]};_0x2f1522[_0xc180(0x80)]['forEach']((_0x41d5ad,_0x4bdbbf)=>{var _0xe335e4;const _0x462c93=_0x41d5ad['content']||_0x41d5ad[_0xc180(0xa1)]||_0x41d5ad[_0xc180(0x65)]||'';if(_0x1c053e[_0xc180(0xfa)](typeof _0x462c93,'string')&&_0x462c93['trim']())_0x28c17d['push']({'id':_0x41d5ad['id']||_0xc180(0x63)+_0x4bdbbf,'role':_0x41d5ad[_0xc180(0x99)]||_0x41d5ad[_0xc180(0x98)]||_0xc180(0xa9),'content':_0x462c93,'timestamp':_0x41d5ad[_0xc180(0xa5)]||_0x41d5ad[_0xc180(0x75)]});else _0x1c053e['ogeVO'](_0xe335e4=_0x41d5ad[_0xc180(0x95)],null)&&_0x1c053e[_0xc180(0xfb)](_0xe335e4,void 0x0)&&_0xe335e4[_0xc180(0x96)]&&_0x9ad663[_0xc180(0x5b)]({'id':_0x41d5ad['id']||_0xc180(0x63)+_0x4bdbbf,'role':_0x41d5ad[_0xc180(0x99)]||_0x1c053e[_0xc180(0xfc)],'content':_0x41d5ad[_0xc180(0x95)][_0xc180(0x96)]['join']('\x0a'),'timestamp':_0x41d5ad[_0xc180(0xa5)]});});}}catch(_0x78241d){console[_0xc180(0x89)](_0xc180(0xfd),_0x78241d);}else throw new _0x2dd175(_0x3c46ea[_0xc180(0xfe)]);}if(_0x2b4f3d['SUXvf'](_0x70acbf,0x0))await AsyncStorage[_0xc180(0xff)](_0xc180(0x100)+_0x38c206,JSON['stringify']({'connected':!![],'platform':_0x38c206,'conversationsCount':_0x70acbf,'lastSyncAt':new Date()[_0xc180(0x66)]()})),triggerHaptic(HapticType['SUCCESS']),Alert[_0xc180(0x101)](_0xc180(0x102),_0xc180(0x103)+_0x70acbf+_0xc180(0x104)+(_0x2b4f3d[_0xc180(0x8e)](_0x70acbf,0x1)?'s':'')+'\x20from\x20'+_0x2f4670+'.',[{'text':'OK','onPress':()=>_0x23b083(_0x38c206)}]);else{if(_0x2b4f3d[_0xc180(0x105)](_0x2b4f3d[_0xc180(0x106)],_0x2b4f3d[_0xc180(0x106)]))throw new Error(_0x2b4f3d[_0xc180(0x107)]);else _0x4abd90[_0xc180(0x5b)]({'conversationId':_0xc95c30['id']||_0xc180(0x71)+_0x262d40+'_'+_0x2d9b2b['now'](),'messages':_0x15b1e0,'context':{'title':_0x6ec64e[_0xc180(0x5d)]||_0xc180(0x73)+_0x3c46ea[_0xc180(0x108)](_0x2a25de,0x1),'create_time':_0x5e85f4[_0xc180(0x5e)],'update_time':_0x63431c[_0xc180(0x5f)]}});}}catch(_0x55ee25){console[_0xc180(0x89)](_0x2b4f3d[_0xc180(0x109)],_0x55ee25),_0x2b4f3d[_0xc180(0x43)](_0x5b96a2,_0x55ee25[_0xc180(0x65)]||_0x2b4f3d[_0xc180(0x10a)]),_0x2b4f3d['VPOMf'](triggerHaptic,HapticType[_0xc180(0x9e)]);}finally{if(_0xc180(0x10b)===_0x2b4f3d['DKVrQ'])_0x2b4f3d[_0xc180(0x10c)](_0x20a7ce,![]);else{var _0x25cd5c;if(_0x13bf86!==null&&_0x2b4f3d['VbotB'](_0x50f8c2,void 0x0)&&_0x2b4f3d[_0xc180(0x10d)](_0x25cd5c=_0x529d14[_0xc180(0x65)],null)&&_0x2b4f3d['hRavB'](_0x25cd5c,void 0x0)&&(_0x25cd5c=_0x25cd5c[_0xc180(0x95)])!==null&&_0x2b4f3d[_0xc180(0x10e)](_0x25cd5c,void 0x0)&&_0x25cd5c['parts']){const _0x289ef1=_0x399d1a[_0xc180(0x65)][_0xc180(0x95)][_0xc180(0x96)]['join']('\x0a');if(_0x289ef1[_0xc180(0x97)]()){var _0x536e60;_0x26825c[_0xc180(0x5b)]({'id':_0x1f9803['message']['id']||_0xc180(0x63)+_0x232159,'role':(_0x2b4f3d[_0xc180(0x10f)](_0x536e60=_0x22c3e7[_0xc180(0x65)][_0xc180(0x98)],null)||_0x536e60===void 0x0?void 0x0:_0x536e60[_0xc180(0x99)])||_0x2b4f3d[_0xc180(0x8c)],'content':_0x289ef1,'timestamp':_0x34115f[_0xc180(0x65)][_0xc180(0x5e)]?new _0x552501(_0x4bfe25[_0xc180(0x65)][_0xc180(0x5e)]*0x3e8)[_0xc180(0x66)]():_0x1e1f35});}}}}},_0x58fb43=()=>{_0x2b4f3d[_0xc180(0xd6)](_0x2d0187,''),_0x2b4f3d['GKRYO'](_0x26743e,null),_0x2b4f3d[_0xc180(0xb3)](_0x504097,null),_0x2b4f3d[_0xc180(0xdd)](_0x5b96a2,null),_0x2b4f3d[_0xc180(0xdd)](_0x52916f,_0x2b4f3d[_0xc180(0x42)]),_0x2b4f3d['lJwqd'](_0x5495e1);};return React['createElement'](Modal,{'visible':_0x1fb98c,'animationType':_0x2b4f3d[_0xc180(0x110)],'presentationStyle':_0xc180(0x111),'onRequestClose':_0x58fb43},React['createElement'](KeyboardAvoidingView,{'style':styles[_0xc180(0x112)],'behavior':_0x2b4f3d[_0xc180(0xe6)](Platform['OS'],_0xc180(0x113))?_0x2b4f3d[_0xc180(0x114)]:_0x2b4f3d[_0xc180(0x115)]},React['createElement'](View,{'style':styles[_0xc180(0x116)]},React['createElement'](TouchableOpacity,{'style':styles[_0xc180(0x117)],'onPress':_0x58fb43},React[_0xc180(0x118)](Text,{'style':styles[_0xc180(0x119)]},_0x2b4f3d[_0xc180(0x11a)])),React[_0xc180(0x118)](Text,{'style':styles[_0xc180(0x11b)]},_0x50eb00),React[_0xc180(0x118)](View,{'style':styles[_0xc180(0x117)]})),React[_0xc180(0x118)](ScrollView,{'style':styles[_0xc180(0x95)],'contentContainerStyle':styles['contentContainer'],'keyboardShouldPersistTaps':_0x2b4f3d['nOJJY']},React[_0xc180(0x118)](View,{'style':styles[_0xc180(0x11c)]},React[_0xc180(0x118)](Text,{'style':styles[_0xc180(0x11d)]},_0x4e7475)),React[_0xc180(0x118)](View,{'style':styles[_0xc180(0x11e)]},React[_0xc180(0x118)](TouchableOpacity,{'style':[styles[_0xc180(0x11f)],_0x2b4f3d[_0xc180(0x120)](_0x525471,_0x2b4f3d[_0xc180(0x42)])&&styles[_0xc180(0x121)]],'onPress':()=>{const _0x5c0bfb={'zzwfR':function(_0x355e69,_0x2b2bff){return _0x2b4f3d[_0xc180(0x64)](_0x355e69,_0x2b2bff);},'jIjyF':_0xc180(0x1a)};if(_0x2b4f3d['Arokf'](_0xc180(0x122),_0x2b4f3d[_0xc180(0x123)]))_0x2b4f3d['oAVHJ'](_0x52916f,_0xc180(0x124)),_0x2b4f3d[_0xc180(0x125)](triggerHaptic,HapticType['BUTTON_PRESS']);else{const _0x53d12e={'kEUNN':function(_0x304c3d,_0x43c32b){return _0x5c0bfb[_0xc180(0x126)](_0x304c3d,_0x43c32b);},'CUrKt':_0x5c0bfb[_0xc180(0x127)]};_0x2c214f[_0xc180(0xb0)][_0xc180(0x6a)]((_0x1d467a,_0x43a86f)=>{(_0x1d467a[_0xc180(0xa1)]||_0x1d467a[_0xc180(0x95)])&&_0xb216fb[_0xc180(0x5b)]({'id':_0x1d467a['uuid']||'msg_'+_0x43a86f,'role':_0x53d12e[_0xc180(0x128)](_0x1d467a['sender'],_0x53d12e[_0xc180(0x129)])?'user':_0xc180(0xbb),'content':_0x1d467a[_0xc180(0xa1)]||_0x1d467a['content'],'timestamp':_0x1d467a['created_at']});});}}},React[_0xc180(0x118)](Text,{'style':[styles[_0xc180(0x12a)],_0x2b4f3d['Arokf'](_0x525471,_0x2b4f3d[_0xc180(0x42)])&&styles[_0xc180(0x12b)]]},_0x2b4f3d[_0xc180(0x12c)])),React[_0xc180(0x118)](TouchableOpacity,{'style':[styles[_0xc180(0x11f)],_0x2b4f3d['lkbmj'](_0x525471,_0x2b4f3d[_0xc180(0x58)])&&styles[_0xc180(0x121)],!FILE_UPLOAD_AVAILABLE&&styles[_0xc180(0x12d)]],'onPress':()=>{_0x2b4f3d[_0xc180(0x120)](_0x2b4f3d[_0xc180(0x12e)],_0x2b4f3d[_0xc180(0x12f)])?_0x56011e[_0xc180(0x89)]('Error\x20storing\x20conversation:',_0x411a83):FILE_UPLOAD_AVAILABLE?(_0x52916f(_0x2b4f3d[_0xc180(0x58)]),_0x2b4f3d[_0xc180(0x41)](triggerHaptic,HapticType[_0xc180(0x78)])):_0x2b4f3d[_0xc180(0x130)](_0x2b4f3d['WmoAl'],_0x2b4f3d['tsIuf'])?(_0x2b4f3d['AcJYQ'](_0x5b96a2,'File\x20upload\x20requires\x20additional\x20dependencies.\x20Please\x20paste\x20data\x20instead.'),triggerHaptic(HapticType[_0xc180(0x9e)])):_0x2bcfd1(![]);}},React[_0xc180(0x118)](Text,{'style':[styles[_0xc180(0x12a)],_0x2b4f3d[_0xc180(0x131)](_0x525471,'file')&&styles['tabTextActive'],!FILE_UPLOAD_AVAILABLE&&styles[_0xc180(0x132)]]},_0x2b4f3d[_0xc180(0x133)],!FILE_UPLOAD_AVAILABLE&&_0xc180(0x134)))),_0x525471===_0xc180(0x124)?React[_0xc180(0x118)](View,{'style':styles['inputContainer']},React[_0xc180(0x118)](TextInput,{'style':styles['textInput'],'multiline':!![],'placeholder':_0xcb7eb0,'placeholderTextColor':COLORS[_0xc180(0x135)],'value':_0x209ff5,'onChangeText':_0x2d0187,'textAlignVertical':_0x2b4f3d[_0xc180(0x136)],'autoCapitalize':_0x2b4f3d[_0xc180(0x137)],'autoCorrect':![]})):React[_0xc180(0x118)](View,{'style':styles[_0xc180(0x138)]},React[_0xc180(0x118)](TouchableOpacity,{'style':styles[_0xc180(0x139)],'onPress':_0x562370},React['createElement'](Text,{'style':styles[_0xc180(0x13a)]},'📁'),React[_0xc180(0x118)](Text,{'style':styles[_0xc180(0x13b)]},_0x31f9ba||_0x2b4f3d[_0xc180(0x13c)])),_0x31f9ba&&React[_0xc180(0x118)](View,{'style':styles[_0xc180(0x13d)]},React['createElement'](Text,{'style':styles[_0xc180(0x13e)]},'✓\x20',_0x31f9ba))),_0xbd9027&&React[_0xc180(0x118)](View,{'style':styles['errorContainer']},React[_0xc180(0x118)](Text,{'style':styles['errorText']},_0xbd9027)),_0x2b4f3d[_0xc180(0x13f)](_0x209ff5[_0xc180(0x6d)],0x0)&&React[_0xc180(0x118)](View,{'style':styles['previewContainer']},React[_0xc180(0x118)](Text,{'style':styles['previewTitle']},_0x2b4f3d[_0xc180(0x140)]),React[_0xc180(0x118)](Text,{'style':styles['previewText'],'numberOfLines':0x5},_0x209ff5['substring'](0x0,0x1f4),_0x2b4f3d[_0xc180(0x141)](_0x209ff5['length'],0x1f4)?_0x2b4f3d[_0xc180(0x142)]:''),React[_0xc180(0x118)](Text,{'style':styles[_0xc180(0x143)]},_0x209ff5[_0xc180(0x6d)][_0xc180(0x144)](),_0x2b4f3d[_0xc180(0x145)]))),React[_0xc180(0x118)](View,{'style':styles[_0xc180(0x146)]},React[_0xc180(0x118)](TouchableOpacity,{'style':[styles['submitButton'],(!_0x209ff5[_0xc180(0x97)]()||_0x3816c5)&&styles['submitButtonDisabled']],'onPress':_0xc3c16d,'disabled':!_0x209ff5['trim']()||_0x3816c5},_0x3816c5?React['createElement'](ActivityIndicator,{'color':_0x2b4f3d[_0xc180(0x147)],'size':_0x2b4f3d[_0xc180(0x148)]}):React[_0xc180(0x118)](Text,{'style':styles['submitButtonText']},_0x2b4f3d[_0xc180(0x149)])))));},styles=StyleSheet[_0xc180(0x14a)]({'container':{'flex':0x1,'backgroundColor':COLORS[_0xc180(0x14b)]},'header':{'flexDirection':'row','alignItems':_0xc180(0x14c),'justifyContent':'space-between','paddingHorizontal':0x10,'paddingTop':Platform['OS']===_0xc180(0x113)?0xc:0x10,'paddingBottom':0xc,'borderBottomWidth':0x1,'borderBottomColor':_0xc180(0x14d)},'headerTitle':{'fontSize':0x11,'fontWeight':_0xc180(0x14e),'color':COLORS['grey800'],'fontFamily':_0xc180(0x14f)},'closeButton':{'width':0x3c},'closeButtonText':{'fontSize':0x10,'color':_0xc180(0x150),'fontFamily':_0xc180(0x151)},'content':{'flex':0x1},'contentContainer':{'padding':0x14,'paddingBottom':0x28},'instructionsContainer':{'backgroundColor':_0xc180(0x152),'borderRadius':0xc,'padding':0x10,'marginBottom':0x14},'instructionsText':{'fontSize':0xe,'lineHeight':0x14,'color':_0xc180(0x153),'fontFamily':_0xc180(0x151)},'tabContainer':{'flexDirection':_0xc180(0x154),'backgroundColor':_0xc180(0x155),'borderRadius':0xa,'padding':0x4,'marginBottom':0x14},'tab':{'flex':0x1,'paddingVertical':0xa,'borderRadius':0x8,'alignItems':'center'},'tabActive':{'backgroundColor':_0xc180(0x3e),'shadowColor':'#000','shadowOffset':{'width':0x0,'height':0x1},'shadowOpacity':0.1,'shadowRadius':0x2,'elevation':0x2},'tabText':{'fontSize':0xe,'fontWeight':_0xc180(0x156),'color':COLORS[_0xc180(0x157)],'fontFamily':'Inter'},'tabTextActive':{'color':COLORS['grey800']},'tabDisabled':{'opacity':0.5},'tabTextDisabled':{'color':COLORS[_0xc180(0x135)]},'inputContainer':{'marginBottom':0x14},'textInput':{'backgroundColor':_0xc180(0x3e),'borderWidth':0x1,'borderColor':COLORS[_0xc180(0x158)],'borderRadius':0xc,'padding':0x10,'minHeight':0xc8,'fontSize':0xe,'fontFamily':Platform['OS']===_0xc180(0x113)?_0xc180(0x159):_0xc180(0x15a),'color':COLORS[_0xc180(0x15b)]},'fileInputContainer':{'marginBottom':0x14},'filePickButton':{'backgroundColor':_0xc180(0x3e),'borderWidth':0x2,'borderColor':COLORS[_0xc180(0x158)],'borderStyle':'dashed','borderRadius':0xc,'padding':0x28,'alignItems':'center','justifyContent':_0xc180(0x14c)},'filePickIcon':{'fontSize':0x28,'marginBottom':0xc},'filePickText':{'fontSize':0xf,'color':COLORS[_0xc180(0x15c)],'fontFamily':_0xc180(0x151)},'fileSelectedContainer':{'marginTop':0xc,'backgroundColor':'#F0FDF4','borderRadius':0x8,'padding':0xc},'fileSelectedText':{'fontSize':0xe,'color':_0xc180(0x15d),'fontFamily':_0xc180(0x151),'fontWeight':_0xc180(0x156)},'errorContainer':{'backgroundColor':'#FEF2F2','borderRadius':0x8,'padding':0xc,'marginBottom':0x10},'errorText':{'fontSize':0xe,'color':_0xc180(0x15e),'fontFamily':_0xc180(0x151)},'previewContainer':{'backgroundColor':_0xc180(0x155),'borderRadius':0xc,'padding':0x10},'previewTitle':{'fontSize':0xe,'fontWeight':_0xc180(0x14e),'color':COLORS[_0xc180(0x15b)],'marginBottom':0x8,'fontFamily':_0xc180(0x151)},'previewText':{'fontSize':0xc,'color':COLORS[_0xc180(0x15c)],'fontFamily':Platform['OS']===_0xc180(0x113)?_0xc180(0x159):_0xc180(0x15a),'lineHeight':0x12},'previewInfo':{'fontSize':0xc,'color':COLORS[_0xc180(0x157)],'marginTop':0x8,'fontFamily':'Inter'},'footer':{'padding':0x14,'paddingBottom':Platform['OS']===_0xc180(0x113)?0x22:0x14,'borderTopWidth':0x1,'borderTopColor':_0xc180(0x14d),'backgroundColor':COLORS['surface']},'submitButton':{'backgroundColor':_0xc180(0x15f),'borderRadius':0xc,'paddingVertical':0x10,'alignItems':'center','justifyContent':_0xc180(0x14c)},'submitButtonDisabled':{'backgroundColor':COLORS[_0xc180(0x158)]},'submitButtonText':{'fontSize':0x10,'fontWeight':_0xc180(0x14e),'color':_0xc180(0x3e),'fontFamily':_0xc180(0x151)}});export default LLMDataInputModal;
8
+ import React, { useState } from 'react';
9
+ import { View, Text, StyleSheet, Modal, TouchableOpacity, TextInput, ScrollView, ActivityIndicator, Alert, Platform, KeyboardAvoidingView } from 'react-native';
10
+ import { COLORS } from '../theme';
11
+ import { triggerHaptic, HapticType } from '../utils/haptics';
12
+ import AsyncStorage from '@react-native-async-storage/async-storage';
13
+ import { API_CONFIG } from '../config/api';
14
+
15
+ // Optional dependencies - file upload won't work without them
16
+ let DocumentPicker = null;
17
+ let RNFS = null;
18
+ try {
19
+ DocumentPicker = require('react-native-document-picker');
20
+ } catch (e) {
21
+ console.log('react-native-document-picker not available - file upload disabled');
22
+ }
23
+ try {
24
+ RNFS = require('react-native-fs');
25
+ } catch (e) {
26
+ console.log('react-native-fs not available - file upload disabled');
27
+ }
28
+ const FILE_UPLOAD_AVAILABLE = DocumentPicker !== null && RNFS !== null;
29
+ const LLMDataInputModal = ({
30
+ visible,
31
+ platform,
32
+ platformName,
33
+ onClose,
34
+ onSuccess
35
+ }) => {
36
+ const [inputMode, setInputMode] = useState('paste');
37
+ const [pastedData, setPastedData] = useState('');
38
+ const [isLoading, setIsLoading] = useState(false);
39
+ const [error, setError] = useState(null);
40
+ const [selectedFileName, setSelectedFileName] = useState(null);
41
+ const [fileContent, setFileContent] = useState(null);
42
+
43
+ // Get platform-specific instructions
44
+ const getInstructions = () => {
45
+ switch (platform) {
46
+ case 'chatgpt':
47
+ return {
48
+ title: 'Connect ChatGPT',
49
+ instructions: 'Export your ChatGPT conversations from Settings → Data Controls → Export data. Then upload the JSON file or paste your conversation data.',
50
+ placeholder: 'Paste your ChatGPT conversation JSON here...'
51
+ };
52
+ case 'claude':
53
+ return {
54
+ title: 'Connect Claude',
55
+ instructions: 'Export your Claude conversations and paste the JSON data below, or upload your exported file.',
56
+ placeholder: 'Paste your Claude conversation JSON here...'
57
+ };
58
+ case 'gemini':
59
+ return {
60
+ title: 'Connect Gemini',
61
+ instructions: 'Export your Gemini (Google AI) conversations and paste the data below.',
62
+ placeholder: 'Paste your Gemini conversation JSON here...'
63
+ };
64
+ case 'grok':
65
+ return {
66
+ title: 'Connect Grok',
67
+ instructions: 'Export your Grok conversations from X/Twitter and paste the data below.',
68
+ placeholder: 'Paste your Grok conversation JSON here...'
69
+ };
70
+ default:
71
+ return {
72
+ title: `Connect ${platformName}`,
73
+ instructions: 'Paste your conversation data below or upload a JSON file.',
74
+ placeholder: 'Paste your conversation JSON here...'
75
+ };
76
+ }
77
+ };
78
+ const {
79
+ title,
80
+ instructions,
81
+ placeholder
82
+ } = getInstructions();
83
+
84
+ // Parse conversation data based on platform format
85
+ const parseConversationData = data => {
86
+ try {
87
+ const parsed = JSON.parse(data);
88
+ const conversations = [];
89
+
90
+ // Handle ChatGPT export format
91
+ if (Array.isArray(parsed)) {
92
+ // Array of conversations
93
+ parsed.forEach((conv, index) => {
94
+ const messages = extractMessages(conv);
95
+ if (messages.length > 0) {
96
+ conversations.push({
97
+ conversationId: conv.id || conv.conversation_id || `conv_${index}_${Date.now()}`,
98
+ messages,
99
+ context: {
100
+ title: conv.title || conv.name || `Conversation ${index + 1}`,
101
+ create_time: conv.create_time || conv.created_at,
102
+ update_time: conv.update_time || conv.updated_at
103
+ }
104
+ });
105
+ }
106
+ });
107
+ } else if (parsed.conversations && Array.isArray(parsed.conversations)) {
108
+ // ChatGPT export with conversations array
109
+ parsed.conversations.forEach((conv, index) => {
110
+ const messages = extractMessages(conv);
111
+ if (messages.length > 0) {
112
+ conversations.push({
113
+ conversationId: conv.id || `conv_${index}_${Date.now()}`,
114
+ messages,
115
+ context: {
116
+ title: conv.title || `Conversation ${index + 1}`,
117
+ create_time: conv.create_time,
118
+ update_time: conv.update_time
119
+ }
120
+ });
121
+ }
122
+ });
123
+ } else if (parsed.mapping || parsed.messages) {
124
+ // Single conversation format
125
+ const messages = extractMessages(parsed);
126
+ if (messages.length > 0) {
127
+ conversations.push({
128
+ conversationId: parsed.id || `conv_${Date.now()}`,
129
+ messages,
130
+ context: {
131
+ title: parsed.title || 'Imported Conversation',
132
+ create_time: parsed.create_time,
133
+ update_time: parsed.update_time
134
+ }
135
+ });
136
+ }
137
+ } else {
138
+ // Try to handle as a single object with message array
139
+ const messages = extractMessages(parsed);
140
+ if (messages.length > 0) {
141
+ conversations.push({
142
+ conversationId: `conv_${Date.now()}`,
143
+ messages,
144
+ context: {
145
+ title: parsed.title || 'Imported Conversation'
146
+ }
147
+ });
148
+ }
149
+ }
150
+ return conversations;
151
+ } catch (e) {
152
+ console.error('Error parsing conversation data:', e);
153
+ throw new Error('Invalid JSON format. Please check your data and try again.');
154
+ }
155
+ };
156
+
157
+ // Extract messages from various formats
158
+ const extractMessages = conv => {
159
+ const messages = [];
160
+
161
+ // ChatGPT mapping format
162
+ if (conv.mapping) {
163
+ Object.values(conv.mapping).forEach((node, index) => {
164
+ var _node$message;
165
+ if (node !== null && node !== void 0 && (_node$message = node.message) !== null && _node$message !== void 0 && (_node$message = _node$message.content) !== null && _node$message !== void 0 && _node$message.parts) {
166
+ const content = node.message.content.parts.join('\n');
167
+ if (content.trim()) {
168
+ var _node$message$author;
169
+ messages.push({
170
+ id: node.message.id || `msg_${index}`,
171
+ role: ((_node$message$author = node.message.author) === null || _node$message$author === void 0 ? void 0 : _node$message$author.role) || 'unknown',
172
+ content,
173
+ timestamp: node.message.create_time ? new Date(node.message.create_time * 1000).toISOString() : undefined
174
+ });
175
+ }
176
+ }
177
+ });
178
+ }
179
+
180
+ // Direct messages array
181
+ if (conv.messages && Array.isArray(conv.messages)) {
182
+ conv.messages.forEach((msg, index) => {
183
+ var _msg$content;
184
+ const content = msg.content || msg.text || msg.message || '';
185
+ if (typeof content === 'string' && content.trim()) {
186
+ messages.push({
187
+ id: msg.id || `msg_${index}`,
188
+ role: msg.role || msg.author || 'user',
189
+ content,
190
+ timestamp: msg.timestamp || msg.created_at
191
+ });
192
+ } else if ((_msg$content = msg.content) !== null && _msg$content !== void 0 && _msg$content.parts) {
193
+ messages.push({
194
+ id: msg.id || `msg_${index}`,
195
+ role: msg.role || 'user',
196
+ content: msg.content.parts.join('\n'),
197
+ timestamp: msg.timestamp
198
+ });
199
+ }
200
+ });
201
+ }
202
+
203
+ // Claude format
204
+ if (conv.chat_messages && Array.isArray(conv.chat_messages)) {
205
+ conv.chat_messages.forEach((msg, index) => {
206
+ if (msg.text || msg.content) {
207
+ messages.push({
208
+ id: msg.uuid || `msg_${index}`,
209
+ role: msg.sender === 'human' ? 'user' : 'assistant',
210
+ content: msg.text || msg.content,
211
+ timestamp: msg.created_at
212
+ });
213
+ }
214
+ });
215
+ }
216
+ return messages;
217
+ };
218
+
219
+ // Handle file selection
220
+ const handleFilePick = async () => {
221
+ if (!FILE_UPLOAD_AVAILABLE) {
222
+ setError('File upload requires react-native-document-picker and react-native-fs. Please paste data instead.');
223
+ return;
224
+ }
225
+ try {
226
+ setError(null);
227
+ const {
228
+ pick,
229
+ types
230
+ } = DocumentPicker;
231
+ const result = await pick({
232
+ type: [types.json, types.plainText, types.allFiles]
233
+ });
234
+ if (result && result[0]) {
235
+ const file = result[0];
236
+ setSelectedFileName(file.name || 'Selected file');
237
+
238
+ // Read file content
239
+ let content;
240
+ if (file.uri.startsWith('content://')) {
241
+ // Android content URI
242
+ content = await RNFS.readFile(file.uri, 'utf8');
243
+ } else {
244
+ content = await RNFS.readFile(file.uri, 'utf8');
245
+ }
246
+ setFileContent(content);
247
+ setPastedData(content);
248
+ triggerHaptic(HapticType.SUCCESS);
249
+ }
250
+ } catch (err) {
251
+ if (err.code !== 'DOCUMENT_PICKER_CANCELED') {
252
+ console.error('File pick error:', err);
253
+ setError('Failed to read file. Please try again or paste data manually.');
254
+ triggerHaptic(HapticType.ERROR);
255
+ }
256
+ }
257
+ };
258
+
259
+ // Submit data to backend
260
+ const handleSubmit = async () => {
261
+ const dataToProcess = inputMode === 'file' && fileContent ? fileContent : pastedData;
262
+ if (!dataToProcess.trim()) {
263
+ setError('Please paste or upload conversation data first.');
264
+ triggerHaptic(HapticType.ERROR);
265
+ return;
266
+ }
267
+ setIsLoading(true);
268
+ setError(null);
269
+ try {
270
+ // Parse the conversation data
271
+ const conversations = parseConversationData(dataToProcess);
272
+ if (conversations.length === 0) {
273
+ throw new Error('No valid conversations found in the data. Please check the format.');
274
+ }
275
+
276
+ // Get auth token
277
+ const authToken = (await AsyncStorage.getItem('onairos_jwt_token')) || (await AsyncStorage.getItem('enoch_token')) || (await AsyncStorage.getItem('auth_token'));
278
+ if (!authToken) {
279
+ throw new Error('Authentication required. Please sign in first.');
280
+ }
281
+
282
+ // Send each conversation to backend
283
+ const mobilePlatform = `mobile-${platform}`;
284
+ let successCount = 0;
285
+ for (const conversation of conversations) {
286
+ try {
287
+ const response = await fetch(`${API_CONFIG.BASE_URL}/llm-data/store`, {
288
+ method: 'POST',
289
+ headers: {
290
+ 'Content-Type': 'application/json',
291
+ 'Authorization': `Bearer ${authToken}`
292
+ },
293
+ body: JSON.stringify({
294
+ platform: mobilePlatform,
295
+ conversationData: {
296
+ conversationId: conversation.conversationId,
297
+ messages: conversation.messages,
298
+ context: conversation.context,
299
+ mobileMetadata: {
300
+ platform: Platform.OS,
301
+ appVersion: '1.0.0',
302
+ osVersion: Platform.Version,
303
+ isOfflineSync: false
304
+ }
305
+ },
306
+ memoryType: 'conversation',
307
+ metadata: {
308
+ source: 'mobile_app_import',
309
+ importedAt: new Date().toISOString(),
310
+ originalPlatform: platform
311
+ }
312
+ })
313
+ });
314
+ if (response.ok) {
315
+ successCount++;
316
+ } else {
317
+ const errorText = await response.text();
318
+ console.error(`Failed to store conversation ${conversation.conversationId}:`, errorText);
319
+ }
320
+ } catch (convError) {
321
+ console.error(`Error storing conversation:`, convError);
322
+ }
323
+ }
324
+ if (successCount > 0) {
325
+ // Store connection status locally
326
+ await AsyncStorage.setItem(`@onairos:llm_connected:${platform}`, JSON.stringify({
327
+ connected: true,
328
+ platform,
329
+ conversationsCount: successCount,
330
+ lastSyncAt: new Date().toISOString()
331
+ }));
332
+ triggerHaptic(HapticType.SUCCESS);
333
+ Alert.alert('Success! 🎉', `Successfully imported ${successCount} conversation${successCount > 1 ? 's' : ''} from ${platformName}.`, [{
334
+ text: 'OK',
335
+ onPress: () => onSuccess(platform)
336
+ }]);
337
+ } else {
338
+ throw new Error('Failed to import any conversations. Please check your data format.');
339
+ }
340
+ } catch (err) {
341
+ console.error('Submit error:', err);
342
+ setError(err.message || 'Failed to import data. Please try again.');
343
+ triggerHaptic(HapticType.ERROR);
344
+ } finally {
345
+ setIsLoading(false);
346
+ }
347
+ };
348
+
349
+ // Reset state when modal closes
350
+ const handleClose = () => {
351
+ setPastedData('');
352
+ setFileContent(null);
353
+ setSelectedFileName(null);
354
+ setError(null);
355
+ setInputMode('paste');
356
+ onClose();
357
+ };
358
+ return /*#__PURE__*/React.createElement(Modal, {
359
+ visible: visible,
360
+ animationType: "slide",
361
+ presentationStyle: "pageSheet",
362
+ onRequestClose: handleClose
363
+ }, /*#__PURE__*/React.createElement(KeyboardAvoidingView, {
364
+ style: styles.container,
365
+ behavior: Platform.OS === 'ios' ? 'padding' : 'height'
366
+ }, /*#__PURE__*/React.createElement(View, {
367
+ style: styles.header
368
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
369
+ style: styles.closeButton,
370
+ onPress: handleClose
371
+ }, /*#__PURE__*/React.createElement(Text, {
372
+ style: styles.closeButtonText
373
+ }, "Cancel")), /*#__PURE__*/React.createElement(Text, {
374
+ style: styles.headerTitle
375
+ }, title), /*#__PURE__*/React.createElement(View, {
376
+ style: styles.closeButton
377
+ })), /*#__PURE__*/React.createElement(ScrollView, {
378
+ style: styles.content,
379
+ contentContainerStyle: styles.contentContainer,
380
+ keyboardShouldPersistTaps: "handled"
381
+ }, /*#__PURE__*/React.createElement(View, {
382
+ style: styles.instructionsContainer
383
+ }, /*#__PURE__*/React.createElement(Text, {
384
+ style: styles.instructionsText
385
+ }, instructions)), /*#__PURE__*/React.createElement(View, {
386
+ style: styles.tabContainer
387
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
388
+ style: [styles.tab, inputMode === 'paste' && styles.tabActive],
389
+ onPress: () => {
390
+ setInputMode('paste');
391
+ triggerHaptic(HapticType.BUTTON_PRESS);
392
+ }
393
+ }, /*#__PURE__*/React.createElement(Text, {
394
+ style: [styles.tabText, inputMode === 'paste' && styles.tabTextActive]
395
+ }, "Paste Data")), /*#__PURE__*/React.createElement(TouchableOpacity, {
396
+ style: [styles.tab, inputMode === 'file' && styles.tabActive, !FILE_UPLOAD_AVAILABLE && styles.tabDisabled],
397
+ onPress: () => {
398
+ if (FILE_UPLOAD_AVAILABLE) {
399
+ setInputMode('file');
400
+ triggerHaptic(HapticType.BUTTON_PRESS);
401
+ } else {
402
+ setError('File upload requires additional dependencies. Please paste data instead.');
403
+ triggerHaptic(HapticType.ERROR);
404
+ }
405
+ }
406
+ }, /*#__PURE__*/React.createElement(Text, {
407
+ style: [styles.tabText, inputMode === 'file' && styles.tabTextActive, !FILE_UPLOAD_AVAILABLE && styles.tabTextDisabled]
408
+ }, "Upload File ", !FILE_UPLOAD_AVAILABLE && '(N/A)'))), inputMode === 'paste' ? /*#__PURE__*/React.createElement(View, {
409
+ style: styles.inputContainer
410
+ }, /*#__PURE__*/React.createElement(TextInput, {
411
+ style: styles.textInput,
412
+ multiline: true,
413
+ placeholder: placeholder,
414
+ placeholderTextColor: COLORS.grey400,
415
+ value: pastedData,
416
+ onChangeText: setPastedData,
417
+ textAlignVertical: "top",
418
+ autoCapitalize: "none",
419
+ autoCorrect: false
420
+ })) : /*#__PURE__*/React.createElement(View, {
421
+ style: styles.fileInputContainer
422
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
423
+ style: styles.filePickButton,
424
+ onPress: handleFilePick
425
+ }, /*#__PURE__*/React.createElement(Text, {
426
+ style: styles.filePickIcon
427
+ }, "\uD83D\uDCC1"), /*#__PURE__*/React.createElement(Text, {
428
+ style: styles.filePickText
429
+ }, selectedFileName || 'Tap to select a file')), selectedFileName && /*#__PURE__*/React.createElement(View, {
430
+ style: styles.fileSelectedContainer
431
+ }, /*#__PURE__*/React.createElement(Text, {
432
+ style: styles.fileSelectedText
433
+ }, "\u2713 ", selectedFileName))), error && /*#__PURE__*/React.createElement(View, {
434
+ style: styles.errorContainer
435
+ }, /*#__PURE__*/React.createElement(Text, {
436
+ style: styles.errorText
437
+ }, error)), pastedData.length > 0 && /*#__PURE__*/React.createElement(View, {
438
+ style: styles.previewContainer
439
+ }, /*#__PURE__*/React.createElement(Text, {
440
+ style: styles.previewTitle
441
+ }, "Data Preview"), /*#__PURE__*/React.createElement(Text, {
442
+ style: styles.previewText,
443
+ numberOfLines: 5
444
+ }, pastedData.substring(0, 500), pastedData.length > 500 ? '...' : ''), /*#__PURE__*/React.createElement(Text, {
445
+ style: styles.previewInfo
446
+ }, pastedData.length.toLocaleString(), " characters"))), /*#__PURE__*/React.createElement(View, {
447
+ style: styles.footer
448
+ }, /*#__PURE__*/React.createElement(TouchableOpacity, {
449
+ style: [styles.submitButton, (!pastedData.trim() || isLoading) && styles.submitButtonDisabled],
450
+ onPress: handleSubmit,
451
+ disabled: !pastedData.trim() || isLoading
452
+ }, isLoading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
453
+ color: "#FFFFFF",
454
+ size: "small"
455
+ }) : /*#__PURE__*/React.createElement(Text, {
456
+ style: styles.submitButtonText
457
+ }, "Import Conversations")))));
458
+ };
459
+ const styles = StyleSheet.create({
460
+ container: {
461
+ flex: 1,
462
+ backgroundColor: COLORS.surface
463
+ },
464
+ header: {
465
+ flexDirection: 'row',
466
+ alignItems: 'center',
467
+ justifyContent: 'space-between',
468
+ paddingHorizontal: 16,
469
+ paddingTop: Platform.OS === 'ios' ? 12 : 16,
470
+ paddingBottom: 12,
471
+ borderBottomWidth: 1,
472
+ borderBottomColor: '#E5E7EB' // grey200
473
+ },
474
+ headerTitle: {
475
+ fontSize: 17,
476
+ fontWeight: '600',
477
+ color: COLORS.grey800,
478
+ fontFamily: 'IBM Plex Sans'
479
+ },
480
+ closeButton: {
481
+ width: 60
482
+ },
483
+ closeButtonText: {
484
+ fontSize: 16,
485
+ color: '#3B82F6',
486
+ fontFamily: 'Inter'
487
+ },
488
+ content: {
489
+ flex: 1
490
+ },
491
+ contentContainer: {
492
+ padding: 20,
493
+ paddingBottom: 40
494
+ },
495
+ instructionsContainer: {
496
+ backgroundColor: '#F0F9FF',
497
+ borderRadius: 12,
498
+ padding: 16,
499
+ marginBottom: 20
500
+ },
501
+ instructionsText: {
502
+ fontSize: 14,
503
+ lineHeight: 20,
504
+ color: '#0369A1',
505
+ fontFamily: 'Inter'
506
+ },
507
+ tabContainer: {
508
+ flexDirection: 'row',
509
+ backgroundColor: '#F3F4F6',
510
+ // grey100
511
+ borderRadius: 10,
512
+ padding: 4,
513
+ marginBottom: 20
514
+ },
515
+ tab: {
516
+ flex: 1,
517
+ paddingVertical: 10,
518
+ borderRadius: 8,
519
+ alignItems: 'center'
520
+ },
521
+ tabActive: {
522
+ backgroundColor: '#FFFFFF',
523
+ shadowColor: '#000',
524
+ shadowOffset: {
525
+ width: 0,
526
+ height: 1
527
+ },
528
+ shadowOpacity: 0.1,
529
+ shadowRadius: 2,
530
+ elevation: 2
531
+ },
532
+ tabText: {
533
+ fontSize: 14,
534
+ fontWeight: '500',
535
+ color: COLORS.grey500,
536
+ fontFamily: 'Inter'
537
+ },
538
+ tabTextActive: {
539
+ color: COLORS.grey800
540
+ },
541
+ tabDisabled: {
542
+ opacity: 0.5
543
+ },
544
+ tabTextDisabled: {
545
+ color: COLORS.grey400
546
+ },
547
+ inputContainer: {
548
+ marginBottom: 20
549
+ },
550
+ textInput: {
551
+ backgroundColor: '#FFFFFF',
552
+ borderWidth: 1,
553
+ borderColor: COLORS.grey300,
554
+ borderRadius: 12,
555
+ padding: 16,
556
+ minHeight: 200,
557
+ fontSize: 14,
558
+ fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace',
559
+ color: COLORS.grey800
560
+ },
561
+ fileInputContainer: {
562
+ marginBottom: 20
563
+ },
564
+ filePickButton: {
565
+ backgroundColor: '#FFFFFF',
566
+ borderWidth: 2,
567
+ borderColor: COLORS.grey300,
568
+ borderStyle: 'dashed',
569
+ borderRadius: 12,
570
+ padding: 40,
571
+ alignItems: 'center',
572
+ justifyContent: 'center'
573
+ },
574
+ filePickIcon: {
575
+ fontSize: 40,
576
+ marginBottom: 12
577
+ },
578
+ filePickText: {
579
+ fontSize: 15,
580
+ color: COLORS.grey600,
581
+ fontFamily: 'Inter'
582
+ },
583
+ fileSelectedContainer: {
584
+ marginTop: 12,
585
+ backgroundColor: '#F0FDF4',
586
+ borderRadius: 8,
587
+ padding: 12
588
+ },
589
+ fileSelectedText: {
590
+ fontSize: 14,
591
+ color: '#166534',
592
+ fontFamily: 'Inter',
593
+ fontWeight: '500'
594
+ },
595
+ errorContainer: {
596
+ backgroundColor: '#FEF2F2',
597
+ borderRadius: 8,
598
+ padding: 12,
599
+ marginBottom: 16
600
+ },
601
+ errorText: {
602
+ fontSize: 14,
603
+ color: '#DC2626',
604
+ fontFamily: 'Inter'
605
+ },
606
+ previewContainer: {
607
+ backgroundColor: '#F3F4F6',
608
+ // grey100
609
+ borderRadius: 12,
610
+ padding: 16
611
+ },
612
+ previewTitle: {
613
+ fontSize: 14,
614
+ fontWeight: '600',
615
+ color: COLORS.grey800,
616
+ marginBottom: 8,
617
+ fontFamily: 'Inter'
618
+ },
619
+ previewText: {
620
+ fontSize: 12,
621
+ color: COLORS.grey600,
622
+ fontFamily: Platform.OS === 'ios' ? 'Menlo' : 'monospace',
623
+ lineHeight: 18
624
+ },
625
+ previewInfo: {
626
+ fontSize: 12,
627
+ color: COLORS.grey500,
628
+ marginTop: 8,
629
+ fontFamily: 'Inter'
630
+ },
631
+ footer: {
632
+ padding: 20,
633
+ paddingBottom: Platform.OS === 'ios' ? 34 : 20,
634
+ borderTopWidth: 1,
635
+ borderTopColor: '#E5E7EB',
636
+ // grey200
637
+ backgroundColor: COLORS.surface
638
+ },
639
+ submitButton: {
640
+ backgroundColor: '#10B981',
641
+ borderRadius: 12,
642
+ paddingVertical: 16,
643
+ alignItems: 'center',
644
+ justifyContent: 'center'
645
+ },
646
+ submitButtonDisabled: {
647
+ backgroundColor: COLORS.grey300
648
+ },
649
+ submitButtonText: {
650
+ fontSize: 16,
651
+ fontWeight: '600',
652
+ color: '#FFFFFF',
653
+ fontFamily: 'Inter'
654
+ }
655
+ });
656
+ export default LLMDataInputModal;
657
+ //# sourceMappingURL=LLMDataInputModal.js.map