@remotion/studio 4.0.451 → 4.0.453

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/Studio.js +1 -1
  2. package/dist/audio-waveform-worker.d.ts +1 -0
  3. package/dist/audio-waveform-worker.js +102 -0
  4. package/dist/components/AudioWaveform.d.ts +2 -0
  5. package/dist/components/AudioWaveform.js +166 -18
  6. package/dist/components/Timeline/LoopedIndicator.js +5 -19
  7. package/dist/components/Timeline/TimelineSequence.js +18 -10
  8. package/dist/components/Timeline/TimelineVideoInfo.d.ts +2 -0
  9. package/dist/components/Timeline/TimelineVideoInfo.js +51 -12
  10. package/dist/components/Timeline/TimelineWidthProvider.js +1 -16
  11. package/dist/components/audio-waveform-worker-types.d.ts +28 -0
  12. package/dist/components/audio-waveform-worker-types.js +2 -0
  13. package/dist/components/draw-peaks.d.ts +1 -1
  14. package/dist/components/load-waveform-peaks.d.ts +11 -1
  15. package/dist/components/load-waveform-peaks.js +25 -24
  16. package/dist/components/looped-media-timeline.d.ts +6 -0
  17. package/dist/components/looped-media-timeline.js +14 -0
  18. package/dist/components/slice-waveform-peaks.d.ts +7 -0
  19. package/dist/components/slice-waveform-peaks.js +15 -0
  20. package/dist/components/waveform-peak-processor.d.ts +23 -0
  21. package/dist/components/waveform-peak-processor.js +77 -0
  22. package/dist/esm/audio-waveform-worker.mjs +345 -0
  23. package/dist/esm/{chunk-v2r2309d.js → chunk-hn4803e7.js} +1016 -717
  24. package/dist/esm/internals.mjs +1016 -717
  25. package/dist/esm/previewEntry.mjs +996 -697
  26. package/dist/esm/renderEntry.mjs +3 -3
  27. package/dist/helpers/calculate-timeline.js +16 -0
  28. package/dist/helpers/get-timeline-nestedness.js +2 -1
  29. package/dist/make-audio-waveform-worker.d.ts +1 -0
  30. package/dist/make-audio-waveform-worker.js +10 -0
  31. package/dist/renderEntry.js +2 -2
  32. package/package.json +18 -9
@@ -23,13 +23,13 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
23
23
  });
24
24
 
25
25
  // src/Studio.tsx
26
- import { useLayoutEffect as useLayoutEffect6 } from "react";
26
+ import { useLayoutEffect as useLayoutEffect5 } from "react";
27
27
  import { createPortal } from "react-dom";
28
28
  import { Internals as Internals70 } from "remotion";
29
29
 
30
30
  // src/components/Editor.tsx
31
31
  import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
32
- import React187, { useCallback as useCallback149, useMemo as useMemo151, useState as useState98 } from "react";
32
+ import React187, { useCallback as useCallback149, useMemo as useMemo151, useState as useState97 } from "react";
33
33
  import { Internals as Internals65 } from "remotion";
34
34
 
35
35
  // src/helpers/colors.ts
@@ -84,7 +84,7 @@ var canvasRef = createRef();
84
84
  var drawRef = createRef();
85
85
 
86
86
  // src/state/timeline-zoom.tsx
87
- import { createContext as createContext2, useCallback, useMemo, useState as useState2 } from "react";
87
+ import { createContext as createContext2, useCallback, useMemo, useState } from "react";
88
88
 
89
89
  // src/components/Timeline/imperative-state.ts
90
90
  var currentFrame = 0;
@@ -180,10 +180,10 @@ var timelineVerticalScroll = React.createRef();
180
180
  // src/components/Timeline/TimelineSlider.tsx
181
181
  import {
182
182
  createRef as createRef2,
183
- useContext as useContext2,
183
+ useContext,
184
184
  useEffect,
185
185
  useImperativeHandle,
186
- useLayoutEffect as useLayoutEffect2,
186
+ useLayoutEffect,
187
187
  useRef
188
188
  } from "react";
189
189
  import { Internals, useVideoConfig } from "remotion";
@@ -218,7 +218,7 @@ var TimelineSliderHandle = () => {
218
218
 
219
219
  // src/components/Timeline/TimelineWidthProvider.tsx
220
220
  import { PlayerInternals } from "@remotion/player";
221
- import { createContext, useContext, useLayoutEffect, useState } from "react";
221
+ import { createContext } from "react";
222
222
  import { jsx as jsx2 } from "react/jsx-runtime";
223
223
  var TimelineWidthContext = createContext(null);
224
224
  var TimelineWidthProvider = ({ children }) => {
@@ -226,19 +226,8 @@ var TimelineWidthProvider = ({ children }) => {
226
226
  triggerOnWindowResize: false,
227
227
  shouldApplyCssTransforms: true
228
228
  });
229
- const { zoom: zoomMap } = useContext(TimelineZoomCtx);
230
- const [widthOverride, setWidthOverride] = useState(null);
231
- const observedWidth = size?.width ?? null;
232
- useLayoutEffect(() => {
233
- const actual = sliderAreaRef.current?.clientWidth ?? null;
234
- if (actual !== null && actual !== observedWidth) {
235
- setWidthOverride(actual);
236
- } else {
237
- setWidthOverride(null);
238
- }
239
- }, [observedWidth, zoomMap]);
240
229
  return /* @__PURE__ */ jsx2(TimelineWidthContext.Provider, {
241
- value: widthOverride ?? observedWidth,
230
+ value: size?.width ?? null,
242
231
  children
243
232
  });
244
233
  };
