react-native-inapp-inspector 2.5.12 → 2.5.13
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.
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
- package/android/src/main/AndroidManifest.xml +11 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +379 -19
- package/android/src/main/res/xml/inappinspector_file_paths.xml +7 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +47 -49
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.d.ts +8 -0
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.js +76 -0
- package/dist/commonjs/components/Inspector/ConsoleExportModal.js +51 -51
- package/dist/commonjs/components/Inspector/CrashTab.js +17 -17
- package/dist/commonjs/components/Inspector/DebuggingTab.js +24 -24
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +2 -2
- package/dist/commonjs/components/Inspector/FabLauncher.js +2 -2
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +2 -2
- package/dist/commonjs/components/Inspector/InspectorHeader.js +10 -10
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +10 -10
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +1 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +222 -222
- package/dist/commonjs/components/Inspector/NetworkExportModal.d.ts +10 -0
- package/dist/commonjs/components/Inspector/NetworkExportModal.js +333 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +48 -41
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +11 -12
- package/dist/commonjs/components/Inspector/ReduxDetail.js +17 -19
- package/dist/commonjs/components/Inspector/ReduxTab.js +5 -5
- package/dist/commonjs/components/Inspector/SettingsPanel.js +3 -6
- package/dist/commonjs/components/Inspector/SocketCard.js +2 -2
- package/dist/commonjs/components/Inspector/SupportPage.js +5 -5
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.d.ts +7 -0
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.js +97 -0
- package/dist/commonjs/components/Inspector/UiInspectorDetail.d.ts +2 -0
- package/dist/commonjs/components/Inspector/UiInspectorDetail.js +485 -0
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.d.ts +2 -0
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.js +199 -0
- package/dist/commonjs/components/Inspector/UiInspectorTab.d.ts +2 -0
- package/dist/commonjs/components/Inspector/UiInspectorTab.js +117 -0
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.d.ts +10 -0
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.js +148 -0
- package/dist/commonjs/components/Inspector/index.d.ts +28 -0
- package/dist/commonjs/components/Inspector/index.js +1 -0
- package/dist/commonjs/components/LogCard.js +9 -7
- package/dist/commonjs/constants/index.js +1 -1
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +1 -1
- package/dist/commonjs/customHooks/crashHandler.js +6 -6
- package/dist/commonjs/customHooks/uiInspectorManager.d.ts +22 -0
- package/dist/commonjs/customHooks/uiInspectorManager.js +1 -0
- package/dist/commonjs/helpers/index.js +1 -3
- package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -0
- package/dist/commonjs/helpers/searchQueryParser.js +7 -5
- package/dist/commonjs/helpers/shareFormatter.d.ts +16 -0
- package/dist/commonjs/helpers/shareFormatter.js +16 -9
- package/dist/commonjs/helpers/uiInspectorEngine.d.ts +62 -0
- package/dist/commonjs/helpers/uiInspectorEngine.js +19 -0
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -1
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -1
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -1
- package/dist/commonjs/i18n/locales/it.json +1 -1
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -1
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -1
- package/dist/commonjs/i18n/locales/mr.json +1 -1
- package/dist/commonjs/i18n/locales/nl.json +1 -1
- package/dist/commonjs/i18n/locales/pa.json +1 -1
- package/dist/commonjs/i18n/locales/pl.json +1 -1
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -1
- package/dist/commonjs/i18n/locales/te.json +1 -1
- package/dist/commonjs/i18n/locales/tr.json +1 -1
- package/dist/commonjs/i18n/locales/vi.json +1 -1
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +3 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +2 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/commonjs/types/editor.d.ts +31 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +73 -75
- package/dist/esm/components/Inspector/BoxModelVisualizer.d.ts +8 -0
- package/dist/esm/components/Inspector/BoxModelVisualizer.js +76 -0
- package/dist/esm/components/Inspector/ConsoleExportModal.js +67 -67
- package/dist/esm/components/Inspector/CrashTab.js +58 -58
- package/dist/esm/components/Inspector/DebuggingTab.js +89 -89
- package/dist/esm/components/Inspector/DeviceInfoTab.js +2 -2
- package/dist/esm/components/Inspector/FabLauncher.js +21 -21
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +23 -23
- package/dist/esm/components/Inspector/InspectorHeader.js +26 -26
- package/dist/esm/components/Inspector/MediaGalleryTab.js +151 -151
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +1 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.js +468 -468
- package/dist/esm/components/Inspector/NetworkExportModal.d.ts +10 -0
- package/dist/esm/components/Inspector/NetworkExportModal.js +333 -0
- package/dist/esm/components/Inspector/NetworkTab.js +118 -111
- package/dist/esm/components/Inspector/NpmStarPrompt.js +32 -33
- package/dist/esm/components/Inspector/ReduxDetail.js +54 -56
- package/dist/esm/components/Inspector/ReduxTab.js +9 -9
- package/dist/esm/components/Inspector/SettingsPanel.js +3 -6
- package/dist/esm/components/Inspector/SocketCard.js +13 -13
- package/dist/esm/components/Inspector/SupportPage.js +5 -5
- package/dist/esm/components/Inspector/UiA11yAuditPanel.d.ts +7 -0
- package/dist/esm/components/Inspector/UiA11yAuditPanel.js +97 -0
- package/dist/esm/components/Inspector/UiInspectorDetail.d.ts +2 -0
- package/dist/esm/components/Inspector/UiInspectorDetail.js +422 -0
- package/dist/esm/components/Inspector/UiInspectorOverlay.d.ts +2 -0
- package/dist/esm/components/Inspector/UiInspectorOverlay.js +138 -0
- package/dist/esm/components/Inspector/UiInspectorTab.d.ts +2 -0
- package/dist/esm/components/Inspector/UiInspectorTab.js +117 -0
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.d.ts +10 -0
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.js +148 -0
- package/dist/esm/components/Inspector/index.d.ts +28 -0
- package/dist/esm/components/Inspector/index.js +1 -0
- package/dist/esm/components/LogCard.js +57 -55
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/crashHandler.d.ts +1 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/customHooks/uiInspectorManager.d.ts +22 -0
- package/dist/esm/customHooks/uiInspectorManager.js +1 -0
- package/dist/esm/helpers/index.js +4 -6
- package/dist/esm/helpers/searchQueryParser.d.ts +1 -0
- package/dist/esm/helpers/searchQueryParser.js +7 -5
- package/dist/esm/helpers/shareFormatter.d.ts +16 -0
- package/dist/esm/helpers/shareFormatter.js +20 -13
- package/dist/esm/helpers/uiInspectorEngine.d.ts +48 -0
- package/dist/esm/helpers/uiInspectorEngine.js +19 -0
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -1
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -1
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -1
- package/dist/esm/i18n/locales/it.json +1 -1
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -1
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -1
- package/dist/esm/i18n/locales/mr.json +1 -1
- package/dist/esm/i18n/locales/nl.json +1 -1
- package/dist/esm/i18n/locales/pa.json +1 -1
- package/dist/esm/i18n/locales/pl.json +1 -1
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -1
- package/dist/esm/i18n/locales/te.json +1 -1
- package/dist/esm/i18n/locales/tr.json +1 -1
- package/dist/esm/i18n/locales/vi.json +1 -1
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/native/NativeInspector.d.ts +2 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/esm/types/editor.d.ts +31 -0
- package/ios/NetworkInspectorModule.mm +314 -16
- package/package.json +1 -1
- package/src/native/NativeInspector.ts +37 -0
- package/src/native/NativeNetworkInspector.ts +2 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import Ao,{useCallback as
|
|
2
|
-
<
|
|
1
|
+
import Ao,{useCallback as et,useContext as ur,useEffect as ci,useMemo as oo,useRef as L,useState as V}from"react";import{Animated as Gt,Dimensions as ui,Image as Co,Modal as Ci,PanResponder as Lt,Platform as io,Pressable as Oo,ScrollView as Ti,Share as Mi,StatusBar as Fi,StyleSheet as U,Text as S,TextInput as Cr,TouchableOpacity as B,useWindowDimensions as Tr,View as F}from"react-native";import Mr from"react-native-linear-gradient";import Fr,{Circle as Si,Ellipse as To,G as Ct,Line as $t,Path as Mo,Polygon as Ri,Rect as Nt,Text as Pi}from"react-native-svg";import{AppColors as k}from"../../styles/AppColors";import{AppFonts as j}from"../../styles/AppFonts";import Tt from"../TouchableScale";import{InspectorContext as kr}from"./InspectorContext";import{ConfirmationModal as Sr}from"./ConfirmationModal";import{ArrowRightIcon as Rr,CameraRollIcon as Fo,CheckIcon as Pr,CloseWhite as Do,CropIcon as Bi,EyeCompareIcon as Br,EyeIcon as Ii,FilmIcon as Ir,GifIcon as Wo,GridlinesIcon as Vo,HighlighterIcon as Ar,MaximizeIcon as Or,MoreDotsIcon as Dr,PauseIcon as Ai,PenIcon as Eo,PixelateIcon as Wr,PlayIcon as Ho,RedactIcon as Vr,RedoIcon as Er,ResetIcon as Oi,RotateIcon as Hr,SaveIcon as Gr,ScissorsIcon as Di,ShareIcon as Lr,SunAdjustIcon as Wi,TrashIcon as $r,TypeIcon as Vi,UndoIcon as Ei,VolumeXIcon as So,WhiteBackNavigation as Nr,ZoomInIcon as Ur,ZoomOutIcon as Xr,BrightnessIcon as Yr,ContrastIcon as _r,SaturationIcon as Zr,WarmthIcon as qr,ExposureIcon as Qr,VignetteIcon as Kr,ZapIcon as Go}from"../NetworkIcons";import{ScreenCapture as Jr}from"../../capture";import{MediaEditor as Mt}from"../../editor";import{formatBytes as Hi}from"../../helpers";import{showToast as $}from"../../helpers/toast";import{useTranslation as en}from"../../i18n";import{triggerNativeHaptic as P}from"../../native/NativeInspector";const Gi=["#EF4444","#F59E0B","#38BDF8","#10B981","#A855F7","#FFFFFF","#0F172A"],Cn=({textItem:M,canvasWidth:Ie,canvasHeight:Ce,scale:At,onUpdate:vt,onDelete:Ne,onEdit:R})=>{const ye=L(new Gt.ValueXY({x:0,y:0})).current,le=L(M);le.current=M;const Ue=L(Ie);Ue.current=Ie;const qe=L(Ce);qe.current=Ce;const Ae=L(At);Ae.current=At;const Qe=L(vt);Qe.current=vt;const de=L(!1),J=L(Lt.create({onStartShouldSetPanResponder:()=>!0,onStartShouldSetPanResponderCapture:()=>!1,onMoveShouldSetPanResponder:(q,X)=>Math.abs(X.dx)>3||Math.abs(X.dy)>3,onMoveShouldSetPanResponderCapture:()=>!1,onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{de.current=!1,ye.setValue({x:0,y:0})},onPanResponderMove:(q,X)=>{(Math.abs(X.dx)>3||Math.abs(X.dy)>3)&&(de.current=!0),ye.setValue({x:X.dx,y:X.dy})},onPanResponderRelease:(q,X)=>{if(!de.current){R(le.current),ye.setValue({x:0,y:0});return}const he=(Ue.current||300)*(Ae.current||1),ce=(qe.current||500)*(Ae.current||1),ue=X.dx/he,ie=X.dy/ce,be=le.current,pe=Math.max(0,Math.min(.85,be.x+ue)),Ut=Math.max(0,Math.min(.92,be.y+ie));ye.setValue({x:0,y:0}),Qe.current(be.id,{x:pe,y:Ut})},onPanResponderTerminate:()=>{ye.setValue({x:0,y:0}),de.current=!1}})).current;return<Gt.View{...J.panHandlers}style={[t.textAnnotationPill,{left:`${M.x*100}%`,top:`${M.y*100}%`,backgroundColor:M.bgColor,transform:ye.getTranslateTransform()}]}>
|
|
2
|
+
<S style={[t.textAnnotationText,{color:M.color}]}pointerEvents="none">
|
|
3
3
|
{M.text}
|
|
4
|
-
</
|
|
5
|
-
<
|
|
4
|
+
</S>
|
|
5
|
+
<B style={t.textDeleteBtn}onPress={()=>Ne(M.id)}hitSlop={{top:10,bottom:10,left:10,right:10}}>
|
|
6
6
|
<Do size={8}/>
|
|
7
|
-
</
|
|
8
|
-
</
|
|
7
|
+
</B>
|
|
8
|
+
</Gt.View>},Tn=({cropBox:M,imageWidth:Ie,imageHeight:Ce,imageOffsetX:At,imageOffsetY:vt,scale:Ne,onUpdateCropBox:R,onApplyCrop:ye,onCancelCrop:le})=>{const Ue=Math.max(0,Math.min(.9,isFinite(M?.x)?M.x:.08)),qe=Math.max(0,Math.min(.9,isFinite(M?.y)?M.y:.12)),Ae=Math.max(.1,Math.min(1-Ue,isFinite(M?.width)?M.width:.84)),Qe=Math.max(.1,Math.min(1-qe,isFinite(M?.height)?M.height:.76)),de=At+Ue*Ie,J=vt+qe*Ce,q=Ae*Ie,X=Qe*Ce,he=L({x:Ue,y:qe,width:Ae,height:Qe});he.current={x:Ue,y:qe,width:Ae,height:Qe};const ce=L(Ie);ce.current=Ie;const ue=L(Ce);ue.current=Ce;const ie=L(Ne);ie.current=Ne;const be=L(R);be.current=R;const pe=L({origBox:{x:.08,y:.12,width:.84,height:.76}}),Ut=L(Lt.create({onStartShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponder:(ne,Ye)=>Math.abs(Ye.dx)>3||Math.abs(Ye.dy)>3,onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{pe.current.origBox={...he.current}},onPanResponderMove:(ne,Ye)=>{const Oe=ce.current*(ie.current||1),Ft=ue.current*(ie.current||1);if(!Oe||!Ft)return;const{x:tt,y:I,width:Y,height:ee}=pe.current.origBox,Me=Math.max(0,Math.min(1-Y,tt+Ye.dx/Oe)),Q=Math.max(0,Math.min(1-ee,I+Ye.dy/Ft));be.current({x:Me,y:Q,width:Y,height:ee})},onPanResponderRelease:()=>{}})).current,Te=ne=>Lt.create({onStartShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponder:(Ye,Oe)=>Math.abs(Oe.dx)>2||Math.abs(Oe.dy)>2,onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{pe.current.origBox={...he.current}},onPanResponderMove:(Ye,Oe)=>{const Ft=ce.current*(ie.current||1),tt=ue.current*(ie.current||1);if(!Ft||!tt)return;const I=Oe.dx/Ft,Y=Oe.dy/tt,{x:ee,y:Me,width:Q,height:De}=pe.current.origBox,ve=.1;let kt=ee,We=Me,St=Q,ze=De;(ne==="tl"||ne==="left"||ne==="bl")&&(kt=Math.max(0,Math.min(ee+Q-ve,ee+I)),St=Q-(kt-ee)),(ne==="tr"||ne==="right"||ne==="br")&&(St=Math.max(ve,Math.min(1-ee,Q+I))),(ne==="tl"||ne==="top"||ne==="tr")&&(We=Math.max(0,Math.min(Me+De-ve,Me+Y)),ze=De-(We-Me)),(ne==="bl"||ne==="bottom"||ne==="br")&&(ze=Math.max(ve,Math.min(1-Me,De+Y))),be.current({x:kt,y:We,width:St,height:ze})},onPanResponderRelease:()=>{}}),Xe=L({tl:Te("tl"),tr:Te("tr"),bl:Te("bl"),br:Te("br"),top:Te("top"),bottom:Te("bottom"),left:Te("left"),right:Te("right")}).current;return Ie<20||Ce<20?null:<F style={U.absoluteFill}pointerEvents="box-none">
|
|
9
9
|
|
|
10
|
-
<F style={
|
|
10
|
+
<F style={U.absoluteFill}pointerEvents="none">
|
|
11
11
|
|
|
12
|
-
<F style={{position:"absolute",top:0,left:0,right:0,height:
|
|
12
|
+
<F style={{position:"absolute",top:0,left:0,right:0,height:J,backgroundColor:"rgba(0,0,0,0.6)"}}/>
|
|
13
13
|
|
|
14
|
-
<F style={{position:"absolute",top:
|
|
14
|
+
<F style={{position:"absolute",top:J+X,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.6)"}}/>
|
|
15
15
|
|
|
16
|
-
<F style={{position:"absolute",top:
|
|
16
|
+
<F style={{position:"absolute",top:J,left:0,width:de,height:X,backgroundColor:"rgba(0,0,0,0.6)"}}/>
|
|
17
17
|
|
|
18
|
-
<F style={{position:"absolute",top:
|
|
18
|
+
<F style={{position:"absolute",top:J,left:de+q,right:0,height:X,backgroundColor:"rgba(0,0,0,0.6)"}}/>
|
|
19
19
|
</F>
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
<F style={{position:"absolute",left:
|
|
22
|
+
<F style={{position:"absolute",left:de,top:J,width:q,height:X,borderWidth:2,borderColor:"#00E5FF",backgroundColor:"transparent",zIndex:200}}pointerEvents="box-none">
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
<F pointerEvents="none"style={{position:"absolute",left:0,right:0,top:"33.33%",height:1,backgroundColor:"rgba(0,229,255,0.35)"}}/>
|
|
@@ -28,7 +28,7 @@ import Ao,{useCallback as ot,useContext as ur,useEffect as ci,useMemo as eo,useR
|
|
|
28
28
|
<F pointerEvents="none"style={{position:"absolute",top:0,bottom:0,left:"66.66%",width:1,backgroundColor:"rgba(0,229,255,0.35)"}}/>
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
<F style={
|
|
31
|
+
<F style={U.absoluteFill}{...Ut.panHandlers}/>
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
<F pointerEvents="none"style={{position:"absolute",top:-2,left:-2,width:22,height:22,borderTopWidth:4,borderLeftWidth:4,borderColor:"#00E5FF"}}/>
|
|
@@ -43,64 +43,64 @@ import Ao,{useCallback as ot,useContext as ur,useEffect as ci,useMemo as eo,useR
|
|
|
43
43
|
<F pointerEvents="none"style={{position:"absolute",right:-3,top:"50%",marginTop:-16,width:5,height:32,backgroundColor:"#00E5FF",borderRadius:3}}/>
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
<F style={{position:"absolute",top:-22,left:-22,width:44,height:44,zIndex:30}}{...
|
|
47
|
-
<F style={{position:"absolute",top:-22,right:-22,width:44,height:44,zIndex:30}}{...
|
|
48
|
-
<F style={{position:"absolute",bottom:-22,left:-22,width:44,height:44,zIndex:30}}{...
|
|
49
|
-
<F style={{position:"absolute",bottom:-22,right:-22,width:44,height:44,zIndex:30}}{...
|
|
46
|
+
<F style={{position:"absolute",top:-22,left:-22,width:44,height:44,zIndex:30}}{...Xe.tl.panHandlers}/>
|
|
47
|
+
<F style={{position:"absolute",top:-22,right:-22,width:44,height:44,zIndex:30}}{...Xe.tr.panHandlers}/>
|
|
48
|
+
<F style={{position:"absolute",bottom:-22,left:-22,width:44,height:44,zIndex:30}}{...Xe.bl.panHandlers}/>
|
|
49
|
+
<F style={{position:"absolute",bottom:-22,right:-22,width:44,height:44,zIndex:30}}{...Xe.br.panHandlers}/>
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
<F style={{position:"absolute",top:-20,left:"25%",right:"25%",height:40,zIndex:25}}{...
|
|
53
|
-
<F style={{position:"absolute",bottom:-20,left:"25%",right:"25%",height:40,zIndex:25}}{...
|
|
54
|
-
<F style={{position:"absolute",left:-20,top:"25%",bottom:"25%",width:40,zIndex:25}}{...
|
|
55
|
-
<F style={{position:"absolute",right:-20,top:"25%",bottom:"25%",width:40,zIndex:25}}{...
|
|
52
|
+
<F style={{position:"absolute",top:-20,left:"25%",right:"25%",height:40,zIndex:25}}{...Xe.top.panHandlers}/>
|
|
53
|
+
<F style={{position:"absolute",bottom:-20,left:"25%",right:"25%",height:40,zIndex:25}}{...Xe.bottom.panHandlers}/>
|
|
54
|
+
<F style={{position:"absolute",left:-20,top:"25%",bottom:"25%",width:40,zIndex:25}}{...Xe.left.panHandlers}/>
|
|
55
|
+
<F style={{position:"absolute",right:-20,top:"25%",bottom:"25%",width:40,zIndex:25}}{...Xe.right.panHandlers}/>
|
|
56
56
|
</F>
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
{
|
|
60
|
-
<Do size={14}color={
|
|
61
|
-
</
|
|
59
|
+
{le&&<B activeOpacity={.8}onPress={()=>{P("light"),le()}}style={t.cropCancelBtn}accessibilityLabel="Cancel Crop">
|
|
60
|
+
<Do size={14}color={k.white}/>
|
|
61
|
+
</B>}
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
{
|
|
65
|
-
<Pr size={18}color={
|
|
66
|
-
</
|
|
67
|
-
</F>};export const MediaPreviewModal=({item:M,visible:De,onClose:we,onDelete:Bt,onConvertToGif:vt})=>{const{t:z}=en(),We=ur(kr),te=We?.modalHeightPercent??90,{width:qe}=Tr(),Qe=eo(()=>to.OS==="ios"?te>=98?qe>=390?50:44:0:to.OS==="android"&&te>=98?Fi.currentHeight||24:0,[te,qe]),[Ve,Ne]=V(!1),[me,Q]=V(!1),[Y,ge]=V(null),[U,de]=V(M?.width),[he,ce]=V(M?.height),[be,ne]=V(M?.sizeBytes),[it,Ke]=V(M?.durationMs),[Ue,ze]=V(!1),[ue,Xe]=V(!1),[Ye,Je]=V(!1),[O,_]=V("none"),[ae,xe]=V(1),[Z,Se]=V(0),[Ce,rt]=V([]),[Ee,Ft]=V([]),[Be,It]=V(!1),[Li,nt]=V(!1),[D,_e]=V("brush"),[Ro,$i]=V(24),[He,ji]=V("brightness"),[K,jt]=V("none"),[Te,At]=V(!1),[ye,Ot]=V(!1),[E,kt]=V({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),[Me,Nt]=V(!1),[ve,Ut]=V(!1),[se,at]=V(0),[pe,st]=V(M?.durationMs||1e4),[et,oo]=V("end"),[fe,Xt]=V(!1),[Ze,io]=V(100),[Ge,ro]=V(1),[Yt,Lo]=V(12),[Po,Ni]=V(480),[$o,jo]=V([]),[Mn,No]=V(!1),[vn,Ui]=V(0),[zo,_t]=V("free"),[Zt,St]=V({x:.08,y:.12,width:.84,height:.76}),[Fe,Uo]=V("#EF4444"),[Ie,Xi]=V(4),[oe,Le]=V([]),[H,qt]=V(null),[ke,$e]=V([]),[Yi,Qt]=V(!1),[Xo,Yo]=V(null),[no,ao]=V(""),[so,_i]=V({x:.3,y:.4}),re=ot(()=>{Ft([]),rt(e=>[...e,{uri:Y||M?.uri||null,inkPaths:[...oe],texts:[...ke],adjustments:{...E},filterPreset:K,showWatermark:Te,showGridlines:ye,rotationAngle:Z,flipH:Me,flipV:ve,width:U,height:he,sizeBytes:be}])},[Y,M?.uri,oe,ke,E,K,Te,ye,Z,Me,ve,U,he,be]),_o=G(re);_o.current=re;const Fn=G(null),[lt,Zo]=V({width:ui.get("window").width-16,height:ui.get("window").height*.72,pageX:0,pageY:0}),je=G(O);je.current=O;const lo=G(D);lo.current=D;const Dt=G(Fe);Dt.current=Fe;const Wt=G(Ie);Wt.current=Ie;const Zi=G(Gt.create({onStartShouldSetPanResponder:()=>je.current==="draw",onMoveShouldSetPanResponder:()=>je.current==="draw",onPanResponderGrant:e=>{_o.current();const{locationX:C,locationY:T}=e.nativeEvent;qt([{x:C,y:T}])},onPanResponderMove:e=>{const{locationX:C,locationY:T}=e.nativeEvent,k=lo.current;qt(k==="brush"||k==="highlighter"?P=>P?[...P,{x:C,y:T}]:[{x:C,y:T}]:P=>[P&&P.length>0?P[0]:{x:C,y:T},{x:C,y:T}])},onPanResponderRelease:()=>{qt(e=>{if(e&&e.length>0){const C=lo.current,T=e[0],k=e[e.length-1]||T;if((C==="brush"||C==="highlighter")&&e.length>1)Le(P=>[...P,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:e,color:Dt.current,strokeWidth:Wt.current}]);else if(C==="arrow"&&e.length>1)Math.hypot(k.x-T.x,k.y-T.y)>6&&Le(B=>[...B,{id:`stroke_${Date.now()}_${Math.random()}`,type:"arrow",points:[T,k],color:Dt.current,strokeWidth:Wt.current}]);else if(C==="circle"||C==="spotlight")Math.hypot(k.x-T.x,k.y-T.y)>6&&Le(B=>[...B,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:[T,k],color:Dt.current,strokeWidth:Wt.current}]);else if(C==="step"){const P=oe.filter(B=>B.type==="step").length;Le(B=>[...B,{id:`stroke_${Date.now()}_${Math.random()}`,type:"step",points:[T],color:Dt.current,strokeWidth:Wt.current,stepNumber:P+1}])}else if(C==="rect"||C==="redact"||C==="pixelate"){const P=Math.min(T.x,k.x),B=Math.min(T.y,k.y),W=Math.abs(k.x-T.x),X=Math.abs(k.y-T.y);W>4&&X>4&&Le(J=>[...J,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:[T,k],rect:{x:P,y:B,width:W,height:X},color:Dt.current,strokeWidth:Wt.current}])}}return null})}})).current,Vt=(e,C,T)=>{const k=C&&C>0?C:1e3,P=T&&T>0?T:1e3,B=k/P;if(e==="free")return{x:parseFloat(((1-.84)/2).toFixed(4)),y:parseFloat(((1-.76)/2).toFixed(4)),width:.84,height:.76};let W=1;e==="1:1"?W=1:e==="4:3"?W=4/3:e==="16:9"?W=16/9:e==="9:16"?W=9/16:e==="3:2"&&(W=3/2);const X=W/B;let J=.88,ee=.88;if(X>=1){if(J=.88,ee=.88/X,ee>.88){const Et=.88/ee;J*=Et,ee=.88}}else if(ee=.88,J=.88*X,J>.88){const Et=.88/J;ee*=Et,J=.88}J=Math.max(.1,Math.min(.96,parseFloat(J.toFixed(4)))),ee=Math.max(.1,Math.min(.96,parseFloat(ee.toFixed(4))));const tt=parseFloat(((1-J)/2).toFixed(4)),zt=parseFloat(((1-ee)/2).toFixed(4));return{x:tt,y:zt,width:J,height:ee}};Ao.useEffect(()=>{M?.uri&&(ge(M.uri),de(M.width),ce(M.height),ne(M.sizeBytes),Ke(M.durationMs),ze(!1),xe(1),_("none"),Le([]),qt(null),$e([]),St(Vt("free",M.width,M.height)),at(0),st(M.durationMs||1e4),oo("end"),Xt(!1),io(100),ro(1),Ui(0))},[M?.uri,M?.width,M?.height,M?.sizeBytes,M?.durationMs]),Ao.useEffect(()=>{if(M?.type==="video"&&M?.uri){let e=!0;return No(!0),Mt.generateFilmstrip({uri:M.uri,count:10,targetWidth:120,targetHeight:120}).then(C=>{e&&C?.thumbnails&&jo(C.thumbnails)}).catch(()=>{}).finally(()=>{e&&No(!1)}),()=>{e=!1}}else jo([])},[M?.type,M?.uri]),Ao.useEffect(()=>{if(Y||M?.uri){const e=Y||M?.uri;e&&M?.type==="image"&&(!U||!he)&&Co.getSize(e,(C,T)=>{C>0&&T>0&&(de(C),ce(T))},()=>{})}},[Y,M?.uri,M?.type,U,he]);const Ae=eo(()=>{const e=lt.width,C=lt.height;if(!e||!C)return{width:e,height:C};const T=U??M?.width,k=he??M?.height;if(!T||!k||T<=0||k<=0)return{width:e,height:C};const P=T/k,B=e/C;let W=e,X=C;return P>B?(W=e,X=e/P):(X=C,W=C*P),{width:Math.max(20,Math.floor(W)),height:Math.max(20,Math.floor(X))}},[lt.width,lt.height,U,he,M?.width,M?.height]),q=Y||M?.uri,Re=U??M?.width,Pe=he??M?.height,qo=be??M?.sizeBytes,le=it??M?.durationMs,j=M?.type==="video",kn=M?.type==="gif",ie=M?.type==="image",Oe=G(new Ht.ValueXY({x:0,y:0})).current,dt=G({x:0,y:0}),Kt=G({x:0,y:0});ci(()=>{const e=Oe.x.addListener(T=>dt.current.x=T.value),C=Oe.y.addListener(T=>dt.current.y=T.value);return()=>{Oe.x.removeListener(e),Oe.y.removeListener(C)}},[Oe]);const ht=G(ae);ht.current=ae;const Rt=G(Ae);Rt.current=Ae;const Pt=G(lt);Pt.current=lt;const Qo=ot(()=>{const e=ht.current;if(e<=1)return{maxX:0,maxY:0};const C=Rt.current.width,T=Rt.current.height,k=Pt.current.width,P=Pt.current.height,B=Math.max(0,(C*e-k)/2/e),W=Math.max(0,(T*e-P)/2/e);return{maxX:B,maxY:W}},[]),Ko=ot((e,C)=>{const{maxX:T,maxY:k}=Qo();return{x:Math.max(-T,Math.min(T,e)),y:Math.max(-k,Math.min(k,C))}},[Qo]),qi=G(Gt.create({onStartShouldSetPanResponder:()=>ht.current>1,onMoveShouldSetPanResponder:(e,C)=>ht.current>1&&(Math.abs(C.dx)>4||Math.abs(C.dy)>4),onMoveShouldSetPanResponderCapture:(e,C)=>ht.current>1&&(Math.abs(C.dx)>6||Math.abs(C.dy)>6),onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{Kt.current={...dt.current}},onPanResponderMove:(e,C)=>{const T=ht.current,k=Kt.current.x+C.dx/T,P=Kt.current.y+C.dy/T,{maxX:B,maxY:W}=(()=>{const ee=ht.current;if(ee<=1)return{maxX:0,maxY:0};const tt=Rt.current.width,zt=Rt.current.height,Et=Pt.current.width,hi=Pt.current.height;return{maxX:Math.max(0,(tt*ee-Et)/2/ee),maxY:Math.max(0,(zt*ee-hi)/2/ee)}})(),X=Math.max(-B,Math.min(B,k)),J=Math.max(-W,Math.min(W,P));Oe.setValue({x:X,y:J})},onPanResponderRelease:()=>{const{maxX:e,maxY:C}=(()=>{const P=ht.current;if(P<=1)return{maxX:0,maxY:0};const B=Rt.current.width,W=Rt.current.height,X=Pt.current.width,J=Pt.current.height;return{maxX:Math.max(0,(B*P-X)/2/P),maxY:Math.max(0,(W*P-J)/2/P)}})(),T=dt.current,k={x:Math.max(-e,Math.min(e,T.x)),y:Math.max(-C,Math.min(C,T.y))};(k.x!==T.x||k.y!==T.y)&&Ht.spring(Oe,{toValue:k,friction:7,tension:60,useNativeDriver:!1}).start()},onPanResponderTerminate:()=>{}})).current;ci(()=>{if(ae<=1)Oe.setValue({x:0,y:0}),Kt.current={x:0,y:0};else{const e=Ko(dt.current.x,dt.current.y);(e.x!==dt.current.x||e.y!==dt.current.y)&&Ht.spring(Oe,{toValue:e,friction:7,tension:60,useNativeDriver:!1}).start()}},[ae,Oe,Ko]);const Qi=()=>{I("light"),xe(e=>Math.min(4,parseFloat((e+.25).toFixed(2))))},Ki=()=>{I("light"),xe(e=>Math.max(1,parseFloat((e-.25).toFixed(2))))},Jo=()=>{I("medium"),xe(1),Oe.setValue({x:0,y:0}),Kt.current={x:0,y:0}},ei=G(240),ti=ot(e=>{const C=Math.max(50,ei.current),T=Math.max(0,Math.min(1,e/C));if(je.current==="draw"){const k=lo.current;if(k==="brush"||k==="highlighter"||k==="arrow"||k==="rect"||k==="circle"||k==="spotlight"||k==="step"){const P=Math.round(2+T*22);Xi(P)}else if(k==="pixelate"){const P=Math.round(4+T*36);$i(P)}}else if(je.current==="adjust")if(He==="vignette"){const k=Math.round(T*100);kt(P=>({...P,vignette:k}))}else{const k=Math.round(T*100-50);kt(P=>({...P,[He]:k}))}else if(je.current==="crop"){const k=Math.round(T*360);Se(k)}else if(je.current==="trim"){const P=Math.round(T*(le||1e4));et==="start"?at(Math.min(pe-500,P)):st(Math.max(se+500,P))}else if(je.current==="audio"){const k=Math.round(T*100);io(k),Xt(k===0)}else if(je.current==="speed"){const k=parseFloat((.5+T*1.5).toFixed(2));ro(k)}else if(je.current==="gif"){const k=Math.round(6+T*18);Lo(k)}else if(je.current==="none"){const k=parseFloat((1+T*3).toFixed(2));xe(k)}},[He,le,et,se,pe]),Ji=G(Gt.create({onStartShouldSetPanResponder:()=>!0,onStartShouldSetPanResponderCapture:()=>!0,onMoveShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponderCapture:()=>!0,onPanResponderGrant:e=>{I("light"),ti(e.nativeEvent.locationX)},onPanResponderMove:e=>{ti(e.nativeEvent.locationX)},onPanResponderRelease:()=>{I("light")}})).current,oi=eo(()=>{if(O==="draw"){if(D==="brush"||D==="highlighter"||D==="arrow"||D==="rect"||D==="circle"||D==="spotlight"||D==="step")return Math.min(100,Math.max(0,(Ie-2)/22*100));if(D==="pixelate")return Math.min(100,Math.max(0,(Ro-4)/36*100));if(D==="redact")return 100}return O==="adjust"?He==="vignette"?Math.min(100,Math.max(0,E.vignette)):Math.min(100,Math.max(0,E[He]+50)):O==="crop"?Math.min(100,Math.max(0,Z/360*100)):O==="trim"?Math.min(100,Math.max(0,(et==="start"?se:pe)/(le||1e4)*100)):O==="audio"?fe?0:Ze:O==="speed"?Math.min(100,Math.max(0,(Ge-.5)/1.5*100)):O==="gif"?Math.min(100,Math.max(0,(Yt-6)/18*100)):O==="none"?Math.min(100,Math.max(0,(ae-1)/3*100)):50},[O,D,Ie,Ro,He,E,Z,ae,le,et,se,pe,fe,Ze,Ge,Yt]),ii=ot(()=>{if(Ce.length===0)return;I("light");const e=Ce[Ce.length-1];Ft(C=>[...C,{uri:Y||M?.uri||null,inkPaths:[...oe],texts:[...ke],adjustments:{...E},filterPreset:K,showWatermark:Te,rotationAngle:Z,flipH:Me,flipV:ve,width:U,height:he,sizeBytes:be}]),rt(C=>C.slice(0,C.length-1)),e&&(ge(e.uri),Le(e.inkPaths),$e(e.texts),e.adjustments&&kt(e.adjustments),e.filterPreset&&jt(e.filterPreset),e.showWatermark!==void 0&&At(e.showWatermark),e.showGridlines!==void 0&&Ot(e.showGridlines),e.rotationAngle!==void 0&&Se(e.rotationAngle),e.flipH!==void 0&&Nt(e.flipH),e.flipV!==void 0&&Ut(e.flipV),e.width&&de(e.width),e.height&&ce(e.height),e.sizeBytes&&ne(e.sizeBytes),L(z("mediaGallery.undone","Action Undone")))},[Ce,Y,M?.uri,oe,ke,E,K,Te,ye,Z,Me,ve,U,he,be,z]),er=ot(()=>{if(Ee.length===0)return;I("light");const e=Ee[Ee.length-1];rt(C=>[...C,{uri:Y||M?.uri||null,inkPaths:[...oe],texts:[...ke],adjustments:{...E},filterPreset:K,showWatermark:Te,showGridlines:ye,rotationAngle:Z,flipH:Me,flipV:ve,width:U,height:he,sizeBytes:be}]),Ft(C=>C.slice(0,C.length-1)),e&&(ge(e.uri),Le(e.inkPaths),$e(e.texts),e.adjustments&&kt(e.adjustments),e.filterPreset&&jt(e.filterPreset),e.showWatermark!==void 0&&At(e.showWatermark),e.showGridlines!==void 0&&Ot(e.showGridlines),e.rotationAngle!==void 0&&Se(e.rotationAngle),e.flipH!==void 0&&Nt(e.flipH),e.flipV!==void 0&&Ut(e.flipV),e.width&&de(e.width),e.height&&ce(e.height),e.sizeBytes&&ne(e.sizeBytes),L(z("mediaGallery.redone","Action Redone")))},[Ee,Y,M?.uri,oe,ke,E,K,Te,ye,Z,Me,ve,U,he,be,z]),tr=ot(()=>{M&&(I("medium"),re(),ge(M.uri),Le([]),$e([]),kt({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),jt("none"),At(!1),Ot(!1),Se(0),Nt(!1),Ut(!1),de(M.width),ce(M.height),ne(M.sizeBytes),Ke(M.durationMs),xe(1),_("none"),at(0),st(M.durationMs||1e4),oo("end"),Xt(!1),io(100),ro(1),L(z("mediaGallery.resetSuccess",M.type==="video"?"Reset to original video":"Reset to original image")))},[M,re,z]),ri=ot(async()=>{if(!(!M||!q)){if(I("medium"),Q(!0),j){try{const e=le||M.durationMs||1e4,C=await Mt.trimVideo({uri:q,startTimeMs:se,endTimeMs:pe<e?pe:void 0,muteAudio:fe||Ze===0,quality:"high"});C?.uri?(ge(C.uri),C.width&&de(C.width),C.height&&ce(C.height),C.size&&ne(C.size),C.durationMs&&Ke(C.durationMs),L(z("mediaGallery.videoSaved","Video Saved Successfully")),We?.refreshMediaCount?.().catch(()=>{})):L(z("mediaGallery.videoSaved","Video Saved"))}catch{L(z("mediaGallery.saveFailed","Failed to save video"))}finally{Q(!1)}return}try{const e=Math.max(1,Re||1e3),C=Math.max(1,Pe||1e3),T=oe.filter(B=>(B.type==="redact"||B.type==="pixelate")&&B.rect).map(B=>{const W=B.rect;return{x:W.x/e,y:W.y/C,width:W.width/e,height:W.height/C,style:B.type==="pixelate"?"blur":"blackout",isNormalized:!0}}),k=[...ke.map(B=>({x:B.x,y:B.y,width:.22,height:.06,color:B.bgColor||"#EF4444",label:B.text,isNormalized:!0})),...oe.filter(B=>B.type==="rect"||B.type==="arrow"||B.type==="circle").map(B=>{const W=B.points[0]||{x:0,y:0},X=B.points[B.points.length-1]||W,J=Math.min(W.x,X.x),ee=Math.min(W.y,X.y),tt=Math.max(10,Math.abs(X.x-W.x)),zt=Math.max(10,Math.abs(X.y-W.y));return{x:J/e,y:ee/C,width:tt/e,height:zt/C,color:B.color||"#EF4444",isNormalized:!0}})],P=await Mt.editPhoto({uri:q,rotation:Z!==0?Z:void 0,flipHorizontal:Me,flipVertical:ve,adjustments:{brightness:E.brightness/50,contrast:1+E.contrast/50,saturation:1+E.saturation/50,temperature:E.warmth/50,vignette:E.vignette/100},filterPreset:K!=="none"?K:void 0,redactions:T.length>0?T:void 0,annotations:k.length>0?k:void 0,format:M.format==="png"?"png":"jpeg",quality:.92});P?.uri?(ge(P.uri),P.width&&de(P.width),P.height&&ce(P.height),P.size&&ne(P.size),Le([]),$e([]),kt({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),Se(0),Nt(!1),Ut(!1),L(z("mediaGallery.savedSuccess","Image Saved Successfully")),We?.refreshMediaCount?.().catch(()=>{})):L(z("mediaGallery.savedSuccess","Image Saved"))}catch{L(z("mediaGallery.saveFailed","Failed to save image"))}finally{Q(!1)}}},[M,q,j,le,se,pe,fe,Ze,Re,Pe,Z,Me,ve,E,K,oe,ke,We,z]),ni=ot(async()=>{if(!(!M||!q||!j||me)){I("medium"),Q(!0);try{const e=await Mt.generateFilmstrip({uri:q,count:1,targetWidth:Re||1080,targetHeight:Pe||1920});e?.thumbnails&&e.thumbnails.length>0?(L(z("mediaGallery.snapshotSaved","Frame Snapshot Saved (PNG)")),We?.refreshMediaCount?.().catch(()=>{})):L(z("mediaGallery.snapshotFailed","Failed to snapshot frame"))}catch{L(z("mediaGallery.snapshotFailed","Failed to snapshot frame"))}finally{Q(!1)}}},[M,q,j,me,Re,Pe,We,z]),or=eo(()=>{if(!j||!M)return!1;const e=M.durationMs||1e4,C=se>0||pe<e,T=fe||Ze<100,k=Ge!==1,P=Y!=null&&Y!==M.uri;return C||T||k||P},[j,M,se,pe,fe,Ze,Ge,Y]),ai=eo(()=>{if(!M)return!1;const e=Y!=null&&Y!==M.uri,C=oe.length>0,T=ke.length>0,k=Ce.length>0,P=E.brightness!==0||E.contrast!==0||E.saturation!==0||E.warmth!==0||E.exposure!==0||E.vignette!==0;return e||C||T||k||P||(Z!==0||Me||ve)||K!=="none"||Te||ye},[Y,M,oe.length,ke.length,Ce.length,E,Z,Me,ve,K,Te,ye]),ir=()=>{I("light"),ii()},rr=()=>{I("medium"),re(),Le([])},Sn=e=>{I("light"),_("crop"),_t(e),St(Vt(e,Re,Pe))},si=async()=>{if(!(!q||!ie)){I("medium"),re(),Q(!0);try{const e=await Mt.cropToDefect(q,{x:Zt.x,y:Zt.y,width:Zt.width,height:Zt.height,isNormalized:!0});e?.uri?(ge(e.uri),e.width&&de(e.width),e.height&&ce(e.height),e.size&&ne(e.size),St(Vt("free",e.width,e.height)),_t("free"),L(z("mediaGallery.croppedSuccess","Image Cropped")),_("none")):L(z("mediaGallery.cropFailed","Crop failed"))}catch{L(z("mediaGallery.cropFailed","Crop failed"))}finally{Q(!1)}}},Bo=e=>{I("light"),e?(Yo(e),ao(e.text)):(Yo(null),ao("")),Qt(!0)},nr=e=>{I("light"),re(),$e(C=>C.filter(T=>T.id!==e))},ar=()=>{if(!no.trim()){Qt(!1);return}if(re(),Xo)$e(e=>e.map(C=>C.id===Xo.id?{...C,text:no.trim(),color:Fe}:C));else{const e={id:`text_${Date.now()}`,text:no.trim(),x:so.x,y:so.y,color:S.white,bgColor:Fe==="#FFFFFF"?"#0F172A":Fe};$e(C=>[...C,e])}Qt(!1),ao(""),L(z("mediaGallery.textAdded","Text Added"))},Rn=async e=>{if(!(!q||!ie||me)){I("medium"),re(),Q(!0);try{const C=await Mt.editPhoto({uri:q,quality:.85,crop:{x:0,y:0,width:1,height:1,isNormalized:!0}});if(C?.uri){ge(C.uri);const T=Math.round((Re||1080)*e),k=Math.round((Pe||1920)*e);de(T),ce(k),C.size&&ne(Math.round(C.size*e*e)),L(z("mediaGallery.resizedSuccess",`Resized to ${Math.round(e*100)}% (${T}\xD7${k})`)),_("none")}}catch{L(z("mediaGallery.resizeFailed","Resize failed"))}finally{Q(!1)}}},sr=async()=>{try{I("light");const e=q.startsWith("file://")||q.startsWith("content://")||q.startsWith("http")?q:`file://${q}`,C=to.select({ios:{url:e,title:M.filename},default:{title:M.filename,message:M.filename,url:e}});(await Mi.share(C)).action===Mi.sharedAction&&L(z("mediaGallery.shareSuccess","Shared successfully"))}catch(e){e?.message!=="User did not share"&&L(z("mediaGallery.shareUnavailable","Sharing not available on this device"))}},lr=()=>{I("medium"),Je(!0)},li=async()=>{if(vt){Ne(!0);try{await vt(M),L(z("mediaGallery.convertedSuccess","Converted to GIF!"))}catch{L(z("mediaGallery.convertFailed","Conversion failed"))}finally{Ne(!1)}}},Io=async()=>{try{Xe(!0),await Jr.playVideo(q)}catch{L(z("mediaGallery.playError","Unable to play video"))}finally{Xe(!1)}},Pn=async()=>{if(!(!q||!j||me)){Q(!0),I("light");try{const C=Math.min(le||1e4,5e3),T=await Mt.trimReproClip(q,0,C,{quality:"medium"});T?.uri&&(ge(T.uri),T.width&&de(T.width),T.height&&ce(T.height),T.size&&ne(T.size),T.durationMs&&Ke(T.durationMs),L(z("mediaGallery.trimmedSuccess","Trimmed to 5s Repro Clip")))}catch{L(z("mediaGallery.trimFailed","Trim failed"))}finally{Q(!1)}}},dr=async()=>{if(!(!q||!j||me)){Q(!0),I("light");try{const e=await Mt.muteVideo(q);e?.uri&&(ge(e.uri),e.width&&de(e.width),e.height&&ce(e.height),e.size&&ne(e.size),e.durationMs&&Ke(e.durationMs),L(z("mediaGallery.mutedSuccess","Audio Stripped")))}catch{L(z("mediaGallery.muteFailed","Mute failed"))}finally{Q(!1)}}},Jt=le?(le/1e3).toFixed(1):null,di=Jt?`00:${Number(Jt)<10?"0":""}${Jt}`:null,hr=[{key:"none",label:z("mediaGallery.preview","Preview"),themeColor:S.brandPurple,icon:e=><Ii size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"crop",label:"Crop",themeColor:S.sky600,icon:e=><Bi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"adjust",label:"Adjust",themeColor:S.amber500,icon:e=><Wi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"draw",label:"Markup",themeColor:S.sky400,icon:e=><Eo size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"text",label:"Text",themeColor:S.violet600,icon:e=><Vi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>}],cr=[{key:"none",label:z("mediaGallery.preview","Player"),themeColor:S.brandPurple,icon:e=><Ii size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"trim",label:z("media.trim","Trim"),themeColor:S.sky600,icon:e=><Di size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:se>0||pe<(le||1e4)},{key:"audio",label:z("media.audio","Audio"),themeColor:S.amber600,icon:e=><So size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:fe||Ze<100},{key:"speed",label:z("media.speed","Speed"),themeColor:S.violet600,icon:e=><Go size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:Ge!==1},{key:"gif",label:z("media.toGif","To GIF"),themeColor:S.emerald500,icon:e=><Wo size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"snapshot",label:z("media.snapshot","Snapshot"),themeColor:S.pink500,icon:e=><Fo size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>}];return!M||!De?null:<Ci visible={De}transparent={!0}animationType="fade"statusBarTranslucent={!0}onRequestClose={we}>
|
|
64
|
+
{ye&&<B activeOpacity={.8}onPress={()=>{P("medium"),ye()}}style={t.cropConfirmBtn}accessibilityLabel="Apply Crop Selection">
|
|
65
|
+
<Pr size={18}color={k.white}/>
|
|
66
|
+
</B>}
|
|
67
|
+
</F>};export const MediaPreviewModal=({item:M,visible:Ie,onClose:Ce,onDelete:At,onConvertToGif:vt,onSave:Ne})=>{const{t:R}=en(),ye=ur(kr),le=ye?.modalHeightPercent??90,{width:Ue}=Tr(),qe=oo(()=>io.OS==="ios"?le>=98?Ue>=390?50:44:0:io.OS==="android"&&le>=98?Fi.currentHeight||24:0,[le,Ue]),[Ae,Qe]=V(!1),[de,J]=V(!1),[q,X]=V(null),[he,ce]=V(M?.width),[ue,ie]=V(M?.height),[be,pe]=V(M?.sizeBytes),[Ut,Te]=V(M?.durationMs),[Xe,ne]=V(!1),[Ye,Oe]=V(!1),[Ft,tt]=V(!1),[I,Y]=V("none"),[ee,Me]=V(1),[Q,De]=V(0),[ve,kt]=V([]),[We,St]=V([]),[ze,Lo]=V(!1),[Li,ot]=V(!1),[O,_e]=V("brush"),[Ro,$i]=V(24),[Ve,ji]=V("brightness"),[K,Ot]=V("none"),[Fe,Dt]=V(!1),[me,Wt]=V(!1),[E,Rt]=V({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),[ke,Xt]=V(!1),[Se,Yt]=V(!1),[ae,it]=V(0),[ge,rt]=V(M?.durationMs||1e4),[Ke,ro]=V("end"),[xe,_t]=V(!1),[Ze,no]=V(100),[Ee,ao]=V(1),[Zt,$o]=V(12),[zo,Ni]=V(480),[jo,No]=V([]),[Mn,Uo]=V(!1),[vn,Ui]=V(0),[Po,qt]=V("free"),[Qt,zt]=V({x:.08,y:.12,width:.84,height:.76}),[Re,Xo]=V("#EF4444"),[Pe,Xi]=V(4),[te,He]=V([]),[G,Kt]=V(null),[fe,Ge]=V([]),[Yi,Jt]=V(!1),[Yo,_o]=V(null),[so,lo]=V(""),[ho,_i]=V({x:.3,y:.4}),re=et(()=>{St([]),kt(e=>[...e,{uri:q||M?.uri||null,inkPaths:[...te],texts:[...fe],adjustments:{...E},filterPreset:K,showWatermark:Fe,showGridlines:me,rotationAngle:Q,flipH:ke,flipV:Se,width:he,height:ue,sizeBytes:be}])},[q,M?.uri,te,fe,E,K,Fe,me,Q,ke,Se,he,ue,be]),Zo=L(re);Zo.current=re;const Fn=L(null),[nt,qo]=V({width:ui.get("window").width-16,height:ui.get("window").height*.72,pageX:0,pageY:0}),Le=L(I);Le.current=I;const co=L(O);co.current=O;const Vt=L(Re);Vt.current=Re;const Et=L(Pe);Et.current=Pe;const Zi=L(Lt.create({onStartShouldSetPanResponder:()=>Le.current==="draw",onMoveShouldSetPanResponder:()=>Le.current==="draw",onPanResponderGrant:e=>{Zo.current();const{locationX:C,locationY:T}=e.nativeEvent;Kt([{x:C,y:T}])},onPanResponderMove:e=>{const{locationX:C,locationY:T}=e.nativeEvent,v=co.current;Kt(v==="brush"||v==="highlighter"?z=>z?[...z,{x:C,y:T}]:[{x:C,y:T}]:z=>[z&&z.length>0?z[0]:{x:C,y:T},{x:C,y:T}])},onPanResponderRelease:()=>{Kt(e=>{if(e&&e.length>0){const C=co.current,T=e[0],v=e[e.length-1]||T;if((C==="brush"||C==="highlighter")&&e.length>1)He(z=>[...z,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:e,color:Vt.current,strokeWidth:Et.current}]);else if(C==="arrow"&&e.length>1)Math.hypot(v.x-T.x,v.y-T.y)>6&&He(D=>[...D,{id:`stroke_${Date.now()}_${Math.random()}`,type:"arrow",points:[T,v],color:Vt.current,strokeWidth:Et.current}]);else if(C==="circle"||C==="spotlight")Math.hypot(v.x-T.x,v.y-T.y)>6&&He(D=>[...D,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:[T,v],color:Vt.current,strokeWidth:Et.current}]);else if(C==="step"){const z=te.filter(D=>D.type==="step").length;He(D=>[...D,{id:`stroke_${Date.now()}_${Math.random()}`,type:"step",points:[T],color:Vt.current,strokeWidth:Et.current,stepNumber:z+1}])}else if(C==="rect"||C==="redact"||C==="pixelate"){const z=Math.min(T.x,v.x),D=Math.min(T.y,v.y),W=Math.abs(v.x-T.x),A=Math.abs(v.y-T.y);W>4&&A>4&&He(H=>[...H,{id:`stroke_${Date.now()}_${Math.random()}`,type:C,points:[T,v],rect:{x:z,y:D,width:W,height:A},color:Vt.current,strokeWidth:Et.current}])}}return null})}})).current,Ht=(e,C,T)=>{const v=C&&C>0?C:1e3,z=T&&T>0?T:1e3,D=v/z;if(e==="free")return{x:parseFloat(((1-.84)/2).toFixed(4)),y:parseFloat(((1-.76)/2).toFixed(4)),width:.84,height:.76};let W=1;e==="1:1"?W=1:e==="4:3"?W=4/3:e==="16:9"?W=16/9:e==="9:16"?W=9/16:e==="3:2"&&(W=3/2);const A=W/D;let H=.88,_=.88;if(A>=1){if(H=.88,_=.88/A,_>.88){const lt=.88/_;H*=lt,_=.88}}else if(_=.88,H=.88*A,H>.88){const lt=.88/H;_*=lt,H=.88}H=Math.max(.1,Math.min(.96,parseFloat(H.toFixed(4)))),_=Math.max(.1,Math.min(.96,parseFloat(_.toFixed(4))));const Je=parseFloat(((1-H)/2).toFixed(4)),It=parseFloat(((1-_)/2).toFixed(4));return{x:Je,y:It,width:H,height:_}};Ao.useEffect(()=>{M?.uri&&(X(M.uri),ce(M.width),ie(M.height),pe(M.sizeBytes),Te(M.durationMs),ne(!1),Me(1),Y("none"),He([]),Kt(null),Ge([]),zt(Ht("free",M.width,M.height)),it(0),rt(M.durationMs||1e4),ro("end"),_t(!1),no(100),ao(1),Ui(0))},[M?.uri,M?.width,M?.height,M?.sizeBytes,M?.durationMs]),Ao.useEffect(()=>{if(M?.type==="video"&&M?.uri){let e=!0;return Uo(!0),Mt.generateFilmstrip({uri:M.uri,count:10,targetWidth:120,targetHeight:120}).then(C=>{e&&C?.thumbnails&&No(C.thumbnails)}).catch(()=>{}).finally(()=>{e&&Uo(!1)}),()=>{e=!1}}else No([])},[M?.type,M?.uri]),Ao.useEffect(()=>{if(q||M?.uri){const e=q||M?.uri;e&&M?.type==="image"&&(!he||!ue)&&Co.getSize(e,(C,T)=>{C>0&&T>0&&(ce(C),ie(T))},()=>{})}},[q,M?.uri,M?.type,he,ue]);const we=oo(()=>{const e=nt.width,C=nt.height;if(!e||!C)return{width:e,height:C};const T=he??M?.width,v=ue??M?.height;if(!T||!v||T<=0||v<=0)return{width:e,height:C};const z=T/v,D=e/C;let W=e,A=C;return z>D?(W=e,A=e/z):(A=C,W=C*z),{width:Math.max(20,Math.floor(W)),height:Math.max(20,Math.floor(A))}},[nt.width,nt.height,he,ue,M?.width,M?.height]),Z=q||M?.uri,$e=he??M?.width,je=ue??M?.height,Qo=be??M?.sizeBytes,se=Ut??M?.durationMs,N=M?.type==="video",kn=M?.type==="gif",oe=M?.type==="image",Be=L(new Gt.ValueXY({x:0,y:0})).current,at=L({x:0,y:0}),eo=L({x:0,y:0});ci(()=>{const e=Be.x.addListener(T=>at.current.x=T.value),C=Be.y.addListener(T=>at.current.y=T.value);return()=>{Be.x.removeListener(e),Be.y.removeListener(C)}},[Be]);const st=L(ee);st.current=ee;const Pt=L(we);Pt.current=we;const Bt=L(nt);Bt.current=nt;const Ko=et(()=>{const e=st.current;if(e<=1)return{maxX:0,maxY:0};const C=Pt.current.width,T=Pt.current.height,v=Bt.current.width,z=Bt.current.height,D=Math.max(0,(C*e-v)/2/e),W=Math.max(0,(T*e-z)/2/e);return{maxX:D,maxY:W}},[]),Jo=et((e,C)=>{const{maxX:T,maxY:v}=Ko();return{x:Math.max(-T,Math.min(T,e)),y:Math.max(-v,Math.min(v,C))}},[Ko]),qi=L(Lt.create({onStartShouldSetPanResponder:()=>st.current>1,onMoveShouldSetPanResponder:(e,C)=>st.current>1&&(Math.abs(C.dx)>4||Math.abs(C.dy)>4),onMoveShouldSetPanResponderCapture:(e,C)=>st.current>1&&(Math.abs(C.dx)>6||Math.abs(C.dy)>6),onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0,onPanResponderGrant:()=>{eo.current={...at.current}},onPanResponderMove:(e,C)=>{const T=st.current,v=eo.current.x+C.dx/T,z=eo.current.y+C.dy/T,{maxX:D,maxY:W}=(()=>{const _=st.current;if(_<=1)return{maxX:0,maxY:0};const Je=Pt.current.width,It=Pt.current.height,lt=Bt.current.width,uo=Bt.current.height;return{maxX:Math.max(0,(Je*_-lt)/2/_),maxY:Math.max(0,(It*_-uo)/2/_)}})(),A=Math.max(-D,Math.min(D,v)),H=Math.max(-W,Math.min(W,z));Be.setValue({x:A,y:H})},onPanResponderRelease:()=>{const{maxX:e,maxY:C}=(()=>{const z=st.current;if(z<=1)return{maxX:0,maxY:0};const D=Pt.current.width,W=Pt.current.height,A=Bt.current.width,H=Bt.current.height;return{maxX:Math.max(0,(D*z-A)/2/z),maxY:Math.max(0,(W*z-H)/2/z)}})(),T=at.current,v={x:Math.max(-e,Math.min(e,T.x)),y:Math.max(-C,Math.min(C,T.y))};(v.x!==T.x||v.y!==T.y)&&Gt.spring(Be,{toValue:v,friction:7,tension:60,useNativeDriver:!1}).start()},onPanResponderTerminate:()=>{}})).current;ci(()=>{if(ee<=1)Be.setValue({x:0,y:0}),eo.current={x:0,y:0};else{const e=Jo(at.current.x,at.current.y);(e.x!==at.current.x||e.y!==at.current.y)&&Gt.spring(Be,{toValue:e,friction:7,tension:60,useNativeDriver:!1}).start()}},[ee,Be,Jo]);const Qi=()=>{P("light"),Me(e=>Math.min(4,parseFloat((e+.25).toFixed(2))))},Ki=()=>{P("light"),Me(e=>Math.max(1,parseFloat((e-.25).toFixed(2))))},ei=()=>{P("medium"),Me(1),Be.setValue({x:0,y:0}),eo.current={x:0,y:0}},ti=L(240),oi=et(e=>{const C=Math.max(50,ti.current),T=Math.max(0,Math.min(1,e/C));if(Le.current==="draw"){const v=co.current;if(v==="brush"||v==="highlighter"||v==="arrow"||v==="rect"||v==="circle"||v==="spotlight"||v==="step"){const z=Math.round(2+T*22);Xi(z)}else if(v==="pixelate"){const z=Math.round(4+T*36);$i(z)}}else if(Le.current==="adjust")if(Ve==="vignette"){const v=Math.round(T*100);Rt(z=>({...z,vignette:v}))}else{const v=Math.round(T*100-50);Rt(z=>({...z,[Ve]:v}))}else if(Le.current==="crop"){const v=Math.round(T*360);De(v)}else if(Le.current==="trim"){const z=Math.round(T*(se||1e4));Ke==="start"?it(Math.min(ge-500,z)):rt(Math.max(ae+500,z))}else if(Le.current==="audio"){const v=Math.round(T*100);no(v),_t(v===0)}else if(Le.current==="speed"){const v=parseFloat((.5+T*1.5).toFixed(2));ao(v)}else if(Le.current==="gif"){const v=Math.round(6+T*18);$o(v)}else if(Le.current==="none"){const v=parseFloat((1+T*3).toFixed(2));Me(v)}},[Ve,se,Ke,ae,ge]),Ji=L(Lt.create({onStartShouldSetPanResponder:()=>!0,onStartShouldSetPanResponderCapture:()=>!0,onMoveShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponderCapture:()=>!0,onPanResponderGrant:e=>{P("light"),oi(e.nativeEvent.locationX)},onPanResponderMove:e=>{oi(e.nativeEvent.locationX)},onPanResponderRelease:()=>{P("light")}})).current,ii=oo(()=>{if(I==="draw"){if(O==="brush"||O==="highlighter"||O==="arrow"||O==="rect"||O==="circle"||O==="spotlight"||O==="step")return Math.min(100,Math.max(0,(Pe-2)/22*100));if(O==="pixelate")return Math.min(100,Math.max(0,(Ro-4)/36*100));if(O==="redact")return 100}return I==="adjust"?Ve==="vignette"?Math.min(100,Math.max(0,E.vignette)):Math.min(100,Math.max(0,E[Ve]+50)):I==="crop"?Math.min(100,Math.max(0,Q/360*100)):I==="trim"?Math.min(100,Math.max(0,(Ke==="start"?ae:ge)/(se||1e4)*100)):I==="audio"?xe?0:Ze:I==="speed"?Math.min(100,Math.max(0,(Ee-.5)/1.5*100)):I==="gif"?Math.min(100,Math.max(0,(Zt-6)/18*100)):I==="none"?Math.min(100,Math.max(0,(ee-1)/3*100)):50},[I,O,Pe,Ro,Ve,E,Q,ee,se,Ke,ae,ge,xe,Ze,Ee,Zt]),ri=et(()=>{if(ve.length===0)return;P("light");const e=ve[ve.length-1];St(C=>[...C,{uri:q||M?.uri||null,inkPaths:[...te],texts:[...fe],adjustments:{...E},filterPreset:K,showWatermark:Fe,rotationAngle:Q,flipH:ke,flipV:Se,width:he,height:ue,sizeBytes:be}]),kt(C=>C.slice(0,C.length-1)),e&&(X(e.uri),He(e.inkPaths),Ge(e.texts),e.adjustments&&Rt(e.adjustments),e.filterPreset&&Ot(e.filterPreset),e.showWatermark!==void 0&&Dt(e.showWatermark),e.showGridlines!==void 0&&Wt(e.showGridlines),e.rotationAngle!==void 0&&De(e.rotationAngle),e.flipH!==void 0&&Xt(e.flipH),e.flipV!==void 0&&Yt(e.flipV),e.width&&ce(e.width),e.height&&ie(e.height),e.sizeBytes&&pe(e.sizeBytes),$(R("mediaGallery.undone","Action Undone")))},[ve,q,M?.uri,te,fe,E,K,Fe,me,Q,ke,Se,he,ue,be,R]),er=et(()=>{if(We.length===0)return;P("light");const e=We[We.length-1];kt(C=>[...C,{uri:q||M?.uri||null,inkPaths:[...te],texts:[...fe],adjustments:{...E},filterPreset:K,showWatermark:Fe,showGridlines:me,rotationAngle:Q,flipH:ke,flipV:Se,width:he,height:ue,sizeBytes:be}]),St(C=>C.slice(0,C.length-1)),e&&(X(e.uri),He(e.inkPaths),Ge(e.texts),e.adjustments&&Rt(e.adjustments),e.filterPreset&&Ot(e.filterPreset),e.showWatermark!==void 0&&Dt(e.showWatermark),e.showGridlines!==void 0&&Wt(e.showGridlines),e.rotationAngle!==void 0&&De(e.rotationAngle),e.flipH!==void 0&&Xt(e.flipH),e.flipV!==void 0&&Yt(e.flipV),e.width&&ce(e.width),e.height&&ie(e.height),e.sizeBytes&&pe(e.sizeBytes),$(R("mediaGallery.redone","Action Redone")))},[We,q,M?.uri,te,fe,E,K,Fe,me,Q,ke,Se,he,ue,be,R]),tr=et(()=>{M&&(P("medium"),re(),X(M.uri),He([]),Ge([]),Rt({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),Ot("none"),Dt(!1),Wt(!1),De(0),Xt(!1),Yt(!1),ce(M.width),ie(M.height),pe(M.sizeBytes),Te(M.durationMs),Me(1),Y("none"),it(0),rt(M.durationMs||1e4),ro("end"),_t(!1),no(100),ao(1),$(R("mediaGallery.resetSuccess",M.type==="video"?"Reset to original video":"Reset to original image")))},[M,re,R]),ni=et(async()=>{if(!(!M||!Z)){if(P("medium"),J(!0),N){try{const e=se||M.durationMs||1e4,C=await Mt.trimVideo({uri:Z,startTimeMs:ae,endTimeMs:ge<e?ge:void 0,muteAudio:xe||Ze===0,quality:"high"});if(C?.uri){const T={...M,uri:C.uri,durationMs:C.durationMs||M.durationMs,sizeBytes:C.size||M.sizeBytes,width:C.width||M.width,height:C.height||M.height,filename:C.uri.split("/").pop()||M.filename};X(C.uri),C.width&&ce(C.width),C.height&&ie(C.height),C.size&&pe(C.size),C.durationMs&&Te(C.durationMs),Ne?.(T),$(R("mediaGallery.videoSaved","Video Saved Successfully")),ye?.refreshMediaCount?.().catch(()=>{})}else $(R("mediaGallery.videoSaved","Video Saved"))}catch{$(R("mediaGallery.saveFailed","Failed to save video"))}finally{J(!1)}return}try{const e=Math.max(1,we.width||380),C=Math.max(1,we.height||600),T=te.filter(A=>A.type!=="redact"&&A.type!=="pixelate").map(A=>({id:A.id,type:A.type,points:A.points.map(H=>({x:H.x/e,y:H.y/C})),color:A.color||"#EF4444",strokeWidth:A.strokeWidth||4,stepNumber:A.stepNumber,isNormalized:!0})),v=te.filter(A=>(A.type==="redact"||A.type==="pixelate")&&A.rect).map(A=>{const H=A.rect;return{x:H.x/e,y:H.y/C,width:H.width/e,height:H.height/C,style:A.type==="pixelate"?"blur":"blackout",isNormalized:!0}}),z=fe.map(A=>({id:A.id,text:A.text,x:A.x,y:A.y,color:A.color||"#FFFFFF",bgColor:A.bgColor||"#EF4444",isNormalized:!0})),D=[...fe.map(A=>({x:A.x,y:A.y,width:.22,height:.06,color:A.bgColor||"#EF4444",label:A.text,isNormalized:!0})),...te.filter(A=>A.type==="rect"||A.type==="arrow"||A.type==="circle").map(A=>{const H=A.points[0]||{x:0,y:0},_=A.points[A.points.length-1]||H,Je=Math.min(H.x,_.x),It=Math.min(H.y,_.y),lt=Math.max(10,Math.abs(_.x-H.x)),uo=Math.max(10,Math.abs(_.y-H.y));return{x:Je/e,y:It/C,width:lt/e,height:uo/C,color:A.color||"#EF4444",isNormalized:!0}})],W=await Mt.editPhoto({uri:Z,rotation:Q!==0?Q:void 0,flipHorizontal:ke,flipVertical:Se,adjustments:{brightness:E.brightness/50,contrast:1+E.contrast/50,saturation:1+E.saturation/50,temperature:E.warmth/50,vignette:E.vignette/100},filterPreset:K!=="none"?K:void 0,drawings:T.length>0?T:void 0,texts:z.length>0?z:void 0,redactions:v.length>0?v:void 0,annotations:D.length>0?D:void 0,format:M.format==="png"?"png":"jpeg",quality:.92});if(W?.uri){const A={...M,uri:W.uri,width:W.width,height:W.height,sizeBytes:W.size,filename:W.uri.split("/").pop()||M.filename};X(W.uri),W.width&&ce(W.width),W.height&&ie(W.height),W.size&&pe(W.size),He([]),Ge([]),Rt({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),De(0),Xt(!1),Yt(!1),Ot("none"),Ne?.(A),$(R("mediaGallery.savedSuccess","Image Saved Successfully")),ye?.refreshMediaCount?.().catch(()=>{})}else $(R("mediaGallery.savedSuccess","Image Saved"))}catch{$(R("mediaGallery.saveFailed","Failed to save image"))}finally{J(!1)}}},[M,Z,N,se,ae,ge,xe,Ze,we,Q,ke,Se,E,K,te,fe,Ne,ye,R]),ai=et(async()=>{if(!(!M||!Z||!N||de)){P("medium"),J(!0);try{const e=await Mt.generateFilmstrip({uri:Z,count:1,targetWidth:$e||1080,targetHeight:je||1920});e?.thumbnails&&e.thumbnails.length>0?($(R("mediaGallery.snapshotSaved","Frame Snapshot Saved (PNG)")),ye?.refreshMediaCount?.().catch(()=>{})):$(R("mediaGallery.snapshotFailed","Failed to snapshot frame"))}catch{$(R("mediaGallery.snapshotFailed","Failed to snapshot frame"))}finally{J(!1)}}},[M,Z,N,de,$e,je,ye,R]),or=oo(()=>{if(!N||!M)return!1;const e=M.durationMs||1e4,C=ae>0||ge<e,T=xe||Ze<100,v=Ee!==1,z=q!=null&&q!==M.uri;return C||T||v||z},[N,M,ae,ge,xe,Ze,Ee,q]),si=oo(()=>{if(!M)return!1;const e=q!=null&&q!==M.uri,C=te.length>0,T=fe.length>0,v=ve.length>0,z=E.brightness!==0||E.contrast!==0||E.saturation!==0||E.warmth!==0||E.exposure!==0||E.vignette!==0;return e||C||T||v||z||(Q!==0||ke||Se)||K!=="none"||Fe||me},[q,M,te.length,fe.length,ve.length,E,Q,ke,Se,K,Fe,me]),ir=()=>{P("light"),ri()},rr=()=>{P("medium"),re(),He([])},Sn=e=>{P("light"),Y("crop"),qt(e),zt(Ht(e,$e,je))},li=async()=>{if(!(!Z||!oe)){P("medium"),re(),J(!0);try{const e=await Mt.cropToDefect(Z,{x:Qt.x,y:Qt.y,width:Qt.width,height:Qt.height,isNormalized:!0});if(e?.uri){const C={...M,uri:e.uri,width:e.width,height:e.height,sizeBytes:e.size,filename:e.uri.split("/").pop()||M.filename};X(e.uri),e.width&&ce(e.width),e.height&&ie(e.height),e.size&&pe(e.size),zt(Ht("free",e.width,e.height)),qt("free"),Ne?.(C),$(R("mediaGallery.croppedSuccess","Image Cropped")),Y("none")}else $(R("mediaGallery.cropFailed","Crop failed"))}catch{$(R("mediaGallery.cropFailed","Crop failed"))}finally{J(!1)}}},Bo=e=>{P("light"),e?(_o(e),lo(e.text)):(_o(null),lo("")),Jt(!0)},nr=e=>{P("light"),re(),Ge(C=>C.filter(T=>T.id!==e))},ar=()=>{if(!so.trim()){Jt(!1);return}if(re(),Yo)Ge(e=>e.map(C=>C.id===Yo.id?{...C,text:so.trim(),color:Re}:C));else{const e={id:`text_${Date.now()}`,text:so.trim(),x:ho.x,y:ho.y,color:k.white,bgColor:Re==="#FFFFFF"?"#0F172A":Re};Ge(C=>[...C,e])}Jt(!1),lo(""),$(R("mediaGallery.textAdded","Text Added"))},Rn=async e=>{if(!(!Z||!oe||de)){P("medium"),re(),J(!0);try{const C=await Mt.editPhoto({uri:Z,quality:.85,crop:{x:0,y:0,width:1,height:1,isNormalized:!0}});if(C?.uri){const T=Math.round(($e||1080)*e),v=Math.round((je||1920)*e),z={...M,uri:C.uri,width:T,height:v,sizeBytes:C.size?Math.round(C.size*e*e):M.sizeBytes,filename:C.uri.split("/").pop()||M.filename};X(C.uri),ce(T),ie(v),C.size&&pe(Math.round(C.size*e*e)),Ne?.(z),$(R("mediaGallery.resizedSuccess",`Resized to ${Math.round(e*100)}% (${T}\xD7${v})`)),Y("none")}}catch{$(R("mediaGallery.resizeFailed","Resize failed"))}finally{J(!1)}}},sr=async()=>{try{P("light");const e=Z.startsWith("file://")||Z.startsWith("content://")||Z.startsWith("http")?Z:`file://${Z}`,C=io.select({ios:{url:e,title:M.filename},default:{title:M.filename,message:M.filename,url:e}});(await Mi.share(C)).action===Mi.sharedAction&&$(R("mediaGallery.shareSuccess","Shared successfully"))}catch(e){e?.message!=="User did not share"&&$(R("mediaGallery.shareUnavailable","Sharing not available on this device"))}},lr=()=>{P("medium"),tt(!0)},di=async()=>{if(vt){Qe(!0);try{await vt(M),$(R("mediaGallery.convertedSuccess","Converted to GIF!"))}catch{$(R("mediaGallery.convertFailed","Conversion failed"))}finally{Qe(!1)}}},Io=async()=>{try{Oe(!0),await Jr.playVideo(Z)}catch{$(R("mediaGallery.playError","Unable to play video"))}finally{Oe(!1)}},zn=async()=>{if(!(!Z||!N||de)){J(!0),P("light");try{const C=Math.min(se||1e4,5e3),T=await Mt.trimReproClip(Z,0,C,{quality:"medium"});T?.uri&&(X(T.uri),T.width&&ce(T.width),T.height&&ie(T.height),T.size&&pe(T.size),T.durationMs&&Te(T.durationMs),$(R("mediaGallery.trimmedSuccess","Trimmed to 5s Repro Clip")))}catch{$(R("mediaGallery.trimFailed","Trim failed"))}finally{J(!1)}}},dr=async()=>{if(!(!Z||!N||de)){J(!0),P("light");try{const e=await Mt.muteVideo(Z);e?.uri&&(X(e.uri),e.width&&ce(e.width),e.height&&ie(e.height),e.size&&pe(e.size),e.durationMs&&Te(e.durationMs),$(R("mediaGallery.mutedSuccess","Audio Stripped")))}catch{$(R("mediaGallery.muteFailed","Mute failed"))}finally{J(!1)}}},to=se?(se/1e3).toFixed(1):null,hi=to?`00:${Number(to)<10?"0":""}${to}`:null,hr=[{key:"none",label:R("mediaGallery.preview","Preview"),themeColor:k.brandPurple,icon:e=><Ii size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"crop",label:"Crop",themeColor:k.sky600,icon:e=><Bi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"adjust",label:"Adjust",themeColor:k.amber500,icon:e=><Wi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"draw",label:"Markup",themeColor:k.sky400,icon:e=><Eo size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"text",label:"Text",themeColor:k.violet600,icon:e=><Vi size={16}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>}],cr=[{key:"none",label:R("mediaGallery.preview","Player"),themeColor:k.brandPurple,icon:e=><Ii size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"trim",label:R("media.trim","Trim"),themeColor:k.sky600,icon:e=><Di size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:ae>0||ge<(se||1e4)},{key:"audio",label:R("media.audio","Audio"),themeColor:k.amber600,icon:e=><So size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:xe||Ze<100},{key:"speed",label:R("media.speed","Speed"),themeColor:k.violet600,icon:e=><Go size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>,hasBadge:Ee!==1},{key:"gif",label:R("media.toGif","To GIF"),themeColor:k.emerald500,icon:e=><Wo size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>},{key:"snapshot",label:R("media.snapshot","Snapshot"),themeColor:k.pink500,icon:e=><Fo size={14}color={e?"#38BDF8":"rgba(255,255,255,0.55)"}/>}];return!M||!Ie?null:<Ci visible={Ie}transparent={!0}animationType="fade"statusBarTranslucent={!0}onRequestClose={Ce}>
|
|
68
68
|
<F style={t.modalBackdrop}>
|
|
69
|
-
<Oo style={t.modalBackdropPressable}onPress={
|
|
70
|
-
<F style={[t.modalContentCard,{height:`${
|
|
69
|
+
<Oo style={t.modalBackdropPressable}onPress={Ce}/>
|
|
70
|
+
<F style={[t.modalContentCard,{height:`${le}%`,borderTopLeftRadius:le>=100?0:20,borderTopRightRadius:le>=100?0:20}]}>
|
|
71
71
|
<Fi translucent backgroundColor="transparent"barStyle="light-content"/>
|
|
72
72
|
|
|
73
|
-
<F style={[t.header,{paddingTop:
|
|
74
|
-
<Mr colors={[
|
|
73
|
+
<F style={[t.header,{paddingTop:qe,borderTopLeftRadius:le>=100?0:20,borderTopRightRadius:le>=100?0:20}]}>
|
|
74
|
+
<Mr colors={[k.indigo600,k.violet600]}start={{x:0,y:0}}end={{x:1,y:1}}style={[U.absoluteFill,{borderTopLeftRadius:le>=100?0:20,borderTopRightRadius:le>=100?0:20}]}pointerEvents="none"/>
|
|
75
75
|
<F style={t.headerInner}>
|
|
76
76
|
|
|
77
77
|
<F style={t.headerLeft}>
|
|
78
|
-
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel={
|
|
78
|
+
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel={R("common.back","Back")}onPress={Ce}hitSlop={15}style={t.headerBackBtn}>
|
|
79
79
|
<Nr size={17}/>
|
|
80
80
|
</Tt>
|
|
81
81
|
<F style={t.headerTextCol}>
|
|
82
82
|
<F style={t.headerTitleRow}>
|
|
83
|
-
<
|
|
84
|
-
{M.filename||(
|
|
85
|
-
</
|
|
83
|
+
<S style={t.title}numberOfLines={1}>
|
|
84
|
+
{M.filename||(oe?"debug_session.png":"recording.mp4")}
|
|
85
|
+
</S>
|
|
86
86
|
<F style={t.formatBadge}>
|
|
87
|
-
<
|
|
88
|
-
{(M.filename?.split(".").pop()||(
|
|
89
|
-
</
|
|
87
|
+
<S style={t.formatBadgeText}>
|
|
88
|
+
{(M.filename?.split(".").pop()||(oe?"PNG":N?"MP4":"GIF")).toUpperCase()}
|
|
89
|
+
</S>
|
|
90
90
|
</F>
|
|
91
91
|
</F>
|
|
92
92
|
<F style={t.headerSubtitleRow}>
|
|
93
|
-
<
|
|
94
|
-
{
|
|
95
|
-
</
|
|
96
|
-
{
|
|
97
|
-
<
|
|
98
|
-
<
|
|
99
|
-
{Hi(
|
|
100
|
-
</
|
|
93
|
+
<S style={t.subtitleDim}numberOfLines={1}>
|
|
94
|
+
{$e&&je?`${$e} \xD7 ${je}`:oe?"1320 \xD7 2868":"1080 \xD7 1920"}
|
|
95
|
+
</S>
|
|
96
|
+
{Qo?<>
|
|
97
|
+
<S style={t.subtitleDot}>•</S>
|
|
98
|
+
<S style={t.subtitleSize}>
|
|
99
|
+
{Hi(Qo)}
|
|
100
|
+
</S>
|
|
101
101
|
</>:<>
|
|
102
|
-
<
|
|
103
|
-
<
|
|
102
|
+
<S style={t.subtitleDot}>•</S>
|
|
103
|
+
<S style={t.subtitleSize}>774 KB</S>
|
|
104
104
|
</>}
|
|
105
105
|
</F>
|
|
106
106
|
</F>
|
|
@@ -109,30 +109,30 @@ import Ao,{useCallback as ot,useContext as ur,useEffect as ci,useMemo as eo,useR
|
|
|
109
109
|
|
|
110
110
|
<F style={t.headerRight}>
|
|
111
111
|
|
|
112
|
-
{
|
|
113
|
-
<
|
|
114
|
-
<Ei size={14}color={
|
|
115
|
-
</
|
|
112
|
+
{oe&&<F style={t.undoRedoGroup}>
|
|
113
|
+
<B accessible={!0}accessibilityRole="button"accessibilityLabel={R("common.undo","Undo")}onPress={ri}disabled={ve.length===0}style={[t.undoHalfBtn,ve.length===0&&t.actionDisabled]}hitSlop={{top:8,bottom:8,left:6,right:4}}>
|
|
114
|
+
<Ei size={14}color={ve.length>0?k.white:"rgba(255, 255, 255, 0.35)"}/>
|
|
115
|
+
</B>
|
|
116
116
|
<F style={t.undoDivider}/>
|
|
117
|
-
<
|
|
118
|
-
<Er size={14}color={
|
|
119
|
-
</
|
|
117
|
+
<B accessible={!0}accessibilityRole="button"accessibilityLabel="Redo"onPress={er}disabled={We.length===0}style={[t.redoHalfBtn,We.length===0&&t.actionDisabled]}hitSlop={{top:8,bottom:8,left:4,right:6}}>
|
|
118
|
+
<Er size={14}color={We.length>0?k.white:"rgba(255, 255, 255, 0.35)"}/>
|
|
119
|
+
</B>
|
|
120
120
|
</F>}
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel="More Options"onPress={()=>{
|
|
124
|
-
<Dr size={16}color={
|
|
123
|
+
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel="More Options"onPress={()=>{P("light"),ot(e=>!e)}}style={t.headerMoreBtn}hitSlop={{top:8,bottom:8,left:6,right:6}}>
|
|
124
|
+
<Dr size={16}color={k.white}/>
|
|
125
125
|
</Tt>
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel={
|
|
129
|
-
<Gr size={14}color={
|
|
130
|
-
<
|
|
128
|
+
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel={R("common.save","Save")}onPress={ni}disabled={de}style={[t.headerSaveBtn,de&&{opacity:.6}]}hitSlop={{top:8,bottom:8,left:6,right:6}}>
|
|
129
|
+
<Gr size={14}color={k.white}/>
|
|
130
|
+
<S style={t.headerSaveText}>{R("common.save","Save")}</S>
|
|
131
131
|
</Tt>
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel={
|
|
135
|
-
<Do size={15}color={
|
|
134
|
+
<Tt accessible={!0}accessibilityRole="button"accessibilityLabel={R("common.close","Close")}onPress={Ce}style={t.headerCloseBtn}hitSlop={{top:8,bottom:8,left:6,right:6}}>
|
|
135
|
+
<Do size={15}color={k.white}/>
|
|
136
136
|
</Tt>
|
|
137
137
|
</F>
|
|
138
138
|
</F>
|
|
@@ -140,649 +140,649 @@ import Ao,{useCallback as ot,useContext as ur,useEffect as ci,useMemo as eo,useR
|
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
{Li&&<F style={t.moreMenuDropdown}>
|
|
143
|
-
{(
|
|
144
|
-
<Oi size={14}color={
|
|
145
|
-
<
|
|
146
|
-
{
|
|
147
|
-
</
|
|
148
|
-
</
|
|
149
|
-
{
|
|
150
|
-
<Vo size={14}color={
|
|
151
|
-
<
|
|
152
|
-
{
|
|
153
|
-
</
|
|
154
|
-
</
|
|
155
|
-
{
|
|
156
|
-
<
|
|
157
|
-
<
|
|
158
|
-
{
|
|
159
|
-
</
|
|
160
|
-
</
|
|
161
|
-
{
|
|
162
|
-
<Wo size={14}color={
|
|
163
|
-
<
|
|
164
|
-
{
|
|
165
|
-
</
|
|
166
|
-
</
|
|
167
|
-
{
|
|
168
|
-
<Fo size={14}color={
|
|
169
|
-
<
|
|
170
|
-
{
|
|
171
|
-
</
|
|
172
|
-
</
|
|
173
|
-
<
|
|
174
|
-
<Lr size={14}color={
|
|
175
|
-
<
|
|
176
|
-
{
|
|
177
|
-
</
|
|
178
|
-
</
|
|
179
|
-
<
|
|
180
|
-
<$r size={14}color={
|
|
181
|
-
<
|
|
182
|
-
{
|
|
183
|
-
</
|
|
184
|
-
</
|
|
143
|
+
{(oe&&si||N&&or)&&<B onPress={()=>{ot(!1),tr()}}style={t.moreMenuItem}>
|
|
144
|
+
<Oi size={14}color={k.sky400}/>
|
|
145
|
+
<S style={t.moreMenuItemText}>
|
|
146
|
+
{R("common.reset","Reset to Original")}
|
|
147
|
+
</S>
|
|
148
|
+
</B>}
|
|
149
|
+
{oe&&<B onPress={()=>{P("light"),Wt(e=>!e),ot(!1)}}style={t.moreMenuItem}>
|
|
150
|
+
<Vo size={14}color={me?k.sky400:k.white}/>
|
|
151
|
+
<S style={t.moreMenuItemText}>
|
|
152
|
+
{me?R("mediaGallery.hideGridlines","Hide Instagram Grid (3\xD73)"):R("mediaGallery.showGridlines","Show Instagram Grid (3\xD73)")}
|
|
153
|
+
</S>
|
|
154
|
+
</B>}
|
|
155
|
+
{oe&&<B onPress={()=>{P("light"),re(),Dt(e=>!e),ot(!1)}}style={t.moreMenuItem}>
|
|
156
|
+
<S style={t.moreMenuItemIconText}>🛡</S>
|
|
157
|
+
<S style={t.moreMenuItemText}>
|
|
158
|
+
{Fe?R("mediaGallery.hideWatermark","Hide QA Watermark"):R("mediaGallery.showWatermark","Show QA Watermark")}
|
|
159
|
+
</S>
|
|
160
|
+
</B>}
|
|
161
|
+
{N&&<B onPress={()=>{ot(!1),di()}}style={t.moreMenuItem}>
|
|
162
|
+
<Wo size={14}color={k.violet600}/>
|
|
163
|
+
<S style={t.moreMenuItemText}>
|
|
164
|
+
{R("mediaGallery.exportGif","Export as Animated GIF")}
|
|
165
|
+
</S>
|
|
166
|
+
</B>}
|
|
167
|
+
{N&&<B onPress={()=>{ot(!1),ai()}}style={t.moreMenuItem}>
|
|
168
|
+
<Fo size={14}color={k.sky400}/>
|
|
169
|
+
<S style={t.moreMenuItemText}>
|
|
170
|
+
{R("mediaGallery.snapshotFrame","Snapshot Frame (PNG)")}
|
|
171
|
+
</S>
|
|
172
|
+
</B>}
|
|
173
|
+
<B onPress={()=>{ot(!1),sr()}}style={t.moreMenuItem}>
|
|
174
|
+
<Lr size={14}color={k.white}/>
|
|
175
|
+
<S style={t.moreMenuItemText}>
|
|
176
|
+
{R("mediaGallery.share",N?"Share Video":"Share Image")}
|
|
177
|
+
</S>
|
|
178
|
+
</B>
|
|
179
|
+
<B onPress={()=>{ot(!1),lr()}}style={[t.moreMenuItem,t.moreMenuItemDestructive]}>
|
|
180
|
+
<$r size={14}color={k.rose500}/>
|
|
181
|
+
<S style={[t.moreMenuItemText,{color:k.rose500}]}>
|
|
182
|
+
{R("mediaGallery.delete","Delete Media")}
|
|
183
|
+
</S>
|
|
184
|
+
</B>
|
|
185
185
|
</F>}
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
<F style={t.stageWrapper}>
|
|
189
|
-
<F onLayout={e=>{const{width:C,height:T}=e.nativeEvent.layout;C>20&&T>20&&
|
|
190
|
-
{
|
|
191
|
-
<Co source={{uri:M.thumbnailUri}}style={t.image}resizeMode="contain"onError={()=>
|
|
189
|
+
<F onLayout={e=>{const{width:C,height:T}=e.nativeEvent.layout;C>20&&T>20&&qo(v=>({...v,width:C,height:T}))}}style={t.previewCard}>
|
|
190
|
+
{N?M.thumbnailUri&&!Xe?<>
|
|
191
|
+
<Co source={{uri:M.thumbnailUri}}style={t.image}resizeMode="contain"onError={()=>ne(!0)}/>
|
|
192
192
|
<F style={t.videoImageOverlay}/>
|
|
193
193
|
</>:<F style={t.videoFallbackBackdrop}>
|
|
194
194
|
<F style={t.videoFallbackGlow}/>
|
|
195
|
-
<Ir size={52}color={
|
|
196
|
-
<
|
|
195
|
+
<Ir size={52}color={k.sky400}/>
|
|
196
|
+
<S style={t.videoFallbackTitle}>
|
|
197
197
|
{M.width&&M.height?`${M.width} \xD7 ${M.height}`:"HD Video Recording"}
|
|
198
|
-
</
|
|
199
|
-
<
|
|
200
|
-
{
|
|
198
|
+
</S>
|
|
199
|
+
<S style={t.videoFallbackSubtitle}>
|
|
200
|
+
{to?`${to}s duration`:"MP4 Video"} •{" "}
|
|
201
201
|
{Hi(M.sizeBytes)}
|
|
202
|
-
</
|
|
203
|
-
</F>:<
|
|
204
|
-
<F style={[t.imageCanvasWrapper,{width:
|
|
202
|
+
</S>
|
|
203
|
+
</F>:<Gt.View onLayout={e=>{const{width:C,height:T}=e.nativeEvent.layout;C>20&&T>20&&qo(v=>({...v,width:C,height:T}))}}style={[t.canvasContainer,{transform:[...Be.getTranslateTransform(),{scale:ee}]}]}{...I==="draw"?Zi.panHandlers:I==="none"&&ee>1?qi.panHandlers:{}}>
|
|
204
|
+
<F style={[t.imageCanvasWrapper,{width:we.width,height:we.height,transform:[{rotate:`${Q}deg`},{scaleX:ke?-1:1},{scaleY:Se?-1:1}]}]}>
|
|
205
205
|
|
|
206
|
-
<Co key={
|
|
206
|
+
<Co key={ze?M?.uri:Z}source={{uri:ze?M?.uri:Z}}style={t.image}resizeMode="cover"onError={()=>ne(!0)}/>
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
{!
|
|
209
|
+
{!ze&&<>
|
|
210
210
|
|
|
211
|
-
{E.brightness+E.exposure!==0&&<F pointerEvents="none"style={[
|
|
211
|
+
{E.brightness+E.exposure!==0&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:E.brightness+E.exposure>0?"#FFFFFF":"#000000",opacity:Math.min(.65,Math.abs(E.brightness+E.exposure)/100*.7)}]}/>}
|
|
212
212
|
|
|
213
213
|
|
|
214
|
-
{E.warmth!==0&&<F pointerEvents="none"style={[
|
|
214
|
+
{E.warmth!==0&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:E.warmth>0?"#F59E0B":"#0284C7",opacity:Math.min(.4,Math.abs(E.warmth)/50*.35)}]}/>}
|
|
215
215
|
|
|
216
216
|
|
|
217
|
-
{E.saturation>0&&<F pointerEvents="none"style={[
|
|
217
|
+
{E.saturation>0&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:"#A855F7",opacity:Math.min(.2,E.saturation/50*.15)}]}/>}
|
|
218
218
|
|
|
219
219
|
|
|
220
|
-
{E.vignette>0&&<F pointerEvents="none"style={[
|
|
220
|
+
{E.vignette>0&&<F pointerEvents="none"style={[U.absoluteFill,{borderRadius:6,borderWidth:Math.max(2,E.vignette/100*44),borderColor:`rgba(0, 0, 0, ${.85*(E.vignette/100)})`}]}/>}
|
|
221
221
|
|
|
222
222
|
|
|
223
|
-
{K==="mono"&&<F pointerEvents="none"style={[
|
|
224
|
-
{K==="noir"&&<F pointerEvents="none"style={[
|
|
225
|
-
{K==="sepia"&&<F pointerEvents="none"style={[
|
|
226
|
-
{K==="vintage"&&<F pointerEvents="none"style={[
|
|
227
|
-
{K==="vibrant"&&<F pointerEvents="none"style={[
|
|
228
|
-
{K==="cool"&&<F pointerEvents="none"style={[
|
|
229
|
-
{K==="warm"&&<F pointerEvents="none"style={[
|
|
230
|
-
{K==="fade"&&<F pointerEvents="none"style={[
|
|
223
|
+
{K==="mono"&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:"rgba(100, 116, 139, 0.45)"}]}/>}
|
|
224
|
+
{K==="noir"&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:"rgba(0, 0, 0, 0.48)"}]}/>}
|
|
225
|
+
{K==="sepia"&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:"rgba(120, 53, 15, 0.32)"}]}/>}
|
|
226
|
+
{K==="vintage"&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:"rgba(217, 119, 6, 0.22)"}]}/>}
|
|
227
|
+
{K==="vibrant"&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:"rgba(236, 72, 153, 0.16)"}]}/>}
|
|
228
|
+
{K==="cool"&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:"rgba(14, 165, 233, 0.22)"}]}/>}
|
|
229
|
+
{K==="warm"&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:"rgba(249, 115, 22, 0.22)"}]}/>}
|
|
230
|
+
{K==="fade"&&<F pointerEvents="none"style={[U.absoluteFill,{backgroundColor:"rgba(255, 255, 255, 0.18)"}]}/>}
|
|
231
231
|
</>}
|
|
232
232
|
|
|
233
233
|
|
|
234
|
-
{!
|
|
234
|
+
{!ze&&<Fr style={U.absoluteFill}pointerEvents={I==="draw"?"auto":"none"}>
|
|
235
235
|
<Ct>
|
|
236
236
|
|
|
237
|
-
{
|
|
238
|
-
|
|
239
|
-
<Ri points={`${T.x},${T.y} ${
|
|
240
|
-
</Ct>}if(e.type==="rect"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return
|
|
241
|
-
<To cx={
|
|
237
|
+
{te.map(e=>{if(e.type==="brush"){if(e.points.length<2)return null;const C=e.points.reduce((T,v,z)=>z===0?`M ${v.x} ${v.y}`:`${T} L ${v.x} ${v.y}`,"");return<Mo key={e.id}d={C}stroke={e.color}strokeWidth={e.strokeWidth}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}if(e.type==="highlighter"){if(e.points.length<2)return null;const C=e.points.reduce((T,v,z)=>z===0?`M ${v.x} ${v.y}`:`${T} L ${v.x} ${v.y}`,"");return<Mo key={e.id}d={C}stroke={e.color}strokeWidth={e.strokeWidth*2.5}strokeOpacity={.4}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}if(e.type==="arrow"){if(e.points.length<2)return null;const C=e.points[0],T=e.points[1],v=T.x-C.x,z=T.y-C.y,D=Math.atan2(z,v),W=Math.min(28,Math.max(14,e.strokeWidth*3.5)),A=Math.PI/6,H=T.x-W*Math.cos(D-A),_=T.y-W*Math.sin(D-A),Je=T.x-W*Math.cos(D+A),It=T.y-W*Math.sin(D+A);return<Ct key={e.id}>
|
|
238
|
+
<$t x1={C.x}y1={C.y}x2={T.x}y2={T.y}stroke={e.color}strokeWidth={e.strokeWidth}strokeLinecap="round"/>
|
|
239
|
+
<Ri points={`${T.x},${T.y} ${H},${_} ${Je},${It}`}fill={e.color}/>
|
|
240
|
+
</Ct>}if(e.type==="rect"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return<Nt key={e.id}x={C.x}y={C.y}width={C.width}height={C.height}stroke={e.color}strokeWidth={e.strokeWidth}rx={6}ry={6}fill="none"/>}if(e.type==="circle"){const C=e.points[0]||{x:0,y:0},T=e.points[1]||C,v=Math.min(C.x,T.x),z=Math.min(C.y,T.y),D=Math.max(10,Math.abs(T.x-C.x)),W=Math.max(10,Math.abs(T.y-C.y));return<To key={e.id}cx={v+D/2}cy={z+W/2}rx={D/2}ry={W/2}stroke={e.color}strokeWidth={e.strokeWidth}fill="none"/>}if(e.type==="spotlight"){const C=e.points[0]||{x:0,y:0},T=e.points[1]||C,v=Math.min(C.x,T.x),z=Math.min(C.y,T.y),D=Math.max(16,Math.abs(T.x-C.x)),W=Math.max(16,Math.abs(T.y-C.y));return<Ct key={e.id}>
|
|
241
|
+
<To cx={v+D/2}cy={z+W/2}rx={D/2}ry={W/2}stroke="#FBBF24"strokeWidth={2.5}strokeDasharray="5,3"fill="rgba(255, 255, 255, 0.15)"/>
|
|
242
242
|
</Ct>}if(e.type==="step"){const C=e.points[0]||{x:0,y:0},T=Math.max(12,Math.min(20,e.strokeWidth*2.2+8));return<Ct key={e.id}>
|
|
243
243
|
<Si cx={C.x}cy={C.y}r={T}fill={e.color||"#EF4444"}stroke="#FFFFFF"strokeWidth={1.5}/>
|
|
244
244
|
<Pi x={C.x}y={C.y+T*.35}fill="#FFFFFF"fontSize={Math.round(T*.95)}fontWeight="bold"textAnchor="middle">
|
|
245
245
|
{e.stepNumber||1}
|
|
246
246
|
</Pi>
|
|
247
|
-
</Ct>}if(e.type==="redact"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
247
|
+
</Ct>}if(e.type==="redact"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return<Nt key={e.id}x={C.x}y={C.y}width={C.width}height={C.height}fill="#000000"rx={4}ry={4}/>}if(e.type==="pixelate"){const C=e.rect||{x:Math.min(e.points[0]?.x||0,e.points[1]?.x||0),y:Math.min(e.points[0]?.y||0,e.points[1]?.y||0),width:Math.abs((e.points[1]?.x||0)-(e.points[0]?.x||0)),height:Math.abs((e.points[1]?.y||0)-(e.points[0]?.y||0))};return<Ct key={e.id}>
|
|
248
|
+
<Nt x={C.x}y={C.y}width={C.width}height={C.height}fill="rgba(255,255,255,0.22)"stroke="rgba(255,255,255,0.5)"strokeWidth={1.5}strokeDasharray="4,4"rx={4}ry={4}/>
|
|
249
|
+
<$t x1={C.x}y1={C.y+C.height*.33}x2={C.x+C.width}y2={C.y+C.height*.33}stroke="rgba(255,255,255,0.35)"strokeWidth={1}/>
|
|
250
|
+
<$t x1={C.x}y1={C.y+C.height*.66}x2={C.x+C.width}y2={C.y+C.height*.66}stroke="rgba(255,255,255,0.35)"strokeWidth={1}/>
|
|
251
|
+
<$t x1={C.x+C.width*.33}y1={C.y}x2={C.x+C.width*.33}y2={C.y+C.height}stroke="rgba(255,255,255,0.35)"strokeWidth={1}/>
|
|
252
|
+
<$t x1={C.x+C.width*.66}y1={C.y}x2={C.x+C.width*.66}y2={C.y+C.height}stroke="rgba(255,255,255,0.35)"strokeWidth={1}/>
|
|
253
253
|
</Ct>}return null})}
|
|
254
254
|
|
|
255
255
|
|
|
256
|
-
{
|
|
257
|
-
{
|
|
256
|
+
{G&&G.length>0&&<>
|
|
257
|
+
{O==="brush"&&G.length>1&&<Mo d={G.reduce((e,C,T)=>T===0?`M ${C.x} ${C.y}`:`${e} L ${C.x} ${C.y}`,"")}stroke={Re}strokeWidth={Pe}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}
|
|
258
258
|
|
|
259
|
-
{
|
|
259
|
+
{O==="highlighter"&&G.length>1&&<Mo d={G.reduce((e,C,T)=>T===0?`M ${C.x} ${C.y}`:`${e} L ${C.x} ${C.y}`,"")}stroke={Re}strokeWidth={Pe*2.5}strokeOpacity={.4}strokeLinecap="round"strokeLinejoin="round"fill="none"/>}
|
|
260
260
|
|
|
261
|
-
{
|
|
262
|
-
|
|
263
|
-
<Ri points={`${C.x},${C.y} ${
|
|
261
|
+
{O==="arrow"&&G.length>1&&(()=>{const e=G[0],C=G[G.length-1],T=C.x-e.x,v=C.y-e.y,z=Math.atan2(v,T),D=Math.min(28,Math.max(14,Pe*3.5)),W=Math.PI/6,A=C.x-D*Math.cos(z-W),H=C.y-D*Math.sin(z-W),_=C.x-D*Math.cos(z+W),Je=C.y-D*Math.sin(z+W);return<Ct>
|
|
262
|
+
<$t x1={e.x}y1={e.y}x2={C.x}y2={C.y}stroke={Re}strokeWidth={Pe}strokeLinecap="round"/>
|
|
263
|
+
<Ri points={`${C.x},${C.y} ${A},${H} ${_},${Je}`}fill={Re}/>
|
|
264
264
|
</Ct>})()}
|
|
265
265
|
|
|
266
|
-
{
|
|
266
|
+
{O==="rect"&&G.length>1&&(()=>{const e=G[0],C=G[G.length-1],T=Math.min(e.x,C.x),v=Math.min(e.y,C.y),z=Math.abs(C.x-e.x),D=Math.abs(C.y-e.y);return<Nt x={T}y={v}width={z}height={D}stroke={Re}strokeWidth={Pe}rx={6}ry={6}fill="none"/>})()}
|
|
267
267
|
|
|
268
|
-
{
|
|
268
|
+
{O==="circle"&&G.length>1&&(()=>{const e=G[0],C=G[G.length-1],T=Math.min(e.x,C.x),v=Math.min(e.y,C.y),z=Math.max(10,Math.abs(C.x-e.x)),D=Math.max(10,Math.abs(C.y-e.y));return<To cx={T+z/2}cy={v+D/2}rx={z/2}ry={D/2}stroke={Re}strokeWidth={Pe}fill="none"/>})()}
|
|
269
269
|
|
|
270
|
-
{
|
|
271
|
-
<To cx={T+
|
|
270
|
+
{O==="spotlight"&&G.length>1&&(()=>{const e=G[0],C=G[G.length-1],T=Math.min(e.x,C.x),v=Math.min(e.y,C.y),z=Math.max(16,Math.abs(C.x-e.x)),D=Math.max(16,Math.abs(C.y-e.y));return<Ct>
|
|
271
|
+
<To cx={T+z/2}cy={v+D/2}rx={z/2}ry={D/2}stroke="#FBBF24"strokeWidth={2.5}strokeDasharray="5,3"fill="rgba(255, 255, 255, 0.15)"/>
|
|
272
272
|
</Ct>})()}
|
|
273
273
|
|
|
274
|
-
{
|
|
275
|
-
<Si cx={e.x}cy={e.y}r={T}fill={
|
|
274
|
+
{O==="step"&&G.length>0&&(()=>{const e=G[0],C=te.filter(v=>v.type==="step").length,T=Math.max(12,Math.min(20,Pe*2.2+8));return<Ct>
|
|
275
|
+
<Si cx={e.x}cy={e.y}r={T}fill={Re||"#EF4444"}stroke="#FFFFFF"strokeWidth={1.5}/>
|
|
276
276
|
<Pi x={e.x}y={e.y+T*.35}fill="#FFFFFF"fontSize={Math.round(T*.95)}fontWeight="bold"textAnchor="middle">
|
|
277
277
|
{C+1}
|
|
278
278
|
</Pi>
|
|
279
279
|
</Ct>})()}
|
|
280
280
|
|
|
281
|
-
{
|
|
281
|
+
{O==="redact"&&G.length>1&&(()=>{const e=G[0],C=G[G.length-1],T=Math.min(e.x,C.x),v=Math.min(e.y,C.y),z=Math.abs(C.x-e.x),D=Math.abs(C.y-e.y);return<Nt x={T}y={v}width={z}height={D}fill="#000000"stroke="rgba(255,255,255,0.4)"strokeWidth={1}strokeDasharray="3,3"rx={4}ry={4}/>})()}
|
|
282
282
|
|
|
283
|
-
{
|
|
283
|
+
{O==="pixelate"&&G.length>1&&(()=>{const e=G[0],C=G[G.length-1],T=Math.min(e.x,C.x),v=Math.min(e.y,C.y),z=Math.abs(C.x-e.x),D=Math.abs(C.y-e.y);return<Nt x={T}y={v}width={z}height={D}fill="rgba(255,255,255,0.22)"stroke="rgba(255,255,255,0.6)"strokeWidth={1.5}strokeDasharray="4,4"rx={4}ry={4}/>})()}
|
|
284
284
|
</>}
|
|
285
285
|
</Ct>
|
|
286
286
|
</Fr>}
|
|
287
287
|
|
|
288
288
|
|
|
289
|
-
{
|
|
290
|
-
<
|
|
291
|
-
{
|
|
292
|
-
</
|
|
293
|
-
<
|
|
289
|
+
{Fe&&!ze&&<F pointerEvents="none"style={t.watermarkOverlay}>
|
|
290
|
+
<S style={t.watermarkText}>
|
|
291
|
+
{io.OS.toUpperCase()} • {$e}×{je} • QA DIAGNOSTIC
|
|
292
|
+
</S>
|
|
293
|
+
<S style={t.watermarkTime}>
|
|
294
294
|
{new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}
|
|
295
|
-
</
|
|
295
|
+
</S>
|
|
296
296
|
</F>}
|
|
297
297
|
|
|
298
298
|
|
|
299
|
-
{
|
|
299
|
+
{I==="text"&&<Oo style={U.absoluteFill}onPress={e=>{const{locationX:C,locationY:T}=e.nativeEvent,v=Math.max(1,we.width),z=Math.max(1,we.height),D=Math.max(.05,Math.min(.85,C/v)),W=Math.max(.05,Math.min(.85,T/z));_i({x:D,y:W}),Bo()}}/>}
|
|
300
300
|
|
|
301
301
|
|
|
302
|
-
{!
|
|
302
|
+
{!ze&&fe.map(e=><Cn key={e.id}textItem={e}canvasWidth={we.width}canvasHeight={we.height}scale={ee}onUpdate={(C,T)=>{re(),Ge(v=>v.map(z=>z.id===C?{...z,...T}:z))}}onDelete={C=>{nr(C)}}onEdit={C=>Bo(C)}/>)}
|
|
303
303
|
|
|
304
304
|
|
|
305
|
-
{(
|
|
305
|
+
{(me||I==="crop")&&!ze&&<F pointerEvents="none"style={t.instagramGridOverlay}>
|
|
306
306
|
<F style={[t.instagramGridHLine,{top:"33.33%"}]}/>
|
|
307
307
|
<F style={[t.instagramGridHLine,{top:"66.67%"}]}/>
|
|
308
308
|
<F style={[t.instagramGridVLine,{left:"33.33%"}]}/>
|
|
309
309
|
<F style={[t.instagramGridVLine,{left:"66.67%"}]}/>
|
|
310
310
|
</F>}
|
|
311
311
|
</F>
|
|
312
|
-
</
|
|
312
|
+
</Gt.View>}
|
|
313
313
|
|
|
314
314
|
|
|
315
315
|
|
|
316
316
|
|
|
317
|
-
{
|
|
318
|
-
<Br size={14}color={
|
|
319
|
-
<
|
|
320
|
-
{
|
|
321
|
-
</
|
|
317
|
+
{oe&&si&&<Oo onPressIn={()=>{P("light"),Lo(!0)}}onPressOut={()=>{P("light"),Lo(!1)}}style={({pressed:e})=>[t.holdCompareBtn,e&&t.holdCompareBtnPressed]}>
|
|
318
|
+
<Br size={14}color={k.white}/>
|
|
319
|
+
<S style={t.holdCompareText}>
|
|
320
|
+
{ze?"Original Image":"Hold to Compare"}
|
|
321
|
+
</S>
|
|
322
322
|
</Oo>}
|
|
323
323
|
|
|
324
324
|
|
|
325
|
-
{
|
|
326
|
-
{
|
|
327
|
-
<Ho size={24}color={
|
|
325
|
+
{N&&<B onPress={Io}activeOpacity={.85}style={t.modernCenterPlayBtn}>
|
|
326
|
+
{Ye?<Ai size={24}color={k.white}/>:<F style={{marginLeft:3}}>
|
|
327
|
+
<Ho size={24}color={k.white}/>
|
|
328
328
|
</F>}
|
|
329
|
-
</
|
|
329
|
+
</B>}
|
|
330
330
|
|
|
331
331
|
|
|
332
|
-
{
|
|
333
|
-
<
|
|
334
|
-
{
|
|
335
|
-
</
|
|
332
|
+
{N&&<F style={t.videoFloatingHud}>
|
|
333
|
+
<B onPress={Io}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
334
|
+
{Ye?<Ai size={13}color={k.white}/>:<Ho size={13}color={k.white}/>}
|
|
335
|
+
</B>
|
|
336
336
|
<F style={t.videoHudProgressBar}>
|
|
337
|
-
<F style={[t.videoHudProgressFill,{left:`${
|
|
337
|
+
<F style={[t.videoHudProgressFill,{left:`${ae/(se||1e4)*100}%`,width:`${Math.max(4,(ge-ae)/(se||1e4)*100)}%`}]}/>
|
|
338
338
|
</F>
|
|
339
|
-
<
|
|
340
|
-
{
|
|
341
|
-
</
|
|
342
|
-
{
|
|
339
|
+
<S style={t.videoHudTimeText}>
|
|
340
|
+
{hi||"00:05"}
|
|
341
|
+
</S>
|
|
342
|
+
{xe&&<F style={t.videoHudBadge}>
|
|
343
343
|
<So size={10}color="#F87171"/>
|
|
344
344
|
</F>}
|
|
345
|
-
{
|
|
346
|
-
<
|
|
345
|
+
{Ee!==1&&<F style={t.videoHudBadge}>
|
|
346
|
+
<S style={t.videoHudBadgeText}>{Ee}x</S>
|
|
347
347
|
</F>}
|
|
348
348
|
</F>}
|
|
349
349
|
|
|
350
350
|
|
|
351
|
-
{
|
|
351
|
+
{oe&&<F style={t.floatingZoomBar}>
|
|
352
352
|
<Tt onPress={Qi}style={t.zoomBtn}accessibilityLabel="Zoom In">
|
|
353
|
-
<Ur size={15}color={
|
|
353
|
+
<Ur size={15}color={k.white}/>
|
|
354
354
|
</Tt>
|
|
355
355
|
|
|
356
|
-
<
|
|
357
|
-
<
|
|
358
|
-
{Math.round(
|
|
359
|
-
</
|
|
360
|
-
</
|
|
356
|
+
<B onPress={ei}activeOpacity={.8}style={t.zoomLevelBadge}>
|
|
357
|
+
<S style={t.zoomLevelText}>
|
|
358
|
+
{Math.round(ee*100)}%
|
|
359
|
+
</S>
|
|
360
|
+
</B>
|
|
361
361
|
|
|
362
362
|
<Tt onPress={Ki}style={t.zoomBtn}accessibilityLabel="Zoom Out">
|
|
363
|
-
<Xr size={15}color={
|
|
363
|
+
<Xr size={15}color={k.white}/>
|
|
364
364
|
</Tt>
|
|
365
365
|
|
|
366
|
-
<Tt onPress={
|
|
367
|
-
<Or size={14}color={
|
|
366
|
+
<Tt onPress={ei}style={t.zoomBtn}accessibilityLabel="Fit to Screen">
|
|
367
|
+
<Or size={14}color={k.white}/>
|
|
368
368
|
</Tt>
|
|
369
369
|
</F>}
|
|
370
370
|
|
|
371
371
|
|
|
372
|
-
{
|
|
372
|
+
{oe&&I==="crop"&&<Tn cropBox={Qt}imageWidth={we.width}imageHeight={we.height}imageOffsetX={(nt.width-we.width)/2}imageOffsetY={(nt.height-we.height)/2}scale={ee}onUpdateCropBox={zt}onApplyCrop={li}onCancelCrop={()=>Y("none")}/>}
|
|
373
373
|
</F>
|
|
374
374
|
</F>
|
|
375
375
|
|
|
376
376
|
|
|
377
377
|
<F style={t.bottomControlsContainer}>
|
|
378
378
|
|
|
379
|
-
{(
|
|
379
|
+
{(oe||N)&&<F style={t.contextToolPanel}>
|
|
380
380
|
|
|
381
381
|
<F style={t.panelHeaderRow}>
|
|
382
382
|
<F style={t.panelHeaderLeft}>
|
|
383
|
-
<F style={[t.panelGlowDot,
|
|
384
|
-
<
|
|
385
|
-
{
|
|
386
|
-
</
|
|
383
|
+
<F style={[t.panelGlowDot,oe&&I==="draw"&&{backgroundColor:"#818CF8"},oe&&I==="crop"&&{backgroundColor:"#38BDF8"},oe&&I==="adjust"&&{backgroundColor:"#F59E0B"},oe&&I==="text"&&{backgroundColor:"#A855F7"},N&&I==="trim"&&{backgroundColor:"#38BDF8"},N&&I==="audio"&&{backgroundColor:"#F59E0B"},N&&I==="speed"&&{backgroundColor:"#8B5CF6"},N&&I==="gif"&&{backgroundColor:"#10B981"},N&&I==="snapshot"&&{backgroundColor:"#EC4899"},N&&I==="none"&&{backgroundColor:"#818CF8"}]}/>
|
|
384
|
+
<S style={t.panelHeaderTitle}>
|
|
385
|
+
{oe?I==="draw"?O==="redact"?"BLACKOUT REDACTION":O==="pixelate"?"PIXELATE BLUR":O==="highlighter"?"HIGHLIGHTER":O==="arrow"?"ARROW CALLOUT":O==="rect"?"RECTANGLE BOX":O==="circle"?"CIRCLE / ELLIPSE":O==="spotlight"?"SPOTLIGHT FOCUS":O==="step"?"STEP NUMBER BADGE":"PEN BRUSH":I==="crop"?"CROP & ROTATE":I==="adjust"?`ADJUST: ${Ve.toUpperCase()}`:I==="text"?"TEXT & BUG BADGES":"CANVAS PREVIEW":I==="trim"?"VIDEO TRIMMER":I==="audio"?"AUDIO CONTROLS":I==="speed"?"SPEED MULTIPLIER":I==="gif"?"GIF EXPORT STUDIO":I==="snapshot"?"FRAME SNAPSHOT":"VIDEO STUDIO & PLAYER"}
|
|
386
|
+
</S>
|
|
387
387
|
</F>
|
|
388
388
|
<F style={t.panelValueBadge}>
|
|
389
|
-
<
|
|
390
|
-
{
|
|
391
|
-
</
|
|
389
|
+
<S style={t.panelValueText}>
|
|
390
|
+
{oe?I==="draw"?O==="redact"?"100% Solid":O==="pixelate"?`+${Ro} px`:O==="step"?`Badge #${te.filter(e=>e.type==="step").length+1}`:`+${Pe} px`:I==="crop"?`${Po.toUpperCase()} \u2022 ${Q}\xB0`:I==="adjust"?Ve==="vignette"?`+${E.vignette}%`:`${E[Ve]>=0?"+":""}${E[Ve]}%`:I==="text"?`${fe.length} Notes`:`${Math.round(ee*100)}%`:I==="trim"?`${(ae/1e3).toFixed(1)}s - ${(ge/1e3).toFixed(1)}s (${((ge-ae)/1e3).toFixed(1)}s)`:I==="audio"?xe?"Muted (0%)":`${Ze}% Vol`:I==="speed"?`${Ee}x Speed`:I==="gif"?`${Zt} FPS \u2022 ${zo}px`:I==="snapshot"?`${$e||1080}\xD7${je||1920}`:hi||"00:05"}
|
|
391
|
+
</S>
|
|
392
392
|
</F>
|
|
393
393
|
</F>
|
|
394
394
|
|
|
395
395
|
|
|
396
|
-
{
|
|
397
|
-
{
|
|
396
|
+
{N&&I==="trim"&&jo.length>0&&<Ti horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={t.filmstripScroll}>
|
|
397
|
+
{jo.map(e=>{const C=e.timeMs>=ae&&e.timeMs<=ge;return<B key={`thumb_${e.index}_${e.timeMs}`}onPress={()=>{P("light"),Ke==="start"?it(Math.min(ge-500,e.timeMs)):rt(Math.max(ae+500,e.timeMs))}}style={[t.filmstripThumbItem,C&&t.filmstripThumbActive]}>
|
|
398
398
|
<Co source={{uri:e.uri}}style={t.filmstripThumbImg}resizeMode="cover"/>
|
|
399
|
-
<
|
|
399
|
+
<S style={t.filmstripThumbTime}>
|
|
400
400
|
{(e.timeMs/1e3).toFixed(1)}s
|
|
401
|
-
</
|
|
402
|
-
</
|
|
401
|
+
</S>
|
|
402
|
+
</B>})}
|
|
403
403
|
</Ti>}
|
|
404
404
|
|
|
405
405
|
|
|
406
406
|
<F style={t.sliderRowContainer}>
|
|
407
|
-
<
|
|
408
|
-
{
|
|
409
|
-
</
|
|
410
|
-
<F onLayout={e=>{const C=e.nativeEvent.layout.width;C>20&&(
|
|
407
|
+
<S style={t.sliderMinIndicator}>
|
|
408
|
+
{N&&I==="speed"?"0.5x":N&&I==="gif"?"6fps":"\u25CB"}
|
|
409
|
+
</S>
|
|
410
|
+
<F onLayout={e=>{const C=e.nativeEvent.layout.width;C>20&&(ti.current=C)}}style={t.sliderTrackTouchable}{...Ji.panHandlers}>
|
|
411
411
|
<F style={t.sliderTrackBg}>
|
|
412
|
-
<F style={[t.sliderFillTrack,{width:`${
|
|
413
|
-
<F pointerEvents="none"style={[t.sliderThumbHandle,{left:`${
|
|
412
|
+
<F style={[t.sliderFillTrack,{width:`${ii}%`},N&&I==="trim"&&{left:`${ae/(se||1e4)*100}%`,width:`${Math.max(4,(ge-ae)/(se||1e4)*100)}%`,backgroundColor:"#38BDF8"}]}/>
|
|
413
|
+
<F pointerEvents="none"style={[t.sliderThumbHandle,{left:`${ii}%`}]}>
|
|
414
414
|
<F style={t.sliderThumbInnerGlow}/>
|
|
415
415
|
</F>
|
|
416
416
|
</F>
|
|
417
417
|
</F>
|
|
418
|
-
<
|
|
419
|
-
{
|
|
420
|
-
</
|
|
418
|
+
<S style={t.sliderMaxIndicator}>
|
|
419
|
+
{N&&I==="speed"?"2.0x":N&&I==="gif"?"24fps":"\u25CF"}
|
|
420
|
+
</S>
|
|
421
421
|
</F>
|
|
422
422
|
|
|
423
423
|
|
|
424
424
|
<Ti horizontal showsHorizontalScrollIndicator={!1}contentContainerStyle={t.modeChipsScroll}>
|
|
425
|
-
{
|
|
425
|
+
{N?I==="trim"?<>
|
|
426
426
|
|
|
427
|
-
<
|
|
428
|
-
<
|
|
429
|
-
Start: {(
|
|
430
|
-
</
|
|
431
|
-
</
|
|
432
|
-
|
|
433
|
-
<
|
|
434
|
-
<
|
|
435
|
-
End: {(
|
|
436
|
-
</
|
|
437
|
-
</
|
|
427
|
+
<B onPress={()=>{P("light"),ro("start")}}style={[t.modeChip,Ke==="start"&&t.modeChipActive]}>
|
|
428
|
+
<S style={[t.modeChipText,Ke==="start"&&t.modeChipTextActive]}>
|
|
429
|
+
Start: {(ae/1e3).toFixed(1)}s
|
|
430
|
+
</S>
|
|
431
|
+
</B>
|
|
432
|
+
|
|
433
|
+
<B onPress={()=>{P("light"),ro("end")}}style={[t.modeChip,Ke==="end"&&t.modeChipActive]}>
|
|
434
|
+
<S style={[t.modeChipText,Ke==="end"&&t.modeChipTextActive]}>
|
|
435
|
+
End: {(ge/1e3).toFixed(1)}s
|
|
436
|
+
</S>
|
|
437
|
+
</B>
|
|
438
438
|
|
|
439
439
|
<F style={t.subDivider}/>
|
|
440
440
|
|
|
441
441
|
|
|
442
|
-
<
|
|
443
|
-
<
|
|
444
|
-
</
|
|
442
|
+
<B onPress={()=>{P("light");const e=se||1e4;it(0),rt(Math.min(e,3e3))}}style={t.modeChip}>
|
|
443
|
+
<S style={t.modeChipText}>{R("media.first3s","First 3s")}</S>
|
|
444
|
+
</B>
|
|
445
445
|
|
|
446
|
-
<
|
|
447
|
-
<
|
|
448
|
-
</
|
|
446
|
+
<B onPress={()=>{P("light");const e=se||1e4;it(0),rt(Math.min(e,5e3))}}style={t.modeChip}>
|
|
447
|
+
<S style={t.modeChipText}>{R("media.first5s","First 5s")}</S>
|
|
448
|
+
</B>
|
|
449
449
|
|
|
450
|
-
<
|
|
451
|
-
<
|
|
452
|
-
</
|
|
450
|
+
<B onPress={()=>{P("light");const e=se||1e4;it(0),rt(Math.min(e,1e4))}}style={t.modeChip}>
|
|
451
|
+
<S style={t.modeChipText}>{R("media.first10s","First 10s")}</S>
|
|
452
|
+
</B>
|
|
453
453
|
|
|
454
454
|
<F style={t.subDivider}/>
|
|
455
455
|
|
|
456
|
-
<
|
|
457
|
-
<
|
|
458
|
-
</
|
|
459
|
-
|
|
460
|
-
<
|
|
461
|
-
<
|
|
462
|
-
</
|
|
463
|
-
</>:
|
|
464
|
-
<
|
|
465
|
-
<So size={14}color={
|
|
466
|
-
<
|
|
467
|
-
{
|
|
468
|
-
</
|
|
469
|
-
</
|
|
456
|
+
<B onPress={ni}style={t.applyActionBtn}>
|
|
457
|
+
<S style={t.applyActionText}>{R("media.applyTrim","Apply Trim")}</S>
|
|
458
|
+
</B>
|
|
459
|
+
|
|
460
|
+
<B onPress={()=>{P("light"),it(0),rt(se||1e4)}}style={t.cancelActionBtn}>
|
|
461
|
+
<S style={t.cancelActionText}>Reset</S>
|
|
462
|
+
</B>
|
|
463
|
+
</>:I==="audio"?<>
|
|
464
|
+
<B onPress={()=>{P("light"),_t(e=>!e)}}style={[t.modeChip,xe&&t.modeChipActive]}>
|
|
465
|
+
<So size={14}color={xe?k.white:"rgba(255,255,255,0.7)"}/>
|
|
466
|
+
<S style={[t.modeChipText,xe&&t.modeChipTextActive]}>
|
|
467
|
+
{xe?"Muted":"Unmuted"}
|
|
468
|
+
</S>
|
|
469
|
+
</B>
|
|
470
470
|
|
|
471
471
|
<F style={t.subDivider}/>
|
|
472
472
|
|
|
473
|
-
{[100,75,50,25,0].map(e=><
|
|
474
|
-
<
|
|
473
|
+
{[100,75,50,25,0].map(e=><B key={e}onPress={()=>{P("light"),no(e),_t(e===0)}}style={[t.modeChip,!xe&&Ze===e&&t.modeChipActive]}>
|
|
474
|
+
<S style={[t.modeChipText,!xe&&Ze===e&&t.modeChipTextActive]}>
|
|
475
475
|
{e}%
|
|
476
|
-
</
|
|
477
|
-
</
|
|
476
|
+
</S>
|
|
477
|
+
</B>)}
|
|
478
478
|
|
|
479
479
|
<F style={t.subDivider}/>
|
|
480
480
|
|
|
481
|
-
<
|
|
482
|
-
<
|
|
483
|
-
</
|
|
484
|
-
</>:
|
|
485
|
-
{[.5,.75,1,1.25,1.5,2].map(e=><
|
|
486
|
-
<Go size={13}color={
|
|
487
|
-
<
|
|
481
|
+
<B onPress={dr}style={t.applyActionBtn}>
|
|
482
|
+
<S style={t.applyActionText}>{R("media.stripAudio","Strip Audio")}</S>
|
|
483
|
+
</B>
|
|
484
|
+
</>:I==="speed"?<>
|
|
485
|
+
{[.5,.75,1,1.25,1.5,2].map(e=><B key={e}onPress={()=>{P("light"),ao(e)}}style={[t.modeChip,Ee===e&&t.modeChipActive]}>
|
|
486
|
+
<Go size={13}color={Ee===e?k.white:"rgba(255,255,255,0.7)"}/>
|
|
487
|
+
<S style={[t.modeChipText,Ee===e&&t.modeChipTextActive]}>
|
|
488
488
|
{e===1?"1.0x (Normal)":`${e}x`}
|
|
489
|
-
</
|
|
490
|
-
</
|
|
491
|
-
</>:
|
|
489
|
+
</S>
|
|
490
|
+
</B>)}
|
|
491
|
+
</>:I==="gif"?<>
|
|
492
492
|
|
|
493
|
-
{[{fps:8,label:"8 FPS (Small)"},{fps:12,label:"12 FPS (Smooth)"},{fps:20,label:"20 FPS (HD)"}].map(e=><
|
|
494
|
-
<
|
|
493
|
+
{[{fps:8,label:"8 FPS (Small)"},{fps:12,label:"12 FPS (Smooth)"},{fps:20,label:"20 FPS (HD)"}].map(e=><B key={e.fps}onPress={()=>{P("light"),$o(e.fps)}}style={[t.modeChip,Zt===e.fps&&t.modeChipActive]}>
|
|
494
|
+
<S style={[t.modeChipText,Zt===e.fps&&t.modeChipTextActive]}>
|
|
495
495
|
{e.label}
|
|
496
|
-
</
|
|
497
|
-
</
|
|
496
|
+
</S>
|
|
497
|
+
</B>)}
|
|
498
498
|
|
|
499
499
|
<F style={t.subDivider}/>
|
|
500
500
|
|
|
501
501
|
|
|
502
|
-
{[{w:320,label:"320px"},{w:480,label:"480px"},{w:640,label:"640px"}].map(e=><
|
|
503
|
-
<
|
|
502
|
+
{[{w:320,label:"320px"},{w:480,label:"480px"},{w:640,label:"640px"}].map(e=><B key={e.w}onPress={()=>{P("light"),Ni(e.w)}}style={[t.modeChip,zo===e.w&&t.modeChipActive]}>
|
|
503
|
+
<S style={[t.modeChipText,zo===e.w&&t.modeChipTextActive]}>
|
|
504
504
|
{e.label}
|
|
505
|
-
</
|
|
506
|
-
</
|
|
505
|
+
</S>
|
|
506
|
+
</B>)}
|
|
507
507
|
|
|
508
508
|
<F style={t.subDivider}/>
|
|
509
509
|
|
|
510
|
-
<
|
|
511
|
-
<
|
|
512
|
-
{
|
|
513
|
-
</
|
|
514
|
-
</
|
|
515
|
-
</>:
|
|
516
|
-
<
|
|
517
|
-
<Fo size={14}color={
|
|
518
|
-
<
|
|
510
|
+
<B onPress={di}disabled={Ae}style={[t.applyActionBtn,Ae&&{opacity:.6}]}>
|
|
511
|
+
<S style={t.applyActionText}>
|
|
512
|
+
{Ae?"Exporting...":"Export GIF"}
|
|
513
|
+
</S>
|
|
514
|
+
</B>
|
|
515
|
+
</>:I==="snapshot"?<>
|
|
516
|
+
<B onPress={ai}disabled={de}style={t.applyActionBtn}>
|
|
517
|
+
<Fo size={14}color={k.white}/>
|
|
518
|
+
<S style={t.applyActionText}>
|
|
519
519
|
Snapshot Current Frame (PNG)
|
|
520
|
-
</
|
|
521
|
-
</
|
|
520
|
+
</S>
|
|
521
|
+
</B>
|
|
522
522
|
</>:<>
|
|
523
|
-
<
|
|
524
|
-
<Ho size={14}color={
|
|
525
|
-
<
|
|
526
|
-
</
|
|
527
|
-
<
|
|
523
|
+
<B onPress={Io}style={t.modeChipActive}>
|
|
524
|
+
<Ho size={14}color={k.white}/>
|
|
525
|
+
<S style={t.modeChipTextActive}>{R("media.playVideo","Play Video")}</S>
|
|
526
|
+
</B>
|
|
527
|
+
<B onPress={()=>{P("light"),Y("trim")}}style={t.modeChip}>
|
|
528
528
|
<Di size={14}color="rgba(255,255,255,0.7)"/>
|
|
529
|
-
<
|
|
530
|
-
</
|
|
531
|
-
<
|
|
529
|
+
<S style={t.modeChipText}>{R("media.trimClip","Trim Clip")}</S>
|
|
530
|
+
</B>
|
|
531
|
+
<B onPress={()=>{P("light"),Y("audio")}}style={t.modeChip}>
|
|
532
532
|
<So size={14}color="rgba(255,255,255,0.7)"/>
|
|
533
|
-
<
|
|
534
|
-
</
|
|
535
|
-
<
|
|
533
|
+
<S style={t.modeChipText}>Audio</S>
|
|
534
|
+
</B>
|
|
535
|
+
<B onPress={()=>{P("light"),Y("speed")}}style={t.modeChip}>
|
|
536
536
|
<Go size={14}color="rgba(255,255,255,0.7)"/>
|
|
537
|
-
<
|
|
538
|
-
</
|
|
539
|
-
<
|
|
537
|
+
<S style={t.modeChipText}>{R("media.speed","Speed")}</S>
|
|
538
|
+
</B>
|
|
539
|
+
<B onPress={()=>{P("light"),Y("gif")}}style={t.modeChip}>
|
|
540
540
|
<Wo size={14}color="rgba(255,255,255,0.7)"/>
|
|
541
|
-
<
|
|
542
|
-
</
|
|
543
|
-
<
|
|
541
|
+
<S style={t.modeChipText}>{R("media.exportGif","Export GIF")}</S>
|
|
542
|
+
</B>
|
|
543
|
+
<B onPress={()=>{P("light"),Y("snapshot")}}style={t.modeChip}>
|
|
544
544
|
<Fo size={14}color="rgba(255,255,255,0.7)"/>
|
|
545
|
-
<
|
|
546
|
-
</
|
|
547
|
-
</>:
|
|
545
|
+
<S style={t.modeChipText}>{R("media.snapshot","Snapshot")}</S>
|
|
546
|
+
</B>
|
|
547
|
+
</>:I==="draw"?<>
|
|
548
548
|
|
|
549
|
-
<
|
|
550
|
-
<Eo size={14}color={
|
|
551
|
-
<
|
|
549
|
+
<B onPress={()=>{P("light"),_e("brush")}}style={[t.modeChip,O==="brush"&&t.modeChipActive]}>
|
|
550
|
+
<Eo size={14}color={O==="brush"?k.white:"rgba(255,255,255,0.6)"}/>
|
|
551
|
+
<S style={[t.modeChipText,O==="brush"&&t.modeChipTextActive]}>
|
|
552
552
|
Brush
|
|
553
|
-
</
|
|
554
|
-
</
|
|
553
|
+
</S>
|
|
554
|
+
</B>
|
|
555
555
|
|
|
556
556
|
|
|
557
|
-
<
|
|
558
|
-
<Ar size={14}color={
|
|
559
|
-
<
|
|
557
|
+
<B onPress={()=>{P("light"),_e("highlighter")}}style={[t.modeChip,O==="highlighter"&&t.modeChipActive]}>
|
|
558
|
+
<Ar size={14}color={O==="highlighter"?k.white:"rgba(255,255,255,0.6)"}/>
|
|
559
|
+
<S style={[t.modeChipText,O==="highlighter"&&t.modeChipTextActive]}>
|
|
560
560
|
Highlighter
|
|
561
|
-
</
|
|
562
|
-
</
|
|
561
|
+
</S>
|
|
562
|
+
</B>
|
|
563
563
|
|
|
564
564
|
|
|
565
|
-
<
|
|
566
|
-
<Rr size={14}color={
|
|
567
|
-
<
|
|
565
|
+
<B onPress={()=>{P("light"),_e("arrow")}}style={[t.modeChip,O==="arrow"&&t.modeChipActive]}>
|
|
566
|
+
<Rr size={14}color={O==="arrow"?k.white:"rgba(255,255,255,0.6)"}/>
|
|
567
|
+
<S style={[t.modeChipText,O==="arrow"&&t.modeChipTextActive]}>
|
|
568
568
|
Arrow
|
|
569
|
-
</
|
|
570
|
-
</
|
|
569
|
+
</S>
|
|
570
|
+
</B>
|
|
571
571
|
|
|
572
572
|
|
|
573
|
-
<
|
|
574
|
-
<
|
|
573
|
+
<B onPress={()=>{P("light"),_e("rect")}}style={[t.modeChip,O==="rect"&&t.modeChipActive]}>
|
|
574
|
+
<S style={[t.modeChipIconText,O==="rect"&&{color:k.white}]}>
|
|
575
575
|
□
|
|
576
|
-
</
|
|
577
|
-
<
|
|
576
|
+
</S>
|
|
577
|
+
<S style={[t.modeChipText,O==="rect"&&t.modeChipTextActive]}>
|
|
578
578
|
Rectangle
|
|
579
|
-
</
|
|
580
|
-
</
|
|
579
|
+
</S>
|
|
580
|
+
</B>
|
|
581
581
|
|
|
582
582
|
|
|
583
|
-
<
|
|
584
|
-
<
|
|
583
|
+
<B onPress={()=>{P("light"),_e("circle")}}style={[t.modeChip,O==="circle"&&t.modeChipActive]}>
|
|
584
|
+
<S style={[t.modeChipIconText,O==="circle"&&{color:k.white}]}>
|
|
585
585
|
○
|
|
586
|
-
</
|
|
587
|
-
<
|
|
586
|
+
</S>
|
|
587
|
+
<S style={[t.modeChipText,O==="circle"&&t.modeChipTextActive]}>
|
|
588
588
|
Circle
|
|
589
|
-
</
|
|
590
|
-
</
|
|
589
|
+
</S>
|
|
590
|
+
</B>
|
|
591
591
|
|
|
592
592
|
|
|
593
|
-
<
|
|
594
|
-
<
|
|
593
|
+
<B onPress={()=>{P("light"),_e("spotlight")}}style={[t.modeChip,O==="spotlight"&&t.modeChipActive]}>
|
|
594
|
+
<S style={[t.modeChipIconText,O==="spotlight"&&{color:k.white}]}>
|
|
595
595
|
🔦
|
|
596
|
-
</
|
|
597
|
-
<
|
|
596
|
+
</S>
|
|
597
|
+
<S style={[t.modeChipText,O==="spotlight"&&t.modeChipTextActive]}>
|
|
598
598
|
Spotlight
|
|
599
|
-
</
|
|
600
|
-
</
|
|
599
|
+
</S>
|
|
600
|
+
</B>
|
|
601
601
|
|
|
602
602
|
|
|
603
|
-
<
|
|
604
|
-
<
|
|
603
|
+
<B onPress={()=>{P("light"),_e("step"),$(R("mediaGallery.tapToPlaceStep","Tap or drag on image to place numbered steps \u2460 \u2461 \u2462"))}}style={[t.modeChip,O==="step"&&t.modeChipActive]}>
|
|
604
|
+
<S style={[t.modeChipIconText,O==="step"&&{color:k.white}]}>
|
|
605
605
|
①
|
|
606
|
-
</
|
|
607
|
-
<
|
|
608
|
-
Step #{
|
|
609
|
-
</
|
|
610
|
-
</
|
|
606
|
+
</S>
|
|
607
|
+
<S style={[t.modeChipText,O==="step"&&t.modeChipTextActive]}>
|
|
608
|
+
Step #{te.filter(e=>e.type==="step").length+1}
|
|
609
|
+
</S>
|
|
610
|
+
</B>
|
|
611
611
|
|
|
612
612
|
|
|
613
|
-
<
|
|
614
|
-
<Vr size={14}color={
|
|
615
|
-
<
|
|
613
|
+
<B onPress={()=>{P("light"),_e("redact")}}style={[t.modeChip,O==="redact"&&t.modeChipActive]}>
|
|
614
|
+
<Vr size={14}color={O==="redact"?k.white:"rgba(255,255,255,0.6)"}/>
|
|
615
|
+
<S style={[t.modeChipText,O==="redact"&&t.modeChipTextActive]}>
|
|
616
616
|
Redact
|
|
617
|
-
</
|
|
618
|
-
</
|
|
617
|
+
</S>
|
|
618
|
+
</B>
|
|
619
619
|
|
|
620
620
|
|
|
621
|
-
<
|
|
622
|
-
<Wr size={14}color={
|
|
623
|
-
<
|
|
621
|
+
<B onPress={()=>{P("light"),_e("pixelate")}}style={[t.modeChip,O==="pixelate"&&t.modeChipActive]}>
|
|
622
|
+
<Wr size={14}color={O==="pixelate"?k.white:"rgba(255,255,255,0.6)"}/>
|
|
623
|
+
<S style={[t.modeChipText,O==="pixelate"&&t.modeChipTextActive]}>
|
|
624
624
|
Pixelate
|
|
625
|
-
</
|
|
626
|
-
</
|
|
625
|
+
</S>
|
|
626
|
+
</B>
|
|
627
627
|
|
|
628
628
|
<F style={t.subDivider}/>
|
|
629
629
|
|
|
630
|
-
{Gi.map(e=><
|
|
630
|
+
{Gi.map(e=><B key={e}onPress={()=>{P("light"),Xo(e)}}style={[t.colorDot,{backgroundColor:e},Re===e&&t.colorDotActive]}/>)}
|
|
631
631
|
|
|
632
632
|
<F style={t.subDivider}/>
|
|
633
633
|
|
|
634
|
-
<
|
|
635
|
-
<Ei size={13}color={
|
|
636
|
-
<
|
|
637
|
-
</
|
|
638
|
-
|
|
639
|
-
{
|
|
640
|
-
<
|
|
641
|
-
Clear ({
|
|
642
|
-
</
|
|
643
|
-
</
|
|
644
|
-
</>:
|
|
634
|
+
<B onPress={ir}disabled={te.length===0}style={[t.actionPillBtn,te.length===0&&{opacity:.4}]}>
|
|
635
|
+
<Ei size={13}color={k.white}/>
|
|
636
|
+
<S style={t.actionPillText}>Undo</S>
|
|
637
|
+
</B>
|
|
638
|
+
|
|
639
|
+
{te.length>0&&<B onPress={rr}style={[t.actionPillBtn,{backgroundColor:"rgba(239, 68, 68, 0.2)"}]}>
|
|
640
|
+
<S style={[t.actionPillText,{color:k.rose400}]}>
|
|
641
|
+
Clear ({te.length})
|
|
642
|
+
</S>
|
|
643
|
+
</B>}
|
|
644
|
+
</>:I==="adjust"?<>
|
|
645
645
|
|
|
646
|
-
{[{key:"none",label:"Original",icon:"\u2726"},{key:"vibrant",label:"Vibrant",icon:"\u{1F308}"},{key:"mono",label:"Mono",icon:"\u25D0"},{key:"sepia",label:"Sepia",icon:"\u2615"},{key:"vintage",label:"Vintage",icon:"\u{1F39E}"},{key:"noir",label:"Noir",icon:"\u{1F311}"},{key:"cool",label:"Cool",icon:"\u2744"},{key:"warm",label:"Warm",icon:"\u2600"},{key:"fade",label:"Fade",icon:"\u{1F32B}"}].map(e=><
|
|
647
|
-
<
|
|
646
|
+
{[{key:"none",label:"Original",icon:"\u2726"},{key:"vibrant",label:"Vibrant",icon:"\u{1F308}"},{key:"mono",label:"Mono",icon:"\u25D0"},{key:"sepia",label:"Sepia",icon:"\u2615"},{key:"vintage",label:"Vintage",icon:"\u{1F39E}"},{key:"noir",label:"Noir",icon:"\u{1F311}"},{key:"cool",label:"Cool",icon:"\u2744"},{key:"warm",label:"Warm",icon:"\u2600"},{key:"fade",label:"Fade",icon:"\u{1F32B}"}].map(e=><B key={e.key}onPress={()=>{P("light"),re(),Ot(e.key)}}style={[t.modeChip,K===e.key&&t.modeChipActive]}>
|
|
647
|
+
<S style={[t.modeChipIconText,K===e.key&&{color:k.white}]}>
|
|
648
648
|
{e.icon}
|
|
649
|
-
</
|
|
650
|
-
<
|
|
649
|
+
</S>
|
|
650
|
+
<S style={[t.modeChipText,K===e.key&&t.modeChipTextActive]}>
|
|
651
651
|
{e.label}
|
|
652
|
-
</
|
|
653
|
-
</
|
|
652
|
+
</S>
|
|
653
|
+
</B>)}
|
|
654
654
|
|
|
655
655
|
<F style={t.subDivider}/>
|
|
656
656
|
|
|
657
657
|
|
|
658
|
-
<
|
|
659
|
-
<
|
|
658
|
+
<B onPress={()=>{P("light"),re(),Dt(e=>!e)}}style={[t.modeChip,Fe&&t.modeChipActive]}>
|
|
659
|
+
<S style={[t.modeChipIconText,Fe&&{color:k.white}]}>
|
|
660
660
|
🛡
|
|
661
|
-
</
|
|
662
|
-
<
|
|
663
|
-
QA Bar {
|
|
664
|
-
</
|
|
665
|
-
</
|
|
661
|
+
</S>
|
|
662
|
+
<S style={[t.modeChipText,Fe&&t.modeChipTextActive]}>
|
|
663
|
+
QA Bar {Fe?"ON":"OFF"}
|
|
664
|
+
</S>
|
|
665
|
+
</B>
|
|
666
666
|
|
|
667
667
|
|
|
668
|
-
<
|
|
669
|
-
<Vo size={13}color={
|
|
670
|
-
<
|
|
668
|
+
<B onPress={()=>{P("light"),Wt(e=>!e)}}style={[t.modeChip,me&&t.modeChipActive]}>
|
|
669
|
+
<Vo size={13}color={me?k.white:"rgba(255,255,255,0.8)"}/>
|
|
670
|
+
<S style={[t.modeChipText,me&&t.modeChipTextActive]}>
|
|
671
671
|
Grid 3×3
|
|
672
|
-
</
|
|
673
|
-
</
|
|
672
|
+
</S>
|
|
673
|
+
</B>
|
|
674
674
|
|
|
675
675
|
<F style={t.subDivider}/>
|
|
676
676
|
|
|
677
677
|
|
|
678
|
-
{[{key:"brightness",label:
|
|
679
|
-
<C size={14}color={T?
|
|
680
|
-
<
|
|
678
|
+
{[{key:"brightness",label:R("media.brightness","Brightness"),IconComponent:Yr},{key:"contrast",label:R("media.contrast","Contrast"),IconComponent:_r},{key:"saturation",label:R("media.saturation","Saturation"),IconComponent:Zr},{key:"warmth",label:R("media.warmth","Warmth"),IconComponent:qr},{key:"exposure",label:R("media.exposure","Exposure"),IconComponent:Qr},{key:"vignette",label:R("media.vignette","Vignette"),IconComponent:Kr}].map(e=>{const C=e.IconComponent,T=Ve===e.key;return<B key={e.key}onPress={()=>{P("light"),ji(e.key)}}style={[t.modeChip,T&&t.modeChipActive]}>
|
|
679
|
+
<C size={14}color={T?k.white:k.grayTextWeak}/>
|
|
680
|
+
<S style={[t.modeChipText,T&&t.modeChipTextActive]}>
|
|
681
681
|
{e.label}
|
|
682
|
-
</
|
|
683
|
-
</
|
|
682
|
+
</S>
|
|
683
|
+
</B>})}
|
|
684
684
|
<F style={t.subDivider}/>
|
|
685
|
-
<
|
|
685
|
+
<B onPress={()=>{P("medium"),re(),Ot("none"),Dt(!1),Rt({brightness:0,contrast:0,saturation:0,warmth:0,exposure:0,vignette:0}),$(R("mediaGallery.resetAdjustments","Adjustments Reset"))}}style={t.modeChip}>
|
|
686
686
|
<Oi size={12}color="rgba(255,255,255,0.7)"/>
|
|
687
|
-
<
|
|
688
|
-
</
|
|
689
|
-
</>:
|
|
690
|
-
{["free","1:1","4:3","16:9","9:16","3:2"].map(e=><
|
|
691
|
-
<
|
|
687
|
+
<S style={t.modeChipText}>Reset</S>
|
|
688
|
+
</B>
|
|
689
|
+
</>:I==="crop"?<>
|
|
690
|
+
{["free","1:1","4:3","16:9","9:16","3:2"].map(e=><B key={e}onPress={()=>{P("light"),qt(e);const C=Ht(e,$e,je);zt(C)}}style={[t.modeChip,Po===e&&t.modeChipActive]}>
|
|
691
|
+
<S style={[t.modeChipText,Po===e&&t.modeChipTextActive]}>
|
|
692
692
|
{e==="free"?"Free":e}
|
|
693
|
-
</
|
|
694
|
-
</
|
|
693
|
+
</S>
|
|
694
|
+
</B>)}
|
|
695
695
|
<F style={t.subDivider}/>
|
|
696
696
|
|
|
697
|
-
<
|
|
697
|
+
<B onPress={()=>{P("light"),re(),De(e=>(e+90)%360)}}style={t.modeChip}>
|
|
698
698
|
<Hr size={13}color="rgba(255,255,255,0.8)"/>
|
|
699
|
-
<
|
|
700
|
-
</
|
|
699
|
+
<S style={t.modeChipText}>{R("media.rotate90","Rotate 90\xB0")}</S>
|
|
700
|
+
</B>
|
|
701
701
|
|
|
702
|
-
<
|
|
703
|
-
<
|
|
702
|
+
<B onPress={()=>{P("light"),re(),Xt(e=>!e)}}style={[t.modeChip,ke&&t.modeChipActive]}>
|
|
703
|
+
<S style={[t.modeChipIconText,ke&&{color:k.white}]}>
|
|
704
704
|
⇄
|
|
705
|
-
</
|
|
706
|
-
<
|
|
705
|
+
</S>
|
|
706
|
+
<S style={[t.modeChipText,ke&&t.modeChipTextActive]}>
|
|
707
707
|
Flip H
|
|
708
|
-
</
|
|
709
|
-
</
|
|
708
|
+
</S>
|
|
709
|
+
</B>
|
|
710
710
|
|
|
711
|
-
<
|
|
712
|
-
<
|
|
711
|
+
<B onPress={()=>{P("light"),re(),Yt(e=>!e)}}style={[t.modeChip,Se&&t.modeChipActive]}>
|
|
712
|
+
<S style={[t.modeChipIconText,Se&&{color:k.white}]}>
|
|
713
713
|
⇅
|
|
714
|
-
</
|
|
715
|
-
<
|
|
714
|
+
</S>
|
|
715
|
+
<S style={[t.modeChipText,Se&&t.modeChipTextActive]}>
|
|
716
716
|
Flip V
|
|
717
|
-
</
|
|
718
|
-
</
|
|
717
|
+
</S>
|
|
718
|
+
</B>
|
|
719
719
|
|
|
720
|
-
<
|
|
721
|
-
<Vo size={13}color={
|
|
722
|
-
<
|
|
720
|
+
<B onPress={()=>{P("light"),Wt(e=>!e)}}style={[t.modeChip,me&&t.modeChipActive]}>
|
|
721
|
+
<Vo size={13}color={me?k.white:"rgba(255,255,255,0.8)"}/>
|
|
722
|
+
<S style={[t.modeChipText,me&&t.modeChipTextActive]}>
|
|
723
723
|
Grid 3×3
|
|
724
|
-
</
|
|
725
|
-
</
|
|
724
|
+
</S>
|
|
725
|
+
</B>
|
|
726
726
|
<F style={t.subDivider}/>
|
|
727
|
-
<
|
|
728
|
-
<
|
|
729
|
-
</
|
|
730
|
-
<
|
|
731
|
-
<
|
|
732
|
-
</
|
|
733
|
-
</>:
|
|
734
|
-
<
|
|
735
|
-
<
|
|
736
|
-
</
|
|
727
|
+
<B onPress={li}style={t.applyActionBtn}>
|
|
728
|
+
<S style={t.applyActionText}>Apply</S>
|
|
729
|
+
</B>
|
|
730
|
+
<B onPress={()=>Y("none")}style={t.cancelActionBtn}>
|
|
731
|
+
<S style={t.cancelActionText}>Cancel</S>
|
|
732
|
+
</B>
|
|
733
|
+
</>:I==="text"?<>
|
|
734
|
+
<B onPress={()=>Bo()}style={t.modeChipActive}>
|
|
735
|
+
<S style={t.modeChipTextActive}>{R("media.customNote","+ Custom Note")}</S>
|
|
736
|
+
</B>
|
|
737
737
|
|
|
738
738
|
<F style={t.subDivider}/>
|
|
739
739
|
|
|
740
740
|
|
|
741
|
-
{[{label:"\u{1F41E} BUG",color:"#EF4444"},{label:"\u26A0\uFE0F OVERFLOW",color:"#F59E0B"},{label:"\u26A1 SLOW >3s",color:"#8B5CF6"},{label:"\u{1F6AB} API 500",color:"#DC2626"},{label:"\u{1F4A5} CRASH",color:"#991B1B"}].map(e=><
|
|
742
|
-
<
|
|
741
|
+
{[{label:"\u{1F41E} BUG",color:"#EF4444"},{label:"\u26A0\uFE0F OVERFLOW",color:"#F59E0B"},{label:"\u26A1 SLOW >3s",color:"#8B5CF6"},{label:"\u{1F6AB} API 500",color:"#DC2626"},{label:"\u{1F4A5} CRASH",color:"#991B1B"}].map(e=><B key={e.label}onPress={()=>{P("light"),re(),Ge(C=>[...C,{id:`text_${Date.now()}_${Math.random()}`,text:e.label,x:ho?.x??.35,y:ho?.y??.35,color:"#FFFFFF",bgColor:e.color,fontSize:13}]),$(R("mediaGallery.tagPlaced",`Placed tag: ${e.label}`))}}style={[t.modeChip,{borderColor:e.color,backgroundColor:`${e.color}26`}]}>
|
|
742
|
+
<S style={[t.modeChipText,{color:e.color,fontWeight:"700"}]}>
|
|
743
743
|
{e.label}
|
|
744
|
-
</
|
|
745
|
-
</
|
|
744
|
+
</S>
|
|
745
|
+
</B>)}
|
|
746
746
|
|
|
747
747
|
<F style={t.subDivider}/>
|
|
748
748
|
|
|
749
|
-
{Gi.map(e=><
|
|
750
|
-
{
|
|
749
|
+
{Gi.map(e=><B key={e}onPress={()=>{P("light"),Xo(e)}}style={[t.colorDot,{backgroundColor:e},Re===e&&t.colorDotActive]}/>)}
|
|
750
|
+
{fe.length>0&&<>
|
|
751
751
|
<F style={t.subDivider}/>
|
|
752
|
-
<
|
|
753
|
-
<
|
|
754
|
-
Clear All ({
|
|
755
|
-
</
|
|
756
|
-
</
|
|
752
|
+
<B onPress={()=>{P("medium"),re(),Ge([])}}style={[t.modeChip,{backgroundColor:"rgba(239, 68, 68, 0.2)"}]}>
|
|
753
|
+
<S style={[t.modeChipText,{color:k.rose500}]}>
|
|
754
|
+
Clear All ({fe.length})
|
|
755
|
+
</S>
|
|
756
|
+
</B>
|
|
757
757
|
</>}
|
|
758
758
|
</>:<>
|
|
759
|
-
<
|
|
759
|
+
<B onPress={()=>{P("light"),Y("draw"),_e("brush")}}style={t.modeChip}>
|
|
760
760
|
<Eo size={14}color="rgba(255,255,255,0.7)"/>
|
|
761
|
-
<
|
|
762
|
-
</
|
|
763
|
-
<
|
|
761
|
+
<S style={t.modeChipText}>{R("media.markup","Markup")}</S>
|
|
762
|
+
</B>
|
|
763
|
+
<B onPress={()=>{P("light");const e=Ht("free",$e,je);zt(e),qt("free"),Y("crop")}}style={t.modeChip}>
|
|
764
764
|
<Bi size={14}color="rgba(255,255,255,0.7)"/>
|
|
765
|
-
<
|
|
766
|
-
</
|
|
767
|
-
<
|
|
765
|
+
<S style={t.modeChipText}>{R("media.crop","Crop")}</S>
|
|
766
|
+
</B>
|
|
767
|
+
<B onPress={()=>{P("light"),Y("adjust")}}style={t.modeChip}>
|
|
768
768
|
<Wi size={14}color="rgba(255,255,255,0.7)"/>
|
|
769
|
-
<
|
|
770
|
-
</
|
|
771
|
-
<
|
|
769
|
+
<S style={t.modeChipText}>{R("media.adjust","Adjust")}</S>
|
|
770
|
+
</B>
|
|
771
|
+
<B onPress={()=>{P("light"),Y("text"),$(R("mediaGallery.tapToAddText","Tap anywhere on the image to add text"))}}style={t.modeChip}>
|
|
772
772
|
<Vi size={14}color="rgba(255,255,255,0.7)"/>
|
|
773
|
-
<
|
|
774
|
-
</
|
|
773
|
+
<S style={t.modeChipText}>{R("media.addText","Add Text")}</S>
|
|
774
|
+
</B>
|
|
775
775
|
</>}
|
|
776
776
|
</Ti>
|
|
777
777
|
</F>}
|
|
778
778
|
|
|
779
779
|
|
|
780
780
|
<F style={t.studioToolbar}>
|
|
781
|
-
{(
|
|
781
|
+
{(oe?hr:cr).map(e=>{const C=I===e.key;return<Tt key={e.key}onPress={()=>{if(P("light"),e.key==="crop"){const T=Ht("free",$e,je);zt(T),qt("free"),Y("crop")}else e.key==="text"?(Y("text"),$(R("mediaGallery.tapToAddText","Tap anywhere on the image to add text"))):Y(e.key)}}style={[t.studioToolItem,C&&t.studioToolItemActive]}>
|
|
782
782
|
{e.icon(C)}
|
|
783
|
-
<
|
|
783
|
+
<S style={[t.studioToolLabel,C&&t.studioToolLabelActive]}>
|
|
784
784
|
{e.label}
|
|
785
|
-
</
|
|
785
|
+
</S>
|
|
786
786
|
{"hasBadge"in e&&e.hasBadge&&<F style={t.studioTabBadgeDot}/>}
|
|
787
787
|
</Tt>})}
|
|
788
788
|
</F>
|
|
@@ -791,25 +791,25 @@ import Ao,{useCallback as ot,useContext as ur,useEffect as ci,useMemo as eo,useR
|
|
|
791
791
|
</F>
|
|
792
792
|
|
|
793
793
|
|
|
794
|
-
<Ci visible={Yi}transparent={!0}animationType="fade"onRequestClose={()=>
|
|
794
|
+
<Ci visible={Yi}transparent={!0}animationType="fade"onRequestClose={()=>Jt(!1)}>
|
|
795
795
|
<F style={t.textModalBackdrop}>
|
|
796
796
|
<F style={t.textModalCard}>
|
|
797
|
-
<
|
|
797
|
+
<S style={t.textModalTitle}>
|
|
798
798
|
Add Text Note / Callout
|
|
799
|
-
</
|
|
800
|
-
<Cr style={t.textModalInput}placeholder="e.g. Defect: Button overlap"placeholderTextColor="rgba(255,255,255,0.4)"value={
|
|
799
|
+
</S>
|
|
800
|
+
<Cr style={t.textModalInput}placeholder={R("media.textPlaceholder","e.g. Defect: Button overlap")}placeholderTextColor="rgba(255,255,255,0.4)"value={so}onChangeText={lo}autoFocus={!0}multiline={!0}/>
|
|
801
801
|
<F style={t.textModalActions}>
|
|
802
|
-
<
|
|
803
|
-
<
|
|
804
|
-
</
|
|
805
|
-
<
|
|
806
|
-
<
|
|
807
|
-
</
|
|
802
|
+
<B onPress={()=>Jt(!1)}style={t.modalCancelBtn}>
|
|
803
|
+
<S style={t.modalCancelText}>Cancel</S>
|
|
804
|
+
</B>
|
|
805
|
+
<B onPress={ar}style={t.modalConfirmBtn}>
|
|
806
|
+
<S style={t.modalConfirmText}>{R("media.placeText","Place Text")}</S>
|
|
807
|
+
</B>
|
|
808
808
|
</F>
|
|
809
809
|
</F>
|
|
810
810
|
</F>
|
|
811
811
|
</Ci>
|
|
812
812
|
|
|
813
813
|
|
|
814
|
-
<Sr visible={
|
|
815
|
-
</Ci>};const t=N.create({modalBackdrop:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.70)",justifyContent:"flex-end",zIndex:999999,elevation:999999},modalBackdropPressable:{...N.absoluteFillObject},modalContentCard:{backgroundColor:"#070A14",borderTopLeftRadius:20,borderTopRightRadius:20,overflow:"hidden",shadowColor:S.black,shadowOffset:{width:0,height:-4},shadowOpacity:.25,shadowRadius:10,elevation:16},header:{width:"100%",zIndex:10,borderBottomWidth:N.hairlineWidth,borderBottomColor:"rgba(255, 255, 255, 0.12)"},headerInner:{width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingTop:6,paddingBottom:8,minHeight:48},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0,marginRight:6},headerTextCol:{flex:1,minWidth:0,justifyContent:"center"},headerTitleRow:{flexDirection:"row",alignItems:"center",gap:6},title:{fontFamily:$.interBold,fontSize:13,color:S.white,letterSpacing:-.1,flexShrink:1},formatBadge:{backgroundColor:"rgba(255, 255, 255, 0.18)",paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:N.hairlineWidth,borderColor:"rgba(255, 255, 255, 0.25)"},formatBadgeText:{fontFamily:$.interBold,fontSize:8.5,color:S.white,letterSpacing:.4},headerSubtitleRow:{flexDirection:"row",alignItems:"center",gap:4,marginTop:1},subtitleDim:{fontFamily:$.interMedium,fontSize:10,color:"rgba(255, 255, 255, 0.85)"},subtitleDot:{fontSize:10,color:"rgba(255, 255, 255, 0.45)"},subtitleSize:{fontFamily:$.interBold,fontSize:10,color:"#38BDF8"},headerBackBtn:{width:32,height:32,borderRadius:16,alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.12)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)"},headerRight:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},undoRedoGroup:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.12)",borderRadius:8,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",height:30,overflow:"hidden"},undoHalfBtn:{paddingHorizontal:8,height:"100%",alignItems:"center",justifyContent:"center"},redoHalfBtn:{paddingHorizontal:8,height:"100%",alignItems:"center",justifyContent:"center"},undoDivider:{width:1,height:14,backgroundColor:"rgba(255, 255, 255, 0.2)"},actionDisabled:{opacity:.35},headerMoreBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.12)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",alignItems:"center",justifyContent:"center"},headerCloseBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.16)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.25)",alignItems:"center",justifyContent:"center"},headerSaveBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"#059669",borderRadius:8,borderWidth:1,borderColor:"rgba(52, 211, 153, 0.45)",paddingHorizontal:11,height:30},headerSaveText:{fontFamily:$.interBold,fontSize:11,color:S.white},headerExportBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"#0284C7",borderRadius:8,borderWidth:1,borderColor:"rgba(56, 189, 248, 0.5)",paddingHorizontal:10,height:30},headerExportText:{fontFamily:$.interBold,fontSize:11,color:S.white},headerActionBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",alignItems:"center",justifyContent:"center"},moreMenuDropdown:{position:"absolute",top:52,right:12,backgroundColor:"#0F172A",borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",padding:6,zIndex:100,elevation:12,shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:8,minWidth:160},moreMenuItem:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:8,paddingHorizontal:10,borderRadius:8},moreMenuItemDestructive:{borderTopWidth:N.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.1)",marginTop:4,paddingTop:8},moreMenuItemText:{fontFamily:$.interMedium,fontSize:12,color:S.white},stageWrapper:{flex:1,width:"100%",backgroundColor:"#03050A",paddingHorizontal:8,paddingTop:8,paddingBottom:4,minHeight:0},previewCard:{flex:1,width:"100%",borderRadius:12,overflow:"hidden",backgroundColor:"#03050A",alignItems:"center",justifyContent:"center",position:"relative"},canvasContainer:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",position:"relative"},imageCanvasWrapper:{position:"relative",alignItems:"center",justifyContent:"center"},instagramGridOverlay:{...N.absoluteFillObject,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.45)",zIndex:15},instagramGridHLine:{position:"absolute",left:0,right:0,height:1,backgroundColor:"rgba(255, 255, 255, 0.45)",shadowColor:"#000000",shadowOpacity:.6,shadowRadius:1,shadowOffset:{width:0,height:.5}},instagramGridVLine:{position:"absolute",top:0,bottom:0,width:1,backgroundColor:"rgba(255, 255, 255, 0.45)",shadowColor:"#000000",shadowOpacity:.6,shadowRadius:1,shadowOffset:{width:.5,height:0}},image:{width:"100%",height:"100%"},stageTopLeftBadge:{position:"absolute",top:12,left:12,flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"rgba(10, 15, 29, 0.88)",paddingHorizontal:10,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",zIndex:20},badgeGlowDot:{width:7,height:7,borderRadius:3.5,backgroundColor:"#38BDF8",shadowColor:"#38BDF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:4},badgeGlowText:{fontFamily:$.interSemiBold,fontSize:10.5,color:"rgba(255, 255, 255, 0.92)"},holdCompareBtn:{position:"absolute",bottom:12,left:12,flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"rgba(10, 15, 29, 0.90)",paddingHorizontal:12,paddingVertical:7,borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",shadowColor:S.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4,zIndex:20},holdCompareBtnPressed:{backgroundColor:S.indigo600,borderColor:S.indigo400},holdCompareText:{fontFamily:$.interSemiBold,fontSize:11,color:S.white},floatingZoomBar:{position:"absolute",right:12,bottom:12,backgroundColor:"rgba(10, 15, 29, 0.92)",borderRadius:22,borderWidth:1.2,borderColor:"rgba(255, 255, 255, 0.16)",paddingVertical:5,paddingHorizontal:5,alignItems:"center",gap:4,shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:10,elevation:12,zIndex:35},zoomBtn:{width:28,height:28,borderRadius:14,backgroundColor:"rgba(255, 255, 255, 0.10)",alignItems:"center",justifyContent:"center"},zoomLevelBadge:{paddingHorizontal:4,paddingVertical:3},zoomLevelText:{fontFamily:$.interBold,fontSize:9.5,color:"#38BDF8",letterSpacing:.2},videoImageOverlay:{...N.absoluteFillObject,backgroundColor:"rgba(10, 13, 20, 0.28)"},videoFallbackBackdrop:{flex:1,width:"100%",backgroundColor:S.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:$.interSemiBold,fontSize:15,color:S.white,marginTop:12},videoFallbackSubtitle:{fontFamily:$.interRegular,fontSize:12,color:"rgba(255, 255, 255, 0.6)",marginTop:4},modernCenterPlayBtn:{position:"absolute",width:60,height:60,borderRadius:30,backgroundColor:"rgba(15, 23, 42, 0.78)",borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.45)",alignItems:"center",justifyContent:"center",shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:10,elevation:12,zIndex:25},videoFloatingHud:{position:"absolute",bottom:12,left:12,right:12,backgroundColor:"rgba(10, 15, 29, 0.88)",borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.16)",flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,gap:10,shadowColor:S.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:6,elevation:6,zIndex:20},videoHudProgressBar:{flex:1,height:4,backgroundColor:"rgba(255, 255, 255, 0.15)",borderRadius:2,position:"relative",overflow:"hidden"},videoHudProgressFill:{position:"absolute",top:0,bottom:0,backgroundColor:"#38BDF8",borderRadius:2},videoHudTimeText:{fontFamily:$.interBold,fontSize:10.5,color:S.white,letterSpacing:.2},videoHudBadge:{backgroundColor:"rgba(255, 255, 255, 0.12)",paddingHorizontal:5,paddingVertical:2,borderRadius:6},videoHudBadgeText:{fontFamily:$.interBold,fontSize:9,color:"#C084FC"},filmstripScroll:{flexDirection:"row",alignItems:"center",gap:6,paddingVertical:2},filmstripThumbItem:{width:48,height:48,borderRadius:8,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.2)",overflow:"hidden",position:"relative",backgroundColor:"#0F172A"},filmstripThumbActive:{borderColor:"#38BDF8",borderWidth:2,transform:[{scale:1.05}]},filmstripThumbImg:{width:"100%",height:"100%"},filmstripThumbTime:{position:"absolute",bottom:2,right:2,backgroundColor:"rgba(0, 0, 0, 0.75)",paddingHorizontal:3,paddingVertical:1,borderRadius:3,fontFamily:$.interBold,fontSize:7.5,color:S.white},bottomControlsContainer:{width:"100%",backgroundColor:"#070A14",paddingHorizontal:8,paddingTop:6,paddingBottom:to.OS==="ios"?24:12,borderTopWidth:N.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.08)",gap:6},contextToolPanel:{width:"100%",backgroundColor:"rgba(10, 15, 29, 0.96)",borderRadius:16,paddingVertical:9,paddingHorizontal:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",gap:8},panelHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%"},panelHeaderLeft:{flexDirection:"row",alignItems:"center",gap:7},panelGlowDot:{width:7,height:7,borderRadius:3.5,backgroundColor:"#818CF8",shadowColor:"#818CF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:4},panelHeaderTitle:{fontFamily:$.interBold,fontSize:11,color:S.white,letterSpacing:.6},panelValueBadge:{backgroundColor:"rgba(2, 132, 199, 0.22)",paddingHorizontal:8,paddingVertical:3,borderRadius:8,borderWidth:1,borderColor:"rgba(56, 189, 248, 0.45)"},panelValueText:{fontFamily:$.interBold,fontSize:10.5,color:"#38BDF8"},sliderRowContainer:{flexDirection:"row",alignItems:"center",width:"100%",gap:8,paddingHorizontal:2},sliderMinIndicator:{fontSize:10,color:"rgba(255, 255, 255, 0.5)"},sliderMaxIndicator:{fontSize:12,color:"rgba(255, 255, 255, 0.85)"},sliderTrackTouchable:{flex:1,height:36,justifyContent:"center"},sliderTrackBg:{width:"100%",height:4,backgroundColor:"rgba(255, 255, 255, 0.14)",borderRadius:2,position:"relative",justifyContent:"center"},sliderFillTrack:{height:4,backgroundColor:"#0284C7",borderRadius:2},sliderThumbHandle:{position:"absolute",width:20,height:20,borderRadius:10,backgroundColor:"#38BDF8",marginLeft:-10,alignItems:"center",justifyContent:"center",shadowColor:"#38BDF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:6,elevation:6},sliderThumbInnerGlow:{width:8,height:8,borderRadius:4,backgroundColor:S.white},modeChipsScroll:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:2},modeChip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)"},modeChipActive:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(2, 132, 199, 0.28)",borderColor:"#38BDF8",borderWidth:1.2},modeChipText:{fontFamily:$.interSemiBold,fontSize:11,color:"rgba(255, 255, 255, 0.75)"},modeChipTextActive:{color:S.white,fontFamily:$.interBold,fontSize:11},modeChipIconText:{fontSize:13,color:"rgba(255, 255, 255, 0.7)",marginRight:1},subDivider:{width:1,height:18,backgroundColor:"rgba(255, 255, 255, 0.16)",marginHorizontal:4},colorDot:{width:22,height:22,borderRadius:11,borderWidth:2,borderColor:"rgba(255, 255, 255, 0.3)"},colorDotActive:{borderColor:S.white,transform:[{scale:1.25}]},actionPillBtn:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.10)"},actionPillText:{fontFamily:$.interSemiBold,fontSize:10.5,color:S.white},applyActionBtn:{backgroundColor:S.emerald600,paddingHorizontal:14,paddingVertical:6,borderRadius:10},applyActionText:{fontFamily:$.interBold,fontSize:11.5,color:S.white},cancelActionBtn:{backgroundColor:"rgba(255, 255, 255, 0.14)",paddingHorizontal:12,paddingVertical:6,borderRadius:10},cancelActionText:{fontFamily:$.interSemiBold,fontSize:11.5,color:"rgba(255, 255, 255, 0.85)"},studioToolbar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:"rgba(15, 20, 36, 0.95)",borderRadius:16,paddingVertical:4,paddingHorizontal:5,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.08)",gap:4},studioToolItem:{flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,paddingVertical:7,paddingHorizontal:4,borderRadius:12,borderWidth:1,borderColor:"transparent",position:"relative"},studioToolItemActive:{backgroundColor:"rgba(2, 132, 199, 0.22)",borderColor:"#38BDF8",borderWidth:1.2},studioToolLabel:{fontFamily:$.interSemiBold,fontSize:10,color:"rgba(255, 255, 255, 0.60)",letterSpacing:.1},studioToolLabelActive:{color:"#38BDF8",fontFamily:$.interBold},studioTabBadgeDot:{position:"absolute",top:6,right:12,width:5,height:5,borderRadius:2.5,backgroundColor:"#C084FC"},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:S.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4},textAnnotationText:{fontFamily:$.interBold,fontSize:11},textDeleteBtn:{width:14,height:14,borderRadius:7,backgroundColor:"rgba(0, 0, 0, 0.45)",alignItems:"center",justifyContent:"center"},cropOverlayMask:{...N.absoluteFillObject,zIndex:100,elevation:100},cropDimMask:{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.58)"},cropBoxFrame:{position:"absolute",borderWidth:2,borderStyle:"solid",borderColor:"#FFFFFF",backgroundColor:"rgba(56, 189, 248, 0.08)",shadowColor:S.black,shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:5,elevation:10},cropGridH:{position:"absolute",left:0,right:0,height:1,backgroundColor:"rgba(255, 255, 255, 0.45)"},cropGridV:{position:"absolute",top:0,bottom:0,width:1,backgroundColor:"rgba(255, 255, 255, 0.45)"},cropCornerBracket:{position:"absolute",width:20,height:20,borderColor:"#FFFFFF",shadowColor:S.black,shadowOffset:{width:0,height:1},shadowOpacity:.8,shadowRadius:3,elevation:6},bracketTL:{top:-3,left:-3,borderTopWidth:4,borderLeftWidth:4},bracketTR:{top:-3,right:-3,borderTopWidth:4,borderRightWidth:4},bracketBL:{bottom:-3,left:-3,borderBottomWidth:4,borderLeftWidth:4},bracketBR:{bottom:-3,right:-3,borderBottomWidth:4,borderRightWidth:4},cropEdgeBarTop:{position:"absolute",top:-3,left:"50%",marginLeft:-18,width:36,height:5,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarBottom:{position:"absolute",bottom:-3,left:"50%",marginLeft:-18,width:36,height:5,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarLeft:{position:"absolute",left:-3,top:"50%",marginTop:-18,width:5,height:36,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarRight:{position:"absolute",right:-3,top:"50%",marginTop:-18,width:5,height:36,backgroundColor:"#FFFFFF",borderRadius:2.5},cropHandleTouchArea:{position:"absolute",width:44,height:44,alignItems:"center",justifyContent:"center",zIndex:30},handleAreaTL:{top:-22,left:-22},handleAreaTR:{top:-22,right:-22},handleAreaBL:{bottom:-22,left:-22},handleAreaBR:{bottom:-22,right:-22},cropEdgeTouchAreaTop:{position:"absolute",top:-20,left:"25%",right:"25%",height:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaBottom:{position:"absolute",bottom:-20,left:"25%",right:"25%",height:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaLeft:{position:"absolute",left:-20,top:"25%",bottom:"25%",width:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaRight:{position:"absolute",right:-20,top:"25%",bottom:"25%",width:40,alignItems:"center",justifyContent:"center",zIndex:25},cropCancelBtn:{position:"absolute",top:14,left:14,width:38,height:38,borderRadius:19,backgroundColor:"#DC2626",borderWidth:2,borderColor:S.white,alignItems:"center",justifyContent:"center",shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:8,elevation:16,zIndex:200},cropConfirmBtn:{position:"absolute",top:14,right:14,width:38,height:38,borderRadius:19,backgroundColor:"#10B981",borderWidth:2,borderColor:S.white,alignItems:"center",justifyContent:"center",shadowColor:S.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:8,elevation:16,zIndex:200},textModalBackdrop:{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:$.interBold,fontSize:14,color:S.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:$.interRegular,fontSize:13,color:S.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:$.interSemiBold,fontSize:12,color:"rgba(255, 255, 255, 0.7)"},modalConfirmBtn:{paddingHorizontal:16,paddingVertical:8,borderRadius:8,backgroundColor:S.indigo600},modalConfirmText:{fontFamily:$.interBold,fontSize:12,color:S.white},watermarkOverlay:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:"rgba(3, 7, 18, 0.85)",paddingHorizontal:10,paddingVertical:5,flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderTopWidth:N.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.2)"},watermarkText:{fontFamily:$.interBold,fontSize:9.5,color:"#38BDF8",letterSpacing:.2},watermarkTime:{fontFamily:$.interSemiBold,fontSize:9.5,color:"#94A3B8"},moreMenuItemIconText:{fontSize:14}});
|
|
814
|
+
<Sr visible={Ft}title={R("mediaGallery.deleteTitle","Delete Media?")}message={R("mediaGallery.deleteMessage",{filename:M.filename})}confirmText={R("mediaGallery.delete","Delete")}cancelText={R("common.cancel","Cancel")}isDestructive={!0}icon="trash"onConfirm={()=>{tt(!1),At(M),Ce()}}onCancel={()=>tt(!1)}/>
|
|
815
|
+
</Ci>};const t=U.create({modalBackdrop:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.70)",justifyContent:"flex-end",zIndex:999999,elevation:999999},modalBackdropPressable:{...U.absoluteFillObject},modalContentCard:{backgroundColor:"#070A14",borderTopLeftRadius:20,borderTopRightRadius:20,overflow:"hidden",shadowColor:k.black,shadowOffset:{width:0,height:-4},shadowOpacity:.25,shadowRadius:10,elevation:16},header:{width:"100%",zIndex:10,borderBottomWidth:U.hairlineWidth,borderBottomColor:"rgba(255, 255, 255, 0.12)"},headerInner:{width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingTop:6,paddingBottom:8,minHeight:48},headerLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0,marginRight:6},headerTextCol:{flex:1,minWidth:0,justifyContent:"center"},headerTitleRow:{flexDirection:"row",alignItems:"center",gap:6},title:{fontFamily:j.interBold,fontSize:13,color:k.white,letterSpacing:-.1,flexShrink:1},formatBadge:{backgroundColor:"rgba(255, 255, 255, 0.18)",paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:U.hairlineWidth,borderColor:"rgba(255, 255, 255, 0.25)"},formatBadgeText:{fontFamily:j.interBold,fontSize:8.5,color:k.white,letterSpacing:.4},headerSubtitleRow:{flexDirection:"row",alignItems:"center",gap:4,marginTop:1},subtitleDim:{fontFamily:j.interMedium,fontSize:10,color:"rgba(255, 255, 255, 0.85)"},subtitleDot:{fontSize:10,color:"rgba(255, 255, 255, 0.45)"},subtitleSize:{fontFamily:j.interBold,fontSize:10,color:"#38BDF8"},headerBackBtn:{width:32,height:32,borderRadius:16,alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.12)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)"},headerRight:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},undoRedoGroup:{flexDirection:"row",alignItems:"center",backgroundColor:"rgba(255, 255, 255, 0.12)",borderRadius:8,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",height:30,overflow:"hidden"},undoHalfBtn:{paddingHorizontal:8,height:"100%",alignItems:"center",justifyContent:"center"},redoHalfBtn:{paddingHorizontal:8,height:"100%",alignItems:"center",justifyContent:"center"},undoDivider:{width:1,height:14,backgroundColor:"rgba(255, 255, 255, 0.2)"},actionDisabled:{opacity:.35},headerMoreBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.12)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",alignItems:"center",justifyContent:"center"},headerCloseBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.16)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.25)",alignItems:"center",justifyContent:"center"},headerSaveBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"#059669",borderRadius:8,borderWidth:1,borderColor:"rgba(52, 211, 153, 0.45)",paddingHorizontal:11,height:30},headerSaveText:{fontFamily:j.interBold,fontSize:11,color:k.white},headerExportBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:"#0284C7",borderRadius:8,borderWidth:1,borderColor:"rgba(56, 189, 248, 0.5)",paddingHorizontal:10,height:30},headerExportText:{fontFamily:j.interBold,fontSize:11,color:k.white},headerActionBtn:{width:30,height:30,borderRadius:8,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",alignItems:"center",justifyContent:"center"},moreMenuDropdown:{position:"absolute",top:52,right:12,backgroundColor:"#0F172A",borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.18)",padding:6,zIndex:100,elevation:12,shadowColor:k.black,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:8,minWidth:160},moreMenuItem:{flexDirection:"row",alignItems:"center",gap:8,paddingVertical:8,paddingHorizontal:10,borderRadius:8},moreMenuItemDestructive:{borderTopWidth:U.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.1)",marginTop:4,paddingTop:8},moreMenuItemText:{fontFamily:j.interMedium,fontSize:12,color:k.white},stageWrapper:{flex:1,width:"100%",backgroundColor:"#03050A",paddingHorizontal:8,paddingTop:8,paddingBottom:4,minHeight:0},previewCard:{flex:1,width:"100%",borderRadius:12,overflow:"hidden",backgroundColor:"#03050A",alignItems:"center",justifyContent:"center",position:"relative"},canvasContainer:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",position:"relative"},imageCanvasWrapper:{position:"relative",alignItems:"center",justifyContent:"center"},instagramGridOverlay:{...U.absoluteFillObject,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.45)",zIndex:15},instagramGridHLine:{position:"absolute",left:0,right:0,height:1,backgroundColor:"rgba(255, 255, 255, 0.45)",shadowColor:"#000000",shadowOpacity:.6,shadowRadius:1,shadowOffset:{width:0,height:.5}},instagramGridVLine:{position:"absolute",top:0,bottom:0,width:1,backgroundColor:"rgba(255, 255, 255, 0.45)",shadowColor:"#000000",shadowOpacity:.6,shadowRadius:1,shadowOffset:{width:.5,height:0}},image:{width:"100%",height:"100%"},stageTopLeftBadge:{position:"absolute",top:12,left:12,flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"rgba(10, 15, 29, 0.88)",paddingHorizontal:10,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",zIndex:20},badgeGlowDot:{width:7,height:7,borderRadius:3.5,backgroundColor:"#38BDF8",shadowColor:"#38BDF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:4},badgeGlowText:{fontFamily:j.interSemiBold,fontSize:10.5,color:"rgba(255, 255, 255, 0.92)"},holdCompareBtn:{position:"absolute",bottom:12,left:12,flexDirection:"row",alignItems:"center",gap:6,backgroundColor:"rgba(10, 15, 29, 0.90)",paddingHorizontal:12,paddingVertical:7,borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.15)",shadowColor:k.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4,zIndex:20},holdCompareBtnPressed:{backgroundColor:k.indigo600,borderColor:k.indigo400},holdCompareText:{fontFamily:j.interSemiBold,fontSize:11,color:k.white},floatingZoomBar:{position:"absolute",right:12,bottom:12,backgroundColor:"rgba(10, 15, 29, 0.92)",borderRadius:22,borderWidth:1.2,borderColor:"rgba(255, 255, 255, 0.16)",paddingVertical:5,paddingHorizontal:5,alignItems:"center",gap:4,shadowColor:k.black,shadowOffset:{width:0,height:4},shadowOpacity:.5,shadowRadius:10,elevation:12,zIndex:35},zoomBtn:{width:28,height:28,borderRadius:14,backgroundColor:"rgba(255, 255, 255, 0.10)",alignItems:"center",justifyContent:"center"},zoomLevelBadge:{paddingHorizontal:4,paddingVertical:3},zoomLevelText:{fontFamily:j.interBold,fontSize:9.5,color:"#38BDF8",letterSpacing:.2},videoImageOverlay:{...U.absoluteFillObject,backgroundColor:"rgba(10, 13, 20, 0.28)"},videoFallbackBackdrop:{flex:1,width:"100%",backgroundColor:k.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:j.interSemiBold,fontSize:15,color:k.white,marginTop:12},videoFallbackSubtitle:{fontFamily:j.interRegular,fontSize:12,color:"rgba(255, 255, 255, 0.6)",marginTop:4},modernCenterPlayBtn:{position:"absolute",width:60,height:60,borderRadius:30,backgroundColor:"rgba(15, 23, 42, 0.78)",borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.45)",alignItems:"center",justifyContent:"center",shadowColor:k.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:10,elevation:12,zIndex:25},videoFloatingHud:{position:"absolute",bottom:12,left:12,right:12,backgroundColor:"rgba(10, 15, 29, 0.88)",borderRadius:14,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.16)",flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,gap:10,shadowColor:k.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:6,elevation:6,zIndex:20},videoHudProgressBar:{flex:1,height:4,backgroundColor:"rgba(255, 255, 255, 0.15)",borderRadius:2,position:"relative",overflow:"hidden"},videoHudProgressFill:{position:"absolute",top:0,bottom:0,backgroundColor:"#38BDF8",borderRadius:2},videoHudTimeText:{fontFamily:j.interBold,fontSize:10.5,color:k.white,letterSpacing:.2},videoHudBadge:{backgroundColor:"rgba(255, 255, 255, 0.12)",paddingHorizontal:5,paddingVertical:2,borderRadius:6},videoHudBadgeText:{fontFamily:j.interBold,fontSize:9,color:"#C084FC"},filmstripScroll:{flexDirection:"row",alignItems:"center",gap:6,paddingVertical:2},filmstripThumbItem:{width:48,height:48,borderRadius:8,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.2)",overflow:"hidden",position:"relative",backgroundColor:"#0F172A"},filmstripThumbActive:{borderColor:"#38BDF8",borderWidth:2,transform:[{scale:1.05}]},filmstripThumbImg:{width:"100%",height:"100%"},filmstripThumbTime:{position:"absolute",bottom:2,right:2,backgroundColor:"rgba(0, 0, 0, 0.75)",paddingHorizontal:3,paddingVertical:1,borderRadius:3,fontFamily:j.interBold,fontSize:7.5,color:k.white},bottomControlsContainer:{width:"100%",backgroundColor:"#070A14",paddingHorizontal:8,paddingTop:6,paddingBottom:io.OS==="ios"?24:12,borderTopWidth:U.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.08)",gap:6},contextToolPanel:{width:"100%",backgroundColor:"rgba(10, 15, 29, 0.96)",borderRadius:16,paddingVertical:9,paddingHorizontal:12,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)",gap:8},panelHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%"},panelHeaderLeft:{flexDirection:"row",alignItems:"center",gap:7},panelGlowDot:{width:7,height:7,borderRadius:3.5,backgroundColor:"#818CF8",shadowColor:"#818CF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:4},panelHeaderTitle:{fontFamily:j.interBold,fontSize:11,color:k.white,letterSpacing:.6},panelValueBadge:{backgroundColor:"rgba(2, 132, 199, 0.22)",paddingHorizontal:8,paddingVertical:3,borderRadius:8,borderWidth:1,borderColor:"rgba(56, 189, 248, 0.45)"},panelValueText:{fontFamily:j.interBold,fontSize:10.5,color:"#38BDF8"},sliderRowContainer:{flexDirection:"row",alignItems:"center",width:"100%",gap:8,paddingHorizontal:2},sliderMinIndicator:{fontSize:10,color:"rgba(255, 255, 255, 0.5)"},sliderMaxIndicator:{fontSize:12,color:"rgba(255, 255, 255, 0.85)"},sliderTrackTouchable:{flex:1,height:36,justifyContent:"center"},sliderTrackBg:{width:"100%",height:4,backgroundColor:"rgba(255, 255, 255, 0.14)",borderRadius:2,position:"relative",justifyContent:"center"},sliderFillTrack:{height:4,backgroundColor:"#0284C7",borderRadius:2},sliderThumbHandle:{position:"absolute",width:20,height:20,borderRadius:10,backgroundColor:"#38BDF8",marginLeft:-10,alignItems:"center",justifyContent:"center",shadowColor:"#38BDF8",shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:6,elevation:6},sliderThumbInnerGlow:{width:8,height:8,borderRadius:4,backgroundColor:k.white},modeChipsScroll:{flexDirection:"row",alignItems:"center",gap:8,paddingTop:2},modeChip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.08)",borderWidth:1,borderColor:"rgba(255, 255, 255, 0.12)"},modeChipActive:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(2, 132, 199, 0.28)",borderColor:"#38BDF8",borderWidth:1.2},modeChipText:{fontFamily:j.interSemiBold,fontSize:11,color:"rgba(255, 255, 255, 0.75)"},modeChipTextActive:{color:k.white,fontFamily:j.interBold,fontSize:11},modeChipIconText:{fontSize:13,color:"rgba(255, 255, 255, 0.7)",marginRight:1},subDivider:{width:1,height:18,backgroundColor:"rgba(255, 255, 255, 0.16)",marginHorizontal:4},colorDot:{width:22,height:22,borderRadius:11,borderWidth:2,borderColor:"rgba(255, 255, 255, 0.3)"},colorDotActive:{borderColor:k.white,transform:[{scale:1.25}]},actionPillBtn:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:6,borderRadius:10,backgroundColor:"rgba(255, 255, 255, 0.10)"},actionPillText:{fontFamily:j.interSemiBold,fontSize:10.5,color:k.white},applyActionBtn:{backgroundColor:k.emerald600,paddingHorizontal:14,paddingVertical:6,borderRadius:10},applyActionText:{fontFamily:j.interBold,fontSize:11.5,color:k.white},cancelActionBtn:{backgroundColor:"rgba(255, 255, 255, 0.14)",paddingHorizontal:12,paddingVertical:6,borderRadius:10},cancelActionText:{fontFamily:j.interSemiBold,fontSize:11.5,color:"rgba(255, 255, 255, 0.85)"},studioToolbar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",backgroundColor:"rgba(15, 20, 36, 0.95)",borderRadius:16,paddingVertical:4,paddingHorizontal:5,borderWidth:1,borderColor:"rgba(255, 255, 255, 0.08)",gap:4},studioToolItem:{flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,paddingVertical:7,paddingHorizontal:4,borderRadius:12,borderWidth:1,borderColor:"transparent",position:"relative"},studioToolItemActive:{backgroundColor:"rgba(2, 132, 199, 0.22)",borderColor:"#38BDF8",borderWidth:1.2},studioToolLabel:{fontFamily:j.interSemiBold,fontSize:10,color:"rgba(255, 255, 255, 0.60)",letterSpacing:.1},studioToolLabelActive:{color:"#38BDF8",fontFamily:j.interBold},studioTabBadgeDot:{position:"absolute",top:6,right:12,width:5,height:5,borderRadius:2.5,backgroundColor:"#C084FC"},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:k.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4},textAnnotationText:{fontFamily:j.interBold,fontSize:11},textDeleteBtn:{width:14,height:14,borderRadius:7,backgroundColor:"rgba(0, 0, 0, 0.45)",alignItems:"center",justifyContent:"center"},cropOverlayMask:{...U.absoluteFillObject,zIndex:100,elevation:100},cropDimMask:{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.58)"},cropBoxFrame:{position:"absolute",borderWidth:2,borderStyle:"solid",borderColor:"#FFFFFF",backgroundColor:"rgba(56, 189, 248, 0.08)",shadowColor:k.black,shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:5,elevation:10},cropGridH:{position:"absolute",left:0,right:0,height:1,backgroundColor:"rgba(255, 255, 255, 0.45)"},cropGridV:{position:"absolute",top:0,bottom:0,width:1,backgroundColor:"rgba(255, 255, 255, 0.45)"},cropCornerBracket:{position:"absolute",width:20,height:20,borderColor:"#FFFFFF",shadowColor:k.black,shadowOffset:{width:0,height:1},shadowOpacity:.8,shadowRadius:3,elevation:6},bracketTL:{top:-3,left:-3,borderTopWidth:4,borderLeftWidth:4},bracketTR:{top:-3,right:-3,borderTopWidth:4,borderRightWidth:4},bracketBL:{bottom:-3,left:-3,borderBottomWidth:4,borderLeftWidth:4},bracketBR:{bottom:-3,right:-3,borderBottomWidth:4,borderRightWidth:4},cropEdgeBarTop:{position:"absolute",top:-3,left:"50%",marginLeft:-18,width:36,height:5,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarBottom:{position:"absolute",bottom:-3,left:"50%",marginLeft:-18,width:36,height:5,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarLeft:{position:"absolute",left:-3,top:"50%",marginTop:-18,width:5,height:36,backgroundColor:"#FFFFFF",borderRadius:2.5},cropEdgeBarRight:{position:"absolute",right:-3,top:"50%",marginTop:-18,width:5,height:36,backgroundColor:"#FFFFFF",borderRadius:2.5},cropHandleTouchArea:{position:"absolute",width:44,height:44,alignItems:"center",justifyContent:"center",zIndex:30},handleAreaTL:{top:-22,left:-22},handleAreaTR:{top:-22,right:-22},handleAreaBL:{bottom:-22,left:-22},handleAreaBR:{bottom:-22,right:-22},cropEdgeTouchAreaTop:{position:"absolute",top:-20,left:"25%",right:"25%",height:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaBottom:{position:"absolute",bottom:-20,left:"25%",right:"25%",height:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaLeft:{position:"absolute",left:-20,top:"25%",bottom:"25%",width:40,alignItems:"center",justifyContent:"center",zIndex:25},cropEdgeTouchAreaRight:{position:"absolute",right:-20,top:"25%",bottom:"25%",width:40,alignItems:"center",justifyContent:"center",zIndex:25},cropCancelBtn:{position:"absolute",top:14,left:14,width:38,height:38,borderRadius:19,backgroundColor:"#DC2626",borderWidth:2,borderColor:k.white,alignItems:"center",justifyContent:"center",shadowColor:k.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:8,elevation:16,zIndex:200},cropConfirmBtn:{position:"absolute",top:14,right:14,width:38,height:38,borderRadius:19,backgroundColor:"#10B981",borderWidth:2,borderColor:k.white,alignItems:"center",justifyContent:"center",shadowColor:k.black,shadowOffset:{width:0,height:4},shadowOpacity:.6,shadowRadius:8,elevation:16,zIndex:200},textModalBackdrop:{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:j.interBold,fontSize:14,color:k.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:j.interRegular,fontSize:13,color:k.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:j.interSemiBold,fontSize:12,color:"rgba(255, 255, 255, 0.7)"},modalConfirmBtn:{paddingHorizontal:16,paddingVertical:8,borderRadius:8,backgroundColor:k.indigo600},modalConfirmText:{fontFamily:j.interBold,fontSize:12,color:k.white},watermarkOverlay:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:"rgba(3, 7, 18, 0.85)",paddingHorizontal:10,paddingVertical:5,flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderTopWidth:U.hairlineWidth,borderTopColor:"rgba(255, 255, 255, 0.2)"},watermarkText:{fontFamily:j.interBold,fontSize:9.5,color:"#38BDF8",letterSpacing:.2},watermarkTime:{fontFamily:j.interSemiBold,fontSize:9.5,color:"#94A3B8"},moreMenuItemIconText:{fontSize:14}});
|