@remotion/promo-pages 4.0.461 → 4.0.463

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 (279) hide show
  1. package/dist/Homepage.js +1496 -953
  2. package/dist/design.js +1837 -1416
  3. package/dist/experts/experts-data.js +5 -16
  4. package/dist/experts.js +1624 -1203
  5. package/dist/homepage/Pricing.js +1865 -1444
  6. package/dist/prompts/PromptsGallery.js +1709 -1288
  7. package/dist/prompts/PromptsShow.js +1379 -958
  8. package/dist/prompts/PromptsSubmit.js +1381 -960
  9. package/dist/team.js +1705 -1284
  10. package/dist/template-modal-content.js +1715 -1294
  11. package/dist/templates.js +1706 -1284
  12. package/package.json +17 -17
  13. package/dist/cn.d.ts +0 -2
  14. package/dist/cn.js +0 -5
  15. package/dist/components/3DEngine/ButtonDemo.d.ts +0 -2
  16. package/dist/components/3DEngine/ButtonDemo.js +0 -43
  17. package/dist/components/3DEngine/Faces.d.ts +0 -5
  18. package/dist/components/3DEngine/Faces.js +0 -7
  19. package/dist/components/3DEngine/Outer.d.ts +0 -8
  20. package/dist/components/3DEngine/Outer.js +0 -56
  21. package/dist/components/3DEngine/Switch.d.ts +0 -4
  22. package/dist/components/3DEngine/Switch.js +0 -4
  23. package/dist/components/3DEngine/get-child-node-from.d.ts +0 -1
  24. package/dist/components/3DEngine/get-child-node-from.js +0 -14
  25. package/dist/components/3DEngine/hover-transforms.d.ts +0 -9
  26. package/dist/components/3DEngine/hover-transforms.js +0 -177
  27. package/dist/components/BackButton.d.ts +0 -6
  28. package/dist/components/BackButton.js +0 -9
  29. package/dist/components/CommandCopyButton.d.ts +0 -5
  30. package/dist/components/CommandCopyButton.js +0 -4
  31. package/dist/components/Homepage.d.ts +0 -6
  32. package/dist/components/Homepage.js +0 -20
  33. package/dist/components/ManageTeamMembers.d.ts +0 -2
  34. package/dist/components/ManageTeamMembers.js +0 -42
  35. package/dist/components/Spinner.d.ts +0 -3
  36. package/dist/components/Spinner.js +0 -4
  37. package/dist/components/TeamPicture.d.ts +0 -1
  38. package/dist/components/TeamPicture.js +0 -4
  39. package/dist/components/design.d.ts +0 -1
  40. package/dist/components/design.js +0 -33
  41. package/dist/components/experts/ExpertsPage.d.ts +0 -11
  42. package/dist/components/experts/ExpertsPage.js +0 -50
  43. package/dist/components/experts/experts-data.d.ts +0 -15
  44. package/dist/components/experts/experts-data.js +0 -289
  45. package/dist/components/experts/experts-icons.d.ts +0 -7
  46. package/dist/components/experts/experts-icons.js +0 -36
  47. package/dist/components/experts.d.ts +0 -3
  48. package/dist/components/experts.js +0 -2
  49. package/dist/components/homepage/BackgroundAnimation.d.ts +0 -2
  50. package/dist/components/homepage/BackgroundAnimation.js +0 -66
  51. package/dist/components/homepage/ChooseTemplate.d.ts +0 -2
  52. package/dist/components/homepage/ChooseTemplate.js +0 -25
  53. package/dist/components/homepage/CommunityStats.d.ts +0 -3
  54. package/dist/components/homepage/CommunityStats.js +0 -6
  55. package/dist/components/homepage/CommunityStatsItems.d.ts +0 -7
  56. package/dist/components/homepage/CommunityStatsItems.js +0 -58
  57. package/dist/components/homepage/Demo/Card.d.ts +0 -15
  58. package/dist/components/homepage/Demo/Card.js +0 -174
  59. package/dist/components/homepage/Demo/Cards.d.ts +0 -15
  60. package/dist/components/homepage/Demo/Cards.js +0 -57
  61. package/dist/components/homepage/Demo/Comp.d.ts +0 -38
  62. package/dist/components/homepage/Demo/Comp.js +0 -72
  63. package/dist/components/homepage/Demo/CurrentCountry.d.ts +0 -9
  64. package/dist/components/homepage/Demo/CurrentCountry.js +0 -48
  65. package/dist/components/homepage/Demo/DemoError.d.ts +0 -2
  66. package/dist/components/homepage/Demo/DemoError.js +0 -10
  67. package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +0 -2
  68. package/dist/components/homepage/Demo/DemoErrorIcon.js +0 -16
  69. package/dist/components/homepage/Demo/DemoRender.d.ts +0 -33
  70. package/dist/components/homepage/Demo/DemoRender.js +0 -107
  71. package/dist/components/homepage/Demo/DigitWheel.d.ts +0 -9
  72. package/dist/components/homepage/Demo/DigitWheel.js +0 -94
  73. package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +0 -5
  74. package/dist/components/homepage/Demo/DisplayedEmoji.js +0 -59
  75. package/dist/components/homepage/Demo/DoneCheckmark.d.ts +0 -2
  76. package/dist/components/homepage/Demo/DoneCheckmark.js +0 -20
  77. package/dist/components/homepage/Demo/DownloadNudge.d.ts +0 -2
  78. package/dist/components/homepage/Demo/DownloadNudge.js +0 -27
  79. package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +0 -3
  80. package/dist/components/homepage/Demo/DragAndDropNudge.js +0 -26
  81. package/dist/components/homepage/Demo/EmojiCard.d.ts +0 -10
  82. package/dist/components/homepage/Demo/EmojiCard.js +0 -120
  83. package/dist/components/homepage/Demo/Minus.d.ts +0 -5
  84. package/dist/components/homepage/Demo/Minus.js +0 -11
  85. package/dist/components/homepage/Demo/PlayPauseButton.d.ts +0 -5
  86. package/dist/components/homepage/Demo/PlayPauseButton.js +0 -47
  87. package/dist/components/homepage/Demo/PlayerControls.d.ts +0 -8
  88. package/dist/components/homepage/Demo/PlayerControls.js +0 -15
  89. package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +0 -11
  90. package/dist/components/homepage/Demo/PlayerSeekBar.js +0 -216
  91. package/dist/components/homepage/Demo/PlayerVolume.d.ts +0 -5
  92. package/dist/components/homepage/Demo/PlayerVolume.js +0 -53
  93. package/dist/components/homepage/Demo/Progress.d.ts +0 -4
  94. package/dist/components/homepage/Demo/Progress.js +0 -14
  95. package/dist/components/homepage/Demo/Spinner.d.ts +0 -5
  96. package/dist/components/homepage/Demo/Spinner.js +0 -37
  97. package/dist/components/homepage/Demo/Switcher.d.ts +0 -6
  98. package/dist/components/homepage/Demo/Switcher.js +0 -25
  99. package/dist/components/homepage/Demo/Temperature.d.ts +0 -6
  100. package/dist/components/homepage/Demo/Temperature.js +0 -21
  101. package/dist/components/homepage/Demo/TemperatureNumber.d.ts +0 -5
  102. package/dist/components/homepage/Demo/TemperatureNumber.js +0 -36
  103. package/dist/components/homepage/Demo/ThemeNudge.d.ts +0 -3
  104. package/dist/components/homepage/Demo/ThemeNudge.js +0 -35
  105. package/dist/components/homepage/Demo/TimeDisplay.d.ts +0 -6
  106. package/dist/components/homepage/Demo/TimeDisplay.js +0 -27
  107. package/dist/components/homepage/Demo/TrendingRepos.d.ts +0 -6
  108. package/dist/components/homepage/Demo/TrendingRepos.js +0 -65
  109. package/dist/components/homepage/Demo/icons.d.ts +0 -10
  110. package/dist/components/homepage/Demo/icons.js +0 -22
  111. package/dist/components/homepage/Demo/index.d.ts +0 -2
  112. package/dist/components/homepage/Demo/index.js +0 -95
  113. package/dist/components/homepage/Demo/math.d.ts +0 -10
  114. package/dist/components/homepage/Demo/math.js +0 -29
  115. package/dist/components/homepage/Demo/types.d.ts +0 -6
  116. package/dist/components/homepage/Demo/types.js +0 -0
  117. package/dist/components/homepage/EditorStarterSection.d.ts +0 -3
  118. package/dist/components/homepage/EditorStarterSection.js +0 -8
  119. package/dist/components/homepage/EvaluateRemotion.d.ts +0 -3
  120. package/dist/components/homepage/EvaluateRemotion.js +0 -21
  121. package/dist/components/homepage/FreePricing.d.ts +0 -4
  122. package/dist/components/homepage/FreePricing.js +0 -133
  123. package/dist/components/homepage/GetStartedStrip.d.ts +0 -2
  124. package/dist/components/homepage/GetStartedStrip.js +0 -14
  125. package/dist/components/homepage/GitHubButton.d.ts +0 -2
  126. package/dist/components/homepage/GitHubButton.js +0 -7
  127. package/dist/components/homepage/IconForTemplate.d.ts +0 -6
  128. package/dist/components/homepage/IconForTemplate.js +0 -105
  129. package/dist/components/homepage/IfYouKnowReact.d.ts +0 -3
  130. package/dist/components/homepage/IfYouKnowReact.js +0 -23
  131. package/dist/components/homepage/MoreTemplatesButton.d.ts +0 -2
  132. package/dist/components/homepage/MoreTemplatesButton.js +0 -11
  133. package/dist/components/homepage/MuxVideo.d.ts +0 -7
  134. package/dist/components/homepage/MuxVideo.js +0 -45
  135. package/dist/components/homepage/NewsletterButton.d.ts +0 -2
  136. package/dist/components/homepage/NewsletterButton.js +0 -38
  137. package/dist/components/homepage/ParameterizeAndEdit.d.ts +0 -2
  138. package/dist/components/homepage/ParameterizeAndEdit.js +0 -22
  139. package/dist/components/homepage/Pricing.d.ts +0 -2
  140. package/dist/components/homepage/Pricing.js +0 -15
  141. package/dist/components/homepage/PricingBulletPoint.d.ts +0 -6
  142. package/dist/components/homepage/PricingBulletPoint.js +0 -19
  143. package/dist/components/homepage/RealMp4Videos.d.ts +0 -2
  144. package/dist/components/homepage/RealMp4Videos.js +0 -41
  145. package/dist/components/homepage/Spacer.d.ts +0 -2
  146. package/dist/components/homepage/Spacer.js +0 -4
  147. package/dist/components/homepage/TemplateIcon.d.ts +0 -5
  148. package/dist/components/homepage/TemplateIcon.js +0 -24
  149. package/dist/components/homepage/TextInput.d.ts +0 -7
  150. package/dist/components/homepage/TextInput.js +0 -34
  151. package/dist/components/homepage/TrustedByBanner.d.ts +0 -2
  152. package/dist/components/homepage/TrustedByBanner.js +0 -27
  153. package/dist/components/homepage/VideoApps.d.ts +0 -4
  154. package/dist/components/homepage/VideoApps.js +0 -72
  155. package/dist/components/homepage/VideoAppsShowcase.d.ts +0 -3
  156. package/dist/components/homepage/VideoAppsShowcase.js +0 -139
  157. package/dist/components/homepage/VideoAppsTitle.d.ts +0 -4
  158. package/dist/components/homepage/VideoAppsTitle.js +0 -4
  159. package/dist/components/homepage/VideoPlayerWithControls.d.ts +0 -20
  160. package/dist/components/homepage/VideoPlayerWithControls.js +0 -105
  161. package/dist/components/homepage/WriteInReact.d.ts +0 -2
  162. package/dist/components/homepage/WriteInReact.js +0 -10
  163. package/dist/components/homepage/YouAreHere.d.ts +0 -2
  164. package/dist/components/homepage/YouAreHere.js +0 -23
  165. package/dist/components/homepage/layout/Button.d.ts +0 -22
  166. package/dist/components/homepage/layout/Button.js +0 -30
  167. package/dist/components/homepage/layout/colors.d.ts +0 -13
  168. package/dist/components/homepage/layout/colors.js +0 -14
  169. package/dist/components/homepage/layout/use-color-mode.d.ts +0 -21
  170. package/dist/components/homepage/layout/use-color-mode.js +0 -22
  171. package/dist/components/homepage/layout/use-el-size.d.ts +0 -5
  172. package/dist/components/homepage/layout/use-el-size.js +0 -40
  173. package/dist/components/homepage/layout/use-mobile-layout.d.ts +0 -1
  174. package/dist/components/homepage/layout/use-mobile-layout.js +0 -6
  175. package/dist/components/icons/blank.d.ts +0 -3
  176. package/dist/components/icons/blank.js +0 -4
  177. package/dist/components/icons/brain.d.ts +0 -2
  178. package/dist/components/icons/brain.js +0 -4
  179. package/dist/components/icons/clone.d.ts +0 -2
  180. package/dist/components/icons/clone.js +0 -2
  181. package/dist/components/icons/code-hike.d.ts +0 -3
  182. package/dist/components/icons/code-hike.js +0 -4
  183. package/dist/components/icons/cubes.d.ts +0 -3
  184. package/dist/components/icons/cubes.js +0 -4
  185. package/dist/components/icons/editor.d.ts +0 -3
  186. package/dist/components/icons/editor.js +0 -4
  187. package/dist/components/icons/electron.d.ts +0 -4
  188. package/dist/components/icons/electron.js +0 -4
  189. package/dist/components/icons/js.d.ts +0 -3
  190. package/dist/components/icons/js.js +0 -4
  191. package/dist/components/icons/music.d.ts +0 -2
  192. package/dist/components/icons/music.js +0 -4
  193. package/dist/components/icons/next.d.ts +0 -4
  194. package/dist/components/icons/next.js +0 -4
  195. package/dist/components/icons/overlay.d.ts +0 -3
  196. package/dist/components/icons/overlay.js +0 -4
  197. package/dist/components/icons/prompt-to-video.d.ts +0 -2
  198. package/dist/components/icons/prompt-to-video.js +0 -4
  199. package/dist/components/icons/recorder.d.ts +0 -3
  200. package/dist/components/icons/recorder.js +0 -4
  201. package/dist/components/icons/remix.d.ts +0 -3
  202. package/dist/components/icons/remix.js +0 -4
  203. package/dist/components/icons/render-server.d.ts +0 -3
  204. package/dist/components/icons/render-server.js +0 -4
  205. package/dist/components/icons/skia.d.ts +0 -3
  206. package/dist/components/icons/skia.js +0 -4
  207. package/dist/components/icons/stargazer.d.ts +0 -3
  208. package/dist/components/icons/stargazer.js +0 -4
  209. package/dist/components/icons/still.d.ts +0 -3
  210. package/dist/components/icons/still.js +0 -4
  211. package/dist/components/icons/tailwind.d.ts +0 -3
  212. package/dist/components/icons/tailwind.js +0 -4
  213. package/dist/components/icons/tiktok.d.ts +0 -3
  214. package/dist/components/icons/tiktok.js +0 -4
  215. package/dist/components/icons/timeline.d.ts +0 -3
  216. package/dist/components/icons/timeline.js +0 -4
  217. package/dist/components/icons/ts.d.ts +0 -3
  218. package/dist/components/icons/ts.js +0 -4
  219. package/dist/components/icons/undo.d.ts +0 -3
  220. package/dist/components/icons/undo.js +0 -2
  221. package/dist/components/icons/vercel.d.ts +0 -4
  222. package/dist/components/icons/vercel.js +0 -4
  223. package/dist/components/icons/waveform.d.ts +0 -3
  224. package/dist/components/icons/waveform.js +0 -4
  225. package/dist/components/prompts/CardLikeButton.d.ts +0 -5
  226. package/dist/components/prompts/CardLikeButton.js +0 -49
  227. package/dist/components/prompts/ClipboardIcon.d.ts +0 -5
  228. package/dist/components/prompts/ClipboardIcon.js +0 -4
  229. package/dist/components/prompts/CopyPromptButton.d.ts +0 -4
  230. package/dist/components/prompts/CopyPromptButton.js +0 -13
  231. package/dist/components/prompts/LikeButton.d.ts +0 -5
  232. package/dist/components/prompts/LikeButton.js +0 -49
  233. package/dist/components/prompts/MuxPlayer.d.ts +0 -8
  234. package/dist/components/prompts/MuxPlayer.js +0 -21
  235. package/dist/components/prompts/NewBackButton.d.ts +0 -5
  236. package/dist/components/prompts/NewBackButton.js +0 -8
  237. package/dist/components/prompts/Page.d.ts +0 -8
  238. package/dist/components/prompts/Page.js +0 -7
  239. package/dist/components/prompts/PromptsGallery.d.ts +0 -7
  240. package/dist/components/prompts/PromptsGallery.js +0 -60
  241. package/dist/components/prompts/PromptsShow.d.ts +0 -5
  242. package/dist/components/prompts/PromptsShow.js +0 -17
  243. package/dist/components/prompts/PromptsSubmit.d.ts +0 -2
  244. package/dist/components/prompts/PromptsSubmit.js +0 -173
  245. package/dist/components/prompts/config.d.ts +0 -1
  246. package/dist/components/prompts/config.js +0 -1
  247. package/dist/components/prompts/prompt-helpers.d.ts +0 -8
  248. package/dist/components/prompts/prompt-helpers.js +0 -76
  249. package/dist/components/prompts/prompt-types.d.ts +0 -14
  250. package/dist/components/prompts/prompt-types.js +0 -0
  251. package/dist/components/prompts/use-heart-animation.d.ts +0 -5
  252. package/dist/components/prompts/use-heart-animation.js +0 -29
  253. package/dist/components/team/TeamCards.d.ts +0 -6
  254. package/dist/components/team/TeamCards.js +0 -19
  255. package/dist/components/team/TitleTeamCards.d.ts +0 -2
  256. package/dist/components/team/TitleTeamCards.js +0 -6
  257. package/dist/components/team/TrustSection.d.ts +0 -2
  258. package/dist/components/team/TrustSection.js +0 -59
  259. package/dist/components/team.d.ts +0 -3
  260. package/dist/components/team.js +0 -15
  261. package/dist/components/template-modal-content.d.ts +0 -5
  262. package/dist/components/template-modal-content.js +0 -73
  263. package/dist/components/templates.d.ts +0 -2
  264. package/dist/components/templates.js +0 -27
  265. package/dist/helpers/mobile-layout.d.ts +0 -1
  266. package/dist/helpers/mobile-layout.js +0 -6
  267. package/dist/helpers/use-el-size.d.ts +0 -5
  268. package/dist/helpers/use-el-size.js +0 -40
  269. package/dist/main.d.ts +0 -1
  270. package/dist/main.js +0 -6
  271. package/dist/prompts/PromptsShow.css +0 -2578
  272. package/dist/prompts-show.d.ts +0 -1
  273. package/dist/prompts-show.js +0 -20
  274. package/dist/prompts-submit.d.ts +0 -1
  275. package/dist/prompts-submit.js +0 -6
  276. package/dist/prompts.d.ts +0 -1
  277. package/dist/prompts.js +0 -6
  278. package/dist/team.d.ts +0 -1
  279. package/dist/template-modal-content.css +0 -35
@@ -1,26 +1,15 @@
1
- var __create = Object.create;
2
- var __getProtoOf = Object.getPrototypeOf;
3
1
  var __defProp = Object.defineProperty;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __toESM = (mod, isNodeMode, target) => {
7
- target = mod != null ? __create(__getProtoOf(mod)) : {};
8
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
9
- for (let key of __getOwnPropNames(mod))
10
- if (!__hasOwnProp.call(to, key))
11
- __defProp(to, key, {
12
- get: () => mod[key],
13
- enumerable: true
14
- });
15
- return to;
16
- };
2
+ var __returnValue = (v) => v;
3
+ function __exportSetter(name, newValue) {
4
+ this[name] = __returnValue.bind(null, newValue);
5
+ }
17
6
  var __export = (target, all) => {
18
7
  for (var name in all)
19
8
  __defProp(target, name, {
20
9
  get: all[name],
21
10
  enumerable: true,
22
11
  configurable: true,
23
- set: (newValue) => all[name] = () => newValue
12
+ set: __exportSetter.bind(all, name)
24
13
  });
25
14
  };
26
15
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
@@ -45,7 +34,7 @@ __export(exports_vidstack_CZgUA94N, {
45
34
  useSignal: () => useSignal,
46
35
  useReactScope: () => useReactScope,
47
36
  useReactContext: () => useReactContext,
48
- useContext: () => useContext44,
37
+ useContext: () => useContext45,
49
38
  uppercaseFirstChar: () => uppercaseFirstChar,
50
39
  untrack: () => untrack,
51
40
  toggleClass: () => toggleClass,
@@ -619,7 +608,7 @@ function provideContext(context, value, scope = getScope()) {
619
608
  const hasProvidedValue = !isUndefined(value);
620
609
  setContext(context.id, hasProvidedValue ? value : context.provide?.(), scope);
621
610
  }
622
- function useContext44(context) {
611
+ function useContext45(context) {
623
612
  const value = getContext(context.id);
624
613
  return value;
625
614
  }
@@ -679,7 +668,7 @@ class State {
679
668
  }
680
669
  }
681
670
  function useState44(state) {
682
- return useContext44(state);
671
+ return useContext45(state);
683
672
  }
684
673
  function camelToKebabCase(str) {
685
674
  return str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
@@ -717,7 +706,7 @@ function composeRefs3(...refs) {
717
706
  return (node) => refs.forEach((ref) => setRef3(ref, node));
718
707
  }
719
708
  function createClientComponent(Component2, options2) {
720
- const forwardComponent = React56.forwardRef((props, forwardRef15) => {
709
+ const forwardComponent = React56.forwardRef((props, forwardRef16) => {
721
710
  let parentScopeRef = React56.useContext(ReactScopeContext), scopeRef = React56.useRef(null), stateRef = React56.useRef();
722
711
  if (!stateRef.current) {
723
712
  const state2 = createInternalState(), component = initComponent(Component2, state2, props, parentScopeRef.current);
@@ -740,7 +729,7 @@ function createClientComponent(Component2, options2) {
740
729
  attachToHost(state2, state2.el);
741
730
  }
742
731
  if (!state2.forwardRef) {
743
- setRef3(forwardRef15, state2.component);
732
+ setRef3(forwardRef16, state2.component);
744
733
  state2.forwardRef = true;
745
734
  }
746
735
  return () => detachFromHost(state2);
@@ -1061,7 +1050,7 @@ function createServerComponent(Component2, options2) {
1061
1050
  let scope = React56.useContext(ReactScopeContext), component = createComponent(Component2, {
1062
1051
  props,
1063
1052
  scope: scope.current
1064
- }), host = new MaverickServerElement(component), attrs = {}, { style = {}, children, forwardRef: forwardRef15, ...renderProps } = props;
1053
+ }), host = new MaverickServerElement(component), attrs = {}, { style = {}, children, forwardRef: forwardRef16, ...renderProps } = props;
1065
1054
  if (options2.props.size) {
1066
1055
  for (const prop2 of Object.keys(renderProps)) {
1067
1056
  if (!options2.props.has(prop2))
@@ -7061,7 +7050,7 @@ function boundTime(time, store) {
7061
7050
  return Math.min(Math.max(store.seekableStart() + 0.1, clippedTime), store.seekableEnd() - 0.1);
7062
7051
  }
7063
7052
  function useMediaContext() {
7064
- return useContext44(mediaContext);
7053
+ return useContext45(mediaContext);
7065
7054
  }
7066
7055
 
7067
7056
  class MediaRemoteControl {
@@ -13976,7 +13965,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
13976
13965
  if (!this.connectScope)
13977
13966
  return;
13978
13967
  this.#attach();
13979
- const tooltip = useContext44(tooltipContext);
13968
+ const tooltip = useContext45(tooltipContext);
13980
13969
  onDispose(() => {
13981
13970
  const button = this.#getButton();
13982
13971
  button && tooltip.detachTrigger(button);
@@ -13984,7 +13973,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
13984
13973
  }));
13985
13974
  }
13986
13975
  #attach() {
13987
- const button = this.#getButton(), tooltip = useContext44(tooltipContext);
13976
+ const button = this.#getButton(), tooltip = useContext45(tooltipContext);
13988
13977
  button && tooltip.attachTrigger(button);
13989
13978
  }
13990
13979
  #getButton() {
@@ -14017,7 +14006,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
14017
14006
  }
14018
14007
  onConnect(el) {
14019
14008
  this.#attach(el);
14020
- const tooltip = useContext44(tooltipContext);
14009
+ const tooltip = useContext45(tooltipContext);
14021
14010
  onDispose(() => tooltip.detachContent(el));
14022
14011
  onDispose(requestScopedAnimationFrame(() => {
14023
14012
  if (!this.connectScope)
@@ -14026,11 +14015,11 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
14026
14015
  }));
14027
14016
  }
14028
14017
  #attach(el) {
14029
- const tooltip = useContext44(tooltipContext);
14018
+ const tooltip = useContext45(tooltipContext);
14030
14019
  tooltip.attachContent(el);
14031
14020
  }
14032
14021
  #watchPlacement() {
14033
- const { showing } = useContext44(tooltipContext);
14022
+ const { showing } = useContext45(tooltipContext);
14034
14023
  if (!showing())
14035
14024
  return;
14036
14025
  const { placement, offset: mainOffset, alignOffset } = this.$props;
@@ -14041,7 +14030,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
14041
14030
  });
14042
14031
  }
14043
14032
  #getTrigger() {
14044
- return useContext44(tooltipContext).trigger();
14033
+ return useContext45(tooltipContext).trigger();
14045
14034
  }
14046
14035
  };
14047
14036
  ToggleButtonController = class ToggleButtonController extends ViewController {
@@ -14537,7 +14526,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
14537
14526
  }
14538
14527
  onSetup() {
14539
14528
  if (hasProvidedContext(sliderObserverContext)) {
14540
- this.#observer = useContext44(sliderObserverContext);
14529
+ this.#observer = useContext45(sliderObserverContext);
14541
14530
  }
14542
14531
  }
14543
14532
  onConnect(el) {
@@ -15153,7 +15142,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
15153
15142
  #slider;
15154
15143
  onSetup() {
15155
15144
  this.#slider = useState44(Slider.state);
15156
- this.#format = useContext44(sliderValueFormatContext);
15145
+ this.#format = useContext45(sliderValueFormatContext);
15157
15146
  this.#text = computed(this.getValueText.bind(this));
15158
15147
  }
15159
15148
  getValueText() {
@@ -15192,7 +15181,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
15192
15181
  };
15193
15182
  #slider;
15194
15183
  onSetup() {
15195
- this.#slider = useContext44(sliderContext);
15184
+ this.#slider = useContext45(sliderContext);
15196
15185
  const { active } = useState44(Slider.state);
15197
15186
  this.setAttributes({
15198
15187
  "data-visible": active
@@ -15620,7 +15609,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
15620
15609
  }
15621
15610
  }
15622
15611
  #watchPreviewing() {
15623
- const player = this.#media.player.el, { preview } = useContext44(sliderContext);
15612
+ const player = this.#media.player.el, { preview } = useContext45(sliderContext);
15624
15613
  player && preview() && setAttribute(player, "data-preview", this.$state.active());
15625
15614
  }
15626
15615
  #seeking(time, event2) {
@@ -16058,7 +16047,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
16058
16047
  closeMenu: this.close.bind(this)
16059
16048
  });
16060
16049
  if (hasProvidedContext(menuContext)) {
16061
- this.#parentMenu = useContext44(menuContext);
16050
+ this.#parentMenu = useContext45(menuContext);
16062
16051
  }
16063
16052
  this.#observeSliders();
