react-native-inapp-inspector 2.5.9 → 2.5.10

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 (93) hide show
  1. package/dist/commonjs/components/Inspector/ConsoleExportModal.d.ts +10 -0
  2. package/dist/commonjs/components/Inspector/ConsoleExportModal.js +317 -0
  3. package/dist/commonjs/components/Inspector/ConsoleTab.js +20 -15
  4. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +34 -20
  5. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +49 -44
  6. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +3 -3
  7. package/dist/commonjs/components/SkeletonPlaceholder.js +3 -3
  8. package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
  9. package/dist/commonjs/constants/telemetryConfig.js +1 -1
  10. package/dist/commonjs/constants/version.d.ts +1 -1
  11. package/dist/commonjs/constants/version.js +1 -1
  12. package/dist/commonjs/helpers/shareFormatter.d.ts +15 -0
  13. package/dist/commonjs/helpers/shareFormatter.js +15 -8
  14. package/dist/commonjs/i18n/locales/ar.json +1 -1
  15. package/dist/commonjs/i18n/locales/bn.json +1 -1
  16. package/dist/commonjs/i18n/locales/de.json +1 -1
  17. package/dist/commonjs/i18n/locales/en.json +1 -1
  18. package/dist/commonjs/i18n/locales/es.json +1 -1
  19. package/dist/commonjs/i18n/locales/fr.json +1 -1
  20. package/dist/commonjs/i18n/locales/gu.json +1 -1
  21. package/dist/commonjs/i18n/locales/hi.json +1 -1
  22. package/dist/commonjs/i18n/locales/id.json +1 -1
  23. package/dist/commonjs/i18n/locales/it.json +1 -1
  24. package/dist/commonjs/i18n/locales/ja.json +1 -1
  25. package/dist/commonjs/i18n/locales/kn.json +1 -1
  26. package/dist/commonjs/i18n/locales/ko.json +1 -1
  27. package/dist/commonjs/i18n/locales/ml.json +1 -1
  28. package/dist/commonjs/i18n/locales/mr.json +1 -1
  29. package/dist/commonjs/i18n/locales/nl.json +1 -1
  30. package/dist/commonjs/i18n/locales/pa.json +1 -1
  31. package/dist/commonjs/i18n/locales/pl.json +1 -1
  32. package/dist/commonjs/i18n/locales/pt.json +1 -1
  33. package/dist/commonjs/i18n/locales/ru.json +1 -1
  34. package/dist/commonjs/i18n/locales/ta.json +1 -1
  35. package/dist/commonjs/i18n/locales/te.json +1 -1
  36. package/dist/commonjs/i18n/locales/tr.json +1 -1
  37. package/dist/commonjs/i18n/locales/vi.json +1 -1
  38. package/dist/commonjs/i18n/locales/zh.json +1 -1
  39. package/dist/esm/components/Inspector/ConsoleExportModal.d.ts +10 -0
  40. package/dist/esm/components/Inspector/ConsoleExportModal.js +317 -0
  41. package/dist/esm/components/Inspector/ConsoleTab.js +38 -33
  42. package/dist/esm/components/Inspector/MediaGalleryTab.js +88 -74
  43. package/dist/esm/components/Inspector/MediaPreviewModal.js +178 -173
  44. package/dist/esm/components/Inspector/SkeletonPlaceholder.js +11 -11
  45. package/dist/esm/components/SkeletonPlaceholder.js +11 -11
  46. package/dist/esm/constants/telemetryConfig.d.ts +3 -3
  47. package/dist/esm/constants/telemetryConfig.js +1 -1
  48. package/dist/esm/constants/version.d.ts +1 -1
  49. package/dist/esm/constants/version.js +1 -1
  50. package/dist/esm/helpers/shareFormatter.d.ts +15 -0
  51. package/dist/esm/helpers/shareFormatter.js +15 -8
  52. package/dist/esm/i18n/locales/ar.json +1 -1
  53. package/dist/esm/i18n/locales/bn.json +1 -1
  54. package/dist/esm/i18n/locales/de.json +1 -1
  55. package/dist/esm/i18n/locales/en.json +1 -1
  56. package/dist/esm/i18n/locales/es.json +1 -1
  57. package/dist/esm/i18n/locales/fr.json +1 -1
  58. package/dist/esm/i18n/locales/gu.json +1 -1
  59. package/dist/esm/i18n/locales/hi.json +1 -1
  60. package/dist/esm/i18n/locales/id.json +1 -1
  61. package/dist/esm/i18n/locales/it.json +1 -1
  62. package/dist/esm/i18n/locales/ja.json +1 -1
  63. package/dist/esm/i18n/locales/kn.json +1 -1
  64. package/dist/esm/i18n/locales/ko.json +1 -1
  65. package/dist/esm/i18n/locales/ml.json +1 -1
  66. package/dist/esm/i18n/locales/mr.json +1 -1
  67. package/dist/esm/i18n/locales/nl.json +1 -1
  68. package/dist/esm/i18n/locales/pa.json +1 -1
  69. package/dist/esm/i18n/locales/pl.json +1 -1
  70. package/dist/esm/i18n/locales/pt.json +1 -1
  71. package/dist/esm/i18n/locales/ru.json +1 -1
  72. package/dist/esm/i18n/locales/ta.json +1 -1
  73. package/dist/esm/i18n/locales/te.json +1 -1
  74. package/dist/esm/i18n/locales/tr.json +1 -1
  75. package/dist/esm/i18n/locales/vi.json +1 -1
  76. package/dist/esm/i18n/locales/zh.json +1 -1
  77. package/package.json +1 -1
  78. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  79. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  80. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  81. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  82. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  83. package/android/.gradle/8.9/gc.properties +0 -0
  84. package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
  85. package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
  86. package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
  87. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  88. package/android/.gradle/9.2.0/gc.properties +0 -0
  89. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  90. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  91. package/android/.gradle/vcs-1/gc.properties +0 -0
  92. package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
  93. package/android/build/reports/problems/problems-report.html +0 -659
