@remotion/promo-pages 4.0.462 → 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 +1218 -946
  2. package/dist/design.js +1142 -878
  3. package/dist/experts/experts-data.js +5 -16
  4. package/dist/experts.js +1034 -770
  5. package/dist/homepage/Pricing.js +1146 -882
  6. package/dist/prompts/PromptsGallery.js +1138 -874
  7. package/dist/prompts/PromptsShow.js +1212 -948
  8. package/dist/prompts/PromptsSubmit.js +1214 -950
  9. package/dist/team.js +1134 -870
  10. package/dist/template-modal-content.js +1144 -880
  11. package/dist/templates.js +1134 -870
  12. package/package.json +13 -13
  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 -19
  44. package/dist/components/experts/experts-data.js +0 -391
  45. package/dist/components/experts/experts-icons.d.ts +0 -8
  46. package/dist/components/experts/experts-icons.js +0 -42
  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
package/dist/Homepage.js CHANGED
@@ -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);
@@ -941,8 +930,21 @@ import * as React6 from "react";
941
930
  import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
942
931
  import { useContext as useContext8, useMemo as useMemo7 } from "react";
943
932
  import { jsx as jsx7 } from "react/jsx-runtime";
944
- import { useEffect as useEffect4, useMemo as useMemo12, useState as useState4 } from "react";
945
- import { useContext as useContext11 } from "react";
933
+ import {
934
+ forwardRef as forwardRef4,
935
+ useCallback as useCallback6,
936
+ useEffect as useEffect5,
937
+ useMemo as useMemo16,
938
+ useState as useState6
939
+ } from "react";
940
+ import {
941
+ forwardRef as forwardRef3,
942
+ useContext as useContext17,
943
+ useEffect as useEffect3,
944
+ useMemo as useMemo14,
945
+ useState as useState5
946
+ } from "react";
947
+ import { useContext as useContext14, useMemo as useMemo11 } from "react";
946
948
  import { createContext as createContext12 } from "react";
947
949
  import { useContext as useContext10, useMemo as useMemo9 } from "react";
948
950
  import {
@@ -953,41 +955,34 @@ import {
953
955
  useState as useState2
954
956
  } from "react";
955
957
  import { jsx as jsx8 } from "react/jsx-runtime";
956
- import { useEffect as useEffect3, useMemo as useMemo10, useRef as useRef4 } from "react";
957
- import { useContext as useContext12, useRef as useRef6 } from "react";
958
- import { createContext as createContext14 } from "react";
959
- import React10, { useCallback as useCallback5, useMemo as useMemo11, useRef as useRef5, useState as useState3 } from "react";
958
+ import { useContext as useContext11 } from "react";
959
+ import { useContext as useContext13 } from "react";
960
+ import { useContext as useContext12, useMemo as useMemo10 } from "react";
960
961
  import { jsx as jsx9 } from "react/jsx-runtime";
962
+ import { createContext as createContext14 } from "react";
963
+ import React11, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
961
964
  import { jsx as jsx10 } from "react/jsx-runtime";
962
- import {
963
- forwardRef as forwardRef3,
964
- useContext as useContext17,
965
- useEffect as useEffect5,
966
- useMemo as useMemo16,
967
- useState as useState6
968
- } from "react";
969
- import { useContext as useContext15, useMemo as useMemo14 } from "react";
970
- import { useContext as useContext14 } from "react";
971
- import { useContext as useContext13, useMemo as useMemo13 } from "react";
972
- import { jsx as jsx11 } from "react/jsx-runtime";
965
+ import React12, { forwardRef as forwardRef2, useState as useState4, useContext as useContext16, useMemo as useMemo13 } from "react";
966
+ import { useContext as useContext15, useRef as useRef5 } from "react";
973
967
  import { createContext as createContext15 } from "react";
974
- import React13, { forwardRef as forwardRef2, useState as useState5, useContext as useContext16, useMemo as useMemo15 } from "react";
968
+ import { jsx as jsx11 } from "react/jsx-runtime";
969
+ import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef6 } from "react";
975
970
  import { jsx as jsx12 } from "react/jsx-runtime";
976
971
  import {
977
- forwardRef as forwardRef4,
972
+ forwardRef as forwardRef5,
978
973
  useEffect as useEffect6,
979
974
  useImperativeHandle as useImperativeHandle2,
980
975
  useLayoutEffect as useLayoutEffect2,
981
976
  useRef as useRef8,
982
977
  useState as useState7
983
978
  } from "react";
984
- import React15, { useCallback as useCallback6, useImperativeHandle, useRef as useRef7 } from "react";
979
+ import React15, { useCallback as useCallback7, useImperativeHandle, useRef as useRef7 } from "react";
985
980
  import { jsx as jsx13 } from "react/jsx-runtime";
986
981
  import { jsx as jsx14 } from "react/jsx-runtime";
