react-native-inapp-inspector 2.4.1 → 2.5.0

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 (295) hide show
  1. package/README.ar.md +163 -0
  2. package/README.de.md +163 -0
  3. package/README.es.md +164 -0
  4. package/README.fr.md +163 -0
  5. package/README.hi.md +163 -0
  6. package/README.ja.md +180 -0
  7. package/README.ko.md +163 -0
  8. package/README.md +340 -243
  9. package/README.pt-BR.md +163 -0
  10. package/README.ru.md +163 -0
  11. package/README.zh-CN.md +387 -0
  12. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +605 -23
  13. package/assets/banner_dark.svg +186 -0
  14. package/assets/banner_light.svg +186 -0
  15. package/assets/icon_circle.svg +148 -0
  16. package/assets/icon_square.svg +369 -0
  17. package/assets/inapp_inspector_icon.gif +0 -0
  18. package/assets/inapp_inspector_icon_original.gif +0 -0
  19. package/assets/social_preview.png +0 -0
  20. package/assets/walkthrough.gif +0 -0
  21. package/dist/commonjs/capture.d.ts +2 -0
  22. package/dist/commonjs/capture.js +1 -1
  23. package/dist/commonjs/components/AnalyticsDetail.js +23 -23
  24. package/dist/commonjs/components/AnalyticsEventCard.js +1 -1
  25. package/dist/commonjs/components/AnalyticsGraph.js +44 -44
  26. package/dist/commonjs/components/AnimatedBrandOwl.d.ts +7 -0
  27. package/dist/commonjs/components/AnimatedBrandOwl.js +175 -0
  28. package/dist/commonjs/components/AppHeaderLogo.d.ts +1 -0
  29. package/dist/commonjs/components/AppHeaderLogo.js +5 -3
  30. package/dist/commonjs/components/BrandCircleIcon.js +28 -28
  31. package/dist/commonjs/components/BrandSquareIcon.d.ts +5 -0
  32. package/dist/commonjs/components/BrandSquareIcon.js +139 -0
  33. package/dist/commonjs/components/ConsoleLogCard.d.ts +2 -1
  34. package/dist/commonjs/components/ConsoleLogCard.js +23 -39
  35. package/dist/commonjs/components/Inspector/AboutModal.js +44 -54
  36. package/dist/commonjs/components/Inspector/AnalyticsTab.js +6 -6
  37. package/dist/commonjs/components/Inspector/ConfirmationModal.d.ts +13 -0
  38. package/dist/commonjs/components/Inspector/ConfirmationModal.js +30 -0
  39. package/dist/commonjs/components/Inspector/ConsoleTab.js +12 -12
  40. package/dist/commonjs/components/Inspector/CrashTab.js +44 -9
  41. package/dist/commonjs/components/Inspector/DebuggingTab.js +17 -17
  42. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +1 -1
  43. package/dist/commonjs/components/Inspector/FabLauncher.js +30 -33
  44. package/dist/commonjs/components/Inspector/FeatureUnderDevNotice.js +2 -2
  45. package/dist/commonjs/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
  46. package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +54 -0
  47. package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
  48. package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.js +234 -0
  49. package/dist/commonjs/components/Inspector/InspectorHeader.js +137 -127
  50. package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +15 -0
  51. package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +172 -0
  52. package/dist/commonjs/components/Inspector/MainScreen.js +55 -35
  53. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +40 -35
  54. package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +36 -0
  55. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +341 -135
  56. package/dist/commonjs/components/Inspector/NetworkTab.js +50 -50
  57. package/dist/commonjs/components/Inspector/NpmUpdateToast.js +1 -1
  58. package/dist/commonjs/components/Inspector/PushCard.d.ts +3 -2
  59. package/dist/commonjs/components/Inspector/PushCard.js +5 -4
  60. package/dist/commonjs/components/Inspector/PushDetail.js +41 -32
  61. package/dist/commonjs/components/Inspector/PushTab.js +12 -12
  62. package/dist/commonjs/components/Inspector/ReduxDetail.js +32 -32
  63. package/dist/commonjs/components/Inspector/ReduxTab.js +10 -8
  64. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
  65. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +43 -0
  66. package/dist/commonjs/components/Inspector/SettingsPanel.js +287 -139
  67. package/dist/commonjs/components/Inspector/SocketCard.d.ts +5 -0
  68. package/dist/commonjs/components/Inspector/SocketCard.js +116 -0
  69. package/dist/commonjs/components/Inspector/SocketDetail.d.ts +4 -0
  70. package/dist/commonjs/components/Inspector/SocketDetail.js +327 -0
  71. package/dist/commonjs/components/Inspector/SocketFilterModal.d.ts +13 -0
  72. package/dist/commonjs/components/Inspector/SocketFilterModal.js +69 -0
  73. package/dist/commonjs/components/Inspector/SocketTab.d.ts +3 -0
  74. package/dist/commonjs/components/Inspector/SocketTab.js +112 -0
  75. package/dist/commonjs/components/Inspector/StorageTab.js +39 -37
  76. package/dist/commonjs/components/Inspector/SupportModal.d.ts +7 -0
  77. package/dist/commonjs/components/Inspector/SupportModal.js +125 -0
  78. package/dist/commonjs/components/Inspector/SupportPage.d.ts +5 -0
  79. package/dist/commonjs/components/Inspector/SupportPage.js +227 -0
  80. package/dist/commonjs/components/Inspector/TabBar.js +24 -23
  81. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +24 -24
  82. package/dist/commonjs/components/JsonViewer.js +50 -48
  83. package/dist/commonjs/components/LogCard.d.ts +3 -2
  84. package/dist/commonjs/components/LogCard.js +27 -25
  85. package/dist/commonjs/components/LogSyntaxHighlighter.js +5 -5
  86. package/dist/commonjs/components/ModuleErrorBoundary.js +5 -5
  87. package/dist/commonjs/components/NetworkIcons.d.ts +42 -0
  88. package/dist/commonjs/components/NetworkIcons.js +139 -6
  89. package/dist/commonjs/components/SegmentedTabs.js +1 -1
  90. package/dist/commonjs/constants/version.d.ts +1 -1
  91. package/dist/commonjs/constants/version.js +1 -1
  92. package/dist/commonjs/crash.d.ts +1 -1
  93. package/dist/commonjs/crash.js +1 -1
  94. package/dist/commonjs/customHooks/crashHandler.d.ts +2 -1
  95. package/dist/commonjs/customHooks/crashHandler.js +7 -7
  96. package/dist/commonjs/customHooks/socketLogger.d.ts +26 -0
  97. package/dist/commonjs/customHooks/socketLogger.js +2 -0
  98. package/dist/commonjs/editor.d.ts +13 -0
  99. package/dist/commonjs/editor.js +1 -0
  100. package/dist/commonjs/helpers/index.d.ts +1 -0
  101. package/dist/commonjs/helpers/index.js +3 -3
  102. package/dist/commonjs/helpers/memoryManager.d.ts +1 -0
  103. package/dist/commonjs/helpers/memoryManager.js +1 -1
  104. package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -1
  105. package/dist/commonjs/helpers/searchQueryParser.js +5 -1
  106. package/dist/commonjs/helpers/settingsStore.d.ts +1 -0
  107. package/dist/commonjs/helpers/settingsStore.js +1 -1
  108. package/dist/commonjs/helpers/shareFormatter.d.ts +3 -1
  109. package/dist/commonjs/helpers/shareFormatter.js +8 -7
  110. package/dist/commonjs/helpers/telemetry.js +1 -1
  111. package/dist/commonjs/i18n/index.d.ts +99 -1
  112. package/dist/commonjs/i18n/index.js +1 -1
  113. package/dist/commonjs/i18n/locales/ar.json +1 -1
  114. package/dist/commonjs/i18n/locales/bn.json +1 -0
  115. package/dist/commonjs/i18n/locales/de.json +1 -1
  116. package/dist/commonjs/i18n/locales/en.json +1 -1
  117. package/dist/commonjs/i18n/locales/es.json +1 -1
  118. package/dist/commonjs/i18n/locales/fr.json +1 -1
  119. package/dist/commonjs/i18n/locales/gu.json +1 -0
  120. package/dist/commonjs/i18n/locales/hi.json +1 -1
  121. package/dist/commonjs/i18n/locales/id.json +1 -0
  122. package/dist/commonjs/i18n/locales/it.json +1 -0
  123. package/dist/commonjs/i18n/locales/ja.json +1 -1
  124. package/dist/commonjs/i18n/locales/kn.json +1 -0
  125. package/dist/commonjs/i18n/locales/ko.json +1 -1
  126. package/dist/commonjs/i18n/locales/ml.json +1 -0
  127. package/dist/commonjs/i18n/locales/mr.json +1 -0
  128. package/dist/commonjs/i18n/locales/nl.json +1 -0
  129. package/dist/commonjs/i18n/locales/pa.json +1 -0
  130. package/dist/commonjs/i18n/locales/pl.json +1 -0
  131. package/dist/commonjs/i18n/locales/pt.json +1 -1
  132. package/dist/commonjs/i18n/locales/ru.json +1 -1
  133. package/dist/commonjs/i18n/locales/ta.json +1 -0
  134. package/dist/commonjs/i18n/locales/te.json +1 -0
  135. package/dist/commonjs/i18n/locales/tr.json +1 -0
  136. package/dist/commonjs/i18n/locales/vi.json +1 -0
  137. package/dist/commonjs/i18n/locales/zh.json +1 -1
  138. package/dist/commonjs/index.d.ts +16 -13
  139. package/dist/commonjs/index.js +5 -4
  140. package/dist/commonjs/native/NativeInspector.d.ts +4 -0
  141. package/dist/commonjs/native/NativeInspector.js +1 -1
  142. package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
  143. package/dist/commonjs/socket.d.ts +4 -0
  144. package/dist/commonjs/socket.js +1 -0
  145. package/dist/commonjs/styles/AppColors.d.ts +42 -2
  146. package/dist/commonjs/styles/AppColors.js +1 -1
  147. package/dist/commonjs/styles/common.js +1 -1
  148. package/dist/commonjs/styles/index.d.ts +30 -0
  149. package/dist/commonjs/styles/index.js +1 -1
  150. package/dist/commonjs/types/editor.d.ts +96 -0
  151. package/dist/commonjs/types/editor.js +1 -0
  152. package/dist/commonjs/types/enums.d.ts +40 -0
  153. package/dist/commonjs/types/enums.js +1 -1
  154. package/dist/commonjs/types/interfaces.d.ts +143 -1
  155. package/dist/esm/capture.d.ts +2 -0
  156. package/dist/esm/capture.js +1 -1
  157. package/dist/esm/components/AnalyticsDetail.js +31 -31
  158. package/dist/esm/components/AnalyticsEventCard.js +1 -1
  159. package/dist/esm/components/AnalyticsGraph.js +74 -74
  160. package/dist/esm/components/AnimatedBrandOwl.d.ts +7 -0
  161. package/dist/esm/components/AnimatedBrandOwl.js +175 -0
  162. package/dist/esm/components/AppHeaderLogo.d.ts +1 -0
  163. package/dist/esm/components/AppHeaderLogo.js +7 -5
  164. package/dist/esm/components/BrandCircleIcon.js +70 -70
  165. package/dist/esm/components/BrandSquareIcon.d.ts +5 -0
  166. package/dist/esm/components/BrandSquareIcon.js +139 -0
  167. package/dist/esm/components/ConsoleLogCard.d.ts +2 -1
  168. package/dist/esm/components/ConsoleLogCard.js +61 -77
  169. package/dist/esm/components/Inspector/AboutModal.js +85 -95
  170. package/dist/esm/components/Inspector/AnalyticsTab.js +24 -24
  171. package/dist/esm/components/Inspector/ConfirmationModal.d.ts +13 -0
  172. package/dist/esm/components/Inspector/ConfirmationModal.js +30 -0
  173. package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
  174. package/dist/esm/components/Inspector/CrashTab.js +203 -168
  175. package/dist/esm/components/Inspector/DebuggingTab.js +29 -29
  176. package/dist/esm/components/Inspector/DeviceInfoTab.js +75 -75
  177. package/dist/esm/components/Inspector/FabLauncher.js +57 -60
  178. package/dist/esm/components/Inspector/FeatureUnderDevNotice.js +7 -7
  179. package/dist/esm/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
  180. package/dist/esm/components/Inspector/FloatingCaptureWidget.js +54 -0
  181. package/dist/esm/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
  182. package/dist/esm/components/Inspector/GlobalCrashScreenModal.js +234 -0
  183. package/dist/esm/components/Inspector/InspectorHeader.js +162 -152
  184. package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +15 -0
  185. package/dist/esm/components/Inspector/LanguageSelectorModal.js +172 -0
  186. package/dist/esm/components/Inspector/MainScreen.js +130 -110
  187. package/dist/esm/components/Inspector/MediaGalleryTab.js +83 -78
  188. package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +36 -0
  189. package/dist/esm/components/Inspector/MediaPreviewModal.js +345 -139
  190. package/dist/esm/components/Inspector/NetworkTab.js +130 -130
  191. package/dist/esm/components/Inspector/NpmUpdateToast.js +1 -1
  192. package/dist/esm/components/Inspector/PushCard.d.ts +3 -2
  193. package/dist/esm/components/Inspector/PushCard.js +23 -22
  194. package/dist/esm/components/Inspector/PushDetail.js +45 -36
  195. package/dist/esm/components/Inspector/PushTab.js +23 -23
  196. package/dist/esm/components/Inspector/ReduxDetail.js +42 -42
  197. package/dist/esm/components/Inspector/ReduxTab.js +20 -18
  198. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
  199. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +43 -0
  200. package/dist/esm/components/Inspector/SettingsPanel.js +526 -378
  201. package/dist/esm/components/Inspector/SocketCard.d.ts +5 -0
  202. package/dist/esm/components/Inspector/SocketCard.js +116 -0
  203. package/dist/esm/components/Inspector/SocketDetail.d.ts +4 -0
  204. package/dist/esm/components/Inspector/SocketDetail.js +327 -0
  205. package/dist/esm/components/Inspector/SocketFilterModal.d.ts +13 -0
  206. package/dist/esm/components/Inspector/SocketFilterModal.js +69 -0
  207. package/dist/esm/components/Inspector/SocketTab.d.ts +3 -0
  208. package/dist/esm/components/Inspector/SocketTab.js +112 -0
  209. package/dist/esm/components/Inspector/StorageTab.js +139 -137
  210. package/dist/esm/components/Inspector/SupportModal.d.ts +7 -0
  211. package/dist/esm/components/Inspector/SupportModal.js +125 -0
  212. package/dist/esm/components/Inspector/SupportPage.d.ts +5 -0
  213. package/dist/esm/components/Inspector/SupportPage.js +227 -0
  214. package/dist/esm/components/Inspector/TabBar.js +36 -35
  215. package/dist/esm/components/Inspector/UpdateAvailableModal.js +22 -22
  216. package/dist/esm/components/JsonViewer.js +66 -64
  217. package/dist/esm/components/LogCard.d.ts +3 -2
  218. package/dist/esm/components/LogCard.js +57 -55
  219. package/dist/esm/components/LogSyntaxHighlighter.js +5 -5
  220. package/dist/esm/components/ModuleErrorBoundary.js +23 -23
  221. package/dist/esm/components/NetworkIcons.d.ts +42 -0
  222. package/dist/esm/components/NetworkIcons.js +139 -6
  223. package/dist/esm/components/SegmentedTabs.js +7 -7
  224. package/dist/esm/constants/version.d.ts +1 -1
  225. package/dist/esm/constants/version.js +1 -1
  226. package/dist/esm/crash.d.ts +1 -1
  227. package/dist/esm/crash.js +1 -1
  228. package/dist/esm/customHooks/crashHandler.d.ts +2 -1
  229. package/dist/esm/customHooks/crashHandler.js +7 -7
  230. package/dist/esm/customHooks/socketLogger.d.ts +26 -0
  231. package/dist/esm/customHooks/socketLogger.js +2 -0
  232. package/dist/esm/editor.d.ts +13 -0
  233. package/dist/esm/editor.js +1 -0
  234. package/dist/esm/helpers/index.d.ts +1 -0
  235. package/dist/esm/helpers/index.js +4 -4
  236. package/dist/esm/helpers/memoryManager.d.ts +1 -0
  237. package/dist/esm/helpers/memoryManager.js +1 -1
  238. package/dist/esm/helpers/searchQueryParser.d.ts +1 -1
  239. package/dist/esm/helpers/searchQueryParser.js +5 -1
  240. package/dist/esm/helpers/settingsStore.d.ts +1 -0
  241. package/dist/esm/helpers/settingsStore.js +1 -1
  242. package/dist/esm/helpers/shareFormatter.d.ts +3 -1
  243. package/dist/esm/helpers/shareFormatter.js +8 -7
  244. package/dist/esm/helpers/telemetry.js +1 -1
  245. package/dist/esm/i18n/index.d.ts +99 -1
  246. package/dist/esm/i18n/index.js +1 -1
  247. package/dist/esm/i18n/locales/ar.json +1 -1
  248. package/dist/esm/i18n/locales/bn.json +1 -0
  249. package/dist/esm/i18n/locales/de.json +1 -1
  250. package/dist/esm/i18n/locales/en.json +1 -1
  251. package/dist/esm/i18n/locales/es.json +1 -1
  252. package/dist/esm/i18n/locales/fr.json +1 -1
  253. package/dist/esm/i18n/locales/gu.json +1 -0
  254. package/dist/esm/i18n/locales/hi.json +1 -1
  255. package/dist/esm/i18n/locales/id.json +1 -0
  256. package/dist/esm/i18n/locales/it.json +1 -0
  257. package/dist/esm/i18n/locales/ja.json +1 -1
  258. package/dist/esm/i18n/locales/kn.json +1 -0
  259. package/dist/esm/i18n/locales/ko.json +1 -1
  260. package/dist/esm/i18n/locales/ml.json +1 -0
  261. package/dist/esm/i18n/locales/mr.json +1 -0
  262. package/dist/esm/i18n/locales/nl.json +1 -0
  263. package/dist/esm/i18n/locales/pa.json +1 -0
  264. package/dist/esm/i18n/locales/pl.json +1 -0
  265. package/dist/esm/i18n/locales/pt.json +1 -1
  266. package/dist/esm/i18n/locales/ru.json +1 -1
  267. package/dist/esm/i18n/locales/ta.json +1 -0
  268. package/dist/esm/i18n/locales/te.json +1 -0
  269. package/dist/esm/i18n/locales/tr.json +1 -0
  270. package/dist/esm/i18n/locales/vi.json +1 -0
  271. package/dist/esm/i18n/locales/zh.json +1 -1
  272. package/dist/esm/index.d.ts +16 -13
  273. package/dist/esm/index.js +8 -7
  274. package/dist/esm/native/NativeInspector.d.ts +4 -0
  275. package/dist/esm/native/NativeInspector.js +1 -1
  276. package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
  277. package/dist/esm/socket.d.ts +4 -0
  278. package/dist/esm/socket.js +1 -0
  279. package/dist/esm/styles/AppColors.d.ts +42 -2
  280. package/dist/esm/styles/AppColors.js +1 -1
  281. package/dist/esm/styles/common.js +1 -1
  282. package/dist/esm/styles/index.d.ts +30 -0
  283. package/dist/esm/styles/index.js +1 -1
  284. package/dist/esm/types/editor.d.ts +96 -0
  285. package/dist/esm/types/editor.js +1 -0
  286. package/dist/esm/types/enums.d.ts +40 -0
  287. package/dist/esm/types/enums.js +1 -1
  288. package/dist/esm/types/interfaces.d.ts +143 -1
  289. package/editor.d.ts +1 -0
  290. package/editor.js +1 -0
  291. package/ios/NetworkInspectorModule.mm +531 -12
  292. package/package.json +213 -2
  293. package/react-native-inapp-inspector.podspec +1 -1
  294. package/src/native/NativeInspector.ts +65 -4
  295. package/src/native/NativeNetworkInspector.ts +4 -0