@@ -1,23 +1,23 @@
1
- import B,{useEffect as R,useRef as x}from"react";import{Animated as k,StyleSheet as v,View as S}from"react-native";import{AppColors as w}from"../../styles/AppColors";export const SkeletonPlaceholder=B.memo(function({cardCount:C=4}){const b=x(new k.Value(.35)).current;return R(()=>{const f=k.loop(k.sequence([k.timing(b,{toValue:.85,duration:750,useNativeDriver:!1}),k.timing(b,{toValue:.35,duration:750,useNativeDriver:!1})]));return f.start(),()=>f.stop()},[b]),<S style={e.container}>
1
+ import x,{useEffect as v,useRef as D}from"react";import{Animated as f,StyleSheet as L,View as S}from"react-native";import{AppColors as b}from"../../styles/AppColors";export const SkeletonPlaceholder=x.memo(function({cardCount:B=4}){const C=D(new f.Value(.45)).current;return v(()=>{const V=f.loop(f.sequence([f.timing(C,{toValue:.95,duration:750,useNativeDriver:!1}),f.timing(C,{toValue:.45,duration:750,useNativeDriver:!1})]));return V.start(),()=>V.stop()},[C]),<S style={e.container}>
2
2
 
3
3
  <S style={e.toolbarSkeleton}>
4
- <k.View style={[e.searchBarSkeleton,{opacity:b}]}/>
4
+ <f.View style={[e.searchBarSkeleton,{opacity:C}]}/>
5
5
  <S style={e.actionButtonsRow}>
6
- <k.View style={[e.iconButtonSkeleton,{opacity:b}]}/>
7
- <k.View style={[e.iconButtonSkeleton,{opacity:b}]}/>
6
+ <f.View style={[e.iconButtonSkeleton,{opacity:C}]}/>
7
+ <f.View style={[e.iconButtonSkeleton,{opacity:C}]}/>
8
8
  </S>
9
9
  </S>
10
10
 
11
11
 
12
12
  <S style={e.chipStripSkeleton}>
13
- <k.View style={[e.chipSkeleton,{width:48,opacity:b}]}/>
14
- <k.View style={[e.chipSkeleton,{width:68,opacity:b}]}/>
15
- <k.View style={[e.chipSkeleton,{width:76,opacity:b}]}/>
16
- <k.View style={[e.chipSkeleton,{width:58,opacity:b}]}/>
13
+ <f.View style={[e.chipSkeleton,{width:48,opacity:C}]}/>
14
+ <f.View style={[e.chipSkeleton,{width:68,opacity:C}]}/>
15
+ <f.View style={[e.chipSkeleton,{width:76,opacity:C}]}/>
16
+ <f.View style={[e.chipSkeleton,{width:58,opacity:C}]}/>
17
17
  </S>
18
18
 
19
19
 
20
- {Array.from({length:C}).map((f,V)=><k.View key={`skeleton_card_${V}`}style={[e.cardSkeleton,{opacity:b}]}>
20
+ {Array.from({length:B}).map((V,R)=><f.View key={`skeleton_card_${R}`}style={[e.cardSkeleton,{opacity:C}]}>
21
21
 
22
22
  <S style={e.cardTopRow}>
23
23
  <S style={e.badgeGroup}>
@@ -36,5 +36,5 @@ import B,{useEffect as R,useRef as x}from"react";import{Animated as k,StyleSheet
36
36
  <S style={e.metaPillSkeleton}/>
37
37
  <S style={e.metaPillSkeleton}/>
38
38
  </S>
39
- </k.View>)}
40
- </S>});const e=v.create({container:{flex:1,paddingHorizontal:12,paddingTop:8},toolbarSkeleton:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},searchBarSkeleton:{flex:1,height:36,borderRadius:8,backgroundColor:w.graySurface,borderWidth:1,borderColor:w.dividerColor},actionButtonsRow:{flexDirection:"row",gap:6},iconButtonSkeleton:{width:36,height:36,borderRadius:8,backgroundColor:w.graySurface,borderWidth:1,borderColor:w.dividerColor},chipStripSkeleton:{flexDirection:"row",gap:6,marginBottom:10},chipSkeleton:{height:24,borderRadius:6,backgroundColor:w.graySurface,borderWidth:1,borderColor:w.dividerColor},cardSkeleton:{backgroundColor:w.primaryLight,borderRadius:10,padding:12,marginBottom:8,borderWidth:1,borderColor:w.dividerColor},cardTopRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},badgeGroup:{flexDirection:"row",alignItems:"center",gap:6},statusBadgeSkeleton:{width:38,height:18,borderRadius:4,backgroundColor:w.graySurface},methodBadgeSkeleton:{width:44,height:18,borderRadius:4,backgroundColor:w.graySurface},timeSkeleton:{width:48,height:12,borderRadius:4,backgroundColor:w.graySurface},urlLineLong:{height:13,borderRadius:4,backgroundColor:w.graySurface,marginBottom:5,width:"90%"},urlLineShort:{height:11,borderRadius:4,backgroundColor:w.graySurface,marginBottom:8,width:"55%"},cardBottomRow:{flexDirection:"row",gap:8,marginTop:2},metaPillSkeleton:{width:52,height:14,borderRadius:4,backgroundColor:w.graySurface}});export default SkeletonPlaceholder;
39
+ </f.View>)}
40
+ </S>});const e=L.create({container:{flex:1,paddingHorizontal:12,paddingTop:8},toolbarSkeleton:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},searchBarSkeleton:{flex:1,height:36,borderRadius:8,backgroundColor:b.graySurface,borderWidth:1,borderColor:b.dividerColor},actionButtonsRow:{flexDirection:"row",gap:6},iconButtonSkeleton:{width:36,height:36,borderRadius:8,backgroundColor:b.graySurface,borderWidth:1,borderColor:b.dividerColor},chipStripSkeleton:{flexDirection:"row",gap:6,marginBottom:10},chipSkeleton:{height:24,borderRadius:6,backgroundColor:b.graySurface,borderWidth:1,borderColor:b.dividerColor},cardSkeleton:{backgroundColor:b.primaryLight,borderRadius:10,padding:12,marginBottom:8,borderWidth:1,borderColor:b.dividerColor},cardTopRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},badgeGroup:{flexDirection:"row",alignItems:"center",gap:6},statusBadgeSkeleton:{width:38,height:18,borderRadius:4,backgroundColor:b.slate200},methodBadgeSkeleton:{width:44,height:18,borderRadius:4,backgroundColor:b.slate200},timeSkeleton:{width:48,height:12,borderRadius:4,backgroundColor:b.slate200},urlLineLong:{height:13,borderRadius:4,backgroundColor:b.slate200,marginBottom:5,width:"90%"},urlLineShort:{height:11,borderRadius:4,backgroundColor:b.slate200,marginBottom:8,width:"55%"},cardBottomRow:{flexDirection:"row",gap:8,marginTop:2},metaPillSkeleton:{width:52,height:14,borderRadius:4,backgroundColor:b.slate200}});export default SkeletonPlaceholder;
@@ -1,23 +1,23 @@
1
- import B,{useEffect as R,useRef as x}from"react";import{Animated as k,StyleSheet as v,View as S}from"react-native";import{AppColors as w}from"../styles/AppColors";export const SkeletonPlaceholder=B.memo(function({cardCount:C=4}){const b=x(new k.Value(.35)).current;return R(()=>{const f=k.loop(k.sequence([k.timing(b,{toValue:.85,duration:750,useNativeDriver:!1}),k.timing(b,{toValue:.35,duration:750,useNativeDriver:!1})]));return f.start(),()=>f.stop()},[b]),<S style={e.container}>
1
+ import x,{useEffect as v,useRef as D}from"react";import{Animated as f,StyleSheet as L,View as S}from"react-native";import{AppColors as b}from"../styles/AppColors";export const SkeletonPlaceholder=x.memo(function({cardCount:B=4}){const C=D(new f.Value(.45)).current;return v(()=>{const V=f.loop(f.sequence([f.timing(C,{toValue:.95,duration:750,useNativeDriver:!1}),f.timing(C,{toValue:.45,duration:750,useNativeDriver:!1})]));return V.start(),()=>V.stop()},[C]),<S style={e.container}>
2
2
 
3
3
  <S style={e.toolbarSkeleton}>
4
- <k.View style={[e.searchBarSkeleton,{opacity:b}]}/>
4
+ <f.View style={[e.searchBarSkeleton,{opacity:C}]}/>
5
5
  <S style={e.actionButtonsRow}>
6
- <k.View style={[e.iconButtonSkeleton,{opacity:b}]}/>
7
- <k.View style={[e.iconButtonSkeleton,{opacity:b}]}/>
6
+ <f.View style={[e.iconButtonSkeleton,{opacity:C}]}/>
7
+ <f.View style={[e.iconButtonSkeleton,{opacity:C}]}/>
8
8
  </S>
9
9
  </S>
10
10
 
11
11
 
12
12
  <S style={e.chipStripSkeleton}>
13
- <k.View style={[e.chipSkeleton,{width:48,opacity:b}]}/>
14
- <k.View style={[e.chipSkeleton,{width:68,opacity:b}]}/>
15
- <k.View style={[e.chipSkeleton,{width:76,opacity:b}]}/>
16
- <k.View style={[e.chipSkeleton,{width:58,opacity:b}]}/>
13
+ <f.View style={[e.chipSkeleton,{width:48,opacity:C}]}/>
14
+ <f.View style={[e.chipSkeleton,{width:68,opacity:C}]}/>
15
+ <f.View style={[e.chipSkeleton,{width:76,opacity:C}]}/>
16
+ <f.View style={[e.chipSkeleton,{width:58,opacity:C}]}/>
17
17
  </S>
18
18
 
19
19
 
20
- {Array.from({length:C}).map((f,V)=><k.View key={`skeleton_card_${V}`}style={[e.cardSkeleton,{opacity:b}]}>
20
+ {Array.from({length:B}).map((V,R)=><f.View key={`skeleton_card_${R}`}style={[e.cardSkeleton,{opacity:C}]}>
21
21
 
22
22
  <S style={e.cardTopRow}>
23
23
  <S style={e.badgeGroup}>
@@ -36,5 +36,5 @@ import B,{useEffect as R,useRef as x}from"react";import{Animated as k,StyleSheet
36
36
  <S style={e.metaPillSkeleton}/>
37
37
  <S style={e.metaPillSkeleton}/>
38
38
  </S>
39
- </k.View>)}
40
- </S>});const e=v.create({container:{flex:1,paddingHorizontal:12,paddingTop:8},toolbarSkeleton:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},searchBarSkeleton:{flex:1,height:36,borderRadius:8,backgroundColor:w.graySurface,borderWidth:1,borderColor:w.dividerColor},actionButtonsRow:{flexDirection:"row",gap:6},iconButtonSkeleton:{width:36,height:36,borderRadius:8,backgroundColor:w.graySurface,borderWidth:1,borderColor:w.dividerColor},chipStripSkeleton:{flexDirection:"row",gap:6,marginBottom:10},chipSkeleton:{height:24,borderRadius:6,backgroundColor:w.graySurface,borderWidth:1,borderColor:w.dividerColor},cardSkeleton:{backgroundColor:w.primaryLight,borderRadius:10,padding:12,marginBottom:8,borderWidth:1,borderColor:w.dividerColor},cardTopRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},badgeGroup:{flexDirection:"row",alignItems:"center",gap:6},statusBadgeSkeleton:{width:38,height:18,borderRadius:4,backgroundColor:w.graySurface},methodBadgeSkeleton:{width:44,height:18,borderRadius:4,backgroundColor:w.graySurface},timeSkeleton:{width:48,height:12,borderRadius:4,backgroundColor:w.graySurface},urlLineLong:{height:13,borderRadius:4,backgroundColor:w.graySurface,marginBottom:5,width:"90%"},urlLineShort:{height:11,borderRadius:4,backgroundColor:w.graySurface,marginBottom:8,width:"55%"},cardBottomRow:{flexDirection:"row",gap:8,marginTop:2},metaPillSkeleton:{width:52,height:14,borderRadius:4,backgroundColor:w.graySurface}});export default SkeletonPlaceholder;
39
+ </f.View>)}
40
+ </S>});const e=L.create({container:{flex:1,paddingHorizontal:12,paddingTop:8},toolbarSkeleton:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},searchBarSkeleton:{flex:1,height:36,borderRadius:8,backgroundColor:b.graySurface,borderWidth:1,borderColor:b.dividerColor},actionButtonsRow:{flexDirection:"row",gap:6},iconButtonSkeleton:{width:36,height:36,borderRadius:8,backgroundColor:b.graySurface,borderWidth:1,borderColor:b.dividerColor},chipStripSkeleton:{flexDirection:"row",gap:6,marginBottom:10},chipSkeleton:{height:24,borderRadius:6,backgroundColor:b.graySurface,borderWidth:1,borderColor:b.dividerColor},cardSkeleton:{backgroundColor:b.primaryLight,borderRadius:10,padding:12,marginBottom:8,borderWidth:1,borderColor:b.dividerColor},cardTopRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},badgeGroup:{flexDirection:"row",alignItems:"center",gap:6},statusBadgeSkeleton:{width:38,height:18,borderRadius:4,backgroundColor:b.slate200},methodBadgeSkeleton:{width:44,height:18,borderRadius:4,backgroundColor:b.slate200},timeSkeleton:{width:48,height:12,borderRadius:4,backgroundColor:b.slate200},urlLineLong:{height:13,borderRadius:4,backgroundColor:b.slate200,marginBottom:5,width:"90%"},urlLineShort:{height:11,borderRadius:4,backgroundColor:b.slate200,marginBottom:8,width:"55%"},cardBottomRow:{flexDirection:"row",gap:8,marginTop:2},metaPillSkeleton:{width:52,height:14,borderRadius:4,backgroundColor:b.slate200}});export default SkeletonPlaceholder;
@@ -1,3 +1,3 @@
1
- export declare const ENC_MID = "df8ace0290a695bd05986213";
2
- export declare const ENC_SEC = "db93cb0186b1f7bb0ba63a0d0a64997586849455ce37";
3
- export declare const TELEMETRY_SALT = "rn-inapp-inspector-telemetry-v1";
1
+ export declare const ENC_MID = "";
2
+ export declare const ENC_SEC = "";
3
+ export declare const TELEMETRY_SALT = "";
@@ -1 +1 @@
1
- export const ENC_MID="df8ace0290a695bd05986213",ENC_SEC="db93cb0186b1f7bb0ba63a0d0a64997586849455ce37",TELEMETRY_SALT="rn-inapp-inspector-telemetry-v1";
1
+ export const ENC_MID="",ENC_SEC="",TELEMETRY_SALT="";
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "2.5.9";
1
+ export declare const LIB_VERSION = "2.5.10";
@@ -1 +1 @@
1
- export const LIB_VERSION="2.5.9";
1
+ export const LIB_VERSION="2.5.10";
@@ -13,3 +13,18 @@ export declare function shareReduxReport(action: ReduxHistoryEntry): Promise<voi
13
13
  export declare function shareLogReport(log: ConsoleLog): Promise<void>;