@@ -260,7 +249,7 @@ var line = {
260
249
  var redrawTimelineSliderFast = createRef2();
261
250
  var TimelineSlider = () => {
262
251
  const videoConfig = Internals.useUnsafeVideoConfig();
263
- const timelineWidth = useContext2(TimelineWidthContext);
252
+ const timelineWidth = useContext(TimelineWidthContext);
264
253
  if (videoConfig === null || timelineWidth === null) {
265
254
  return null;
266
255
  }
@@ -270,14 +259,14 @@ var Inner = () => {
270
259
  const videoConfig = useVideoConfig();
271
260
  const timelinePosition = Internals.Timeline.useTimelinePosition();
272
261
  const ref = useRef(null);
273
- const timelineWidth = useContext2(TimelineWidthContext);
274
- const { zoom: zoomMap } = useContext2(TimelineZoomCtx);
275
- const { canvasContent } = useContext2(Internals.CompositionManager);
262
+ const timelineWidth = useContext(TimelineWidthContext);
263
+ const { zoom: zoomMap } = useContext(TimelineZoomCtx);
264
+ const { canvasContent } = useContext(Internals.CompositionManager);
276
265
  if (timelineWidth === null) {
277
266
  throw new Error("Unexpectedly did not have timeline width");
278
267
  }
279
268
  const zoomLevel = canvasContent?.type === "composition" ? zoomMap[canvasContent.compositionId] ?? TIMELINE_MIN_ZOOM : TIMELINE_MIN_ZOOM;
280
- useLayoutEffect2(() => {
269
+ useLayoutEffect(() => {
281
270
  const el = ref.current;
282
271
  const measuredWidth = sliderAreaRef.current?.clientWidth;
283
272
  if (!el || measuredWidth === undefined || measuredWidth === 0) {
@@ -552,7 +541,7 @@ var zoomAndPreserveCursor = ({
552
541
  };
553
542
 
554
543
  // src/components/ZoomPersistor.tsx
555
- import { useContext as useContext3, useEffect as useEffect2 } from "react";
544
+ import { useContext as useContext2, useEffect as useEffect2 } from "react";
556
545
  import { Internals as Internals2 } from "remotion";
557
546
 
558
547
  // src/helpers/url-state.ts
@@ -621,8 +610,8 @@ var getZoomFromLocalStorage = () => {
621
610
  };
622
611
  var ZoomPersistor = () => {
623
612
  const [playing] = Internals2.Timeline.usePlayingState();
624
- const { zoom } = useContext3(TimelineZoomCtx);
625
- const { canvasContent } = useContext3(Internals2.CompositionManager);
613
+ const { zoom } = useContext2(TimelineZoomCtx);
614
+ const { canvasContent } = useContext2(Internals2.CompositionManager);
626
615
  const urlState = deriveCanvasContentFromUrl();
627
616
  const isActive = urlState && urlState.type === "composition" && canvasContent && canvasContent.type === "composition" && urlState.compositionId === canvasContent.compositionId;
628
617
  useEffect2(() => {
@@ -645,7 +634,7 @@ var TimelineZoomCtx = createContext2({
645
634
  }
646
635
  });
647
636
  var TimelineZoomContext = ({ children }) => {
648
- const [zoom, setZoomState] = useState2(() => getZoomFromLocalStorage());
637
+ const [zoom, setZoomState] = useState(() => getZoomFromLocalStorage());
649
638
  const setZoom = useCallback((compositionId, callback, options) => {
650
639
  setZoomState((prevZoomMap) => {
651
640
  const newZoomWithFloatingPointErrors = Math.min(TIMELINE_MAX_ZOOM, Math.max(TIMELINE_MIN_ZOOM, callback(prevZoomMap[compositionId] ?? TIMELINE_MIN_ZOOM)));
@@ -678,14 +667,14 @@ var TimelineZoomContext = ({ children }) => {
678
667
  // src/state/z-index.tsx
679
668
  import {
680
669
  createContext as createContext5,
681
- useContext as useContext5,
670
+ useContext as useContext4,
682
671
  useEffect as useEffect4,
683
672
  useMemo as useMemo5,
684
673
  useRef as useRef3
685
674
  } from "react";
686
675
 
687
676
  // src/helpers/use-keybinding.ts
688
- import { useCallback as useCallback3, useContext as useContext4, useEffect as useEffect3, useMemo as useMemo3, useState as useState3 } from "react";
677
+ import { useCallback as useCallback3, useContext as useContext3, useEffect as useEffect3, useMemo as useMemo3, useState as useState2 } from "react";
689
678
 
690
679
  // src/state/keybindings.tsx
691
680
  import { createContext as createContext3, useCallback as useCallback2, useMemo as useMemo2, useRef as useRef2 } from "react";
@@ -743,8 +732,8 @@ var areKeyboardShortcutsDisabled = () => {
743
732
  return !process.env.KEYBOARD_SHORTCUTS_ENABLED;
744
733
  };
745
734
  var useKeybinding = () => {
746
- const [paneId] = useState3(() => String(Math.random()));
747
- const context = useContext4(KeybindingContext);
735
+ const [paneId] = useState2(() => String(Math.random()));
736
+ const context = useContext3(KeybindingContext);
748
737
  const { isHighestContext } = useZIndex();
749
738
  const registerKeybinding = useCallback3((options) => {
750
739
  if (!process.env.KEYBOARD_SHORTCUTS_ENABLED) {
@@ -803,7 +792,7 @@ var useKeybinding = () => {
803
792
  };
804
793
 
805
794
  // src/state/highest-z-index.tsx
806
- import { createContext as createContext4, useCallback as useCallback4, useMemo as useMemo4, useState as useState4 } from "react";
795
+ import { createContext as createContext4, useCallback as useCallback4, useMemo as useMemo4, useState as useState3 } from "react";
807
796
  import { jsx as jsx6 } from "react/jsx-runtime";
808
797
  var HighestZIndexContext = createContext4({
809
798
  highestIndex: 0,
@@ -815,7 +804,7 @@ var HighestZIndexContext = createContext4({
815
804
  }
816
805
  });
817
806
  var HighestZIndexProvider = ({ children }) => {
818
- const [zIndexes, setZIndexes] = useState4([]);
807
+ const [zIndexes, setZIndexes] = useState3([]);
819
808
  const registerZIndex = useCallback4((newIndex) => {
820
809
  setZIndexes((prev) => [...prev, newIndex]);
821
810
  }, []);
@@ -876,8 +865,8 @@ var EscapeHook = ({ onEscape }) => {
876
865
  return null;
877
866
  };
878
867
  var HigherZIndex = ({ children, onEscape, onOutsideClick, disabled }) => {
879
- const context = useContext5(ZIndexContext);
880
- const highestContext = useContext5(HighestZIndexContext);
868
+ const context = useContext4(ZIndexContext);
869
+ const highestContext = useContext4(HighestZIndexContext);
881
870
  const containerRef = useRef3(null);
882
871
  const currentIndex = disabled ? context.currentIndex : context.currentIndex + 1;
883
872
  useEffect4(() => {
@@ -936,8 +925,8 @@ var HigherZIndex = ({ children, onEscape, onOutsideClick, disabled }) => {
936
925
  });
937
926
  };
938
927
  var useZIndex = () => {
939
- const context = useContext5(ZIndexContext);
940
- const highestContext = useContext5(HighestZIndexContext);
928
+ const context = useContext4(ZIndexContext);
929
+ const highestContext = useContext4(HighestZIndexContext);
941
930
  const isHighestContext = highestContext.highestIndex === context.currentIndex;
942
931
  return useMemo5(() => ({
943
932
  currentZIndex: context.currentIndex,
@@ -948,11 +937,11 @@ var useZIndex = () => {
948
937
  };
949
938
 
950
939
  // src/components/EditorContent.tsx
951
- import { useContext as useContext81 } from "react";
940
+ import { useContext as useContext80 } from "react";
952
941
  import { Internals as Internals58 } from "remotion";
953
942
 
954
943
  // src/helpers/is-current-selected-still.ts
955
- import { useContext as useContext6 } from "react";
944
+ import { useContext as useContext5 } from "react";
956
945
  import { Internals as Internals3 } from "remotion";
957
946
 
958
947
  // src/helpers/is-composition-still.ts
@@ -973,7 +962,7 @@ var useIsStill = () => {
973
962
  };
974
963
  var useIsVideoComposition = () => {
975
964
  const isStill = useIsStill();
976
- const { canvasContent } = useContext6(Internals3.CompositionManager);
965
+ const { canvasContent } = useContext5(Internals3.CompositionManager);
977
966
  if (canvasContent === null) {
978
967
  return false;
979
968
  }
@@ -984,17 +973,17 @@ var useIsVideoComposition = () => {
984
973
  };
985
974
 
986
975
  // src/components/InitialCompositionLoader.tsx
987
- import { useCallback as useCallback24, useContext as useContext16, useEffect as useEffect15 } from "react";
976
+ import { useCallback as useCallback24, useContext as useContext15, useEffect as useEffect15 } from "react";
988
977
  import { Internals as Internals12 } from "remotion";
989
978
 
990
979
  // src/helpers/mobile-layout.ts
991
- import { useEffect as useEffect5, useRef as useRef4, useState as useState5 } from "react";
980
+ import { useEffect as useEffect5, useRef as useRef4, useState as useState4 } from "react";
992
981
  var breakpoint = 900;
993
982
  function getIsMobile() {
994
983
  return window.innerWidth < breakpoint;
995
984
  }
996
985
  var useMobileLayout = () => {
997
- const [isMobile, setIsMobile] = useState5(getIsMobile());
986
+ const [isMobile, setIsMobile] = useState4(getIsMobile());
998
987
  const isMobileRef = useRef4(isMobile);
999
988
  useEffect5(() => {
1000
989
  function handleResize() {
@@ -1012,7 +1001,7 @@ var useMobileLayout = () => {
1012
1001
  };
1013
1002
 
1014
1003
  // src/state/folders.tsx
1015
- import { createContext as createContext7, useMemo as useMemo6, useState as useState6 } from "react";
1004
+ import { createContext as createContext7, useMemo as useMemo6, useState as useState5 } from "react";
1016
1005
 
1017
1006
  // src/helpers/persist-open-folders.tsx
1018
1007
  import { createContext as createContext6 } from "react";
@@ -1052,8 +1041,8 @@ var FolderContext = createContext7({
1052
1041
  }
1053
1042
  });
1054
1043
  var FolderContextProvider = ({ children }) => {
1055
- const [compositionFoldersExpanded, setCompositionFoldersExpanded] = useState6(() => loadExpandedFolders("compositions"));
1056
- const [assetFoldersExpanded, setAssetFoldersExpanded] = useState6(() => loadExpandedFolders("assets"));
1044
+ const [compositionFoldersExpanded, setCompositionFoldersExpanded] = useState5(() => loadExpandedFolders("compositions"));
1045
+ const [assetFoldersExpanded, setAssetFoldersExpanded] = useState5(() => loadExpandedFolders("assets"));
1057
1046
  const value = useMemo6(() => {
1058
1047
  return {
1059
1048
  compositionFoldersExpanded,
@@ -1069,7 +1058,7 @@ var FolderContextProvider = ({ children }) => {
1069
1058
  };
1070
1059
 
1071
1060
  // src/state/sidebar.tsx
1072
- import { createContext as createContext8, useMemo as useMemo7, useState as useState7 } from "react";
1061
+ import { createContext as createContext8, useMemo as useMemo7, useState as useState6 } from "react";
1073
1062
  import { jsx as jsx9 } from "react/jsx-runtime";
1074
1063
  var storageKey = (sidebar) => {
1075
1064
  if (sidebar === "right") {
@@ -1112,7 +1101,7 @@ var SidebarContext = createContext8({
1112
1101
  });
1113
1102
  var SidebarContextProvider = ({ children }) => {
1114
1103
  const isMobileLayout = useMobileLayout();
1115
- const [sidebarCollapsedState, setSidebarCollapsedState] = useState7(() => ({
1104
+ const [sidebarCollapsedState, setSidebarCollapsedState] = useState6(() => ({
1116
1105
  left: getSavedCollapsedStateLeft(isMobileLayout),
1117
1106
  right: getSavedCollapsedStateRight(isMobileLayout)
1118
1107
  }));
@@ -1146,7 +1135,7 @@ var SidebarContextProvider = ({ children }) => {
1146
1135
  };
1147
1136
 
1148
1137
  // src/components/CompositionSelector.tsx
1149
- import { useCallback as useCallback17, useContext as useContext10, useMemo as useMemo21 } from "react";
1138
+ import { useCallback as useCallback17, useContext as useContext9, useMemo as useMemo21 } from "react";
1150
1139
  import { Internals as Internals7 } from "remotion";
1151
1140
 
1152
1141
  // src/error-overlay/remotion-overlay/ShortcutHint.tsx
@@ -1379,11 +1368,11 @@ var ModalsContext = createContext9({
1379
1368
  // src/components/CompositionSelectorItem.tsx
1380
1369
  import {
1381
1370
  useCallback as useCallback16,
1382
- useContext as useContext9,
1383
- useLayoutEffect as useLayoutEffect3,
1371
+ useContext as useContext8,
1372
+ useLayoutEffect as useLayoutEffect2,
1384
1373
  useMemo as useMemo20,
1385
1374
  useRef as useRef11,
1386
- useState as useState15
1375
+ useState as useState14
1387
1376
  } from "react";
1388
1377
 
1389
1378
  // src/helpers/sidebar-scroll-into-view.ts
@@ -1529,7 +1518,7 @@ var FilmIcon = ({ color, ...props }) => {
1529
1518
  };
1530
1519
 
1531
1520
  // src/components/CompositionContextButton.tsx
1532
- import { useCallback as useCallback13, useContext as useContext7, useMemo as useMemo17 } from "react";
1521
+ import { useCallback as useCallback13, useContext as useContext6, useMemo as useMemo17 } from "react";
1533
1522
 
1534
1523
  // src/helpers/client-id.tsx
1535
1524
  import React13, { useCallback as useCallback7, useEffect as useEffect8, useMemo as useMemo10, useRef as useRef6 } from "react";
@@ -1540,7 +1529,7 @@ import {
1540
1529
  createRef as createRef3,
1541
1530
  useCallback as useCallback5,
1542
1531
  useImperativeHandle as useImperativeHandle2,
1543
- useState as useState8
1532
+ useState as useState7
1544
1533
  } from "react";
1545
1534
 
1546
1535
  // src/components/Notifications/Notification.tsx
@@ -1602,7 +1591,7 @@ var showNotification = (content, durationInMs) => {
1602
1591
  });
1603
1592
  };
1604
1593
  var NotificationCenter = () => {
1605
- const [notifications, setNotifications] = useState8([]);
1594
+ const [notifications, setNotifications] = useState7([]);
1606
1595
  const onRemove = useCallback5((id) => {
1607
1596
  setNotifications((not) => {
1608
1597
  return not.filter((n) => n.id !== id);
@@ -1674,7 +1663,7 @@ import React12, {
1674
1663
  useImperativeHandle as useImperativeHandle3,
1675
1664
  useMemo as useMemo9,
1676
1665
  useRef as useRef5,
1677
- useState as useState9
1666
+ useState as useState8
1678
1667
  } from "react";
1679
1668
 
1680
1669
  // src/components/RenderQueue/client-render-queue.ts
@@ -1744,9 +1733,9 @@ var RenderQueueContext = React12.createContext({
1744
1733
  });
1745
1734
  var renderJobsRef = createRef4();
1746
1735
  var RenderQueueContextProvider = ({ children }) => {
1747
- const [serverJobs, setServerJobs] = useState9(window.remotion_initialRenderQueue ?? []);
1748
- const [clientJobs, setClientJobs] = useState9(restorePersistedClientRenders);
1749
- const [currentlyProcessing, setCurrentlyProcessing] = useState9(null);
1736
+ const [serverJobs, setServerJobs] = useState8(window.remotion_initialRenderQueue ?? []);
1737
+ const [clientJobs, setClientJobs] = useState8(restorePersistedClientRenders);
1738
+ const [currentlyProcessing, setCurrentlyProcessing] = useState8(null);
1750
1739
  const processJobCallbackRef = useRef5(null);
1751
1740
  useEffect7(() => {
1752
1741
  if (currentlyProcessing) {
@@ -2031,11 +2020,11 @@ var EllipsisIcon = (props) => {
2031
2020
 
2032
2021
  // src/components/InlineDropdown.tsx
2033
2022
  import { PlayerInternals as PlayerInternals3 } from "@remotion/player";
2034
- import { useCallback as useCallback12, useMemo as useMemo16, useRef as useRef9, useState as useState13 } from "react";
2023
+ import { useCallback as useCallback12, useMemo as useMemo16, useRef as useRef9, useState as useState12 } from "react";
2035
2024
  import ReactDOM2 from "react-dom";
2036
2025
 
2037
2026
  // src/components/InlineAction.tsx
2038
- import { useCallback as useCallback8, useMemo as useMemo11, useState as useState10 } from "react";
2027
+ import { useCallback as useCallback8, useMemo as useMemo11, useState as useState9 } from "react";
2039
2028
  import { jsx as jsx19 } from "react/jsx-runtime";
2040
2029
  var InlineAction = ({
2041
2030
  renderAction,
@@ -2044,7 +2033,7 @@ var InlineAction = ({
2044
2033
  title
2045
2034
  }) => {
2046
2035
  const { tabIndex } = useZIndex();
2047
- const [hovered, setHovered] = useState10(false);
2036
+ const [hovered, setHovered] = useState9(false);
2048
2037
  const onPointerEnter = useCallback8(() => {
2049
2038
  setHovered(true);
2050
2039
  }, []);
@@ -2128,7 +2117,7 @@ var inlineCodeSnippet = {
2128
2117
  };
2129
2118
 
2130
2119
  // src/components/NewComposition/MenuContent.tsx
2131
- import { useCallback as useCallback11, useEffect as useEffect10, useMemo as useMemo15, useRef as useRef8, useState as useState12 } from "react";
2120
+ import { useCallback as useCallback11, useEffect as useEffect10, useMemo as useMemo15, useRef as useRef8, useState as useState11 } from "react";
2132
2121
 
2133
2122
  // src/components/Menu/is-menu-item.tsx
2134
2123
  var MENU_INITIATOR_CLASSNAME = "__remotion-studio-menu-initiator";
@@ -2155,7 +2144,7 @@ var MenuDivider = () => {
2155
2144
 
2156
2145
  // src/components/Menu/MenuSubItem.tsx
2157
2146
  import { PlayerInternals as PlayerInternals2 } from "@remotion/player";
2158
- import { useCallback as useCallback10, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef7, useState as useState11 } from "react";
2147
+ import { useCallback as useCallback10, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef7, useState as useState10 } from "react";
2159
2148
  import ReactDOM from "react-dom";
2160
2149
 
2161
2150
  // src/icons/caret.tsx
@@ -2344,7 +2333,7 @@ var MenuSubItem = ({
2344
2333
  setSubMenuActivated,
2345
2334
  disabled
2346
2335
  }) => {
2347
- const [hovered, setHovered] = useState11(false);
2336
+ const [hovered, setHovered] = useState10(false);
2348
2337
  const ref = useRef7(null);
2349
2338
  const size = PlayerInternals2.useElementSize(ref, {
2350
2339
  triggerOnWindowResize: true,
@@ -2513,13 +2502,13 @@ var MenuContent = ({
2513
2502
  const keybindings = useKeybinding();
2514
2503
  const containerRef = useRef8(null);
2515
2504
  const isMobileLayout = useMobileLayout();
2516
- const [subMenuActivated, setSubMenuActivated] = useState12(false);
2505
+ const [subMenuActivated, setSubMenuActivated] = useState11(false);
2517
2506
  const typeaheadQueryRef = useRef8("");
2518
2507
  const typeaheadTimeoutRef = useRef8(null);
2519
2508
  if (values[0].type === "divider") {
2520
2509
  throw new Error("first value cant be divide");
2521
2510
  }
2522
- const [selectedItem, setSelectedItem] = useState12(typeof preselectIndex === "number" && preselectIndex >= 0 ? values[preselectIndex].id : null);
2511
+ const [selectedItem, setSelectedItem] = useState11(typeof preselectIndex === "number" && preselectIndex >= 0 ? values[preselectIndex].id : null);
2523
2512
  const onEscape = useCallback11(() => {
2524
2513
  onHide();
2525
2514
  }, [onHide]);
@@ -2817,7 +2806,7 @@ var InlineDropdown = ({
2817
2806
  ...props
2818
2807
  }) => {
2819
2808
  const ref = useRef9(null);
2820
- const [opened, setOpened] = useState13({ type: "not-open" });
2809
+ const [opened, setOpened] = useState12({ type: "not-open" });
2821
2810
  const { currentZIndex } = useZIndex();
2822
2811
  const size = PlayerInternals3.useElementSize(ref, {
2823
2812
  triggerOnWindowResize: true,
@@ -2919,7 +2908,7 @@ var CompositionContextButton = ({ visible, values }) => {
2919
2908
  }
2920
2909
  };
2921
2910
  }, []);
2922
- const connectionStatus = useContext7(StudioServerConnectionCtx).previewServerState.type;
2911
+ const connectionStatus = useContext6(StudioServerConnectionCtx).previewServerState.type;
2923
2912
  const renderAction = useCallback13((color) => {
2924
2913
  return /* @__PURE__ */ jsx27(EllipsisIcon, {
2925
2914
  fill: color,
@@ -2937,12 +2926,12 @@ var CompositionContextButton = ({ visible, values }) => {
2937
2926
 
2938
2927
  // src/components/ContextMenu.tsx
2939
2928
  import { PlayerInternals as PlayerInternals4 } from "@remotion/player";
2940
- import { useCallback as useCallback14, useEffect as useEffect11, useMemo as useMemo18, useRef as useRef10, useState as useState14 } from "react";
2929
+ import { useCallback as useCallback14, useEffect as useEffect11, useMemo as useMemo18, useRef as useRef10, useState as useState13 } from "react";
2941
2930
  import ReactDOM3 from "react-dom";
2942
2931
  import { jsx as jsx28, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
2943
2932
  var ContextMenu = ({ children, values }) => {
2944
2933
  const ref = useRef10(null);
2945
- const [opened, setOpened] = useState14({ type: "not-open" });
2934
+ const [opened, setOpened] = useState13({ type: "not-open" });
2946
2935
  const { currentZIndex } = useZIndex();
2947
2936
  const style = useMemo18(() => {
2948
2937
  return {};
@@ -3048,7 +3037,7 @@ var ContextMenu = ({ children, values }) => {
3048
3037
  };
3049
3038
 
3050
3039
  // src/components/SidebarRenderButton.tsx
3051
- import { useCallback as useCallback15, useContext as useContext8, useMemo as useMemo19 } from "react";
3040
+ import { useCallback as useCallback15, useContext as useContext7, useMemo as useMemo19 } from "react";
3052
3041
  import { Internals as Internals5 } from "remotion";
3053
3042
 
3054
3043
  // src/icons/render.tsx
@@ -3068,8 +3057,8 @@ var ThinRenderIcon = (props) => {
3068
3057
  // src/components/SidebarRenderButton.tsx
3069
3058
  import { jsx as jsx30 } from "react/jsx-runtime";
3070
3059
  var SidebarRenderButton = ({ composition, visible }) => {
3071
- const { setSelectedModal } = useContext8(ModalsContext);
3072
- const { setSidebarCollapsedState } = useContext8(SidebarContext);
3060
+ const { setSelectedModal } = useContext7(ModalsContext);
3061
+ const { setSidebarCollapsedState } = useContext7(SidebarContext);
3073
3062
  const isMobileLayout = useMobileLayout();
3074
3063
  const iconStyle = useMemo19(() => {
3075
3064
  return {
@@ -3078,8 +3067,8 @@ var SidebarRenderButton = ({ composition, visible }) => {
3078
3067
  }
3079
3068
  };
3080
3069
  }, []);
3081
- const connectionStatus = useContext8(StudioServerConnectionCtx).previewServerState.type;
3082
- const { props } = useContext8(Internals5.EditorPropsContext);
3070
+ const connectionStatus = useContext7(StudioServerConnectionCtx).previewServerState.type;
3071
+ const { props } = useContext7(Internals5.EditorPropsContext);
3083
3072
  const onClick = useCallback15((e) => {
3084
3073
  const defaults = window.remotion_renderDefaults;
3085
3074
  if (!defaults) {
@@ -3213,7 +3202,7 @@ var CompositionSelectorItem = ({
3213
3202
  }
3214
3203
  return false;
3215
3204
  }, [item, currentComposition]);
3216
- const [hovered, setHovered] = useState15(false);
3205
+ const [hovered, setHovered] = useState14(false);
3217
3206
  const onPointerEnter = useCallback16(() => {
3218
3207
  setHovered(true);
3219
3208
  }, []);
@@ -3222,7 +3211,7 @@ var CompositionSelectorItem = ({
3222
3211
  }, []);
3223
3212
  const compositionRowRef = useRef11(null);
3224
3213
  const compositionId = item.type === "composition" ? item.composition.id : null;
3225
- useLayoutEffect3(() => {
3214
+ useLayoutEffect2(() => {
3226
3215
  if (compositionId === null) {
3227
3216
  return;
3228
3217
  }
@@ -3259,7 +3248,7 @@ var CompositionSelectorItem = ({
3259
3248
  onClick(evt);
3260
3249
  }
3261
3250
  }, [onClick]);
3262
- const { setSelectedModal } = useContext9(ModalsContext);
3251
+ const { setSelectedModal } = useContext8(ModalsContext);
3263
3252
  const contextMenu = useMemo20(() => {
3264
3253
  if (item.type === "composition") {
3265
3254
  return [
@@ -3517,7 +3506,7 @@ var CurrentComposition = () => {
3517
3506
  // src/components/CompositionSelector.tsx
3518
3507
  import { jsx as jsx33, jsxs as jsxs9 } from "react/jsx-runtime";
3519
3508
  var useCompositionNavigation = () => {
3520
- const { compositions, canvasContent } = useContext10(Internals7.CompositionManager);
3509
+ const { compositions, canvasContent } = useContext9(Internals7.CompositionManager);
3521
3510
  const selectComposition = useSelectComposition();
3522
3511
  const navigateToNextComposition = useCallback17(() => {
3523
3512
  if (!canvasContent || canvasContent.type !== "composition" || compositions.length <= 1) {
@@ -3590,9 +3579,9 @@ var getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
3590
3579
  return getKeysToExpand(name, parent, initial);
3591
3580
  };
3592
3581
  var CompositionSelector = () => {
3593
- const { compositions, canvasContent, folders } = useContext10(Internals7.CompositionManager);
3594
- const { foldersExpanded } = useContext10(ExpandedFoldersContext);
3595
- const { setSelectedModal } = useContext10(ModalsContext);
3582
+ const { compositions, canvasContent, folders } = useContext9(Internals7.CompositionManager);
3583
+ const { foldersExpanded } = useContext9(ExpandedFoldersContext);
3584
+ const { setSelectedModal } = useContext9(ModalsContext);
3596
3585
  const { tabIndex } = useZIndex();
3597
3586
  const selectComposition = useSelectComposition();
3598
3587
  const sortedCompositions = useMemo21(() => {
@@ -3662,10 +3651,10 @@ var CompositionSelector = () => {
3662
3651
  };
3663
3652
 
3664
3653
  // src/components/ExplorerPanel.tsx
3665
- import { createRef as createRef5, useCallback as useCallback23, useImperativeHandle as useImperativeHandle5, useState as useState22 } from "react";
3654
+ import { createRef as createRef5, useCallback as useCallback23, useImperativeHandle as useImperativeHandle5, useState as useState21 } from "react";
3666
3655
 
3667
3656
  // src/components/AssetSelector.tsx
3668
- import { useCallback as useCallback20, useContext as useContext14, useMemo as useMemo25, useState as useState19 } from "react";
3657
+ import { useCallback as useCallback20, useContext as useContext13, useMemo as useMemo25, useState as useState18 } from "react";
3669
3658
  import { Internals as Internals10 } from "remotion";
3670
3659
 
3671
3660
  // src/api/write-static-file.ts
@@ -3737,11 +3726,11 @@ var use_asset_drag_events_default = useAssetDragEvents;
3737
3726
  // src/components/AssetSelectorItem.tsx
3738
3727
  import React25, {
3739
3728
  useCallback as useCallback19,
3740
- useContext as useContext11,
3741
- useLayoutEffect as useLayoutEffect4,
3729
+ useContext as useContext10,
3730
+ useLayoutEffect as useLayoutEffect3,
3742
3731
  useMemo as useMemo23,
3743
3732
  useRef as useRef13,
3744
- useState as useState16
3733
+ useState as useState15
3745
3734
  } from "react";
3746
3735
  import { Internals as Internals8 } from "remotion";
3747
3736
  import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
@@ -4127,7 +4116,7 @@ var AssetFolderItem = ({
4127
4116
  setDropLocation,
4128
4117
  readOnlyStudio
4129
4118
  }) => {
4130
- const [hovered, setHovered] = useState16(false);
4119
+ const [hovered, setHovered] = useState15(false);
4131
4120
  const openFolderTimerRef = useRef13(null);
4132
4121
  const { isDropDiv, onDragEnter, onDragLeave } = use_asset_drag_events_default({
4133
4122
  name: item.name,
@@ -4256,13 +4245,13 @@ var AssetFolderTree = ({
4256
4245
  };
4257
4246
  var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }) => {
4258
4247
  const isMobileLayout = useMobileLayout();
4259
- const [hovered, setHovered] = useState16(false);
4260
- const { setSidebarCollapsedState } = useContext11(SidebarContext);
4248
+ const [hovered, setHovered] = useState15(false);
4249
+ const { setSidebarCollapsedState } = useContext10(SidebarContext);
4261
4250
  const onPointerEnter = useCallback19(() => {
4262
4251
  setHovered(true);
4263
4252
  }, []);
4264
- const { setCanvasContent } = useContext11(Internals8.CompositionSetters);
4265
- const { canvasContent } = useContext11(Internals8.CompositionManager);
4253
+ const { setCanvasContent } = useContext10(Internals8.CompositionSetters);
4254
+ const { canvasContent } = useContext10(Internals8.CompositionManager);
4266
4255
  const relativePath = useMemo23(() => {
4267
4256
  return parentFolder ? parentFolder + "/" + item.name : item.name;
4268
4257
  }, [parentFolder, item.name]);
@@ -4276,7 +4265,7 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
4276
4265
  setHovered(false);
4277
4266
  }, []);
4278
4267
  const rowRef = useRef13(null);
4279
- useLayoutEffect4(() => {
4268
+ useLayoutEffect3(() => {
4280
4269
  maybeScrollAssetSidebarRowIntoView({
4281
4270
  element: rowRef.current,
4282
4271
  assetPath: relativePath,
@@ -4393,11 +4382,11 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
4393
4382
  // src/components/CurrentAsset.tsx
4394
4383
  import { formatBytes } from "@remotion/studio-shared";
4395
4384
  import { ALL_FORMATS, Input, UrlSource } from "mediabunny";
4396
- import { useContext as useContext13, useEffect as useEffect14, useMemo as useMemo24, useState as useState18 } from "react";
4385
+ import { useContext as useContext12, useEffect as useEffect14, useMemo as useMemo24, useState as useState17 } from "react";
4397
4386
  import { Internals as Internals9, staticFile } from "remotion";
4398
4387
 
4399
4388
  // src/components/use-static-files.ts
4400
- import React26, { createContext as createContext10, useContext as useContext12, useEffect as useEffect13, useState as useState17 } from "react";
4389
+ import React26, { createContext as createContext10, useContext as useContext11, useEffect as useEffect13, useState as useState16 } from "react";
4401
4390
  import { useRemotionEnvironment } from "remotion";
4402
4391
 
4403
4392
  // src/api/get-static-files.ts
@@ -4455,7 +4444,7 @@ var watchPublicFolder = (callback) => {
4455
4444
  // src/components/use-static-files.ts
4456
4445
  var StaticFilesContext = createContext10([]);
4457
4446
  var StaticFilesProvider = ({ children }) => {
4458
- const [files, setFiles] = useState17(() => getStaticFiles());
4447
+ const [files, setFiles] = useState16(() => getStaticFiles());
4459
4448
  const env = useRemotionEnvironment();
4460
4449
  useEffect13(() => {
4461
4450
  if (!env.isStudio) {
@@ -4472,7 +4461,7 @@ var StaticFilesProvider = ({ children }) => {
4472
4461
  return React26.createElement(StaticFilesContext.Provider, { value: files }, children);
4473
4462
  };
4474
4463
  var useStaticFiles = () => {
4475
- return useContext12(StaticFilesContext);
4464
+ return useContext11(StaticFilesContext);
4476
4465
  };
4477
4466
 
4478
4467
  // src/components/CurrentAsset.tsx
@@ -4517,7 +4506,7 @@ var formatDuration = (seconds) => {
4517
4506
  return `${String(m).padStart(2, "0")}:${sFixed}`;
4518
4507
  };
4519
4508
  var CurrentAsset = () => {
4520
- const { canvasContent } = useContext13(Internals9.CompositionManager);
4509
+ const { canvasContent } = useContext12(Internals9.CompositionManager);
4521
4510
  const assetName = canvasContent?.type === "asset" ? canvasContent.asset : null;
4522
4511
  const staticFiles = useStaticFiles();
4523
4512
  const sizeInBytes = useMemo24(() => {
@@ -4527,7 +4516,7 @@ var CurrentAsset = () => {
4527
4516
  const file = staticFiles.find((f) => f.name === assetName);
4528
4517
  return file?.sizeInBytes ?? null;
4529
4518
  }, [assetName, staticFiles]);
4530
- const [mediaMetadata, setMediaMetadata] = useState18(null);
4519
+ const [mediaMetadata, setMediaMetadata] = useState17(null);
4531
4520
  useEffect14(() => {
4532
4521
  setMediaMetadata(null);
4533
4522
  if (!assetName) {
@@ -4621,10 +4610,10 @@ var baseList = {
4621
4610
  };
4622
4611
  var AssetSelector = ({ readOnlyStudio }) => {
4623
4612
  const { tabIndex } = useZIndex();
4624
- const { canvasContent } = useContext14(Internals10.CompositionManager);
4625
- const { assetFoldersExpanded, setAssetFoldersExpanded } = useContext14(FolderContext);
4626
- const [dropLocation, setDropLocation] = useState19(null);
4627
- const connectionStatus = useContext14(StudioServerConnectionCtx).previewServerState.type;
4613
+ const { canvasContent } = useContext13(Internals10.CompositionManager);
4614
+ const { assetFoldersExpanded, setAssetFoldersExpanded } = useContext13(FolderContext);
4615
+ const [dropLocation, setDropLocation] = useState18(null);
4616
+ const connectionStatus = useContext13(StudioServerConnectionCtx).previewServerState.type;
4628
4617
  const shouldAllowUpload = connectionStatus === "connected" && !readOnlyStudio;
4629
4618
  const showCurrentAsset = canvasContent?.type === "asset";
4630
4619
  const list = useMemo25(() => {
@@ -4747,16 +4736,16 @@ var AssetSelector = ({ readOnlyStudio }) => {
4747
4736
  // src/components/CompSelectorRef.tsx
4748
4737
  import {
4749
4738
  useCallback as useCallback21,
4750
- useContext as useContext15,
4739
+ useContext as useContext14,
4751
4740
  useImperativeHandle as useImperativeHandle4,
4752
4741
  useMemo as useMemo26,
4753
- useState as useState20
4742
+ useState as useState19
4754
4743
  } from "react";
4755
4744
  import { Internals as Internals11 } from "remotion";
4756
4745
  import { jsx as jsx39 } from "react/jsx-runtime";
4757
4746
  var CompSelectorRef = ({ children }) => {
4758
- const { compositions } = useContext15(Internals11.CompositionManager);
4759
- const [foldersExpanded, setFoldersExpanded] = useState20(loadExpandedFolders("compositions"));
4747
+ const { compositions } = useContext14(Internals11.CompositionManager);
4748
+ const [foldersExpanded, setFoldersExpanded] = useState19(loadExpandedFolders("compositions"));
4760
4749
  const selectComposition = useSelectComposition();
4761
4750
  const toggleFolder = useCallback21((folderName, parentName) => {
4762
4751
  setFoldersExpanded((p) => {
@@ -4829,7 +4818,7 @@ var CompSelectorRef = ({ children }) => {
4829
4818
  };
4830
4819
 
4831
4820
  // src/components/Tabs/index.tsx
4832
- import { useCallback as useCallback22, useMemo as useMemo27, useState as useState21 } from "react";
4821
+ import { useCallback as useCallback22, useMemo as useMemo27, useState as useState20 } from "react";
4833
4822
  import { jsx as jsx40 } from "react/jsx-runtime";
4834
4823
  var tabsContainer = {
4835
4824
  display: "flex",
@@ -4863,7 +4852,7 @@ var selectorButton = {
4863
4852
  WebkitUserSelect: "none"
4864
4853
  };
4865
4854
  var Tab = ({ children, onClick, style, selected }) => {
4866
- const [hovered, setHovered] = useState21(false);
4855
+ const [hovered, setHovered] = useState20(false);
4867
4856
  const { tabIndex } = useZIndex();
4868
4857
  const onPointerEnter = useCallback22(() => {
4869
4858
  setHovered(true);
@@ -4916,7 +4905,7 @@ var persistSelectedOptionsSidebarPanel = (panel) => {
4916
4905
  };
4917
4906
  var explorerSidebarTabs = createRef5();
4918
4907
  var ExplorerPanel = ({ readOnlyStudio }) => {
4919
- const [panel, setPanel] = useState22(() => getSelectedPanel());
4908
+ const [panel, setPanel] = useState21(() => getSelectedPanel());
4920
4909
  const onCompositionsSelected = useCallback23(() => {
4921
4910
  setPanel("compositions");
4922
4911
  persistSelectedOptionsSidebarPanel("compositions");
@@ -4969,8 +4958,8 @@ var ExplorerPanel = ({ readOnlyStudio }) => {
4969
4958
 
4970
4959
  // src/components/InitialCompositionLoader.tsx
4971
4960
  var useSelectAsset = () => {
4972
- const { setCanvasContent } = useContext16(Internals12.CompositionSetters);
4973
- const { setAssetFoldersExpanded } = useContext16(FolderContext);
4961
+ const { setCanvasContent } = useContext15(Internals12.CompositionSetters);
4962
+ const { setAssetFoldersExpanded } = useContext15(FolderContext);
4974
4963
  return useCallback24((asset) => {
4975
4964
  setCanvasContent({ type: "asset", asset });
4976
4965
  explorerSidebarTabs.current?.selectAssetsPanel();
@@ -4990,10 +4979,10 @@ var useSelectAsset = () => {
4990
4979
  }, [setAssetFoldersExpanded, setCanvasContent]);
4991
4980
  };
4992
4981
  var useSelectComposition = () => {
4993
- const { setCompositionFoldersExpanded } = useContext16(FolderContext);
4994
- const { setCanvasContent } = useContext16(Internals12.CompositionSetters);
4982
+ const { setCompositionFoldersExpanded } = useContext15(FolderContext);
4983
+ const { setCanvasContent } = useContext15(Internals12.CompositionSetters);
4995
4984
  const isMobileLayout = useMobileLayout();
4996
- const { setSidebarCollapsedState } = useContext16(SidebarContext);
4985
+ const { setSidebarCollapsedState } = useContext15(SidebarContext);
4997
4986
  return useCallback24((c, push) => {
4998
4987
  if (push) {
4999
4988
  pushUrl(`/${c.id}`);
@@ -5024,8 +5013,8 @@ var useSelectComposition = () => {
5024
5013
  ]);
5025
5014
  };
5026
5015
  var InitialCompositionLoader = () => {
5027
- const { compositions, canvasContent } = useContext16(Internals12.CompositionManager);
5028
- const { setCanvasContent } = useContext16(Internals12.CompositionSetters);
5016
+ const { compositions, canvasContent } = useContext15(Internals12.CompositionManager);
5017
+ const { setCanvasContent } = useContext15(Internals12.CompositionSetters);
5029
5018
  const selectComposition = useSelectComposition();
5030
5019
  const selectAsset = useSelectAsset();
5031
5020
  const staticFiles = useStaticFiles();
@@ -5100,10 +5089,10 @@ var InitialCompositionLoader = () => {
5100
5089
  };
5101
5090
 
5102
5091
  // src/components/MenuToolbar.tsx
5103
- import { useCallback as useCallback99, useMemo as useMemo105, useState as useState69 } from "react";
5092
+ import { useCallback as useCallback99, useMemo as useMemo105, useState as useState68 } from "react";
5104
5093
 
5105
5094
  // src/helpers/use-menu-structure.tsx
5106
- import { useContext as useContext23, useMemo as useMemo42 } from "react";
5095
+ import { useContext as useContext22, useMemo as useMemo42 } from "react";
5107
5096
  import { Internals as Internals19 } from "remotion";
5108
5097
  import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
5109
5098
 
@@ -5126,7 +5115,7 @@ import {
5126
5115
  useEffect as useEffect16,
5127
5116
  useImperativeHandle as useImperativeHandle6,
5128
5117
  useRef as useRef14,
5129
- useState as useState23
5118
+ useState as useState22
5130
5119
  } from "react";
5131
5120
  import { AbsoluteFill } from "remotion";
5132
5121
 
@@ -5173,7 +5162,7 @@ var ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex }) => {
5173
5162
  };
5174
5163
 
5175
5164
  // src/components/ModalHeader.tsx
5176
- import { useCallback as useCallback25, useContext as useContext17 } from "react";
5165
+ import { useCallback as useCallback25, useContext as useContext16 } from "react";
5177
5166
 
5178
5167
  // src/components/NewComposition/CancelButton.tsx
5179
5168
  import { jsx as jsx43 } from "react/jsx-runtime";
@@ -5224,7 +5213,7 @@ var icon = {
5224
5213
  width: 20
5225
5214
  };
5226
5215
  var ModalHeader = ({ title: title3, onClose }) => {
5227
- const { setSelectedModal } = useContext17(ModalsContext);
5216
+ const { setSelectedModal } = useContext16(ModalsContext);
5228
5217
  const onPress = useCallback25(() => {
5229
5218
  setSelectedModal(null);
5230
5219
  }, [setSelectedModal]);
@@ -5255,7 +5244,7 @@ var container13 = {
5255
5244
  };
5256
5245
  var askAiModalRef = createRef6();
5257
5246
  var AskAiModal = () => {
5258
- const [state, setState] = useState23("never-opened");
5247
+ const [state, setState] = useState22("never-opened");
5259
5248
  const iframe = useRef14(null);
5260
5249
  useImperativeHandle6(askAiModalRef, () => ({
5261
5250
  toggle: () => {
@@ -5322,7 +5311,7 @@ var AskAiModal = () => {
5322
5311
  };
5323
5312
 
5324
5313
  // src/components/SizeSelector.tsx
5325
- import { useContext as useContext21, useMemo as useMemo39 } from "react";
5314
+ import { useContext as useContext20, useMemo as useMemo39 } from "react";
5326
5315
  import { Internals as Internals16 } from "remotion";
5327
5316
 
5328
5317
  // src/icons/Checkmark.tsx
@@ -5367,7 +5356,7 @@ var ControlButton = (props) => {
5367
5356
 
5368
5357
  // src/components/NewComposition/ComboBox.tsx
5369
5358
  import { PlayerInternals as PlayerInternals5 } from "@remotion/player";
5370
- import { useCallback as useCallback27, useEffect as useEffect17, useMemo as useMemo29, useRef as useRef15, useState as useState24 } from "react";
5359
+ import { useCallback as useCallback27, useEffect as useEffect17, useMemo as useMemo29, useRef as useRef15, useState as useState23 } from "react";
5371
5360
  import ReactDOM4 from "react-dom";
5372
5361
  import { jsx as jsx48, jsxs as jsxs16, Fragment as Fragment6 } from "react/jsx-runtime";
5373
5362
  var container14 = {
@@ -5386,8 +5375,8 @@ var label2 = {
5386
5375
  textAlign: "left"
5387
5376
  };
5388
5377
  var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5389
- const [hovered, setIsHovered] = useState24(false);
5390
- const [opened, setOpened] = useState24(false);
5378
+ const [hovered, setIsHovered] = useState23(false);
5379
+ const [opened, setOpened] = useState23(false);
5391
5380
  const ref = useRef15(null);
5392
5381
  const { tabIndex, currentZIndex } = useZIndex();
5393
5382
  const size = PlayerInternals5.useElementSize(ref, {
@@ -5554,11 +5543,11 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5554
5543
 
5555
5544
  // src/components/Preview.tsx
5556
5545
  import { PlayerInternals as PlayerInternals7 } from "@remotion/player";
5557
- import { useContext as useContext20, useEffect as useEffect30, useMemo as useMemo38, useRef as useRef20 } from "react";
5546
+ import { useContext as useContext19, useEffect as useEffect30, useMemo as useMemo38, useRef as useRef20 } from "react";
5558
5547
  import { Internals as Internals15 } from "remotion";
5559
5548
 
5560
5549
  // src/error-overlay/remotion-overlay/ErrorLoader.tsx
5561
- import { useEffect as useEffect24, useState as useState29 } from "react";
5550
+ import { useEffect as useEffect24, useState as useState28 } from "react";
5562
5551
 
5563
5552
  // src/error-overlay/react-overlay/utils/parser.ts
5564
5553
  import { getLocationFromBuildError } from "@remotion/studio-shared";
@@ -5968,10 +5957,10 @@ var style3 = {
5968
5957
  };
5969
5958
 
5970
5959
  // src/error-overlay/remotion-overlay/CopyStackTrace.tsx
5971
- import { useCallback as useCallback29, useEffect as useEffect19, useMemo as useMemo31, useState as useState25 } from "react";
5960
+ import { useCallback as useCallback29, useEffect as useEffect19, useMemo as useMemo31, useState as useState24 } from "react";
5972
5961
  import { jsx as jsx52, jsxs as jsxs19 } from "react/jsx-runtime";
5973
5962
  var CopyStackTrace = ({ canHaveKeyboardShortcuts, errorText }) => {
5974
- const [copyState, setCopyState] = useState25("idle");
5963
+ const [copyState, setCopyState] = useState24("idle");
5975
5964
  const handleCopyToClipboard = useCallback29(() => {
5976
5965
  navigator.clipboard.writeText(errorText).then(() => {
5977
5966
  setCopyState("copied");
@@ -6063,7 +6052,7 @@ var DismissButton = () => {
6063
6052
 
6064
6053
  // src/error-overlay/remotion-overlay/ErrorMessage.tsx
6065
6054
  import { PlayerInternals as PlayerInternals6 } from "@remotion/player";
6066
- import { useCallback as useCallback31, useMemo as useMemo32, useRef as useRef16, useState as useState26 } from "react";
6055
+ import { useCallback as useCallback31, useMemo as useMemo32, useRef as useRef16, useState as useState25 } from "react";
6067
6056
 
6068
6057
  // src/error-overlay/remotion-overlay/carets.tsx
6069
6058
  import { jsx as jsx54 } from "react/jsx-runtime";
@@ -6136,7 +6125,7 @@ var moreButton = {
6136
6125
  color: "white"
6137
6126
  };
6138
6127
  var ErrorMessage = ({ message }) => {
6139
- const [expanded, setExpanded] = useState26(false);
6128
+ const [expanded, setExpanded] = useState25(false);
6140
6129
  const ref = useRef16(null);
6141
6130
  const size2 = PlayerInternals6.useElementSize(ref, {
6142
6131
  shouldApplyCssTransforms: false,
@@ -6458,7 +6447,7 @@ var HelpLink = ({ canHaveKeyboardShortcuts, link }) => {
6458
6447
  };
6459
6448
 
6460
6449
  // src/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.tsx
6461
- import { useEffect as useEffect21, useState as useState27 } from "react";
6450
+ import { useEffect as useEffect21, useState as useState26 } from "react";
6462
6451
  import { jsx as jsx59, jsxs as jsxs24 } from "react/jsx-runtime";
6463
6452
  var container16 = {
6464
6453
  borderRadius: 3,
@@ -6480,7 +6469,7 @@ var linkStyle = {
6480
6469
  color: "#58a6ff"
6481
6470
  };
6482
6471
  var MediaPlaybackErrorExplainer = ({ src }) => {
6483
- const [result, setResult] = useState27({ type: "loading" });
6472
+ const [result, setResult] = useState26({ type: "loading" });
6484
6473
  useEffect21(() => {
6485
6474
  fetch(src, { method: "HEAD" }).then((res) => {
6486
6475
  if (res.status === 404) {
@@ -6808,7 +6797,7 @@ var SearchGithubIssues = ({ message, canHaveKeyboardShortcuts }) => {
6808
6797
  };
6809
6798
 
6810
6799
  // src/error-overlay/remotion-overlay/StackFrame.tsx
6811
- import { useCallback as useCallback35, useState as useState28 } from "react";
6800
+ import { useCallback as useCallback35, useState as useState27 } from "react";
6812
6801
 
6813
6802
  // src/error-overlay/remotion-overlay/CodeFrame.tsx
6814
6803
  import { jsx as jsx63, jsxs as jsxs27 } from "react/jsx-runtime";
@@ -6906,7 +6895,7 @@ var fnName = {
6906
6895
  marginBottom: 3
6907
6896
  };
6908
6897
  var StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName }) => {
6909
- const [showCodeFrame, setShowCodeFrame] = useState28(() => !s.originalFileName?.includes("node_modules") && !s.originalFileName?.startsWith("webpack/") || isFirst);
6898
+ const [showCodeFrame, setShowCodeFrame] = useState27(() => !s.originalFileName?.includes("node_modules") && !s.originalFileName?.startsWith("webpack/") || isFirst);
6910
6899
  const toggleCodeFrame = useCallback35(() => {
6911
6900
  setShowCodeFrame((f) => !f);
6912
6901
  }, []);
@@ -7108,7 +7097,7 @@ var ErrorLoader = ({
7108
7097
  canHaveDismissButton,
7109
7098
  calculateMetadata
7110
7099
  }) => {
7111
- const [state, setState] = useState29({
7100
+ const [state, setState] = useState28({
7112
7101
  type: "loading"
7113
7102
  });
7114
7103
  useEffect24(() => {
@@ -7237,7 +7226,7 @@ var CheckerboardContext = createContext11({
7237
7226
  });
7238
7227
 
7239
7228
  // src/components/RenderPreview.tsx
7240
- import { useContext as useContext18, useEffect as useEffect29, useState as useState34 } from "react";
7229
+ import { useContext as useContext17, useEffect as useEffect29, useState as useState33 } from "react";
7241
7230
 
7242
7231
  // src/helpers/get-asset-metadata.ts
7243
7232
  import { getVideoMetadata } from "@remotion/media-utils";
@@ -7324,7 +7313,7 @@ var getAssetMetadata = async (canvasContent, addTime) => {
7324
7313
  import { formatBytes as formatBytes2 } from "@remotion/studio-shared";
7325
7314
 
7326
7315
  // src/components/JSONViewer.tsx
7327
- import { useEffect as useEffect27, useState as useState32 } from "react";
7316
+ import { useEffect as useEffect27, useState as useState31 } from "react";
7328
7317
 
7329
7318
  // src/components/NewComposition/RemTextarea.tsx
7330
7319
  import {
@@ -7333,7 +7322,7 @@ import {
7333
7322
  useImperativeHandle as useImperativeHandle8,
7334
7323
  useMemo as useMemo36,
7335
7324
  useRef as useRef19,
7336
- useState as useState31
7325
+ useState as useState30
7337
7326
  } from "react";
7338
7327
 
7339
7328
  // src/components/NewComposition/RemInput.tsx
@@ -7343,7 +7332,7 @@ import {
7343
7332
  useImperativeHandle as useImperativeHandle7,
7344
7333
  useMemo as useMemo35,
7345
7334
  useRef as useRef18,
7346
- useState as useState30
7335
+ useState as useState29
7347
7336
  } from "react";
7348
7337
  import { jsx as jsx67 } from "react/jsx-runtime";
7349
7338
  var INPUT_HORIZONTAL_PADDING = 8;
@@ -7369,8 +7358,8 @@ var getInputBorderColor = ({
7369
7358
  isHovered
7370
7359
  }) => status === "warning" ? WARNING_COLOR : status === "error" ? FAIL_COLOR : isFocused ? SELECTED_BACKGROUND : isHovered ? INPUT_BORDER_COLOR_HOVERED : INPUT_BORDER_COLOR_UNHOVERED;
7371
7360
  var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
7372
- const [isFocused, setIsFocused] = useState30(false);
7373
- const [isHovered, setIsHovered] = useState30(false);
7361
+ const [isFocused, setIsFocused] = useState29(false);
7362
+ const [isHovered, setIsHovered] = useState29(false);
7374
7363
  const inputRef = useRef18(null);
7375
7364
  const { tabIndex } = useZIndex();
7376
7365
  const style5 = useMemo35(() => {
@@ -7427,8 +7416,8 @@ var inputBaseStyle2 = {
7427
7416
  overflowX: "hidden"
7428
7417
  };
7429
7418
  var RemTextareaFRFunction = ({ status, ...props }, ref) => {
7430
- const [isFocused, setIsFocused] = useState31(false);
7431
- const [isHovered, setIsHovered] = useState31(false);
7419
+ const [isFocused, setIsFocused] = useState30(false);
7420
+ const [isHovered, setIsHovered] = useState30(false);
7432
7421
  const inputRef = useRef19(null);
7433
7422
  const { tabIndex } = useZIndex();
7434
7423
  useImperativeHandle8(ref, () => {
@@ -7520,7 +7509,7 @@ var jsonStyle = {
7520
7509
  flex: 1
7521
7510
  };
7522
7511
  var JSONViewer = ({ src }) => {
7523
- const [json, setJson] = useState32(null);
7512
+ const [json, setJson] = useState31(null);
7524
7513
  useEffect27(() => {
7525
7514
  fetch(src).then((res) => res.json()).then((jsonRes) => {
7526
7515
  setJson(JSON.stringify(jsonRes, null, 2));
@@ -7537,7 +7526,7 @@ var JSONViewer = ({ src }) => {
7537
7526
  };
7538
7527
 
7539
7528
  // src/components/TextViewer.tsx
7540
- import { useEffect as useEffect28, useState as useState33 } from "react";
7529
+ import { useEffect as useEffect28, useState as useState32 } from "react";
7541
7530
  import { jsxs as jsxs31 } from "react/jsx-runtime";
7542
7531
  var textStyle = {
7543
7532
  margin: 14,
@@ -7547,7 +7536,7 @@ var textStyle = {
7547
7536
  whiteSpace: "pre-wrap"
7548
7537
  };
7549
7538
  var TextViewer = ({ src }) => {
7550
- const [txt, setTxt] = useState33("");
7539
+ const [txt, setTxt] = useState32("");
7551
7540
  useEffect28(() => {
7552
7541
  fetch(src).then(async (res) => {
7553
7542
  if (!res.ok || !res.body) {
@@ -7648,9 +7637,9 @@ var errMsgStyle = {
7648
7637
  };
7649
7638
  var RenderPreview = ({ path, assetMetadata, getBlob }) => {
7650
7639
  const fileType = getPreviewFileType(path);
7651
- const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
7652
- const [blobUrl, setBlobUrl] = useState34(null);
7653
- const [blobError, setBlobError] = useState34(null);
7640
+ const connectionStatus = useContext17(StudioServerConnectionCtx).previewServerState.type;
7641
+ const [blobUrl, setBlobUrl] = useState33(null);
7642
+ const [blobError, setBlobError] = useState33(null);
7654
7643
  useEffect29(() => {
7655
7644
  if (!getBlob) {
7656
7645
  setBlobUrl(null);
@@ -7766,7 +7755,7 @@ var Spinner = ({ size: size2, duration }) => {
7766
7755
  };
7767
7756
 
7768
7757
  // src/components/StaticFilePreview.tsx
7769
- import { useContext as useContext19 } from "react";
7758
+ import { useContext as useContext18 } from "react";
7770
7759
  import { staticFile as staticFile3 } from "remotion";
7771
7760
  import { jsx as jsx73, jsxs as jsxs35 } from "react/jsx-runtime";
7772
7761
  var msgStyle3 = {
@@ -7784,7 +7773,7 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
7784
7773
  const fileType = getPreviewFileType(currentAsset);
7785
7774
  const staticFileSrc = staticFile3(currentAsset);
7786
7775
  const staticFiles = useStaticFiles();
7787
- const connectionStatus = useContext19(StudioServerConnectionCtx).previewServerState.type;
7776
+ const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
7788
7777
  const exists = staticFiles.find((file) => file.name === currentAsset);
7789
7778
  if (connectionStatus === "disconnected") {
7790
7779
  return /* @__PURE__ */ jsx73("div", {
@@ -7923,7 +7912,7 @@ var VideoPreview = ({
7923
7912
  });
7924
7913
  };
7925
7914
  var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
7926
- const { size: previewSize } = useContext20(Internals15.PreviewSizeContext);
7915
+ const { size: previewSize } = useContext19(Internals15.PreviewSizeContext);
7927
7916
  const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo38(() => {
7928
7917
  if (contentDimensions === "none") {
7929
7918
  return {
@@ -8002,7 +7991,7 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
8002
7991
  });
8003
7992
  };
8004
7993
  var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) => {
8005
- const { checkerboard } = useContext20(CheckerboardContext);
7994
+ const { checkerboard } = useContext19(CheckerboardContext);
8006
7995
  const style5 = useMemo38(() => {
8007
7996
  return containerStyle({
8008
7997
  checkerboard,
@@ -8094,8 +8083,8 @@ var getUniqueSizes = (size2) => {
8094
8083
  };
8095
8084
  var zoomableFileTypes = ["video", "image"];
8096
8085
  var SizeSelector = () => {
8097
- const { size: size2, setSize } = useContext21(Internals16.PreviewSizeContext);
8098
- const { canvasContent } = useContext21(Internals16.CompositionManager);
8086
+ const { size: size2, setSize } = useContext20(Internals16.PreviewSizeContext);
8087
+ const { canvasContent } = useContext20(Internals16.CompositionManager);
8099
8088
  const style5 = useMemo39(() => {
8100
8089
  return {
8101
8090
  padding: CONTROL_BUTTON_PADDING
@@ -8193,7 +8182,7 @@ var TimelineOutPointer = (props) => {
8193
8182
  };
8194
8183
 
8195
8184
  // src/state/in-out.ts
8196
- import { createContext as createContext12, useContext as useContext22, useMemo as useMemo40 } from "react";
8185
+ import { createContext as createContext12, useContext as useContext21, useMemo as useMemo40 } from "react";
8197
8186
  import { Internals as Internals17 } from "remotion";
8198
8187
  var TimelineInOutContext = createContext12({});
8199
8188
  var SetTimelineInOutContext = createContext12({
@@ -8203,7 +8192,7 @@ var SetTimelineInOutContext = createContext12({
8203
8192
  });
8204
8193
  var useTimelineInOutFramePosition = () => {
8205
8194
  const videoConfig = Internals17.useUnsafeVideoConfig();
8206
- const state = useContext22(TimelineInOutContext);
8195
+ const state = useContext21(TimelineInOutContext);
8207
8196
  const id = videoConfig?.id;
8208
8197
  const durationInFrames = videoConfig?.durationInFrames;
8209
8198
  return useMemo40(() => {
@@ -8220,7 +8209,7 @@ var useTimelineInOutFramePosition = () => {
8220
8209
  }, [durationInFrames, id, state]);
8221
8210
  };
8222
8211
  var useTimelineSetInOutFramePosition = () => {
8223
- const { setInAndOutFrames } = useContext22(SetTimelineInOutContext);
8212
+ const { setInAndOutFrames } = useContext21(SetTimelineInOutContext);
8224
8213
  return { setInAndOutFrames };
8225
8214
  };
8226
8215
 
@@ -8764,18 +8753,18 @@ var getFileMenu = ({
8764
8753
  };
8765
8754
  };
8766
8755
  var useMenuStructure = (closeMenu, readOnlyStudio) => {
8767
- const { setSelectedModal } = useContext23(ModalsContext);
8768
- const { checkerboard, setCheckerboard } = useContext23(CheckerboardContext);
8769
- const { editorZoomGestures, setEditorZoomGestures } = useContext23(EditorZoomGesturesContext);
8770
- const { editorShowRulers, setEditorShowRulers } = useContext23(EditorShowRulersContext);
8771
- const { editorShowGuides, setEditorShowGuides } = useContext23(EditorShowGuidesContext);
8772
- const { size: size2, setSize } = useContext23(Internals19.PreviewSizeContext);
8773
- const { type } = useContext23(StudioServerConnectionCtx).previewServerState;
8756
+ const { setSelectedModal } = useContext22(ModalsContext);
8757
+ const { checkerboard, setCheckerboard } = useContext22(CheckerboardContext);
8758
+ const { editorZoomGestures, setEditorZoomGestures } = useContext22(EditorZoomGesturesContext);
8759
+ const { editorShowRulers, setEditorShowRulers } = useContext22(EditorShowRulersContext);
8760
+ const { editorShowGuides, setEditorShowGuides } = useContext22(EditorShowGuidesContext);
8761
+ const { size: size2, setSize } = useContext22(Internals19.PreviewSizeContext);
8762
+ const { type } = useContext22(StudioServerConnectionCtx).previewServerState;
8774
8763
  const {
8775
8764
  setSidebarCollapsedState,
8776
8765
  sidebarCollapsedStateLeft,
8777
8766
  sidebarCollapsedStateRight
8778
- } = useContext23(SidebarContext);
8767
+ } = useContext22(SidebarContext);
8779
8768
  const sizes = useMemo42(() => getUniqueSizes(size2), [size2]);
8780
8769
  const isFullscreenSupported = checkFullscreenSupport();
8781
8770
  const { remotion_packageManager } = window;
@@ -9522,7 +9511,7 @@ var makeSearchResults = (actions, setSelectedModal) => {
9522
9511
 
9523
9512
  // src/components/Menu/MenuItem.tsx
9524
9513
  import { PlayerInternals as PlayerInternals9 } from "@remotion/player";
9525
- import { useCallback as useCallback37, useMemo as useMemo43, useRef as useRef21, useState as useState35 } from "react";
9514
+ import { useCallback as useCallback37, useMemo as useMemo43, useRef as useRef21, useState as useState34 } from "react";
9526
9515
  import ReactDOM5 from "react-dom";
9527
9516
  import { jsx as jsx81, jsxs as jsxs38, Fragment as Fragment13 } from "react/jsx-runtime";
9528
9517
  var container20 = {
@@ -9548,7 +9537,7 @@ var MenuItem = ({
9548
9537
  onNextMenu,
9549
9538
  menu
9550
9539
  }) => {
9551
- const [hovered, setHovered] = useState35(false);
9540
+ const [hovered, setHovered] = useState34(false);
9552
9541
  const ref = useRef21(null);
9553
9542
  const size2 = PlayerInternals9.useElementSize(ref, {
9554
9543
  triggerOnWindowResize: true,
@@ -9653,18 +9642,18 @@ var MenuItem = ({
9653
9642
  // src/components/MenuBuildIndicator.tsx
9654
9643
  import {
9655
9644
  useCallback as useCallback39,
9656
- useContext as useContext26,
9645
+ useContext as useContext25,
9657
9646
  useEffect as useEffect33,
9658
9647
  useMemo as useMemo45,
9659
- useState as useState38
9648
+ useState as useState37
9660
9649
  } from "react";
9661
9650
 
9662
9651
  // src/components/MenuCompositionName.tsx
9663
- import { useCallback as useCallback38, useContext as useContext25, useMemo as useMemo44, useState as useState37 } from "react";
9652
+ import { useCallback as useCallback38, useContext as useContext24, useMemo as useMemo44, useState as useState36 } from "react";
9664
9653
  import { Internals as Internals21 } from "remotion";
9665
9654
 
9666
9655
  // src/components/Timeline/use-resolved-stack.ts
9667
- import { useContext as useContext24, useEffect as useEffect32, useState as useState36 } from "react";
9656
+ import { useContext as useContext23, useEffect as useEffect32, useState as useState35 } from "react";
9668
9657
  import { Internals as Internals20 } from "remotion";
9669
9658
 
9670
9659
  // src/components/Timeline/TimelineStack/get-stack.ts
@@ -9757,8 +9746,8 @@ var resolvedCache = new Map;
9757
9746
  var inFlight = new Set;
9758
9747
  var subscribers = new Map;
9759
9748
  var useResolvedStack = (stack2) => {
9760
- const updateResolvedStackTrace = useContext24(Internals20.SequenceStackTracesUpdateContext);
9761
- const [value, setValue] = useState36(() => {
9749
+ const updateResolvedStackTrace = useContext23(Internals20.SequenceStackTracesUpdateContext);
9750
+ const [value, setValue] = useState35(() => {
9762
9751
  if (!stack2) {
9763
9752
  return null;
9764
9753
  }
@@ -9823,10 +9812,10 @@ var slashStyle = {
9823
9812
  top: 1
9824
9813
  };
9825
9814
  var MenuCompositionName = () => {
9826
- const { canvasContent, compositions } = useContext25(Internals21.CompositionManager);
9827
- const connectionStatus = useContext25(StudioServerConnectionCtx).previewServerState.type;
9828
- const [opening, setOpening] = useState37(false);
9829
- const [hovered, setHovered] = useState37(false);
9815
+ const { canvasContent, compositions } = useContext24(Internals21.CompositionManager);
9816
+ const connectionStatus = useContext24(StudioServerConnectionCtx).previewServerState.type;
9817
+ const [opening, setOpening] = useState36(false);
9818
+ const [hovered, setHovered] = useState36(false);
9830
9819
  const composition = useMemo44(() => {
9831
9820
  if (canvasContent === null || canvasContent.type !== "composition") {
9832
9821
  return null;
@@ -9904,9 +9893,9 @@ var projectNameLinkHovered = {
9904
9893
  textDecoration: "underline"
9905
9894
  };
9906
9895
  var MenuBuildIndicator = () => {
9907
- const [isBuilding, setIsBuilding] = useState38(false);
9908
- const [projectNameHovered, setProjectNameHovered] = useState38(false);
9909
- const ctx = useContext26(StudioServerConnectionCtx).previewServerState;
9896
+ const [isBuilding, setIsBuilding] = useState37(false);
9897
+ const [projectNameHovered, setProjectNameHovered] = useState37(false);
9898
+ const ctx = useContext25(StudioServerConnectionCtx).previewServerState;
9910
9899
  const showEditorLink = window.remotion_editorName && ctx.type === "connected";
9911
9900
  const showGitLink = !showEditorLink && Boolean(window.remotion_gitSource);
9912
9901
  const handleProjectNameClick = useCallback39(async () => {
@@ -9984,16 +9973,16 @@ var MenuBuildIndicator = () => {
9984
9973
  };
9985
9974
 
9986
9975
  // src/components/SidebarCollapserControls.tsx
9987
- import { useCallback as useCallback96, useContext as useContext65, useEffect as useEffect62 } from "react";
9976
+ import { useCallback as useCallback96, useContext as useContext64, useEffect as useEffect62 } from "react";
9988
9977
 
9989
9978
  // src/components/TopPanel.tsx
9990
- import React123, { useCallback as useCallback95, useContext as useContext64, useEffect as useEffect61, useMemo as useMemo103 } from "react";
9979
+ import React123, { useCallback as useCallback95, useContext as useContext63, useEffect as useEffect61, useMemo as useMemo103 } from "react";
9991
9980
  import { Internals as Internals45 } from "remotion";
9992
9981
 
9993
9982
  // src/helpers/use-breakpoint.ts
9994
- import { useEffect as useEffect34, useRef as useRef22, useState as useState39 } from "react";
9983
+ import { useEffect as useEffect34, useRef as useRef22, useState as useState38 } from "react";
9995
9984
  function useBreakpoint(breakpoint2) {
9996
- const [compactUI, setCompactUI] = useState39(window.innerWidth < breakpoint2);
9985
+ const [compactUI, setCompactUI] = useState38(window.innerWidth < breakpoint2);
9997
9986
  const compactUIRef = useRef22(compactUI);
9998
9987
  useEffect34(() => {
9999
9988
  function handleResize() {
@@ -10011,21 +10000,21 @@ function useBreakpoint(breakpoint2) {
10011
10000
  }
10012
10001
 
10013
10002
  // src/components/CanvasIfSizeIsAvailable.tsx
10014
- import { useContext as useContext35, useMemo as useMemo53 } from "react";
10003
+ import { useContext as useContext34, useMemo as useMemo53 } from "react";
10015
10004
  import { Internals as Internals30 } from "remotion";
10016
10005
 
10017
10006
  // src/components/CanvasOrLoading.tsx
10018
- import { useContext as useContext34, useEffect as useEffect39 } from "react";
10007
+ import { useContext as useContext33, useEffect as useEffect39 } from "react";
10019
10008
  import { Internals as Internals29 } from "remotion";
10020
10009
 
10021
10010
  // src/components/Canvas.tsx
10022
10011
  import {
10023
10012
  useCallback as useCallback43,
10024
- useContext as useContext33,
10013
+ useContext as useContext32,
10025
10014
  useEffect as useEffect37,
10026
10015
  useMemo as useMemo52,
10027
10016
  useRef as useRef25,
10028
- useState as useState41
10017
+ useState as useState40
10029
10018
  } from "react";
10030
10019
  import { Internals as Internals27, watchStaticFile } from "remotion";
10031
10020
 
@@ -10160,19 +10149,19 @@ var applyZoomAroundFocalPoint = ({
10160
10149
  };
10161
10150
 
10162
10151
  // src/components/EditorGuides/index.tsx
10163
- import { useContext as useContext29, useMemo as useMemo49 } from "react";
10152
+ import { useContext as useContext28, useMemo as useMemo49 } from "react";
10164
10153
  import { Internals as Internals24 } from "remotion";
10165
10154
 
10166
10155
  // src/helpers/use-studio-canvas-dimensions.ts
10167
10156
  import { PlayerInternals as PlayerInternals10 } from "@remotion/player";
10168
- import { useContext as useContext27, useMemo as useMemo46 } from "react";
10157
+ import { useContext as useContext26, useMemo as useMemo46 } from "react";
10169
10158
  import { Internals as Internals23 } from "remotion";
10170
10159
  var useStudioCanvasDimensions = ({
10171
10160
  canvasSize,
10172
10161
  contentDimensions,
10173
10162
  assetMetadata
10174
10163
  }) => {
10175
- const { size: previewSize } = useContext27(Internals23.PreviewSizeContext);
10164
+ const { size: previewSize } = useContext26(Internals23.PreviewSizeContext);
10176
10165
  const { centerX, centerY, scale } = useMemo46(() => {
10177
10166
  if (contentDimensions === "none" || contentDimensions === null || assetMetadata && (assetMetadata.type === "not-found" || assetMetadata.type === "metadata-error") || !canvasSize) {
10178
10167
  return {
@@ -10218,7 +10207,7 @@ var useStudioCanvasDimensions = ({
10218
10207
  };
10219
10208
 
10220
10209
  // src/components/EditorGuides/Guide.tsx
10221
- import { memo, useCallback as useCallback40, useContext as useContext28, useMemo as useMemo48 } from "react";
10210
+ import { memo, useCallback as useCallback40, useContext as useContext27, useMemo as useMemo48 } from "react";
10222
10211
  import { NoReactInternals as NoReactInternals6 } from "remotion/no-react";
10223
10212
 
10224
10213
  // src/components/ForceSpecificCursor.tsx
@@ -10266,7 +10255,7 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
10266
10255
  selectedGuideId,
10267
10256
  setHoveredGuideId,
10268
10257
  hoveredGuideId
10269
- } = useContext28(EditorShowGuidesContext);
10258
+ } = useContext27(EditorShowGuidesContext);
10270
10259
  const onPointerEnter = useCallback40(() => {
10271
10260
  setHoveredGuideId(() => guide.id);
10272
10261
  }, [guide.id, setHoveredGuideId]);
@@ -10358,11 +10347,11 @@ var EditorGuides = ({ canvasSize, contentDimensions, assetMetadata }) => {
10358
10347
  contentDimensions,
10359
10348
  assetMetadata
10360
10349
  });
10361
- const { canvasContent } = useContext29(Internals24.CompositionManager);
10350
+ const { canvasContent } = useContext28(Internals24.CompositionManager);
10362
10351
  if (canvasContent === null || canvasContent.type !== "composition") {
10363
10352
  throw new Error("Expected to be in a composition");
10364
10353
  }
10365
- const { guidesList } = useContext29(EditorShowGuidesContext);
10354
+ const { guidesList } = useContext28(EditorShowGuidesContext);
10366
10355
  const guidesForThisComposition = useMemo49(() => {
10367
10356
  return guidesList.filter((guide) => {
10368
10357
  return guide.compositionId === canvasContent.compositionId;
@@ -10383,7 +10372,7 @@ var EditorGuides_default = EditorGuides;
10383
10372
  // src/components/EditorRuler/index.tsx
10384
10373
  import {
10385
10374
  useCallback as useCallback42,
10386
- useContext as useContext31,
10375
+ useContext as useContext30,
10387
10376
  useEffect as useEffect36,
10388
10377
  useMemo as useMemo51,
10389
10378
  useRef as useRef24
@@ -10598,11 +10587,11 @@ var getRulerScaleRange = ({
10598
10587
  // src/components/EditorRuler/Ruler.tsx
10599
10588
  import {
10600
10589
  useCallback as useCallback41,
10601
- useContext as useContext30,
10590
+ useContext as useContext29,
10602
10591
  useEffect as useEffect35,
10603
10592
  useMemo as useMemo50,
10604
10593
  useRef as useRef23,
10605
- useState as useState40
10594
+ useState as useState39
10606
10595
  } from "react";
10607
10596
  import { Internals as Internals25 } from "remotion";
10608
10597
  import { jsx as jsx87 } from "react/jsx-runtime";
@@ -10628,12 +10617,12 @@ var Ruler = ({
10628
10617
  setSelectedGuideId,
10629
10618
  guidesList,
10630
10619
  setEditorShowGuides
10631
- } = useContext30(EditorShowGuidesContext);
10620
+ } = useContext29(EditorShowGuidesContext);
10632
10621
  const unsafeVideoConfig = Internals25.useUnsafeVideoConfig();
10633
10622
  if (!unsafeVideoConfig) {
10634
10623
  throw new Error("Video config not set");
10635
10624
  }
10636
- const [cursor, setCursor] = useState40(isVerticalRuler ? "ew-resize" : "ns-resize");
10625
+ const [cursor, setCursor] = useState39(isVerticalRuler ? "ew-resize" : "ns-resize");
10637
10626
  const selectedOrHoveredGuide = useMemo50(() => {
10638
10627
  return guidesList.find((guide) => guide.id === selectedGuideId) ?? guidesList.find((guide) => guide.id === hoveredGuideId) ?? null;
10639
10628
  }, [guidesList, hoveredGuideId, selectedGuideId]);
@@ -10753,7 +10742,7 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
10753
10742
  setGuidesList,
10754
10743
  selectedGuideId,
10755
10744
  setSelectedGuideId
10756
- } = useContext31(EditorShowGuidesContext);
10745
+ } = useContext30(EditorShowGuidesContext);
10757
10746
  const rulerMarkingGaps = useMemo51(() => {
10758
10747
  const minimumGap = MINIMUM_RULER_MARKING_GAP_PX;
10759
10748
  const predefinedGap = PREDEFINED_RULER_SCALE_GAPS.find((gap) => gap * scale > minimumGap);
@@ -10909,11 +10898,11 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
10909
10898
  };
10910
10899
 
10911
10900
  // src/components/EditorRuler/use-is-ruler-visible.ts
10912
- import { useContext as useContext32 } from "react";
10901
+ import { useContext as useContext31 } from "react";
10913
10902
  import { Internals as Internals26 } from "remotion";
10914
10903
  var useIsRulerVisible = () => {
10915
- const { canvasContent } = useContext32(Internals26.CompositionManager);
10916
- const { editorShowRulers } = useContext32(EditorShowRulersContext);
10904
+ const { canvasContent } = useContext31(Internals26.CompositionManager);
10905
+ const { editorShowRulers } = useContext31(EditorShowRulersContext);
10917
10906
  return editorShowRulers && canvasContent && canvasContent.type === "composition";
10918
10907
  };
10919
10908
 
@@ -10943,8 +10932,8 @@ var resetZoom = {
10943
10932
  };
10944
10933
  var ZOOM_PX_FACTOR = 0.003;
10945
10934
  var Canvas = ({ canvasContent, size: size2 }) => {
10946
- const { setSize, size: previewSize } = useContext33(Internals27.PreviewSizeContext);
10947
- const { editorZoomGestures } = useContext33(EditorZoomGesturesContext);
10935
+ const { setSize, size: previewSize } = useContext32(Internals27.PreviewSizeContext);
10936
+ const { editorZoomGestures } = useContext32(EditorZoomGesturesContext);
10948
10937
  const previewSnapshotRef = useRef25({
10949
10938
  previewSize,
10950
10939
  canvasSize: size2,
@@ -10956,8 +10945,8 @@ var Canvas = ({ canvasContent, size: size2 }) => {
10956
10945
  const keybindings = useKeybinding();
10957
10946
  const config = Internals27.useUnsafeVideoConfig();
10958
10947
  const areRulersVisible = useIsRulerVisible();
10959
- const { editorShowGuides } = useContext33(EditorShowGuidesContext);
10960
- const [assetResolution, setAssetResolution] = useState41(null);
10948
+ const { editorShowGuides } = useContext32(EditorShowGuidesContext);
10949
+ const [assetResolution, setAssetResolution] = useState40(null);
10961
10950
  const contentDimensions = useMemo52(() => {
10962
10951
  if ((canvasContent.type === "asset" || canvasContent.type === "output" || canvasContent.type === "output-blob") && assetResolution && assetResolution.type === "found") {
10963
10952
  return assetResolution.dimensions;
@@ -11455,9 +11444,9 @@ var container23 = {
11455
11444
  };
11456
11445
  var CanvasOrLoading = ({ size: size2 }) => {
11457
11446
  const resolved = Internals29.useResolvedVideoConfig(null);
11458
- const { setZoom } = useContext34(TimelineZoomCtx);
11459
- const { canvasContent } = useContext34(Internals29.CompositionManager);
11460
- const { error: renderError } = useContext34(RenderErrorContext);
11447
+ const { setZoom } = useContext33(TimelineZoomCtx);
11448
+ const { canvasContent } = useContext33(Internals29.CompositionManager);
11449
+ const { error: renderError } = useContext33(RenderErrorContext);
11461
11450
  useEffect39(() => {
11462
11451
  if (resolved?.type !== "success" && resolved?.type !== "success-and-refreshing") {
11463
11452
  return;
@@ -11555,7 +11544,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
11555
11544
  import { jsx as jsx94 } from "react/jsx-runtime";
11556
11545
  var CanvasIfSizeIsAvailable = () => {
11557
11546
  const rulersAreVisible = useIsRulerVisible();
11558
- const context = useContext35(Internals30.CurrentScaleContext);
11547
+ const context = useContext34(Internals30.CurrentScaleContext);
11559
11548
  const sizeWithRulersApplied = useMemo53(() => {
11560
11549
  const size2 = context && context.type === "canvas-size" ? context.canvasSize : null;
11561
11550
  if (!rulersAreVisible) {
@@ -11579,7 +11568,7 @@ var CanvasIfSizeIsAvailable = () => {
11579
11568
  };
11580
11569
 
11581
11570
  // src/components/CurrentCompositionSideEffects.tsx
11582
- import { useCallback as useCallback44, useContext as useContext36, useEffect as useEffect40 } from "react";
11571
+ import { useCallback as useCallback44, useContext as useContext35, useEffect as useEffect40 } from "react";
11583
11572
  import { Internals as Internals31 } from "remotion";
11584
11573
 
11585
11574
  // src/helpers/document-title.ts
@@ -11634,8 +11623,8 @@ var getProgressInBrackets = (selectedCompositionId, jobs) => {
11634
11623
 
11635
11624
  // src/components/CurrentCompositionSideEffects.tsx
11636
11625
  var TitleUpdater = () => {
11637
- const renderQueue = useContext36(RenderQueueContext);
11638
- const { canvasContent } = useContext36(Internals31.CompositionManager);
11626
+ const renderQueue = useContext35(RenderQueueContext);
11627
+ const { canvasContent } = useContext35(Internals31.CompositionManager);
11639
11628
  const { jobs } = renderQueue;
11640
11629
  useEffect40(() => {
11641
11630
  if (!canvasContent) {
@@ -11664,7 +11653,7 @@ var TitleUpdater = () => {
11664
11653
  var CurrentCompositionKeybindings = ({ readOnlyStudio }) => {
11665
11654
  const keybindings = useKeybinding();
11666
11655
  const video = Internals31.useVideo();
11667
- const { type } = useContext36(StudioServerConnectionCtx).previewServerState;
11656
+ const { type } = useContext35(StudioServerConnectionCtx).previewServerState;
11668
11657
  const openRenderModal = useCallback44(() => {
11669
11658
  if (!video) {
11670
11659
  return;
@@ -11739,18 +11728,18 @@ function MobilePanel({
11739
11728
  // src/components/ObserveDefaultPropsContext.tsx
11740
11729
  import React63, {
11741
11730
  useCallback as useCallback45,
11742
- useContext as useContext37,
11731
+ useContext as useContext36,
11743
11732
  useEffect as useEffect41,
11744
11733
  useMemo as useMemo54,
11745
- useState as useState42
11734
+ useState as useState41
11746
11735
  } from "react";
11747
11736
  import { Internals as Internals32 } from "remotion";
11748
11737
  import { jsx as jsx96 } from "react/jsx-runtime";
11749
11738
  var ObserveDefaultPropsContext = React63.createContext(null);
11750
11739
  var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
11751
- const { previewServerState, subscribeToEvent } = useContext37(StudioServerConnectionCtx);
11752
- const { updateProps } = useContext37(Internals32.EditorPropsContext);
11753
- const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState42({});
11740
+ const { previewServerState, subscribeToEvent } = useContext36(StudioServerConnectionCtx);
11741
+ const { updateProps } = useContext36(Internals32.EditorPropsContext);
11742
+ const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState41({});
11754
11743
  const canSaveDefaultProps = useMemo54(() => {
11755
11744
  if (compositionId === null) {
11756
11745
  return null;
@@ -11824,10 +11813,10 @@ var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
11824
11813
  import {
11825
11814
  createRef as createRef9,
11826
11815
  useCallback as useCallback86,
11827
- useContext as useContext55,
11816
+ useContext as useContext54,
11828
11817
  useImperativeHandle as useImperativeHandle12,
11829
11818
  useMemo as useMemo97,
11830
- useState as useState60
11819
+ useState as useState59
11831
11820
  } from "react";
11832
11821
  import { Internals as Internals36 } from "remotion";
11833
11822
 
@@ -11840,7 +11829,7 @@ import {
11840
11829
  useImperativeHandle as useImperativeHandle10,
11841
11830
  useMemo as useMemo56,
11842
11831
  useRef as useRef26,
11843
- useState as useState44
11832
+ useState as useState43
11844
11833
  } from "react";
11845
11834
  import { useRemotionEnvironment as useRemotionEnvironment2 } from "remotion";
11846
11835
 
@@ -11862,10 +11851,10 @@ function getZodSchemaFromPrimitive(value, z) {
11862
11851
  // src/components/get-zod-if-possible.tsx
11863
11852
  import {
11864
11853
  createContext as createContext17,
11865
- useContext as useContext38,
11854
+ useContext as useContext37,
11866
11855
  useEffect as useEffect42,
11867
11856
  useMemo as useMemo55,
11868
- useState as useState43
11857
+ useState as useState42
11869
11858
  } from "react";
11870
11859
  import { jsx as jsx97 } from "react/jsx-runtime";
11871
11860
  async function getZodIfPossible() {
@@ -11893,18 +11882,18 @@ var getZTypesIfPossible = async () => {
11893
11882
  }
11894
11883
  };
11895
11884
  function useZodIfPossible() {
11896
- const context = useContext38(ZodContext);
11885
+ const context = useContext37(ZodContext);
11897
11886
  return context?.zod ?? null;
11898
11887
  }
11899
11888
  var useZodTypesIfPossible = () => {
11900
- const context = useContext38(ZodContext);
11889
+ const context = useContext37(ZodContext);
11901
11890
  return context?.zodTypes ?? null;
11902
11891
  };
11903
11892
  var ZodContext = createContext17(null);
11904
11893
  var ZodProvider = ({ children }) => {
11905
- const [zod, setZod] = useState43(null);
11906
- const [zodV3, setZodV3] = useState43(null);
11907
- const [zodTypes, setZodTypes] = useState43(null);
11894
+ const [zod, setZod] = useState42(null);
11895
+ const [zodV3, setZodV3] = useState42(null);
11896
+ const [zodTypes, setZodTypes] = useState42(null);
11908
11897
  useEffect42(() => {
11909
11898
  getZodIfPossible().then((z) => setZod(z));
11910
11899
  }, []);
@@ -11980,7 +11969,7 @@ var SetVisualControlsContext = createContext18({
11980
11969
  });
11981
11970
  var VisualControlsProvider = ({ children }) => {
11982
11971
  const imperativeHandles = useRef26({});
11983
- const [handles, setHandles] = useState44({});
11972
+ const [handles, setHandles] = useState43({});
11984
11973
  const state = useMemo56(() => {
11985
11974
  return {
11986
11975
  handles
@@ -12082,10 +12071,10 @@ var VisualControlsProvider = ({ children }) => {
12082
12071
  };
12083
12072
 
12084
12073
  // src/components/DefaultPropsEditor.tsx
12085
- import { useContext as useContext42 } from "react";
12074
+ import { useContext as useContext41 } from "react";
12086
12075
 
12087
12076
  // src/components/RenderModal/DataEditor.tsx
12088
- import React94, { useCallback as useCallback71, useContext as useContext41, useMemo as useMemo86, useState as useState55 } from "react";
12077
+ import React94, { useCallback as useCallback71, useContext as useContext40, useMemo as useMemo86, useState as useState54 } from "react";
12089
12078
  import { getInputProps } from "remotion";
12090
12079
  import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
12091
12080
 
@@ -12143,7 +12132,7 @@ var ValidationMessage = ({ message, align, type }) => {
12143
12132
  };
12144
12133
 
12145
12134
  // src/components/SegmentedControl.tsx
12146
- import { useCallback as useCallback47, useMemo as useMemo58, useState as useState45 } from "react";
12135
+ import { useCallback as useCallback47, useMemo as useMemo58, useState as useState44 } from "react";
12147
12136
  import { jsx as jsx100 } from "react/jsx-runtime";
12148
12137
  var container26 = {
12149
12138
  display: "flex",
@@ -12192,7 +12181,7 @@ var SegmentedControl = ({ items, needsWrapping }) => {
12192
12181
  });
12193
12182
  };
12194
12183
  var Item = ({ selected, onClick, children }) => {
12195
- const [hovered, setHovered] = useState45(false);
12184
+ const [hovered, setHovered] = useState44(false);
12196
12185
  const { tabIndex } = useZIndex();
12197
12186
  const onPointerEnter = useCallback47(() => {
12198
12187
  setHovered(true);
@@ -12287,7 +12276,7 @@ var getRenderModalWarnings = ({
12287
12276
 
12288
12277
  // src/components/RenderModal/RenderModalJSONPropsEditor.tsx
12289
12278
  import React69, { useCallback as useCallback48, useEffect as useEffect44, useMemo as useMemo60 } from "react";
12290
- import { useContext as useContext39 } from "react";
12279
+ import { useContext as useContext38 } from "react";
12291
12280
  import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
12292
12281
 
12293
12282
  // src/components/RenderModal/SchemaEditor/deep-equal.ts
@@ -12615,7 +12604,7 @@ var RenderModalJSONPropsEditor = ({
12615
12604
  if (serializedJSON === null) {
12616
12605
  throw new Error("expecting serializedJSON to be defined");
12617
12606
  }
12618
- const { subscribeToEvent } = useContext39(StudioServerConnectionCtx);
12607
+ const { subscribeToEvent } = useContext38(StudioServerConnectionCtx);
12619
12608
  const [localValue, setLocalValue] = React69.useState(() => {
12620
12609
  return parseJSON(serializedJSON.serializedString, schema);
12621
12610
  });
@@ -13089,12 +13078,12 @@ var createZodValues = (schema, zodRuntime, zodTypes) => {
13089
13078
  };
13090
13079
 
13091
13080
  // src/components/RenderModal/SchemaEditor/Fieldset.tsx
13092
- import { createContext as createContext19, useContext as useContext40, useMemo as useMemo61 } from "react";
13081
+ import { createContext as createContext19, useContext as useContext39, useMemo as useMemo61 } from "react";
13093
13082
  import { jsx as jsx104 } from "react/jsx-runtime";
13094
13083
  var SCHEMA_EDITOR_FIELDSET_PADDING = 10;
13095
13084
  var AlreadyPaddedRightContext = createContext19(false);
13096
13085
  var Fieldset = ({ children, shouldPad }) => {
13097
- const alreadyPadded = useContext40(AlreadyPaddedRightContext);
13086
+ const alreadyPadded = useContext39(AlreadyPaddedRightContext);
13098
13087
  const style8 = useMemo61(() => {
13099
13088
  if (shouldPad) {
13100
13089
  return {
@@ -13119,7 +13108,7 @@ var Fieldset = ({ children, shouldPad }) => {
13119
13108
  };
13120
13109
 
13121
13110
  // src/components/RenderModal/SchemaEditor/SchemaLabel.tsx
13122
- import { useCallback as useCallback50, useMemo as useMemo62, useState as useState46 } from "react";
13111
+ import { useCallback as useCallback50, useMemo as useMemo62, useState as useState45 } from "react";
13123
13112
 
13124
13113
  // src/components/RenderModal/InlineRemoveButton.tsx
13125
13114
  import { useCallback as useCallback49 } from "react";
@@ -13171,7 +13160,7 @@ var compactStyles = {
13171
13160
  flex: 1
13172
13161
  };
13173
13162
  var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick }) => {
13174
- const [clickableButtonHovered, setClickableButtonHovered] = useState46(false);
13163
+ const [clickableButtonHovered, setClickableButtonHovered] = useState45(false);
13175
13164
  const labelStyle4 = useMemo62(() => {
13176
13165
  return {
13177
13166
  fontFamily: "monospace",
@@ -13217,7 +13206,7 @@ var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick })
13217
13206
 
13218
13207
  // src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsx
13219
13208
  import { useCallback as useCallback69 } from "react";
13220
- import React92, { useMemo as useMemo83, useState as useState54 } from "react";
13209
+ import React92, { useMemo as useMemo83, useState as useState53 } from "react";
13221
13210
 
13222
13211
  // src/components/RenderModal/layout.ts
13223
13212
  var optionRow = {
@@ -13263,7 +13252,7 @@ var fieldsetLabel = {
13263
13252
  };
13264
13253
 
13265
13254
  // src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx
13266
- import { useCallback as useCallback51, useMemo as useMemo63, useState as useState47 } from "react";
13255
+ import { useCallback as useCallback51, useMemo as useMemo63, useState as useState46 } from "react";
13267
13256
 
13268
13257
  // src/icons/plus.tsx
13269
13258
  import { jsx as jsx107 } from "react/jsx-runtime";
@@ -13298,8 +13287,8 @@ var arraySeparationLine = {
13298
13287
  flexBasis: "100%"
13299
13288
  };
13300
13289
  var SchemaArrayItemSeparationLine = ({ onChange, index, schema, isLast, showAddButton }) => {
13301
- const [outerHovered, setOuterHovered] = useState47(false);
13302
- const [innerHovered, setInnerHovered] = useState47(false);
13290
+ const [outerHovered, setOuterHovered] = useState46(false);
13291
+ const [innerHovered, setInnerHovered] = useState46(false);
13303
13292
  const zodTypes = useZodTypesIfPossible();
13304
13293
  const z = useZodIfPossible();
13305
13294
  if (!z) {
@@ -13439,7 +13428,7 @@ var SchemaVerticalGuide = ({ isRoot, children }) => {
13439
13428
  };
13440
13429
 
13441
13430
  // src/components/RenderModal/SchemaEditor/ZodArrayEditor.tsx
13442
- import React77, { useCallback as useCallback54, useMemo as useMemo68, useState as useState49 } from "react";
13431
+ import React77, { useCallback as useCallback54, useMemo as useMemo68, useState as useState48 } from "react";
13443
13432
 
13444
13433
  // src/components/RenderModal/SchemaEditor/ZodArrayItemEditor.tsx
13445
13434
  import { useCallback as useCallback52, useMemo as useMemo65 } from "react";
@@ -13476,7 +13465,7 @@ var ZodArrayItemEditor = ({ elementSchema, onChange, jsonPath, index, value, may
13476
13465
 
13477
13466
  // src/components/RenderModal/InfoBubble.tsx
13478
13467
  import { PlayerInternals as PlayerInternals11 } from "@remotion/player";
13479
- import { useCallback as useCallback53, useEffect as useEffect45, useMemo as useMemo67, useRef as useRef27, useState as useState48 } from "react";
13468
+ import { useCallback as useCallback53, useEffect as useEffect45, useMemo as useMemo67, useRef as useRef27, useState as useState47 } from "react";
13480
13469
  import ReactDOM7 from "react-dom";
13481
13470
 
13482
13471
  // src/components/RenderModal/InfoTooltip.tsx
@@ -13559,8 +13548,8 @@ var container27 = {
13559
13548
  verticalAlign: "text-bottom"
13560
13549
  };
13561
13550
  var InfoBubble = ({ title: title4, children }) => {
13562
- const [hovered, setIsHovered] = useState48(false);
13563
- const [opened, setOpened] = useState48(false);
13551
+ const [hovered, setIsHovered] = useState47(false);
13552
+ const [opened, setOpened] = useState47(false);
13564
13553
  const ref2 = useRef27(null);
13565
13554
  const { tabIndex, currentZIndex } = useZIndex();
13566
13555
  const size2 = PlayerInternals11.useElementSize(ref2, {
@@ -13747,7 +13736,7 @@ var ZodArrayEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
13747
13736
  const onChange = useCallback54((updater, { shouldSave }) => {
13748
13737
  setValue(updater, { shouldSave });
13749
13738
  }, [setValue]);
13750
- const [expanded, setExpanded] = useState49(true);
13739
+ const [expanded, setExpanded] = useState48(true);
13751
13740
  const arrayElement = getArrayElement(schema);
13752
13741
  const suffix2 = useMemo68(() => {
13753
13742
  return expanded ? " [" : " [...] ";
@@ -13932,7 +13921,7 @@ var colorWithNewOpacity = (color, opacity, zodTypes) => {
13932
13921
  };
13933
13922
 
13934
13923
  // src/components/NewComposition/InputDragger.tsx
13935
- import React80, { useCallback as useCallback56, useEffect as useEffect47, useMemo as useMemo70, useRef as useRef29, useState as useState50 } from "react";
13924
+ import React80, { useCallback as useCallback56, useEffect as useEffect47, useMemo as useMemo70, useRef as useRef29, useState as useState49 } from "react";
13936
13925
  import { interpolate as interpolate2 } from "remotion";
13937
13926
  import { jsx as jsx117 } from "react/jsx-runtime";
13938
13927
  var isInt = (num) => {
@@ -13952,8 +13941,8 @@ var InputDraggerForwardRefFn = ({
13952
13941
  small,
13953
13942
  ...props
13954
13943
  }, ref2) => {
13955
- const [inputFallback, setInputFallback] = useState50(false);
13956
- const [dragging, setDragging] = useState50(false);
13944
+ const [inputFallback, setInputFallback] = useState49(false);
13945
+ const [dragging, setDragging] = useState49(false);
13957
13946
  const fallbackRef = useRef29(null);
13958
13947
  const pointerDownRef = useRef29(false);
13959
13948
  const style8 = useMemo70(() => {
@@ -14123,7 +14112,7 @@ import {
14123
14112
  useImperativeHandle as useImperativeHandle11,
14124
14113
  useMemo as useMemo71,
14125
14114
  useRef as useRef30,
14126
- useState as useState51
14115
+ useState as useState50
14127
14116
  } from "react";
14128
14117
  import { jsx as jsx118 } from "react/jsx-runtime";
14129
14118
  var inputBaseStyle3 = {
@@ -14132,8 +14121,8 @@ var inputBaseStyle3 = {
14132
14121
  borderWidth: 1
14133
14122
  };
14134
14123
  var RemInputTypeColorForwardRef = ({ status, ...props }, ref2) => {
14135
- const [isFocused, setIsFocused] = useState51(false);
14136
- const [isHovered, setIsHovered] = useState51(false);
14124
+ const [isFocused, setIsFocused] = useState50(false);
14125
+ const [isHovered, setIsHovered] = useState50(false);
14137
14126
  const inputRef = useRef30(null);
14138
14127
  const { tabIndex } = useZIndex();
14139
14128
  const style8 = useMemo71(() => {
@@ -14484,7 +14473,7 @@ var ZodEnumEditor = ({ schema, jsonPath, setValue, value, onRemove }) => {
14484
14473
  };
14485
14474
 
14486
14475
  // src/components/RenderModal/SchemaEditor/ZodMatrixEditor.tsx
14487
- import React86, { useMemo as useMemo76, useState as useState52 } from "react";
14476
+ import React86, { useMemo as useMemo76, useState as useState51 } from "react";
14488
14477
  import { useCallback as useCallback61 } from "react";
14489
14478
  import { jsx as jsx124, jsxs as jsxs63 } from "react/jsx-runtime";
14490
14479
  var rowStyle = {
@@ -14497,7 +14486,7 @@ var ZodMatrixEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad })
14497
14486
  setValue(updater, { shouldSave });
14498
14487
  }, [setValue]);
14499
14488
  const zodValidation = useMemo76(() => zodSafeParse(schema, value), [schema, value]);
14500
- const [expanded, setExpanded] = useState52(true);
14489
+ const [expanded, setExpanded] = useState51(true);
14501
14490
  const arrayElement = getArrayElement(schema);
14502
14491
  const suffix2 = useMemo76(() => {
14503
14492
  return expanded ? " [" : " [...] ";
@@ -14993,7 +14982,7 @@ var ZodTextareaEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad }
14993
14982
  };
14994
14983
 
14995
14984
  // src/components/RenderModal/SchemaEditor/ZodTupleEditor.tsx
14996
- import React91, { useCallback as useCallback68, useMemo as useMemo82, useState as useState53 } from "react";
14985
+ import React91, { useCallback as useCallback68, useMemo as useMemo82, useState as useState52 } from "react";
14997
14986
 
14998
14987
  // src/components/RenderModal/SchemaEditor/ZodTupleItemEditor.tsx
14999
14988
  import { useCallback as useCallback67, useMemo as useMemo81 } from "react";
@@ -15030,7 +15019,7 @@ var ZodTupleEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
15030
15019
  setValue(updater, { shouldSave });
15031
15020
  }, [setValue]);
15032
15021
  const zodValidation = useMemo82(() => zodSafeParse(schema, value), [schema, value]);
15033
- const [expanded, setExpanded] = useState53(true);
15022
+ const [expanded, setExpanded] = useState52(true);
15034
15023
  const tupleItems = getTupleItems(schema);
15035
15024
  const suffix2 = useMemo82(() => {
15036
15025
  return expanded ? " [" : " [...] ";
@@ -15419,7 +15408,7 @@ var ZodObjectEditor = ({
15419
15408
  mayPad,
15420
15409
  discriminatedUnionReplacement
15421
15410
  }) => {
15422
- const [expanded, setExpanded] = useState54(true);
15411
+ const [expanded, setExpanded] = useState53(true);
15423
15412
  const onChange = useCallback69((updater, { shouldSave }) => {
15424
15413
  setValue(updater, { shouldSave });
15425
15414
  }, [setValue]);
@@ -15728,8 +15717,8 @@ var DataEditor = ({
15728
15717
  propsEditType,
15729
15718
  canSaveDefaultProps
15730
15719
  }) => {
15731
- const [mode, setMode] = useState55("schema");
15732
- const [showWarning, setShowWarningWithoutPersistance] = useState55(() => getPersistedShowWarningState());
15720
+ const [mode, setMode] = useState54("schema");
15721
+ const [showWarning, setShowWarningWithoutPersistance] = useState54(() => getPersistedShowWarningState());
15733
15722
  const jsonEditorSetValue = useCallback71((newProps) => {
15734
15723
  setDefaultProps(typeof newProps === "function" ? newProps : () => newProps, { shouldSave: false });
15735
15724
  }, [setDefaultProps]);
@@ -15781,7 +15770,7 @@ var DataEditor = ({
15781
15770
  return val(prevVal);
15782
15771
  });
15783
15772
  }, []);
15784
- const { previewServerState } = useContext41(StudioServerConnectionCtx);
15773
+ const { previewServerState } = useContext40(StudioServerConnectionCtx);
15785
15774
  const modeItems = useMemo86(() => {
15786
15775
  return [
15787
15776
  {
@@ -15921,7 +15910,7 @@ var DefaultPropsEditor = ({
15921
15910
  setDefaultProps,
15922
15911
  propsEditType
15923
15912
  }) => {
15924
- const canSaveDefaultProps = useContext42(ObserveDefaultPropsContext);
15913
+ const canSaveDefaultProps = useContext41(ObserveDefaultPropsContext);
15925
15914
  if (canSaveDefaultProps === null) {
15926
15915
  throw new Error("ObserveDefaultPropsContext is not set");
15927
15916
  }
@@ -16134,16 +16123,16 @@ var SchemaResetButton = ({ onClick }) => {
16134
16123
  };
16135
16124
 
16136
16125
  // src/components/RenderQueue/index.tsx
16137
- import React106, { useContext as useContext51, useEffect as useEffect51, useMemo as useMemo94 } from "react";
16126
+ import React106, { useContext as useContext50, useEffect as useEffect51, useMemo as useMemo94 } from "react";
16138
16127
  import { Internals as Internals35 } from "remotion";
16139
16128
 
16140
16129
  // src/components/RenderQueue/RenderQueueItem.tsx
16141
16130
  import {
16142
16131
  useCallback as useCallback83,
16143
- useContext as useContext50,
16132
+ useContext as useContext49,
16144
16133
  useEffect as useEffect50,
16145
16134
  useMemo as useMemo93,
16146
- useState as useState56
16135
+ useState as useState55
16147
16136
  } from "react";
16148
16137
  import { Internals as Internals34 } from "remotion";
16149
16138
 
@@ -16244,7 +16233,7 @@ import { useCallback as useCallback75, useMemo as useMemo87 } from "react";
16244
16233
 
16245
16234
  // src/components/RenderQueue/ClientRenderQueueProcessor.tsx
16246
16235
  import { renderMediaOnWeb, renderStillOnWeb } from "@remotion/web-renderer";
16247
- import { useCallback as useCallback74, useContext as useContext43, useEffect as useEffect49 } from "react";
16236
+ import { useCallback as useCallback74, useContext as useContext42, useEffect as useEffect49 } from "react";
16248
16237
 
16249
16238
  // src/api/save-render-output.ts
16250
16239
  var throwIfNotOk = async (response) => {
@@ -16309,7 +16298,7 @@ var ClientRenderQueueProcessor = () => {
16309
16298
  markClientJobFailed,
16310
16299
  markClientJobCancelled,
16311
16300
  setProcessJobCallback
16312
- } = useContext43(RenderQueueContext);
16301
+ } = useContext42(RenderQueueContext);
16313
16302
  const processStillJob = useCallback74(async (job, signal) => {
16314
16303
  const compositionRef = getCompositionForJob2(job.id);
16315
16304
  if (!compositionRef) {
@@ -16500,13 +16489,13 @@ var RenderQueueDownloadItem = ({ job }) => {
16500
16489
  };
16501
16490
 
16502
16491
  // src/components/RenderQueue/RenderQueueError.tsx
16503
- import { useCallback as useCallback76, useContext as useContext44 } from "react";
16492
+ import { useCallback as useCallback76, useContext as useContext43 } from "react";
16504
16493
  import { jsx as jsx147 } from "react/jsx-runtime";
16505
16494
  var outputLocation = {
16506
16495
  ...renderQueueItemSubtitleStyle
16507
16496
  };
16508
16497
  var RenderQueueError = ({ job }) => {
16509
- const { setSelectedModal } = useContext44(ModalsContext);
16498
+ const { setSelectedModal } = useContext43(ModalsContext);
16510
16499
  const { tabIndex } = useZIndex();
16511
16500
  const onClick = useCallback76(() => {
16512
16501
  setSelectedModal({
@@ -16528,11 +16517,11 @@ var RenderQueueError = ({ job }) => {
16528
16517
  };
16529
16518
 
16530
16519
  // src/components/RenderQueue/RenderQueueItemCancelButton.tsx
16531
- import { useCallback as useCallback77, useContext as useContext45, useMemo as useMemo88 } from "react";
16520
+ import { useCallback as useCallback77, useContext as useContext44, useMemo as useMemo88 } from "react";
16532
16521
  import { jsx as jsx148 } from "react/jsx-runtime";
16533
16522
  var RenderQueueCancelButton = ({ job }) => {
16534
16523
  const isClientJob = isClientRenderJob(job);
16535
- const { cancelClientJob } = useContext45(RenderQueueContext);
16524
+ const { cancelClientJob } = useContext44(RenderQueueContext);
16536
16525
  const onClick = useCallback77((e) => {
16537
16526
  e.stopPropagation();
16538
16527
  if (isClientJob) {
@@ -16567,7 +16556,7 @@ var RenderQueueCancelButton = ({ job }) => {
16567
16556
  };
16568
16557
 
16569
16558
  // src/components/RenderQueue/RenderQueueItemStatus.tsx
16570
- import React99, { useCallback as useCallback78, useContext as useContext46 } from "react";
16559
+ import React99, { useCallback as useCallback78, useContext as useContext45 } from "react";
16571
16560
 
16572
16561
  // src/components/RenderQueue/CircularProgress.tsx
16573
16562
  import { jsx as jsx149 } from "react/jsx-runtime";
@@ -16612,7 +16601,7 @@ var invisibleStyle = {
16612
16601
  display: "flex"
16613
16602
  };
16614
16603
  var RenderQueueItemStatus = ({ job }) => {
16615
- const { setSelectedModal } = useContext46(ModalsContext);
16604
+ const { setSelectedModal } = useContext45(ModalsContext);
16616
16605
  const [hovered, setHovered] = React99.useState(false);
16617
16606
  const isClientJob = isClientRenderJob(job);
16618
16607
  const onPointerEnter = useCallback78(() => {
@@ -16764,7 +16753,7 @@ var RenderQueueOutputName = ({ job }) => {
16764
16753
  };
16765
16754
 
16766
16755
  // src/components/RenderQueue/RenderQueueProgressMessage.tsx
16767
- import { useCallback as useCallback80, useContext as useContext47 } from "react";
16756
+ import { useCallback as useCallback80, useContext as useContext46 } from "react";
16768
16757
 
16769
16758
  // src/components/RenderQueue/client-render-progress.ts
16770
16759
  var formatEtaString = (timeRemainingInMilliseconds) => {
@@ -16801,7 +16790,7 @@ var RenderQueueProgressMessage = ({ job }) => {
16801
16790
  if (job.status !== "running") {
16802
16791
  throw new Error("should not have rendered this component");
16803
16792
  }
16804
- const { setSelectedModal } = useContext47(ModalsContext);
16793
+ const { setSelectedModal } = useContext46(ModalsContext);
16805
16794
  const { tabIndex } = useZIndex();
16806
16795
  const isClientJob = isClientRenderJob(job);
16807
16796
  const onClick = useCallback80(() => {
@@ -16822,14 +16811,14 @@ var RenderQueueProgressMessage = ({ job }) => {
16822
16811
  };
16823
16812
 
16824
16813
  // src/components/RenderQueue/RenderQueueRemoveItem.tsx
16825
- import { useCallback as useCallback81, useContext as useContext48, useMemo as useMemo91 } from "react";
16814
+ import { useCallback as useCallback81, useContext as useContext47, useMemo as useMemo91 } from "react";
16826
16815
  import { Internals as Internals33 } from "remotion";
16827
16816
  import { jsx as jsx154 } from "react/jsx-runtime";
16828
16817
  var RenderQueueRemoveItem = ({ job }) => {
16829
16818
  const isClientJob = isClientRenderJob(job);
16830
- const { removeClientJob } = useContext48(RenderQueueContext);
16831
- const { canvasContent } = useContext48(Internals33.CompositionManager);
16832
- const { setCanvasContent } = useContext48(Internals33.CompositionSetters);
16819
+ const { removeClientJob } = useContext47(RenderQueueContext);
16820
+ const { canvasContent } = useContext47(Internals33.CompositionManager);
16821
+ const { setCanvasContent } = useContext47(Internals33.CompositionSetters);
16833
16822
  const onClick = useCallback81((e) => {
16834
16823
  e.stopPropagation();
16835
16824
  if (isClientJob) {
@@ -16871,7 +16860,7 @@ var RenderQueueRemoveItem = ({ job }) => {
16871
16860
  };
16872
16861
 
16873
16862
  // src/components/RenderQueue/RenderQueueRepeat.tsx
16874
- import { useCallback as useCallback82, useContext as useContext49, useMemo as useMemo92 } from "react";
16863
+ import { useCallback as useCallback82, useContext as useContext48, useMemo as useMemo92 } from "react";
16875
16864
 
16876
16865
  // src/helpers/retry-payload.ts
16877
16866
  import { NoReactInternals as NoReactInternals11 } from "remotion/no-react";
@@ -17075,9 +17064,9 @@ var makeClientRetryPayload = (job) => {
17075
17064
  // src/components/RenderQueue/RenderQueueRepeat.tsx
17076
17065
  import { jsx as jsx155 } from "react/jsx-runtime";
17077
17066
  var RenderQueueRepeatItem = ({ job }) => {
17078
- const { setSelectedModal } = useContext49(ModalsContext);
17067
+ const { setSelectedModal } = useContext48(ModalsContext);
17079
17068
  const isMobileLayout = useMobileLayout();
17080
- const { setSidebarCollapsedState } = useContext49(SidebarContext);
17069
+ const { setSidebarCollapsedState } = useContext48(SidebarContext);
17081
17070
  const isClientJob = isClientRenderJob(job);
17082
17071
  const onClick = useCallback82((e) => {
17083
17072
  e.stopPropagation();
@@ -17160,8 +17149,8 @@ var subtitle3 = {
17160
17149
  };
17161
17150
  var SELECTED_CLASSNAME = "__remotion_selected_classname";
17162
17151
  var RenderQueueItem = ({ job, selected }) => {
17163
- const [hovered, setHovered] = useState56(false);
17164
- const { setCanvasContent } = useContext50(Internals34.CompositionSetters);
17152
+ const [hovered, setHovered] = useState55(false);
17153
+ const { setCanvasContent } = useContext49(Internals34.CompositionSetters);
17165
17154
  const isClientJob = isClientRenderJob(job);
17166
17155
  const onPointerEnter = useCallback83(() => {
17167
17156
  setHovered(true);
@@ -17327,9 +17316,9 @@ var renderQueue = {
17327
17316
  overflowY: "auto"
17328
17317
  };
17329
17318
  var RenderQueue = () => {
17330
- const connectionStatus = useContext51(StudioServerConnectionCtx).previewServerState.type;
17331
- const { jobs } = useContext51(RenderQueueContext);
17332
- const { canvasContent } = useContext51(Internals35.CompositionManager);
17319
+ const connectionStatus = useContext50(StudioServerConnectionCtx).previewServerState.type;
17320
+ const { jobs } = useContext50(RenderQueueContext);
17321
+ const { canvasContent } = useContext50(Internals35.CompositionManager);
17333
17322
  const previousJobCount = React106.useRef(jobs.length);
17334
17323
  const jobCount = jobs.length;
17335
17324
  const divRef = React106.useRef(null);
@@ -17412,7 +17401,7 @@ var RenderQueue = () => {
17412
17401
  };
17413
17402
 
17414
17403
  // src/components/RendersTab.tsx
17415
- import { useContext as useContext52, useMemo as useMemo95 } from "react";
17404
+ import { useContext as useContext51, useMemo as useMemo95 } from "react";
17416
17405
  import { jsx as jsx159, jsxs as jsxs77, Fragment as Fragment21 } from "react/jsx-runtime";
17417
17406
  var row4 = {
17418
17407
  display: "flex",
@@ -17432,7 +17421,7 @@ var badge = {
17432
17421
  alignItems: "center"
17433
17422
  };
17434
17423
  var RendersTab = ({ selected, onClick }) => {
17435
- const { jobs } = useContext52(RenderQueueContext);
17424
+ const { jobs } = useContext51(RenderQueueContext);
17436
17425
  const failedJobs = jobs.filter((j) => j.status === "failed").length;
17437
17426
  const jobCount = jobs.length;
17438
17427
  const badgeStyle = useMemo95(() => {
@@ -17467,10 +17456,10 @@ var RendersTab = ({ selected, onClick }) => {
17467
17456
  };
17468
17457
 
17469
17458
  // src/components/VisualControls/VisualControlsContent.tsx
17470
- import React109, { useContext as useContext54 } from "react";
17459
+ import React109, { useContext as useContext53 } from "react";
17471
17460
 
17472
17461
  // src/components/VisualControls/VisualControlHandle.tsx
17473
- import { useCallback as useCallback85, useContext as useContext53, useEffect as useEffect53, useState as useState59 } from "react";
17462
+ import { useCallback as useCallback85, useContext as useContext52, useEffect as useEffect53, useState as useState58 } from "react";
17474
17463
  import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
17475
17464
 
17476
17465
  // src/fast-refresh-context.ts
@@ -17482,9 +17471,9 @@ var FastRefreshContext = createContext20({
17482
17471
  });
17483
17472
 
17484
17473
  // src/components/VisualControls/get-original-stack-trace.ts
17485
- import { useEffect as useEffect52, useState as useState57 } from "react";
17474
+ import { useEffect as useEffect52, useState as useState56 } from "react";
17486
17475
  var useOriginalFileName = (stack2) => {
17487
- const [originalFileName, setOriginalFileName] = useState57({ type: "loading" });
17476
+ const [originalFileName, setOriginalFileName] = useState56({ type: "loading" });
17488
17477
  useEffect52(() => {
17489
17478
  if (!stack2) {
17490
17479
  return;
@@ -17506,7 +17495,7 @@ var useOriginalFileName = (stack2) => {
17506
17495
  };
17507
17496
 
17508
17497
  // src/components/VisualControls/ClickableFileName.tsx
17509
- import { useCallback as useCallback84, useMemo as useMemo96, useState as useState58 } from "react";
17498
+ import { useCallback as useCallback84, useMemo as useMemo96, useState as useState57 } from "react";
17510
17499
 
17511
17500
  // src/components/Timeline/TimelineStack/source-attribution.ts
17512
17501
  var getOriginalSourceAttribution = (originalLocation) => {
@@ -17531,7 +17520,7 @@ var container32 = {
17531
17520
  var ClickableFileName = ({
17532
17521
  originalFileName
17533
17522
  }) => {
17534
- const [titleHovered, setTitleHovered] = useState58(false);
17523
+ const [titleHovered, setTitleHovered] = useState57(false);
17535
17524
  const hoverEffect = titleHovered && originalFileName.type === "loaded";
17536
17525
  const onTitlePointerEnter = useCallback84(() => {
17537
17526
  setTitleHovered(true);
@@ -17581,10 +17570,10 @@ var VisualControlHandle = ({ value, keyName }) => {
17581
17570
  throw new Error("expected zod");
17582
17571
  }
17583
17572
  const zodTypes = useZodTypesIfPossible();
17584
- const state = useContext53(VisualControlsContext);
17585
- const { updateValue } = useContext53(SetVisualControlsContext);
17586
- const { fastRefreshes, increaseManualRefreshes } = useContext53(FastRefreshContext);
17587
- const [_saving, setSaving] = useState59(false);
17573
+ const state = useContext52(VisualControlsContext);
17574
+ const { updateValue } = useContext52(SetVisualControlsContext);
17575
+ const { fastRefreshes, increaseManualRefreshes } = useContext52(FastRefreshContext);
17576
+ const [_saving, setSaving] = useState58(false);
17588
17577
  const currentValue = getVisualControlEditedValue({
17589
17578
  handles: state.handles,
17590
17579
  key: keyName
@@ -17673,7 +17662,7 @@ var container33 = {
17673
17662
  overflowY: "auto"
17674
17663
  };
17675
17664
  var VisualControlsContent = () => {
17676
- const { handles } = useContext54(VisualControlsContext);
17665
+ const { handles } = useContext53(VisualControlsContext);
17677
17666
  const entries = Object.entries(handles);
17678
17667
  return /* @__PURE__ */ jsx163("div", {
17679
17668
  style: container33,
@@ -17716,10 +17705,10 @@ var persistSelectedOptionsSidebarPanel2 = (panel2) => {
17716
17705
  };
17717
17706
  var optionsSidebarTabs = createRef9();
17718
17707
  var OptionsPanel = ({ readOnlyStudio }) => {
17719
- const { props, updateProps } = useContext55(Internals36.EditorPropsContext);
17708
+ const { props, updateProps } = useContext54(Internals36.EditorPropsContext);
17720
17709
  const renderingAvailable = !readOnlyStudio || SHOW_BROWSER_RENDERING;
17721
17710
  const isMobileLayout = useMobileLayout();
17722
- const visualControlsTabActivated = useContext55(VisualControlsTabActivatedContext);
17711
+ const visualControlsTabActivated = useContext54(VisualControlsTabActivatedContext);
17723
17712
  const container34 = useMemo97(() => ({
17724
17713
  height: "100%",
17725
17714
  width: "100%",
@@ -17728,7 +17717,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
17728
17717
  flexDirection: "column",
17729
17718
  flex: 1
17730
17719
  }), [isMobileLayout]);
17731
- const [panel2, setPanel] = useState60(() => getSelectedPanel2(renderingAvailable));
17720
+ const [panel2, setPanel] = useState59(() => getSelectedPanel2(renderingAvailable));
17732
17721
  const onPropsSelected = useCallback86(() => {
17733
17722
  setPanel("input-props");
17734
17723
  persistSelectedOptionsSidebarPanel2("input-props");
@@ -17749,7 +17738,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
17749
17738
  }
17750
17739
  };
17751
17740
  }, []);
17752
- const { compositions, canvasContent } = useContext55(Internals36.CompositionManager);
17741
+ const { compositions, canvasContent } = useContext54(Internals36.CompositionManager);
17753
17742
  const composition = useMemo97(() => {
17754
17743
  if (canvasContent === null || canvasContent.type !== "composition") {
17755
17744
  return null;
@@ -17886,7 +17875,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
17886
17875
  };
17887
17876
 
17888
17877
  // src/components/PreviewToolbar.tsx
17889
- import { useContext as useContext61, useEffect as useEffect59, useRef as useRef33, useState as useState64 } from "react";
17878
+ import { useContext as useContext60, useEffect as useEffect59, useRef as useRef33, useState as useState63 } from "react";
17890
17879
  import { Internals as Internals44 } from "remotion";
17891
17880
 
17892
17881
  // src/state/loop.ts
@@ -17900,7 +17889,7 @@ var loadLoopOption = () => {
17900
17889
  };
17901
17890
 
17902
17891
  // src/components/CheckboardToggle.tsx
17903
- import { useCallback as useCallback87, useContext as useContext56 } from "react";
17892
+ import { useCallback as useCallback87, useContext as useContext55 } from "react";
17904
17893
  import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
17905
17894
  import { jsx as jsx165 } from "react/jsx-runtime";
17906
17895
  var accessibilityLabel2 = [
@@ -17908,7 +17897,7 @@ var accessibilityLabel2 = [
17908
17897
  areKeyboardShortcutsDisabled() ? null : "(T)"
17909
17898
  ].filter(NoReactInternals13.truthy).join(" ");
17910
17899
  var CheckboardToggle = () => {
17911
- const { checkerboard, setCheckerboard } = useContext56(CheckerboardContext);
17900
+ const { checkerboard, setCheckerboard } = useContext55(CheckerboardContext);
17912
17901
  const onClick = useCallback87(() => {
17913
17902
  setCheckerboard((c) => {
17914
17903
  return !c;
@@ -17939,10 +17928,10 @@ var CheckboardToggle = () => {
17939
17928
  // src/components/FpsCounter.tsx
17940
17929
  import {
17941
17930
  useEffect as useEffect54,
17942
- useLayoutEffect as useLayoutEffect5,
17931
+ useLayoutEffect as useLayoutEffect4,
17943
17932
  useMemo as useMemo98,
17944
17933
  useRef as useRef31,
17945
- useState as useState61
17934
+ useState as useState60
17946
17935
  } from "react";
17947
17936
  import { Internals as Internals37 } from "remotion";
17948
17937
  import { jsxs as jsxs81 } from "react/jsx-runtime";
@@ -17960,17 +17949,17 @@ var FpsCounter = ({ playbackSpeed }) => {
17960
17949
  const videoConfig = Internals37.useUnsafeVideoConfig();
17961
17950
  const [playing] = Internals37.Timeline.usePlayingState();
17962
17951
  const frame2 = Internals37.Timeline.useTimelinePosition();
17963
- const [marker, rerender] = useState61({});
17964
- const [fps, setFps] = useState61(0);
17952
+ const [marker, rerender] = useState60({});
17953
+ const [fps, setFps] = useState60(0);
17965
17954
  const previousUpdates = useRef31([]);
17966
17955
  const fpsRef = useRef31(0);
17967
17956
  const playingRef = useRef31(playing);
17968
- useLayoutEffect5(() => {
17957
+ useLayoutEffect4(() => {
17969
17958
  fpsRef.current = 0;
17970
17959
  previousUpdates.current = [];
17971
17960
  playingRef.current = playing;
17972
17961
  }, [playing]);
17973
- useLayoutEffect5(() => {
17962
+ useLayoutEffect4(() => {
17974
17963
  if (playingRef.current === false)
17975
17964
  return;
17976
17965
  previousUpdates.current = pushWithMaxSize(previousUpdates.current, performance.now(), 15);
@@ -18020,7 +18009,7 @@ var FpsCounter = ({ playbackSpeed }) => {
18020
18009
  };
18021
18010
 
18022
18011
  // src/components/FullscreenToggle.tsx
18023
- import { useCallback as useCallback88, useContext as useContext57, useEffect as useEffect55 } from "react";
18012
+ import { useCallback as useCallback88, useContext as useContext56, useEffect as useEffect55 } from "react";
18024
18013
  import { Internals as Internals38 } from "remotion";
18025
18014
  import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
18026
18015
  import { jsx as jsx166 } from "react/jsx-runtime";
@@ -18030,7 +18019,7 @@ var accessibilityLabel3 = [
18030
18019
  ].filter(NoReactInternals14.truthy).join(" ");
18031
18020
  var FullScreenToggle = () => {
18032
18021
  const keybindings = useKeybinding();
18033
- const { setSize } = useContext57(Internals38.PreviewSizeContext);
18022
+ const { setSize } = useContext56(Internals38.PreviewSizeContext);
18034
18023
  const onClick = useCallback88(() => {
18035
18024
  drawRef.current?.requestFullscreen();
18036
18025
  if (document.fullscreenElement)
@@ -18264,7 +18253,7 @@ var PlaybackRatePersistor = () => {
18264
18253
  };
18265
18254
 
18266
18255
  // src/components/PlaybackRateSelector.tsx
18267
- import { useContext as useContext58, useMemo as useMemo99 } from "react";
18256
+ import { useContext as useContext57, useMemo as useMemo99 } from "react";
18268
18257
  import { Internals as Internals40 } from "remotion";
18269
18258
  import { jsx as jsx170 } from "react/jsx-runtime";
18270
18259
  var commonPlaybackRates = [
@@ -18286,7 +18275,7 @@ var getPlaybackRateLabel = (playbackRate) => {
18286
18275
  var accessibilityLabel5 = "Change the playback rate";
18287
18276
  var comboStyle2 = { width: 80 };
18288
18277
  var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
18289
- const { canvasContent } = useContext58(Internals40.CompositionManager);
18278
+ const { canvasContent } = useContext57(Internals40.CompositionManager);
18290
18279
  const isStill = useIsStill();
18291
18280
  const style9 = useMemo99(() => {
18292
18281
  return {
@@ -18336,7 +18325,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
18336
18325
 
18337
18326
  // src/components/PlayPause.tsx
18338
18327
  import { PlayerInternals as PlayerInternals13 } from "@remotion/player";
18339
- import { useCallback as useCallback92, useEffect as useEffect58, useState as useState62 } from "react";
18328
+ import { useCallback as useCallback92, useEffect as useEffect58, useState as useState61 } from "react";
18340
18329
  import { Internals as Internals41 } from "remotion";
18341
18330
 
18342
18331
  // src/icons/jump-to-start.tsx
@@ -18433,7 +18422,7 @@ var iconButton = {
18433
18422
  var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
18434
18423
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
18435
18424
  const videoConfig = Internals41.useUnsafeVideoConfig();
18436
- const [showBufferIndicator, setShowBufferState] = useState62(false);
18425
+ const [showBufferIndicator, setShowBufferState] = useState61(false);
18437
18426
  const {
18438
18427
  playing,
18439
18428
  play,
@@ -18695,7 +18684,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
18695
18684
 
18696
18685
  // src/components/RenderButton.tsx
18697
18686
  import { PlayerInternals as PlayerInternals14 } from "@remotion/player";
18698
- import { useCallback as useCallback93, useContext as useContext59, useMemo as useMemo100, useRef as useRef32, useState as useState63 } from "react";
18687
+ import { useCallback as useCallback93, useContext as useContext58, useMemo as useMemo100, useRef as useRef32, useState as useState62 } from "react";
18699
18688
  import ReactDOM8 from "react-dom";
18700
18689
  import { Internals as Internals42 } from "remotion";
18701
18690
  import { jsx as jsx177, jsxs as jsxs83, Fragment as Fragment24 } from "react/jsx-runtime";
@@ -18766,9 +18755,9 @@ var RenderButton = ({
18766
18755
  readOnlyStudio
18767
18756
  }) => {
18768
18757
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
18769
- const { setSelectedModal } = useContext59(ModalsContext);
18770
- const [preferredRenderType, setPreferredRenderType] = useState63(() => getInitialRenderType(readOnlyStudio));
18771
- const [dropdownOpened, setDropdownOpened] = useState63(false);
18758
+ const { setSelectedModal } = useContext58(ModalsContext);
18759
+ const [preferredRenderType, setPreferredRenderType] = useState62(() => getInitialRenderType(readOnlyStudio));
18760
+ const [dropdownOpened, setDropdownOpened] = useState62(false);
18772
18761
  const dropdownRef = useRef32(null);
18773
18762
  const containerRef = useRef32(null);
18774
18763
  const { currentZIndex } = useZIndex();
@@ -18805,7 +18794,7 @@ var RenderButton = ({
18805
18794
  return !o;
18806
18795
  });
18807
18796
  }, [refresh]);
18808
- const connectionStatus = useContext59(StudioServerConnectionCtx).previewServerState.type;
18797
+ const connectionStatus = useContext58(StudioServerConnectionCtx).previewServerState.type;
18809
18798
  const canServerRender = connectionStatus === "connected";
18810
18799
  const canRender = canServerRender || SHOW_BROWSER_RENDERING || readOnlyStudio;
18811
18800
  const renderType = useMemo100(() => {
@@ -18835,7 +18824,7 @@ var RenderButton = ({
18835
18824
  }, []);
18836
18825
  const video = Internals42.useVideo();
18837
18826
  const getCurrentFrame2 = PlayerInternals14.useFrameImperative();
18838
- const { props } = useContext59(Internals42.EditorPropsContext);
18827
+ const { props } = useContext58(Internals42.EditorPropsContext);
18839
18828
  const openServerRenderModal = useCallback93((copyCommandOnly) => {
18840
18829
  if (!video) {
18841
18830
  return null;
@@ -19158,7 +19147,7 @@ var RenderButton = ({
19158
19147
  };
19159
19148
 
19160
19149
  // src/components/Timeline/TimelineZoomControls.tsx
19161
- import { useCallback as useCallback94, useContext as useContext60 } from "react";
19150
+ import { useCallback as useCallback94, useContext as useContext59 } from "react";
19162
19151
  import { Internals as Internals43 } from "remotion";
19163
19152
 
19164
19153
  // src/icons/minus.tsx
@@ -19191,8 +19180,8 @@ var iconStyle4 = {
19191
19180
  width: 14
19192
19181
  };
19193
19182
  var TimelineZoomControls = () => {
19194
- const { canvasContent } = useContext60(Internals43.CompositionManager);
19195
- const { setZoom, zoom: zoomMap } = useContext60(TimelineZoomCtx);
19183
+ const { canvasContent } = useContext59(Internals43.CompositionManager);
19184
+ const { setZoom, zoom: zoomMap } = useContext59(TimelineZoomCtx);
19196
19185
  const { tabIndex } = useZIndex();
19197
19186
  const onMinusClicked = useCallback94(() => {
19198
19187
  if (canvasContent === null || canvasContent.type !== "composition") {
@@ -19320,15 +19309,15 @@ var padding2 = {
19320
19309
  };
19321
19310
  var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19322
19311
  const { playbackRate, setPlaybackRate } = Internals44.useTimelineContext();
19323
- const { mediaMuted } = useContext61(Internals44.MediaVolumeContext);
19324
- const { setMediaMuted } = useContext61(Internals44.SetMediaVolumeContext);
19325
- const { canvasContent } = useContext61(Internals44.CompositionManager);
19312
+ const { mediaMuted } = useContext60(Internals44.MediaVolumeContext);
19313
+ const { setMediaMuted } = useContext60(Internals44.SetMediaVolumeContext);
19314
+ const { canvasContent } = useContext60(Internals44.CompositionManager);
19326
19315
  const isVideoComposition = useIsVideoComposition();
19327
19316
  const previewToolbarRef = useRef33(null);
19328
19317
  const leftScrollIndicatorRef = useRef33(null);
19329
19318
  const rightScrollIndicatorRef = useRef33(null);
19330
19319
  const isStill = useIsStill();
19331
- const [loop, setLoop] = useState64(loadLoopOption());
19320
+ const [loop, setLoop] = useState63(loadLoopOption());
19332
19321
  const isFullscreenSupported = checkFullscreenSupport();
19333
19322
  const isMobileLayout = useMobileLayout();
19334
19323
  useEffect59(() => {
@@ -19482,7 +19471,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19482
19471
  };
19483
19472
 
19484
19473
  // src/components/Splitter/SplitterContainer.tsx
19485
- import { useMemo as useMemo101, useRef as useRef34, useState as useState65 } from "react";
19474
+ import { useMemo as useMemo101, useRef as useRef34, useState as useState64 } from "react";
19486
19475
 
19487
19476
  // src/state/timeline.ts
19488
19477
  var localStorageKey4 = (id) => `remotion.editor.timelineFlex.${id}`;
@@ -19536,7 +19525,7 @@ var containerColumn = {
19536
19525
  };
19537
19526
  var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex, id }) => {
19538
19527
  const [initialTimelineFlex, persistFlex] = useTimelineFlex(id);
19539
- const [flexValue, setFlexValue] = useState65(initialTimelineFlex ?? defaultFlex);
19528
+ const [flexValue, setFlexValue] = useState64(initialTimelineFlex ?? defaultFlex);
19540
19529
  const ref2 = useRef34(null);
19541
19530
  const isDragging = useRef34(false);
19542
19531
  const value = useMemo101(() => {
@@ -19573,11 +19562,11 @@ var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex,
19573
19562
  };
19574
19563
 
19575
19564
  // src/components/Splitter/SplitterElement.tsx
19576
- import { useContext as useContext62, useMemo as useMemo102 } from "react";
19565
+ import { useContext as useContext61, useMemo as useMemo102 } from "react";
19577
19566
  import { interpolateColors, random } from "remotion";
19578
19567
  import { jsx as jsx182, jsxs as jsxs86, Fragment as Fragment26 } from "react/jsx-runtime";
19579
19568
  var SplitterElement = ({ children, type, sticky }) => {
19580
- const context = useContext62(SplitterContext);
19569
+ const context = useContext61(SplitterContext);
19581
19570
  const style9 = useMemo102(() => {
19582
19571
  return {
19583
19572
  flex: (type === "flexer" ? context.flexValue : 1 - context.flexValue) * 1000,
@@ -19611,7 +19600,7 @@ var SplitterElement = ({ children, type, sticky }) => {
19611
19600
 
19612
19601
  // src/components/Splitter/SplitterHandle.tsx
19613
19602
  import { PlayerInternals as PlayerInternals15 } from "@remotion/player";
19614
- import { useContext as useContext63, useEffect as useEffect60, useRef as useRef35, useState as useState66 } from "react";
19603
+ import { useContext as useContext62, useEffect as useEffect60, useRef as useRef35, useState as useState65 } from "react";
19615
19604
  import { jsx as jsx183 } from "react/jsx-runtime";
19616
19605
  var SPLITTER_HANDLE_SIZE = 3;
19617
19606
  var containerRow2 = {
@@ -19621,11 +19610,11 @@ var containerColumn2 = {
19621
19610
  width: SPLITTER_HANDLE_SIZE
19622
19611
  };
19623
19612
  var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
19624
- const context = useContext63(SplitterContext);
19613
+ const context = useContext62(SplitterContext);
19625
19614
  if (!context) {
19626
19615
  throw new Error("Cannot find splitter context");
19627
19616
  }
19628
- const [lastPointerUp, setLastPointerUp] = useState66(() => Date.now());
19617
+ const [lastPointerUp, setLastPointerUp] = useState65(() => Date.now());
19629
19618
  const ref2 = useRef35(null);
19630
19619
  useEffect60(() => {
19631
19620
  if (context.isDragging.current) {
@@ -19776,7 +19765,7 @@ var row5 = {
19776
19765
  minHeight: 0
19777
19766
  };
19778
19767
  var useResponsiveSidebarStatus = () => {
19779
- const { sidebarCollapsedStateLeft } = useContext64(SidebarContext);
19768
+ const { sidebarCollapsedStateLeft } = useContext63(SidebarContext);
19780
19769
  const responsiveLeftStatus = useBreakpoint(1200) ? "collapsed" : "expanded";
19781
19770
  const actualStateLeft = useMemo103(() => {
19782
19771
  if (sidebarCollapsedStateLeft === "collapsed") {
@@ -19790,9 +19779,9 @@ var useResponsiveSidebarStatus = () => {
19790
19779
  return actualStateLeft;
19791
19780
  };
19792
19781
  var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
19793
- const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext64(SidebarContext);
19782
+ const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext63(SidebarContext);
19794
19783
  const rulersAreVisible = useIsRulerVisible();
19795
- const { canvasContent } = useContext64(Internals45.CompositionManager);
19784
+ const { canvasContent } = useContext63(Internals45.CompositionManager);
19796
19785
  const actualStateLeft = useResponsiveSidebarStatus();
19797
19786
  const actualStateRight = useMemo103(() => {
19798
19787
  if (sidebarCollapsedStateRight === "collapsed") {
@@ -19914,7 +19903,7 @@ var style9 = {
19914
19903
  position: "relative"
19915
19904
  };
19916
19905
  var SidebarCollapserControls = () => {
19917
- const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext65(SidebarContext);
19906
+ const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext64(SidebarContext);
19918
19907
  const keybindings = useKeybinding();
19919
19908
  const leftSidebarStatus = useResponsiveSidebarStatus();
19920
19909
  const leftIcon = useCallback96((color) => {
@@ -20052,10 +20041,10 @@ var SidebarCollapserControls = () => {
20052
20041
  // src/components/UndoRedoButtons.tsx
20053
20042
  import {
20054
20043
  useCallback as useCallback97,
20055
- useContext as useContext66,
20044
+ useContext as useContext65,
20056
20045
  useEffect as useEffect63,
20057
20046
  useRef as useRef36,
20058
- useState as useState67
20047
+ useState as useState66
20059
20048
  } from "react";
20060
20049
 
20061
20050
  // src/icons/redo.tsx
@@ -20091,9 +20080,9 @@ var iconStyle5 = {
20091
20080
  height: 16
20092
20081
  };
20093
20082
  var UndoRedoButtons = () => {
20094
- const [undoFile, setUndoFile] = useState67(null);
20095
- const [redoFile, setRedoFile] = useState67(null);
20096
- const { subscribeToEvent } = useContext66(StudioServerConnectionCtx);
20083
+ const [undoFile, setUndoFile] = useState66(null);
20084
+ const [redoFile, setRedoFile] = useState66(null);
20085
+ const { subscribeToEvent } = useContext65(StudioServerConnectionCtx);
20097
20086
  const keybindings = useKeybinding();
20098
20087
  const undoInFlight = useRef36(false);
20099
20088
  const redoInFlight = useRef36(false);
@@ -20198,10 +20187,10 @@ var UndoRedoButtons = () => {
20198
20187
  // src/components/UpdateCheck.tsx
20199
20188
  import {
20200
20189
  useCallback as useCallback98,
20201
- useContext as useContext67,
20190
+ useContext as useContext66,
20202
20191
  useEffect as useEffect64,
20203
20192
  useMemo as useMemo104,
20204
- useState as useState68
20193
+ useState as useState67
20205
20194
  } from "react";
20206
20195
  import { VERSION } from "remotion";
20207
20196
  import { jsx as jsx189 } from "react/jsx-runtime";
@@ -20217,10 +20206,10 @@ var buttonStyle3 = {
20217
20206
  justifyContent: "center"
20218
20207
  };
20219
20208
  var UpdateCheck = () => {
20220
- const [info, setInfo] = useState68(null);
20221
- const { setSelectedModal } = useContext67(ModalsContext);
20209
+ const [info, setInfo] = useState67(null);
20210
+ const { setSelectedModal } = useContext66(ModalsContext);
20222
20211
  const { tabIndex } = useZIndex();
20223
- const [knownBugs, setKnownBugs] = useState68(null);
20212
+ const [knownBugs, setKnownBugs] = useState67(null);
20224
20213
  const hasKnownBugs = useMemo104(() => {
20225
20214
  return knownBugs && knownBugs.length > 0;
20226
20215
  }, [knownBugs]);
@@ -20316,7 +20305,7 @@ var flex2 = {
20316
20305
  flex: 1
20317
20306
  };
20318
20307
  var MenuToolbar = ({ readOnlyStudio }) => {
20319
- const [selected, setSelected] = useState69(null);
20308
+ const [selected, setSelected] = useState68(null);
20320
20309
  const mobileLayout = useMobileLayout();
20321
20310
  const fixedWidthRight = useMemo105(() => {
20322
20311
  return {
@@ -20422,7 +20411,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
20422
20411
  };
20423
20412
 
20424
20413
  // src/components/Timeline/Timeline.tsx
20425
- import React150, { useContext as useContext80, useMemo as useMemo123 } from "react";
20414
+ import React150, { useContext as useContext79, useMemo as useMemo123 } from "react";
20426
20415
  import { Internals as Internals57 } from "remotion";
20427
20416
 
20428
20417
  // src/helpers/get-sequence-visible-range.ts
@@ -20469,7 +20458,8 @@ var getTimelineNestedLevel = (sequence, allSequences, depth) => {
20469
20458
  if (!parentSequence) {
20470
20459
  throw new Error("has parentId but no parent");
20471
20460
  }
20472
- return getTimelineNestedLevel(parentSequence, allSequences, depth + 1);
20461
+ const parentContributes = parentSequence.showInTimeline;
20462
+ return getTimelineNestedLevel(parentSequence, allSequences, parentContributes ? depth + 1 : depth);
20473
20463
  };
20474
20464
 
20475
20465
  // src/helpers/get-timeline-sequence-hash.ts
@@ -20518,6 +20508,19 @@ var getTimelineSequenceSequenceSortKey = (track, tracks, sameHashes = {}, nonceR
20518
20508
  };
20519
20509
 
20520
20510
  // src/helpers/calculate-timeline.ts
20511
+ var getInheritedLoopDisplay = (sequence, sequences) => {
20512
+ if (sequence.loopDisplay) {
20513
+ return sequence.loopDisplay;
20514
+ }
20515
+ if (!sequence.parent) {
20516
+ return;
20517
+ }
20518
+ const parent = sequences.find((s) => s.id === sequence.parent);
20519
+ if (!parent) {
20520
+ return;
20521
+ }
20522
+ return getInheritedLoopDisplay(parent, sequences);
20523
+ };
20521
20524
  var calculateTimeline = ({
20522
20525
  sequences
20523
20526
  }) => {
@@ -20546,7 +20549,8 @@ var calculateTimeline = ({
20546
20549
  sequence: {
20547
20550
  ...sequence,
20548
20551
  from: visibleStart,
20549
- duration: visibleDuration
20552
+ duration: visibleDuration,
20553
+ loopDisplay: sequence.type === "audio" || sequence.type === "video" ? getInheritedLoopDisplay(sequence, sortedSequences) : sequence.loopDisplay
20550
20554
  },
20551
20555
  depth: getTimelineNestedLevel(sequence, sortedSequences, 0),
20552
20556
  hash: actualHash,
@@ -20573,7 +20577,7 @@ var calculateTimeline = ({
20573
20577
  };
20574
20578
 
20575
20579
  // src/components/ExpandedTracksProvider.tsx
20576
- import { createContext as createContext21, useCallback as useCallback100, useMemo as useMemo106, useState as useState70 } from "react";
20580
+ import { createContext as createContext21, useCallback as useCallback100, useMemo as useMemo106, useState as useState69 } from "react";
20577
20581
  import { jsx as jsx191 } from "react/jsx-runtime";
20578
20582
  var ExpandedTracksContext = createContext21({
20579
20583
  expandedTracks: {},
@@ -20582,7 +20586,7 @@ var ExpandedTracksContext = createContext21({
20582
20586
  }
20583
20587
  });
20584
20588
  var ExpandedTracksProvider = ({ children }) => {
20585
- const [expandedTracks, setExpandedTracks] = useState70({});
20589
+ const [expandedTracks, setExpandedTracks] = useState69({});
20586
20590
  const toggleTrack = useCallback100((id) => {
20587
20591
  setExpandedTracks((prev) => ({
20588
20592
  ...prev,
@@ -20639,16 +20643,16 @@ var MaxTimelineTracksReached = () => {
20639
20643
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
20640
20644
  import {
20641
20645
  useCallback as useCallback101,
20642
- useContext as useContext70,
20646
+ useContext as useContext69,
20643
20647
  useEffect as useEffect65,
20644
20648
  useMemo as useMemo108,
20645
20649
  useRef as useRef37,
20646
- useState as useState71
20650
+ useState as useState70
20647
20651
  } from "react";
20648
20652
  import { Internals as Internals47, useVideoConfig as useVideoConfig4 } from "remotion";
20649
20653
 
20650
20654
  // src/components/Timeline/TimelineInOutPointer.tsx
20651
- import { createRef as createRef10, useContext as useContext68 } from "react";
20655
+ import { createRef as createRef10, useContext as useContext67 } from "react";
20652
20656
  import { Internals as Internals46 } from "remotion";
20653
20657
  import { jsx as jsx192, jsxs as jsxs92, Fragment as Fragment29 } from "react/jsx-runtime";
20654
20658
  var areaHighlight = {
@@ -20663,7 +20667,7 @@ var outMarkerAreaRef = createRef10();
20663
20667
  var TimelineInOutPointer = () => {
20664
20668
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
20665
20669
  const videoConfig = Internals46.useUnsafeVideoConfig();
20666
- const timelineWidth = useContext68(TimelineWidthContext);
20670
+ const timelineWidth = useContext67(TimelineWidthContext);
20667
20671
  if (!videoConfig || timelineWidth === null) {
20668
20672
  return null;
20669
20673
  }
@@ -20690,7 +20694,7 @@ var TimelineInOutPointer = () => {
20690
20694
  };
20691
20695
 
20692
20696
  // src/components/Timeline/TimelineInOutPointerHandle.tsx
20693
- import { createRef as createRef11, useContext as useContext69, useMemo as useMemo107 } from "react";
20697
+ import { createRef as createRef11, useContext as useContext68, useMemo as useMemo107 } from "react";
20694
20698
  import { useVideoConfig as useVideoConfig3 } from "remotion";
20695
20699
  import { jsx as jsx193 } from "react/jsx-runtime";
20696
20700
  var line3 = {
@@ -20723,7 +20727,7 @@ var TimelineInOutPointerHandle = ({
20723
20727
  type,
20724
20728
  atFrame
20725
20729
  }) => {
20726
- const timelineWidth = useContext69(TimelineWidthContext);
20730
+ const timelineWidth = useContext68(TimelineWidthContext);
20727
20731
  if (timelineWidth === null) {
20728
20732
  return null;
20729
20733
  }
@@ -20759,8 +20763,8 @@ var getClientXWithScroll = (x) => {
20759
20763
  };
20760
20764
  var TimelineDragHandler = () => {
20761
20765
  const video = Internals47.useUnsafeVideoConfig();
20762
- const { zoom: zoomMap } = useContext70(TimelineZoomCtx);
20763
- const { canvasContent } = useContext70(Internals47.CompositionManager);
20766
+ const { zoom: zoomMap } = useContext69(TimelineZoomCtx);
20767
+ const { canvasContent } = useContext69(Internals47.CompositionManager);
20764
20768
  const containerStyle2 = useMemo108(() => {
20765
20769
  if (!canvasContent || canvasContent.type !== "composition") {
20766
20770
  return {};
@@ -20788,10 +20792,10 @@ var Inner2 = () => {
20788
20792
  });
20789
20793
  const { isHighestContext } = useZIndex();
20790
20794
  const setFrame = Internals47.useTimelineSetFrame();
20791
- const [inOutDragging, setInOutDragging] = useState71({
20795
+ const [inOutDragging, setInOutDragging] = useState70({
20792
20796
  dragging: false
20793
20797
  });
20794
- const timelineWidth = useContext70(TimelineWidthContext);
20798
+ const timelineWidth = useContext69(TimelineWidthContext);
20795
20799
  const get = useCallback101((frame2) => {
20796
20800
  if (timelineWidth === null) {
20797
20801
  throw new Error("timeline width is not yet determined");
@@ -20802,7 +20806,7 @@ var Inner2 = () => {
20802
20806
  const left3 = size4?.left ?? 0;
20803
20807
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
20804
20808
  const { setInAndOutFrames } = useTimelineSetInOutFramePosition();
20805
- const [dragging, setDragging] = useState71({
20809
+ const [dragging, setDragging] = useState70({
20806
20810
  dragging: false
20807
20811
  });
20808
20812
  const { playing, play, pause, seek } = PlayerInternals16.usePlayer();
@@ -21185,14 +21189,14 @@ import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
21185
21189
  import { useRef as useRef41 } from "react";
21186
21190
 
21187
21191
  // src/components/Timeline/TimelineListItem.tsx
21188
- import { useCallback as useCallback110, useContext as useContext74, useMemo as useMemo116 } from "react";
21192
+ import { useCallback as useCallback110, useContext as useContext73, useMemo as useMemo116 } from "react";
21189
21193
  import { Internals as Internals50 } from "remotion";
21190
21194
 
21191
21195
  // src/components/Timeline/TimelineExpandedSection.tsx
21192
21196
  import React137, { useMemo as useMemo113 } from "react";
21193
21197
 
21194
21198
  // src/components/Timeline/TimelineFieldRow.tsx
21195
- import { useCallback as useCallback106, useContext as useContext71, useMemo as useMemo112 } from "react";
21199
+ import { useCallback as useCallback106, useContext as useContext70, useMemo as useMemo112 } from "react";
21196
21200
  import { Internals as Internals48 } from "remotion";
21197
21201
 
21198
21202
  // src/components/Timeline/TimelineBooleanField.tsx
@@ -21221,7 +21225,7 @@ var TimelineBooleanField = ({ field, codeValue, effectiveValue, canUpdate, onSav
21221
21225
  };
21222
21226
 
21223
21227
  // src/components/Timeline/TimelineNumberField.tsx
21224
- import { useCallback as useCallback103, useMemo as useMemo109, useState as useState72 } from "react";
21228
+ import { useCallback as useCallback103, useMemo as useMemo109, useState as useState71 } from "react";
21225
21229
 
21226
21230
  // src/components/Timeline/timeline-field-utils.ts
21227
21231
  var getDecimalPlaces = (num) => {
@@ -21244,7 +21248,7 @@ var TimelineNumberField = ({
21244
21248
  onDragEnd,
21245
21249
  codeValue
21246
21250
  }) => {
21247
- const [dragValue, setDragValue] = useState72(null);
21251
+ const [dragValue, setDragValue] = useState71(null);
21248
21252
  const onValueChange = useCallback103((newVal) => {
21249
21253
  setDragValue(newVal);
21250
21254
  onDragValueChange(field.key, newVal);
@@ -21296,7 +21300,7 @@ var TimelineNumberField = ({
21296
21300
  };
21297
21301
 
21298
21302
  // src/components/Timeline/TimelineRotationField.tsx
21299
- import { useCallback as useCallback104, useMemo as useMemo110, useState as useState73 } from "react";
21303
+ import { useCallback as useCallback104, useMemo as useMemo110, useState as useState72 } from "react";
21300
21304
  import { jsx as jsx197 } from "react/jsx-runtime";
21301
21305
  var unitPattern = /^([+-]?(?:\d+\.?\d*|\.\d+))(deg|rad|turn|grad)$/;
21302
21306
  var unitToDegrees = {
@@ -21326,7 +21330,7 @@ var TimelineRotationField = ({
21326
21330
  onDragValueChange,
21327
21331
  onDragEnd
21328
21332
  }) => {
21329
- const [dragValue, setDragValue] = useState73(null);
21333
+ const [dragValue, setDragValue] = useState72(null);
21330
21334
  const degrees = useMemo110(() => parseCssRotationToDegrees(String(effectiveValue ?? "0deg")), [effectiveValue]);
21331
21335
  const onValueChange = useCallback104((newVal) => {
21332
21336
  setDragValue(newVal);
@@ -21384,7 +21388,7 @@ var TimelineRotationField = ({
21384
21388
  };
21385
21389
 
21386
21390
  // src/components/Timeline/TimelineTranslateField.tsx
21387
- import { useCallback as useCallback105, useMemo as useMemo111, useState as useState74 } from "react";
21391
+ import { useCallback as useCallback105, useMemo as useMemo111, useState as useState73 } from "react";
21388
21392
  import { jsx as jsx198, jsxs as jsxs94 } from "react/jsx-runtime";
21389
21393
  var leftDraggerStyle = {
21390
21394
  paddingLeft: 0
@@ -21413,8 +21417,8 @@ var TimelineTranslateField = ({
21413
21417
  onDragValueChange,
21414
21418
  onDragEnd
21415
21419
  }) => {
21416
- const [dragX, setDragX] = useState74(null);
21417
- const [dragY, setDragY] = useState74(null);
21420
+ const [dragX, setDragX] = useState73(null);
21421
+ const [dragY, setDragY] = useState73(null);
21418
21422
  const [codeX, codeY] = useMemo111(() => parseTranslate(String(effectiveValue ?? "0px 0px")), [effectiveValue]);
21419
21423
  const makeString = useCallback105((x, y) => `${x}px ${y}px`, []);
21420
21424
  const step = field.fieldSchema.type === "translate" ? field.fieldSchema.step ?? 1 : 1;
@@ -21688,7 +21692,7 @@ var TimelineFieldRow = ({
21688
21692
  clearDragOverrides,
21689
21693
  dragOverrides,
21690
21694
  codeValues: allPropStatuses
21691
- } = useContext71(Internals48.VisualModeOverridesContext);
21695
+ } = useContext70(Internals48.VisualModeOverridesContext);
21692
21696
  const propStatuses = allPropStatuses[overrideId] ?? null;
21693
21697
  const propStatus = propStatuses?.[field.key] ?? null;
21694
21698
  const dragOverrideValue = useMemo112(() => {
@@ -21701,7 +21705,7 @@ var TimelineFieldRow = ({
21701
21705
  defaultValue: field.fieldSchema.default,
21702
21706
  shouldResortToDefaultValueIfUndefined: true
21703
21707
  });
21704
- const { setCodeValues } = useContext71(Internals48.VisualModeOverridesContext);
21708
+ const { setCodeValues } = useContext70(Internals48.VisualModeOverridesContext);
21705
21709
  const onSave = useCallback106((key4, value) => {
21706
21710
  if (!propStatuses || !validatedLocation || !nodePath) {
21707
21711
  return Promise.reject(new Error("Cannot save"));
@@ -21915,7 +21919,7 @@ var TimelineLayerEye = ({ onInvoked, hidden, type }) => {
21915
21919
 
21916
21920
  // src/components/Timeline/TimelineStack/index.tsx
21917
21921
  import { SOURCE_MAP_ENDPOINT } from "@remotion/studio-shared";
21918
- import { useCallback as useCallback108, useContext as useContext72, useMemo as useMemo114, useState as useState75 } from "react";
21922
+ import { useCallback as useCallback108, useContext as useContext71, useMemo as useMemo114, useState as useState74 } from "react";
21919
21923
  import { SourceMapConsumer as SourceMapConsumer3 } from "source-map";
21920
21924
  import { jsx as jsx203, jsxs as jsxs97, Fragment as Fragment30 } from "react/jsx-runtime";
21921
21925
  var publicPath = window.remotion_publicPath === "/" ? "" : window.remotion_publicPath;
@@ -21924,11 +21928,11 @@ SourceMapConsumer3.initialize({
21924
21928
  "lib/mappings.wasm": withoutSlashInTheEnd + SOURCE_MAP_ENDPOINT
21925
21929
  });
21926
21930
  var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
21927
- const [stackHovered, setStackHovered] = useState75(false);
21928
- const [titleHovered, setTitleHovered] = useState75(false);
21929
- const [opening, setOpening] = useState75(false);
21931
+ const [stackHovered, setStackHovered] = useState74(false);
21932
+ const [titleHovered, setTitleHovered] = useState74(false);
21933
+ const [opening, setOpening] = useState74(false);
21930
21934
  const selectAsset = useSelectAsset();
21931
- const connectionStatus = useContext72(StudioServerConnectionCtx).previewServerState.type;
21935
+ const connectionStatus = useContext71(StudioServerConnectionCtx).previewServerState.type;
21932
21936
  const assetPath = useMemo114(() => {
21933
21937
  if (sequence.type !== "video" && sequence.type !== "audio" && sequence.type !== "image") {
21934
21938
  return null;
@@ -22079,15 +22083,15 @@ var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
22079
22083
  // src/components/Timeline/use-sequence-props-subscription.ts
22080
22084
  import {
22081
22085
  useCallback as useCallback109,
22082
- useContext as useContext73,
22086
+ useContext as useContext72,
22083
22087
  useEffect as useEffect66,
22084
22088
  useMemo as useMemo115,
22085
22089
  useRef as useRef38,
22086
- useState as useState76
22090
+ useState as useState75
22087
22091
  } from "react";
22088
22092
  import { Internals as Internals49 } from "remotion";
22089
22093
  var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnabled) => {
22090
- const { setCodeValues } = useContext73(Internals49.VisualModeOverridesContext);
22094
+ const { setCodeValues } = useContext72(Internals49.VisualModeOverridesContext);
22091
22095
  const overrideId = sequence.controls?.overrideId ?? null;
22092
22096
  const setPropStatusesForSequence = useCallback109((statuses) => {
22093
22097
  if (!overrideId) {
@@ -22095,7 +22099,7 @@ var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnable
22095
22099
  }
22096
22100
  setCodeValues(overrideId, statuses);
22097
22101
  }, [overrideId, setCodeValues]);
22098
- const { previewServerState: state, subscribeToEvent } = useContext73(StudioServerConnectionCtx);
22102
+ const { previewServerState: state, subscribeToEvent } = useContext72(StudioServerConnectionCtx);
22099
22103
  const clientId = state.type === "connected" ? state.clientId : undefined;
22100
22104
  const schemaFields = useMemo115(() => getSchemaFields(sequence.controls), [sequence.controls]);
22101
22105
  const schemaKeysString = useMemo115(() => schemaFields ? schemaFields.map((f) => f.key).join(",") : null, [schemaFields]);
@@ -22119,8 +22123,8 @@ var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnable
22119
22123
  const currentLocationColumn = useRef38(locationColumn);
22120
22124
  currentLocationColumn.current = locationColumn;
22121
22125
  const nodePathRef = useRef38(null);
22122
- const [nodePath, setNodePath] = useState76(null);
22123
- const [jsxInMapCallback, setJsxInMapCallback] = useState76(false);
22126
+ const [nodePath, setNodePath] = useState75(null);
22127
+ const [jsxInMapCallback, setJsxInMapCallback] = useState75(false);
22124
22128
  const isMountedRef = useRef38(true);
22125
22129
  const setNodePathBoth = useCallback109((next) => {
22126
22130
  nodePathRef.current = next;
@@ -22261,12 +22265,12 @@ var arrowButton = {
22261
22265
  lineHeight: 1
22262
22266
  };
22263
22267
  var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
22264
- const { previewServerState } = useContext74(StudioServerConnectionCtx);
22268
+ const { previewServerState } = useContext73(StudioServerConnectionCtx);
22265
22269
  const visualModeEnvEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED);
22266
22270
  const previewConnected = previewServerState.type === "connected";
22267
22271
  const visualModeActive = visualModeEnvEnabled && previewConnected;
22268
- const { hidden, setHidden } = useContext74(Internals50.SequenceVisibilityToggleContext);
22269
- const { expandedTracks, toggleTrack } = useContext74(ExpandedTracksContext);
22272
+ const { hidden, setHidden } = useContext73(Internals50.SequenceVisibilityToggleContext);
22273
+ const { expandedTracks, toggleTrack } = useContext73(ExpandedTracksContext);
22270
22274
  const originalLocation = useResolvedStack(sequence.stack ?? null);
22271
22275
  const { nodePath, jsxInMapCallback } = useSequencePropsSubscription(sequence, originalLocation, visualModeActive);
22272
22276
  const validatedLocation = useMemo116(() => {
@@ -22469,7 +22473,7 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
22469
22473
  };
22470
22474
 
22471
22475
  // src/components/Timeline/TimelineTimeIndicators.tsx
22472
- import { useContext as useContext75, useEffect as useEffect68, useMemo as useMemo117, useRef as useRef40 } from "react";
22476
+ import { useContext as useContext74, useEffect as useEffect68, useMemo as useMemo117, useRef as useRef40 } from "react";
22473
22477
  import { Internals as Internals52 } from "remotion";
22474
22478
 
22475
22479
  // src/components/TimeValue.tsx
@@ -22624,7 +22628,7 @@ var TimelineTimePadding = () => {
22624
22628
  });
22625
22629
  };
22626
22630
  var TimelineTimeIndicators = () => {
22627
- const sliderTrack = useContext75(TimelineWidthContext);
22631
+ const sliderTrack = useContext74(TimelineWidthContext);
22628
22632
  const video = Internals52.useVideo();
22629
22633
  if (sliderTrack === null) {
22630
22634
  return null;
@@ -22747,15 +22751,15 @@ var TimelineList = ({ timeline }) => {
22747
22751
  };
22748
22752
 
22749
22753
  // src/components/Timeline/TimelinePinchZoom.tsx
22750
- import { useCallback as useCallback112, useContext as useContext76, useEffect as useEffect69, useRef as useRef42 } from "react";
22754
+ import { useCallback as useCallback112, useContext as useContext75, useEffect as useEffect69, useRef as useRef42 } from "react";
22751
22755
  import { Internals as Internals53 } from "remotion";
22752
22756
  var ZOOM_WHEEL_DELTA = 0.06;
22753
22757
  var TimelinePinchZoom = () => {
22754
22758
  const isVideoComposition = useIsVideoComposition();
22755
22759
  const videoConfig = Internals53.useUnsafeVideoConfig();
22756
- const { canvasContent } = useContext76(Internals53.CompositionManager);
22757
- const { zoom, setZoom } = useContext76(TimelineZoomCtx);
22758
- const { editorZoomGestures } = useContext76(EditorZoomGesturesContext);
22760
+ const { canvasContent } = useContext75(Internals53.CompositionManager);
22761
+ const { zoom, setZoom } = useContext75(TimelineZoomCtx);
22762
+ const { editorZoomGestures } = useContext75(EditorZoomGesturesContext);
22759
22763
  const zoomRef = useRef42(zoom);
22760
22764
  zoomRef.current = zoom;
22761
22765
  const pinchBaseZoomRef = useRef42(null);
@@ -22964,15 +22968,15 @@ var TimelinePinchZoom = () => {
22964
22968
  };
22965
22969
 
22966
22970
  // src/components/Timeline/TimelinePlayCursorSyncer.tsx
22967
- import { useContext as useContext77, useEffect as useEffect70 } from "react";
22971
+ import { useContext as useContext76, useEffect as useEffect70 } from "react";
22968
22972
  import { Internals as Internals54 } from "remotion";
22969
22973
  var lastTimelinePositionWhileScrolling = null;
22970
22974
  var TimelinePlayCursorSyncer = () => {
22971
22975
  const video = Internals54.useVideo();
22972
22976
  const timelineContext = Internals54.useTimelineContext();
22973
22977
  const timelinePosition = Internals54.Timeline.useTimelinePosition();
22974
- const { canvasContent } = useContext77(Internals54.CompositionManager);
22975
- const { zoom: zoomMap } = useContext77(TimelineZoomCtx);
22978
+ const { canvasContent } = useContext76(Internals54.CompositionManager);
22979
+ const { zoom: zoomMap } = useContext76(TimelineZoomCtx);
22976
22980
  const compositionId = canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null;
22977
22981
  const zoom = compositionId ? zoomMap[compositionId] ?? TIMELINE_MIN_ZOOM : null;
22978
22982
  if (zoom && video) {
@@ -23058,10 +23062,10 @@ var TimelineScrollable = ({ children }) => {
23058
23062
  };
23059
23063
 
23060
23064
  // src/components/Timeline/TimelineTracks.tsx
23061
- import { useContext as useContext79, useMemo as useMemo122 } from "react";
23065
+ import { useContext as useContext78, useMemo as useMemo122 } from "react";
23062
23066
 
23063
23067
  // src/components/Timeline/TimelineSequence.tsx
23064
- import { useContext as useContext78, useMemo as useMemo121 } from "react";
23068
+ import { useContext as useContext77, useMemo as useMemo121 } from "react";
23065
23069
  import { Internals as Internals56, useCurrentFrame as useCurrentFrame2 } from "remotion";
23066
23070
 
23067
23071
  // src/helpers/get-timeline-sequence-layout.ts
@@ -23133,7 +23137,7 @@ var getTimelineSequenceLayout = ({
23133
23137
  // src/helpers/use-max-media-duration.ts
23134
23138
  import { getVideoMetadata as getVideoMetadata2 } from "@remotion/media-utils";
23135
23139
  import { ALL_FORMATS as ALL_FORMATS2, Input as Input2, InputDisposedError, UrlSource as UrlSource2 } from "mediabunny";
23136
- import { useEffect as useEffect71, useState as useState77 } from "react";
23140
+ import { useEffect as useEffect71, useState as useState76 } from "react";
23137
23141
  var cache = new Map;
23138
23142
  var getSrc = (s) => {
23139
23143
  if (s.type === "video") {
@@ -23146,7 +23150,7 @@ var getSrc = (s) => {
23146
23150
  };
23147
23151
  var useMaxMediaDuration = (s, fps) => {
23148
23152
  const src = getSrc(s);
23149
- const [maxMediaDuration, setMaxMediaDuration] = useState77(src ? cache.get(src) ?? null : Infinity);
23153
+ const [maxMediaDuration, setMaxMediaDuration] = useState76(src ? cache.get(src) ?? null : Infinity);
23150
23154
  useEffect71(() => {
23151
23155
  if (!src) {
23152
23156
  return;
@@ -23179,9 +23183,16 @@ var useMaxMediaDuration = (s, fps) => {
23179
23183
  };
23180
23184
 
23181
23185
  // src/components/AudioWaveform.tsx
23182
- import { useEffect as useEffect72, useMemo as useMemo119, useRef as useRef43, useState as useState78 } from "react";
23186
+ import { useEffect as useEffect72, useMemo as useMemo119, useRef as useRef43, useState as useState77 } from "react";
23183
23187
  import { Internals as Internals55 } from "remotion";
23184
23188
 
23189
+ // src/make-audio-waveform-worker.ts
23190
+ var makeAudioWaveformWorker = () => {
23191
+ return new Worker(new URL("./audio-waveform-worker.mjs", import.meta.url), {
23192
+ type: "module"
23193
+ });
23194
+ };
23195
+
23185
23196
  // src/components/parse-color.ts
23186
23197
  var colorCache = new Map;
23187
23198
  var parseColor = (color) => {
@@ -23257,12 +23268,107 @@ var drawBars = (canvas, peaks, color, volume, width) => {
23257
23268
 
23258
23269
  // src/components/load-waveform-peaks.ts
23259
23270
  import { ALL_FORMATS as ALL_FORMATS3, AudioSampleSink, Input as Input3, UrlSource as UrlSource3 } from "mediabunny";
23271
+
23272
+ // src/components/waveform-peak-processor.ts
23273
+ var emitWaveformProgress = ({
23274
+ completedPeaks,
23275
+ final,
23276
+ onProgress,
23277
+ peaks,
23278
+ totalPeaks
23279
+ }) => {
23280
+ onProgress?.({
23281
+ peaks,
23282
+ completedPeaks,
23283
+ totalPeaks,
23284
+ final
23285
+ });
23286
+ };
23287
+ var createWaveformPeakProcessor = ({
23288
+ totalPeaks,
23289
+ samplesPerPeak,
23290
+ onProgress,
23291
+ progressIntervalInMs,
23292
+ now
23293
+ }) => {
23294
+ const peaks = new Float32Array(totalPeaks);
23295
+ let peakIndex = 0;
23296
+ let peakMax = 0;
23297
+ let sampleInPeak = 0;
23298
+ let lastProgressAt = 0;
23299
+ let lastProgressPeak = 0;
23300
+ const emitProgress = (force) => {
23301
+ const timestamp = now();
23302
+ if (!force && peakIndex === lastProgressPeak && sampleInPeak === 0) {
23303
+ return;
23304
+ }
23305
+ if (!force && timestamp - lastProgressAt < progressIntervalInMs) {
23306
+ return;
23307
+ }
23308
+ lastProgressAt = timestamp;
23309
+ lastProgressPeak = peakIndex;
23310
+ emitWaveformProgress({
23311
+ peaks,
23312
+ completedPeaks: peakIndex,
23313
+ totalPeaks,
23314
+ final: force,
23315
+ onProgress
23316
+ });
23317
+ };
23318
+ return {
23319
+ peaks,
23320
+ processSampleChunk: (floats, channels) => {
23321
+ const frameCount = Math.floor(floats.length / Math.max(1, channels));
23322
+ for (let frame2 = 0;frame2 < frameCount; frame2++) {
23323
+ let framePeak = 0;
23324
+ for (let channel = 0;channel < channels; channel++) {
23325
+ const sampleIndex = frame2 * channels + channel;
23326
+ const abs = Math.abs(floats[sampleIndex] ?? 0);
23327
+ if (abs > framePeak) {
23328
+ framePeak = abs;
23329
+ }
23330
+ }
23331
+ if (framePeak > peakMax) {
23332
+ peakMax = framePeak;
23333
+ }
23334
+ sampleInPeak++;
23335
+ if (sampleInPeak >= samplesPerPeak) {
23336
+ if (peakIndex < totalPeaks) {
23337
+ peaks[peakIndex] = peakMax;
23338
+ }
23339
+ peakIndex++;
23340
+ peakMax = 0;
23341
+ sampleInPeak = 0;
23342
+ }
23343
+ }
23344
+ emitProgress(false);
23345
+ },
23346
+ finalize: () => {
23347
+ if (sampleInPeak > 0 && peakIndex < totalPeaks) {
23348
+ peaks[peakIndex] = peakMax;
23349
+ peakIndex++;
23350
+ }
23351
+ emitProgress(true);
23352
+ }
23353
+ };
23354
+ };
23355
+
23356
+ // src/components/load-waveform-peaks.ts
23260
23357
  var TARGET_SAMPLE_RATE = 100;
23358
+ var DEFAULT_PROGRESS_INTERVAL_IN_MS = 50;
23261
23359
  var peaksCache = new Map;
23262
- async function loadWaveformPeaks(url, signal) {
23360
+ async function loadWaveformPeaks(url, signal, options) {
23263
23361
  const cached = peaksCache.get(url);
23264
- if (cached)
23362
+ if (cached) {
23363
+ emitWaveformProgress({
23364
+ peaks: cached,
23365
+ completedPeaks: cached.length,
23366
+ totalPeaks: cached.length,
23367
+ final: true,
23368
+ onProgress: options?.onProgress
23369
+ });
23265
23370
  return cached;
23371
+ }
23266
23372
  const input2 = new Input3({
23267
23373
  formats: ALL_FORMATS3,
23268
23374
  source: new UrlSource3(url)
@@ -23275,12 +23381,15 @@ async function loadWaveformPeaks(url, signal) {
23275
23381
  const { sampleRate } = audioTrack;
23276
23382
  const durationInSeconds = await audioTrack.computeDuration();
23277
23383
  const totalPeaks = Math.ceil(durationInSeconds * TARGET_SAMPLE_RATE);
23278
- const samplesPerPeak = Math.floor(sampleRate / TARGET_SAMPLE_RATE);
23279
- const peaks = new Float32Array(totalPeaks);
23280
- let peakIndex = 0;
23281
- let peakMax = 0;
23282
- let sampleInPeak = 0;
23384
+ const samplesPerPeak = Math.max(1, Math.floor(sampleRate / TARGET_SAMPLE_RATE));
23283
23385
  const sink = new AudioSampleSink(audioTrack);
23386
+ const processor = createWaveformPeakProcessor({
23387
+ totalPeaks,
23388
+ samplesPerPeak,
23389
+ onProgress: options?.onProgress,
23390
+ progressIntervalInMs: options?.progressIntervalInMs ?? DEFAULT_PROGRESS_INTERVAL_IN_MS,
23391
+ now: () => Date.now()
23392
+ });
23284
23393
  for await (const sample of sink.samples()) {
23285
23394
  if (signal.aborted) {
23286
23395
  sample.close();
@@ -23292,25 +23401,12 @@ async function loadWaveformPeaks(url, signal) {
23292
23401
  });
23293
23402
  const floats = new Float32Array(bytesNeeded / 4);
23294
23403
  sample.copyTo(floats, { format: "f32", planeIndex: 0 });
23404
+ const channels = Math.max(1, sample.numberOfChannels);
23295
23405
  sample.close();
23296
- for (let i = 0;i < floats.length; i++) {
23297
- const abs = Math.abs(floats[i]);
23298
- if (abs > peakMax)
23299
- peakMax = abs;
23300
- sampleInPeak++;
23301
- if (sampleInPeak >= samplesPerPeak) {
23302
- if (peakIndex < totalPeaks) {
23303
- peaks[peakIndex] = peakMax;
23304
- }
23305
- peakIndex++;
23306
- peakMax = 0;
23307
- sampleInPeak = 0;
23308
- }
23309
- }
23310
- }
23311
- if (sampleInPeak > 0 && peakIndex < totalPeaks) {
23312
- peaks[peakIndex] = peakMax;
23406
+ processor.processSampleChunk(floats, channels);
23313
23407
  }
23408
+ processor.finalize();
23409
+ const { peaks } = processor;
23314
23410
  peaksCache.set(url, peaks);
23315
23411
  return peaks;
23316
23412
  } finally {
@@ -23318,8 +23414,50 @@ async function loadWaveformPeaks(url, signal) {
23318
23414
  }
23319
23415
  }
23320
23416
 
23417
+ // src/components/looped-media-timeline.ts
23418
+ var shouldTileLoopDisplay = (loopDisplay) => {
23419
+ return loopDisplay !== undefined && loopDisplay.numberOfTimes > 1;
23420
+ };
23421
+ var getLoopDisplayWidth = ({
23422
+ visualizationWidth,
23423
+ loopDisplay
23424
+ }) => {
23425
+ if (!shouldTileLoopDisplay(loopDisplay)) {
23426
+ return visualizationWidth;
23427
+ }
23428
+ return visualizationWidth / loopDisplay.numberOfTimes;
23429
+ };
23430
+
23431
+ // src/components/slice-waveform-peaks.ts
23432
+ var sliceWaveformPeaks = ({
23433
+ durationInFrames,
23434
+ fps,
23435
+ peaks,
23436
+ playbackRate,
23437
+ startFrom
23438
+ }) => {
23439
+ if (peaks.length === 0) {
23440
+ return peaks;
23441
+ }
23442
+ const startTimeInSeconds = startFrom / fps;
23443
+ const durationInSeconds = durationInFrames / fps * playbackRate;
23444
+ const startPeakIndex = Math.floor(startTimeInSeconds * TARGET_SAMPLE_RATE);
23445
+ const endPeakIndex = Math.ceil((startTimeInSeconds + durationInSeconds) * TARGET_SAMPLE_RATE);
23446
+ return peaks.subarray(Math.max(0, startPeakIndex), Math.min(peaks.length, endPeakIndex));
23447
+ };
23448
+
23321
23449
  // src/components/AudioWaveform.tsx
23322
23450
  import { jsx as jsx209, jsxs as jsxs101 } from "react/jsx-runtime";
23451
+ var EMPTY_PEAKS = new Float32Array(0);
23452
+ var canRetryCanvasTransfer = (err) => {
23453
+ return err instanceof DOMException && err.name === "InvalidStateError";
23454
+ };
23455
+ var canUseAudioWaveformWorker = () => {
23456
+ if (typeof Worker === "undefined" || typeof OffscreenCanvas === "undefined" || typeof HTMLCanvasElement === "undefined") {
23457
+ return false;
23458
+ }
23459
+ return "transferControlToOffscreen" in HTMLCanvasElement.prototype;
23460
+ };
23323
23461
  var container42 = {
23324
23462
  display: "flex",
23325
23463
  flexDirection: "row",
@@ -23338,11 +23476,41 @@ var errorMessage = {
23338
23476
  opacity: 0.75
23339
23477
  };
23340
23478
  var waveformCanvasStyle = {
23341
- pointerEvents: "none"
23479
+ pointerEvents: "none",
23480
+ width: "100%",
23481
+ height: "100%"
23342
23482
  };
23343
23483
  var volumeCanvasStyle = {
23344
23484
  position: "absolute"
23345
23485
  };
23486
+ var drawLoopedWaveform = ({
23487
+ canvas,
23488
+ peaks,
23489
+ volume,
23490
+ visualizationWidth,
23491
+ loopWidth
23492
+ }) => {
23493
+ const h = canvas.height;
23494
+ const w = Math.ceil(visualizationWidth);
23495
+ const targetCanvas = document.createElement("canvas");
23496
+ targetCanvas.width = Math.max(1, Math.ceil(loopWidth));
23497
+ targetCanvas.height = h;
23498
+ drawBars(targetCanvas, peaks, "rgba(255, 255, 255, 0.6)", volume, targetCanvas.width);
23499
+ canvas.width = w;
23500
+ canvas.height = h;
23501
+ const ctx = canvas.getContext("2d");
23502
+ if (!ctx) {
23503
+ throw new Error("Failed to get canvas context");
23504
+ }
23505
+ const pattern = ctx.createPattern(targetCanvas, "repeat-x");
23506
+ if (!pattern) {
23507
+ return;
23508
+ }
23509
+ pattern.setTransform(new DOMMatrix().scaleSelf(loopWidth / targetCanvas.width, 1));
23510
+ ctx.clearRect(0, 0, w, h);
23511
+ ctx.fillStyle = pattern;
23512
+ ctx.fillRect(0, 0, w, h);
23513
+ };
23346
23514
  var AudioWaveform = ({
23347
23515
  src,
23348
23516
  startFrom,
@@ -23350,10 +23518,13 @@ var AudioWaveform = ({
23350
23518
  visualizationWidth,
23351
23519
  volume,
23352
23520
  doesVolumeChange,
23353
- playbackRate
23521
+ playbackRate,
23522
+ loopDisplay
23354
23523
  }) => {
23355
- const [peaks, setPeaks] = useState78(null);
23356
- const [error, setError] = useState78(null);
23524
+ const [peaks, setPeaks] = useState77(null);
23525
+ const [error, setError] = useState77(null);
23526
+ const [waveformCanvasKey, setWaveformCanvasKey] = useState77(0);
23527
+ const canUseWorkerPath = useMemo119(() => canUseAudioWaveformWorker(), []);
23357
23528
  const vidConf = Internals55.useUnsafeVideoConfig();
23358
23529
  if (vidConf === null) {
23359
23530
  throw new Error("Expected video config");
@@ -23361,8 +23532,15 @@ var AudioWaveform = ({
23361
23532
  const containerRef = useRef43(null);
23362
23533
  const waveformCanvas = useRef43(null);
23363
23534
  const volumeCanvas = useRef43(null);
23535
+ const waveformWorker = useRef43(null);
23536
+ const hasTransferredCanvas = useRef43(false);
23537
+ const latestRequestId = useRef43(0);
23364
23538
  useEffect72(() => {
23539
+ if (canUseWorkerPath) {
23540
+ return;
23541
+ }
23365
23542
  const controller = new AbortController;
23543
+ setPeaks(null);
23366
23544
  setError(null);
23367
23545
  loadWaveformPeaks(src, controller.signal).then((p) => {
23368
23546
  if (!controller.signal.aborted) {
@@ -23374,30 +23552,127 @@ var AudioWaveform = ({
23374
23552
  }
23375
23553
  });
23376
23554
  return () => controller.abort();
23377
- }, [src]);
23555
+ }, [canUseWorkerPath, src]);
23556
+ useEffect72(() => {
23557
+ if (!canUseWorkerPath) {
23558
+ return;
23559
+ }
23560
+ const canvasElement = waveformCanvas.current;
23561
+ if (!canvasElement || hasTransferredCanvas.current) {
23562
+ return;
23563
+ }
23564
+ const worker = makeAudioWaveformWorker();
23565
+ waveformWorker.current = worker;
23566
+ worker.addEventListener("message", (event) => {
23567
+ if (event.data.type === "error") {
23568
+ if (event.data.requestId !== latestRequestId.current) {
23569
+ return;
23570
+ }
23571
+ setError(new Error(event.data.message));
23572
+ }
23573
+ });
23574
+ let offscreen;
23575
+ try {
23576
+ offscreen = canvasElement.transferControlToOffscreen();
23577
+ } catch (err) {
23578
+ worker.terminate();
23579
+ waveformWorker.current = null;
23580
+ if (canRetryCanvasTransfer(err)) {
23581
+ setWaveformCanvasKey((key4) => key4 + 1);
23582
+ return;
23583
+ }
23584
+ throw err;
23585
+ }
23586
+ hasTransferredCanvas.current = true;
23587
+ worker.postMessage({ type: "init", canvas: offscreen }, [offscreen]);
23588
+ return () => {
23589
+ worker.postMessage({ type: "dispose" });
23590
+ worker.terminate();
23591
+ waveformWorker.current = null;
23592
+ hasTransferredCanvas.current = false;
23593
+ };
23594
+ }, [canUseWorkerPath, waveformCanvasKey]);
23378
23595
  const portionPeaks = useMemo119(() => {
23379
- if (!peaks || peaks.length === 0) {
23596
+ if (canUseWorkerPath || !peaks) {
23380
23597
  return null;
23381
23598
  }
23382
- const startTimeInSeconds = startFrom / vidConf.fps;
23383
- const durationInSeconds = durationInFrames / vidConf.fps * playbackRate;
23384
- const startPeakIndex = Math.floor(startTimeInSeconds * TARGET_SAMPLE_RATE);
23385
- const endPeakIndex = Math.ceil((startTimeInSeconds + durationInSeconds) * TARGET_SAMPLE_RATE);
23386
- return peaks.slice(Math.max(0, startPeakIndex), Math.min(peaks.length, endPeakIndex));
23387
- }, [peaks, startFrom, durationInFrames, vidConf.fps, playbackRate]);
23599
+ return sliceWaveformPeaks({
23600
+ durationInFrames: shouldTileLoopDisplay(loopDisplay) ? loopDisplay.durationInFrames : durationInFrames,
23601
+ fps: vidConf.fps,
23602
+ peaks,
23603
+ playbackRate,
23604
+ startFrom
23605
+ });
23606
+ }, [
23607
+ canUseWorkerPath,
23608
+ durationInFrames,
23609
+ loopDisplay,
23610
+ peaks,
23611
+ playbackRate,
23612
+ startFrom,
23613
+ vidConf.fps
23614
+ ]);
23388
23615
  useEffect72(() => {
23389
23616
  const { current: canvasElement } = waveformCanvas;
23390
23617
  const { current: containerElement } = containerRef;
23391
- if (!canvasElement || !containerElement || !portionPeaks || portionPeaks.length === 0) {
23618
+ if (!canvasElement || !containerElement) {
23392
23619
  return;
23393
23620
  }
23394
23621
  const h = containerElement.clientHeight;
23395
23622
  const w = Math.ceil(visualizationWidth);
23623
+ const vol = typeof volume === "number" ? volume : 1;
23624
+ if (canUseWorkerPath) {
23625
+ const worker = waveformWorker.current;
23626
+ if (!worker || !hasTransferredCanvas.current) {
23627
+ return;
23628
+ }
23629
+ latestRequestId.current += 1;
23630
+ setError(null);
23631
+ const message = {
23632
+ type: "render",
23633
+ requestId: latestRequestId.current,
23634
+ src,
23635
+ width: w,
23636
+ height: h,
23637
+ volume: vol,
23638
+ startFrom,
23639
+ durationInFrames,
23640
+ fps: vidConf.fps,
23641
+ playbackRate,
23642
+ loopDisplay
23643
+ };
23644
+ worker.postMessage(message);
23645
+ return;
23646
+ }
23396
23647
  canvasElement.width = w;
23397
23648
  canvasElement.height = h;
23398
- const vol = typeof volume === "number" ? volume : 1;
23399
- drawBars(canvasElement, portionPeaks, "rgba(255, 255, 255, 0.6)", vol, w);
23400
- }, [portionPeaks, visualizationWidth, volume]);
23649
+ if (shouldTileLoopDisplay(loopDisplay)) {
23650
+ drawLoopedWaveform({
23651
+ canvas: canvasElement,
23652
+ peaks: portionPeaks ?? EMPTY_PEAKS,
23653
+ volume: vol,
23654
+ visualizationWidth,
23655
+ loopWidth: getLoopDisplayWidth({
23656
+ visualizationWidth,
23657
+ loopDisplay
23658
+ })
23659
+ });
23660
+ } else {
23661
+ drawBars(canvasElement, portionPeaks ?? EMPTY_PEAKS, "rgba(255, 255, 255, 0.6)", vol, w);
23662
+ }
23663
+ }, [
23664
+ canUseWorkerPath,
23665
+ durationInFrames,
23666
+ loopDisplay,
23667
+ playbackRate,
23668
+ portionPeaks,
23669
+ src,
23670
+ startFrom,
23671
+ vidConf.fps,
23672
+ visualizationWidth,
23673
+ volume,
23674
+ waveformCanvasKey
23675
+ ]);
23401
23676
  useEffect72(() => {
23402
23677
  const { current: volumeCanvasElement } = volumeCanvas;
23403
23678
  const { current: containerElement } = containerRef;
@@ -23439,7 +23714,7 @@ var AudioWaveform = ({
23439
23714
  })
23440
23715
  });
23441
23716
  }
23442
- if (!peaks) {
23717
+ if (!canUseWorkerPath && !peaks) {
23443
23718
  return null;
23444
23719
  }
23445
23720
  return /* @__PURE__ */ jsxs101("div", {
@@ -23449,7 +23724,7 @@ var AudioWaveform = ({
23449
23724
  /* @__PURE__ */ jsx209("canvas", {
23450
23725
  ref: waveformCanvas,
23451
23726
  style: waveformCanvasStyle
23452
- }),
23727
+ }, waveformCanvasKey),
23453
23728
  /* @__PURE__ */ jsx209("canvas", {
23454
23729
  ref: volumeCanvas,
23455
23730
  style: volumeCanvasStyle
@@ -23472,7 +23747,8 @@ var width = {
23472
23747
  position: "relative"
23473
23748
  };
23474
23749
  var icon4 = {
23475
- height: 12
23750
+ height: 12,
23751
+ filter: "drop-shadow(0 0 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8))"
23476
23752
  };
23477
23753
  var Icon = () => /* @__PURE__ */ jsx210("svg", {
23478
23754
  viewBox: "0 0 512 512",
@@ -23482,44 +23758,23 @@ var Icon = () => /* @__PURE__ */ jsx210("svg", {
23482
23758
  d: "M512 256c0 88.224-71.775 160-160 160H170.067l34.512 32.419c9.875 9.276 10.119 24.883.539 34.464l-10.775 10.775c-9.373 9.372-24.568 9.372-33.941 0l-92.686-92.686c-9.373-9.373-9.373-24.568 0-33.941l92.686-92.686c9.373-9.373 24.568-9.373 33.941 0l10.775 10.775c9.581 9.581 9.337 25.187-.539 34.464L170.067 352H352c52.935 0 96-43.065 96-96 0-13.958-2.996-27.228-8.376-39.204-4.061-9.039-2.284-19.626 4.723-26.633l12.183-12.183c11.499-11.499 30.965-8.526 38.312 5.982C505.814 205.624 512 230.103 512 256zM72.376 295.204C66.996 283.228 64 269.958 64 256c0-52.935 43.065-96 96-96h181.933l-34.512 32.419c-9.875 9.276-10.119 24.883-.539 34.464l10.775 10.775c9.373 9.372 24.568 9.372 33.941 0l92.686-92.686c9.373-9.373 9.373-24.568 0-33.941l-92.686-92.686c-9.373-9.373-24.568-9.373-33.941 0L306.882 29.12c-9.581 9.581-9.337 25.187.539 34.464L341.933 96H160C71.775 96 0 167.776 0 256c0 25.897 6.186 50.376 17.157 72.039 7.347 14.508 26.813 17.481 38.312 5.982l12.183-12.183c7.008-7.008 8.786-17.595 4.724-26.634z"
23483
23759
  })
23484
23760
  });
23485
- var topLine = {
23486
- top: 0,
23487
- height: 2,
23488
- width: 1,
23489
- background: LIGHT_COLOR
23490
- };
23491
- var bottomLine = {
23492
- top: 0,
23493
- height: 2,
23761
+ var verticalLine = {
23762
+ height: "100%",
23494
23763
  width: 1,
23495
- background: LIGHT_COLOR
23496
- };
23497
- var topContainer = {
23498
- justifyContent: "flex-start",
23499
- alignItems: "center"
23764
+ background: "rgb(255,255,255, 0.5)"
23500
23765
  };
23501
23766
  var centerContainer = {
23502
23767
  justifyContent: "center",
23503
23768
  alignItems: "center"
23504
23769
  };
23505
- var bottomContainer = {
23506
- justifyContent: "flex-end",
23507
- alignItems: "center"
23508
- };
23509
23770
  var LoopedIndicator = () => {
23510
23771
  return /* @__PURE__ */ jsxs102("div", {
23511
23772
  style: width,
23512
23773
  children: [
23513
23774
  /* @__PURE__ */ jsx210(AbsoluteFill3, {
23514
- style: topContainer,
23515
- children: /* @__PURE__ */ jsx210("div", {
23516
- style: topLine
23517
- })
23518
- }),
23519
- /* @__PURE__ */ jsx210(AbsoluteFill3, {
23520
- style: bottomContainer,
23775
+ style: centerContainer,
23521
23776
  children: /* @__PURE__ */ jsx210("div", {
23522
- style: bottomLine
23777
+ style: verticalLine
23523
23778
  })
23524
23779
  }),
23525
23780
  /* @__PURE__ */ jsx210(AbsoluteFill3, {
@@ -23633,7 +23888,7 @@ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
23633
23888
  };
23634
23889
 
23635
23890
  // src/components/Timeline/TimelineVideoInfo.tsx
23636
- import { useEffect as useEffect74, useMemo as useMemo120, useRef as useRef45, useState as useState79 } from "react";
23891
+ import { useEffect as useEffect74, useMemo as useMemo120, useRef as useRef45, useState as useState78 } from "react";
23637
23892
  import { useVideoConfig as useVideoConfig5 } from "remotion";
23638
23893
 
23639
23894
  // src/helpers/extract-frames.ts
@@ -23991,11 +24246,12 @@ var TimelineVideoInfo = ({
23991
24246
  volume,
23992
24247
  doesVolumeChange,
23993
24248
  premountWidth,
23994
- postmountWidth
24249
+ postmountWidth,
24250
+ loopDisplay
23995
24251
  }) => {
23996
24252
  const { fps } = useVideoConfig5();
23997
24253
  const ref2 = useRef45(null);
23998
- const [error, setError] = useState79(null);
24254
+ const [error, setError] = useState78(null);
23999
24255
  const aspectRatio = useRef45(getAspectRatioFromCache(src));
24000
24256
  useEffect74(() => {
24001
24257
  if (error) {
@@ -24014,25 +24270,54 @@ var TimelineVideoInfo = ({
24014
24270
  return;
24015
24271
  }
24016
24272
  current.appendChild(canvas);
24273
+ const loopWidth = getLoopDisplayWidth({
24274
+ visualizationWidth: naturalWidth,
24275
+ loopDisplay
24276
+ });
24277
+ const shouldRepeatVideo = shouldTileLoopDisplay(loopDisplay);
24278
+ const targetCanvas = shouldRepeatVideo ? document.createElement("canvas") : canvas;
24279
+ targetCanvas.width = shouldRepeatVideo ? Math.max(1, Math.ceil(loopWidth)) : canvas.width;
24280
+ targetCanvas.height = canvas.height;
24281
+ const targetCtx = shouldRepeatVideo ? targetCanvas.getContext("2d") : ctx;
24282
+ if (!targetCtx) {
24283
+ current.removeChild(canvas);
24284
+ return;
24285
+ }
24286
+ const repeatTarget = () => {
24287
+ if (!shouldRepeatVideo) {
24288
+ return;
24289
+ }
24290
+ const pattern = ctx.createPattern(targetCanvas, "repeat-x");
24291
+ if (!pattern) {
24292
+ return;
24293
+ }
24294
+ pattern.setTransform(new DOMMatrix().scaleSelf(loopWidth / targetCanvas.width, 1));
24295
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
24296
+ ctx.fillStyle = pattern;
24297
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
24298
+ };
24017
24299
  const filledSlots = new Map;
24018
24300
  const fromSeconds = trimBefore / fps;
24019
- const toSeconds = fromSeconds + durationInFrames * playbackRate / fps;
24301
+ const visibleDurationInFrames = shouldRepeatVideo && loopDisplay ? loopDisplay.durationInFrames : durationInFrames;
24302
+ const toSeconds = fromSeconds + visibleDurationInFrames * playbackRate / fps;
24303
+ const targetWidth = shouldRepeatVideo ? targetCanvas.width : naturalWidth;
24020
24304
  if (aspectRatio.current !== null) {
24021
24305
  ensureSlots({
24022
24306
  filledSlots,
24023
- naturalWidth,
24307
+ naturalWidth: targetWidth,
24024
24308
  fromSeconds,
24025
24309
  toSeconds,
24026
24310
  aspectRatio: aspectRatio.current
24027
24311
  });
24028
24312
  fillWithCachedFrames({
24029
- ctx,
24030
- naturalWidth,
24313
+ ctx: targetCtx,
24314
+ naturalWidth: targetWidth,
24031
24315
  filledSlots,
24032
24316
  src,
24033
24317
  segmentDuration: toSeconds - fromSeconds,
24034
24318
  fromSeconds
24035
24319
  });
24320
+ repeatTarget();
24036
24321
  const unfilled = Array.from(filledSlots.keys()).filter((timestamp) => !filledSlots.get(timestamp));
24037
24322
  if (unfilled.length === 0) {
24038
24323
  return () => {
@@ -24050,7 +24335,7 @@ var TimelineVideoInfo = ({
24050
24335
  filledSlots,
24051
24336
  fromSeconds,
24052
24337
  toSeconds,
24053
- naturalWidth,
24338
+ naturalWidth: targetWidth,
24054
24339
  aspectRatio: aspectRatio.current
24055
24340
  });
24056
24341
  return Array.from(filledSlots.keys()).map((timestamp) => timestamp / WEBCODECS_TIMESCALE);
@@ -24078,17 +24363,18 @@ var TimelineVideoInfo = ({
24078
24363
  filledSlots,
24079
24364
  fromSeconds,
24080
24365
  toSeconds,
24081
- naturalWidth,
24366
+ naturalWidth: targetWidth,
24082
24367
  aspectRatio: aspectRatio.current
24083
24368
  });
24084
24369
  fillFrameWhereItFits({
24085
- ctx,
24370
+ ctx: targetCtx,
24086
24371
  filledSlots,
24087
- visualizationWidth: naturalWidth,
24372
+ visualizationWidth: targetWidth,
24088
24373
  frame: transformed,
24089
24374
  segmentDuration: toSeconds - fromSeconds,
24090
24375
  fromSeconds
24091
24376
  });
24377
+ repeatTarget();
24092
24378
  } catch (e) {
24093
24379
  if (frame2) {
24094
24380
  frame2.close();
@@ -24104,13 +24390,14 @@ var TimelineVideoInfo = ({
24104
24390
  return;
24105
24391
  }
24106
24392
  fillWithCachedFrames({
24107
- ctx,
24108
- naturalWidth,
24393
+ ctx: targetCtx,
24394
+ naturalWidth: targetWidth,
24109
24395
  filledSlots,
24110
24396
  src,
24111
24397
  segmentDuration: toSeconds - fromSeconds,
24112
24398
  fromSeconds
24113
24399
  });
24400
+ repeatTarget();
24114
24401
  }).catch((e) => {
24115
24402
  setError(e);
24116
24403
  });
@@ -24122,6 +24409,7 @@ var TimelineVideoInfo = ({
24122
24409
  durationInFrames,
24123
24410
  error,
24124
24411
  fps,
24412
+ loopDisplay,
24125
24413
  naturalWidth,
24126
24414
  playbackRate,
24127
24415
  src,
@@ -24153,7 +24441,8 @@ var TimelineVideoInfo = ({
24153
24441
  durationInFrames,
24154
24442
  volume,
24155
24443
  doesVolumeChange,
24156
- playbackRate
24444
+ playbackRate,
24445
+ loopDisplay
24157
24446
  })
24158
24447
  })
24159
24448
  ]
@@ -24166,7 +24455,7 @@ var AUDIO_GRADIENT = "linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)";
24166
24455
  var VIDEO_GRADIENT = "linear-gradient(to top, #8e44ad, #9b59b6)";
24167
24456
  var IMAGE_GRADIENT = "linear-gradient(to top, #2980b9, #3498db)";
24168
24457
  var TimelineSequence = ({ s }) => {
24169
- const windowWidth = useContext78(TimelineWidthContext);
24458
+ const windowWidth = useContext77(TimelineWidthContext);
24170
24459
  if (windowWidth === null) {
24171
24460
  return null;
24172
24461
  }
@@ -24178,29 +24467,37 @@ var TimelineSequence = ({ s }) => {
24178
24467
  var Inner4 = ({ s, windowWidth }) => {
24179
24468
  const video = Internals56.useVideo();
24180
24469
  const maxMediaDuration = useMaxMediaDuration(s, video?.fps ?? 30);
24470
+ const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
24181
24471
  if (!video) {
24182
24472
  throw new TypeError("Expected video config");
24183
24473
  }
24184
24474
  const frame2 = useCurrentFrame2();
24185
24475
  const relativeFrame = frame2 - s.from;
24476
+ const displayDurationInFrames = s.loopDisplay ? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes : s.duration;
24186
24477
  const relativeFrameWithPremount = relativeFrame + (s.premountDisplay ?? 0);
24187
- const relativeFrameWithPostmount = relativeFrame - s.duration;
24478
+ const relativeFrameWithPostmount = relativeFrame - displayDurationInFrames;
24188
24479
  const roundedFrame = Math.round(relativeFrame * 100) / 100;
24189
- const isInRange = relativeFrame >= 0 && relativeFrame < s.duration;
24190
- const isPremounting = relativeFrameWithPremount >= 0 && relativeFrameWithPremount < s.duration && !isInRange;
24480
+ const isInRange = relativeFrame >= 0 && relativeFrame < displayDurationInFrames;
24481
+ const isPremounting = relativeFrameWithPremount >= 0 && relativeFrameWithPremount < displayDurationInFrames && !isInRange;
24191
24482
  const isPostmounting = relativeFrameWithPostmount >= 0 && relativeFrameWithPostmount < (s.postmountDisplay ?? 0) && !isInRange;
24192
24483
  const { marginLeft, width: width2, naturalWidth, premountWidth, postmountWidth } = useMemo121(() => {
24193
24484
  return getTimelineSequenceLayout({
24194
- durationInFrames: s.loopDisplay ? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes : s.duration,
24485
+ durationInFrames: displayDurationInFrames,
24195
24486
  startFrom: s.loopDisplay ? s.from + s.loopDisplay.startOffset : s.from,
24196
24487
  startFromMedia: s.type === "sequence" || s.type === "image" ? 0 : s.startMediaFrom,
24197
- maxMediaDuration,
24488
+ maxMediaDuration: effectiveMaxMediaDuration,
24198
24489
  video,
24199
24490
  windowWidth,
24200
24491
  premountDisplay: s.premountDisplay,
24201
24492
  postmountDisplay: s.postmountDisplay
24202
24493
  });
24203
- }, [maxMediaDuration, s, video, windowWidth]);
24494
+ }, [
24495
+ displayDurationInFrames,
24496
+ effectiveMaxMediaDuration,
24497
+ s,
24498
+ video,
24499
+ windowWidth
24500
+ ]);
24204
24501
  const style11 = useMemo121(() => {
24205
24502
  return {
24206
24503
  background: s.type === "audio" ? AUDIO_GRADIENT : s.type === "video" ? VIDEO_GRADIENT : s.type === "image" ? IMAGE_GRADIENT : BLUE,
@@ -24215,7 +24512,7 @@ var Inner4 = ({ s, windowWidth }) => {
24215
24512
  opacity: isInRange ? 1 : 0.5
24216
24513
  };
24217
24514
  }, [isInRange, marginLeft, s.type, width2]);
24218
- if (maxMediaDuration === null) {
24515
+ if (maxMediaDuration === null && !s.loopDisplay) {
24219
24516
  return null;
24220
24517
  }
24221
24518
  return /* @__PURE__ */ jsxs105("div", {
@@ -24258,7 +24555,8 @@ var Inner4 = ({ s, windowWidth }) => {
24258
24555
  startFrom: s.startMediaFrom,
24259
24556
  durationInFrames: s.duration,
24260
24557
  volume: s.volume,
24261
- playbackRate: s.playbackRate
24558
+ playbackRate: s.playbackRate,
24559
+ loopDisplay: s.loopDisplay
24262
24560
  }) : null,
24263
24561
  s.type === "video" ? /* @__PURE__ */ jsx215(TimelineVideoInfo, {
24264
24562
  src: s.src,
@@ -24270,7 +24568,8 @@ var Inner4 = ({ s, windowWidth }) => {
24270
24568
  volume: s.volume,
24271
24569
  doesVolumeChange: s.doesVolumeChange,
24272
24570
  premountWidth: premountWidth ?? 0,
24273
- postmountWidth: postmountWidth ?? 0
24571
+ postmountWidth: postmountWidth ?? 0,
24572
+ loopDisplay: s.loopDisplay
24274
24573
  }) : null,
24275
24574
  s.type === "image" ? /* @__PURE__ */ jsx215(TimelineImageInfo, {
24276
24575
  src: s.src,
@@ -24310,8 +24609,8 @@ var getExpandedPlaceholderStyle = (controls) => ({
24310
24609
  height: getExpandedTrackHeight(controls) + TIMELINE_ITEM_BORDER_BOTTOM
24311
24610
  });
24312
24611
  var TimelineTracks = ({ timeline, hasBeenCut }) => {
24313
- const { expandedTracks } = useContext79(ExpandedTracksContext);
24314
- const { previewServerState } = useContext79(StudioServerConnectionCtx);
24612
+ const { expandedTracks } = useContext78(ExpandedTracksContext);
24613
+ const { previewServerState } = useContext78(StudioServerConnectionCtx);
24315
24614
  const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24316
24615
  const timelineStyle = useMemo122(() => {
24317
24616
  return {
@@ -24369,9 +24668,9 @@ var noop3 = () => {
24369
24668
  return;
24370
24669
  };
24371
24670
  var TimelineInner = () => {
24372
- const { sequences } = useContext80(Internals57.SequenceManager);
24373
- const { expandedTracks } = useContext80(ExpandedTracksContext);
24374
- const { previewServerState } = useContext80(StudioServerConnectionCtx);
24671
+ const { sequences } = useContext79(Internals57.SequenceManager);
24672
+ const { expandedTracks } = useContext79(ExpandedTracksContext);
24673
+ const { previewServerState } = useContext79(StudioServerConnectionCtx);
24375
24674
  const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24376
24675
  const videoConfig = Internals57.useUnsafeVideoConfig();
24377
24676
  const videoConfigIsNull = videoConfig === null;
@@ -24485,7 +24784,7 @@ var container45 = {
24485
24784
  };
24486
24785
  var EditorContent = ({ readOnlyStudio, children }) => {
24487
24786
  const isStill = useIsStill();
24488
- const { canvasContent } = useContext81(Internals58.CompositionManager);
24787
+ const { canvasContent } = useContext80(Internals58.CompositionManager);
24489
24788
  const showTimeline = canvasContent !== null && !isStill && canvasContent.type === "composition";
24490
24789
  return /* @__PURE__ */ jsxs108("div", {
24491
24790
  style: container45,
@@ -24522,11 +24821,11 @@ var EditorContent = ({ readOnlyStudio, children }) => {
24522
24821
  };
24523
24822
 
24524
24823
  // src/components/GlobalKeybindings.tsx
24525
- import { useContext as useContext82, useEffect as useEffect75 } from "react";
24824
+ import { useContext as useContext81, useEffect as useEffect75 } from "react";
24526
24825
  var GlobalKeybindings = () => {
24527
24826
  const keybindings = useKeybinding();
24528
- const { setSelectedModal } = useContext82(ModalsContext);
24529
- const { setCheckerboard } = useContext82(CheckerboardContext);
24827
+ const { setSelectedModal } = useContext81(ModalsContext);
24828
+ const { setCheckerboard } = useContext81(CheckerboardContext);
24530
24829
  const { navigateToNextComposition, navigateToPreviousComposition } = useCompositionNavigation();
24531
24830
  useEffect75(() => {
24532
24831
  const nKey = keybindings.registerKeybinding({
@@ -24630,7 +24929,7 @@ var GlobalKeybindings = () => {
24630
24929
  };
24631
24930
 
24632
24931
  // src/components/Modals.tsx
24633
- import { useContext as useContext96 } from "react";
24932
+ import { useContext as useContext95 } from "react";
24634
24933
 
24635
24934
  // src/components/InstallPackage.tsx
24636
24935
  import {
@@ -24639,7 +24938,7 @@ import {
24639
24938
  extraPackages,
24640
24939
  installableMap
24641
24940
  } from "@remotion/studio-shared";
24642
- import React154, { useCallback as useCallback114, useContext as useContext84, useEffect as useEffect76 } from "react";
24941
+ import React154, { useCallback as useCallback114, useContext as useContext83, useEffect as useEffect76 } from "react";
24643
24942
  import { VERSION as VERSION2 } from "remotion";
24644
24943
 
24645
24944
  // src/api/install-package.ts
@@ -24727,10 +25026,10 @@ var ModalFooterContainer = ({ children }) => {
24727
25026
  };
24728
25027
 
24729
25028
  // src/components/NewComposition/DismissableModal.tsx
24730
- import { useCallback as useCallback113, useContext as useContext83 } from "react";
25029
+ import { useCallback as useCallback113, useContext as useContext82 } from "react";
24731
25030
  import { jsx as jsx223 } from "react/jsx-runtime";
24732
25031
  var DismissableModal = ({ children }) => {
24733
- const { setSelectedModal } = useContext83(ModalsContext);
25032
+ const { setSelectedModal } = useContext82(ModalsContext);
24734
25033
  const onQuit = useCallback113(() => {
24735
25034
  setSelectedModal(null);
24736
25035
  }, [setSelectedModal]);
@@ -24754,7 +25053,7 @@ var text2 = {
24754
25053
  var InstallPackageModal = ({ packageManager }) => {
24755
25054
  const [state, setState] = React154.useState({ type: "idle" });
24756
25055
  const [map, setMap] = React154.useState({});
24757
- const { previewServerState: ctx } = useContext84(StudioServerConnectionCtx);
25056
+ const { previewServerState: ctx } = useContext83(StudioServerConnectionCtx);
24758
25057
  const selectedPackages = Object.keys(map).filter((pkg) => map[pkg]);
24759
25058
  const onClick = useCallback114(async () => {
24760
25059
  if (state.type === "done") {
@@ -24924,10 +25223,10 @@ var InstallPackageModal = ({ packageManager }) => {
24924
25223
  };
24925
25224
 
24926
25225
  // src/components/NewComposition/DeleteComposition.tsx
24927
- import { useCallback as useCallback116, useContext as useContext87, useMemo as useMemo126 } from "react";
25226
+ import { useCallback as useCallback116, useContext as useContext86, useMemo as useMemo126 } from "react";
24928
25227
 
24929
25228
  // src/components/RenderModal/ResolveCompositionBeforeModal.tsx
24930
- import React155, { useContext as useContext85, useEffect as useEffect77, useMemo as useMemo125 } from "react";
25229
+ import React155, { useContext as useContext84, useEffect as useEffect77, useMemo as useMemo125 } from "react";
24931
25230
  import { Internals as Internals59 } from "remotion";
24932
25231
  import { jsx as jsx225, jsxs as jsxs111 } from "react/jsx-runtime";
24933
25232
  var loaderContainer2 = {
@@ -24949,7 +25248,7 @@ var loaderLabel2 = {
24949
25248
  var ResolvedCompositionContext = React155.createContext(null);
24950
25249
  var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
24951
25250
  const resolved = Internals59.useResolvedVideoConfig(compositionId);
24952
- const unresolvedContext = useContext85(Internals59.CompositionManager);
25251
+ const unresolvedContext = useContext84(Internals59.CompositionManager);
24953
25252
  const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
24954
25253
  useEffect77(() => {
24955
25254
  const { current } = Internals59.resolveCompositionsRef;
@@ -25009,7 +25308,7 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
25009
25308
  };
25010
25309
 
25011
25310
  // src/components/NewComposition/CodemodFooter.tsx
25012
- import { useCallback as useCallback115, useContext as useContext86, useEffect as useEffect78, useState as useState80 } from "react";
25311
+ import { useCallback as useCallback115, useContext as useContext85, useEffect as useEffect78, useState as useState79 } from "react";
25013
25312
 
25014
25313
  // src/components/NewComposition/DiffPreview.tsx
25015
25314
  import { jsx as jsx226, jsxs as jsxs112 } from "react/jsx-runtime";
@@ -25069,12 +25368,12 @@ var CodemodFooter = ({
25069
25368
  submitLabel,
25070
25369
  onSuccess
25071
25370
  }) => {
25072
- const [submitting, setSubmitting] = useState80(false);
25073
- const { setSelectedModal } = useContext86(ModalsContext);
25074
- const [codemodStatus, setCanApplyCodemod] = useState80({
25371
+ const [submitting, setSubmitting] = useState79(false);
25372
+ const { setSelectedModal } = useContext85(ModalsContext);
25373
+ const [codemodStatus, setCanApplyCodemod] = useState79({
25075
25374
  type: "loading"
25076
25375
  });
25077
- const [projectInfo, setProjectInfo] = useState80(null);
25376
+ const [projectInfo, setProjectInfo] = useState79(null);
25078
25377
  useEffect78(() => {
25079
25378
  const controller = new AbortController;
25080
25379
  getProjectInfo(controller.signal).then((info) => {
@@ -25195,7 +25494,7 @@ var content3 = {
25195
25494
  minWidth: 500
25196
25495
  };
25197
25496
  var DeleteCompositionLoaded = ({ compositionId }) => {
25198
- const context = useContext87(ResolvedCompositionContext);
25497
+ const context = useContext86(ResolvedCompositionContext);
25199
25498
  if (!context) {
25200
25499
  throw new Error("Resolved composition context");
25201
25500
  }
@@ -25270,7 +25569,7 @@ var DeleteComposition = ({ compositionId }) => {
25270
25569
  };
25271
25570
 
25272
25571
  // src/components/NewComposition/DuplicateComposition.tsx
25273
- import { useCallback as useCallback118, useContext as useContext88, useMemo as useMemo127, useState as useState81 } from "react";
25572
+ import { useCallback as useCallback118, useContext as useContext87, useMemo as useMemo127, useState as useState80 } from "react";
25274
25573
  import { Internals as Internals61 } from "remotion";
25275
25574
 
25276
25575
  // src/helpers/validate-new-comp-data.ts
@@ -25376,19 +25675,19 @@ var comboBoxStyle = {
25376
25675
  width: 190
25377
25676
  };
25378
25677
  var DuplicateCompositionLoaded = ({ initialType }) => {
25379
- const context = useContext88(ResolvedCompositionContext);
25678
+ const context = useContext87(ResolvedCompositionContext);
25380
25679
  if (!context) {
25381
25680
  throw new Error("Resolved composition context");
25382
25681
  }
25383
25682
  const { resolved, unresolved } = context;
25384
- const [initialCompType] = useState81(initialType);
25683
+ const [initialCompType] = useState80(initialType);
25385
25684
  const hadDimensionsDefined = unresolved.width && unresolved.height;
25386
25685
  const hadFpsDefined = unresolved.fps !== undefined;
25387
25686
  const hadDurationDefined = unresolved.durationInFrames !== undefined;
25388
- const [selectedFrameRate, setFrameRate] = useState81(resolved.result.fps);
25389
- const { compositions } = useContext88(Internals61.CompositionManager);
25390
- const [type, setType] = useState81(initialCompType);
25391
- const [newId, setName] = useState81(() => {
25687
+ const [selectedFrameRate, setFrameRate] = useState80(resolved.result.fps);
25688
+ const { compositions } = useContext87(Internals61.CompositionManager);
25689
+ const [type, setType] = useState80(initialCompType);
25690
+ const [newId, setName] = useState80(() => {
25392
25691
  const numberAtEnd = resolved.result.id.match(/([0-9]+)$/)?.[0];
25393
25692
  let prefix = numberAtEnd ? Number(numberAtEnd) : 1;
25394
25693
  const initialName = resolved.result.id.replace(/([0-9]+)$/, "");
@@ -25403,11 +25702,11 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
25403
25702
  }
25404
25703
  return currentName;
25405
25704
  });
25406
- const [size4, setSize] = useState81(() => ({
25705
+ const [size4, setSize] = useState80(() => ({
25407
25706
  width: resolved.result.width,
25408
25707
  height: resolved.result.height
25409
25708
  }));
25410
- const [durationInFrames, setDurationInFrames] = useState81(resolved.result.durationInFrames);
25709
+ const [durationInFrames, setDurationInFrames] = useState80(resolved.result.durationInFrames);
25411
25710
  const onTypeChanged = useCallback118((newType) => {
25412
25711
  setType(newType);
25413
25712
  }, []);
@@ -25733,7 +26032,7 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
25733
26032
  };
25734
26033
 
25735
26034
  // src/components/NewComposition/RenameComposition.tsx
25736
- import { useCallback as useCallback119, useContext as useContext89, useMemo as useMemo128, useState as useState82 } from "react";
26035
+ import { useCallback as useCallback119, useContext as useContext88, useMemo as useMemo128, useState as useState81 } from "react";
25737
26036
  import { Internals as Internals62 } from "remotion";
25738
26037
  import { jsx as jsx231, jsxs as jsxs117, Fragment as Fragment35 } from "react/jsx-runtime";
25739
26038
  var content5 = {
@@ -25744,13 +26043,13 @@ var content5 = {
25744
26043
  minWidth: 500
25745
26044
  };
25746
26045
  var RenameCompositionLoaded = () => {
25747
- const context = useContext89(ResolvedCompositionContext);
26046
+ const context = useContext88(ResolvedCompositionContext);
25748
26047
  if (!context) {
25749
26048
  throw new Error("Resolved composition context");
25750
26049
  }
25751
26050
  const { resolved } = context;
25752
- const { compositions } = useContext89(Internals62.CompositionManager);
25753
- const [newId, setName] = useState82(() => {
26051
+ const { compositions } = useContext88(Internals62.CompositionManager);
26052
+ const [newId, setName] = useState81(() => {
25754
26053
  return resolved.result.id;
25755
26054
  });
25756
26055
  const onNameChange = useCallback119((e) => {
@@ -25844,7 +26143,7 @@ var RenameComposition = ({ compositionId }) => {
25844
26143
  };
25845
26144
 
25846
26145
  // src/components/OverrideInputProps.tsx
25847
- import { useCallback as useCallback120, useContext as useContext90, useMemo as useMemo129, useState as useState83 } from "react";
26146
+ import { useCallback as useCallback120, useContext as useContext89, useMemo as useMemo129, useState as useState82 } from "react";
25848
26147
  import { Internals as Internals63 } from "remotion";
25849
26148
  import { jsx as jsx232, jsxs as jsxs118 } from "react/jsx-runtime";
25850
26149
  var style11 = {
@@ -25880,14 +26179,14 @@ var isValidJSON = (value) => {
25880
26179
  }
25881
26180
  };
25882
26181
  var Inner5 = () => {
25883
- const [value, setValue] = useState83(() => {
26182
+ const [value, setValue] = useState82(() => {
25884
26183
  const override = Internals63.getInputPropsOverride();
25885
26184
  if (override) {
25886
26185
  return JSON.stringify(override, null, 2);
25887
26186
  }
25888
26187
  return null;
25889
26188
  });
25890
- const { setSelectedModal } = useContext90(ModalsContext);
26189
+ const { setSelectedModal } = useContext89(ModalsContext);
25891
26190
  const valid = useMemo129(() => {
25892
26191
  if (!value)
25893
26192
  return true;
@@ -25968,11 +26267,11 @@ var OverrideInputPropsModal = () => {
25968
26267
  // src/components/QuickSwitcher/QuickSwitcherContent.tsx
25969
26268
  import {
25970
26269
  useCallback as useCallback121,
25971
- useContext as useContext91,
26270
+ useContext as useContext90,
25972
26271
  useEffect as useEffect80,
25973
26272
  useMemo as useMemo131,
25974
26273
  useRef as useRef47,
25975
- useState as useState85
26274
+ useState as useState84
25976
26275
  } from "react";
25977
26276
  import { Internals as Internals64 } from "remotion";
25978
26277
 
@@ -26869,7 +27168,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
26869
27168
  };
26870
27169
 
26871
27170
  // src/components/QuickSwitcher/QuickSwitcherResult.tsx
26872
- import { useEffect as useEffect79, useMemo as useMemo130, useRef as useRef46, useState as useState84 } from "react";
27171
+ import { useEffect as useEffect79, useMemo as useMemo130, useRef as useRef46, useState as useState83 } from "react";
26873
27172
  import { jsx as jsx236, jsxs as jsxs121, Fragment as Fragment37 } from "react/jsx-runtime";
26874
27173
  var container49 = {
26875
27174
  paddingLeft: 16,
@@ -26898,7 +27197,7 @@ var labelContainer = {
26898
27197
  paddingBottom: 5
26899
27198
  };
26900
27199
  var QuickSwitcherResult = ({ result, selected }) => {
26901
- const [hovered, setIsHovered] = useState84(false);
27200
+ const [hovered, setIsHovered] = useState83(false);
26902
27201
  const ref2 = useRef46(null);
26903
27202
  const keybindings = useKeybinding();
26904
27203
  useEffect79(() => {
@@ -27064,8 +27363,8 @@ var mapModeToQuery = (mode) => {
27064
27363
  throw new Error("no mode" + mode);
27065
27364
  };
27066
27365
  var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
27067
- const { compositions } = useContext91(Internals64.CompositionManager);
27068
- const [state, setState] = useState85(() => {
27366
+ const { compositions } = useContext90(Internals64.CompositionManager);
27367
+ const [state, setState] = useState84(() => {
27069
27368
  return {
27070
27369
  query: mapModeToQuery(initialMode),
27071
27370
  selectedIndex: 0
@@ -27083,8 +27382,8 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
27083
27382
  return;
27084
27383
  }, []);
27085
27384
  const actions = useMenuStructure(closeMenu, readOnlyStudio);
27086
- const [docResults, setDocResults] = useState85({ type: "initial" });
27087
- const { setSelectedModal } = useContext91(ModalsContext);
27385
+ const [docResults, setDocResults] = useState84({ type: "initial" });
27386
+ const { setSelectedModal } = useContext90(ModalsContext);
27088
27387
  const keybindings = useKeybinding();
27089
27388
  const mode = mapQueryToMode(state.query);
27090
27389
  const actualQuery = useMemo131(() => {
@@ -27349,7 +27648,7 @@ var QuickSwitcher = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
27349
27648
  var QuickSwitcher_default = QuickSwitcher;
27350
27649
 
27351
27650
  // src/components/RenderModal/RenderStatusModal.tsx
27352
- import { useCallback as useCallback123, useContext as useContext92 } from "react";
27651
+ import { useCallback as useCallback123, useContext as useContext91 } from "react";
27353
27652
 
27354
27653
  // src/components/RenderModal/ClientRenderProgress.tsx
27355
27654
  import { formatBytes as formatBytes3 } from "@remotion/studio-shared";
@@ -27739,8 +28038,8 @@ var buttonRow = {
27739
28038
  var RenderStatusModal = ({
27740
28039
  jobId
27741
28040
  }) => {
27742
- const { setSelectedModal } = useContext92(ModalsContext);
27743
- const { jobs, removeClientJob, cancelClientJob } = useContext92(RenderQueueContext);
28041
+ const { setSelectedModal } = useContext91(ModalsContext);
28042
+ const { jobs, removeClientJob, cancelClientJob } = useContext91(RenderQueueContext);
27744
28043
  const job = jobs.find((j) => j.id === jobId);
27745
28044
  if (!job) {
27746
28045
  throw new Error("job not found");
@@ -27849,12 +28148,12 @@ import { BrowserSafeApis as BrowserSafeApis11 } from "@remotion/renderer/client"
27849
28148
  import { getDefaultOutLocation } from "@remotion/studio-shared";
27850
28149
  import {
27851
28150
  useCallback as useCallback141,
27852
- useContext as useContext94,
28151
+ useContext as useContext93,
27853
28152
  useEffect as useEffect83,
27854
28153
  useMemo as useMemo143,
27855
28154
  useReducer as useReducer2,
27856
28155
  useRef as useRef49,
27857
- useState as useState91
28156
+ useState as useState90
27858
28157
  } from "react";
27859
28158
 
27860
28159
  // src/helpers/convert-env-variables.ts
@@ -28122,9 +28421,9 @@ var makeReadOnlyStudioRenderCommand = ({
28122
28421
  };
28123
28422
 
28124
28423
  // src/helpers/render-modal-sections.ts
28125
- import { useMemo as useMemo133, useState as useState86 } from "react";
28424
+ import { useMemo as useMemo133, useState as useState85 } from "react";
28126
28425
  var useRenderModalSections = (renderMode, codec) => {
28127
- const [selectedTab, setTab] = useState86("general");
28426
+ const [selectedTab, setTab] = useState85("general");
28128
28427
  const shownTabs = useMemo133(() => {
28129
28428
  if (renderMode === "audio") {
28130
28429
  return ["general", "data", "audio", "advanced"];
@@ -28217,7 +28516,7 @@ var GifIcon = (props) => /* @__PURE__ */ jsx247("svg", {
28217
28516
  });
28218
28517
 
28219
28518
  // src/components/Tabs/vertical.tsx
28220
- import { useCallback as useCallback124, useMemo as useMemo134, useState as useState87 } from "react";
28519
+ import { useCallback as useCallback124, useMemo as useMemo134, useState as useState86 } from "react";
28221
28520
  import { jsx as jsx248 } from "react/jsx-runtime";
28222
28521
  var selectorButton2 = {
28223
28522
  border: "none",
@@ -28233,7 +28532,7 @@ var selectorButton2 = {
28233
28532
  WebkitUserSelect: "none"
28234
28533
  };
28235
28534
  var VerticalTab = ({ children, onClick, style: style12, selected }) => {
28236
- const [hovered, setHovered] = useState87(false);
28535
+ const [hovered, setHovered] = useState86(false);
28237
28536
  const { tabIndex } = useZIndex();
28238
28537
  const onPointerEnter = useCallback124(() => {
28239
28538
  setHovered(true);
@@ -28263,7 +28562,7 @@ var VerticalTab = ({ children, onClick, style: style12, selected }) => {
28263
28562
 
28264
28563
  // src/components/RenderModal/CrfSetting.tsx
28265
28564
  import { BrowserSafeApis as BrowserSafeApis3 } from "@remotion/renderer/client";
28266
- import { useState as useState89 } from "react";
28565
+ import { useState as useState88 } from "react";
28267
28566
 
28268
28567
  // src/components/RenderModal/NumberSetting.tsx
28269
28568
  import { useCallback as useCallback126 } from "react";
@@ -28272,7 +28571,7 @@ import { useCallback as useCallback126 } from "react";
28272
28571
  import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
28273
28572
 
28274
28573
  // src/components/RenderModal/CliCopyButton.tsx
28275
- import { useCallback as useCallback125, useEffect as useEffect81, useMemo as useMemo135, useState as useState88 } from "react";
28574
+ import { useCallback as useCallback125, useEffect as useEffect81, useMemo as useMemo135, useState as useState87 } from "react";
28276
28575
  import { jsx as jsx249 } from "react/jsx-runtime";
28277
28576
  var svgStyle = {
28278
28577
  width: 16,
@@ -28299,8 +28598,8 @@ var buttonStyle5 = {
28299
28598
  var CliCopyButton = ({
28300
28599
  valueToCopy
28301
28600
  }) => {
28302
- const [copied, setCopied] = useState88(false);
28303
- const [hovered, setHovered] = useState88(false);
28601
+ const [copied, setCopied] = useState87(false);
28602
+ const [hovered, setHovered] = useState87(false);
28304
28603
  const fillColor = useMemo135(() => {
28305
28604
  return hovered ? "white" : LIGHT_TEXT;
28306
28605
  }, [hovered]);
@@ -28588,7 +28887,7 @@ var getDefaultCrfState = () => {
28588
28887
  }, {});
28589
28888
  };
28590
28889
  var useCrfState = (codec) => {
28591
- const [state, setState] = useState89(() => getDefaultCrfState());
28890
+ const [state, setState] = useState88(() => getDefaultCrfState());
28592
28891
  const range = BrowserSafeApis3.getValidCrfRanges(codec);
28593
28892
  const setCrf = (updater) => {
28594
28893
  setState((q) => {
@@ -29860,10 +30159,10 @@ import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
29860
30159
  import { useCallback as useCallback133, useMemo as useMemo137 } from "react";
29861
30160
 
29862
30161
  // src/helpers/use-file-existence.ts
29863
- import { useContext as useContext93, useEffect as useEffect82, useRef as useRef48, useState as useState90 } from "react";
30162
+ import { useContext as useContext92, useEffect as useEffect82, useRef as useRef48, useState as useState89 } from "react";
29864
30163
  var useFileExistence = (outName) => {
29865
- const [exists, setExists] = useState90(false);
29866
- const { previewServerState: state, subscribeToEvent } = useContext93(StudioServerConnectionCtx);
30164
+ const [exists, setExists] = useState89(false);
30165
+ const { previewServerState: state, subscribeToEvent } = useContext92(StudioServerConnectionCtx);
29867
30166
  const clientId = state.type === "connected" ? state.clientId : undefined;
29868
30167
  const currentOutName = useRef48("");
29869
30168
  currentOutName.current = outName;
@@ -31292,8 +31591,8 @@ var RenderModal = ({
31292
31591
  initialChromeMode,
31293
31592
  renderDefaults
31294
31593
  }) => {
31295
- const { setSelectedModal } = useContext94(ModalsContext);
31296
- const context = useContext94(ResolvedCompositionContext);
31594
+ const { setSelectedModal } = useContext93(ModalsContext);
31595
+ const context = useContext93(ResolvedCompositionContext);
31297
31596
  if (!context) {
31298
31597
  throw new Error("Should not be able to render without resolving comp first");
31299
31598
  }
@@ -31302,7 +31601,7 @@ var RenderModal = ({
31302
31601
  unresolved: unresolvedComposition
31303
31602
  } = context;
31304
31603
  const isMounted = useRef49(true);
31305
- const [isVideo] = useState91(() => {
31604
+ const [isVideo] = useState90(() => {
31306
31605
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
31307
31606
  });
31308
31607
  const [
@@ -31313,7 +31612,7 @@ var RenderModal = ({
31313
31612
  initialVideoCodecForAudioTab,
31314
31613
  initialVideoCodecForVideoTab
31315
31614
  }
31316
- ] = useState91(() => {
31615
+ ] = useState90(() => {
31317
31616
  return getDefaultCodecs({
31318
31617
  defaultConfigurationVideoCodec,
31319
31618
  compositionDefaultVideoCodec: resolvedComposition.defaultCodec,
@@ -31322,16 +31621,16 @@ var RenderModal = ({
31322
31621
  });
31323
31622
  });
31324
31623
  const [state, dispatch] = useReducer2(reducer2, initialState2);
31325
- const [unclampedFrame, setFrame] = useState91(() => initialFrame);
31326
- const [stillImageFormat, setStillImageFormat] = useState91(() => initialStillImageFormat);
31327
- const [videoImageFormat, setVideoImageFormat] = useState91(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
31328
- const [sequenceImageFormat, setSequenceImageFormat] = useState91(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
31329
- const [concurrency, setConcurrency] = useState91(() => initialConcurrency);
31330
- const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState91(() => initialVideoCodecForVideoTab);
31331
- const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState91(() => initialAudioCodec);
31332
- const [separateAudioTo, setSeparateAudioTo] = useState91(null);
31333
- const [envVariables, setEnvVariables] = useState91(() => envVariablesObjectToArray(initialEnvVariables).filter(([key5]) => key5 !== "NODE_ENV"));
31334
- const [initialOutName] = useState91(() => {
31624
+ const [unclampedFrame, setFrame] = useState90(() => initialFrame);
31625
+ const [stillImageFormat, setStillImageFormat] = useState90(() => initialStillImageFormat);
31626
+ const [videoImageFormat, setVideoImageFormat] = useState90(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
31627
+ const [sequenceImageFormat, setSequenceImageFormat] = useState90(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
31628
+ const [concurrency, setConcurrency] = useState90(() => initialConcurrency);
31629
+ const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState90(() => initialVideoCodecForVideoTab);
31630
+ const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState90(() => initialAudioCodec);
31631
+ const [separateAudioTo, setSeparateAudioTo] = useState90(null);
31632
+ const [envVariables, setEnvVariables] = useState90(() => envVariablesObjectToArray(initialEnvVariables).filter(([key5]) => key5 !== "NODE_ENV"));
31633
+ const [initialOutName] = useState90(() => {
31335
31634
  return getDefaultOutLocation({
31336
31635
  compositionName: resolvedComposition.id,
31337
31636
  defaultExtension: initialRenderType === "still" ? initialStillImageFormat : isVideo ? BrowserSafeApis11.getFileExtensionFromCodec(initialVideoCodec, initialAudioCodec) : initialStillImageFormat,
@@ -31340,26 +31639,26 @@ var RenderModal = ({
31340
31639
  outputLocation: renderDefaults.outputLocation
31341
31640
  });
31342
31641
  });
31343
- const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState91(() => initialVideoCodecForAudioTab);
31344
- const [mutedState, setMuted] = useState91(() => initialMuted);
31345
- const [repro, setRepro] = useState91(() => initialRepro);
31346
- const [enforceAudioTrackState, setEnforceAudioTrackState] = useState91(() => initialEnforceAudioTrack);
31347
- const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState91(() => initialForSeamlessAacConcatenation);
31348
- const [sampleRate, setSampleRate] = useState91(() => initialSampleRate);
31349
- const [renderMode, setRenderModeState] = useState91(initialRenderType);
31350
- const [jpegQuality, setJpegQuality] = useState91(() => initialJpegQuality);
31351
- const [scale, setScale] = useState91(() => initialScale);
31352
- const [logLevel, setLogLevel] = useState91(() => initialLogLevel);
31353
- const [disallowParallelEncoding, setDisallowParallelEncoding] = useState91(false);
31354
- const [disableWebSecurity, setDisableWebSecurity] = useState91(() => initialDisableWebSecurity);
31355
- const [headless, setHeadless] = useState91(() => initialHeadless);
31356
- const [beepOnFinish, setBeepOnFinish] = useState91(() => initialBeep);
31357
- const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState91(() => initialIgnoreCertificateErrors);
31358
- const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState91(() => initialMultiProcessOnLinux);
31359
- const [darkMode, setDarkMode] = useState91(() => initialDarkMode);
31360
- const [openGlOption, setOpenGlOption] = useState91(() => initialGl ?? "default");
31361
- const [colorSpace, setColorSpace] = useState91(() => initialColorSpace);
31362
- const [userAgent, setUserAgent] = useState91(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
31642
+ const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState90(() => initialVideoCodecForAudioTab);
31643
+ const [mutedState, setMuted] = useState90(() => initialMuted);
31644
+ const [repro, setRepro] = useState90(() => initialRepro);
31645
+ const [enforceAudioTrackState, setEnforceAudioTrackState] = useState90(() => initialEnforceAudioTrack);
31646
+ const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState90(() => initialForSeamlessAacConcatenation);
31647
+ const [sampleRate, setSampleRate] = useState90(() => initialSampleRate);
31648
+ const [renderMode, setRenderModeState] = useState90(initialRenderType);
31649
+ const [jpegQuality, setJpegQuality] = useState90(() => initialJpegQuality);
31650
+ const [scale, setScale] = useState90(() => initialScale);
31651
+ const [logLevel, setLogLevel] = useState90(() => initialLogLevel);
31652
+ const [disallowParallelEncoding, setDisallowParallelEncoding] = useState90(false);
31653
+ const [disableWebSecurity, setDisableWebSecurity] = useState90(() => initialDisableWebSecurity);
31654
+ const [headless, setHeadless] = useState90(() => initialHeadless);
31655
+ const [beepOnFinish, setBeepOnFinish] = useState90(() => initialBeep);
31656
+ const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState90(() => initialIgnoreCertificateErrors);
31657
+ const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState90(() => initialMultiProcessOnLinux);
31658
+ const [darkMode, setDarkMode] = useState90(() => initialDarkMode);
31659
+ const [openGlOption, setOpenGlOption] = useState90(() => initialGl ?? "default");
31660
+ const [colorSpace, setColorSpace] = useState90(() => initialColorSpace);
31661
+ const [userAgent, setUserAgent] = useState90(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
31363
31662
  const chromiumOptions = useMemo143(() => {
31364
31663
  return {
31365
31664
  headless,
@@ -31379,29 +31678,29 @@ var RenderModal = ({
31379
31678
  multiProcessOnLinux,
31380
31679
  darkMode
31381
31680
  ]);
31382
- const [outName, setOutName] = useState91(() => initialOutName);
31383
- const [endFrameOrNull, setEndFrame] = useState91(() => outFrameMark ?? null);
31384
- const [startFrameOrNull, setStartFrame] = useState91(() => inFrameMark ?? null);
31385
- const [proResProfileSetting, setProResProfile] = useState91(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
31386
- const [x264PresetSetting, setx264Preset] = useState91(() => initialx264Preset);
31387
- const [hardwareAcceleration, setHardwareAcceleration] = useState91(() => initialHardwareAcceleration);
31388
- const [userPreferredPixelFormat, setPixelFormat] = useState91(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
31389
- const [preferredQualityControlType, setQualityControl] = useState91(() => initialVideoBitrate === null ? "crf" : "bitrate");
31681
+ const [outName, setOutName] = useState90(() => initialOutName);
31682
+ const [endFrameOrNull, setEndFrame] = useState90(() => outFrameMark ?? null);
31683
+ const [startFrameOrNull, setStartFrame] = useState90(() => inFrameMark ?? null);
31684
+ const [proResProfileSetting, setProResProfile] = useState90(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
31685
+ const [x264PresetSetting, setx264Preset] = useState90(() => initialx264Preset);
31686
+ const [hardwareAcceleration, setHardwareAcceleration] = useState90(() => initialHardwareAcceleration);
31687
+ const [userPreferredPixelFormat, setPixelFormat] = useState90(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
31688
+ const [preferredQualityControlType, setQualityControl] = useState90(() => initialVideoBitrate === null ? "crf" : "bitrate");
31390
31689
  const [
31391
31690
  shouldHaveCustomTargetAudioBitrate,
31392
31691
  setShouldHaveCustomTargetAudioBitrate
31393
- ] = useState91(() => initialAudioBitrate !== null);
31394
- const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState91(() => initialAudioBitrate ?? "320K");
31395
- const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState91(() => initialVideoBitrate ?? "1M");
31396
- const [encodingMaxRate, setEncodingMaxRate] = useState91(() => initialEncodingMaxRate ?? null);
31397
- const [encodingBufferSize, setEncodingBufferSize] = useState91(() => initialEncodingBufferSize ?? null);
31398
- const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState91(() => initialNumberOfGifLoops !== null);
31399
- const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState91(() => initialNumberOfGifLoops ?? 0);
31400
- const [delayRenderTimeout, setDelayRenderTimeout] = useState91(() => initialDelayRenderTimeout);
31401
- const [chromeMode, setChromeMode] = useState91(() => initialChromeMode);
31402
- const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState91(initialOffthreadVideoCacheSizeInBytes);
31403
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState91(initialMediaCacheSizeInBytes);
31404
- const [offthreadVideoThreads, setOffthreadVideoThreads] = useState91(() => initialOffthreadVideoThreads);
31692
+ ] = useState90(() => initialAudioBitrate !== null);
31693
+ const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState90(() => initialAudioBitrate ?? "320K");
31694
+ const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState90(() => initialVideoBitrate ?? "1M");
31695
+ const [encodingMaxRate, setEncodingMaxRate] = useState90(() => initialEncodingMaxRate ?? null);
31696
+ const [encodingBufferSize, setEncodingBufferSize] = useState90(() => initialEncodingBufferSize ?? null);
31697
+ const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState90(() => initialNumberOfGifLoops !== null);
31698
+ const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState90(() => initialNumberOfGifLoops ?? 0);
31699
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState90(() => initialDelayRenderTimeout);
31700
+ const [chromeMode, setChromeMode] = useState90(() => initialChromeMode);
31701
+ const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState90(initialOffthreadVideoCacheSizeInBytes);
31702
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState90(initialMediaCacheSizeInBytes);
31703
+ const [offthreadVideoThreads, setOffthreadVideoThreads] = useState90(() => initialOffthreadVideoThreads);
31405
31704
  const codec = useMemo143(() => {
31406
31705
  if (renderMode === "audio") {
31407
31706
  return videoCodecForAudioTab;
@@ -31488,11 +31787,11 @@ var RenderModal = ({
31488
31787
  }
31489
31788
  return null;
31490
31789
  }, [codec, x264PresetSetting, renderMode]);
31491
- const [inputProps, _setInputProps] = useState91(() => defaultProps);
31790
+ const [inputProps, _setInputProps] = useState90(() => defaultProps);
31492
31791
  const setInputProps = useCallback141((updater) => {
31493
31792
  _setInputProps(updater);
31494
31793
  }, []);
31495
- const [metadata] = useState91(() => defaultMetadata);
31794
+ const [metadata] = useState90(() => defaultMetadata);
31496
31795
  const endFrame = useMemo143(() => {
31497
31796
  if (endFrameOrNull === null) {
31498
31797
  return resolvedComposition.durationInFrames - 1;
@@ -31571,7 +31870,7 @@ var RenderModal = ({
31571
31870
  setStillImageFormat(format);
31572
31871
  setDefaultOutName({ type: "still", imageFormat: format });
31573
31872
  }, [setDefaultOutName]);
31574
- const { setSidebarCollapsedState } = useContext94(SidebarContext);
31873
+ const { setSidebarCollapsedState } = useContext93(SidebarContext);
31575
31874
  const onClickStill = useCallback141(() => {
31576
31875
  setSidebarCollapsedState({ left: null, right: "expanded" });
31577
31876
  persistSelectedOptionsSidebarPanel2("renders");
@@ -31625,7 +31924,7 @@ var RenderModal = ({
31625
31924
  offthreadVideoThreads,
31626
31925
  mediaCacheSizeInBytes
31627
31926
  ]);
31628
- const [everyNthFrameSetting, setEveryNthFrameSetting] = useState91(() => initialEveryNthFrame);
31927
+ const [everyNthFrameSetting, setEveryNthFrameSetting] = useState90(() => initialEveryNthFrame);
31629
31928
  const everyNthFrame = useMemo143(() => {
31630
31929
  if (codec === "gif") {
31631
31930
  return everyNthFrameSetting;
@@ -32079,7 +32378,7 @@ var RenderModal = ({
32079
32378
  videoBitrate,
32080
32379
  x264Preset
32081
32380
  ]);
32082
- const [commandCopiedAt, setCommandCopiedAt] = useState91(null);
32381
+ const [commandCopiedAt, setCommandCopiedAt] = useState90(null);
32083
32382
  const renderDisabled = readOnlyStudio ? false : !outnameValidation.valid || state.type === "load";
32084
32383
  const trigger = useCallback141(() => {
32085
32384
  if (readOnlyStudio) {
@@ -32435,7 +32734,7 @@ import {
32435
32734
  getDefaultVideoCodecForContainer,
32436
32735
  isAudioOnlyContainer
32437
32736
  } from "@remotion/web-renderer";
32438
- import { useCallback as useCallback145, useContext as useContext95, useMemo as useMemo148, useState as useState95 } from "react";
32737
+ import { useCallback as useCallback145, useContext as useContext94, useMemo as useMemo148, useState as useState94 } from "react";
32439
32738
 
32440
32739
  // src/icons/certificate.tsx
32441
32740
  import { jsx as jsx273 } from "react/jsx-runtime";
@@ -32454,10 +32753,10 @@ import {
32454
32753
  getEncodableAudioCodecs,
32455
32754
  getSupportedAudioCodecsForContainer
32456
32755
  } from "@remotion/web-renderer";
32457
- import { useEffect as useEffect84, useRef as useRef50, useState as useState92 } from "react";
32756
+ import { useEffect as useEffect84, useRef as useRef50, useState as useState91 } from "react";
32458
32757
  var useEncodableAudioCodecs = (container60) => {
32459
32758
  const cacheRef = useRef50({});
32460
- const [codecsByContainer, setCodecsByContainer] = useState92(() => {
32759
+ const [codecsByContainer, setCodecsByContainer] = useState91(() => {
32461
32760
  return {
32462
32761
  [container60]: getSupportedAudioCodecsForContainer(container60)
32463
32762
  };
@@ -32496,10 +32795,10 @@ import {
32496
32795
  getEncodableVideoCodecs,
32497
32796
  getSupportedVideoCodecsForContainer
32498
32797
  } from "@remotion/web-renderer";
32499
- import { useEffect as useEffect85, useRef as useRef51, useState as useState93 } from "react";
32798
+ import { useEffect as useEffect85, useRef as useRef51, useState as useState92 } from "react";
32500
32799
  var useEncodableVideoCodecs = (container60) => {
32501
32800
  const cacheRef = useRef51({});
32502
- const [codecsByContainer, setCodecsByContainer] = useState93(() => {
32801
+ const [codecsByContainer, setCodecsByContainer] = useState92(() => {
32503
32802
  return {
32504
32803
  [container60]: getSupportedVideoCodecsForContainer(container60)
32505
32804
  };
@@ -33192,7 +33491,7 @@ var WebRenderModalBasic = ({
33192
33491
  };
33193
33492
 
33194
33493
  // src/components/RenderModal/WebRenderModalLicense.tsx
33195
- import { useCallback as useCallback143, useEffect as useEffect86, useState as useState94 } from "react";
33494
+ import { useCallback as useCallback143, useEffect as useEffect86, useState as useState93 } from "react";
33196
33495
 
33197
33496
  // src/icons/check-circle-filled.tsx
33198
33497
  import { jsx as jsx279 } from "react/jsx-runtime";
@@ -33412,8 +33711,8 @@ var WebRenderModalLicense = ({
33412
33711
  setLicenseKey,
33413
33712
  initialPublicLicenseKey
33414
33713
  }) => {
33415
- const [licenseValidation, setLicenseValidation] = useState94({ valid: true, message: null, details: null });
33416
- const [isLoading, setIsLoading] = useState94(false);
33714
+ const [licenseValidation, setLicenseValidation] = useState93({ valid: true, message: null, details: null });
33715
+ const [isLoading, setIsLoading] = useState93(false);
33417
33716
  useEffect86(() => {
33418
33717
  if (licenseKey === null || licenseKey === "free-license") {
33419
33718
  return setLicenseValidation({
@@ -33780,10 +34079,10 @@ var WebRenderModal = ({
33780
34079
  initialMuted,
33781
34080
  initialAllowHtmlInCanvas
33782
34081
  }) => {
33783
- const context = useContext95(ResolvedCompositionContext);
33784
- const { setSelectedModal } = useContext95(ModalsContext);
33785
- const { setSidebarCollapsedState } = useContext95(SidebarContext);
33786
- const { addClientStillJob, addClientVideoJob } = useContext95(RenderQueueContext);
34082
+ const context = useContext94(ResolvedCompositionContext);
34083
+ const { setSelectedModal } = useContext94(ModalsContext);
34084
+ const { setSidebarCollapsedState } = useContext94(SidebarContext);
34085
+ const { addClientStillJob, addClientVideoJob } = useContext94(RenderQueueContext);
33787
34086
  if (!context) {
33788
34087
  throw new Error("Should not be able to render without resolving comp first");
33789
34088
  }
@@ -33791,34 +34090,34 @@ var WebRenderModal = ({
33791
34090
  resolved: { result: resolvedComposition },
33792
34091
  unresolved: unresolvedComposition
33793
34092
  } = context;
33794
- const [isVideo] = useState95(() => {
34093
+ const [isVideo] = useState94(() => {
33795
34094
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
33796
34095
  });
33797
- const [renderMode, setRenderMode] = useState95(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
33798
- const [tab, setTab] = useState95("general");
33799
- const [imageFormat, setImageFormat] = useState95(() => initialStillImageFormat ?? "png");
33800
- const [frame2, setFrame] = useState95(() => initialFrame);
33801
- const [logLevel, setLogLevel] = useState95(() => initialLogLevel);
33802
- const [inputProps, _setInputProps] = useState95(() => defaultProps);
34096
+ const [renderMode, setRenderMode] = useState94(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
34097
+ const [tab, setTab] = useState94("general");
34098
+ const [imageFormat, setImageFormat] = useState94(() => initialStillImageFormat ?? "png");
34099
+ const [frame2, setFrame] = useState94(() => initialFrame);
34100
+ const [logLevel, setLogLevel] = useState94(() => initialLogLevel);
34101
+ const [inputProps, _setInputProps] = useState94(() => defaultProps);
33803
34102
  const setInputProps = useCallback145((updater) => {
33804
34103
  _setInputProps(updater);
33805
34104
  }, []);
33806
- const [delayRenderTimeout, setDelayRenderTimeout] = useState95(initialDelayRenderTimeout ?? 30000);
33807
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState95(initialMediaCacheSizeInBytes);
33808
- const [codec, setCodec] = useState95(initialVideoCodec ?? "h264");
33809
- const [container61, setContainer] = useState95(initialContainer ?? "mp4");
33810
- const [audioCodec, setAudioCodec] = useState95(initialAudioCodec ?? "aac");
33811
- const [audioBitrate, setAudioBitrate] = useState95(initialAudioBitrate ?? "medium");
33812
- const [videoBitrate, setVideoBitrate] = useState95(initialVideoBitrate ?? "high");
33813
- const [hardwareAcceleration, setHardwareAcceleration] = useState95(initialHardwareAcceleration ?? "no-preference");
33814
- const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState95(initialKeyframeIntervalInSeconds ?? 5);
33815
- const [startFrame, setStartFrame] = useState95(() => inFrameMark);
33816
- const [endFrame, setEndFrame] = useState95(() => outFrameMark);
33817
- const [transparent, setTransparent] = useState95(initialTransparent ?? false);
33818
- const [muted, setMuted] = useState95(initialMuted ?? false);
33819
- const [scale, setScale] = useState95(initialScale ?? 1);
33820
- const [licenseKey, setLicenseKey] = useState95(initialLicenseKey);
33821
- const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState95(initialAllowHtmlInCanvas ?? false);
34105
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState94(initialDelayRenderTimeout ?? 30000);
34106
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState94(initialMediaCacheSizeInBytes);
34107
+ const [codec, setCodec] = useState94(initialVideoCodec ?? "h264");
34108
+ const [container61, setContainer] = useState94(initialContainer ?? "mp4");
34109
+ const [audioCodec, setAudioCodec] = useState94(initialAudioCodec ?? "aac");
34110
+ const [audioBitrate, setAudioBitrate] = useState94(initialAudioBitrate ?? "medium");
34111
+ const [videoBitrate, setVideoBitrate] = useState94(initialVideoBitrate ?? "high");
34112
+ const [hardwareAcceleration, setHardwareAcceleration] = useState94(initialHardwareAcceleration ?? "no-preference");
34113
+ const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState94(initialKeyframeIntervalInSeconds ?? 5);
34114
+ const [startFrame, setStartFrame] = useState94(() => inFrameMark);
34115
+ const [endFrame, setEndFrame] = useState94(() => outFrameMark);
34116
+ const [transparent, setTransparent] = useState94(initialTransparent ?? false);
34117
+ const [muted, setMuted] = useState94(initialMuted ?? false);
34118
+ const [scale, setScale] = useState94(initialScale ?? 1);
34119
+ const [licenseKey, setLicenseKey] = useState94(initialLicenseKey);
34120
+ const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState94(initialAllowHtmlInCanvas ?? false);
33822
34121
  const encodableAudioCodecs = useEncodableAudioCodecs(container61);
33823
34122
  const encodableVideoCodecs = useEncodableVideoCodecs(container61);
33824
34123
  const effectiveAudioCodec = useMemo148(() => {
@@ -33845,7 +34144,7 @@ var WebRenderModal = ({
33845
34144
  }
33846
34145
  return Math.max(0, Math.min(finalEndFrame, startFrame));
33847
34146
  }, [finalEndFrame, startFrame]);
33848
- const [initialOutNameState] = useState95(() => {
34147
+ const [initialOutNameState] = useState94(() => {
33849
34148
  if (initialDefaultOutName) {
33850
34149
  return initialDefaultOutName;
33851
34150
  }
@@ -33861,7 +34160,7 @@ var WebRenderModal = ({
33861
34160
  }
33862
34161
  return defaultOut;
33863
34162
  });
33864
- const [outName, setOutName] = useState95(() => initialOutNameState);
34163
+ const [outName, setOutName] = useState94(() => initialOutNameState);
33865
34164
  const updateOutNameExtension = useCallback145((extension) => {
33866
34165
  setOutName((prev) => getStringBeforeSuffix(prev) + "." + extension);
33867
34166
  }, []);
@@ -34301,7 +34600,7 @@ var WebRenderModalWithLoader = (props) => {
34301
34600
  import { useCallback as useCallback148, useMemo as useMemo150 } from "react";
34302
34601
 
34303
34602
  // src/components/CopyButton.tsx
34304
- import { useCallback as useCallback146, useEffect as useEffect87, useState as useState96 } from "react";
34603
+ import { useCallback as useCallback146, useEffect as useEffect87, useState as useState95 } from "react";
34305
34604
  import { jsx as jsx284, jsxs as jsxs152 } from "react/jsx-runtime";
34306
34605
  var iconStyle9 = {
34307
34606
  width: 16,
@@ -34331,7 +34630,7 @@ var labelStyle5 = {
34331
34630
  fontSize: 14
34332
34631
  };
34333
34632
  var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
34334
- const [copied, setCopied] = useState96(false);
34633
+ const [copied, setCopied] = useState95(false);
34335
34634
  const onClick = useCallback146(() => {
34336
34635
  copyText(textToCopy).then(() => {
34337
34636
  setCopied(Date.now());
@@ -34364,7 +34663,7 @@ var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
34364
34663
  };
34365
34664
 
34366
34665
  // src/components/UpdateModal/OpenIssueButton.tsx
34367
- import { useCallback as useCallback147, useMemo as useMemo149, useState as useState97 } from "react";
34666
+ import { useCallback as useCallback147, useMemo as useMemo149, useState as useState96 } from "react";
34368
34667
  import { jsx as jsx285 } from "react/jsx-runtime";
34369
34668
  var svgStyle2 = {
34370
34669
  width: "11px",
@@ -34379,7 +34678,7 @@ var buttonStyle7 = {
34379
34678
  alignItems: "center"
34380
34679
  };
34381
34680
  var OpenIssueButton = ({ link: link4 }) => {
34382
- const [hovered, setHovered] = useState97(false);
34681
+ const [hovered, setHovered] = useState96(false);
34383
34682
  const buttonTooltip = `Open GitHub issue in new Tab`;
34384
34683
  const handleClick = useCallback147(() => {
34385
34684
  window.open(link4, "_blank");
@@ -34580,8 +34879,8 @@ var UpdateModal = ({ info, knownBugs }) => {
34580
34879
  // src/components/Modals.tsx
34581
34880
  import { jsx as jsx288, jsxs as jsxs155, Fragment as Fragment53 } from "react/jsx-runtime";
34582
34881
  var Modals = ({ readOnlyStudio }) => {
34583
- const { selectedModal: modalContextType } = useContext96(ModalsContext);
34584
- const canRender = useContext96(StudioServerConnectionCtx).previewServerState.type === "connected";
34882
+ const { selectedModal: modalContextType } = useContext95(ModalsContext);
34883
+ const canRender = useContext95(StudioServerConnectionCtx).previewServerState.type === "connected";
34585
34884
  return /* @__PURE__ */ jsxs155(Fragment53, {
34586
34885
  children: [
34587
34886
  modalContextType && modalContextType.type === "duplicate-comp" && /* @__PURE__ */ jsx288(DuplicateComposition, {
@@ -34702,7 +35001,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
34702
35001
  const MemoRoot = useMemo151(() => {
34703
35002
  return React187.memo(Root);
34704
35003
  }, [Root]);
34705
- const [renderError, setRenderError] = useState98(null);
35004
+ const [renderError, setRenderError] = useState97(null);
34706
35005
  const clearError = useCallback149(() => {
34707
35006
  setRenderError(null);
34708
35007
  }, []);
@@ -34758,7 +35057,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
34758
35057
  import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
34759
35058
 
34760
35059
  // src/state/preview-size.tsx
34761
- import { useCallback as useCallback150, useContext as useContext97, useMemo as useMemo152, useState as useState99 } from "react";
35060
+ import { useCallback as useCallback150, useContext as useContext96, useMemo as useMemo152, useState as useState98 } from "react";
34762
35061
  import { Internals as Internals66 } from "remotion";
34763
35062
  import { jsx as jsx290 } from "react/jsx-runtime";
34764
35063
  var key5 = "remotion.previewSize";
@@ -34779,14 +35078,14 @@ var loadPreviewSizeOption = () => {
34779
35078
  return JSON.parse(item2);
34780
35079
  };
34781
35080
  var PreviewSizeProvider = ({ children }) => {
34782
- const [size4, setSizeState] = useState99(() => loadPreviewSizeOption());
34783
- const [translation, setTranslation] = useState99(() => {
35081
+ const [size4, setSizeState] = useState98(() => loadPreviewSizeOption());
35082
+ const [translation, setTranslation] = useState98(() => {
34784
35083
  return {
34785
35084
  x: 0,
34786
35085
  y: 0
34787
35086
  };
34788
35087
  });
34789
- const { editorZoomGestures } = useContext97(EditorZoomGesturesContext);
35088
+ const { editorZoomGestures } = useContext96(EditorZoomGesturesContext);
34790
35089
  const setSize = useCallback150((newValue) => {
34791
35090
  setSizeState((prevState) => {
34792
35091
  const newVal = newValue(prevState);
@@ -34815,10 +35114,10 @@ var PreviewSizeProvider = ({ children }) => {
34815
35114
  };
34816
35115
 
34817
35116
  // src/components/CheckerboardProvider.tsx
34818
- import { useCallback as useCallback151, useMemo as useMemo153, useState as useState100 } from "react";
35117
+ import { useCallback as useCallback151, useMemo as useMemo153, useState as useState99 } from "react";
34819
35118
  import { jsx as jsx291 } from "react/jsx-runtime";
34820
35119
  var CheckerboardProvider = ({ children }) => {
34821
- const [checkerboard, setCheckerboardState] = useState100(() => loadCheckerboardOption());
35120
+ const [checkerboard, setCheckerboardState] = useState99(() => loadCheckerboardOption());
34822
35121
  const setCheckerboard = useCallback151((newValue) => {
34823
35122
  setCheckerboardState((prevState) => {
34824
35123
  const newVal = newValue(prevState);
@@ -34839,12 +35138,12 @@ var CheckerboardProvider = ({ children }) => {
34839
35138
  };
34840
35139
 
34841
35140
  // src/components/MediaVolumeProvider.tsx
34842
- import { useMemo as useMemo154, useState as useState101 } from "react";
35141
+ import { useMemo as useMemo154, useState as useState100 } from "react";
34843
35142
  import { Internals as Internals67 } from "remotion";
34844
35143
  import { jsx as jsx292 } from "react/jsx-runtime";
34845
35144
  var MediaVolumeProvider = ({ children }) => {
34846
- const [mediaMuted, setMediaMuted] = useState101(() => loadMuteOption());
34847
- const [mediaVolume, setMediaVolume] = useState101(1);
35145
+ const [mediaMuted, setMediaMuted] = useState100(() => loadMuteOption());
35146
+ const [mediaVolume, setMediaVolume] = useState100(1);
34848
35147
  const mediaVolumeContextValue = useMemo154(() => {
34849
35148
  return {
34850
35149
  mediaMuted,
@@ -34867,10 +35166,10 @@ var MediaVolumeProvider = ({ children }) => {
34867
35166
  };
34868
35167
 
34869
35168
  // src/components/ModalsProvider.tsx
34870
- import { useMemo as useMemo155, useState as useState102 } from "react";
35169
+ import { useMemo as useMemo155, useState as useState101 } from "react";
34871
35170
  import { jsx as jsx293 } from "react/jsx-runtime";
34872
35171
  var ModalsProvider = ({ children }) => {
34873
- const [modalContextType, setModalContextType] = useState102(null);
35172
+ const [modalContextType, setModalContextType] = useState101(null);
34874
35173
  const modalsContext = useMemo155(() => {
34875
35174
  return {
34876
35175
  selectedModal: modalContextType,
@@ -34884,7 +35183,7 @@ var ModalsProvider = ({ children }) => {
34884
35183
  };
34885
35184
 
34886
35185
  // src/components/SetTimelineInOutProvider.tsx
34887
- import { useEffect as useEffect88, useMemo as useMemo156, useState as useState103 } from "react";
35186
+ import { useEffect as useEffect88, useMemo as useMemo156, useState as useState102 } from "react";
34888
35187
 
34889
35188
  // src/state/marks.ts
34890
35189
  var localStorageKey5 = () => `remotion.editor.marksv2`;
@@ -34902,7 +35201,7 @@ var loadMarks = () => {
34902
35201
  // src/components/SetTimelineInOutProvider.tsx
34903
35202
  import { jsx as jsx294 } from "react/jsx-runtime";
34904
35203
  var SetTimelineInOutProvider = ({ children }) => {
34905
- const [inAndOutFrames, setInAndOutFrames] = useState103(() => loadMarks());
35204
+ const [inAndOutFrames, setInAndOutFrames] = useState102(() => loadMarks());
34906
35205
  const setTimelineInOutContextValue = useMemo156(() => {
34907
35206
  return {
34908
35207
  setInAndOutFrames
@@ -34921,13 +35220,13 @@ var SetTimelineInOutProvider = ({ children }) => {
34921
35220
  };
34922
35221
 
34923
35222
  // src/components/ShowGuidesProvider.tsx
34924
- import { useCallback as useCallback152, useMemo as useMemo157, useRef as useRef52, useState as useState104 } from "react";
35223
+ import { useCallback as useCallback152, useMemo as useMemo157, useRef as useRef52, useState as useState103 } from "react";
34925
35224
  import { jsx as jsx295 } from "react/jsx-runtime";
34926
35225
  var ShowGuidesProvider = ({ children }) => {
34927
- const [guidesList, setGuidesList] = useState104(() => loadGuidesList());
34928
- const [selectedGuideId, setSelectedGuideId] = useState104(null);
34929
- const [hoveredGuideId, setHoveredGuideId] = useState104(null);
34930
- const [editorShowGuides, setEditorShowGuidesState] = useState104(() => loadEditorShowGuidesOption());
35226
+ const [guidesList, setGuidesList] = useState103(() => loadGuidesList());
35227
+ const [selectedGuideId, setSelectedGuideId] = useState103(null);
35228
+ const [hoveredGuideId, setHoveredGuideId] = useState103(null);
35229
+ const [editorShowGuides, setEditorShowGuidesState] = useState103(() => loadEditorShowGuidesOption());
34931
35230
  const shouldCreateGuideRef = useRef52(false);
34932
35231
  const shouldDeleteGuideRef = useRef52(false);
34933
35232
  const setEditorShowGuides = useCallback152((newValue) => {
@@ -34964,10 +35263,10 @@ var ShowGuidesProvider = ({ children }) => {
34964
35263
  };
34965
35264
 
34966
35265
  // src/components/ShowRulersProvider.tsx
34967
- import { useCallback as useCallback153, useMemo as useMemo158, useState as useState105 } from "react";
35266
+ import { useCallback as useCallback153, useMemo as useMemo158, useState as useState104 } from "react";
34968
35267
  import { jsx as jsx296 } from "react/jsx-runtime";
34969
35268
  var ShowRulersProvider = ({ children }) => {
34970
- const [editorShowRulers, setEditorShowRulersState] = useState105(() => loadEditorShowRulersOption());
35269
+ const [editorShowRulers, setEditorShowRulersState] = useState104(() => loadEditorShowRulersOption());
34971
35270
  const setEditorShowRulers = useCallback153((newValue) => {
34972
35271
  setEditorShowRulersState((prevState) => {
34973
35272
  const newVal = newValue(prevState);
@@ -34988,10 +35287,10 @@ var ShowRulersProvider = ({ children }) => {
34988
35287
  };
34989
35288
 
34990
35289
  // src/components/VisualControls/VisualControlsUndoSync.tsx
34991
- import { useContext as useContext98, useEffect as useEffect89 } from "react";
35290
+ import { useContext as useContext97, useEffect as useEffect89 } from "react";
34992
35291
  var VisualControlsUndoSync = () => {
34993
- const { subscribeToEvent } = useContext98(StudioServerConnectionCtx);
34994
- const { updateValue } = useContext98(SetVisualControlsContext);
35292
+ const { subscribeToEvent } = useContext97(StudioServerConnectionCtx);
35293
+ const { updateValue } = useContext97(SetVisualControlsContext);
34995
35294
  useEffect89(() => {
34996
35295
  const unsub = subscribeToEvent("visual-control-values-changed", (event) => {
34997
35296
  if (event.type !== "visual-control-values-changed") {
@@ -35007,10 +35306,10 @@ var VisualControlsUndoSync = () => {
35007
35306
  };
35008
35307
 
35009
35308
  // src/components/ZoomGesturesProvider.tsx
35010
- import { useCallback as useCallback154, useMemo as useMemo159, useState as useState106 } from "react";
35309
+ import { useCallback as useCallback154, useMemo as useMemo159, useState as useState105 } from "react";
35011
35310
  import { jsx as jsx297 } from "react/jsx-runtime";
35012
35311
  var ZoomGesturesProvider = ({ children }) => {
35013
- const [editorZoomGestures, setEditorZoomGesturesState] = useState106(() => loadEditorZoomGesturesOption());
35312
+ const [editorZoomGestures, setEditorZoomGesturesState] = useState105(() => loadEditorZoomGesturesOption());
35014
35313
  const setEditorZoomGestures = useCallback154((newValue) => {
35015
35314
  setEditorZoomGesturesState((prevState) => {
35016
35315
  const newVal = newValue(prevState);
@@ -35081,7 +35380,7 @@ var EditorContexts = ({ children, readOnlyStudio }) => {
35081
35380
  };
35082
35381
 
35083
35382
  // src/components/Notifications/ServerDisconnected.tsx
35084
- import { useContext as useContext99 } from "react";
35383
+ import { useContext as useContext98 } from "react";
35085
35384
  import { jsx as jsx299, jsxs as jsxs158 } from "react/jsx-runtime";
35086
35385
  var container63 = {
35087
35386
  position: "fixed",
@@ -35116,7 +35415,7 @@ window.addEventListener("beforeunload", () => {
35116
35415
  pageIsGoingToReload = true;
35117
35416
  });
35118
35417
  var ServerDisconnected = () => {
35119
- const { previewServerState: ctx } = useContext99(StudioServerConnectionCtx);
35418
+ const { previewServerState: ctx } = useContext98(StudioServerConnectionCtx);
35120
35419
  const fav = document.getElementById("__remotion_favicon");
35121
35420
  if (ctx.type !== "disconnected") {
35122
35421
  fav.setAttribute("href", "/favicon.ico");
@@ -35155,11 +35454,11 @@ var ServerDisconnected = () => {
35155
35454
  };
35156
35455
 
35157
35456
  // src/FastRefreshProvider.tsx
35158
- import { useCallback as useCallback155, useEffect as useEffect90, useMemo as useMemo160, useState as useState107 } from "react";
35457
+ import { useCallback as useCallback155, useEffect as useEffect90, useMemo as useMemo160, useState as useState106 } from "react";
35159
35458
  import { jsx as jsx300 } from "react/jsx-runtime";
35160
35459
  var FastRefreshProvider = ({ children }) => {
35161
- const [fastRefreshes, setFastRefreshes] = useState107(0);
35162
- const [manualRefreshes, setManualRefreshes] = useState107(0);
35460
+ const [fastRefreshes, setFastRefreshes] = useState106(0);
35461
+ const [manualRefreshes, setManualRefreshes] = useState106(0);
35163
35462
  const increaseManualRefreshes = useCallback155(() => {
35164
35463
  setManualRefreshes((i) => i + 1);
35165
35464
  }, []);
@@ -35346,29 +35645,29 @@ var injectCSS = () => {
35346
35645
  // src/ResolveCompositionConfigInStudio.tsx
35347
35646
  import {
35348
35647
  useCallback as useCallback156,
35349
- useContext as useContext100,
35648
+ useContext as useContext99,
35350
35649
  useEffect as useEffect91,
35351
35650
  useImperativeHandle as useImperativeHandle14,
35352
35651
  useMemo as useMemo161,
35353
- useState as useState108
35652
+ useState as useState107
35354
35653
  } from "react";
35355
35654
  import { getInputProps as getInputProps2, Internals as Internals69 } from "remotion";
35356
35655
  import { jsx as jsx301 } from "react/jsx-runtime";
35357
35656
  var ResolveCompositionConfigInStudio = ({ children }) => {
35358
- const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState108(null);
35359
- const { compositions, canvasContent, currentCompositionMetadata } = useContext100(Internals69.CompositionManager);
35360
- const { fastRefreshes, manualRefreshes } = useContext100(FastRefreshContext);
35657
+ const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState107(null);
35658
+ const { compositions, canvasContent, currentCompositionMetadata } = useContext99(Internals69.CompositionManager);
35659
+ const { fastRefreshes, manualRefreshes } = useContext99(FastRefreshContext);
35361
35660
  if (manualRefreshes) {}
35362
35661
  const selectedComposition = useMemo161(() => {
35363
35662
  return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
35364
35663
  }, [canvasContent, compositions]);
35365
35664
  const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
35366
- const { props: allEditorProps } = useContext100(Internals69.EditorPropsContext);
35665
+ const { props: allEditorProps } = useContext99(Internals69.EditorPropsContext);
35367
35666
  const env = Internals69.getRemotionEnvironment();
35368
35667
  const inputProps = useMemo161(() => {
35369
35668
  return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
35370
35669
  }, [env.isPlayer]);
35371
- const [resolvedConfigs, setResolvedConfigs] = useState108({});
35670
+ const [resolvedConfigs, setResolvedConfigs] = useState107({});
35372
35671
  const selectedEditorProps = useMemo161(() => {
35373
35672
  return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
35374
35673
  }, [allEditorProps, selectedComposition]);
@@ -35625,7 +35924,7 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
35625
35924
  videoEnabled: window.remotion_videoEnabled,
35626
35925
  logLevel: window.remotion_logLevel ?? "info",
35627
35926
  numberOfAudioTags: window.remotion_numberOfAudioTags,
35628
- audioLatencyHint: window.remotion_audioLatencyHint ?? "interactive",
35927
+ audioLatencyHint: window.remotion_audioLatencyHint ?? "playback",
35629
35928
  children: /* @__PURE__ */ jsx302(StaticFilesProvider, {
35630
35929
  children: /* @__PURE__ */ jsx302(ResolveCompositionConfigInStudio, {
35631
35930
  children: /* @__PURE__ */ jsxs159(EditorContexts, {
@@ -35644,7 +35943,7 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
35644
35943
  });
35645
35944
  };
35646
35945
  var Studio = ({ rootComponent, readOnly, visualModeEnabled }) => {
35647
- useLayoutEffect6(() => {
35946
+ useLayoutEffect5(() => {
35648
35947
  injectCSS();
35649
35948
  }, []);
35650
35949
  return /* @__PURE__ */ jsx302(FastRefreshProvider, {