@@ -1,209 +1,244 @@
1
- import te,{useCallback as re,useEffect as oe,useMemo as q,useRef as ae,useState as A}from"react";import{Alert as le,FlatList as Ce,Platform as be,ScrollView as N,StyleSheet as Te,Text as T,TextInput as Se,TouchableOpacity as Ie,View as C}from"react-native";import{useTranslation as Be}from"../../i18n";import{useInspector as Ve}from"./InspectorContext";import M from"../TouchableScale";import Fe from"../AnimatedEntrance";import Re from"../EndOfListFooter";import He from"./FeatureUnderDevNotice";import Pe from"../HighlightText";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{clearCrashRecords as Le}from"../../customHooks/crashHandler";import We,{DEFAULT_CRASH_FILTERS as G,isCrashFiltersDefault as W}from"./CrashFilterModal";import{SearchIcon as $e,ClearIcon as De,TrashIcon as Ae,TerminalIcon as Me,LayersIcon as je,ClockIcon as Oe,ShieldAlertIcon as Ee,FlameIcon as Ne,JsIcon as Je,HourglassIcon as _e,SkullIcon as Ue,LayoutIcon as Qe,ChipIcon as qe,AppleIcon as Ge,AndroidIcon as Ke,RepeatIcon as Xe,CodeBracketsIcon as Ye,FilterIcon as Ze,ForwardChevronIcon as Ct}from"../NetworkIcons";const bt=S=>{const R=Date.now(),j=Math.max(0,R-S),v=Math.floor(j/1e3),$=Math.floor(v/60),L=Math.floor($/60),D=Math.floor(L/24);return v<60?`${v}s ago`:$<60?`${$}m ago`:L<24?`${L}h ago`:`${D}d ago`},K=10,Tt=te.memo(()=>{const{t:S}=Be(),{crashRecords:R,setSelectedCrash:j,maxCrashLogs:v}=Ve(),$=v||50,L=ae(null),[D,J]=A($),[B,E]=A(""),[z,_]=A("all"),[w,U]=A(G),[X,Q]=A(!1);oe(()=>{J(v||50),L.current?.scrollToOffset({offset:0,animated:!1})},[B,z,w,v]);const V=q(()=>{const r=R.length;let o=0,x=0,F=0,I=0,O=0;return R.forEach(P=>{P.isFatal&&o++,P.type==="js"?x++:P.type==="promise"?F++:P.type==="render"?I++:P.type==="native"&&O++}),{total:r,fatalCount:o,jsCount:x,promiseCount:F,renderCount:I,nativeCount:O}},[R]),H=q(()=>{let r=R.filter(o=>{if(z==="fatal"&&!o.isFatal||z==="js"&&o.type!=="js"||z==="promise"&&o.type!=="promise"||z==="render"&&o.type!=="render"||z==="native"&&o.type!=="native"||w.types.size>0&&!w.types.has("all")&&!(w.types.has("fatal")&&o.isFatal||w.types.has("js")&&o.type==="js"||w.types.has("promise")&&o.type==="promise"||w.types.has("render")&&o.type==="render"||w.types.has("native")&&o.type==="native"))return!1;if(w.timeWindow!=="all"){const x=Date.now(),F=w.timeWindow==="15m"?x-900*1e3:w.timeWindow==="1h"?x-3600*1e3:w.timeWindow==="24h"?x-1440*60*1e3:x-10080*60*1e3;if(o.timestamp<F)return!1}if(w.platform!=="all"&&(o.deviceInfo?.platform||"").toLowerCase()!==w.platform)return!1;if(w.engine!=="all"){const x=o.deviceInfo?.isHermes;if(w.engine==="hermes"&&x!==!0||w.engine==="jsc"&&x===!0)return!1}if(B.trim().length>0){const x=B.trim().toLowerCase().split(/\s+/).filter(Boolean),F=[o.message||"",o.name||"",o.stack||"",o.type||"",o.deviceInfo?.platform||"",...(o.breadcrumbs||[]).map(I=>`${I.type||""} ${I.message||""}`)].join(" ").toLowerCase();return x.every(I=>F.includes(I))}return!0});return w.sortBy==="time_asc"&&(r=[...r].sort((o,x)=>o.timestamp-x.timestamp)),r},[R,z,B,w]),Y=()=>{le.alert(S("crash.clearTitle"),S("crash.clearMessage"),[{text:S("crash.clearCancel"),style:"cancel"},{text:S("crash.clearConfirm"),style:"destructive",onPress:()=>Le()}])},Z=re(({item:r,index:o})=>{const x=r.isFatal,F=r.type.toUpperCase(),I=r.parsedStack&&r.parsedStack.length>0?r.parsedStack.find(ee=>ee.isAppCode)||r.parsedStack[0]:null,O=r.type==="native"?`${e.errorColor}22`:r.type==="render"?`${e.purple}22`:r.type==="promise"?`${e.darkOrange}22`:`${e.offerPurple}22`,P=r.type==="native"?e.errorColor:r.type==="render"?e.purple:r.type==="promise"?e.darkOrange:e.offerPurple;return<Fe index={o}distance={8}>
2
- <M onPress={()=>{j(r)}}style={[t.cardContainer,x&&t.fatalCardBorder]}>
1
+ import He,{useCallback as Pe,useEffect as $e,useMemo as Y,useRef as Le,useState as A}from"react";import{FlatList as We,ScrollView as _,StyleSheet as De,Text as C,TextInput as Ae,TouchableOpacity as Me,View as T}from"react-native";import{useTranslation as je}from"../../i18n";import{useInspector as Ee}from"./InspectorContext";import H from"../TouchableScale";import Ne from"../AnimatedEntrance";import Oe from"../EndOfListFooter";import Je from"./FeatureUnderDevNotice";import Ge from"../HighlightText";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as k}from"../../styles/AppFonts";import{clearCrashRecords as Ue,simulateTestCrash as J}from"../../customHooks/crashHandler";import _e,{DEFAULT_CRASH_FILTERS as Z,isCrashFiltersDefault as M}from"./CrashFilterModal";import{ConfirmationModal as Qe}from"./ConfirmationModal";import{SearchIcon as Ke,ClearIcon as Xe,TrashIcon as Ye,TerminalIcon as Ze,LayersIcon as er,ClockIcon as Cr,ShieldAlertIcon as Tr,FlameIcon as Sr,JsIcon as Ce,HourglassIcon as Te,SkullIcon as kr,LayoutIcon as Se,ChipIcon as Be,AppleIcon as Br,AndroidIcon as Ir,RepeatIcon as Vr,CodeBracketsIcon as Fr,FilterIcon as Rr,ForwardChevronIcon as Hr}from"../NetworkIcons";const Pr=B=>{const P=Date.now(),N=Math.max(0,P-B),$=Math.floor(N/1e3),j=Math.floor($/60),D=Math.floor(j/60),E=Math.floor(D/24);return $<60?`${$}s ago`:j<60?`${j}m ago`:D<24?`${D}h ago`:`${E}d ago`},Ie=10,$r=He.memo(()=>{const{t:B}=je(),{crashRecords:P,setSelectedCrash:N,maxCrashLogs:$}=Ee(),j=$||50,D=Le(null),[E,Q]=A(j),[z,G]=A(""),[F,q]=A("all"),[S,K]=A(Z),[ze,X]=A(!1),[Ve,U]=A(!1);$e(()=>{Q($||50),D.current?.scrollToOffset({offset:0,animated:!1})},[z,F,S,$]);const V=Y(()=>{const t=P.length;let x=0,w=0,R=0,I=0,O=0;return P.forEach(W=>{W.isFatal&&x++,W.type==="js"?w++:W.type==="promise"?R++:W.type==="render"?I++:W.type==="native"&&O++}),{total:t,fatalCount:x,jsCount:w,promiseCount:R,renderCount:I,nativeCount:O}},[P]),L=Y(()=>{let t=P.filter(x=>{if(F==="fatal"&&!x.isFatal||F==="js"&&x.type!=="js"||F==="promise"&&x.type!=="promise"||F==="render"&&x.type!=="render"||F==="native"&&x.type!=="native"||S.types.size>0&&!S.types.has("all")&&!(S.types.has("fatal")&&x.isFatal||S.types.has("js")&&x.type==="js"||S.types.has("promise")&&x.type==="promise"||S.types.has("render")&&x.type==="render"||S.types.has("native")&&x.type==="native"))return!1;if(S.timeWindow!=="all"){const w=Date.now(),R=S.timeWindow==="15m"?w-900*1e3:S.timeWindow==="1h"?w-3600*1e3:S.timeWindow==="24h"?w-1440*60*1e3:w-10080*60*1e3;if(x.timestamp<R)return!1}if(S.platform!=="all"&&(x.deviceInfo?.platform||"").toLowerCase()!==S.platform)return!1;if(S.engine!=="all"){const w=x.deviceInfo?.isHermes;if(S.engine==="hermes"&&w!==!0||S.engine==="jsc"&&w===!0)return!1}if(z.trim().length>0){const w=z.trim().toLowerCase().split(/\s+/).filter(Boolean),R=[x.message||"",x.name||"",x.stack||"",x.type||"",x.deviceInfo?.platform||"",...(x.breadcrumbs||[]).map(I=>`${I.type||""} ${I.message||""}`)].join(" ").toLowerCase();return w.every(I=>R.includes(I))}return!0});return S.sortBy==="time_asc"&&(t=[...t].sort((x,w)=>x.timestamp-w.timestamp)),t},[P,F,z,S]),Fe=()=>{U(!0)},Re=Pe(({item:t,index:x})=>{const w=t.isFatal,R=t.type.toUpperCase(),I=t.parsedStack&&t.parsedStack.length>0?t.parsedStack.find(ve=>ve.isAppCode)||t.parsedStack[0]:null,O=t.type==="native"?`${e.errorColor}22`:t.type==="render"?`${e.purple}22`:t.type==="promise"?`${e.darkOrange}22`:`${e.offerPurple}22`,W=t.type==="native"?e.errorColor:t.type==="render"?e.purple:t.type==="promise"?e.darkOrange:e.offerPurple;return<Ne index={x}distance={8}>
2
+ <H onPress={()=>{N(t)}}style={[r.cardContainer,w&&r.fatalCardBorder]}>
3
3
 
4
- <C style={t.cardHeader}>
5
- <C style={t.badgeRow}>
6
- <C style={t.sNoBadge}>
7
- <T style={t.sNoBadgeText}>#{o+1}</T>
8
- </C>
9
-
10
- {x?<C style={t.fatalBadge}>
11
- <Ne size={10}color={e.white}/>
12
- <T style={t.fatalBadgeText}>{S("crash.fatalBadge")}</T>
13
- </C>:<C style={t.caughtBadge}>
14
- <T style={t.caughtBadgeText}>{S("crash.handledBadge")}</T>
15
- </C>}
16
-
17
- <C style={[t.typeBadge,{backgroundColor:O}]}>
18
- <T style={[t.typeBadgeText,{color:P}]}>
19
- {F}
20
- </T>
21
- </C>
22
- </C>
23
-
24
- <C style={t.timeRow}>
25
- <Oe size={11}color={e.grayTextWeak}/>
26
- <T style={t.timestampText}>
27
- {r.timeStr||new Date(r.timestamp).toLocaleTimeString()}
4
+ <T style={r.cardHeader}>
5
+ <T style={r.badgeRow}>
6
+ <T style={r.sNoBadge}>
7
+ <C style={r.sNoBadgeText}>#{x+1}</C>
28
8
  </T>
29
- <T style={t.relativeTimeText}>
30
- {bt(r.timestamp)}
9
+
10
+ {w?<T style={r.fatalBadge}>
11
+ <Sr size={10}color={e.white}/>
12
+ <C style={r.fatalBadgeText}>{B("crash.fatalBadge")}</C>
13
+ </T>:<T style={r.caughtBadge}>
14
+ <C style={r.caughtBadgeText}>{B("crash.handledBadge")}</C>
15
+ </T>}
16
+
17
+ <T style={[r.typeBadge,{backgroundColor:O}]}>
18
+ <C style={[r.typeBadgeText,{color:W}]}>
19
+ {R}
20
+ </C>
31
21
  </T>
32
- <Ct size={13}color={e.grayTextWeak}/>
33
- </C>
34
- </C>
22
+ </T>
23
+
24
+ <T style={r.timeRow}>
25
+ <Cr size={11}color={e.grayTextWeak}/>
26
+ <C style={r.timestampText}>
27
+ {t.timeStr||new Date(t.timestamp).toLocaleTimeString()}
28
+ </C>
29
+ <C style={r.relativeTimeText}>
30
+ {Pr(t.timestamp)}
31
+ </C>
32
+ <Hr size={13}color={e.grayTextWeak}/>
33
+ </T>
34
+ </T>
35
35
 
36
36
 
37
- <C style={{marginVertical:6}}>
38
- <Pe text={r.message||S("crash.unknownException")}highlight={B}numberOfLines={3}style={t.errorMessageText}/>
39
- </C>
37
+ <T style={{marginVertical:6}}>
38
+ <Ge text={t.message||B("crash.unknownException")}highlight={z}numberOfLines={3}style={r.errorMessageText}/>
39
+ </T>
40
40
 
41
41
 
42
- {I&&<C style={t.locationRow}>
43
- <Me size={12}color={e.grayTextWeak}/>
44
- <T numberOfLines={1}ellipsizeMode="middle"style={t.locationText}>
42
+ {I&&<T style={r.locationRow}>
43
+ <Ze size={12}color={e.grayTextWeak}/>
44
+ <C numberOfLines={1}ellipsizeMode="middle"style={r.locationText}>
45
45
  {I.method!=="<anonymous>"?`${I.method} `:""}
46
- <T style={{color:e.purple,fontFamily:k.interBold}}>
46
+ <C style={{color:e.purple,fontFamily:k.interBold}}>
47
47
  {I.file}:{I.lineNumber}
48
- </T>
49
- </T>
50
- </C>}
48
+ </C>
49
+ </C>
50
+ </T>}
51
51
 
52
52
 
53
- <C style={t.cardFooter}>
54
- <C style={{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"}}>
55
- {r.deviceInfo&&<C style={t.metaPill}>
56
- {r.deviceInfo.platform==="ios"?<Ge size={10}color={e.grayText}/>:r.deviceInfo.platform==="android"?<Ke size={10}color={e.grayText}/>:null}
57
- <T style={t.metaPillText}>
58
- {r.deviceInfo.platform?.toUpperCase()}{" "}
59
- {r.deviceInfo.osVersion||""}
60
- </T>
61
- </C>}
62
- {r.deviceInfo&&<C style={t.metaPill}>
63
- <T style={t.metaPillText}>
64
- {r.deviceInfo.isHermes?"Hermes":"JSC"}
65
- </T>
66
- </C>}
67
- {r.parsedStack&&r.parsedStack.length>0&&<C style={t.metaPill}>
68
- <Ye size={10}color={e.grayText}/>
69
- <T style={t.metaPillText}>
70
- {r.parsedStack.length}
71
- </T>
72
- </C>}
73
- {r.breadcrumbs&&r.breadcrumbs.length>0&&<C style={t.metaPill}>
74
- <Xe size={10}color={e.grayText}/>
75
- <T style={t.metaPillText}>
76
- {r.breadcrumbs.length} trail
77
- </T>
78
- </C>}
79
- {r.memoryInfo&&<C style={t.metaPill}>
80
- <T style={t.metaPillText}>
81
- {r.memoryInfo.usedJSHeapSize} MB
82
- </T>
83
- </C>}
84
- </C>
85
- </C>
86
- </M>
87
- </Fe>},[B,j]);return<C style={t.container}>
88
- {R.length>0&&<>
53
+ <T style={r.cardFooter}>
54
+ <T style={{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"}}>
55
+ {t.deviceInfo&&<T style={r.metaPill}>
56
+ {t.deviceInfo.platform==="ios"?<Br size={10}color={e.grayText}/>:t.deviceInfo.platform==="android"?<Ir size={10}color={e.grayText}/>:null}
57
+ <C style={r.metaPillText}>
58
+ {t.deviceInfo.platform?.toUpperCase()}{" "}
59
+ {t.deviceInfo.osVersion||""}
60
+ </C>
61
+ </T>}
62
+ {t.deviceInfo&&<T style={r.metaPill}>
63
+ <C style={r.metaPillText}>
64
+ {t.deviceInfo.isHermes?"Hermes":"JSC"}
65
+ </C>
66
+ </T>}
67
+ {t.parsedStack&&t.parsedStack.length>0&&<T style={r.metaPill}>
68
+ <Fr size={10}color={e.grayText}/>
69
+ <C style={r.metaPillText}>
70
+ {t.parsedStack.length}
71
+ </C>
72
+ </T>}
73
+ {t.breadcrumbs&&t.breadcrumbs.length>0&&<T style={r.metaPill}>
74
+ <Vr size={10}color={e.grayText}/>
75
+ <C style={r.metaPillText}>
76
+ {t.breadcrumbs.length} trail
77
+ </C>
78
+ </T>}
79
+ {t.memoryInfo&&<T style={r.metaPill}>
80
+ <C style={r.metaPillText}>
81
+ {t.memoryInfo.usedJSHeapSize} MB
82
+ </C>
83
+ </T>}
84
+ </T>
85
+ </T>
86
+ </H>
87
+ </Ne>},[z,N]);return<T style={r.container}>
88
+ {P.length>0&&<>
89
89
 
90
- <C style={t.statsBar}>
91
- <N horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={t.statsScrollContent}>
92
- <C style={[t.statChip,t.statChipActive]}>
93
- <T style={t.statChipValue}>{V.total}</T>
94
- <T style={t.statChipLabel}>{S("crash.statCrashes")}</T>
95
- </C>
90
+ <T style={r.statsBar}>
91
+ <_ horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={r.statsScrollContent}>
92
+ <T style={[r.statChip,r.statChipActive]}>
93
+ <C style={r.statChipValue}>{V.total}</C>
94
+ <C style={r.statChipLabel}>{B("crash.statCrashes")}</C>
95
+ </T>
96
96
 
97
- <C style={t.statChip}>
98
- <T style={[t.statChipValue,{color:e.errorColor}]}>
97
+ <T style={r.statChip}>
98
+ <C style={[r.statChipValue,{color:e.errorColor}]}>
99
99
  {V.fatalCount}
100
- </T>
101
- <T style={t.statChipLabel}>{S("crash.statFatal")}</T>
102
- </C>
100
+ </C>
101
+ <C style={r.statChipLabel}>{B("crash.statFatal")}</C>
102
+ </T>
103
103
 
104
- <C style={t.statChip}>
105
- <T style={[t.statChipValue,{color:e.offerPurple}]}>
104
+ <T style={r.statChip}>
105
+ <C style={[r.statChipValue,{color:e.offerPurple}]}>
106
106
  {V.jsCount}
107
- </T>
108
- <T style={t.statChipLabel}>{S("crash.statJsErrors")}</T>
109
- </C>
107
+ </C>
108
+ <C style={r.statChipLabel}>{B("crash.statJsErrors")}</C>
109
+ </T>
110
110
 
111
- <C style={t.statChip}>
112
- <T style={[t.statChipValue,{color:e.darkOrange}]}>
111
+ <T style={r.statChip}>
112
+ <C style={[r.statChipValue,{color:e.darkOrange}]}>
113
113
  {V.promiseCount}
114
- </T>
115
- <T style={t.statChipLabel}>{S("crash.statPromises")}</T>
116
- </C>
114
+ </C>
115
+ <C style={r.statChipLabel}>{B("crash.statPromises")}</C>
116
+ </T>
117
117
 
118
- <C style={t.statChip}>
119
- <T style={[t.statChipValue,{color:e.purple}]}>
118
+ <T style={r.statChip}>
119
+ <C style={[r.statChipValue,{color:e.purple}]}>
120
120
  {V.renderCount}
121
- </T>
122
- <T style={t.statChipLabel}>{S("crash.statRender")}</T>
123
- </C>
121
+ </C>
122
+ <C style={r.statChipLabel}>{B("crash.statRender")}</C>
123
+ </T>
124
124
 
125
- <C style={t.statChip}>
126
- <T style={[t.statChipValue,{color:e.skyBlue}]}>
125
+ <T style={r.statChip}>
126
+ <C style={[r.statChipValue,{color:e.skyBlue}]}>
127
127
  {V.nativeCount}
128
- </T>
129
- <T style={t.statChipLabel}>{S("crash.statNative")}</T>
130
- </C>
131
- </N>
132
- </C>
128
+ </C>
129
+ <C style={r.statChipLabel}>{B("crash.statNative")}</C>
130
+ </T>
131
+ </_>
132
+ </T>
133
133
 
134
134
 
135
- <C style={t.controlsContainer}>
136
- <C style={t.searchRow}>
137
- <C style={t.searchInputWrapper}>
138
- <$e color={e.grayTextWeak}size={14}/>
139
- <Se value={B}onChangeText={E}placeholder={S("crash.searchPlaceholder")}placeholderTextColor={e.grayTextWeak}style={t.searchInput}autoCapitalize="none"autoCorrect={!1}/>
140
- {B.length>0&&<C style={{flexDirection:"row",alignItems:"center",gap:4}}>
141
- <C style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
142
- <T style={{color:e.purple,fontSize:9.5,fontFamily:k.interBold}}>
143
- {H.length}
144
- </T>
145
- </C>
146
- <Ie onPress={()=>E("")}hitSlop={8}>
147
- <De color={e.grayTextWeak}size={14}/>
148
- </Ie>
149
- </C>}
150
- </C>
135
+ <T style={r.controlsContainer}>
136
+ <T style={r.searchRow}>
137
+ <T style={r.searchInputWrapper}>
138
+ <Ke color={e.grayTextWeak}size={14}/>
139
+ <Ae value={z}onChangeText={G}placeholder={B("crash.searchPlaceholder")}placeholderTextColor={e.grayTextWeak}style={r.searchInput}autoCapitalize="none"autoCorrect={!1}/>
140
+ {z.length>0&&<T style={{flexDirection:"row",alignItems:"center",gap:4}}>
141
+ <T style={{backgroundColor:`${e.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
142
+ <C style={{color:e.purple,fontSize:9.5,fontFamily:k.interBold}}>
143
+ {L.length}
144
+ </C>
145
+ </T>
146
+ <Me onPress={()=>G("")}hitSlop={8}>
147
+ <Xe color={e.grayTextWeak}size={14}/>
148
+ </Me>
149
+ </T>}
150
+ </T>
151
151
 
152
152
 
153
- <M onPress={()=>Q(!0)}style={[t.filterButton,!W(w)&&{borderColor:`${e.brandPurple}60`,backgroundColor:`${e.brandPurple}15`}]}>
154
- <Ze size={14}color={W(w)?e.grayTextStrong:e.brandPurple}/>
155
- {!W(w)&&<C style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:e.darkOrange,borderWidth:1,borderColor:e.white}}/>}
156
- </M>
153
+ <H onPress={()=>X(!0)}style={[r.filterButton,!M(S)&&{borderColor:`${e.brandPurple}60`,backgroundColor:`${e.brandPurple}15`}]}>
154
+ <Rr size={14}color={M(S)?e.grayTextStrong:e.brandPurple}/>
155
+ {!M(S)&&<T style={{position:"absolute",top:2,right:2,width:7,height:7,borderRadius:3.5,backgroundColor:e.darkOrange,borderWidth:1,borderColor:e.white}}/>}
156
+ </H>
157
157
 
158
158
 
159
- <M onPress={Y}style={t.clearButton}>
160
- <Ae size={14}color={e.errorColor}/>
161
- </M>
162
- </C>
159
+ <H onPress={Fe}style={r.clearButton}>
160
+ <Ye size={14}color={e.errorColor}/>
161
+ </H>
162
+ </T>
163
163
 
164
- <He featureName="Crash & Exception Sentinel"/>
164
+ <Je featureName="Crash & Exception Sentinel"/>
165
165
 
166
166
 
167
- <C style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
168
- <N horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
169
- {[{key:"all",label:S("crash.filterAll"),Icon:je,count:V.total,themeColor:e.purple},{key:"fatal",label:S("crash.filterFatal"),Icon:Ue,count:V.fatalCount,themeColor:e.errorColor},{key:"js",label:S("crash.filterJsError"),Icon:Je,count:V.jsCount,themeColor:e.amber600},{key:"promise",label:S("crash.filterPromise"),Icon:_e,count:V.promiseCount,themeColor:e.orange600},{key:"render",label:S("crash.filterRender"),Icon:Qe,count:V.renderCount,themeColor:e.violet600},{key:"native",label:S("crash.filterNative"),Icon:qe,count:V.nativeCount,themeColor:e.cyan600}].map(r=>{const o=z===r.key,x=r.themeColor||e.purple,F=o?e.white:x,I=r.Icon;return<M key={r.key}onPress={()=>_(r.key)}>
170
- <C style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:o?x:`${x}12`,borderWidth:1,borderColor:o?x:`${x}30`,gap:5}}>
171
- <I size={11}color={F}/>
172
- <T style={{fontFamily:k.interBold,fontSize:10.5,color:o?e.white:e.primaryBlack}}>
173
- {r.label}
174
- </T>
175
- <C style={{backgroundColor:o?"rgba(255,255,255,0.25)":`${x}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8,alignItems:"center",justifyContent:"center"}}>
176
- <T style={{fontFamily:k.interBold,fontSize:9.5,color:o?e.white:x}}>
177
- {r.count}
178
- </T>
167
+ <T style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
168
+ <_ horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
169
+ {[{key:"all",label:B("crash.filterAll"),Icon:er,count:V.total,themeColor:e.purple},{key:"fatal",label:B("crash.filterFatal"),Icon:kr,count:V.fatalCount,themeColor:e.errorColor},{key:"js",label:B("crash.filterJsError"),Icon:Ce,count:V.jsCount,themeColor:e.amber600},{key:"promise",label:B("crash.filterPromise"),Icon:Te,count:V.promiseCount,themeColor:e.orange600},{key:"render",label:B("crash.filterRender"),Icon:Se,count:V.renderCount,themeColor:e.violet600},{key:"native",label:B("crash.filterNative"),Icon:Be,count:V.nativeCount,themeColor:e.cyan600}].map(t=>{const x=F===t.key,w=t.themeColor||e.purple,R=x?e.white:w,I=t.Icon;return<H key={t.key}onPress={()=>q(t.key)}>
170
+ <T style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:x?w:`${w}12`,borderWidth:1,borderColor:x?w:`${w}30`,gap:5}}>
171
+ <I size={11}color={R}/>
172
+ <C style={{fontFamily:k.interBold,fontSize:10.5,color:x?e.white:e.primaryBlack}}>
173
+ {t.label}
179
174
  </C>
180
- </C>
181
- </M>})}
182
- </N>
183
- </C>
184
- </C>
175
+ <T style={{backgroundColor:x?"rgba(255,255,255,0.25)":`${w}20`,paddingHorizontal:5,paddingVertical:1,borderRadius:8,alignItems:"center",justifyContent:"center"}}>
176
+ <C style={{fontFamily:k.interBold,fontSize:9.5,color:x?e.white:w}}>
177
+ {t.count}
178
+ </C>
179
+ </T>
180
+ </T>
181
+ </H>})}
182
+ </_>
183
+ </T>
184
+ </T>
185
185
  </>}
186
186
 
187
187
 
188
- {H.length===0?<N contentContainerStyle={t.emptyContainer}showsVerticalScrollIndicator={!1}>
189
- <C style={t.emptyIconCircle}>
190
- <Ee size={38}color={e.greenColor}/>
191
- </C>
192
- <T style={t.emptyTitle}>
193
- {B.length>0?"No matching crash entries":z!=="all"||!W(w)?"No crashes match filters":S("crash.emptyTitle")}
188
+ {L.length===0?<_ contentContainerStyle={r.emptyContainer}showsVerticalScrollIndicator={!1}>
189
+ <T style={r.emptyIconCircle}>
190
+ <Tr size={38}color={e.greenColor}/>
194
191
  </T>
195
- <T style={t.emptySub}>
196
- {B?`No crash entries matched "${B}"`:z!=="all"||!W(w)?"Try adjusting your filters or search keywords.":S("crash.emptySubtitle")}
197
- </T>
198
- {(B.length>0||z!=="all"||!W(w))&&<M onPress={()=>{E(""),_("all"),U(G)}}style={{marginTop:10,paddingHorizontal:14,paddingVertical:7,borderRadius:8,backgroundColor:e.purple}}>
199
- <T style={{fontFamily:k.interBold,fontSize:11.5,color:e.white}}>
192
+ <C style={r.emptyTitle}>
193
+ {z.length>0?"No matching crash entries":F!=="all"||!M(S)?"No crashes match filters":B("crash.emptyTitle")}
194
+ </C>
195
+ <C style={r.emptySub}>
196
+ {z?`No crash entries matched "${z}"`:F!=="all"||!M(S)?"Try adjusting your filters or search keywords.":B("crash.emptySubtitle")}
197
+ </C>
198
+ {z.length>0||F!=="all"||!M(S)?<H onPress={()=>{G(""),q("all"),K(Z)}}style={{marginTop:10,paddingHorizontal:14,paddingVertical:7,borderRadius:8,backgroundColor:e.purple}}>
199
+ <C style={{fontFamily:k.interBold,fontSize:11.5,color:e.white}}>
200
200
  Clear Search & Filters
201
+ </C>
202
+ </H>:<T style={{marginTop:18,alignItems:"center",width:"100%",paddingHorizontal:16}}>
203
+ <C style={{fontFamily:k.interBold,fontSize:10.5,color:e.grayText,letterSpacing:.6,marginBottom:10}}>
204
+ TEST CRASH SENTINEL
205
+ </C>
206
+ <T style={{flexDirection:"row",gap:7,flexWrap:"wrap",justifyContent:"center"}}>
207
+ <H onPress={()=>J("js","Test JavaScript ReferenceError: variable is not defined",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${e.amber600}14`,borderWidth:1,borderColor:`${e.amber600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
208
+ <Ce size={11}color={e.amber600}/>
209
+ <C style={{fontFamily:k.interBold,fontSize:10.5,color:e.primaryBlack}}>
210
+ Simulate JS Crash
211
+ </C>
212
+ </H>
213
+
214
+ <H onPress={()=>J("native","Test Native Crash: SIGSEGV (Segmentation Fault)",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${e.cyan600}14`,borderWidth:1,borderColor:`${e.cyan600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
215
+ <Be size={11}color={e.cyan600}/>
216
+ <C style={{fontFamily:k.interBold,fontSize:10.5,color:e.primaryBlack}}>
217
+ Simulate Native Crash
218
+ </C>
219
+ </H>
220
+
221
+ <H onPress={()=>J("promise","Unhandled Promise Rejection: Gateway connection timed out",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${e.orange600}14`,borderWidth:1,borderColor:`${e.orange600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
222
+ <Te size={11}color={e.orange600}/>
223
+ <C style={{fontFamily:k.interBold,fontSize:10.5,color:e.primaryBlack}}>
224
+ Simulate Promise
225
+ </C>
226
+ </H>
227
+
228
+ <H onPress={()=>J("render","Render Error: Cannot read property of undefined in Component",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${e.violet600}14`,borderWidth:1,borderColor:`${e.violet600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
229
+ <Se size={11}color={e.violet600}/>
230
+ <C style={{fontFamily:k.interBold,fontSize:10.5,color:e.primaryBlack}}>
231
+ Simulate Render
232
+ </C>
233
+ </H>
201
234
  </T>
202
- </M>}
203
- </N>:<>
204
- <Ce ref={L}data={H.slice(0,D)}keyExtractor={r=>r.id}renderItem={Z}initialNumToRender={12}maxToRenderPerBatch={8}windowSize={5}removeClippedSubviews={be.OS==="android"}renderToHardwareTextureAndroid={!0}contentContainerStyle={t.listContent}showsVerticalScrollIndicator={!1}ListFooterComponent={H.length>0?<Re count={Math.min(D,H.length)}totalCount={H.length}label="crashes"loadMoreStep={K}hasMore={H.length>D}onLoadMore={()=>J(r=>r+K)}/>:null}/>
235
+ </T>}
236
+ </_>:<>
237
+ <We ref={D}data={L.slice(0,E)}keyExtractor={t=>t.id}renderItem={Re}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}style={{flex:1}}contentContainerStyle={[r.listContent,{flexGrow:1}]}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}keyboardShouldPersistTaps="handled"ListFooterComponent={L.length>0?<Oe count={Math.min(E,L.length)}totalCount={L.length}label="crashes"loadMoreStep={Ie}hasMore={L.length>E}onLoadMore={()=>Q(t=>t+Ie)}/>:null}/>
205
238
  </>}
206
239
 
207
240
 
208
- <We visible={X}onClose={()=>Q(!1)}filters={w}onApply={U}searchQuery={B}/>
209
- </C>});export default Tt;const t=Te.create({container:{flex:1,backgroundColor:e.grayBackground},statsBar:{backgroundColor:e.primaryLight,borderBottomWidth:1,borderBottomColor:e.grayBorderSecondary,paddingVertical:10},statsScrollContent:{paddingHorizontal:16,gap:8},statChip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:10,paddingVertical:5,borderRadius:8,backgroundColor:e.purpleShade50,borderWidth:1,borderColor:`${e.purple}14`},statChipActive:{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}33`},statChipValue:{fontFamily:k.interBold,fontSize:13,color:e.primaryBlack},statChipLabel:{fontFamily:k.interMedium,fontSize:11,color:e.grayText},controlsContainer:{paddingHorizontal:16,paddingTop:12,paddingBottom:6,backgroundColor:e.grayBackground},searchRow:{flexDirection:"row",alignItems:"center",gap:8},searchInputWrapper:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:e.primaryLight,borderWidth:1,borderColor:e.grayBorderSecondary,borderRadius:10,paddingHorizontal:10,height:38,gap:8},searchInput:{flex:1,fontFamily:k.interRegular,fontSize:13,color:e.primaryBlack,paddingVertical:0},clearButton:{width:38,height:38,borderRadius:10,backgroundColor:`${e.errorColor}14`,borderWidth:1,borderColor:`${e.errorColor}22`,alignItems:"center",justifyContent:"center"},filterButton:{width:38,height:38,borderRadius:10,backgroundColor:`${e.brandPurple}0F`,borderWidth:1,borderColor:`${e.brandPurple}30`,alignItems:"center",justifyContent:"center"},filterScrollContent:{paddingVertical:10,gap:6},filterChip:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:e.primaryLight,borderWidth:1,borderColor:e.grayBorderSecondary},filterChipActive:{backgroundColor:e.purple,borderColor:e.purple},filterChipText:{fontFamily:k.interMedium,fontSize:12,color:e.grayText},filterChipTextActive:{fontFamily:k.interBold,color:e.white},listContent:{paddingHorizontal:16,paddingTop:4,paddingBottom:24,gap:10},cardContainer:{backgroundColor:e.primaryLight,borderRadius:12,borderWidth:1,borderColor:e.grayBorderSecondary,padding:14,shadowColor:e.shadowColorString,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:3,elevation:2},fatalCardBorder:{borderColor:`${e.errorColor}44`},cardHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},badgeRow:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1},sNoBadge:{backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary,paddingHorizontal:6,paddingVertical:3,borderRadius:5},sNoBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.grayText,letterSpacing:.3},fatalBadge:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.errorColor,paddingHorizontal:6,paddingVertical:3,borderRadius:5},fatalBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.white,letterSpacing:.5},caughtBadge:{backgroundColor:`${e.greenColor}1F`,paddingHorizontal:6,paddingVertical:3,borderRadius:5},caughtBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.greenColor,letterSpacing:.5},typeBadge:{paddingHorizontal:6,paddingVertical:3,borderRadius:5},typeBadgeText:{fontFamily:k.interBold,fontSize:9.5,letterSpacing:.5},timeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1},timestampText:{fontFamily:k.interRegular,fontSize:11,color:e.grayTextWeak},relativeTimeText:{fontFamily:k.interBold,fontSize:10,color:e.grayTextWeak,backgroundColor:e.grayBackground,paddingHorizontal:5,paddingVertical:1,borderRadius:4,overflow:"hidden"},errorMessageText:{fontFamily:k.interBold,fontSize:13.5,color:e.primaryBlack,lineHeight:18},locationRow:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2,marginBottom:6,backgroundColor:e.purpleShade50,paddingHorizontal:8,paddingVertical:4,borderRadius:6},locationText:{fontFamily:k.interRegular,fontSize:11,color:e.grayText,flex:1},cardFooter:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:6,paddingTop:8,borderTopWidth:1,borderTopColor:e.dividerColor},metaPill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.purpleShade50,paddingHorizontal:6,paddingVertical:2,borderRadius:4},metaPillText:{fontFamily:k.interMedium,fontSize:10,color:e.grayTextWeak},emptyContainer:{flexGrow:1,alignItems:"center",justifyContent:"center",padding:32,paddingBottom:80},emptyIconCircle:{width:72,height:72,borderRadius:36,backgroundColor:`${e.greenColor}1F`,alignItems:"center",justifyContent:"center",marginBottom:16},emptyTitle:{fontFamily:k.interBold,fontSize:17,color:e.primaryBlack,marginBottom:6},emptySub:{fontFamily:k.interRegular,fontSize:13,color:e.grayText,textAlign:"center",lineHeight:18,maxWidth:280}});
241
+ <_e visible={ze}onClose={()=>X(!1)}filters={S}onApply={K}searchQuery={z}/>
242
+
243
+ <Qe visible={Ve}title={B("crash.clearTitle","Clear Crash Records")}message={B("crash.clearMessage","Are you sure you want to clear all intercepted crash records?")}confirmText={B("crash.clearConfirm","Clear All")}cancelText={B("crash.clearCancel","Cancel")}isDestructive={!0}icon="trash"onConfirm={()=>{U(!1),Ue()}}onCancel={()=>U(!1)}/>
244
+ </T>});export default $r;const r=De.create({container:{flex:1,backgroundColor:e.grayBackground},statsBar:{backgroundColor:e.primaryLight,borderBottomWidth:1,borderBottomColor:e.grayBorderSecondary,paddingVertical:10},statsScrollContent:{paddingHorizontal:8,gap:6},statChip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:10,paddingVertical:5,borderRadius:8,backgroundColor:e.purpleShade50,borderWidth:1,borderColor:`${e.purple}14`},statChipActive:{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}33`},statChipValue:{fontFamily:k.interBold,fontSize:13,color:e.primaryBlack},statChipLabel:{fontFamily:k.interMedium,fontSize:11,color:e.grayText},controlsContainer:{paddingHorizontal:8,paddingTop:10,paddingBottom:6,backgroundColor:e.grayBackground},searchRow:{flexDirection:"row",alignItems:"center",gap:8},searchInputWrapper:{flex:1,flexDirection:"row",alignItems:"center",backgroundColor:e.primaryLight,borderWidth:1,borderColor:e.grayBorderSecondary,borderRadius:10,paddingHorizontal:10,height:38,gap:8},searchInput:{flex:1,fontFamily:k.interRegular,fontSize:13,color:e.primaryBlack,paddingVertical:0},clearButton:{width:38,height:38,borderRadius:10,backgroundColor:`${e.errorColor}14`,borderWidth:1,borderColor:`${e.errorColor}22`,alignItems:"center",justifyContent:"center"},filterButton:{width:38,height:38,borderRadius:10,backgroundColor:`${e.brandPurple}0F`,borderWidth:1,borderColor:`${e.brandPurple}30`,alignItems:"center",justifyContent:"center"},filterScrollContent:{paddingVertical:10,gap:6},filterChip:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:5.5,borderRadius:8,backgroundColor:e.primaryLight,borderWidth:1,borderColor:e.grayBorderSecondary},filterChipActive:{backgroundColor:e.purple,borderColor:e.purple},filterChipText:{fontFamily:k.interMedium,fontSize:12,color:e.grayText},filterChipTextActive:{fontFamily:k.interBold,color:e.white},listContent:{paddingHorizontal:8,paddingTop:4,paddingBottom:24,gap:8},cardContainer:{backgroundColor:e.primaryLight,borderRadius:12,borderWidth:1,borderColor:e.grayBorderSecondary,padding:10,shadowColor:e.shadowColorString,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:3,elevation:2},fatalCardBorder:{borderColor:`${e.errorColor}44`},cardHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},badgeRow:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1},sNoBadge:{backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.grayBorderSecondary,paddingHorizontal:6,paddingVertical:3,borderRadius:5},sNoBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.grayText,letterSpacing:.3},fatalBadge:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.errorColor,paddingHorizontal:6,paddingVertical:3,borderRadius:5},fatalBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.white,letterSpacing:.5},caughtBadge:{backgroundColor:`${e.greenColor}1F`,paddingHorizontal:6,paddingVertical:3,borderRadius:5},caughtBadgeText:{fontFamily:k.interBold,fontSize:9.5,color:e.greenColor,letterSpacing:.5},typeBadge:{paddingHorizontal:6,paddingVertical:3,borderRadius:5},typeBadgeText:{fontFamily:k.interBold,fontSize:9.5,letterSpacing:.5},timeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1},timestampText:{fontFamily:k.interRegular,fontSize:11,color:e.grayTextWeak},relativeTimeText:{fontFamily:k.interBold,fontSize:10,color:e.grayTextWeak,backgroundColor:e.grayBackground,paddingHorizontal:5,paddingVertical:1,borderRadius:4,overflow:"hidden"},errorMessageText:{fontFamily:k.interBold,fontSize:13.5,color:e.primaryBlack,lineHeight:18},locationRow:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2,marginBottom:6,backgroundColor:e.purpleShade50,paddingHorizontal:8,paddingVertical:4,borderRadius:6},locationText:{fontFamily:k.interRegular,fontSize:11,color:e.grayText,flex:1},cardFooter:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginTop:6,paddingTop:8,borderTopWidth:1,borderTopColor:e.dividerColor},metaPill:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:e.purpleShade50,paddingHorizontal:6,paddingVertical:2,borderRadius:4},metaPillText:{fontFamily:k.interMedium,fontSize:10,color:e.grayTextWeak},emptyContainer:{flexGrow:1,alignItems:"center",justifyContent:"center",padding:32,paddingBottom:80},emptyIconCircle:{width:72,height:72,borderRadius:36,backgroundColor:`${e.greenColor}1F`,alignItems:"center",justifyContent:"center",marginBottom:16},emptyTitle:{fontFamily:k.interBold,fontSize:17,color:e.primaryBlack,marginBottom:6},emptySub:{fontFamily:k.interRegular,fontSize:13,color:e.grayText,textAlign:"center",lineHeight:18,maxWidth:280}});