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,166 +1,372 @@
1
- import{useState as z}from"react";import{Alert as Ve,Image as _,Modal as Me,Platform as V,Share as ee,StyleSheet as oe,Text as T,TouchableOpacity as A,View as C}from"react-native";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as S}from"../../styles/AppFonts";import R from"../TouchableScale";import{ChevronDownIcon as De,CopyIcon as L,ExpandCollapseIcon as We,FilmIcon as E,GifIcon as H,ImageIcon as Le,PauseIcon as Ee,PlayIcon as Ce,RepeatIcon as He,ShareIcon as Te,TrashIcon as Ue}from"../NetworkIcons";import{ScreenCapture as Ne}from"../../capture";import{copyImageOrMediaToClipboard as qe,formatBytes as Se}from"../../helpers";import{showToast as G}from"../../helpers/toast";import{useTranslation as Je}from"../../i18n";export const MediaPreviewModal=({item:t,visible:ve,onClose:M,onDelete:Ie,onConvertToGif:D})=>{const{t:r}=Je(),[U,N]=z(!1),[Ae,q]=z(!1),[P,Pe]=z(!1),[J,K]=z(!1),[Q,ze]=z("1.0x"),[$,Be]=z(!0),[W,Re]=z(.4);if(!t)return null;const O=()=>{t?.uri&&qe(t.uri,t.type==="image"?"Image":"Media")},X=async()=>{try{K(!0),await Ne.playVideo(t.uri)}catch{G(r("mediaGallery.playError","Unable to play video"))}finally{K(!1)}},$e=()=>{Ve.alert(r("mediaGallery.deleteTitle"),r("mediaGallery.deleteMessage",{filename:t.filename}),[{text:r("common.cancel"),style:"cancel"},{text:r("mediaGallery.delete"),style:"destructive",onPress:()=>{Ie(t),M()}}])},Fe=async()=>{if(D){N(!0);try{await D(t),G(r("mediaGallery.convertedSuccess"))}catch{G(r("mediaGallery.convertFailed"))}finally{N(!1)}}},Y=async()=>{try{const v=t.uri.startsWith("file://")||t.uri.startsWith("content://")||t.uri.startsWith("http")?t.uri:`file://${t.uri}`,Oe=V.select({ios:{url:v,title:t.filename},default:{title:t.filename,message:t.filename,url:v}});(await ee.share(Oe)).action===ee.sharedAction&&G(r("mediaGallery.shareSuccess","Shared successfully"))}catch(v){v?.message!=="User did not share"&&G(r("mediaGallery.shareUnavailable","Sharing not available on this device"))}},I=t.type==="video",F=t.type==="gif",B=t.durationMs?(t.durationMs/1e3).toFixed(1):null,Ge=B?`00:${Number(B)<10?"0":""}${B}`:"00:05.0",Z=!0;return<Me visible={ve}transparent={!0}animationType="fade"onRequestClose={M}>
2
- <C style={o.overlay}>
1
+ import fo,{useRef as J,useState as R}from"react";import{Dimensions as ge,Image as Tt,Modal as Ct,PanResponder as kt,Platform as je,SafeAreaView as To,ScrollView as Be,Share as St,StatusBar as Ue,StyleSheet as ee,Text as S,TextInput as Co,TouchableOpacity as A,View as T}from"react-native";import So from"react-native-linear-gradient";import Bt,{G as Bo,Line as Re,Path as Rt,Rect as Ro}from"react-native-svg";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as F}from"../../styles/AppFonts";import G from"../TouchableScale";import{ConfirmationModal as Mo}from"./ConfirmationModal";import{BlurIcon as Po,CircleIconOutline as Io,CloseWhite as Me,CopyIcon as Mt,CropIcon as Ao,EllipseIconOutline as Fo,FilmIcon as Xe,GifIcon as Ye,ImageIcon as $o,PenIcon as Vo,PlayIcon as Pt,RectangleIcon as Do,ResizeIcon as Oo,RotateIcon as It,ScissorsIcon as Wo,ShapesIcon as Lo,ShareIcon as Ho,TrashIcon as Go,TypeIcon as Eo,UndoIcon as Uo,VolumeXIcon as Xo,ZoomInIcon as Yo,ZoomOutIcon as Zo}from"../NetworkIcons";import{ScreenCapture as No}from"../../capture";import{MediaEditor as be}from"../../editor";import{copyImageOrMediaToClipboard as _o,formatBytes as Ze}from"../../helpers";import{showToast as E}from"../../helpers/toast";import{useTranslation as qo}from"../../i18n";import{triggerNativeHaptic as $}from"../../native/NativeInspector";const At=["#EF4444","#F59E0B","#38BDF8","#10B981","#A855F7","#FFFFFF","#0F172A"];export const MediaPreviewModal=({item:k,visible:Ne,onClose:Pe,onDelete:Ft,onConvertToGif:pe})=>{const{t:z}=qo(),[_e,qe]=R(!1),[ie,Y]=R(!1),[$t,re]=R(null),[Vt,ae]=R(k?.width),[Dt,le]=R(k?.height),[Ot,ne]=R(k?.sizeBytes),[Wt,Ie]=R(k?.durationMs),[Lt,Ae]=R(!1),[Ht,Ke]=R(!1),[Gt,Fe]=R(!1),[v,Z]=R("none"),[Je,me]=R(1),[se,Qe]=R(0),[$e,Et]=R("free"),[r,H]=R({x:.1,y:.15,width:.8,height:.7}),[N,et]=R("#EF4444"),[fe,jt]=R(4),[ye,we]=R([]),[Ve,xe]=R(null),[Ko,Ut]=R("rect"),[Xt,De]=R([]),[Yt,Te]=R([]),[Zt,ue]=R(!1),[tt,ot]=R(null),[Ce,ke]=R(""),[Nt,Oe]=R([]),Jo=J(null),[it,rt]=R({width:ge.get("window").width-16,height:ge.get("window").height*.72,pageX:0,pageY:0}),te=J(v);te.current=v;const at=J(N);at.current=N;const lt=J(fe);lt.current=fe;const nt=J(r);nt.current=r;const We=J(it);We.current=it;const _t=J(kt.create({onStartShouldSetPanResponder:()=>te.current==="draw",onMoveShouldSetPanResponder:()=>te.current==="draw",onPanResponderGrant:t=>{const{locationX:i,locationY:C}=t.nativeEvent;xe([{x:i,y:C}])},onPanResponderMove:t=>{const{locationX:i,locationY:C}=t.nativeEvent;xe(O=>O?[...O,{x:i,y:C}]:[{x:i,y:C}])},onPanResponderRelease:()=>{xe(t=>(t&&t.length>1&&we(i=>[...i,{id:`stroke_${Date.now()}_${Math.random()}`,points:t,color:at.current,strokeWidth:lt.current}]),null))}})).current,Se=J({mode:"none",startX:0,startY:0,origBox:{x:.08,y:.1,width:.84,height:.75}}),qt=J(kt.create({onStartShouldSetPanResponder:()=>te.current==="crop",onStartShouldSetPanResponderCapture:()=>te.current==="crop",onMoveShouldSetPanResponder:()=>te.current==="crop",onMoveShouldSetPanResponderCapture:()=>te.current==="crop",onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:t=>{const i=We.current,C=i.width>50?i.width:ge.get("window").width-16,O=i.height>50?i.height:ge.get("window").height*.72,{locationX:he,locationY:_}=t.nativeEvent,V=Math.max(0,Math.min(1,he/C)),I=Math.max(0,Math.min(1,_/O)),X=nt.current,q=X.x,Q=X.y,M=X.x+X.width,P=X.y+X.height,W=Math.max(.08,40/C),L=Math.max(.08,40/O);let B="none";Math.abs(V-q)<=W&&Math.abs(I-Q)<=L?B="tl":Math.abs(V-M)<=W&&Math.abs(I-Q)<=L?B="tr":Math.abs(V-q)<=W&&Math.abs(I-P)<=L?B="bl":Math.abs(V-M)<=W&&Math.abs(I-P)<=L?B="br":Math.abs(I-Q)<=L&&V>=q&&V<=M?B="top":Math.abs(I-P)<=L&&V>=q&&V<=M?B="bottom":Math.abs(V-q)<=W&&I>=Q&&I<=P?B="left":Math.abs(V-M)<=W&&I>=Q&&I<=P?B="right":V>=q&&V<=M&&I>=Q&&I<=P?B="center":B="new",Se.current={mode:B,startX:V,startY:I,origBox:{...X}}},onPanResponderMove:(t,i)=>{const C=We.current,O=C.width>0?C.width:ge.get("window").width-16,he=C.height>0?C.height:ge.get("window").height*.7;if(!O||!he)return;const _=i.dx/O,V=i.dy/he,{mode:I,startX:X,startY:q,origBox:Q}=Se.current,{x:M,y:P,width:W,height:L}=Q;if(I==="center"){const B=Math.max(0,Math.min(1-W,M+_)),j=Math.max(0,Math.min(1-L,P+V));H(Ee=>({...Ee,x:B,y:j}))}else if(I==="new"){const B=Math.max(0,Math.min(1,X+_)),j=Math.max(0,Math.min(1,q+V)),Ee=Math.min(X,B),bo=Math.min(q,j),po=Math.max(.04,Math.abs(B-X)),mo=Math.max(.04,Math.abs(j-q));H({x:Ee,y:bo,width:po,height:mo})}else if(I==="tl"){const B=Math.max(0,Math.min(M+W-.04,M+_)),j=Math.max(0,Math.min(P+L-.04,P+V));H({x:B,y:j,width:W-(B-M),height:L-(j-P)})}else if(I==="tr"){const B=Math.max(0,Math.min(P+L-.04,P+V)),j=Math.max(.04,Math.min(1-M,W+_));H({x:M,y:B,width:j,height:L-(B-P)})}else if(I==="bl"){const B=Math.max(0,Math.min(M+W-.04,M+_)),j=Math.max(.04,Math.min(1-P,L+V));H({x:B,y:P,width:W-(B-M),height:j})}else if(I==="br"){const B=Math.max(.04,Math.min(1-M,W+_)),j=Math.max(.04,Math.min(1-P,L+V));H({x:M,y:P,width:B,height:j})}else if(I==="top"){const B=Math.max(0,Math.min(P+L-.04,P+V));H({x:M,y:B,width:W,height:L-(B-P)})}else if(I==="bottom"){const B=Math.max(.04,Math.min(1-P,L+V));H({x:M,y:P,width:W,height:B})}else if(I==="left"){const B=Math.max(0,Math.min(M+W-.04,M+_));H({x:B,y:P,width:W-(B-M),height:L})}else if(I==="right"){const B=Math.max(.04,Math.min(1-M,W+_));H({x:M,y:P,width:B,height:L})}},onPanResponderRelease:()=>{Se.current.mode="none"},onPanResponderTerminate:()=>{Se.current.mode="none"}})).current;if(fo.useEffect(()=>{k?.uri&&(re(k.uri),ae(k.width),le(k.height),ne(k.sizeBytes),Ie(k.durationMs),Ae(!1),Qe(0),me(1),Z("none"),we([]),xe(null),De([]),Te([]),Oe([]),H({x:.08,y:.1,width:.84,height:.75}))},[k?.uri,k?.width,k?.height,k?.sizeBytes,k?.durationMs]),!k||!Ne)return null;const D=$t||k.uri,de=Vt??k.width,ce=Dt??k.height,st=Ot??k.sizeBytes,Le=Wt??k.durationMs,K=k.type==="video",dt=k.type==="gif",U=k.type==="image",Kt=se===90||se===270?de&&ce?Math.min(ce/de,de/ce,.75):.72:1,Jt=()=>{$("light"),me(t=>Math.min(4,parseFloat((t+.25).toFixed(2))))},Qt=()=>{$("light"),me(t=>Math.max(1,parseFloat((t-.25).toFixed(2))))},eo=()=>{$("medium"),me(1)},to=async()=>{if(!D||!U)return;$("light");const t=(se+90)%360;if(Qe(t),E(z("mediaGallery.rotatedSuccess",`Rotated ${t}\xB0`)),!ie){Y(!0);try{const i=await be.editPhoto({uri:D,rotation:90});i?.uri&&(re(i.uri),i.width&&ae(i.width),i.height&&le(i.height),i.size&&ne(i.size))}catch{}finally{Y(!1)}}},oo=()=>{$("light"),we(t=>t.slice(0,-1))},io=()=>{$("medium"),we([])},ro=t=>{$("light"),Z("crop"),Et(t),H(t==="1:1"?{x:.15,y:.2,width:.7,height:.7}:t==="4:3"?{x:.1,y:.2,width:.8,height:.6}:t==="16:9"?{x:.05,y:.25,width:.9,height:.506}:t==="9:16"?{x:.25,y:.1,width:.5,height:.888}:t==="3:2"?{x:.1,y:.2,width:.8,height:.533}:{x:.08,y:.1,width:.84,height:.75})},ao=async()=>{if(!(!D||!U)){$("medium"),Y(!0);try{const t=await be.cropToDefect(D,{x:r.x,y:r.y,width:r.width,height:r.height,isNormalized:!0});t?.uri&&(re(t.uri),t.width&&ae(t.width),t.height&&le(t.height),t.size&&ne(t.size),E(z("mediaGallery.croppedSuccess","Image Cropped")),Z("none"))}catch{E(z("mediaGallery.cropFailed","Crop failed"))}finally{Y(!1)}}},He=t=>{$("light"),Ut(t);const i={id:`shape_${Date.now()}`,type:t,x:.25,y:.35,width:t==="circle"?.4:.5,height:t==="circle"?.4:.25,color:N};De(C=>[...C,i]),E(z("mediaGallery.shapeAdded",`${t.toUpperCase()} Added`))},lo=()=>{$("light");const t={id:`blur_${Date.now()}`,x:.12,y:.35,width:.76,height:.12};Oe(i=>[...i,t]),E(z("mediaGallery.blurAdded","Blur Mask Added"))},ct=t=>{$("light"),t?(ot(t),ke(t.text)):(ot(null),ke("")),ue(!0)},no=()=>{if(!Ce.trim()){ue(!1);return}if(tt)Te(t=>t.map(i=>i.id===tt.id?{...i,text:Ce.trim(),color:N}:i));else{const t={id:`text_${Date.now()}`,text:Ce.trim(),x:.2,y:.4,color:o.white,bgColor:N==="#FFFFFF"?"#0F172A":N};Te(i=>[...i,t])}ue(!1),ke(""),E(z("mediaGallery.textAdded","Text Added"))},so=async t=>{if(!(!D||!U||ie)){$("medium"),Y(!0);try{const i=await be.editPhoto({uri:D,quality:.85,crop:{x:0,y:0,width:1,height:1,isNormalized:!0}});if(i?.uri){re(i.uri);const C=Math.round((de||1080)*t),O=Math.round((ce||1920)*t);ae(C),le(O),i.size&&ne(Math.round(i.size*t*t)),E(z("mediaGallery.resizedSuccess",`Resized to ${Math.round(t*100)}% (${C}\xD7${O})`)),Z("none")}}catch{E(z("mediaGallery.resizeFailed","Resize failed"))}finally{Y(!1)}}},Ge=()=>{D&&($("light"),_o(D,U?"Image":"Media"))},co=async()=>{try{$("light");const t=D.startsWith("file://")||D.startsWith("content://")||D.startsWith("http")?D:`file://${D}`,i=je.select({ios:{url:t,title:k.filename},default:{title:k.filename,message:k.filename,url:t}});(await St.share(i)).action===St.sharedAction&&E(z("mediaGallery.shareSuccess","Shared successfully"))}catch(t){t?.message!=="User did not share"&&E(z("mediaGallery.shareUnavailable","Sharing not available on this device"))}},ho=()=>{$("medium"),Fe(!0)},ht=async()=>{if(pe){qe(!0);try{await pe(k),E(z("mediaGallery.convertedSuccess","Converted to GIF!"))}catch{E(z("mediaGallery.convertFailed","Conversion failed"))}finally{qe(!1)}}},gt=async()=>{try{Ke(!0),await No.playVideo(D)}catch{E(z("mediaGallery.playError","Unable to play video"))}finally{Ke(!1)}},go=async()=>{if(!(!D||!K||ie)){Y(!0),$("light");try{const i=Math.min(Le||1e4,5e3),C=await be.trimReproClip(D,0,i,{quality:"medium"});C?.uri&&(re(C.uri),C.width&&ae(C.width),C.height&&le(C.height),C.size&&ne(C.size),C.durationMs&&Ie(C.durationMs),E(z("mediaGallery.trimmedSuccess","Trimmed to 5s Repro Clip")))}catch{E(z("mediaGallery.trimFailed","Trim failed"))}finally{Y(!1)}}},yo=async()=>{if(!(!D||!K||ie)){Y(!0),$("light");try{const t=await be.muteVideo(D);t?.uri&&(re(t.uri),t.width&&ae(t.width),t.height&&le(t.height),t.size&&ne(t.size),t.durationMs&&Ie(t.durationMs),E(z("mediaGallery.mutedSuccess","Audio Stripped")))}catch{E(z("mediaGallery.muteFailed","Mute failed"))}finally{Y(!1)}}},oe=Le?(Le/1e3).toFixed(1):null,uo=oe?`00:${Number(oe)<10?"0":""}${oe}`:null;return<Ct visible={Ne}transparent={!0}animationType="fade"statusBarTranslucent={!0}onRequestClose={Pe}>
2
+ <Ue translucent backgroundColor="transparent"barStyle="light-content"/>
3
+ <T style={e.overlay}>
3
4
 
4
- <C style={o.header}>
5
- <A activeOpacity={.8}onPress={O}style={o.headerLeft}>
6
- <C style={[o.badge,{borderColor:I?`${e.sky400}80`:F?`${e.warningAmber}80`:`${e.emerald500}80`,backgroundColor:I?`${e.sky400}20`:F?`${e.warningAmber}20`:`${e.emerald500}20`}]}>
7
- {I?<E size={13}color={e.sky400}/>:F?<H size={13}color={e.warningAmber}/>:<Le size={13}color={e.emerald500}/>}
8
- <T style={[o.badgeText,{color:I?e.sky400:F?e.warningAmber:e.emerald500}]}>
9
- {t.format.toUpperCase()}
5
+ <T style={e.header}>
6
+ <So colors={[o.indigo600,o.violet600]}start={{x:0,y:0}}end={{x:1,y:1}}style={ee.absoluteFill}pointerEvents="none"/>
7
+ <T style={e.headerInner}>
8
+ <A activeOpacity={.8}onPress={Ge}style={e.headerLeft}>
9
+ <T style={e.badge}>
10
+ {K?<Xe size={11}color={o.white}/>:dt?<Ye size={11}color={o.white}/>:<$o size={11}color={o.white}/>}
11
+ <S style={e.badgeText}>
12
+ {(k.format||(K?"mp4":dt?"gif":"png")).toUpperCase()}
13
+ </S>
10
14
  </T>
11
- </C>
12
- <C style={{flex:1,minWidth:0}}>
13
- <T style={o.title}numberOfLines={1}>
14
- {t.filename}
15
+ <T style={e.headerTextCol}>
16
+ <S style={e.title}numberOfLines={1}>
17
+ {k.filename||(k.uri?k.uri.split("/").pop():"")||"Capture"}
18
+ </S>
19
+ <S style={e.subtitle}numberOfLines={1}>
20
+ {Ze(st||0)}
21
+ {k.timestamp?` \u2022 ${new Date(k.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}`:""}
22
+ </S>
15
23
  </T>
16
- <T style={o.subtitle}>
17
- {Se(t.sizeBytes)} • {new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}
18
- </T>
19
- </C>
20
- </A>
24
+ </A>
21
25
 
22
-
23
- <C style={o.headerRight}>
24
- <R accessible={!0}accessibilityRole="button"accessibilityLabel={r("mediaGallery.copyUri","Copy URI")}onPress={O}style={o.headerActionBtn}hitSlop={{top:10,bottom:10,left:10,right:10}}>
25
- <L size={14}color={e.slate200}/>
26
- </R>
26
+
27
+ <T style={e.headerRight}>
28
+ {K&&pe&&<G accessible={!0}accessibilityRole="button"accessibilityLabel={z("mediaGallery.convertToGif","Convert to GIF")}onPress={ht}disabled={_e}style={[e.headerActionBtn,{backgroundColor:`${o.warningAmber}33`,borderColor:`${o.warningAmber}66`}]}hitSlop={{top:8,bottom:8,left:8,right:8}}>
29
+ <Ye size={13}color={o.warningAmber}/>
30
+ </G>}
27
31
 
28
- <R accessible={!0}accessibilityRole="button"accessibilityLabel={r("mediaGallery.share","Share")}onPress={Y}style={[o.headerActionBtn,{backgroundColor:`${e.sky400}20`,borderColor:`${e.sky400}60`}]}hitSlop={{top:10,bottom:10,left:10,right:10}}>
29
- <Te size={14}color={e.sky400}/>
30
- </R>
32
+ <G accessible={!0}accessibilityRole="button"accessibilityLabel={z("mediaGallery.copyUri","Copy URI")}onPress={Ge}style={e.headerActionBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
33
+ <Mt size={13}color={o.white}/>
34
+ </G>
31
35
 
32
- <R accessible={!0}accessibilityRole="button"accessibilityLabel={r("mediaGallery.delete")}onPress={$e}style={o.headerDeleteBtn}hitSlop={{top:10,bottom:10,left:10,right:10}}>
33
- <Ue size={14}color={e.red500}/>
34
- </R>
36
+ <G accessible={!0}accessibilityRole="button"accessibilityLabel={z("mediaGallery.share","Share")}onPress={co}style={e.headerActionBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
37
+ <Ho size={13}color={o.white}/>
38
+ </G>
35
39
 
36
- <A accessible={!0}accessibilityRole="button"accessibilityLabel={P?r("mediaGallery.collapse","Exit Fullscreen"):r("mediaGallery.expand","Expand Fullscreen")}onPress={()=>Pe(!P)}style={[o.headerIconBtn,P&&{backgroundColor:`${e.sky400}30`,borderColor:`${e.sky400}70`}]}hitSlop={{top:10,bottom:10,left:10,right:10}}>
37
- <We size={14}isExpanded={P}color={P?e.sky400:e.white}/>
38
- </A>
40
+ <G accessible={!0}accessibilityRole="button"accessibilityLabel={z("mediaGallery.delete","Delete")}onPress={ho}style={e.headerDeleteBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
41
+ <Go size={13}color={o.white}/>
42
+ </G>
39
43
 
40
- <A accessible={!0}accessibilityRole="button"accessibilityLabel={r("mediaGallery.minimize","Minimize")}onPress={M}style={o.headerIconBtn}hitSlop={{top:10,bottom:10,left:10,right:10}}>
41
- <De size={15}color={e.white}/>
42
- </A>
43
- </C>
44
- </C>
44
+ <A accessible={!0}accessibilityRole="button"accessibilityLabel={z("common.close","Close")}onPress={Pe}style={e.headerCloseBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
45
+ <Me size={12}/>
46
+ </A>
47
+ </T>
48
+ </T>
49
+ </T>
45
50
 
46
51
 
47
- <C style={[o.stage,P&&o.stageExpanded,!Z&&{paddingBottom:V.OS==="ios"?34:16}]}>
48
- <A activeOpacity={I?.9:1}onPress={I?X:void 0}style={[o.previewCard,P&&o.previewCardExpanded]}>
49
- {I?t.thumbnailUri&&!Ae?<>
50
- <_ source={{uri:t.thumbnailUri}}style={o.image}resizeMode="contain"onError={()=>q(!0)}/>
51
- <C style={o.videoImageOverlay}/>
52
- </>:<C style={o.videoFallbackBackdrop}>
53
- <C style={o.videoFallbackGlow}/>
54
- <E size={44}color={e.sky400}/>
55
- <T style={o.videoFallbackSubtitle}>
56
- {t.width&&t.height?`${t.width} \xD7 ${t.height}`:"HD Video"} • MP4
57
- </T>
58
- </C>:<_ source={{uri:t.uri}}style={o.image}resizeMode="contain"onError={()=>q(!0)}/>}
52
+ <To style={e.stageSafe}>
53
+ <T style={e.stage}>
54
+ <T onLayout={t=>{const{width:i,height:C}=t.nativeEvent.layout;i>20&&C>20&&rt(O=>({...O,width:i,height:C}))}}style={e.previewCard}>
55
+ {K?k.thumbnailUri&&!Lt?<>
56
+ <Tt source={{uri:k.thumbnailUri}}style={e.image}resizeMode="contain"onError={()=>Ae(!0)}/>
57
+ <T style={e.videoImageOverlay}/>
58
+ </>:<T style={e.videoFallbackBackdrop}>
59
+ <T style={e.videoFallbackGlow}/>
60
+ <Xe size={52}color={o.sky400}/>
61
+ <S style={e.videoFallbackTitle}>
62
+ {k.width&&k.height?`${k.width} \xD7 ${k.height}`:"HD Video Recording"}
63
+ </S>
64
+ <S style={e.videoFallbackSubtitle}>
65
+ {oe?`${oe}s duration`:"MP4 Video"} • {Ze(k.sizeBytes)}
66
+ </S>
67
+ </T>:<T onLayout={t=>{const{width:i,height:C}=t.nativeEvent.layout;i>20&&C>20&&rt(O=>({...O,width:i,height:C}))}}style={[e.canvasContainer,{transform:[{scale:Je*Kt},{rotate:`${se}deg`}]}]}{...v==="draw"?_t.panHandlers:{}}>
68
+ <Tt key={D}source={{uri:D}}style={e.image}resizeMode="contain"onError={()=>Ae(!0)}/>
59
69
 
60
-
61
- {I&&<C style={o.centerPlayOverlay}>
62
- <C style={o.centerPlayCircle}>
63
- <Ce size={28}color={e.white}/>
64
- </C>
65
- <T style={o.centerPlayText}>
66
- {r("mediaGallery.playVideo","Play Video")}
67
- </T>
68
- </C>}
70
+
71
+ <Bt style={ee.absoluteFill}pointerEvents={v==="draw"?"auto":"none"}>
72
+ <Bo>
73
+ {ye.map(t=>{if(t.points.length<2)return null;const i=t.points.reduce((C,O,he)=>he===0?`M ${O.x} ${O.y}`:`${C} L ${O.x} ${O.y}`,"");return<Rt key={t.id}d={i}stroke={t.color}strokeWidth={t.strokeWidth}strokeLinecap="round"strokeLinejoin="round"fill="none"/>})}
74
+ {Ve&&Ve.length>1&&<Rt d={Ve.reduce((t,i,C)=>C===0?`M ${i.x} ${i.y}`:`${t} L ${i.x} ${i.y}`,"")}stroke={N}strokeWidth={fe}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}
75
+ </Bo>
76
+ </Bt>
69
77
 
70
-
71
- {I&&<C style={o.videoBadgeOverlay}>
72
- <C style={o.playPill}>
73
- <E size={12}color={e.sky400}/>
74
- <T style={o.playPillText}>
75
- {B?`${B}s`:"VIDEO"}
76
- </T>
77
- </C>
78
- </C>}
78
+
79
+ {Xt.map(t=><T key={t.id}style={[e.shapeItem,{left:`${t.x*100}%`,top:`${t.y*100}%`,width:`${t.width*100}%`,height:`${t.height*100}%`,borderColor:t.color,borderRadius:t.type==="circle"?999:t.type==="ellipse"?36:8}]}>
80
+ <A style={e.shapeDeleteBadge}onPress={()=>{$("light"),De(i=>i.filter(C=>C.id!==t.id))}}>
81
+ <Me size={8}/>
82
+ </A>
83
+ </T>)}
79
84
 
80
-
81
- {F&&<C style={o.videoBadgeOverlay}>
82
- <C style={[o.playPill,{backgroundColor:`${e.warningAmber}CC`}]}>
83
- <H size={12}color={e.white}/>
84
- <T style={o.playPillText}>ANIMATED GIF</T>
85
- </C>
86
- </C>}
85
+
86
+ {Nt.map(t=><T key={t.id}style={[e.blurItem,{left:`${t.x*100}%`,top:`${t.y*100}%`,width:`${t.width*100}%`,height:`${t.height*100}%`}]}>
87
+ <S style={e.blurItemText}>PRIVACY MASK</S>
88
+ <A style={e.shapeDeleteBadge}onPress={()=>{$("light"),Oe(i=>i.filter(C=>C.id!==t.id))}}>
89
+ <Me size={8}/>
90
+ </A>
91
+ </T>)}
87
92
 
88
-
89
- <A activeOpacity={.8}onPress={O}style={o.floatingMetaBadge}>
90
- <L size={11}color={e.sky400}/>
91
- <T style={o.floatingMetaText}>
92
- {t.width&&t.height?`${t.width} \xD7 ${t.height} \u2022 `:""}
93
- {Se(t.sizeBytes)}
94
- </T>
95
- </A>
96
- </A>
97
- </C>
93
+
94
+ {Yt.map(t=><A key={t.id}activeOpacity={.85}onPress={()=>ct(t)}style={[e.textAnnotationPill,{left:`${t.x*100}%`,top:`${t.y*100}%`,backgroundColor:t.bgColor}]}>
95
+ <S style={[e.textAnnotationText,{color:t.color}]}>
96
+ {t.text}
97
+ </S>
98
+ <A style={e.textDeleteBtn}onPress={()=>{$("light"),Te(i=>i.filter(C=>C.id!==t.id))}}>
99
+ <Me size={8}/>
100
+ </A>
101
+ </A>)}
98
102
 
99
-
100
- {I&&<C style={o.videoControlsPanel}>
101
-
102
- <C style={o.progressSection}>
103
- <T style={o.timeLabel}>
104
- 00:0{Math.floor(W*(Number(B)||5))}
105
- </T>
106
- <A activeOpacity={.8}onPress={()=>Re(v=>v>=.9?.1:v+.3)}style={o.progressTrack}>
107
- <C style={[o.progressFill,{width:`${Math.max(10,Math.min(100,W*100))}%`}]}/>
108
- <C style={[o.scrubberThumb,{left:`${Math.max(8,Math.min(96,W*100))}%`}]}/>
109
- </A>
110
- <T style={o.timeLabel}>{Ge}</T>
111
- </C>
103
+
104
+ {v==="crop"&&<T style={e.cropOverlayMask}{...qt.panHandlers}>
105
+
106
+ <T pointerEvents="none"style={[e.cropDimMask,{top:0,left:0,right:0,height:`${r.y*100}%`}]}/>
107
+
108
+ <T pointerEvents="none"style={[e.cropDimMask,{top:`${(r.y+r.height)*100}%`,left:0,right:0,bottom:0}]}/>
109
+
110
+ <T pointerEvents="none"style={[e.cropDimMask,{top:`${r.y*100}%`,left:0,width:`${r.x*100}%`,height:`${r.height*100}%`}]}/>
111
+
112
+ <T pointerEvents="none"style={[e.cropDimMask,{top:`${r.y*100}%`,left:`${(r.x+r.width)*100}%`,right:0,height:`${r.height*100}%`}]}/>
113
+
114
+
115
+ <Bt style={ee.absoluteFill}pointerEvents="none">
116
+ <Ro x={`${r.x*100}%`}y={`${r.y*100}%`}width={`${r.width*100}%`}height={`${r.height*100}%`}stroke="#FFFFFF"strokeWidth="2.5"strokeDasharray="8, 5"fill="rgba(56, 189, 248, 0.10)"/>
117
+ <Re x1={`${r.x*100}%`}y1={`${(r.y+r.height*.333)*100}%`}x2={`${(r.x+r.width)*100}%`}y2={`${(r.y+r.height*.333)*100}%`}stroke="rgba(255, 255, 255, 0.55)"strokeWidth="1.2"strokeDasharray="4, 4"/>
118
+ <Re x1={`${r.x*100}%`}y1={`${(r.y+r.height*.666)*100}%`}x2={`${(r.x+r.width)*100}%`}y2={`${(r.y+r.height*.666)*100}%`}stroke="rgba(255, 255, 255, 0.55)"strokeWidth="1.2"strokeDasharray="4, 4"/>
119
+ <Re x1={`${(r.x+r.width*.333)*100}%`}y1={`${r.y*100}%`}x2={`${(r.x+r.width*.333)*100}%`}y2={`${(r.y+r.height)*100}%`}stroke="rgba(255, 255, 255, 0.55)"strokeWidth="1.2"strokeDasharray="4, 4"/>
120
+ <Re x1={`${(r.x+r.width*.666)*100}%`}y1={`${r.y*100}%`}x2={`${(r.x+r.width*.666)*100}%`}y2={`${(r.y+r.height)*100}%`}stroke="rgba(255, 255, 255, 0.55)"strokeWidth="1.2"strokeDasharray="4, 4"/>
121
+ </Bt>
122
+
123
+
124
+ <T pointerEvents="none"style={[e.cropBoxFrame,{left:`${r.x*100}%`,top:`${r.y*100}%`,width:`${r.width*100}%`,height:`${r.height*100}%`}]}>
125
+
126
+ <T style={[e.cropCornerBracket,e.bracketTL]}/>
127
+ <T style={[e.cropCornerBracket,e.bracketTR]}/>
128
+ <T style={[e.cropCornerBracket,e.bracketBL]}/>
129
+ <T style={[e.cropCornerBracket,e.bracketBR]}/>
130
+
131
+
132
+ <T style={e.cropEdgeBarTop}/>
133
+ <T style={e.cropEdgeBarBottom}/>
134
+ <T style={e.cropEdgeBarLeft}/>
135
+ <T style={e.cropEdgeBarRight}/>
136
+
137
+
138
+ <T style={e.cropCenterPill}>
139
+ <S style={e.cropCenterPillText}>
140
+ {$e.toUpperCase()} • {Math.round(r.width*100)}% × {Math.round(r.height*100)}%
141
+ </S>
142
+ </T>
143
+ </T>
144
+ </T>}
145
+ </T>}
112
146
 
113
-
114
- <C style={o.controlsRow}>
115
147
 
116
- <A onPress={X}style={o.controlActionPill}>
117
- {J?<Ee size={14}color={e.sky400}/>:<Ce size={14}color={e.sky400}/>}
118
- <T style={[o.controlActionText,{color:e.sky400}]}>
119
- {J?r("mediaGallery.pause","Pause"):r("mediaGallery.play","Play")}
120
- </T>
121
- </A>
148
+ {K&&<A activeOpacity={.9}onPress={gt}style={e.centerPlayContainer}>
149
+ <T style={e.centerPlayGlow}/>
150
+ <T style={e.centerPlayCircle}>
151
+ <Pt size={28}color={o.white}/>
152
+ </T>
153
+ <T style={e.centerPlayPill}>
154
+ <S style={e.centerPlayText}>
155
+ {Ht?z("mediaGallery.playing","Playing Video..."):z("mediaGallery.playVideo","Play Video")}
156
+ </S>
157
+ </T>
158
+ </A>}
122
159
 
123
160
 
124
- <C style={o.speedGroup}>
125
- {["1.0x","1.5x","2.0x"].map(v=><A key={v}onPress={()=>ze(v)}style={[o.speedBtn,Q===v&&o.speedBtnActive]}>
126
- <T style={[o.speedText,Q===v&&o.speedTextActive]}>
127
- {v}
128
- </T>
129
- </A>)}
130
- </C>
161
+ {K&&<T style={e.topLeftBadgeOverlay}pointerEvents="none">
162
+ <T style={e.metaPill}>
163
+ <Xe size={11}color={o.sky400}/>
164
+ <S style={e.metaPillText}>
165
+ {uo||(oe?`${oe}s`:"VIDEO")}
166
+ </S>
167
+ </T>
168
+ </T>}
131
169
 
132
170
 
133
- <A onPress={()=>Be(!$)}style={[o.loopPill,$&&o.loopPillActive]}>
134
- <He size={12}color={$?e.sky400:e.whiteAlpha60}/>
135
- <T style={[o.loopText,$&&o.loopTextActive]}>
136
- {$?"Loop: ON":"Loop: OFF"}
171
+ {U&&se>0&&<T style={e.topLeftBadgeOverlay}pointerEvents="none">
172
+ <T style={[e.metaPill,{backgroundColor:"rgba(99, 102, 241, 0.90)"}]}>
173
+ <It size={11}color={o.white}/>
174
+ <S style={e.metaPillText}>{se}°</S>
175
+ </T>
176
+ </T>}
177
+
178
+
179
+ <A activeOpacity={.8}onPress={Ge}style={e.bottomRightBadgeOverlay}>
180
+ <T style={e.metaPill}>
181
+ <Mt size={10}color={o.sky400}/>
182
+ <S style={e.metaPillText}>
183
+ {de&&ce?`${de} \xD7 ${ce} \u2022 `:""}
184
+ {Ze(st)}
185
+ </S>
137
186
  </T>
138
187
  </A>
139
- </C>
140
- </C>}
141
188
 
142
-
143
- {Z&&<C style={o.footer}>
144
- <R onPress={O}style={[o.actionBtn,{backgroundColor:e.whiteAlpha08,borderColor:e.whiteAlpha15}]}>
145
- <L size={14}color={e.slate200}/>
146
- <T style={[o.actionText,{color:e.slate200}]}>
147
- {r("mediaGallery.copyUri","Copy URI")}
148
- </T>
149
- </R>
189
+
190
+ {U&&<T style={e.floatingZoomBar}>
191
+ <G onPress={Jt}style={e.zoomBtn}accessibilityLabel="Zoom In">
192
+ <Yo size={15}color={o.white}/>
193
+ </G>
194
+
195
+ <A onPress={eo}activeOpacity={.8}style={e.zoomLevelBadge}>
196
+ <S style={e.zoomLevelText}>
197
+ {Math.round(Je*100)}%
198
+ </S>
199
+ </A>
150
200
 
151
- {D&&I&&<R onPress={Fe}disabled={U}style={[o.actionBtn,{backgroundColor:`${e.warningAmber}22`,borderColor:`${e.warningAmber}70`}]}>
152
- <H size={15}color={e.warningAmber}/>
153
- <T style={[o.actionText,{color:e.warningAmber}]}>
154
- {r(U?"mediaGallery.converting":"mediaGallery.convertToGif")}
201
+ <G onPress={Qt}style={e.zoomBtn}accessibilityLabel="Zoom Out">
202
+ <Zo size={15}color={o.white}/>
203
+ </G>
204
+ </T>}
205
+ </T>
206
+
207
+
208
+ {U&&v==="crop"&&<T style={e.cropSubToolBar}>
209
+
210
+ <T style={e.cropActionHeaderRow}>
211
+ <S style={e.cropHeaderTitle}>Drag box or corners to crop</S>
212
+ <T style={e.cropActionButtons}>
213
+ <A onPress={()=>Z("none")}style={e.cancelActionBtn}>
214
+ <S style={e.cancelActionText}>Cancel</S>
215
+ </A>
216
+ <A onPress={ao}style={e.applyActionBtn}>
217
+ <S style={e.applyActionText}>Apply Crop</S>
218
+ </A>
219
+ </T>
155
220
  </T>
156
- </R>}
157
221
 
158
- <R onPress={Y}style={[o.actionBtn,{backgroundColor:`${e.sky400}22`,borderColor:`${e.sky400}70`}]}>
159
- <Te size={14}color={e.sky400}/>
160
- <T style={[o.actionText,{color:e.sky400,fontFamily:S.interSemiBold}]}>
161
- {r("mediaGallery.share","Share")}
162
- </T>
163
- </R>
164
- </C>}
165
- </C>
166
- </Me>};const o=oe.create({overlay:{flex:1,backgroundColor:e.mediaModalBg,justifyContent:"space-between"},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingTop:V.OS==="ios"?52:20,paddingBottom:14,borderBottomWidth:1,borderBottomColor:e.borderGlassLight,backgroundColor:e.headerGlassDark},headerLeft:{flexDirection:"row",alignItems:"center",gap:10,flex:1,minWidth:0,marginRight:10},headerRight:{flexDirection:"row",alignItems:"center",gap:8},badge:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,borderWidth:1},badgeText:{fontFamily:S.interBold,fontSize:10.5,letterSpacing:.4},title:{fontFamily:S.interSemiBold,fontSize:13.5,color:e.white},subtitle:{fontFamily:S.interRegular,fontSize:11,color:e.whiteAlpha60,marginTop:1},headerActionBtn:{width:32,height:32,borderRadius:16,backgroundColor:e.whiteAlpha12,borderWidth:1,borderColor:e.whiteAlpha20,alignItems:"center",justifyContent:"center"},headerShareBtn:{width:32,height:32,borderRadius:16,backgroundColor:`${e.sky400}20`,borderWidth:1,borderColor:`${e.sky400}60`,alignItems:"center",justifyContent:"center"},headerDeleteBtn:{width:32,height:32,borderRadius:16,backgroundColor:`${e.red500}20`,borderWidth:1,borderColor:`${e.red500}60`,alignItems:"center",justifyContent:"center"},headerIconBtn:{width:32,height:32,borderRadius:16,backgroundColor:e.whiteAlpha12,borderWidth:1,borderColor:e.whiteAlpha20,alignItems:"center",justifyContent:"center"},stage:{flex:1,alignItems:"center",justifyContent:"center",paddingHorizontal:10,paddingTop:10,paddingBottom:10},stageExpanded:{paddingHorizontal:0,paddingTop:0,paddingBottom:0},previewCard:{flex:1,width:"100%",borderRadius:14,overflow:"hidden",backgroundColor:e.mediaDarkTile,borderWidth:1,borderColor:e.borderGlassLight,alignItems:"center",justifyContent:"center",position:"relative"},previewCardExpanded:{borderRadius:0,borderWidth:0},image:{width:"100%",height:"100%"},videoImageOverlay:{...oe.absoluteFillObject,backgroundColor:"rgba(5, 7, 13, 0.25)"},videoFallbackBackdrop:{flex:1,width:"100%",backgroundColor:e.mediaPlayerBg,alignItems:"center",justifyContent:"center",gap:8},videoFallbackGlow:{position:"absolute",width:140,height:140,borderRadius:70,backgroundColor:`${e.sky400}18`},videoFallbackTitle:{fontFamily:S.interSemiBold,fontSize:15,color:e.white,marginTop:8},videoFallbackSubtitle:{fontFamily:S.interRegular,fontSize:12,color:e.whiteAlpha60},centerPlayOverlay:{position:"absolute",alignItems:"center",justifyContent:"center",gap:8},centerPlayCircle:{width:64,height:64,borderRadius:32,backgroundColor:`${e.sky400}E0`,alignItems:"center",justifyContent:"center",paddingLeft:3,shadowColor:e.sky400,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:10,elevation:8},centerPlayText:{fontFamily:S.interSemiBold,fontSize:13,color:e.white,letterSpacing:.3,textShadowColor:"rgba(0,0,0,0.7)",textShadowOffset:{width:0,height:1},textShadowRadius:3},videoBadgeOverlay:{position:"absolute",bottom:12,left:12},playPill:{flexDirection:"row",alignItems:"center",gap:6,backgroundColor:`${e.slate900}D9`,paddingHorizontal:10,paddingVertical:5,borderRadius:16,borderWidth:1,borderColor:e.whiteAlpha20},playPillText:{fontFamily:S.interSemiBold,fontSize:11,color:e.white,letterSpacing:.3},floatingMetaBadge:{position:"absolute",bottom:10,backgroundColor:`${e.slate900}D9`,paddingHorizontal:10,paddingVertical:4.5,borderRadius:8,borderWidth:1,borderColor:e.whiteAlpha15,alignItems:"center",justifyContent:"center"},floatingMetaText:{fontFamily:S.interMedium,fontSize:10.5,color:e.slate200,letterSpacing:.2},videoControlsPanel:{paddingHorizontal:16,paddingTop:8,paddingBottom:6,backgroundColor:e.headerGlassDark,borderTopWidth:1,borderTopColor:e.borderGlassLight,gap:8},progressSection:{flexDirection:"row",alignItems:"center",gap:10},timeLabel:{fontFamily:S.interMedium,fontSize:11,color:e.whiteAlpha60,minWidth:42},progressTrack:{flex:1,height:6,borderRadius:3,backgroundColor:e.whiteAlpha15,justifyContent:"center",position:"relative"},progressFill:{height:"100%",borderRadius:3,backgroundColor:e.sky400},scrubberThumb:{position:"absolute",width:12,height:12,borderRadius:6,backgroundColor:e.white,borderWidth:2,borderColor:e.sky400,top:-3,marginLeft:-6},controlsRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:2},controlActionPill:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:5,borderRadius:6,backgroundColor:`${e.sky400}18`,borderWidth:1,borderColor:`${e.sky400}50`},controlActionText:{fontFamily:S.interSemiBold,fontSize:11.5},speedGroup:{flexDirection:"row",alignItems:"center",backgroundColor:e.whiteAlpha08,borderRadius:6,borderWidth:1,borderColor:e.whiteAlpha12,padding:2,gap:2},speedBtn:{paddingHorizontal:7,paddingVertical:3,borderRadius:4},speedBtnActive:{backgroundColor:`${e.sky400}30`},speedText:{fontFamily:S.interMedium,fontSize:10.5,color:e.whiteAlpha60},speedTextActive:{color:e.sky400,fontFamily:S.interBold},loopPill:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:5,borderRadius:6,backgroundColor:e.whiteAlpha08,borderWidth:1,borderColor:e.whiteAlpha12},loopPillActive:{backgroundColor:`${e.sky400}18`,borderColor:`${e.sky400}50`},loopText:{fontFamily:S.interMedium,fontSize:10.5,color:e.whiteAlpha60},loopTextActive:{color:e.sky400,fontFamily:S.interSemiBold},footer:{flexDirection:"row",alignItems:"center",justifyContent:"center",flexWrap:"wrap",gap:8,paddingHorizontal:16,paddingTop:8,paddingBottom:V.OS==="ios"?34:16,borderTopWidth:1,borderTopColor:e.borderGlassLight,backgroundColor:e.headerGlassDark},actionBtn:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:16,paddingVertical:9,borderRadius:8,backgroundColor:e.whiteAlpha08,borderWidth:1,borderColor:e.whiteAlpha15},actionText:{fontFamily:S.interMedium,fontSize:12,color:e.white}});
222
+
223
+ <Be horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={e.subToolScroll}>
224
+ {["free","1:1","4:3","16:9","9:16","3:2"].map(t=><A key={t}onPress={()=>ro(t)}style={[e.ratioChip,$e===t&&e.ratioChipActive]}>
225
+ <S style={[e.ratioChipText,$e===t&&e.ratioChipTextActive]}>
226
+ {t.toUpperCase()}
227
+ </S>
228
+ </A>)}
229
+ </Be>
230
+ </T>}
231
+
232
+ {U&&v==="resize"&&<T style={e.subToolBar}>
233
+ <Be horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={e.subToolScroll}>
234
+ {[{label:"75% HD",scale:.75},{label:"50% Half",scale:.5},{label:"25% Mini",scale:.25}].map(t=><A key={t.label}onPress={()=>so(t.scale)}style={e.ratioChip}>
235
+ <S style={e.ratioChipText}>{t.label}</S>
236
+ </A>)}
237
+ <A onPress={()=>Z("none")}style={e.cancelActionBtn}>
238
+ <S style={e.cancelActionText}>Done</S>
239
+ </A>
240
+ </Be>
241
+ </T>}
242
+
243
+ {U&&v==="draw"&&<T style={e.subToolBar}>
244
+ <Be horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={e.subToolScroll}>
245
+ {At.map(t=><A key={t}onPress={()=>{$("light"),et(t)}}style={[e.colorDot,{backgroundColor:t},N===t&&e.colorDotActive]}/>)}
246
+ <T style={e.subDivider}/>
247
+ {[2,4,8].map(t=><A key={t}onPress={()=>{$("light"),jt(t)}}style={[e.strokeWidthBtn,fe===t&&e.strokeWidthBtnActive]}>
248
+ <T style={[e.strokeDot,{width:t+2,height:t+2,backgroundColor:N}]}/>
249
+ </A>)}
250
+ <A onPress={oo}disabled={ye.length===0}style={[e.actionPillBtn,ye.length===0&&{opacity:.4}]}>
251
+ <Uo size={13}color={o.white}/>
252
+ <S style={e.actionPillText}>Undo</S>
253
+ </A>
254
+ <A onPress={io}disabled={ye.length===0}style={[e.actionPillBtn,ye.length===0&&{opacity:.4}]}>
255
+ <S style={e.actionPillText}>Clear</S>
256
+ </A>
257
+ </Be>
258
+ </T>}
259
+
260
+ {U&&v==="shapes"&&<T style={e.subToolBar}>
261
+ <Be horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={e.subToolScroll}>
262
+ <A onPress={()=>He("rect")}style={e.shapeOptionBtn}>
263
+ <Do size={14}color={o.sky400}/>
264
+ <S style={e.shapeOptionText}>Rectangle</S>
265
+ </A>
266
+ <A onPress={()=>He("circle")}style={e.shapeOptionBtn}>
267
+ <Io size={14}color={o.amber400}/>
268
+ <S style={e.shapeOptionText}>Circle</S>
269
+ </A>
270
+ <A onPress={()=>He("ellipse")}style={e.shapeOptionBtn}>
271
+ <Fo size={14}color={o.violet600}/>
272
+ <S style={e.shapeOptionText}>Ellipse</S>
273
+ </A>
274
+ <T style={e.subDivider}/>
275
+ {At.slice(0,4).map(t=><A key={t}onPress={()=>{$("light"),et(t)}}style={[e.colorDot,{backgroundColor:t},N===t&&e.colorDotActive]}/>)}
276
+ </Be>
277
+ </T>}
278
+
279
+
280
+ <T style={e.bottomTesterDock}>
281
+ {U&&<>
282
+ <G onPress={()=>Z(v==="crop"?"none":"crop")}style={[e.dockToolBtn,v==="crop"&&e.dockToolBtnActive]}>
283
+ <Ao size={16}color={v==="crop"?o.white:o.sky400}/>
284
+ <S style={[e.dockToolLabel,v==="crop"&&{color:o.white}]}>
285
+ Crop
286
+ </S>
287
+ </G>
288
+
289
+ <G onPress={()=>Z(v==="resize"?"none":"resize")}style={[e.dockToolBtn,v==="resize"&&e.dockToolBtnActive]}>
290
+ <Oo size={16}color={v==="resize"?o.white:o.emerald400}/>
291
+ <S style={[e.dockToolLabel,v==="resize"&&{color:o.white}]}>
292
+ Resize
293
+ </S>
294
+ </G>
295
+
296
+ <G onPress={()=>Z(v==="draw"?"none":"draw")}style={[e.dockToolBtn,v==="draw"&&e.dockToolBtnActive]}>
297
+ <Vo size={16}color={v==="draw"?o.white:o.rose400}/>
298
+ <S style={[e.dockToolLabel,v==="draw"&&{color:o.white}]}>
299
+ Draw
300
+ </S>
301
+ </G>
302
+
303
+ <G onPress={()=>Z(v==="shapes"?"none":"shapes")}style={[e.dockToolBtn,v==="shapes"&&e.dockToolBtnActive]}>
304
+ <Lo size={16}color={v==="shapes"?o.white:o.amber400}/>
305
+ <S style={[e.dockToolLabel,v==="shapes"&&{color:o.white}]}>
306
+ Shapes
307
+ </S>
308
+ </G>
309
+
310
+ <G onPress={()=>ct()}style={e.dockToolBtn}>
311
+ <Eo size={16}color={o.indigo400}/>
312
+ <S style={e.dockToolLabel}>Text</S>
313
+ </G>
314
+
315
+ <G onPress={lo}style={e.dockToolBtn}>
316
+ <Po size={16}color={o.sky300}/>
317
+ <S style={e.dockToolLabel}>Blur</S>
318
+ </G>
319
+
320
+ <G onPress={to}style={e.dockToolBtn}>
321
+ <It size={16}color={o.violet600}/>
322
+ <S style={e.dockToolLabel}>Rotate</S>
323
+ </G>
324
+ </>}
325
+
326
+ {K&&<>
327
+ <G onPress={go}disabled={ie}style={e.dockToolBtn}>
328
+ <Wo size={16}color={o.sky400}/>
329
+ <S style={e.dockToolLabel}>{z("media.trim5s","Trim 5s")}</S>
330
+ </G>
331
+
332
+ <G onPress={yo}disabled={ie}style={e.dockToolBtn}>
333
+ <Xo size={16}color={o.amber400}/>
334
+ <S style={e.dockToolLabel}>{z("media.muteAudio","Mute Audio")}</S>
335
+ </G>
336
+
337
+ {pe&&<G onPress={ht}disabled={_e}style={e.dockToolBtn}>
338
+ <Ye size={16}color={o.violet600}/>
339
+ <S style={e.dockToolLabel}>{z("media.toGif","To GIF")}</S>
340
+ </G>}
341
+
342
+ <G onPress={gt}style={[e.dockToolBtn,e.dockPrimaryBtn]}>
343
+ <Pt size={16}color={o.white}/>
344
+ <S style={[e.dockToolLabel,{color:o.white}]}>{z("media.play","Play")}</S>
345
+ </G>
346
+ </>}
347
+ </T>
348
+ </T>
349
+ </To>
350
+ </T>
351
+
352
+
353
+ <Ct visible={Zt}transparent={!0}animationType="fade"onRequestClose={()=>ue(!1)}>
354
+ <T style={e.modalBackdrop}>
355
+ <T style={e.textModalCard}>
356
+ <S style={e.textModalTitle}>Add Text Note / Callout</S>
357
+ <Co style={e.textModalInput}placeholder="e.g. Defect: Button overlap"placeholderTextColor="rgba(255,255,255,0.4)"value={Ce}onChangeText={ke}autoFocus={!0}multiline={!0}/>
358
+ <T style={e.textModalActions}>
359
+ <A onPress={()=>ue(!1)}style={e.modalCancelBtn}>
360
+ <S style={e.modalCancelText}>Cancel</S>
361
+ </A>
362
+ <A onPress={no}style={e.modalConfirmBtn}>
363
+ <S style={e.modalConfirmText}>Place Text</S>
364
+ </A>
365
+ </T>
366
+ </T>
367
+ </T>
368
+ </Ct>
369
+
370
+
371
+ <Mo visible={Gt}title={z("mediaGallery.deleteTitle","Delete Media?")}message={z("mediaGallery.deleteMessage",{filename:k.filename})}confirmText={z("mediaGallery.delete","Delete")}cancelText={z("common.cancel","Cancel")}isDestructive={!0}icon="trash"onConfirm={()=>{Fe(!1),Ft(k),Pe()}}onCancel={()=>Fe(!1)}/>
372
+ </Ct>};const e=ee.create({overlay:{flex:1,backgroundColor:o.slate900},header:{width:"100%",zIndex:10,borderBottomWidth:ee.hairlineWidth,borderBottomColor:"rgba(255, 255, 255, 0.25)"},headerInner:{width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:14,paddingTop:je.OS==="ios"?52:Ue.currentHeight?Ue.currentHeight+8:18,paddingBottom:12,minHeight:je.OS==="ios"?94:64},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0,marginRight:6},headerTextCol:{flex:1,minWidth:0},headerRight:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},badge:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:3,borderRadius:5,backgroundColor:"rgba(255, 255, 255, 0.22)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.38)"},badgeText:{fontFamily:F.interBold,fontSize:9.5,letterSpacing:.4,color:o.white},title:{fontFamily:F.interSemiBold,fontSize:12.5,color:o.white,letterSpacing:-.1},subtitle:{fontFamily:F.interRegular,fontSize:10.5,color:"rgba(255, 255, 255, 0.7)",marginTop:1},headerActionBtn:{width:30,height:30,borderRadius:7,backgroundColor:"rgba(255, 255, 255, 0.22)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.38)",alignItems:"center",justifyContent:"center"},headerDeleteBtn:{width:30,height:30,borderRadius:7,backgroundColor:"rgba(239, 68, 68, 0.35)",borderWidth:1,borderColor:"rgba(252, 165, 165, 0.55)",alignItems:"center",justifyContent:"center"},headerCloseBtn:{width:30,height:30,borderRadius:7,backgroundColor:"rgba(244, 63, 94, 0.28)",borderWidth:1,borderColor:"rgba(251, 113, 133, 0.48)",alignItems:"center",justifyContent:"center"},stageSafe:{flex:1,width:"100%"},stage:{flex:1,width:"100%",alignItems:"center",justifyContent:"center",padding:8},previewCard:{flex:1,width:"100%",borderRadius:14,overflow:"hidden",backgroundColor:"#090D1A",alignItems:"center",justifyContent:"center",position:"relative"},canvasContainer:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",position:"relative"},image:{width:"100%",height:"100%"},videoImageOverlay:{...ee.absoluteFillObject,backgroundColor:"rgba(10, 13, 20, 0.28)"},videoFallbackBackdrop:{flex:1,width:"100%",backgroundColor:o.slate900,alignItems:"center",justifyContent:"center",padding:24},videoFallbackGlow:{position:"absolute",width:150,height:150,borderRadius:75,backgroundColor:"rgba(56, 189, 248, 0.08)"},videoFallbackTitle:{fontFamily:F.interSemiBold,fontSize:15,color:o.white,marginTop:12},videoFallbackSubtitle:{fontFamily:F.interRegular,fontSize:12,color:"rgba(255, 255, 255, 0.6)",marginTop:4},centerPlayContainer:{position:"absolute",alignItems:"center",justifyContent:"center",gap:8},centerPlayGlow:{position:"absolute",width:80,height:80,borderRadius:40,backgroundColor:"rgba(56, 189, 248, 0.22)"},centerPlayCircle:{width:62,height:62,borderRadius:31,backgroundColor:o.sky500,alignItems:"center",justifyContent:"center",paddingLeft:3,shadowColor:o.sky500,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:10,elevation:8},centerPlayPill:{backgroundColor:"rgba(15, 23, 42, 0.90)",paddingHorizontal:12,paddingVertical:4,borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)"},centerPlayText:{fontFamily:F.interBold,fontSize:11.5,color:o.white,letterSpacing:.3},topLeftBadgeOverlay:{position:"absolute",top:12,left:12},bottomRightBadgeOverlay:{position:"absolute",bottom:12,right:12},metaPill:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"rgba(15, 23, 42, 0.90)",paddingHorizontal:10,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)"},metaPillText:{fontFamily:F.interSemiBold,fontSize:11,color:o.white,letterSpacing:.2},floatingZoomBar:{position:"absolute",right:12,top:"35%",backgroundColor:"rgba(15, 23, 42, 0.92)",borderRadius:20,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",paddingVertical:6,paddingHorizontal:4,alignItems:"center",gap:6,shadowColor:o.black,shadowOffset:{width:0,height:4},shadowOpacity:.45,shadowRadius:8,elevation:10},zoomBtn:{width:28,height:28,borderRadius:14,backgroundColor:"rgba(255, 255, 255, 0.12)",alignItems:"center",justifyContent:"center"},zoomLevelBadge:{paddingHorizontal:4,paddingVertical:2},zoomLevelText:{fontFamily:F.interBold,fontSize:9.5,color:o.sky400,letterSpacing:.2},subToolBar:{width:"100%",backgroundColor:"rgba(15, 23, 42, 0.96)",borderRadius:12,paddingVertical:6,paddingHorizontal:8,marginTop:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)"},subToolScroll:{flexDirection:"row",alignItems:"center",gap:8},ratioChip:{paddingHorizontal:10,paddingVertical:5,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.14)"},ratioChipActive:{backgroundColor:o.indigo600,borderColor:o.indigo400},ratioChipText:{fontFamily:F.interSemiBold,fontSize:10.5,color:"rgba(255, 255, 255, 0.8)"},ratioChipTextActive:{color:o.white,fontFamily:F.interBold},applyActionBtn:{backgroundColor:o.emerald600,paddingHorizontal:12,paddingVertical:5,borderRadius:8},applyActionText:{fontFamily:F.interBold,fontSize:11,color:o.white},cancelActionBtn:{backgroundColor:"rgba(255, 255, 255, 0.12)",paddingHorizontal:10,paddingVertical:5,borderRadius:8},cancelActionText:{fontFamily:F.interSemiBold,fontSize:11,color:"rgba(255, 255, 255, 0.8)"},colorDot:{width:22,height:22,borderRadius:11,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.3)"},colorDotActive:{borderColor:o.white,transform:[{scale:1.25}]},subDivider:{width:1,height:18,backgroundColor:"rgba(255, 255, 255, 0.15)",marginHorizontal:4},strokeWidthBtn:{width:24,height:24,borderRadius:12,backgroundColor:"rgba(255, 255, 255, 0.08)",alignItems:"center",justifyContent:"center"},strokeWidthBtnActive:{backgroundColor:"rgba(255, 255, 255, 0.25)"},strokeDot:{borderRadius:99},actionPillBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:5,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.10)"},actionPillText:{fontFamily:F.interSemiBold,fontSize:10,color:o.white},shapeOptionBtn:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:9,paddingVertical:5,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)"},shapeOptionText:{fontFamily:F.interSemiBold,fontSize:10.5,color:o.white},shapeItem:{position:"absolute",borderWidth:2.5,borderStyle:"solid"},shapeDeleteBadge:{position:"absolute",top:-8,right:-8,width:16,height:16,borderRadius:8,backgroundColor:o.rose500,alignItems:"center",justifyContent:"center"},blurItem:{position:"absolute",backgroundColor:"rgba(15, 23, 42, 0.95)",borderWidth:1.5,borderColor:"rgba(56, 189, 248, 0.7)",borderRadius:6,alignItems:"center",justifyContent:"center"},blurItemText:{fontFamily:F.interBold,fontSize:9,color:o.sky300,letterSpacing:.6},textAnnotationPill:{position:"absolute",flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:8,paddingVertical:4,borderRadius:8,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.35)",shadowColor:o.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4},textAnnotationText:{fontFamily:F.interBold,fontSize:11},textDeleteBtn:{width:14,height:14,borderRadius:7,backgroundColor:"rgba(0, 0, 0, 0.45)",alignItems:"center",justifyContent:"center"},cropSubToolBar:{width:"100%",backgroundColor:"rgba(15, 23, 42, 0.96)",borderRadius:12,paddingVertical:8,paddingHorizontal:10,marginTop:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",gap:8},cropActionHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%",paddingBottom:4,borderBottomWidth:ee.hairlineWidth,borderBottomColor:"rgba(255, 255, 255, 0.12)"},cropHeaderTitle:{fontFamily:F.interSemiBold,fontSize:10.5,color:"rgba(255, 255, 255, 0.65)"},cropActionButtons:{flexDirection:"row",alignItems:"center",gap:8},cropOverlayMask:{...ee.absoluteFillObject,zIndex:100,elevation:100},cropDimMask:{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.58)"},cropBoxFrame:{position:"absolute",borderWidth:2,borderStyle:"dashed",borderColor:o.white,backgroundColor:"rgba(56, 189, 248, 0.08)",shadowColor:o.black,shadowOffset:{width:0,height:0},shadowOpacity:.8,shadowRadius:4},cropGridH:{position:"absolute",left:0,right:0,height:1,borderTopWidth:1,borderStyle:"dashed",borderColor:"rgba(255, 255, 255, 0.45)"},cropGridV:{position:"absolute",top:0,bottom:0,width:1,borderLeftWidth:1,borderStyle:"dashed",borderColor:"rgba(255, 255, 255, 0.45)"},cropHandleTouchArea:{position:"absolute",width:38,height:38,alignItems:"center",justifyContent:"center",zIndex:10},handleAreaTL:{top:-19,left:-19},handleAreaTR:{top:-19,right:-19},handleAreaBL:{bottom:-19,left:-19},handleAreaBR:{bottom:-19,right:-19},cropCornerBracket:{position:"absolute",width:14,height:14,borderColor:o.white,backgroundColor:o.sky500,borderRadius:2,borderWidth:2,shadowColor:o.black,shadowOffset:{width:0,height:2},shadowOpacity:.6,shadowRadius:3,elevation:4},bracketTL:{top:-7,left:-7},bracketTR:{top:-7,right:-7},bracketBL:{bottom:-7,left:-7},bracketBR:{bottom:-7,right:-7},cropEdgeBarTop:{position:"absolute",top:-3,left:"35%",right:"35%",height:6,backgroundColor:o.white,borderRadius:3},cropEdgeBarBottom:{position:"absolute",bottom:-3,left:"35%",right:"35%",height:6,backgroundColor:o.white,borderRadius:3},cropEdgeBarLeft:{position:"absolute",left:-3,top:"35%",bottom:"35%",width:6,backgroundColor:o.white,borderRadius:3},cropEdgeBarRight:{position:"absolute",right:-3,top:"35%",bottom:"35%",width:6,backgroundColor:o.white,borderRadius:3},cropCenterPill:{position:"absolute",top:6,alignSelf:"center",backgroundColor:"rgba(14, 165, 233, 0.92)",paddingHorizontal:8,paddingVertical:2.5,borderRadius:6,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.25)"},cropCenterPillText:{fontFamily:F.interBold,fontSize:9,color:o.white,letterSpacing:.4},bottomTesterDock:{flexDirection:"row",alignItems:"center",justifyContent:"space-around",width:"100%",paddingVertical:10,paddingHorizontal:6,marginTop:6,backgroundColor:"rgba(15, 23, 42, 0.94)",borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.14)",gap:4},dockToolBtn:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:6,paddingHorizontal:2,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.06)",gap:3},dockToolBtnActive:{backgroundColor:o.indigo600,borderColor:o.indigo400,borderWidth:1},dockPrimaryBtn:{backgroundColor:o.indigo600},dockToolLabel:{fontFamily:F.interSemiBold,fontSize:9.5,color:"rgba(255, 255, 255, 0.85)",letterSpacing:.1},modalBackdrop:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.70)",alignItems:"center",justifyContent:"center",padding:20},textModalCard:{width:"100%",maxWidth:360,backgroundColor:"#0F172A",borderRadius:16,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",padding:16,gap:12},textModalTitle:{fontFamily:F.interBold,fontSize:14,color:o.white},textModalInput:{minHeight:80,backgroundColor:"rgba(255, 255, 255, 0.08)",borderRadius:10,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",padding:12,fontFamily:F.interRegular,fontSize:13,color:o.white,textAlignVertical:"top"},textModalActions:{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:10},modalCancelBtn:{paddingHorizontal:14,paddingVertical:8,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.1)"},modalCancelText:{fontFamily:F.interSemiBold,fontSize:12,color:"rgba(255, 255, 255, 0.7)"},modalConfirmBtn:{paddingHorizontal:16,paddingVertical:8,borderRadius:8,backgroundColor:o.indigo600},modalConfirmText:{fontFamily:F.interBold,fontSize:12,color:o.white}});