@1agh/maude 0.58.2 → 0.58.3
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/apps/studio/annotations-bindings.ts +83 -4
- package/apps/studio/api.ts +6 -1
- package/apps/studio/bin/_fetch-asset.mjs +169 -5
- package/apps/studio/bin/_import-asset.mjs +72 -0
- package/apps/studio/bin/_import-figma.mjs +1121 -0
- package/apps/studio/bin/_video-playwright.mjs +86 -3
- package/apps/studio/bin/import-figma.sh +38 -0
- package/apps/studio/bin/read-annotations.mjs +11 -1
- package/apps/studio/bun.lock +16 -22
- package/apps/studio/canvas-edit.ts +29 -5
- package/apps/studio/client/app.jsx +44 -1
- package/apps/studio/client/export-center.jsx +42 -4
- package/apps/studio/client/panels/CloudBar.jsx +92 -1
- package/apps/studio/client/panels/FigmaImportPanel.jsx +264 -0
- package/apps/studio/client/panels/GitPanel.jsx +26 -6
- package/apps/studio/client/panels/SettingsPanel.jsx +181 -0
- package/apps/studio/client/panels/SetupChecklist.jsx +26 -2
- package/apps/studio/client/panels/TimelinePanel.jsx +2 -2
- package/apps/studio/client/panels/timeline-parse.js +3 -3
- package/apps/studio/client/styles/3-shell-maude.css +7 -0
- package/apps/studio/client/styles/4-components.css +134 -0
- package/apps/studio/clip-ops.ts +93 -17
- package/apps/studio/cloud/endpoints.ts +78 -10
- package/apps/studio/cloud/renew.ts +183 -0
- package/apps/studio/context.ts +2 -1
- package/apps/studio/dist/client.bundle.js +1261 -1261
- package/apps/studio/dist/runtime/@remotion_media.js +56 -136
- package/apps/studio/dist/runtime/@remotion_player.js +18 -18
- package/apps/studio/dist/runtime/@remotion_transitions.js +9 -9
- package/apps/studio/dist/runtime/@remotion_transitions_clock-wipe.js +1 -1
- package/apps/studio/dist/runtime/remotion.js +12 -12
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/exporters/_browser-bundles.ts +20 -6
- package/apps/studio/exporters/_runtime.ts +19 -0
- package/apps/studio/exporters/degraded.ts +92 -0
- package/apps/studio/exporters/index.ts +5 -0
- package/apps/studio/exporters/jobs.ts +19 -0
- package/apps/studio/exporters/unsupported-media.ts +170 -0
- package/apps/studio/exporters/video-encode-lib.ts +27 -1
- package/apps/studio/exporters/video-render-lib.ts +6 -0
- package/apps/studio/exporters/video.ts +62 -1
- package/apps/studio/figma/assets.test.ts +372 -0
- package/apps/studio/figma/assets.ts +398 -0
- package/apps/studio/figma/client.test.ts +395 -0
- package/apps/studio/figma/client.ts +513 -0
- package/apps/studio/figma/comments-to-strokes.test.ts +194 -0
- package/apps/studio/figma/comments-to-strokes.ts +173 -0
- package/apps/studio/figma/endpoints.ts +200 -0
- package/apps/studio/figma/sanitize.test.ts +256 -0
- package/apps/studio/figma/sanitize.ts +315 -0
- package/apps/studio/figma/style-map.ts +352 -0
- package/apps/studio/figma/to-artboard.test.ts +808 -0
- package/apps/studio/figma/to-artboard.ts +701 -0
- package/apps/studio/figma/to-render.test.ts +180 -0
- package/apps/studio/figma/to-render.ts +306 -0
- package/apps/studio/figma/to-strokes-roundtrip.test.ts +152 -0
- package/apps/studio/figma/to-strokes.test.ts +705 -0
- package/apps/studio/figma/to-strokes.ts +749 -0
- package/apps/studio/figma/to-tokens.test.ts +321 -0
- package/apps/studio/figma/to-tokens.ts +305 -0
- package/apps/studio/figma/types.ts +539 -0
- package/apps/studio/figma/url.test.ts +167 -0
- package/apps/studio/figma/url.ts +160 -0
- package/apps/studio/http.ts +129 -0
- package/apps/studio/sync/asset-push.ts +124 -0
- package/apps/studio/sync/connection-state.ts +11 -0
- package/apps/studio/sync/hub-link.ts +63 -7
- package/apps/studio/sync/hubs-config.ts +31 -3
- package/apps/studio/sync/index.ts +276 -26
- package/apps/studio/sync/migrate-flat-fallback.ts +121 -0
- package/apps/studio/sync/presentation.ts +45 -1
- package/apps/studio/sync/supervisor.ts +5 -1
- package/apps/studio/sync/workspace-signin.ts +7 -3
- package/apps/studio/test/annotations-bindings.test.ts +150 -12
- package/apps/studio/test/canvas-create-api.test.ts +4 -1
- package/apps/studio/test/canvas-origin-gate.test.ts +13 -0
- package/apps/studio/test/capture-determinism-shape.test.ts +135 -0
- package/apps/studio/test/clip-addressing.test.ts +6 -1
- package/apps/studio/test/clip-ops.test.ts +5 -1
- package/apps/studio/test/cloud-endpoints.test.ts +96 -0
- package/apps/studio/test/cloud-renew.test.ts +205 -0
- package/apps/studio/test/cloud-shell-surfaces.test.ts +11 -2
- package/apps/studio/test/exporters/degraded-propagation.test.ts +123 -0
- package/apps/studio/test/exporters/unsupported-media.test.ts +123 -0
- package/apps/studio/test/fetch-asset-gate.test.ts +189 -0
- package/apps/studio/test/figma-provenance.test.ts +108 -0
- package/apps/studio/test/figma-routes.test.ts +294 -0
- package/apps/studio/test/git-cloud-posture.test.ts +50 -0
- package/apps/studio/test/hub-link.test.ts +11 -0
- package/apps/studio/test/import-figma.test.ts +479 -0
- package/apps/studio/test/sync-asset-push.test.ts +124 -0
- package/apps/studio/test/sync-connection-state.test.ts +13 -0
- package/apps/studio/test/sync-hubs-config.test.ts +5 -0
- package/apps/studio/test/sync-migrate-flat-fallback.test.ts +98 -0
- package/apps/studio/test/sync-path-pull.test.ts +63 -0
- package/apps/studio/test/sync-presentation.test.ts +77 -0
- package/apps/studio/test/sync-runtime.test.ts +316 -1
- package/apps/studio/test/video-comp.test.ts +23 -1
- package/apps/studio/test/workspace-containment.test.ts +1 -0
- package/apps/studio/video-comp.tsx +70 -6
- package/apps/studio/whats-new.json +27 -0
- package/apps/studio/workspace-mode.ts +4 -0
- package/cli/commands/design.mjs +8 -0
- package/package.json +8 -8
- package/plugins/flow/.claude-plugin/config.schema.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var LJ=Object.defineProperty;var OJ=(J,j)=>{for(var Q in j)LJ(J,Q,{get:j[Q],enumerable:!0,configurable:!0,set:($)=>j[Q]=()=>$})};var Uj={};OJ(Uj,{useTransitionProgress:()=>U0,springTiming:()=>H0,makeHtmlInCanvasPresentation:()=>Jj,linearTiming:()=>Q0,linearBlur:()=>j0,filmBurn:()=>nQ,dreamyZoom:()=>iQ,crossZoom:()=>fQ,TransitionSeries:()=>Qj});import{useMemo as nj}from"react";import{AbsoluteFill as zQ}from"remotion";import{jsx as MQ}from"react/jsx-runtime";import{useCallback as bQ,useLayoutEffect as e,useMemo as CQ,useRef as Mj,useState as rj}from"react";import{AbsoluteFill as EQ,HTML_IN_CANVAS_UNSUPPORTED_MESSAGE as kQ,HtmlInCanvas as SQ,Internals as Lj,useDelayRender as wQ}from"remotion";import{jsx as bj}from"react/jsx-runtime";import{interpolate as J0}from"remotion";import{measureSpring as $0,spring as Z0}from"remotion";import{Children as K0,useCallback as Oj,useMemo as HJ,useRef as KJ}from"react";import{Internals as d,Interactive as W0,Sequence as Y0,useCurrentFrame as X0,useVideoConfig as G0}from"remotion";var Yj=(J)=>{return Math.round(J*1e6)/1e6},bJ=new Set(["deg","rad","grad","turn"]),hj=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"]),dj=/^([+-]?(?:\d+\.?\d*|\.\d+))([a-zA-Z%]+)?$/,cj=new Set(["left","center","right","top","bottom"]),p=(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:"%"}}]},n={value:50,unit:"%"},Sj=(J)=>{return String(Yj(J))},CJ=(J,j)=>{let Q=dj.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,Z=Number(Q[1]);if(!Number.isFinite(Z))throw TypeError(`Cannot interpolate "${j}" because "${J}" is not finite`);if($===null)return{kind:"scale",value:Z,unit:null};if(bJ.has($))return{kind:"rotate",value:Z,unit:$};if(hj.has($))return{kind:"translate",value:Z,unit:$};throw TypeError(`Cannot interpolate "${j}" because "${$}" is not a supported translate or rotate unit`)},uj=({component:J,value:j,allowPercentage:Q})=>{let $=dj.exec(J);if($===null)throw TypeError(`Cannot interpolate "${j}" because "${J}" is not a supported transform-origin ${Q?"length-percentage":"z length"}`);let Z=$[2]??null,H=Number($[1]);if(!Number.isFinite(H))throw TypeError(`Cannot interpolate "${j}" because "${J}" is not finite`);if(Z===null||!hj.has(Z)||!Q&&Z==="%")throw TypeError(`Cannot interpolate "${j}" because "${J}" is not a supported transform-origin ${Q?"length-percentage":"z length"}`);return{value:H,unit:Z}},qj=(J,j)=>{let Q=J.toLowerCase();if(cj.has(Q))return{type:"keyword",keyword:Q};return{type:"length-percentage",parsed:uj({component:J,value:j,allowPercentage:!0})}},EJ=(J,j,Q)=>{let $=[];for(let Z of p(J))for(let H of p(j)){if(Z.axis===H.axis)continue;$.push(Z.axis==="x"?[Z.value,H.value]:[H.value,Z.value])}if($.length===0)throw TypeError(`Cannot interpolate "${Q}" because "${J} ${j}" is not a valid transform-origin keyword pair`);return $[0]},kJ=(J,j)=>{if(J.length===1){let K=qj(J[0],j);if(K.type==="length-percentage")return[K.parsed,n];if(K.keyword==="top"||K.keyword==="bottom")return[n,p(K.keyword)[0].value];return[p(K.keyword)[0].value,n]}let Q=qj(J[0],j),$=qj(J[1],j);if(Q.type==="length-percentage"&&$.type==="length-percentage")return[Q.parsed,$.parsed];if(Q.type==="keyword"&&$.type==="keyword")return EJ(Q.keyword,$.keyword,j);let Z=Q.type==="keyword"?Q:$.type==="keyword"?$:null,H=Q.type==="length-percentage"?Q.parsed:$.type==="length-percentage"?$.parsed:null;if(Z===null||H===null)throw Error("Expected a keyword and a length-percentage value");let Y=Q.type==="keyword";if(Z.keyword==="left"||Z.keyword==="right"){if(!Y)throw TypeError(`Cannot interpolate "${j}" because horizontal transform-origin keywords must come before a length-percentage value`);return[p(Z.keyword)[0].value,H]}if(Z.keyword==="top"||Z.keyword==="bottom")return[H,p(Z.keyword)[0].value];return Y?[n,H]:[H,n]},SJ=(J,j)=>{let[Q,$]=kJ(j.slice(0,2),J),Z=j[2]===void 0?{value:0,unit:null}:uj({component:j[2],value:J,allowPercentage:!1});return{kind:"translate",values:[Q.value,$.value,Z.value],units:[Q.unit,$.unit,Z.unit],dimensions:j[2]===void 0?2:3}},wJ=(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((Z)=>cj.has(Z.toLowerCase())))return SJ(J,j);let Q=j.map((Z)=>CJ(Z,J)),[{kind:$}]=Q;for(let Z of Q)if(Z.kind!==$)throw TypeError(`Cannot interpolate "${J}" because it mixes ${$} and ${Z.kind} values`);if($==="scale"){let Z=Q[0].value,H=Q[1]?.value??Z,Y=Q[2]?.value??1;return{kind:$,values:[Z,H,Y],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}},FJ=({kind:J,values:j,units:Q,dimensions:$})=>{if(J==="scale")return j.slice(0,$).map((Z)=>Sj(Z)).join(" ");return j.slice(0,$).map((Z,H)=>`${Sj(Z)}${Q[H]}`).join(" ")};function yJ(J,j,Q,$){let{extrapolateLeft:Z,extrapolateRight:H,easing:Y}=$,K=J,[W,X]=j,[G,D]=Q;if(K<W){if(Z==="identity")return K;if(Z==="clamp")K=W;else if(Z==="wrap"){let _=X-W;K=((K-W)%_+_)%_+W}}if(K>X){if(H==="identity")return K;if(H==="clamp")K=X;else if(H==="wrap"){let _=X-W;K=((K-W)%_+_)%_+W}}if(G===D)return G;return K=(K-W)/(X-W),K=Y(K),K=K*(D-G)+G,K}function RJ(J,j){let Q;for(Q=1;Q<j.length-1;++Q)if(j[Q]>=J)break;return Q-1}var PJ=(J)=>J,mj=(J)=>{return J.remotionShouldExtendRight===!0},wj=({easing:J,segmentIndex:j})=>{if(J===void 0)return PJ;if(typeof J==="function")return J;return J[j]},Fj=({input:J,inputRange:j,outputRange:Q,easing:$,extrapolateLeft:Z,extrapolateRight:H})=>{return yJ(J,j,Q,{easing:$,extrapolateLeft:Z,extrapolateRight:J>j[1]&&H==="clamp"&&mj($)?"extend":H})},zj=({input:J,inputRange:j,outputRange:Q,options:$})=>{if(j.length===1)return Q[0];let Z=$?.easing,H="extend";if($?.extrapolateLeft!==void 0)H=$.extrapolateLeft;let Y="extend";if($?.extrapolateRight!==void 0)Y=$.extrapolateRight;let K=$?.posterize===void 0?J:Math.floor(J/$.posterize)*$.posterize,W=RJ(K,j),X=wj({easing:Z,segmentIndex:W}),G=Fj({input:K,inputRange:[j[W],j[W+1]],outputRange:[Q[W],Q[W+1]],easing:X,extrapolateLeft:H,extrapolateRight:Y});for(let D=0;D<W;D++){let _=wj({easing:Z,segmentIndex:D});if(!mj(_))continue;let T=j[D+1];if(K<=T)continue;let E=Fj({input:K,inputRange:[j[D],T],outputRange:[Q[D],Q[D+1]],easing:_,extrapolateLeft:H,extrapolateRight:"extend"});G+=E-Q[D+1]}return G},xJ=({input:J,inputRange:j,outputRange:Q,options:$})=>{let Z=Q.map(wJ),H=Z[0]?.kind;if(H===void 0)throw Error("outputRange must have at least 1 element");for(let W of Z)if(W.kind!==H)throw TypeError(`Cannot interpolate ${H} values with ${W.kind} values`);let Y=Math.max(...Z.map((W)=>W.dimensions)),K=[null,null,null];if(H!=="scale")for(let W=0;W<Y;W++){for(let X of Z){let G=X.units[W];if(G===null)continue;if(K[W]===null){K[W]=G;continue}if(K[W]!==G)throw TypeError(`Cannot interpolate ${H} values with different units on axis ${W+1}: ${K[W]} and ${G}`)}if(K[W]===null)throw TypeError(`Cannot interpolate ${H} values because axis ${W+1} has no unit`)}return FJ({kind:H,values:[0,0,0].map((W,X)=>zj({input:J,inputRange:j,outputRange:Z.map((G)=>G.values[X]),options:$})),units:K,dimensions:Y})},IJ=(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},fJ=({input:J,inputRange:j,outputRange:Q,options:$})=>{let Z=IJ(Q);return Array(Z).fill(!0).map((H,Y)=>zj({input:J,inputRange:j,outputRange:Q.map((K)=>K[Y]),options:$}))};function vJ(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 yj(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 hJ(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 dJ(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 cJ(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(yj("inputRange",j),vJ(j),hJ($?.easing,j.length),dJ($?.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((H)=>typeof H==="string")){if(!Q.every((H)=>typeof H==="string"||typeof H==="number"))throw TypeError("outputRange must contain only numbers, or supported scale, translate, and rotate strings");return xJ({input:J,inputRange:j,outputRange:Q,options:$})}if(Q.every((H)=>Array.isArray(H)))return fJ({input:J,inputRange:j,outputRange:Q,options:$});if(!Q.every((H)=>typeof H==="number"))throw TypeError("outputRange must contain only numbers, numeric tuples, or supported scale, translate, and rotate strings");return yj("outputRange",Q),zj({input:J,inputRange:j,outputRange:Q,options:$})}function uJ(J){return Boolean(J)}if(typeof window<"u"){if(window.remotion_renderReady=!1,!window.remotion_delayRenderTimeouts)window.remotion_delayRenderTimeouts={};window.remotion_delayRenderHandles=[]}var mJ="The delayRender was called:",iJ="Retries left: ",pJ="- Rendering the frame will be retried.",sJ="handle was cleared after",oJ=({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((K)=>JSON.stringify(K)).join(", ")+", got "+JSON.stringify(Q));let H=Object.keys($.variants).filter((K)=>K!==Q),Y=new Set;for(let K of H){let W=$.variants[K],X=Object.keys(W);for(let G of X)Y.add(G)}return[...Y]},Xj="remotion-date:",Gj="remotion-file:",lJ=({data:J,indent:j,staticBase:Q})=>{let $=!1,Z=!1,H=!1,Y=!1;try{return{serializedString:JSON.stringify(J,function(W,X){let G=this[W];if(G instanceof Date)return $=!0,`${Xj}${G.toISOString()}`;if(G instanceof Map)return H=!0,X;if(G instanceof Set)return Y=!0,X;if(typeof G==="string"&&Q!==null&&G.startsWith(Q))return Z=!0,`${Gj}${G.replace(Q+"/","")}`;return X},j),customDateUsed:$,customFileUsed:Z,mapUsed:H,setUsed:Y}}catch(K){throw Error("Could not serialize the passed input props to JSON: "+K.message)}},gJ=(J)=>{return JSON.parse(J,(j,Q)=>{if(typeof Q==="string"&&Q.startsWith(Xj))return new Date(Q.replace(Xj,""));if(typeof Q==="string"&&Q.startsWith(Gj))return`${window.remotion_staticBase}/${Q.replace(Gj,"")}`;return Q})},nJ={"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}},rJ={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"}},tJ={...nJ,...rJ},ij={type:"boolean",default:!1,description:"Hidden"},pj={type:"hidden"},sj={type:"hidden"},oj={type:"number",default:void 0,min:1,step:1,hiddenFromList:!0},aJ={type:"number",default:0,step:1,hiddenFromList:!0},lj={type:"number",default:0,min:0,step:1,hiddenFromList:!0},gj={type:"number",default:null,step:1,hiddenFromList:!0},eJ={durationInFrames:oj,from:aJ,trimBefore:lj,freeze:gj,hidden:ij,name:sj,showInTimeline:pj},Bj={...eJ,layout:{type:"enum",default:"absolute-fill",description:"Layout",variants:{"absolute-fill":tJ,none:{}}}},jQ={durationInFrames:oj,trimBefore:lj,freeze:gj,hidden:ij,name:sj,showInTimeline:pj},N0={...jQ,layout:Bj.layout},T0={...Bj,layout:{...Bj.layout,default:"none"}},P="[-+]?\\d*\\.?\\d+",$j=P+"%";function Zj(...J){return"\\(\\s*("+J.join(")\\s*,\\s*(")+")\\s*\\)"}var Hj="(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";function r(J){return new RegExp(J+"\\(\\s*("+Hj+")\\s+("+Hj+")\\s+("+Hj+")(?:\\s*\\/\\s*("+Hj+"))?\\s*\\)")}function JQ(){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"+Zj(P,P,P)),J.rgba=new RegExp("rgba"+Zj(P,P,P,P)),J.hsl=new RegExp("hsl"+Zj(P,$j,$j)),J.hsla=new RegExp("hsla"+Zj(P,$j,$j,P)),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=r("oklch"),J.oklab=r("oklab"),J.lab=r("lab"),J.lch=r("lch"),J.hwb=r("hwb");return J}function s(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 Rj(J,j,Q){let $=Q<0.5?Q*(1+j):Q+j-Q*j,Z=2*Q-$,H=s(Z,$,J+0.3333333333333333),Y=s(Z,$,J),K=s(Z,$,J-0.3333333333333333);return Math.round(H*255)<<24|Math.round(Y*255)<<16|Math.round(K*255)<<8}function i(J){let j=Number.parseInt(J,10);if(j<0)return 0;if(j>255)return 255;return j}function Pj(J){return(Number.parseFloat(J)%360+360)%360/360}function xj(J){let j=Number.parseFloat(J);if(j<0)return 0;if(j>1)return 255;return Math.round(j*255)}function Kj(J){let j=Number.parseFloat(J);if(j<0)return 0;if(j>100)return 1;return j/100}function R(J,j){if(J==="none")return 0;if(J.endsWith("%"))return Number.parseFloat(J)/100*j;return Number.parseFloat(J)}function Aj(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 t(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 o(J){if(J<=0.0031308)return 12.92*J;return 1.055*J**0.4166666666666667-0.055}function Wj(J){return Math.max(0,Math.min(1,J))}function a(J,j,Q,$){let Z=Math.round(Wj(J)*255),H=Math.round(Wj(j)*255),Y=Math.round(Wj(Q)*255),K=Math.round(Wj($)*255);return(Z<<24|H<<16|Y<<8|K)>>>0}function Ij(J,j,Q){let $=J+0.3963377774*j+0.2158037573*Q,Z=J-0.1055613458*j-0.0638541728*Q,H=J-0.0894841775*j-1.291485548*Q,Y=$*$*$,K=Z*Z*Z,W=H*H*H,X=4.0767416621*Y-3.3077115913*K+0.2309699292*W,G=-1.2684380046*Y+2.6097574011*K-0.3413193965*W,D=-0.0041960863*Y-0.7034186147*K+1.707614701*W;return[o(X),o(G),o(D)]}function fj(J,j,Q){let W=(J+16)/116,X=j/500+W,G=W-Q/200,D=X*X*X,_=G*G*G,T=D>0.008856451679035631?D:(116*X-16)/903.2962962962963,E=J>8?((J+16)/116)**3:J/903.2962962962963,V=_>0.008856451679035631?_:(116*G-16)/903.2962962962963,q=T*0.95047,N=E*1,B=V*1.08883,z=3.2404542*q-1.5371385*N-0.4985314*B,A=-0.969266*q+1.8760108*N+0.041556*B,U=0.0556434*q-0.2040259*N+1.0572252*B;return[o(z),o(A),o(U)]}function QQ(J,j,Q){if(j+Q>=1){let X=j/(j+Q);return[X,X,X]}let $=1,Z=0,H=s(Z,$,J+0.3333333333333333),Y=s(Z,$,J),K=s(Z,$,J-0.3333333333333333),W=1-j-Q;return[H*W+j,Y*W+j,K*W+j]}var Tj={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 $Q(J){let j=JQ(),Q;if(j.hex6){if(Q=j.hex6.exec(J))return Number.parseInt(Q[1]+"ff",16)>>>0}if(Tj[J]!==void 0)return Tj[J];if(j.rgb){if(Q=j.rgb.exec(J))return(i(Q[1])<<24|i(Q[2])<<16|i(Q[3])<<8|255)>>>0}if(j.rgba){if(Q=j.rgba.exec(J))return(i(Q[1])<<24|i(Q[2])<<16|i(Q[3])<<8|xj(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(Rj(Pj(Q[1]),Kj(Q[2]),Kj(Q[3]))|255)>>>0}if(j.hsla){if(Q=j.hsla.exec(J))return(Rj(Pj(Q[1]),Kj(Q[2]),Kj(Q[3]))|xj(Q[4]))>>>0}if(j.oklch){if(Q=j.oklch.exec(J)){let $=R(Q[1],1),Z=R(Q[2],0.4),H=Aj(Q[3]),Y=t(Q[4]),K=H*Math.PI/180,[W,X,G]=Ij($,Z*Math.cos(K),Z*Math.sin(K));return a(W,X,G,Y)}}if(j.oklab){if(Q=j.oklab.exec(J)){let $=R(Q[1],1),Z=R(Q[2],0.4),H=R(Q[3],0.4),Y=t(Q[4]),[K,W,X]=Ij($,Z,H);return a(K,W,X,Y)}}if(j.lab){if(Q=j.lab.exec(J)){let $=R(Q[1],100),Z=R(Q[2],125),H=R(Q[3],125),Y=t(Q[4]),[K,W,X]=fj($,Z,H);return a(K,W,X,Y)}}if(j.lch){if(Q=j.lch.exec(J)){let $=R(Q[1],100),Z=R(Q[2],150),H=Aj(Q[3]),Y=t(Q[4]),K=H*Math.PI/180,[W,X,G]=fj($,Z*Math.cos(K),Z*Math.sin(K));return a(W,X,G,Y)}}if(j.hwb){if(Q=j.hwb.exec(J)){let $=Aj(Q[1]),Z=R(Q[2],1),H=R(Q[3],1),Y=t(Q[4]),[K,W,X]=QQ($/360,Z,H);return a(K,W,X,Y)}}throw Error(`invalid color string ${J} provided`)}function ZQ(J){let j=$Q(J);return(j<<24|j>>>8)>>>0}var HQ=["4444-xq","4444","hq","standard","light","proxy"],KQ=[1,1,1],WQ=(J)=>{let j=J.trim().split(/\s+/);if(j.length<1||j.length>3||j[0]==="")return null;let Q=j.map((Y)=>Number(Y));if(!Q.every((Y)=>Number.isFinite(Y)))return null;let $=Q[0],Z=Q[1]??$,H=Q[2]??1;return[$,Z,H]},YQ=(J)=>{if(typeof J==="number")return Number.isFinite(J)?[J,J,1]:null;if(typeof J==="string")return WQ(J);return null},XQ=(J)=>{return YQ(J)??KQ},GQ=([J,j,Q])=>{let $=Yj(J),Z=Yj(j),H=Yj(Q);if($===Z&&H===1)return $;if(H===1)return`${$} ${Z}`;return`${$} ${Z} ${H}`},Nj=!1,BQ=({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}`)},vj=["h264","h265","vp8","vp9","av1","mp3","aac","wav","prores","h264-mkv","h264-ts","gif"];function DQ(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(!vj.includes(J))throw Error(`The "${Q}" prop ${j} must be one of ${vj.join(", ")}, but you passed ${J}.`)}var _Q=(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 UQ(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 VQ(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 qQ(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 AQ=({frame:J,playbackRate:j,startFrom:Q})=>{return cJ(J,[-1,Q,Q+1],[-1,Q,Q+j])},NQ=(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},TQ=({src:J,transparent:j,currentTime:Q,toneMapped:$})=>{return`http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(NQ(J))}&time=${encodeURIComponent(Math.max(0,Q))}&transparent=${String(j)}&toneMapped=${String($)}`},Dj={processColor:ZQ,truthy:uJ,validateFps:qQ,validateDimension:UQ,validateDurationInFrames:VQ,validateDefaultAndInputProps:_Q,validateFrame:BQ,serializeJSONWithSpecialTypes:lJ,bundleName:"bundle.js",bundleMapName:"bundle.js.map",deserializeJSONWithSpecialTypes:gJ,DELAY_RENDER_CALLSTACK_TOKEN:mJ,DELAY_RENDER_RETRY_TOKEN:pJ,DELAY_RENDER_CLEAR_TOKEN:sJ,DELAY_RENDER_ATTEMPT_TOKEN:iJ,getOffthreadVideoSource:TQ,getExpectedMediaFrameUncorrected:AQ,ENABLE_V5_BREAKING_CHANGES:Nj,MIN_NODE_VERSION:Nj?18:16,MIN_BUN_VERSION:Nj?"1.1.3":"1.0.3",colorNames:Tj,DATE_TOKEN:Xj,FILE_TOKEN:Gj,validateCodec:DQ,proResProfileOptions:HQ,findPropsToDelete:oJ,sequenceSchema:Bj,parseScaleValue:XQ,serializeScaleValue:GQ};import DJ,{useMemo as _J}from"react";import{jsx as UJ}from"react/jsx-runtime";import XJ from"react";import{jsx as b,Fragment as NJ}from"react/jsx-runtime";import BJ from"react";var LQ=0.01,OQ=({children:J,presentationProgress:j,presentationDirection:Q,passedProps:{direction:$="from-left",enterStyle:Z,exitStyle:H}})=>{let Y=nj(()=>{let W=j===1?j*100:j*100-LQ;if(Q==="exiting")switch($){case"from-left":return{transform:`translateX(${W}%)`};case"from-right":return{transform:`translateX(${-j*100}%)`};case"from-top":return{transform:`translateY(${W}%)`};case"from-bottom":return{transform:`translateY(${-j*100}%)`};default:throw Error(`Invalid direction: ${$}`)}switch($){case"from-left":return{transform:`translateX(${-100+j*100}%)`};case"from-right":return{transform:`translateX(${100-W}%)`};case"from-top":return{transform:`translateY(${-100+j*100}%)`};case"from-bottom":return{transform:`translateY(${100-W}%)`};default:throw Error(`Invalid direction: ${$}`)}},[Q,j,$]),K=nj(()=>{return{width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...Y,...Q==="entering"?Z:H}},[Y,Z,H,Q]);return MQ(zQ,{style:K,children:J})},_j=(J)=>{return{component:OQ,props:J??{}}},FQ=({children:J,onElementImage:j,onUnmount:Q,presentationProgress:$,presentationDirection:Z,shader:H,effects:Y,passedProps:K,bothEnteringAndExiting:W})=>{if(!SQ.isSupported())throw Error(kQ);let X=Mj(null),G=CQ(()=>{return{width:"100%",height:"100%",position:"absolute",top:0,left:0,right:0,bottom:0}},[]),[D]=rj(()=>new OffscreenCanvas(1,1)),_=Mj(K);_.current=K;let T=Lj.useMemoizedEffects({effects:Y??[],overrideId:null}),E=Mj(T);E.current=T;let[V]=rj(()=>H(D));e(()=>{return()=>{V.cleanup()}},[D,V]);let q=Lj.useEffectChainState(),{delayRender:N,continueRender:B}=wQ(),z=bQ(async(U,O,w)=>{if(!X.current)throw Error("Canvas not found");let M=N("onPaint");if(!U&&!O){B(M),V.clear();return}let L=U?.width??O?.width??0,x=U?.height??O?.height??0;if(L===0||x===0){B(M),V.clear();return}D.width=L,D.height=x,V.draw({prevImage:U,nextImage:O,width:L,height:x,time:w,passedProps:_.current}),await Lj.runEffectChain({state:q.get(L,x),source:D,effects:E.current??[],width:L,height:x,output:X.current}),B(M)},[q,V,D,B,N]),A=W&&Z==="exiting";if(e(()=>{if(A)return;let U=X.current;if(!U)throw Error("Canvas not found");U.layoutSubtree=!0;let O=()=>{let w=U.firstChild;if(!w)return;let M=U.captureElementImage(w);j(M,z)};return U.addEventListener("paint",O),()=>{U.removeEventListener("paint",O)}},[j,Z,z,A]),e(()=>{if(A)return;let U=X.current;if(!U)throw Error("Canvas not found");U.requestPaint?.()},[$,A,T]),e(()=>{if(A)return;return()=>{Q()}},[Q,A]),e(()=>{if(A)return;let U=X.current;if(!U)return;new ResizeObserver(([w])=>{U.width=w.devicePixelContentBoxSize[0].inlineSize,U.height=w.devicePixelContentBoxSize[0].blockSize}).observe(U,{box:"device-pixel-content-box"})},[A]),A)return J;return bj(EQ,{children:bj("canvas",{ref:X,style:G,children:J})})},Jj=(J)=>{let j=(Q)=>{let{passedProps:$,...Z}=Q,{effects:H,...Y}=Q.passedProps;return bj(FQ,{shader:J,passedProps:Y,effects:H,...Z})};return(Q)=>{return{component:j,props:Q}}},yQ=0.4,RQ=`#version 300 es
|
|
1
|
+
var ij=Object.defineProperty;var sj=(T,j)=>{for(var J in j)ij(T,J,{get:j[J],enumerable:!0,configurable:!0,set:(Q)=>j[J]=()=>Q})};var kT={};sj(kT,{useTransitionProgress:()=>J0,springTiming:()=>lQ,pushCut:()=>hQ,makeHtmlInCanvasPresentation:()=>YT,linearTiming:()=>dQ,linearBlur:()=>xQ,filmBurn:()=>SQ,dreamyZoom:()=>bQ,crossZoom:()=>NQ,TransitionSeries:()=>yT});import{useMemo as qj}from"react";import{AbsoluteFill as TQ}from"remotion";import{jsx as jQ}from"react/jsx-runtime";import{useCallback as $Q,useLayoutEffect as KT,useMemo as Nj,useRef as e,useState as Vj}from"react";import{AbsoluteFill as WQ,HTML_IN_CANVAS_UNSUPPORTED_MESSAGE as ZQ,HtmlInCanvas as HQ,Internals as hT,useDelayRender as KQ}from"remotion";import{jsx as cT,jsxs as YQ}from"react/jsx-runtime";import{useMemo as Lj}from"react";import{AbsoluteFill as gT,Easing as PT,interpolate as t}from"remotion";import{jsx as Mj,jsxs as RQ}from"react/jsx-runtime";import{interpolate as gQ}from"remotion";import{measureSpring as mQ,spring as cQ}from"remotion";import dT,{useCallback as mT,useMemo as wj,useRef as Sj}from"react";import{Internals as k,Interactive as ST,Sequence as pQ,useCurrentFrame as iQ,useVideoConfig as sQ}from"remotion";var CT=(T)=>{return Math.round(T*1e6)/1e6},uj=new Set(["deg","rad","grad","turn"]),$j=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"]),Wj=/^([+-]?(?:\d+\.?\d*|\.\d+))([a-zA-Z%]+)?$/,Zj=new Set(["left","center","right","top","bottom"]),r=(T)=>{if(T==="left")return[{axis:"x",value:{value:0,unit:"%"}}];if(T==="right")return[{axis:"x",value:{value:100,unit:"%"}}];if(T==="top")return[{axis:"y",value:{value:0,unit:"%"}}];if(T==="bottom")return[{axis:"y",value:{value:100,unit:"%"}}];return[{axis:"x",value:{value:50,unit:"%"}},{axis:"y",value:{value:50,unit:"%"}}]},$T={value:50,unit:"%"},uT=(T)=>{return String(CT(T))},oj=(T,j)=>{let J=Wj.exec(T);if(J===null)throw TypeError(`Cannot interpolate "${j}" because "${T}" is not a supported scale, translate, or rotate value`);let Q=J[2]??null,$=Number(J[1]);if(!Number.isFinite($))throw TypeError(`Cannot interpolate "${j}" because "${T}" is not finite`);if(Q===null)return{kind:"scale",value:$,unit:null};if(uj.has(Q))return{kind:"rotate",value:$,unit:Q};if($j.has(Q))return{kind:"translate",value:$,unit:Q};throw TypeError(`Cannot interpolate "${j}" because "${Q}" is not a supported translate or rotate unit`)},Hj=({component:T,value:j,allowPercentage:J})=>{let Q=Wj.exec(T);if(Q===null)throw TypeError(`Cannot interpolate "${j}" because "${T}" is not a supported transform-origin ${J?"length-percentage":"z length"}`);let $=Q[2]??null,W=Number(Q[1]);if(!Number.isFinite(W))throw TypeError(`Cannot interpolate "${j}" because "${T}" is not finite`);if($===null||!$j.has($)||!J&&$==="%")throw TypeError(`Cannot interpolate "${j}" because "${T}" is not a supported transform-origin ${J?"length-percentage":"z length"}`);return{value:W,unit:$}},xT=(T,j)=>{let J=T.toLowerCase();if(Zj.has(J))return{type:"keyword",keyword:J};return{type:"length-percentage",parsed:Hj({component:T,value:j,allowPercentage:!0})}},rj=(T,j,J)=>{let Q=[];for(let $ of r(T))for(let W of r(j)){if($.axis===W.axis)continue;Q.push($.axis==="x"?[$.value,W.value]:[W.value,$.value])}if(Q.length===0)throw TypeError(`Cannot interpolate "${J}" because "${T} ${j}" is not a valid transform-origin keyword pair`);return Q[0]},nj=(T,j)=>{if(T.length===1){let H=xT(T[0],j);if(H.type==="length-percentage")return[H.parsed,$T];if(H.keyword==="top"||H.keyword==="bottom")return[$T,r(H.keyword)[0].value];return[r(H.keyword)[0].value,$T]}let J=xT(T[0],j),Q=xT(T[1],j);if(J.type==="length-percentage"&&Q.type==="length-percentage")return[J.parsed,Q.parsed];if(J.type==="keyword"&&Q.type==="keyword")return rj(J.keyword,Q.keyword,j);let $=J.type==="keyword"?J:Q.type==="keyword"?Q:null,W=J.type==="length-percentage"?J.parsed:Q.type==="length-percentage"?Q.parsed:null;if($===null||W===null)throw Error("Expected a keyword and a length-percentage value");let Y=J.type==="keyword";if($.keyword==="left"||$.keyword==="right"){if(!Y)throw TypeError(`Cannot interpolate "${j}" because horizontal transform-origin keywords must come before a length-percentage value`);return[r($.keyword)[0].value,W]}if($.keyword==="top"||$.keyword==="bottom")return[W,r($.keyword)[0].value];return Y?[$T,W]:[W,$T]},aj=(T,j)=>{let[J,Q]=nj(j.slice(0,2),T),$=j[2]===void 0?{value:0,unit:null}:Hj({component:j[2],value:T,allowPercentage:!1});return{kind:"translate",values:[J.value,Q.value,$.value],units:[J.unit,Q.unit,$.unit],dimensions:j[2]===void 0?2:3}},ej=(T)=>{if(typeof T==="number"){if(!Number.isFinite(T))throw Error(`outputRange must contain only finite numbers, but got [${T}]`);return{kind:"scale",values:[T,T,1],units:[null,null,null],dimensions:1}}let j=T.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 "${T}"`);if(j.some(($)=>Zj.has($.toLowerCase())))return aj(T,j);let J=j.map(($)=>oj($,T)),[{kind:Q}]=J;for(let $ of J)if($.kind!==Q)throw TypeError(`Cannot interpolate "${T}" because it mixes ${Q} and ${$.kind} values`);if(Q==="scale"){let $=J[0].value,W=J[1]?.value??$,Y=J[2]?.value??1;return{kind:Q,values:[$,W,Y],units:[null,null,null],dimensions:J.length}}return{kind:Q,values:[J[0].value,J[1]?.value??0,J[2]?.value??0],units:[J[0].unit,J[1]?.unit??null,J[2]?.unit??null],dimensions:J.length}},tj=({kind:T,values:j,units:J,dimensions:Q})=>{if(T==="scale")return j.slice(0,Q).map(($)=>uT($)).join(" ");return j.slice(0,Q).map(($,W)=>`${uT($)}${J[W]}`).join(" ")},oT=(T)=>{if(T===0)return 0;return Math.sign(T)*T*T},TJ=(T)=>{if(T===0)return 0;return Math.sign(T)*Math.sqrt(Math.abs(T))};function jJ(T,j,J,Q){let{extrapolateLeft:$,extrapolateRight:W,easing:Y,output:H}=Q,K=T,[Z,X]=j,[G,D]=J;if(K<Z){if($==="identity")return K;if($==="clamp")K=Z;else if($==="wrap"){let N=X-Z;K=((K-Z)%N+N)%N+Z}}if(K>X){if(W==="identity")return K;if(W==="clamp")K=X;else if(W==="wrap"){let N=X-Z;K=((K-Z)%N+N)%N+Z}}if(G===D)return G;if(K=(K-Z)/(X-Z),K=Y(K),H==="perceptual-scale"){let N=oT(G),L=oT(D);K=TJ(K*(L-N)+N)}else K=K*(D-G)+G;return K}function JJ(T,j){let J;for(J=1;J<j.length-1;++J)if(j[J]>=T)break;return J-1}var QJ=(T)=>T,$J=(T)=>{return T??"linear"},Kj=(T)=>{return T.remotionShouldExtendRight===!0},rT=({easing:T,segmentIndex:j})=>{if(T===void 0)return QJ;if(typeof T==="function")return T;return T[j]},nT=({input:T,inputRange:j,outputRange:J,easing:Q,extrapolateLeft:$,extrapolateRight:W,output:Y})=>{return jJ(T,j,J,{easing:Q,extrapolateLeft:$,extrapolateRight:T>j[1]&&W==="clamp"&&Kj(Q)?"extend":W,output:Y})},fT=({input:T,inputRange:j,outputRange:J,options:Q})=>{let $=$J(Q?.output);if(j.length===1)return J[0];let W=Q?.easing,Y="extend";if(Q?.extrapolateLeft!==void 0)Y=Q.extrapolateLeft;let H="extend";if(Q?.extrapolateRight!==void 0)H=Q.extrapolateRight;let K=Q?.posterize===void 0?T:Math.floor(T/Q.posterize)*Q.posterize,Z=JJ(K,j),X=rT({easing:W,segmentIndex:Z}),G=nT({input:K,inputRange:[j[Z],j[Z+1]],outputRange:[J[Z],J[Z+1]],easing:X,extrapolateLeft:Y,extrapolateRight:H,output:$});for(let D=0;D<Z;D++){let N=rT({easing:W,segmentIndex:D});if(!Kj(N))continue;let L=j[D+1];if(K<=L)continue;let B=nT({input:K,inputRange:[j[D],L],outputRange:[J[D],J[D+1]],easing:N,extrapolateLeft:Y,extrapolateRight:"extend",output:$});G+=B-J[D+1]}return G},WJ=({input:T,inputRange:j,outputRange:J,options:Q})=>{let $=J.map(ej),W=$[0]?.kind;if(W===void 0)throw Error("outputRange must have at least 1 element");for(let Z of $)if(Z.kind!==W)throw TypeError(`Cannot interpolate ${W} values with ${Z.kind} values`);let Y=Math.max(...$.map((Z)=>Z.dimensions)),H=[null,null,null];if(W!=="scale")for(let Z=0;Z<Y;Z++){for(let X of $){let G=X.units[Z];if(G===null)continue;if(H[Z]===null){H[Z]=G;continue}if(H[Z]!==G)throw TypeError(`Cannot interpolate ${W} values with different units on axis ${Z+1}: ${H[Z]} and ${G}`)}if(H[Z]===null)throw TypeError(`Cannot interpolate ${W} values because axis ${Z+1} has no unit`)}let K=[0,0,0];for(let Z=0;Z<Y;Z++)K[Z]=fT({input:T,inputRange:j,outputRange:$.map((X)=>X.values[Z]),options:Q});return tj({kind:W,values:K,units:H,dimensions:Y})},ZJ=(T)=>{let j=T[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 J of T){if(J.length!==j)throw TypeError(`outputRange tuples must all have the same length, but got ${j} and ${J.length}`);for(let Q of J)if(typeof Q!=="number"||!Number.isFinite(Q))throw TypeError(`outputRange tuples must contain only finite numbers, but got [${J.join(",")}]`)}return j},HJ=({input:T,inputRange:j,outputRange:J,options:Q})=>{let $=ZJ(J);return Array($).fill(!0).map((W,Y)=>fT({input:T,inputRange:j,outputRange:J.map((H)=>H[Y]),options:Q}))};function KJ(T){for(let j=1;j<T.length;++j)if(!(T[j]>T[j-1]))throw Error(`inputRange must be strictly monotonically increasing but got [${T.join(",")}]`)}function aT(T,j){if(j.length<1)throw Error(T+" must have at least 1 element");for(let J of j){if(typeof J!=="number")throw Error(`${T} must contain only numbers`);if(!Number.isFinite(J))throw Error(`${T} must contain only finite numbers, but got [${j.join(",")}]`)}}function YJ(T,j){if(T===void 0)return;if(typeof T==="function")return;let J=j-1;if(T.length!==J)throw Error(`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = ${J}), but got length ${T.length}`);for(let Q=0;Q<T.length;Q++)if(typeof T[Q]!=="function")throw Error(`easing[${Q}] must be a function`)}function DJ(T){if(T===void 0)return;if(typeof T!=="number"||!Number.isFinite(T)||T<=0)throw Error(`posterize must be a positive finite number, but got ${T}`)}function XJ(T){if(T===void 0||T==="linear"||T==="perceptual-scale")return;throw Error(`output must be "linear" or "perceptual-scale", but got ${String(T)}`)}function GJ(T,j,J,Q){if(typeof T>"u")throw Error("input can not be undefined");if(typeof j>"u")throw Error("inputRange can not be undefined");if(typeof J>"u")throw Error("outputRange can not be undefined");if(j.length!==J.length)throw Error("inputRange ("+j.length+") and outputRange ("+J.length+") must have the same length");if(aT("inputRange",j),KJ(j),YJ(Q?.easing,j.length),DJ(Q?.posterize),XJ(Q?.output),typeof T!=="number")throw TypeError("Cannot interpolate an input which is not a number");if(!Array.isArray(J))throw Error("outputRange must contain only numbers");if(J.some((W)=>typeof W==="string")){if(!J.every((W)=>typeof W==="string"||typeof W==="number"))throw TypeError("outputRange must contain only numbers, or supported scale, translate, and rotate strings");return WJ({input:T,inputRange:j,outputRange:J,options:Q})}if(J.every((W)=>Array.isArray(W)))return HJ({input:T,inputRange:j,outputRange:J,options:Q});if(!J.every((W)=>typeof W==="number"))throw TypeError("outputRange must contain only numbers, numeric tuples, or supported scale, translate, and rotate strings");return aT("outputRange",J),fT({input:T,inputRange:j,outputRange:J,options:Q})}function BJ(T){return Boolean(T)}if(typeof window<"u"){if(window.remotion_renderReady=!1,!window.remotion_delayRenderTimeouts)window.remotion_delayRenderTimeouts={};window.remotion_delayRenderHandles=[]}var UJ="The delayRender was called:",qJ="Retries left: ",NJ="- Rendering the frame will be retried.",VJ="handle was cleared after",AJ=({schema:T,key:j,value:J})=>{let Q=T[j];if(!Q)throw Error("Key "+JSON.stringify(j)+" not found in schema");if(typeof J!=="string")throw Error("Value must be a string, but is "+JSON.stringify(J));if(Q.type!=="enum")throw Error("Key "+JSON.stringify(j)+" is not an enum");if(!Q.variants[J])throw Error("Value for "+JSON.stringify(j)+" must be one of "+Object.keys(Q.variants).map((H)=>JSON.stringify(H)).join(", ")+", got "+JSON.stringify(J));let W=Object.keys(Q.variants).filter((H)=>H!==J),Y=new Set;for(let H of W){let K=Q.variants[H],Z=Object.keys(K);for(let X of Z)Y.add(X)}return[...Y]},_T="remotion-date:",ET="remotion-file:",CJ=({data:T,indent:j,staticBase:J})=>{let Q=!1,$=!1,W=!1,Y=!1;try{return{serializedString:JSON.stringify(T,function(K,Z){let X=this[K];if(X instanceof Date)return Q=!0,`${_T}${X.toISOString()}`;if(X instanceof Map)return W=!0,Z;if(X instanceof Set)return Y=!0,Z;if(typeof X==="string"&&J!==null&&X.startsWith(J))return $=!0,`${ET}${X.replace(J+"/","")}`;return Z},j),customDateUsed:Q,customFileUsed:$,mapUsed:W,setUsed:Y}}catch(H){throw Error("Could not serialize the passed input props to JSON: "+H.message)}},_J=(T)=>{return JSON.parse(T,(j,J)=>{if(typeof J==="string"&&J.startsWith(_T))return new Date(J.replace(_T,""));if(typeof J==="string"&&J.startsWith(ET))return`${window.remotion_staticBase}/${J.replace(ET,"")}`;return J})},EJ={"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",defaultKeyframeOutput:"perceptual-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}},OJ={"style.borderWidth":{type:"number",default:void 0,min:0,step:1,description:"Border width",hiddenFromList:!1},"style.borderStyle":{type:"enum",default:"none",description:"Border style",variants:{none:{},hidden:{},solid:{},dashed:{},dotted:{},double:{},groove:{},ridge:{},inset:{},outset:{}}},"style.borderColor":{type:"color",default:void 0,description:"Border color"}},bJ={"style.borderRadius":{type:"number",default:0,min:0,step:1,description:"Border radius",hiddenFromList:!1,keyframable:!0},"style.borderTopLeftRadius":{type:"number",default:0,min:0,step:1,description:"Top left radius",hiddenFromList:!1},"style.borderTopRightRadius":{type:"number",default:0,min:0,step:1,description:"Top right radius",hiddenFromList:!1},"style.borderBottomRightRadius":{type:"number",default:0,min:0,step:1,description:"Bottom right radius",hiddenFromList:!1},"style.borderBottomLeftRadius":{type:"number",default:0,min:0,step:1,description:"Bottom left radius",hiddenFromList:!1}},zJ={"style.backgroundColor":{type:"color",default:"transparent",description:"Color"}},PJ={color:{type:"color",default:void 0,description:"Current color"}},LJ={...PJ,stroke:{type:"color",default:"none",description:"Stroke"},strokeWidth:{type:"number",default:1,description:"Stroke width",min:0,step:1,hiddenFromList:!1}},$0={fill:{type:"color",default:void 0,description:"Fill"},...LJ},MJ={premountFor:{type:"number",default:0,description:"Premount For",min:0,step:1,hiddenFromList:!1,keyframable:!1},postmountFor:{type:"number",default:0,min:0,step:1,hiddenFromList:!0,keyframable:!1}},wJ={...MJ},SJ={cropLeft:{type:"number",default:0,description:"Crop left",min:0,max:1,step:0.01,hiddenFromList:!1,keyframable:!0},cropRight:{type:"number",default:0,description:"Crop right",min:0,max:1,step:0.01,hiddenFromList:!1,keyframable:!0},cropTop:{type:"number",default:0,description:"Crop top",min:0,max:1,step:0.01,hiddenFromList:!1,keyframable:!0},cropBottom:{type:"number",default:0,description:"Crop bottom",min:0,max:1,step:0.01,hiddenFromList:!1,keyframable:!0}},yJ=SJ,kJ={...yJ,...EJ,...zJ,...OJ,...bJ,...wJ},Yj={type:"boolean",default:!1,description:"Hidden"},Dj={type:"hidden"},Xj={type:"hidden"},Gj={type:"number",default:void 0,min:1,step:1,hiddenFromList:!0},IJ={type:"number",default:0,step:1,hiddenFromList:!0},Bj={type:"number",default:0,min:0,step:1,hiddenFromList:!0},Uj={type:"number",default:null,step:1,hiddenFromList:!0},FJ={durationInFrames:Gj,from:IJ,trimBefore:Bj,freeze:Uj,hidden:Yj,name:Xj,showInTimeline:Dj},OT={...FJ,layout:{type:"enum",default:"absolute-fill",description:"Layout",variants:{"absolute-fill":kJ,none:{}}}},xJ={durationInFrames:Gj,trimBefore:Bj,freeze:Uj,hidden:Yj,name:Xj,showInTimeline:Dj},W0={...xJ,layout:OT.layout},Z0={...OT,layout:{...OT.layout,default:"none"}},f="[-+]?\\d*\\.?\\d+",BT=f+"%";function UT(...T){return"\\(\\s*("+T.join(")\\s*,\\s*(")+")\\s*\\)"}var qT="(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";function WT(T){return new RegExp(T+"\\(\\s*("+qT+")\\s+("+qT+")\\s+("+qT+")(?:\\s*\\/\\s*("+qT+"))?\\s*\\)")}function RJ(){let T={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(T.rgb===void 0)T.rgb=new RegExp("rgb"+UT(f,f,f)),T.rgba=new RegExp("rgba"+UT(f,f,f,f)),T.hsl=new RegExp("hsl"+UT(f,BT,BT)),T.hsla=new RegExp("hsla"+UT(f,BT,BT,f)),T.hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,T.hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,T.hex6=/^#([0-9a-fA-F]{6})$/,T.hex8=/^#([0-9a-fA-F]{8})$/,T.oklch=WT("oklch"),T.oklab=WT("oklab"),T.lab=WT("lab"),T.lch=WT("lch"),T.hwb=WT("hwb");return T}function n(T,j,J){if(J<0)J+=1;if(J>1)J-=1;if(J<0.16666666666666666)return T+(j-T)*6*J;if(J<0.5)return j;if(J<0.6666666666666666)return T+(j-T)*(0.6666666666666666-J)*6;return T}function eT(T,j,J){let Q=J<0.5?J*(1+j):J+j-J*j,$=2*J-Q,W=n($,Q,T+0.3333333333333333),Y=n($,Q,T),H=n($,Q,T-0.3333333333333333);return Math.round(W*255)<<24|Math.round(Y*255)<<16|Math.round(H*255)<<8}function o(T){let j=Number.parseInt(T,10);if(j<0)return 0;if(j>255)return 255;return j}function tT(T){return(Number.parseFloat(T)%360+360)%360/360}function Tj(T){let j=Number.parseFloat(T);if(j<0)return 0;if(j>1)return 255;return Math.round(j*255)}function NT(T){let j=Number.parseFloat(T);if(j<0)return 0;if(j>100)return 1;return j/100}function R(T,j){if(T==="none")return 0;if(T.endsWith("%"))return Number.parseFloat(T)/100*j;return Number.parseFloat(T)}function RT(T){if(T==="none")return 0;if(T.endsWith("rad"))return Number.parseFloat(T)*180/Math.PI;if(T.endsWith("grad"))return Number.parseFloat(T)*0.9;if(T.endsWith("turn"))return Number.parseFloat(T)*360;return Number.parseFloat(T)}function ZT(T){if(T===void 0||T==="none")return 1;if(T.endsWith("%"))return Math.max(0,Math.min(1,Number.parseFloat(T)/100));return Math.max(0,Math.min(1,Number.parseFloat(T)))}function a(T){if(T<=0.0031308)return 12.92*T;return 1.055*T**0.4166666666666667-0.055}function VT(T){return Math.max(0,Math.min(1,T))}function HT(T,j,J,Q){let $=Math.round(VT(T)*255),W=Math.round(VT(j)*255),Y=Math.round(VT(J)*255),H=Math.round(VT(Q)*255);return($<<24|W<<16|Y<<8|H)>>>0}function jj(T,j,J){let Q=T+0.3963377774*j+0.2158037573*J,$=T-0.1055613458*j-0.0638541728*J,W=T-0.0894841775*j-1.291485548*J,Y=Q*Q*Q,H=$*$*$,K=W*W*W,Z=4.0767416621*Y-3.3077115913*H+0.2309699292*K,X=-1.2684380046*Y+2.6097574011*H-0.3413193965*K,G=-0.0041960863*Y-0.7034186147*H+1.707614701*K;return[a(Z),a(X),a(G)]}function Jj(T,j,J){let K=(T+16)/116,Z=j/500+K,X=K-J/200,G=Z*Z*Z,D=X*X*X,N=G>0.008856451679035631?G:(116*Z-16)/903.2962962962963,L=T>8?((T+16)/116)**3:T/903.2962962962963,B=D>0.008856451679035631?D:(116*X-16)/903.2962962962963,U=N*0.95047,V=L*1,z=B*1.08883,A=3.2404542*U-1.5371385*V-0.4985314*z,M=-0.969266*U+1.8760108*V+0.041556*z,O=0.0556434*U-0.2040259*V+1.0572252*z;return[a(A),a(M),a(O)]}function vJ(T,j,J){if(j+J>=1){let Z=j/(j+J);return[Z,Z,Z]}let Q=1,$=0,W=n($,Q,T+0.3333333333333333),Y=n($,Q,T),H=n($,Q,T-0.3333333333333333),K=1-j-J;return[W*K+j,Y*K+j,H*K+j]}var vT={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 fJ(T){let j=RJ(),J;if(j.hex6){if(J=j.hex6.exec(T))return Number.parseInt(J[1]+"ff",16)>>>0}if(vT[T]!==void 0)return vT[T];if(j.rgb){if(J=j.rgb.exec(T))return(o(J[1])<<24|o(J[2])<<16|o(J[3])<<8|255)>>>0}if(j.rgba){if(J=j.rgba.exec(T))return(o(J[1])<<24|o(J[2])<<16|o(J[3])<<8|Tj(J[4]))>>>0}if(j.hex3){if(J=j.hex3.exec(T))return Number.parseInt(J[1]+J[1]+J[2]+J[2]+J[3]+J[3]+"ff",16)>>>0}if(j.hex8){if(J=j.hex8.exec(T))return Number.parseInt(J[1],16)>>>0}if(j.hex4){if(J=j.hex4.exec(T))return Number.parseInt(J[1]+J[1]+J[2]+J[2]+J[3]+J[3]+J[4]+J[4],16)>>>0}if(j.hsl){if(J=j.hsl.exec(T))return(eT(tT(J[1]),NT(J[2]),NT(J[3]))|255)>>>0}if(j.hsla){if(J=j.hsla.exec(T))return(eT(tT(J[1]),NT(J[2]),NT(J[3]))|Tj(J[4]))>>>0}if(j.oklch){if(J=j.oklch.exec(T)){let Q=R(J[1],1),$=R(J[2],0.4),W=RT(J[3]),Y=ZT(J[4]),H=W*Math.PI/180,[K,Z,X]=jj(Q,$*Math.cos(H),$*Math.sin(H));return HT(K,Z,X,Y)}}if(j.oklab){if(J=j.oklab.exec(T)){let Q=R(J[1],1),$=R(J[2],0.4),W=R(J[3],0.4),Y=ZT(J[4]),[H,K,Z]=jj(Q,$,W);return HT(H,K,Z,Y)}}if(j.lab){if(J=j.lab.exec(T)){let Q=R(J[1],100),$=R(J[2],125),W=R(J[3],125),Y=ZT(J[4]),[H,K,Z]=Jj(Q,$,W);return HT(H,K,Z,Y)}}if(j.lch){if(J=j.lch.exec(T)){let Q=R(J[1],100),$=R(J[2],150),W=RT(J[3]),Y=ZT(J[4]),H=W*Math.PI/180,[K,Z,X]=Jj(Q,$*Math.cos(H),$*Math.sin(H));return HT(K,Z,X,Y)}}if(j.hwb){if(J=j.hwb.exec(T)){let Q=RT(J[1]),$=R(J[2],1),W=R(J[3],1),Y=ZT(J[4]),[H,K,Z]=vJ(Q/360,$,W);return HT(H,K,Z,Y)}}throw Error(`invalid color string ${T} provided`)}function hJ(T){let j=fJ(T);return(j<<24|j>>>8)>>>0}var gJ=["4444-xq","4444","hq","standard","light","proxy"],dJ=[1,1,1],mJ=(T)=>{let j=T.trim().split(/\s+/);if(j.length<1||j.length>3||j[0]==="")return null;let J=j.map((Y)=>Number(Y));if(!J.every((Y)=>Number.isFinite(Y)))return null;let Q=J[0],$=J[1]??Q,W=J[2]??1;return[Q,$,W]},cJ=(T)=>{if(typeof T==="number")return Number.isFinite(T)?[T,T,1]:null;if(typeof T==="string")return mJ(T);return null},lJ=(T)=>{return cJ(T)??dJ},pJ=([T,j,J])=>{let Q=CT(T),$=CT(j),W=CT(J);if(Q===$&&W===1)return Q;if(W===1)return`${Q} ${$}`;return`${Q} ${$} ${W}`},AT=!1,iJ=({allowFloats:T,durationInFrames:j,frame:J})=>{if(typeof J>"u")throw TypeError('Argument missing for parameter "frame"');if(typeof J!=="number")throw TypeError(`Argument passed for "frame" is not a number: ${J}`);if(!Number.isFinite(J))throw RangeError(`Frame ${J} is not finite`);if(J%1!==0&&!T)throw RangeError(`Argument for frame must be an integer, but got ${J}`);if(J<0&&J<-j)throw RangeError(`Cannot use frame ${J}: Duration of composition is ${j}, therefore the lowest frame that can be rendered is ${-j}`);if(J>j-1)throw RangeError(`Cannot use frame ${J}: Duration of composition is ${j}, therefore the highest frame that can be rendered is ${j-1}`)},Qj=["h264","h265","vp8","vp9","av1","mp3","aac","wav","prores","h264-mkv","h264-ts","gif"];function sJ(T,j,J){if(typeof T>"u")return;if(typeof T!=="string")throw TypeError(`The "${J}" prop ${j} must be a string, but you passed a value of type ${typeof T}.`);if(!Qj.includes(T))throw Error(`The "${J}" prop ${j} must be one of ${Qj.join(", ")}, but you passed ${T}.`)}var uJ=(T,j,J)=>{if(!T)return;if(typeof T!=="object")throw Error(`"${j}" must be an object, but you passed a value of type ${typeof T}`);if(Array.isArray(T))throw Error(`"${j}" must be an object, an array was passed ${J?`for composition "${J}"`:""}`)};function oJ(T,j,J){if(typeof T!=="number")throw Error(`The "${j}" prop ${J} must be a number, but you passed a value of type ${typeof T}`);if(isNaN(T))throw TypeError(`The "${j}" prop ${J} must not be NaN, but is NaN.`);if(!Number.isFinite(T))throw TypeError(`The "${j}" prop ${J} must be finite, but is ${T}.`);if(T%1!==0)throw TypeError(`The "${j}" prop ${J} must be an integer, but is ${T}.`);if(T<=0)throw TypeError(`The "${j}" prop ${J} must be positive, but got ${T}.`)}function rJ(T,j){let{allowFloats:J,component:Q}=j;if(typeof T>"u")throw Error(`The "durationInFrames" prop ${Q} is missing.`);if(typeof T!=="number")throw Error(`The "durationInFrames" prop ${Q} must be a number, but you passed a value of type ${typeof T}`);if(T<=0)throw TypeError(`The "durationInFrames" prop ${Q} must be positive, but got ${T}.`);if(!J&&T%1!==0)throw TypeError(`The "durationInFrames" prop ${Q} must be an integer, but got ${T}.`);if(!Number.isFinite(T))throw TypeError(`The "durationInFrames" prop ${Q} must be finite, but got ${T}.`)}function nJ(T,j,J){if(typeof T!=="number")throw Error(`"fps" must be a number, but you passed a value of type ${typeof T} ${j}`);if(!Number.isFinite(T))throw Error(`"fps" must be a finite, but you passed ${T} ${j}`);if(isNaN(T))throw Error(`"fps" must not be NaN, but got ${T} ${j}`);if(T<=0)throw TypeError(`"fps" must be positive, but got ${T} ${j}`);if(J&&T>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 aJ=({frame:T,playbackRate:j,startFrom:J})=>{return GJ(T,[-1,J,J+1],[-1,J,J+j])},eJ=(T)=>{if(typeof window>"u")return T;if(T.startsWith("http://")||T.startsWith("https://")||T.startsWith("file://")||T.startsWith("blob:")||T.startsWith("data:"))return T;return new URL(T,window.origin).href},tJ=({src:T,transparent:j,currentTime:J,toneMapped:Q})=>{return`http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(eJ(T))}&time=${encodeURIComponent(Math.max(0,J))}&transparent=${String(j)}&toneMapped=${String(Q)}`},bT={processColor:hJ,truthy:BJ,validateFps:nJ,validateDimension:oJ,validateDurationInFrames:rJ,validateDefaultAndInputProps:uJ,validateFrame:iJ,serializeJSONWithSpecialTypes:CJ,bundleName:"bundle.js",bundleMapName:"bundle.js.map",deserializeJSONWithSpecialTypes:_J,DELAY_RENDER_CALLSTACK_TOKEN:UJ,DELAY_RENDER_RETRY_TOKEN:NJ,DELAY_RENDER_CLEAR_TOKEN:VJ,DELAY_RENDER_ATTEMPT_TOKEN:qJ,getOffthreadVideoSource:tJ,getExpectedMediaFrameUncorrected:aJ,ENABLE_V5_BREAKING_CHANGES:AT,MIN_NODE_VERSION:AT?22:16,MIN_BUN_VERSION:AT?"1.1.3":"1.0.3",MIN_ESLINT_VERSION:AT?"8.57.0":"7.15.0",colorNames:vT,DATE_TOKEN:_T,FILE_TOKEN:ET,validateCodec:sJ,proResProfileOptions:gJ,findPropsToDelete:AJ,sequenceSchema:OT,parseScaleValue:lJ,serializeScaleValue:pJ};import vj,{useMemo as fj}from"react";import{jsx as hj}from"react/jsx-runtime";import Ij from"react";import{jsx as S,jsxs as xj,Fragment as wT}from"react/jsx-runtime";import Rj from"react";var JQ=0.01,QQ=({children:T,presentationProgress:j,presentationDirection:J,passedProps:{direction:Q="from-left",enterStyle:$,exitStyle:W}})=>{let Y=qj(()=>{let K=j===1?j*100:j*100-JQ;if(J==="exiting")switch(Q){case"from-left":return{transform:`translateX(${K}%)`};case"from-right":return{transform:`translateX(${-j*100}%)`};case"from-top":return{transform:`translateY(${K}%)`};case"from-bottom":return{transform:`translateY(${-j*100}%)`};default:throw Error(`Invalid direction: ${Q}`)}switch(Q){case"from-left":return{transform:`translateX(${-100+j*100}%)`};case"from-right":return{transform:`translateX(${100-K}%)`};case"from-top":return{transform:`translateY(${-100+j*100}%)`};case"from-bottom":return{transform:`translateY(${100-K}%)`};default:throw Error(`Invalid direction: ${Q}`)}},[J,j,Q]),H=qj(()=>{return{width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...Y,...J==="entering"?$:W}},[Y,$,W,J]);return jQ(TQ,{style:H,children:T})},zT=(T)=>{return{component:QQ,props:T??{}}},DQ=({children:T,onElementImage:j,onUnmount:J,presentationProgress:Q,presentationDirection:$,shader:W,effects:Y,passedProps:H,bothEnteringAndExiting:K})=>{if(!HQ.isSupported())throw Error(ZQ);let Z=e(null),X=e(null),G=Nj(()=>{return{width:"100%",height:"100%",position:"absolute",top:0,left:0,right:0,bottom:0}},[]),D=Nj(()=>{return{width:"100%",height:"100%",position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none"}},[]),N=e(null),L=e(null),[B]=Vj(()=>new OffscreenCanvas(1,1)),U=e(H);U.current=H;let V=hT.useMemoizedEffects({effects:Y??[],overrideId:null}),z=e(V);z.current=V;let[A]=Vj(()=>W(B));KT(()=>{let q=Z.current;if(!q)return()=>{A.cleanup()};let _=q.transferControlToOffscreen(),x=_.getContext("2d");if(!x)throw Error("Failed to create capture canvas context");return N.current=_,L.current=x,()=>{A.cleanup(),N.current=null,L.current=null}},[A]);let M=hT.useEffectChainState(),{delayRender:O,continueRender:P}=KQ(),h=$Q(async(q,_,x)=>{let E=X.current;if(!E)throw Error("Canvas not found");let C=O("onPaint"),b=()=>{let m=E.getContext("2d");if(!m)throw Error("Failed to create output canvas context");m.clearRect(0,0,E.width,E.height)};if(!q&&!_){A.clear(),b(),P(C);return}let w=q?.width??_?.width??0,I=q?.height??_?.height??0;if(w===0||I===0){A.clear(),b(),P(C);return}B.width=w,B.height=I,A.draw({prevImage:q,nextImage:_,width:w,height:I,time:x,passedProps:U.current}),await hT.runEffectChain({state:M.get(w,I),source:B,effects:z.current??[],width:w,height:I,output:E}),P(C)},[M,P,O,A,B]),y=K&&$==="exiting";if(KT(()=>{if(y)return;let q=Z.current;if(!q)throw Error("Canvas not found");q.layoutSubtree=!0;let _=()=>{let x=q.firstChild,E=N.current,C=L.current;if(!x||!E||!C)return;let b=q.captureElementImage(x);try{C.reset(),C.drawElementImage(b,0,0)}finally{b.close()}j(E,h)};return q.addEventListener("paint",_),()=>{q.removeEventListener("paint",_)}},[j,$,h,y]),KT(()=>{if(y)return;let q=Z.current;if(!q)throw Error("Canvas not found");q.requestPaint?.()},[Q,y,V]),KT(()=>{if(y)return;return()=>{J()}},[J,y]),KT(()=>{if(y)return;let q=Z.current;if(!q)return;let _=new ResizeObserver(([x])=>{let E=X.current,C=N.current;if(!E||!C)return;let b=x.devicePixelContentBoxSize[0].inlineSize,w=x.devicePixelContentBoxSize[0].blockSize;C.width=b,C.height=w,E.width=b,E.height=w,q.requestPaint?.()});return _.observe(q,{box:"device-pixel-content-box"}),()=>{_.disconnect()}},[y]),y)return T;return YQ(WQ,{children:[cT("canvas",{ref:Z,style:G,children:T}),cT("canvas",{ref:X,style:D})]})},YT=(T)=>{let j=(J)=>{let{passedProps:Q,...$}=J,{effects:W,...Y}=J.passedProps;return cT(DQ,{shader:T,passedProps:Y,effects:W,...$})};return(J)=>{return{component:j,props:J}}},i=(T,j)=>{T.texImage2D(T.TEXTURE_2D,0,T.RGBA,T.RGBA,T.UNSIGNED_BYTE,j)},XQ=0.4,GQ=`#version 300 es
|
|
2
2
|
in vec2 a_pos;
|
|
3
3
|
out vec2 v_uv;
|
|
4
4
|
void main() {
|
|
5
5
|
v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
|
|
6
6
|
gl_Position = vec4(a_pos, 0.0, 1.0);
|
|
7
|
-
}`,
|
|
7
|
+
}`,BQ=`#version 300 es
|
|
8
8
|
precision highp float;
|
|
9
9
|
|
|
10
10
|
uniform sampler2D u_prev;
|
|
@@ -73,13 +73,13 @@ vec4 transition(vec2 uv, float progress) {
|
|
|
73
73
|
void main() {
|
|
74
74
|
float progress = 1.0 - u_time;
|
|
75
75
|
outColor = transition(v_uv, progress);
|
|
76
|
-
}`,
|
|
76
|
+
}`,Aj=(T,j,J)=>{let Q=T.createShader(J);if(!Q)throw Error("Failed to create shader");if(T.shaderSource(Q,j),T.compileShader(Q),!T.getShaderParameter(Q,T.COMPILE_STATUS)){let $=T.getShaderInfoLog(Q);throw T.deleteShader(Q),Error(`Failed to compile shader: ${$}`)}return Q},UQ=(T)=>{let j=T.createProgram();if(!j)throw Error("Failed to create WebGL program");let J=Aj(T,GQ,T.VERTEX_SHADER),Q=Aj(T,BQ,T.FRAGMENT_SHADER);if(T.attachShader(j,J),T.attachShader(j,Q),T.linkProgram(j),!T.getProgramParameter(j,T.LINK_STATUS)){let $=T.getProgramInfoLog(j);throw T.deleteProgram(j),Error(`Failed to link program: ${$}`)}return j},Cj=(T)=>{let j=T.createTexture();if(!j)throw Error("Failed to create texture");return T.bindTexture(T.TEXTURE_2D,j),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_S,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_T,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,T.LINEAR),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,T.LINEAR),T.texImage2D(T.TEXTURE_2D,0,T.RGBA,1,1,0,T.RGBA,T.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),j},qQ=(T)=>{let j=T.getContext("webgl2",{premultipliedAlpha:!0});if(!j)throw Error("Failed to create WebGL2 context");let J=UQ(j),Q=Cj(j),$=Cj(j),W=j.createVertexArray();j.bindVertexArray(W);let Y=j.createBuffer();j.bindBuffer(j.ARRAY_BUFFER,Y),j.bufferData(j.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),j.STATIC_DRAW);let H=j.getAttribLocation(J,"a_pos");j.enableVertexAttribArray(H),j.vertexAttribPointer(H,2,j.FLOAT,!1,0,0);let K=j.getUniformLocation(J,"u_time"),Z=j.getUniformLocation(J,"u_prev"),X=j.getUniformLocation(J,"u_next"),G=j.getUniformLocation(J,"u_strength");return{clear:()=>{j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)},cleanup:()=>{j.deleteProgram(J),j.deleteTexture(Q),j.deleteTexture($)},draw:({prevImage:B,nextImage:U,width:V,height:z,time:A,passedProps:M})=>{let{strength:O=XQ}=M;if(!B&&!U)return;if(B&&(B.width===0||B.height===0))return;if(U&&(U.width===0||U.height===0))return;let P=!B?0:!U?1:A;if(j.viewport(0,0,V,z),j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT),j.useProgram(J),j.activeTexture(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,Q),B)i(j,B);if(j.uniform1i(Z,0),j.activeTexture(j.TEXTURE1),j.bindTexture(j.TEXTURE_2D,$),U)i(j,U);j.uniform1i(X,1),j.uniform1f(K,P),j.uniform1f(G,O),j.drawArrays(j.TRIANGLE_STRIP,0,4)}}},NQ=YT(qQ),VQ=6,AQ=1.2,CQ=`#version 300 es
|
|
77
77
|
in vec2 a_pos;
|
|
78
78
|
out vec2 v_uv;
|
|
79
79
|
void main() {
|
|
80
80
|
v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
|
|
81
81
|
gl_Position = vec4(a_pos, 0.0, 1.0);
|
|
82
|
-
}`,
|
|
82
|
+
}`,_Q=`#version 300 es
|
|
83
83
|
precision highp float;
|
|
84
84
|
|
|
85
85
|
uniform sampler2D u_prev;
|
|
@@ -114,13 +114,13 @@ vec4 transition(vec2 uv, float progress) {
|
|
|
114
114
|
void main() {
|
|
115
115
|
float progress = 1.0 - u_time;
|
|
116
116
|
outColor = transition(v_uv, progress);
|
|
117
|
-
}`,
|
|
117
|
+
}`,_j=(T,j,J)=>{let Q=T.createShader(J);if(!Q)throw Error("Failed to create shader");if(T.shaderSource(Q,j),T.compileShader(Q),!T.getShaderParameter(Q,T.COMPILE_STATUS)){let $=T.getShaderInfoLog(Q);throw T.deleteShader(Q),Error(`Failed to compile shader: ${$}`)}return Q},EQ=(T)=>{let j=T.createProgram();if(!j)throw Error("Failed to create WebGL program");let J=_j(T,CQ,T.VERTEX_SHADER),Q=_j(T,_Q,T.FRAGMENT_SHADER);if(T.attachShader(j,J),T.attachShader(j,Q),T.linkProgram(j),!T.getProgramParameter(j,T.LINK_STATUS)){let $=T.getProgramInfoLog(j);throw T.deleteProgram(j),Error(`Failed to link program: ${$}`)}return j},Ej=(T)=>{let j=T.createTexture();if(!j)throw Error("Failed to create texture");return T.bindTexture(T.TEXTURE_2D,j),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_S,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_T,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,T.LINEAR),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,T.LINEAR),T.texImage2D(T.TEXTURE_2D,0,T.RGBA,1,1,0,T.RGBA,T.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),j},OQ=(T)=>{let j=T.getContext("webgl2",{premultipliedAlpha:!0});if(!j)throw Error("Failed to create WebGL2 context");let J=EQ(j),Q=Ej(j),$=Ej(j),W=j.createVertexArray();j.bindVertexArray(W);let Y=j.createBuffer();j.bindBuffer(j.ARRAY_BUFFER,Y),j.bufferData(j.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),j.STATIC_DRAW);let H=j.getAttribLocation(J,"a_pos");j.enableVertexAttribArray(H),j.vertexAttribPointer(H,2,j.FLOAT,!1,0,0);let K=j.getUniformLocation(J,"u_time"),Z=j.getUniformLocation(J,"u_prev"),X=j.getUniformLocation(J,"u_next"),G=j.getUniformLocation(J,"u_rotation"),D=j.getUniformLocation(J,"u_scale"),N=j.getUniformLocation(J,"u_ratio");return{clear:()=>{j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)},cleanup:()=>{j.deleteProgram(J),j.deleteTexture(Q),j.deleteTexture($)},draw:({prevImage:V,nextImage:z,width:A,height:M,time:O,passedProps:P})=>{let{rotation:h=VQ,scale:y=AQ}=P;if(!V&&!z)return;if(V&&(V.width===0||V.height===0))return;if(z&&(z.width===0||z.height===0))return;let q=!V?0:!z?1:O;if(j.viewport(0,0,A,M),j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT),j.useProgram(J),j.activeTexture(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,Q),V)i(j,V);if(j.uniform1i(Z,0),j.activeTexture(j.TEXTURE1),j.bindTexture(j.TEXTURE_2D,$),z)i(j,z);j.uniform1i(X,1),j.uniform1f(K,q),j.uniform1f(G,h),j.uniform1f(D,y),j.uniform1f(N,A/M),j.drawArrays(j.TRIANGLE_STRIP,0,4)}}},bQ=YT(OQ),zQ=2.31,PQ=`#version 300 es
|
|
118
118
|
in vec2 a_pos;
|
|
119
119
|
out vec2 v_uv;
|
|
120
120
|
void main() {
|
|
121
121
|
v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
|
|
122
122
|
gl_Position = vec4(a_pos, 0.0, 1.0);
|
|
123
|
-
}`,
|
|
123
|
+
}`,LQ=`#version 300 es
|
|
124
124
|
precision highp float;
|
|
125
125
|
|
|
126
126
|
uniform sampler2D u_prev;
|
|
@@ -255,13 +255,13 @@ vec4 transition(vec2 p, float progress) {
|
|
|
255
255
|
void main() {
|
|
256
256
|
float progress = 1.0 - u_time;
|
|
257
257
|
outColor = transition(v_uv, progress);
|
|
258
|
-
}`,
|
|
258
|
+
}`,Oj=(T,j,J)=>{let Q=T.createShader(J);if(!Q)throw Error("Failed to create shader");if(T.shaderSource(Q,j),T.compileShader(Q),!T.getShaderParameter(Q,T.COMPILE_STATUS)){let $=T.getShaderInfoLog(Q);throw T.deleteShader(Q),Error(`Failed to compile shader: ${$}`)}return Q},MQ=(T)=>{let j=T.createProgram();if(!j)throw Error("Failed to create WebGL program");let J=Oj(T,PQ,T.VERTEX_SHADER),Q=Oj(T,LQ,T.FRAGMENT_SHADER);if(T.attachShader(j,J),T.attachShader(j,Q),T.linkProgram(j),!T.getProgramParameter(j,T.LINK_STATUS)){let $=T.getProgramInfoLog(j);throw T.deleteProgram(j),Error(`Failed to link program: ${$}`)}return j},bj=(T)=>{let j=T.createTexture();if(!j)throw Error("Failed to create texture");return T.bindTexture(T.TEXTURE_2D,j),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_S,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_T,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,T.LINEAR),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,T.LINEAR),T.texImage2D(T.TEXTURE_2D,0,T.RGBA,1,1,0,T.RGBA,T.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),j},wQ=(T)=>{let j=T.getContext("webgl2",{premultipliedAlpha:!0});if(!j)throw Error("Failed to create WebGL2 context");let J=MQ(j),Q=bj(j),$=bj(j),W=j.createVertexArray();j.bindVertexArray(W);let Y=j.createBuffer();j.bindBuffer(j.ARRAY_BUFFER,Y),j.bufferData(j.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),j.STATIC_DRAW);let H=j.getAttribLocation(J,"a_pos");j.enableVertexAttribArray(H),j.vertexAttribPointer(H,2,j.FLOAT,!1,0,0);let K=j.getUniformLocation(J,"u_time"),Z=j.getUniformLocation(J,"u_prev"),X=j.getUniformLocation(J,"u_next"),G=j.getUniformLocation(J,"u_seed");return{clear:()=>{j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)},cleanup:()=>{j.deleteProgram(J),j.deleteTexture(Q),j.deleteTexture($)},draw:({prevImage:B,nextImage:U,width:V,height:z,time:A,passedProps:M})=>{let{seed:O=zQ}=M;if(!B&&!U)return;if(B&&(B.width===0||B.height===0))return;if(U&&(U.width===0||U.height===0))return;let P=!B?0:!U?1:A;if(j.viewport(0,0,V,z),j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT),j.useProgram(J),j.activeTexture(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,Q),B)i(j,B);if(j.uniform1i(Z,0),j.activeTexture(j.TEXTURE1),j.bindTexture(j.TEXTURE_2D,$),U)i(j,U);j.uniform1i(X,1),j.uniform1f(K,P),j.uniform1f(G,O),j.drawArrays(j.TRIANGLE_STRIP,0,4)}}},SQ=YT(wQ),yQ=`#version 300 es
|
|
259
259
|
in vec2 a_pos;
|
|
260
260
|
out vec2 v_uv;
|
|
261
261
|
void main() {
|
|
262
262
|
v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);
|
|
263
263
|
gl_Position = vec4(a_pos, 0.0, 1.0);
|
|
264
|
-
}`,
|
|
264
|
+
}`,kQ=`#version 300 es
|
|
265
265
|
precision highp float;
|
|
266
266
|
|
|
267
267
|
uniform sampler2D u_prev;
|
|
@@ -297,4 +297,4 @@ vec4 transition(vec2 uv, float progress) {
|
|
|
297
297
|
void main() {
|
|
298
298
|
float progress = 1.0 - u_time;
|
|
299
299
|
outColor = transition(v_uv, progress);
|
|
300
|
-
}`,$J=(J,j,Q)=>{let $=J.createShader(Q);if(!$)throw Error("Failed to create shader");if(J.shaderSource($,j),J.compileShader($),!J.getShaderParameter($,J.COMPILE_STATUS)){let Z=J.getShaderInfoLog($);throw J.deleteShader($),Error(`Failed to compile shader: ${Z}`)}return $},aQ=(J)=>{let j=J.createProgram();if(!j)throw Error("Failed to create WebGL program");let Q=$J(J,rQ,J.VERTEX_SHADER),$=$J(J,tQ,J.FRAGMENT_SHADER);if(J.attachShader(j,Q),J.attachShader(j,$),J.linkProgram(j),!J.getProgramParameter(j,J.LINK_STATUS)){let Z=J.getProgramInfoLog(j);throw J.deleteProgram(j),Error(`Failed to link program: ${Z}`)}return j},ZJ=(J)=>{let j=J.createTexture();if(!j)throw Error("Failed to create texture");return J.bindTexture(J.TEXTURE_2D,j),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_S,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_WRAP_T,J.CLAMP_TO_EDGE),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MIN_FILTER,J.LINEAR),J.texParameteri(J.TEXTURE_2D,J.TEXTURE_MAG_FILTER,J.LINEAR),J.texImage2D(J.TEXTURE_2D,0,J.RGBA,1,1,0,J.RGBA,J.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),j},eQ=(J)=>{let j=J.getContext("webgl2",{premultipliedAlpha:!0});if(!j)throw Error("Failed to create WebGL2 context");let Q=aQ(j),$=ZJ(j),Z=ZJ(j),H=j.createVertexArray();j.bindVertexArray(H);let Y=j.createBuffer();j.bindBuffer(j.ARRAY_BUFFER,Y),j.bufferData(j.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),j.STATIC_DRAW);let K=j.getAttribLocation(Q,"a_pos");j.enableVertexAttribArray(K),j.vertexAttribPointer(K,2,j.FLOAT,!1,0,0);let W=j.getUniformLocation(Q,"u_time"),X=j.getUniformLocation(Q,"u_prev"),G=j.getUniformLocation(Q,"u_next"),D=j.getUniformLocation(Q,"u_intensity");return{clear:()=>{j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)},cleanup:()=>{j.deleteProgram(Q),j.deleteTexture($),j.deleteTexture(Z)},draw:({prevImage:V,nextImage:q,width:N,height:B,time:z,passedProps:A})=>{let{intensity:U=0.1}=A;if(!V&&!q)return;if(V&&(V.width===0||V.height===0))return;if(q&&(q.width===0||q.height===0))return;let O=!V?0:!q?1:z;if(j.viewport(0,0,N,B),j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT),j.useProgram(Q),j.activeTexture(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,$),V)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,V);if(j.uniform1i(X,0),j.activeTexture(j.TEXTURE1),j.bindTexture(j.TEXTURE_2D,Z),q)j.texElementImage2D(j.TEXTURE_2D,0,j.RGBA,j.RGBA,j.UNSIGNED_BYTE,q);j.uniform1i(G,1),j.uniform1f(W,O),j.uniform1f(D,U),j.drawArrays(j.TRIANGLE_STRIP,0,4)}}},j0=Jj(eQ),Q0=(J)=>{return{getDurationInFrames:()=>{return J.durationInFrames},getProgress:({frame:j})=>{return J0(j,[0,J.durationInFrames],[0,1],{easing:J.easing,extrapolateLeft:"clamp",extrapolateRight:"clamp"})}}},H0=(J={})=>{return{getDurationInFrames:({fps:j})=>{if(J.durationInFrames)return J.durationInFrames;return $0({config:J.config,threshold:J.durationRestThreshold,fps:j})},getProgress:({fps:j,frame:Q})=>{let $=J.reverse?0:1,Z=J.reverse?1:0;return Z0({fps:j,frame:Q,to:$,from:Z,config:J.config,durationInFrames:J.durationInFrames,durationRestThreshold:J.durationRestThreshold,reverse:J.reverse})}}},VJ=DJ.createContext(null),qJ=DJ.createContext(null),WJ=({presentationProgress:J,children:j})=>{let Q=_J(()=>{return{enteringProgress:J}},[J]);return UJ(VJ.Provider,{value:Q,children:j})},YJ=({presentationProgress:J,children:j})=>{let Q=_J(()=>{return{exitingProgress:J}},[J]);return UJ(qJ.Provider,{value:Q,children:j})},AJ=(J)=>{return XJ.Children.toArray(J).reduce((Q,$)=>{if($.type===XJ.Fragment)return Q.concat(AJ($.props.children));return Q.push($),Q},[])},GJ=Dj.validateDurationInFrames,{SequenceWithoutSchema:jj}=d,l=function(J){return null},Cj=()=>{return null},TJ=({children:J})=>{return b(NJ,{children:J})},B0={name:d.sequenceSchema.name,hidden:d.sequenceSchema.hidden,showInTimeline:d.sequenceSchema.showInTimeline,from:d.fromField,freeze:d.freezeField,layout:d.sequenceSchema.layout},D0=({children:J})=>{let{fps:j}=G0(),Q=X0(),$=KJ({}),Z=KJ({}),H=HJ(()=>{return AJ(J)},[J]),Y=Oj((G)=>{let D=$?.current?.[G],_=Z?.current?.[G];if(!_?.elementImage&&D?.elementImage){_?.draw?.(null,null,0),D?.draw?.(D?.elementImage??null,null,0);return}if(!D?.elementImage&&_?.elementImage){D?.draw?.(null,null,0),_?.draw?.(null,_?.elementImage??null,0);return}if(D&&_&&D.progress===_.progress||!D?.elementImage||!_?.elementImage)D?.draw?.(D?.elementImage??null,_?.elementImage??null,D?.progress??_?.progress??0),_?.draw?.(null,null,0)},[]),K=Oj((G,D,_,T)=>{$.current[T]={elementImage:G,progress:D,draw:_},Y(T)},[Y]),W=Oj((G,D,_,T)=>{Z.current[T]={elementImage:G,progress:D,draw:_},Y(T)},[Y]),X=HJ(()=>{let G=0,D=0,_=[],T=[],E=!1,V=K0.map(H,(N,B)=>{let z=N;if(typeof z==="string"){if(z.trim()==="")return null;throw TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${z}"`)}let A=H[B-1],U=H[B+1],O=typeof A==="string"||typeof A>"u"?!1:A.type===l,w=typeof A==="string"||typeof A>"u"?!1:A.type===Cj;if(z.type===Cj){if(w)throw TypeError(`A <TransitionSeries.Overlay /> component must not be followed by another <TransitionSeries.Overlay /> component (nth children = ${B-1} and ${B})`);if(O)throw TypeError(`A <TransitionSeries.Transition /> component must not be followed by a <TransitionSeries.Overlay /> component (nth children = ${B-1} and ${B})`);if(typeof U==="string"||typeof U>"u"?!1:U.type===l)throw TypeError(`A <TransitionSeries.Overlay /> component must not be followed by a <TransitionSeries.Transition /> component (nth children = ${B} and ${B+1})`);let C=z.props;GJ(C.durationInFrames,{component:"of a <TransitionSeries.Overlay /> component",allowFloats:!1});let k=C.offset??0;if(Number.isNaN(k))throw TypeError('The "offset" property of a <TransitionSeries.Overlay /> must not be NaN, but got NaN.');if(!Number.isFinite(k))throw TypeError(`The "offset" property of a <TransitionSeries.Overlay /> must be finite, but got ${k}.`);if(k%1!==0)throw TypeError(`The "offset" property of a <TransitionSeries.Overlay /> must be an integer, but got ${k}.`);let h=D+G,u=C.durationInFrames/2,m=h-u+k;if(m<0)throw TypeError(`A <TransitionSeries.Overlay /> extends before frame 0. The overlay starts at frame ${m}. Reduce the duration or adjust the offset.`);let Vj=T.length-1;if(Vj>=0){let kj=u-k;if(kj>T[Vj])throw TypeError(`A <TransitionSeries.Overlay /> extends beyond the previous sequence. The overlay needs ${kj} frames before the cut, but the previous sequence is only ${T[Vj]} frames long.`)}return E=!0,_.push({cutPoint:h,overlayFrom:m,durationInFrames:C.durationInFrames,overlayOffset:k,halfDuration:u,children:C.children,index:B}),null}if(z.type===l){if(O)throw TypeError(`A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${B-1} and ${B})`);if(w)throw TypeError(`A <TransitionSeries.Overlay /> component must not be followed by a <TransitionSeries.Transition /> component (nth children = ${B-1} and ${B})`);return null}if(z.type!==TJ)throw TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence />, <TransitionSeries.Transition />, and <TransitionSeries.Overlay /> components as its children, but got ${z} instead`);let M=typeof A==="string"||typeof A>"u"?null:A.type===l?A:null,L=typeof U==="string"||typeof U>"u"?null:U.type===l?U:null,x=z,g=`index = ${B}, duration = ${x.props.durationInFrames}`,S=x.props.durationInFrames,{durationInFrames:zJ,children:V0,from:q0,...F}=x.props;GJ(S,{component:"of a <TransitionSeries.Sequence /> component",allowFloats:!0});let c=x.props.offset??0;if(Number.isNaN(c))throw TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${g}).`);if(!Number.isFinite(c))throw TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${c} (${g}).`);if(c%1!==0)throw TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${c} (${g}).`);let MJ=D+c,Ej=0;if(M)Ej=M.props.timing.getDurationInFrames({fps:j}),G-=Ej;let I=MJ+G;if(D+=S+c,I<0)D-=I,I=0;if(T.push(S),E){E=!1;let y=_[_.length-1],C=y.halfDuration+y.overlayOffset;if(C>S)throw TypeError(`A <TransitionSeries.Overlay /> extends beyond the next sequence. The overlay needs ${C} frames after the cut, but the next sequence is only ${S} frames long.`)}let f=L?L.props.timing.getProgress({frame:Q-I-zJ+L.props.timing.getDurationInFrames({fps:j}),fps:j}):null,v=M?M.props.timing.getProgress({frame:Q-I,fps:j}):null;if(L&&S<L.props.timing.getDurationInFrames({fps:j}))throw Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${L.props.timing.getDurationInFrames({fps:j})} frames long, but the sequence is only ${S} frames long (${g})`);if(M&&S<M.props.timing.getDurationInFrames({fps:j}))throw Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${M.props.timing.getDurationInFrames({fps:j})} frames long, but the sequence is only ${S} frames long (${g})`);if(L&&M&&f!==null&&v!==null){let y=L.props.presentation??_j(),C=M.props.presentation??_j(),k=y.component,h=C.component;return b(jj,{from:I,durationInFrames:S,...F,name:F.name||"<TS.Sequence>",_remotionInternalDocumentationLink:F.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",children:b(k,{passedProps:y.props??{},presentationDirection:"exiting",presentationProgress:f,presentationDurationInFrames:L.props.timing.getDurationInFrames({fps:j}),onElementImage:()=>{throw Error("Should not call when exiting")},onUnmount:()=>{throw Error("Should not call when exiting")},bothEnteringAndExiting:!0,children:b(YJ,{presentationProgress:f,children:b(h,{passedProps:C.props??{},presentationDirection:"entering",presentationProgress:v,presentationDurationInFrames:M.props.timing.getDurationInFrames({fps:j}),onElementImage:(u,m)=>{W(u,f,m,B+1),K(u,v,m,B-1)},onUnmount:()=>{W(null,null,null,B+1),K(null,null,null,B-1)},bothEnteringAndExiting:!0,children:b(WJ,{presentationProgress:v,children:N})})})})},B)}if(v!==null&&M){let y=M.props.presentation??_j(),C=y.component;return b(jj,{from:I,durationInFrames:S,...F,name:F.name||"<TS.Sequence>",_remotionInternalDocumentationLink:F.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",children:b(C,{passedProps:y.props??{},presentationDirection:"entering",presentationProgress:v,presentationDurationInFrames:M.props.timing.getDurationInFrames({fps:j}),onElementImage:(k,h)=>K(k,v,h,B-1),onUnmount:()=>{K(null,null,null,B-1)},bothEnteringAndExiting:!1,children:b(WJ,{presentationProgress:v,children:N})})},B)}if(f!==null&&L){let y=L.props.presentation??_j(),C=y.component;return b(jj,{from:I,durationInFrames:S,...F,name:F.name||"<TS.Sequence>",_remotionInternalDocumentationLink:F.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",children:b(C,{passedProps:y.props??{},presentationDirection:"exiting",presentationProgress:f,presentationDurationInFrames:L.props.timing.getDurationInFrames({fps:j}),onElementImage:(k,h)=>W(k,f,h,B+1),onUnmount:()=>{W(null,null,null,B+1)},bothEnteringAndExiting:!1,children:b(YJ,{presentationProgress:f,children:N})})},B)}return b(jj,{from:I,durationInFrames:S,...F,name:F.name||"<TS.Sequence>",_remotionInternalDocumentationLink:F.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",children:N},B)}),q=_.map((N)=>{let B=N;return b(jj,{from:Math.round(B.overlayFrom),durationInFrames:B.durationInFrames,name:"<TS.Overlay>",_remotionInternalDocumentationLink:"https://www.remotion.dev/docs/transitions/transitionseries",layout:"absolute-fill",children:B.children},`overlay-${B.index}`)});return[...V||[],...q]},[H,j,Q,W,K]);return b(NJ,{children:X})},_0=(J)=>{let{children:j,name:Q,layout:$,controls:Z,...H}=J,{stack:Y,...K}=H,W=Q??"<TransitionSeries>",X=$??"absolute-fill";if(Dj.ENABLE_V5_BREAKING_CHANGES&&X!=="absolute-fill")throw TypeError(`The "layout" prop of <TransitionSeries /> is not supported anymore in v5. TransitionSeries' must be absolutely positioned.`);return b(Y0,{name:W,layout:X,_remotionInternalDocumentationLink:Q===void 0?"https://www.remotion.dev/docs/transitions/transitionseries":void 0,...K,_remotionInternalStack:Y??void 0,controls:Z??void 0,children:b(D0,{children:j})})},Qj=W0.withSchema({Component:_0,componentName:"<TransitionSeries>",componentIdentity:"dev.remotion.transitions.TransitionSeries",schema:B0,supportsEffects:!1});Qj.Sequence=TJ;Qj.Transition=l;Qj.Overlay=Cj;d.addSequenceStackTraces(Qj);var U0=()=>{let J=BJ.useContext(VJ),j=BJ.useContext(qJ);if(!J&&!j)return{isInTransitionSeries:!1,entering:1,exiting:0};return{isInTransitionSeries:!0,entering:J?.enteringProgress??1,exiting:j?.exitingProgress??0}};var{TransitionSeries:h0,crossZoom:d0,dreamyZoom:c0,filmBurn:u0,linearBlur:m0,linearTiming:i0,makeHtmlInCanvasPresentation:p0,springTiming:s0,useTransitionProgress:o0}=Uj;var g0=Uj;export{o0 as useTransitionProgress,s0 as springTiming,p0 as makeHtmlInCanvasPresentation,i0 as linearTiming,m0 as linearBlur,u0 as filmBurn,c0 as dreamyZoom,g0 as default,d0 as crossZoom,h0 as TransitionSeries};
|
|
300
|
+
}`,zj=(T,j,J)=>{let Q=T.createShader(J);if(!Q)throw Error("Failed to create shader");if(T.shaderSource(Q,j),T.compileShader(Q),!T.getShaderParameter(Q,T.COMPILE_STATUS)){let $=T.getShaderInfoLog(Q);throw T.deleteShader(Q),Error(`Failed to compile shader: ${$}`)}return Q},IQ=(T)=>{let j=T.createProgram();if(!j)throw Error("Failed to create WebGL program");let J=zj(T,yQ,T.VERTEX_SHADER),Q=zj(T,kQ,T.FRAGMENT_SHADER);if(T.attachShader(j,J),T.attachShader(j,Q),T.linkProgram(j),!T.getProgramParameter(j,T.LINK_STATUS)){let $=T.getProgramInfoLog(j);throw T.deleteProgram(j),Error(`Failed to link program: ${$}`)}return j},Pj=(T)=>{let j=T.createTexture();if(!j)throw Error("Failed to create texture");return T.bindTexture(T.TEXTURE_2D,j),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_S,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_WRAP_T,T.CLAMP_TO_EDGE),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MIN_FILTER,T.LINEAR),T.texParameteri(T.TEXTURE_2D,T.TEXTURE_MAG_FILTER,T.LINEAR),T.texImage2D(T.TEXTURE_2D,0,T.RGBA,1,1,0,T.RGBA,T.UNSIGNED_BYTE,new Uint8Array([0,0,0,0])),j},FQ=(T)=>{let j=T.getContext("webgl2",{premultipliedAlpha:!0});if(!j)throw Error("Failed to create WebGL2 context");let J=IQ(j),Q=Pj(j),$=Pj(j),W=j.createVertexArray();j.bindVertexArray(W);let Y=j.createBuffer();j.bindBuffer(j.ARRAY_BUFFER,Y),j.bufferData(j.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,1]),j.STATIC_DRAW);let H=j.getAttribLocation(J,"a_pos");j.enableVertexAttribArray(H),j.vertexAttribPointer(H,2,j.FLOAT,!1,0,0);let K=j.getUniformLocation(J,"u_time"),Z=j.getUniformLocation(J,"u_prev"),X=j.getUniformLocation(J,"u_next"),G=j.getUniformLocation(J,"u_intensity");return{clear:()=>{j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)},cleanup:()=>{j.deleteProgram(J),j.deleteTexture(Q),j.deleteTexture($)},draw:({prevImage:B,nextImage:U,width:V,height:z,time:A,passedProps:M})=>{let{intensity:O=0.1}=M;if(!B&&!U)return;if(B&&(B.width===0||B.height===0))return;if(U&&(U.width===0||U.height===0))return;let P=!B?0:!U?1:A;if(j.viewport(0,0,V,z),j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT),j.useProgram(J),j.activeTexture(j.TEXTURE0),j.bindTexture(j.TEXTURE_2D,Q),B)i(j,B);if(j.uniform1i(Z,0),j.activeTexture(j.TEXTURE1),j.bindTexture(j.TEXTURE_2D,$),U)i(j,U);j.uniform1i(X,1),j.uniform1f(K,P),j.uniform1f(G,O),j.drawArrays(j.TRIANGLE_STRIP,0,4)}}},xQ=YT(FQ),LT={extrapolateLeft:"clamp",extrapolateRight:"clamp"},MT=(T,j)=>{if(!Number.isFinite(j))throw TypeError(`${T} passed to pushCut() must be finite, received ${j}`)},vQ=(T)=>{let j=T.cutProgress??0.45454545454545453,J=T.outgoingScale??1.04,Q=T.incomingStartScale??1.04,$=T.incomingEndScale??1.07,W=T.flashOpacity??0.2,Y=T.flashFrames??2;if(MT("cutProgress",j),j<=0||j>=1)throw TypeError(`cutProgress passed to pushCut() must be greater than 0 and less than 1, received ${j}`);for(let[H,K]of[["outgoingScale",J],["incomingStartScale",Q],["incomingEndScale",$]])if(MT(H,K),K<=0)throw TypeError(`${H} passed to pushCut() must be greater than 0, received ${K}`);if(MT("flashOpacity",W),W<0||W>1)throw TypeError(`flashOpacity passed to pushCut() must be between 0 and 1, received ${W}`);if(MT("flashFrames",Y),Y<0)throw TypeError(`flashFrames passed to pushCut() must be greater than or equal to 0, received ${Y}`)},fQ=({children:T,presentationDirection:j,presentationDurationInFrames:J,presentationProgress:Q,passedProps:$})=>{let{cutProgress:W=0.45454545454545453,outgoingScale:Y=1.04,incomingStartScale:H=1.04,incomingEndScale:K=1.07,transformOrigin:Z="50% 50%",flashColor:X="#f5f2ed",flashOpacity:G=0.2,flashFrames:D=2,outerEnterStyle:N,outerExitStyle:L,innerEnterStyle:B,innerExitStyle:U}=$,V=j==="entering",z=t(Q,[0,W],[0,1],{...LT,easing:PT.in(PT.quad)}),A=t(Q,[W,1],[0,1],{...LT,easing:PT.out(PT.quad)}),M=V?t(A,[0,1],[H,K]):t(z,[0,1],[1,Y]),O=1/Math.max(1,J),P=D/Math.max(1,J),h=V?t(Q,[W,W+P],[G,0],LT):t(Q,[W-O,W],[0,G],LT),y=Lj(()=>{return{opacity:V&&Q<W?0:1,overflow:"hidden",...V?N:L}},[W,V,N,L,Q]),q=Lj(()=>{return{transform:`scale(${M})`,transformOrigin:Z,willChange:"transform",...V?B:U}},[B,U,V,M,Z]);return RQ(gT,{style:y,children:[Mj(gT,{style:q,children:T}),h>0?Mj(gT,{style:{backgroundColor:X,opacity:h,pointerEvents:"none"}}):null]})},hQ=(T)=>{let j=T??{};return vQ(j),{component:fQ,props:j}},dQ=(T)=>{return{getDurationInFrames:()=>{return T.durationInFrames},getProgress:({frame:j})=>{return gQ(j,[0,T.durationInFrames],[0,1],{easing:T.easing,extrapolateLeft:"clamp",extrapolateRight:"clamp"})}}},lQ=(T={})=>{return{getDurationInFrames:({fps:j})=>{if(T.durationInFrames)return T.durationInFrames;return mQ({config:T.config,threshold:T.durationRestThreshold,fps:j})},getProgress:({fps:j,frame:J})=>{let Q=T.reverse?0:1,$=T.reverse?1:0;return cQ({fps:j,frame:J,to:Q,from:$,config:T.config,durationInFrames:T.durationInFrames,durationRestThreshold:T.durationRestThreshold,reverse:T.reverse})}}},gj=vj.createContext(null),dj=vj.createContext(null),yj=({presentationProgress:T,children:j})=>{let J=fj(()=>{return{enteringProgress:T}},[T]);return hj(gj.Provider,{value:J,children:j})},kj=({presentationProgress:T,children:j})=>{let J=fj(()=>{return{exitingProgress:T}},[T]);return hj(dj.Provider,{value:J,children:j})},mj=(T)=>{return Ij.Children.toArray(T).reduce((J,Q)=>{if(Q.type===Ij.Fragment)return J.concat(mj(Q.props.children));return J.push(Q),J},[])},Fj=bT.validateDurationInFrames,{SequenceWithoutSchema:TT}=k,uQ=({_remotionInternalRender:T=null,...j})=>{if(T)return T(j);return null},oQ={},jT=ST.withSchema({Component:uQ,componentName:"<TransitionSeries.Transition>",componentIdentity:"dev.remotion.transitions.TransitionSeries.Transition",schema:oQ,supportsEffects:!1}),rQ=({_remotionInternalRender:T=null,...j})=>{if(T)return T(j);return null},nQ={},lT=ST.withSchema({Component:rQ,componentName:"<TransitionSeries.Overlay>",componentIdentity:"dev.remotion.transitions.TransitionSeries.Overlay",schema:nQ,supportsEffects:!1}),aQ={durationInFrames:k.durationInFramesField,name:k.sequenceSchema.name,hidden:k.sequenceSchema.hidden,showInTimeline:k.sequenceSchema.showInTimeline,freeze:k.freezeField,trimBefore:k.sequenceSchema.trimBefore,layout:k.sequenceSchema.layout},eQ=({offset:T=0,className:j="",_remotionInternalRender:J=null,...Q})=>{if(J)return J({...Q,offset:T,className:j||void 0});return S(wT,{children:Q.children})},cj=ST.withSchema({Component:eQ,componentName:"<TransitionSeries.Sequence>",componentIdentity:"dev.remotion.transitions.TransitionSeries.Sequence",schema:aQ,supportsEffects:!1}),tQ={name:k.sequenceSchema.name,hidden:k.sequenceSchema.hidden,showInTimeline:k.sequenceSchema.showInTimeline,from:k.fromField,freeze:k.freezeField,layout:k.sequenceSchema.layout},T0=({children:T})=>{let{fps:j}=sQ(),J=iQ(),Q=Sj({}),$=Sj({}),W=wj(()=>{return mj(T)},[T]),Y=mT((X)=>{let G=Q?.current?.[X],D=$?.current?.[X];if(!D?.elementImage&&G?.elementImage){D?.draw?.(null,null,0),G?.draw?.(G?.elementImage??null,null,0);return}if(!G?.elementImage&&D?.elementImage){G?.draw?.(null,null,0),D?.draw?.(null,D?.elementImage??null,0);return}if(G&&D&&G.progress===D.progress||!G?.elementImage||!D?.elementImage)G?.draw?.(G?.elementImage??null,D?.elementImage??null,G?.progress??D?.progress??0),D?.draw?.(null,null,0)},[]),H=mT((X,G,D,N)=>{Q.current[N]={elementImage:X,progress:G,draw:D},Y(N)},[Y]),K=mT((X,G,D,N)=>{$.current[N]={elementImage:X,progress:G,draw:D},Y(N)},[Y]),Z=wj(()=>{let X=(G)=>{let{index:D,transitionOffsets:N,startFrame:L,overlayRenders:B,sequenceDurations:U,pendingOverlayValidation:V}=G;if(D===W.length)return B.map((E)=>S(TT,{from:Math.round(E.overlayFrom),durationInFrames:E.durationInFrames,name:"<TS.Overlay>",_remotionInternalDocumentationLink:"https://www.remotion.dev/docs/transitions/transitionseries",controls:E.controls??void 0,layout:"absolute-fill",children:E.children},`overlay-${E.index}`));let A=W[D],M=(E={})=>{return X({...G,...E,index:D+1})};if(typeof A==="string"){if(A.trim()==="")return M();throw TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${A}"`)}let O=W[D-1],P=W[D+1],h=typeof O==="string"||typeof O>"u"?!1:O.type===jT,y=typeof O==="string"||typeof O>"u"?!1:O.type===lT;if(A.type===lT){if(y)throw TypeError(`A <TransitionSeries.Overlay /> component must not be followed by another <TransitionSeries.Overlay /> component (nth children = ${D-1} and ${D})`);if(h)throw TypeError(`A <TransitionSeries.Transition /> component must not be followed by a <TransitionSeries.Overlay /> component (nth children = ${D-1} and ${D})`);if(typeof P==="string"||typeof P>"u"?!1:P.type===jT)throw TypeError(`A <TransitionSeries.Overlay /> component must not be followed by a <TransitionSeries.Transition /> component (nth children = ${D} and ${D+1})`);let C=A;return dT.cloneElement(C,{_remotionInternalRender:(b)=>{Fj(b.durationInFrames,{component:"of a <TransitionSeries.Overlay /> component",allowFloats:!1});let w=b.offset??0;if(Number.isNaN(w))throw TypeError('The "offset" property of a <TransitionSeries.Overlay /> must not be NaN, but got NaN.');if(!Number.isFinite(w))throw TypeError(`The "offset" property of a <TransitionSeries.Overlay /> must be finite, but got ${w}.`);if(w%1!==0)throw TypeError(`The "offset" property of a <TransitionSeries.Overlay /> must be an integer, but got ${w}.`);let I=L+N,m=b.durationInFrames/2,c=I-m+w;if(c<0)throw TypeError(`A <TransitionSeries.Overlay /> extends before frame 0. The overlay starts at frame ${c}. Reduce the duration or adjust the offset.`);let DT=U.length-1;if(DT>=0){let s=m-w;if(s>U[DT])throw TypeError(`A <TransitionSeries.Overlay /> extends beyond the previous sequence. The overlay needs ${s} frames before the cut, but the previous sequence is only ${U[DT]} frames long.`)}let v={cutPoint:I,overlayFrom:c,durationInFrames:b.durationInFrames,overlayOffset:w,halfDuration:m,children:b.children,index:D,controls:b.controls};return M({overlayRenders:[...B,v],pendingOverlayValidation:!0})}})}if(A.type===jT){if(h)throw TypeError(`A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${D-1} and ${D})`);if(y)throw TypeError(`A <TransitionSeries.Overlay /> component must not be followed by a <TransitionSeries.Transition /> component (nth children = ${D-1} and ${D})`);let E=A;return dT.cloneElement(E,{_remotionInternalRender:(C)=>{let b=C.timing.getDurationInFrames({fps:j}),w=L+N-b;return xj(wT,{children:[b>0?S(TT,{from:w,durationInFrames:b,name:"<TS.Transition>",_remotionInternalDocumentationLink:"https://www.remotion.dev/docs/transitions/transitionseries",controls:C.controls??void 0,layout:"none"}):null,M()]})}})}if(A.type!==cj)throw TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence />, <TransitionSeries.Transition />, and <TransitionSeries.Overlay /> components as its children, but got ${A} instead`);let q=typeof O==="string"||typeof O>"u"?null:O.type===jT?O:null,_=typeof P==="string"||typeof P>"u"?null:P.type===jT?P:null,x=A;return dT.cloneElement(x,{_remotionInternalRender:(E)=>{let C=E.durationInFrames,b=`index = ${D}, duration = ${C}`,{durationInFrames:w,children:I,offset:m,controls:c,from:DT,...v}=E,s={...v,_remotionInternalSingleChildComponent:k.getSingleChildComponent(I)};Fj(C,{component:"of a <TransitionSeries.Sequence /> component",allowFloats:!0});let u=m??0;if(Number.isNaN(u))throw TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${b}).`);if(!Number.isFinite(u))throw TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${u} (${b}).`);if(u%1!==0)throw TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${u} (${b}).`);let IT=N,XT=L,FT=V,lj=XT+u,pT=0;if(q)pT=q.props.timing.getDurationInFrames({fps:j}),IT-=pT;let g=lj+IT;if(XT+=C+u,g<0)XT-=g,g=0;let pj=[...U,C];if(FT){FT=!1;let F=B[B.length-1];if(!F)throw Error("Expected an overlay to validate");let d=F.halfDuration+F.overlayOffset;if(d>C)throw TypeError(`A <TransitionSeries.Overlay /> extends beyond the next sequence. The overlay needs ${d} frames after the cut, but the next sequence is only ${C} frames long.`)}let GT=(F)=>{return xj(wT,{children:[F,M({transitionOffsets:IT,startFrame:XT,sequenceDurations:pj,pendingOverlayValidation:FT})]})},l=_?_.props.timing.getProgress({frame:J-g-w+_.props.timing.getDurationInFrames({fps:j}),fps:j}):null,p=q?q.props.timing.getProgress({frame:J-g,fps:j}):null;if(_&&C<_.props.timing.getDurationInFrames({fps:j}))throw Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${_.props.timing.getDurationInFrames({fps:j})} frames long, but the sequence is only ${C} frames long (${b})`);if(q&&C<q.props.timing.getDurationInFrames({fps:j}))throw Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${q.props.timing.getDurationInFrames({fps:j})} frames long, but the sequence is only ${C} frames long (${b})`);if(_&&q&&l!==null&&p!==null){let F=_.props.presentation??zT(),d=q.props.presentation??zT(),JT=F.component,QT=d.component;return GT(S(TT,{from:g,durationInFrames:C,...s,name:v.name||"<TS.Sequence>",_remotionInternalDocumentationLink:v.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",controls:c??void 0,children:S(JT,{passedProps:F.props??{},presentationDirection:"exiting",presentationProgress:l,presentationDurationInFrames:_.props.timing.getDurationInFrames({fps:j}),onElementImage:()=>{throw Error("Should not call when exiting")},onUnmount:()=>{throw Error("Should not call when exiting")},bothEnteringAndExiting:!0,children:S(kj,{presentationProgress:l,children:S(QT,{passedProps:d.props??{},presentationDirection:"entering",presentationProgress:p,presentationDurationInFrames:q.props.timing.getDurationInFrames({fps:j}),onElementImage:(iT,sT)=>{K(iT,l,sT,D+1),H(iT,p,sT,D-1)},onUnmount:()=>{K(null,null,null,D+1),H(null,null,null,D-1)},bothEnteringAndExiting:!0,children:S(yj,{presentationProgress:p,children:I})})})})},D))}if(p!==null&&q){let F=q.props.presentation??zT(),d=F.component;return GT(S(TT,{from:g,durationInFrames:C,...s,name:v.name||"<TS.Sequence>",_remotionInternalDocumentationLink:v.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",controls:c??void 0,children:S(d,{passedProps:F.props??{},presentationDirection:"entering",presentationProgress:p,presentationDurationInFrames:q.props.timing.getDurationInFrames({fps:j}),onElementImage:(JT,QT)=>H(JT,p,QT,D-1),onUnmount:()=>{H(null,null,null,D-1)},bothEnteringAndExiting:!1,children:S(yj,{presentationProgress:p,children:I})})},D))}if(l!==null&&_){let F=_.props.presentation??zT(),d=F.component;return GT(S(TT,{from:g,durationInFrames:C,...s,name:v.name||"<TS.Sequence>",_remotionInternalDocumentationLink:v.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",controls:c??void 0,children:S(d,{passedProps:F.props??{},presentationDirection:"exiting",presentationProgress:l,presentationDurationInFrames:_.props.timing.getDurationInFrames({fps:j}),onElementImage:(JT,QT)=>K(JT,l,QT,D+1),onUnmount:()=>{K(null,null,null,D+1)},bothEnteringAndExiting:!1,children:S(kj,{presentationProgress:l,children:I})})},D))}return GT(S(TT,{from:g,durationInFrames:C,...s,name:v.name||"<TS.Sequence>",_remotionInternalDocumentationLink:v.name?void 0:"https://www.remotion.dev/docs/transitions/transitionseries",controls:c??void 0,children:I},D))}})};return X({index:0,transitionOffsets:0,startFrame:0,overlayRenders:[],sequenceDurations:[],pendingOverlayValidation:!1})},[W,j,J,K,H]);return S(wT,{children:Z})},j0=(T)=>{let{children:j,name:J,layout:Q,controls:$,...W}=T,Y=J??"<TransitionSeries>",H=Q??"absolute-fill";if(bT.ENABLE_V5_BREAKING_CHANGES&&H!=="absolute-fill")throw TypeError(`The "layout" prop of <TransitionSeries /> is not supported anymore in v5. TransitionSeries' must be absolutely positioned.`);return S(pQ,{name:Y,layout:H,_remotionInternalDocumentationLink:J===void 0?"https://www.remotion.dev/docs/transitions/transitionseries":void 0,...W,controls:$??void 0,children:S(T0,{children:j})})},yT=ST.withSchema({Component:j0,componentName:"<TransitionSeries>",componentIdentity:"dev.remotion.transitions.TransitionSeries",schema:tQ,supportsEffects:!1});yT.Sequence=cj;yT.Transition=jT;yT.Overlay=lT;var J0=()=>{let T=Rj.useContext(gj),j=Rj.useContext(dj);if(!T&&!j)return{isInTransitionSeries:!1,entering:1,exiting:0};return{isInTransitionSeries:!0,entering:T?.enteringProgress??1,exiting:j?.exitingProgress??0}};var{TransitionSeries:w0,crossZoom:S0,dreamyZoom:y0,filmBurn:k0,linearBlur:I0,linearTiming:F0,makeHtmlInCanvasPresentation:x0,pushCut:R0,springTiming:v0,useTransitionProgress:f0}=kT;var g0=kT;export{f0 as useTransitionProgress,v0 as springTiming,R0 as pushCut,x0 as makeHtmlInCanvasPresentation,F0 as linearTiming,I0 as linearBlur,k0 as filmBurn,y0 as dreamyZoom,g0 as default,S0 as crossZoom,w0 as TransitionSeries};
|