16064
16053
  this.setAttributes({
@@ -16103,7 +16092,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
16103
16092
  this.#transitionCallbacks.clear();
16104
16093
  }
16105
16094
  #observeSliders() {
16106
- let sliderActiveTimer = -1, parentSliderObserver = hasProvidedContext(sliderObserverContext) ? useContext44(sliderObserverContext) : null;
16095
+ let sliderActiveTimer = -1, parentSliderObserver = hasProvidedContext(sliderObserverContext) ? useContext45(sliderObserverContext) : null;
16107
16096
  provideContext(sliderObserverContext, {
16108
16097
  onDragStart: () => {
16109
16098
  parentSliderObserver?.onDragStart?.();
@@ -16430,7 +16419,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
16430
16419
  new FocusVisibleController;
16431
16420
  }
16432
16421
  onSetup() {
16433
- this.#menu = useContext44(menuContext);
16422
+ this.#menu = useContext45(menuContext);
16434
16423
  }
16435
16424
  onAttach(el) {
16436
16425
  this.#menu.attachMenuButton(this);
@@ -16546,10 +16535,10 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
16546
16535
  });
16547
16536
  }
16548
16537
  onAttach(el) {
16549
- this.#menu = useContext44(menuContext);
16538
+ this.#menu = useContext45(menuContext);
16550
16539
  this.#menu.attachMenuItems(this);
16551
16540
  if (hasProvidedContext(menuPortalContext)) {
16552
- const portal = useContext44(menuPortalContext);
16541
+ const portal = useContext45(menuPortalContext);
16553
16542
  if (portal) {
16554
16543
  provideContext(menuPortalContext, null);
16555
16544
  portal.attach(el);
@@ -16724,12 +16713,12 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
16724
16713
  }
16725
16714
  #onDisconnect() {
16726
16715
  scoped(() => {
16727
- const group = useContext44(radioControllerContext);
16716
+ const group = useContext45(radioControllerContext);
16728
16717
  group.remove(this.#controller);
16729
16718
  }, this.connectScope);
16730
16719
  }
16731
16720
  #addToGroup() {
16732
- const group = useContext44(radioControllerContext);
16721
+ const group = useContext45(radioControllerContext);
16733
16722
  group.add(this.#controller);
16734
16723
  }
16735
16724
  #watchValue() {
@@ -23077,8 +23066,21 @@ import * as React6 from "react";
23077
23066
  import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
23078
23067
  import { useContext as useContext8, useMemo as useMemo7 } from "react";
23079
23068
  import { jsx as jsx72 } from "react/jsx-runtime";
23080
- import { useEffect as useEffect4, useMemo as useMemo11, useState as useState3 } from "react";
23081
- import { useContext as useContext11 } from "react";
23069
+ import {
23070
+ forwardRef as forwardRef4,
23071
+ useCallback as useCallback6,
23072
+ useEffect as useEffect5,
23073
+ useMemo as useMemo16,
23074
+ useState as useState6
23075
+ } from "react";
23076
+ import {
23077
+ forwardRef as forwardRef3,
23078
+ useContext as useContext17,
23079
+ useEffect as useEffect3,
23080
+ useMemo as useMemo14,
23081
+ useState as useState5
23082
+ } from "react";
23083
+ import { useContext as useContext14, useMemo as useMemo11 } from "react";
23082
23084
  import { createContext as createContext12 } from "react";
23083
23085
  import { useContext as useContext10, useMemo as useMemo9 } from "react";
23084
23086
  import {
@@ -23089,52 +23091,45 @@ import {
23089
23091
  useState as useState2
23090
23092
  } from "react";
23091
23093
  import { jsx as jsx82 } from "react/jsx-runtime";
23092
- import { useEffect as useEffect3, useMemo as useMemo10, useRef as useRef4 } from "react";
23093
- import { useRef as useRef5 } from "react";
23094
- import { jsx as jsx92 } from "react/jsx-runtime";
23095
- import {
23096
- forwardRef as forwardRef3,
23097
- useContext as useContext16,
23098
- useEffect as useEffect5,
23099
- useMemo as useMemo16,
23100
- useState as useState6
23101
- } from "react";
23102
- import { useContext as useContext14, useMemo as useMemo13 } from "react";
23094
+ import { useContext as useContext11 } from "react";
23103
23095
  import { useContext as useContext13 } from "react";
23104
- import { useContext as useContext12, useMemo as useMemo12 } from "react";
23105
- import { jsx as jsx102 } from "react/jsx-runtime";
23096
+ import { useContext as useContext12, useMemo as useMemo10 } from "react";
23097
+ import { jsx as jsx92 } from "react/jsx-runtime";
23106
23098
  import { createContext as createContext14 } from "react";
23107
- import React12, { useCallback as useCallback5, useMemo as useMemo14, useRef as useRef6, useState as useState4 } from "react";
23108
- import { jsx as jsx112 } from "react/jsx-runtime";
23109
- import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext15, useMemo as useMemo15 } from "react";
23099
+ import React11, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
23100
+ import { jsx as jsx102 } from "react/jsx-runtime";
23101
+ import React12, { forwardRef as forwardRef2, useState as useState4, useContext as useContext16, useMemo as useMemo13 } from "react";
23102
+ import { useContext as useContext15, useRef as useRef5 } from "react";
23110
23103
  import { createContext as createContext15 } from "react";
23104
+ import { jsx as jsx112 } from "react/jsx-runtime";
23105
+ import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef6 } from "react";
23111
23106
  import { jsx as jsx12 } from "react/jsx-runtime";
23112
23107
  import {
23113
- forwardRef as forwardRef4,
23108
+ forwardRef as forwardRef5,
23114
23109
  useEffect as useEffect6,
23115
23110
  useImperativeHandle as useImperativeHandle2,
23116
23111
  useLayoutEffect as useLayoutEffect2,
23117
23112
  useRef as useRef8,
23118
23113
  useState as useState7
23119
23114
  } from "react";
23120
- import React15, { useCallback as useCallback6, useImperativeHandle, useRef as useRef7 } from "react";
23115
+ import React15, { useCallback as useCallback7, useImperativeHandle, useRef as useRef7 } from "react";
23121
23116
  import { jsx as jsx13 } from "react/jsx-runtime";
23122
23117
  import { jsx as jsx14 } from "react/jsx-runtime";
23123
23118
  import {
23124
23119
  createContext as createContext16,
23125
- forwardRef as forwardRef5,
23126
- useCallback as useCallback7,
23127
- useContext as useContext17,
23120
+ forwardRef as forwardRef6,
23121
+ useCallback as useCallback8,
23122
+ useContext as useContext18,
23128
23123
  useLayoutEffect as useLayoutEffect3,
23129
23124
  useMemo as useMemo17,
23130
23125
  useRef as useRef9,
23131
23126
  useState as useState8
23132
23127
  } from "react";
23133
23128
  import { jsx as jsx15 } from "react/jsx-runtime";
23134
- import { useContext as useContext18, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
23129
+ import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
23135
23130
  import {
23136
23131
  createContext as createContext17,
23137
- useCallback as useCallback8,
23132
+ useCallback as useCallback9,
23138
23133
  useImperativeHandle as useImperativeHandle3,
23139
23134
  useLayoutEffect as useLayoutEffect4,
23140
23135
  useMemo as useMemo18,
@@ -23142,29 +23137,29 @@ import {
23142
23137
  useState as useState9
23143
23138
  } from "react";
23144
23139
  import { jsx as jsx16 } from "react/jsx-runtime";
23145
- import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext30 } from "react";
23140
+ import { forwardRef as forwardRef9, useCallback as useCallback14, useContext as useContext31 } from "react";
23146
23141
  import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
23147
23142
  import { jsx as jsx17 } from "react/jsx-runtime";
23148
- import { useContext as useContext19 } from "react";
23143
+ import { useContext as useContext20 } from "react";
23149
23144
  import { createContext as createContext19, useEffect as useEffect7, useState as useState11 } from "react";
23150
23145
  import { jsx as jsx18 } from "react/jsx-runtime";
23151
23146
  import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
23152
23147
  import { jsx as jsx19 } from "react/jsx-runtime";
23153
23148
  import React23, {
23154
- forwardRef as forwardRef6,
23155
- useContext as useContext28,
23149
+ forwardRef as forwardRef7,
23150
+ useContext as useContext29,
23156
23151
  useEffect as useEffect14,
23157
23152
  useImperativeHandle as useImperativeHandle4,
23158
23153
  useMemo as useMemo28,
23159
23154
  useRef as useRef18,
23160
23155
  useState as useState16
23161
23156
  } from "react";
23162
- import { useContext as useContext21, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
23157
+ import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
23163
23158
  import React20, {
23164
23159
  createContext as createContext21,
23165
23160
  createRef as createRef2,
23166
- useCallback as useCallback9,
23167
- useContext as useContext20,
23161
+ useCallback as useCallback10,
23162
+ useContext as useContext21,
23168
23163
  useMemo as useMemo22,
23169
23164
  useRef as useRef11,
23170
23165
  useState as useState12
@@ -23172,20 +23167,20 @@ import React20, {
23172
23167
  import { useMemo as useMemo21 } from "react";
23173
23168
  import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
23174
23169
  import { useRef as useRef12 } from "react";
23175
- import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
23176
- import { useContext as useContext22 } from "react";
23170
+ import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
23171
+ import { useContext as useContext23 } from "react";
23177
23172
  import {
23178
- useCallback as useCallback12,
23179
- useContext as useContext26,
23173
+ useCallback as useCallback13,
23174
+ useContext as useContext27,
23180
23175
  useEffect as useEffect12,
23181
23176
  useLayoutEffect as useLayoutEffect8,
23182
23177
  useRef as useRef17
23183
23178
  } from "react";
23184
- import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef15 } from "react";
23185
- import { useContext as useContext25, useMemo as useMemo25 } from "react";
23179
+ import { useCallback as useCallback12, useMemo as useMemo26, useRef as useRef15 } from "react";
23180
+ import { useContext as useContext26, useMemo as useMemo25 } from "react";
23186
23181
  import React21, {
23187
- useCallback as useCallback10,
23188
- useContext as useContext24,
23182
+ useCallback as useCallback11,
23183
+ useContext as useContext25,
23189
23184
  useEffect as useEffect9,
23190
23185
  useLayoutEffect as useLayoutEffect7,
23191
23186
  useMemo as useMemo24,
@@ -23197,11 +23192,11 @@ import React22 from "react";
23197
23192
  import { useEffect as useEffect10, useState as useState15 } from "react";
23198
23193
  import { useEffect as useEffect11, useRef as useRef16 } from "react";
23199
23194
  import { useEffect as useEffect13 } from "react";
23200
- import { createContext as createContext22, useContext as useContext27, useMemo as useMemo27 } from "react";
23195
+ import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
23201
23196
  import { jsx as jsx222 } from "react/jsx-runtime";
23202
23197
  import {
23203
- forwardRef as forwardRef7,
23204
- useContext as useContext29,
23198
+ forwardRef as forwardRef8,
23199
+ useContext as useContext30,
23205
23200
  useEffect as useEffect15,
23206
23201
  useImperativeHandle as useImperativeHandle5,
23207
23202
  useLayoutEffect as useLayoutEffect9,
@@ -23210,11 +23205,11 @@ import {
23210
23205
  } from "react";
23211
23206
  import { jsx as jsx23 } from "react/jsx-runtime";
23212
23207
  import { jsx as jsx24 } from "react/jsx-runtime";
23213
- import { forwardRef as forwardRef9, useCallback as useCallback14, useState as useState17 } from "react";
23208
+ import { forwardRef as forwardRef10, useCallback as useCallback15, useState as useState17 } from "react";
23214
23209
  import { jsx as jsx25 } from "react/jsx-runtime";
23215
23210
  import {
23216
- useCallback as useCallback15,
23217
- useContext as useContext31,
23211
+ useCallback as useCallback16,
23212
+ useContext as useContext32,
23218
23213
  useImperativeHandle as useImperativeHandle6,
23219
23214
  useLayoutEffect as useLayoutEffect10,
23220
23215
  useRef as useRef20,
@@ -23224,7 +23219,7 @@ import { jsx as jsx26 } from "react/jsx-runtime";
23224
23219
  import { createRef as createRef3 } from "react";
23225
23220
  import React28 from "react";
23226
23221
  import {
23227
- useCallback as useCallback16,
23222
+ useCallback as useCallback17,
23228
23223
  useImperativeHandle as useImperativeHandle7,
23229
23224
  useMemo as useMemo30,
23230
23225
  useRef as useRef21,
@@ -23233,15 +23228,15 @@ import {
23233
23228
  import { jsx as jsx27 } from "react/jsx-runtime";
23234
23229
  import React29 from "react";
23235
23230
  import { useMemo as useMemo322 } from "react";
23236
- import { createContext as createContext23, useContext as useContext32, useMemo as useMemo31 } from "react";
23231
+ import { createContext as createContext23, useContext as useContext33, useMemo as useMemo31 } from "react";
23237
23232
  import { jsx as jsx28 } from "react/jsx-runtime";
23238
23233
  import { jsx as jsx29 } from "react/jsx-runtime";
23239
23234
  import React31 from "react";
23240
23235
  import React32, { createContext as createContext24 } from "react";
23241
- import { useCallback as useCallback18 } from "react";
23236
+ import { useCallback as useCallback19 } from "react";
23242
23237
  import {
23243
- useCallback as useCallback17,
23244
- useContext as useContext33,
23238
+ useCallback as useCallback18,
23239
+ useContext as useContext34,
23245
23240
  useEffect as useEffect16,
23246
23241
  useLayoutEffect as useLayoutEffect11,
23247
23242
  useMemo as useMemo33,
@@ -23249,8 +23244,8 @@ import {
23249
23244
  } from "react";
23250
23245
  import { jsx as jsx30 } from "react/jsx-runtime";
23251
23246
  import React34, {
23252
- forwardRef as forwardRef10,
23253
- useContext as useContext34,
23247
+ forwardRef as forwardRef11,
23248
+ useContext as useContext35,
23254
23249
  useEffect as useEffect18,
23255
23250
  useImperativeHandle as useImperativeHandle8,
23256
23251
  useMemo as useMemo34,
@@ -23262,16 +23257,16 @@ import { jsx as jsx31 } from "react/jsx-runtime";
23262
23257
  import { jsx as jsx322 } from "react/jsx-runtime";
23263
23258
  import React36, { useMemo as useMemo35 } from "react";
23264
23259
  import { jsx as jsx33 } from "react/jsx-runtime";
23265
- import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
23260
+ import { Children, forwardRef as forwardRef12, useMemo as useMemo36 } from "react";
23266
23261
  import React37 from "react";
23267
23262
  import React38, { createContext as createContext25 } from "react";
23268
23263
  import { jsx as jsx34 } from "react/jsx-runtime";
23269
23264
  import { jsx as jsx35 } from "react/jsx-runtime";
23270
23265
  import React40 from "react";
23271
- import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext36 } from "react";
23266
+ import { forwardRef as forwardRef14, useCallback as useCallback20, useContext as useContext37 } from "react";
23272
23267
  import {
23273
- forwardRef as forwardRef12,
23274
- useContext as useContext35,
23268
+ forwardRef as forwardRef13,
23269
+ useContext as useContext36,
23275
23270
  useEffect as useEffect19,
23276
23271
  useImperativeHandle as useImperativeHandle9,
23277
23272
  useLayoutEffect as useLayoutEffect12,
@@ -23281,13 +23276,17 @@ import {
23281
23276
  import { jsx as jsx36 } from "react/jsx-runtime";
23282
23277
  import { jsx as jsx37 } from "react/jsx-runtime";
23283
23278
  var __defProp2 = Object.defineProperty;
23279
+ var __returnValue2 = (v) => v;
23280
+ function __exportSetter2(name, newValue) {
23281
+ this[name] = __returnValue2.bind(null, newValue);
23282
+ }
23284
23283
  var __export2 = (target, all) => {
23285
23284
  for (var name in all)
23286
23285
  __defProp2(target, name, {
23287
23286
  get: all[name],
23288
23287
  enumerable: true,
23289
23288
  configurable: true,
23290
- set: (newValue) => all[name] = () => newValue
23289
+ set: __exportSetter2.bind(all, name)
23291
23290
  });
23292
23291
  };
23293
23292
  if (typeof createContext !== "function") {
@@ -24347,6 +24346,81 @@ var Composition = (props) => {
24347
24346
  ...props
24348
24347
  });
24349
24348
  };
24349
+ var componentsToAddStacksTo = [];
24350
+ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
24351
+ var addSequenceStackTraces = (component) => {
24352
+ componentsToAddStacksTo.push(component);
24353
+ };
24354
+ var sequenceStyleSchema = {
24355
+ "style.translate": {
24356
+ type: "translate",
24357
+ step: 1,
24358
+ default: "0px 0px",
24359
+ description: "Offset"
24360
+ },
24361
+ "style.scale": {
24362
+ type: "number",
24363
+ min: 0.05,
24364
+ max: 100,
24365
+ step: 0.01,
24366
+ default: 1,
24367
+ description: "Scale"
24368
+ },
24369
+ "style.rotate": {
24370
+ type: "rotation",
24371
+ step: 1,
24372
+ default: "0deg",
24373
+ description: "Rotation"
24374
+ },
24375
+ "style.opacity": {
24376
+ type: "number",
24377
+ min: 0,
24378
+ max: 1,
24379
+ step: 0.01,
24380
+ default: 1,
24381
+ description: "Opacity"
24382
+ },
24383
+ premountFor: {
24384
+ type: "number",
24385
+ default: 0,
24386
+ description: "Premount For",
24387
+ min: 0,
24388
+ step: 1
24389
+ },
24390
+ postmountFor: {
24391
+ type: "hidden"
24392
+ },
24393
+ styleWhilePremounted: {
24394
+ type: "hidden"
24395
+ },
24396
+ styleWhilePostmounted: {
24397
+ type: "hidden"
24398
+ }
24399
+ };
24400
+ var hiddenField = {
24401
+ type: "boolean",
24402
+ default: false,
24403
+ description: "Hidden"
24404
+ };
24405
+ var sequenceSchema = {
24406
+ hidden: hiddenField,
24407
+ layout: {
24408
+ type: "enum",
24409
+ default: "absolute-fill",
24410
+ description: "Layout",
24411
+ variants: {
24412
+ "absolute-fill": sequenceStyleSchema,
24413
+ none: {}
24414
+ }
24415
+ }
24416
+ };
24417
+ var sequenceSchemaDefaultLayoutNone = {
24418
+ ...sequenceSchema,
24419
+ layout: {
24420
+ ...sequenceSchema.layout,
24421
+ default: "none"
24422
+ }
24423
+ };
24350
24424
  var SequenceContext = createContext12(null);
24351
24425
  var exports_timeline_position_state = {};
24352
24426
  __export2(exports_timeline_position_state, {
@@ -24552,314 +24626,13 @@ var useCurrentFrame = () => {
24552
24626
  const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;
24553
24627
  return frame - contextOffset;
24554
24628
  };
24555
- var flattenEffects = (effects) => {
24556
- const out = [];
24557
- for (const item of effects) {
24558
- if (Array.isArray(item)) {
24559
- for (const inner of item) {
24560
- out.push(inner);
24561
- }
24562
- } else {
24563
- out.push(item);
24564
- }
24565
- }
24566
- return out;
24567
- };
24568
- var groupByBackend = (effects) => {
24569
- const runs = [];
24570
- let current = [];
24571
- let currentBackend = null;
24572
- for (const eff of effects) {
24573
- const { backend } = eff.definition;
24574
- if (currentBackend === null || backend === currentBackend) {
24575
- current.push(eff);
24576
- currentBackend = backend;
24577
- } else {
24578
- runs.push({ backend: currentBackend, effects: current });
24579
- current = [eff];
24580
- currentBackend = backend;
24581
- }
24582
- }
24583
- if (currentBackend !== null && current.length > 0) {
24584
- runs.push({ backend: currentBackend, effects: current });
24585
- }
24586
- return runs;
24587
- };
24588
-
24589
- class CanvasPool {
24590
- width;
24591
- height;
24592
- pairs = new Map;
24593
- lostContexts = new Set;
24594
- constructor(width, height) {
24595
- this.width = width;
24596
- this.height = height;
24597
- }
24598
- getPair(backend) {
24599
- const existing = this.pairs.get(backend);
24600
- if (existing) {
24601
- return existing;
24602
- }
24603
- const pair = [
24604
- this.allocateCanvas(backend),
24605
- this.allocateCanvas(backend)
24606
- ];
24607
- this.pairs.set(backend, pair);
24608
- return pair;
24609
- }
24610
- assertContextNotLost(canvas) {
24611
- if (this.lostContexts.has(canvas)) {
24612
- throw new Error("WebGL context was lost during canvas effect rendering. " + "This typically happens in headless or memory-constrained environments (e.g. Remotion Lambda). " + "Try reducing concurrency or increasing the Lambda function memory.");
24613
- }
24614
- }
24615
- allocateCanvas(backend) {
24616
- const canvas = document.createElement("canvas");
24617
- canvas.width = this.width;
24618
- canvas.height = this.height;
24619
- switch (backend) {
24620
- case "2d": {
24621
- const ctx = canvas.getContext("2d", {
24622
- colorSpace: "srgb"
24623
- });
24624
- if (!ctx) {
24625
- throw new Error("Failed to acquire 2D context for canvas effect");
24626
- }
24627
- return canvas;
24628
- }
24629
- case "webgl2": {
24630
- const ctx = canvas.getContext("webgl2", {
24631
- premultipliedAlpha: true,
24632
- alpha: true,
24633
- preserveDrawingBuffer: true
24634
- });
24635
- if (!ctx) {
24636
- throw new Error("Failed to acquire WebGL2 context for canvas effect");
24637
- }
24638
- canvas.addEventListener("webglcontextlost", (e) => {
24639
- e.preventDefault();
24640
- this.lostContexts.add(canvas);
24641
- });
24642
- canvas.addEventListener("webglcontextrestored", () => {
24643
- this.lostContexts.delete(canvas);
24644
- });
24645
- ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
24646
- return canvas;
24647
- }
24648
- case "webgpu": {
24649
- if (typeof navigator === "undefined" || !("gpu" in navigator)) {
24650
- throw new Error("WebGPU is not available in this environment for canvas effect");
24651
- }
24652
- return canvas;
24653
- }
24654
- default: {
24655
- const exhaustive = backend;
24656
- throw new Error(`Unknown effect backend: ${exhaustive}`);
24657
- }
24658
- }
24659
- }
24660
- }
24661
- var devicePromise = null;
24662
- var getGpuDevice = () => {
24663
- if (devicePromise) {
24664
- return devicePromise;
24665
- }
24666
- devicePromise = (async () => {
24667
- if (typeof navigator === "undefined" || !("gpu" in navigator)) {
24668
- throw new Error("WebGPU is not available in this environment");
24669
- }
24670
- const { gpu } = navigator;
24671
- const adapter = await gpu.requestAdapter();
24672
- if (!adapter) {
24673
- throw new Error("No WebGPU adapter available");
24674
- }
24675
- return adapter.requestDevice();
24676
- })();
24677
- return devicePromise;
24678
- };
24679
- var createEffectChainState = (width, height) => ({
24680
- pool: new CanvasPool(width, height),
24681
- setupCache: new WeakMap,
24682
- cleanupRegistry: [],
24683
- currentRunId: 0
24684
- });
24685
- var cleanupEffectChainState = (state) => {
24686
- state.currentRunId++;
24687
- for (const entry of state.cleanupRegistry) {
24688
- entry.definition.cleanup(entry.state);
24689
- }
24690
- };
24691
- var ensureSetup = (state, def, target) => {
24692
- const widened = def;
24693
- if (state.setupCache.has(widened)) {
24694
- return state.setupCache.get(widened);
24695
- }
24696
- const setupState = def.setup(target);
24697
- state.setupCache.set(widened, setupState);
24698
- state.cleanupRegistry.push({ definition: widened, state: setupState });
24699
- return setupState;
24700
- };
24701
- var runEffectChain = async ({
24702
- state,
24703
- source,
24704
- effects,
24705
- output,
24706
- frame,
24707
- width,
24708
- height
24709
- }) => {
24710
- const runId = ++state.currentRunId;
24711
- const isCancelled = () => state.currentRunId !== runId;
24712
- const runs = groupByBackend(effects);
24713
- let currentImage = source;
24714
- let lastTarget = null;
24715
- if (runs.length === 0) {
24716
- if (source === output) {
24717
- return true;
24718
- }
24719
- const ctx = output.getContext("2d");
24720
- if (!ctx) {
24721
- throw new Error("Failed to acquire 2D context for output canvas");
24722
- }
24723
- ctx.clearRect(0, 0, width, height);
24724
- ctx.drawImage(currentImage, 0, 0, width, height);
24725
- return true;
24726
- }
24727
- let needsGpuDevice = false;
24728
- for (const run of runs) {
24729
- if (run.backend === "webgpu") {
24730
- needsGpuDevice = true;
24731
- break;
24732
- }
24733
- }
24734
- const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
24735
- if (isCancelled()) {
24736
- return false;
24737
- }
24738
- for (let runIndex = 0;runIndex < runs.length; runIndex++) {
24739
- const run = runs[runIndex];
24740
- const [a, b] = state.pool.getPair(run.backend);
24741
- let dst = a;
24742
- for (const eff of run.effects) {
24743
- const def = eff.definition;
24744
- const setupState = ensureSetup(state, def, dst);
24745
- def.apply({
24746
- source: currentImage,
24747
- target: dst,
24748
- state: setupState,
24749
- params: eff.params,
24750
- frame,
24751
- width,
24752
- height,
24753
- gpuDevice
24754
- });
24755
- if (run.backend === "webgl2") {
24756
- state.pool.assertContextNotLost(dst);
24757
- }
24758
- currentImage = dst;
24759
- dst = dst === a ? b : a;
24760
- }
24761
- lastTarget = currentImage ?? lastTarget;
24762
- const nextRun = runs[runIndex + 1];
24763
- if (nextRun && nextRun.backend !== run.backend && lastTarget) {
24764
- const bitmap = await createImageBitmap(lastTarget);
24765
- if (isCancelled()) {
24766
- bitmap.close();
24767
- return false;
24768
- }
24769
- currentImage = bitmap;
24770
- }
24771
- }
24772
- if (!lastTarget) {
24773
- return true;
24774
- }
24775
- const outCtx = output.getContext("2d");
24776
- if (!outCtx) {
24777
- throw new Error("Failed to acquire 2D context for output canvas");
24778
- }
24779
- outCtx.clearRect(0, 0, width, height);
24780
- outCtx.drawImage(lastTarget, 0, 0, width, height);
24781
- return true;
24782
- };
24783
- var useEffectChainState = () => {
24784
- const chainStateRef = useRef4(null);
24785
- const sizeRef = useRef4(null);
24786
- useEffect3(() => {
24787
- return () => {
24788
- if (chainStateRef.current) {
24789
- cleanupEffectChainState(chainStateRef.current);
24790
- }
24791
- };
24792
- }, []);
24793
- return useMemo10(() => ({
24794
- get: (width, height) => {
24795
- if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
24796
- if (chainStateRef.current) {
24797
- cleanupEffectChainState(chainStateRef.current);
24798
- }
24799
- chainStateRef.current = createEffectChainState(width, height);
24800
- sizeRef.current = { width, height };
24801
- }
24802
- return chainStateRef.current;
24803
- }
24804
- }), []);
24805
- };
24806
- var useMemoizedEffects = (effects) => {
24807
- const previousRef = useRef5(null);
24808
- const previous = previousRef.current;
24809
- const isSame = previous !== null && previous.length === effects.length && previous.every((p, i) => p.definition === effects[i].definition && p.effectKey === effects[i].effectKey);
24810
- if (isSame) {
24811
- return previous;
24812
- }
24813
- const next = effects.map((e) => ({
24814
- definition: e.definition,
24815
- stack: e.stack,
24816
- effectKey: e.effectKey,
24817
- params: e.params,
24818
- memoized: true
24819
- }));
24820
- previousRef.current = next;
24821
- return next;
24822
- };
24823
- var componentsToAddStacksTo = [];
24824
- var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
24825
- var addSequenceStackTraces = (component) => {
24826
- componentsToAddStacksTo.push(component);
24827
- };
24828
- var VERSION = "4.0.461";
24829
- var checkMultipleRemotionVersions = () => {
24830
- if (typeof globalThis === "undefined") {
24831
- return;
24832
- }
24833
- const set = () => {
24834
- globalThis.remotion_imported = VERSION;
24835
- if (typeof window !== "undefined") {
24836
- window.remotion_imported = VERSION;
24837
- }
24838
- };
24839
- const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
24840
- if (alreadyImported) {
24841
- if (alreadyImported === VERSION) {
24842
- return;
24843
- }
24844
- if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
24845
- set();
24846
- return;
24847
- }
24848
- throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
24849
- VERSION,
24850
- typeof alreadyImported === "string" ? alreadyImported : "an older version"
24851
- ].filter(truthy2).join(" and ")}. This will cause things to break in an unexpected way.
24852
- Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`);
24853
- }
24854
- set();
24855
- };
24856
24629
  var useUnsafeVideoConfig = () => {
24857
24630
  const context = useContext12(SequenceContext);
24858
24631
  const ctxWidth = context?.width ?? null;
24859
24632
  const ctxHeight = context?.height ?? null;
24860
24633
  const ctxDuration = context?.durationInFrames ?? null;
24861
24634
  const video = useVideo();
24862
- return useMemo12(() => {
24635
+ return useMemo10(() => {
24863
24636
  if (!video) {
24864
24637
  return null;
24865
24638
  }
@@ -24933,7 +24706,7 @@ var Freeze = ({
24933
24706
  if (!Number.isFinite(frameToFreeze)) {
24934
24707
  throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);
24935
24708
  }
24936
- const isActive = useMemo13(() => {
24709
+ const isActive = useMemo11(() => {
24937
24710
  if (typeof active === "boolean") {
24938
24711
  return active;
24939
24712
  }
@@ -24944,7 +24717,7 @@ var Freeze = ({
24944
24717
  const timelineContext = useTimelineContext();
24945
24718
  const sequenceContext = useContext14(SequenceContext);
24946
24719
  const relativeFrom = sequenceContext?.relativeFrom ?? 0;
24947
- const timelineValue = useMemo13(() => {
24720
+ const timelineValue = useMemo11(() => {
24948
24721
  if (!isActive) {
24949
24722
  return timelineContext;
24950
24723
  }
@@ -24959,7 +24732,7 @@ var Freeze = ({
24959
24732
  }
24960
24733
  };
24961
24734
  }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
24962
- const newSequenceContext = useMemo13(() => {
24735
+ const newSequenceContext = useMemo11(() => {
24963
24736
  if (!sequenceContext) {
24964
24737
  return null;
24965
24738
  }
@@ -24971,9 +24744,9 @@ var Freeze = ({
24971
24744
  cumulatedFrom: 0
24972
24745
  };
24973
24746
  }, [sequenceContext, isActive]);
24974
- return /* @__PURE__ */ jsx102(TimelineContext.Provider, {
24747
+ return /* @__PURE__ */ jsx92(TimelineContext.Provider, {
24975
24748
  value: timelineValue,
24976
- children: /* @__PURE__ */ jsx102(SequenceContext.Provider, {
24749
+ children: /* @__PURE__ */ jsx92(SequenceContext.Provider, {
24977
24750
  value: newSequenceContext,
24978
24751
  children
24979
24752
  })
@@ -24982,74 +24755,7 @@ var Freeze = ({
24982
24755
  var PremountContext = createContext14({
24983
24756
  premountFramesRemaining: 0
24984
24757
  });
24985
- var sequenceStyleSchema = {
24986
- "style.translate": {
24987
- type: "translate",
24988
- step: 1,
24989
- default: "0px 0px",
24990
- description: "Offset"
24991
- },
24992
- "style.scale": {
24993
- type: "number",
24994
- min: 0.05,
24995
- max: 100,
24996
- step: 0.01,
24997
- default: 1,
24998
- description: "Scale"
24999
- },
25000
- "style.rotate": {
25001
- type: "rotation",
25002
- step: 1,
25003
- default: "0deg",
25004
- description: "Rotation"
25005
- },
25006
- "style.opacity": {
25007
- type: "number",
25008
- min: 0,
25009
- max: 1,
25010
- step: 0.01,
25011
- default: 1,
25012
- description: "Opacity"
25013
- },
25014
- premountFor: {
25015
- type: "number",
25016
- default: 0,
25017
- description: "Premount For",
25018
- min: 0,
25019
- step: 1
25020
- },
25021
- postmountFor: {
25022
- type: "hidden"
25023
- },
25024
- styleWhilePremounted: {
25025
- type: "hidden"
25026
- },
25027
- styleWhilePostmounted: {
25028
- type: "hidden"
25029
- }
25030
- };
25031
- var sequenceSchema = {
25032
- layout: {
25033
- type: "enum",
25034
- default: "absolute-fill",
25035
- description: "Layout",
25036
- variants: {
25037
- "absolute-fill": sequenceStyleSchema,
25038
- none: {}
25039
- }
25040
- }
25041
- };
25042
- var sequenceSchemaDefaultLayoutNone = {
25043
- ...sequenceSchema,
25044
- layout: {
25045
- ...sequenceSchema.layout,
25046
- default: "none"
25047
- }
25048
- };
25049
- var nodePathToString = (nodePath) => {
25050
- return nodePath.join(".");
25051
- };
25052
- var SequenceManager = React12.createContext({
24758
+ var SequenceManager = React11.createContext({
25053
24759
  registerSequence: () => {
25054
24760
  throw new Error("SequenceManagerContext not initialized");
25055
24761
  },
@@ -25058,62 +24764,57 @@ var SequenceManager = React12.createContext({
25058
24764
  },
25059
24765
  sequences: []
25060
24766
  });
25061
- var SequenceVisibilityToggleContext = React12.createContext({
25062
- hidden: {},
25063
- setHidden: () => {
25064
- throw new Error("SequenceVisibilityToggle not initialized");
25065
- }
25066
- });
25067
- var getCodeValuesCtx = (codeValues, nodePath) => {
25068
- const status = codeValues[nodePathToString(nodePath)];
25069
- if (!status) {
25070
- return;
25071
- }
25072
- if (!status.canUpdate) {
25073
- return;
25074
- }
25075
- return status.props;
24767
+ var makeSequencePropsSubscriptionKey = (key) => {
24768
+ return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
25076
24769
  };
25077
- var VisualModeCodeValuesContext = React12.createContext({
25078
- getCodeValues: () => {
25079
- throw new Error("VisualModeCodeValuesContext not initialized");
25080
- }
24770
+ var VisualModeCodeValuesContext = React11.createContext({
24771
+ codeValues: {}
25081
24772
  });
25082
- var VisualModeDragOverridesContext = React12.createContext({
24773
+ var VisualModeDragOverridesContext = React11.createContext({
25083
24774
  getDragOverrides: () => {
25084
24775
  throw new Error("VisualModeDragOverridesContext not initialized");
24776
+ },
24777
+ getEffectDragOverrides: () => {
24778
+ throw new Error("VisualModeDragOverridesContext not initialized");
25085
24779
  }
25086
24780
  });
25087
- var VisualModeSettersContext = React12.createContext({
24781
+ var VisualModeSettersContext = React11.createContext({
25088
24782
  setDragOverrides: () => {
25089
24783
  throw new Error("VisualModeSettersContext not initialized");
25090
24784
  },
25091
24785
  clearDragOverrides: () => {
25092
24786
  throw new Error("VisualModeSettersContext not initialized");
25093
24787
  },
24788
+ setEffectDragOverrides: () => {
24789
+ throw new Error("VisualModeSettersContext not initialized");
24790
+ },
24791
+ clearEffectDragOverrides: () => {
24792
+ throw new Error("VisualModeSettersContext not initialized");
24793
+ },
25094
24794
  setCodeValues: () => {
25095
24795
  throw new Error("VisualModeSettersContext not initialized");
25096
24796
  }
25097
24797
  });
24798
+ var effectDragOverridesKey = (nodePath, effectIndex) => `${makeSequencePropsSubscriptionKey(nodePath)}.effects.${effectIndex}`;
25098
24799
  var SequenceManagerProvider = ({ children }) => {
25099
- const [sequences, setSequences] = useState4([]);
25100
- const [hidden, setHidden] = useState4({});
25101
- const [dragOverrides, setControlOverrides] = useState4({});
25102
- const controlOverridesRef = useRef6(dragOverrides);
24800
+ const [sequences, setSequences] = useState3([]);
24801
+ const [dragOverrides, setControlOverrides] = useState3({});
24802
+ const controlOverridesRef = useRef4(dragOverrides);
25103
24803
  controlOverridesRef.current = dragOverrides;
25104
- const [codeValues, setCodeValuesMapState] = useState4({});
24804
+ const [effectDragOverridesState, setEffectDragOverridesState] = useState3({});
24805
+ const [codeValues, setCodeValuesMapState] = useState3({});
25105
24806
  const setDragOverrides = useCallback5((nodePath, key, value) => {
25106
24807
  setControlOverrides((prev) => ({
25107
24808
  ...prev,
25108
- [nodePathToString(nodePath)]: {
25109
- ...prev[nodePathToString(nodePath)],
24809
+ [makeSequencePropsSubscriptionKey(nodePath)]: {
24810
+ ...prev[makeSequencePropsSubscriptionKey(nodePath)],
25110
24811
  [key]: value
25111
24812
  }
25112
24813
  }));
25113
24814
  }, []);
25114
24815
  const clearDragOverrides = useCallback5((nodePath) => {
25115
24816
  setControlOverrides((prev) => {
25116
- const key = nodePathToString(nodePath);
24817
+ const key = makeSequencePropsSubscriptionKey(nodePath);
25117
24818
  if (!prev[key]) {
25118
24819
  return prev;
25119
24820
  }
@@ -25122,9 +24823,32 @@ var SequenceManagerProvider = ({ children }) => {
25122
24823
  return next;
25123
24824
  });
25124
24825
  }, []);
24826
+ const setEffectDragOverrides = useCallback5((nodePath, effectIndex, key, value) => {
24827
+ setEffectDragOverridesState((prev) => {
24828
+ const mapKey = effectDragOverridesKey(nodePath, effectIndex);
24829
+ return {
24830
+ ...prev,
24831
+ [mapKey]: {
24832
+ ...prev[mapKey],
24833
+ [key]: value
24834
+ }
24835
+ };
24836
+ });
24837
+ }, []);
24838
+ const clearEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
24839
+ setEffectDragOverridesState((prev) => {
24840
+ const mapKey = effectDragOverridesKey(nodePath, effectIndex);
24841
+ if (!prev[mapKey]) {
24842
+ return prev;
24843
+ }
24844
+ const next = { ...prev };
24845
+ delete next[mapKey];
24846
+ return next;
24847
+ });
24848
+ }, []);
25125
24849
  const setCodeValues = useCallback5((nodePath, values) => {
25126
24850
  setCodeValuesMapState((prev) => {
25127
- const key = nodePathToString(nodePath);
24851
+ const key = makeSequencePropsSubscriptionKey(nodePath);
25128
24852
  const prevKey = prev[key];
25129
24853
  const newKey = values(prevKey);
25130
24854
  if (prevKey === newKey) {
@@ -25141,54 +24865,54 @@ var SequenceManagerProvider = ({ children }) => {
25141
24865
  const unregisterSequence = useCallback5((seq) => {
25142
24866
  setSequences((seqs) => seqs.filter((s) => s.id !== seq));
25143
24867
  }, []);
25144
- const sequenceContext = useMemo14(() => {
24868
+ const sequenceContext = useMemo12(() => {
25145
24869
  return {
25146
24870
  registerSequence,
25147
24871
  sequences,
25148
24872
  unregisterSequence
25149
24873
  };
25150
24874
  }, [registerSequence, sequences, unregisterSequence]);
25151
- const hiddenContext = useMemo14(() => {
25152
- return {
25153
- hidden,
25154
- setHidden
25155
- };
25156
- }, [hidden]);
25157
24875
  const getDragOverrides = useCallback5((nodePath) => {
25158
- return dragOverrides[nodePathToString(nodePath)] ?? {};
24876
+ return dragOverrides[makeSequencePropsSubscriptionKey(nodePath)] ?? {};
25159
24877
  }, [dragOverrides]);
25160
- const getCodeValues = useCallback5((nodePath) => {
25161
- return getCodeValuesCtx(codeValues, nodePath);
25162
- }, [codeValues]);
25163
- const codeValuesContext = useMemo14(() => {
24878
+ const getEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
24879
+ return effectDragOverridesState[effectDragOverridesKey(nodePath, effectIndex)] ?? {};
24880
+ }, [effectDragOverridesState]);
24881
+ const codeValuesContext = useMemo12(() => {
25164
24882
  return {
25165
- getCodeValues
24883
+ codeValues
25166
24884
  };
25167
- }, [getCodeValues]);
25168
- const dragOverridesContext = useMemo14(() => {
24885
+ }, [codeValues]);
24886
+ const dragOverridesContext = useMemo12(() => {
25169
24887
  return {
25170
- getDragOverrides
24888
+ getDragOverrides,
24889
+ getEffectDragOverrides
25171
24890
  };
25172
- }, [getDragOverrides]);
25173
- const settersContext = useMemo14(() => {
24891
+ }, [getDragOverrides, getEffectDragOverrides]);
24892
+ const settersContext = useMemo12(() => {
25174
24893
  return {
25175
24894
  setDragOverrides,
25176
24895
  clearDragOverrides,
24896
+ setEffectDragOverrides,
24897
+ clearEffectDragOverrides,
25177
24898
  setCodeValues
25178
24899
  };
25179
- }, [setDragOverrides, clearDragOverrides, setCodeValues]);
25180
- return /* @__PURE__ */ jsx112(SequenceManager.Provider, {
24900
+ }, [
24901
+ setDragOverrides,
24902
+ clearDragOverrides,
24903
+ setEffectDragOverrides,
24904
+ clearEffectDragOverrides,
24905
+ setCodeValues
24906
+ ]);
24907
+ return /* @__PURE__ */ jsx102(SequenceManager.Provider, {
25181
24908
  value: sequenceContext,
25182
- children: /* @__PURE__ */ jsx112(SequenceVisibilityToggleContext.Provider, {
25183
- value: hiddenContext,
25184
- children: /* @__PURE__ */ jsx112(VisualModeCodeValuesContext.Provider, {
25185
- value: codeValuesContext,
25186
- children: /* @__PURE__ */ jsx112(VisualModeDragOverridesContext.Provider, {
25187
- value: dragOverridesContext,
25188
- children: /* @__PURE__ */ jsx112(VisualModeSettersContext.Provider, {
25189
- value: settersContext,
25190
- children
25191
- })
24909
+ children: /* @__PURE__ */ jsx102(VisualModeCodeValuesContext.Provider, {
24910
+ value: codeValuesContext,
24911
+ children: /* @__PURE__ */ jsx102(VisualModeDragOverridesContext.Provider, {
24912
+ value: dragOverridesContext,
24913
+ children: /* @__PURE__ */ jsx102(VisualModeSettersContext.Provider, {
24914
+ value: settersContext,
24915
+ children
25192
24916
  })
25193
24917
  })
25194
24918
  })
@@ -25226,6 +24950,144 @@ var deleteNestedKey = (obj, keysToRemove) => {
25226
24950
  }
25227
24951
  return obj;
25228
24952
  };
24953
+ var OverrideIdsToNodePathsGettersContext = createContext15({
24954
+ overrideIdToNodePathMappings: {}
24955
+ });
24956
+ var OverrideIdsToNodePathsSettersContext = createContext15({
24957
+ setOverrideIdToNodePath: () => {
24958
+ throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
24959
+ }
24960
+ });
24961
+ var mergeOverrides = ({
24962
+ descriptor,
24963
+ codeOverrides,
24964
+ dragOverrides
24965
+ }) => {
24966
+ if (!codeOverrides && !dragOverrides) {
24967
+ return { params: descriptor.params, effectKey: descriptor.effectKey };
24968
+ }
24969
+ const merged = {
24970
+ ...descriptor.params
24971
+ };
24972
+ if (codeOverrides) {
24973
+ for (const [key, value] of Object.entries(codeOverrides)) {
24974
+ if (value !== undefined) {
24975
+ merged[key] = value;
24976
+ }
24977
+ }
24978
+ }
24979
+ if (dragOverrides) {
24980
+ for (const [key, value] of Object.entries(dragOverrides)) {
24981
+ merged[key] = value;
24982
+ }
24983
+ }
24984
+ return {
24985
+ params: merged,
24986
+ effectKey: descriptor.definition.calculateKey(merged)
24987
+ };
24988
+ };
24989
+ var extractCodeOverrides = (propStatus) => {
24990
+ if (!propStatus) {
24991
+ return null;
24992
+ }
24993
+ const out = {};
24994
+ let hasAny = false;
24995
+ for (const [key, status] of Object.entries(propStatus)) {
24996
+ if (status.canUpdate) {
24997
+ out[key] = status.codeValue;
24998
+ hasAny = true;
24999
+ }
25000
+ }
25001
+ return hasAny ? out : null;
25002
+ };
25003
+ var useMemoizedEffectDefinitions = (effects) => {
25004
+ const previousRef = useRef5(null);
25005
+ const definitions = effects.map((descriptor) => descriptor.definition);
25006
+ const previous = previousRef.current;
25007
+ const isSame = previous !== null && previous.length === definitions.length && previous.every((def, i) => def === definitions[i]);
25008
+ if (isSame) {
25009
+ return previous;
25010
+ }
25011
+ previousRef.current = definitions;
25012
+ return definitions;
25013
+ };
25014
+ var getEffectCodeValuesCtx = ({
25015
+ codeValues,
25016
+ nodePath,
25017
+ effectIndex
25018
+ }) => {
25019
+ const status = codeValues[makeSequencePropsSubscriptionKey(nodePath)];
25020
+ if (!status) {
25021
+ return { type: "cannot-update-sequence", reason: "not-found" };
25022
+ }
25023
+ if (!status.canUpdate) {
25024
+ return { type: "cannot-update-sequence", reason: status.reason };
25025
+ }
25026
+ const effect = status.effects.find((e) => e.effectIndex === effectIndex);
25027
+ if (!effect) {
25028
+ return { type: "cannot-update-effect", reason: "not-found" };
25029
+ }
25030
+ if (!effect.canUpdate) {
25031
+ return { type: "cannot-update-effect", reason: effect.reason };
25032
+ }
25033
+ return { type: "can-update-effect", props: effect.props };
25034
+ };
25035
+ var getCodeValuesCtx = (codeValues, nodePath) => {
25036
+ const status = codeValues[makeSequencePropsSubscriptionKey(nodePath)];
25037
+ if (!status) {
25038
+ return;
25039
+ }
25040
+ if (!status.canUpdate) {
25041
+ return;
25042
+ }
25043
+ return status.props;
25044
+ };
25045
+ var useMemoizedEffects = ({
25046
+ effects,
25047
+ overrideId
25048
+ }) => {
25049
+ const previousRef = useRef5(null);
25050
+ const { codeValues } = useContext15(VisualModeCodeValuesContext);
25051
+ const { getEffectDragOverrides } = useContext15(VisualModeDragOverridesContext);
25052
+ const { overrideIdToNodePathMappings } = useContext15(OverrideIdsToNodePathsGettersContext);
25053
+ const previous = previousRef.current;
25054
+ const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
25055
+ const resolved = effects.map((descriptor, index) => {
25056
+ if (nodePath === null) {
25057
+ return {
25058
+ descriptor,
25059
+ params: descriptor.params,
25060
+ effectKey: descriptor.effectKey
25061
+ };
25062
+ }
25063
+ const effectStatus = getEffectCodeValuesCtx({
25064
+ codeValues,
25065
+ nodePath,
25066
+ effectIndex: index
25067
+ });
25068
+ const codeOverrides = effectStatus.type === "can-update-effect" ? extractCodeOverrides(effectStatus.props) : null;
25069
+ const dragOverridesMap = getEffectDragOverrides(nodePath, index);
25070
+ const dragOverrides = Object.keys(dragOverridesMap).length === 0 ? null : dragOverridesMap;
25071
+ const { params, effectKey } = mergeOverrides({
25072
+ descriptor,
25073
+ codeOverrides,
25074
+ dragOverrides
25075
+ });
25076
+ return { descriptor, params, effectKey };
25077
+ });
25078
+ const isSame = previous !== null && previous.length === resolved.length && previous.every((p, i) => p.definition === resolved[i].descriptor.definition && p.effectKey === resolved[i].effectKey);
25079
+ if (isSame) {
25080
+ return previous;
25081
+ }
25082
+ const next = resolved.map(({ descriptor, params, effectKey }) => ({
25083
+ definition: descriptor.definition,
25084
+ effectKey,
25085
+ params,
25086
+ memoized: true
25087
+ }));
25088
+ previousRef.current = next;
25089
+ return next;
25090
+ };
25229
25091
  var flattenActiveSchema = (schema, resolve) => {
25230
25092
  const out = {};
25231
25093
  for (const key of Object.keys(schema)) {
@@ -25267,14 +25129,6 @@ var getFlatSchemaWithAllKeys = (schema) => {
25267
25129
  }
25268
25130
  return out;
25269
25131
  };
25270
- var OverrideIdsToNodePathsGettersContext = createContext15({
25271
- overrideIdToNodePathMappings: {}
25272
- });
25273
- var OverrideIdsToNodePathsSettersContext = createContext15({
25274
- setOverrideIdToNodePath: () => {
25275
- throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
25276
- }
25277
- });
25278
25132
  var findPropsToDelete = ({
25279
25133
  schema,
25280
25134
  key,
@@ -25307,7 +25161,6 @@ var findPropsToDelete = ({
25307
25161
  };
25308
25162
  var getEffectiveVisualModeValue = ({
25309
25163
  codeValue,
25310
- runtimeValue,
25311
25164
  dragOverrideValue,
25312
25165
  defaultValue,
25313
25166
  shouldResortToDefaultValueIfUndefined = false
@@ -25315,12 +25168,6 @@ var getEffectiveVisualModeValue = ({
25315
25168
  if (dragOverrideValue !== undefined) {
25316
25169
  return dragOverrideValue;
25317
25170
  }
25318
- if (!codeValue) {
25319
- return runtimeValue;
25320
- }
25321
- if (!codeValue.canUpdate) {
25322
- return runtimeValue;
25323
- }
25324
25171
  if (codeValue.codeValue === undefined && shouldResortToDefaultValueIfUndefined) {
25325
25172
  return defaultValue;
25326
25173
  }
@@ -25357,9 +25204,8 @@ var computeEffectiveSchemaValuesDotNotation = ({
25357
25204
  if (field?.type === "hidden") {
25358
25205
  continue;
25359
25206
  }
25360
- const value = getEffectiveVisualModeValue({
25207
+ const value = codeValueStatus === null || codeValueStatus.canUpdate === false ? currentValue[key] : getEffectiveVisualModeValue({
25361
25208
  codeValue: codeValueStatus,
25362
- runtimeValue: currentValue[key],
25363
25209
  dragOverrideValue: overrideValues[key],
25364
25210
  defaultValue: field?.default,
25365
25211
  shouldResortToDefaultValueIfUndefined: false
@@ -25439,22 +25285,22 @@ var wrapInSchema = (Component, schema) => {
25439
25285
  const Wrapped = forwardRef2((props, ref) => {
25440
25286
  const env = useRemotionEnvironment();
25441
25287
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
25442
- return React13.createElement(Component, {
25288
+ return React12.createElement(Component, {
25443
25289
  ...props,
25444
25290
  _experimentalControls: null,
25445
25291
  ref
25446
25292
  });
25447
25293
  }
25448
- const { getCodeValues } = useContext15(VisualModeCodeValuesContext);
25449
- const { getDragOverrides } = useContext15(VisualModeDragOverridesContext);
25450
- const nodePathMapping = useContext15(OverrideIdsToNodePathsGettersContext);
25294
+ const { codeValues } = useContext16(VisualModeCodeValuesContext);
25295
+ const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
25296
+ const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
25451
25297
  if (props._experimentalControls) {
25452
- return React13.createElement(Component, {
25298
+ return React12.createElement(Component, {
25453
25299
  ...props,
25454
25300
  ref
25455
25301
  });
25456
25302
  }
25457
- const [overrideId] = useState5(() => {
25303
+ const [overrideId] = useState4(() => {
25458
25304
  const { stack } = props;
25459
25305
  if (!stack) {
25460
25306
  return String(Math.random());
@@ -25469,26 +25315,26 @@ var wrapInSchema = (Component, schema) => {
25469
25315
  });
25470
25316
  const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
25471
25317
  const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
25472
- const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
25473
- const controls = useMemo15(() => {
25318
+ const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
25319
+ const controls = useMemo13(() => {
25474
25320
  return {
25475
25321
  schema,
25476
25322
  currentRuntimeValueDotNotation,
25477
25323
  overrideId
25478
25324
  };
25479
25325
  }, [currentRuntimeValueDotNotation, overrideId]);
25480
- const { merged: valuesDotNotation, propsToDelete } = useMemo15(() => {
25326
+ const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
25481
25327
  return computeEffectiveSchemaValuesDotNotation({
25482
25328
  schema,
25483
25329
  currentValue: currentRuntimeValueDotNotation,
25484
25330
  overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
25485
- propStatus: nodePath === null ? undefined : getCodeValues(nodePath)
25331
+ propStatus: nodePath === null ? undefined : getCodeValuesCtx(codeValues, nodePath)
25486
25332
  });
25487
25333
  }, [
25488
25334
  currentRuntimeValueDotNotation,
25489
25335
  getDragOverrides,
25490
25336
  nodePath,
25491
- getCodeValues
25337
+ codeValues
25492
25338
  ]);
25493
25339
  const activeKeys = selectActiveKeys(schema, valuesDotNotation);
25494
25340
  const mergedProps = mergeValues({
@@ -25497,7 +25343,7 @@ var wrapInSchema = (Component, schema) => {
25497
25343
  schemaKeys: activeKeys,
25498
25344
  propsToDelete
25499
25345
  });
25500
- return React13.createElement(Component, {
25346
+ return React12.createElement(Component, {
25501
25347
  ...mergedProps,
25502
25348
  _experimentalControls: controls,
25503
25349
  ref
@@ -25514,6 +25360,7 @@ var RegularSequenceRefForwardingFunction = ({
25514
25360
  height,
25515
25361
  width,
25516
25362
  showInTimeline = true,
25363
+ hidden = false,
25517
25364
  _experimentalControls: controls,
25518
25365
  _experimentalEffects,
25519
25366
  _remotionInternalLoopDisplay: loopDisplay,
@@ -25524,8 +25371,8 @@ var RegularSequenceRefForwardingFunction = ({
25524
25371
  ...other
25525
25372
  }, ref) => {
25526
25373
  const { layout = "absolute-fill" } = other;
25527
- const [id] = useState6(() => String(Math.random()));
25528
- const parentSequence = useContext16(SequenceContext);
25374
+ const [id] = useState5(() => String(Math.random()));
25375
+ const parentSequence = useContext17(SequenceContext);
25529
25376
  const { rootId } = useTimelineContext();
25530
25377
  const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
25531
25378
  const nonce = useNonce();
@@ -25551,15 +25398,14 @@ var RegularSequenceRefForwardingFunction = ({
25551
25398
  const videoConfig = useVideoConfig();
25552
25399
  const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
25553
25400
  const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
25554
- const { registerSequence, unregisterSequence } = useContext16(SequenceManager);
25555
- const { hidden } = useContext16(SequenceVisibilityToggleContext);
25556
- const premounting = useMemo16(() => {
25401
+ const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
25402
+ const premounting = useMemo14(() => {
25557
25403
  return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
25558
25404
  }, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
25559
- const postmounting = useMemo16(() => {
25405
+ const postmounting = useMemo14(() => {
25560
25406
  return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
25561
25407
  }, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
25562
- const contextValue = useMemo16(() => {
25408
+ const contextValue = useMemo14(() => {
25563
25409
  return {
25564
25410
  cumulatedFrom,
25565
25411
  relativeFrom: from,
@@ -25586,12 +25432,13 @@ var RegularSequenceRefForwardingFunction = ({
25586
25432
  premountDisplay,
25587
25433
  postmountDisplay
25588
25434
  ]);
25589
- const timelineClipName = useMemo16(() => {
25435
+ const timelineClipName = useMemo14(() => {
25590
25436
  return name ?? "";
25591
25437
  }, [name]);
25592
25438
  const env = useRemotionEnvironment();
25593
25439
  const inheritedStack = other?.stack ?? null;
25594
- useEffect5(() => {
25440
+ const [stackDoesntChange] = useState5(() => stack ?? inheritedStack);
25441
+ useEffect3(() => {
25595
25442
  if (!env.isStudio) {
25596
25443
  return;
25597
25444
  }
@@ -25614,7 +25461,7 @@ var RegularSequenceRefForwardingFunction = ({
25614
25461
  rootId,
25615
25462
  showInTimeline,
25616
25463
  src: isMedia.data.src,
25617
- stack: stack ?? inheritedStack,
25464
+ stack: stackDoesntChange,
25618
25465
  startMediaFrom: isMedia.data.startMediaFrom,
25619
25466
  volume: isMedia.data.volumes
25620
25467
  });
@@ -25633,7 +25480,7 @@ var RegularSequenceRefForwardingFunction = ({
25633
25480
  showInTimeline,
25634
25481
  nonce: nonce.get(),
25635
25482
  loopDisplay,
25636
- stack: stack ?? inheritedStack,
25483
+ stack: stackDoesntChange,
25637
25484
  premountDisplay: premountDisplay ?? null,
25638
25485
  postmountDisplay: postmountDisplay ?? null,
25639
25486
  controls: controls ?? null,
@@ -25656,11 +25503,10 @@ var RegularSequenceRefForwardingFunction = ({
25656
25503
  showInTimeline,
25657
25504
  nonce,
25658
25505
  loopDisplay,
25659
- stack,
25506
+ stackDoesntChange,
25660
25507
  premountDisplay,
25661
25508
  postmountDisplay,
25662
25509
  env.isStudio,
25663
- inheritedStack,
25664
25510
  controls,
25665
25511
  _experimentalEffects,
25666
25512
  isMedia
@@ -25668,7 +25514,7 @@ var RegularSequenceRefForwardingFunction = ({
25668
25514
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
25669
25515
  const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
25670
25516
  const styleIfThere = other.layout === "none" ? undefined : other.style;
25671
- const defaultStyle = useMemo16(() => {
25517
+ const defaultStyle = useMemo14(() => {
25672
25518
  return {
25673
25519
  flexDirection: undefined,
25674
25520
  ...width ? { width } : {},
@@ -25679,13 +25525,12 @@ var RegularSequenceRefForwardingFunction = ({
25679
25525
  if (ref !== null && layout === "none") {
25680
25526
  throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
25681
25527
  }
25682
- const isSequenceHidden = hidden[id] ?? false;
25683
- if (isSequenceHidden) {
25528
+ if (hidden) {
25684
25529
  return null;
25685
25530
  }
25686
- return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
25531
+ return /* @__PURE__ */ jsx112(SequenceContext.Provider, {
25687
25532
  value: contextValue,
25688
- children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx12(AbsoluteFill, {
25533
+ children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx112(AbsoluteFill, {
25689
25534
  ref,
25690
25535
  style: defaultStyle,
25691
25536
  className: other.className,
@@ -25695,7 +25540,7 @@ var RegularSequenceRefForwardingFunction = ({
25695
25540
  };
25696
25541
  var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
25697
25542
  var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
25698
- const parentPremountContext = useContext16(PremountContext);
25543
+ const parentPremountContext = useContext17(PremountContext);
25699
25544
  const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
25700
25545
  if (props.layout === "none") {
25701
25546
  throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
@@ -25715,7 +25560,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
25715
25560
  const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
25716
25561
  const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
25717
25562
  const isFreezingActive = premountingActive || postmountingActive;
25718
- const style = useMemo16(() => {
25563
+ const style = useMemo14(() => {
25719
25564
  return {
25720
25565
  ...passedStyle,
25721
25566
  opacity: premountingActive || postmountingActive ? 0 : 1,
@@ -25730,10 +25575,10 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
25730
25575
  styleWhilePremounted,
25731
25576
  styleWhilePostmounted
25732
25577
  ]);
25733
- return /* @__PURE__ */ jsx12(Freeze, {
25578
+ return /* @__PURE__ */ jsx112(Freeze, {
25734
25579
  frame: freezeFrame,
25735
25580
  active: isFreezingActive,
25736
- children: /* @__PURE__ */ jsx12(SequenceInner, {
25581
+ children: /* @__PURE__ */ jsx112(SequenceInner, {
25737
25582
  ref,
25738
25583
  from,
25739
25584
  durationInFrames,
@@ -25753,20 +25598,437 @@ var SequenceRefForwardingFunction = (props, ref) => {
25753
25598
  if (props.layout !== "none" && !env.isRendering) {
25754
25599
  const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? props.premountFor ?? fps : props.premountFor;
25755
25600
  if (effectivePremountFor || props.postmountFor) {
25756
- return /* @__PURE__ */ jsx12(PremountedPostmountedSequence, {
25601
+ return /* @__PURE__ */ jsx112(PremountedPostmountedSequence, {
25757
25602
  ref,
25758
25603
  ...props,
25759
25604
  premountFor: effectivePremountFor
25760
25605
  });
25761
25606
  }
25762
25607
  }
25763
- return /* @__PURE__ */ jsx12(RegularSequence, {
25608
+ return /* @__PURE__ */ jsx112(RegularSequence, {
25764
25609
  ...props,
25765
25610
  ref
25766
25611
  });
25767
25612
  };
25768
25613
  var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
25769
25614
  var Sequence = wrapInSchema(SequenceInner, sequenceSchema);
25615
+
25616
+ class CanvasPool {
25617
+ width;
25618
+ height;
25619
+ pairs = new Map;
25620
+ lostContexts = new Set;
25621
+ constructor(width, height) {
25622
+ this.width = width;
25623
+ this.height = height;
25624
+ }
25625
+ getPair(backend) {
25626
+ const existing = this.pairs.get(backend);
25627
+ if (existing) {
25628
+ return existing;
25629
+ }
25630
+ const pair = [
25631
+ this.allocateCanvas(backend),
25632
+ this.allocateCanvas(backend)
25633
+ ];
25634
+ this.pairs.set(backend, pair);
25635
+ return pair;
25636
+ }
25637
+ assertContextNotLost(canvas) {
25638
+ if (this.lostContexts.has(canvas)) {
25639
+ throw new Error("WebGL context was lost during canvas effect rendering. " + "This typically happens in headless or memory-constrained environments (e.g. Remotion Lambda). " + "Try reducing concurrency or increasing the Lambda function memory.");
25640
+ }
25641
+ }
25642
+ allocateCanvas(backend) {
25643
+ const canvas = document.createElement("canvas");
25644
+ canvas.width = this.width;
25645
+ canvas.height = this.height;
25646
+ switch (backend) {
25647
+ case "2d": {
25648
+ const ctx = canvas.getContext("2d", {
25649
+ colorSpace: "srgb"
25650
+ });
25651
+ if (!ctx) {
25652
+ throw new Error("Failed to acquire 2D context for canvas effect");
25653
+ }
25654
+ return canvas;
25655
+ }
25656
+ case "webgl2": {
25657
+ const ctx = canvas.getContext("webgl2", {
25658
+ premultipliedAlpha: true,
25659
+ alpha: true,
25660
+ preserveDrawingBuffer: true
25661
+ });
25662
+ if (!ctx) {
25663
+ throw new Error("Failed to acquire WebGL2 context for canvas effect");
25664
+ }
25665
+ canvas.addEventListener("webglcontextlost", (e) => {
25666
+ e.preventDefault();
25667
+ this.lostContexts.add(canvas);
25668
+ });
25669
+ canvas.addEventListener("webglcontextrestored", () => {
25670
+ this.lostContexts.delete(canvas);
25671
+ });
25672
+ ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
25673
+ return canvas;
25674
+ }
25675
+ case "webgpu": {
25676
+ if (typeof navigator === "undefined" || !("gpu" in navigator)) {
25677
+ throw new Error("WebGPU is not available in this environment for canvas effect");
25678
+ }
25679
+ return canvas;
25680
+ }
25681
+ default: {
25682
+ const exhaustive = backend;
25683
+ throw new Error(`Unknown effect backend: ${exhaustive}`);
25684
+ }
25685
+ }
25686
+ }
25687
+ }
25688
+ var groupByBackend = (effects) => {
25689
+ const runs = [];
25690
+ let current = [];
25691
+ let currentBackend = null;
25692
+ for (const eff of effects) {
25693
+ const { backend } = eff.definition;
25694
+ if (currentBackend === null || backend === currentBackend) {
25695
+ current.push(eff);
25696
+ currentBackend = backend;
25697
+ } else {
25698
+ runs.push({ backend: currentBackend, effects: current });
25699
+ current = [eff];
25700
+ currentBackend = backend;
25701
+ }
25702
+ }
25703
+ if (currentBackend !== null && current.length > 0) {
25704
+ runs.push({ backend: currentBackend, effects: current });
25705
+ }
25706
+ return runs;
25707
+ };
25708
+ var devicePromise = null;
25709
+ var getGpuDevice = () => {
25710
+ if (devicePromise) {
25711
+ return devicePromise;
25712
+ }
25713
+ devicePromise = (async () => {
25714
+ if (typeof navigator === "undefined" || !("gpu" in navigator)) {
25715
+ throw new Error("WebGPU is not available in this environment");
25716
+ }
25717
+ const { gpu } = navigator;
25718
+ const adapter = await gpu.requestAdapter();
25719
+ if (!adapter) {
25720
+ throw new Error("No WebGPU adapter available");
25721
+ }
25722
+ return adapter.requestDevice();
25723
+ })();
25724
+ return devicePromise;
25725
+ };
25726
+ var createEffectChainState = (width, height) => ({
25727
+ pool: new CanvasPool(width, height),
25728
+ setupCache: new WeakMap,
25729
+ cleanupRegistry: [],
25730
+ currentRunId: 0
25731
+ });
25732
+ var cleanupEffectChainState = (state) => {
25733
+ state.currentRunId++;
25734
+ for (const entry of state.cleanupRegistry) {
25735
+ entry.definition.cleanup(entry.state);
25736
+ }
25737
+ };
25738
+ var ensureSetup = (state, def, target) => {
25739
+ const widened = def;
25740
+ if (state.setupCache.has(widened)) {
25741
+ return state.setupCache.get(widened);
25742
+ }
25743
+ const setupState = def.setup(target);
25744
+ state.setupCache.set(widened, setupState);
25745
+ state.cleanupRegistry.push({ definition: widened, state: setupState });
25746
+ return setupState;
25747
+ };
25748
+ var runEffectChain = async ({
25749
+ state,
25750
+ source,
25751
+ effects,
25752
+ output,
25753
+ width,
25754
+ height
25755
+ }) => {
25756
+ const runId = ++state.currentRunId;
25757
+ const isCancelled = () => state.currentRunId !== runId;
25758
+ const enabledEffects = effects.filter((e) => !e.params.disabled);
25759
+ const runs = groupByBackend(enabledEffects);
25760
+ let currentImage = source;
25761
+ let lastTarget = null;
25762
+ if (runs.length === 0) {
25763
+ if (source === output) {
25764
+ return true;
25765
+ }
25766
+ const ctx = output.getContext("2d");
25767
+ if (!ctx) {
25768
+ throw new Error("Failed to acquire 2D context for output canvas");
25769
+ }
25770
+ ctx.clearRect(0, 0, width, height);
25771
+ ctx.drawImage(currentImage, 0, 0, width, height);
25772
+ return true;
25773
+ }
25774
+ let needsGpuDevice = false;
25775
+ for (const run of runs) {
25776
+ if (run.backend === "webgpu") {
25777
+ needsGpuDevice = true;
25778
+ break;
25779
+ }
25780
+ }
25781
+ const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
25782
+ if (isCancelled()) {
25783
+ return false;
25784
+ }
25785
+ for (let runIndex = 0;runIndex < runs.length; runIndex++) {
25786
+ const run = runs[runIndex];
25787
+ const [a, b] = state.pool.getPair(run.backend);
25788
+ let dst = a;
25789
+ for (const eff of run.effects) {
25790
+ const def = eff.definition;
25791
+ const setupState = ensureSetup(state, def, dst);
25792
+ def.apply({
25793
+ source: currentImage,
25794
+ target: dst,
25795
+ state: setupState,
25796
+ params: eff.params,
25797
+ width,
25798
+ height,
25799
+ gpuDevice
25800
+ });
25801
+ if (run.backend === "webgl2") {
25802
+ state.pool.assertContextNotLost(dst);
25803
+ }
25804
+ currentImage = dst;
25805
+ dst = dst === a ? b : a;
25806
+ }
25807
+ lastTarget = currentImage ?? lastTarget;
25808
+ const nextRun = runs[runIndex + 1];
25809
+ if (nextRun && nextRun.backend !== run.backend && lastTarget) {
25810
+ const bitmap = await createImageBitmap(lastTarget);
25811
+ if (isCancelled()) {
25812
+ bitmap.close();
25813
+ return false;
25814
+ }
25815
+ currentImage = bitmap;
25816
+ }
25817
+ }
25818
+ if (!lastTarget) {
25819
+ return true;
25820
+ }
25821
+ const outCtx = output.getContext("2d");
25822
+ if (!outCtx) {
25823
+ throw new Error("Failed to acquire 2D context for output canvas");
25824
+ }
25825
+ outCtx.clearRect(0, 0, width, height);
25826
+ outCtx.drawImage(lastTarget, 0, 0, width, height);
25827
+ return true;
25828
+ };
25829
+ var useEffectChainState = () => {
25830
+ const chainStateRef = useRef6(null);
25831
+ const sizeRef = useRef6(null);
25832
+ useEffect4(() => {
25833
+ return () => {
25834
+ if (chainStateRef.current) {
25835
+ cleanupEffectChainState(chainStateRef.current);
25836
+ }
25837
+ };
25838
+ }, []);
25839
+ return useMemo15(() => ({
25840
+ get: (width, height) => {
25841
+ if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
25842
+ if (chainStateRef.current) {
25843
+ cleanupEffectChainState(chainStateRef.current);
25844
+ }
25845
+ chainStateRef.current = createEffectChainState(width, height);
25846
+ sizeRef.current = { width, height };
25847
+ }
25848
+ return chainStateRef.current;
25849
+ }
25850
+ }), []);
25851
+ };
25852
+ var solidSchema = {
25853
+ color: {
25854
+ type: "color",
25855
+ default: "#ffffff",
25856
+ description: "Color"
25857
+ },
25858
+ width: {
25859
+ type: "number",
25860
+ min: 1,
25861
+ step: 1,
25862
+ default: 1920,
25863
+ description: "Width"
25864
+ },
25865
+ height: {
25866
+ type: "number",
25867
+ min: 1,
25868
+ step: 1,
25869
+ default: 1080,
25870
+ description: "Height"
25871
+ },
25872
+ ...sequenceStyleSchema
25873
+ };
25874
+ var SolidInner = ({
25875
+ color,
25876
+ width,
25877
+ height,
25878
+ _experimentalEffects: experimentalEffects = [],
25879
+ className,
25880
+ style,
25881
+ overrideId,
25882
+ ref
25883
+ }) => {
25884
+ const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
25885
+ const [outputCanvas, setOutputCanvas] = useState6(null);
25886
+ const memoizedEffects = useMemoizedEffects({
25887
+ effects: experimentalEffects,
25888
+ overrideId: overrideId ?? null
25889
+ });
25890
+ const sourceCanvas = useMemo16(() => {
25891
+ if (typeof document === "undefined") {
25892
+ return null;
25893
+ }
25894
+ const canvas = document.createElement("canvas");
25895
+ canvas.width = 1;
25896
+ canvas.height = 1;
25897
+ return canvas;
25898
+ }, []);
25899
+ const chainState = useEffectChainState();
25900
+ const canvasRef = useCallback6((canvas) => {
25901
+ setOutputCanvas(canvas);
25902
+ if (typeof ref === "function") {
25903
+ ref(canvas);
25904
+ } else if (ref) {
25905
+ ref.current = canvas;
25906
+ }
25907
+ }, [ref]);
25908
+ useEffect5(() => {
25909
+ if (!outputCanvas || !sourceCanvas) {
25910
+ return;
25911
+ }
25912
+ const handle = delayRender2("Solid effect chain");
25913
+ if (!chainState) {
25914
+ continueRender2(handle);
25915
+ return () => {
25916
+ continueRender2(handle);
25917
+ };
25918
+ }
25919
+ const ctx = sourceCanvas.getContext("2d", { colorSpace: "srgb" });
25920
+ if (!ctx) {
25921
+ cancelRender2(new Error("Failed to acquire 2D context for <Solid> source"));
25922
+ return;
25923
+ }
25924
+ ctx.fillStyle = color;
25925
+ ctx.fillRect(0, 0, 1, 1);
25926
+ runEffectChain({
25927
+ state: chainState.get(width, height),
25928
+ source: sourceCanvas,
25929
+ effects: memoizedEffects,
25930
+ output: outputCanvas,
25931
+ width,
25932
+ height
25933
+ }).then((completed) => {
25934
+ if (completed) {
25935
+ continueRender2(handle);
25936
+ }
25937
+ }).catch((err) => {
25938
+ cancelRender2(err);
25939
+ });
25940
+ return () => {
25941
+ continueRender2(handle);
25942
+ };
25943
+ }, [
25944
+ color,
25945
+ outputCanvas,
25946
+ sourceCanvas,
25947
+ chainState,
25948
+ width,
25949
+ height,
25950
+ delayRender2,
25951
+ continueRender2,
25952
+ cancelRender2,
25953
+ memoizedEffects
25954
+ ]);
25955
+ return /* @__PURE__ */ jsx12("canvas", {
25956
+ ref: canvasRef,
25957
+ width,
25958
+ height,
25959
+ className,
25960
+ style
25961
+ });
25962
+ };
25963
+ var SolidOuter = forwardRef4(({
25964
+ _experimentalEffects = [],
25965
+ _experimentalControls: controls,
25966
+ color,
25967
+ height,
25968
+ width,
25969
+ className,
25970
+ durationInFrames,
25971
+ style,
25972
+ name,
25973
+ from,
25974
+ hidden,
25975
+ showInTimeline,
25976
+ ...props
25977
+ }, ref) => {
25978
+ const memoizedEffectDefinitions = useMemoizedEffectDefinitions(_experimentalEffects);
25979
+ return /* @__PURE__ */ jsx12(Sequence, {
25980
+ layout: "none",
25981
+ from,
25982
+ hidden,
25983
+ showInTimeline,
25984
+ _experimentalControls: controls,
25985
+ _experimentalEffects: memoizedEffectDefinitions,
25986
+ durationInFrames,
25987
+ name: name ?? "<Solid>",
25988
+ ...props,
25989
+ children: /* @__PURE__ */ jsx12(SolidInner, {
25990
+ ref,
25991
+ overrideId: controls?.overrideId ?? null,
25992
+ color,
25993
+ height,
25994
+ width,
25995
+ className,
25996
+ style,
25997
+ _experimentalEffects
25998
+ })
25999
+ });
26000
+ });
26001
+ var Solid = wrapInSchema(SolidOuter, solidSchema);
26002
+ Solid.displayName = "Solid";
26003
+ addSequenceStackTraces(Solid);
26004
+ var VERSION = "4.0.463";
26005
+ var checkMultipleRemotionVersions = () => {
26006
+ if (typeof globalThis === "undefined") {
26007
+ return;
26008
+ }
26009
+ const set = () => {
26010
+ globalThis.remotion_imported = VERSION;
26011
+ if (typeof window !== "undefined") {
26012
+ window.remotion_imported = VERSION;
26013
+ }
26014
+ };
26015
+ const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
26016
+ if (alreadyImported) {
26017
+ if (alreadyImported === VERSION) {
26018
+ return;
26019
+ }
26020
+ if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
26021
+ set();
26022
+ return;
26023
+ }
26024
+ throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
26025
+ VERSION,
26026
+ typeof alreadyImported === "string" ? alreadyImported : "an older version"
26027
+ ].filter(truthy2).join(" and ")}. This will cause things to break in an unexpected way.
26028
+ Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`);
26029
+ }
26030
+ set();
26031
+ };
25770
26032
  var calcArgs = (fit, frameSize, canvasSize) => {
25771
26033
  switch (fit) {
25772
26034
  case "fill": {
@@ -25817,7 +26079,7 @@ var calcArgs = (fit, frameSize, canvasSize) => {
25817
26079
  };
25818
26080
  var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref) => {
25819
26081
  const canvasRef = useRef7(null);
25820
- const draw = useCallback6((imageData) => {
26082
+ const draw = useCallback7((imageData) => {
25821
26083
  const canvas = canvasRef.current;
25822
26084
  const canvasWidth = width ?? imageData.displayWidth;
25823
26085
  const canvasHeight = height ?? imageData.displayHeight;
@@ -26009,7 +26271,19 @@ var resolveAnimatedImageSource = (src) => {
26009
26271
  }
26010
26272
  return new URL(src, window.origin).href;
26011
26273
  };
26012
- var AnimatedImage = forwardRef4(({
26274
+ var animatedImageSchema = {
26275
+ playbackRate: {
26276
+ type: "number",
26277
+ min: 0,
26278
+ max: 10,
26279
+ step: 0.1,
26280
+ default: 1,
26281
+ description: "Playback Rate"
26282
+ },
26283
+ ...sequenceStyleSchema,
26284
+ hidden: hiddenField
26285
+ };
26286
+ var AnimatedImageContent = forwardRef5(({
26013
26287
  src,
26014
26288
  width,
26015
26289
  height,
@@ -26116,6 +26390,52 @@ var AnimatedImage = forwardRef4(({
26116
26390
  ...props
26117
26391
  });
26118
26392
  });
26393
+ AnimatedImageContent.displayName = "AnimatedImageContent";
26394
+ var AnimatedImageInner = ({
26395
+ src,
26396
+ width,
26397
+ height,
26398
+ onError,
26399
+ fit,
26400
+ playbackRate,
26401
+ loopBehavior,
26402
+ id,
26403
+ className,
26404
+ style,
26405
+ durationInFrames,
26406
+ _experimentalControls: controls,
26407
+ ref,
26408
+ ...sequenceProps
26409
+ }) => {
26410
+ const { durationInFrames: videoDuration } = useVideoConfig();
26411
+ const resolvedDuration = durationInFrames ?? videoDuration;
26412
+ const animatedImageProps = {
26413
+ src,
26414
+ width,
26415
+ height,
26416
+ onError,
26417
+ fit,
26418
+ playbackRate,
26419
+ loopBehavior,
26420
+ id,
26421
+ className,
26422
+ style
26423
+ };
26424
+ return /* @__PURE__ */ jsx14(Sequence, {
26425
+ layout: "none",
26426
+ durationInFrames: resolvedDuration,
26427
+ name: "<AnimatedImage>",
26428
+ _experimentalControls: controls,
26429
+ ...sequenceProps,
26430
+ children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
26431
+ ...animatedImageProps,
26432
+ ref
26433
+ })
26434
+ });
26435
+ };
26436
+ var AnimatedImage = wrapInSchema(AnimatedImageInner, animatedImageSchema);
26437
+ AnimatedImage.displayName = "AnimatedImage";
26438
+ addSequenceStackTraces(AnimatedImage);
26119
26439
  var cachedSupport = null;
26120
26440
  var isHtmlInCanvasSupported = () => {
26121
26441
  if (cachedSupport !== null) {
@@ -26129,6 +26449,7 @@ var isHtmlInCanvasSupported = () => {
26129
26449
  cachedSupport = typeof ctx?.drawElementImage === "function" && typeof canvas.requestPaint === "function" && typeof canvas.captureElementImage === "function";
26130
26450
  return cachedSupport;
26131
26451
  };
26452
+ var HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = "HTML in Canvas is not supported. Two common causes: Chrome is older than version 148 (update Chrome), or the HTML-in-Canvas flag is disabled at chrome://flags/#canvas-draw-element (enable it and restart Chrome).";
26132
26453
  function assertHtmlInCanvasDimensions(width, height) {
26133
26454
  if (typeof width !== "number" || typeof height !== "number") {
26134
26455
  throw new Error(`HtmlInCanvas: \`width\` and \`height\` must be numbers. Received width=${String(width)}, height=${String(height)}.`);
@@ -26154,30 +26475,16 @@ var defaultOnPaint = ({
26154
26475
  element.style.transform = transform.toString();
26155
26476
  };
26156
26477
  var HtmlInCanvasAncestorContext = createContext16(false);
26157
- var HtmlInCanvasInner = forwardRef5(({
26158
- width,
26159
- height,
26160
- _experimentalEffects: effects = [],
26161
- children,
26162
- onPaint,
26163
- onInit,
26164
- _experimentalControls: controls,
26165
- style,
26166
- durationInFrames,
26167
- ...sequenceProps
26168
- }, ref) => {
26169
- const isInsideAncestorHtmlInCanvas = useContext17(HtmlInCanvasAncestorContext);
26478
+ var HtmlInCanvasContent = forwardRef6(({ width, height, effects, children, onPaint, onInit, controls, style }, ref) => {
26479
+ const isInsideAncestorHtmlInCanvas = useContext18(HtmlInCanvasAncestorContext);
26170
26480
  assertHtmlInCanvasDimensions(width, height);
26171
26481
  const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
26172
26482
  if (!isHtmlInCanvasSupported()) {
26173
- cancelRender2(new Error("HTML in Canvas is not supported. Open this page in Chrome Canary with chrome://flags/#canvas-draw-element enabled."));
26483
+ cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
26174
26484
  }
26175
- const { durationInFrames: videoDuration } = useVideoConfig();
26176
- const resolvedDuration = durationInFrames ?? videoDuration;
26177
- const frame = useCurrentFrame();
26178
26485
  const canvas2dRef = useRef9(null);
26179
26486
  const divRef = useRef9(null);
26180
- const setLayoutCanvasRef = useCallback7((node) => {
26487
+ const setLayoutCanvasRef = useCallback8((node) => {
26181
26488
  canvas2dRef.current = node;
26182
26489
  if (typeof ref === "function") {
26183
26490
  ref(node);
@@ -26187,11 +26494,12 @@ var HtmlInCanvasInner = forwardRef5(({
26187
26494
  }, [ref]);
26188
26495
  const [offscreenCanvas] = useState8(() => new OffscreenCanvas(1, 1));
26189
26496
  const chainState = useEffectChainState();
26190
- const memoizedEffects = useMemoizedEffects(flattenEffects(effects));
26497
+ const memoizedEffects = useMemoizedEffects({
26498
+ effects,
26499
+ overrideId: controls?.overrideId ?? null
26500
+ });
26191
26501
  const effectsRef = useRef9(memoizedEffects);
26192
26502
  effectsRef.current = memoizedEffects;
26193
- const frameRef = useRef9(frame);
26194
- frameRef.current = frame;
26195
26503
  const onPaintRef = useRef9(onPaint);
26196
26504
  onPaintRef.current = onPaint;
26197
26505
  const onInitRef = useRef9(onInit);
@@ -26199,7 +26507,7 @@ var HtmlInCanvasInner = forwardRef5(({
26199
26507
  const initializedRef = useRef9(false);
26200
26508
  const onInitCleanupRef = useRef9(null);
26201
26509
  const unmountedRef = useRef9(false);
26202
- const onPaintCb = useCallback7(async () => {
26510
+ const onPaintCb = useCallback8(async () => {
26203
26511
  const element = divRef.current;
26204
26512
  if (!element) {
26205
26513
  throw new Error("Canvas or scene element not found");
@@ -26248,7 +26556,6 @@ var HtmlInCanvasInner = forwardRef5(({
26248
26556
  source: offscreenCanvas,
26249
26557
  effects: effectsRef.current,
26250
26558
  output: canvas2dRef.current,
26251
- frame: frameRef.current,
26252
26559
  width,
26253
26560
  height
26254
26561
  });
@@ -26312,31 +26619,64 @@ var HtmlInCanvasInner = forwardRef5(({
26312
26619
  if (isInsideAncestorHtmlInCanvas) {
26313
26620
  throw new Error("<HtmlInCanvas> effects cannot be nested together. Chrome will only display the outer effect. Consider merging the effects into one if you can.");
26314
26621
  }
26622
+ return /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
26623
+ value: true,
26624
+ children: /* @__PURE__ */ jsx15("canvas", {
26625
+ ref: setLayoutCanvasRef,
26626
+ width,
26627
+ height,
26628
+ style,
26629
+ children: /* @__PURE__ */ jsx15("div", {
26630
+ ref: divRef,
26631
+ style: innerStyle,
26632
+ children
26633
+ })
26634
+ })
26635
+ });
26636
+ });
26637
+ HtmlInCanvasContent.displayName = "HtmlInCanvasContent";
26638
+ var HtmlInCanvasInner = forwardRef6(({
26639
+ width,
26640
+ height,
26641
+ _experimentalEffects: effects = [],
26642
+ children,
26643
+ onPaint,
26644
+ onInit,
26645
+ _experimentalControls: controls,
26646
+ style,
26647
+ durationInFrames,
26648
+ name,
26649
+ ...sequenceProps
26650
+ }, ref) => {
26651
+ const { durationInFrames: videoDuration } = useVideoConfig();
26652
+ const resolvedDuration = durationInFrames ?? videoDuration;
26653
+ const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
26315
26654
  return /* @__PURE__ */ jsx15(Sequence, {
26316
26655
  durationInFrames: resolvedDuration,
26317
- name: "<HtmlInCanvas>",
26656
+ name: name ?? "<HtmlInCanvas>",
26318
26657
  _experimentalControls: controls,
26319
- _experimentalEffects: memoizedEffects,
26658
+ _experimentalEffects: memoizedEffectDefinitions,
26320
26659
  layout: "none",
26321
26660
  ...sequenceProps,
26322
- children: /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
26323
- value: true,
26324
- children: /* @__PURE__ */ jsx15("canvas", {
26325
- ref: setLayoutCanvasRef,
26326
- width,
26327
- height,
26328
- style,
26329
- children: /* @__PURE__ */ jsx15("div", {
26330
- ref: divRef,
26331
- style: innerStyle,
26332
- children
26333
- })
26334
- })
26661
+ children: /* @__PURE__ */ jsx15(HtmlInCanvasContent, {
26662
+ ref,
26663
+ width,
26664
+ height,
26665
+ effects,
26666
+ onPaint,
26667
+ onInit,
26668
+ controls,
26669
+ style,
26670
+ children
26335
26671
  })
26336
26672
  });
26337
26673
  });
26338
26674
  HtmlInCanvasInner.displayName = "HtmlInCanvas";
26339
- var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, sequenceStyleSchema);
26675
+ var htmlInCanvasSchema = {
26676
+ ...sequenceStyleSchema,
26677
+ hidden: hiddenField
26678
+ };
26679
+ var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, htmlInCanvasSchema);
26340
26680
  var HtmlInCanvas = Object.assign(HtmlInCanvasWrapped, {
26341
26681
  isSupported: isHtmlInCanvasSupported
26342
26682
  });
@@ -26383,7 +26723,7 @@ var RenderAssetManager = createContext17({
26383
26723
  var RenderAssetManagerProvider = ({ children, collectAssets }) => {
26384
26724
  const [renderAssets, setRenderAssets] = useState9([]);
26385
26725
  const renderAssetsRef = useRef10([]);
26386
- const registerRenderAsset = useCallback8((renderAsset) => {
26726
+ const registerRenderAsset = useCallback9((renderAsset) => {
26387
26727
  validateRenderAsset(renderAsset);
26388
26728
  renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
26389
26729
  setRenderAssets(renderAssetsRef.current);
@@ -26400,7 +26740,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
26400
26740
  };
26401
26741
  }, []);
26402
26742
  }
26403
- const unregisterRenderAsset = useCallback8((id) => {
26743
+ const unregisterRenderAsset = useCallback9((id) => {
26404
26744
  renderAssetsRef.current = renderAssetsRef.current.filter((a) => a.id !== id);
26405
26745
  setRenderAssets(renderAssetsRef.current);
26406
26746
  }, []);
@@ -26428,7 +26768,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
26428
26768
  };
26429
26769
  var ArtifactThumbnail = Symbol("Thumbnail");
26430
26770
  var Artifact = ({ filename, content, downloadBehavior }) => {
26431
- const { registerRenderAsset, unregisterRenderAsset } = useContext18(RenderAssetManager);
26771
+ const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
26432
26772
  const env = useRemotionEnvironment();
26433
26773
  const frame = useCurrentFrame();
26434
26774
  const [id] = useState10(() => {
@@ -26618,7 +26958,7 @@ var getSrcWithoutHash = (src) => {
26618
26958
  return src.slice(0, hashIndex);
26619
26959
  };
26620
26960
  var usePreload = (src) => {
26621
- const preloads2 = useContext19(PreloadContext);
26961
+ const preloads2 = useContext20(PreloadContext);
26622
26962
  const hashFragmentIndex = removeAndGetHashFragment(src);
26623
26963
  const withoutHashFragment = getSrcWithoutHash(src);
26624
26964
  if (!preloads2[withoutHashFragment]) {
@@ -26800,6 +27140,9 @@ var validateMediaProps = (props, component) => {
26800
27140
  if (typeof props.playbackRate === "number" && (isNaN(props.playbackRate) || !Number.isFinite(props.playbackRate) || props.playbackRate <= 0)) {
26801
27141
  throw new TypeError(`You have passed a playbackRate of ${props.playbackRate} to your <${component} /> component. Playback rate must be a real number above 0.`);
26802
27142
  }
27143
+ if (typeof props.preservePitch !== "boolean" && typeof props.preservePitch !== "undefined") {
27144
+ throw new TypeError(`'preservePitch' must be a boolean or undefined but got '${typeof props.preservePitch}' instead`);
27145
+ }
26803
27146
  };
26804
27147
  var validateStartFromProps = (startFrom, endAt) => {
26805
27148
  if (typeof startFrom !== "undefined") {
@@ -27145,7 +27488,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
27145
27488
  }, []);
27146
27489
  const prevEndTimes = useRef11({ scheduledEndTime: null, mediaEndTime: null });
27147
27490
  const nodesToResume = useRef11(new Map);
27148
- const unscheduleAudioNode = useCallback9((node) => {
27491
+ const unscheduleAudioNode = useCallback10((node) => {
27149
27492
  nodesToResume.current.delete(node);
27150
27493
  }, []);
27151
27494
  const scheduleAudioNode = useMemo22(() => {
@@ -27193,7 +27536,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
27193
27536
  };
27194
27537
  };
27195
27538
  }, [ctxAndGain, logLevel]);
27196
- const resume = useCallback9(() => {
27539
+ const resume = useCallback10(() => {
27197
27540
  if (!ctxAndGain) {
27198
27541
  return Promise.resolve();
27199
27542
  }
@@ -27220,10 +27563,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
27220
27563
  });
27221
27564
  return resumePromise.catch(() => {});
27222
27565
  }, [ctxAndGain, logLevel]);
27223
- const getIsResumingAudioContext = useCallback9(() => {
27566
+ const getIsResumingAudioContext = useCallback10(() => {
27224
27567
  return isResuming.current;
27225
27568
  }, []);
27226
- const suspend = useCallback9(() => {
27569
+ const suspend = useCallback10(() => {
27227
27570
  if (!ctxAndGain) {
27228
27571
  return;
27229
27572
  }
@@ -27269,7 +27612,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
27269
27612
  const logLevel = useLogLevel();
27270
27613
  const mountTime = useMountTime();
27271
27614
  const env = useRemotionEnvironment();
27272
- const audioCtx = useContext20(SharedAudioContext);
27615
+ const audioCtx = useContext21(SharedAudioContext);
27273
27616
  const audioContext = audioCtx?.audioContext ?? null;
27274
27617
  const resume = audioCtx?.resume;
27275
27618
  const refs = useMemo22(() => {
@@ -27296,7 +27639,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
27296
27639
  };
27297
27640
  }, [refs]);
27298
27641
  const takenAudios = useRef11(new Array(numberOfAudioTags).fill(false));
27299
- const rerenderAudios = useCallback9(() => {
27642
+ const rerenderAudios = useCallback10(() => {
27300
27643
  refs.forEach(({ ref, id }) => {
27301
27644
  const data = audios.current?.find((a) => a.id === id);
27302
27645
  const { current } = ref;
@@ -27317,7 +27660,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
27317
27660
  });
27318
27661
  });
27319
27662
  }, [refs]);
27320
- const registerAudio = useCallback9((options) => {
27663
+ const registerAudio = useCallback10((options) => {
27321
27664
  const { aud, audioId, premounting, postmounting } = options;
27322
27665
  const found = audios.current?.find((a) => a.audioId === audioId);
27323
27666
  if (found) {
@@ -27346,7 +27689,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
27346
27689
  rerenderAudios();
27347
27690
  return newElem;
27348
27691
  }, [numberOfAudioTags, refs, rerenderAudios]);
27349
- const unregisterAudio = useCallback9((id) => {
27692
+ const unregisterAudio = useCallback10((id) => {
27350
27693
  const cloned = [...takenAudios.current];
27351
27694
  const index = refs.findIndex((r2) => r2.id === id);
27352
27695
  if (index === -1) {
@@ -27357,7 +27700,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
27357
27700
  audios.current = audios.current?.filter((a) => a.id !== id);
27358
27701
  rerenderAudios();
27359
27702
  }, [refs, rerenderAudios]);
27360
- const updateAudio = useCallback9(({
27703
+ const updateAudio = useCallback10(({
27361
27704
  aud,
27362
27705
  audioId,
27363
27706
  id,
@@ -27391,7 +27734,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
27391
27734
  rerenderAudios();
27392
27735
  }
27393
27736
  }, [rerenderAudios]);
27394
- const playAllAudios = useCallback9(() => {
27737
+ const playAllAudios = useCallback10(() => {
27395
27738
  refs.forEach((ref) => {
27396
27739
  const audio = audios.current.find((a) => a.el === ref.ref);
27397
27740
  if (audio?.premounting) {
@@ -27444,8 +27787,8 @@ var useSharedAudio = ({
27444
27787
  premounting,
27445
27788
  postmounting
27446
27789
  }) => {
27447
- const audioCtx = useContext20(SharedAudioContext);
27448
- const tagsCtx = useContext20(SharedAudioTagsContext);
27790
+ const audioCtx = useContext21(SharedAudioContext);
27791
+ const tagsCtx = useContext21(SharedAudioTagsContext);
27449
27792
  const [elem] = useState12(() => {
27450
27793
  if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
27451
27794
  return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
@@ -27624,7 +27967,7 @@ var useVolume = ({
27624
27967
  const audioStuffRef = useRef13(null);
27625
27968
  const currentVolumeRef = useRef13(volume);
27626
27969
  currentVolumeRef.current = volume;
27627
- const sharedAudioContext = useContext21(SharedAudioContext);
27970
+ const sharedAudioContext = useContext22(SharedAudioContext);
27628
27971
  if (!sharedAudioContext) {
27629
27972
  throw new Error("useAmplification must be used within a SharedAudioContext");
27630
27973
  }
@@ -27689,7 +28032,7 @@ var useVolume = ({
27689
28032
  return audioStuffRef;
27690
28033
  };
27691
28034
  var useMediaStartsAt = () => {
27692
- const parentSequence = useContext22(SequenceContext);
28035
+ const parentSequence = useContext23(SequenceContext);
27693
28036
  const startsAt = Math.min(0, parentSequence?.relativeFrom ?? 0);
27694
28037
  return startsAt;
27695
28038
  };
@@ -27778,7 +28121,7 @@ var useBasicMediaInTimeline = ({
27778
28121
  if (!src) {
27779
28122
  throw new Error("No src passed");
27780
28123
  }
27781
- const parentSequence = useContext23(SequenceContext);
28124
+ const parentSequence = useContext24(SequenceContext);
27782
28125
  const [initialVolume] = useState13(() => volume);
27783
28126
  const duration = getTimelineDuration({
27784
28127
  compositionDurationInFrames: sequenceDurationInFrames,
@@ -27845,8 +28188,8 @@ var useImageInTimeline = ({
27845
28188
  loopDisplay,
27846
28189
  controls
27847
28190
  }) => {
27848
- const parentSequence = useContext23(SequenceContext);
27849
- const { registerSequence, unregisterSequence } = useContext23(SequenceManager);
28191
+ const parentSequence = useContext24(SequenceContext);
28192
+ const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
27850
28193
  const { durationInFrames } = useVideoConfig();
27851
28194
  const mediaStartsAt = useMediaStartsAt();
27852
28195
  const { duration, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
@@ -27927,9 +28270,9 @@ var useMediaInTimeline = ({
27927
28270
  postmountDisplay,
27928
28271
  loopDisplay
27929
28272
  }) => {
27930
- const parentSequence = useContext23(SequenceContext);
28273
+ const parentSequence = useContext24(SequenceContext);
27931
28274
  const startsAt = useMediaStartsAt();
27932
- const { registerSequence, unregisterSequence } = useContext23(SequenceManager);
28275
+ const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
27933
28276
  const { durationInFrames } = useVideoConfig();
27934
28277
  const mediaStartsAt = useMediaStartsAt();
27935
28278
  const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
@@ -28011,7 +28354,7 @@ var useBufferManager = (logLevel, mountTime) => {
28011
28354
  const env = useRemotionEnvironment();
28012
28355
  const rendering = env.isRendering;
28013
28356
  const buffering = useRef14(false);
28014
- const addBlock = useCallback10((block) => {
28357
+ const addBlock = useCallback11((block) => {
28015
28358
  if (rendering) {
28016
28359
  return {
28017
28360
  unblock: () => {
@@ -28037,7 +28380,7 @@ var useBufferManager = (logLevel, mountTime) => {
28037
28380
  }
28038
28381
  };
28039
28382
  }, [rendering]);
28040
- const listenForBuffering = useCallback10((callback) => {
28383
+ const listenForBuffering = useCallback11((callback) => {
28041
28384
  setOnBufferingCallbacks((c) => [...c, callback]);
28042
28385
  return {
28043
28386
  remove: () => {
@@ -28045,7 +28388,7 @@ var useBufferManager = (logLevel, mountTime) => {
28045
28388
  }
28046
28389
  };
28047
28390
  }, []);
28048
- const listenForResume = useCallback10((callback) => {
28391
+ const listenForResume = useCallback11((callback) => {
28049
28392
  setOnResumeCallbacks((c) => [...c, callback]);
28050
28393
  return {
28051
28394
  remove: () => {
@@ -28089,7 +28432,7 @@ var useBufferManager = (logLevel, mountTime) => {
28089
28432
  };
28090
28433
  var BufferingContextReact = React21.createContext(null);
28091
28434
  var BufferingProvider = ({ children }) => {
28092
- const { logLevel, mountTime } = useContext24(LogLevelContext);
28435
+ const { logLevel, mountTime } = useContext25(LogLevelContext);
28093
28436
  const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
28094
28437
  return /* @__PURE__ */ jsx21(BufferingContextReact.Provider, {
28095
28438
  value: bufferManager,
@@ -28119,7 +28462,7 @@ var useIsPlayerBuffering = (bufferManager) => {
28119
28462
  return isBuffering;
28120
28463
  };
28121
28464
  var useBufferState = () => {
28122
- const buffer = useContext25(BufferingContextReact);
28465
+ const buffer = useContext26(BufferingContextReact);
28123
28466
  const logLevel = useLogLevel();
28124
28467
  const addBlock = buffer ? buffer.addBlock : null;
28125
28468
  return useMemo25(() => ({
@@ -28159,7 +28502,7 @@ var useBufferUntilFirstFrame = ({
28159
28502
  }) => {
28160
28503
  const bufferingRef = useRef15(false);
28161
28504
  const { delayPlayback } = useBufferState();
28162
- const bufferUntilFirstFrame = useCallback11((requestedTime) => {
28505
+ const bufferUntilFirstFrame = useCallback12((requestedTime) => {
28163
28506
  if (mediaType !== "video") {
28164
28507
  return;
28165
28508
  }
@@ -28530,6 +28873,23 @@ function checkInfiniteRange(name, arr) {
28530
28873
  }
28531
28874
  }
28532
28875
  }
28876
+ function assertValidInterpolateEasingOption(easing, inputRangeLength) {
28877
+ if (easing === undefined) {
28878
+ return;
28879
+ }
28880
+ if (typeof easing === "function") {
28881
+ return;
28882
+ }
28883
+ const expectedLength = inputRangeLength - 1;
28884
+ if (easing.length !== expectedLength) {
28885
+ throw new Error(`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = ${expectedLength}), but got length ${easing.length}`);
28886
+ }
28887
+ for (let i = 0;i < easing.length; i++) {
28888
+ if (typeof easing[i] !== "function") {
28889
+ throw new Error(`easing[${i}] must be a function`);
28890
+ }
28891
+ }
28892
+ }
28533
28893
  function interpolate2(input, inputRange, outputRange, options) {
28534
28894
  if (typeof input === "undefined") {
28535
28895
  throw new Error("input can not be undefined");
@@ -28546,7 +28906,18 @@ function interpolate2(input, inputRange, outputRange, options) {
28546
28906
  checkInfiniteRange("inputRange", inputRange);
28547
28907
  checkInfiniteRange("outputRange", outputRange);
28548
28908
  checkValidInputRange(inputRange);
28549
- const easing = options?.easing ?? ((num) => num);
28909
+ assertValidInterpolateEasingOption(options?.easing, inputRange.length);
28910
+ const easingOption = options?.easing;
28911
+ const defaultEasing = (num) => num;
28912
+ const resolveEasingForSegment = (segmentIndex) => {
28913
+ if (easingOption === undefined) {
28914
+ return defaultEasing;
28915
+ }
28916
+ if (typeof easingOption === "function") {
28917
+ return easingOption;
28918
+ }
28919
+ return easingOption[segmentIndex];
28920
+ };
28550
28921
  let extrapolateLeft = "extend";
28551
28922
  if (options?.extrapolateLeft !== undefined) {
28552
28923
  extrapolateLeft = options.extrapolateLeft;
@@ -28560,7 +28931,7 @@ function interpolate2(input, inputRange, outputRange, options) {
28560
28931
  }
28561
28932
  const range = findRange(input, inputRange);
28562
28933
  return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
28563
- easing,
28934
+ easing: resolveEasingForSegment(range),
28564
28935
  extrapolateLeft,
28565
28936
  extrapolateRight
28566
28937
  });
@@ -28625,6 +28996,7 @@ var useMediaPlayback = ({
28625
28996
  src,
28626
28997
  mediaType,
28627
28998
  playbackRate: localPlaybackRate,
28999
+ preservePitch = true,
28628
29000
  onlyWarnForMediaSeekingError,
28629
29001
  acceptableTimeshift,
28630
29002
  pauseWhenBuffering,
@@ -28636,7 +29008,7 @@ var useMediaPlayback = ({
28636
29008
  const frame = useCurrentFrame();
28637
29009
  const absoluteFrame = useTimelinePosition();
28638
29010
  const [playing] = usePlayingState();
28639
- const buffering = useContext26(BufferingContextReact);
29011
+ const buffering = useContext27(BufferingContextReact);
28640
29012
  const { fps } = useVideoConfig();
28641
29013
  const mediaStartsAt = useMediaStartsAt();
28642
29014
  const lastSeekDueToShift = useRef17(null);
@@ -28647,7 +29019,7 @@ var useMediaPlayback = ({
28647
29019
  throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
28648
29020
  }
28649
29021
  const isVariableFpsVideoMap = useRef17({});
28650
- const onVariableFpsVideoDetected = useCallback12(() => {
29022
+ const onVariableFpsVideoDetected = useCallback13(() => {
28651
29023
  if (!src) {
28652
29024
  return;
28653
29025
  }
@@ -28742,7 +29114,10 @@ var useMediaPlayback = ({
28742
29114
  if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
28743
29115
  mediaRef.current.playbackRate = playbackRateToSet;
28744
29116
  }
28745
- }, [mediaRef, playbackRate]);
29117
+ if (mediaRef.current && mediaRef.current.preservesPitch !== preservePitch) {
29118
+ mediaRef.current.preservesPitch = preservePitch;
29119
+ }
29120
+ }, [mediaRef, playbackRate, preservePitch]);
28746
29121
  useEffect12(() => {
28747
29122
  const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
28748
29123
  if (!mediaRef.current) {
@@ -28924,15 +29299,15 @@ var SetMediaVolumeContext = createContext22({
28924
29299
  }
28925
29300
  });
28926
29301
  var useMediaVolumeState = () => {
28927
- const { mediaVolume } = useContext27(MediaVolumeContext);
28928
- const { setMediaVolume } = useContext27(SetMediaVolumeContext);
29302
+ const { mediaVolume } = useContext28(MediaVolumeContext);
29303
+ const { setMediaVolume } = useContext28(SetMediaVolumeContext);
28929
29304
  return useMemo27(() => {
28930
29305
  return [mediaVolume, setMediaVolume];
28931
29306
  }, [mediaVolume, setMediaVolume]);
28932
29307
  };
28933
29308
  var useMediaMutedState = () => {
28934
- const { mediaMuted } = useContext27(MediaVolumeContext);
28935
- const { setMediaMuted } = useContext27(SetMediaVolumeContext);
29309
+ const { mediaMuted } = useContext28(MediaVolumeContext);
29310
+ const { setMediaMuted } = useContext28(SetMediaVolumeContext);
28936
29311
  return useMemo27(() => {
28937
29312
  return [mediaMuted, setMediaMuted];
28938
29313
  }, [mediaMuted, setMediaMuted]);
@@ -28952,6 +29327,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
28952
29327
  volume,
28953
29328
  muted,
28954
29329
  playbackRate,
29330
+ preservePitch,
28955
29331
  shouldPreMountAudioTags,
28956
29332
  src,
28957
29333
  onDuration,
@@ -28982,14 +29358,12 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
28982
29358
  const [mediaVolume] = useMediaVolumeState();
28983
29359
  const [mediaMuted] = useMediaMutedState();
28984
29360
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
28985
- const { hidden } = useContext28(SequenceVisibilityToggleContext);
28986
29361
  if (!src) {
28987
29362
  throw new TypeError("No 'src' was passed to <Html5Audio>.");
28988
29363
  }
28989
29364
  const preloadedSrc = usePreload(src);
28990
- const sequenceContext = useContext28(SequenceContext);
29365
+ const sequenceContext = useContext29(SequenceContext);
28991
29366
  const [timelineId] = useState16(() => String(Math.random()));
28992
- const isSequenceHidden = hidden[timelineId] ?? false;
28993
29367
  const userPreferredVolume = evaluateVolume({
28994
29368
  frame: volumePropFrame,
28995
29369
  volume,
@@ -29003,7 +29377,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
29003
29377
  });
29004
29378
  const propsToPass = useMemo28(() => {
29005
29379
  return {
29006
- muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
29380
+ muted: muted || mediaMuted || userPreferredVolume <= 0,
29007
29381
  src: preloadedSrc,
29008
29382
  loop: _remotionInternalNativeLoopPassed,
29009
29383
  crossOrigin: crossOriginValue,
@@ -29011,7 +29385,6 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
29011
29385
  };
29012
29386
  }, [
29013
29387
  _remotionInternalNativeLoopPassed,
29014
- isSequenceHidden,
29015
29388
  mediaMuted,
29016
29389
  muted,
29017
29390
  nativeProps,
@@ -29056,6 +29429,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
29056
29429
  src,
29057
29430
  mediaType: "audio",
29058
29431
  playbackRate: playbackRate ?? 1,
29432
+ preservePitch,
29059
29433
  onlyWarnForMediaSeekingError: false,
29060
29434
  acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
29061
29435
  isPremounting: Boolean(sequenceContext?.premounting),
@@ -29118,7 +29492,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
29118
29492
  ...propsToPass
29119
29493
  });
29120
29494
  };
29121
- var AudioForPreview = forwardRef6(AudioForDevelopmentForwardRefFunction);
29495
+ var AudioForPreview = forwardRef7(AudioForDevelopmentForwardRefFunction);
29122
29496
  var AudioForRenderingRefForwardingFunction = (props, ref) => {
29123
29497
  const audioRef = useRef19(null);
29124
29498
  const {
@@ -29137,13 +29511,14 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
29137
29511
  loopVolumeCurveBehavior,
29138
29512
  pauseWhenBuffering,
29139
29513
  audioStreamIndex,
29514
+ preservePitch: _preservePitch,
29140
29515
  ...nativeProps
29141
29516
  } = props;
29142
29517
  const absoluteFrame = useTimelinePosition();
29143
29518
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
29144
29519
  const frame = useCurrentFrame();
29145
- const sequenceContext = useContext29(SequenceContext);
29146
- const { registerRenderAsset, unregisterRenderAsset } = useContext29(RenderAssetManager);
29520
+ const sequenceContext = useContext30(SequenceContext);
29521
+ const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
29147
29522
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
29148
29523
  const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
29149
29524
  props.src,
@@ -29250,9 +29625,9 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
29250
29625
  onError: onNativeError
29251
29626
  });
29252
29627
  };
29253
- var AudioForRendering = forwardRef7(AudioForRenderingRefForwardingFunction);
29628
+ var AudioForRendering = forwardRef8(AudioForRenderingRefForwardingFunction);
29254
29629
  var AudioRefForwardingFunction = (props, ref) => {
29255
- const audioTagsContext = useContext30(SharedAudioTagsContext);
29630
+ const audioTagsContext = useContext31(SharedAudioTagsContext);
29256
29631
  const {
29257
29632
  startFrom,
29258
29633
  endAt,
@@ -29271,12 +29646,12 @@ var AudioRefForwardingFunction = (props, ref) => {
29271
29646
  if (environment.isClientSideRendering) {
29272
29647
  throw new Error("<Html5Audio> is not supported in @remotion/web-renderer. Use <Audio> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
29273
29648
  }
29274
- const { durations, setDurations } = useContext30(DurationsContext);
29649
+ const { durations, setDurations } = useContext31(DurationsContext);
29275
29650
  if (typeof props.src !== "string") {
29276
29651
  throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
29277
29652
  }
29278
29653
  const preloadedSrc = usePreload(props.src);
29279
- const onError = useCallback13((e) => {
29654
+ const onError = useCallback14((e) => {
29280
29655
  console.log(e.currentTarget.error);
29281
29656
  const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
29282
29657
  if (loop) {
@@ -29290,7 +29665,7 @@ var AudioRefForwardingFunction = (props, ref) => {
29290
29665
  console.warn(errMessage);
29291
29666
  }
29292
29667
  }, [loop, onRemotionError, preloadedSrc]);
29293
- const onDuration = useCallback13((src, durationInSeconds) => {
29668
+ const onDuration = useCallback14((src, durationInSeconds) => {
29294
29669
  setDurations({ type: "got-duration", durationInSeconds, src });
29295
29670
  }, [setDurations]);
29296
29671
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
@@ -29340,7 +29715,11 @@ var AudioRefForwardingFunction = (props, ref) => {
29340
29715
  })
29341
29716
  });
29342
29717
  }
29343
- validateMediaProps({ playbackRate: props.playbackRate, volume: props.volume }, "Html5Audio");
29718
+ validateMediaProps({
29719
+ playbackRate: props.playbackRate,
29720
+ preservePitch: props.preservePitch,
29721
+ volume: props.volume
29722
+ }, "Html5Audio");
29344
29723
  if (environment.isRendering) {
29345
29724
  return /* @__PURE__ */ jsx24(AudioForRendering, {
29346
29725
  onDuration,
@@ -29363,7 +29742,7 @@ var AudioRefForwardingFunction = (props, ref) => {
29363
29742
  showInTimeline: showInTimeline ?? true
29364
29743
  });
29365
29744
  };
29366
- var Html5Audio = forwardRef8(AudioRefForwardingFunction);
29745
+ var Html5Audio = forwardRef9(AudioRefForwardingFunction);
29367
29746
  addSequenceStackTraces(Html5Audio);
29368
29747
  var Audio = Html5Audio;
29369
29748
  var kSplineTableSize = 11;
@@ -29380,11 +29759,11 @@ var IFrameRefForwarding = ({
29380
29759
  retries: delayRenderRetries ?? undefined,
29381
29760
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
29382
29761
  }));
29383
- const didLoad = useCallback14((e) => {
29762
+ const didLoad = useCallback15((e) => {
29384
29763
  continueRender2(handle);
29385
29764
  onLoad?.(e);
29386
29765
  }, [handle, onLoad, continueRender2]);
29387
- const didGetError = useCallback14((e) => {
29766
+ const didGetError = useCallback15((e) => {
29388
29767
  continueRender2(handle);
29389
29768
  if (onError) {
29390
29769
  onError(e);
@@ -29400,7 +29779,7 @@ var IFrameRefForwarding = ({
29400
29779
  onLoad: didLoad
29401
29780
  });
29402
29781
  };
29403
- var IFrame = forwardRef9(IFrameRefForwarding);
29782
+ var IFrame = forwardRef10(IFrameRefForwarding);
29404
29783
  function exponentialBackoff(errorCount) {
29405
29784
  return 1000 * 2 ** (errorCount - 1);
29406
29785
  }
@@ -29410,7 +29789,7 @@ function truncateSrcForLabel(src) {
29410
29789
  }
29411
29790
  return src;
29412
29791
  }
29413
- var ImgInner = ({
29792
+ var ImgContent = ({
29414
29793
  onError,
29415
29794
  maxRetries = 2,
29416
29795
  src,
@@ -29419,21 +29798,13 @@ var ImgInner = ({
29419
29798
  delayRenderTimeoutInMilliseconds,
29420
29799
  onImageFrame,
29421
29800
  crossOrigin,
29422
- showInTimeline,
29423
- name,
29424
- stack,
29425
29801
  ref,
29426
- _experimentalControls: controls,
29427
29802
  ...props2
29428
29803
  }) => {
29429
29804
  const imageRef = useRef20(null);
29430
29805
  const errors = useRef20({});
29431
29806
  const { delayPlayback } = useBufferState();
29432
- const sequenceContext = useContext31(SequenceContext);
29433
- const [timelineId] = useState18(() => String(Math.random()));
29434
- if (!src) {
29435
- throw new Error('No "src" prop was passed to <Img>.');
29436
- }
29807
+ const sequenceContext = useContext32(SequenceContext);
29437
29808
  const _propsValid = true;
29438
29809
  if (!_propsValid) {
29439
29810
  throw new Error("typecheck error");
@@ -29441,19 +29812,8 @@ var ImgInner = ({
29441
29812
  useImperativeHandle6(ref, () => {
29442
29813
  return imageRef.current;
29443
29814
  }, []);
29444
- useImageInTimeline({
29445
- src,
29446
- displayName: name ?? null,
29447
- id: timelineId,
29448
- stack: stack ?? null,
29449
- showInTimeline: showInTimeline ?? true,
29450
- premountDisplay: sequenceContext?.premountDisplay ?? null,
29451
- postmountDisplay: sequenceContext?.postmountDisplay ?? null,
29452
- loopDisplay: undefined,
29453
- controls: controls ?? null
29454
- });
29455
29815
  const actualSrc = usePreload(src);
29456
- const retryIn = useCallback15((timeout) => {
29816
+ const retryIn = useCallback16((timeout) => {
29457
29817
  if (!imageRef.current) {
29458
29818
  return;
29459
29819
  }
@@ -29471,7 +29831,7 @@ var ImgInner = ({
29471
29831
  }, timeout);
29472
29832
  }, []);
29473
29833
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
29474
- const didGetError = useCallback15((e) => {
29834
+ const didGetError = useCallback16((e) => {
29475
29835
  if (!errors.current) {
29476
29836
  return;
29477
29837
  }
@@ -29573,7 +29933,44 @@ var ImgInner = ({
29573
29933
  decoding: "sync"
29574
29934
  });
29575
29935
  };
29576
- var Img = wrapInSchema(ImgInner, sequenceStyleSchema);
29936
+ var ImgInner = ({
29937
+ hidden,
29938
+ name,
29939
+ stack,
29940
+ showInTimeline,
29941
+ src,
29942
+ _experimentalControls: controls,
29943
+ ...props2
29944
+ }) => {
29945
+ const sequenceContext = useContext32(SequenceContext);
29946
+ const [timelineId] = useState18(() => String(Math.random()));
29947
+ if (!src) {
29948
+ throw new Error('No "src" prop was passed to <Img>.');
29949
+ }
29950
+ useImageInTimeline({
29951
+ src,
29952
+ displayName: name ?? null,
29953
+ id: timelineId,
29954
+ stack: stack ?? null,
29955
+ showInTimeline: showInTimeline ?? true,
29956
+ premountDisplay: sequenceContext?.premountDisplay ?? null,
29957
+ postmountDisplay: sequenceContext?.postmountDisplay ?? null,
29958
+ loopDisplay: undefined,
29959
+ controls: controls ?? null
29960
+ });
29961
+ if (hidden) {
29962
+ return null;
29963
+ }
29964
+ return /* @__PURE__ */ jsx26(ImgContent, {
29965
+ src,
29966
+ ...props2
29967
+ });
29968
+ };
29969
+ var imgSchema = {
29970
+ ...sequenceStyleSchema,
29971
+ hidden: hiddenField
29972
+ };
29973
+ var Img = wrapInSchema(ImgInner, imgSchema);
29577
29974
  addSequenceStackTraces(Img);
29578
29975
  var compositionsRef = React28.createRef();
29579
29976
  var CompositionManagerProvider = ({
@@ -29587,14 +29984,14 @@ var CompositionManagerProvider = ({
29587
29984
  const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
29588
29985
  const [compositions, setCompositions] = useState19(initialCompositions);
29589
29986
  const currentcompositionsRef = useRef21(compositions);
29590
- const updateCompositions = useCallback16((updateComps) => {
29987
+ const updateCompositions = useCallback17((updateComps) => {
29591
29988
  setCompositions((comps) => {
29592
29989
  const updated = updateComps(comps);
29593
29990
  currentcompositionsRef.current = updated;
29594
29991
  return updated;
29595
29992
  });
29596
29993
  }, []);
29597
- const registerComposition = useCallback16((comp) => {
29994
+ const registerComposition = useCallback17((comp) => {
29598
29995
  updateCompositions((comps) => {
29599
29996
  if (comps.find((c2) => c2.id === comp.id)) {
29600
29997
  throw new Error(`Multiple composition with id ${comp.id} are registered.`);
@@ -29602,12 +29999,12 @@ var CompositionManagerProvider = ({
29602
29999
  return [...comps, comp];
29603
30000
  });
29604
30001
  }, [updateCompositions]);
29605
- const unregisterComposition = useCallback16((id) => {
30002
+ const unregisterComposition = useCallback17((id) => {
29606
30003
  setCompositions((comps) => {
29607
30004
  return comps.filter((c2) => c2.id !== id);
29608
30005
  });
29609
30006
  }, []);
29610
- const registerFolder = useCallback16((name, parent, nonce) => {
30007
+ const registerFolder = useCallback17((name, parent, nonce) => {
29611
30008
  setFolders((prevFolders) => {
29612
30009
  return [
29613
30010
  ...prevFolders,
@@ -29619,7 +30016,7 @@ var CompositionManagerProvider = ({
29619
30016
  ];
29620
30017
  });
29621
30018
  }, []);
29622
- const unregisterFolder = useCallback16((name, parent) => {
30019
+ const unregisterFolder = useCallback17((name, parent) => {
29623
30020
  setFolders((prevFolders) => {
29624
30021
  return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
29625
30022
  });
@@ -29719,16 +30116,31 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
29719
30116
  }
29720
30117
  `;
29721
30118
  };
29722
- var defineEffect = (definition) => definition;
29723
- var createDescriptor = (definition, params) => {
29724
- const widened = definition;
29725
- return {
30119
+ var disabledEffectField = {
30120
+ type: "boolean",
30121
+ default: false,
30122
+ description: "Disabled"
30123
+ };
30124
+ var createEffect = (definition) => {
30125
+ const userCalculateKey = definition.calculateKey;
30126
+ const widened = {
30127
+ ...definition,
30128
+ calculateKey: (params) => {
30129
+ const disabled = params.disabled ?? false;
30130
+ return `${userCalculateKey(params)}-disabled-${disabled}`;
30131
+ },
30132
+ schema: {
30133
+ disabled: disabledEffectField,
30134
+ ...definition.schema
30135
+ }
30136
+ };
30137
+ const factory = (params = {}) => ({
29726
30138
  definition: widened,
29727
30139
  params,
29728
- stack: new Error().stack,
29729
30140
  effectKey: widened.calculateKey(params),
29730
30141
  memoized: false
29731
- };
30142
+ });
30143
+ return factory;
29732
30144
  };
29733
30145
  var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
29734
30146
  var getPreviewDomElement = () => {
@@ -29754,7 +30166,7 @@ var waitForRoot = (fn) => {
29754
30166
  };
29755
30167
  var MediaEnabledContext = createContext23(null);
29756
30168
  var useVideoEnabled = () => {
29757
- const context = useContext32(MediaEnabledContext);
30169
+ const context = useContext33(MediaEnabledContext);
29758
30170
  if (!context) {
29759
30171
  return window.remotion_videoEnabled;
29760
30172
  }
@@ -29764,7 +30176,7 @@ var useVideoEnabled = () => {
29764
30176
  return context.videoEnabled;
29765
30177
  };
29766
30178
  var useAudioEnabled = () => {
29767
- const context = useContext32(MediaEnabledContext);
30179
+ const context = useContext33(MediaEnabledContext);
29768
30180
  if (!context) {
29769
30181
  return window.remotion_audioEnabled;
29770
30182
  }
@@ -30080,15 +30492,16 @@ var OffthreadVideoForRendering = ({
30080
30492
  onVideoFrame,
30081
30493
  crossOrigin,
30082
30494
  audioStreamIndex,
30495
+ preservePitch: _preservePitch,
30083
30496
  ...props2
30084
30497
  }) => {
30085
30498
  const absoluteFrame = useTimelinePosition();
30086
30499
  const frame = useCurrentFrame();
30087
30500
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
30088
30501
  const videoConfig = useUnsafeVideoConfig();
30089
- const sequenceContext = useContext33(SequenceContext);
30502
+ const sequenceContext = useContext34(SequenceContext);
30090
30503
  const mediaStartsAt = useMediaStartsAt();
30091
- const { registerRenderAsset, unregisterRenderAsset } = useContext33(RenderAssetManager);
30504
+ const { registerRenderAsset, unregisterRenderAsset } = useContext34(RenderAssetManager);
30092
30505
  if (!src) {
30093
30506
  throw new TypeError("No `src` was passed to <OffthreadVideo>.");
30094
30507
  }
@@ -30235,7 +30648,7 @@ var OffthreadVideoForRendering = ({
30235
30648
  continueRender2,
30236
30649
  delayRender2
30237
30650
  ]);
30238
- const onErr = useCallback17(() => {
30651
+ const onErr = useCallback18(() => {
30239
30652
  if (onError) {
30240
30653
  onError?.(new Error("Failed to load image with src " + imageSrc));
30241
30654
  } else {
@@ -30245,7 +30658,7 @@ var OffthreadVideoForRendering = ({
30245
30658
  const className = useMemo33(() => {
30246
30659
  return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy2).join(" ");
30247
30660
  }, [props2.className]);
30248
- const onImageFrame = useCallback17((img) => {
30661
+ const onImageFrame = useCallback18((img) => {
30249
30662
  if (onVideoFrame) {
30250
30663
  onVideoFrame(img);
30251
30664
  }
@@ -30300,7 +30713,7 @@ class MediaPlaybackError extends Error {
30300
30713
  }
30301
30714
  }
30302
30715
  var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
30303
- const context = useContext34(SharedAudioContext);
30716
+ const context = useContext35(SharedAudioContext);
30304
30717
  if (!context) {
30305
30718
  throw new Error("SharedAudioContext not found");
30306
30719
  }
@@ -30326,6 +30739,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
30326
30739
  volume,
30327
30740
  muted,
30328
30741
  playbackRate,
30742
+ preservePitch,
30329
30743
  onlyWarnForMediaSeekingError,
30330
30744
  src,
30331
30745
  onDuration,
@@ -30356,12 +30770,10 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
30356
30770
  }
30357
30771
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
30358
30772
  const { fps, durationInFrames } = useVideoConfig();
30359
- const parentSequence = useContext34(SequenceContext);
30360
- const { hidden } = useContext34(SequenceVisibilityToggleContext);
30773
+ const parentSequence = useContext35(SequenceContext);
30361
30774
  const logLevel = useLogLevel();
30362
30775
  const mountTime = useMountTime();
30363
30776
  const [timelineId] = useState21(() => String(Math.random()));
30364
- const isSequenceHidden = hidden[timelineId] ?? false;
30365
30777
  if (typeof acceptableTimeShift !== "undefined") {
30366
30778
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
30367
30779
  }
@@ -30392,6 +30804,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
30392
30804
  src,
30393
30805
  mediaType: "video",
30394
30806
  playbackRate: props2.playbackRate ?? 1,
30807
+ preservePitch,
30395
30808
  onlyWarnForMediaSeekingError,
30396
30809
  acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
30397
30810
  isPremounting: Boolean(parentSequence?.premounting),
@@ -30505,10 +30918,9 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
30505
30918
  }, []);
30506
30919
  const actualStyle = useMemo34(() => {
30507
30920
  return {
30508
- ...style,
30509
- opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
30921
+ ...style
30510
30922
  };
30511
- }, [isSequenceHidden, style]);
30923
+ }, [style]);
30512
30924
  const crossOriginValue = getCrossOriginValue({
30513
30925
  crossOrigin,
30514
30926
  requestsVideoFrame: Boolean(onVideoFrame),
@@ -30516,7 +30928,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
30516
30928
  });
30517
30929
  return /* @__PURE__ */ jsx31("video", {
30518
30930
  ref: videoRef,
30519
- muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
30931
+ muted: muted || mediaMuted || userPreferredVolume <= 0,
30520
30932
  playsInline: true,
30521
30933
  src: actualSrc,
30522
30934
  loop: _remotionInternalNativeLoopPassed,
@@ -30526,7 +30938,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
30526
30938
  ...nativeProps
30527
30939
  });
30528
30940
  };
30529
- var VideoForPreview = forwardRef10(VideoForDevelopmentRefForwardingFunction);
30941
+ var VideoForPreview = forwardRef11(VideoForDevelopmentRefForwardingFunction);
30530
30942
  var InnerOffthreadVideo = (props2) => {
30531
30943
  const {
30532
30944
  startFrom,
@@ -30543,7 +30955,7 @@ var InnerOffthreadVideo = (props2) => {
30543
30955
  if (environment.isClientSideRendering) {
30544
30956
  throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
30545
30957
  }
30546
- const onDuration = useCallback18(() => {
30958
+ const onDuration = useCallback19(() => {
30547
30959
  return;
30548
30960
  }, []);
30549
30961
  if (typeof props2.src !== "string") {
@@ -30631,6 +31043,7 @@ var OffthreadVideo = ({
30631
31043
  onVideoFrame,
30632
31044
  pauseWhenBuffering,
30633
31045
  playbackRate,
31046
+ preservePitch,
30634
31047
  showInTimeline,
30635
31048
  style,
30636
31049
  toneFrequency,
@@ -30666,6 +31079,7 @@ var OffthreadVideo = ({
30666
31079
  onVideoFrame,
30667
31080
  pauseWhenBuffering: pauseWhenBuffering ?? true,
30668
31081
  playbackRate: playbackRate ?? 1,
31082
+ preservePitch,
30669
31083
  toneFrequency: toneFrequency ?? 1,
30670
31084
  showInTimeline: showInTimeline ?? true,
30671
31085
  src,
@@ -30786,7 +31200,6 @@ var Internals = {
30786
31200
  VisualModeSettersContext,
30787
31201
  SequenceManager,
30788
31202
  SequenceStackTracesUpdateContext,
30789
- SequenceVisibilityToggleContext,
30790
31203
  wrapInSchema,
30791
31204
  sequenceSchema,
30792
31205
  sequenceStyleSchema,
@@ -30882,13 +31295,16 @@ var Internals = {
30882
31295
  useEffectChainState,
30883
31296
  runEffectChain,
30884
31297
  useMemoizedEffects,
30885
- defineEffect,
30886
- createDescriptor,
31298
+ useMemoizedEffectDefinitions,
31299
+ createEffect,
30887
31300
  computeEffectiveSchemaValuesDotNotation,
30888
31301
  OverrideIdsToNodePathsGettersContext,
30889
31302
  OverrideIdsToNodePathsSettersContext,
30890
31303
  findPropsToDelete,
30891
- flattenEffects
31304
+ makeSequencePropsSubscriptionKey,
31305
+ getCodeValuesCtx,
31306
+ getEffectCodeValuesCtx,
31307
+ hiddenField
30892
31308
  };
30893
31309
  var NUMBER = "[-+]?\\d*\\.?\\d+";
30894
31310
  var PERCENTAGE = NUMBER + "%";
@@ -30951,7 +31367,7 @@ var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
30951
31367
  children
30952
31368
  });
30953
31369
  };
30954
- var SeriesSequence = forwardRef11(SeriesSequenceRefForwardingFunction);
31370
+ var SeriesSequence = forwardRef12(SeriesSequenceRefForwardingFunction);
30955
31371
  var SeriesInner = (props2) => {
30956
31372
  const childrenValue = useMemo36(() => {
30957
31373
  let startFrame = 0;
@@ -31476,6 +31892,7 @@ var VideoForRenderingForwardFunction = ({
31476
31892
  loopVolumeCurveBehavior,
31477
31893
  audioStreamIndex,
31478
31894
  onVideoFrame,
31895
+ preservePitch: _preservePitch,
31479
31896
  ...props2
31480
31897
  }, ref) => {
31481
31898
  const absoluteFrame = useTimelinePosition();
@@ -31483,13 +31900,13 @@ var VideoForRenderingForwardFunction = ({
31483
31900
  const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
31484
31901
  const videoConfig = useUnsafeVideoConfig();
31485
31902
  const videoRef = useRef23(null);
31486
- const sequenceContext = useContext35(SequenceContext);
31903
+ const sequenceContext = useContext36(SequenceContext);
31487
31904
  const mediaStartsAt = useMediaStartsAt();
31488
31905
  const environment = useRemotionEnvironment();
31489
31906
  const logLevel = useLogLevel();
31490
31907
  const mountTime = useMountTime();
31491
31908
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
31492
- const { registerRenderAsset, unregisterRenderAsset } = useContext35(RenderAssetManager);
31909
+ const { registerRenderAsset, unregisterRenderAsset } = useContext36(RenderAssetManager);
31493
31910
  const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
31494
31911
  props2.src,
31495
31912
  sequenceContext?.cumulatedFrom,
@@ -31678,7 +32095,7 @@ var VideoForRenderingForwardFunction = ({
31678
32095
  ...props2
31679
32096
  });
31680
32097
  };
31681
- var VideoForRendering = forwardRef12(VideoForRenderingForwardFunction);
32098
+ var VideoForRendering = forwardRef13(VideoForRenderingForwardFunction);
31682
32099
  var VideoForwardingFunction = (props2, ref) => {
31683
32100
  const {
31684
32101
  startFrom,
@@ -31699,7 +32116,7 @@ var VideoForwardingFunction = (props2, ref) => {
31699
32116
  if (environment.isClientSideRendering) {
31700
32117
  throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
31701
32118
  }
31702
- const { durations, setDurations } = useContext36(DurationsContext);
32119
+ const { durations, setDurations } = useContext37(DurationsContext);
31703
32120
  if (typeof ref === "string") {
31704
32121
  throw new Error("string refs are not supported");
31705
32122
  }
@@ -31707,10 +32124,10 @@ var VideoForwardingFunction = (props2, ref) => {
31707
32124
  throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
31708
32125
  }
31709
32126
  const preloadedSrc = usePreload(props2.src);
31710
- const onDuration = useCallback19((src, durationInSeconds) => {
32127
+ const onDuration = useCallback20((src, durationInSeconds) => {
31711
32128
  setDurations({ type: "got-duration", durationInSeconds, src });
31712
32129
  }, [setDurations]);
31713
- const onVideoFrame = useCallback19(() => {}, []);
32130
+ const onVideoFrame = useCallback20(() => {}, []);
31714
32131
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
31715
32132
  validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
31716
32133
  const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
@@ -31762,7 +32179,11 @@ var VideoForwardingFunction = (props2, ref) => {
31762
32179
  })
31763
32180
  });
31764
32181
  }
31765
- validateMediaProps({ playbackRate: props2.playbackRate, volume: props2.volume }, "Html5Video");
32182
+ validateMediaProps({
32183
+ playbackRate: props2.playbackRate,
32184
+ preservePitch: props2.preservePitch,
32185
+ volume: props2.volume
32186
+ }, "Html5Video");
31766
32187
  if (environment.isRendering) {
31767
32188
  return /* @__PURE__ */ jsx37(VideoForRendering, {
31768
32189
  onDuration,
@@ -31784,7 +32205,7 @@ var VideoForwardingFunction = (props2, ref) => {
31784
32205
  onAutoPlayError: onAutoPlayError ?? undefined
31785
32206
  });
31786
32207
  };
31787
- var Html5Video = forwardRef13(VideoForwardingFunction);
32208
+ var Html5Video = forwardRef14(VideoForwardingFunction);
31788
32209
  addSequenceStackTraces(Html5Video);
31789
32210
  checkMultipleRemotionVersions();
31790
32211
  var proxyObj = {};
@@ -31828,7 +32249,7 @@ import { jsx as jsx113 } from "react/jsx-runtime";
31828
32249
  import { jsx as jsx122 } from "react/jsx-runtime";
31829
32250
  import * as React362 from "react";
31830
32251
  import * as ReactDOM4 from "react-dom";
31831
- import React11 from "react";
32252
+ import React112 from "react";
31832
32253
  import * as React8 from "react";
31833
32254
  import { jsx as jsx132 } from "react/jsx-runtime";
31834
32255
  import * as React9 from "react";
@@ -31838,7 +32259,7 @@ import { jsx as jsx152 } from "react/jsx-runtime";
31838
32259
  import * as React122 from "react";
31839
32260
  import { jsx as jsx162 } from "react/jsx-runtime";
31840
32261
  import * as React16 from "react";
31841
- import * as React132 from "react";
32262
+ import * as React13 from "react";
31842
32263
  import * as ReactDOM from "react-dom";
31843
32264
  import { jsx as jsx172 } from "react/jsx-runtime";
31844
32265
  import * as React14 from "react";
@@ -31866,8 +32287,8 @@ import * as React282 from "react";
31866
32287
  import { jsx as jsx232 } from "react/jsx-runtime";
31867
32288
  import * as React35 from "react";
31868
32289
  import * as React312 from "react";
31869
- import { useState as useState112 } from "react";
31870
32290
  import * as React292 from "react";
32291
+ import { useState as useState112 } from "react";
31871
32292
  import * as React30 from "react";
31872
32293
  import * as React342 from "react";
31873
32294
  import * as React332 from "react";
@@ -32810,13 +33231,13 @@ function createCollection(name) {
32810
33231
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
32811
33232
  const CollectionProvider = (props) => {
32812
33233
  const { scope, children } = props;
32813
- const ref = React11.useRef(null);
32814
- const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
33234
+ const ref = React112.useRef(null);
33235
+ const itemMap = React112.useRef(/* @__PURE__ */ new Map).current;
32815
33236
  return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
32816
33237
  };
32817
33238
  CollectionProvider.displayName = PROVIDER_NAME;
32818
33239
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
32819
- const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
33240
+ const CollectionSlot = React112.forwardRef((props, forwardedRef) => {
32820
33241
  const { scope, children } = props;
32821
33242
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
32822
33243
  const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
@@ -32825,12 +33246,12 @@ function createCollection(name) {
32825
33246
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
32826
33247
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
32827
33248
  const ITEM_DATA_ATTR = "data-radix-collection-item";
32828
- const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
33249
+ const CollectionItemSlot = React112.forwardRef((props, forwardedRef) => {
32829
33250
  const { scope, children, ...itemData } = props;
32830
- const ref = React11.useRef(null);
33251
+ const ref = React112.useRef(null);
32831
33252
  const composedRefs = useComposedRefs2(forwardedRef, ref);
32832
33253
  const context = useCollectionContext(ITEM_SLOT_NAME, scope);
32833
- React11.useEffect(() => {
33254
+ React112.useEffect(() => {
32834
33255
  context.itemMap.set(ref, { ref, ...itemData });
32835
33256
  return () => void context.itemMap.delete(ref);
32836
33257
  });
@@ -32839,7 +33260,7 @@ function createCollection(name) {
32839
33260
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
32840
33261
  function useCollection(scope) {
32841
33262
  const context = useCollectionContext(name + "CollectionConsumer", scope);
32842
- const getItems = React11.useCallback(() => {
33263
+ const getItems = React112.useCallback(() => {
32843
33264
  const collectionNode = context.collectionRef.current;
32844
33265
  if (!collectionNode)
32845
33266
  return [];
@@ -32880,7 +33301,7 @@ var NODES = [
32880
33301
  "ul"
32881
33302
  ];
32882
33303
  var Primitive = NODES.reduce((primitive, node) => {
32883
- const Node2 = React132.forwardRef((props, forwardedRef) => {
33304
+ const Node2 = React13.forwardRef((props, forwardedRef) => {
32884
33305
  const { asChild, ...primitiveProps } = props;
32885
33306
  const Comp = asChild ? Slot2 : node;
32886
33307
  if (typeof window !== "undefined") {
@@ -35622,7 +36043,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
35622
36043
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
35623
36044
  };
35624
36045
  var __assign = function() {
35625
- __assign = Object.assign || function __assign(t) {
36046
+ __assign = Object.assign || function __assign2(t) {
35626
36047
  for (var s, i = 1, n = arguments.length;i < n; i++) {
35627
36048
  s = arguments[i];
35628
36049
  for (var p in s)
@@ -37409,17 +37830,17 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
37409
37830
  let defaultContexts = [];
37410
37831
  function createContext32(rootComponentName, defaultContext) {
37411
37832
  const BaseContext = React382.createContext(defaultContext);
37412
- const index2 = defaultContexts.length;
37833
+ const index3 = defaultContexts.length;
37413
37834
  defaultContexts = [...defaultContexts, defaultContext];
37414
37835
  const Provider = (props) => {
37415
37836
  const { scope, children, ...context } = props;
37416
- const Context = scope?.[scopeName]?.[index2] || BaseContext;
37837
+ const Context = scope?.[scopeName]?.[index3] || BaseContext;
37417
37838
  const value = React382.useMemo(() => context, Object.values(context));
37418
37839
  return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
37419
37840
  };
37420
37841
  Provider.displayName = rootComponentName + "Provider";
37421
37842
  function useContext222(consumerName, scope) {
37422
- const Context = scope?.[scopeName]?.[index2] || BaseContext;
37843
+ const Context = scope?.[scopeName]?.[index3] || BaseContext;
37423
37844
  const context = React382.useContext(Context);
37424
37845
  if (context)
37425
37846
  return context;
@@ -37616,10 +38037,10 @@ var OrderedDict = class _OrderedDict extends Map {
37616
38037
  super.set(key, value);
37617
38038
  return this;
37618
38039
  }
37619
- insert(index2, key, value) {
38040
+ insert(index3, key, value) {
37620
38041
  const has = this.has(key);
37621
38042
  const length2 = this.#keys.length;
37622
- const relativeIndex = toSafeInteger(index2);
38043
+ const relativeIndex = toSafeInteger(index3);
37623
38044
  let actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
37624
38045
  const safeIndex = actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
37625
38046
  if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
@@ -37657,39 +38078,39 @@ var OrderedDict = class _OrderedDict extends Map {
37657
38078
  }
37658
38079
  return this;
37659
38080
  }
37660
- with(index2, key, value) {
38081
+ with(index3, key, value) {
37661
38082
  const copy = new _OrderedDict(this);
37662
- copy.insert(index2, key, value);
38083
+ copy.insert(index3, key, value);
37663
38084
  return copy;
37664
38085
  }
37665
38086
  before(key) {
37666
- const index2 = this.#keys.indexOf(key) - 1;
37667
- if (index2 < 0) {
38087
+ const index3 = this.#keys.indexOf(key) - 1;
38088
+ if (index3 < 0) {
37668
38089
  return;
37669
38090
  }
37670
- return this.entryAt(index2);
38091
+ return this.entryAt(index3);
37671
38092
  }
37672
38093
  setBefore(key, newKey, value) {
37673
- const index2 = this.#keys.indexOf(key);
37674
- if (index2 === -1) {
38094
+ const index3 = this.#keys.indexOf(key);
38095
+ if (index3 === -1) {
37675
38096
  return this;
37676
38097
  }
37677
- return this.insert(index2, newKey, value);
38098
+ return this.insert(index3, newKey, value);
37678
38099
  }
37679
38100
  after(key) {
37680
- let index2 = this.#keys.indexOf(key);
37681
- index2 = index2 === -1 || index2 === this.size - 1 ? -1 : index2 + 1;
37682
- if (index2 === -1) {
38101
+ let index3 = this.#keys.indexOf(key);
38102
+ index3 = index3 === -1 || index3 === this.size - 1 ? -1 : index3 + 1;
38103
+ if (index3 === -1) {
37683
38104
  return;
37684
38105
  }
37685
- return this.entryAt(index2);
38106
+ return this.entryAt(index3);
37686
38107
  }
37687
38108
  setAfter(key, newKey, value) {
37688
- const index2 = this.#keys.indexOf(key);
37689
- if (index2 === -1) {
38109
+ const index3 = this.#keys.indexOf(key);
38110
+ if (index3 === -1) {
37690
38111
  return this;
37691
38112
  }
37692
- return this.insert(index2 + 1, newKey, value);
38113
+ return this.insert(index3 + 1, newKey, value);
37693
38114
  }
37694
38115
  first() {
37695
38116
  return this.entryAt(0);
@@ -37708,21 +38129,21 @@ var OrderedDict = class _OrderedDict extends Map {
37708
38129
  }
37709
38130
  return deleted;
37710
38131
  }
37711
- deleteAt(index2) {
37712
- const key = this.keyAt(index2);
38132
+ deleteAt(index3) {
38133
+ const key = this.keyAt(index3);
37713
38134
  if (key !== undefined) {
37714
38135
  return this.delete(key);
37715
38136
  }
37716
38137
  return false;
37717
38138
  }
37718
- at(index2) {
37719
- const key = at(this.#keys, index2);
38139
+ at(index3) {
38140
+ const key = at(this.#keys, index3);
37720
38141
  if (key !== undefined) {
37721
38142
  return this.get(key);
37722
38143
  }
37723
38144
  }
37724
- entryAt(index2) {
37725
- const key = at(this.#keys, index2);
38145
+ entryAt(index3) {
38146
+ const key = at(this.#keys, index3);
37726
38147
  if (key !== undefined) {
37727
38148
  return [key, this.get(key)];
37728
38149
  }
@@ -37730,15 +38151,15 @@ var OrderedDict = class _OrderedDict extends Map {
37730
38151
  indexOf(key) {
37731
38152
  return this.#keys.indexOf(key);
37732
38153
  }
37733
- keyAt(index2) {
37734
- return at(this.#keys, index2);
38154
+ keyAt(index3) {
38155
+ return at(this.#keys, index3);
37735
38156
  }
37736
38157
  from(key, offset4) {
37737
- const index2 = this.indexOf(key);
37738
- if (index2 === -1) {
38158
+ const index3 = this.indexOf(key);
38159
+ if (index3 === -1) {
37739
38160
  return;
37740
38161
  }
37741
- let dest = index2 + offset4;
38162
+ let dest = index3 + offset4;
37742
38163
  if (dest < 0)
37743
38164
  dest = 0;
37744
38165
  if (dest >= this.size)
@@ -37746,11 +38167,11 @@ var OrderedDict = class _OrderedDict extends Map {
37746
38167
  return this.at(dest);
37747
38168
  }
37748
38169
  keyFrom(key, offset4) {
37749
- const index2 = this.indexOf(key);
37750
- if (index2 === -1) {
38170
+ const index3 = this.indexOf(key);
38171
+ if (index3 === -1) {
37751
38172
  return;
37752
38173
  }
37753
- let dest = index2 + offset4;
38174
+ let dest = index3 + offset4;
37754
38175
  if (dest < 0)
37755
38176
  dest = 0;
37756
38177
  if (dest >= this.size)
@@ -37758,68 +38179,68 @@ var OrderedDict = class _OrderedDict extends Map {
37758
38179
  return this.keyAt(dest);
37759
38180
  }
37760
38181
  find(predicate, thisArg) {
37761
- let index2 = 0;
38182
+ let index3 = 0;
37762
38183
  for (const entry of this) {
37763
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
38184
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
37764
38185
  return entry;
37765
38186
  }
37766
- index2++;
38187
+ index3++;
37767
38188
  }
37768
38189
  return;
37769
38190
  }
37770
38191
  findIndex(predicate, thisArg) {
37771
- let index2 = 0;
38192
+ let index3 = 0;
37772
38193
  for (const entry of this) {
37773
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
37774
- return index2;
38194
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
38195
+ return index3;
37775
38196
  }
37776
- index2++;
38197
+ index3++;
37777
38198
  }
37778
38199
  return -1;
37779
38200
  }
37780
38201
  filter(predicate, thisArg) {
37781
38202
  const entries = [];
37782
- let index2 = 0;
38203
+ let index3 = 0;
37783
38204
  for (const entry of this) {
37784
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
38205
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
37785
38206
  entries.push(entry);
37786
38207
  }
37787
- index2++;
38208
+ index3++;
37788
38209
  }
37789
38210
  return new _OrderedDict(entries);
37790
38211
  }
37791
38212
  map(callbackfn, thisArg) {
37792
38213
  const entries = [];
37793
- let index2 = 0;
38214
+ let index3 = 0;
37794
38215
  for (const entry of this) {
37795
- entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index2, this])]);
37796
- index2++;
38216
+ entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index3, this])]);
38217
+ index3++;
37797
38218
  }
37798
38219
  return new _OrderedDict(entries);
37799
38220
  }
37800
38221
  reduce(...args) {
37801
38222
  const [callbackfn, initialValue] = args;
37802
- let index2 = 0;
38223
+ let index3 = 0;
37803
38224
  let accumulator = initialValue ?? this.at(0);
37804
38225
  for (const entry of this) {
37805
- if (index2 === 0 && args.length === 1) {
38226
+ if (index3 === 0 && args.length === 1) {
37806
38227
  accumulator = entry;
37807
38228
  } else {
37808
- accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
38229
+ accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
37809
38230
  }
37810
- index2++;
38231
+ index3++;
37811
38232
  }
37812
38233
  return accumulator;
37813
38234
  }
37814
38235
  reduceRight(...args) {
37815
38236
  const [callbackfn, initialValue] = args;
37816
38237
  let accumulator = initialValue ?? this.at(-1);
37817
- for (let index2 = this.size - 1;index2 >= 0; index2--) {
37818
- const entry = this.at(index2);
37819
- if (index2 === this.size - 1 && args.length === 1) {
38238
+ for (let index3 = this.size - 1;index3 >= 0; index3--) {
38239
+ const entry = this.at(index3);
38240
+ if (index3 === this.size - 1 && args.length === 1) {
37820
38241
  accumulator = entry;
37821
38242
  } else {
37822
- accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
38243
+ accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
37823
38244
  }
37824
38245
  }
37825
38246
  return accumulator;
@@ -37830,8 +38251,8 @@ var OrderedDict = class _OrderedDict extends Map {
37830
38251
  }
37831
38252
  toReversed() {
37832
38253
  const reversed = new _OrderedDict;
37833
- for (let index2 = this.size - 1;index2 >= 0; index2--) {
37834
- const key = this.keyAt(index2);
38254
+ for (let index3 = this.size - 1;index3 >= 0; index3--) {
38255
+ const key = this.keyAt(index3);
37835
38256
  const element = this.get(key);
37836
38257
  reversed.set(key, element);
37837
38258
  }
@@ -37854,44 +38275,44 @@ var OrderedDict = class _OrderedDict extends Map {
37854
38275
  if (end !== undefined && end > 0) {
37855
38276
  stop = end - 1;
37856
38277
  }
37857
- for (let index2 = start;index2 <= stop; index2++) {
37858
- const key = this.keyAt(index2);
38278
+ for (let index3 = start;index3 <= stop; index3++) {
38279
+ const key = this.keyAt(index3);
37859
38280
  const element = this.get(key);
37860
38281
  result.set(key, element);
37861
38282
  }
37862
38283
  return result;
37863
38284
  }
37864
38285
  every(predicate, thisArg) {
37865
- let index2 = 0;
38286
+ let index3 = 0;
37866
38287
  for (const entry of this) {
37867
- if (!Reflect.apply(predicate, thisArg, [entry, index2, this])) {
38288
+ if (!Reflect.apply(predicate, thisArg, [entry, index3, this])) {
37868
38289
  return false;
37869
38290
  }
37870
- index2++;
38291
+ index3++;
37871
38292
  }
37872
38293
  return true;
37873
38294
  }
37874
38295
  some(predicate, thisArg) {
37875
- let index2 = 0;
38296
+ let index3 = 0;
37876
38297
  for (const entry of this) {
37877
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
38298
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
37878
38299
  return true;
37879
38300
  }
37880
- index2++;
38301
+ index3++;
37881
38302
  }
37882
38303
  return false;
37883
38304
  }
37884
38305
  };
37885
- function at(array, index2) {
38306
+ function at(array, index3) {
37886
38307
  if ("at" in Array.prototype) {
37887
- return Array.prototype.at.call(array, index2);
38308
+ return Array.prototype.at.call(array, index3);
37888
38309
  }
37889
- const actualIndex = toSafeIndex(array, index2);
38310
+ const actualIndex = toSafeIndex(array, index3);
37890
38311
  return actualIndex === -1 ? undefined : array[actualIndex];
37891
38312
  }
37892
- function toSafeIndex(array, index2) {
38313
+ function toSafeIndex(array, index3) {
37893
38314
  const length2 = array.length;
37894
- const relativeIndex = toSafeInteger(index2);
38315
+ const relativeIndex = toSafeInteger(index3);
37895
38316
  const actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
37896
38317
  return actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
37897
38318
  }
@@ -37943,7 +38364,7 @@ var Primitive2 = NODES2.reduce((primitive, node) => {
37943
38364
  Node2.displayName = `Primitive.${node}`;
37944
38365
  return { ...primitive, [node]: Node2 };
37945
38366
  }, {});
37946
- function useCallbackRef3(callback) {
38367
+ function useCallbackRef4(callback) {
37947
38368
  const callbackRef = React44.useRef(callback);
37948
38369
  React44.useEffect(() => {
37949
38370
  callbackRef.current = callback;
@@ -38047,7 +38468,7 @@ var RovingFocusGroupImpl = React47.forwardRef((props, forwardedRef) => {
38047
38468
  caller: GROUP_NAME2
38048
38469
  });
38049
38470
  const [isTabbingBackOut, setIsTabbingBackOut] = React47.useState(false);
38050
- const handleEntryFocus = useCallbackRef3(onEntryFocus);
38471
+ const handleEntryFocus = useCallbackRef4(onEntryFocus);
38051
38472
  const getItems = useCollection2(__scopeRovingFocusGroup);
38052
38473
  const isClickFocusRef = React47.useRef(false);
38053
38474
  const [focusableItemsCount, setFocusableItemsCount] = React47.useState(0);
@@ -38200,7 +38621,7 @@ function focusFirst2(candidates, preventScroll = false) {
38200
38621
  }
38201
38622
  }
38202
38623
  function wrapArray2(array, startIndex) {
38203
- return array.map((_, index2) => array[(startIndex + index2) % array.length]);
38624
+ return array.map((_, index3) => array[(startIndex + index3) % array.length]);
38204
38625
  }
38205
38626
  var Root3 = RovingFocusGroup;
38206
38627
  var Item2 = RovingFocusGroupItem;
@@ -38515,7 +38936,7 @@ var Triangle2 = (props) => {
38515
38936
  };
38516
38937
 
38517
38938
  // src/components/prompts/CopyPromptButton.tsx
38518
- import { useCallback as useCallback33, useState as useState40 } from "react";
38939
+ import { useCallback as useCallback32, useState as useState40 } from "react";
38519
38940
 
38520
38941
  // src/components/prompts/ClipboardIcon.tsx
38521
38942
  import { jsx as jsx40 } from "react/jsx-runtime";
@@ -38536,7 +38957,7 @@ var ClipboardIcon = ({ size: size4 = 16, color = "currentColor" }) => {
38536
38957
  import { jsx as jsx41, jsxs as jsxs6 } from "react/jsx-runtime";
38537
38958
  var CopyPromptButton = ({ prompt }) => {
38538
38959
  const [copied, setCopied] = useState40(false);
38539
- const onCopy = useCallback33(() => {
38960
+ const onCopy = useCallback32(() => {
38540
38961
  navigator.clipboard.writeText(prompt);
38541
38962
  setCopied(true);
38542
38963
  setTimeout(() => setCopied(false), 2000);
@@ -38565,7 +38986,7 @@ var CopyPromptButton = ({ prompt }) => {
38565
38986
  };
38566
38987
 
38567
38988
  // src/components/prompts/LikeButton.tsx
38568
- import { useCallback as useCallback35, useEffect as useEffect41, useState as useState42 } from "react";
38989
+ import { useCallback as useCallback34, useEffect as useEffect41, useState as useState42 } from "react";
38569
38990
 
38570
38991
  // src/components/prompts/config.ts
38571
38992
  var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
@@ -38642,13 +39063,13 @@ var getRelativeTime = (dateStr) => {
38642
39063
  };
38643
39064
 
38644
39065
  // src/components/prompts/use-heart-animation.ts
38645
- import { useCallback as useCallback34, useRef as useRef42, useState as useState41 } from "react";
39066
+ import { useCallback as useCallback33, useRef as useRef42, useState as useState41 } from "react";
38646
39067
  var DURATION = 300;
38647
39068
  var useHeartAnimation = () => {
38648
39069
  const [scale, setScale] = useState41(1);
38649
39070
  const [roundness, setRoundness] = useState41(0.09);
38650
39071
  const rafRef = useRef42(0);
38651
- const animate = useCallback34(() => {
39072
+ const animate = useCallback33(() => {
38652
39073
  cancelAnimationFrame(rafRef.current);
38653
39074
  const start = performance.now();
38654
39075
  const tick = (now) => {
@@ -38679,7 +39100,7 @@ var LikeButton = ({ submissionId, initialLikeCount }) => {
38679
39100
  useEffect41(() => {
38680
39101
  setLiked(getLikedIds().has(submissionId));
38681
39102
  }, [submissionId]);
38682
- const onClick = useCallback35(async () => {
39103
+ const onClick = useCallback34(async () => {
38683
39104
  if (liked) {
38684
39105
  setLiked(false);
38685
39106
  setLikeCount((c) => c - 1);
@@ -38752,80 +39173,80 @@ function useMediaContext2() {
38752
39173
  var AirPlayButtonBridge = createReactComponent(AirPlayButtonInstance, {
38753
39174
  domEventsRegex: /^onMedia/
38754
39175
  });
38755
- var AirPlayButton2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39176
+ var AirPlayButton2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38756
39177
  return /* @__PURE__ */ React58.createElement(AirPlayButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
38757
39178
  ...props2,
38758
- ref: composeRefs3(props2.ref, forwardRef15)
39179
+ ref: composeRefs3(props2.ref, forwardRef16)
38759
39180
  }, children));
38760
39181
  });
38761
39182
  AirPlayButton2.displayName = "AirPlayButton";
38762
39183
  var PlayButtonBridge = createReactComponent(PlayButtonInstance, {
38763
39184
  domEventsRegex: /^onMedia/
38764
39185
  });
38765
- var PlayButton2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39186
+ var PlayButton2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38766
39187
  return /* @__PURE__ */ React58.createElement(PlayButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
38767
39188
  ...props2,
38768
- ref: composeRefs3(props2.ref, forwardRef15)
39189
+ ref: composeRefs3(props2.ref, forwardRef16)
38769
39190
  }, children));
38770
39191
  });
38771
39192
  PlayButton2.displayName = "PlayButton";
38772
39193
  var CaptionButtonBridge = createReactComponent(CaptionButtonInstance, {
38773
39194
  domEventsRegex: /^onMedia/
38774
39195
  });
38775
- var CaptionButton2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39196
+ var CaptionButton2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38776
39197
  return /* @__PURE__ */ React58.createElement(CaptionButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
38777
39198
  ...props2,
38778
- ref: composeRefs3(props2.ref, forwardRef15)
39199
+ ref: composeRefs3(props2.ref, forwardRef16)
38779
39200
  }, children));
38780
39201
  });
38781
39202
  CaptionButton2.displayName = "CaptionButton";
38782
39203
  var FullscreenButtonBridge = createReactComponent(FullscreenButtonInstance, {
38783
39204
  domEventsRegex: /^onMedia/
38784
39205
  });
38785
- var FullscreenButton2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39206
+ var FullscreenButton2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38786
39207
  return /* @__PURE__ */ React58.createElement(FullscreenButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
38787
39208
  ...props2,
38788
- ref: composeRefs3(props2.ref, forwardRef15)
39209
+ ref: composeRefs3(props2.ref, forwardRef16)
38789
39210
  }, children));
38790
39211
  });
38791
39212
  FullscreenButton2.displayName = "FullscreenButton";
38792
39213
  var MuteButtonBridge = createReactComponent(MuteButtonInstance, {
38793
39214
  domEventsRegex: /^onMedia/
38794
39215
  });
38795
- var MuteButton2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39216
+ var MuteButton2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38796
39217
  return /* @__PURE__ */ React58.createElement(MuteButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
38797
39218
  ...props2,
38798
- ref: composeRefs3(props2.ref, forwardRef15)
39219
+ ref: composeRefs3(props2.ref, forwardRef16)
38799
39220
  }, children));
38800
39221
  });
38801
39222
  MuteButton2.displayName = "MuteButton";
38802
39223
  var PIPButtonBridge = createReactComponent(PIPButtonInstance, {
38803
39224
  domEventsRegex: /^onMedia/
38804
39225
  });
38805
- var PIPButton2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39226
+ var PIPButton2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38806
39227
  return /* @__PURE__ */ React58.createElement(PIPButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
38807
39228
  ...props2,
38808
- ref: composeRefs3(props2.ref, forwardRef15)
39229
+ ref: composeRefs3(props2.ref, forwardRef16)
38809
39230
  }, children));
38810
39231
  });
38811
39232
  PIPButton2.displayName = "PIPButton";
38812
39233
  var SeekButtonBridge = createReactComponent(SeekButtonInstance, {
38813
39234
  domEventsRegex: /^onMedia/
38814
39235
  });
38815
- var SeekButton2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39236
+ var SeekButton2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38816
39237
  return /* @__PURE__ */ React58.createElement(SeekButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
38817
39238
  ...props2,
38818
- ref: composeRefs3(props2.ref, forwardRef15)
39239
+ ref: composeRefs3(props2.ref, forwardRef16)
38819
39240
  }, children));
38820
39241
  });
38821
39242
  SeekButton2.displayName = "SeekButton";
38822
39243
  var LiveButtonBridge = createReactComponent(LiveButtonInstance, {
38823
39244
  domEventsRegex: /^onMedia/
38824
39245
  });
38825
- var LiveButton2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39246
+ var LiveButton2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38826
39247
  return /* @__PURE__ */ React58.createElement(LiveButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
38827
39248
  ...props2,
38828
- ref: composeRefs3(props2.ref, forwardRef15)
39249
+ ref: composeRefs3(props2.ref, forwardRef16)
38829
39250
  }, children));
38830
39251
  });
38831
39252
  LiveButton2.displayName = "LiveButton";
@@ -38840,42 +39261,42 @@ var SliderValueBridge = createReactComponent(SliderValueInstance);
38840
39261
  var SliderBridge = createReactComponent(SliderInstance, {
38841
39262
  events: sliderCallbacks
38842
39263
  });
38843
- var Root$5 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
38844
- return /* @__PURE__ */ React58.createElement(SliderBridge, { ...props, ref: forwardRef15 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
39264
+ var Root$5 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39265
+ return /* @__PURE__ */ React58.createElement(SliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
38845
39266
  });
38846
39267
  Root$5.displayName = "Slider";
38847
- var Thumb = React58.forwardRef((props, forwardRef15) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef15 }));
39268
+ var Thumb = React58.forwardRef((props, forwardRef16) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef16 }));
38848
39269
  Thumb.displayName = "SliderThumb";
38849
- var Track = React58.forwardRef((props, forwardRef15) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef15 }));
39270
+ var Track = React58.forwardRef((props, forwardRef16) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef16 }));
38850
39271
  Track.displayName = "SliderTrack";
38851
- var TrackFill = React58.forwardRef((props, forwardRef15) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef15 }));
39272
+ var TrackFill = React58.forwardRef((props, forwardRef16) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef16 }));
38852
39273
  TrackFill.displayName = "SliderTrackFill";
38853
39274
  var PreviewBridge = createReactComponent(SliderPreviewInstance);
38854
- var Preview = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39275
+ var Preview = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38855
39276
  return /* @__PURE__ */ React58.createElement(PreviewBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
38856
39277
  ...props2,
38857
- ref: composeRefs3(props2.ref, forwardRef15)
39278
+ ref: composeRefs3(props2.ref, forwardRef16)
38858
39279
  }, children));
38859
39280
  });
38860
39281
  Preview.displayName = "SliderPreview";
38861
- var Value2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39282
+ var Value2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38862
39283
  return /* @__PURE__ */ React58.createElement(SliderValueBridge, { ...props }, (props2, instance) => {
38863
39284
  const $text = useSignal(() => instance.getValueText(), instance);
38864
- return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2, ref: forwardRef15 }, $text, children);
39285
+ return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2, ref: forwardRef16 }, $text, children);
38865
39286
  });
38866
39287
  });
38867
39288
  Value2.displayName = "SliderValue";
38868
- var Steps = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39289
+ var Steps = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38869
39290
  const $min = useSliderState("min"), $max = useSliderState("max"), $step = useSliderState("step"), steps = ($max - $min) / $step;
38870
- return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef15 }, Array.from({ length: Math.floor(steps) + 1 }).map((_, step) => children(step)));
39291
+ return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef16 }, Array.from({ length: Math.floor(steps) + 1 }).map((_, step) => children(step)));
38871
39292
  });
38872
39293
  Steps.displayName = "SliderSteps";
38873
39294
  var VolumeSliderBridge = createReactComponent(VolumeSliderInstance, {
38874
39295
  events: sliderCallbacks,
38875
39296
  domEventsRegex: /^onMedia/
38876
39297
  });
38877
- var Root$4 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
38878
- return /* @__PURE__ */ React58.createElement(VolumeSliderBridge, { ...props, ref: forwardRef15 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
39298
+ var Root$4 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39299
+ return /* @__PURE__ */ React58.createElement(VolumeSliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
38879
39300
  });
38880
39301
  Root$4.displayName = "VolumeSlider";
38881
39302
  function createVTTCue(startTime = 0, endTime = 0, text = "") {
@@ -38899,20 +39320,20 @@ function appendParamsToURL2(baseUrl, params) {
38899
39320
  return url.toString();
38900
39321
  }
38901
39322
  var ThumbnailBridge = createReactComponent(ThumbnailInstance);
38902
- var Root$3 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39323
+ var Root$3 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38903
39324
  return /* @__PURE__ */ React58.createElement(ThumbnailBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
38904
39325
  ...props2,
38905
- ref: composeRefs3(props2.ref, forwardRef15)
39326
+ ref: composeRefs3(props2.ref, forwardRef16)
38906
39327
  }, children));
38907
39328
  });
38908
39329
  Root$3.displayName = "Thumbnail";
38909
- var Img2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39330
+ var Img2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38910
39331
  const { src, img, crossOrigin } = useStateContext(ThumbnailInstance.state), $src = useSignal(src), $crossOrigin = useSignal(crossOrigin);
38911
39332
  return /* @__PURE__ */ React58.createElement(Primitive3.img, {
38912
39333
  crossOrigin: $crossOrigin,
38913
39334
  ...props,
38914
39335
  src: $src || undefined,
38915
- ref: composeRefs3(img.set, forwardRef15)
39336
+ ref: composeRefs3(img.set, forwardRef16)
38916
39337
  }, children);
38917
39338
  });
38918
39339
  Img2.displayName = "ThumbnailImg";
@@ -38924,16 +39345,16 @@ var TimeSliderBridge = createReactComponent(TimeSliderInstance, {
38924
39345
  events: sliderCallbacks,
38925
39346
  domEventsRegex: /^onMedia/
38926
39347
  });
38927
- var Root$2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39348
+ var Root$2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38928
39349
  const $chapters = React58.useMemo(() => signal(null), []);
38929
- return /* @__PURE__ */ React58.createElement(TimeSliderContext.Provider, { value: { $chapters } }, /* @__PURE__ */ React58.createElement(TimeSliderBridge, { ...props, ref: forwardRef15 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children)));
39350
+ return /* @__PURE__ */ React58.createElement(TimeSliderContext.Provider, { value: { $chapters } }, /* @__PURE__ */ React58.createElement(TimeSliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children)));
38930
39351
  });
38931
39352
  Root$2.displayName = "TimeSlider";
38932
39353
  var SliderChaptersBridge = createReactComponent(SliderChaptersInstance);
38933
- var Chapters = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39354
+ var Chapters = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38934
39355
  return /* @__PURE__ */ React58.createElement(SliderChaptersBridge, { ...props }, (props2, instance) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
38935
39356
  ...props2,
38936
- ref: composeRefs3(props2.ref, forwardRef15)
39357
+ ref: composeRefs3(props2.ref, forwardRef16)
38937
39358
  }, /* @__PURE__ */ React58.createElement(ChapterTracks, { instance }, children)));
38938
39359
  });
38939
39360
  Chapters.displayName = "SliderChapters";
@@ -38958,7 +39379,7 @@ function ChapterTracks({ instance, children }) {
38958
39379
  });
38959
39380
  }
38960
39381
  ChapterTracks.displayName = "SliderChapterTracks";
38961
- var ChapterTitle = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39382
+ var ChapterTitle = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38962
39383
  const { $chapters } = React58.useContext(TimeSliderContext), [title, setTitle] = React58.useState();
38963
39384
  React58.useEffect(() => {
38964
39385
  return effect(() => {
@@ -38966,14 +39387,14 @@ var ChapterTitle = React58.forwardRef(({ children, ...props }, forwardRef15) =>
38966
39387
  setTitle(cue?.text || "");
38967
39388
  });
38968
39389
  }, []);
38969
- return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef15 }, title, children);
39390
+ return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef16 }, title, children);
38970
39391
  });
38971
39392
  ChapterTitle.displayName = "SliderChapterTitle";
38972
- var Progress = React58.forwardRef((props, forwardRef15) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef15 }));
39393
+ var Progress = React58.forwardRef((props, forwardRef16) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef16 }));
38973
39394
  Progress.displayName = "SliderProgress";
38974
39395
  var SliderThumbnailBridge = createReactComponent(SliderThumbnailInstance);
38975
- var ThumbnailRoot = React58.forwardRef(({ children, ...props }, forwardRef15) => {
38976
- return /* @__PURE__ */ React58.createElement(SliderThumbnailBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2, ref: composeRefs3(props2.ref, forwardRef15) }, children));
39396
+ var ThumbnailRoot = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39397
+ return /* @__PURE__ */ React58.createElement(SliderThumbnailBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2, ref: composeRefs3(props2.ref, forwardRef16) }, children));
38977
39398
  });
38978
39399
  ThumbnailRoot.displayName = "SliderThumbnail";
38979
39400
  var Thumbnail2 = {
@@ -38983,15 +39404,15 @@ var Thumbnail2 = {
38983
39404
  var VideoBridge = createReactComponent(SliderVideoInstance, {
38984
39405
  events: ["onCanPlay", "onError"]
38985
39406
  });
38986
- var Video = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39407
+ var Video = React58.forwardRef(({ children, ...props }, forwardRef16) => {
38987
39408
  return /* @__PURE__ */ React58.createElement(VideoBridge, { ...props }, (props2, instance) => /* @__PURE__ */ React58.createElement(VideoProvider2, {
38988
39409
  ...props2,
38989
39410
  instance,
38990
- ref: composeRefs3(props2.ref, forwardRef15)
39411
+ ref: composeRefs3(props2.ref, forwardRef16)
38991
39412
  }, children));
38992
39413
  });
38993
39414
  Video.displayName = "SliderVideo";
38994
- var VideoProvider2 = React58.forwardRef(({ instance, children, ...props }, forwardRef15) => {
39415
+ var VideoProvider2 = React58.forwardRef(({ instance, children, ...props }, forwardRef16) => {
38995
39416
  const { canLoad } = useStateContext(mediaState), { src, video, crossOrigin } = instance.$state, $src = useSignal(src), $canLoad = useSignal(canLoad), $crossOrigin = useSignal(crossOrigin);
38996
39417
  return /* @__PURE__ */ React58.createElement(Primitive3.video, {
38997
39418
  style: { maxWidth: "unset" },
@@ -39001,24 +39422,24 @@ var VideoProvider2 = React58.forwardRef(({ instance, children, ...props }, forwa
39001
39422
  playsInline: true,
39002
39423
  preload: $canLoad ? "auto" : "none",
39003
39424
  crossOrigin: $crossOrigin || undefined,
39004
- ref: composeRefs3(video.set, forwardRef15)
39425
+ ref: composeRefs3(video.set, forwardRef16)
39005
39426
  }, children);
39006
39427
  });
39007
39428
  VideoProvider2.displayName = "SliderVideoProvider";
39008
39429
  var RadioGroupBridge = createReactComponent(RadioGroupInstance, {
39009
39430
  events: ["onChange"]
39010
39431
  });
39011
- var Root$1 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39012
- return /* @__PURE__ */ React58.createElement(RadioGroupBridge, { ...props, ref: forwardRef15 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
39432
+ var Root$1 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39433
+ return /* @__PURE__ */ React58.createElement(RadioGroupBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
39013
39434
  });
39014
39435
  Root$1.displayName = "RadioGroup";
39015
39436
  var ItemBridge$1 = createReactComponent(RadioInstance, {
39016
39437
  events: ["onChange", "onSelect"]
39017
39438
  });
39018
- var Item$1 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39439
+ var Item$1 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39019
39440
  return /* @__PURE__ */ React58.createElement(ItemBridge$1, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
39020
39441
  ...props2,
39021
- ref: composeRefs3(props2.ref, forwardRef15)
39442
+ ref: composeRefs3(props2.ref, forwardRef16)
39022
39443
  }, children));
39023
39444
  });
39024
39445
  Item$1.displayName = "RadioItem";
@@ -39026,8 +39447,8 @@ var MenuBridge = createReactComponent(MenuInstance, {
39026
39447
  events: ["onOpen", "onClose"],
39027
39448
  domEventsRegex: /^onMedia/
39028
39449
  });
39029
- var Root4 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39030
- return /* @__PURE__ */ React58.createElement(MenuBridge, { ...props, ref: forwardRef15 }, (props2, instance) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
39450
+ var Root4 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39451
+ return /* @__PURE__ */ React58.createElement(MenuBridge, { ...props, ref: forwardRef16 }, (props2, instance) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
39031
39452
  ...props2,
39032
39453
  style: { display: !instance.isSubmenu ? "contents" : undefined, ...props2.style }
39033
39454
  }, children));
@@ -39036,14 +39457,14 @@ Root4.displayName = "Menu";
39036
39457
  var ButtonBridge = createReactComponent(MenuButtonInstance, {
39037
39458
  events: ["onSelect"]
39038
39459
  });
39039
- var Button2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39460
+ var Button2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39040
39461
  return /* @__PURE__ */ React58.createElement(ButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.button, {
39041
39462
  ...props2,
39042
- ref: composeRefs3(props2.ref, forwardRef15)
39463
+ ref: composeRefs3(props2.ref, forwardRef16)
39043
39464
  }, children));
39044
39465
  });
39045
39466
  Button2.displayName = "MenuButton";
39046
- var Portal3 = React58.forwardRef(({ container: container3 = null, disabled = false, children, ...props }, forwardRef15) => {
39467
+ var Portal3 = React58.forwardRef(({ container: container3 = null, disabled = false, children, ...props }, forwardRef16) => {
39047
39468
  let fullscreen = useMediaState("fullscreen"), shouldPortal = disabled === "fullscreen" ? !fullscreen : !disabled;
39048
39469
  const target = React58.useMemo(() => {
39049
39470
  if (IS_SERVER3)
@@ -39054,45 +39475,45 @@ var Portal3 = React58.forwardRef(({ container: container3 = null, disabled = fal
39054
39475
  return !target || !shouldPortal ? children : createPortal3(/* @__PURE__ */ React58.createElement(Primitive3.div, {
39055
39476
  ...props,
39056
39477
  style: { display: "contents", ...props.style },
39057
- ref: forwardRef15
39478
+ ref: forwardRef16
39058
39479
  }, children), target);
39059
39480
  });
39060
39481
  Portal3.displayName = "MenuPortal";
39061
39482
  var ItemsBridge = createReactComponent(MenuItemsInstance);
39062
- var Items = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39483
+ var Items = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39063
39484
  return /* @__PURE__ */ React58.createElement(ItemsBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
39064
39485
  ...props2,
39065
- ref: composeRefs3(props2.ref, forwardRef15)
39486
+ ref: composeRefs3(props2.ref, forwardRef16)
39066
39487
  }, children));
39067
39488
  });
39068
39489
  Items.displayName = "MenuItems";
39069
39490
  var ItemBridge = createReactComponent(MenuItemInstance);
39070
- var Item3 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39491
+ var Item3 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39071
39492
  return /* @__PURE__ */ React58.createElement(ItemBridge, { ...props }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, {
39072
39493
  ...props2,
39073
- ref: composeRefs3(props2.ref, forwardRef15)
39494
+ ref: composeRefs3(props2.ref, forwardRef16)
39074
39495
  }, children));
39075
39496
  });
39076
39497
  Item3.displayName = "MenuItem";
39077
39498
  var GestureBridge = createReactComponent(GestureInstance, {
39078
39499
  events: ["onWillTrigger", "onTrigger"]
39079
39500
  });
39080
- var Gesture2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39081
- return /* @__PURE__ */ React58.createElement(GestureBridge, { ...props, ref: forwardRef15 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
39501
+ var Gesture2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39502
+ return /* @__PURE__ */ React58.createElement(GestureBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props2 }, children));
39082
39503
  });
39083
39504
  Gesture2.displayName = "Gesture";
39084
39505
  var TimeBridge = createReactComponent(TimeInstance);
39085
- var Time2 = React58.forwardRef(({ children, ...props }, forwardRef15) => {
39506
+ var Time2 = React58.forwardRef(({ children, ...props }, forwardRef16) => {
39086
39507
  return /* @__PURE__ */ React58.createElement(TimeBridge, { ...props }, (props2, instance) => /* @__PURE__ */ React58.createElement(TimeText, {
39087
39508
  ...props2,
39088
39509
  instance,
39089
- ref: composeRefs3(props2.ref, forwardRef15)
39510
+ ref: composeRefs3(props2.ref, forwardRef16)
39090
39511
  }, children));
39091
39512
  });
39092
39513
  Time2.displayName = "Time";
39093
- var TimeText = React58.forwardRef(({ instance, children, ...props }, forwardRef15) => {
39514
+ var TimeText = React58.forwardRef(({ instance, children, ...props }, forwardRef16) => {
39094
39515
  const { timeText } = instance.$state, $timeText = useSignal(timeText);
39095
- return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef15 }, $timeText, children);
39516
+ return /* @__PURE__ */ React58.createElement(Primitive3.div, { ...props, ref: forwardRef16 }, $timeText, children);
39096
39517
  });
39097
39518
  TimeText.displayName = "TimeText";
39098
39519
  function useMediaPlayer() {
@@ -39196,27 +39617,27 @@ function getTrackValue(track) {
39196
39617
  var MediaAnnouncerBridge = createReactComponent(MediaAnnouncerInstance, {
39197
39618
  events: ["onChange"]
39198
39619
  });
39199
- var MediaAnnouncer2 = React59.forwardRef(({ style, children, ...props }, forwardRef15) => {
39620
+ var MediaAnnouncer2 = React59.forwardRef(({ style, children, ...props }, forwardRef16) => {
39200
39621
  return /* @__PURE__ */ React59.createElement(MediaAnnouncerBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, {
39201
39622
  ...props2,
39202
39623
  style: { display: "contents", ...style },
39203
- ref: composeRefs3(props2.ref, forwardRef15)
39624
+ ref: composeRefs3(props2.ref, forwardRef16)
39204
39625
  }, children));
39205
39626
  });
39206
39627
  MediaAnnouncer2.displayName = "MediaAnnouncer";
39207
39628
  var ControlsBridge = createReactComponent(ControlsInstance);
39208
- var Root$52 = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39629
+ var Root$52 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39209
39630
  return /* @__PURE__ */ React59.createElement(ControlsBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, {
39210
39631
  ...props2,
39211
- ref: composeRefs3(props2.ref, forwardRef15)
39632
+ ref: composeRefs3(props2.ref, forwardRef16)
39212
39633
  }, children));
39213
39634
  });
39214
39635
  Root$52.displayName = "Controls";
39215
39636
  var ControlsGroupBridge = createReactComponent(ControlsGroupInstance);
39216
- var Group = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39637
+ var Group = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39217
39638
  return /* @__PURE__ */ React59.createElement(ControlsGroupBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, {
39218
39639
  ...props2,
39219
- ref: composeRefs3(props2.ref, forwardRef15)
39640
+ ref: composeRefs3(props2.ref, forwardRef16)
39220
39641
  }, children));
39221
39642
  });
39222
39643
  Group.displayName = "ControlsGroup";
@@ -39226,28 +39647,28 @@ function Root$42({ children, ...props }) {
39226
39647
  }
39227
39648
  Root$42.displayName = "Tooltip";
39228
39649
  var TriggerBridge = createReactComponent(TooltipTriggerInstance);
39229
- var Trigger3 = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39650
+ var Trigger3 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39230
39651
  return /* @__PURE__ */ React59.createElement(TriggerBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.button, {
39231
39652
  ...props2,
39232
- ref: composeRefs3(props2.ref, forwardRef15)
39653
+ ref: composeRefs3(props2.ref, forwardRef16)
39233
39654
  }, children));
39234
39655
  });
39235
39656
  Trigger3.displayName = "TooltipTrigger";
39236
39657
  var ContentBridge = createReactComponent(TooltipContentInstance);
39237
- var Content4 = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39658
+ var Content4 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39238
39659
  return /* @__PURE__ */ React59.createElement(ContentBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, {
39239
39660
  ...props2,
39240
- ref: composeRefs3(props2.ref, forwardRef15)
39661
+ ref: composeRefs3(props2.ref, forwardRef16)
39241
39662
  }, children));
39242
39663
  });
39243
39664
  Content4.displayName = "TooltipContent";
39244
39665
  var GoogleCastButtonBridge = createReactComponent(GoogleCastButtonInstance, {
39245
39666
  domEventsRegex: /^onMedia/
39246
39667
  });
39247
- var GoogleCastButton2 = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39668
+ var GoogleCastButton2 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39248
39669
  return /* @__PURE__ */ React59.createElement(GoogleCastButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.button, {
39249
39670
  ...props2,
39250
- ref: composeRefs3(props2.ref, forwardRef15)
39671
+ ref: composeRefs3(props2.ref, forwardRef16)
39251
39672
  }, children));
39252
39673
  });
39253
39674
  GoogleCastButton2.displayName = "GoogleCastButton";
@@ -39255,29 +39676,29 @@ var QualitySliderBridge = createReactComponent(QualitySliderInstance, {
39255
39676
  events: sliderCallbacks,
39256
39677
  domEventsRegex: /^onMedia/
39257
39678
  });
39258
- var Root$32 = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39259
- return /* @__PURE__ */ React59.createElement(QualitySliderBridge, { ...props, ref: forwardRef15 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
39679
+ var Root$32 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39680
+ return /* @__PURE__ */ React59.createElement(QualitySliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
39260
39681
  });
39261
39682
  Root$32.displayName = "QualitySlider";
39262
39683
  var AudioGainSliderBridge = createReactComponent(AudioGainSliderInstance, {
39263
39684
  events: sliderCallbacks,
39264
39685
  domEventsRegex: /^onMedia/
39265
39686
  });
39266
- var Root$22 = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39267
- return /* @__PURE__ */ React59.createElement(AudioGainSliderBridge, { ...props, ref: forwardRef15 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
39687
+ var Root$22 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39688
+ return /* @__PURE__ */ React59.createElement(AudioGainSliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
39268
39689
  });
39269
39690
  Root$22.displayName = "AudioGainSlider";
39270
39691
  var SpeedSliderBridge = createReactComponent(SpeedSliderInstance, {
39271
39692
  events: sliderCallbacks,
39272
39693
  domEventsRegex: /^onMedia/
39273
39694
  });
39274
- var Root$12 = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39275
- return /* @__PURE__ */ React59.createElement(SpeedSliderBridge, { ...props, ref: forwardRef15 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
39695
+ var Root$12 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39696
+ return /* @__PURE__ */ React59.createElement(SpeedSliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
39276
39697
  });
39277
39698
  Root$12.displayName = "SpeedSlider";
39278
- var Title = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39699
+ var Title = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39279
39700
  const $title = useMediaState("title");
39280
- return /* @__PURE__ */ React59.createElement(Primitive3.span, { ...props, ref: forwardRef15 }, $title, children);
39701
+ return /* @__PURE__ */ React59.createElement(Primitive3.span, { ...props, ref: forwardRef16 }, $title, children);
39281
39702
  });
39282
39703
  Title.displayName = "Title";
39283
39704
  function useActiveTextCues(track) {
@@ -39307,17 +39728,17 @@ function useChapterTitle() {
39307
39728
  const $track = useActiveTextTrack("chapters"), $cues = useActiveTextCues($track);
39308
39729
  return $cues[0]?.text || "";
39309
39730
  }
39310
- var ChapterTitle2 = React59.forwardRef(({ defaultText = "", children, ...props }, forwardRef15) => {
39731
+ var ChapterTitle2 = React59.forwardRef(({ defaultText = "", children, ...props }, forwardRef16) => {
39311
39732
  const $chapterTitle = useChapterTitle();
39312
- return /* @__PURE__ */ React59.createElement(Primitive3.span, { ...props, ref: forwardRef15 }, $chapterTitle || defaultText, children);
39733
+ return /* @__PURE__ */ React59.createElement(Primitive3.span, { ...props, ref: forwardRef16 }, $chapterTitle || defaultText, children);
39313
39734
  });
39314
39735
  ChapterTitle2.displayName = "ChapterTitle";
39315
39736
  var CaptionsBridge = createReactComponent(CaptionsInstance);
39316
- var Captions2 = React59.forwardRef(({ children, ...props }, forwardRef15) => {
39317
- return /* @__PURE__ */ React59.createElement(CaptionsBridge, { ...props, ref: forwardRef15 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
39737
+ var Captions2 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
39738
+ return /* @__PURE__ */ React59.createElement(CaptionsBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.div, { ...props2 }, children));
39318
39739
  });
39319
39740
  Captions2.displayName = "Captions";
39320
- var Root6 = React59.forwardRef(({ size: size5 = 96, children, ...props }, forwardRef15) => {
39741
+ var Root6 = React59.forwardRef(({ size: size5 = 96, children, ...props }, forwardRef16) => {
39321
39742
  return /* @__PURE__ */ React59.createElement("svg", {
39322
39743
  width: size5,
39323
39744
  height: size5,
@@ -39326,7 +39747,7 @@ var Root6 = React59.forwardRef(({ size: size5 = 96, children, ...props }, forwar
39326
39747
  "aria-hidden": "true",
39327
39748
  "data-part": "root",
39328
39749
  ...props,
39329
- ref: forwardRef15
39750
+ ref: forwardRef16
39330
39751
  }, children);
39331
39752
  });
39332
39753
  var Track2 = React59.forwardRef(({ width = 8, children, ...props }, ref) => /* @__PURE__ */ React59.createElement("circle", {
@@ -39360,7 +39781,7 @@ function createComputed(compute2, deps = []) {
39360
39781
  const scope = useReactScope();
39361
39782
  return React59.useMemo(() => scoped(() => computed(compute2), scope), [scope, ...deps]);
39362
39783
  }
39363
- function createEffect(compute2, deps = []) {
39784
+ function createEffect2(compute2, deps = []) {
39364
39785
  const scope = useReactScope();
39365
39786
  React59.useEffect(() => scoped(() => effect(compute2), scope), [scope, ...deps]);
39366
39787
  }
@@ -39603,7 +40024,7 @@ class AudioGainRadioGroup extends Component {
39603
40024
  onSetup() {
39604
40025
  this.#media = useMediaContext();
39605
40026
  if (hasProvidedContext(menuContext)) {
39606
- this.#menu = useContext44(menuContext);
40027
+ this.#menu = useContext45(menuContext);
39607
40028
  }
39608
40029
  }
39609
40030
  onConnect(el) {
@@ -39709,11 +40130,11 @@ var MediaPlayerBridge = createReactComponent(MediaPlayerInstance, {
39709
40130
  eventsRegex: /^onHls/,
39710
40131
  domEventsRegex: /^onMedia/
39711
40132
  });
39712
- var MediaPlayer2 = React61.forwardRef(({ aspectRatio, children, ...props }, forwardRef15) => {
40133
+ var MediaPlayer2 = React61.forwardRef(({ aspectRatio, children, ...props }, forwardRef16) => {
39713
40134
  return /* @__PURE__ */ React61.createElement(MediaPlayerBridge, {
39714
40135
  ...props,
39715
40136
  src: props.src,
39716
- ref: forwardRef15,
40137
+ ref: forwardRef16,
39717
40138
  style: {
39718
40139
  aspectRatio,
39719
40140
  ...props.style
@@ -39722,9 +40143,9 @@ var MediaPlayer2 = React61.forwardRef(({ aspectRatio, children, ...props }, forw
39722
40143
  });
39723
40144
  MediaPlayer2.displayName = "MediaPlayer";
39724
40145
  var MediaProviderBridge = createReactComponent(MediaProviderInstance);
39725
- var MediaProvider2 = React61.forwardRef(({ loaders = [], children, iframeProps, mediaProps, ...props }, forwardRef15) => {
40146
+ var MediaProvider2 = React61.forwardRef(({ loaders = [], children, iframeProps, mediaProps, ...props }, forwardRef16) => {
39726
40147
  const reactLoaders = React61.useMemo(() => loaders.map((Loader) => new Loader), loaders);
39727
- return /* @__PURE__ */ React61.createElement(MediaProviderBridge, { ...props, loaders: reactLoaders, ref: forwardRef15 }, (props2, instance) => /* @__PURE__ */ React61.createElement("div", { ...props2 }, /* @__PURE__ */ React61.createElement(MediaOutlet, { provider: instance, mediaProps, iframeProps }), children));
40148
+ return /* @__PURE__ */ React61.createElement(MediaProviderBridge, { ...props, loaders: reactLoaders, ref: forwardRef16 }, (props2, instance) => /* @__PURE__ */ React61.createElement("div", { ...props2 }, /* @__PURE__ */ React61.createElement(MediaOutlet, { provider: instance, mediaProps, iframeProps }), children));
39728
40149
  });
39729
40150
  MediaProvider2.displayName = "MediaProvider";
39730
40151
  function MediaOutlet({ provider: provider2, mediaProps, iframeProps }) {
@@ -39794,48 +40215,48 @@ function Track3({ lang, ...props }) {
39794
40215
  }
39795
40216
  Track3.displayName = "Track";
39796
40217
  var ToggleButtonBridge = createReactComponent(ToggleButtonInstance);
39797
- var ToggleButton2 = React61.forwardRef(({ children, ...props }, forwardRef15) => {
40218
+ var ToggleButton2 = React61.forwardRef(({ children, ...props }, forwardRef16) => {
39798
40219
  return /* @__PURE__ */ React61.createElement(ToggleButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React61.createElement(Primitive3.button, {
39799
40220
  ...props2,
39800
- ref: composeRefs3(props2.ref, forwardRef15)
40221
+ ref: composeRefs3(props2.ref, forwardRef16)
39801
40222
  }, children));
39802
40223
  });
39803
40224
  ToggleButton2.displayName = "ToggleButton";
39804
40225
  var PosterBridge = createReactComponent(PosterInstance);
39805
- var Poster2 = React61.forwardRef(({ children, ...props }, forwardRef15) => {
40226
+ var Poster2 = React61.forwardRef(({ children, ...props }, forwardRef16) => {
39806
40227
  return /* @__PURE__ */ React61.createElement(PosterBridge, {
39807
40228
  src: props.asChild && React61.isValidElement(children) ? children.props.src : undefined,
39808
40229
  ...props
39809
40230
  }, (props2, instance) => /* @__PURE__ */ React61.createElement(PosterImg, {
39810
40231
  ...props2,
39811
40232
  instance,
39812
- ref: composeRefs3(props2.ref, forwardRef15)
40233
+ ref: composeRefs3(props2.ref, forwardRef16)
39813
40234
  }, children));
39814
40235
  });
39815
40236
  Poster2.displayName = "Poster";
39816
- var PosterImg = React61.forwardRef(({ instance, children, ...props }, forwardRef15) => {
40237
+ var PosterImg = React61.forwardRef(({ instance, children, ...props }, forwardRef16) => {
39817
40238
  const { src, img, alt, crossOrigin, hidden } = instance.$state, $src = useSignal(src), $alt = useSignal(alt), $crossOrigin = useSignal(crossOrigin), $hidden = useSignal(hidden);
39818
40239
  return /* @__PURE__ */ React61.createElement(Primitive3.img, {
39819
40240
  ...props,
39820
40241
  src: $src || undefined,
39821
40242
  alt: $alt || undefined,
39822
40243
  crossOrigin: $crossOrigin || undefined,
39823
- ref: composeRefs3(img.set, forwardRef15),
40244
+ ref: composeRefs3(img.set, forwardRef16),
39824
40245
  style: { display: $hidden ? "none" : undefined }
39825
40246
  }, children);
39826
40247
  });
39827
40248
  PosterImg.displayName = "PosterImg";
39828
- var Root7 = React61.forwardRef(({ children, ...props }, forwardRef15) => {
40249
+ var Root7 = React61.forwardRef(({ children, ...props }, forwardRef16) => {
39829
40250
  return /* @__PURE__ */ React61.createElement(Primitive3.div, {
39830
40251
  translate: "yes",
39831
40252
  "aria-live": "off",
39832
40253
  "aria-atomic": "true",
39833
40254
  ...props,
39834
- ref: forwardRef15
40255
+ ref: forwardRef16
39835
40256
  }, children);
39836
40257
  });
39837
40258
  Root7.displayName = "Caption";
39838
- var Text = React61.forwardRef((props, forwardRef15) => {
40259
+ var Text = React61.forwardRef((props, forwardRef16) => {
39839
40260
  const textTrack = useMediaState("textTrack"), [activeCue, setActiveCue] = React61.useState();
39840
40261
  React61.useEffect(() => {
39841
40262
  if (!textTrack)
@@ -39855,7 +40276,7 @@ var Text = React61.forwardRef((props, forwardRef15) => {
39855
40276
  dangerouslySetInnerHTML: {
39856
40277
  __html: activeCue?.text || ""
39857
40278
  },
39858
- ref: forwardRef15
40279
+ ref: forwardRef16
39859
40280
  });
39860
40281
  });
39861
40282
  Text.displayName = "CaptionText";
@@ -40005,7 +40426,7 @@ function createDefaultMediaLayout({
40005
40426
  thumbnails = null,
40006
40427
  translations,
40007
40428
  ...props
40008
- }, forwardRef15) => {
40429
+ }, forwardRef16) => {
40009
40430
  const media = useMediaContext2(), $load = useSignal(media.$props.load), $canLoad = useMediaState("canLoad"), $viewType = useMediaState("viewType"), $streamType = useMediaState("streamType"), $smallWhen = createComputed(() => {
40010
40431
  return isBoolean(smallLayoutWhen) ? smallLayoutWhen : smallLayoutWhen(media.player.state);
40011
40432
  }, [smallLayoutWhen]), userPrefersAnnouncements = createSignal(true), userPrefersKeyboardAnimations = createSignal(true), isMatch = $viewType === type, isSmallLayout = $smallWhen(), isForcedLayout = isBoolean(smallLayoutWhen), isLoadLayout = $load === "play" && !$canLoad, canRender = $canLoad || isForcedLayout || isLoadLayout, colorSchemeClass = useColorSchemeClass(colorScheme), layoutEl = createSignal(null);
@@ -40018,7 +40439,7 @@ function createDefaultMediaLayout({
40018
40439
  "data-lg": !isSmallLayout ? "" : null,
40019
40440
  "data-size": isSmallLayout ? "sm" : "lg",
40020
40441
  "data-no-scrub-gesture": noScrubGesture ? "" : null,
40021
- ref: composeRefs3(layoutEl.set, forwardRef15)
40442
+ ref: composeRefs3(layoutEl.set, forwardRef16)
40022
40443
  }, canRender && isMatch ? /* @__PURE__ */ React65.createElement(DefaultLayoutContext.Provider, {
40023
40444
  value: {
40024
40445
  disableTimeSlider,
@@ -40079,9 +40500,9 @@ function DefaultPlayButton({ tooltip }) {
40079
40500
  return /* @__PURE__ */ React65.createElement(DefaultTooltip, { content: $paused ? playText : pauseText, placement: tooltip }, /* @__PURE__ */ React65.createElement(PlayButton2, { className: "vds-play-button vds-button", "aria-label": playText }, $ended ? /* @__PURE__ */ React65.createElement(Icons.PlayButton.Replay, { className: "vds-icon" }) : $paused ? /* @__PURE__ */ React65.createElement(Icons.PlayButton.Play, { className: "vds-icon" }) : /* @__PURE__ */ React65.createElement(Icons.PlayButton.Pause, { className: "vds-icon" })));
40080
40501
  }
40081
40502
  DefaultPlayButton.displayName = "DefaultPlayButton";
40082
- var DefaultMuteButton = React65.forwardRef(({ tooltip }, forwardRef15) => {
40503
+ var DefaultMuteButton = React65.forwardRef(({ tooltip }, forwardRef16) => {
40083
40504
  const { icons: Icons } = useDefaultLayoutContext(), muteText = useDefaultLayoutWord("Mute"), unmuteText = useDefaultLayoutWord("Unmute"), $muted = useMediaState("muted"), $volume = useMediaState("volume");
40084
- return /* @__PURE__ */ React65.createElement(DefaultTooltip, { content: $muted ? unmuteText : muteText, placement: tooltip }, /* @__PURE__ */ React65.createElement(MuteButton2, { className: "vds-mute-button vds-button", "aria-label": muteText, ref: forwardRef15 }, $muted || $volume == 0 ? /* @__PURE__ */ React65.createElement(Icons.MuteButton.Mute, { className: "vds-icon" }) : $volume < 0.5 ? /* @__PURE__ */ React65.createElement(Icons.MuteButton.VolumeLow, { className: "vds-icon" }) : /* @__PURE__ */ React65.createElement(Icons.MuteButton.VolumeHigh, { className: "vds-icon" })));
40505
+ return /* @__PURE__ */ React65.createElement(DefaultTooltip, { content: $muted ? unmuteText : muteText, placement: tooltip }, /* @__PURE__ */ React65.createElement(MuteButton2, { className: "vds-mute-button vds-button", "aria-label": muteText, ref: forwardRef16 }, $muted || $volume == 0 ? /* @__PURE__ */ React65.createElement(Icons.MuteButton.Mute, { className: "vds-icon" }) : $volume < 0.5 ? /* @__PURE__ */ React65.createElement(Icons.MuteButton.VolumeLow, { className: "vds-icon" }) : /* @__PURE__ */ React65.createElement(Icons.MuteButton.VolumeHigh, { className: "vds-icon" })));
40085
40506
  });
40086
40507
  DefaultMuteButton.displayName = "DefaultMuteButton";
40087
40508
  function DefaultCaptionButton({ tooltip }) {
@@ -40857,7 +41278,7 @@ function DefaultTimeSlider() {
40857
41278
  }, /* @__PURE__ */ React65.createElement(Chapters, {
40858
41279
  className: "vds-slider-chapters",
40859
41280
  disabled: width < sliderChaptersMinWidth
40860
- }, (cues, forwardRef15) => cues.map((cue) => /* @__PURE__ */ React65.createElement("div", { className: "vds-slider-chapter", key: cue.startTime, ref: forwardRef15 }, /* @__PURE__ */ React65.createElement(Track, { className: "vds-slider-track" }), /* @__PURE__ */ React65.createElement(TrackFill, { className: "vds-slider-track-fill vds-slider-track" }), /* @__PURE__ */ React65.createElement(Progress, { className: "vds-slider-progress vds-slider-track" })))), /* @__PURE__ */ React65.createElement(Thumb, { className: "vds-slider-thumb" }), /* @__PURE__ */ React65.createElement(Preview, { className: "vds-slider-preview" }, thumbnails ? /* @__PURE__ */ React65.createElement(Thumbnail2.Root, {
41281
+ }, (cues, forwardRef16) => cues.map((cue) => /* @__PURE__ */ React65.createElement("div", { className: "vds-slider-chapter", key: cue.startTime, ref: forwardRef16 }, /* @__PURE__ */ React65.createElement(Track, { className: "vds-slider-track" }), /* @__PURE__ */ React65.createElement(TrackFill, { className: "vds-slider-track-fill vds-slider-track" }), /* @__PURE__ */ React65.createElement(Progress, { className: "vds-slider-progress vds-slider-track" })))), /* @__PURE__ */ React65.createElement(Thumb, { className: "vds-slider-thumb" }), /* @__PURE__ */ React65.createElement(Preview, { className: "vds-slider-preview" }, thumbnails ? /* @__PURE__ */ React65.createElement(Thumbnail2.Root, {
40861
41282
  src: thumbnails,
40862
41283
  className: "vds-slider-thumbnail vds-thumbnail"
40863
41284
  }, /* @__PURE__ */ React65.createElement(Thumbnail2.Img, null)) : $RemotionSliderThumbnail && isRemotionSrc($src) ? /* @__PURE__ */ React65.createElement($RemotionSliderThumbnail, { className: "vds-slider-thumbnail vds-thumbnail" }) : null, /* @__PURE__ */ React65.createElement(ChapterTitle, { className: "vds-slider-chapter-title" }), /* @__PURE__ */ React65.createElement(Value2, { className: "vds-slider-value" })));
@@ -40961,7 +41382,7 @@ function AudioTitle({ title, chapterTitle }) {
40961
41382
  return /* @__PURE__ */ React65.createElement("span", { className: "vds-title-text" }, slot(slots, "title", title), slot(slots, "chapterTitle", /* @__PURE__ */ React65.createElement("span", { className: "vds-chapter-title" }, chapterTitle)));
40962
41383
  }
40963
41384
  AudioTitle.displayName = "AudioTitle";
40964
- var DefaultKeyboardDisplay = React65.forwardRef(({ icons: Icons, ...props }, forwardRef15) => {
41385
+ var DefaultKeyboardDisplay = React65.forwardRef(({ icons: Icons, ...props }, forwardRef16) => {
40965
41386
  const [visible, setVisible] = React65.useState(false), [Icon4, setIcon] = React65.useState(null), [count4, setCount] = React65.useState(0), $lastKeyboardAction = useMediaState("lastKeyboardAction");
40966
41387
  React65.useEffect(() => {
40967
41388
  setCount((n2) => n2 + 1);
@@ -40972,7 +41393,7 @@ var DefaultKeyboardDisplay = React65.forwardRef(({ icons: Icons, ...props }, for
40972
41393
  }, [visible, $lastKeyboardAction]);
40973
41394
  const className = React65.useMemo(() => `vds-kb-action${!visible ? " hidden" : ""}${props.className ? ` ${props.className}` : ""}`, [visible]);
40974
41395
  const $$text = createComputed(getText), $text = useSignal($$text);
40975
- createEffect(() => {
41396
+ createEffect2(() => {
40976
41397
  const Icon22 = getIcon(Icons);
40977
41398
  setIcon(() => Icon22);
40978
41399
  }, [Icons]);
@@ -40988,12 +41409,12 @@ var DefaultKeyboardDisplay = React65.forwardRef(({ icons: Icons, ...props }, for
40988
41409
  ...props,
40989
41410
  className,
40990
41411
  "data-action": actionDataAttr,
40991
- ref: forwardRef15
41412
+ ref: forwardRef16
40992
41413
  }, /* @__PURE__ */ React65.createElement("div", { className: "vds-kb-text-wrapper" }, /* @__PURE__ */ React65.createElement("div", { className: "vds-kb-text" }, $text)), /* @__PURE__ */ React65.createElement("div", { className: "vds-kb-bezel", key: count4 }, /* @__PURE__ */ React65.createElement("div", { className: "vds-kb-icon" }, /* @__PURE__ */ React65.createElement(Icon4, null)))) : null;
40993
41414
  });
40994
41415
  DefaultKeyboardDisplay.displayName = "DefaultKeyboardDisplay";
40995
41416
  function getText() {
40996
- const { $state } = useContext44(mediaContext), action = $state.lastKeyboardAction()?.action, audioGain = $state.audioGain() ?? 1;
41417
+ const { $state } = useContext45(mediaContext), action = $state.lastKeyboardAction()?.action, audioGain = $state.audioGain() ?? 1;
40997
41418
  switch (action) {
40998
41419
  case "toggleMuted":
40999
41420
  return $state.muted() ? "0%" : getVolumeText($state.volume(), audioGain);
@@ -41008,7 +41429,7 @@ function getVolumeText(volume, gain) {
41008
41429
  return `${Math.round(volume * gain * 100)}%`;
41009
41430
  }
41010
41431
  function getIcon(Icons) {
41011
- const { $state } = useContext44(mediaContext), action = $state.lastKeyboardAction()?.action;
41432
+ const { $state } = useContext45(mediaContext), action = $state.lastKeyboardAction()?.action;
41012
41433
  switch (action) {
41013
41434
  case "togglePaused":
41014
41435
  return !$state.paused() ? Icons.Play : Icons.Pause;
@@ -41200,10 +41621,10 @@ import"react-dom";
41200
41621
  "use client";
41201
41622
 
41202
41623
  // src/components/prompts/MuxPlayer.tsx
41203
- import { useCallback as useCallback37 } from "react";
41624
+ import { useCallback as useCallback36 } from "react";
41204
41625
  import { jsx as jsx46, jsxs as jsxs9 } from "react/jsx-runtime";
41205
41626
  var MuxPlayer = ({ playbackId, title, rounded = true }) => {
41206
- const onProviderChange = useCallback37((provider2, _e) => {
41627
+ const onProviderChange = useCallback36((provider2, _e) => {
41207
41628
  if (isHLSProvider(provider2)) {
41208
41629
  provider2.library = () => import("hls.js");
41209
41630
  }