14
14
  export declare function formatSocketReport(record: SocketConnectionRecord): string;
15
15
  export declare function shareSocketReport(record: SocketConnectionRecord): Promise<void>;
16
+ export type ConsoleLogExportFormat = 'txt' | 'log' | 'json' | 'text' | 'markdown' | 'csv';
17
+ export interface ConsoleLogExportOptions {
18
+ includeStackTrace?: boolean;
19
+ includeArguments?: boolean;
20
+ includeCaller?: boolean;
21
+ includeTimestamps?: boolean;
22
+ includeAppInfo?: boolean;
23
+ includeDuplicates?: boolean;
24
+ ignorePattern?: string;
25
+ }
26
+ export declare const DEFAULT_CONSOLE_EXPORT_OPTIONS: ConsoleLogExportOptions;
27
+ export declare function generateConsoleLogsFilename(format?: ConsoleLogExportFormat): string;
28
+ export declare function formatConsoleLogsExport(logs: ConsoleLog[], format?: ConsoleLogExportFormat, options?: ConsoleLogExportOptions): string;
29
+ export declare function estimateConsoleLogsExportSize(logs: ConsoleLog[], format?: ConsoleLogExportFormat, options?: ConsoleLogExportOptions): number;
30
+ export declare function shareConsoleLogs(logs: ConsoleLog[], format?: ConsoleLogExportFormat, options?: ConsoleLogExportOptions, customTitle?: string): Promise<void>;
@@ -1,8 +1,15 @@
1
- import{Alert as l,Share as $}from"react-native";import{formatDateTime as i,getCurlCommand as c}from"./index";function p(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}export function formatApiReport(e){const n=(e.method||"GET").toUpperCase(),t=e.status===0?"Failed / Network Error":e.status!=null?`${e.status} ${e.status===200?"OK":""}`.trim():"Pending",u=e.duration!=null?`${e.duration}ms`:"N/A",o=i(e.startTime||Date.now()),s=c(e),a=["\u{1F680} API INSPECTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Method: ${n}`,`\u{1F4CA} Status: ${t}`,`\u23F1\uFE0F Duration: ${u}`,`\u{1F552} Time: ${o}`];return e.client&&a.push(`\u{1F50C} Client: ${e.client.toUpperCase()}`),a.push(`\u{1F310} URL: ${e.url||"N/A"}`),a.push(""),e.requestHeaders&&Object.keys(e.requestHeaders).length>0&&(a.push("\u{1F4CB} Request Headers:"),a.push(p(e.requestHeaders)),a.push("")),e.request!=null&&e.request!==""&&(a.push("\u{1F4DD} Request Body:"),a.push(p(e.request)),a.push("")),e.responseHeaders&&Object.keys(e.responseHeaders).length>0&&(a.push("\u{1F4D1} Response Headers:"),a.push(p(e.responseHeaders)),a.push("")),e.response!=null&&e.response!==""&&(a.push("\u{1F4E5} Response Data:"),a.push(p(e.response)),a.push("")),s&&(a.push("\u{1F4BB} cURL Command:"),a.push(s),a.push("")),a.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),a.push("Generated by React Native InApp Inspector"),a.join(`
2
- `)}export function formatPushReport(e){const n=i(e.timestamp||Date.now()),t=(e.source||"push").toUpperCase(),u=(e.appState||"unknown").toUpperCase(),o=(e.action||"received").toUpperCase(),s=["\u{1F514} PUSH NOTIFICATION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Title: ${e.title||"(No Title)"}`,`\u{1F4DD} Body: ${e.body||"(No Body)"}`,`\u{1F3E2} Source: ${t}${e.domain?` (${e.domain})`:""}`,`\u{1F194} Message ID: ${e.id||"N/A"}`,`\u{1F4F1} App State: ${u}`,`\u{1F3AF} Action: ${o}`,`\u{1F552} Time: ${n}`];return e.subtitle&&s.push(`\u{1F4D1} Subtitle: ${e.subtitle}`),e.channelId&&s.push(`\u{1F3F7}\uFE0F Channel: ${e.channelId}`),e.priority&&s.push(`\u26A1 Priority: ${e.priority}`),e.badge!=null&&s.push(`\u{1F522} Badge: ${e.badge}`),e.sound&&s.push(`\u{1F50A} Sound: ${e.sound}`),e.imageUrl&&s.push(`\u{1F5BC}\uFE0F Image: ${e.imageUrl}`),s.push(""),e.data&&Object.keys(e.data).length>0&&(s.push("\u{1F4E6} Custom Data Payload:"),s.push(p(e.data)),s.push("")),e.customDomainAttributes&&Object.keys(e.customDomainAttributes).length>0&&(s.push("\u{1F3E2} Domain Attributes:"),s.push(p(e.customDomainAttributes)),s.push("")),e.rawPayload!=null&&(s.push("\u2699\uFE0F Raw Payload:"),s.push(p(e.rawPayload)),s.push("")),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
3
- `)}export function formatCrashReport(e){const n=`${e.dateStr||""} ${e.timeStr||""}`.trim()||i(e.timestamp),t=["\u{1F4A5} CRASH REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u26A0\uFE0F Error: ${e.name||"Error"}: ${e.message||"Unknown error"}`,`\u{1F6A8} Fatal: ${e.isFatal?"YES (Fatal)":"NO (Caught)"}`,`\u{1F3F7}\uFE0F Type: ${(e.type||"js").toUpperCase()}`,`\u{1F552} Time: ${n}`];return e.deviceInfo&&t.push(`\u{1F4F1} Platform: ${e.deviceInfo.platform||"N/A"} (OS: ${e.deviceInfo.osVersion||"N/A"}, RN: ${e.deviceInfo.rnVersion||"N/A"})`),e.memoryInfo?.usedJSHeapSize&&t.push(`\u{1F4BE} Used Heap: ${Math.round(e.memoryInfo.usedJSHeapSize/(1024*1024))} MB`),t.push(""),e.stack&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack),t.push("")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(`\u{1F43E} Breadcrumbs (${e.breadcrumbs.length}):`),e.breadcrumbs.slice(-10).forEach(u=>{t.push(` \u2022 [${u.type}] ${u.message} (${i(u.timestamp)})`)}),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
4
- `)}export function formatAnalyticsReport(e){const n=i(e.timestamp),t=["\u{1F4CA} ANALYTICS EVENT REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Event Name: ${e.name||"Unknown"}`,`\u{1F3E2} Source: ${(e.source||"manual").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`];return e.screenName&&t.push(`\u{1F4F1} Screen Name: ${e.screenName}`),e.userId&&t.push(`\u{1F464} User ID: ${e.userId}`),e.trackingId&&t.push(`\u{1F194} Tracking ID: ${e.trackingId}`),t.push(""),e.params&&Object.keys(e.params).length>0&&(t.push("\u{1F4E6} Event Parameters:"),t.push(p(e.params)),t.push("")),e.userProperties&&Object.keys(e.userProperties).length>0&&(t.push("\u{1F464} User Properties:"),t.push(p(e.userProperties)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
5
- `)}export function formatReduxReport(e){const n=typeof e.timestamp=="number"?i(e.timestamp):e.timestamp,t=["\u{1F504} REDUX ACTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Action Type: ${e.type||"UNKNOWN"}`,`\u{1F552} Timestamp: ${n}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),e.originType&&t.push(`\u2699\uFE0F Origin: ${e.originType}`),e.affectedSlices&&e.affectedSlices.length>0&&t.push(`\u{1F370} Slices: ${e.affectedSlices.join(", ")}`),t.push(""),t.push("\u{1F4E6} Action Payload:"),t.push(p(e.payload)),t.push(""),e.prevState!==void 0&&(t.push("\u23EE\uFE0F Previous State:"),t.push(p(e.prevState)),t.push("")),e.nextState!==void 0&&(t.push("\u23ED\uFE0F Next State:"),t.push(p(e.nextState)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
6
- `)}export function formatLogReport(e){const n=i(e.timestamp),t=["\u{1F4DC} CONSOLE LOG REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Level: ${(e.type||"info").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`,`\u{1F4AC} Message: ${e.message||""}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),t.push(""),e.rawArgs&&e.rawArgs.length>0&&(t.push("\u{1F4E6} Arguments:"),t.push(p(e.rawArgs)),t.push("")),(e.stack||e.errorStack)&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack||e.errorStack||""),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
7
- `)}async function r(e,n){try{await $.share({title:e,message:n},{dialogTitle:e})}catch(t){t?.message!=="User did not share"&&l.alert("Share Error",t?.message||"Failed to open share sheet")}}export async function shareApiReport(e){const n=formatApiReport(e),t=`API: ${e.method||"GET"} ${e.url?.substring(0,40)||""}`;await r(t,n)}export async function sharePushReport(e){const n=formatPushReport(e),t=`Push: ${e.title||e.id||"Notification"}`;await r(t,n)}export async function shareCrashReport(e){const n=formatCrashReport(e),t=`Crash: ${e.name||e.message||"Error"}`;await r(t,n)}export async function shareAnalyticsReport(e){const n=formatAnalyticsReport(e),t=`Analytics: ${e.name||"Event"}`;await r(t,n)}export async function shareReduxReport(e){const n=formatReduxReport(e),t=`Redux: ${e.type||"Action"}`;await r(t,n)}export async function shareLogReport(e){const n=formatLogReport(e),t=`Log: ${(e.type||"info").toUpperCase()} - ${e.message?.substring(0,30)||""}`;await r(t,n)}export function formatSocketReport(e){const n=(e.client||"websocket").toUpperCase(),t=(e.status||"open").toUpperCase(),u=e.duration!=null?`${e.duration}ms`:"Active / Open",o=i(e.startTime||Date.now()),s=["\u{1F50C} WEBSOCKET / SOCKET.IO REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4E1} Client: ${n}`,`\u{1F310} URL: ${e.url||"N/A"}`,`\u26A1 Status: ${t}`,`\u23F1\uFE0F Connected: ${o}`,`\u23F3 Duration: ${u}`,`\u{1F4E6} Total Frames: ${e.frames?.length||0} (${e.sentCount||0} sent, ${e.receivedCount||0} recvd)`,`\u{1F4CA} Data Size: ${(e.totalBytesSent||0)+(e.totalBytesReceived||0)} bytes`];return e.protocols&&s.push(`\u{1F4DC} Protocols: ${Array.isArray(e.protocols)?e.protocols.join(", "):e.protocols}`),e.closeCode!=null&&s.push(`\u{1F6D1} Close Code: ${e.closeCode} (${e.closeReason||"N/A"})`),e.error&&s.push(`\u274C Error: ${e.error}`),e.caller&&s.push(`\u{1F4CD} Caller: ${e.caller}`),e.query&&Object.keys(e.query).length>0&&(s.push(""),s.push("\u{1F50D} Query Parameters:"),s.push(p(e.query))),e.frames&&e.frames.length>0&&(s.push(""),s.push("\u{1F4AC} Recent Message Frames:"),e.frames.slice(-10).forEach((a,h)=>{const m=a.direction==="send"?"\u2B06\uFE0F SEND":"\u2B07\uFE0F RECV",f=a.eventName?` [${a.eventName}]`:"";s.push(`--- Frame #${h+1} (${m}${f}, ${a.type}, ${a.size||0}B) ---`),s.push(p(a.data))})),s.push(""),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
8
- `)}export async function shareSocketReport(e){const n=formatSocketReport(e),t=`Socket: ${e.client?.toUpperCase()||"WS"} ${e.url?.substring(0,35)||""}`;await r(t,n)}
1
+ import{Alert as b,Share as x}from"react-native";import{formatDateTime as c,getCurlCommand as P}from"./index";function r(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}export function formatApiReport(e){const n=(e.method||"GET").toUpperCase(),t=e.status===0?"Failed / Network Error":e.status!=null?`${e.status} ${e.status===200?"OK":""}`.trim():"Pending",i=e.duration!=null?`${e.duration}ms`:"N/A",o=c(e.startTime||Date.now()),s=P(e),a=["\u{1F680} API INSPECTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Method: ${n}`,`\u{1F4CA} Status: ${t}`,`\u23F1\uFE0F Duration: ${i}`,`\u{1F552} Time: ${o}`];return e.client&&a.push(`\u{1F50C} Client: ${e.client.toUpperCase()}`),a.push(`\u{1F310} URL: ${e.url||"N/A"}`),a.push(""),e.requestHeaders&&Object.keys(e.requestHeaders).length>0&&(a.push("\u{1F4CB} Request Headers:"),a.push(r(e.requestHeaders)),a.push("")),e.request!=null&&e.request!==""&&(a.push("\u{1F4DD} Request Body:"),a.push(r(e.request)),a.push("")),e.responseHeaders&&Object.keys(e.responseHeaders).length>0&&(a.push("\u{1F4D1} Response Headers:"),a.push(r(e.responseHeaders)),a.push("")),e.response!=null&&e.response!==""&&(a.push("\u{1F4E5} Response Data:"),a.push(r(e.response)),a.push("")),s&&(a.push("\u{1F4BB} cURL Command:"),a.push(s),a.push("")),a.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),a.push("Generated by React Native InApp Inspector"),a.join(`
2
+ `)}export function formatPushReport(e){const n=c(e.timestamp||Date.now()),t=(e.source||"push").toUpperCase(),i=(e.appState||"unknown").toUpperCase(),o=(e.action||"received").toUpperCase(),s=["\u{1F514} PUSH NOTIFICATION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Title: ${e.title||"(No Title)"}`,`\u{1F4DD} Body: ${e.body||"(No Body)"}`,`\u{1F3E2} Source: ${t}${e.domain?` (${e.domain})`:""}`,`\u{1F194} Message ID: ${e.id||"N/A"}`,`\u{1F4F1} App State: ${i}`,`\u{1F3AF} Action: ${o}`,`\u{1F552} Time: ${n}`];return e.subtitle&&s.push(`\u{1F4D1} Subtitle: ${e.subtitle}`),e.channelId&&s.push(`\u{1F3F7}\uFE0F Channel: ${e.channelId}`),e.priority&&s.push(`\u26A1 Priority: ${e.priority}`),e.badge!=null&&s.push(`\u{1F522} Badge: ${e.badge}`),e.sound&&s.push(`\u{1F50A} Sound: ${e.sound}`),e.imageUrl&&s.push(`\u{1F5BC}\uFE0F Image: ${e.imageUrl}`),s.push(""),e.data&&Object.keys(e.data).length>0&&(s.push("\u{1F4E6} Custom Data Payload:"),s.push(r(e.data)),s.push("")),e.customDomainAttributes&&Object.keys(e.customDomainAttributes).length>0&&(s.push("\u{1F3E2} Domain Attributes:"),s.push(r(e.customDomainAttributes)),s.push("")),e.rawPayload!=null&&(s.push("\u2699\uFE0F Raw Payload:"),s.push(r(e.rawPayload)),s.push("")),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
3
+ `)}export function formatCrashReport(e){const n=`${e.dateStr||""} ${e.timeStr||""}`.trim()||c(e.timestamp),t=["\u{1F4A5} CRASH REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u26A0\uFE0F Error: ${e.name||"Error"}: ${e.message||"Unknown error"}`,`\u{1F6A8} Fatal: ${e.isFatal?"YES (Fatal)":"NO (Caught)"}`,`\u{1F3F7}\uFE0F Type: ${(e.type||"js").toUpperCase()}`,`\u{1F552} Time: ${n}`];return e.deviceInfo&&t.push(`\u{1F4F1} Platform: ${e.deviceInfo.platform||"N/A"} (OS: ${e.deviceInfo.osVersion||"N/A"}, RN: ${e.deviceInfo.rnVersion||"N/A"})`),e.memoryInfo?.usedJSHeapSize&&t.push(`\u{1F4BE} Used Heap: ${Math.round(e.memoryInfo.usedJSHeapSize/(1024*1024))} MB`),t.push(""),e.stack&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack),t.push("")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(`\u{1F43E} Breadcrumbs (${e.breadcrumbs.length}):`),e.breadcrumbs.slice(-10).forEach(i=>{t.push(` \u2022 [${i.type}] ${i.message} (${c(i.timestamp)})`)}),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
4
+ `)}export function formatAnalyticsReport(e){const n=c(e.timestamp),t=["\u{1F4CA} ANALYTICS EVENT REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Event Name: ${e.name||"Unknown"}`,`\u{1F3E2} Source: ${(e.source||"manual").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`];return e.screenName&&t.push(`\u{1F4F1} Screen Name: ${e.screenName}`),e.userId&&t.push(`\u{1F464} User ID: ${e.userId}`),e.trackingId&&t.push(`\u{1F194} Tracking ID: ${e.trackingId}`),t.push(""),e.params&&Object.keys(e.params).length>0&&(t.push("\u{1F4E6} Event Parameters:"),t.push(r(e.params)),t.push("")),e.userProperties&&Object.keys(e.userProperties).length>0&&(t.push("\u{1F464} User Properties:"),t.push(r(e.userProperties)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
5
+ `)}export function formatReduxReport(e){const n=typeof e.timestamp=="number"?c(e.timestamp):e.timestamp,t=["\u{1F504} REDUX ACTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Action Type: ${e.type||"UNKNOWN"}`,`\u{1F552} Timestamp: ${n}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),e.originType&&t.push(`\u2699\uFE0F Origin: ${e.originType}`),e.affectedSlices&&e.affectedSlices.length>0&&t.push(`\u{1F370} Slices: ${e.affectedSlices.join(", ")}`),t.push(""),t.push("\u{1F4E6} Action Payload:"),t.push(r(e.payload)),t.push(""),e.prevState!==void 0&&(t.push("\u23EE\uFE0F Previous State:"),t.push(r(e.prevState)),t.push("")),e.nextState!==void 0&&(t.push("\u23ED\uFE0F Next State:"),t.push(r(e.nextState)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
6
+ `)}export function formatLogReport(e){const n=c(e.timestamp),t=["\u{1F4DC} CONSOLE LOG REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Level: ${(e.type||"info").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`,`\u{1F4AC} Message: ${e.message||""}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),t.push(""),e.rawArgs&&e.rawArgs.length>0&&(t.push("\u{1F4E6} Arguments:"),t.push(r(e.rawArgs)),t.push("")),(e.stack||e.errorStack)&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack||e.errorStack||""),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
7
+ `)}async function m(e,n){try{await x.share({title:e,message:n},{dialogTitle:e})}catch(t){t?.message!=="User did not share"&&b.alert("Share Error",t?.message||"Failed to open share sheet")}}export async function shareApiReport(e){const n=formatApiReport(e),t=`API: ${e.method||"GET"} ${e.url?.substring(0,40)||""}`;await m(t,n)}export async function sharePushReport(e){const n=formatPushReport(e),t=`Push: ${e.title||e.id||"Notification"}`;await m(t,n)}export async function shareCrashReport(e){const n=formatCrashReport(e),t=`Crash: ${e.name||e.message||"Error"}`;await m(t,n)}export async function shareAnalyticsReport(e){const n=formatAnalyticsReport(e),t=`Analytics: ${e.name||"Event"}`;await m(t,n)}export async function shareReduxReport(e){const n=formatReduxReport(e),t=`Redux: ${e.type||"Action"}`;await m(t,n)}export async function shareLogReport(e){const n=formatLogReport(e),t=`Log: ${(e.type||"info").toUpperCase()} - ${e.message?.substring(0,30)||""}`;await m(t,n)}export function formatSocketReport(e){const n=(e.client||"websocket").toUpperCase(),t=(e.status||"open").toUpperCase(),i=e.duration!=null?`${e.duration}ms`:"Active / Open",o=c(e.startTime||Date.now()),s=["\u{1F50C} WEBSOCKET / SOCKET.IO REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4E1} Client: ${n}`,`\u{1F310} URL: ${e.url||"N/A"}`,`\u26A1 Status: ${t}`,`\u23F1\uFE0F Connected: ${o}`,`\u23F3 Duration: ${i}`,`\u{1F4E6} Total Frames: ${e.frames?.length||0} (${e.sentCount||0} sent, ${e.receivedCount||0} recvd)`,`\u{1F4CA} Data Size: ${(e.totalBytesSent||0)+(e.totalBytesReceived||0)} bytes`];return e.protocols&&s.push(`\u{1F4DC} Protocols: ${Array.isArray(e.protocols)?e.protocols.join(", "):e.protocols}`),e.closeCode!=null&&s.push(`\u{1F6D1} Close Code: ${e.closeCode} (${e.closeReason||"N/A"})`),e.error&&s.push(`\u274C Error: ${e.error}`),e.caller&&s.push(`\u{1F4CD} Caller: ${e.caller}`),e.query&&Object.keys(e.query).length>0&&(s.push(""),s.push("\u{1F50D} Query Parameters:"),s.push(r(e.query))),e.frames&&e.frames.length>0&&(s.push(""),s.push("\u{1F4AC} Recent Message Frames:"),e.frames.slice(-10).forEach((a,$)=>{const g=a.direction==="send"?"\u2B06\uFE0F SEND":"\u2B07\uFE0F RECV",f=a.eventName?` [${a.eventName}]`:"";s.push(`--- Frame #${$+1} (${g}${f}, ${a.type}, ${a.size||0}B) ---`),s.push(r(a.data))})),s.push(""),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
8
+ `)}export async function shareSocketReport(e){const n=formatSocketReport(e),t=`Socket: ${e.client?.toUpperCase()||"WS"} ${e.url?.substring(0,35)||""}`;await m(t,n)}export const DEFAULT_CONSOLE_EXPORT_OPTIONS={includeStackTrace:!1,includeArguments:!1,includeCaller:!1,includeTimestamps:!1,includeAppInfo:!1,includeDuplicates:!1,ignorePattern:""};export function generateConsoleLogsFilename(e="txt"){const n=new Date,t=String(n.getDate()).padStart(2,"0"),i=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getFullYear()).slice(-2),s=Math.random().toString(36).substring(2,8).padEnd(6,"0");return`log_${t}${i}${o}_${s}.${e==="log"?"log":"txt"}`}export function formatConsoleLogsExport(e,n="txt",t=DEFAULT_CONSOLE_EXPORT_OPTIONS){if(!e||e.length===0)return"No console logs to export.";const{includeStackTrace:i=!1,includeArguments:o=!1,includeCaller:s=!1,includeTimestamps:a=!1,includeAppInfo:$=!1,includeDuplicates:g=!1,ignorePattern:f=""}=t;let C=e;if(f&&f.trim().length>0)try{const p=new RegExp(f.trim(),"i");C=e.filter(l=>{const S=l.message||"",d=l.rawArgs?r(l.rawArgs):"",y=l.caller||"";return!p.test(S)&&!p.test(d)&&!p.test(y)})}catch{}if(C.length===0)return"No console logs to export (all filtered out).";const R=new Date().toLocaleString(),h="********************************************************************************",A=[];$&&A.push(`/${h}`,` * \u{1F4DC} CONSOLE LOGS EXPORT (${n.toUpperCase()})`,` * \u{1F552} Exported At: ${R}`,` * \u{1F4CA} Total Logs: ${e.length}`," * \u2699\uFE0F Generator: React Native InApp Inspector",` ${h}/`,"");const N=e.map((p,l)=>{const S=l+1,d=c(p.timestamp),y=(p.type||"info").toUpperCase(),O=g&&p.duplicateCount&&p.duplicateCount>1?` [DUPLICATES: \xD7${p.duplicateCount}]`:"",u=[`/${h}`,` * \u{1F4CC} LOG #${S} Starts [${y}]${a?` - ${d}`:""}${O}`,` ${h}/`];if(s&&p.caller&&u.push(`\u{1F4CD} Caller: ${p.caller}`),a&&u.push(`\u{1F552} Time: ${d}`),u.push(`\u{1F3F7}\uFE0F Level: ${y}`),p.sourceMethod&&p.sourceMethod!==p.type&&u.push(`\u2699\uFE0F Method: console.${p.sourceMethod}()`),u.push(""),u.push("\u{1F4AC} Message:"),u.push(p.message||"(Empty message)"),o&&p.rawArgs&&p.rawArgs.length>0&&(u.push(""),u.push("\u{1F4E6} Arguments / Data:"),u.push(r(p.rawArgs))),i&&(p.stack||p.errorStack)){u.push(""),u.push("\u{1F4DC} Stack Trace & Frames:");const E=(p.stack||p.errorStack||"").split(`
9
+ `).map(I=>` ${I}`).join(`
10
+ `);u.push(E)}return u.push(""),u.push(`/${h}`),u.push(` * \u{1F3C1} LOG #${S} Ends`),u.push(` ${h}/`),u.join(`
11
+ `)}).join(`
12
+
13
+ `),T=$?["",`/${h}`," * \u{1F3C1} END OF CONSOLE LOGS EXPORT",` ${h}/`].join(`
14
+ `):"";return`${A.join(`
15
+ `)}${N}${T}`}export function estimateConsoleLogsExportSize(e,n="txt",t=DEFAULT_CONSOLE_EXPORT_OPTIONS){if(!e||e.length===0)return 0;const i=Math.min(e.length,20),o=e.slice(0,i),a=formatConsoleLogsExport(o,n,t).length/i;return Math.round(a*e.length)}export async function shareConsoleLogs(e,n="txt",t=DEFAULT_CONSOLE_EXPORT_OPTIONS,i){const o=formatConsoleLogsExport(e,n,t),s=generateConsoleLogsFilename(n);await m(i||s,o)}