@1agh/maude 0.39.1 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/apps/studio/ai-banner.tsx +2 -2
- package/apps/studio/annotations-context-toolbar.tsx +44 -1
- package/apps/studio/annotations-layer.tsx +306 -5
- package/apps/studio/annotations-model.ts +107 -6
- package/apps/studio/api.ts +1316 -67
- package/apps/studio/artboard-marquee.tsx +1 -1
- package/apps/studio/bin/_canvas-rects-playwright.mjs +55 -0
- package/apps/studio/bin/_canvas-rects-static.mjs +166 -0
- package/apps/studio/bin/_fetch-asset.mjs +556 -0
- package/apps/studio/bin/_html-playwright.mjs +9 -1
- package/apps/studio/bin/_pdf-playwright.mjs +8 -1
- package/apps/studio/bin/_png-playwright.mjs +8 -1
- package/apps/studio/bin/_pw-launch.mjs +54 -0
- package/apps/studio/bin/_svg-playwright.mjs +8 -1
- package/apps/studio/bin/_video-playwright.mjs +452 -0
- package/apps/studio/bin/annotate.mjs +576 -34
- package/apps/studio/bin/canvas-rects.sh +152 -0
- package/apps/studio/bin/fetch-asset.sh +34 -0
- package/apps/studio/bin/prep.sh +8 -1
- package/apps/studio/bin/read-annotations.mjs +138 -7
- package/apps/studio/bin/smoke.sh +42 -6
- package/apps/studio/build.ts +21 -0
- package/apps/studio/canvas-comment-mount.tsx +138 -4
- package/apps/studio/canvas-edit.ts +2625 -111
- package/apps/studio/canvas-lib.tsx +238 -2
- package/apps/studio/canvas-list-watch.ts +6 -2
- package/apps/studio/canvas-shell.tsx +514 -20
- package/apps/studio/client/app.jsx +2480 -52
- package/apps/studio/client/comments-overlay.css +130 -126
- package/apps/studio/client/github.js +15 -0
- package/apps/studio/client/panels/TimelinePanel.jsx +860 -0
- package/apps/studio/client/panels/timeline-parse.js +229 -0
- package/apps/studio/client/panels/timeline-snap.js +55 -0
- package/apps/studio/client/styles/3-shell-maude.css +155 -0
- package/apps/studio/comments-overlay.tsx +148 -41
- package/apps/studio/config.schema.json +14 -0
- package/apps/studio/context-menu.tsx +16 -6
- package/apps/studio/context.ts +113 -1
- package/apps/studio/contextual-toolbar.tsx +262 -4
- package/apps/studio/cursors-overlay.tsx +4 -4
- package/apps/studio/dist/client.bundle.js +89 -17
- package/apps/studio/dist/comment-mount.js +59 -1
- package/apps/studio/dist/runtime/.min-sizes.json +11 -1
- package/apps/studio/dist/runtime/@remotion_media.js +491 -0
- package/apps/studio/dist/runtime/@remotion_player.js +56 -0
- package/apps/studio/dist/runtime/@remotion_transitions.js +300 -0
- package/apps/studio/dist/runtime/@remotion_transitions_clock-wipe.js +1 -0
- package/apps/studio/dist/runtime/@remotion_transitions_fade.js +1 -0
- package/apps/studio/dist/runtime/@remotion_transitions_flip.js +1 -0
- package/apps/studio/dist/runtime/@remotion_transitions_none.js +1 -0
- package/apps/studio/dist/runtime/@remotion_transitions_slide.js +1 -0
- package/apps/studio/dist/runtime/@remotion_transitions_wipe.js +1 -0
- package/apps/studio/dist/runtime/REMOTION-LICENSE.md +28 -0
- package/apps/studio/dist/runtime/remotion.js +42 -0
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/dom-selection.ts +127 -1
- package/apps/studio/drag-state.ts +24 -0
- package/apps/studio/equal-spacing-detector.ts +205 -0
- package/apps/studio/export-dialog.tsx +1 -1
- package/apps/studio/exporters/_browser-bundles.ts +117 -0
- package/apps/studio/exporters/_runtime.ts +69 -0
- package/apps/studio/exporters/html.ts +4 -3
- package/apps/studio/exporters/index.ts +28 -2
- package/apps/studio/exporters/pdf.ts +4 -3
- package/apps/studio/exporters/png.ts +5 -3
- package/apps/studio/exporters/pptx.ts +6 -4
- package/apps/studio/exporters/svg.ts +9 -5
- package/apps/studio/exporters/video-encode-lib.ts +200 -0
- package/apps/studio/exporters/video-render-lib.ts +108 -0
- package/apps/studio/exporters/video.ts +184 -0
- package/apps/studio/history.ts +47 -1
- package/apps/studio/http.ts +758 -27
- package/apps/studio/input-router.tsx +19 -1
- package/apps/studio/marquee-overlay.tsx +1 -1
- package/apps/studio/measure-overlay.tsx +241 -0
- package/apps/studio/participants-chrome.tsx +3 -3
- package/apps/studio/runtime-bundle.ts +30 -0
- package/apps/studio/server.ts +34 -9
- package/apps/studio/sizing-mode.ts +117 -0
- package/apps/studio/spacing-handles.ts +166 -0
- package/apps/studio/test/annotate-write.test.ts +890 -0
- package/apps/studio/test/annotations-roundtrip.test.ts +47 -0
- package/apps/studio/test/camera-reveal.test.tsx +173 -0
- package/apps/studio/test/canvas-create-api.test.ts +76 -0
- package/apps/studio/test/canvas-edit.test.ts +140 -0
- package/apps/studio/test/canvas-list-watch.test.ts +49 -0
- package/apps/studio/test/canvas-media-drop.test.ts +30 -1
- package/apps/studio/test/canvas-origin-gate.test.ts +54 -0
- package/apps/studio/test/canvas-rects.test.ts +198 -0
- package/apps/studio/test/clip-addressing.test.ts +732 -0
- package/apps/studio/test/comments-overlay.test.ts +117 -0
- package/apps/studio/test/config-reload.test.ts +230 -0
- package/apps/studio/test/dns-rebinding-guard.test.ts +74 -0
- package/apps/studio/test/dom-selection.test.ts +130 -0
- package/apps/studio/test/edit-css-occurrence.test.ts +81 -0
- package/apps/studio/test/edit-persistence.test.ts +91 -0
- package/apps/studio/test/edit-scope-api.test.ts +115 -0
- package/apps/studio/test/element-resize.test.ts +136 -0
- package/apps/studio/test/element-structural-api.test.ts +360 -0
- package/apps/studio/test/element-structural-edit.test.ts +233 -0
- package/apps/studio/test/equal-spacing-detector.test.ts +165 -1
- package/apps/studio/test/exporters/runtime.test.ts +59 -0
- package/apps/studio/test/file-lock.test.ts +84 -0
- package/apps/studio/test/fixtures/video-comp-fixture.tsx +82 -0
- package/apps/studio/test/history-rollback.test.ts +26 -0
- package/apps/studio/test/knob-props-authored.test.ts +87 -0
- package/apps/studio/test/read-annotations.test.ts +154 -0
- package/apps/studio/test/sizing-mode.test.ts +102 -0
- package/apps/studio/test/spacing-handles.test.ts +138 -0
- package/apps/studio/test/specimen-select.test.ts +88 -0
- package/apps/studio/test/timeline-parse.test.ts +127 -0
- package/apps/studio/test/timeline-snap.test.ts +85 -0
- package/apps/studio/test/tool-palette-insert-anchor.test.ts +84 -0
- package/apps/studio/test/undo-sequence-byte-compare.test.ts +211 -0
- package/apps/studio/test/video-asset.test.ts +163 -0
- package/apps/studio/test/video-comp-fixture.test.ts +50 -0
- package/apps/studio/test/video-comp.test.ts +168 -0
- package/apps/studio/test/video-render-bridge.test.ts +149 -0
- package/apps/studio/tool-palette.tsx +122 -2
- package/apps/studio/undo-hud.tsx +2 -2
- package/apps/studio/use-annotation-resize.tsx +6 -3
- package/apps/studio/use-canvas-media-drop.tsx +66 -4
- package/apps/studio/use-element-resize.tsx +732 -0
- package/apps/studio/use-keyboard-discipline.tsx +205 -15
- package/apps/studio/use-selection-set.tsx +14 -0
- package/apps/studio/use-spacing-handles.tsx +388 -0
- package/apps/studio/video-comp.tsx +444 -0
- package/apps/studio/whats-new.json +55 -0
- package/apps/studio/ws.ts +5 -0
- package/cli/commands/design.mjs +6 -1
- package/cli/commands/design.test.mjs +49 -1
- package/cli/lib/fetch-asset.test.mjs +213 -0
- package/package.json +8 -8
- package/plugins/design/dependencies.json +10 -2
- package/plugins/design/templates/_shell.html +25 -2
- package/plugins/design/templates/design-system-inspiration/_MAPPING.md +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var n0=Object.defineProperty;var a0=(j,J)=>{for(var Q in J)n0(j,Q,{get:J[Q],enumerable:!0,configurable:!0,set:($)=>J[Q]=()=>$})};var xJ={};a0(xJ,{Thumbnail:()=>u8,PlayerInternals:()=>s8,Player:()=>L8});import{createContext as r1}from"react";import{jsx as i,jsxs as bJ,Fragment as o1}from"react/jsx-runtime";import{jsx as OJ,jsxs as K5,Fragment as D5}from"react/jsx-runtime";import{Internals as A5}from"remotion";import S0 from"react";import{useContext as B5,useEffect as _5,useState as N5}from"react";import{Internals as oQ}from"remotion";import{useContext as E5,useLayoutEffect as O5}from"react";import{Internals as V5}from"remotion";import{jsx as C5}from"react/jsx-runtime";import{useEffect as z5,useState as M5}from"react";import{useLayoutEffect as nQ}from"react";import{useContext as aQ,useEffect as dJ,useRef as P5}from"react";import{Internals as bj}from"remotion";import{useEffect as VJ,useRef as L5}from"react";import{useCallback as Wj,useContext as CJ,useMemo as S5,useRef as tQ,useState as F5}from"react";import{Internals as e}from"remotion";import{useEffect as k5,useRef as I5}from"react";import{Internals as y5}from"remotion";import{useCallback as f5,useEffect as zJ,useMemo as J0,useState as h5}from"react";import{forwardRef as d5,useEffect as m5,useImperativeHandle as c5,useLayoutEffect as l5,useMemo as aj,useRef as cJ,useState as kj}from"react";import{Composition as Q0,Internals as Ij}from"remotion";import p5,{Suspense as i5,forwardRef as u5,useCallback as Yj,useContext as $0,useEffect as Tj,useImperativeHandle as s5,useMemo as Cj,useRef as W0,useState as tj}from"react";import{Internals as ej}from"remotion";import r5 from"react";import{jsx as o5}from"react/jsx-runtime";import a5,{useEffect as Y0}from"react";import{jsx as Z0}from"react/jsx-runtime";import{useCallback as MJ,useEffect as pJ,useMemo as iJ,useRef as uJ,useState as sJ}from"react";import{jsx as rJ}from"react/jsx-runtime";import{useCallback as oJ,useMemo as PJ,useRef as H0,useState as J7}from"react";import{Internals as nJ}from"remotion";import K0,{useCallback as Q7,useMemo as D0,useState as $7}from"react";import{random as W7}from"remotion";import{jsx as HQ,jsxs as Y7}from"react/jsx-runtime";import{jsx as aJ,jsxs as G7}from"react/jsx-runtime";import{useCallback as WJ,useEffect as K7,useMemo as x0,useState as y0}from"react";import{Internals as R0}from"remotion";import{useEffect as D7,useRef as U7,useState as q7}from"react";import{jsx as _j,jsxs as KQ}from"react/jsx-runtime";import{useCallback as tJ,useEffect as S7,useMemo as eJ,useRef as F7,useState as w7}from"react";import{Internals as b7,interpolate as k7}from"remotion";import{jsx as jQ,jsxs as q0}from"react/jsx-runtime";import{useMemo as v7}from"react";import{Internals as f7}from"remotion";import{jsxs as h7}from"react/jsx-runtime";import{useMemo as d7}from"react";import{jsx as f,jsxs as LJ,Fragment as l7}from"react/jsx-runtime";import{useCallback as JQ,useMemo as j8}from"react";import{useCallback as QQ,useMemo as $8,useRef as W8}from"react";import{jsx as Zj,jsxs as $Q,Fragment as X8}from"react/jsx-runtime";import{useCallback as D8,useMemo as QJ,useState as B0}from"react";import{Internals as l}from"remotion";import{Internals as U8}from"remotion";import{jsx as p}from"react/jsx-runtime";import{Internals as T8}from"remotion";var AJ=(j)=>{return Math.round(j*1e6)/1e6},t0=new Set(["deg","rad","grad","turn"]),RQ=new Set(["%","cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvh","dvw","em","ex","ic","in","lh","lvh","lvw","mm","pc","pt","px","q","rem","rlh","svh","svw","vb","vh","vi","vmax","vmin","vw"]),vQ=/^([+-]?(?:\d+\.?\d*|\.\d+))([a-zA-Z%]+)?$/,fQ=new Set(["left","center","right","top","bottom"]),Sj=(j)=>{if(j==="left")return[{axis:"x",value:{value:0,unit:"%"}}];if(j==="right")return[{axis:"x",value:{value:100,unit:"%"}}];if(j==="top")return[{axis:"y",value:{value:0,unit:"%"}}];if(j==="bottom")return[{axis:"y",value:{value:100,unit:"%"}}];return[{axis:"x",value:{value:50,unit:"%"}},{axis:"y",value:{value:50,unit:"%"}}]},uj={value:50,unit:"%"},PQ=(j)=>{return String(AJ(j))},e0=(j,J)=>{let Q=vQ.exec(j);if(Q===null)throw TypeError(`Cannot interpolate "${J}" because "${j}" is not a supported scale, translate, or rotate value`);let $=Q[2]??null,W=Number(Q[1]);if(!Number.isFinite(W))throw TypeError(`Cannot interpolate "${J}" because "${j}" is not finite`);if($===null)return{kind:"scale",value:W,unit:null};if(t0.has($))return{kind:"rotate",value:W,unit:$};if(RQ.has($))return{kind:"translate",value:W,unit:$};throw TypeError(`Cannot interpolate "${J}" because "${$}" is not a supported translate or rotate unit`)},hQ=({component:j,value:J,allowPercentage:Q})=>{let $=vQ.exec(j);if($===null)throw TypeError(`Cannot interpolate "${J}" because "${j}" is not a supported transform-origin ${Q?"length-percentage":"z length"}`);let W=$[2]??null,Y=Number($[1]);if(!Number.isFinite(Y))throw TypeError(`Cannot interpolate "${J}" because "${j}" is not finite`);if(W===null||!RQ.has(W)||!Q&&W==="%")throw TypeError(`Cannot interpolate "${J}" because "${j}" is not a supported transform-origin ${Q?"length-percentage":"z length"}`);return{value:Y,unit:W}},RJ=(j,J)=>{let Q=j.toLowerCase();if(fQ.has(Q))return{type:"keyword",keyword:Q};return{type:"length-percentage",parsed:hQ({component:j,value:J,allowPercentage:!0})}},j1=(j,J,Q)=>{let $=[];for(let W of Sj(j))for(let Y of Sj(J)){if(W.axis===Y.axis)continue;$.push(W.axis==="x"?[W.value,Y.value]:[Y.value,W.value])}if($.length===0)throw TypeError(`Cannot interpolate "${Q}" because "${j} ${J}" is not a valid transform-origin keyword pair`);return $[0]},J1=(j,J)=>{if(j.length===1){let Z=RJ(j[0],J);if(Z.type==="length-percentage")return[Z.parsed,uj];if(Z.keyword==="top"||Z.keyword==="bottom")return[uj,Sj(Z.keyword)[0].value];return[Sj(Z.keyword)[0].value,uj]}let Q=RJ(j[0],J),$=RJ(j[1],J);if(Q.type==="length-percentage"&&$.type==="length-percentage")return[Q.parsed,$.parsed];if(Q.type==="keyword"&&$.type==="keyword")return j1(Q.keyword,$.keyword,J);let W=Q.type==="keyword"?Q:$.type==="keyword"?$:null,Y=Q.type==="length-percentage"?Q.parsed:$.type==="length-percentage"?$.parsed:null;if(W===null||Y===null)throw Error("Expected a keyword and a length-percentage value");let G=Q.type==="keyword";if(W.keyword==="left"||W.keyword==="right"){if(!G)throw TypeError(`Cannot interpolate "${J}" because horizontal transform-origin keywords must come before a length-percentage value`);return[Sj(W.keyword)[0].value,Y]}if(W.keyword==="top"||W.keyword==="bottom")return[Y,Sj(W.keyword)[0].value];return G?[uj,Y]:[Y,uj]},Q1=(j,J)=>{let[Q,$]=J1(J.slice(0,2),j),W=J[2]===void 0?{value:0,unit:null}:hQ({component:J[2],value:j,allowPercentage:!1});return{kind:"translate",values:[Q.value,$.value,W.value],units:[Q.unit,$.unit,W.unit],dimensions:J[2]===void 0?2:3}},$1=(j)=>{if(typeof j==="number"){if(!Number.isFinite(j))throw Error(`outputRange must contain only finite numbers, but got [${j}]`);return{kind:"scale",values:[j,j,1],units:[null,null,null],dimensions:1}}let J=j.trim().split(/\s+/);if(J.length<1||J.length>3||J[0]==="")throw TypeError(`String outputRange values must contain 1 to 3 components, but got "${j}"`);if(J.some((W)=>fQ.has(W.toLowerCase())))return Q1(j,J);let Q=J.map((W)=>e0(W,j)),[{kind:$}]=Q;for(let W of Q)if(W.kind!==$)throw TypeError(`Cannot interpolate "${j}" because it mixes ${$} and ${W.kind} values`);if($==="scale"){let W=Q[0].value,Y=Q[1]?.value??W,G=Q[2]?.value??1;return{kind:$,values:[W,Y,G],units:[null,null,null],dimensions:Q.length}}return{kind:$,values:[Q[0].value,Q[1]?.value??0,Q[2]?.value??0],units:[Q[0].unit,Q[1]?.unit??null,Q[2]?.unit??null],dimensions:Q.length}},W1=({kind:j,values:J,units:Q,dimensions:$})=>{if(j==="scale")return J.slice(0,$).map((W)=>PQ(W)).join(" ");return J.slice(0,$).map((W,Y)=>`${PQ(W)}${Q[Y]}`).join(" ")};function Y1(j,J,Q,$){let{extrapolateLeft:W,extrapolateRight:Y,easing:G}=$,Z=j,[X,H]=J,[K,U]=Q;if(Z<X){if(W==="identity")return Z;if(W==="clamp")Z=X;else if(W==="wrap"){let D=H-X;Z=((Z-X)%D+D)%D+X}}if(Z>H){if(Y==="identity")return Z;if(Y==="clamp")Z=H;else if(Y==="wrap"){let D=H-X;Z=((Z-X)%D+D)%D+X}}if(K===U)return K;return Z=(Z-X)/(H-X),Z=G(Z),Z=Z*(U-K)+K,Z}function Z1(j,J){let Q;for(Q=1;Q<J.length-1;++Q)if(J[Q]>=j)break;return Q-1}var X1=(j)=>j,gQ=(j)=>{return j.remotionShouldExtendRight===!0},LQ=({easing:j,segmentIndex:J})=>{if(j===void 0)return X1;if(typeof j==="function")return j;return j[J]},SQ=({input:j,inputRange:J,outputRange:Q,easing:$,extrapolateLeft:W,extrapolateRight:Y})=>{return Y1(j,J,Q,{easing:$,extrapolateLeft:W,extrapolateRight:j>J[1]&&Y==="clamp"&&gQ($)?"extend":Y})},gJ=({input:j,inputRange:J,outputRange:Q,options:$})=>{if(J.length===1)return Q[0];let W=$?.easing,Y="extend";if($?.extrapolateLeft!==void 0)Y=$.extrapolateLeft;let G="extend";if($?.extrapolateRight!==void 0)G=$.extrapolateRight;let Z=$?.posterize===void 0?j:Math.floor(j/$.posterize)*$.posterize,X=Z1(Z,J),H=LQ({easing:W,segmentIndex:X}),K=SQ({input:Z,inputRange:[J[X],J[X+1]],outputRange:[Q[X],Q[X+1]],easing:H,extrapolateLeft:Y,extrapolateRight:G});for(let U=0;U<X;U++){let D=LQ({easing:W,segmentIndex:U});if(!gQ(D))continue;let A=J[U+1];if(Z<=A)continue;let T=SQ({input:Z,inputRange:[J[U],A],outputRange:[Q[U],Q[U+1]],easing:D,extrapolateLeft:Y,extrapolateRight:"extend"});K+=T-Q[U+1]}return K},G1=({input:j,inputRange:J,outputRange:Q,options:$})=>{let W=Q.map($1),Y=W[0]?.kind;if(Y===void 0)throw Error("outputRange must have at least 1 element");for(let X of W)if(X.kind!==Y)throw TypeError(`Cannot interpolate ${Y} values with ${X.kind} values`);let G=Math.max(...W.map((X)=>X.dimensions)),Z=[null,null,null];if(Y!=="scale")for(let X=0;X<G;X++){for(let H of W){let K=H.units[X];if(K===null)continue;if(Z[X]===null){Z[X]=K;continue}if(Z[X]!==K)throw TypeError(`Cannot interpolate ${Y} values with different units on axis ${X+1}: ${Z[X]} and ${K}`)}if(Z[X]===null)throw TypeError(`Cannot interpolate ${Y} values because axis ${X+1} has no unit`)}return W1({kind:Y,values:[0,0,0].map((X,H)=>gJ({input:j,inputRange:J,outputRange:W.map((K)=>K.values[H]),options:$})),units:Z,dimensions:G})},H1=(j)=>{let J=j[0]?.length;if(J===void 0)throw Error("outputRange must have at least 1 element");if(J===0)throw TypeError("outputRange tuples must contain at least 1 number");for(let Q of j){if(Q.length!==J)throw TypeError(`outputRange tuples must all have the same length, but got ${J} and ${Q.length}`);for(let $ of Q)if(typeof $!=="number"||!Number.isFinite($))throw TypeError(`outputRange tuples must contain only finite numbers, but got [${Q.join(",")}]`)}return J},K1=({input:j,inputRange:J,outputRange:Q,options:$})=>{let W=H1(Q);return Array(W).fill(!0).map((Y,G)=>gJ({input:j,inputRange:J,outputRange:Q.map((Z)=>Z[G]),options:$}))};function D1(j){for(let J=1;J<j.length;++J)if(!(j[J]>j[J-1]))throw Error(`inputRange must be strictly monotonically increasing but got [${j.join(",")}]`)}function FQ(j,J){if(J.length<1)throw Error(j+" must have at least 1 element");for(let Q of J){if(typeof Q!=="number")throw Error(`${j} must contain only numbers`);if(!Number.isFinite(Q))throw Error(`${j} must contain only finite numbers, but got [${J.join(",")}]`)}}function U1(j,J){if(j===void 0)return;if(typeof j==="function")return;let Q=J-1;if(j.length!==Q)throw Error(`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = ${Q}), but got length ${j.length}`);for(let $=0;$<j.length;$++)if(typeof j[$]!=="function")throw Error(`easing[${$}] must be a function`)}function q1(j){if(j===void 0)return;if(typeof j!=="number"||!Number.isFinite(j)||j<=0)throw Error(`posterize must be a positive finite number, but got ${j}`)}function A1(j,J,Q,$){if(typeof j>"u")throw Error("input can not be undefined");if(typeof J>"u")throw Error("inputRange can not be undefined");if(typeof Q>"u")throw Error("outputRange can not be undefined");if(J.length!==Q.length)throw Error("inputRange ("+J.length+") and outputRange ("+Q.length+") must have the same length");if(FQ("inputRange",J),D1(J),U1($?.easing,J.length),q1($?.posterize),typeof j!=="number")throw TypeError("Cannot interpolate an input which is not a number");if(!Array.isArray(Q))throw Error("outputRange must contain only numbers");if(Q.some((Y)=>typeof Y==="string")){if(!Q.every((Y)=>typeof Y==="string"||typeof Y==="number"))throw TypeError("outputRange must contain only numbers, or supported scale, translate, and rotate strings");return G1({input:j,inputRange:J,outputRange:Q,options:$})}if(Q.every((Y)=>Array.isArray(Y)))return K1({input:j,inputRange:J,outputRange:Q,options:$});if(!Q.every((Y)=>typeof Y==="number"))throw TypeError("outputRange must contain only numbers, numeric tuples, or supported scale, translate, and rotate strings");return FQ("outputRange",Q),gJ({input:j,inputRange:J,outputRange:Q,options:$})}function T1(j){return Boolean(j)}if(typeof window<"u"){if(window.remotion_renderReady=!1,!window.remotion_delayRenderTimeouts)window.remotion_delayRenderTimeouts={};window.remotion_delayRenderHandles=[]}var B1="The delayRender was called:",_1="Retries left: ",N1="- Rendering the frame will be retried.",E1="handle was cleared after",O1=({schema:j,key:J,value:Q})=>{let $=j[J];if(!$)throw Error("Key "+JSON.stringify(J)+" not found in schema");if(typeof Q!=="string")throw Error("Value must be a string, but is "+JSON.stringify(Q));if($.type!=="enum")throw Error("Key "+JSON.stringify(J)+" is not an enum");if(!$.variants[Q])throw Error("Value for "+JSON.stringify(J)+" must be one of "+Object.keys($.variants).map((Z)=>JSON.stringify(Z)).join(", ")+", got "+JSON.stringify(Q));let Y=Object.keys($.variants).filter((Z)=>Z!==Q),G=new Set;for(let Z of Y){let X=$.variants[Z],H=Object.keys(X);for(let K of H)G.add(K)}return[...G]},TJ="remotion-date:",BJ="remotion-file:",V1=({data:j,indent:J,staticBase:Q})=>{let $=!1,W=!1,Y=!1,G=!1;try{return{serializedString:JSON.stringify(j,function(X,H){let K=this[X];if(K instanceof Date)return $=!0,`${TJ}${K.toISOString()}`;if(K instanceof Map)return Y=!0,H;if(K instanceof Set)return G=!0,H;if(typeof K==="string"&&Q!==null&&K.startsWith(Q))return W=!0,`${BJ}${K.replace(Q+"/","")}`;return H},J),customDateUsed:$,customFileUsed:W,mapUsed:Y,setUsed:G}}catch(Z){throw Error("Could not serialize the passed input props to JSON: "+Z.message)}},C1=(j)=>{return JSON.parse(j,(J,Q)=>{if(typeof Q==="string"&&Q.startsWith(TJ))return new Date(Q.replace(TJ,""));if(typeof Q==="string"&&Q.startsWith(BJ))return`${window.remotion_staticBase}/${Q.replace(BJ,"")}`;return Q})},z1={"style.transformOrigin":{type:"transform-origin",step:1,default:"50% 50%",description:"Transform origin"},"style.translate":{type:"translate",step:1,default:"0px 0px",description:"Offset"},"style.scale":{type:"scale",max:100,step:0.01,default:1,description:"Scale"},"style.rotate":{type:"rotation-css",step:1,default:"0deg",description:"Rotation"},"style.opacity":{type:"number",min:0,max:1,step:0.01,default:1,description:"Opacity",hiddenFromList:!1}},M1={premountFor:{type:"number",default:0,description:"Premount For",min:0,step:1,hiddenFromList:!1},postmountFor:{type:"number",default:0,min:0,step:1,hiddenFromList:!0},styleWhilePremounted:{type:"hidden"},styleWhilePostmounted:{type:"hidden"}},P1={...z1,...M1},dQ={type:"boolean",default:!1,description:"Hidden"},mQ={type:"hidden"},cQ={type:"hidden"},lQ={type:"number",default:void 0,min:1,step:1,hiddenFromList:!0},L1={type:"number",default:0,step:1,hiddenFromList:!0},pQ={type:"number",default:0,min:0,step:1,hiddenFromList:!0},iQ={type:"number",default:null,step:1,hiddenFromList:!0},S1={durationInFrames:lQ,from:L1,trimBefore:pQ,freeze:iQ,hidden:dQ,name:cQ,showInTimeline:mQ},_J={...S1,layout:{type:"enum",default:"absolute-fill",description:"Layout",variants:{"absolute-fill":P1,none:{}}}},F1={durationInFrames:lQ,trimBefore:pQ,freeze:iQ,hidden:dQ,name:cQ,showInTimeline:mQ},j9={...F1,layout:_J.layout},J9={..._J,layout:{..._J.layout,default:"none"}},t="[-+]?\\d*\\.?\\d+",HJ=t+"%";function KJ(...j){return"\\(\\s*("+j.join(")\\s*,\\s*(")+")\\s*\\)"}var DJ="(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";function sj(j){return new RegExp(j+"\\(\\s*("+DJ+")\\s+("+DJ+")\\s+("+DJ+")(?:\\s*\\/\\s*("+DJ+"))?\\s*\\)")}function w1(){let j={rgb:void 0,rgba:void 0,hsl:void 0,hsla:void 0,hex3:void 0,hex4:void 0,hex5:void 0,hex6:void 0,hex8:void 0,oklch:void 0,oklab:void 0,lab:void 0,lch:void 0,hwb:void 0};if(j.rgb===void 0)j.rgb=new RegExp("rgb"+KJ(t,t,t)),j.rgba=new RegExp("rgba"+KJ(t,t,t,t)),j.hsl=new RegExp("hsl"+KJ(t,HJ,HJ)),j.hsla=new RegExp("hsla"+KJ(t,HJ,HJ,t)),j.hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,j.hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,j.hex6=/^#([0-9a-fA-F]{6})$/,j.hex8=/^#([0-9a-fA-F]{8})$/,j.oklch=sj("oklch"),j.oklab=sj("oklab"),j.lab=sj("lab"),j.lch=sj("lch"),j.hwb=sj("hwb");return j}function Fj(j,J,Q){if(Q<0)Q+=1;if(Q>1)Q-=1;if(Q<0.16666666666666666)return j+(J-j)*6*Q;if(Q<0.5)return J;if(Q<0.6666666666666666)return j+(J-j)*(0.6666666666666666-Q)*6;return j}function wQ(j,J,Q){let $=Q<0.5?Q*(1+J):Q+J-Q*J,W=2*Q-$,Y=Fj(W,$,j+0.3333333333333333),G=Fj(W,$,j),Z=Fj(W,$,j-0.3333333333333333);return Math.round(Y*255)<<24|Math.round(G*255)<<16|Math.round(Z*255)<<8}function Lj(j){let J=Number.parseInt(j,10);if(J<0)return 0;if(J>255)return 255;return J}function bQ(j){return(Number.parseFloat(j)%360+360)%360/360}function kQ(j){let J=Number.parseFloat(j);if(J<0)return 0;if(J>1)return 255;return Math.round(J*255)}function UJ(j){let J=Number.parseFloat(j);if(J<0)return 0;if(J>100)return 1;return J/100}function n(j,J){if(j==="none")return 0;if(j.endsWith("%"))return Number.parseFloat(j)/100*J;return Number.parseFloat(j)}function vJ(j){if(j==="none")return 0;if(j.endsWith("rad"))return Number.parseFloat(j)*180/Math.PI;if(j.endsWith("grad"))return Number.parseFloat(j)*0.9;if(j.endsWith("turn"))return Number.parseFloat(j)*360;return Number.parseFloat(j)}function rj(j){if(j===void 0||j==="none")return 1;if(j.endsWith("%"))return Math.max(0,Math.min(1,Number.parseFloat(j)/100));return Math.max(0,Math.min(1,Number.parseFloat(j)))}function wj(j){if(j<=0.0031308)return 12.92*j;return 1.055*j**0.4166666666666667-0.055}function qJ(j){return Math.max(0,Math.min(1,j))}function oj(j,J,Q,$){let W=Math.round(qJ(j)*255),Y=Math.round(qJ(J)*255),G=Math.round(qJ(Q)*255),Z=Math.round(qJ($)*255);return(W<<24|Y<<16|G<<8|Z)>>>0}function IQ(j,J,Q){let $=j+0.3963377774*J+0.2158037573*Q,W=j-0.1055613458*J-0.0638541728*Q,Y=j-0.0894841775*J-1.291485548*Q,G=$*$*$,Z=W*W*W,X=Y*Y*Y,H=4.0767416621*G-3.3077115913*Z+0.2309699292*X,K=-1.2684380046*G+2.6097574011*Z-0.3413193965*X,U=-0.0041960863*G-0.7034186147*Z+1.707614701*X;return[wj(H),wj(K),wj(U)]}function xQ(j,J,Q){let X=(j+16)/116,H=J/500+X,K=X-Q/200,U=H*H*H,D=K*K*K,A=U>0.008856451679035631?U:(116*H-16)/903.2962962962963,T=j>8?((j+16)/116)**3:j/903.2962962962963,q=D>0.008856451679035631?D:(116*K-16)/903.2962962962963,V=A*0.95047,_=T*1,L=q*1.08883,C=3.2404542*V-1.5371385*_-0.4985314*L,O=-0.969266*V+1.8760108*_+0.041556*L,E=0.0556434*V-0.2040259*_+1.0572252*L;return[wj(C),wj(O),wj(E)]}function b1(j,J,Q){if(J+Q>=1){let H=J/(J+Q);return[H,H,H]}let $=1,W=0,Y=Fj(W,$,j+0.3333333333333333),G=Fj(W,$,j),Z=Fj(W,$,j-0.3333333333333333),X=1-J-Q;return[Y*X+J,G*X+J,Z*X+J]}var hJ={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function k1(j){let J=w1(),Q;if(J.hex6){if(Q=J.hex6.exec(j))return Number.parseInt(Q[1]+"ff",16)>>>0}if(hJ[j]!==void 0)return hJ[j];if(J.rgb){if(Q=J.rgb.exec(j))return(Lj(Q[1])<<24|Lj(Q[2])<<16|Lj(Q[3])<<8|255)>>>0}if(J.rgba){if(Q=J.rgba.exec(j))return(Lj(Q[1])<<24|Lj(Q[2])<<16|Lj(Q[3])<<8|kQ(Q[4]))>>>0}if(J.hex3){if(Q=J.hex3.exec(j))return Number.parseInt(Q[1]+Q[1]+Q[2]+Q[2]+Q[3]+Q[3]+"ff",16)>>>0}if(J.hex8){if(Q=J.hex8.exec(j))return Number.parseInt(Q[1],16)>>>0}if(J.hex4){if(Q=J.hex4.exec(j))return Number.parseInt(Q[1]+Q[1]+Q[2]+Q[2]+Q[3]+Q[3]+Q[4]+Q[4],16)>>>0}if(J.hsl){if(Q=J.hsl.exec(j))return(wQ(bQ(Q[1]),UJ(Q[2]),UJ(Q[3]))|255)>>>0}if(J.hsla){if(Q=J.hsla.exec(j))return(wQ(bQ(Q[1]),UJ(Q[2]),UJ(Q[3]))|kQ(Q[4]))>>>0}if(J.oklch){if(Q=J.oklch.exec(j)){let $=n(Q[1],1),W=n(Q[2],0.4),Y=vJ(Q[3]),G=rj(Q[4]),Z=Y*Math.PI/180,[X,H,K]=IQ($,W*Math.cos(Z),W*Math.sin(Z));return oj(X,H,K,G)}}if(J.oklab){if(Q=J.oklab.exec(j)){let $=n(Q[1],1),W=n(Q[2],0.4),Y=n(Q[3],0.4),G=rj(Q[4]),[Z,X,H]=IQ($,W,Y);return oj(Z,X,H,G)}}if(J.lab){if(Q=J.lab.exec(j)){let $=n(Q[1],100),W=n(Q[2],125),Y=n(Q[3],125),G=rj(Q[4]),[Z,X,H]=xQ($,W,Y);return oj(Z,X,H,G)}}if(J.lch){if(Q=J.lch.exec(j)){let $=n(Q[1],100),W=n(Q[2],150),Y=vJ(Q[3]),G=rj(Q[4]),Z=Y*Math.PI/180,[X,H,K]=xQ($,W*Math.cos(Z),W*Math.sin(Z));return oj(X,H,K,G)}}if(J.hwb){if(Q=J.hwb.exec(j)){let $=vJ(Q[1]),W=n(Q[2],1),Y=n(Q[3],1),G=rj(Q[4]),[Z,X,H]=b1($/360,W,Y);return oj(Z,X,H,G)}}throw Error(`invalid color string ${j} provided`)}function I1(j){let J=k1(j);return(J<<24|J>>>8)>>>0}var x1=["4444-xq","4444","hq","standard","light","proxy"],y1=[1,1,1],R1=(j)=>{let J=j.trim().split(/\s+/);if(J.length<1||J.length>3||J[0]==="")return null;let Q=J.map((G)=>Number(G));if(!Q.every((G)=>Number.isFinite(G)))return null;let $=Q[0],W=Q[1]??$,Y=Q[2]??1;return[$,W,Y]},v1=(j)=>{if(typeof j==="number")return Number.isFinite(j)?[j,j,1]:null;if(typeof j==="string")return R1(j);return null},f1=(j)=>{return v1(j)??y1},h1=([j,J,Q])=>{let $=AJ(j),W=AJ(J),Y=AJ(Q);if($===W&&Y===1)return $;if(Y===1)return`${$} ${W}`;return`${$} ${W} ${Y}`},fJ=!1,g1=({allowFloats:j,durationInFrames:J,frame:Q})=>{if(typeof Q>"u")throw TypeError('Argument missing for parameter "frame"');if(typeof Q!=="number")throw TypeError(`Argument passed for "frame" is not a number: ${Q}`);if(!Number.isFinite(Q))throw RangeError(`Frame ${Q} is not finite`);if(Q%1!==0&&!j)throw RangeError(`Argument for frame must be an integer, but got ${Q}`);if(Q<0&&Q<-J)throw RangeError(`Cannot use frame ${Q}: Duration of composition is ${J}, therefore the lowest frame that can be rendered is ${-J}`);if(Q>J-1)throw RangeError(`Cannot use frame ${Q}: Duration of composition is ${J}, therefore the highest frame that can be rendered is ${J-1}`)},yQ=["h264","h265","vp8","vp9","av1","mp3","aac","wav","prores","h264-mkv","h264-ts","gif"];function d1(j,J,Q){if(typeof j>"u")return;if(typeof j!=="string")throw TypeError(`The "${Q}" prop ${J} must be a string, but you passed a value of type ${typeof j}.`);if(!yQ.includes(j))throw Error(`The "${Q}" prop ${J} must be one of ${yQ.join(", ")}, but you passed ${j}.`)}var m1=(j,J,Q)=>{if(!j)return;if(typeof j!=="object")throw Error(`"${J}" must be an object, but you passed a value of type ${typeof j}`);if(Array.isArray(j))throw Error(`"${J}" must be an object, an array was passed ${Q?`for composition "${Q}"`:""}`)};function c1(j,J,Q){if(typeof j!=="number")throw Error(`The "${J}" prop ${Q} must be a number, but you passed a value of type ${typeof j}`);if(isNaN(j))throw TypeError(`The "${J}" prop ${Q} must not be NaN, but is NaN.`);if(!Number.isFinite(j))throw TypeError(`The "${J}" prop ${Q} must be finite, but is ${j}.`);if(j%1!==0)throw TypeError(`The "${J}" prop ${Q} must be an integer, but is ${j}.`);if(j<=0)throw TypeError(`The "${J}" prop ${Q} must be positive, but got ${j}.`)}function l1(j,J){let{allowFloats:Q,component:$}=J;if(typeof j>"u")throw Error(`The "durationInFrames" prop ${$} is missing.`);if(typeof j!=="number")throw Error(`The "durationInFrames" prop ${$} must be a number, but you passed a value of type ${typeof j}`);if(j<=0)throw TypeError(`The "durationInFrames" prop ${$} must be positive, but got ${j}.`);if(!Q&&j%1!==0)throw TypeError(`The "durationInFrames" prop ${$} must be an integer, but got ${j}.`);if(!Number.isFinite(j))throw TypeError(`The "durationInFrames" prop ${$} must be finite, but got ${j}.`)}function p1(j,J,Q){if(typeof j!=="number")throw Error(`"fps" must be a number, but you passed a value of type ${typeof j} ${J}`);if(!Number.isFinite(j))throw Error(`"fps" must be a finite, but you passed ${j} ${J}`);if(isNaN(j))throw Error(`"fps" must not be NaN, but got ${j} ${J}`);if(j<=0)throw TypeError(`"fps" must be positive, but got ${j} ${J}`);if(Q&&j>50)throw TypeError("The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif")}var i1=({frame:j,playbackRate:J,startFrom:Q})=>{return A1(j,[-1,Q,Q+1],[-1,Q,Q+J])},u1=(j)=>{if(typeof window>"u")return j;if(j.startsWith("http://")||j.startsWith("https://")||j.startsWith("file://")||j.startsWith("blob:")||j.startsWith("data:"))return j;return new URL(j,window.origin).href},s1=({src:j,transparent:J,currentTime:Q,toneMapped:$})=>{return`http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(u1(j))}&time=${encodeURIComponent(Math.max(0,Q))}&transparent=${String(J)}&toneMapped=${String($)}`},nj={processColor:I1,truthy:T1,validateFps:p1,validateDimension:c1,validateDurationInFrames:l1,validateDefaultAndInputProps:m1,validateFrame:g1,serializeJSONWithSpecialTypes:V1,bundleName:"bundle.js",bundleMapName:"bundle.js.map",deserializeJSONWithSpecialTypes:C1,DELAY_RENDER_CALLSTACK_TOKEN:B1,DELAY_RENDER_RETRY_TOKEN:N1,DELAY_RENDER_CLEAR_TOKEN:E1,DELAY_RENDER_ATTEMPT_TOKEN:_1,getOffthreadVideoSource:s1,getExpectedMediaFrameUncorrected:i1,ENABLE_V5_BREAKING_CHANGES:fJ,MIN_NODE_VERSION:fJ?18:16,MIN_BUN_VERSION:fJ?"1.1.3":"1.0.3",colorNames:hJ,DATE_TOKEN:TJ,FILE_TOKEN:BJ,validateCodec:d1,proResProfileOptions:x1,findPropsToDelete:O1,sequenceSchema:_J,parseScaleValue:f1,serializeScaleValue:h1};import{jsx as $J}from"react/jsx-runtime";import{forwardRef as S8,useImperativeHandle as F8,useLayoutEffect as w8,useMemo as WQ,useRef as b8,useState as O0}from"react";import{Internals as V0,random as k8}from"remotion";import I8,{forwardRef as x8,Suspense as y8,useCallback as R8,useImperativeHandle as v8,useMemo as yj,useRef as f8}from"react";import{Internals as YQ}from"remotion";import{useContext as h8,useMemo as g8}from"react";import{jsx as Bj}from"react/jsx-runtime";import{jsx as SJ}from"react/jsx-runtime";if(typeof r1!=="function")throw Error(['Remotion requires React.createContext, but it is "undefined".','If you are in a React Server Component, turn it into a client component by adding "use client" at the top of the file.',"","Before:",' import {Player} from "@remotion/player";',"","After:",' "use client";',' import {Player} from "@remotion/player";'].join(`
|
|
2
|
+
`));var h=25,ZQ=16,XQ="Highlight",n1="-webkit-focus-ring-color",GQ={stroke:n1},a1="M8 6.375C7.40904 8.17576 7.06921 10.2486 7.01438 12.3871C6.95955 14.5255 7.19163 16.6547 7.6875 18.5625C9.95364 18.2995 12.116 17.6164 14.009 16.5655C15.902 15.5147 17.4755 14.124 18.6088 12.5C17.5158 10.8949 15.9949 9.51103 14.1585 8.45082C12.3222 7.3906 10.2174 6.68116 8 6.375Z",t1="M93.4691 0.0367432C84.4873 0.520935 77.2494 1.93634 69.9553 4.69266C66.3176 6.05219 60.3548 9.0134 57.0734 11.062C43.3476 19.6103 32.8846 32.4606 27.428 47.4154C26.3405 50.3766 23.3966 59.8188 21.5027 66.3185C8.88329 109.768 1.7204 157.277 0.182822 207.561C-0.0609408 215.569 -0.0609408 234.639 0.182822 242.517C1.21413 275.854 4.42055 305.949 10.2334 336.641C12.596 349.063 16.3837 365.75 18.5776 373.33C23.059 388.732 32.2095 401.843 45.2227 411.453C53.9419 417.896 63.8425 422.217 74.8118 424.34C80.0996 425.365 87.075 425.83 92.2127 425.495C99.3194 425.029 113.42 423.148 124.877 421.118C176.517 411.974 224.22 395.604 267.478 372.175C294.874 357.332 318.294 341.26 340.888 321.761C363.408 302.355 382.609 281.478 399.504 258.049C403.423 252.63 405.392 249.464 407.361 245.478C412.424 235.198 414.805 224.974 414.786 213.539C414.786 202.886 412.761 193.425 408.392 183.741C406.292 179.066 404.286 175.714 399.785 169.345C383.21 145.898 364.815 125.467 342.389 105.614C307.624 74.8481 266.335 49.613 220.226 30.9334C210.232 26.8921 200.387 23.335 188.537 19.4799C163.448 11.3413 132.396 4.28293 106.126 0.763062C102.001 0.204346 96.3942 -0.112244 93.4691 0.0367432Z",C0=6.25,e1=1.5,j5=2,J5={x1:7.006500987565134,y1:6.375,x2:18.6088,y2:18.5625},Q5={x1:-0.00000009999999999649709,y1:0.000013203698169792638,x2:414.7861127950162,y2:425.60252460486765},uQ=(j,J)=>{return{x1:j.x1-J,y1:j.y1-J,x2:j.x2+J,y2:j.y2+J}},NJ=(j)=>j.x2-j.x1,EJ=(j)=>j.y2-j.y1,$5=({source:j,target:J})=>{let Q=Math.min(NJ(J)/NJ(j),EJ(J)/EJ(j)),$=J.x1+(NJ(J)-NJ(j)*Q)/2-j.x1*Q,W=J.y1+(EJ(J)-EJ(j)*Q)/2-j.y1*Q;return`translate(${$.toFixed(4)} ${W.toFixed(4)}) scale(${Q.toFixed(5)})`},W5=$5({source:Q5,target:uQ(uQ(J5,C0/2),j5)}),Y5=({focused:j})=>{return bJ("svg",{width:h,height:h,viewBox:"0 0 25 25",fill:"none",children:[j?i("path",{d:t1,fill:"none",stroke:XQ,strokeWidth:e1,style:GQ,transform:W5,vectorEffect:"non-scaling-stroke"}):null,i("path",{d:a1,fill:"white",stroke:"white",strokeWidth:C0,strokeLinejoin:"round"})]})},Z5=({focused:j})=>{return bJ("svg",{viewBox:"0 0 100 100",width:h,height:h,children:[j?bJ(o1,{children:[i("rect",{x:"21",y:"16",width:"28",height:"68",fill:"none",stroke:XQ,strokeWidth:"4",ry:"9",rx:"9",style:GQ}),i("rect",{x:"51",y:"16",width:"28",height:"68",fill:"none",stroke:XQ,strokeWidth:"4",ry:"9",rx:"9",style:GQ})]}):null,i("rect",{x:"25",y:"20",width:"20",height:"60",fill:"#fff",ry:"5",rx:"5"}),i("rect",{x:"55",y:"20",width:"20",height:"60",fill:"#fff",ry:"5",rx:"5"})]})},X5=({isFullscreen:j})=>{let $=j?0:3,W=j?9.600000000000001:3,Y=j?9.600000000000001:12;return bJ("svg",{viewBox:"0 0 32 32",height:ZQ,width:ZQ,children:[i("path",{d:`
|
|
3
|
+
M ${$} ${Y}
|
|
4
|
+
L ${W} ${W}
|
|
5
|
+
L ${Y} ${$}
|
|
6
|
+
`,stroke:"#fff",strokeWidth:6,fill:"none"}),i("path",{d:`
|
|
7
|
+
M ${32-$} ${Y}
|
|
8
|
+
L ${32-W} ${W}
|
|
9
|
+
L ${32-Y} ${$}
|
|
10
|
+
`,stroke:"#fff",strokeWidth:6,fill:"none"}),i("path",{d:`
|
|
11
|
+
M ${$} ${32-Y}
|
|
12
|
+
L ${W} ${32-W}
|
|
13
|
+
L ${Y} ${32-$}
|
|
14
|
+
`,stroke:"#fff",strokeWidth:6,fill:"none"}),i("path",{d:`
|
|
15
|
+
M ${32-$} ${32-Y}
|
|
16
|
+
L ${32-W} ${32-W}
|
|
17
|
+
L ${32-Y} ${32-$}
|
|
18
|
+
`,stroke:"#fff",strokeWidth:6,fill:"none"})]})},G5=()=>{return i("svg",{width:h,height:h,viewBox:"0 0 24 24",children:i("path",{d:"M3.63 3.63a.996.996 0 000 1.41L7.29 8.7 7 9H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34a.996.996 0 101.41-1.41L5.05 3.63c-.39-.39-1.02-.39-1.42 0zM19 12c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85C17.18 6.54 19 9.06 19 12zm-8.71-6.29l-.17.17L12 7.76V6.41c0-.89-1.08-1.33-1.71-.7zM16.5 12A4.5 4.5 0 0014 7.97v1.79l2.48 2.48c.01-.08.02-.16.02-.24z",fill:"#fff"})})},H5=()=>{return i("svg",{width:h,height:h,viewBox:"0 0 24 24",children:i("path",{d:"M3 10v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71V6.41c0-.89-1.08-1.34-1.71-.71L7 9H4c-.55 0-1 .45-1 1zm13.5 2A4.5 4.5 0 0014 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 4.45v.2c0 .38.25.71.6.85C17.18 6.53 19 9.06 19 12s-1.82 5.47-4.4 6.5c-.36.14-.6.47-.6.85v.2c0 .63.63 1.07 1.21.85C18.6 19.11 21 15.84 21 12s-2.4-7.11-5.79-8.4c-.58-.23-1.21.22-1.21.85z",fill:"#fff"})})},sQ="__remotion_buffering_indicator",rQ="__remotion_buffering_animation",U5={width:h,height:h,overflow:"hidden",lineHeight:"normal",fontSize:"inherit"},q5={width:14,height:14,overflow:"hidden",lineHeight:"normal",fontSize:"inherit"},z0=({type:j})=>{let J=j==="player"?U5:q5;return K5(D5,{children:[OJ("style",{type:"text/css",children:`
|
|
19
|
+
@keyframes ${rQ} {
|
|
20
|
+
0% {
|
|
21
|
+
rotate: 0deg;
|
|
22
|
+
}
|
|
23
|
+
100% {
|
|
24
|
+
rotate: 360deg;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.${sQ} {
|
|
29
|
+
animation: ${rQ} 1s linear infinite;
|
|
30
|
+
}
|
|
31
|
+
`}),OJ("div",{style:J,children:OJ("svg",{viewBox:j==="player"?"0 0 22 22":"0 0 18 18",style:J,className:sQ,children:OJ("path",{d:j==="player"?"M 11 4 A 7 7 0 0 1 15.1145 16.66312":"M 9 2 A 7 7 0 0 1 13.1145 14.66312",stroke:"white",strokeLinecap:"round",fill:"none",strokeWidth:3})})})]})},T5=({currentSize:j,width:J,height:Q,compositionWidth:$,compositionHeight:W})=>{if(J!==void 0&&Q===void 0)return{aspectRatio:[$,W].join("/")};if(Q!==void 0&&J===void 0)return{aspectRatio:[$,W].join("/")};if(!j)return{width:$,height:W};return{width:$,height:W}},TQ=({previewSize:j,compositionWidth:J,compositionHeight:Q,canvasSize:$})=>{let W=A5.calculateScale({canvasSize:$,compositionHeight:Q,compositionWidth:J,previewSize:j}),Y=0-(1-W)/2,G=Y*J,Z=Y*Q,X=J*W,H=Q*W,K=$.width/2-X/2,U=$.height/2-H/2;return{centerX:K,centerY:U,xCorrection:G,yCorrection:Z,scale:W}},M0=({config:j,style:J,canvasSize:Q,overflowVisible:$,layout:W})=>{if(!j)return{};return{position:"relative",overflow:$?"visible":"hidden",...T5({compositionHeight:j.height,compositionWidth:j.width,currentSize:Q,height:J?.height,width:J?.width}),opacity:W?1:0,...J}},P0=({config:j,layout:J,scale:Q,overflowVisible:$})=>{if(!j)return{};if(!J)return{position:"absolute",width:j.width,height:j.height,display:"flex",transform:`scale(${Q})`,overflow:$?"visible":"hidden"};return{position:"absolute",width:j.width,height:j.height,display:"flex",transform:`scale(${Q})`,marginLeft:J.xCorrection,marginTop:J.yCorrection,overflow:$?"visible":"hidden"}},L0=({layout:j,scale:J,config:Q,overflowVisible:$})=>{if(!Q)return{};if(!j)return{width:Q.width*J,height:Q.height*J,display:"flex",flexDirection:"column",position:"absolute",overflow:$?"visible":"hidden"};let{centerX:W,centerY:Y}=j;return{width:Q.width*J,height:Q.height*J,display:"flex",flexDirection:"column",position:"absolute",left:W,top:Y,overflow:$?"visible":"hidden"}},BQ=S0.createContext(void 0),F0=S0.createContext(void 0);class _Q{listeners={ended:[],error:[],pause:[],play:[],ratechange:[],scalechange:[],seeked:[],timeupdate:[],frameupdate:[],fullscreenchange:[],volumechange:[],mutechange:[],waiting:[],resume:[]};addEventListener(j,J){this.listeners[j].push(J)}removeEventListener(j,J){this.listeners[j]=this.listeners[j].filter((Q)=>Q!==J)}dispatchEvent(j,J){this.listeners[j].forEach((Q)=>{Q({detail:J})})}dispatchSeek=(j)=>{this.dispatchEvent("seeked",{frame:j})};dispatchVolumeChange=(j)=>{this.dispatchEvent("volumechange",{volume:j})};dispatchPause=()=>{this.dispatchEvent("pause",void 0)};dispatchPlay=()=>{this.dispatchEvent("play",void 0)};dispatchEnded=()=>{this.dispatchEvent("ended",void 0)};dispatchRateChange=(j)=>{this.dispatchEvent("ratechange",{playbackRate:j})};dispatchScaleChange=(j)=>{this.dispatchEvent("scalechange",{scale:j})};dispatchError=(j)=>{this.dispatchEvent("error",{error:j})};dispatchTimeUpdate=(j)=>{this.dispatchEvent("timeupdate",j)};dispatchFrameUpdate=(j)=>{this.dispatchEvent("frameupdate",j)};dispatchFullscreenChange=(j)=>{this.dispatchEvent("fullscreenchange",j)};dispatchMuteChange=(j)=>{this.dispatchEvent("mutechange",j)};dispatchWaiting=(j)=>{this.dispatchEvent("waiting",j)};dispatchResume=(j)=>{this.dispatchEvent("resume",j)}}class w0{listeners={error:[],waiting:[],resume:[]};addEventListener(j,J){this.listeners[j].push(J)}removeEventListener(j,J){this.listeners[j]=this.listeners[j].filter((Q)=>Q!==J)}dispatchEvent(j,J){this.listeners[j].forEach((Q)=>{Q({detail:J})})}dispatchError=(j)=>{this.dispatchEvent("error",{error:j})};dispatchWaiting=(j)=>{this.dispatchEvent("waiting",j)};dispatchResume=(j)=>{this.dispatchEvent("resume",j)}}var b0=(j)=>{let J=E5(V5.BufferingContextReact);if(!J)throw Error("BufferingContextReact not found");O5(()=>{let Q=J.listenForBuffering(()=>{J.buffering.current=!0,j.dispatchWaiting({})}),$=J.listenForResume(()=>{J.buffering.current=!1,j.dispatchResume({})});return()=>{Q.remove(),$.remove()}},[J,j])},k0=({children:j,currentPlaybackRate:J})=>{let[Q]=N5(()=>new _Q);if(!B5(oQ.BufferingContextReact))throw Error("BufferingContextReact not found");return _5(()=>{if(J)Q.dispatchRateChange(J)},[Q,J]),b0(Q),C5(BQ.Provider,{value:Q,children:j})},kJ=(j,J)=>{let[Q,$]=M5(!1);return z5(()=>{let{current:W}=j;if(!W)return;let Y,G=()=>{if(J)clearTimeout(Y),Y=setTimeout(()=>{$(!1)},J===!0?3000:J)},Z=()=>{$(!0),G()},X=()=>{$(!1),clearTimeout(Y)},H=()=>{$(!0),G()};return W.addEventListener("mouseenter",Z),W.addEventListener("mouseleave",X),W.addEventListener("mousemove",H),()=>{W.removeEventListener("mouseenter",Z),W.removeEventListener("mouseleave",X),W.removeEventListener("mousemove",H),clearTimeout(Y)}},[J,j]),Q},YJ=()=>{let[j,J,Q]=e.Timeline.usePlayingState(),[$,W]=F5(!1),Y=e.Timeline.useTimelinePosition(),G=tQ(Y),Z=e.Timeline.useTimelineSetFrame(),X=e.Timeline.useTimelineSetFrame(),H=CJ(e.SharedAudioContext),K=CJ(e.SharedAudioTagsContext),{audioAndVideoTags:U}=e.useTimelineContext(),D=tQ(Y);D.current=Y;let A=e.useVideo(),T=e.useUnsafeVideoConfig(),q=CJ(BQ),V=(T?.durationInFrames??1)-1,_=Y===V,L=Y===0;if(!q)throw TypeError("Expected Player event emitter context");let C=CJ(e.BufferingContextReact);if(!C)throw Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");let{buffering:O}=C,E=Wj((w)=>{let S=T?e.TimelinePosition.clampFrameToCompositionRange(w,T.durationInFrames):Math.max(0,w);if(A?.id)X((d)=>({...d,[A.id]:S}));D.current=S,q.dispatchSeek(S)},[T,q,X,A?.id]),N=Wj((w)=>{if(Q.current)return;if(W(!0),_)E(0);if(H?.resume(),K&&K.numberOfAudioTags>0&&w)K.playAllAudios();U.current.forEach((S)=>S.play("player play() was called and playing audio from a click")),Q.current=!0,J(!0),G.current=D.current,q.dispatchPlay()},[Q,_,H,K,J,q,E,U]),F=Wj(()=>{if(Q.current)Q.current=!1,J(!1),q.dispatchPause(),H?.suspend()},[q,Q,J,H]),I=Wj(()=>{if(Q.current){if(Q.current=!1,D.current=G.current,T)X((w)=>({...w,[T.id]:G.current})),J(!1),q.dispatchPause()}},[T,q,Q,J,X]),z=A?.id,m=Wj((w)=>{if(!z)return null;if(Q.current)return;Z((S)=>{let d=S[z]??window.remotion_initialFrame??0,x=Math.max(0,d-w);if(d===x)return S;return{...S,[z]:x}})},[Q,Z,z]),R=Wj((w)=>{if(!z)return null;if(Q.current)return;Z((S)=>{let d=S[z]??window.remotion_initialFrame??0,x=Math.min(V,d+w);if(d===x)return S;return{...S,[z]:x}})},[z,Q,V,Z]),g=Wj((w)=>{if(Q.current)F();else N(w)},[Q,F,N]),v=Wj(()=>{return Q.current},[Q]),u=Wj(()=>{return D.current},[D]),c=Wj(()=>{return O.current},[O]);return S5(()=>{return{frameBack:m,frameForward:R,isLastFrame:_,emitter:q,playing:j,play:N,pause:F,seek:E,isFirstFrame:L,getCurrentFrame:u,isPlaying:v,isBuffering:c,pauseAndReturnToPlayStart:I,hasPlayed:$,toggle:g}},[q,m,R,$,L,_,u,F,I,N,j,E,g,v,c])},w5=({browserMediaControlsBehavior:j,videoConfig:J,playbackRate:Q})=>{let{playing:$,pause:W,play:Y,emitter:G,getCurrentFrame:Z,seek:X}=YJ(),H=L5(!1);VJ(()=>{if($)H.current=!0},[$]),VJ(()=>{if(!navigator.mediaSession)return;if(j.mode==="do-nothing")return;if($)navigator.mediaSession.playbackState="playing";else if(H.current)navigator.mediaSession.playbackState="paused"},[j.mode,$]),VJ(()=>{if(!navigator.mediaSession)return;if(j.mode==="do-nothing")return;let K=()=>{if(!J)return;if(navigator.mediaSession)navigator.mediaSession.setPositionState({duration:J.durationInFrames/J.fps,playbackRate:Q,position:Z()/J.fps})};return G.addEventListener("timeupdate",K),()=>{G.removeEventListener("timeupdate",K)}},[j.mode,G,Z,Q,J]),VJ(()=>{if(!navigator.mediaSession)return;if(j.mode==="do-nothing")return;return navigator.mediaSession.setActionHandler("play",()=>{if(j.mode==="register-media-session")Y()}),navigator.mediaSession.setActionHandler("pause",()=>{if(j.mode==="register-media-session")W()}),navigator.mediaSession.setActionHandler("seekto",(K)=>{if(j.mode==="register-media-session"&&K.seekTime!==void 0&&J)X(Math.round(K.seekTime*J.fps))}),navigator.mediaSession.setActionHandler("seekbackward",()=>{if(j.mode==="register-media-session"&&J)X(Math.max(0,Math.round((Z()-10)*J.fps)))}),navigator.mediaSession.setActionHandler("seekforward",()=>{if(j.mode==="register-media-session"&&J)X(Math.max(J.durationInFrames-1,Math.round((Z()+10)*J.fps)))}),navigator.mediaSession.setActionHandler("previoustrack",()=>{if(j.mode==="register-media-session")X(0)}),()=>{navigator.mediaSession.metadata=null,navigator.mediaSession.setActionHandler("play",null),navigator.mediaSession.setActionHandler("pause",null),navigator.mediaSession.setActionHandler("seekto",null),navigator.mediaSession.setActionHandler("seekbackward",null),navigator.mediaSession.setActionHandler("seekforward",null),navigator.mediaSession.setActionHandler("previoustrack",null)}},[j.mode,Z,W,Y,X,J])},b5=({time:j,currentFrame:J,playbackSpeed:Q,fps:$,actualLastFrame:W,actualFirstFrame:Y,framesAdvanced:G,shouldLoop:Z})=>{let H=(Q<0?Math.ceil:Math.floor)(j*Q/(1000/$))-G,K=H+J,U=J>W||J<Y,D=K>W||K<Y,A=!Z&&D&&!U;if(Q>0){if(D)return{nextFrame:Y,framesToAdvance:H,hasEnded:A};return{nextFrame:K,framesToAdvance:H,hasEnded:A}}if(D)return{nextFrame:W,framesToAdvance:H,hasEnded:A};return{nextFrame:K,framesToAdvance:H,hasEnded:A}},eQ=()=>{if(typeof document>"u")return!1;return document.visibilityState==="hidden"},x5=()=>{let j=I5(eQ());return k5(()=>{let J=()=>{j.current=eQ()};return document.addEventListener("visibilitychange",J),()=>{document.removeEventListener("visibilitychange",J)}},[]),j},R5=0.1,j0=({audioContext:j,audioSyncAnchor:J,absoluteTimeInSeconds:Q,globalPlaybackRate:$,logLevel:W,force:Y})=>{let G=j.currentTime-Q/$,Z=G-J.value,{outputLatency:X}=j,H=X===0?0.3:X,K=j.baseLatency+H;if(Math.abs(Z)<R5+K&&!Y)return!1;if(Math.abs(Z)<Number.EPSILON)return!1;return y5.Log.verbose({logLevel:W,tag:"audio-scheduling"},"Anchor "+(Y?"forcibly ":"")+"changed from %s to %s with shift %s",J.value,G,Z),J.value=G,!0},v5=(j)=>{if(j==="suspended"||j==="running-to-suspended")return!0;if(j==="closed"||j==="interrupted"||j==="running"||j==="suspended-to-running")return!1;throw Error(`Unexpected audio context state: ${j}`)},I0=({loop:j,playbackRate:J,moveToBeginningWhenEnded:Q,inFrame:$,outFrame:W,browserMediaControlsBehavior:Y,getCurrentFrame:G,muted:Z})=>{let X=bj.useUnsafeVideoConfig(),H=bj.Timeline.useTimelinePosition(),{playing:K,pause:U,emitter:D,isPlaying:A}=YJ(),T=bj.Timeline.useTimelineSetFrame(),q=aQ(bj.SharedAudioContext),V=bj.useLogLevel(),_=x5(),L=P5(0),C=aQ(bj.BufferingContextReact);if(!C)throw Error("Missing the buffering context. Most likely you have a Remotion version mismatch.");w5({browserMediaControlsBehavior:Y,playbackRate:J,videoConfig:X}),nQ(()=>{if(!q)return;if(!q.audioContext)return;if(!X)return;if(Z)return;if(j0({audioContext:q.audioContext,audioSyncAnchor:q.audioSyncAnchor,absoluteTimeInSeconds:H/X.fps,globalPlaybackRate:J,logLevel:V,force:!1}))q.audioSyncAnchorEmitter.dispatch("changed")},[X,H,V,J,q,Z]),nQ(()=>{let O=q?.audioContext;if(!O)return;if(!X)return;if(Z)return;let E=()=>{let N=q?.getAudioContextState();if(N&&v5(N))j0({audioContext:O,audioSyncAnchor:q.audioSyncAnchor,absoluteTimeInSeconds:G()/X.fps,globalPlaybackRate:J,logLevel:V,force:!0})};return O?.addEventListener("statechange",E),()=>{O?.removeEventListener("statechange",E)}},[X,G,V,Z,J,q]),dJ(()=>{if(!X)return;if(!K){q?.suspend?.();return}let O=!1,E=null,N=performance.now(),F=0,I=()=>{if(E!==null)if(E.type==="raf")cancelAnimationFrame(E.id);else clearTimeout(E.id)},z=()=>{O=!0,I()},m=()=>{if(O)return;if(!A()){q?.suspend?.();return}if(!Z&&!C.buffering.current)q?.resume?.();let v=performance.now()-N,u=W??X.durationInFrames-1,c=$??0,jj=G(),{nextFrame:w,framesToAdvance:S,hasEnded:d}=b5({time:v,currentFrame:jj,playbackSpeed:J,fps:X.fps,actualFirstFrame:c,actualLastFrame:u,framesAdvanced:F,shouldLoop:j});if(F+=S,w!==G()&&(!d||Q)&&!C.buffering.current)T((x)=>({...x,[X.id]:w}));if(d){z(),U(),D.dispatchEnded();return}R()},R=()=>{let v=q?.getIsResumingAudioContext?.()??null;if(v!==null&&!Z){v.then(()=>{N=performance.now(),F=0,R()});return}if(C.buffering.current){if(!Z)q?.suspend?.();let u=C.listenForResume(()=>{u.remove(),N=performance.now(),F=0,R()});return}if(_.current){E={type:"timeout",id:setTimeout(m,1000/X.fps)};return}E={type:"raf",id:requestAnimationFrame(m)}};R();let g=()=>{if(document.visibilityState==="visible")return;I(),m()};return window.addEventListener("visibilitychange",g),()=>{window.removeEventListener("visibilitychange",g),z()}},[X,j,U,K,T,D,J,$,W,Q,_,G,C,A,q,V,Z]),dJ(()=>{let O=performance.now(),E=O-L.current;if(E>=250){D.dispatchTimeUpdate({frame:H}),L.current=O;return}let N=setTimeout(()=>{D.dispatchTimeUpdate({frame:H}),L.current=performance.now()},250-E);return()=>clearTimeout(N)},[D,H]),dJ(()=>{D.dispatchFrameUpdate({frame:H})},[D,H])},FJ=[],g5=()=>{for(let j of FJ)j()},mJ=(j)=>{if(!j)return null;if("current"in j)return j.current;return j},IJ=(j,J)=>{let[Q,$]=h5(()=>{let G=mJ(j);if(!G)return null;let Z=G.getClientRects();if(!Z[0])return null;return{width:Z[0].width,height:Z[0].height,left:Z[0].x,top:Z[0].y,windowSize:{height:window.innerHeight,width:window.innerWidth}}}),W=J0(()=>{if(typeof ResizeObserver>"u")return null;return new ResizeObserver((G)=>{let{contentRect:Z,target:X}=G[0],H=X.getClientRects();if(!H?.[0]){$(null);return}let K=Z.width===0?1:H[0].width/Z.width,U=Z.height===0?1:H[0].height/Z.height,D=J.shouldApplyCssTransforms||K===0?H[0].width:H[0].width*(1/K),A=J.shouldApplyCssTransforms||U===0?H[0].height:H[0].height*(1/U);$((T)=>{if(T&&T.width===D&&T.height===A&&T.left===H[0].x&&T.top===H[0].y&&T.windowSize.height===window.innerHeight&&T.windowSize.width===window.innerWidth)return T;return{width:D,height:A,left:H[0].x,top:H[0].y,windowSize:{height:window.innerHeight,width:window.innerWidth}}})})},[J.shouldApplyCssTransforms]),Y=f5(()=>{let G=mJ(j);if(!G)return;let Z=G.getClientRects();if(!Z[0]){$(null);return}$((X)=>{if(X&&X.width===Z[0].width&&X.height===Z[0].height&&X.left===Z[0].x&&X.top===Z[0].y&&X.windowSize.height===window.innerHeight&&X.windowSize.width===window.innerWidth)return X;return{width:Z[0].width,height:Z[0].height,left:Z[0].x,top:Z[0].y,windowSize:{height:window.innerHeight,width:window.innerWidth}}})},[j]);return zJ(()=>{Y()},[Y]),zJ(()=>{if(!W)return;let G=mJ(j);if(G)W.observe(G);return()=>{if(G)W.unobserve(G)}},[W,j]),zJ(()=>{if(!J.triggerOnWindowResize)return;return window.addEventListener("resize",Y),()=>{window.removeEventListener("resize",Y)}},[J.triggerOnWindowResize,Y]),zJ(()=>{return FJ.push(Y),()=>{FJ=FJ.filter((G)=>G!==Y)}},[Y]),J0(()=>{if(!Q)return null;return{...Q,refresh:Y}},[Q,Y])},NQ=(j)=>{return j??"__remotion-player"},n5={display:"flex",justifyContent:"center",alignItems:"center",flex:1,height:"100%",width:"100%"};class EQ extends r5.Component{state={hasError:null};static getDerivedStateFromError(j){return{hasError:j}}componentDidCatch(j){this.props.onError(j)}render(){if(this.state.hasError)return o5("div",{style:n5,children:this.props.errorFallback({error:this.state.hasError})});return this.props.children}}var t5=async()=>{if(typeof window>"u")return null;if(typeof window.crypto>"u")return null;if(typeof window.crypto.subtle>"u")return null;try{let j=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(window.location.hostname));return Array.from(new Uint8Array(j)).map((J)=>J.toString(16).padStart(2,"0")).join("")}catch{return null}},lJ={backgroundColor:"red",position:"absolute",padding:12,fontFamily:"Arial"},e5=["28d262b44cc61fa750f1686b16ad0604dabfe193fbc263eec05c89b7ad4c2cd6","4db1b0a94be33165dfefcb3ba03d04c7a2666dd27c496d3dc9fa41858e94925e","fbc48530bbf245da790f63675e84e06bab38c3b114fab07eb350025119922bdc","7baf10a8932757b1b3a22b3fce10a048747ac2f8eaf638603487e3705b07eb83","8a6c21a598d8c667272b5207c051b85997bf5b45d5fb712378be3f27cd72c6a6","a2f7aaac9c50a9255e7fc376110c4e0bfe153722dc66ed3c5d3bf2a135f65518"],X0=!1,j7=()=>{let[j,J]=a5.useState(!1);if(Y0(()=>{if(X0)return;X0=!0,t5().then((Q)=>{if(Q&&e5.includes(Q))J(!0)}).catch(()=>{})},[]),Y0(()=>{if(!j)return;let Q=()=>{if(!document.querySelector(".warning-banner")){let Y=document.createElement("div");Y.className="warning-banner",Object.assign(Y.style,lJ,{zIndex:"9999",cssText:`${lJ.cssText} !important;`}),Y.innerHTML=`
|
|
32
|
+
<a href="https://github.com/remotion-dev/remotion/pull/4589" style="color: white;">
|
|
33
|
+
Remotion Unlicensed – Contact hi@remotion.dev
|
|
34
|
+
</a>
|
|
35
|
+
`,document.body.appendChild(Y)}},$=new MutationObserver(()=>Q());return $.observe(document.body,{childList:!0,subtree:!0}),()=>{$.disconnect()}},[j]),!j)return null;return Z0("div",{style:lJ,className:"warning-banner",children:Z0("a",{style:{color:"white"},href:"https://github.com/remotion-dev/remotion/pull/4589",children:"Remotion Unlicensed – Contact hi@remotion.dev"})})},G0=({playing:j,buffering:J,focused:Q})=>{if(j&&J)return rJ(z0,{type:"player"});if(j)return rJ(Z5,{focused:Q});return rJ(Y5,{focused:Q})},xj=12,U0=5,Z7=({volume:j,isVertical:J,onBlur:Q,inputRef:$,setVolume:W})=>{let Y=D0(()=>{let D={paddingLeft:5,height:h,width:zj,display:"inline-flex",alignItems:"center"};if(J)return{...D,position:"absolute",transform:`rotate(-90deg) translateX(${zj/2+h/2}px)`};return{...D}},[J]),G=typeof K0.useId>"u"?"volume-slider":K0.useId(),[Z]=$7(()=>`__remotion-volume-slider-${W7(G)}`.replace(".","")),X=Q7((U)=>{W(parseFloat(U.target.value))},[W]),H=D0(()=>{let U={WebkitAppearance:"none",backgroundColor:"rgba(255, 255, 255, 0.5)",borderRadius:U0/2,cursor:"pointer",height:U0,width:zj,backgroundImage:`linear-gradient(
|
|
36
|
+
to right,
|
|
37
|
+
white ${j*100}%, rgba(255, 255, 255, 0) ${j*100}%
|
|
38
|
+
)`};if(J)return{...U,bottom:h+zj/2};return U},[J,j]),K=`
|
|
39
|
+
.${Z}::-webkit-slider-thumb {
|
|
40
|
+
-webkit-appearance: none;
|
|
41
|
+
background-color: white;
|
|
42
|
+
border-radius: ${xj/2}px;
|
|
43
|
+
box-shadow: 0 0 2px black;
|
|
44
|
+
height: ${xj}px;
|
|
45
|
+
width: ${xj}px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.${Z}::-moz-range-thumb {
|
|
49
|
+
-webkit-appearance: none;
|
|
50
|
+
background-color: white;
|
|
51
|
+
border-radius: ${xj/2}px;
|
|
52
|
+
box-shadow: 0 0 2px black;
|
|
53
|
+
height: ${xj}px;
|
|
54
|
+
width: ${xj}px;
|
|
55
|
+
}
|
|
56
|
+
`;return Y7("div",{style:Y,children:[HQ("style",{dangerouslySetInnerHTML:{__html:K}}),HQ("input",{ref:$,"aria-label":"Change volume",className:Z,max:1,min:0,onBlur:Q,onChange:X,step:0.01,type:"range",value:j,style:H})]})},X7=(j)=>{return HQ(Z7,{...j})},zj=100,H7=({displayVerticalVolumeSlider:j,renderMuteButton:J,renderVolumeSlider:Q})=>{let[$,W]=nJ.usePlayerMutedState(),[Y,G]=nJ.useMediaVolumeState(),[Z,X]=J7(!1),H=H0(null),K=H0(null),U=kJ(H,!1),D=oJ(()=>{setTimeout(()=>{if(K.current&&document.activeElement!==K.current)X(!1)},10)},[]),A=Y===0,T=oJ(()=>{if(A){G(1),W(!1);return}W((O)=>!O)},[A,W,G]),q=PJ(()=>{return{display:"inline-flex",background:"none",border:"none",justifyContent:"center",alignItems:"center",touchAction:"none",...j&&{position:"relative"}}},[j]),V=PJ(()=>{return{display:"inline",width:h,height:h,cursor:"pointer",appearance:"none",background:"none",border:"none",padding:0}},[]),_=oJ(({muted:O,volume:E})=>{let N=O||E===0;return aJ("button",{"aria-label":N?"Unmute sound":"Mute sound",title:N?"Unmute sound":"Mute sound",onClick:T,onBlur:D,onFocus:()=>X(!0),style:V,type:"button",children:N?aJ(G5,{}):aJ(H5,{})})},[D,T,V]),L=PJ(()=>{return J?J({muted:$,volume:Y}):_({muted:$,volume:Y})},[$,Y,_,J]),C=PJ(()=>{return(Z||U)&&!$&&!nJ.isIosSafari()?(Q??X7)({isVertical:j,volume:Y,onBlur:()=>X(!1),inputRef:K,setVolume:G}):null},[j,Z,U,$,Y,Q,G]);return G7("div",{ref:H,style:q,children:[L,C]})};function A7(j){let[J,Q]=q7(j),$=U7(null);return D7(()=>{let W=(Y)=>{if($.current&&!$.current.contains(Y.target))Q(!1)};return document.addEventListener("pointerup",W,!0),()=>{document.removeEventListener("pointerup",W,!0)}},[]),{ref:$,isComponentVisible:J,setIsComponentVisible:Q}}var T7=35,B7=70,_7={height:30,paddingRight:15,paddingLeft:12,display:"flex",flexDirection:"row",alignItems:"center"},N7={width:22,display:"flex",alignItems:"center"},E7={width:14,height:14,color:"black"},O7=()=>_j("svg",{viewBox:"0 0 512 512",style:E7,children:_j("path",{fill:"currentColor",d:"M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"})}),V7=(j)=>{let J=j.toString();return J.includes(".")?J:J+".0"},C7=({rate:j,onSelect:J,selectedRate:Q,keyboardSelectedRate:$})=>{let W=WJ((U)=>{U.stopPropagation(),U.preventDefault(),J(j)},[J,j]),[Y,G]=y0(!1),Z=WJ(()=>{G(!0)},[]),X=WJ(()=>{G(!1)},[]),H=$===j,K=x0(()=>{return{..._7,backgroundColor:Y||H?"#eee":"transparent"}},[Y,H]);return KQ("div",{onPointerEnter:Z,onPointerLeave:X,tabIndex:0,style:K,onClick:W,children:[_j("div",{style:N7,children:j===Q?_j(O7,{}):null}),V7(j),"x"]},j)},z7=({setIsComponentVisible:j,playbackRates:J,canvasSize:Q})=>{let{setPlaybackRate:$,playbackRate:W}=R0.usePlaybackRate(),[Y,G]=y0(W);K7(()=>{let H=(K)=>{if(K.preventDefault(),K.key==="ArrowUp"){let U=J.findIndex((D)=>D===Y);if(U===0)return;if(U===-1)G(J[0]);else G(J[U-1])}else if(K.key==="ArrowDown"){let U=J.findIndex((D)=>D===Y);if(U===J.length-1)return;if(U===-1)G(J[J.length-1]);else G(J[U+1])}else if(K.key==="Enter")$(Y),j(!1)};return window.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H)}},[J,Y,$,j]);let Z=WJ((H)=>{$(H),j(!1)},[j,$]),X=x0(()=>{return{position:"absolute",right:0,width:125,maxHeight:Q.height-B7-T7,bottom:35,background:"#fff",borderRadius:4,overflow:"auto",color:"black",textAlign:"left"}},[Q.height]);return _j("div",{style:X,children:J.map((H)=>{return _j(C7,{selectedRate:W,onSelect:Z,rate:H,keyboardSelectedRate:Y},H)})})},M7={fontSize:13,fontWeight:"bold",color:"white",border:"2px solid white",borderRadius:20,paddingLeft:8,paddingRight:8,paddingTop:2,paddingBottom:2},wJ={appearance:"none",backgroundColor:"transparent",border:"none",cursor:"pointer",paddingLeft:0,paddingRight:0,paddingTop:6,paddingBottom:6,height:37,display:"inline-flex",marginBottom:0,marginTop:0,alignItems:"center"},P7={...wJ,position:"relative"},L7=({playbackRates:j,canvasSize:J})=>{let{ref:Q,isComponentVisible:$,setIsComponentVisible:W}=A7(!1),{playbackRate:Y}=R0.usePlaybackRate(),G=WJ((Z)=>{Z.stopPropagation(),Z.preventDefault(),W((X)=>!X)},[W]);return _j("div",{ref:Q,children:KQ("button",{type:"button","aria-label":"Change playback rate",style:P7,onClick:G,children:[KQ("div",{style:M7,children:[Y,"x"]}),$&&_j(z7,{canvasSize:J,playbackRates:j,setIsComponentVisible:W})]})})},A0=(j,J,Q)=>{return Math.round(k7(j,[0,Q],[0,J-1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}))},Rj=5,jJ=12,DQ=4,I7={userSelect:"none",WebkitUserSelect:"none",paddingTop:DQ,paddingBottom:DQ,boxSizing:"border-box",cursor:"pointer",position:"relative",touchAction:"none"},x7={height:Rj,backgroundColor:"rgba(255, 255, 255, 0.25)",width:"100%",borderRadius:Rj/2},y7=(j)=>{let J=j;while(J.parentElement)J=J.parentElement;return J},R7=({durationInFrames:j,onSeekEnd:J,onSeekStart:Q,inFrame:$,outFrame:W})=>{let Y=F7(null),G=kJ(Y,!1),Z=IJ(Y,{triggerOnWindowResize:!0,shouldApplyCssTransforms:!0}),{seek:X,play:H,pause:K,playing:U}=YJ(),D=b7.Timeline.useTimelinePosition(),[A,T]=w7({dragging:!1}),q=Z?.width??0,V=tJ((N)=>{if(N.button!==0)return;let F=Y.current?.getBoundingClientRect().left,I=A0(N.clientX-F,j,q);K(),X(I),T({dragging:!0,wasPlaying:U}),Q()},[j,q,K,X,U,Q]),_=tJ((N)=>{if(!Z)throw Error("Player has no size");if(!A.dragging)return;let F=Y.current?.getBoundingClientRect().left,I=A0(N.clientX-F,j,Z.width);X(I)},[A.dragging,j,X,Z]),L=tJ(()=>{if(T({dragging:!1}),!A.dragging)return;if(A.wasPlaying)H();else K();J()},[A,J,K,H]);S7(()=>{if(!A.dragging)return;let N=y7(Y.current);return N.addEventListener("pointermove",_),N.addEventListener("pointerup",L),()=>{N.removeEventListener("pointermove",_),N.removeEventListener("pointerup",L)}},[A.dragging,_,L]);let C=eJ(()=>{return{height:jJ,width:jJ,borderRadius:jJ/2,position:"absolute",top:DQ-jJ/2+2.5,backgroundColor:"white",left:Math.max(0,D/Math.max(1,j-1)*q-jJ/2),boxShadow:"0 0 2px black",opacity:Number(G||A.dragging)}},[G,A.dragging,j,D,q]),O=eJ(()=>{return{height:Rj,backgroundColor:"rgba(255, 255, 255, 1)",width:(D-($??0))/(j-1)*q,marginLeft:($??0)/(j-1)*q,borderRadius:Rj/2}},[j,D,$,q]),E=eJ(()=>{return{height:Rj,backgroundColor:"rgba(255, 255, 255, 0.25)",width:((W??j-1)-($??0))/(j-1)*100+"%",marginLeft:($??0)/(j-1)*100+"%",borderRadius:Rj/2,position:"absolute"}},[j,$,W]);return q0("div",{ref:Y,onPointerDown:V,style:I7,children:[q0("div",{style:x7,children:[jQ("div",{style:E}),jQ("div",{style:O})]}),jQ("div",{style:C})]})},T0=(j)=>{let J=Math.floor(j/60),Q=Math.floor(j-J*60);return`${String(J)}:${String(Q).padStart(2,"0")}`},g7=({durationInFrames:j,maxTimeLabelWidth:J,fps:Q})=>{let $=f7.Timeline.useTimelinePosition(),W=v7(()=>{return{color:"white",fontFamily:"sans-serif",fontSize:14,maxWidth:J===null?void 0:J,overflow:"hidden",textOverflow:"ellipsis"}},[J]),G=$===j-1?$+1:$;return h7("div",{style:W,children:[T0(G/Q)," / ",T0(j/Q)]})},m7=10,UQ=12,c7=({allowFullscreen:j,playerWidth:J})=>{return d7(()=>{let $=h,W=h,Y=j?ZQ:0,G=W+$+Y+UQ*2+m7*2,Z=J-G,X=Math.max(Z,0),H=X-zj,U=(H<zj?X:H)+G+zj,D=J<U;return{maxTimeLabelWidth:X===0?null:X,displayVerticalVolumeSlider:D}},[j,J])},p7=[0,0.013,0.049,0.104,0.175,0.259,0.352,0.45,0.55,0.648,0.741,0.825,0.896,0.951,0.987],i7=[0,8.1,15.5,22.5,29,35.3,41.2,47.1,52.9,58.8,64.7,71,77.5,84.5,91.9],u7=1.4285714285714286,s7={boxSizing:"border-box",position:"absolute",bottom:0,width:"100%",paddingTop:40,paddingBottom:10,backgroundImage:`linear-gradient(to bottom,${p7.map((j,J)=>{return`hsla(0, 0%, 0%, ${j}) ${i7[J]*u7}%`}).join(", ")}, hsl(0, 0%, 0%) 100%)`,backgroundSize:"auto 145px",display:"flex",paddingRight:UQ,paddingLeft:UQ,flexDirection:"column",transition:"opacity 0.3s"},r7={display:"flex",flexDirection:"row",width:"100%",alignItems:"center",justifyContent:"center",userSelect:"none",WebkitUserSelect:"none"},o7={display:"flex",flexDirection:"row",userSelect:"none",WebkitUserSelect:"none",alignItems:"center"},JJ={width:12},n7={height:8},a7={flex:1},t7={},e7=({durationInFrames:j,isFullscreen:J,fps:Q,showVolumeControls:$,onFullscreenButtonClick:W,allowFullscreen:Y,onExitFullscreenButtonClick:G,spaceKeyToPlayOrPause:Z,onSeekEnd:X,onSeekStart:H,inFrame:K,outFrame:U,initiallyShowControls:D,canvasSize:A,renderPlayPauseButton:T,renderFullscreenButton:q,alwaysShowControls:V,showPlaybackRateControl:_,containerRef:L,buffering:C,hideControlsWhenPointerDoesntMove:O,onPointerDown:E,onDoubleClick:N,renderMuteButton:F,renderVolumeSlider:I,playing:z,toggle:m,renderCustomControls:R})=>{let g=uJ(null),[v,u]=sJ(!1),[c,jj]=sJ(!1),w=kJ(L,O),{maxTimeLabelWidth:S,displayVerticalVolumeSlider:d}=c7({allowFullscreen:Y,playerWidth:A?.width??0}),[x,vj]=sJ(()=>{if(typeof D==="boolean")return D;if(typeof D==="number"){if(D%1!==0)throw Error("initiallyShowControls must be an integer or a boolean");if(Number.isNaN(D))throw Error("initiallyShowControls must not be NaN");if(!Number.isFinite(D))throw Error("initiallyShowControls must be finite");if(D<=0)throw Error("initiallyShowControls must be a positive integer");return D}throw TypeError("initiallyShowControls must be a number or a boolean")}),fj=iJ(()=>{return{...s7,opacity:Number(w||!z||x||V)}},[w,x,z,V]),b=iJ(()=>{if(T!==null||z&&C)return wJ;return{...wJ,outline:"none"}},[C,z,T]);pJ(()=>{if(g.current&&Z)g.current.focus({preventScroll:!0})},[z,Z]),pJ(()=>{jj((typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled))??!1)},[]),pJ(()=>{if(x===!1)return;let gj=setTimeout(()=>{vj(!1)},x===!0?2000:x);return()=>{clearInterval(gj)}},[x]);let Jj=iJ(()=>{if(_===!0)return[0.5,0.8,1,1.2,1.5,1.8,2,2.5,3];if(Array.isArray(_)){for(let k of _){if(typeof k!=="number")throw Error("Every item in showPlaybackRateControl must be a number");if(k<=0)throw Error("Every item in showPlaybackRateControl must be positive")}return _}return null},[_]),y=R?R():null,s=uJ(null),Qj=uJ(null),Xj=MJ((k)=>{if(k.target===s.current||k.target===Qj.current)E?.(k)},[E]),Nj=MJ((k)=>{if(k.target===s.current||k.target===Qj.current)N?.(k)},[N]),hj=MJ(()=>{u(!0)},[]),Ej=MJ(()=>{u(!1)},[]);return LJ("div",{ref:s,style:fj,onPointerDown:Xj,onDoubleClick:Nj,children:[LJ("div",{ref:Qj,style:r7,children:[LJ("div",{style:o7,children:[f("button",{ref:g,type:"button",style:b,onClick:m,onFocus:hj,onBlur:Ej,"aria-label":z?"Pause video":"Play video",title:z?"Pause video":"Play video",children:T===null?f(G0,{buffering:C,focused:v,playing:z}):T({playing:z,isBuffering:C})??f(G0,{buffering:C,focused:!1,playing:z})}),$?LJ(l7,{children:[f("div",{style:JJ}),f(H7,{renderMuteButton:F,renderVolumeSlider:I,displayVerticalVolumeSlider:d})]}):null,f("div",{style:JJ}),f(g7,{durationInFrames:j,fps:Q,maxTimeLabelWidth:S}),f("div",{style:JJ})]}),f("div",{style:a7}),y,y&&Jj&&A?f("div",{style:JJ}):null,Jj&&A&&f(L7,{canvasSize:A,playbackRates:Jj}),Jj&&c&&Y?f("div",{style:JJ}):null,f("div",{style:t7,children:c&&Y?f("button",{type:"button","aria-label":J?"Exit fullscreen":"Enter Fullscreen",title:J?"Exit fullscreen":"Enter Fullscreen",style:wJ,onClick:J?G:W,children:q===null?f(X5,{isFullscreen:J}):q({isFullscreen:J})}):null})]}),f("div",{style:n7}),f(R7,{onSeekEnd:X,onSeekStart:H,durationInFrames:j,inFrame:K,outFrame:U})]})},v0=typeof document>"u",J8=(j)=>{let J=!1;return{promise:new Promise(($,W)=>{j.then((Y)=>{if(J){W({isCanceled:J,value:Y});return}$(Y)}).catch((Y)=>{W({isCanceled:J,error:Y})})}),cancel:()=>{J=!0}}},Q8=(j)=>new Promise((J)=>setTimeout(J,j)),Y8=()=>{let j=W8([]),J=QQ((Y)=>{j.current=[...j.current,Y]},[]),Q=QQ((Y)=>{j.current=j.current.filter((G)=>G!==Y)},[]),$=QQ(()=>j.current.map((Y)=>Y.cancel()),[]);return $8(()=>({appendPendingPromise:J,removePendingPromise:Q,clearPendingPromises:$}),[J,$,Q])},Z8=(j,J,Q)=>{let $=Y8(),W=JQ(async(X)=>{if(X instanceof PointerEvent?X.pointerType==="touch":X.nativeEvent.pointerType==="touch"){j(X);return}$.clearPendingPromises();let H=J8(Q8(200));$.appendPendingPromise(H);try{await H.promise,$.removePendingPromise(H),j(X)}catch(K){let U=K;if($.removePendingPromise(H),!U.isCanceled)throw U.error}},[$,j]),Y=JQ(()=>{document.addEventListener("pointerup",(X)=>{W(X)},{once:!0})},[W]),G=JQ(()=>{$.clearPendingPromises(),J()},[$,J]);return j8(()=>{if(!Q)return{handlePointerDown:j,handleDoubleClick:()=>{return}};return{handlePointerDown:Y,handleDoubleClick:G}},[Q,G,Y,j])},qQ=p5.version.split(".")[0];if(qQ==="0")throw Error(`Version ${qQ} of "react" is not supported by Remotion`);var G8=parseInt(qQ,10)>=18,H8=({controls:j,style:J,loop:Q,autoPlay:$,allowFullscreen:W,inputProps:Y,clickToPlay:G,showVolumeControls:Z,doubleClickToFullscreen:X,spaceKeyToPlayOrPause:H,errorFallback:K,playbackRate:U,renderLoading:D,renderPoster:A,className:T,moveToBeginningWhenEnded:q,showPosterWhenUnplayed:V,showPosterWhenEnded:_,showPosterWhenPaused:L,showPosterWhenBuffering:C,showPosterWhenBufferingAndPaused:O,inFrame:E,outFrame:N,initiallyShowControls:F,renderFullscreen:I,renderPlayPauseButton:z,renderMuteButton:m,renderVolumeSlider:R,renderCustomControls:g,alwaysShowControls:v,showPlaybackRateControl:u,posterFillMode:c,bufferStateDelayInMilliseconds:jj,hideControlsWhenPointerDoesntMove:w,overflowVisible:S,browserMediaControlsBehavior:d,overrideInternalClassName:x,noSuspense:vj},fj)=>{let b=ej.useUnsafeVideoConfig(),Jj=ej.useVideo(),y=W0(null),s=IJ(y,{triggerOnWindowResize:!1,shouldApplyCssTransforms:!1}),[Qj,Xj]=tj(!1),[Nj,hj]=tj($),[Ej,k]=tj(()=>!1),[gj,r]=tj(!1),Oj=Cj(()=>{if(typeof document>"u")return!1;return Boolean(document.fullscreenEnabled||document.webkitFullscreenEnabled)},[]),B=YJ(),dj=B.toggle,{playerMuted:mj,mediaVolume:Kj}=$0(ej.MediaVolumeContext);Tj(()=>{B.emitter.dispatchVolumeChange(Kj)},[B.emitter,Kj]);let Dj=mj||Kj===0;Tj(()=>{B.emitter.dispatchMuteChange({isMuted:Dj})},[B.emitter,Dj]),I0({loop:Q,playbackRate:U,moveToBeginningWhenEnded:q,inFrame:E,outFrame:N,getCurrentFrame:B.getCurrentFrame,browserMediaControlsBehavior:d,muted:Dj}),Tj(()=>{if(Qj&&!B.playing)Xj(!1),B.play()},[Qj,B]),Tj(()=>{let{current:M}=y;if(!M)return;let P=()=>{let a=document.fullscreenElement===M||document.webkitFullscreenElement===M;k(a)};return document.addEventListener("fullscreenchange",P),document.addEventListener("webkitfullscreenchange",P),()=>{document.removeEventListener("fullscreenchange",P),document.removeEventListener("webkitfullscreenchange",P)}},[]);let Vj=Yj((M)=>{dj(M)},[dj]),Uj=Yj(()=>{if(!W)throw Error("allowFullscreen is false");if(!Oj)throw Error("Browser doesnt support fullscreen");if(!y.current)throw Error("No player ref found");if(y.current.webkitRequestFullScreen)y.current.webkitRequestFullScreen();else y.current.requestFullscreen()},[W,Oj]),Gj=Yj(()=>{if(document.webkitExitFullscreen)document.webkitExitFullscreen();else document.exitFullscreen()},[]);Tj(()=>{let{current:M}=y;if(!M)return;let P=()=>{let a=document.webkitFullscreenElement??document.fullscreenElement;if(a&&a===y.current)B.emitter.dispatchFullscreenChange({isFullscreen:!0});else B.emitter.dispatchFullscreenChange({isFullscreen:!1})};return M.addEventListener("webkitfullscreenchange",P),M.addEventListener("fullscreenchange",P),()=>{M.removeEventListener("webkitfullscreenchange",P),M.removeEventListener("fullscreenchange",P)}},[B.emitter]);let cj=b?.durationInFrames??1,Hj=Cj(()=>{if(!b||!s)return null;return TQ({canvasSize:s,compositionHeight:b.height,compositionWidth:b.width,previewSize:"auto"})},[s,b]),o=Hj?.scale??1,qj=W0(!1);Tj(()=>{if(!qj.current){qj.current=!0;return}B.emitter.dispatchScaleChange(o)},[B.emitter,o]);let{setMediaVolume:lj,setPlayerMuted:pj}=$0(ej.SetMediaVolumeContext),[Aj,Mj]=tj(!1);Tj(()=>{let M=null,P=!1,a=()=>{P=!1,requestAnimationFrame(()=>{if(jj===0)Mj(!0);else M=setTimeout(()=>{if(!P)Mj(!0)},jj)})},Pj=()=>{requestAnimationFrame(()=>{if(P=!0,Mj(!1),M)clearTimeout(M)})};return B.emitter.addEventListener("waiting",a),B.emitter.addEventListener("resume",Pj),()=>{if(B.emitter.removeEventListener("waiting",a),B.emitter.removeEventListener("resume",Pj),Mj(!1),M)clearTimeout(M);P=!0}},[jj,B.emitter]),s5(fj,()=>{let M={play:B.play,pause:()=>{Xj(!1),B.pause()},toggle:Vj,getContainerNode:()=>y.current,getCurrentFrame:B.getCurrentFrame,isPlaying:B.isPlaying,seekTo:(P)=>{let a=cj-1,Pj=Math.max(0,Math.min(a,P));if(B.isPlaying())Xj(Pj!==a||Q),B.pause();if(Pj===a&&!Q)B.emitter.dispatchEnded();B.seek(Pj)},isFullscreen:()=>{let{current:P}=y;if(!P)return!1;return document.fullscreenElement===P||document.webkitFullscreenElement===P},requestFullscreen:Uj,exitFullscreen:Gj,getVolume:()=>{if(mj)return 0;return Kj},setVolume:(P)=>{if(typeof P!=="number")throw TypeError(`setVolume() takes a number, got value of type ${typeof P}`);if(isNaN(P))throw TypeError("setVolume() got a number that is NaN. Volume must be between 0 and 1.");if(P<0||P>1)throw TypeError(`setVolume() got a number that is out of range. Must be between 0 and 1, got ${P}`);lj(P)},isMuted:()=>Dj,mute:()=>{pj(!0)},unmute:()=>{pj(!1)},getScale:()=>o,pauseAndReturnToPlayStart:()=>{B.pauseAndReturnToPlayStart()}};return Object.assign(B.emitter,M)},[cj,Gj,Q,mj,Dj,Kj,B,Uj,pj,lj,Vj,o]);let ij=Jj?Jj.component:null,$j=Cj(()=>{return M0({canvasSize:s,config:b,style:J,overflowVisible:S,layout:Hj})},[s,b,Hj,S,J]),yJ=Cj(()=>{return L0({config:b,layout:Hj,scale:o,overflowVisible:S})},[b,Hj,S,o]),g0=Cj(()=>{return P0({config:b,layout:Hj,scale:o,overflowVisible:S})},[b,Hj,S,o]),VQ=B.pause,CQ=B.emitter.dispatchError,d0=Yj((M)=>{VQ(),CQ(M)},[CQ,VQ]),m0=Yj((M)=>{M.stopPropagation(),Uj()},[Uj]),c0=Yj((M)=>{M.stopPropagation(),Gj()},[Gj]),l0=Yj((M)=>{if(M instanceof MouseEvent?M.button===2:M.nativeEvent.button)return;Vj(M)},[Vj]),p0=Yj(()=>{r(!0)},[]),i0=Yj(()=>{r(!1)},[]),u0=Yj(()=>{if(Ej)Gj();else Uj()},[Gj,Ej,Uj]),{handlePointerDown:ZJ,handleDoubleClick:XJ}=Z8(l0,u0,X&&W&&Oj);Tj(()=>{if(Nj)B.play(),hj(!1)},[Nj,B]);let s0=Cj(()=>{return D?D({height:$j.height,width:$j.width,isBuffering:Aj}):null},[$j.height,$j.width,D,Aj]),r0=Cj(()=>{return{type:"scale",scale:o}},[o]);if(!b)return null;let GJ=A?A({height:c==="player-size"?$j.height:b.height,width:c==="player-size"?$j.width:b.width,isBuffering:Aj}):null;if(GJ===void 0)throw TypeError("renderPoster() must return a React element, but undefined was returned");let zQ=GJ&&[L&&!B.isPlaying()&&!gj,_&&B.isLastFrame&&!B.isPlaying(),V&&!B.hasPlayed&&!B.isPlaying(),C&&Aj&&B.isPlaying(),O&&Aj&&!B.isPlaying()].some(Boolean),{left:r8,top:o8,width:n8,height:a8,...o0}=yJ,MQ=$Q(X8,{children:[$Q("div",{style:yJ,onPointerDown:G?ZJ:void 0,onDoubleClick:X?XJ:void 0,children:[$Q("div",{style:g0,className:NQ(x),children:[ij?Zj(EQ,{onError:d0,errorFallback:K,children:Zj(ej.CurrentScaleContext.Provider,{value:r0,children:Zj(ij,{...Jj?.props??{},...Y??{}})})}):null,zQ&&c==="composition-size"?Zj("div",{style:{...o0,width:b.width,height:b.height},onPointerDown:G?ZJ:void 0,onDoubleClick:X?XJ:void 0,children:GJ}):null]}),Zj(j7,{})]}),zQ&&c==="player-size"?Zj("div",{style:yJ,onPointerDown:G?ZJ:void 0,onDoubleClick:X?XJ:void 0,children:GJ}):null,j?Zj(e7,{fps:b.fps,playing:B.playing,toggle:B.toggle,durationInFrames:b.durationInFrames,containerRef:y,onFullscreenButtonClick:m0,isFullscreen:Ej,allowFullscreen:W,showVolumeControls:Z,onExitFullscreenButtonClick:c0,spaceKeyToPlayOrPause:H,onSeekEnd:i0,onSeekStart:p0,inFrame:E,outFrame:N,initiallyShowControls:F,canvasSize:s,renderFullscreenButton:I,renderPlayPauseButton:z,alwaysShowControls:v,showPlaybackRateControl:u,buffering:Aj,hideControlsWhenPointerDoesntMove:w,onDoubleClick:X?XJ:void 0,onPointerDown:G?ZJ:void 0,renderMuteButton:m,renderVolumeSlider:R,renderCustomControls:g}):null]});if(vj||v0&&!G8)return Zj("div",{ref:y,style:$j,className:T,children:MQ});return Zj("div",{ref:y,style:$j,className:T,children:Zj(i5,{fallback:s0,children:MQ})})},K8=u5(H8),f0="remotion.volumePreference",q8=(j,J,Q)=>{if(typeof window>"u")return;try{window.localStorage.setItem(Q??f0,String(j))}catch($){U8.Log.error({logLevel:J,tag:null},"Could not persist volume",$)}},A8=(j)=>{if(typeof window>"u")return 1;try{let J=window.localStorage.getItem(j??f0);return J?Number(J):1}catch{return 1}},OQ="player-comp",h0=({children:j,timelineContext:J,playbackRateContext:Q,fps:$,compositionHeight:W,compositionWidth:Y,durationInFrames:G,component:Z,numberOfSharedAudioTags:X,initiallyMuted:H,logLevel:K,audioLatencyHint:U,sampleRate:D,volumePersistenceKey:A,initialVolume:T,inputProps:q,audioEnabled:V})=>{let _=T===void 0,L=QJ(()=>{return{compositions:[{component:Z,durationInFrames:G,height:W,width:Y,fps:$,id:OQ,nonce:[[0,777]],folderName:null,parentFolderName:null,schema:null,calculateMetadata:null,stack:null}],folders:[],currentCompositionMetadata:{defaultCodec:null,defaultOutName:null,defaultPixelFormat:null,defaultProResProfile:null,defaultSampleRate:null,defaultVideoImageFormat:null,durationInFrames:G,fps:$,height:W,width:Y,props:q},canvasContent:{type:"composition",compositionId:"player-comp"}}},[Z,G,W,Y,$,q]),[C,O]=B0(()=>H),[E,N]=B0(()=>_?A8(A??null):T),F=QJ(()=>{return{playerMuted:C,mediaVolume:E}},[C,E]),I=V&&!C&&E>0,z=D8((v)=>{if(N(v),_)q8(v,K,A??null)},[_,K,A]),m=QJ(()=>{return{setPlayerMuted:O,setMediaVolume:z}},[z]),R=QJ(()=>{return{logLevel:K,mountTime:Date.now()}},[K]),g=QJ(()=>{return{isPlayer:!0,isRendering:!1,isStudio:!1,isClientSideRendering:!1,isReadOnlyStudio:!1}},[]);return p(l.RemotionEnvironmentContext.Provider,{value:g,children:p(l.LogLevelContext.Provider,{value:R,children:p(l.CanUseRemotionHooksProvider,{children:p(l.AbsoluteTimeContext.Provider,{value:J,children:p(l.PlaybackRateContext.Provider,{value:Q,children:p(l.TimelineContext.Provider,{value:J,children:p(l.CompositionManager.Provider,{value:L,children:p(l.PrefetchProvider,{children:p(l.DurationsContextProvider,{children:p(l.MediaVolumeContext.Provider,{value:F,children:p(l.SetMediaVolumeContext.Provider,{value:m,children:p(l.BufferingProvider,{children:p(l.SharedAudioContextProvider,{audioLatencyHint:U,audioEnabled:I,previewSampleRate:D,children:p(l.SharedAudioTagsContextProvider,{numberOfAudioTags:X,children:j})})})})})})})})})})})})})})},_0=!1,B8=(j,J)=>{if(j)return;if(_0)return;_0=!0,T8.Log.warn({logLevel:J,tag:null},"Note: Some companies are required to obtain a license to use Remotion. See: https://remotion.dev/license\nPass the `acknowledgeRemotionLicense` prop to `<Player />` function to make this message disappear.")},N0=(j,J)=>{if(typeof j>"u"||j===null)return j??null;if(typeof j!=="number")throw TypeError(`"${J}" must be a number, but is ${JSON.stringify(j)}`);if(Number.isNaN(j))throw TypeError(`"${J}" must not be NaN, but is ${JSON.stringify(j)}`);if(!Number.isFinite(j))throw TypeError(`"${J}" must be finite, but is ${JSON.stringify(j)}`);if(j%1!==0)throw TypeError(`"${J}" must be an integer, but is ${JSON.stringify(j)}`);return j},_8=({inFrame:j,durationInFrames:J,outFrame:Q})=>{let $=N0(j,"inFrame"),W=N0(Q,"outFrame");if($===null&&W===null)return;if($!==null&&$>J-1)throw Error("inFrame must be less than (durationInFrames - 1), but is "+$);if(W!==null&&W>J-1)throw Error("outFrame must be less than (durationInFrames - 1), but is "+W);if($!==null&&$<0)throw Error("inFrame must be greater than 0, but is "+$);if(W!==null&&W<=0)throw Error(`outFrame must be greater than 0, but is ${W}. If you want to render a single frame, use <Thumbnail /> instead.`);if(W!==null&&$!==null&&W<=$)throw Error("outFrame must be greater than inFrame, but is "+W+" <= "+$)},N8=({initialFrame:j,durationInFrames:J})=>{if(typeof J!=="number")throw Error(`\`durationInFrames\` must be a number, but is ${JSON.stringify(J)}`);if(typeof j>"u")return;if(typeof j!=="number")throw Error(`\`initialFrame\` must be a number, but is ${JSON.stringify(j)}`);if(Number.isNaN(j))throw Error("`initialFrame` must be a number, but is NaN");if(!Number.isFinite(j))throw Error("`initialFrame` must be a number, but is Infinity");if(j%1!==0)throw Error(`\`initialFrame\` must be an integer, but is ${JSON.stringify(j)}`);if(j>J-1)throw Error(`\`initialFrame\` must be less or equal than \`durationInFrames - 1\`, but is ${JSON.stringify(j)}`)},E8=(j)=>{if(j===void 0)return;if(j>10)throw Error(`The highest possible playback rate is 10. You passed: ${j}`);if(j<-10)throw Error(`The lowest possible playback rate is -10. You passed: ${j}`);if(j===0)throw Error("A playback rate of 0 is not supported.")},O8=nj.validateFps,E0=nj.validateDimension,V8=nj.validateDurationInFrames,C8=nj.validateDefaultAndInputProps,z8=(j)=>{if("component"in j)return j.component;return null},M8=({durationInFrames:j,compositionHeight:J,compositionWidth:Q,fps:$,inputProps:W,style:Y,controls:G=!1,loop:Z=!1,autoPlay:X=!1,showVolumeControls:H=!0,allowFullscreen:K=!0,clickToPlay:U,doubleClickToFullscreen:D=!1,spaceKeyToPlayOrPause:A=!0,moveToBeginningWhenEnded:T=!0,numberOfSharedAudioTags:q=5,errorFallback:V=()=>"⚠️",playbackRate:_=1,renderLoading:L,className:C,showPosterWhenUnplayed:O,showPosterWhenEnded:E,showPosterWhenPaused:N,showPosterWhenBuffering:F,showPosterWhenBufferingAndPaused:I,initialFrame:z,renderPoster:m,inFrame:R,outFrame:g,initiallyShowControls:v,renderFullscreenButton:u,renderPlayPauseButton:c,renderVolumeSlider:jj,renderCustomControls:w,alwaysShowControls:S=!1,initiallyMuted:d=!1,showPlaybackRateControl:x=!1,posterFillMode:vj="player-size",bufferStateDelayInMilliseconds:fj,hideControlsWhenPointerDoesntMove:b=!0,overflowVisible:Jj=!1,renderMuteButton:y,browserMediaControlsBehavior:s,overrideInternalClassName:Qj,logLevel:Xj="info",noSuspense:Nj,acknowledgeRemotionLicense:hj,audioLatencyHint:Ej="playback",sampleRate:k=48000,volumePersistenceKey:gj,initialVolume:r,...Oj},B)=>{if(typeof window<"u")window.remotion_isPlayer=!0;if(Oj.defaultProps!==void 0)throw Error("The <Player /> component does not accept `defaultProps`, but some were passed. Use `inputProps` instead.");let dj=z8(Oj);if(dj?.type===Q0)throw TypeError("'component' should not be an instance of <Composition/>. Pass the React component directly, and set the duration, fps and dimensions as separate props. See https://www.remotion.dev/docs/player/examples for an example.");if(dj===Q0)throw TypeError("'component' must not be the 'Composition' component. Pass your own React component directly, and set the duration, fps and dimensions as separate props. See https://www.remotion.dev/docs/player/examples for an example.");kj(()=>B8(Boolean(hj),Xj));let mj=Ij.useLazyComponent({compProps:Oj,componentName:"Player",noSuspense:Boolean(Nj)});N8({initialFrame:z,durationInFrames:j});let[Kj,Dj]=kj(()=>({[OQ]:z??0})),[Vj,Uj]=kj(!1),[Gj]=kj("player-comp"),cj=cJ(null),Hj=cJ([]),o=cJ(!1),[qj,lj]=kj(_);if(typeof J!=="number")throw TypeError(`'compositionHeight' must be a number but got '${typeof J}' instead`);if(typeof Q!=="number")throw TypeError(`'compositionWidth' must be a number but got '${typeof Q}' instead`);if(E0(J,"compositionHeight","of the <Player /> component"),E0(Q,"compositionWidth","of the <Player /> component"),V8(j,{component:"of the <Player/> component",allowFloats:!1}),O8($,"as a prop of the <Player/> component",!1),C8(W,"inputProps",null),_8({durationInFrames:j,inFrame:R,outFrame:g}),typeof G!=="boolean"&&typeof G<"u")throw TypeError(`'controls' must be a boolean or undefined but got '${typeof G}' instead`);if(typeof X!=="boolean"&&typeof X<"u")throw TypeError(`'autoPlay' must be a boolean or undefined but got '${typeof X}' instead`);if(typeof Z!=="boolean"&&typeof Z<"u")throw TypeError(`'loop' must be a boolean or undefined but got '${typeof Z}' instead`);if(typeof D!=="boolean"&&typeof D<"u")throw TypeError(`'doubleClickToFullscreen' must be a boolean or undefined but got '${typeof D}' instead`);if(typeof H!=="boolean"&&typeof H<"u")throw TypeError(`'showVolumeControls' must be a boolean or undefined but got '${typeof H}' instead`);if(typeof K!=="boolean"&&typeof K<"u")throw TypeError(`'allowFullscreen' must be a boolean or undefined but got '${typeof K}' instead`);if(typeof U!=="boolean"&&typeof U<"u")throw TypeError(`'clickToPlay' must be a boolean or undefined but got '${typeof U}' instead`);if(typeof A!=="boolean"&&typeof A<"u")throw TypeError(`'spaceKeyToPlayOrPause' must be a boolean or undefined but got '${typeof A}' instead`);if(typeof k!=="number"||!Number.isFinite(k)||Number.isNaN(k)||k<=0||k%1!==0)throw TypeError(`'sampleRate' must be a positive integer but got '${k}' instead`);if(typeof r<"u"&&typeof r!=="number")throw TypeError(`'initialVolume' must be a number or undefined but got '${typeof r}' instead`);if(typeof r==="number"&&(!Number.isFinite(r)||Number.isNaN(r)||r<0||r>1))throw TypeError(`'initialVolume' must be between 0 and 1 but got '${r}' instead`);if(typeof q!=="number"||q%1!==0||!Number.isFinite(q)||Number.isNaN(q)||q<0)throw TypeError(`'numberOfSharedAudioTags' must be an integer but got '${q}' instead`);E8(qj),m5(()=>{lj(_)},[_]),c5(B,()=>cj.current,[]),kj(()=>{Ij.playbackLogging({logLevel:Xj,message:`[player] Mounting <Player>. User agent = ${typeof navigator>"u"?"server":navigator.userAgent}`,tag:"player",mountTime:Date.now()})});let pj=aj(()=>{return{frame:Kj,playing:Vj,rootId:Gj,imperativePlaying:o,audioAndVideoTags:Hj}},[Kj,Vj,Gj]),Aj=aj(()=>{return{playbackRate:qj,setPlaybackRate:lj}},[qj]),Mj=aj(()=>{return{setFrame:Dj,setPlaying:Uj}},[Dj]);if(typeof window<"u")l5(()=>{Ij.CSSUtils.injectCSS(Ij.CSSUtils.makeDefaultPreviewCSS(`.${NQ(Qj)}`,"#fff"))},[Qj]);let ij=aj(()=>W??{},[W]),$j=aj(()=>{return s??{mode:"prevent-media-session"}},[s]);return $J(Ij.IsPlayerContextProvider,{children:$J(h0,{timelineContext:pj,playbackRateContext:Aj,component:mj,compositionHeight:J,compositionWidth:Q,durationInFrames:j,fps:$,numberOfSharedAudioTags:q,initiallyMuted:d,logLevel:Xj,audioLatencyHint:Ej,sampleRate:k,volumePersistenceKey:gj,initialVolume:r,inputProps:ij,audioEnabled:!0,children:$J(Ij.SetTimelineContext.Provider,{value:Mj,children:$J(k0,{currentPlaybackRate:qj,children:$J(K8,{ref:cj,posterFillMode:vj,renderLoading:L,autoPlay:Boolean(X),loop:Boolean(Z),controls:Boolean(G),errorFallback:V,style:Y,inputProps:ij,allowFullscreen:Boolean(K),moveToBeginningWhenEnded:Boolean(T),clickToPlay:typeof U==="boolean"?U:Boolean(G),showVolumeControls:Boolean(H),doubleClickToFullscreen:Boolean(D),spaceKeyToPlayOrPause:Boolean(A),playbackRate:qj,className:C??void 0,showPosterWhenUnplayed:Boolean(O),showPosterWhenEnded:Boolean(E),showPosterWhenPaused:Boolean(N),showPosterWhenBuffering:Boolean(F),showPosterWhenBufferingAndPaused:Boolean(I),renderPoster:m,inFrame:R??null,outFrame:g??null,initiallyShowControls:v??!0,renderFullscreen:u??null,renderPlayPauseButton:c??null,renderMuteButton:y??null,renderVolumeSlider:jj??null,renderCustomControls:w??null,alwaysShowControls:S,showPlaybackRateControl:x,bufferStateDelayInMilliseconds:fj??300,hideControlsWhenPointerDoesntMove:b,overflowVisible:Jj,browserMediaControlsBehavior:$j,overrideInternalClassName:Qj??void 0,noSuspense:Boolean(Nj)})})})})})},P8=d5,L8=P8(M8),d8=()=>{let j=h8(F0);if(!j)throw TypeError("Expected Player event emitter context");return g8(()=>{return{emitter:j}},[j])},AQ=I8.version.split(".")[0];if(AQ==="0")throw Error(`Version ${AQ} of "react" is not supported by Remotion`);var m8=parseInt(AQ,10)>=18,c8=({style:j,inputProps:J,errorFallback:Q,renderLoading:$,className:W,overflowVisible:Y,noSuspense:G,overrideInternalClassName:Z},X)=>{let H=YQ.useUnsafeVideoConfig(),K=YQ.useVideo(),U=f8(null),D=IJ(U,{triggerOnWindowResize:!1,shouldApplyCssTransforms:!1}),A=yj(()=>{if(!H||!D)return null;return TQ({canvasSize:D,compositionHeight:H.height,compositionWidth:H.width,previewSize:"auto"})},[D,H]),T=A?.scale??1,q=d8();b0(q.emitter),v8(X,()=>{let I={getContainerNode:()=>U.current,getScale:()=>T};return Object.assign(q.emitter,I)},[T,q.emitter]);let V=K?K.component:null,_=yj(()=>{return M0({config:H,style:j,canvasSize:D,overflowVisible:Y,layout:A})},[D,H,A,Y,j]),L=yj(()=>{return L0({config:H,layout:A,scale:T,overflowVisible:Y})},[H,A,Y,T]),C=yj(()=>{return P0({config:H,layout:A,scale:T,overflowVisible:Y})},[H,A,Y,T]),O=R8((I)=>{q.emitter.dispatchError(I)},[q.emitter]),E=yj(()=>{return $?$({height:_.height,width:_.width,isBuffering:!1}):null},[_.height,_.width,$]),N=yj(()=>{return{type:"scale",scale:T}},[T]);if(!H)return null;let F=Bj("div",{style:L,children:Bj("div",{style:C,className:NQ(Z),children:V?Bj(EQ,{onError:O,errorFallback:Q,children:Bj(YQ.CurrentScaleContext.Provider,{value:N,children:Bj(V,{...K?.props??{},...J??{}})})}):null})});if(G||v0&&!m8)return Bj("div",{ref:U,style:_,className:W,children:F});return Bj("div",{ref:U,style:_,className:W,children:Bj(y8,{fallback:E,children:F})})},l8=x8(c8),p8=({frameToDisplay:j,style:J,inputProps:Q,compositionHeight:$,compositionWidth:W,durationInFrames:Y,fps:G,className:Z,errorFallback:X=()=>"⚠️",renderLoading:H,overflowVisible:K=!1,overrideInternalClassName:U,logLevel:D="info",noSuspense:A,...T},q)=>{if(typeof window<"u")w8(()=>{window.remotion_isPlayer=!0},[]);let[V]=O0(()=>String(k8(null))),_=b8(null),L=WQ(()=>{return{playing:!1,frame:{[OQ]:j},rootId:V,imperativePlaying:{current:!1},audioAndVideoTags:{current:[]}}},[j,V]),C=WQ(()=>{return{playbackRate:1,setPlaybackRate:()=>{throw Error("thumbnail")}}},[]);F8(q,()=>_.current,[]);let O=V0.useLazyComponent({compProps:T,componentName:"Thumbnail",noSuspense:Boolean(A)}),[E]=O0(()=>new w0),N=WQ(()=>{return Q??{}},[Q]);return SJ(V0.IsPlayerContextProvider,{children:SJ(h0,{timelineContext:L,playbackRateContext:C,component:O,compositionHeight:$,compositionWidth:W,durationInFrames:Y,fps:G,numberOfSharedAudioTags:0,initiallyMuted:!0,logLevel:D,audioLatencyHint:"playback",sampleRate:48000,inputProps:N,audioEnabled:!1,children:SJ(F0.Provider,{value:E,children:SJ(l8,{ref:_,className:Z,errorFallback:X,inputProps:N,renderLoading:H,style:J,overflowVisible:K,overrideInternalClassName:U,noSuspense:Boolean(A)})})})})},i8=S8,u8=i8(p8),s8={PlayerEventEmitterContext:BQ,PlayerEmitter:_Q,usePlayer:YJ,usePlayback:I0,useElementSize:IJ,calculateCanvasTransformation:TQ,useHoverState:kJ,updateAllElementsSizes:g5,PlayerEmitterProvider:k0,BufferingIndicator:z0};var{Player:A$,PlayerInternals:T$,Thumbnail:B$}=xJ;var N$=xJ;export{N$ as default,B$ as Thumbnail,T$ as PlayerInternals,A$ as Player};
|