987
982
  import {
988
983
  createContext as createContext16,
989
- forwardRef as forwardRef5,
990
- useCallback as useCallback7,
984
+ forwardRef as forwardRef6,
985
+ useCallback as useCallback8,
991
986
  useContext as useContext18,
992
987
  useLayoutEffect as useLayoutEffect3,
993
988
  useMemo as useMemo17,
@@ -998,7 +993,7 @@ import { jsx as jsx15 } from "react/jsx-runtime";
998
993
  import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
999
994
  import {
1000
995
  createContext as createContext17,
1001
- useCallback as useCallback8,
996
+ useCallback as useCallback9,
1002
997
  useImperativeHandle as useImperativeHandle3,
1003
998
  useLayoutEffect as useLayoutEffect4,
1004
999
  useMemo as useMemo18,
@@ -1006,7 +1001,7 @@ import {
1006
1001
  useState as useState9
1007
1002
  } from "react";
1008
1003
  import { jsx as jsx16 } from "react/jsx-runtime";
1009
- import { forwardRef as forwardRef8, useCallback as useCallback13, useContext as useContext31 } from "react";
1004
+ import { forwardRef as forwardRef9, useCallback as useCallback14, useContext as useContext31 } from "react";
1010
1005
  import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
1011
1006
  import { jsx as jsx17 } from "react/jsx-runtime";
1012
1007
  import { useContext as useContext20 } from "react";
@@ -1015,7 +1010,7 @@ import { jsx as jsx18 } from "react/jsx-runtime";
1015
1010
  import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
1016
1011
  import { jsx as jsx19 } from "react/jsx-runtime";
1017
1012
  import React23, {
1018
- forwardRef as forwardRef6,
1013
+ forwardRef as forwardRef7,
1019
1014
  useContext as useContext29,
1020
1015
  useEffect as useEffect14,
1021
1016
  useImperativeHandle as useImperativeHandle4,
@@ -1027,7 +1022,7 @@ import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef
1027
1022
  import React20, {
1028
1023
  createContext as createContext21,
1029
1024
  createRef as createRef2,
1030
- useCallback as useCallback9,
1025
+ useCallback as useCallback10,
1031
1026
  useContext as useContext21,
1032
1027
  useMemo as useMemo22,
1033
1028
  useRef as useRef11,
@@ -1039,16 +1034,16 @@ import { useRef as useRef12 } from "react";
1039
1034
  import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
1040
1035
  import { useContext as useContext23 } from "react";
1041
1036
  import {
1042
- useCallback as useCallback12,
1037
+ useCallback as useCallback13,
1043
1038
  useContext as useContext27,
1044
1039
  useEffect as useEffect12,
1045
1040
  useLayoutEffect as useLayoutEffect8,
1046
1041
  useRef as useRef17
1047
1042
  } from "react";
1048
- import { useCallback as useCallback11, useMemo as useMemo26, useRef as useRef15 } from "react";
1043
+ import { useCallback as useCallback12, useMemo as useMemo26, useRef as useRef15 } from "react";
1049
1044
  import { useContext as useContext26, useMemo as useMemo25 } from "react";
1050
1045
  import React21, {
1051
- useCallback as useCallback10,
1046
+ useCallback as useCallback11,
1052
1047
  useContext as useContext25,
1053
1048
  useEffect as useEffect9,
1054
1049
  useLayoutEffect as useLayoutEffect7,
@@ -1064,7 +1059,7 @@ import { useEffect as useEffect13 } from "react";
1064
1059
  import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
1065
1060
  import { jsx as jsx222 } from "react/jsx-runtime";
1066
1061
  import {
1067
- forwardRef as forwardRef7,
1062
+ forwardRef as forwardRef8,
1068
1063
  useContext as useContext30,
1069
1064
  useEffect as useEffect15,
1070
1065
  useImperativeHandle as useImperativeHandle5,
@@ -1074,10 +1069,10 @@ import {
1074
1069
  } from "react";
1075
1070
  import { jsx as jsx23 } from "react/jsx-runtime";
1076
1071
  import { jsx as jsx24 } from "react/jsx-runtime";
1077
- import { forwardRef as forwardRef9, useCallback as useCallback14, useState as useState17 } from "react";
1072
+ import { forwardRef as forwardRef10, useCallback as useCallback15, useState as useState17 } from "react";
1078
1073
  import { jsx as jsx25 } from "react/jsx-runtime";
1079
1074
  import {
1080
- useCallback as useCallback15,
1075
+ useCallback as useCallback16,
1081
1076
  useContext as useContext32,
1082
1077
  useImperativeHandle as useImperativeHandle6,
1083
1078
  useLayoutEffect as useLayoutEffect10,
@@ -1088,7 +1083,7 @@ import { jsx as jsx26 } from "react/jsx-runtime";
1088
1083
  import { createRef as createRef3 } from "react";
1089
1084
  import React28 from "react";
1090
1085
  import {
1091
- useCallback as useCallback16,
1086
+ useCallback as useCallback17,
1092
1087
  useImperativeHandle as useImperativeHandle7,
1093
1088
  useMemo as useMemo30,
1094
1089
  useRef as useRef21,
@@ -1102,9 +1097,9 @@ import { jsx as jsx28 } from "react/jsx-runtime";
1102
1097
  import { jsx as jsx29 } from "react/jsx-runtime";
1103
1098
  import React31 from "react";
1104
1099
  import React32, { createContext as createContext24 } from "react";
1105
- import { useCallback as useCallback18 } from "react";
1100
+ import { useCallback as useCallback19 } from "react";
1106
1101
  import {
1107
- useCallback as useCallback17,
1102
+ useCallback as useCallback18,
1108
1103
  useContext as useContext34,
1109
1104
  useEffect as useEffect16,
1110
1105
  useLayoutEffect as useLayoutEffect11,
@@ -1113,7 +1108,7 @@ import {
1113
1108
  } from "react";
1114
1109
  import { jsx as jsx30 } from "react/jsx-runtime";
1115
1110
  import React34, {
1116
- forwardRef as forwardRef10,
1111
+ forwardRef as forwardRef11,
1117
1112
  useContext as useContext35,
1118
1113
  useEffect as useEffect18,
1119
1114
  useImperativeHandle as useImperativeHandle8,
@@ -1126,15 +1121,15 @@ import { jsx as jsx31 } from "react/jsx-runtime";
1126
1121
  import { jsx as jsx32 } from "react/jsx-runtime";
1127
1122
  import React36, { useMemo as useMemo35 } from "react";
1128
1123
  import { jsx as jsx33 } from "react/jsx-runtime";
1129
- import { Children, forwardRef as forwardRef11, useMemo as useMemo36 } from "react";
1124
+ import { Children, forwardRef as forwardRef12, useMemo as useMemo36 } from "react";
1130
1125
  import React37 from "react";
1131
1126
  import React38, { createContext as createContext25 } from "react";
1132
1127
  import { jsx as jsx34 } from "react/jsx-runtime";
1133
1128
  import { jsx as jsx35 } from "react/jsx-runtime";
1134
1129
  import React40 from "react";
1135
- import { forwardRef as forwardRef13, useCallback as useCallback19, useContext as useContext37 } from "react";
1130
+ import { forwardRef as forwardRef14, useCallback as useCallback20, useContext as useContext37 } from "react";
1136
1131
  import {
1137
- forwardRef as forwardRef12,
1132
+ forwardRef as forwardRef13,
1138
1133
  useContext as useContext36,
1139
1134
  useEffect as useEffect19,
1140
1135
  useImperativeHandle as useImperativeHandle9,
@@ -1145,13 +1140,17 @@ import {
1145
1140
  import { jsx as jsx36 } from "react/jsx-runtime";
1146
1141
  import { jsx as jsx37 } from "react/jsx-runtime";
1147
1142
  var __defProp2 = Object.defineProperty;
1143
+ var __returnValue2 = (v) => v;
1144
+ function __exportSetter2(name, newValue) {
1145
+ this[name] = __returnValue2.bind(null, newValue);
1146
+ }
1148
1147
  var __export2 = (target, all) => {
1149
1148
  for (var name in all)
1150
1149
  __defProp2(target, name, {
1151
1150
  get: all[name],
1152
1151
  enumerable: true,
1153
1152
  configurable: true,
1154
- set: (newValue) => all[name] = () => newValue
1153
+ set: __exportSetter2.bind(all, name)
1155
1154
  });
1156
1155
  };
1157
1156
  if (typeof createContext !== "function") {
@@ -2211,6 +2210,81 @@ var Composition = (props) => {
2211
2210
  ...props
2212
2211
  });
2213
2212
  };
2213
+ var componentsToAddStacksTo = [];
2214
+ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2215
+ var addSequenceStackTraces = (component) => {
2216
+ componentsToAddStacksTo.push(component);
2217
+ };
2218
+ var sequenceStyleSchema = {
2219
+ "style.translate": {
2220
+ type: "translate",
2221
+ step: 1,
2222
+ default: "0px 0px",
2223
+ description: "Offset"
2224
+ },
2225
+ "style.scale": {
2226
+ type: "number",
2227
+ min: 0.05,
2228
+ max: 100,
2229
+ step: 0.01,
2230
+ default: 1,
2231
+ description: "Scale"
2232
+ },
2233
+ "style.rotate": {
2234
+ type: "rotation",
2235
+ step: 1,
2236
+ default: "0deg",
2237
+ description: "Rotation"
2238
+ },
2239
+ "style.opacity": {
2240
+ type: "number",
2241
+ min: 0,
2242
+ max: 1,
2243
+ step: 0.01,
2244
+ default: 1,
2245
+ description: "Opacity"
2246
+ },
2247
+ premountFor: {
2248
+ type: "number",
2249
+ default: 0,
2250
+ description: "Premount For",
2251
+ min: 0,
2252
+ step: 1
2253
+ },
2254
+ postmountFor: {
2255
+ type: "hidden"
2256
+ },
2257
+ styleWhilePremounted: {
2258
+ type: "hidden"
2259
+ },
2260
+ styleWhilePostmounted: {
2261
+ type: "hidden"
2262
+ }
2263
+ };
2264
+ var hiddenField = {
2265
+ type: "boolean",
2266
+ default: false,
2267
+ description: "Hidden"
2268
+ };
2269
+ var sequenceSchema = {
2270
+ hidden: hiddenField,
2271
+ layout: {
2272
+ type: "enum",
2273
+ default: "absolute-fill",
2274
+ description: "Layout",
2275
+ variants: {
2276
+ "absolute-fill": sequenceStyleSchema,
2277
+ none: {}
2278
+ }
2279
+ }
2280
+ };
2281
+ var sequenceSchemaDefaultLayoutNone = {
2282
+ ...sequenceSchema,
2283
+ layout: {
2284
+ ...sequenceSchema.layout,
2285
+ default: "none"
2286
+ }
2287
+ };
2214
2288
  var SequenceContext = createContext12(null);
2215
2289
  var exports_timeline_position_state = {};
2216
2290
  __export2(exports_timeline_position_state, {
@@ -2416,253 +2490,136 @@ var useCurrentFrame = () => {
2416
2490
  const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;
2417
2491
  return frame - contextOffset;
2418
2492
  };
2419
-
2420
- class CanvasPool {
2421
- width;
2422
- height;
2423
- pairs = new Map;
2424
- lostContexts = new Set;
2425
- constructor(width, height) {
2426
- this.width = width;
2427
- this.height = height;
2428
- }
2429
- getPair(backend) {
2430
- const existing = this.pairs.get(backend);
2431
- if (existing) {
2432
- return existing;
2433
- }
2434
- const pair = [
2435
- this.allocateCanvas(backend),
2436
- this.allocateCanvas(backend)
2437
- ];
2438
- this.pairs.set(backend, pair);
2439
- return pair;
2440
- }
2441
- assertContextNotLost(canvas) {
2442
- if (this.lostContexts.has(canvas)) {
2443
- 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.");
2444
- }
2445
- }
2446
- allocateCanvas(backend) {
2447
- const canvas = document.createElement("canvas");
2448
- canvas.width = this.width;
2449
- canvas.height = this.height;
2450
- switch (backend) {
2451
- case "2d": {
2452
- const ctx = canvas.getContext("2d", {
2453
- colorSpace: "srgb"
2454
- });
2455
- if (!ctx) {
2456
- throw new Error("Failed to acquire 2D context for canvas effect");
2457
- }
2458
- return canvas;
2459
- }
2460
- case "webgl2": {
2461
- const ctx = canvas.getContext("webgl2", {
2462
- premultipliedAlpha: true,
2463
- alpha: true,
2464
- preserveDrawingBuffer: true
2465
- });
2466
- if (!ctx) {
2467
- throw new Error("Failed to acquire WebGL2 context for canvas effect");
2468
- }
2469
- canvas.addEventListener("webglcontextlost", (e) => {
2470
- e.preventDefault();
2471
- this.lostContexts.add(canvas);
2472
- });
2473
- canvas.addEventListener("webglcontextrestored", () => {
2474
- this.lostContexts.delete(canvas);
2475
- });
2476
- ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
2477
- return canvas;
2478
- }
2479
- case "webgpu": {
2480
- if (typeof navigator === "undefined" || !("gpu" in navigator)) {
2481
- throw new Error("WebGPU is not available in this environment for canvas effect");
2482
- }
2483
- return canvas;
2484
- }
2485
- default: {
2486
- const exhaustive = backend;
2487
- throw new Error(`Unknown effect backend: ${exhaustive}`);
2488
- }
2489
- }
2490
- }
2491
- }
2492
- var groupByBackend = (effects) => {
2493
- const runs = [];
2494
- let current = [];
2495
- let currentBackend = null;
2496
- for (const eff of effects) {
2497
- const { backend } = eff.definition;
2498
- if (currentBackend === null || backend === currentBackend) {
2499
- current.push(eff);
2500
- currentBackend = backend;
2501
- } else {
2502
- runs.push({ backend: currentBackend, effects: current });
2503
- current = [eff];
2504
- currentBackend = backend;
2493
+ var useUnsafeVideoConfig = () => {
2494
+ const context = useContext12(SequenceContext);
2495
+ const ctxWidth = context?.width ?? null;
2496
+ const ctxHeight = context?.height ?? null;
2497
+ const ctxDuration = context?.durationInFrames ?? null;
2498
+ const video = useVideo();
2499
+ return useMemo10(() => {
2500
+ if (!video) {
2501
+ return null;
2505
2502
  }
2506
- }
2507
- if (currentBackend !== null && current.length > 0) {
2508
- runs.push({ backend: currentBackend, effects: current });
2509
- }
2510
- return runs;
2503
+ const {
2504
+ id,
2505
+ durationInFrames,
2506
+ fps,
2507
+ height,
2508
+ width,
2509
+ defaultProps,
2510
+ props,
2511
+ defaultCodec,
2512
+ defaultOutName,
2513
+ defaultVideoImageFormat,
2514
+ defaultPixelFormat,
2515
+ defaultProResProfile,
2516
+ defaultSampleRate
2517
+ } = video;
2518
+ return {
2519
+ id,
2520
+ width: ctxWidth ?? width,
2521
+ height: ctxHeight ?? height,
2522
+ fps,
2523
+ durationInFrames: ctxDuration ?? durationInFrames,
2524
+ defaultProps,
2525
+ props,
2526
+ defaultCodec,
2527
+ defaultOutName,
2528
+ defaultVideoImageFormat,
2529
+ defaultPixelFormat,
2530
+ defaultProResProfile,
2531
+ defaultSampleRate
2532
+ };
2533
+ }, [ctxDuration, ctxHeight, ctxWidth, video]);
2511
2534
  };
2512
- var devicePromise = null;
2513
- var getGpuDevice = () => {
2514
- if (devicePromise) {
2515
- return devicePromise;
2516
- }
2517
- devicePromise = (async () => {
2518
- if (typeof navigator === "undefined" || !("gpu" in navigator)) {
2519
- throw new Error("WebGPU is not available in this environment");
2520
- }
2521
- const { gpu } = navigator;
2522
- const adapter = await gpu.requestAdapter();
2523
- if (!adapter) {
2524
- throw new Error("No WebGPU adapter available");
2535
+ var useVideoConfig = () => {
2536
+ const videoConfig = useUnsafeVideoConfig();
2537
+ const context = useContext13(CanUseRemotionHooks);
2538
+ const isPlayer = useIsPlayer();
2539
+ if (!videoConfig) {
2540
+ if (typeof window !== "undefined" && window.remotion_isPlayer || isPlayer) {
2541
+ throw new Error([
2542
+ "No video config found. Likely reasons:",
2543
+ "- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.",
2544
+ "- You have multiple versions of Remotion installed which causes the React context to get lost."
2545
+ ].join("-"));
2525
2546
  }
2526
- return adapter.requestDevice();
2527
- })();
2528
- return devicePromise;
2529
- };
2530
- var createEffectChainState = (width, height) => ({
2531
- pool: new CanvasPool(width, height),
2532
- setupCache: new WeakMap,
2533
- cleanupRegistry: [],
2534
- currentRunId: 0
2535
- });
2536
- var cleanupEffectChainState = (state) => {
2537
- state.currentRunId++;
2538
- for (const entry of state.cleanupRegistry) {
2539
- entry.definition.cleanup(entry.state);
2547
+ throw new Error("No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.");
2540
2548
  }
2541
- };
2542
- var ensureSetup = (state, def, target) => {
2543
- const widened = def;
2544
- if (state.setupCache.has(widened)) {
2545
- return state.setupCache.get(widened);
2549
+ if (!context) {
2550
+ throw new Error("Called useVideoConfig() outside a Remotion composition.");
2546
2551
  }
2547
- const setupState = def.setup(target);
2548
- state.setupCache.set(widened, setupState);
2549
- state.cleanupRegistry.push({ definition: widened, state: setupState });
2550
- return setupState;
2552
+ return videoConfig;
2551
2553
  };
2552
- var runEffectChain = async ({
2553
- state,
2554
- source,
2555
- effects,
2556
- output,
2557
- frame,
2558
- width,
2559
- height
2554
+ var Freeze = ({
2555
+ frame: frameToFreeze,
2556
+ children,
2557
+ active = true
2560
2558
  }) => {
2561
- const runId = ++state.currentRunId;
2562
- const isCancelled = () => state.currentRunId !== runId;
2563
- const runs = groupByBackend(effects);
2564
- let currentImage = source;
2565
- let lastTarget = null;
2566
- if (runs.length === 0) {
2567
- if (source === output) {
2568
- return true;
2569
- }
2570
- const ctx = output.getContext("2d");
2571
- if (!ctx) {
2572
- throw new Error("Failed to acquire 2D context for output canvas");
2573
- }
2574
- ctx.clearRect(0, 0, width, height);
2575
- ctx.drawImage(currentImage, 0, 0, width, height);
2576
- return true;
2559
+ const frame = useCurrentFrame();
2560
+ const videoConfig = useVideoConfig();
2561
+ if (typeof frameToFreeze === "undefined") {
2562
+ throw new Error(`The <Freeze /> component requires a 'frame' prop, but none was passed.`);
2577
2563
  }
2578
- let needsGpuDevice = false;
2579
- for (const run of runs) {
2580
- if (run.backend === "webgpu") {
2581
- needsGpuDevice = true;
2582
- break;
2583
- }
2564
+ if (typeof frameToFreeze !== "number") {
2565
+ throw new Error(`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof frameToFreeze}`);
2584
2566
  }
2585
- const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
2586
- if (isCancelled()) {
2587
- return false;
2567
+ if (Number.isNaN(frameToFreeze)) {
2568
+ throw new Error(`The 'frame' prop of <Freeze /> must be a real number, but it is NaN.`);
2588
2569
  }
2589
- for (let runIndex = 0;runIndex < runs.length; runIndex++) {
2590
- const run = runs[runIndex];
2591
- const [a, b] = state.pool.getPair(run.backend);
2592
- let dst = a;
2593
- for (const eff of run.effects) {
2594
- const def = eff.definition;
2595
- const setupState = ensureSetup(state, def, dst);
2596
- def.apply({
2597
- source: currentImage,
2598
- target: dst,
2599
- state: setupState,
2600
- params: eff.params,
2601
- frame,
2602
- width,
2603
- height,
2604
- gpuDevice
2605
- });
2606
- if (run.backend === "webgl2") {
2607
- state.pool.assertContextNotLost(dst);
2608
- }
2609
- currentImage = dst;
2610
- dst = dst === a ? b : a;
2570
+ if (!Number.isFinite(frameToFreeze)) {
2571
+ throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);
2572
+ }
2573
+ const isActive = useMemo11(() => {
2574
+ if (typeof active === "boolean") {
2575
+ return active;
2611
2576
  }
2612
- lastTarget = currentImage ?? lastTarget;
2613
- const nextRun = runs[runIndex + 1];
2614
- if (nextRun && nextRun.backend !== run.backend && lastTarget) {
2615
- const bitmap = await createImageBitmap(lastTarget);
2616
- if (isCancelled()) {
2617
- bitmap.close();
2618
- return false;
2619
- }
2620
- currentImage = bitmap;
2577
+ if (typeof active === "function") {
2578
+ return active(frame);
2621
2579
  }
2622
- }
2623
- if (!lastTarget) {
2624
- return true;
2625
- }
2626
- const outCtx = output.getContext("2d");
2627
- if (!outCtx) {
2628
- throw new Error("Failed to acquire 2D context for output canvas");
2629
- }
2630
- outCtx.clearRect(0, 0, width, height);
2631
- outCtx.drawImage(lastTarget, 0, 0, width, height);
2632
- return true;
2633
- };
2634
- var useEffectChainState = () => {
2635
- const chainStateRef = useRef4(null);
2636
- const sizeRef = useRef4(null);
2637
- useEffect3(() => {
2638
- return () => {
2639
- if (chainStateRef.current) {
2640
- cleanupEffectChainState(chainStateRef.current);
2580
+ }, [active, frame]);
2581
+ const timelineContext = useTimelineContext();
2582
+ const sequenceContext = useContext14(SequenceContext);
2583
+ const relativeFrom = sequenceContext?.relativeFrom ?? 0;
2584
+ const timelineValue = useMemo11(() => {
2585
+ if (!isActive) {
2586
+ return timelineContext;
2587
+ }
2588
+ return {
2589
+ ...timelineContext,
2590
+ playing: false,
2591
+ imperativePlaying: {
2592
+ current: false
2593
+ },
2594
+ frame: {
2595
+ [videoConfig.id]: frameToFreeze + relativeFrom
2641
2596
  }
2642
2597
  };
2643
- }, []);
2644
- return useMemo10(() => ({
2645
- get: (width, height) => {
2646
- if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
2647
- if (chainStateRef.current) {
2648
- cleanupEffectChainState(chainStateRef.current);
2649
- }
2650
- chainStateRef.current = createEffectChainState(width, height);
2651
- sizeRef.current = { width, height };
2652
- }
2653
- return chainStateRef.current;
2598
+ }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
2599
+ const newSequenceContext = useMemo11(() => {
2600
+ if (!sequenceContext) {
2601
+ return null;
2654
2602
  }
2655
- }), []);
2603
+ if (!isActive) {
2604
+ return sequenceContext;
2605
+ }
2606
+ return {
2607
+ ...sequenceContext,
2608
+ cumulatedFrom: 0
2609
+ };
2610
+ }, [sequenceContext, isActive]);
2611
+ return /* @__PURE__ */ jsx9(TimelineContext.Provider, {
2612
+ value: timelineValue,
2613
+ children: /* @__PURE__ */ jsx9(SequenceContext.Provider, {
2614
+ value: newSequenceContext,
2615
+ children
2616
+ })
2617
+ });
2656
2618
  };
2657
- var OverrideIdsToNodePathsGettersContext = createContext14({
2658
- overrideIdToNodePathMappings: {}
2659
- });
2660
- var OverrideIdsToNodePathsSettersContext = createContext14({
2661
- setOverrideIdToNodePath: () => {
2662
- throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
2663
- }
2619
+ var PremountContext = createContext14({
2620
+ premountFramesRemaining: 0
2664
2621
  });
2665
- var SequenceManager = React10.createContext({
2622
+ var SequenceManager = React11.createContext({
2666
2623
  registerSequence: () => {
2667
2624
  throw new Error("SequenceManagerContext not initialized");
2668
2625
  },
@@ -2671,19 +2628,13 @@ var SequenceManager = React10.createContext({
2671
2628
  },
2672
2629
  sequences: []
2673
2630
  });
2674
- var SequenceVisibilityToggleContext = React10.createContext({
2675
- hidden: {},
2676
- setHidden: () => {
2677
- throw new Error("SequenceVisibilityToggle not initialized");
2678
- }
2679
- });
2680
2631
  var makeSequencePropsSubscriptionKey = (key) => {
2681
2632
  return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
2682
2633
  };
2683
- var VisualModeCodeValuesContext = React10.createContext({
2634
+ var VisualModeCodeValuesContext = React11.createContext({
2684
2635
  codeValues: {}
2685
2636
  });
2686
- var VisualModeDragOverridesContext = React10.createContext({
2637
+ var VisualModeDragOverridesContext = React11.createContext({
2687
2638
  getDragOverrides: () => {
2688
2639
  throw new Error("VisualModeDragOverridesContext not initialized");
2689
2640
  },
@@ -2691,7 +2642,7 @@ var VisualModeDragOverridesContext = React10.createContext({
2691
2642
  throw new Error("VisualModeDragOverridesContext not initialized");
2692
2643
  }
2693
2644
  });
2694
- var VisualModeSettersContext = React10.createContext({
2645
+ var VisualModeSettersContext = React11.createContext({
2695
2646
  setDragOverrides: () => {
2696
2647
  throw new Error("VisualModeSettersContext not initialized");
2697
2648
  },
@@ -2711,9 +2662,8 @@ var VisualModeSettersContext = React10.createContext({
2711
2662
  var effectDragOverridesKey = (nodePath, effectIndex) => `${makeSequencePropsSubscriptionKey(nodePath)}.effects.${effectIndex}`;
2712
2663
  var SequenceManagerProvider = ({ children }) => {
2713
2664
  const [sequences, setSequences] = useState3([]);
2714
- const [hidden, setHidden] = useState3({});
2715
2665
  const [dragOverrides, setControlOverrides] = useState3({});
2716
- const controlOverridesRef = useRef5(dragOverrides);
2666
+ const controlOverridesRef = useRef4(dragOverrides);
2717
2667
  controlOverridesRef.current = dragOverrides;
2718
2668
  const [effectDragOverridesState, setEffectDragOverridesState] = useState3({});
2719
2669
  const [codeValues, setCodeValuesMapState] = useState3({});
@@ -2779,37 +2729,31 @@ var SequenceManagerProvider = ({ children }) => {
2779
2729
  const unregisterSequence = useCallback5((seq) => {
2780
2730
  setSequences((seqs) => seqs.filter((s) => s.id !== seq));
2781
2731
  }, []);
2782
- const sequenceContext = useMemo11(() => {
2732
+ const sequenceContext = useMemo12(() => {
2783
2733
  return {
2784
2734
  registerSequence,
2785
2735
  sequences,
2786
2736
  unregisterSequence
2787
2737
  };
2788
2738
  }, [registerSequence, sequences, unregisterSequence]);
2789
- const hiddenContext = useMemo11(() => {
2790
- return {
2791
- hidden,
2792
- setHidden
2793
- };
2794
- }, [hidden]);
2795
2739
  const getDragOverrides = useCallback5((nodePath) => {
2796
2740
  return dragOverrides[makeSequencePropsSubscriptionKey(nodePath)] ?? {};
2797
2741
  }, [dragOverrides]);
2798
2742
  const getEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
2799
2743
  return effectDragOverridesState[effectDragOverridesKey(nodePath, effectIndex)] ?? {};
2800
2744
  }, [effectDragOverridesState]);
2801
- const codeValuesContext = useMemo11(() => {
2745
+ const codeValuesContext = useMemo12(() => {
2802
2746
  return {
2803
2747
  codeValues
2804
2748
  };
2805
2749
  }, [codeValues]);
2806
- const dragOverridesContext = useMemo11(() => {
2750
+ const dragOverridesContext = useMemo12(() => {
2807
2751
  return {
2808
2752
  getDragOverrides,
2809
2753
  getEffectDragOverrides
2810
2754
  };
2811
2755
  }, [getDragOverrides, getEffectDragOverrides]);
2812
- const settersContext = useMemo11(() => {
2756
+ const settersContext = useMemo12(() => {
2813
2757
  return {
2814
2758
  setDragOverrides,
2815
2759
  clearDragOverrides,
@@ -2824,23 +2768,60 @@ var SequenceManagerProvider = ({ children }) => {
2824
2768
  clearEffectDragOverrides,
2825
2769
  setCodeValues
2826
2770
  ]);
2827
- return /* @__PURE__ */ jsx9(SequenceManager.Provider, {
2771
+ return /* @__PURE__ */ jsx10(SequenceManager.Provider, {
2828
2772
  value: sequenceContext,
2829
- children: /* @__PURE__ */ jsx9(SequenceVisibilityToggleContext.Provider, {
2830
- value: hiddenContext,
2831
- children: /* @__PURE__ */ jsx9(VisualModeCodeValuesContext.Provider, {
2832
- value: codeValuesContext,
2833
- children: /* @__PURE__ */ jsx9(VisualModeDragOverridesContext.Provider, {
2834
- value: dragOverridesContext,
2835
- children: /* @__PURE__ */ jsx9(VisualModeSettersContext.Provider, {
2836
- value: settersContext,
2837
- children
2838
- })
2773
+ children: /* @__PURE__ */ jsx10(VisualModeCodeValuesContext.Provider, {
2774
+ value: codeValuesContext,
2775
+ children: /* @__PURE__ */ jsx10(VisualModeDragOverridesContext.Provider, {
2776
+ value: dragOverridesContext,
2777
+ children: /* @__PURE__ */ jsx10(VisualModeSettersContext.Provider, {
2778
+ value: settersContext,
2779
+ children
2839
2780
  })
2840
2781
  })
2841
2782
  })
2842
2783
  });
2843
2784
  };
2785
+ var ENABLE_V5_BREAKING_CHANGES = false;
2786
+ var deleteNestedKey = (obj, keysToRemove) => {
2787
+ for (const key of keysToRemove) {
2788
+ const parts = key.split(".");
2789
+ const parents = [obj];
2790
+ let current = obj;
2791
+ for (let i = 0;i < parts.length - 1; i++) {
2792
+ const part = parts[i];
2793
+ const next = current[part];
2794
+ if (next === undefined || next === null) {
2795
+ current = null;
2796
+ break;
2797
+ }
2798
+ current = next;
2799
+ parents.push(current);
2800
+ }
2801
+ if (current === null) {
2802
+ continue;
2803
+ }
2804
+ delete current[parts[parts.length - 1]];
2805
+ for (let i = parents.length - 1;i > 0; i--) {
2806
+ const parent = parents[i];
2807
+ if (Object.keys(parent).length === 0) {
2808
+ const parentKey = parts[i - 1];
2809
+ delete parents[i - 1][parentKey];
2810
+ } else {
2811
+ break;
2812
+ }
2813
+ }
2814
+ }
2815
+ return obj;
2816
+ };
2817
+ var OverrideIdsToNodePathsGettersContext = createContext15({
2818
+ overrideIdToNodePathMappings: {}
2819
+ });
2820
+ var OverrideIdsToNodePathsSettersContext = createContext15({
2821
+ setOverrideIdToNodePath: () => {
2822
+ throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
2823
+ }
2824
+ });
2844
2825
  var mergeOverrides = ({
2845
2826
  descriptor,
2846
2827
  codeOverrides,
@@ -2884,7 +2865,7 @@ var extractCodeOverrides = (propStatus) => {
2884
2865
  return hasAny ? out : null;
2885
2866
  };
2886
2867
  var useMemoizedEffectDefinitions = (effects) => {
2887
- const previousRef = useRef6(null);
2868
+ const previousRef = useRef5(null);
2888
2869
  const definitions = effects.map((descriptor) => descriptor.definition);
2889
2870
  const previous = previousRef.current;
2890
2871
  const isSame = previous !== null && previous.length === definitions.length && previous.every((def, i) => def === definitions[i]);
@@ -2929,10 +2910,10 @@ var useMemoizedEffects = ({
2929
2910
  effects,
2930
2911
  overrideId
2931
2912
  }) => {
2932
- const previousRef = useRef6(null);
2933
- const { codeValues } = useContext12(VisualModeCodeValuesContext);
2934
- const { getEffectDragOverrides } = useContext12(VisualModeDragOverridesContext);
2935
- const { overrideIdToNodePathMappings } = useContext12(OverrideIdsToNodePathsGettersContext);
2913
+ const previousRef = useRef5(null);
2914
+ const { codeValues } = useContext15(VisualModeCodeValuesContext);
2915
+ const { getEffectDragOverrides } = useContext15(VisualModeDragOverridesContext);
2916
+ const { overrideIdToNodePathMappings } = useContext15(OverrideIdsToNodePathsGettersContext);
2936
2917
  const previous = previousRef.current;
2937
2918
  const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
2938
2919
  const resolved = effects.map((descriptor, index) => {
@@ -2971,264 +2952,6 @@ var useMemoizedEffects = ({
2971
2952
  previousRef.current = next;
2972
2953
  return next;
2973
2954
  };
2974
- var componentsToAddStacksTo = [];
2975
- var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2976
- var addSequenceStackTraces = (component) => {
2977
- componentsToAddStacksTo.push(component);
2978
- };
2979
- var VERSION = "4.0.462";
2980
- var checkMultipleRemotionVersions = () => {
2981
- if (typeof globalThis === "undefined") {
2982
- return;
2983
- }
2984
- const set = () => {
2985
- globalThis.remotion_imported = VERSION;
2986
- if (typeof window !== "undefined") {
2987
- window.remotion_imported = VERSION;
2988
- }
2989
- };
2990
- const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
2991
- if (alreadyImported) {
2992
- if (alreadyImported === VERSION) {
2993
- return;
2994
- }
2995
- if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
2996
- set();
2997
- return;
2998
- }
2999
- throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
3000
- VERSION,
3001
- typeof alreadyImported === "string" ? alreadyImported : "an older version"
3002
- ].filter(truthy).join(" and ")}. This will cause things to break in an unexpected way.
3003
- 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.`);
3004
- }
3005
- set();
3006
- };
3007
- var useUnsafeVideoConfig = () => {
3008
- const context = useContext13(SequenceContext);
3009
- const ctxWidth = context?.width ?? null;
3010
- const ctxHeight = context?.height ?? null;
3011
- const ctxDuration = context?.durationInFrames ?? null;
3012
- const video = useVideo();
3013
- return useMemo13(() => {
3014
- if (!video) {
3015
- return null;
3016
- }
3017
- const {
3018
- id,
3019
- durationInFrames,
3020
- fps,
3021
- height,
3022
- width,
3023
- defaultProps,
3024
- props,
3025
- defaultCodec,
3026
- defaultOutName,
3027
- defaultVideoImageFormat,
3028
- defaultPixelFormat,
3029
- defaultProResProfile,
3030
- defaultSampleRate
3031
- } = video;
3032
- return {
3033
- id,
3034
- width: ctxWidth ?? width,
3035
- height: ctxHeight ?? height,
3036
- fps,
3037
- durationInFrames: ctxDuration ?? durationInFrames,
3038
- defaultProps,
3039
- props,
3040
- defaultCodec,
3041
- defaultOutName,
3042
- defaultVideoImageFormat,
3043
- defaultPixelFormat,
3044
- defaultProResProfile,
3045
- defaultSampleRate
3046
- };
3047
- }, [ctxDuration, ctxHeight, ctxWidth, video]);
3048
- };
3049
- var useVideoConfig = () => {
3050
- const videoConfig = useUnsafeVideoConfig();
3051
- const context = useContext14(CanUseRemotionHooks);
3052
- const isPlayer = useIsPlayer();
3053
- if (!videoConfig) {
3054
- if (typeof window !== "undefined" && window.remotion_isPlayer || isPlayer) {
3055
- throw new Error([
3056
- "No video config found. Likely reasons:",
3057
- "- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.",
3058
- "- You have multiple versions of Remotion installed which causes the React context to get lost."
3059
- ].join("-"));
3060
- }
3061
- throw new Error("No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.");
3062
- }
3063
- if (!context) {
3064
- throw new Error("Called useVideoConfig() outside a Remotion composition.");
3065
- }
3066
- return videoConfig;
3067
- };
3068
- var Freeze = ({
3069
- frame: frameToFreeze,
3070
- children,
3071
- active = true
3072
- }) => {
3073
- const frame = useCurrentFrame();
3074
- const videoConfig = useVideoConfig();
3075
- if (typeof frameToFreeze === "undefined") {
3076
- throw new Error(`The <Freeze /> component requires a 'frame' prop, but none was passed.`);
3077
- }
3078
- if (typeof frameToFreeze !== "number") {
3079
- throw new Error(`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof frameToFreeze}`);
3080
- }
3081
- if (Number.isNaN(frameToFreeze)) {
3082
- throw new Error(`The 'frame' prop of <Freeze /> must be a real number, but it is NaN.`);
3083
- }
3084
- if (!Number.isFinite(frameToFreeze)) {
3085
- throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);
3086
- }
3087
- const isActive = useMemo14(() => {
3088
- if (typeof active === "boolean") {
3089
- return active;
3090
- }
3091
- if (typeof active === "function") {
3092
- return active(frame);
3093
- }
3094
- }, [active, frame]);
3095
- const timelineContext = useTimelineContext();
3096
- const sequenceContext = useContext15(SequenceContext);
3097
- const relativeFrom = sequenceContext?.relativeFrom ?? 0;
3098
- const timelineValue = useMemo14(() => {
3099
- if (!isActive) {
3100
- return timelineContext;
3101
- }
3102
- return {
3103
- ...timelineContext,
3104
- playing: false,
3105
- imperativePlaying: {
3106
- current: false
3107
- },
3108
- frame: {
3109
- [videoConfig.id]: frameToFreeze + relativeFrom
3110
- }
3111
- };
3112
- }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
3113
- const newSequenceContext = useMemo14(() => {
3114
- if (!sequenceContext) {
3115
- return null;
3116
- }
3117
- if (!isActive) {
3118
- return sequenceContext;
3119
- }
3120
- return {
3121
- ...sequenceContext,
3122
- cumulatedFrom: 0
3123
- };
3124
- }, [sequenceContext, isActive]);
3125
- return /* @__PURE__ */ jsx11(TimelineContext.Provider, {
3126
- value: timelineValue,
3127
- children: /* @__PURE__ */ jsx11(SequenceContext.Provider, {
3128
- value: newSequenceContext,
3129
- children
3130
- })
3131
- });
3132
- };
3133
- var PremountContext = createContext15({
3134
- premountFramesRemaining: 0
3135
- });
3136
- var sequenceStyleSchema = {
3137
- "style.translate": {
3138
- type: "translate",
3139
- step: 1,
3140
- default: "0px 0px",
3141
- description: "Offset"
3142
- },
3143
- "style.scale": {
3144
- type: "number",
3145
- min: 0.05,
3146
- max: 100,
3147
- step: 0.01,
3148
- default: 1,
3149
- description: "Scale"
3150
- },
3151
- "style.rotate": {
3152
- type: "rotation",
3153
- step: 1,
3154
- default: "0deg",
3155
- description: "Rotation"
3156
- },
3157
- "style.opacity": {
3158
- type: "number",
3159
- min: 0,
3160
- max: 1,
3161
- step: 0.01,
3162
- default: 1,
3163
- description: "Opacity"
3164
- },
3165
- premountFor: {
3166
- type: "number",
3167
- default: 0,
3168
- description: "Premount For",
3169
- min: 0,
3170
- step: 1
3171
- },
3172
- postmountFor: {
3173
- type: "hidden"
3174
- },
3175
- styleWhilePremounted: {
3176
- type: "hidden"
3177
- },
3178
- styleWhilePostmounted: {
3179
- type: "hidden"
3180
- }
3181
- };
3182
- var sequenceSchema = {
3183
- layout: {
3184
- type: "enum",
3185
- default: "absolute-fill",
3186
- description: "Layout",
3187
- variants: {
3188
- "absolute-fill": sequenceStyleSchema,
3189
- none: {}
3190
- }
3191
- }
3192
- };
3193
- var sequenceSchemaDefaultLayoutNone = {
3194
- ...sequenceSchema,
3195
- layout: {
3196
- ...sequenceSchema.layout,
3197
- default: "none"
3198
- }
3199
- };
3200
- var ENABLE_V5_BREAKING_CHANGES = false;
3201
- var deleteNestedKey = (obj, keysToRemove) => {
3202
- for (const key of keysToRemove) {
3203
- const parts = key.split(".");
3204
- const parents = [obj];
3205
- let current = obj;
3206
- for (let i = 0;i < parts.length - 1; i++) {
3207
- const part = parts[i];
3208
- const next = current[part];
3209
- if (next === undefined || next === null) {
3210
- current = null;
3211
- break;
3212
- }
3213
- current = next;
3214
- parents.push(current);
3215
- }
3216
- if (current === null) {
3217
- continue;
3218
- }
3219
- delete current[parts[parts.length - 1]];
3220
- for (let i = parents.length - 1;i > 0; i--) {
3221
- const parent = parents[i];
3222
- if (Object.keys(parent).length === 0) {
3223
- const parentKey = parts[i - 1];
3224
- delete parents[i - 1][parentKey];
3225
- } else {
3226
- break;
3227
- }
3228
- }
3229
- }
3230
- return obj;
3231
- };
3232
2955
  var flattenActiveSchema = (schema, resolve) => {
3233
2956
  const out = {};
3234
2957
  for (const key of Object.keys(schema)) {
@@ -3426,7 +3149,7 @@ var wrapInSchema = (Component, schema) => {
3426
3149
  const Wrapped = forwardRef2((props, ref) => {
3427
3150
  const env = useRemotionEnvironment();
3428
3151
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
3429
- return React13.createElement(Component, {
3152
+ return React12.createElement(Component, {
3430
3153
  ...props,
3431
3154
  _experimentalControls: null,
3432
3155
  ref
@@ -3436,12 +3159,12 @@ var wrapInSchema = (Component, schema) => {
3436
3159
  const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
3437
3160
  const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
3438
3161
  if (props._experimentalControls) {
3439
- return React13.createElement(Component, {
3162
+ return React12.createElement(Component, {
3440
3163
  ...props,
3441
3164
  ref
3442
3165
  });
3443
3166
  }
3444
- const [overrideId] = useState5(() => {
3167
+ const [overrideId] = useState4(() => {
3445
3168
  const { stack } = props;
3446
3169
  if (!stack) {
3447
3170
  return String(Math.random());
@@ -3456,15 +3179,15 @@ var wrapInSchema = (Component, schema) => {
3456
3179
  });
3457
3180
  const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
3458
3181
  const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
3459
- const currentRuntimeValueDotNotation = useMemo15(() => readValuesFromProps(props, flatKeys), runtimeValues);
3460
- const controls = useMemo15(() => {
3182
+ const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
3183
+ const controls = useMemo13(() => {
3461
3184
  return {
3462
3185
  schema,
3463
3186
  currentRuntimeValueDotNotation,
3464
3187
  overrideId
3465
3188
  };
3466
3189
  }, [currentRuntimeValueDotNotation, overrideId]);
3467
- const { merged: valuesDotNotation, propsToDelete } = useMemo15(() => {
3190
+ const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
3468
3191
  return computeEffectiveSchemaValuesDotNotation({
3469
3192
  schema,
3470
3193
  currentValue: currentRuntimeValueDotNotation,
@@ -3484,7 +3207,7 @@ var wrapInSchema = (Component, schema) => {
3484
3207
  schemaKeys: activeKeys,
3485
3208
  propsToDelete
3486
3209
  });
3487
- return React13.createElement(Component, {
3210
+ return React12.createElement(Component, {
3488
3211
  ...mergedProps,
3489
3212
  _experimentalControls: controls,
3490
3213
  ref
@@ -3501,6 +3224,7 @@ var RegularSequenceRefForwardingFunction = ({
3501
3224
  height,
3502
3225
  width,
3503
3226
  showInTimeline = true,
3227
+ hidden = false,
3504
3228
  _experimentalControls: controls,
3505
3229
  _experimentalEffects,
3506
3230
  _remotionInternalLoopDisplay: loopDisplay,
@@ -3511,7 +3235,7 @@ var RegularSequenceRefForwardingFunction = ({
3511
3235
  ...other
3512
3236
  }, ref) => {
3513
3237
  const { layout = "absolute-fill" } = other;
3514
- const [id] = useState6(() => String(Math.random()));
3238
+ const [id] = useState5(() => String(Math.random()));
3515
3239
  const parentSequence = useContext17(SequenceContext);
3516
3240
  const { rootId } = useTimelineContext();
3517
3241
  const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
@@ -3539,14 +3263,13 @@ var RegularSequenceRefForwardingFunction = ({
3539
3263
  const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
3540
3264
  const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
3541
3265
  const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
3542
- const { hidden } = useContext17(SequenceVisibilityToggleContext);
3543
- const premounting = useMemo16(() => {
3266
+ const premounting = useMemo14(() => {
3544
3267
  return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
3545
3268
  }, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
3546
- const postmounting = useMemo16(() => {
3269
+ const postmounting = useMemo14(() => {
3547
3270
  return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
3548
3271
  }, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
3549
- const contextValue = useMemo16(() => {
3272
+ const contextValue = useMemo14(() => {
3550
3273
  return {
3551
3274
  cumulatedFrom,
3552
3275
  relativeFrom: from,
@@ -3573,12 +3296,13 @@ var RegularSequenceRefForwardingFunction = ({
3573
3296
  premountDisplay,
3574
3297
  postmountDisplay
3575
3298
  ]);
3576
- const timelineClipName = useMemo16(() => {
3299
+ const timelineClipName = useMemo14(() => {
3577
3300
  return name ?? "";
3578
3301
  }, [name]);
3579
3302
  const env = useRemotionEnvironment();
3580
3303
  const inheritedStack = other?.stack ?? null;
3581
- useEffect5(() => {
3304
+ const [stackDoesntChange] = useState5(() => stack ?? inheritedStack);
3305
+ useEffect3(() => {
3582
3306
  if (!env.isStudio) {
3583
3307
  return;
3584
3308
  }
@@ -3601,7 +3325,7 @@ var RegularSequenceRefForwardingFunction = ({
3601
3325
  rootId,
3602
3326
  showInTimeline,
3603
3327
  src: isMedia.data.src,
3604
- stack: stack ?? inheritedStack,
3328
+ stack: stackDoesntChange,
3605
3329
  startMediaFrom: isMedia.data.startMediaFrom,
3606
3330
  volume: isMedia.data.volumes
3607
3331
  });
@@ -3620,7 +3344,7 @@ var RegularSequenceRefForwardingFunction = ({
3620
3344
  showInTimeline,
3621
3345
  nonce: nonce.get(),
3622
3346
  loopDisplay,
3623
- stack: stack ?? inheritedStack,
3347
+ stack: stackDoesntChange,
3624
3348
  premountDisplay: premountDisplay ?? null,
3625
3349
  postmountDisplay: postmountDisplay ?? null,
3626
3350
  controls: controls ?? null,
@@ -3643,11 +3367,10 @@ var RegularSequenceRefForwardingFunction = ({
3643
3367
  showInTimeline,
3644
3368
  nonce,
3645
3369
  loopDisplay,
3646
- stack,
3370
+ stackDoesntChange,
3647
3371
  premountDisplay,
3648
3372
  postmountDisplay,
3649
3373
  env.isStudio,
3650
- inheritedStack,
3651
3374
  controls,
3652
3375
  _experimentalEffects,
3653
3376
  isMedia
@@ -3655,7 +3378,7 @@ var RegularSequenceRefForwardingFunction = ({
3655
3378
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
3656
3379
  const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
3657
3380
  const styleIfThere = other.layout === "none" ? undefined : other.style;
3658
- const defaultStyle = useMemo16(() => {
3381
+ const defaultStyle = useMemo14(() => {
3659
3382
  return {
3660
3383
  flexDirection: undefined,
3661
3384
  ...width ? { width } : {},
@@ -3666,13 +3389,12 @@ var RegularSequenceRefForwardingFunction = ({
3666
3389
  if (ref !== null && layout === "none") {
3667
3390
  throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
3668
3391
  }
3669
- const isSequenceHidden = hidden[id] ?? false;
3670
- if (isSequenceHidden) {
3392
+ if (hidden) {
3671
3393
  return null;
3672
3394
  }
3673
- return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
3395
+ return /* @__PURE__ */ jsx11(SequenceContext.Provider, {
3674
3396
  value: contextValue,
3675
- children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx12(AbsoluteFill, {
3397
+ children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx11(AbsoluteFill, {
3676
3398
  ref,
3677
3399
  style: defaultStyle,
3678
3400
  className: other.className,
@@ -3702,7 +3424,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
3702
3424
  const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
3703
3425
  const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
3704
3426
  const isFreezingActive = premountingActive || postmountingActive;
3705
- const style = useMemo16(() => {
3427
+ const style = useMemo14(() => {
3706
3428
  return {
3707
3429
  ...passedStyle,
3708
3430
  opacity: premountingActive || postmountingActive ? 0 : 1,
@@ -3717,10 +3439,10 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
3717
3439
  styleWhilePremounted,
3718
3440
  styleWhilePostmounted
3719
3441
  ]);
3720
- return /* @__PURE__ */ jsx12(Freeze, {
3442
+ return /* @__PURE__ */ jsx11(Freeze, {
3721
3443
  frame: freezeFrame,
3722
3444
  active: isFreezingActive,
3723
- children: /* @__PURE__ */ jsx12(SequenceInner, {
3445
+ children: /* @__PURE__ */ jsx11(SequenceInner, {
3724
3446
  ref,
3725
3447
  from,
3726
3448
  durationInFrames,
@@ -3740,20 +3462,437 @@ var SequenceRefForwardingFunction = (props, ref) => {
3740
3462
  if (props.layout !== "none" && !env.isRendering) {
3741
3463
  const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? props.premountFor ?? fps : props.premountFor;
3742
3464
  if (effectivePremountFor || props.postmountFor) {
3743
- return /* @__PURE__ */ jsx12(PremountedPostmountedSequence, {
3465
+ return /* @__PURE__ */ jsx11(PremountedPostmountedSequence, {
3744
3466
  ref,
3745
3467
  ...props,
3746
3468
  premountFor: effectivePremountFor
3747
3469
  });
3748
3470
  }
3749
3471
  }
3750
- return /* @__PURE__ */ jsx12(RegularSequence, {
3472
+ return /* @__PURE__ */ jsx11(RegularSequence, {
3751
3473
  ...props,
3752
3474
  ref
3753
3475
  });
3754
3476
  };
3755
3477
  var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
3756
3478
  var Sequence = wrapInSchema(SequenceInner, sequenceSchema);
3479
+
3480
+ class CanvasPool {
3481
+ width;
3482
+ height;
3483
+ pairs = new Map;
3484
+ lostContexts = new Set;
3485
+ constructor(width, height) {
3486
+ this.width = width;
3487
+ this.height = height;
3488
+ }
3489
+ getPair(backend) {
3490
+ const existing = this.pairs.get(backend);
3491
+ if (existing) {
3492
+ return existing;
3493
+ }
3494
+ const pair = [
3495
+ this.allocateCanvas(backend),
3496
+ this.allocateCanvas(backend)
3497
+ ];
3498
+ this.pairs.set(backend, pair);
3499
+ return pair;
3500
+ }
3501
+ assertContextNotLost(canvas) {
3502
+ if (this.lostContexts.has(canvas)) {
3503
+ 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.");
3504
+ }
3505
+ }
3506
+ allocateCanvas(backend) {
3507
+ const canvas = document.createElement("canvas");
3508
+ canvas.width = this.width;
3509
+ canvas.height = this.height;
3510
+ switch (backend) {
3511
+ case "2d": {
3512
+ const ctx = canvas.getContext("2d", {
3513
+ colorSpace: "srgb"
3514
+ });
3515
+ if (!ctx) {
3516
+ throw new Error("Failed to acquire 2D context for canvas effect");
3517
+ }
3518
+ return canvas;
3519
+ }
3520
+ case "webgl2": {
3521
+ const ctx = canvas.getContext("webgl2", {
3522
+ premultipliedAlpha: true,
3523
+ alpha: true,
3524
+ preserveDrawingBuffer: true
3525
+ });
3526
+ if (!ctx) {
3527
+ throw new Error("Failed to acquire WebGL2 context for canvas effect");
3528
+ }
3529
+ canvas.addEventListener("webglcontextlost", (e) => {
3530
+ e.preventDefault();
3531
+ this.lostContexts.add(canvas);
3532
+ });
3533
+ canvas.addEventListener("webglcontextrestored", () => {
3534
+ this.lostContexts.delete(canvas);
3535
+ });
3536
+ ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
3537
+ return canvas;
3538
+ }
3539
+ case "webgpu": {
3540
+ if (typeof navigator === "undefined" || !("gpu" in navigator)) {
3541
+ throw new Error("WebGPU is not available in this environment for canvas effect");
3542
+ }
3543
+ return canvas;
3544
+ }
3545
+ default: {
3546
+ const exhaustive = backend;
3547
+ throw new Error(`Unknown effect backend: ${exhaustive}`);
3548
+ }
3549
+ }
3550
+ }
3551
+ }
3552
+ var groupByBackend = (effects) => {
3553
+ const runs = [];
3554
+ let current = [];
3555
+ let currentBackend = null;
3556
+ for (const eff of effects) {
3557
+ const { backend } = eff.definition;
3558
+ if (currentBackend === null || backend === currentBackend) {
3559
+ current.push(eff);
3560
+ currentBackend = backend;
3561
+ } else {
3562
+ runs.push({ backend: currentBackend, effects: current });
3563
+ current = [eff];
3564
+ currentBackend = backend;
3565
+ }
3566
+ }
3567
+ if (currentBackend !== null && current.length > 0) {
3568
+ runs.push({ backend: currentBackend, effects: current });
3569
+ }
3570
+ return runs;
3571
+ };
3572
+ var devicePromise = null;
3573
+ var getGpuDevice = () => {
3574
+ if (devicePromise) {
3575
+ return devicePromise;
3576
+ }
3577
+ devicePromise = (async () => {
3578
+ if (typeof navigator === "undefined" || !("gpu" in navigator)) {
3579
+ throw new Error("WebGPU is not available in this environment");
3580
+ }
3581
+ const { gpu } = navigator;
3582
+ const adapter = await gpu.requestAdapter();
3583
+ if (!adapter) {
3584
+ throw new Error("No WebGPU adapter available");
3585
+ }
3586
+ return adapter.requestDevice();
3587
+ })();
3588
+ return devicePromise;
3589
+ };
3590
+ var createEffectChainState = (width, height) => ({
3591
+ pool: new CanvasPool(width, height),
3592
+ setupCache: new WeakMap,
3593
+ cleanupRegistry: [],
3594
+ currentRunId: 0
3595
+ });
3596
+ var cleanupEffectChainState = (state) => {
3597
+ state.currentRunId++;
3598
+ for (const entry of state.cleanupRegistry) {
3599
+ entry.definition.cleanup(entry.state);
3600
+ }
3601
+ };
3602
+ var ensureSetup = (state, def, target) => {
3603
+ const widened = def;
3604
+ if (state.setupCache.has(widened)) {
3605
+ return state.setupCache.get(widened);
3606
+ }
3607
+ const setupState = def.setup(target);
3608
+ state.setupCache.set(widened, setupState);
3609
+ state.cleanupRegistry.push({ definition: widened, state: setupState });
3610
+ return setupState;
3611
+ };
3612
+ var runEffectChain = async ({
3613
+ state,
3614
+ source,
3615
+ effects,
3616
+ output,
3617
+ width,
3618
+ height
3619
+ }) => {
3620
+ const runId = ++state.currentRunId;
3621
+ const isCancelled = () => state.currentRunId !== runId;
3622
+ const enabledEffects = effects.filter((e) => !e.params.disabled);
3623
+ const runs = groupByBackend(enabledEffects);
3624
+ let currentImage = source;
3625
+ let lastTarget = null;
3626
+ if (runs.length === 0) {
3627
+ if (source === output) {
3628
+ return true;
3629
+ }
3630
+ const ctx = output.getContext("2d");
3631
+ if (!ctx) {
3632
+ throw new Error("Failed to acquire 2D context for output canvas");
3633
+ }
3634
+ ctx.clearRect(0, 0, width, height);
3635
+ ctx.drawImage(currentImage, 0, 0, width, height);
3636
+ return true;
3637
+ }
3638
+ let needsGpuDevice = false;
3639
+ for (const run of runs) {
3640
+ if (run.backend === "webgpu") {
3641
+ needsGpuDevice = true;
3642
+ break;
3643
+ }
3644
+ }
3645
+ const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
3646
+ if (isCancelled()) {
3647
+ return false;
3648
+ }
3649
+ for (let runIndex = 0;runIndex < runs.length; runIndex++) {
3650
+ const run = runs[runIndex];
3651
+ const [a, b] = state.pool.getPair(run.backend);
3652
+ let dst = a;
3653
+ for (const eff of run.effects) {
3654
+ const def = eff.definition;
3655
+ const setupState = ensureSetup(state, def, dst);
3656
+ def.apply({
3657
+ source: currentImage,
3658
+ target: dst,
3659
+ state: setupState,
3660
+ params: eff.params,
3661
+ width,
3662
+ height,
3663
+ gpuDevice
3664
+ });
3665
+ if (run.backend === "webgl2") {
3666
+ state.pool.assertContextNotLost(dst);
3667
+ }
3668
+ currentImage = dst;
3669
+ dst = dst === a ? b : a;
3670
+ }
3671
+ lastTarget = currentImage ?? lastTarget;
3672
+ const nextRun = runs[runIndex + 1];
3673
+ if (nextRun && nextRun.backend !== run.backend && lastTarget) {
3674
+ const bitmap = await createImageBitmap(lastTarget);
3675
+ if (isCancelled()) {
3676
+ bitmap.close();
3677
+ return false;
3678
+ }
3679
+ currentImage = bitmap;
3680
+ }
3681
+ }
3682
+ if (!lastTarget) {
3683
+ return true;
3684
+ }
3685
+ const outCtx = output.getContext("2d");
3686
+ if (!outCtx) {
3687
+ throw new Error("Failed to acquire 2D context for output canvas");
3688
+ }
3689
+ outCtx.clearRect(0, 0, width, height);
3690
+ outCtx.drawImage(lastTarget, 0, 0, width, height);
3691
+ return true;
3692
+ };
3693
+ var useEffectChainState = () => {
3694
+ const chainStateRef = useRef6(null);
3695
+ const sizeRef = useRef6(null);
3696
+ useEffect4(() => {
3697
+ return () => {
3698
+ if (chainStateRef.current) {
3699
+ cleanupEffectChainState(chainStateRef.current);
3700
+ }
3701
+ };
3702
+ }, []);
3703
+ return useMemo15(() => ({
3704
+ get: (width, height) => {
3705
+ if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
3706
+ if (chainStateRef.current) {
3707
+ cleanupEffectChainState(chainStateRef.current);
3708
+ }
3709
+ chainStateRef.current = createEffectChainState(width, height);
3710
+ sizeRef.current = { width, height };
3711
+ }
3712
+ return chainStateRef.current;
3713
+ }
3714
+ }), []);
3715
+ };
3716
+ var solidSchema = {
3717
+ color: {
3718
+ type: "color",
3719
+ default: "#ffffff",
3720
+ description: "Color"
3721
+ },
3722
+ width: {
3723
+ type: "number",
3724
+ min: 1,
3725
+ step: 1,
3726
+ default: 1920,
3727
+ description: "Width"
3728
+ },
3729
+ height: {
3730
+ type: "number",
3731
+ min: 1,
3732
+ step: 1,
3733
+ default: 1080,
3734
+ description: "Height"
3735
+ },
3736
+ ...sequenceStyleSchema
3737
+ };
3738
+ var SolidInner = ({
3739
+ color,
3740
+ width,
3741
+ height,
3742
+ _experimentalEffects: experimentalEffects = [],
3743
+ className,
3744
+ style,
3745
+ overrideId,
3746
+ ref
3747
+ }) => {
3748
+ const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
3749
+ const [outputCanvas, setOutputCanvas] = useState6(null);
3750
+ const memoizedEffects = useMemoizedEffects({
3751
+ effects: experimentalEffects,
3752
+ overrideId: overrideId ?? null
3753
+ });
3754
+ const sourceCanvas = useMemo16(() => {
3755
+ if (typeof document === "undefined") {
3756
+ return null;
3757
+ }
3758
+ const canvas = document.createElement("canvas");
3759
+ canvas.width = 1;
3760
+ canvas.height = 1;
3761
+ return canvas;
3762
+ }, []);
3763
+ const chainState = useEffectChainState();
3764
+ const canvasRef = useCallback6((canvas) => {
3765
+ setOutputCanvas(canvas);
3766
+ if (typeof ref === "function") {
3767
+ ref(canvas);
3768
+ } else if (ref) {
3769
+ ref.current = canvas;
3770
+ }
3771
+ }, [ref]);
3772
+ useEffect5(() => {
3773
+ if (!outputCanvas || !sourceCanvas) {
3774
+ return;
3775
+ }
3776
+ const handle = delayRender2("Solid effect chain");
3777
+ if (!chainState) {
3778
+ continueRender2(handle);
3779
+ return () => {
3780
+ continueRender2(handle);
3781
+ };
3782
+ }
3783
+ const ctx = sourceCanvas.getContext("2d", { colorSpace: "srgb" });
3784
+ if (!ctx) {
3785
+ cancelRender2(new Error("Failed to acquire 2D context for <Solid> source"));
3786
+ return;
3787
+ }
3788
+ ctx.fillStyle = color;
3789
+ ctx.fillRect(0, 0, 1, 1);
3790
+ runEffectChain({
3791
+ state: chainState.get(width, height),
3792
+ source: sourceCanvas,
3793
+ effects: memoizedEffects,
3794
+ output: outputCanvas,
3795
+ width,
3796
+ height
3797
+ }).then((completed) => {
3798
+ if (completed) {
3799
+ continueRender2(handle);
3800
+ }
3801
+ }).catch((err) => {
3802
+ cancelRender2(err);
3803
+ });
3804
+ return () => {
3805
+ continueRender2(handle);
3806
+ };
3807
+ }, [
3808
+ color,
3809
+ outputCanvas,
3810
+ sourceCanvas,
3811
+ chainState,
3812
+ width,
3813
+ height,
3814
+ delayRender2,
3815
+ continueRender2,
3816
+ cancelRender2,
3817
+ memoizedEffects
3818
+ ]);
3819
+ return /* @__PURE__ */ jsx12("canvas", {
3820
+ ref: canvasRef,
3821
+ width,
3822
+ height,
3823
+ className,
3824
+ style
3825
+ });
3826
+ };
3827
+ var SolidOuter = forwardRef4(({
3828
+ _experimentalEffects = [],
3829
+ _experimentalControls: controls,
3830
+ color,
3831
+ height,
3832
+ width,
3833
+ className,
3834
+ durationInFrames,
3835
+ style,
3836
+ name,
3837
+ from,
3838
+ hidden,
3839
+ showInTimeline,
3840
+ ...props
3841
+ }, ref) => {
3842
+ const memoizedEffectDefinitions = useMemoizedEffectDefinitions(_experimentalEffects);
3843
+ return /* @__PURE__ */ jsx12(Sequence, {
3844
+ layout: "none",
3845
+ from,
3846
+ hidden,
3847
+ showInTimeline,
3848
+ _experimentalControls: controls,
3849
+ _experimentalEffects: memoizedEffectDefinitions,
3850
+ durationInFrames,
3851
+ name: name ?? "<Solid>",
3852
+ ...props,
3853
+ children: /* @__PURE__ */ jsx12(SolidInner, {
3854
+ ref,
3855
+ overrideId: controls?.overrideId ?? null,
3856
+ color,
3857
+ height,
3858
+ width,
3859
+ className,
3860
+ style,
3861
+ _experimentalEffects
3862
+ })
3863
+ });
3864
+ });
3865
+ var Solid = wrapInSchema(SolidOuter, solidSchema);
3866
+ Solid.displayName = "Solid";
3867
+ addSequenceStackTraces(Solid);
3868
+ var VERSION = "4.0.463";
3869
+ var checkMultipleRemotionVersions = () => {
3870
+ if (typeof globalThis === "undefined") {
3871
+ return;
3872
+ }
3873
+ const set = () => {
3874
+ globalThis.remotion_imported = VERSION;
3875
+ if (typeof window !== "undefined") {
3876
+ window.remotion_imported = VERSION;
3877
+ }
3878
+ };
3879
+ const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
3880
+ if (alreadyImported) {
3881
+ if (alreadyImported === VERSION) {
3882
+ return;
3883
+ }
3884
+ if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
3885
+ set();
3886
+ return;
3887
+ }
3888
+ throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
3889
+ VERSION,
3890
+ typeof alreadyImported === "string" ? alreadyImported : "an older version"
3891
+ ].filter(truthy).join(" and ")}. This will cause things to break in an unexpected way.
3892
+ 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.`);
3893
+ }
3894
+ set();
3895
+ };
3757
3896
  var calcArgs = (fit, frameSize, canvasSize) => {
3758
3897
  switch (fit) {
3759
3898
  case "fill": {
@@ -3804,7 +3943,7 @@ var calcArgs = (fit, frameSize, canvasSize) => {
3804
3943
  };
3805
3944
  var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref) => {
3806
3945
  const canvasRef = useRef7(null);
3807
- const draw = useCallback6((imageData) => {
3946
+ const draw = useCallback7((imageData) => {
3808
3947
  const canvas = canvasRef.current;
3809
3948
  const canvasWidth = width ?? imageData.displayWidth;
3810
3949
  const canvasHeight = height ?? imageData.displayHeight;
@@ -3996,7 +4135,19 @@ var resolveAnimatedImageSource = (src) => {
3996
4135
  }
3997
4136
  return new URL(src, window.origin).href;
3998
4137
  };
3999
- var AnimatedImage = forwardRef4(({
4138
+ var animatedImageSchema = {
4139
+ playbackRate: {
4140
+ type: "number",
4141
+ min: 0,
4142
+ max: 10,
4143
+ step: 0.1,
4144
+ default: 1,
4145
+ description: "Playback Rate"
4146
+ },
4147
+ ...sequenceStyleSchema,
4148
+ hidden: hiddenField
4149
+ };
4150
+ var AnimatedImageContent = forwardRef5(({
4000
4151
  src,
4001
4152
  width,
4002
4153
  height,
@@ -4103,6 +4254,52 @@ var AnimatedImage = forwardRef4(({
4103
4254
  ...props
4104
4255
  });
4105
4256
  });
4257
+ AnimatedImageContent.displayName = "AnimatedImageContent";
4258
+ var AnimatedImageInner = ({
4259
+ src,
4260
+ width,
4261
+ height,
4262
+ onError,
4263
+ fit,
4264
+ playbackRate,
4265
+ loopBehavior,
4266
+ id,
4267
+ className,
4268
+ style,
4269
+ durationInFrames,
4270
+ _experimentalControls: controls,
4271
+ ref,
4272
+ ...sequenceProps
4273
+ }) => {
4274
+ const { durationInFrames: videoDuration } = useVideoConfig();
4275
+ const resolvedDuration = durationInFrames ?? videoDuration;
4276
+ const animatedImageProps = {
4277
+ src,
4278
+ width,
4279
+ height,
4280
+ onError,
4281
+ fit,
4282
+ playbackRate,
4283
+ loopBehavior,
4284
+ id,
4285
+ className,
4286
+ style
4287
+ };
4288
+ return /* @__PURE__ */ jsx14(Sequence, {
4289
+ layout: "none",
4290
+ durationInFrames: resolvedDuration,
4291
+ name: "<AnimatedImage>",
4292
+ _experimentalControls: controls,
4293
+ ...sequenceProps,
4294
+ children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
4295
+ ...animatedImageProps,
4296
+ ref
4297
+ })
4298
+ });
4299
+ };
4300
+ var AnimatedImage = wrapInSchema(AnimatedImageInner, animatedImageSchema);
4301
+ AnimatedImage.displayName = "AnimatedImage";
4302
+ addSequenceStackTraces(AnimatedImage);
4106
4303
  var cachedSupport = null;
4107
4304
  var isHtmlInCanvasSupported = () => {
4108
4305
  if (cachedSupport !== null) {
@@ -4142,30 +4339,16 @@ var defaultOnPaint = ({
4142
4339
  element.style.transform = transform.toString();
4143
4340
  };
4144
4341
  var HtmlInCanvasAncestorContext = createContext16(false);
4145
- var HtmlInCanvasInner = forwardRef5(({
4146
- width,
4147
- height,
4148
- _experimentalEffects: effects = [],
4149
- children,
4150
- onPaint,
4151
- onInit,
4152
- _experimentalControls: controls,
4153
- style,
4154
- durationInFrames,
4155
- ...sequenceProps
4156
- }, ref) => {
4342
+ var HtmlInCanvasContent = forwardRef6(({ width, height, effects, children, onPaint, onInit, controls, style }, ref) => {
4157
4343
  const isInsideAncestorHtmlInCanvas = useContext18(HtmlInCanvasAncestorContext);
4158
4344
  assertHtmlInCanvasDimensions(width, height);
4159
4345
  const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
4160
4346
  if (!isHtmlInCanvasSupported()) {
4161
4347
  cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
4162
4348
  }
4163
- const { durationInFrames: videoDuration } = useVideoConfig();
4164
- const resolvedDuration = durationInFrames ?? videoDuration;
4165
- const frame = useCurrentFrame();
4166
4349
  const canvas2dRef = useRef9(null);
4167
4350
  const divRef = useRef9(null);
4168
- const setLayoutCanvasRef = useCallback7((node) => {
4351
+ const setLayoutCanvasRef = useCallback8((node) => {
4169
4352
  canvas2dRef.current = node;
4170
4353
  if (typeof ref === "function") {
4171
4354
  ref(node);
@@ -4179,11 +4362,8 @@ var HtmlInCanvasInner = forwardRef5(({
4179
4362
  effects,
4180
4363
  overrideId: controls?.overrideId ?? null
4181
4364
  });
4182
- const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
4183
4365
  const effectsRef = useRef9(memoizedEffects);
4184
4366
  effectsRef.current = memoizedEffects;
4185
- const frameRef = useRef9(frame);
4186
- frameRef.current = frame;
4187
4367
  const onPaintRef = useRef9(onPaint);
4188
4368
  onPaintRef.current = onPaint;
4189
4369
  const onInitRef = useRef9(onInit);
@@ -4191,7 +4371,7 @@ var HtmlInCanvasInner = forwardRef5(({
4191
4371
  const initializedRef = useRef9(false);
4192
4372
  const onInitCleanupRef = useRef9(null);
4193
4373
  const unmountedRef = useRef9(false);
4194
- const onPaintCb = useCallback7(async () => {
4374
+ const onPaintCb = useCallback8(async () => {
4195
4375
  const element = divRef.current;
4196
4376
  if (!element) {
4197
4377
  throw new Error("Canvas or scene element not found");
@@ -4240,7 +4420,6 @@ var HtmlInCanvasInner = forwardRef5(({
4240
4420
  source: offscreenCanvas,
4241
4421
  effects: effectsRef.current,
4242
4422
  output: canvas2dRef.current,
4243
- frame: frameRef.current,
4244
4423
  width,
4245
4424
  height
4246
4425
  });
@@ -4304,31 +4483,64 @@ var HtmlInCanvasInner = forwardRef5(({
4304
4483
  if (isInsideAncestorHtmlInCanvas) {
4305
4484
  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.");
4306
4485
  }
4486
+ return /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
4487
+ value: true,
4488
+ children: /* @__PURE__ */ jsx15("canvas", {
4489
+ ref: setLayoutCanvasRef,
4490
+ width,
4491
+ height,
4492
+ style,
4493
+ children: /* @__PURE__ */ jsx15("div", {
4494
+ ref: divRef,
4495
+ style: innerStyle,
4496
+ children
4497
+ })
4498
+ })
4499
+ });
4500
+ });
4501
+ HtmlInCanvasContent.displayName = "HtmlInCanvasContent";
4502
+ var HtmlInCanvasInner = forwardRef6(({
4503
+ width,
4504
+ height,
4505
+ _experimentalEffects: effects = [],
4506
+ children,
4507
+ onPaint,
4508
+ onInit,
4509
+ _experimentalControls: controls,
4510
+ style,
4511
+ durationInFrames,
4512
+ name,
4513
+ ...sequenceProps
4514
+ }, ref) => {
4515
+ const { durationInFrames: videoDuration } = useVideoConfig();
4516
+ const resolvedDuration = durationInFrames ?? videoDuration;
4517
+ const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
4307
4518
  return /* @__PURE__ */ jsx15(Sequence, {
4308
4519
  durationInFrames: resolvedDuration,
4309
- name: "<HtmlInCanvas>",
4520
+ name: name ?? "<HtmlInCanvas>",
4310
4521
  _experimentalControls: controls,
4311
4522
  _experimentalEffects: memoizedEffectDefinitions,
4312
4523
  layout: "none",
4313
4524
  ...sequenceProps,
4314
- children: /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
4315
- value: true,
4316
- children: /* @__PURE__ */ jsx15("canvas", {
4317
- ref: setLayoutCanvasRef,
4318
- width,
4319
- height,
4320
- style,
4321
- children: /* @__PURE__ */ jsx15("div", {
4322
- ref: divRef,
4323
- style: innerStyle,
4324
- children
4325
- })
4326
- })
4525
+ children: /* @__PURE__ */ jsx15(HtmlInCanvasContent, {
4526
+ ref,
4527
+ width,
4528
+ height,
4529
+ effects,
4530
+ onPaint,
4531
+ onInit,
4532
+ controls,
4533
+ style,
4534
+ children
4327
4535
  })
4328
4536
  });
4329
4537
  });
4330
4538
  HtmlInCanvasInner.displayName = "HtmlInCanvas";
4331
- var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, sequenceStyleSchema);
4539
+ var htmlInCanvasSchema = {
4540
+ ...sequenceStyleSchema,
4541
+ hidden: hiddenField
4542
+ };
4543
+ var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, htmlInCanvasSchema);
4332
4544
  var HtmlInCanvas = Object.assign(HtmlInCanvasWrapped, {
4333
4545
  isSupported: isHtmlInCanvasSupported
4334
4546
  });
@@ -4375,7 +4587,7 @@ var RenderAssetManager = createContext17({
4375
4587
  var RenderAssetManagerProvider = ({ children, collectAssets }) => {
4376
4588
  const [renderAssets, setRenderAssets] = useState9([]);
4377
4589
  const renderAssetsRef = useRef10([]);
4378
- const registerRenderAsset = useCallback8((renderAsset) => {
4590
+ const registerRenderAsset = useCallback9((renderAsset) => {
4379
4591
  validateRenderAsset(renderAsset);
4380
4592
  renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
4381
4593
  setRenderAssets(renderAssetsRef.current);
@@ -4392,7 +4604,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
4392
4604
  };
4393
4605
  }, []);
4394
4606
  }
4395
- const unregisterRenderAsset = useCallback8((id) => {
4607
+ const unregisterRenderAsset = useCallback9((id) => {
4396
4608
  renderAssetsRef.current = renderAssetsRef.current.filter((a) => a.id !== id);
4397
4609
  setRenderAssets(renderAssetsRef.current);
4398
4610
  }, []);
@@ -4792,6 +5004,9 @@ var validateMediaProps = (props, component) => {
4792
5004
  if (typeof props.playbackRate === "number" && (isNaN(props.playbackRate) || !Number.isFinite(props.playbackRate) || props.playbackRate <= 0)) {
4793
5005
  throw new TypeError(`You have passed a playbackRate of ${props.playbackRate} to your <${component} /> component. Playback rate must be a real number above 0.`);
4794
5006
  }
5007
+ if (typeof props.preservePitch !== "boolean" && typeof props.preservePitch !== "undefined") {
5008
+ throw new TypeError(`'preservePitch' must be a boolean or undefined but got '${typeof props.preservePitch}' instead`);
5009
+ }
4795
5010
  };
4796
5011
  var validateStartFromProps = (startFrom, endAt) => {
4797
5012
  if (typeof startFrom !== "undefined") {
@@ -5137,7 +5352,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
5137
5352
  }, []);
5138
5353
  const prevEndTimes = useRef11({ scheduledEndTime: null, mediaEndTime: null });
5139
5354
  const nodesToResume = useRef11(new Map);
5140
- const unscheduleAudioNode = useCallback9((node) => {
5355
+ const unscheduleAudioNode = useCallback10((node) => {
5141
5356
  nodesToResume.current.delete(node);
5142
5357
  }, []);
5143
5358
  const scheduleAudioNode = useMemo22(() => {
@@ -5185,7 +5400,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
5185
5400
  };
5186
5401
  };
5187
5402
  }, [ctxAndGain, logLevel]);
5188
- const resume = useCallback9(() => {
5403
+ const resume = useCallback10(() => {
5189
5404
  if (!ctxAndGain) {
5190
5405
  return Promise.resolve();
5191
5406
  }
@@ -5212,10 +5427,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
5212
5427
  });
5213
5428
  return resumePromise.catch(() => {});
5214
5429
  }, [ctxAndGain, logLevel]);
5215
- const getIsResumingAudioContext = useCallback9(() => {
5430
+ const getIsResumingAudioContext = useCallback10(() => {
5216
5431
  return isResuming.current;
5217
5432
  }, []);
5218
- const suspend = useCallback9(() => {
5433
+ const suspend = useCallback10(() => {
5219
5434
  if (!ctxAndGain) {
5220
5435
  return;
5221
5436
  }
@@ -5288,7 +5503,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5288
5503
  };
5289
5504
  }, [refs]);
5290
5505
  const takenAudios = useRef11(new Array(numberOfAudioTags).fill(false));
5291
- const rerenderAudios = useCallback9(() => {
5506
+ const rerenderAudios = useCallback10(() => {
5292
5507
  refs.forEach(({ ref, id }) => {
5293
5508
  const data = audios.current?.find((a) => a.id === id);
5294
5509
  const { current } = ref;
@@ -5309,7 +5524,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5309
5524
  });
5310
5525
  });
5311
5526
  }, [refs]);
5312
- const registerAudio = useCallback9((options) => {
5527
+ const registerAudio = useCallback10((options) => {
5313
5528
  const { aud, audioId, premounting, postmounting } = options;
5314
5529
  const found = audios.current?.find((a) => a.audioId === audioId);
5315
5530
  if (found) {
@@ -5338,7 +5553,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5338
5553
  rerenderAudios();
5339
5554
  return newElem;
5340
5555
  }, [numberOfAudioTags, refs, rerenderAudios]);
5341
- const unregisterAudio = useCallback9((id) => {
5556
+ const unregisterAudio = useCallback10((id) => {
5342
5557
  const cloned = [...takenAudios.current];
5343
5558
  const index = refs.findIndex((r) => r.id === id);
5344
5559
  if (index === -1) {
@@ -5349,7 +5564,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5349
5564
  audios.current = audios.current?.filter((a) => a.id !== id);
5350
5565
  rerenderAudios();
5351
5566
  }, [refs, rerenderAudios]);
5352
- const updateAudio = useCallback9(({
5567
+ const updateAudio = useCallback10(({
5353
5568
  aud,
5354
5569
  audioId,
5355
5570
  id,
@@ -5383,7 +5598,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
5383
5598
  rerenderAudios();
5384
5599
  }
5385
5600
  }, [rerenderAudios]);
5386
- const playAllAudios = useCallback9(() => {
5601
+ const playAllAudios = useCallback10(() => {
5387
5602
  refs.forEach((ref) => {
5388
5603
  const audio = audios.current.find((a) => a.el === ref.ref);
5389
5604
  if (audio?.premounting) {
@@ -6003,7 +6218,7 @@ var useBufferManager = (logLevel, mountTime) => {
6003
6218
  const env = useRemotionEnvironment();
6004
6219
  const rendering = env.isRendering;
6005
6220
  const buffering = useRef14(false);
6006
- const addBlock = useCallback10((block) => {
6221
+ const addBlock = useCallback11((block) => {
6007
6222
  if (rendering) {
6008
6223
  return {
6009
6224
  unblock: () => {
@@ -6029,7 +6244,7 @@ var useBufferManager = (logLevel, mountTime) => {
6029
6244
  }
6030
6245
  };
6031
6246
  }, [rendering]);
6032
- const listenForBuffering = useCallback10((callback) => {
6247
+ const listenForBuffering = useCallback11((callback) => {
6033
6248
  setOnBufferingCallbacks((c) => [...c, callback]);
6034
6249
  return {
6035
6250
  remove: () => {
@@ -6037,7 +6252,7 @@ var useBufferManager = (logLevel, mountTime) => {
6037
6252
  }
6038
6253
  };
6039
6254
  }, []);
6040
- const listenForResume = useCallback10((callback) => {
6255
+ const listenForResume = useCallback11((callback) => {
6041
6256
  setOnResumeCallbacks((c) => [...c, callback]);
6042
6257
  return {
6043
6258
  remove: () => {
@@ -6151,7 +6366,7 @@ var useBufferUntilFirstFrame = ({
6151
6366
  }) => {
6152
6367
  const bufferingRef = useRef15(false);
6153
6368
  const { delayPlayback } = useBufferState();
6154
- const bufferUntilFirstFrame = useCallback11((requestedTime) => {
6369
+ const bufferUntilFirstFrame = useCallback12((requestedTime) => {
6155
6370
  if (mediaType !== "video") {
6156
6371
  return;
6157
6372
  }
@@ -6645,6 +6860,7 @@ var useMediaPlayback = ({
6645
6860
  src,
6646
6861
  mediaType,
6647
6862
  playbackRate: localPlaybackRate,
6863
+ preservePitch = true,
6648
6864
  onlyWarnForMediaSeekingError,
6649
6865
  acceptableTimeshift,
6650
6866
  pauseWhenBuffering,
@@ -6667,7 +6883,7 @@ var useMediaPlayback = ({
6667
6883
  throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
6668
6884
  }
6669
6885
  const isVariableFpsVideoMap = useRef17({});
6670
- const onVariableFpsVideoDetected = useCallback12(() => {
6886
+ const onVariableFpsVideoDetected = useCallback13(() => {
6671
6887
  if (!src) {
6672
6888
  return;
6673
6889
  }
@@ -6762,7 +6978,10 @@ var useMediaPlayback = ({
6762
6978
  if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
6763
6979
  mediaRef.current.playbackRate = playbackRateToSet;
6764
6980
  }
6765
- }, [mediaRef, playbackRate]);
6981
+ if (mediaRef.current && mediaRef.current.preservesPitch !== preservePitch) {
6982
+ mediaRef.current.preservesPitch = preservePitch;
6983
+ }
6984
+ }, [mediaRef, playbackRate, preservePitch]);
6766
6985
  useEffect12(() => {
6767
6986
  const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
6768
6987
  if (!mediaRef.current) {
@@ -6972,6 +7191,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
6972
7191
  volume,
6973
7192
  muted,
6974
7193
  playbackRate,
7194
+ preservePitch,
6975
7195
  shouldPreMountAudioTags,
6976
7196
  src,
6977
7197
  onDuration,
@@ -7002,14 +7222,12 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
7002
7222
  const [mediaVolume] = useMediaVolumeState();
7003
7223
  const [mediaMuted] = useMediaMutedState();
7004
7224
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
7005
- const { hidden } = useContext29(SequenceVisibilityToggleContext);
7006
7225
  if (!src) {
7007
7226
  throw new TypeError("No 'src' was passed to <Html5Audio>.");
7008
7227
  }
7009
7228
  const preloadedSrc = usePreload(src);
7010
7229
  const sequenceContext = useContext29(SequenceContext);
7011
7230
  const [timelineId] = useState16(() => String(Math.random()));
7012
- const isSequenceHidden = hidden[timelineId] ?? false;
7013
7231
  const userPreferredVolume = evaluateVolume({
7014
7232
  frame: volumePropFrame,
7015
7233
  volume,
@@ -7023,7 +7241,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
7023
7241
  });
7024
7242
  const propsToPass = useMemo28(() => {
7025
7243
  return {
7026
- muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
7244
+ muted: muted || mediaMuted || userPreferredVolume <= 0,
7027
7245
  src: preloadedSrc,
7028
7246
  loop: _remotionInternalNativeLoopPassed,
7029
7247
  crossOrigin: crossOriginValue,
@@ -7031,7 +7249,6 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
7031
7249
  };
7032
7250
  }, [
7033
7251
  _remotionInternalNativeLoopPassed,
7034
- isSequenceHidden,
7035
7252
  mediaMuted,
7036
7253
  muted,
7037
7254
  nativeProps,
@@ -7076,6 +7293,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
7076
7293
  src,
7077
7294
  mediaType: "audio",
7078
7295
  playbackRate: playbackRate ?? 1,
7296
+ preservePitch,
7079
7297
  onlyWarnForMediaSeekingError: false,
7080
7298
  acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
7081
7299
  isPremounting: Boolean(sequenceContext?.premounting),
@@ -7138,7 +7356,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
7138
7356
  ...propsToPass
7139
7357
  });
7140
7358
  };
7141
- var AudioForPreview = forwardRef6(AudioForDevelopmentForwardRefFunction);
7359
+ var AudioForPreview = forwardRef7(AudioForDevelopmentForwardRefFunction);
7142
7360
  var AudioForRenderingRefForwardingFunction = (props, ref) => {
7143
7361
  const audioRef = useRef19(null);
7144
7362
  const {
@@ -7157,6 +7375,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
7157
7375
  loopVolumeCurveBehavior,
7158
7376
  pauseWhenBuffering,
7159
7377
  audioStreamIndex,
7378
+ preservePitch: _preservePitch,
7160
7379
  ...nativeProps
7161
7380
  } = props;
7162
7381
  const absoluteFrame = useTimelinePosition();
@@ -7270,7 +7489,7 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
7270
7489
  onError: onNativeError
7271
7490
  });
7272
7491
  };
7273
- var AudioForRendering = forwardRef7(AudioForRenderingRefForwardingFunction);
7492
+ var AudioForRendering = forwardRef8(AudioForRenderingRefForwardingFunction);
7274
7493
  var AudioRefForwardingFunction = (props, ref) => {
7275
7494
  const audioTagsContext = useContext31(SharedAudioTagsContext);
7276
7495
  const {
@@ -7296,7 +7515,7 @@ var AudioRefForwardingFunction = (props, ref) => {
7296
7515
  throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
7297
7516
  }
7298
7517
  const preloadedSrc = usePreload(props.src);
7299
- const onError = useCallback13((e) => {
7518
+ const onError = useCallback14((e) => {
7300
7519
  console.log(e.currentTarget.error);
7301
7520
  const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
7302
7521
  if (loop) {
@@ -7310,7 +7529,7 @@ var AudioRefForwardingFunction = (props, ref) => {
7310
7529
  console.warn(errMessage);
7311
7530
  }
7312
7531
  }, [loop, onRemotionError, preloadedSrc]);
7313
- const onDuration = useCallback13((src, durationInSeconds) => {
7532
+ const onDuration = useCallback14((src, durationInSeconds) => {
7314
7533
  setDurations({ type: "got-duration", durationInSeconds, src });
7315
7534
  }, [setDurations]);
7316
7535
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
@@ -7360,7 +7579,11 @@ var AudioRefForwardingFunction = (props, ref) => {
7360
7579
  })
7361
7580
  });
7362
7581
  }
7363
- validateMediaProps({ playbackRate: props.playbackRate, volume: props.volume }, "Html5Audio");
7582
+ validateMediaProps({
7583
+ playbackRate: props.playbackRate,
7584
+ preservePitch: props.preservePitch,
7585
+ volume: props.volume
7586
+ }, "Html5Audio");
7364
7587
  if (environment.isRendering) {
7365
7588
  return /* @__PURE__ */ jsx24(AudioForRendering, {
7366
7589
  onDuration,
@@ -7383,7 +7606,7 @@ var AudioRefForwardingFunction = (props, ref) => {
7383
7606
  showInTimeline: showInTimeline ?? true
7384
7607
  });
7385
7608
  };
7386
- var Html5Audio = forwardRef8(AudioRefForwardingFunction);
7609
+ var Html5Audio = forwardRef9(AudioRefForwardingFunction);
7387
7610
  addSequenceStackTraces(Html5Audio);
7388
7611
  var Audio = Html5Audio;
7389
7612
  var kSplineTableSize = 11;
@@ -7400,11 +7623,11 @@ var IFrameRefForwarding = ({
7400
7623
  retries: delayRenderRetries ?? undefined,
7401
7624
  timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
7402
7625
  }));
7403
- const didLoad = useCallback14((e) => {
7626
+ const didLoad = useCallback15((e) => {
7404
7627
  continueRender2(handle);
7405
7628
  onLoad?.(e);
7406
7629
  }, [handle, onLoad, continueRender2]);
7407
- const didGetError = useCallback14((e) => {
7630
+ const didGetError = useCallback15((e) => {
7408
7631
  continueRender2(handle);
7409
7632
  if (onError) {
7410
7633
  onError(e);
@@ -7420,7 +7643,7 @@ var IFrameRefForwarding = ({
7420
7643
  onLoad: didLoad
7421
7644
  });
7422
7645
  };
7423
- var IFrame = forwardRef9(IFrameRefForwarding);
7646
+ var IFrame = forwardRef10(IFrameRefForwarding);
7424
7647
  function exponentialBackoff(errorCount) {
7425
7648
  return 1000 * 2 ** (errorCount - 1);
7426
7649
  }
@@ -7430,7 +7653,7 @@ function truncateSrcForLabel(src) {
7430
7653
  }
7431
7654
  return src;
7432
7655
  }
7433
- var ImgInner = ({
7656
+ var ImgContent = ({
7434
7657
  onError,
7435
7658
  maxRetries = 2,
7436
7659
  src,
@@ -7439,21 +7662,13 @@ var ImgInner = ({
7439
7662
  delayRenderTimeoutInMilliseconds,
7440
7663
  onImageFrame,
7441
7664
  crossOrigin,
7442
- showInTimeline,
7443
- name,
7444
- stack,
7445
7665
  ref,
7446
- _experimentalControls: controls,
7447
7666
  ...props2
7448
7667
  }) => {
7449
7668
  const imageRef = useRef20(null);
7450
7669
  const errors = useRef20({});
7451
7670
  const { delayPlayback } = useBufferState();
7452
7671
  const sequenceContext = useContext32(SequenceContext);
7453
- const [timelineId] = useState18(() => String(Math.random()));
7454
- if (!src) {
7455
- throw new Error('No "src" prop was passed to <Img>.');
7456
- }
7457
7672
  const _propsValid = true;
7458
7673
  if (!_propsValid) {
7459
7674
  throw new Error("typecheck error");
@@ -7461,19 +7676,8 @@ var ImgInner = ({
7461
7676
  useImperativeHandle6(ref, () => {
7462
7677
  return imageRef.current;
7463
7678
  }, []);
7464
- useImageInTimeline({
7465
- src,
7466
- displayName: name ?? null,
7467
- id: timelineId,
7468
- stack: stack ?? null,
7469
- showInTimeline: showInTimeline ?? true,
7470
- premountDisplay: sequenceContext?.premountDisplay ?? null,
7471
- postmountDisplay: sequenceContext?.postmountDisplay ?? null,
7472
- loopDisplay: undefined,
7473
- controls: controls ?? null
7474
- });
7475
7679
  const actualSrc = usePreload(src);
7476
- const retryIn = useCallback15((timeout) => {
7680
+ const retryIn = useCallback16((timeout) => {
7477
7681
  if (!imageRef.current) {
7478
7682
  return;
7479
7683
  }
@@ -7491,7 +7695,7 @@ var ImgInner = ({
7491
7695
  }, timeout);
7492
7696
  }, []);
7493
7697
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
7494
- const didGetError = useCallback15((e) => {
7698
+ const didGetError = useCallback16((e) => {
7495
7699
  if (!errors.current) {
7496
7700
  return;
7497
7701
  }
@@ -7593,7 +7797,44 @@ var ImgInner = ({
7593
7797
  decoding: "sync"
7594
7798
  });
7595
7799
  };
7596
- var Img = wrapInSchema(ImgInner, sequenceStyleSchema);
7800
+ var ImgInner = ({
7801
+ hidden,
7802
+ name,
7803
+ stack,
7804
+ showInTimeline,
7805
+ src,
7806
+ _experimentalControls: controls,
7807
+ ...props2
7808
+ }) => {
7809
+ const sequenceContext = useContext32(SequenceContext);
7810
+ const [timelineId] = useState18(() => String(Math.random()));
7811
+ if (!src) {
7812
+ throw new Error('No "src" prop was passed to <Img>.');
7813
+ }
7814
+ useImageInTimeline({
7815
+ src,
7816
+ displayName: name ?? null,
7817
+ id: timelineId,
7818
+ stack: stack ?? null,
7819
+ showInTimeline: showInTimeline ?? true,
7820
+ premountDisplay: sequenceContext?.premountDisplay ?? null,
7821
+ postmountDisplay: sequenceContext?.postmountDisplay ?? null,
7822
+ loopDisplay: undefined,
7823
+ controls: controls ?? null
7824
+ });
7825
+ if (hidden) {
7826
+ return null;
7827
+ }
7828
+ return /* @__PURE__ */ jsx26(ImgContent, {
7829
+ src,
7830
+ ...props2
7831
+ });
7832
+ };
7833
+ var imgSchema = {
7834
+ ...sequenceStyleSchema,
7835
+ hidden: hiddenField
7836
+ };
7837
+ var Img = wrapInSchema(ImgInner, imgSchema);
7597
7838
  addSequenceStackTraces(Img);
7598
7839
  var compositionsRef = React28.createRef();
7599
7840
  var CompositionManagerProvider = ({
@@ -7607,14 +7848,14 @@ var CompositionManagerProvider = ({
7607
7848
  const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
7608
7849
  const [compositions, setCompositions] = useState19(initialCompositions);
7609
7850
  const currentcompositionsRef = useRef21(compositions);
7610
- const updateCompositions = useCallback16((updateComps) => {
7851
+ const updateCompositions = useCallback17((updateComps) => {
7611
7852
  setCompositions((comps) => {
7612
7853
  const updated = updateComps(comps);
7613
7854
  currentcompositionsRef.current = updated;
7614
7855
  return updated;
7615
7856
  });
7616
7857
  }, []);
7617
- const registerComposition = useCallback16((comp) => {
7858
+ const registerComposition = useCallback17((comp) => {
7618
7859
  updateCompositions((comps) => {
7619
7860
  if (comps.find((c2) => c2.id === comp.id)) {
7620
7861
  throw new Error(`Multiple composition with id ${comp.id} are registered.`);
@@ -7622,12 +7863,12 @@ var CompositionManagerProvider = ({
7622
7863
  return [...comps, comp];
7623
7864
  });
7624
7865
  }, [updateCompositions]);
7625
- const unregisterComposition = useCallback16((id) => {
7866
+ const unregisterComposition = useCallback17((id) => {
7626
7867
  setCompositions((comps) => {
7627
7868
  return comps.filter((c2) => c2.id !== id);
7628
7869
  });
7629
7870
  }, []);
7630
- const registerFolder = useCallback16((name, parent, nonce) => {
7871
+ const registerFolder = useCallback17((name, parent, nonce) => {
7631
7872
  setFolders((prevFolders) => {
7632
7873
  return [
7633
7874
  ...prevFolders,
@@ -7639,7 +7880,7 @@ var CompositionManagerProvider = ({
7639
7880
  ];
7640
7881
  });
7641
7882
  }, []);
7642
- const unregisterFolder = useCallback16((name, parent) => {
7883
+ const unregisterFolder = useCallback17((name, parent) => {
7643
7884
  setFolders((prevFolders) => {
7644
7885
  return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
7645
7886
  });
@@ -7739,8 +7980,24 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
7739
7980
  }
7740
7981
  `;
7741
7982
  };
7983
+ var disabledEffectField = {
7984
+ type: "boolean",
7985
+ default: false,
7986
+ description: "Disabled"
7987
+ };
7742
7988
  var createEffect = (definition) => {
7743
- const widened = definition;
7989
+ const userCalculateKey = definition.calculateKey;
7990
+ const widened = {
7991
+ ...definition,
7992
+ calculateKey: (params) => {
7993
+ const disabled = params.disabled ?? false;
7994
+ return `${userCalculateKey(params)}-disabled-${disabled}`;
7995
+ },
7996
+ schema: {
7997
+ disabled: disabledEffectField,
7998
+ ...definition.schema
7999
+ }
8000
+ };
7744
8001
  const factory = (params = {}) => ({
7745
8002
  definition: widened,
7746
8003
  params,
@@ -8099,6 +8356,7 @@ var OffthreadVideoForRendering = ({
8099
8356
  onVideoFrame,
8100
8357
  crossOrigin,
8101
8358
  audioStreamIndex,
8359
+ preservePitch: _preservePitch,
8102
8360
  ...props2
8103
8361
  }) => {
8104
8362
  const absoluteFrame = useTimelinePosition();
@@ -8254,7 +8512,7 @@ var OffthreadVideoForRendering = ({
8254
8512
  continueRender2,
8255
8513
  delayRender2
8256
8514
  ]);
8257
- const onErr = useCallback17(() => {
8515
+ const onErr = useCallback18(() => {
8258
8516
  if (onError) {
8259
8517
  onError?.(new Error("Failed to load image with src " + imageSrc));
8260
8518
  } else {
@@ -8264,7 +8522,7 @@ var OffthreadVideoForRendering = ({
8264
8522
  const className = useMemo33(() => {
8265
8523
  return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
8266
8524
  }, [props2.className]);
8267
- const onImageFrame = useCallback17((img) => {
8525
+ const onImageFrame = useCallback18((img) => {
8268
8526
  if (onVideoFrame) {
8269
8527
  onVideoFrame(img);
8270
8528
  }
@@ -8345,6 +8603,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8345
8603
  volume,
8346
8604
  muted,
8347
8605
  playbackRate,
8606
+ preservePitch,
8348
8607
  onlyWarnForMediaSeekingError,
8349
8608
  src,
8350
8609
  onDuration,
@@ -8376,11 +8635,9 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8376
8635
  const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
8377
8636
  const { fps, durationInFrames } = useVideoConfig();
8378
8637
  const parentSequence = useContext35(SequenceContext);
8379
- const { hidden } = useContext35(SequenceVisibilityToggleContext);
8380
8638
  const logLevel = useLogLevel();
8381
8639
  const mountTime = useMountTime();
8382
8640
  const [timelineId] = useState21(() => String(Math.random()));
8383
- const isSequenceHidden = hidden[timelineId] ?? false;
8384
8641
  if (typeof acceptableTimeShift !== "undefined") {
8385
8642
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
8386
8643
  }
@@ -8411,6 +8668,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8411
8668
  src,
8412
8669
  mediaType: "video",
8413
8670
  playbackRate: props2.playbackRate ?? 1,
8671
+ preservePitch,
8414
8672
  onlyWarnForMediaSeekingError,
8415
8673
  acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
8416
8674
  isPremounting: Boolean(parentSequence?.premounting),
@@ -8524,10 +8782,9 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8524
8782
  }, []);
8525
8783
  const actualStyle = useMemo34(() => {
8526
8784
  return {
8527
- ...style,
8528
- opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
8785
+ ...style
8529
8786
  };
8530
- }, [isSequenceHidden, style]);
8787
+ }, [style]);
8531
8788
  const crossOriginValue = getCrossOriginValue({
8532
8789
  crossOrigin,
8533
8790
  requestsVideoFrame: Boolean(onVideoFrame),
@@ -8535,7 +8792,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8535
8792
  });
8536
8793
  return /* @__PURE__ */ jsx31("video", {
8537
8794
  ref: videoRef,
8538
- muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,
8795
+ muted: muted || mediaMuted || userPreferredVolume <= 0,
8539
8796
  playsInline: true,
8540
8797
  src: actualSrc,
8541
8798
  loop: _remotionInternalNativeLoopPassed,
@@ -8545,7 +8802,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8545
8802
  ...nativeProps
8546
8803
  });
8547
8804
  };
8548
- var VideoForPreview = forwardRef10(VideoForDevelopmentRefForwardingFunction);
8805
+ var VideoForPreview = forwardRef11(VideoForDevelopmentRefForwardingFunction);
8549
8806
  var InnerOffthreadVideo = (props2) => {
8550
8807
  const {
8551
8808
  startFrom,
@@ -8562,7 +8819,7 @@ var InnerOffthreadVideo = (props2) => {
8562
8819
  if (environment.isClientSideRendering) {
8563
8820
  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");
8564
8821
  }
8565
- const onDuration = useCallback18(() => {
8822
+ const onDuration = useCallback19(() => {
8566
8823
  return;
8567
8824
  }, []);
8568
8825
  if (typeof props2.src !== "string") {
@@ -8650,6 +8907,7 @@ var OffthreadVideo = ({
8650
8907
  onVideoFrame,
8651
8908
  pauseWhenBuffering,
8652
8909
  playbackRate,
8910
+ preservePitch,
8653
8911
  showInTimeline,
8654
8912
  style,
8655
8913
  toneFrequency,
@@ -8685,6 +8943,7 @@ var OffthreadVideo = ({
8685
8943
  onVideoFrame,
8686
8944
  pauseWhenBuffering: pauseWhenBuffering ?? true,
8687
8945
  playbackRate: playbackRate ?? 1,
8946
+ preservePitch,
8688
8947
  toneFrequency: toneFrequency ?? 1,
8689
8948
  showInTimeline: showInTimeline ?? true,
8690
8949
  src,
@@ -8805,7 +9064,6 @@ var Internals = {
8805
9064
  VisualModeSettersContext,
8806
9065
  SequenceManager,
8807
9066
  SequenceStackTracesUpdateContext,
8808
- SequenceVisibilityToggleContext,
8809
9067
  wrapInSchema,
8810
9068
  sequenceSchema,
8811
9069
  sequenceStyleSchema,
@@ -8909,7 +9167,8 @@ var Internals = {
8909
9167
  findPropsToDelete,
8910
9168
  makeSequencePropsSubscriptionKey,
8911
9169
  getCodeValuesCtx,
8912
- getEffectCodeValuesCtx
9170
+ getEffectCodeValuesCtx,
9171
+ hiddenField
8913
9172
  };
8914
9173
  var NUMBER = "[-+]?\\d*\\.?\\d+";
8915
9174
  var PERCENTAGE = NUMBER + "%";
@@ -8972,7 +9231,7 @@ var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
8972
9231
  children
8973
9232
  });
8974
9233
  };
8975
- var SeriesSequence = forwardRef11(SeriesSequenceRefForwardingFunction);
9234
+ var SeriesSequence = forwardRef12(SeriesSequenceRefForwardingFunction);
8976
9235
  var SeriesInner = (props2) => {
8977
9236
  const childrenValue = useMemo36(() => {
8978
9237
  let startFrame = 0;
@@ -9497,6 +9756,7 @@ var VideoForRenderingForwardFunction = ({
9497
9756
  loopVolumeCurveBehavior,
9498
9757
  audioStreamIndex,
9499
9758
  onVideoFrame,
9759
+ preservePitch: _preservePitch,
9500
9760
  ...props2
9501
9761
  }, ref) => {
9502
9762
  const absoluteFrame = useTimelinePosition();
@@ -9699,7 +9959,7 @@ var VideoForRenderingForwardFunction = ({
9699
9959
  ...props2
9700
9960
  });
9701
9961
  };
9702
- var VideoForRendering = forwardRef12(VideoForRenderingForwardFunction);
9962
+ var VideoForRendering = forwardRef13(VideoForRenderingForwardFunction);
9703
9963
  var VideoForwardingFunction = (props2, ref) => {
9704
9964
  const {
9705
9965
  startFrom,
@@ -9728,10 +9988,10 @@ var VideoForwardingFunction = (props2, ref) => {
9728
9988
  throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
9729
9989
  }
9730
9990
  const preloadedSrc = usePreload(props2.src);
9731
- const onDuration = useCallback19((src, durationInSeconds) => {
9991
+ const onDuration = useCallback20((src, durationInSeconds) => {
9732
9992
  setDurations({ type: "got-duration", durationInSeconds, src });
9733
9993
  }, [setDurations]);
9734
- const onVideoFrame = useCallback19(() => {}, []);
9994
+ const onVideoFrame = useCallback20(() => {}, []);
9735
9995
  const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
9736
9996
  validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
9737
9997
  const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
@@ -9783,7 +10043,11 @@ var VideoForwardingFunction = (props2, ref) => {
9783
10043
  })
9784
10044
  });
9785
10045
  }
9786
- validateMediaProps({ playbackRate: props2.playbackRate, volume: props2.volume }, "Html5Video");
10046
+ validateMediaProps({
10047
+ playbackRate: props2.playbackRate,
10048
+ preservePitch: props2.preservePitch,
10049
+ volume: props2.volume
10050
+ }, "Html5Video");
9787
10051
  if (environment.isRendering) {
9788
10052
  return /* @__PURE__ */ jsx37(VideoForRendering, {
9789
10053
  onDuration,
@@ -9805,7 +10069,7 @@ var VideoForwardingFunction = (props2, ref) => {
9805
10069
  onAutoPlayError: onAutoPlayError ?? undefined
9806
10070
  });
9807
10071
  };
9808
- var Html5Video = forwardRef13(VideoForwardingFunction);
10072
+ var Html5Video = forwardRef14(VideoForwardingFunction);
9809
10073
  addSequenceStackTraces(Html5Video);
9810
10074
  checkMultipleRemotionVersions();
9811
10075
  var proxyObj = {};
@@ -15967,17 +16231,17 @@ import { jsx as jsx112 } from "react/jsx-runtime";
15967
16231
  import { jsx as jsx122 } from "react/jsx-runtime";
15968
16232
  import * as React362 from "react";
15969
16233
  import * as ReactDOM4 from "react-dom";
15970
- import React11 from "react";
16234
+ import React112 from "react";
15971
16235
  import * as React82 from "react";
15972
16236
  import { jsx as jsx132 } from "react/jsx-runtime";
15973
16237
  import * as React9 from "react";
15974
- import * as React102 from "react";
16238
+ import * as React10 from "react";
15975
16239
  import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
15976
16240
  import { jsx as jsx152 } from "react/jsx-runtime";
15977
- import * as React12 from "react";
16241
+ import * as React122 from "react";
15978
16242
  import { jsx as jsx162 } from "react/jsx-runtime";
15979
16243
  import * as React16 from "react";
15980
- import * as React132 from "react";
16244
+ import * as React13 from "react";
15981
16245
  import * as ReactDOM from "react-dom";
15982
16246
  import { jsx as jsx172 } from "react/jsx-runtime";
15983
16247
  import * as React14 from "react";
@@ -16005,8 +16269,8 @@ import * as React282 from "react";
16005
16269
  import { jsx as jsx232 } from "react/jsx-runtime";
16006
16270
  import * as React35 from "react";
16007
16271
  import * as React312 from "react";
16008
- import { useState as useState112 } from "react";
16009
16272
  import * as React292 from "react";
16273
+ import { useState as useState112 } from "react";
16010
16274
  import * as React30 from "react";
16011
16275
  import * as React342 from "react";
16012
16276
  import * as React332 from "react";
@@ -16869,43 +17133,43 @@ function composeRefs2(...refs) {
16869
17133
  function useComposedRefs2(...refs) {
16870
17134
  return React9.useCallback(composeRefs2(...refs), refs);
16871
17135
  }
16872
- var Slot2 = React102.forwardRef((props, forwardedRef) => {
17136
+ var Slot2 = React10.forwardRef((props, forwardedRef) => {
16873
17137
  const { children, ...slotProps } = props;
16874
- const childrenArray = React102.Children.toArray(children);
17138
+ const childrenArray = React10.Children.toArray(children);
16875
17139
  const slottable = childrenArray.find(isSlottable2);
16876
17140
  if (slottable) {
16877
17141
  const newElement = slottable.props.children;
16878
17142
  const newChildren = childrenArray.map((child) => {
16879
17143
  if (child === slottable) {
16880
- if (React102.Children.count(newElement) > 1)
16881
- return React102.Children.only(null);
16882
- return React102.isValidElement(newElement) ? newElement.props.children : null;
17144
+ if (React10.Children.count(newElement) > 1)
17145
+ return React10.Children.only(null);
17146
+ return React10.isValidElement(newElement) ? newElement.props.children : null;
16883
17147
  } else {
16884
17148
  return child;
16885
17149
  }
16886
17150
  });
16887
- return /* @__PURE__ */ jsx142(SlotClone, { ...slotProps, ref: forwardedRef, children: React102.isValidElement(newElement) ? React102.cloneElement(newElement, undefined, newChildren) : null });
17151
+ return /* @__PURE__ */ jsx142(SlotClone, { ...slotProps, ref: forwardedRef, children: React10.isValidElement(newElement) ? React10.cloneElement(newElement, undefined, newChildren) : null });
16888
17152
  }
16889
17153
  return /* @__PURE__ */ jsx142(SlotClone, { ...slotProps, ref: forwardedRef, children });
16890
17154
  });
16891
17155
  Slot2.displayName = "Slot";
16892
- var SlotClone = React102.forwardRef((props, forwardedRef) => {
17156
+ var SlotClone = React10.forwardRef((props, forwardedRef) => {
16893
17157
  const { children, ...slotProps } = props;
16894
- if (React102.isValidElement(children)) {
17158
+ if (React10.isValidElement(children)) {
16895
17159
  const childrenRef = getElementRef2(children);
16896
- return React102.cloneElement(children, {
17160
+ return React10.cloneElement(children, {
16897
17161
  ...mergeProps2(slotProps, children.props),
16898
17162
  ref: forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef
16899
17163
  });
16900
17164
  }
16901
- return React102.Children.count(children) > 1 ? React102.Children.only(null) : null;
17165
+ return React10.Children.count(children) > 1 ? React10.Children.only(null) : null;
16902
17166
  });
16903
17167
  SlotClone.displayName = "SlotClone";
16904
17168
  var Slottable2 = ({ children }) => {
16905
17169
  return /* @__PURE__ */ jsx142(Fragment5, { children });
16906
17170
  };
16907
17171
  function isSlottable2(child) {
16908
- return React102.isValidElement(child) && child.type === Slottable2;
17172
+ return React10.isValidElement(child) && child.type === Slottable2;
16909
17173
  }
16910
17174
  function mergeProps2(slotProps, childProps) {
16911
17175
  const overrideProps = { ...childProps };
@@ -16949,13 +17213,13 @@ function createCollection(name) {
16949
17213
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
16950
17214
  const CollectionProvider = (props) => {
16951
17215
  const { scope, children } = props;
16952
- const ref = React11.useRef(null);
16953
- const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
17216
+ const ref = React112.useRef(null);
17217
+ const itemMap = React112.useRef(/* @__PURE__ */ new Map).current;
16954
17218
  return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
16955
17219
  };
16956
17220
  CollectionProvider.displayName = PROVIDER_NAME;
16957
17221
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
16958
- const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
17222
+ const CollectionSlot = React112.forwardRef((props, forwardedRef) => {
16959
17223
  const { scope, children } = props;
16960
17224
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
16961
17225
  const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
@@ -16964,12 +17228,12 @@ function createCollection(name) {
16964
17228
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
16965
17229
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
16966
17230
  const ITEM_DATA_ATTR = "data-radix-collection-item";
16967
- const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
17231
+ const CollectionItemSlot = React112.forwardRef((props, forwardedRef) => {
16968
17232
  const { scope, children, ...itemData } = props;
16969
- const ref = React11.useRef(null);
17233
+ const ref = React112.useRef(null);
16970
17234
  const composedRefs = useComposedRefs2(forwardedRef, ref);
16971
17235
  const context = useCollectionContext(ITEM_SLOT_NAME, scope);
16972
- React11.useEffect(() => {
17236
+ React112.useEffect(() => {
16973
17237
  context.itemMap.set(ref, { ref, ...itemData });
16974
17238
  return () => void context.itemMap.delete(ref);
16975
17239
  });
@@ -16978,7 +17242,7 @@ function createCollection(name) {
16978
17242
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
16979
17243
  function useCollection(scope) {
16980
17244
  const context = useCollectionContext(name + "CollectionConsumer", scope);
16981
- const getItems = React11.useCallback(() => {
17245
+ const getItems = React112.useCallback(() => {
16982
17246
  const collectionNode = context.collectionRef.current;
16983
17247
  if (!collectionNode)
16984
17248
  return [];
@@ -16995,9 +17259,9 @@ function createCollection(name) {
16995
17259
  createCollectionScope
16996
17260
  ];
16997
17261
  }
16998
- var DirectionContext = React12.createContext(undefined);
17262
+ var DirectionContext = React122.createContext(undefined);
16999
17263
  function useDirection(localDir) {
17000
- const globalDir = React12.useContext(DirectionContext);
17264
+ const globalDir = React122.useContext(DirectionContext);
17001
17265
  return localDir || globalDir || "ltr";
17002
17266
  }
17003
17267
  var NODES = [
@@ -17019,7 +17283,7 @@ var NODES = [
17019
17283
  "ul"
17020
17284
  ];
17021
17285
  var Primitive = NODES.reduce((primitive, node) => {
17022
- const Node2 = React132.forwardRef((props, forwardedRef) => {
17286
+ const Node2 = React13.forwardRef((props, forwardedRef) => {
17023
17287
  const { asChild, ...primitiveProps } = props;
17024
17288
  const Comp = asChild ? Slot2 : node;
17025
17289
  if (typeof window !== "undefined") {
@@ -19761,7 +20025,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
19761
20025
  return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
19762
20026
  };
19763
20027
  var __assign = function() {
19764
- __assign = Object.assign || function __assign(t) {
20028
+ __assign = Object.assign || function __assign2(t) {
19765
20029
  for (var s, i = 1, n = arguments.length;i < n; i++) {
19766
20030
  s = arguments[i];
19767
20031
  for (var p in s)
@@ -21548,17 +21812,17 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
21548
21812
  let defaultContexts = [];
21549
21813
  function createContext32(rootComponentName, defaultContext) {
21550
21814
  const BaseContext = React382.createContext(defaultContext);
21551
- const index2 = defaultContexts.length;
21815
+ const index3 = defaultContexts.length;
21552
21816
  defaultContexts = [...defaultContexts, defaultContext];
21553
21817
  const Provider = (props) => {
21554
21818
  const { scope, children, ...context } = props;
21555
- const Context = scope?.[scopeName]?.[index2] || BaseContext;
21819
+ const Context = scope?.[scopeName]?.[index3] || BaseContext;
21556
21820
  const value = React382.useMemo(() => context, Object.values(context));
21557
21821
  return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
21558
21822
  };
21559
21823
  Provider.displayName = rootComponentName + "Provider";
21560
21824
  function useContext222(consumerName, scope) {
21561
- const Context = scope?.[scopeName]?.[index2] || BaseContext;
21825
+ const Context = scope?.[scopeName]?.[index3] || BaseContext;
21562
21826
  const context = React382.useContext(Context);
21563
21827
  if (context)
21564
21828
  return context;
@@ -21755,10 +22019,10 @@ var OrderedDict = class _OrderedDict extends Map {
21755
22019
  super.set(key, value);
21756
22020
  return this;
21757
22021
  }
21758
- insert(index2, key, value) {
22022
+ insert(index3, key, value) {
21759
22023
  const has = this.has(key);
21760
22024
  const length2 = this.#keys.length;
21761
- const relativeIndex = toSafeInteger(index2);
22025
+ const relativeIndex = toSafeInteger(index3);
21762
22026
  let actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
21763
22027
  const safeIndex = actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
21764
22028
  if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
@@ -21796,39 +22060,39 @@ var OrderedDict = class _OrderedDict extends Map {
21796
22060
  }
21797
22061
  return this;
21798
22062
  }
21799
- with(index2, key, value) {
22063
+ with(index3, key, value) {
21800
22064
  const copy = new _OrderedDict(this);
21801
- copy.insert(index2, key, value);
22065
+ copy.insert(index3, key, value);
21802
22066
  return copy;
21803
22067
  }
21804
22068
  before(key) {
21805
- const index2 = this.#keys.indexOf(key) - 1;
21806
- if (index2 < 0) {
22069
+ const index3 = this.#keys.indexOf(key) - 1;
22070
+ if (index3 < 0) {
21807
22071
  return;
21808
22072
  }
21809
- return this.entryAt(index2);
22073
+ return this.entryAt(index3);
21810
22074
  }
21811
22075
  setBefore(key, newKey, value) {
21812
- const index2 = this.#keys.indexOf(key);
21813
- if (index2 === -1) {
22076
+ const index3 = this.#keys.indexOf(key);
22077
+ if (index3 === -1) {
21814
22078
  return this;
21815
22079
  }
21816
- return this.insert(index2, newKey, value);
22080
+ return this.insert(index3, newKey, value);
21817
22081
  }
21818
22082
  after(key) {
21819
- let index2 = this.#keys.indexOf(key);
21820
- index2 = index2 === -1 || index2 === this.size - 1 ? -1 : index2 + 1;
21821
- if (index2 === -1) {
22083
+ let index3 = this.#keys.indexOf(key);
22084
+ index3 = index3 === -1 || index3 === this.size - 1 ? -1 : index3 + 1;
22085
+ if (index3 === -1) {
21822
22086
  return;
21823
22087
  }
21824
- return this.entryAt(index2);
22088
+ return this.entryAt(index3);
21825
22089
  }
21826
22090
  setAfter(key, newKey, value) {
21827
- const index2 = this.#keys.indexOf(key);
21828
- if (index2 === -1) {
22091
+ const index3 = this.#keys.indexOf(key);
22092
+ if (index3 === -1) {
21829
22093
  return this;
21830
22094
  }
21831
- return this.insert(index2 + 1, newKey, value);
22095
+ return this.insert(index3 + 1, newKey, value);
21832
22096
  }
21833
22097
  first() {
21834
22098
  return this.entryAt(0);
@@ -21847,21 +22111,21 @@ var OrderedDict = class _OrderedDict extends Map {
21847
22111
  }
21848
22112
  return deleted;
21849
22113
  }
21850
- deleteAt(index2) {
21851
- const key = this.keyAt(index2);
22114
+ deleteAt(index3) {
22115
+ const key = this.keyAt(index3);
21852
22116
  if (key !== undefined) {
21853
22117
  return this.delete(key);
21854
22118
  }
21855
22119
  return false;
21856
22120
  }
21857
- at(index2) {
21858
- const key = at(this.#keys, index2);
22121
+ at(index3) {
22122
+ const key = at(this.#keys, index3);
21859
22123
  if (key !== undefined) {
21860
22124
  return this.get(key);
21861
22125
  }
21862
22126
  }
21863
- entryAt(index2) {
21864
- const key = at(this.#keys, index2);
22127
+ entryAt(index3) {
22128
+ const key = at(this.#keys, index3);
21865
22129
  if (key !== undefined) {
21866
22130
  return [key, this.get(key)];
21867
22131
  }
@@ -21869,15 +22133,15 @@ var OrderedDict = class _OrderedDict extends Map {
21869
22133
  indexOf(key) {
21870
22134
  return this.#keys.indexOf(key);
21871
22135
  }
21872
- keyAt(index2) {
21873
- return at(this.#keys, index2);
22136
+ keyAt(index3) {
22137
+ return at(this.#keys, index3);
21874
22138
  }
21875
22139
  from(key, offset4) {
21876
- const index2 = this.indexOf(key);
21877
- if (index2 === -1) {
22140
+ const index3 = this.indexOf(key);
22141
+ if (index3 === -1) {
21878
22142
  return;
21879
22143
  }
21880
- let dest = index2 + offset4;
22144
+ let dest = index3 + offset4;
21881
22145
  if (dest < 0)
21882
22146
  dest = 0;
21883
22147
  if (dest >= this.size)
@@ -21885,11 +22149,11 @@ var OrderedDict = class _OrderedDict extends Map {
21885
22149
  return this.at(dest);
21886
22150
  }
21887
22151
  keyFrom(key, offset4) {
21888
- const index2 = this.indexOf(key);
21889
- if (index2 === -1) {
22152
+ const index3 = this.indexOf(key);
22153
+ if (index3 === -1) {
21890
22154
  return;
21891
22155
  }
21892
- let dest = index2 + offset4;
22156
+ let dest = index3 + offset4;
21893
22157
  if (dest < 0)
21894
22158
  dest = 0;
21895
22159
  if (dest >= this.size)
@@ -21897,68 +22161,68 @@ var OrderedDict = class _OrderedDict extends Map {
21897
22161
  return this.keyAt(dest);
21898
22162
  }
21899
22163
  find(predicate, thisArg) {
21900
- let index2 = 0;
22164
+ let index3 = 0;
21901
22165
  for (const entry of this) {
21902
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
22166
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
21903
22167
  return entry;
21904
22168
  }
21905
- index2++;
22169
+ index3++;
21906
22170
  }
21907
22171
  return;
21908
22172
  }
21909
22173
  findIndex(predicate, thisArg) {
21910
- let index2 = 0;
22174
+ let index3 = 0;
21911
22175
  for (const entry of this) {
21912
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
21913
- return index2;
22176
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
22177
+ return index3;
21914
22178
  }
21915
- index2++;
22179
+ index3++;
21916
22180
  }
21917
22181
  return -1;
21918
22182
  }
21919
22183
  filter(predicate, thisArg) {
21920
22184
  const entries = [];
21921
- let index2 = 0;
22185
+ let index3 = 0;
21922
22186
  for (const entry of this) {
21923
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
22187
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
21924
22188
  entries.push(entry);
21925
22189
  }
21926
- index2++;
22190
+ index3++;
21927
22191
  }
21928
22192
  return new _OrderedDict(entries);
21929
22193
  }
21930
22194
  map(callbackfn, thisArg) {
21931
22195
  const entries = [];
21932
- let index2 = 0;
22196
+ let index3 = 0;
21933
22197
  for (const entry of this) {
21934
- entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index2, this])]);
21935
- index2++;
22198
+ entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index3, this])]);
22199
+ index3++;
21936
22200
  }
21937
22201
  return new _OrderedDict(entries);
21938
22202
  }
21939
22203
  reduce(...args) {
21940
22204
  const [callbackfn, initialValue] = args;
21941
- let index2 = 0;
22205
+ let index3 = 0;
21942
22206
  let accumulator = initialValue ?? this.at(0);
21943
22207
  for (const entry of this) {
21944
- if (index2 === 0 && args.length === 1) {
22208
+ if (index3 === 0 && args.length === 1) {
21945
22209
  accumulator = entry;
21946
22210
  } else {
21947
- accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
22211
+ accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
21948
22212
  }
21949
- index2++;
22213
+ index3++;
21950
22214
  }
21951
22215
  return accumulator;
21952
22216
  }
21953
22217
  reduceRight(...args) {
21954
22218
  const [callbackfn, initialValue] = args;
21955
22219
  let accumulator = initialValue ?? this.at(-1);
21956
- for (let index2 = this.size - 1;index2 >= 0; index2--) {
21957
- const entry = this.at(index2);
21958
- if (index2 === this.size - 1 && args.length === 1) {
22220
+ for (let index3 = this.size - 1;index3 >= 0; index3--) {
22221
+ const entry = this.at(index3);
22222
+ if (index3 === this.size - 1 && args.length === 1) {
21959
22223
  accumulator = entry;
21960
22224
  } else {
21961
- accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index2, this]);
22225
+ accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
21962
22226
  }
21963
22227
  }
21964
22228
  return accumulator;
@@ -21969,8 +22233,8 @@ var OrderedDict = class _OrderedDict extends Map {
21969
22233
  }
21970
22234
  toReversed() {
21971
22235
  const reversed = new _OrderedDict;
21972
- for (let index2 = this.size - 1;index2 >= 0; index2--) {
21973
- const key = this.keyAt(index2);
22236
+ for (let index3 = this.size - 1;index3 >= 0; index3--) {
22237
+ const key = this.keyAt(index3);
21974
22238
  const element = this.get(key);
21975
22239
  reversed.set(key, element);
21976
22240
  }
@@ -21993,44 +22257,44 @@ var OrderedDict = class _OrderedDict extends Map {
21993
22257
  if (end !== undefined && end > 0) {
21994
22258
  stop = end - 1;
21995
22259
  }
21996
- for (let index2 = start;index2 <= stop; index2++) {
21997
- const key = this.keyAt(index2);
22260
+ for (let index3 = start;index3 <= stop; index3++) {
22261
+ const key = this.keyAt(index3);
21998
22262
  const element = this.get(key);
21999
22263
  result.set(key, element);
22000
22264
  }
22001
22265
  return result;
22002
22266
  }
22003
22267
  every(predicate, thisArg) {
22004
- let index2 = 0;
22268
+ let index3 = 0;
22005
22269
  for (const entry of this) {
22006
- if (!Reflect.apply(predicate, thisArg, [entry, index2, this])) {
22270
+ if (!Reflect.apply(predicate, thisArg, [entry, index3, this])) {
22007
22271
  return false;
22008
22272
  }
22009
- index2++;
22273
+ index3++;
22010
22274
  }
22011
22275
  return true;
22012
22276
  }
22013
22277
  some(predicate, thisArg) {
22014
- let index2 = 0;
22278
+ let index3 = 0;
22015
22279
  for (const entry of this) {
22016
- if (Reflect.apply(predicate, thisArg, [entry, index2, this])) {
22280
+ if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
22017
22281
  return true;
22018
22282
  }
22019
- index2++;
22283
+ index3++;
22020
22284
  }
22021
22285
  return false;
22022
22286
  }
22023
22287
  };
22024
- function at(array, index2) {
22288
+ function at(array, index3) {
22025
22289
  if ("at" in Array.prototype) {
22026
- return Array.prototype.at.call(array, index2);
22290
+ return Array.prototype.at.call(array, index3);
22027
22291
  }
22028
- const actualIndex = toSafeIndex(array, index2);
22292
+ const actualIndex = toSafeIndex(array, index3);
22029
22293
  return actualIndex === -1 ? undefined : array[actualIndex];
22030
22294
  }
22031
- function toSafeIndex(array, index2) {
22295
+ function toSafeIndex(array, index3) {
22032
22296
  const length2 = array.length;
22033
- const relativeIndex = toSafeInteger(index2);
22297
+ const relativeIndex = toSafeInteger(index3);
22034
22298
  const actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
22035
22299
  return actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
22036
22300
  }
@@ -22082,7 +22346,7 @@ var Primitive2 = NODES2.reduce((primitive, node) => {
22082
22346
  Node2.displayName = `Primitive.${node}`;
22083
22347
  return { ...primitive, [node]: Node2 };
22084
22348
  }, {});
22085
- function useCallbackRef3(callback) {
22349
+ function useCallbackRef4(callback) {
22086
22350
  const callbackRef = React44.useRef(callback);
22087
22351
  React44.useEffect(() => {
22088
22352
  callbackRef.current = callback;
@@ -22186,7 +22450,7 @@ var RovingFocusGroupImpl = React47.forwardRef((props, forwardedRef) => {
22186
22450
  caller: GROUP_NAME2
22187
22451
  });
22188
22452
  const [isTabbingBackOut, setIsTabbingBackOut] = React47.useState(false);
22189
- const handleEntryFocus = useCallbackRef3(onEntryFocus);
22453
+ const handleEntryFocus = useCallbackRef4(onEntryFocus);
22190
22454
  const getItems = useCollection2(__scopeRovingFocusGroup);
22191
22455
  const isClickFocusRef = React47.useRef(false);
22192
22456
  const [focusableItemsCount, setFocusableItemsCount] = React47.useState(0);
@@ -22339,7 +22603,7 @@ function focusFirst2(candidates, preventScroll = false) {
22339
22603
  }
22340
22604
  }
22341
22605
  function wrapArray2(array, startIndex) {
22342
- return array.map((_, index2) => array[(startIndex + index2) % array.length]);
22606
+ return array.map((_, index3) => array[(startIndex + index3) % array.length]);
22343
22607
  }
22344
22608
  var Root3 = RovingFocusGroup;
22345
22609
  var Item2 = RovingFocusGroupItem;
@@ -22654,7 +22918,7 @@ var Triangle2 = (props) => {
22654
22918
  };
22655
22919
 
22656
22920
  // src/components/homepage/FreePricing.tsx
22657
- import React53, { useCallback as useCallback33, useMemo as useMemo50 } from "react";
22921
+ import React53, { useCallback as useCallback32, useMemo as useMemo50 } from "react";
22658
22922
 
22659
22923
  // ../../node_modules/.bun/tailwind-merge@2.5.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs
22660
22924
  var CLASS_PART_SEPARATOR2 = "-";
@@ -24301,7 +24565,7 @@ var CompanyPricing = () => {
24301
24565
  const [automatorsSelected, setAutomatorsSelected] = React53.useState(true);
24302
24566
  const [devSeatCount, setDevSeatCount] = React53.useState(3);
24303
24567
  const [cloudRenders, setCloudRenders] = React53.useState(1e4);
24304
- const formatPrice = useCallback33((price) => {
24568
+ const formatPrice = useCallback32((price) => {
24305
24569
  const formatter = new Intl.NumberFormat("en-US", {
24306
24570
  style: "currency",
24307
24571
  currency: "USD",
@@ -24355,23 +24619,23 @@ var CompanyPricing = () => {
24355
24619
  style: { height: 30 }
24356
24620
  }),
24357
24621
  /* @__PURE__ */ jsx47(SectionCheckbox, {
24358
- checked: creatorsSelected,
24359
- onChange: setCreatorsSelected,
24360
- title: "Remotion for Creators",
24361
- subtitle: "Create videos for yourself - $25/mo per seat"
24622
+ checked: automatorsSelected,
24623
+ onChange: setAutomatorsSelected,
24624
+ title: "Remotion for Automators",
24625
+ subtitle: "Build video creation tools - $0.01 per render, $100/mo minimum"
24362
24626
  }),
24363
24627
  /* @__PURE__ */ jsx47("div", {
24364
- className: cn2("grid ease-out", creatorsSelected ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
24628
+ className: cn2("grid ease-out", automatorsSelected ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
24365
24629
  style: {
24366
- transition: creatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
24630
+ transition: automatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
24367
24631
  },
24368
- inert: !creatorsSelected,
24632
+ inert: !automatorsSelected,
24369
24633
  children: /* @__PURE__ */ jsxs8("div", {
24370
24634
  className: "overflow-hidden",
24371
24635
  children: [
24372
24636
  /* @__PURE__ */ jsx47("p", {
24373
24637
  className: "text-sm text-muted fontbrand pt-3 pb-1",
24374
- children: "Intended for low volume video creations through coding and prompting, and building motion design systems in a local environment. Get 1 Seat per user."
24638
+ children: "Intended for companies launching applications and systems; such as video editors, prompt-to-video apps, embedding the Remotion Player, or any other automated video creation. A $100/mo Minimum Spend applies. Developers working on automation projects do not require a Seat."
24375
24639
  }),
24376
24640
  /* @__PURE__ */ jsxs8("div", {
24377
24641
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
@@ -24379,19 +24643,19 @@ var CompanyPricing = () => {
24379
24643
  /* @__PURE__ */ jsx47("div", {
24380
24644
  className: "flex-1 min-w-0",
24381
24645
  children: /* @__PURE__ */ jsx47(PricingSlider, {
24382
- value: devSeatCount,
24383
- onChange: setDevSeatCount,
24384
- min: 1,
24385
- max: 50,
24386
- "aria-label": "Number of seats"
24646
+ value: cloudRenders,
24647
+ onChange: setCloudRenders,
24648
+ min: 1000,
24649
+ max: 1e5,
24650
+ step: 1000,
24651
+ "aria-label": "Number of renders"
24387
24652
  })
24388
24653
  }),
24389
24654
  /* @__PURE__ */ jsxs8("div", {
24390
- className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-center tabular-nums",
24655
+ className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-right tabular-nums",
24391
24656
  children: [
24392
- devSeatCount,
24393
- " ",
24394
- devSeatCount === 1 ? "Seat" : "Seats"
24657
+ new Intl.NumberFormat("en-US").format(cloudRenders),
24658
+ " Renders"
24395
24659
  ]
24396
24660
  }),
24397
24661
  /* @__PURE__ */ jsxs8("div", {
@@ -24400,7 +24664,7 @@ var CompanyPricing = () => {
24400
24664
  "$",
24401
24665
  new Intl.NumberFormat("en-US", {
24402
24666
  maximumFractionDigits: 0
24403
- }).format(SEAT_PRICE * devSeatCount)
24667
+ }).format(Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE)
24404
24668
  ]
24405
24669
  })
24406
24670
  ]
@@ -24412,23 +24676,23 @@ var CompanyPricing = () => {
24412
24676
  className: "h-6"
24413
24677
  }),
24414
24678
  /* @__PURE__ */ jsx47(SectionCheckbox, {
24415
- checked: automatorsSelected,
24416
- onChange: setAutomatorsSelected,
24417
- title: "Remotion for Automators",
24418
- subtitle: "Build video creation tools - $0.01 per render, $100/mo minimum"
24679
+ checked: creatorsSelected,
24680
+ onChange: setCreatorsSelected,
24681
+ title: "Remotion for Creators",
24682
+ subtitle: "Create videos for yourself - $25/mo per seat"
24419
24683
  }),
24420
24684
  /* @__PURE__ */ jsx47("div", {
24421
- className: cn2("grid ease-out", automatorsSelected ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
24685
+ className: cn2("grid ease-out", creatorsSelected ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"),
24422
24686
  style: {
24423
- transition: automatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
24687
+ transition: creatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
24424
24688
  },
24425
- inert: !automatorsSelected,
24689
+ inert: !creatorsSelected,
24426
24690
  children: /* @__PURE__ */ jsxs8("div", {
24427
24691
  className: "overflow-hidden",
24428
24692
  children: [
24429
24693
  /* @__PURE__ */ jsx47("p", {
24430
24694
  className: "text-sm text-muted fontbrand pt-3 pb-1",
24431
- children: "Intended for companies launching SaaS applications; such as video editors and prompt-to-video apps, and automated high-volume video creation. A $100/mo Minimum Spend applies. Developers working on automation projects do not require a Seat."
24695
+ children: "Intended for low volume video creations through coding and prompting, and building motion design systems in a local environment. Get 1 Seat per user."
24432
24696
  }),
24433
24697
  /* @__PURE__ */ jsxs8("div", {
24434
24698
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
@@ -24436,19 +24700,19 @@ var CompanyPricing = () => {
24436
24700
  /* @__PURE__ */ jsx47("div", {
24437
24701
  className: "flex-1 min-w-0",
24438
24702
  children: /* @__PURE__ */ jsx47(PricingSlider, {
24439
- value: cloudRenders,
24440
- onChange: setCloudRenders,
24441
- min: 1000,
24442
- max: 1e5,
24443
- step: 1000,
24444
- "aria-label": "Number of renders"
24703
+ value: devSeatCount,
24704
+ onChange: setDevSeatCount,
24705
+ min: 1,
24706
+ max: 50,
24707
+ "aria-label": "Number of seats"
24445
24708
  })
24446
24709
  }),
24447
24710
  /* @__PURE__ */ jsxs8("div", {
24448
- className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-right tabular-nums",
24711
+ className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-center tabular-nums",
24449
24712
  children: [
24450
- new Intl.NumberFormat("en-US").format(cloudRenders),
24451
- " Renders"
24713
+ devSeatCount,
24714
+ " ",
24715
+ devSeatCount === 1 ? "Seat" : "Seats"
24452
24716
  ]
24453
24717
  }),
24454
24718
  /* @__PURE__ */ jsxs8("div", {
@@ -24457,7 +24721,7 @@ var CompanyPricing = () => {
24457
24721
  "$",
24458
24722
  new Intl.NumberFormat("en-US", {
24459
24723
  maximumFractionDigits: 0
24460
- }).format(Math.ceil(cloudRenders / 1000) * RENDER_UNIT_PRICE)
24724
+ }).format(SEAT_PRICE * devSeatCount)
24461
24725
  ]
24462
24726
  })
24463
24727
  ]
@@ -24831,7 +25095,7 @@ var GitHubStars = () => {
24831
25095
  width: "45px"
24832
25096
  }),
24833
25097
  /* @__PURE__ */ jsx50(StatItemContent, {
24834
- content: "46k",
25098
+ content: "47k",
24835
25099
  width: "80px",
24836
25100
  fontSize: "2.5rem",
24837
25101
  fontWeight: "bold"
@@ -25031,9 +25295,9 @@ import { useEffect as useEffect24, useState as useState24 } from "react";
25031
25295
  import { useLayoutEffect as useLayoutEffect23 } from "react";
25032
25296
  import { useContext as useContext45, useEffect as useEffect52, useRef as useRef42 } from "react";
25033
25297
  import { useEffect as useEffect310, useRef as useRef26 } from "react";
25034
- import { useCallback as useCallback34, useContext as useContext39, useMemo as useMemo51, useRef as useRef43, useState as useState310 } from "react";
25298
+ import { useCallback as useCallback33, useContext as useContext39, useMemo as useMemo51, useRef as useRef43, useState as useState310 } from "react";
25035
25299
  import { useEffect as useEffect43, useRef as useRef310 } from "react";
25036
- import { useCallback as useCallback24, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
25300
+ import { useCallback as useCallback210, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
25037
25301
  import {
25038
25302
  forwardRef as forwardRef210,
25039
25303
  useEffect as useEffect132,
@@ -25043,9 +25307,9 @@ import {
25043
25307
  useRef as useRef112,
25044
25308
  useState as useState132
25045
25309
  } from "react";
25046
- import React103, {
25310
+ import React102, {
25047
25311
  Suspense as Suspense2,
25048
- forwardRef as forwardRef33,
25312
+ forwardRef as forwardRef34,
25049
25313
  useCallback as useCallback102,
25050
25314
  useContext as useContext52,
25051
25315
  useEffect as useEffect122,
@@ -25061,7 +25325,7 @@ import { jsx as jsx55 } from "react/jsx-runtime";
25061
25325
  import { useCallback as useCallback72, useEffect as useEffect112, useMemo as useMemo92, useRef as useRef82, useState as useState102 } from "react";
25062
25326
  import { jsx as jsx64 } from "react/jsx-runtime";
25063
25327
  import { useCallback as useCallback42, useMemo as useMemo410, useRef as useRef52, useState as useState62 } from "react";
25064
- import React54, { useCallback as useCallback35, useMemo as useMemo39, useState as useState52 } from "react";
25328
+ import React54, { useCallback as useCallback34, useMemo as useMemo39, useState as useState52 } from "react";
25065
25329
  import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
25066
25330
  import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
25067
25331
  import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo52, useState as useState82 } from "react";
@@ -25802,7 +26066,13 @@ var sequenceStyleSchema2 = {
25802
26066
  type: "hidden"
25803
26067
  }
25804
26068
  };
26069
+ var hiddenField2 = {
26070
+ type: "boolean",
26071
+ default: false,
26072
+ description: "Hidden"
26073
+ };
25805
26074
  var sequenceSchema2 = {
26075
+ hidden: hiddenField2,
25806
26076
  layout: {
25807
26077
  type: "enum",
25808
26078
  default: "absolute-fill",
@@ -25997,8 +26267,8 @@ import {
25997
26267
  useRef as useRef132,
25998
26268
  useState as useState142
25999
26269
  } from "react";
26000
- import React133, {
26001
- forwardRef as forwardRef34,
26270
+ import React132, {
26271
+ forwardRef as forwardRef35,
26002
26272
  Suspense as Suspense22,
26003
26273
  useCallback as useCallback122,
26004
26274
  useImperativeHandle as useImperativeHandle32,
@@ -26558,14 +26828,14 @@ var usePlayer = () => {
26558
26828
  throw new Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");
26559
26829
  }
26560
26830
  const { buffering } = bufferingContext;
26561
- const seek2 = useCallback34((newFrame) => {
26831
+ const seek2 = useCallback33((newFrame) => {
26562
26832
  if (video?.id) {
26563
26833
  setTimelinePosition((c) => ({ ...c, [video.id]: newFrame }));
26564
26834
  }
26565
26835
  frameRef.current = newFrame;
26566
26836
  emitter.dispatchSeek(newFrame);
26567
26837
  }, [emitter, setTimelinePosition, video?.id]);
26568
- const play = useCallback34((e) => {
26838
+ const play = useCallback33((e) => {
26569
26839
  if (imperativePlaying.current) {
26570
26840
  return;
26571
26841
  }
@@ -26592,7 +26862,7 @@ var usePlayer = () => {
26592
26862
  seek2,
26593
26863
  audioAndVideoTags
26594
26864
  ]);
26595
- const pause = useCallback34(() => {
26865
+ const pause = useCallback33(() => {
26596
26866
  if (imperativePlaying.current) {
26597
26867
  imperativePlaying.current = false;
26598
26868
  setPlaying(false);
@@ -26600,7 +26870,7 @@ var usePlayer = () => {
26600
26870
  audioContext?.suspend();
26601
26871
  }
26602
26872
  }, [emitter, imperativePlaying, setPlaying, audioContext]);
26603
- const pauseAndReturnToPlayStart = useCallback34(() => {
26873
+ const pauseAndReturnToPlayStart = useCallback33(() => {
26604
26874
  if (imperativePlaying.current) {
26605
26875
  imperativePlaying.current = false;
26606
26876
  frameRef.current = playStart.current;
@@ -26615,7 +26885,7 @@ var usePlayer = () => {
26615
26885
  }
26616
26886
  }, [config, emitter, imperativePlaying, setPlaying, setTimelinePosition]);
26617
26887
  const videoId = video?.id;
26618
- const frameBack = useCallback34((frames) => {
26888
+ const frameBack = useCallback33((frames) => {
26619
26889
  if (!videoId) {
26620
26890
  return null;
26621
26891
  }
@@ -26634,7 +26904,7 @@ var usePlayer = () => {
26634
26904
  };
26635
26905
  });
26636
26906
  }, [imperativePlaying, setFrame, videoId]);
26637
- const frameForward = useCallback34((frames) => {
26907
+ const frameForward = useCallback33((frames) => {
26638
26908
  if (!videoId) {
26639
26909
  return null;
26640
26910
  }
@@ -26653,20 +26923,20 @@ var usePlayer = () => {
26653
26923
  };
26654
26924
  });
26655
26925
  }, [videoId, imperativePlaying, lastFrame, setFrame]);
26656
- const toggle = useCallback34((e) => {
26926
+ const toggle = useCallback33((e) => {
26657
26927
  if (imperativePlaying.current) {
26658
26928
  pause();
26659
26929
  } else {
26660
26930
  play(e);
26661
26931
  }
26662
26932
  }, [imperativePlaying, pause, play]);
26663
- const isPlaying = useCallback34(() => {
26933
+ const isPlaying = useCallback33(() => {
26664
26934
  return imperativePlaying.current;
26665
26935
  }, [imperativePlaying]);
26666
- const getCurrentFrame = useCallback34(() => {
26936
+ const getCurrentFrame = useCallback33(() => {
26667
26937
  return frameRef.current;
26668
26938
  }, [frameRef]);
26669
- const isBuffering = useCallback34(() => {
26939
+ const isBuffering = useCallback33(() => {
26670
26940
  return buffering.current;
26671
26941
  }, [buffering]);
26672
26942
  const returnValue = useMemo51(() => {
@@ -27171,7 +27441,7 @@ var useElementSize = (ref, options2) => {
27171
27441
  });
27172
27442
  });
27173
27443
  }, [options2.shouldApplyCssTransforms]);
27174
- const updateSize = useCallback24(() => {
27444
+ const updateSize = useCallback210(() => {
27175
27445
  if (!ref.current) {
27176
27446
  return;
27177
27447
  }
@@ -27392,7 +27662,7 @@ var DefaultVolumeSlider = ({
27392
27662
  }, [isVertical]);
27393
27663
  const randomId = typeof React54.useId === "undefined" ? "volume-slider" : React54.useId();
27394
27664
  const [randomClass] = useState52(() => `__remotion-volume-slider-${random(randomId)}`.replace(".", ""));
27395
- const onVolumeChange = useCallback35((e) => {
27665
+ const onVolumeChange = useCallback34((e) => {
27396
27666
  setVolume(parseFloat(e.target.value));
27397
27667
  }, [setVolume]);
27398
27668
  const inputStyle = useMemo39(() => {
@@ -28348,7 +28618,7 @@ var useClickPreventionOnDoubleClick = (onClick, onDoubleClick, doubleClickToFull
28348
28618
  }, [doubleClickToFullscreen, handleDoubleClick, handlePointerDown, onClick]);
28349
28619
  return returnValue;
28350
28620
  };
28351
- var reactVersion = React103.version.split(".")[0];
28621
+ var reactVersion = React102.version.split(".")[0];
28352
28622
  if (reactVersion === "0") {
28353
28623
  throw new Error(`Version ${reactVersion} of "react" is not supported by Remotion`);
28354
28624
  }
@@ -28830,7 +29100,7 @@ var PlayerUI = ({
28830
29100
  })
28831
29101
  });
28832
29102
  };
28833
- var PlayerUI_default = forwardRef33(PlayerUI);
29103
+ var PlayerUI_default = forwardRef34(PlayerUI);
28834
29104
  var DEFAULT_VOLUME_PERSISTENCE_KEY = "remotion.volumePreference";
28835
29105
  var persistVolume = (volume, logLevel, volumePersistenceKey) => {
28836
29106
  if (typeof window === "undefined") {
@@ -29357,7 +29627,7 @@ var useThumbnail = () => {
29357
29627
  }, [emitter]);
29358
29628
  return returnValue;
29359
29629
  };
29360
- var reactVersion2 = React133.version.split(".")[0];
29630
+ var reactVersion2 = React132.version.split(".")[0];
29361
29631
  if (reactVersion2 === "0") {
29362
29632
  throw new Error(`Version ${reactVersion2} of "react" is not supported by Remotion`);
29363
29633
  }
@@ -29476,7 +29746,7 @@ var ThumbnailUI = ({
29476
29746
  })
29477
29747
  });
29478
29748
  };
29479
- var ThumbnailUI_default = forwardRef34(ThumbnailUI);
29749
+ var ThumbnailUI_default = forwardRef35(ThumbnailUI);
29480
29750
  var ThumbnailFn = ({
29481
29751
  frameToDisplay,
29482
29752
  style: style2,
@@ -29570,7 +29840,7 @@ var Thumbnail = forward2(ThumbnailFn);
29570
29840
 
29571
29841
  // src/components/homepage/Demo/index.tsx
29572
29842
  import {
29573
- useCallback as useCallback49,
29843
+ useCallback as useCallback48,
29574
29844
  useEffect as useEffect58,
29575
29845
  useMemo as useMemo64,
29576
29846
  useRef as useRef53,
@@ -29629,7 +29899,7 @@ function _isNativeReflectConstruct() {
29629
29899
  try {
29630
29900
  var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
29631
29901
  } catch (t2) {}
29632
- return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
29902
+ return (_isNativeReflectConstruct = function _isNativeReflectConstruct2() {
29633
29903
  return !!t;
29634
29904
  })();
29635
29905
  }
@@ -29647,7 +29917,7 @@ function _construct(t, e, r2) {
29647
29917
  // ../../node_modules/.bun/@babel+runtime@7.27.1/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
29648
29918
  function _wrapNativeSuper(t) {
29649
29919
  var r2 = typeof Map == "function" ? new Map : undefined;
29650
- return _wrapNativeSuper = function _wrapNativeSuper(t2) {
29920
+ return _wrapNativeSuper = function _wrapNativeSuper2(t2) {
29651
29921
  if (t2 === null || !_isNativeFunction(t2))
29652
29922
  return t2;
29653
29923
  if (typeof t2 != "function")
@@ -31446,8 +31716,7 @@ var videoIteratorManager = async ({
31446
31716
  getStartTime,
31447
31717
  getIsLooping,
31448
31718
  getEffects,
31449
- getEffectChainState,
31450
- getCurrentFrame
31719
+ getEffectChainState
31451
31720
  }) => {
31452
31721
  let videoIteratorsCreated = 0;
31453
31722
  let videoFrameIterator = null;
@@ -31477,7 +31746,6 @@ var videoIteratorManager = async ({
31477
31746
  source: frame.canvas,
31478
31747
  effects,
31479
31748
  output: canvas,
31480
- frame: getCurrentFrame(),
31481
31749
  width: canvas.width,
31482
31750
  height: canvas.height
31483
31751
  });
@@ -31590,7 +31858,6 @@ class MediaPlayer {
31590
31858
  onVideoFrameCallback = null;
31591
31859
  getEffects;
31592
31860
  getEffectChainState;
31593
- getCurrentFrame;
31594
31861
  initializationPromise = null;
31595
31862
  bufferState;
31596
31863
  isPremounting;
@@ -31619,8 +31886,7 @@ class MediaPlayer {
31619
31886
  credentials,
31620
31887
  tagType,
31621
31888
  getEffects,
31622
- getEffectChainState,
31623
- getCurrentFrame
31889
+ getEffectChainState
31624
31890
  }) {
31625
31891
  this.canvas = canvas ?? null;
31626
31892
  this.src = src;
@@ -31651,7 +31917,6 @@ class MediaPlayer {
31651
31917
  this.tagType = tagType;
31652
31918
  this.getEffects = getEffects;
31653
31919
  this.getEffectChainState = getEffectChainState;
31654
- this.getCurrentFrame = getCurrentFrame;
31655
31920
  if (canvas) {
31656
31921
  const context = canvas.getContext("2d", {
31657
31922
  alpha: true,
@@ -31761,8 +32026,7 @@ class MediaPlayer {
31761
32026
  getStartTime: () => this.getStartTime(),
31762
32027
  getIsLooping: () => this.loop,
31763
32028
  getEffects: this.getEffects,
31764
- getEffectChainState: this.getEffectChainState,
31765
- getCurrentFrame: this.getCurrentFrame
32029
+ getEffectChainState: this.getEffectChainState
31766
32030
  });
31767
32031
  }
31768
32032
  const startTime = this.getTrimmedTime(startTimeUnresolved);
@@ -32409,8 +32673,7 @@ var AudioForPreviewAssertedShowing = ({
32409
32673
  credentials,
32410
32674
  tagType: "audio",
32411
32675
  getEffects: () => [],
32412
- getEffectChainState: () => null,
32413
- getCurrentFrame: () => 0
32676
+ getEffectChainState: () => null
32414
32677
  });
32415
32678
  mediaPlayerRef.current = player;
32416
32679
  player.initialize(currentTimeRef.current, initialMuted.current).then((result) => {
@@ -34586,6 +34849,7 @@ var AudioForRendering2 = ({
34586
34849
  onError: fallbackHtml5AudioProps?.onError,
34587
34850
  toneFrequency,
34588
34851
  acceptableTimeShiftInSeconds: fallbackHtml5AudioProps?.acceptableTimeShiftInSeconds,
34852
+ preservePitch: fallbackHtml5AudioProps?.preservePitch ?? true,
34589
34853
  name,
34590
34854
  showInTimeline
34591
34855
  });
@@ -34609,7 +34873,8 @@ var audioSchema = {
34609
34873
  default: 1,
34610
34874
  description: "Playback Rate"
34611
34875
  },
34612
- loop: { type: "boolean", default: false, description: "Loop" }
34876
+ loop: { type: "boolean", default: false, description: "Loop" },
34877
+ hidden: Internals.hiddenField
34613
34878
  };
34614
34879
  var AudioInner = (props) => {
34615
34880
  const {
@@ -34619,6 +34884,7 @@ var AudioInner = (props) => {
34619
34884
  _experimentalControls: controls,
34620
34885
  from,
34621
34886
  durationInFrames,
34887
+ hidden,
34622
34888
  ...otherProps
34623
34889
  } = props;
34624
34890
  const environment = useRemotionEnvironment();
@@ -34678,6 +34944,7 @@ var AudioInner = (props) => {
34678
34944
  _experimentalControls: controls,
34679
34945
  _remotionInternalLoopDisplay: loopDisplay,
34680
34946
  showInTimeline: showInTimeline ?? true,
34947
+ hidden,
34681
34948
  children: environment.isRendering ? /* @__PURE__ */ jsx315(AudioForRendering2, {
34682
34949
  ...otherProps
34683
34950
  }) : /* @__PURE__ */ jsx315(AudioForPreview2, {
@@ -34799,8 +35066,6 @@ var VideoForPreviewAssertedShowing = ({
34799
35066
  experimentalEffectsRef.current = _experimentalEffects;
34800
35067
  const effectChainStateRef = useRef210(effectChainState);
34801
35068
  effectChainStateRef.current = effectChainState;
34802
- const frameRef = useRef210(frame);
34803
- frameRef.current = frame;
34804
35069
  const parentSequence = useContext47(SequenceContext22);
34805
35070
  const isPremounting = Boolean(parentSequence?.premounting);
34806
35071
  const isPostmounting = Boolean(parentSequence?.postmounting);
@@ -34906,8 +35171,7 @@ var VideoForPreviewAssertedShowing = ({
34906
35171
  credentials,
34907
35172
  tagType: "video",
34908
35173
  getEffects: () => experimentalEffectsRef.current,
34909
- getEffectChainState: (width, height) => effectChainStateRef.current?.get(width, height),
34910
- getCurrentFrame: () => frameRef.current
35174
+ getEffectChainState: (width, height) => effectChainStateRef.current?.get(width, height)
34911
35175
  });
34912
35176
  mediaPlayerRef.current = player;
34913
35177
  player.initialize(currentTimeRef.current, initialMuted.current).then((result) => {
@@ -35371,6 +35635,7 @@ var VideoForRendering2 = ({
35371
35635
  trimAfter: trimAfterValue,
35372
35636
  trimBefore: trimBeforeValue,
35373
35637
  useWebAudioApi: fallbackOffthreadVideoProps?.useWebAudioApi ?? false,
35638
+ preservePitch: fallbackOffthreadVideoProps?.preservePitch ?? true,
35374
35639
  startFrom: undefined,
35375
35640
  endAt: undefined,
35376
35641
  stack,
@@ -35421,6 +35686,11 @@ var videoSchema = {
35421
35686
  default: 1,
35422
35687
  description: "Playback Rate"
35423
35688
  },
35689
+ hidden: {
35690
+ type: "boolean",
35691
+ default: false,
35692
+ description: "Hidden"
35693
+ },
35424
35694
  loop: { type: "boolean", default: false, description: "Loop" },
35425
35695
  ...Internals.sequenceStyleSchema
35426
35696
  };
@@ -35559,7 +35829,8 @@ var VideoInner = ({
35559
35829
  _experimentalInitiallyDrawCachedFrame,
35560
35830
  _experimentalEffects,
35561
35831
  durationInFrames,
35562
- from
35832
+ from,
35833
+ hidden
35563
35834
  }) => {
35564
35835
  const fallbackLogLevel = Internals.useLogLevel();
35565
35836
  const [mediaVolume] = Internals.useMediaVolumeState();
@@ -35620,6 +35891,7 @@ var VideoInner = ({
35620
35891
  _remotionInternalLoopDisplay: loopDisplay,
35621
35892
  _experimentalEffects: memoizedEffectDefinitions,
35622
35893
  showInTimeline: showInTimeline ?? true,
35894
+ hidden,
35623
35895
  children: /* @__PURE__ */ jsx65(InnerVideo, {
35624
35896
  audioStreamIndex: audioStreamIndex ?? 0,
35625
35897
  className: className2,
@@ -35657,19 +35929,19 @@ var Video = Internals.wrapInSchema(VideoInner, videoSchema);
35657
35929
  Internals.addSequenceStackTraces(Video);
35658
35930
 
35659
35931
  // src/components/homepage/Demo/Comp.tsx
35660
- import { useCallback as useCallback41, useEffect as useEffect50, useMemo as useMemo58, useState as useState48 } from "react";
35932
+ import { useCallback as useCallback40, useEffect as useEffect50, useMemo as useMemo58, useState as useState48 } from "react";
35661
35933
 
35662
35934
  // src/components/homepage/Demo/Cards.tsx
35663
35935
  import {
35664
35936
  createRef as createRef4,
35665
- useCallback as useCallback40,
35937
+ useCallback as useCallback39,
35666
35938
  useEffect as useEffect49,
35667
35939
  useRef as useRef49,
35668
35940
  useState as useState47
35669
35941
  } from "react";
35670
35942
 
35671
35943
  // src/components/homepage/Demo/Card.tsx
35672
- import { useCallback as useCallback38, useRef as useRef46 } from "react";
35944
+ import { useCallback as useCallback37, useRef as useRef46 } from "react";
35673
35945
 
35674
35946
  // src/components/homepage/Demo/math.ts
35675
35947
  var paddingAndMargin = 20;
@@ -35703,10 +35975,10 @@ var getIndexFromPosition = (clientX, clientY) => {
35703
35975
  };
35704
35976
 
35705
35977
  // src/components/homepage/Demo/Switcher.tsx
35706
- import { useCallback as useCallback36 } from "react";
35978
+ import { useCallback as useCallback35 } from "react";
35707
35979
  import { jsx as jsx60, jsxs as jsxs14 } from "react/jsx-runtime";
35708
35980
  var Switcher = ({ type, theme, onTap }) => {
35709
- const onPointerDown = useCallback36((e) => {
35981
+ const onPointerDown = useCallback35((e) => {
35710
35982
  e.stopPropagation();
35711
35983
  onTap();
35712
35984
  }, [onTap]);
@@ -35769,7 +36041,7 @@ var Card2 = ({
35769
36041
  const refToUse = refsToUse[index2];
35770
36042
  const stopPrevious = useRef46([]);
35771
36043
  let newIndices = [...indices];
35772
- const applyPositions = useCallback38((except) => {
36044
+ const applyPositions = useCallback37((except) => {
35773
36045
  let stopped = false;
35774
36046
  stopPrevious.current.forEach((s) => {
35775
36047
  s();
@@ -35842,7 +36114,7 @@ var Card2 = ({
35842
36114
  update();
35843
36115
  });
35844
36116
  }, [newIndices, onUpdate, positions, refsToUse, shouldBePositions]);
35845
- const onPointerDown = useCallback38((e) => {
36117
+ const onPointerDown = useCallback37((e) => {
35846
36118
  e.currentTarget.setPointerCapture(e.pointerId);
35847
36119
  const cardLeft = refToUse.current.offsetLeft;
35848
36120
  const cardTop = refToUse.current.offsetTop;
@@ -35903,7 +36175,7 @@ var Card2 = ({
35903
36175
  }, { once: true });
35904
36176
  refToUse.current.addEventListener("pointermove", onMove);
35905
36177
  }, [applyPositions, index2, positions, refToUse, shouldBePositions]);
35906
- const onPointerUp = useCallback38((e) => {
36178
+ const onPointerUp = useCallback37((e) => {
35907
36179
  e.currentTarget.releasePointerCapture(e.pointerId);
35908
36180
  }, []);
35909
36181
  const { x, y } = getPositionForIndex(index2);
@@ -36029,8 +36301,8 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
36029
36301
 
36030
36302
  // src/components/homepage/Demo/EmojiCard.tsx
36031
36303
  import {
36032
- forwardRef as forwardRef35,
36033
- useCallback as useCallback39,
36304
+ forwardRef as forwardRef36,
36305
+ useCallback as useCallback38,
36034
36306
  useEffect as useEffect48,
36035
36307
  useImperativeHandle as useImperativeHandle12,
36036
36308
  useRef as useRef48
@@ -36314,7 +36586,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
36314
36586
  const ref2 = useRef48(null);
36315
36587
  const ref3 = useRef48(null);
36316
36588
  const transforms = useRef48([-100, 0, 100]);
36317
- const onLeft = useCallback39(() => {
36589
+ const onLeft = useCallback38(() => {
36318
36590
  if (!ref1.current || !ref2.current || !ref3.current) {
36319
36591
  return;
36320
36592
  }
@@ -36325,7 +36597,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
36325
36597
  transforms: transforms.current
36326
36598
  });
36327
36599
  }, []);
36328
- const onRight = useCallback39(() => {
36600
+ const onRight = useCallback38(() => {
36329
36601
  if (!ref1.current || !ref2.current || !ref3.current) {
36330
36602
  return;
36331
36603
  }
@@ -36426,7 +36698,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
36426
36698
  ]
36427
36699
  });
36428
36700
  };
36429
- var EmojiCard = forwardRef35(EmojiCardRefFn);
36701
+ var EmojiCard = forwardRef36(EmojiCardRefFn);
36430
36702
 
36431
36703
  // src/components/homepage/Demo/Minus.tsx
36432
36704
  import { jsx as jsx75 } from "react/jsx-runtime";
@@ -36785,11 +37057,11 @@ var Cards = ({
36785
37057
  };
36786
37058
  }, [onToggle]);
36787
37059
  const ref = useRef49(null);
36788
- const onLeft = useCallback40(() => {
37060
+ const onLeft = useCallback39(() => {
36789
37061
  ref.current?.onRight();
36790
37062
  onRightPress();
36791
37063
  }, [onRightPress]);
36792
- const onRight = useCallback40(() => {
37064
+ const onRight = useCallback39(() => {
36793
37065
  ref.current?.onLeft();
36794
37066
  onLeftPress();
36795
37067
  }, [onLeftPress]);
@@ -36859,7 +37131,7 @@ var HomepageVideoComp = ({
36859
37131
  onClickRight
36860
37132
  }) => {
36861
37133
  const [rerenders, setRerenders] = useState48(0);
36862
- const onUpdate = useCallback41((newIndices) => {
37134
+ const onUpdate = useCallback40((newIndices) => {
36863
37135
  setRerenders(rerenders + 1);
36864
37136
  updateCardOrder(newIndices);
36865
37137
  }, [rerenders, updateCardOrder]);
@@ -36957,7 +37229,7 @@ import {
36957
37229
  import { BufferTarget, StreamTarget } from "mediabunny";
36958
37230
 
36959
37231
  // ../core/dist/esm/version.mjs
36960
- var VERSION2 = "4.0.462";
37232
+ var VERSION2 = "4.0.463";
36961
37233
 
36962
37234
  // ../web-renderer/dist/esm/index.mjs
36963
37235
  import { AudioSample, VideoSample } from "mediabunny";
@@ -41586,7 +41858,7 @@ var renderMediaOnWeb = (options2) => {
41586
41858
  };
41587
41859
 
41588
41860
  // src/components/homepage/Demo/DemoRender.tsx
41589
- import React68, { useCallback as useCallback43 } from "react";
41861
+ import React68, { useCallback as useCallback41 } from "react";
41590
41862
  import { z } from "zod";
41591
41863
 
41592
41864
  // src/components/homepage/Demo/DemoErrorIcon.tsx
@@ -41787,7 +42059,7 @@ var RenderButton = ({ renderData, onError, playerRef }) => {
41787
42059
  const [state, setState] = React68.useState({
41788
42060
  type: "idle"
41789
42061
  });
41790
- const triggerRender = useCallback43(async () => {
42062
+ const triggerRender = useCallback41(async () => {
41791
42063
  if (renderData === null) {
41792
42064
  return;
41793
42065
  }
@@ -41962,10 +42234,10 @@ var DragAndDropNudge = () => {
41962
42234
  };
41963
42235
 
41964
42236
  // src/components/homepage/Demo/PlayerSeekBar.tsx
41965
- import { useCallback as useCallback46, useEffect as useEffect53, useMemo as useMemo61, useRef as useRef50, useState as useState51 } from "react";
42237
+ import { useCallback as useCallback45, useEffect as useEffect53, useMemo as useMemo61, useRef as useRef50, useState as useState51 } from "react";
41966
42238
 
41967
42239
  // src/components/homepage/layout/use-el-size.ts
41968
- import { useCallback as useCallback45, useEffect as useEffect51, useMemo as useMemo60, useState as useState50 } from "react";
42240
+ import { useCallback as useCallback43, useEffect as useEffect51, useMemo as useMemo60, useState as useState50 } from "react";
41969
42241
  var useElementSize2 = (ref) => {
41970
42242
  const [size4, setSize] = useState50(null);
41971
42243
  const observer = useMemo60(() => {
@@ -41979,7 +42251,7 @@ var useElementSize2 = (ref) => {
41979
42251
  });
41980
42252
  });
41981
42253
  }, []);
41982
- const updateSize = useCallback45(() => {
42254
+ const updateSize = useCallback43(() => {
41983
42255
  if (ref === null) {
41984
42256
  return;
41985
42257
  }
@@ -42131,7 +42403,7 @@ var PlayerSeekBar2 = ({
42131
42403
  dragging: false
42132
42404
  });
42133
42405
  const width2 = size4?.width ?? 0;
42134
- const onPointerDown = useCallback46((e) => {
42406
+ const onPointerDown = useCallback45((e) => {
42135
42407
  if (e.button !== 0) {
42136
42408
  return;
42137
42409
  }
@@ -42145,7 +42417,7 @@ var PlayerSeekBar2 = ({
42145
42417
  });
42146
42418
  onSeekStart();
42147
42419
  }, [durationInFrames, width2, playerRef, playing, onSeekStart]);
42148
- const onPointerMove = useCallback46((e) => {
42420
+ const onPointerMove = useCallback45((e) => {
42149
42421
  if (!size4) {
42150
42422
  throw new Error("Player has no size");
42151
42423
  }
@@ -42156,7 +42428,7 @@ var PlayerSeekBar2 = ({
42156
42428
  const _frame = getFrameFromX2(e.clientX - posLeft, durationInFrames, size4.width);
42157
42429
  playerRef.current.seekTo(_frame);
42158
42430
  }, [dragging.dragging, durationInFrames, playerRef, size4]);
42159
- const onPointerUp = useCallback46(() => {
42431
+ const onPointerUp = useCallback45(() => {
42160
42432
  setDragging({
42161
42433
  dragging: false
42162
42434
  });
@@ -42240,7 +42512,7 @@ var PlayerSeekBar2 = ({
42240
42512
  };
42241
42513
 
42242
42514
  // src/components/homepage/Demo/PlayerVolume.tsx
42243
- import { useCallback as useCallback47, useEffect as useEffect55, useRef as useRef51, useState as useState54 } from "react";
42515
+ import { useCallback as useCallback46, useEffect as useEffect55, useRef as useRef51, useState as useState54 } from "react";
42244
42516
 
42245
42517
  // src/components/homepage/Demo/icons.tsx
42246
42518
  import { jsx as jsx101 } from "react/jsx-runtime";
@@ -42321,7 +42593,7 @@ var PlayerVolume = ({ playerRef }) => {
42321
42593
  document.body.style.userSelect = "auto";
42322
42594
  }
42323
42595
  }, [isHovered]);
42324
- const onClick = useCallback47(() => {
42596
+ const onClick = useCallback46(() => {
42325
42597
  if (timerRef.current !== null) {
42326
42598
  clearTimeout(timerRef.current);
42327
42599
  timerRef.current = null;
@@ -42359,7 +42631,7 @@ var PlayerVolume = ({ playerRef }) => {
42359
42631
  };
42360
42632
 
42361
42633
  // src/components/homepage/Demo/PlayPauseButton.tsx
42362
- import React71, { useCallback as useCallback48, useEffect as useEffect56 } from "react";
42634
+ import React71, { useCallback as useCallback47, useEffect as useEffect56 } from "react";
42363
42635
  import { jsx as jsx107 } from "react/jsx-runtime";
42364
42636
  var playerButtonStyle2 = {
42365
42637
  appearance: "none",
@@ -42395,7 +42667,7 @@ var PlayPauseButton = ({ playerRef }) => {
42395
42667
  current.removeEventListener("pause", onPause);
42396
42668
  };
42397
42669
  }, [playerRef]);
42398
- const onToggle = useCallback48(() => {
42670
+ const onToggle = useCallback47(() => {
42399
42671
  playerRef.current?.toggle();
42400
42672
  }, [playerRef]);
42401
42673
  const playPauseIconStyle = {
@@ -42615,7 +42887,7 @@ var Demo = () => {
42615
42887
  playerRef.removeEventListener("fullscreenchange", onFullscreenChange);
42616
42888
  };
42617
42889
  }, [data2]);
42618
- const updateCardOrder = useCallback49((newCardOrder) => {
42890
+ const updateCardOrder = useCallback48((newCardOrder) => {
42619
42891
  setCardOrder(newCardOrder);
42620
42892
  }, []);
42621
42893
  const props = useMemo64(() => {
@@ -42637,7 +42909,7 @@ var Demo = () => {
42637
42909
  emojiIndex
42638
42910
  };
42639
42911
  }, [cardOrder, emojiIndex, colorMode, data2, updateCardOrder]);
42640
- const onError = useCallback49(() => {
42912
+ const onError = useCallback48(() => {
42641
42913
  setError(true);
42642
42914
  }, []);
42643
42915
  return /* @__PURE__ */ jsxs38("div", {
@@ -42747,12 +43019,12 @@ var ClearButton = (props) => {
42747
43019
 
42748
43020
  // src/components/homepage/MuxVideo.tsx
42749
43021
  import Hls2 from "hls.js";
42750
- import { forwardRef as forwardRef38, useEffect as useEffect60, useImperativeHandle as useImperativeHandle14, useRef as useRef56 } from "react";
43022
+ import { forwardRef as forwardRef39, useEffect as useEffect60, useImperativeHandle as useImperativeHandle14, useRef as useRef56 } from "react";
42751
43023
 
42752
43024
  // src/components/homepage/VideoPlayerWithControls.tsx
42753
43025
  import Hls from "hls.js";
42754
43026
  import"plyr/dist/plyr.css";
42755
- import { forwardRef as forwardRef37, useCallback as useCallback50, useEffect as useEffect59, useRef as useRef55, useState as useState57 } from "react";
43027
+ import { forwardRef as forwardRef38, useCallback as useCallback49, useEffect as useEffect59, useRef as useRef55, useState as useState57 } from "react";
42756
43028
  import { jsx as jsx116 } from "react/jsx-runtime";
42757
43029
  var useCombinedRefs = function(...refs) {
42758
43030
  const targetRef = useRef55(null);
@@ -42769,13 +43041,13 @@ var useCombinedRefs = function(...refs) {
42769
43041
  }, [refs]);
42770
43042
  return targetRef;
42771
43043
  };
42772
- var VideoPlayerWithControls = forwardRef37(({ playbackId, poster, currentTime, onLoaded, onError, onSize, autoPlay }, ref) => {
43044
+ var VideoPlayerWithControls = forwardRef38(({ playbackId, poster, currentTime, onLoaded, onError, onSize, autoPlay }, ref) => {
42773
43045
  const videoRef = useRef55(null);
42774
43046
  const metaRef = useCombinedRefs(ref, videoRef);
42775
43047
  const playerRef = useRef55(null);
42776
43048
  const [playerInitTime] = useState57(Date.now());
42777
- const videoError = useCallback50((event) => onError(event), [onError]);
42778
- const onImageLoad = useCallback50((event) => {
43049
+ const videoError = useCallback49((event) => onError(event), [onError]);
43050
+ const onImageLoad = useCallback49((event) => {
42779
43051
  const [w, h] = [event.target.width, event.target.height];
42780
43052
  if (w && h) {
42781
43053
  onSize({ width: w, height: h });
@@ -42885,7 +43157,7 @@ var MuxVideoForward = ({ muxId, ...props }, ref) => {
42885
43157
  ...props
42886
43158
  });
42887
43159
  };
42888
- var MuxVideo = forwardRef38(MuxVideoForward);
43160
+ var MuxVideo = forwardRef39(MuxVideoForward);
42889
43161
 
42890
43162
  // src/components/homepage/EditorStarterSection.tsx
42891
43163
  import { jsx as jsx118, jsxs as jsxs39 } from "react/jsx-runtime";
@@ -43149,13 +43421,13 @@ var IfYouKnowReact = () => {
43149
43421
  };
43150
43422
 
43151
43423
  // src/components/homepage/NewsletterButton.tsx
43152
- import { useCallback as useCallback51, useState as useState60 } from "react";
43424
+ import { useCallback as useCallback50, useState as useState60 } from "react";
43153
43425
  import { jsx as jsx121, jsxs as jsxs44 } from "react/jsx-runtime";
43154
43426
  var NewsletterButton = () => {
43155
43427
  const [email, setEmail] = useState60("");
43156
43428
  const [submitting, setSubmitting] = useState60(false);
43157
43429
  const [subscribed, setSubscribed] = useState60(false);
43158
- const handleSubmit = useCallback51(async (e) => {
43430
+ const handleSubmit = useCallback50(async (e) => {
43159
43431
  try {
43160
43432
  setSubmitting(true);
43161
43433
  e.preventDefault();
@@ -45222,7 +45494,7 @@ var GithubButton = () => {
45222
45494
  " ",
45223
45495
  /* @__PURE__ */ jsx164("div", {
45224
45496
  className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center",
45225
- children: "46k"
45497
+ children: "47k"
45226
45498
  })
45227
45499
  ]
45228
45500
  });