@agrhub/engine-pixi 0.0.0-stage → 1.3.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.
Files changed (93) hide show
  1. package/LICENSE +47 -0
  2. package/NOTICE.md +19 -0
  3. package/README.md +6 -2
  4. package/dist/animation/block-reveal-animation.d.ts +33 -0
  5. package/dist/animation/easings.d.ts +4 -0
  6. package/dist/animation/gsap-animation.d.ts +32 -0
  7. package/dist/animation/index.d.ts +9 -0
  8. package/dist/animation/keyframe-animation.d.ts +11 -0
  9. package/dist/animation/mask-animation.d.ts +145 -0
  10. package/dist/animation/pixi-animation-utils.d.ts +10 -0
  11. package/dist/animation/registry.d.ts +11 -0
  12. package/dist/animation/types.d.ts +205 -0
  13. package/dist/animation/wipe-animation.d.ts +53 -0
  14. package/dist/clips/audio-clip.d.ts +122 -0
  15. package/dist/clips/backdrop-clip.d.ts +56 -0
  16. package/dist/clips/base-clip.d.ts +150 -0
  17. package/dist/clips/base-text-clip.d.ts +228 -0
  18. package/dist/clips/caption-clip.d.ts +129 -0
  19. package/dist/clips/clip-registry.d.ts +56 -0
  20. package/dist/clips/effect-clip.d.ts +37 -0
  21. package/dist/clips/iclip.d.ts +231 -0
  22. package/dist/clips/image-clip.d.ts +116 -0
  23. package/dist/clips/index.d.ts +20 -0
  24. package/dist/clips/placeholder-clip.d.ts +22 -0
  25. package/dist/clips/shape-clip.d.ts +59 -0
  26. package/dist/clips/text-clip.d.ts +148 -0
  27. package/dist/clips/transition-clip.d.ts +41 -0
  28. package/dist/clips/video-clip.d.ts +215 -0
  29. package/dist/compositor/audio-mixer.d.ts +8 -0
  30. package/dist/compositor/av-encoder.d.ts +17 -0
  31. package/dist/compositor/clip-style-renderer.d.ts +23 -0
  32. package/dist/compositor/compositor-renderer.d.ts +29 -0
  33. package/dist/compositor/effect-manager.d.ts +28 -0
  34. package/dist/compositor/scheduler.d.ts +8 -0
  35. package/dist/compositor/transition-manager.d.ts +45 -0
  36. package/dist/compositor.d.ts +157 -0
  37. package/dist/effect/constant/index.d.ts +566 -0
  38. package/dist/effect/effect.d.ts +9 -0
  39. package/dist/effect/glsl/custom-glsl.d.ts +1043 -0
  40. package/dist/effect/glsl/gl-effect.d.ts +38 -0
  41. package/dist/effect/interface/index.d.ts +25 -0
  42. package/dist/effect/types.d.ts +26 -0
  43. package/dist/effect/vertex.d.ts +1 -0
  44. package/dist/event-emitter.d.ts +55 -0
  45. package/dist/filters/outline-filter.d.ts +28 -0
  46. package/dist/index.d.ts +27 -0
  47. package/dist/index.es.js +16038 -0
  48. package/dist/index.es.js.map +1 -0
  49. package/dist/index.umd.cjs +3335 -0
  50. package/dist/index.umd.cjs.map +1 -0
  51. package/dist/json-serialization.d.ts +310 -0
  52. package/dist/mp4-utils/index.d.ts +31 -0
  53. package/dist/mp4-utils/mp4box-utils.d.ts +44 -0
  54. package/dist/mp4-utils/sample-transform.d.ts +26 -0
  55. package/dist/sprite/base-sprite.d.ts +255 -0
  56. package/dist/sprite/pixi-sprite-renderer.d.ts +68 -0
  57. package/dist/standalone/index.es.js +94023 -0
  58. package/dist/standalone/index.es.js.map +1 -0
  59. package/dist/studio/history-manager.d.ts +46 -0
  60. package/dist/studio/resource-manager.d.ts +53 -0
  61. package/dist/studio/selection-manager.d.ts +66 -0
  62. package/dist/studio/timeline-model.d.ts +117 -0
  63. package/dist/studio/transport.d.ts +44 -0
  64. package/dist/studio-bridge.d.ts +50 -0
  65. package/dist/studio.d.ts +527 -0
  66. package/dist/transformer/handle.d.ts +17 -0
  67. package/dist/transformer/snapping.d.ts +45 -0
  68. package/dist/transformer/transformer.d.ts +38 -0
  69. package/dist/transformer/wireframe.d.ts +5 -0
  70. package/dist/transition/fragment.d.ts +1 -0
  71. package/dist/transition/glsl/custom-glsl.d.ts +231 -0
  72. package/dist/transition/glsl/gl-transition.d.ts +42 -0
  73. package/dist/transition/transition.d.ts +6 -0
  74. package/dist/transition/types.d.ts +29 -0
  75. package/dist/transition/uniforms.d.ts +35 -0
  76. package/dist/transition/vertex.d.ts +1 -0
  77. package/dist/utils/asset-manager.d.ts +15 -0
  78. package/dist/utils/audio-codec-detector.d.ts +39 -0
  79. package/dist/utils/audio.d.ts +81 -0
  80. package/dist/utils/chromakey.d.ts +24 -0
  81. package/dist/utils/color-adjustment.d.ts +53 -0
  82. package/dist/utils/color.d.ts +17 -0
  83. package/dist/utils/common.d.ts +7 -0
  84. package/dist/utils/dom.d.ts +48 -0
  85. package/dist/utils/effect.d.ts +1 -0
  86. package/dist/utils/fonts.d.ts +21 -0
  87. package/dist/utils/index.d.ts +6 -0
  88. package/dist/utils/log.d.ts +27 -0
  89. package/dist/utils/media-cache.d.ts +45 -0
  90. package/dist/utils/stream-utils.d.ts +4 -0
  91. package/dist/utils/video.d.ts +16 -0
  92. package/dist/utils/worker-timer.d.ts +1 -0
  93. package/package.json +63 -3
@@ -0,0 +1,3335 @@
1
+ (function(M,tt){typeof exports=="object"&&typeof module<"u"?tt(exports,require("wrapbox"),require("opfs-tools"),require("wave-resampler"),require("gsap"),require("gsap/PixiPlugin"),require("pixi.js"),require("@agrhub/core"),require("pixi-filters"),require("nanoid"),require("gl-transitions"),require("microdiff")):typeof define=="function"&&define.amd?define(["exports","wrapbox","opfs-tools","wave-resampler","gsap","gsap/PixiPlugin","pixi.js","@agrhub/core","pixi-filters","nanoid","gl-transitions","microdiff"],tt):(M=typeof globalThis<"u"?globalThis:M||self,tt(M.AgrhubEnginePixi={},M.wrapbox,M.opfsTools,M.waveResampler,M.gsap,M.gsapPixiPlugin,M.pixi.js,M.agrhubCore,M.pixiFilters,M.nanoid,M.glTransitions,M.microdiff))})(this,(function(M,tt,et,ui,ct,ye,m,xe,j,Xt,xt,pi){"use strict";function we(l){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const e in l)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(l,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>l[e]})}}return t.default=l,Object.freeze(t)}const mi=we(ui),gi=we(m),vi={0:"debug",1:"info",2:"warn",3:"error"};function yi(l){if(l instanceof Error)return String(l);if(typeof l=="object"&&l!==null)try{return JSON.stringify(l,(t,e)=>e instanceof Error?String(e):e)}catch{return String(l)}return String(l)}function xi(){const l=new Date,t=i=>i.toString().padStart(2,"0"),e=l.getMilliseconds().toString().padStart(3,"0");return`${t(l.getHours())}:${t(l.getMinutes())}:${t(l.getSeconds())}.${e}`}class wi{threshold=1;history=[];debug=(...t)=>this.log(0,console.debug,t);info=(...t)=>this.log(1,console.info,t);warn=(...t)=>this.log(2,console.warn,t);error=(...t)=>this.log(3,console.error,t);log(t,e,i){t>=this.threshold&&(e(...i),this.history.push({level:vi[t],time:xi(),args:i}))}setThreshold(t){this.threshold=t}getThreshold(){return this.threshold}createTagged(t){return{debug:(...e)=>this.debug(t,...e),info:(...e)=>this.info(t,...e),warn:(...e)=>this.warn(t,...e),error:(...e)=>this.error(t,...e)}}dump(){return this.history.map(({level:t,time:e,args:i})=>`[${t.toUpperCase()}][${e}] ${i.map(yi).join(" ")}`).join(`
2
+ `)}}const ot=new wi,Q={debug:ot.debug,info:ot.info,warn:ot.warn,error:ot.error,setLogLevel:l=>{const t=l;t===Q.debug?ot.setThreshold(0):t===Q.info?ot.setThreshold(1):t===Q.warn?ot.setThreshold(2):t===Q.error&&ot.setThreshold(3)},create:l=>ot.createTagged(l),dump:async()=>ot.dump()};function bi(l){const t=new Float32Array(l.map(i=>i.length).reduce((i,s)=>i+s));let e=0;for(const i of l)t.set(i,e),e+=i.length;return t}function Ci(l){const t=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<l[e].length;i+=1)t[i]==null&&(t[i]=[]),t[i].push(l[e][i]);return t.map(bi)}function be(l){if(l.format==="f32-planar"){const t=[];for(let e=0;e<l.numberOfChannels;e+=1){const i=l.allocationSize({planeIndex:e}),s=new ArrayBuffer(i);l.copyTo(s,{planeIndex:e}),t.push(new Float32Array(s))}return t}else if(l.format==="f32"){const t=new ArrayBuffer(l.allocationSize({planeIndex:0}));return l.copyTo(t,{planeIndex:0}),Si(new Float32Array(t),l.numberOfChannels)}else if(l.format==="s16"){const t=new ArrayBuffer(l.allocationSize({planeIndex:0}));return l.copyTo(t,{planeIndex:0}),Ti(new Int16Array(t),l.numberOfChannels)}throw Error("Unsupported audio data format")}function Ti(l,t){const e=l.length/t,i=Array.from({length:t},()=>new Float32Array(e));for(let s=0;s<e;s++)for(let r=0;r<t;r++){const o=l[s*t+r];i[r][s]=o/32768}return i}function Si(l,t){const e=l.length/t,i=Array.from({length:t},()=>new Float32Array(e));for(let s=0;s<e;s++)for(let r=0;r<t;r++)i[r][s]=l[s*t+r];return i}function qt(l){return Array(l.numberOfChannels).fill(0).map((t,e)=>l.getChannelData(e))}function Ce(l){const t=Math.max(...l.map(i=>i[0]?.length??0)),e=new Float32Array(t*2);for(let i=0;i<t;i++){let s=0,r=0;for(let o=0;o<l.length;o++){const a=l[o][0]?.[i]??0,n=l[o][1]?.[i]??a;s+=a,r+=n}e[i]=s,e[i+t]=r}return e}async function Ai(l,t,e){const i=l.length,s=Array(e.chanCount).fill(0).map(()=>new Float32Array(0));if(i===0)return s;const r=Math.max(...l.map(c=>c.length));if(r===0)return s;if(globalThis.OfflineAudioContext==null)return l.map(c=>new Float32Array(mi.resample(c,t,e.rate,{method:"sinc",LPF:!1})));const o=new globalThis.OfflineAudioContext(e.chanCount,r*e.rate/t,e.rate),a=o.createBufferSource(),n=o.createBuffer(i,r,t);return l.forEach((c,h)=>n.copyToChannel(new Float32Array(c),h)),a.buffer=n,a.connect(o.destination),a.start(),qt(await o.startRendering())}function _t(l,t,e){const i=e-t,s=new Float32Array(i);let r=0;for(;r<i;)s[r]=l[(t+r)%l.length],r+=1;return s}function Te(l,t){const e=Math.floor(l.length/t),i=new Float32Array(e);for(let s=0;s<e;s++){const r=s*t,o=Math.floor(r),a=r-o;o+1<l.length?i[s]=l[o]*(1-a)+l[o+1]*a:i[s]=l[o]}return i}function wt(l,t){const e=Math.max(0,Math.min(1,l));return!t||t==="linear"?e:t==="ease-in"?e*e:t==="ease-out"?e*(2-e):t==="ease-in-out"?e<.5?2*e*e:-1+(4-2*e)*e:e}function ki(l,t,e,i,s,r){if(!l||l.length===0||l[0].length===0)return;const a=l[0].length/i*1e6,n=t-a,c=s!==void 0&&s.duration>0,h=r!==void 0&&r.duration>0;if(!c&&!h)return;const d=c?s.duration*1e3:0,u=h?r.duration*1e3:0;for(const f of l)for(let p=0;p<f.length;p++){const g=n+p/i*1e6;let v=1;if(c&&g<d){const x=g/d;v*=wt(x,s.curve)}if(h){const x=e-u;if(g>=x){const T=1-(g-x)/u;v*=wt(T,r.curve)}}f[p]*=Math.max(0,Math.min(1,v))}}const Fi=[{codec:"mp4a.40.2",codecType:"aac",sampleRate:48e3,channelCount:2},{codec:"opus",codecType:"opus",sampleRate:48e3,channelCount:2}];let bt=null;async function Ri(l){if(typeof AudioEncoder>"u")return!1;try{return(await AudioEncoder.isConfigSupported({codec:l.codec,sampleRate:l.sampleRate,numberOfChannels:l.channelCount})).supported??!1}catch{return!1}}async function Mi(){if(bt!==null)return bt;for(const t of Fi)if(await Ri(t))return bt={...t},bt;const l={codec:"opus",codecType:"opus",sampleRate:48e3,channelCount:2};return console.warn("[AudioCodec] No supported codec found, falling back to Opus"),bt=l,l}function Ht(){return bt}const Oi={aac:"mp4a.40.2",opus:"opus"};async function Ei(l,t,e){if(typeof AudioEncoder>"u")return null;const i=l==="opus"?"opus":"aac",s=[{codecType:i,sampleRate:t},...t!==44100?[{codecType:i,sampleRate:44100}]:[],...i!=="opus"?[{codecType:"opus",sampleRate:48e3}]:[]];for(const r of s)try{const{supported:o}=await AudioEncoder.isConfigSupported({codec:Oi[r.codecType],sampleRate:r.sampleRate,numberOfChannels:e});if(o)return(r.codecType!==i||r.sampleRate!==t)&&console.warn(`[AudioCodec] ${i} @ ${t}Hz is not encodable here; using ${r.codecType} @ ${r.sampleRate}Hz`),r}catch{}return console.warn("[AudioCodec] No encodable audio configuration found; audio will be skipped"),null}const Di=`#version 300 es
3
+ layout (location = 0) in vec4 a_position;
4
+ layout (location = 1) in vec2 a_texCoord;
5
+ out vec2 v_texCoord;
6
+ void main () {
7
+ gl_Position = a_position;
8
+ v_texCoord = a_texCoord;
9
+ }
10
+ `,Pi=`#version 300 es
11
+ precision mediump float;
12
+ out vec4 FragColor;
13
+ in vec2 v_texCoord;
14
+
15
+ uniform sampler2D frameTexture;
16
+ uniform vec3 keyColor;
17
+
18
+ // Chroma similarity calculation
19
+ uniform float similarity;
20
+ // Smoothness calculation for transparency
21
+ uniform float smoothness;
22
+ // Reduce green screen saturation to improve keying accuracy
23
+ uniform float spill;
24
+
25
+ vec2 RGBtoUV(vec3 rgb) {
26
+ return vec2(
27
+ rgb.r * -0.169 + rgb.g * -0.331 + rgb.b * 0.5 + 0.5,
28
+ rgb.r * 0.5 + rgb.g * -0.419 + rgb.b * -0.081 + 0.5
29
+ );
30
+ }
31
+
32
+ void main() {
33
+ // Get current pixel RGBA value
34
+ vec4 rgba = texture(frameTexture, v_texCoord);
35
+ // Calculate chroma difference between current pixel and key color
36
+ vec2 chromaVec = RGBtoUV(rgba.rgb) - RGBtoUV(keyColor);
37
+ // Calculate chroma distance (vector length) between current pixel and key color, smaller distance means more similar
38
+ float chromaDist = sqrt(dot(chromaVec, chromaVec));
39
+ // Set similarity threshold, negative baseMask indicates green screen, positive indicates not green screen
40
+ float baseMask = chromaDist - similarity;
41
+ // If baseMask is negative, fullMask equals 0; if baseMask is positive, larger value means lower transparency
42
+ float fullMask = pow(clamp(baseMask / smoothness, 0., 1.), 1.5);
43
+ rgba.a = fullMask; // Set transparency
44
+ // If baseMask is negative, spillVal equals 0; if baseMask is positive, smaller value means lower saturation
45
+ float spillVal = pow(clamp(baseMask / spill, 0., 1.), 1.5);
46
+ float desat = clamp(rgba.r * 0.2126 + rgba.g * 0.7152 + rgba.b * 0.0722, 0., 1.); // Calculate current pixel grayscale
47
+ rgba.rgb = mix(vec3(desat, desat, desat), rgba.rgb, spillVal);
48
+ FragColor = rgba;
49
+ }
50
+ `,Ii=[-1,1,-1,-1,1,-1,1,-1,1,1,-1,1],Bi=[0,1,0,0,1,0,1,0,1,1,0,1];function Ni(l,t,e){const i=Se(l,l.VERTEX_SHADER,t),s=Se(l,l.FRAGMENT_SHADER,e),r=l.createProgram();if(l.attachShader(r,i),l.attachShader(r,s),l.linkProgram(r),!l.getProgramParameter(r,l.LINK_STATUS))throw Error(l.getProgramInfoLog(r)??"Unable to initialize the shader program");return r}function Se(l,t,e){const i=l.createShader(t);if(l.shaderSource(i,e),l.compileShader(i),!l.getShaderParameter(i,l.COMPILE_STATUS)){const s=l.getShaderInfoLog(i);throw l.deleteShader(i),Error(s??"An error occurred compiling the shaders")}return i}function zi(l,t,e){l.bindTexture(l.TEXTURE_2D,e),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,l.RGBA,l.UNSIGNED_BYTE,t),l.drawArrays(l.TRIANGLES,0,6)}function Li(l){const t=l.createTexture();if(t==null)throw Error("Create WebGL texture error");l.bindTexture(l.TEXTURE_2D,t);const e=0,i=l.RGBA,s=1,r=1,o=0,a=l.RGBA,n=l.UNSIGNED_BYTE,c=new Uint8Array([0,0,255,255]);return l.texImage2D(l.TEXTURE_2D,e,i,s,r,o,a,n,c),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),t}function Hi(l){const t="document"in globalThis?globalThis.document.createElement("canvas"):new OffscreenCanvas(l.width,l.height);t.width=l.width,t.height=l.height;const e=t.getContext("webgl2",{premultipliedAlpha:!1,alpha:!0});if(e==null)throw Error("Cant create gl context");const i=Ni(e,Di,Pi);e.useProgram(i),e.uniform3fv(e.getUniformLocation(i,"keyColor"),l.keyColor.map(n=>n/255)),e.uniform1f(e.getUniformLocation(i,"similarity"),l.similarity),e.uniform1f(e.getUniformLocation(i,"smoothness"),l.smoothness),e.uniform1f(e.getUniformLocation(i,"spill"),l.spill);const s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array(Ii),e.STATIC_DRAW);const r=e.getAttribLocation(i,"a_position");e.vertexAttribPointer(r,2,e.FLOAT,!1,Float32Array.BYTES_PER_ELEMENT*2,0),e.enableVertexAttribArray(r);const o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o),e.bufferData(e.ARRAY_BUFFER,new Float32Array(Bi),e.STATIC_DRAW);const a=e.getAttribLocation(i,"a_texCoord");return e.vertexAttribPointer(a,2,e.FLOAT,!1,Float32Array.BYTES_PER_ELEMENT*2,0),e.enableVertexAttribArray(a),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1),{canvas:t,gl:e}}function Gi(l){return l instanceof VideoFrame?{width:l.codedWidth,height:l.codedHeight}:{width:l.width,height:l.height}}function Ui(l){const e=new OffscreenCanvas(1,1).getContext("2d");e.drawImage(l,0,0);const{data:[i,s,r]}=e.getImageData(0,0,1,1);return[i,s,r]}const Wi=l=>{let t=null,e=null,i=l.keyColor,s=null;return async r=>{if((t==null||e==null||s==null)&&(i==null&&(i=Ui(r)),{canvas:t,gl:e}=Hi({...Gi(r),keyColor:i,...l}),s=Li(e)),zi(e,r,s),globalThis.VideoFrame!=null&&r instanceof globalThis.VideoFrame){const o=new VideoFrame(t,{alpha:"keep",timestamp:r.timestamp,duration:r.duration??void 0});return r.close(),o}return createImageBitmap(t,{imageOrientation:r instanceof ImageBitmap?"flipY":"none"})}},Vi=()=>{let l,t=16.6;self.onmessage=e=>{e.data.event==="start"&&(self.clearInterval(l),l=self.setInterval(()=>{self.postMessage({})},t)),e.data.event==="stop"&&self.clearInterval(l)}},Yi=()=>{const l=new Blob([`(${Vi.toString()})()`]),t=URL.createObjectURL(l);return new Worker(t)},Ct=new Map;let $t=1,Gt=null;globalThis.Worker!=null&&(Gt=Yi(),Gt.onmessage=()=>{$t+=1;for(const[l,t]of Ct)if($t%l===0)for(const e of t)e()});const Qi=(l,t)=>{const e=Math.max(1,Math.round(t/16.6)),i=Ct.get(e)??new Set;return i.add(l),Ct.set(e,i),Ct.size===1&&i.size===1&&Gt?.postMessage({event:"start"}),()=>{i.delete(l),i.size===0&&Ct.delete(e),Ct.size===0&&($t=0,Gt?.postMessage({event:"stop"}))}};function Ae(l){return new Promise(t=>{const e=Qi(()=>{e(),t()},l)})}function ji(l){return document.createElement(l)}function Ji(l){var t="",e=new Uint8Array(l),i=e.byteLength;for(let s=0;s<i;s++)t+=String.fromCharCode(e[s]);return window.btoa(t)}async function Zi(l,t,e={}){const i=ji("pre");i.style.cssText=`margin: 0; ${t}; position: fixed;`,i.textContent=l,document.body.appendChild(i),e.onCreated?.(i);const{width:s,height:r}=i.getBoundingClientRect();i.remove();const o=new Image;o.width=s,o.height=r;const a=e.font==null?"":`
51
+ @font-face {
52
+ font-family: '${e.font.name}';
53
+ src: url('data:font/woff2;base64,${Ji(await(await fetch(e.font.url)).arrayBuffer())}') format('woff2');
54
+ }
55
+ `,n=`
56
+ <svg xmlns="http://www.w3.org/2000/svg" width="${s}" height="${r}">
57
+ <style>
58
+ ${a}
59
+ </style>
60
+ <foreignObject width="100%" height="100%">
61
+ <div xmlns="http://www.w3.org/1999/xhtml">${i.outerHTML}</div>
62
+ </foreignObject>
63
+ </svg>
64
+ `.replace(/\t/g,"").replace(/#/g,"%23");return o.src=`data:image/svg+xml;charset=utf-8,${n}`,await new Promise(c=>{o.onload=c}),o}async function Ki(l,t,e={}){const i=await Zi(l,t,e),s=new OffscreenCanvas(i.width,i.height);return s.getContext("2d")?.drawImage(i,0,0,i.width,i.height),await createImageBitmap(s)}async function Xi(l,t){const e={type:t,data:l},i=new ImageDecoder(e);await Promise.all([i.completed,i.tracks.ready]);const s=i.tracks.selectedTrack?.frameCount??1,r=[];for(let o=0;o<s;o+=1)r.push((await i.decode({frameIndex:o})).image);return r}class te{all=new Map;on(t,e){const i=this.all.get(t);return i?i.push(e):this.all.set(t,[e]),()=>this.off(t,e)}once(t,e){const i=this.on(t,s=>{i(),e(s)});return i}off(t,e){const i=this.all.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):this.all.set(t,[]))}emit(t,e){let i=this.all.get(t);i&&i.slice().forEach(s=>{s(e)}),i=this.all.get("*"),i&&i.slice().forEach(s=>{s(t,e)})}}const qi={x:{label:"X Position",min:-2e3,max:2e3,step:1,default:0},y:{label:"Y Position",min:-2e3,max:2e3,step:1,default:0},width:{label:"Width",min:-1e3,max:1e3,step:1,default:0},height:{label:"Height",min:-1e3,max:1e3,step:1,default:0},scale:{label:"Scale",min:0,max:3,step:.1,default:1},scaleX:{label:"Scale X",min:0,max:3,step:.1,default:1},scaleY:{label:"Scale Y",min:0,max:3,step:.1,default:1},opacity:{label:"Opacity",min:0,max:1,step:.01,default:1},angle:{label:"Rotation",min:-360,max:360,step:1,default:0},blur:{label:"Blur",min:0,max:100,step:1,default:0},brightness:{label:"Brightness",min:0,max:5,step:.1,default:1},mirror:{label:"Mirror",min:0,max:1,step:1,default:0},motionBlur:{label:"Motion Blur",min:0,max:500,step:1,default:0}},Ut={linear:l=>l,easeInQuad:l=>l*l,easeOutQuad:l=>l*(2-l),easeInOutQuad:l=>l<.5?2*l*l:-1+(4-2*l)*l,easeInCubic:l=>l*l*l,easeOutCubic:l=>--l*l*l+1,easeInOutCubic:l=>l<.5?4*l*l*l:(l-1)*(2*l-2)*(2*l-2)+1,easeInSine:l=>1-Math.cos(l*Math.PI/2),easeOutSine:l=>Math.sin(l*Math.PI/2),easeInOutSine:l=>.5*(1-Math.cos(Math.PI*l)),easeInExpo:l=>l===0?0:Math.pow(2,10*(l-1)),easeOutExpo:l=>l===1?1:1-Math.pow(2,-10*l),easeInOutExpo:l=>l===0?0:l===1?1:(l/=.5)<1?.5*Math.pow(2,10*(l-1)):.5*(2-Math.pow(2,-10*--l)),easeInCirc:l=>1-Math.sqrt(1-l*l),easeOutCirc:l=>Math.sqrt(1-(l-1)*(l-1)),easeInOutCirc:l=>(l/=.5)<1?-.5*(Math.sqrt(1-l*l)-1):.5*(Math.sqrt(1-(l-2)*l)+1),slow:ke(.5,.5,!1)};function ke(l=.7,t=.7,e=!1){const i=Math.min(1,l),s=i<1?t:0,r=(1-i)/2,o=r+i;return a=>{const n=a+(.5-a)*s;if(a<r){const c=1-a/r;return e?1-c*c:n-c*c*c*n}if(a>o){const c=(a-o)/r;return e?a===1?0:1-c*c:n+(a-n)*c*c*c}return e?1:n}}function Tt(l){return typeof l=="function"?l:typeof l=="string"&&Ut[l]?Ut[l]:Ut.linear}class Fe{id;type;options;params;frames;constructor(t,e,i="keyframes"){this.id=e.id||`keyframe_${Math.random().toString(36).substr(2,9)}`,this.type=i,this.params=t,this.options={duration:e.duration,delay:e.delay??0,easing:e.easing??"linear",iterCount:e.iterCount??1,id:this.id,disableGlobalEasing:e.disableGlobalEasing??!1},Array.isArray(t)?this.frames=t.map(s=>({progress:s.progress,props:s.props||s,easing:s.easing})):this.frames=Object.entries(t).filter(([s])=>{if(s==="from"||s==="to")return!0;const r=Number(s.replace("%",""));return!isNaN(r)&&r>=0&&r<=100}).map(([s,r])=>{const o={from:0,to:100}[s]??Number(s.replace("%","")),{easing:a,...n}=r;return{progress:o/100,props:n,easing:a}}).sort((s,r)=>s.progress-r.progress),this.frames.length>0&&this.frames[0].progress!==0&&this.frames.unshift({progress:0,props:{}}),this.frames.length>0&&this.frames[this.frames.length-1].progress!==1&&this.frames.push({progress:1,props:{}})}getTransform(t){const{duration:e,delay:i,iterCount:s,easing:r,disableGlobalEasing:o}=this.options,a=t-i;if(a<0)return{};if(s!==1/0&&a>=e)return this.interpolateProps(1);const n=s===1/0?e:e/s;let c=a%n/n;return!o&&r!=="linear"&&(c=Tt(r)(c)),this.interpolateProps(c)}interpolateProps(t){const e=this.frames.findIndex(d=>d.progress>=t);if(e===-1)return this.frames[this.frames.length-1].props;if(e===0)return this.frames[0].props;const i=this.frames[e-1],s=this.frames[e],r=(t-i.progress)/(s.progress-i.progress),o=s.easing??(this.options.disableGlobalEasing?this.options.easing:"linear"),n=Tt(o)(r),c={},h=new Set([...Object.keys(i.props),...Object.keys(s.props)]);for(const d of h){const u=d,f=u==="scale"||u==="scaleX"||u==="scaleY"||u==="opacity"?1:0,p=i.props[u]??f,g=s.props[u]??f;c[u]=p+(g-p)*n}return c}}const ee=["scale","scaleX","scaleY","rotation","skewX","skewY","skew","pivotX","pivotY","pivot","anchorX","anchorY","anchor","blur","brightness","contrast","grayscale","hueRotate","invert","saturate","threshold","matrix"],Re=l=>l&&Object.keys(l).some(t=>ee.includes(t)),ft=l=>{if(!l)return l;const t={...l};if(t.keyframes){if(Array.isArray(t.keyframes))t.keyframes=t.keyframes.map(i=>ft(i));else if(typeof t.keyframes=="object"){const i={};for(const[s,r]of Object.entries(t.keyframes))r&&typeof r=="object"?i[s]=ft(r):i[s]=r;t.keyframes=i}}if(!Re(t))return t;const e={};return ee.forEach(i=>{i in t&&(e[i]=t[i],delete t[i])}),t.pixi=e,t};function ht(l,t){if(typeof l=="number")return l;if(typeof l=="string"){if(l.startsWith("+="))return t+parseFloat(l.substring(2));if(l.startsWith("-="))return t-parseFloat(l.substring(2))}const e=parseFloat(l);return isNaN(e)?t:e}function _i(l){const t=new Set;return l&&l.keyframes&&(Array.isArray(l.keyframes)?l.keyframes.forEach(e=>{e&&typeof e=="object"&&Object.keys(e).forEach(i=>t.add(i))}):typeof l.keyframes=="object"&&Object.values(l.keyframes).forEach(e=>{e&&typeof e=="object"&&Object.keys(e).forEach(i=>t.add(i))})),t}function St(l,t,e,i){const s={},r={},o=new Set([...Object.keys(l||{}),...Object.keys(t||{})]),a=_i(t);for(const n of o){if(["immediateRender","ease","duration","stagger","repeat","yoyo","keyframes"].includes(n)){l&&n in l&&(s[n]=l[n]),t&&n in t&&(r[n]=t[n]);continue}const c=e[n]??0;if(a.has(n)){const h=l?l[n]:void 0;s[n]=h!==void 0?ht(h,c):c;continue}if(i){const h=l?l[n]:void 0,d=t?t[n]:void 0,u=typeof h=="string"&&(h.startsWith("+=")||h.startsWith("-=")),f=typeof d=="string"&&(d.startsWith("+=")||d.startsWith("-="));if(u){s[n]=c;const p=ht(h,0);r[n]=c+p}else if(f){s[n]=h!==void 0?ht(h,c):c;const p=ht(d,0);r[n]=s[n]+p}else s[n]=h!==void 0?ht(h,c):c,r[n]=d!==void 0?ht(d,c):c}else{const h=l?l[n]:void 0,d=t?t[n]:void 0;s[n]=h!==void 0?ht(h,c):c;const u=s[n];r[n]=d!==void 0?ht(d,u):c}}if(t&&t.keyframes){if(Array.isArray(t.keyframes)){if(r.keyframes=t.keyframes.map(n=>{const{resolvedTo:c}=St(null,n,{...e,...s},i);return c}),r.keyframes.length>0){const n=r.keyframes[r.keyframes.length-1];n&&typeof n=="object"&&Object.keys(n).forEach(c=>{r[c]===void 0&&(r[c]=n[c])})}}else if(typeof t.keyframes=="object"){const n={};for(const[h,d]of Object.entries(t.keyframes))if(d&&typeof d=="object"){const{resolvedTo:u}=St(null,d,{...e,...s},i);n[h]=u}else n[h]=d;r.keyframes=n;const c=n["100%"];c&&typeof c=="object"&&Object.keys(c).forEach(h=>{r[h]===void 0&&(r[h]=c[h])})}}return{resolvedFrom:s,resolvedTo:r}}function Me(l,t){const e=new Set,i=["immediateRender","ease","duration","stagger","repeat","yoyo","keyframes"];if(l)for(const s of Object.keys(l))i.includes(s)||e.add(s);if(t){for(const s of Object.keys(t))i.includes(s)||e.add(s);if(t.keyframes){if(Array.isArray(t.keyframes))for(const s of t.keyframes)for(const r of Object.keys(s))i.includes(r)||e.add(r);else if(typeof t.keyframes=="object"){for(const s of Object.values(t.keyframes))if(s&&typeof s=="object")for(const r of Object.keys(s))i.includes(r)||e.add(r)}}}return Array.from(e)}function Oe(l,t){if(t==="scale"||t==="scaleX")return l.scale?.x??1;if(t==="scaleY")return l.scale?.y??1;if(t==="anchor"||t==="anchorX")return l.anchor?.x??0;if(t==="anchorY")return l.anchor?.y??0;if(t==="pivot"||t==="pivotX")return l.pivot?.x??0;if(t==="pivotY")return l.pivot?.y??0;if(t==="skew"||t==="skewX")return(l.skew?.x??0)*180/Math.PI;if(t==="skewY")return(l.skew?.y??0)*180/Math.PI;if(t==="rotation")return l.angle??0;const e=ct.getProperty(l,t);if(typeof e=="number")return e;if(e&&typeof e=="object"&&"x"in e&&typeof e.x=="number")return e.x;const i=parseFloat(e);return isNaN(i)?0:i}ct.registerPlugin(ye.PixiPlugin),ye.PixiPlugin.registerPIXI(gi);class Ee{id;type;options;params;timeline=null;lastTarget=null;originalProperties=new Map;constructor(t,e,i="gsap"){this.id=e.id||`gsap_${Math.random().toString(36).substr(2,9)}`,this.type=i,this.params=t,this.options={duration:e.duration,delay:e.delay??0,easing:e.easing??"none",iterCount:e.iterCount??1,id:this.id,disableGlobalEasing:e.disableGlobalEasing??!1}}getTransform(t){return{}}get isOutAnimation(){return this.options.mode==="out"||this.params.metaMode==="out"||this.params.mode==="out"||this.id.toLowerCase().includes("out")}restoreOriginals(){this.originalProperties.forEach((t,e)=>{if(e&&!e.destroyed)try{const i=ft(t);ct.set(e,i),delete e.__ovAnchorAdjusted}catch{}})}getTargetCount(t){return this.getCurrentTargets(t).length}apply(t,e){const{duration:i,delay:s}=this.options,r=e-s;let o=this.lastTarget!==t||!this.timeline||this.originalProperties.size===0;const a=this.getCurrentTargets(t);if(!o)if(this.originalProperties.size!==a.length)o=!0;else for(const x of a){if(!this.originalProperties.has(x)||x.destroyed||!x.parent){o=!0;break}const w=!!x.anchor,T=!x.anchor&&x.pivot&&x.getLocalBounds;if(w&&!x.__ovAnchorAdjusted&&x.width>0&&x.height>0){o=!0;break}if(T&&!x.__ovAnchorAdjusted){const y=x.getLocalBounds();if(y.width>0&&y.height>0){o=!0;break}}}if(o&&(this.initTimeline(t),this.lastTarget=t),!this.timeline)return;const n=this.options.iterCount===1/0?i:i/this.options.iterCount;let c;if(this.options.iterCount!==1/0&&r>=i)c=1;else if(r<0){if(this.isOutAnimation)return;c=0}else c=r%n/n;this.timeline.progress(c);const h=c*this.timeline.duration(),d=this.getCurrentTargets(t),u=i/1e6,{from:f,to:p,stagger:g}=this.params,v=typeof g=="number"?g:0;d.forEach((x,w)=>{const T=w*v,y=T+u,S=this.isOutAnimation;if(h<T){const F=this.originalProperties.get(x)||{},{resolvedFrom:O}=St(f,p,F,S),k=ft(O);ct.set(x,k)}else if(h>y){const F=this.originalProperties.get(x)||{},{resolvedTo:O}=St(f,p,F,S),k=ft(O);ct.set(x,k)}})}getCurrentTargets(t){if(!t)return[];const{type:e}=this.params;let i=t;if(t.children){const s=t.children.find(r=>r.label==="TextOnlyContainer");s&&(i=s)}if(e==="character"||e==="word"){if(!i||!i.children||i.children.length===0)return[];if(e==="character"){const s=(r,o=!1)=>{if(r&&r.label==="LineMask")return[];if(!r.children||r.children.length===0)return o?[]:[r];let a=[];for(const n of r.children)a=a.concat(s(n));return a};return s(i,!0)}else{if(i.children.some(r=>r&&r.label==="LineContainer")){const r=[];for(const o of i.children)o&&o.label==="LineContainer"&&o.children&&r.push(...o.children);return r}return i.children}}return[t]}initTimeline(t){const{from:e,to:i,stagger:s,type:r}=this.params,o=this.options.duration/1e6,a=this.getCurrentTargets(t);if((r==="character"||r==="word")&&a.length===0){this.timeline&&(this.timeline.kill(),this.timeline=null);return}this.timeline&&this.timeline.kill(),this.restoreOriginals(),this.originalProperties.clear(),this.timeline=ct.timeline({paused:!0}),a.forEach(d=>{if(d.anchor){if(!d.__ovAnchorAdjusted&&d.width>0&&d.height>0){if(d.anchor.x!==.5||d.anchor.y!==.5){const u=d.anchor.x,f=d.anchor.y;d.anchor.set(.5,.5);const p=d.width/(d.scale?.x||1),g=d.height/(d.scale?.y||1);d.x+=(.5-u)*p*(d.scale?.x||1),d.y+=(.5-f)*g*(d.scale?.y||1)}d.__ovAnchorAdjusted=!0}}else if(d.pivot&&d.getLocalBounds&&!d.__ovAnchorAdjusted){const u=d.getLocalBounds(),f=u.x+u.width/2,p=u.y+u.height/2;if(u.width>0&&u.height>0){if(d.pivot.x!==f||d.pivot.y!==p){const g=d.pivot.x,v=d.pivot.y;d.pivot.set(f,p),d.x+=(f-g)*(d.scale?.x||1),d.y+=(p-v)*(d.scale?.y||1)}d.__ovAnchorAdjusted=!0}}});const n=Me(e,i);a.forEach(d=>{const u={};d.__ovOriginalProperties=d.__ovOriginalProperties||{},n.forEach(f=>{d.__ovOriginalProperties[f]===void 0&&(d.__ovOriginalProperties[f]=Oe(d,f)),u[f]=d.__ovOriginalProperties[f]}),this.originalProperties.set(d,u)});const c=typeof s=="number"?s:0,h=this.isOutAnimation;a.forEach((d,u)=>{const f=this.originalProperties.get(d)||{},{resolvedFrom:p,resolvedTo:g}=St(e,i,f,h),v=ft(p),x=ft(g);this.timeline.add(ct.fromTo(d,v,{duration:o,ease:this.options.easing,immediateRender:!h,...x}),u*c)})}destroy(){this.timeline&&(this.timeline.kill(),this.timeline=null),this.restoreOriginals(),this.originalProperties.clear()}}class De{id;type="wipe";options;params;constructor(t,e){this.id=e.id||`wipe_${Math.random().toString(36).substr(2,9)}`,this.params=t,this.options={duration:e.duration,delay:e.delay??0,easing:e.easing??"linear",iterCount:e.iterCount??1,id:this.id,disableGlobalEasing:e.disableGlobalEasing??!1}}getTransform(t){const{duration:e,delay:i,easing:s,iterCount:r}=this.options,{direction:o,mode:a,angle:n,feather:c}=this.params,h=t-i,d=a!=="conceal",u=r!==1/0&&h>=e;if(d&&u)return{};if(!d&&h<0)return{};let f;if(h<0)f=0;else if(r!==1/0&&h>=e)f=1;else{const x=r===1/0?e:e/r;f=h%x/x}const g=Tt(s)(f);return{mask:{shape:"rect",progress:a==="reveal"?g:1-g,direction:o,angle:n??0,feather:c??0,...this.params.initialProgress!=null&&{initialProgress:this.params.initialProgress}}}}}function $(l){if(l!=null){if(typeof l=="number")return l;if(typeof l=="string"){if(l==="transparent")return;if(l.startsWith("#")){const e=parseInt(l.slice(1),16);if(!isNaN(e))return e}if(l.startsWith("0x")){const e=parseInt(l,16);if(!isNaN(e))return e}const t=parseInt(l,16);if(!isNaN(t))return t;try{return new m.Color(l).toNumber()}catch{return}}}}const Ot=l=>l==="transparent"||l===""||l===void 0||l===null,At=(l,t=16777215)=>Ot(l)?{color:t,alpha:0}:{color:$(l)??t,alpha:1};function Et(l){try{const e=new m.Color(l).toRgbArray();return{r:Math.round(e[0]*255),g:Math.round(e[1]*255),b:Math.round(e[2]*255)}}catch{return null}}function $i(l,t){const e=new m.Container;e.label="InvertTextContainer";for(const i of l.children){if(!(i instanceof m.Container)||i.label!=="LineContainer")continue;const s=new m.Container;s.label="LineContainer";for(const r of i.children){if(!(r instanceof m.SplitBitmapText))continue;const o=r.style,a=new m.TextStyle({fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight,fontStyle:o.fontStyle,align:o.align,wordWrap:o.wordWrap,wordWrapWidth:o.wordWrapWidth,lineHeight:o.lineHeight,letterSpacing:o.letterSpacing,fill:t}),n=new m.SplitBitmapText({text:r.text,style:a});n.x=r.x,n.y=r.y,r.filters&&(n.filters=[...r.filters]),s.addChild(n)}e.addChild(s)}return e}function Pe(l,t,e,i,s){const{x:r,y:o,w:a,h:n}=l;let c=r,h=o,d=0,u=n;if(i==="reveal"){const f=t<=.5,p=f?t*2:(t-.5)*2;e==="left"?(c=f?r:r+p*a,d=f?p*a:a-p*a,h=o,u=n):e==="right"?(c=f?r+a-p*a:r,d=f?p*a:a-p*a,h=o,u=n):e==="top"?(h=f?o:o+p*n,u=f?p*n:n-p*n,c=r,d=a):(h=f?o+n-p*n:o,u=f?p*n:n-p*n,c=r,d=a)}else if(e==="left"){const f=s*a,p=r-f+t*(a+f);c=Math.max(r,p),d=Math.min(r+a,p+f)-c,h=o,u=n}else if(e==="right"){const f=s*a,p=r+a-t*(a+f);c=Math.max(r,p),d=Math.min(r+a,p+f)-c,h=o,u=n}else if(e==="top"){const f=s*n,p=o-f+t*(n+f);h=Math.max(o,p),u=Math.min(o+n,p+f)-h,c=r,d=a}else{const f=s*n,p=o+n-t*(n+f);h=Math.max(o,p),u=Math.min(o+n,p+f)-h,c=r,d=a}return{x:c,y:h,w:d,h:u}}class Ie{id;type="blockReveal";options;params;constructor(t,e){this.id=e.id||`block_reveal_${Math.random().toString(36).substring(2,9)}`,this.params=t,this.options={duration:e.duration,delay:e.delay??0,easing:e.easing??"easeInOutCubic",iterCount:e.iterCount??1,id:this.id,disableGlobalEasing:e.disableGlobalEasing??!1}}getTransform(t){return{}}apply(t,e){if(!(t instanceof m.Container)||t.destroyed)return;const i=t,{duration:s,delay:r,easing:o}=this.options,a=e-r;if(a<0){this.cleanup(i);return}const n=Tt(o)(Math.min(a/s,1));if(n>=1){this.cleanup(i);return}const c=t.children.find(A=>A.label==="TextOnlyContainer");if(!c||c.destroyed)return;const h=$(this.params.blockColor)??16777215,d=$(this.params.textColorInside)??0,u=this.params.direction??"right",f=this.params.mode??"reveal",p=this.params.blockSize??.3;let g=i.__blockGraphics,v=i.__invertTextContainer,x=i.__maskGraphics;!g||g.destroyed?(g=new m.Graphics,g.label="BlockReveal_Block",t.addChild(g),i.__blockGraphics=g):t.children.indexOf(g)===-1&&t.addChild(g),!v||v.destroyed?(v=$i(c,d),t.addChild(v),i.__invertTextContainer=v):t.children.indexOf(v)===-1&&t.addChild(v),!x||x.destroyed?(x=new m.Graphics,x.label="BlockReveal_Mask",t.addChild(x),i.__maskGraphics=x,v.mask=x):t.children.indexOf(x)===-1&&t.addChild(x);const w=t.children.indexOf(c),T=t.children.indexOf(g),y=t.children.indexOf(v);if(w!==-1&&T!==-1&&y!==-1){T<w&&t.setChildIndex(g,w+1);const A=t.children.indexOf(g);y<A&&t.setChildIndex(v,A+1)}const S=i.__clip,F=t.getLocalBounds(),O=S?._lineRects;g.clear(),x.clear();let k=!1;const b=A=>{A.w>0&&A.h>0&&(g.rect(A.x,A.y,A.w,A.h).fill({color:h}),x.rect(A.x,A.y,A.w,A.h).fill({color:16777215}),k=!0)};if(O&&O.length>0){const A=S?S.width:F.width,C=S?0:F.x;for(const R of O)b(Pe({x:C,y:R.y,w:A,h:R.h},n,u,f,p))}else b(Pe({x:F.x,y:F.y,w:F.width,h:F.height},n,u,f,p));g.visible=k,v.visible=k}cleanup(t){t.__blockGraphics&&(t.__blockGraphics.destroyed||t.__blockGraphics.destroy(),t.__blockGraphics=null),t.__invertTextContainer&&(t.__invertTextContainer.destroyed||t.__invertTextContainer.destroy({children:!0}),t.__invertTextContainer=null),t.__maskGraphics&&(t.__maskGraphics.destroyed||t.__maskGraphics.destroy(),t.__maskGraphics=null)}}class Dt{id;options;params;constructor(t,e){this.id=e.id||`mask_${Math.random().toString(36).substr(2,9)}`,this.params=t,this.options={duration:e.duration,delay:e.delay??0,easing:e.easing??"linear",iterCount:e.iterCount??1,id:this.id,disableGlobalEasing:e.disableGlobalEasing??!1}}getTransform(t){const{duration:e,delay:i,easing:s,iterCount:r}=this.options,o=t-i,a=this.params.mode!=="conceal",n=r!==1/0&&o>=e;if(a&&n)return{};if(!a&&o<0)return{};let c;if(o<0)c=0;else if(r!==1/0&&o>=e)c=1;else{const p=r===1/0?e:e/r;c=o%p/p}const d=Tt(s)(c),u=this.params.mode==="conceal"?1-d:d,f=this.buildMask(u);return this.params.initialProgress!=null&&(f.initialProgress=this.params.initialProgress),{mask:f}}}class Be extends Dt{type="circleReveal";constructor(t,e){super(t,e)}buildMask(t){return{shape:"circle",progress:t,origin:this.params.origin??"center",feather:this.params.feather??0}}}class Ne extends Dt{type="rectExpand";constructor(t,e){super(t,e)}buildMask(t){const e=this.params.origin??"center";return{shape:"custom",progress:t,painter:(s,r,o,a)=>{let n=0,c=0;switch(e){case"topLeft":n=-r/2,c=-o/2;break;case"topRight":n=r/2,c=-o/2;break;case"bottomLeft":n=-r/2,c=o/2;break;case"bottomRight":n=r/2,c=o/2;break;default:n=0,c=0}const h=r/2*a,d=o/2*a,u=Math.max(-r/2,n-h),f=Math.max(-o/2,c-d),p=Math.min(r,h*2),g=Math.min(o,d*2);p>0&&g>0&&s.rect(u,f,p,g).fill({color:16777215})}}}}class ze extends Dt{type="centerExpand";constructor(t,e){super(t,e)}buildMask(t){const e=this.params.axis??"vertical";return{shape:"custom",progress:t,painter:(s,r,o,a)=>{let n,c;switch(e){case"horizontal":n=r*a,c=o;break;case"both":n=r*a,c=o*a;break;default:n=r,c=o*a;break}s.rect(-n/2,-c/2,n,c).fill({color:16777215})}}}}class Le extends Dt{type="angleWipe";constructor(t,e){super(t,e)}buildMask(t){return{shape:"rect",progress:t,direction:"left",angle:this.params.angle??0,feather:this.params.feather??0}}}class He extends Dt{type="starReveal";constructor(t,e){super(t,e)}buildMask(t){const{points:e=5,innerRatio:i=.4}=this.params;return{shape:"custom",progress:t,painter:(r,o,a,n)=>{const h=Math.hypot(o,a)/2*n,d=h*i,u=0,f=0,p=e*2,g=[];for(let v=0;v<p;v++){const x=Math.PI/e*v-Math.PI/2,w=v%2===0?h:d;g.push(u+Math.cos(x)*w,f+Math.sin(x)*w)}r.poly(g,!0).fill({color:16777215})}}}}class ts{factories=new Map;constructor(){this.register("keyframes",(e,i)=>new Fe(i,e));const t=(e,i)=>new Ee(i,e,"stagger");this.register("stagger",t),this.register("wipe",(e,i)=>new De(i,e)),this.register("circleReveal",(e,i)=>new Be(i,e)),this.register("rectExpand",(e,i)=>new Ne(i,e)),this.register("angleWipe",(e,i)=>new Le(i,e)),this.register("starReveal",(e,i)=>new He(i,e)),this.register("centerExpand",(e,i)=>new ze(i,e)),this.register("blockReveal",(e,i)=>new Ie(i,e))}register(t,e){this.factories.set(t,e)}create(t,e,i){const s=this.factories.get(t);if(!s)throw new Error(`Animation "${t}" not found in registry`);return s(e,i)}has(t){return this.factories.has(t)}}const Wt=new ts;class es extends te{id="";name="";timing={display:{from:0,to:0},trim:{from:0,to:0},duration:0,playbackRate:1};get display(){return this.timing.display}set display(t){this.timing.display=t}get duration(){return this.timing.duration}set duration(t){this.timing.duration=t}get playbackRate(){return this.timing.playbackRate}set playbackRate(t){this.timing.playbackRate=t}get trim(){return this.timing.trim}set trim(t){this.timing.trim=t}constructor(){super()}_left=0;get left(){return this._left}set left(t){const e=this._left!==t;this._left=t,e&&this.emit("propsChange",{left:t})}_top=0;get top(){return this._top}set top(t){const e=this._top!==t;this._top=t,e&&this.emit("propsChange",{top:t})}_width=0;get width(){return this._width}set width(t){const e=this._width!==t;this._width=t,e&&this.emit("propsChange",{width:t})}_height=0;get height(){return this._height}set height(t){const e=this._height!==t;this._height=t,e&&this.emit("propsChange",{height:t})}_angle=0;get angle(){return this._angle}set angle(t){const e=this._angle!==t;this._angle=t,e&&this.emit("propsChange",{angle:t})}get center(){return{x:this.left+this.width/2,y:this.top+this.height/2}}_zIndex=0;get zIndex(){return this._zIndex}set zIndex(t){const e=this._zIndex!==t;this._zIndex=t,e&&this.emit("propsChange",{zIndex:t})}_opacity=1;get opacity(){return this._opacity}set opacity(t){const e=this._opacity!==t;this._opacity=t,e&&this.emit("propsChange",{opacity:t})}_volume=1;get volume(){return this._volume}set volume(t){const e=this._volume!==t;this._volume=t,e&&this.emit("propsChange",{volume:t})}_locked=!1;get locked(){return this._locked}set locked(t){const e=this._locked!==t;this._locked=t,e&&this.emit("propsChange",{locked:t})}flip=null;effects=[];chromaKey;colorAdjustment;_style={};get style(){return this._style}set style(t){this._style=t}animatKeyFrame=null;animatOptions=null;_animations=[];get animations(){return this._animations}set animations(t){if(!Array.isArray(t)){this._animations.forEach(e=>{e&&typeof e.destroy=="function"&&e.destroy()}),this._animations=[];return}this._animations.forEach(e=>{if(e&&e.id){const i=t.find(o=>o&&o.id===e.id),s=i&&typeof i.getTransform!="function";(!i||s)&&typeof e.destroy=="function"&&e.destroy()}}),this._animations=t.map(e=>{if(e&&typeof e.getTransform=="function")return e;if(e&&e.type&&e.options)try{return Wt.create(e.type,e.options,e.params)}catch(i){return console.error(`[BaseSprite] Failed to instantiate animation: ${e.type}`,i),e}return e})}renderTransform={x:0,y:0,width:0,height:0,scale:1,scaleX:1,scaleY:1,opacity:1,angle:0,blur:0,brightness:1,mirror:0,motionBlur:0};_render(t){const{center:e}=this;t.setTransform(this.flip?.x?-1:1,0,0,this.flip?.y?-1:1,e.x,e.y),t.globalAlpha=this.opacity*(this.renderTransform.opacity??1)*(this.renderTransform.brightness??1);const i=this.renderTransform.x??0,s=this.renderTransform.y??0,r=this.renderTransform.angle??0,o=this.renderTransform.scale??1,a=this.renderTransform.scaleX??1,n=this.renderTransform.scaleY??1;t.translate(i,s),t.scale(o*a,o*n),t.rotate((this.flip==null?1:-1)*(r*Math.PI)/180)}setAnimation(t,e){this.animatKeyFrame=Object.entries(t).map(([i,s])=>{const r={from:0,to:100}[i]??Number(i.slice(0,-1));if(isNaN(r)||r>100||r<0)throw Error("keyFrame must between 0~100");return[r/100,s]}),this.animatOptions=Object.assign({},this.animatOptions,{duration:e.duration,delay:e.delay??0,iterCount:e.iterCount??1/0}),this.emit("propsChange",{animations:this.animations})}animate(t,e){this.renderTransform={x:0,y:0,width:0,height:0,scale:1,scaleX:1,scaleY:1,opacity:1,angle:0,blur:0,brightness:1,mirror:0,motionBlur:0,__lastSpriteTime:t};const i=[...this.animations].sort((r,o)=>(r.options?.delay??0)-(o.options?.delay??0));if(e)for(const r of i)r.type==="stagger"&&r.restoreOriginals&&r.restoreOriginals(e);for(const r of i){const o=r.getTransform(t);o.x!==void 0&&(this.renderTransform.x+=o.x),o.y!==void 0&&(this.renderTransform.y+=o.y),o.width!==void 0&&(this.renderTransform.width+=o.width),o.height!==void 0&&(this.renderTransform.height+=o.height),o.angle!==void 0&&(this.renderTransform.angle+=o.angle),o.blur!==void 0&&(this.renderTransform.blur+=o.blur),o.motionBlur!==void 0&&(this.renderTransform.motionBlur+=o.motionBlur),o.scale!==void 0&&(this.renderTransform.scale*=o.scale),o.scaleX!==void 0&&(this.renderTransform.scaleX*=o.scaleX),o.scaleY!==void 0&&(this.renderTransform.scaleY*=o.scaleY),o.opacity!==void 0&&(this.renderTransform.opacity*=o.opacity),o.brightness!==void 0&&(this.renderTransform.brightness*=o.brightness),o.mirror!==void 0&&(this.renderTransform.mirror=Math.max(this.renderTransform.mirror||0,o.mirror)),o.mask!==void 0&&(this.renderTransform.mask=o.mask),e&&r.apply&&r.apply(e,t)}if(this.animatKeyFrame==null||this.animatOptions==null||t<this.animatOptions.delay)return;const s=is(t,this.animatKeyFrame,this.animatOptions);for(const r in s)switch(r){case"opacity":this.opacity=s[r];break;case"x":this.left=s[r];break;case"y":this.top=s[r];break;case"w":this.width=s[r];break;case"h":this.height=s[r];break;case"angle":this.angle=s[r];break}}addAnimation(t,e,i){const s=Wt.create(t,e,i);return this.animations.push(s),this.emit("propsChange",{animations:this.animations}),s.id}removeAnimation(t){const e=this.animations.find(i=>i.id===t);e&&typeof e.destroy=="function"&&e.destroy(),this.animations=this.animations.filter(i=>i.id!==t),this.emit("propsChange",{animations:this.animations})}clearAnimations(){this.animations.forEach(t=>{t&&typeof t.destroy=="function"&&t.destroy()}),this.animations=[],this.emit("propsChange",{animations:this.animations})}updateAnimation(t,e,i,s){const r=this.animations.findIndex(n=>n.id===t);if(r===-1)return;const o=this.animations[r];o&&typeof o.destroy=="function"&&o.destroy();const a=Wt.create(e,{...i,id:t},s);this.animations[r]=a,this.emit("propsChange",{animations:this.animations})}copyStateTo(t){t.animatKeyFrame=this.animatKeyFrame,t.animatOptions=this.animatOptions,t.zIndex=this.zIndex,t.opacity=this.opacity,t.volume=this.volume,t.flip=this.flip,t.left=this.left,t.top=this.top,t.width=this.width,t.height=this.height,t.angle=this.angle,t.display={...this.display},t.duration=this.duration,t.playbackRate=this.playbackRate,t.trim={...this.trim},this.timing.fadeIn!==void 0&&(t.timing.fadeIn={...this.timing.fadeIn}),this.timing.fadeOut!==void 0&&(t.timing.fadeOut={...this.timing.fadeOut}),t.style=JSON.parse(JSON.stringify(this.style||{})),t.animations=[...this.animations],this.chromaKey!==void 0&&(t.chromaKey={...this.chromaKey}),this.colorAdjustment!==void 0&&(t.colorAdjustment=JSON.parse(JSON.stringify(this.colorAdjustment))),t.locked=this.locked,"src"in this&&"src"in t&&(t.src=this.src),"metadata"in this&&"metadata"in t&&(t.metadata=JSON.parse(JSON.stringify(this.metadata||{})))}update(t){Object.assign(this,t),this.emit("propsChange",t)}destroy(){this.animations.forEach(t=>{t&&typeof t.destroy=="function"&&t.destroy()}),this.animations=[],this.all.clear()}}function is(l,t,e){const i=l-e.delay,s=i%e.duration,r=i/e.duration>=e.iterCount||i===e.duration?1:s/e.duration,o=t.findIndex(f=>f[0]>=r);if(o===-1)return{};const a=t[o-1],n=t[o],c=n[1];if(a==null)return c;const h=a[1],d={},u=(r-a[0])/(n[0]-a[0]);for(const f in c){if(!Object.hasOwn(c,f)||typeof f!="string")continue;const p=f;h[p]!=null&&(d[p]=(c[p]-h[p])*u+h[p])}return d}async function ss(l){try{const t=await createImageBitmap(l);return l.close(),t}catch{const t=l.displayWidth,e=l.displayHeight;if(t<=0||e<=0)throw l.close(),new Error("VideoFrame has invalid dimensions");const i=new OffscreenCanvas(t,e),s=i.getContext("2d");if(s==null)throw l.close(),new Error("Failed to get 2d context for VideoFrame conversion");return s.drawImage(l,0,0,t,e),l.close(),createImageBitmap(i)}}class X extends es{lastVf=null;destroyed=!1;src="";metadata={};transition;renderTexturePadding;constructor(){super()}async getFrame(t){const e=t*this.playbackRate,{video:i,audio:s,state:r}=await this.tick(e);let o=s??[];s!=null&&this.playbackRate!==1&&(o=s.map(n=>Te(n,this.playbackRate)));let a=null;if(i!=null)if(i instanceof VideoFrame){this.lastVf?.close();const n=await ss(i);this.lastVf=n,a=n}else this.lastVf?.close(),this.lastVf=i,a=i;else this.lastVf!=null&&(a=this.lastVf);return{video:a,audio:o,done:r==="done"}}async offscreenRender(t,e){const i=e*this.playbackRate;this.animate(i),super._render(t);const{width:s,height:r}=this,{video:o,audio:a,state:n}=await this.tick(i);let c=a??[];if(a!=null&&this.playbackRate!==1&&(c=a.map(d=>Te(d,this.playbackRate))),n==="done")return{audio:c,done:!0};const h=o??this.lastVf;if(h!=null){const d=this.style.borderRadius||0,u=this.style.shadow;if(t.save(),u&&(u.blur>0||u.offsetX!==void 0||u.offsetY!==void 0)&&(t.shadowColor=u.color||"#000000",t.shadowBlur=u.blur||0,t.shadowOffsetX=u.offsetX??0,t.shadowOffsetY=u.offsetY??0),d>0){const p=Math.min(d,s/2,r/2);t.beginPath(),t.roundRect(-s/2,-r/2,s,r,p),t.clip()}t.drawImage(h,-s/2,-r/2,s,r),t.restore();const f=this.style.stroke;if(f&&f.width>0){if(t.save(),t.strokeStyle=f.color,t.lineWidth=f.width,d>0){const p=Math.min(d,s/2,r/2);t.beginPath(),t.roundRect(-s/2,-r/2,s,r,p),t.stroke()}else t.strokeRect(-s/2,-r/2,s,r);t.restore()}}return o!=null&&(this.lastVf?.close(),o instanceof ImageBitmap&&(this.lastVf=o)),{audio:c,done:!1}}set(t,e=30){return t.timing&&(t.timing.display&&(t.timing.display.from!==void 0&&(this.timing.display.from=t.timing.display.from),t.timing.display.to!==void 0&&(this.timing.display.to=t.timing.display.to)),t.timing.trim&&(t.timing.trim.from!==void 0&&(this.timing.trim.from=t.timing.trim.from),t.timing.trim.to!==void 0&&(this.timing.trim.to=t.timing.trim.to)),t.timing.duration!==void 0&&(this.timing.duration=t.timing.duration),t.timing.playbackRate!==void 0&&(this.timing.playbackRate=t.timing.playbackRate),t.timing.fadeIn!==void 0&&(this.timing.fadeIn=t.timing.fadeIn),t.timing.fadeOut!==void 0&&(this.timing.fadeOut=t.timing.fadeOut)),t.display&&(t.display.from!==void 0&&(this.display.from=t.display.from),t.display.to!==void 0&&(this.display.to=t.display.to)),t.x!==void 0&&(this.left=t.x),t.y!==void 0&&(this.top=t.y),t.width!==void 0&&(this.width=t.width),t.height!==void 0&&(this.height=t.height),t.duration!==void 0&&(this.duration=t.duration,this.display.from!==void 0&&(this.display.to=this.display.from+this.duration)),this}toJSON(t=!1){const e=this.animatKeyFrame&&this.animatOptions?{keyFrames:this.animatKeyFrame.reduce((r,[o,a])=>{const n=o===0?"from":o===1?"to":`${Math.round(o*100)}%`;return r[n]=a,r},{}),options:this.animatOptions}:void 0,i=this.animations.map(r=>"toJSON"in r&&typeof r.toJSON=="function"?r.toJSON():{type:r.type,options:r.options,params:r.params||{}}),s=this.style?JSON.parse(JSON.stringify(this.style)):void 0;return{type:this.type,id:this.id,name:this.name,src:this.src,timing:{display:{from:this.timing.display.from,to:this.timing.display.to},trim:{from:this.timing.trim.from,to:this.timing.trim.to},duration:this.timing.duration,playbackRate:this.timing.playbackRate,fadeIn:this.timing.fadeIn,fadeOut:this.timing.fadeOut},transform:{x:this.left,y:this.top,width:this.width,height:this.height,angle:this.angle,opacity:this.opacity,zIndex:this.zIndex,flip:this.flip},style:s,...e&&{animation:e},...i.length>0&&{animations:i},...t&&{main:!0},...this.chromaKey!==void 0&&{chromaKey:this.chromaKey},...this.colorAdjustment!==void 0&&{colorAdjustment:this.colorAdjustment},locked:this.locked,metadata:this.metadata}}getVisibleHandles(){return["tl","tr","bl","br","ml","mr","mt","mb","rot"]}async scaleToFit(t,e){await this.ready;const{width:i,height:s}=this.meta;if(i===0||s===0)return;const r=Math.min(t/i,e/s);this.width=i*r,this.height=s*r}async scaleToFill(t,e){await this.ready;const{width:i,height:s}=this.meta;if(i===0||s===0)return;const r=Math.max(t/i,e/s);this.width=i*r,this.height=s*r}centerInScene(t,e){this.left=(t-this.width)/2,this.top=(e-this.height)/2}destroy(){this.destroyed||(this.destroyed=!0,Q.info("BaseClip destroy"),super.destroy(),this.lastVf?.close(),this.lastVf=null)}static deserializeBaseProperties(t,e){e.transform&&(t.left=e.transform.x??t.left,t.top=e.transform.y??t.top,t.width=e.transform.width??t.width,t.height=e.transform.height??t.height,t.angle=e.transform.angle??t.angle,t.zIndex=e.transform.zIndex??t.zIndex,t.opacity=e.transform.opacity??t.opacity,e.transform.flip!==void 0&&(t.flip=e.transform.flip??null));const i=e.timing||{display:e.display||{from:0,to:0},trim:e.trim||{from:0,to:0},duration:e.duration??0,playbackRate:e.playbackRate??1};if(t.display.from=i.display.from??t.display.from,t.display.to=i.display.to??t.display.to,t.duration=i.duration??t.duration,t.playbackRate=i.playbackRate??t.playbackRate,i.trim&&(t.trim={from:i.trim.from??t.trim.from,to:i.trim.to??t.trim.to}),i.fadeIn!==void 0&&(t.timing.fadeIn=i.fadeIn),i.fadeOut!==void 0&&(t.timing.fadeOut=i.fadeOut),e.style){const s=t.style||{},r={...s,...e.style};JSON.stringify(s)!==JSON.stringify(r)&&(t.style=r)}if(e.animation&&t.setAnimation(e.animation.keyFrames,e.animation.options),e.animations&&Array.isArray(e.animations)){t.clearAnimations();for(const s of e.animations)t.addAnimation(s.type,s.options,s.params)}e.id&&(t.id=e.id),e.name&&(t.name=e.name),e.metadata&&(t.metadata=e.metadata),e.locked!==void 0&&(t.locked=e.locked),e.transition&&(t.transition=e.transition),e.chromaKey?.enabled&&(t.chromaKey={...t.chromaKey,...e.chromaKey}),e.colorAdjustment?.enabled&&(t.colorAdjustment={...t.colorAdjustment,...e.colorAdjustment})}}let ie=null;async function Ge(){return ie===null&&(ie=Mi()),await ie}const L={get codec(){return Ht()?.codec??"mp4a.40.2"},get codecType(){return Ht()?.codecType??"aac"},get sampleRate(){return Ht()?.sampleRate??48e3},get channelCount(){return Ht()?.channelCount??2}};class Vt{static writes=new Map;static async getCacheKey(t){const e=new TextEncoder().encode(t),i=await crypto.subtle.digest("SHA-1",e);return Array.from(new Uint8Array(i)).map(s=>s.toString(16).padStart(2,"0")).join("")}static getPath(t){return`assets/${t}`}static async get(t){const e=this.getPath(await this.getCacheKey(t)),i=this.writes.get(e);i&&await i.catch(()=>{});const s=et.file(e);return await et.file(`${e}.done`).exists()&&await s.exists()?s:null}static async put(t,e){const i=this.getPath(await this.getCacheKey(t)),r=(this.writes.get(i)??Promise.resolve()).catch(()=>{}).then(async()=>{const o=et.file(`${i}.done`);await o.exists()&&await o.remove();const a=et.file(i),n=e instanceof Blob?e.stream():e;return await et.write(a,n),await et.write(o,"1"),a});this.writes.set(i,r);try{return await r}finally{this.writes.get(i)===r&&this.writes.delete(i)}}}const se=l=>l.startsWith("data:")||l.startsWith("blob:");class Ue{memory=new Map;memoryBytes=0;inflight=new Map;maxMemoryBytes;maxEntryBytes;constructor(t={}){this.maxMemoryBytes=t.maxMemoryBytes??768*1024*1024,this.maxEntryBytes=t.maxEntryBytes??400*1024*1024}configure(t){t.maxMemoryBytes!=null&&(this.maxMemoryBytes=t.maxMemoryBytes),t.maxEntryBytes!=null&&(this.maxEntryBytes=t.maxEntryBytes),this.evict()}key(t){if(se(t))return t;try{return typeof location<"u"?new URL(t,location.href).href:t}catch{return t}}getBlob(t){const e=this.key(t),i=this.memory.get(e);if(i)return this.memory.delete(e),this.memory.set(e,i),Promise.resolve(i.blob);const s=this.inflight.get(e);if(s)return s;const r=this.load(e).finally(()=>this.inflight.delete(e));return this.inflight.set(e,r),r}async getStream(t){return(await this.getBlob(t)).stream()}async getImageBitmap(t){return createImageBitmap(await this.getBlob(t))}async getArrayBuffer(t){return(await this.getBlob(t)).arrayBuffer()}async preload(t){const e=[...new Set(t.filter(i=>i&&!se(i)))];await Promise.allSettled(e.map(i=>this.getBlob(i)))}has(t){return this.memory.has(this.key(t))}release(t){const e=this.key(t),i=this.memory.get(e);i&&(this.memory.delete(e),this.memoryBytes-=i.size)}clearMemory(){this.memory.clear(),this.memoryBytes=0}async load(t){if(se(t)){const r=await(await fetch(t)).blob();return this.remember(t,r),r}const e=await Vt.get(t).catch(()=>null);if(e){const r=await e.getOriginFile().catch(()=>null);if(r&&r.size>0)return this.remember(t,r),r}const i=await fetch(t);if(!i.ok)throw new Error(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);const s=await i.blob();return this.remember(t,s),Vt.put(t,s).catch(r=>console.warn(`[MediaCache] Failed to persist ${t}:`,r)),s}remember(t,e){if(e.size>this.maxEntryBytes)return;const i=this.memory.get(t);i&&(this.memoryBytes-=i.size),this.memory.delete(t),this.memory.set(t,{blob:e,size:e.size}),this.memoryBytes+=e.size,this.evict()}evict(){for(const[t,e]of this.memory){if(this.memoryBytes<=this.maxMemoryBytes)break;this.memory.delete(t),this.memoryBytes-=e.size}}}const We=Symbol.for("agrhub.engine.mediaCache"),Ve=globalThis,Yt=Ve[We]??(Ve[We]=new Ue);var Ye=(l=>(l.PENDING="pending",l.LOADING="loading",l.COMPLETED="completed",l.FAILED="failed",l))(Ye||{});class gt{resources=new Map;loadingPromises=new Map;async preload(t){const i=[...new Set(t)].filter(s=>s&&!s.startsWith("data:")&&!s.startsWith("blob:")).map(s=>this.loadResource(s));await Promise.allSettled(i)}static async getReadableStream(t){return Yt.getStream(t)}static async getImageBitmap(t){return Yt.getImageBitmap(t)}async loadResource(t){const e=this.loadingPromises.get(t);if(e)return e;if(this.resources.has(t)){const s=this.resources.get(t);if(s.status==="completed")return s}const i=(async()=>{const s={url:t,status:"loading"};this.resources.set(t,s);try{return await Yt.getBlob(t),s.status="completed",s.localFile=await Vt.get(t)??void 0,s}catch(r){return s.status="failed",s.error=r instanceof Error?r:new Error(String(r)),s}finally{this.loadingPromises.delete(t)}})();return this.loadingPromises.set(t,i),i}async resolve(t){if(!t||t.startsWith("data:")||t.startsWith("blob:"))return t;const e=await this.loadResource(t);return e.status==="completed"&&e.localFile?e.localFile:t}getStatus(t){return this.resources.get(t)}clear(){this.resources.clear(),this.loadingPromises.clear()}}class dt extends X{type="Audio";static ctx=null;ready;_meta={duration:0,width:0,height:0};get meta(){return{...this._meta,sampleRate:L.sampleRate,chanCount:2}}chan0Buf=new Float32Array;chan1Buf=new Float32Array;getPCMData(){return[this.chan0Buf,this.chan1Buf]}opts;loop=!1;static async fromUrl(t,e={}){const i=await gt.getReadableStream(t);return new dt(i,e,t)}static async fromObject(t){if(t.type!=="Audio")throw new Error(`Expected Audio, got ${t.type}`);if(!t.src||t.src.trim()==="")throw new Error("Audio requires a valid source URL");const e={};t.loop!==void 0&&(e.loop=t.loop),t.volume!==void 0&&(e.volume=t.volume);const i=await dt.fromUrl(t.src,e);return X.deserializeBaseProperties(i,t),i}constructor(t,e={},i){super(),this.src=i!==void 0?i:"",this.opts={loop:!1,volume:1,...e},this.loop=this.opts.loop??!1,this.volume=this.opts.volume??1,this.ready=this.init(t).then(s=>{const r={width:0,height:0,duration:e.loop?1/0:this._meta.duration};return this.width=this.width===0?r.width:this.width,this.height=this.height===0?r.height:this.height,this.duration=this.duration===0?r.duration:this.duration,this.display.to=this.display.from+this.duration,this.trim.to=this.trim.to===0?this._meta.duration:Math.min(this.trim.to,this._meta.duration),this.trim.from=Math.min(this.trim.from,this.trim.to),r})}async init(t){dt.ctx==null&&(dt.ctx=new AudioContext({sampleRate:L.sampleRate}));const e=t instanceof ReadableStream?await rs(t,dt.ctx):t;this._meta.duration=e[0].length/L.sampleRate*1e6,this.chan0Buf=e[0],this.chan1Buf=e[1]??this.chan0Buf}tickInterceptor=async(t,e)=>e;timestamp=0;frameOffset=0;async tick(t){const e=t+this.trim.from,i=e-this.timestamp;if(e<this.timestamp||i>3e6)return this.timestamp=e,this.frameOffset=Math.ceil(this.timestamp/1e6*L.sampleRate),await this.tickInterceptor(t,{audio:[new Float32Array(0),new Float32Array(0)],state:"success"});this.timestamp=e;const s=Math.ceil(i/1e6*L.sampleRate),r=this.frameOffset+s,o=this.opts.loop?[_t(this.chan0Buf,this.frameOffset,r),_t(this.chan1Buf,this.frameOffset,r)]:[this.chan0Buf.slice(this.frameOffset,r),this.chan1Buf.slice(this.frameOffset,r)];if(this.volume!==1)for(const a of o)for(let n=0;n<a.length;n++)a[n]*=this.volume;return this.frameOffset=r,await this.tickInterceptor(t,{audio:o,state:"success"})}async split(t){throw new Error("Audio.split is not implemented - use core state instead")}async clone(){await this.ready;const t=new dt(this.getPCMData(),this.opts,this.src);return await t.ready,this.copyStateTo(t),t}destroy(){this.chan0Buf=new Float32Array(0),this.chan1Buf=new Float32Array(0),Q.info("---- audioclip destroy ----"),super.destroy()}toJSON(t=!1){return{id:this.id,type:"Audio",name:this.name,src:this.src,timing:{display:{from:this.timing.display.from,to:this.timing.display.to},trim:{from:this.timing.trim.from,to:this.timing.trim.to},duration:this.timing.duration,playbackRate:this.timing.playbackRate,fadeIn:this.timing.fadeIn,fadeOut:this.timing.fadeOut},loop:this.loop,volume:this.volume,locked:this.locked,metadata:this.metadata}}async createPlaybackElement(){if(await this.ready,!this.src||this.src.trim()==="")throw new Error("Audio requires a source URL for playback");const t=this.src.startsWith("blob:")?this.src:void 0,e=document.createElement("audio");return e.crossOrigin="anonymous",e.autoplay=!1,e.preload="auto",e.loop=this.opts.loop||!1,e.src=this.src,await new Promise((i,s)=>{const r=()=>{e.removeEventListener("loadeddata",r),e.removeEventListener("error",o),e.pause(),e.currentTime=0,i()},o=()=>{e.removeEventListener("loadeddata",r),e.removeEventListener("error",o),s(new Error("Failed to load audio"))};e.addEventListener("loadeddata",r,{once:!0}),e.addEventListener("error",o,{once:!0}),e.load()}),{element:e,objectUrl:t}}async play(t,e){const i=t,s=e+this.trim.from/1e6;if(Math.abs(i.currentTime-s)>.1&&(i.currentTime=s),i.paused)try{await i.play()}catch{try{await i.play()}catch(o){console.warn("Failed to play audio:",o)}}}pause(t){t.pause()}async seek(t,e){const i=t,s=e+this.trim.from/1e6;return i.pause(),i.currentTime=s,new Promise(r=>{if(Math.abs(i.currentTime-e)<.01){r();return}const o=()=>{i.removeEventListener("seeked",o),r()};i.addEventListener("seeked",o,{once:!0}),setTimeout(()=>{i.removeEventListener("seeked",o),r()},500)})}syncPlayback(t,e,i){const s=t,r=this.duration&&this.duration!==1/0?this.duration/1e6:(this.display.to-this.display.from)/1e6,o=i>=0&&i<r,a=i+this.trim.from/1e6,n=r*1e3,c=i*1e3;let h=1;if(this.timing.fadeIn&&this.timing.fadeIn.duration>0&&c<this.timing.fadeIn.duration&&(h*=wt(c/this.timing.fadeIn.duration,this.timing.fadeIn.curve)),this.timing.fadeOut&&this.timing.fadeOut.duration>0){const d=n-this.timing.fadeOut.duration;if(c>=d){const u=1-(c-d)/this.timing.fadeOut.duration;h*=wt(u,this.timing.fadeOut.curve)}}s.volume=Math.max(0,Math.min(1,this.volume*h)),e&&o?s.paused&&this.play(s,i).catch(console.warn):(s.paused||s.pause(),o&&Math.abs(s.currentTime-a)>.1&&(s.currentTime=a))}cleanupPlayback(t,e){const i=t;i.pause(),i.removeAttribute("src"),i.load(),e&&e.startsWith("blob:")&&URL.revokeObjectURL(e)}}async function rs(l,t){const e=await new Response(l).arrayBuffer();return qt(await t.decodeAudioData(e))}const os=`precision highp float;
65
+ in vec2 vTextureCoord;
66
+ out vec4 finalColor;
67
+
68
+ uniform sampler2D uTexture;
69
+ uniform float uThickness;
70
+ uniform vec3 uBorderColor;
71
+
72
+ uniform vec4 uInputClamp;
73
+ uniform vec4 uInputSize;
74
+
75
+ const float PI = 3.14159265359;
76
+
77
+ float getOutlineAlpha(vec2 pos) {
78
+ vec2 thickness = vec2(uThickness) / uInputSize.xy;
79
+ float maxAlpha = 0.0;
80
+
81
+ // Sample 16 directions for smoother outline
82
+ for (int i = 0; i < 16; i++) {
83
+ float angle = float(i) * (PI * 0.125);
84
+ vec2 offset = thickness * vec2(cos(angle), sin(angle));
85
+ vec4 sample = texture(uTexture, clamp(pos + offset, uInputClamp.xy, uInputClamp.zw));
86
+ maxAlpha = max(maxAlpha, sample.a);
87
+ }
88
+
89
+ return maxAlpha;
90
+ }
91
+
92
+ void main(void) {
93
+ vec4 content = texture(uTexture, vTextureCoord);
94
+ float outlineAlpha = getOutlineAlpha(vTextureCoord) * (1.0 - content.a);
95
+ vec4 outline = vec4(uBorderColor * outlineAlpha, outlineAlpha);
96
+ finalColor = content + outline;
97
+ }
98
+ `,ns=`in vec2 aPosition;
99
+ out vec2 vTextureCoord;
100
+
101
+ uniform vec4 uInputSize;
102
+ uniform vec4 uOutputFrame;
103
+ uniform vec4 uOutputTexture;
104
+ vec4 filterVertexPosition( void ) {
105
+ vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
106
+ position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
107
+ position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;
108
+ return vec4(position, 0.0, 1.0);
109
+ }
110
+ vec2 filterTextureCoord( void ) {
111
+ return aPosition * (uOutputFrame.zw * uInputSize.zw);
112
+ }
113
+ void main(void) {
114
+ gl_Position = filterVertexPosition();
115
+ vTextureCoord = filterTextureCoord();
116
+ }
117
+ `,Qe=`struct GlobalFilterUniforms {
118
+ uInputSize:vec4<f32>,
119
+ uInputPixel:vec4<f32>,
120
+ uInputClamp:vec4<f32>,
121
+ uOutputFrame:vec4<f32>,
122
+ uGlobalFrame:vec4<f32>,
123
+ uOutputTexture:vec4<f32>,
124
+ };
125
+
126
+ struct OutlineUniforms {
127
+ uThickness:f32,
128
+ uBorderColor:vec3<f32>,
129
+ };
130
+
131
+ @group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;
132
+ @group(0) @binding(1) var uTexture: texture_2d<f32>;
133
+ @group(0) @binding(2) var uSampler : sampler;
134
+
135
+ @group(1) @binding(0) var<uniform> outlineUniforms : OutlineUniforms;
136
+
137
+ struct VSOutput {
138
+ @builtin(position) position: vec4<f32>,
139
+ @location(0) uv : vec2<f32>,
140
+ };
141
+
142
+ fn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>
143
+ {
144
+ var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;
145
+ position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
146
+ position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;
147
+ return vec4(position, 0.0, 1.0);
148
+ }
149
+
150
+ fn filterTextureCoord(aPosition:vec2<f32>) -> vec2<f32>
151
+ {
152
+ return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
153
+ }
154
+
155
+ @vertex
156
+ fn mainVertex(@location(0) aPosition: vec2<f32>) -> VSOutput {
157
+ return VSOutput(filterVertexPosition(aPosition), filterTextureCoord(aPosition));
158
+ }
159
+
160
+ const PI: f32 = 3.14159265359;
161
+
162
+ fn getOutlineAlpha(pos: vec2<f32>) -> f32 {
163
+ let thickness = vec2<f32>(outlineUniforms.uThickness) / gfu.uInputSize.xy;
164
+ var maxAlpha: f32 = 0.0;
165
+
166
+ // Sample 16 directions for smoother outline
167
+ for (var i: i32 = 0; i < 16; i++) {
168
+ let angle = f32(i) * (PI * 0.125);
169
+ let offset = thickness * vec2<f32>(cos(angle), sin(angle));
170
+ let sample = textureSample(uTexture, uSampler, clamp(pos + offset, gfu.uInputClamp.xy, gfu.uInputClamp.zw));
171
+ maxAlpha = max(maxAlpha, sample.a);
172
+ }
173
+
174
+ return maxAlpha;
175
+ }
176
+
177
+ @fragment
178
+ fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
179
+ let content = textureSample(uTexture, uSampler, uv);
180
+ let outlineAlpha = getOutlineAlpha(uv) * (1.0 - content.a);
181
+ let outline = vec4<f32>(outlineUniforms.uBorderColor * outlineAlpha, outlineAlpha);
182
+ return content + outline;
183
+ }
184
+ `,as={thickness:1,borderColor:0};class ls extends m.Filter{constructor(t){const{thickness:e,borderColor:i}={...as,...t},s=m.GpuProgram.from({vertex:{source:Qe,entryPoint:"mainVertex"},fragment:{source:Qe,entryPoint:"mainFragment"}}),r=m.GlProgram.from({vertex:ns,fragment:os,name:"outline-filter"});super({gpuProgram:s,glProgram:r,padding:e*4,resources:{outlineUniforms:new m.UniformGroup({uThickness:{value:e,type:"f32"},uBorderColor:{value:new m.Color(i),type:"vec3<f32>"}})}})}get thickness(){return this.resources.outlineUniforms.uniforms.uThickness}set thickness(t){const e=this.resources.outlineUniforms.uniforms;e.uThickness=t}}const je=Symbol.for("agrhub.engine.fontManager");class ut{static instance;fonts=new Map;loading=new Map;warnedConflicts=new Set;constructor(){}static getInstance(){const t=globalThis;return ut.instance||(ut.instance=t[je]??new ut),t[je]=ut.instance,ut.instance}async addFont(t){const e=this.fonts.get(t.name);if(e){this.warnOnConflict(t,e.url);return}const i=this.loading.get(t.name);if(i)return i;const s=(async()=>{try{const o=await new FontFace(t.name,`url(${t.url})`).load();document.fonts.add(o),this.fonts.set(t.name,{face:o,url:t.url}),m.CanvasTextMetrics.clearMetrics()}catch(r){console.error(`Failed to load font ${t.name}:`,r)}finally{this.loading.delete(t.name)}})();return this.loading.set(t.name,s),s}warnOnConflict(t,e){!t.url||t.url===e||this.warnedConflicts.has(t.name)||(this.warnedConflicts.add(t.name),console.warn(`[FontManager] Font "${t.name}" is already loaded from ${e}; ignoring different URL ${t.url}`))}async loadFonts(t){await Promise.all(t.map(e=>this.addFont(e)))}removeFont(t){const e=this.fonts.get(t);e&&(document.fonts.delete(e.face),this.fonts.delete(t))}clear(){this.fonts.forEach(({face:t})=>{document.fonts.delete(t)}),this.fonts.clear()}getLoadedFonts(){return Array.from(this.fonts.keys())}}const Qt=ut.getInstance();function cs(l){if(typeof document>"u"||!document.fonts?.check)return!0;const t=String(l.fontFamily||"Roboto").split(",")[0].trim().replace(/^["']|["']$/g,""),e=Number(l.fontSize)||30,i=`${l.fontStyle||"normal"} ${l.fontWeight||"normal"} ${e}px "${t}"`;try{return document.fonts.check(i)}catch{return!0}}function Je(l){const t=[];t.push(l.fontFamily||"Roboto"),t.push(String(l.fontSize||30)),t.push(String(l.fontWeight||"normal")),t.push(String(l.fontStyle||"normal")),l.fill!==void 0&&(typeof l.fill=="number"?t.push(`f_${l.fill}`):t.push("f_obj")),l.stroke&&(typeof l.stroke=="object"?t.push(`s_${l.stroke.color}_${l.stroke.width}_${l.stroke.join||""}`):t.push(`s_${l.stroke}`)),l.dropShadow&&t.push(`ds_${l.dropShadow.color}_${l.dropShadow.alpha}_${l.dropShadow.blur}_${l.dropShadow.angle}_${l.dropShadow.distance}`),cs(l)||t.push("pending");const e="installed_font_"+t.join("_").replace(/[^a-zA-Z0-9_]/g,"_");return!m.Cache.has(e)&&!m.Cache.has(e+"-bitmap")&&m.BitmapFont.install({name:e,style:l}),e}class Ze extends X{_meta={duration:1/0,width:0,height:0};get meta(){return{...this._meta}}pixiTextContainer=null;wordTexts=[];textStyle;textStyleBase;renderTexture=null;outlineFilter=null;dropShadowFilter=null;_refreshing=!1;_needsRefresh=!1;_refreshPromise=null;_spaceWidth=0;_text="";externalRenderer=null;pixiApp=null;originalOpts;id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;effects=[];setRenderer(t){this.externalRenderer=t}async getRenderer(){if(this.externalRenderer!=null)return this.externalRenderer;if(this.pixiApp?.renderer==null)throw new Error("BaseTextClip: No renderer. Provide one via constructor or setRenderer().");return this.pixiApp.renderer}async getTexture(){return this._refreshPromise&&await this._refreshPromise.catch(()=>{}),this.pixiTextContainer==null||this.renderTexture==null?null:((await this.getRenderer()).render({container:this.pixiTextContainer,target:this.renderTexture}),this.renderTexture)}async tick(t){if(await this.ready,this._refreshPromise&&await this._refreshPromise.catch(()=>{}),this.pixiTextContainer==null||this.renderTexture==null)throw new Error("BaseTextClip not initialized");if(this.renderTexture.width<=0||this.renderTexture.height<=0)throw new Error(`Invalid RenderTexture dimensions: ${this.renderTexture.width}x${this.renderTexture.height}`);const e=await this.getRenderer();e.render({container:this.pixiTextContainer,target:this.renderTexture});const i=this.renderTexture.source?.resource?.source;let s;if(i instanceof HTMLCanvasElement||i instanceof OffscreenCanvas)s=await createImageBitmap(i);else{const o=e.extract.canvas(this.renderTexture);if(o instanceof HTMLCanvasElement||o instanceof OffscreenCanvas)s=await createImageBitmap(o);else throw new Error("Unable to extract canvas from render texture")}return{video:s,state:"success"}}async split(t){await this.ready;const e=await this.clone(),i=await this.clone();return[e,i]}_hasMaskAnim(t){return t.some(e=>e?.params?.mask===!0)}get animations(){return super.animations}set animations(t){const e=this._hasMaskAnim(this.animations);super.animations=t;const i=this._hasMaskAnim(this.animations);e!==i&&this.originalOpts&&this.textStyle&&this.refreshText()}animate(t){super.animate(t,this.pixiTextContainer)}addEffect(t){this.effects.push(t)}editEffect(t,e){const i=this.effects.find(s=>s.id===t);i&&Object.assign(i,e)}removeEffect(t){const e=this.effects.findIndex(i=>i.id===t);e!==-1&&this.effects.splice(e,1)}refreshText(){return this._refreshing&&this._refreshPromise?(this._needsRefresh=!0,this._refreshPromise):(this._refreshing=!0,this._refreshPromise=(async()=>{try{do this._needsRefresh=!1,await this._doRefreshText();while(this._needsRefresh)}finally{this._refreshing=!1,this._refreshPromise=null}})(),this._refreshPromise)}async _doRefreshText(){const t=this._targetWidth??0,e=this.originalOpts.wordWrap,i=this.originalOpts.wordWrapWidth,s=this.originalOpts.background;if(this.originalOpts.fontUrl&&this.originalOpts.fontFamily)try{await Qt.addFont({name:this.originalOpts.fontFamily,url:this.originalOpts.fontUrl})}catch(R){console.warn("[BaseTextClip] Failed to load font:",R)}typeof document<"u"&&await document.fonts.ready,this._buildTextStyles();const r=this.textStyle,o=this._applyTextCase(this.text);if(!this.pixiTextContainer)this.pixiTextContainer=new m.Container,this.pixiTextContainer.__clip=this;else{this.pixiTextContainer.__clip=this,this.animations.forEach(R=>{R&&typeof R.destroy=="function"&&R.destroy()});for(const R of this.pixiTextContainer.children)if(R&&!R.destroyed){const D=E=>{if(E&&(ct.killTweensOf(E),E.children))for(const N of E.children)D(N)};if(D(R),R.children)for(const E of R.children)E&&E.label==="LineContainer"&&(E.mask=null);R.destroy({children:!0})}this.pixiTextContainer.removeChildren()}const{textOnlyContainer:a,words:n}=this._buildWordObjects(o),c=this._applyStrokeFilter();this._applyShadowFilter(a),this.pixiTextContainer.addChild(a);const{spaceWidth:h,measuredTextHeight:d}=await this._measureSpaceAndHeight();this._spaceWidth=h;const u=this.originalOpts.lineHeight??1,f=r.fontSize??40,p=f*u;let g;if(e)if(t>0){const R=s?.paddingX??8;g=Math.max(1,t-R*2)}else g=i??100;else g=1e5;const v=this._breakIntoLines(g,p),x=this.originalOpts.background?.color,w=this.originalOpts.background?.opacity??1,T=this.originalOpts.background?.borderRadius??4,y=this.originalOpts.background?.paddingX??8,S=this.originalOpts.background?.paddingY??4,{containerWidth:F,containerHeight:O,contentHeight:k}=this._calculateDimensions(v,d,t,e,i,s,y,S),b=this._positionWords(v,F,O,k,d,y,a),A=this._drawDecoration(v,F,y);A&&this.pixiTextContainer.addChild(A);const C=this._buildBackground(b,x,w,T);C&&this.pixiTextContainer.addChildAt(C,0),this._lineRects=b,this._createRenderTexture(F,O,c),this._meta.width=F,this._meta.height=O,this._width=F,this._height=O,this.duration===0&&this._meta.duration!==1/0&&(this.duration=this._meta.duration,this.display.to=this.display.from+this.duration),this._onAfterRefresh(n,a,h,d,u,f)}_onAfterRefresh(t,e,i,s,r,o){}_applyTextCase(t){const e=this.originalOpts.textCase;return e==="uppercase"?t.toUpperCase():e==="lowercase"?t.toLowerCase():e==="title"?t.replace(/\w\S*/g,i=>i.charAt(0).toUpperCase()+i.substring(1).toLowerCase()):t}_buildTextStyles(){const t=this.createStyleFromOpts(this.originalOpts),{wordWrap:e,wordWrapWidth:i,lineHeight:s,letterSpacing:r,fill:o,...a}=t,n=Je(t);this.textStyle=new m.TextStyle({...t,fontFamily:n});const c=Je(a);return this.textStyleBase=new m.TextStyle({...a,fontFamily:c}),{fontName:n,baseFontName:c}}_buildWordObjects(t){const e=t.split(/\s+/).filter(s=>s.length>0),i=new m.Container;return i.label="TextOnlyContainer",this.wordTexts.forEach(s=>{s&&!s.destroyed&&s.destroy()}),this.wordTexts=e.map(s=>{const r=new m.SplitBitmapText({text:s,style:this.textStyle});return i.addChild(r),r}),{textOnlyContainer:i,words:e}}_applyStrokeFilter(){const t=this.originalOpts.stroke,e=(t!==null&&typeof t=="object"&&"width"in t?t.width:void 0)??this.originalOpts.strokeWidth??0,i=t!=null&&e>0;if(i){let s=0;if(typeof t=="object"&&"color"in t){const r=$(t.color);r!==void 0&&(s=r)}else if(typeof t=="string"||typeof t=="number"){const r=$(t);r!==void 0&&(s=r)}if(this.outlineFilter){this.outlineFilter.thickness=e,this.outlineFilter.padding=e*4;const r=this.outlineFilter.resources.outlineUniforms.uniforms;r.uBorderColor=new m.Color(s)}else this.outlineFilter=new ls({thickness:e,borderColor:s});this.wordTexts.forEach(r=>{r.filters=[this.outlineFilter]})}else this.outlineFilter&&(this.wordTexts.forEach(s=>{s.filters=[]}),this.outlineFilter=null);return i?e:0}_applyShadowFilter(t){const e=this.originalOpts.shadow;if(e){const i=e.offsetX??0,s=e.offsetY??0,r=$(e.color??"#000000"),o=e.alpha??1,a=e.blur??4,n=Math.ceil(a*2.5+Math.max(Math.abs(i),Math.abs(s)));r!==void 0&&(this.dropShadowFilter?(this.dropShadowFilter.color=r,this.dropShadowFilter.alpha=o,this.dropShadowFilter.blur=a,this.dropShadowFilter.offset={x:i,y:s},this.dropShadowFilter.padding=n):(this.dropShadowFilter=new j.DropShadowFilter({color:r,alpha:o,blur:a,offset:{x:i,y:s}}),this.dropShadowFilter.padding=n),t.filters=[this.dropShadowFilter])}else this.dropShadowFilter&&(t.filters=[],this.dropShadowFilter=null)}async _measureSpaceAndHeight(){const t=this.originalOpts.fontSize||40,e=this.originalOpts.fontFamily||"Arial",i=String(this.originalOpts.fontWeight||"normal"),s=this.originalOpts.fontStyle||"normal",r=`${s} ${i} ${t}px "${e}"`;if(typeof document<"u")try{await document.fonts.load(r)}catch{}const o=new m.TextStyle({fontFamily:e,fontSize:t,fontWeight:i,fontStyle:s}),a=m.CanvasTextMetrics.measureText(" ",o),n=new m.TextStyle({fontFamily:e,fontSize:t,fontWeight:i,fontStyle:s}),h=m.CanvasTextMetrics.measureText("Hg",n).fontProperties,d=h&&h.ascent>0?Math.ceil(h.ascent+h.descent):t,u=new m.SplitBitmapText({text:" ",style:this.textStyleBase}),f=Math.ceil(u.getLocalBounds().width||u.width||a.width||t*.25);return u.destroy(),{spaceWidth:f,measuredTextHeight:d}}_breakIntoLines(t,e){const i=[];let s=[],r=0,o=0;return this.wordTexts.forEach(a=>{const n=a.getLocalBounds(),c=Math.ceil(n.width||a.width),h=Math.ceil(n.height||a.height),d=r+(r>0?this._spaceWidth:0)+c;d<=t||s.length===0?(s.push(a),r=d,o=Math.max(o,h)):(s.length>0&&i.push({words:s,width:r,height:Math.max(o,e)}),s=[a],r=c,o=h)}),s.length>0&&i.push({words:s,width:r,height:Math.max(o,e)}),i}_calculateDimensions(t,e,i,s,r,o,a,n){const c=e+n*2;t.forEach(T=>{T.height=Math.max(T.height,c)});let h=0,d=0;t.forEach(T=>{h=Math.max(h,T.width),d+=T.height});let u=h;if(s&&i>0){const T=o?.paddingX??8,y=i-T*2;u=Math.max(u,y)}else s&&r!=null&&r>0&&(u=Math.max(u,r));const f=d;u+=a*2;const p=i>0?i:this._width,g=p===0,v=!this._explicitHeight||this.height===0,x=g?u:Math.max(u,p),w=v?f:Math.max(f,this.height||0);return{containerWidth:x,containerHeight:w,contentWidth:u,contentHeight:f}}_positionWords(t,e,i,s,r,o,a){const n=this.originalOpts.verticalAlign||"top";let c=0;n==="center"?c=(i-s)/2:n==="bottom"&&(c=i-s);let h=c;const d=[];return t.forEach(u=>{let f=0;const p=this.textAlign;p==="center"?f=(e-u.width)/2:p==="right"?f=e-u.width-o*2:f=o;const g=f,v=new m.Container;if(v.label="LineContainer",v.x=0,v.y=0,this.animations.some(w=>w?.params?.mask===!0)){const w=new m.Graphics;w.label="LineMask",w.rect(0,h,e,u.height),w.fill(16777215),v.mask=w,a.addChild(w)}a.addChild(v),u.words.forEach((w,T)=>{w.x=Math.round(f),w.y=Math.round(h+(u.height-r)/2-9),f+=(w.getLocalBounds().width||w.width)+(T<u.words.length-1?this._spaceWidth:0),v.addChild(w)}),d.push({x:g-o,y:h,w:u.width+o*2,h:u.height}),h+=u.height}),d}_drawDecoration(t,e,i){const s=this.originalOpts.textDecoration||this.originalOpts.verticalAlign;if(!s||s==="none"||!["underline","overline","strikethrough","line-through"].includes(s))return null;const r=this.textStyle,o=r.fontSize??40,a=s==="strikethrough"?"line-through":s,n=Math.max(1,o/12);let c=16777215;typeof r.fill=="number"&&(c=r.fill);const h=new m.Graphics;let d=0;return t.forEach(u=>{let f=i;const p=this.textAlign;p==="center"?f=(e-u.width)/2:p==="right"&&(f=e-u.width-i*2);let g=0;a==="underline"?g=u.height:a==="line-through"&&(g=u.height/2),h.rect(f,d+g,u.width,n),h.fill(c),d+=u.height}),h}_buildBackground(t,e,i,s){if(!t.length||!e||e==="transparent"||e==="")return null;const r=$(e),o=new m.Graphics;return this.drawRoundedMultilinePath(o,t,s,r??0,i),o}_createRenderTexture(t,e,i){const r=i>0?i*2.1:0;let o=0;if(this.dropShadowFilter){const h=this.dropShadowFilter.blur??0,d=this.dropShadowFilter.offset,u=d?Math.sqrt(d.x**2+d.y**2):0;o=h+u}const a=300+r+o,n=t+a*2,c=e+a*2;this.pixiTextContainer&&(this.pixiTextContainer.x=a,this.pixiTextContainer.y=a),this.renderTexture&&this.renderTexture.destroy(),this.renderTexture=m.RenderTexture.create({width:n,height:c}),this.renderTexturePadding=a}_normalizeStyleOpts(t){let e={...t};e.style&&(e={...e,...e.style},delete e.style),e.fill!==void 0&&(e.color=e.fill,delete e.fill),e.dropShadow!==void 0&&(e.shadow=e.dropShadow,delete e.dropShadow),e.textAlign!==void 0&&(e.align=e.textAlign,delete e.textAlign);const i=e.underline,s=e.overline,r=e.linethrough;return(i!==void 0||s!==void 0||r!==void 0)&&(i?e.textDecoration="underline":s?e.textDecoration="overline":r?e.textDecoration="line-through":e.textDecoration="none",delete e.underline,delete e.overline,delete e.linethrough),e}_cloneColorOpts(t){const e=this.originalOpts;return e.color&&typeof e.color=="object"&&"type"in e.color&&e.color.type==="gradient"?e.color:t(this.textStyle.fill)??16777215}_cloneStrokeOpts(t){const e=this.originalOpts,i=this.textStyle;if(e.stroke&&typeof e.stroke=="object"&&"color"in e.stroke)return{stroke:e.stroke,strokeWidth:0};const s=t(i.stroke),r=e.strokeWidth??i.strokeThickness??0;return{stroke:s!==void 0?s:void 0,strokeWidth:r}}_cloneShadowOpts(t){const e=this.originalOpts,i=this.textStyle;if(e.shadow)return e.shadow;if(i.dropShadow){const s=i.dropShadow,r=t(s.color);if(r!==void 0){const o=s.angle??0,a=s.distance??0;return{color:r,alpha:s.alpha,blur:s.blur,offsetX:Math.cos(o)*a,offsetY:Math.sin(o)*a}}}}createStyleFromOpts(t){const e=t.fontSize??40,i=t.lineHeight??1,s={fontSize:e,fontFamily:t.fontFamily??"Roboto",fontWeight:t.fontWeight??"normal",fontStyle:t.fontStyle??"normal",align:t.align??"left",wordWrap:t.wordWrap??!1,wordWrapWidth:t.wordWrapWidth??100,lineHeight:e*i,letterSpacing:t.letterSpacing??0},r=t.color??"#ffffff";if(r&&typeof r=="object"&&"type"in r&&r.type==="gradient"){const o=new m.FillGradient(r.x0,r.y0,r.x1,r.y1);r.colors.forEach(({ratio:a,color:n})=>{const c=typeof n=="number"?n:$(n)??16777215;o.addColorStop(a,c)}),s.fill={fill:o}}else{const{color:o,alpha:a}=At(r);s.fill=o,a<1&&(s.fillAlpha=a)}return s}drawRoundedMultilinePath(t,e,i,s,r=1){if(e.length===0)return;const o=Math.max(i*.8,15);let a=!0,n=0;for(;a&&n<5;){a=!1,n++;for(let u=0;u<e.length;u++)for(let f=u+1;f<e.length;f++){const p=e[u].x+e[u].w,g=e[f].x+e[f].w;if(Math.abs(p-g)>.1&&Math.abs(p-g)<o){const v=Math.max(p,g);e[u].w=v-e[u].x,e[f].w=v-e[f].x,a=!0}if(Math.abs(e[u].x-e[f].x)>.1&&Math.abs(e[u].x-e[f].x)<o){const v=Math.min(e[u].x,e[f].x);e[u].w+=e[u].x-v,e[u].x=v,e[f].w+=e[f].x-v,e[f].x=v,a=!0}}}const c=[];c.push({x:e[0].x,y:e[0].y}),c.push({x:e[0].x+e[0].w,y:e[0].y});for(let u=0;u<e.length-1;u++){const f=e[u],p=e[u+1];if(Math.abs(f.x+f.w-(p.x+p.w))>.1){const g=(f.y+f.h+p.y)/2;c.push({x:f.x+f.w,y:g}),c.push({x:p.x+p.w,y:g})}}c.push({x:e[e.length-1].x+e[e.length-1].w,y:e[e.length-1].y+e[e.length-1].h}),c.push({x:e[e.length-1].x,y:e[e.length-1].y+e[e.length-1].h});for(let u=e.length-1;u>0;u--){const f=e[u],p=e[u-1];if(Math.abs(f.x-p.x)>.1){const g=(f.y+p.y+p.h)/2;c.push({x:f.x,y:g}),c.push({x:p.x,y:g})}}t.clear();const h=c[c.length-1],d=c[0];t.moveTo((h.x+d.x)/2,(h.y+d.y)/2);for(let u=0;u<c.length;u++){const f=c[u],p=c[(u+1)%c.length];t.arcTo(f.x,f.y,(f.x+p.x)/2,(f.y+p.y)/2,i)}t.fill({color:s,alpha:r})}destroy(){if(!this.destroyed){Q.info(`${this.constructor.name} destroy`);try{if(this.pixiTextContainer!=null&&!this.pixiTextContainer.destroyed){for(const t of this.pixiTextContainer.children)if(t&&!t.destroyed){const e=i=>{if(i&&(ct.killTweensOf(i),i.children))for(const s of i.children)e(s)};if(e(t),t.children)for(const i of t.children)i&&i.label==="LineContainer"&&(i.mask=null)}this.pixiTextContainer.destroy({children:!0})}}catch{}finally{this.pixiTextContainer=null}try{this.renderTexture!=null&&!this.renderTexture.destroyed&&this.renderTexture.destroy(!0)}catch{}finally{this.renderTexture=null}if(this.externalRenderer=null,this.pixiApp!=null)try{const t=this.pixiApp;t.destroyed!==!0&&t.renderer!=null&&this.pixiApp.destroy(!0,{children:!0,texture:!0})}catch{}finally{this.pixiApp=null}super.destroy()}}toJSON(t=!1){const e=super.toJSON(t),{chromaKey:i,colorAdjustment:s,...r}=e;return r}}class pt extends Ze{type="Caption";_lastTickTime=0;_isWidthConstrained=!1;_words=[];_activeStyle={};_futureStyle={};_keywordColor="";_keywordPreserveAfterSpoken=!1;_wordAnimation={type:"scale",application:"none",value:1};_wordsPerLine="multiple";_videoWidth=1280;_videoHeight=720;_bottomOffset=100;get text(){return this._text}set text(t){if(this._text===t)return;const e=this._text;this._text=t,e!==""&&this._words.length>0&&(this._words=xe.redistributeCaptionWords(t,this._words,this.duration||5e6)),this.originalOpts&&this.textStyle&&this.refreshText().then(()=>this.emit("propsChange",{text:t}))}get textAlign(){return this.originalOpts?.align??"left"}get caption(){const t=this.originalOpts??{};return{words:this._words,colors:{active:t.activeStyle,future:t.futureStyle,keyword:t.keywordColor?{color:t.keywordColor,preserveAfterSpoken:t.keywordPreserveAfterSpoken}:void 0},wordAnimation:t.wordAnimation,positioning:{videoWidth:this._videoWidth,videoHeight:this._videoHeight,bottomOffset:this._bottomOffset}}}set caption(t){t&&(t.words&&(this._words=t.words,this.originalOpts&&(this.originalOpts.words=t.words)),t.colors&&("active"in t.colors&&(this.originalOpts.activeStyle=t.colors.active??void 0),"future"in t.colors&&(this.originalOpts.futureStyle=t.colors.future??void 0),"keyword"in t.colors&&(t.colors.keyword!=null?(this.originalOpts.keywordColor=t.colors.keyword.color,this.originalOpts.keywordPreserveAfterSpoken=t.colors.keyword.preserveAfterSpoken):(this.originalOpts.keywordColor=void 0,this.originalOpts.keywordPreserveAfterSpoken=void 0))),t.wordAnimation!==void 0&&(this.originalOpts.wordAnimation=t.wordAnimation),t.positioning&&(t.positioning.videoWidth!==void 0&&(this._videoWidth=t.positioning.videoWidth),t.positioning.videoHeight!==void 0&&(this._videoHeight=t.positioning.videoHeight),t.positioning.bottomOffset!==void 0&&(this._bottomOffset=t.positioning.bottomOffset)),this._syncOpts())}get words(){return this._words}set words(t){this._words=t,this.originalOpts&&(this.originalOpts.words=t),this.refreshText().then(()=>this.emit("propsChange",{style:this.style}))}get mediaId(){return this.originalOpts?.mediaId}set mediaId(t){this.originalOpts&&(this.originalOpts.mediaId=t)}get wordsPerLine(){return this._wordsPerLine}set wordsPerLine(t){this._wordsPerLine=t,this.originalOpts&&(this.originalOpts.wordsPerLine=t),this.refreshText()}get style(){const t=this.originalOpts??{};return{fontSize:t.fontSize,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontStyle:t.fontStyle,color:t.color,align:t.align,stroke:t.stroke,shadow:t.shadow,wordWrap:t.wordWrap,wordWrapWidth:t.wordWrapWidth,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,textCase:t.textCase}}set style(t){this.updateStyle(t)}async updateStyle(t){const e=this._normalizeStyleOpts(t);this.originalOpts={...this.originalOpts,...e},e.words!==void 0&&(this._words=e.words),this._syncOpts(),this._buildTextStyles(),await this.refreshText(),this.emit("propsChange",t)}get width(){return this._width}set width(t){Math.abs(this.width-t)<.1||(this._width=t,t>0&&(this._isWidthConstrained=!0),this.refreshText())}get height(){return this._height}set height(t){Math.abs(this.height-t)<.1||(this._height=t,this.refreshText())}animate(t){this._lastTickTime=t,super.animate(t)}constructor(t,e={},i){if(super(),this.originalOpts={...e},this._text=t,i&&this.setRenderer(i),e.caption){e.caption.words&&(this._words=e.caption.words);const s=e.caption;s.colors&&"active"in s.colors&&(this.originalOpts.activeStyle=s.colors.active??void 0),s.colors&&"future"in s.colors&&(this.originalOpts.futureStyle=s.colors.future??void 0),s.colors&&"keyword"in s.colors&&(s.colors.keyword!=null?(this.originalOpts.keywordColor=s.colors.keyword.color,this.originalOpts.keywordPreserveAfterSpoken=s.colors.keyword.preserveAfterSpoken):(this.originalOpts.keywordColor=void 0,this.originalOpts.keywordPreserveAfterSpoken=void 0)),s.wordAnimation!==void 0&&(this.originalOpts.wordAnimation=s.wordAnimation),s.positioning?.videoWidth!==void 0&&(this.originalOpts.videoWidth=s.positioning.videoWidth),s.positioning?.videoHeight!==void 0&&(this.originalOpts.videoHeight=s.positioning.videoHeight),s.positioning?.bottomOffset!==void 0&&(this.originalOpts.bottomOffset=s.positioning.bottomOffset)}e.words&&(this._words=e.words),e.initialLayoutApplied,this._syncOpts(),this._buildTextStyles(),this.ready=(async()=>(await this.refreshText(),{...this.meta}))()}createStyleFromOpts(t){const e=super.createStyleFromOpts(t);return e.fill=16777215,e}_syncOpts(){const t=this.originalOpts??{};this._activeStyle=t.activeStyle??{},this._futureStyle=t.futureStyle??{},this._keywordColor=t.keywordColor??"",this._keywordPreserveAfterSpoken=t.keywordPreserveAfterSpoken??!1,this._wordAnimation=t.wordAnimation??{type:"scale",application:"none",value:1},this._wordsPerLine=t.wordsPerLine??"multiple",this._videoWidth=t.videoWidth??1280,this._videoHeight=t.videoHeight??720,this._bottomOffset=t.bottomOffset??100}_buildWordObjects(t){const e=new m.Container;e.label="TextOnlyContainer",this.wordTexts.forEach(o=>o.destroy()),this.wordTexts=[];const i=[],s=this.originalOpts?.textCase,r=(o,a)=>{const n=new m.SplitBitmapText({text:o,style:this.textStyle});n.segmentIndex=a;const c=this.originalOpts?.color,h=typeof c=="object"&&c!==null&&"type"in c?16777215:c,d=$(h);return n.tint=d??16777215,n};return this._words.length>0?this._words.forEach((o,a)=>{let n=o.text||"";s==="uppercase"?n=n.toUpperCase():s==="lowercase"?n=n.toLowerCase():s==="title"&&(n=n.replace(/\w\S*/g,h=>h.charAt(0).toUpperCase()+h.substring(1).toLowerCase())),n.split(/\s+/).filter(h=>h.length>0).forEach(h=>{const d=r(h,a);e.addChild(d),this.wordTexts.push(d),i.push(h)})}):t.split(/\s+/).filter(o=>o.length>0).forEach((o,a)=>{const n=r(o,a);e.addChild(n),this.wordTexts.push(n),i.push(o)}),{textOnlyContainer:e,words:i}}_onAfterRefresh(){this.updateState(this._lastTickTime)}async tick(t){return this.updateState(t),super.tick(t)}updateState(t){this._lastTickTime=t;const e=t/1e3;this.wordTexts.forEach(i=>{const s=this._words[i.segmentIndex];if(!s)return;i.scale.set(1,1);const r=e>=s.from&&e<s.to,o=e>=s.to,a=!r&&!o,n=this._wordAnimation;let c=0,h=!1;if(n&&n.application!=="none"&&((n.application==="active"&&r||n.application==="keyword"&&s.isKeyWord)&&(h=!0),h)){if(n.mode==="dynamic"&&r){const y=s.to-s.from;if(y>0){const S=Math.max(0,Math.min(1,(e-s.from)/y));c=n.value<1?S:Math.sin(S*Math.PI)}else c=1}else c=1;if(n.type==="scale"){const y=n.value<1&&n.mode==="dynamic"&&r?n.value+(1-n.value)*c:1+(n.value-1)*c;i.scale.set(y,y)}}let d=16777215,u=1;if(s.isKeyWord&&!Ot(this._keywordColor)&&(r||o&&this._keywordPreserveAfterSpoken))({color:d,alpha:u}=At(this._keywordColor,16776960));else if(r){const y=this._activeStyle.color;y&&!Ot(y)?{color:d,alpha:u}=At(y,16777215):(d=16777215,u=1)}else if(a){const y=this._futureStyle.color;y&&!Ot(y)?{color:d,alpha:u}=At(y,16777215):(d=16777215,u=1)}else{const y=this.originalOpts?.color,S=typeof y=="object"&&y!==null&&"type"in y?16777215:y;({color:d,alpha:u}=At(S))}if(h&&n?.type==="opacity"){const y=n.value<1&&n.mode==="dynamic"&&r?n.value+(1-n.value)*c:1+(n.value-1)*c;u*=y}i.tint=d;const p=y=>{y.label==="bgRect"||y.label==="tiktokBackground"||y.label==="containerBackground"||typeof y.label=="string"&&y.label.startsWith("bgRect_")||("alpha"in y&&(y.alpha=u),y.children&&y.children.forEach(p))};i.children.forEach(p);const g=i.parent,v=`bgRect_${i.segmentIndex}`,x=g?g.getChildByLabel(v):null,w=r?this._activeStyle.background??"":"";if(r&&!!w&&!Ot(w)&&w!=="none"&&g){const{color:y,alpha:S}=At(w,16753920),F=15,O=40,k=i.scale.x,b=(i.getLocalBounds().width||i.width)*k,A=(this.originalOpts?.fontSize??40)*k,C=i.x,R=i.y+9,D=x??new m.Graphics;D.label=v,D.clear(),D.roundRect(C-O/2,R-F/2,b+O,A+F,10),D.fill({color:y,alpha:S}),D.tint=16777215,x||g.addChildAt(D,0)}else x&&g&&(g.removeChild(x),x.destroy())})}async clone(){await this.ready;const t=new pt(this.text,{...this.originalOpts,words:[...this._words]});return this.copyStateTo(t),t.id=this.id,t.effects=[...this.effects],t}toJSON(t=!1){const e=super.toJSON(t),i=this.originalOpts??{},s={};i.fontSize!==void 0&&(s.fontSize=i.fontSize),i.fontFamily!==void 0&&(s.fontFamily=i.fontFamily),i.fontWeight!==void 0&&(s.fontWeight=i.fontWeight),i.fontStyle!==void 0&&(s.fontStyle=i.fontStyle),i.color!==void 0&&(s.color=i.color),i.align!==void 0&&(s.align=i.align),i.textCase!==void 0&&(s.textCase=i.textCase),i.fontUrl!==void 0&&(s.fontUrl=i.fontUrl),i.verticalAlign!==void 0&&(s.verticalAlign=i.verticalAlign),i.wordWrapWidth!==void 0&&(s.wordWrapWidth=i.wordWrapWidth),i.wordWrap!==void 0&&(s.wordWrap=i.wordWrap),i.wordAnimation!==void 0&&(s.wordAnimation=i.wordAnimation),i.stroke&&(typeof i.stroke=="object"?s.stroke={color:i.stroke.color,width:i.stroke.width}:s.stroke={color:i.stroke,width:i.strokeWidth??0}),i.shadow&&(s.shadow={color:i.shadow.color??"#000000",alpha:i.shadow.alpha??.5,blur:i.shadow.blur??4,offsetX:i.shadow.offsetX??0,offsetY:i.shadow.offsetY??0});const r={};this._words.length>0&&(r.words=this._words);const o={};i.activeStyle&&(o.active=i.activeStyle),i.futureStyle&&(o.future=i.futureStyle),i.keywordColor&&(o.keyword={color:i.keywordColor,preserveAfterSpoken:i.keywordPreserveAfterSpoken}),Object.keys(o).length>0&&(r.colors=o),i.wordAnimation!==void 0&&(r.wordAnimation=i.wordAnimation);const a={};return i.videoWidth!==void 0&&(a.videoWidth=i.videoWidth),i.videoHeight!==void 0&&(a.videoHeight=i.videoHeight),i.bottomOffset!==void 0&&(a.bottomOffset=i.bottomOffset),Object.keys(a).length>0&&(r.positioning=a),{...e,type:"Caption",text:this.text,style:s,caption:Object.keys(r).length>0?r:void 0,id:this.id,effects:this.effects,mediaId:this.mediaId,wordsPerLine:this.wordsPerLine,fontUrl:i.fontUrl}}static async fromObject(t,e){if(t.type!=="Caption")throw new Error(`Expected Caption, got ${t.type}`);const i=e?.captionConfig,s=t.text||"",r={...i?.style??{},...t.style??{}},o={};r.fontSize!==void 0&&(o.fontSize=r.fontSize),r.fontFamily!==void 0&&(o.fontFamily=r.fontFamily),r.fontWeight!==void 0&&(o.fontWeight=r.fontWeight),r.fontStyle!==void 0&&(o.fontStyle=r.fontStyle),r.color!==void 0?o.color=r.color:r.fill!==void 0&&(o.color=r.fill),r.align!==void 0&&(o.align=r.align),r.textCase!==void 0&&(o.textCase=r.textCase),r.verticalAlign!==void 0&&(o.verticalAlign=r.verticalAlign),r.wordWrapWidth!==void 0&&(o.wordWrapWidth=r.wordWrapWidth),r.wordWrap!==void 0&&(o.wordWrap=r.wordWrap),r.wordAnimation!==void 0&&(o.wordAnimation=r.wordAnimation),r.fontUrl!==void 0?o.fontUrl=r.fontUrl:t.fontUrl!==void 0&&(o.fontUrl=t.fontUrl);const a=h=>h!=null&&h!=="";a(r.wordsPerLine)?o.wordsPerLine=r.wordsPerLine:a(t.wordsPerLine)&&(o.wordsPerLine=t.wordsPerLine);const n=r;if(n.lineHeight!==void 0&&(o.lineHeight=n.lineHeight),n.letterSpacing!==void 0&&(o.letterSpacing=n.letterSpacing),o.textCase===void 0&&t.textCase!==void 0&&(o.textCase=t.textCase),n.background&&typeof n.background=="object")o.background={...n.background};else if(a(n.backgroundColor)&&n.backgroundColor!=="transparent"){const h=Number(n.padding);o.background={color:n.backgroundColor,opacity:n.backgroundOpacity??.7,borderRadius:n.borderRadius??8,paddingX:Number.isFinite(h)?h:10,paddingY:Number.isFinite(h)?Math.round(h*.6):6}}if(t.mediaId&&(o.mediaId=t.mediaId),r.stroke&&(o.stroke=r.stroke.color,o.strokeWidth=r.stroke.width),r.shadow&&(o.shadow={color:r.shadow.color,alpha:r.shadow.alpha,blur:r.shadow.blur,offsetX:r.shadow.offsetX??0,offsetY:r.shadow.offsetY??0}),t.caption){const h={...t.caption};!h.colors&&i?.colors&&(h.colors=i.colors),!h.positioning&&i?.positioning&&(h.positioning=i.positioning),o.caption=h,t.caption.wordAnimation&&(o.wordAnimation=t.caption.wordAnimation)}else i&&(o.caption={colors:i.colors,positioning:i.positioning});o.initialLayoutApplied=!0;const c=new pt(s,o);return X.deserializeBaseProperties(c,t),c.wordsPerLine=(a(t.wordsPerLine)?t.wordsPerLine:void 0)??i?.wordsPerLine??"multiple",t.effects&&(c.effects=t.effects),await c.ready,c}getVisibleHandles(){return["mr","mb","br","rot"]}}let Pt=class mt extends X{type="Image";ready;_meta={duration:0,width:0,height:0};get meta(){return{...this._meta}}img=null;pixiTexture=null;frames=[];id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;effects=[];getVisibleHandles(){return["tl","tr","bl","br","rot"]}static async fromUrl(t,e){let i=null,s;if(t.startsWith("blob:"))try{const o=await fetch(t);if(!o.ok)throw new Error(`Failed to fetch image: ${o.status} ${o.statusText}`);const a=await o.blob();s=await createImageBitmap(a);try{i=m.Texture.from(s)}catch(n){Q.warn("Failed to create Pixi texture from bitmap:",n)}}catch(o){throw Q.error(`Failed to load blob image from ${t}`,o),o}else s=await gt.getImageBitmap(t);if(!s)throw new Error(`Failed to load image from ${t}`);const r=new mt(s,e||t);return i&&(r.pixiTexture=i),r}getTexture(){return this.pixiTexture}constructor(t,e){super(),this.src=e!==void 0?e:"";const i=s=>{this.img=s,this._meta.width=s.width,this._meta.height=s.height,this._meta.duration=1/0;const r={...this._meta};return this.width=this.width===0?r.width:this.width,this.height=this.height===0?r.height:this.height,this.duration===0&&r.duration!==1/0&&(this.duration=r.duration,this.display.to=this.display.from+this.duration),r};if(t instanceof ReadableStream)this.ready=new Response(t).blob().then(s=>createImageBitmap(s)).then(i);else if(t instanceof ImageBitmap)this.ready=Promise.resolve(i(t));else if(Array.isArray(t)&&t.every(s=>s instanceof VideoFrame)){this.frames=t;const s=this.frames[0];if(s==null)throw Error("The frame count must be greater than 0");this._meta={width:s.displayWidth,height:s.displayHeight,duration:this.frames.reduce((o,a)=>o+(a.duration??0),0)};const r={...this._meta,duration:1/0};this.width=this.width===0?r.width:this.width,this.height=this.height===0?r.height:this.height,this.duration===0&&r.duration!==1/0&&(this.duration=r.duration,this.display.to=this.display.from+this.duration),this.ready=Promise.resolve(r)}else if("type"in t)this.ready=this.initAnimateImg(t.stream,t.type).then(()=>{const s={width:this._meta.width,height:this._meta.height,duration:1/0};return this.width=this.width===0?s.width:this.width,this.height=this.height===0?s.height:this.height,this.duration===0&&s.duration!==1/0&&(this.duration=s.duration,this.display.to=this.display.from+this.duration),s});else throw Error("Illegal arguments")}async initAnimateImg(t,e){this.frames=await Xi(t,e);const i=this.frames[0];if(i==null)throw Error("No frame available in gif");this._meta={duration:this.frames.reduce((s,r)=>s+(r.duration??0),0),width:i.codedWidth,height:i.codedHeight},Q.info("Image ready:",this._meta)}tickInterceptor=async(t,e)=>e;async tick(t){if(this.img!=null)return await this.tickInterceptor(t,{video:await createImageBitmap(this.img),state:"success"});const e=t%this._meta.duration;return await this.tickInterceptor(t,{video:(this.frames.find(i=>e>=i.timestamp&&e<=i.timestamp+(i.duration??0))??this.frames[0]).clone(),state:"success"})}async split(t){if(await this.ready,this.img!=null)return[new mt(await createImageBitmap(this.img),this.src),new mt(await createImageBitmap(this.img),this.src)];let e=-1;for(let r=0;r<this.frames.length;r++){const o=this.frames[r];if(!(t>o.timestamp)){e=r;break}}if(e===-1)throw Error("Not found frame by time");const i=this.frames.slice(0,e).map(r=>new VideoFrame(r)),s=this.frames.slice(e).map(r=>new VideoFrame(r,{timestamp:r.timestamp-t}));return[new mt(i,this.src),new mt(s,this.src)]}async clone(){await this.ready;const t=this.img==null?this.frames.map(i=>i.clone()):await createImageBitmap(this.img),e=new mt(t,this.src);return e.tickInterceptor=this.tickInterceptor,this.copyStateTo(e),e.id=this.id,e.effects=[...this.effects],e.transition=this.transition,e}addEffect(t){this.effects.push(t)}editEffect(t,e){const i=this.effects.find(s=>s.id===t);i&&Object.assign(i,e)}removeEffect(t){const e=this.effects.findIndex(i=>i.id===t);e!==-1&&this.effects.splice(e,1)}destroy(){Q.info("Image destroy"),this.img?.close(),this.frames.forEach(t=>t.close()),this.pixiTexture=null,super.destroy()}toJSON(t=!1){return{...super.toJSON(t),type:"Image",id:this.id,effects:this.effects}}static async fromObject(t){if(t.type!=="Image")throw new Error(`Expected Image, got ${t.type}`);if(!t.src||t.src.trim()==="")throw new Error("Image requires a valid source URL. Generated clips (like text-to-image) cannot be loaded from JSON without their source data.");let e;try{const i=await gt.getImageBitmap(t.src);e=new mt(i,t.src)}catch(i){throw i instanceof Error&&i.message.includes("could not be decoded")?new Error(`Failed to decode image from ${t.src}. The image may be decoded, in an unsupported format, or there may be CORS issues.`):i}return X.deserializeBaseProperties(e,t),t.effects&&(e.effects=t.effects),e}};function re(l,t){const e={},i=t.videoTracks[0];if(i!=null){const r=ds(l.getTrackById(i.id))?.buffer,o=hs(i.codec);o&&(e.videoTrackConf={timescale:i.timescale,duration:i.duration,width:i.video.width,height:i.video.height,brands:t.brands,type:o.type,[o.descKey]:r}),e.videoDecoderConf={codec:i.codec,codedHeight:i.video.height,codedWidth:i.video.width,description:r}}const s=t.audioTracks[0];if(s!=null){const r=fs(l),o=r?us(r):{};e.audioTrackConf={timescale:s.timescale,samplerate:o.sampleRate??s.audio.sample_rate,channel_count:o.numberOfChannels??s.audio.channel_count,hdlr:"soun",type:s.codec.startsWith("mp4a")?"mp4a":s.codec,description:r};const a=s.codec.startsWith("mp4a")?s.codec:o.codec??(s.codec==="Opus"||s.codec==="opus"?"opus":s.codec);e.audioDecoderConf={codec:a,numberOfChannels:o.numberOfChannels??s.audio.channel_count,sampleRate:o.sampleRate??s.audio.sample_rate,...o.description?{description:o.description}:{}}}return e}function hs(l){return l.startsWith("avc1")?{descKey:"avcDecoderConfigRecord",type:"avc1"}:l.startsWith("hvc1")?{descKey:"hevcDecoderConfigRecord",type:"hvc1"}:null}function ds(l){for(const t of l.mdia.minf.stbl.stsd.entries){const e=t.avcC??t.hvcC??t.av1C??t.vpcC;if(e!=null){const i=new tt.mp4box.DataStream(void 0,0,void 0);return e.write(i),new Uint8Array(i.buffer.slice(8))}}}function fs(l,t="mp4a"){const e=l.moov?.traks.flatMap(i=>i.mdia.minf.stbl.stsd.entries).find(i=>i.type===t);return e?.esds??e}function us(l){const t=l.esd?.descs?.[0];if(!t)return{};let e=`mp4a.${t.oti.toString(16)}`;const i=t.descs?.[0];if(!i)return e.endsWith(".40")&&(e+=".2"),{codec:e};const s=i.data;if(!s)return{codec:e};const r=(s[0]&248)>>3;e+=`.${r}`;const o=(s[0]&7)<<1|s[1]>>7,a=(s[1]&120)>>3;return{codec:e,sampleRate:[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][o],numberOfChannels:a,description:s}}async function ps(l,t,e){const i=tt.mp4box.createFile(!1);i.onReady=o=>{t({mp4boxFile:i,info:o}),[o.videoTracks[0],o.audioTracks[0]].forEach(a=>{if(a){const n=a.video?"video":"audio";i.setExtractionOptions(a.id,n,{nbSamples:100})}}),i.start()},i.onSamples=e;let s=0;const r=30*1024*1024;for(;;){const o=await l.read(r,{at:s});if(o.byteLength===0)break;o.fileStart=s;const a=i.appendBuffer(o);if(a==null)break;s=a}i.stop()}function ms(l){if(l?.length!==9)return{};const t=new Int32Array(l.buffer),e=h=>h/65536,i=e(t[0]),s=e(t[1]),r=e(t[3]),o=e(t[4]),a=e(t[6]),n=e(t[7]),c=t[8]/(1<<30);return{scaleX:Math.sqrt(i*i+r*r),scaleY:Math.sqrt(s*s+o*o),rotationRad:Math.atan2(r,i),rotationDeg:Math.atan2(r,i)*180/Math.PI,translateX:a,translateY:n,perspective:c}}function gs(l,t,e){const i=(Math.round(e/90)*90+360)%360;if(i===0)return c=>c;const s=i===90||i===270,r=s?t:l,o=s?l:t,a=new OffscreenCanvas(r,o),n=a.getContext("2d");return n.translate(r/2,o/2),n.rotate(-i*Math.PI/180),n.translate(-l/2,-t/2),c=>{if(!c)return null;n.drawImage(c,0,0);const h=new VideoFrame(a,{timestamp:c.timestamp,duration:c.duration??void 0});return c.close(),h}}let oe=0;function ne(l){return l.kind==="file"&&l.createReader instanceof Function}class nt extends X{type="Video";insId=oe++;logger=Q.create(`Video id:${this.insId},`);ready;_meta={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};get meta(){return{...this._meta}}localFile;headerBoxPos=[];async getFileHeaderBinData(){await this.ready;const t=await this.localFile.getOriginFile();if(t==null)throw Error("Video localFile is not origin file");return await new Blob(this.headerBoxPos.map(({start:e,size:i})=>t.slice(e,e+i))).arrayBuffer()}parsedMatrix={perspective:1,rotationRad:0,rotationDeg:0,scaleX:1,scaleY:1,translateX:0,translateY:0};vfRotater=t=>t;videoSamples=[];audioSamples=[];videoFrameFinder=null;audioFrameFinder=null;decoderConf={video:null,audio:null};opts={audio:!0};audio=!0;id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;effects=[];getVisibleHandles(){return["tl","tr","bl","br","rot"]}static async fromUrl(t,e={}){const i=await gt.getReadableStream(t),s=new nt(i,{},t);return await s.ready,e.x!==void 0&&(s.left=e.x),e.y!==void 0&&(s.top=e.y),e.width!==void 0&&(s.width=e.width),e.height!==void 0&&(s.height=e.height),s}constructor(t,e={},i){if(super(),this.src=i!==void 0?i:"",!(t instanceof ReadableStream)&&!ne(t)&&!Array.isArray(t.videoSamples))throw Error("Illegal argument");this.opts={audio:!0,...e},this.audio=typeof this.opts.audio=="boolean"?this.opts.audio:!0,this.volume=typeof e.audio=="object"&&"volume"in e.audio?e.audio.volume:e.volume??1;const s=async r=>(await et.write(this.localFile,r),this.localFile);this.localFile=ne(t)?t:"localFile"in t?t.localFile:et.tmpfile(),this.ready=(t instanceof ReadableStream?s(t).then(r=>Ke(r,this.opts)):ne(t)?Ke(t,this.opts):Promise.resolve(t)).then(async({videoSamples:r,audioSamples:o,decoderConf:a,headerBoxPos:n,parsedMatrix:c})=>{this.videoSamples=r,this.audioSamples=o,this.decoderConf=a,this.headerBoxPos=n,this.parsedMatrix=c;const{videoFrameFinder:h,audioFrameFinder:d}=ys({video:a.video==null?null:{...a.video,hardwareAcceleration:this.opts.__unsafe_hardwareAcceleration__},audio:a.audio},await this.localFile.createReader(),r,o,this.opts.audio!==!1?this.volume:0);this.videoFrameFinder=h,this.audioFrameFinder=d;const{codedWidth:u,codedHeight:f}=a.video??{};u&&f&&(this.vfRotater=gs(u,f,c.rotationDeg)),this._meta=vs(a,r,o,c.rotationDeg),this.logger.info("Video meta:",this._meta);const p={...this._meta};this.width=this.width===0?p.width:this.width,this.height=this.height===0?p.height:this.height,this.trim.to=this.trim.to===0?p.duration:Math.min(this.trim.to,p.duration),this.trim.from=Math.min(this.trim.from,this.trim.to);const g=(this.trim.to-this.trim.from)/this.playbackRate;return this.duration=this.duration===0?g:this.duration,Math.abs(this.duration-g)>1&&(this.duration=g),this.display.to=this.display.from+this.duration,this.on("propsChange",v=>{v.volume!==void 0&&this.audioFrameFinder&&this.audioFrameFinder.setVolume(v.volume)}),p})}tickInterceptor=async(t,e)=>e;async tick(t){const e=t+this.trim.from;if(e>this.trim.to||e>this._meta.duration)return await this.tickInterceptor(t,{audio:await this.audioFrameFinder?.find(e)??[],state:"done"});const[i,s]=await Promise.all([this.audioFrameFinder?.find(e)??[],this.videoFrameFinder?.find(e).then(this.vfRotater)]);return s==null?await this.tickInterceptor(t,{audio:i,state:"success"}):await this.tickInterceptor(t,{video:s,audio:i,state:"success"})}addEffect(t){this.effects.push(t)}editEffect(t,e){const i=this.effects.find(s=>s.id===t);i&&Object.assign(i,e)}removeEffect(t){const e=this.effects.findIndex(i=>i.id===t);e!==-1&&this.effects.splice(e,1)}async split(t){throw new Error("Video.split is not implemented - use core state instead")}async clone(){await this.ready;const t=new nt({localFile:this.localFile,videoSamples:[...this.videoSamples],audioSamples:[...this.audioSamples],decoderConf:this.decoderConf,headerBoxPos:this.headerBoxPos,parsedMatrix:this.parsedMatrix},this.opts,this.src);return await t.ready,t.tickInterceptor=this.tickInterceptor,this.copyStateTo(t),t.id=this.id,t.effects=[...this.effects],t}destroy(){this.destroyed||(this.destroyed=!0,this.logger.info("Video destroy"),super.destroy(),this.videoFrameFinder?.destroy(),this.audioFrameFinder?.destroy())}toJSON(t=!1){return{...super.toJSON(t),type:"Video",audio:this.audio,volume:this.volume,id:this.id,effects:this.effects}}static async fromObject(t){if(t.type!=="Video")throw new Error(`Expected Video, got ${t.type}`);const e=t.audio!==void 0?{audio:t.audio,volume:t.volume}:{volume:t.volume},i=await gt.getReadableStream(t.src),s=new nt(i,e,t.src);return X.deserializeBaseProperties(s,t),t.effects&&(s.effects=t.effects),t.volume!==void 0&&(s.volume=t.volume),s}async createPlaybackElement(){await this.ready;const e=this.localFile;if(!e||typeof e.getOriginFile!="function")throw new Error("Video does not have a local file for playback");const i=await e.getOriginFile();if(!i)throw new Error("Failed to get origin file from VideoClip");const s=URL.createObjectURL(i),r=document.createElement("video");return r.crossOrigin="anonymous",r.muted=!0,r.autoplay=!1,r.playsInline=!0,r.preload="auto",r.loop=!1,r.src=s,await new Promise((o,a)=>{const n=()=>{r.removeEventListener("loadeddata",n),r.removeEventListener("error",c),r.pause(),r.currentTime=0,o()},c=()=>{r.removeEventListener("loadeddata",n),r.removeEventListener("error",c),a(new Error("Failed to load video"))};r.addEventListener("loadeddata",n,{once:!0}),r.addEventListener("error",c,{once:!0}),r.load()}),{element:r,objectUrl:s}}async play(t,e){const i=t,s=e+this.trim.from/1e6;if(Math.abs(i.currentTime-s)>.1&&(i.currentTime=s),i.muted=!1,i.paused)try{await i.play()}catch{try{await i.play()}catch(o){console.warn("Failed to play video:",o)}}}pause(t){const e=t;e.pause(),e.muted=!0}async seek(t,e){const i=t,s=e+this.trim.from/1e6;i.pause(),i.currentTime=s,i.addEventListener("seeked",()=>{i.__pendingRender?.()},{once:!0})}syncPlayback(t,e,i){const s=t,r=this.duration&&this.duration!==1/0?this.duration/1e6:(this.display.to-this.display.from)/1e6,o=i>=0&&i<r,a=i+this.trim.from/1e6,n=r*1e3,c=i*1e3;let h=1;if(this.timing.fadeIn&&this.timing.fadeIn.duration>0&&c<this.timing.fadeIn.duration&&(h*=wt(c/this.timing.fadeIn.duration,this.timing.fadeIn.curve)),this.timing.fadeOut&&this.timing.fadeOut.duration>0){const d=n-this.timing.fadeOut.duration;if(c>=d){const u=1-(c-d)/this.timing.fadeOut.duration;h*=wt(u,this.timing.fadeOut.curve)}}s.volume=Math.max(0,Math.min(1,this.volume*h)),e&&o?s.paused?this.play(s,i).catch(console.warn):(s.muted&&(s.muted=!1),(s.ended||s.currentTime>=this.trim.to/1e6)&&(s.currentTime=a,s.play().catch(console.warn))):(s.paused||s.pause(),s.muted=!0,o&&Math.abs(s.currentTime-a)>.1&&(s.currentTime=a))}cleanupPlayback(t,e){const i=t;i.pause(),i.removeAttribute("src"),i.load(),e&&URL.revokeObjectURL(e)}async scaleToFit(t,e){await this.ready;const{width:i,height:s}=this.meta;if(i===0||s===0)return;const r=Math.min(t/i,e/s);this.width=i*r,this.height=s*r}async scaleToFill(t,e){await this.ready;const{width:i,height:s}=this.meta;if(i===0||s===0)return;const r=Math.max(t/i,e/s);this.width=i*r,this.height=s*r}centerInScene(t,e){this.left=(t-this.width)/2,this.top=(e-this.height)/2}}function vs(l,t,e,i){const s={duration:0,width:0,height:0,audioSampleRate:0,audioChanCount:0};if(l.video!=null&&t.length>0){s.width=l.video.codedWidth??0,s.height=l.video.codedHeight??0;const a=(Math.round(i/90)*90+360)%360;(a===90||a===270)&&([s.width,s.height]=[s.height,s.width])}l.audio!=null&&e.length>0&&(s.audioSampleRate=L.sampleRate,s.audioChanCount=L.channelCount);let r=0,o=0;if(t.length>0)for(let a=t.length-1;a>=0;a--){const n=t[a];if(!n.deleted){r=n.cts+n.duration;break}}if(e.length>0){const a=e.at(-1);o=a.cts+a.duration}return s.duration=Math.max(r,o),s}function ys(l,t,e,i,s){return{audioFrameFinder:s===0||l.audio==null||i.length===0?null:new bs(t,i,l.audio,{volume:s,targetSampleRate:L.sampleRate}),videoFrameFinder:l.video==null||e.length===0?null:new xs(t,e,l.video)}}async function Ke(l,t={}){let e=null;const i={video:null,audio:null};let s=[],r=[],o=[];const a={perspective:1,rotationRad:0,rotationDeg:0,scaleX:1,scaleY:1,translateX:0,translateY:0};let n=-1,c=-1;const h=await l.createReader();await ps(h,async u=>{e=u.info;const f=u.mp4boxFile.ftyp;o.push({start:f.start,size:f.size});const p=u.mp4boxFile.moov;o.push({start:p.start,size:p.size}),Object.assign(a,ms(e.videoTracks[0]?.matrix));let{videoDecoderConf:g,audioDecoderConf:v}=re(u.mp4boxFile,u.info);if(i.video=g??null,i.audio=v??null,g==null&&v==null&&Q.error("Video no video and audio track"),v!=null){const{supported:x}=await AudioDecoder.isConfigSupported(v);x||Q.error(`Video audio codec is not supported: ${v.codec}`)}if(g!=null){const{supported:x}=await VideoDecoder.isConfigSupported(g);x||Q.error(`Video video codec is not supported: ${g.codec}`)}Q.info("mp4BoxFile moov ready",{...u.info,tracks:null,videoTracks:null,audioTracks:null},i)},(u,f,p)=>{if(f==="video"){n===-1&&(n=p[0].dts);for(const g of p)s.push(Xe(g,n,"video"))}else if(f==="audio"&&t.audio){c===-1&&(c=p[0].dts);for(const g of p)r.push(Xe(g,c,"audio"))}}),await h.close();const d=s.at(-1)??r.at(-1);if(e==null)throw Error("Video stream is done, but not emit ready");if(d==null)throw Error("Video stream not contain any sample");return Rs(s),Q.info("mp4 stream parsed"),{videoSamples:s,audioSamples:r,decoderConf:i,headerBoxPos:o,parsedMatrix:a}}function Xe(l,t=0,e){let i=l.offset;const s=e==="video"&&l.is_sync?ks(l.data,l.description.type):-1;let r=l.size;return s>0&&(i+=s,r-=s),{...l,is_idr:s>=0,offset:i,size:r,cts:(l.cts-t)/l.timescale*1e6,dts:(l.dts-t)/l.timescale*1e6,duration:l.duration/l.timescale*1e6,timescale:1e6,data:e==="video"?null:l.data}}class xs{constructor(t,e,i){this.localFileReader=t,this.samples=e,this.conf=i}localFileReader;samples;conf;decoder=null;timestamp=0;curAborter={abort:!1,st:performance.now()};find=async t=>{(this.decoder==null||this.decoder.state==="closed"||t<this.timestamp||t-this.timestamp>3e6)&&this.reset(t),this.curAborter.abort=!0,this.timestamp=t,this.curAborter={abort:!1,st:performance.now()};const e=await this.parseFrame(t,this.decoder,this.curAborter);return this.sleepCnt=0,e};lastVfDur=0;downgradeSoftDecode=!1;videoDecCursorIdx=0;videoFrames=[];outputFrameCnt=0;inputChunkCnt=0;sleepCnt=0;predecodeErr=!1;_firstPresentableTs=null;firstPresentableTs(){if(this._firstPresentableTs!=null)return this._firstPresentableTs;let t=this.samples.findIndex(i=>i.is_idr&&!i.deleted);t<0&&(t=0);let e=1/0;for(let i=t;i<this.samples.length;i++){const s=this.samples[i];if(i>t&&s.is_idr)break;!s.deleted&&s.cts<e&&(e=s.cts)}return this._firstPresentableTs=Number.isFinite(e)?e:0,this._firstPresentableTs}parseFrame=async(t,e,i)=>{if(e==null||e.state==="closed"||i.abort)return null;if(this.videoFrames.length>0){const s=this.videoFrames[0];return t<s.timestamp?t<=0||s.timestamp<=this.firstPresentableTs()?new VideoFrame(s):null:(this.videoFrames.shift(),t>s.timestamp+(s.duration??0)?(s.close(),await this.parseFrame(t,e,i)):(!this.predecodeErr&&this.videoFrames.length<10&&this.startDecode(e).catch(r=>{throw this.predecodeErr=!0,this.reset(t),r}),s))}if(this.decoding||this.outputFrameCnt<this.inputChunkCnt&&e.decodeQueueSize>0){if(performance.now()-i.st>6e3)throw Error(`Video.tick video timeout, ${JSON.stringify(this.getState())}`);this.sleepCnt+=1,await Ae(15)}else{if(this.videoDecCursorIdx>=this.samples.length)return null;try{await this.startDecode(e)}catch(s){throw this.reset(t),s}}return await this.parseFrame(t,e,i)};decoding=!1;startDecode=async t=>{if(this.decoding||t.decodeQueueSize>600)return;let e=this.videoDecCursorIdx+1;if(e>this.samples.length)return;this.decoding=!0;let i=!1;for(;e<this.samples.length;e++){const s=this.samples[e];if(!i&&!s.deleted&&(i=!0),s.is_idr)break}if(i){const s=this.samples.slice(this.videoDecCursorIdx,e);if(s[0]?.is_idr!==!0)Q.warn("First sample not idr frame");else{const r=performance.now(),o=await Ss(s,this.localFileReader),a=performance.now()-r;if(a>1e3){const n=s[0],c=s.at(-1),h=c.offset+c.size-n.offset;Q.warn(`Read video samples time cost: ${Math.round(a)}ms, file chunk size: ${h}`)}if(t.state==="closed")return;this.lastVfDur=o[0]?.duration??0,As(t,o,{onDecodingError:n=>{if(this.downgradeSoftDecode)throw n;this.outputFrameCnt===0&&(this.downgradeSoftDecode=!0,Q.warn("Downgrade to software decode"),this.reset())}}),this.inputChunkCnt+=o.length}}this.videoDecCursorIdx=e,this.decoding=!1};reset=t=>{if(this.decoding=!1,this.videoFrames.forEach(i=>i.close()),this.videoFrames=[],t==null||t===0)this.videoDecCursorIdx=0;else{let i=0;for(let s=0;s<this.samples.length;s++){const r=this.samples[s];if(r.is_idr&&(i=s),!(r.cts<t)){this.videoDecCursorIdx=i;break}}}this.inputChunkCnt=0,this.outputFrameCnt=0,this.decoder?.state!=="closed"&&this.decoder?.close();const e={...this.conf,...this.downgradeSoftDecode?{hardwareAcceleration:"prefer-software"}:{}};this.decoder=new VideoDecoder({output:i=>{if(this.outputFrameCnt+=1,i.timestamp===-1){i.close();return}let s=i;i.duration==null&&(s=new VideoFrame(i,{duration:this.lastVfDur}),i.close()),this.videoFrames.push(s)},error:i=>{if(i.message.includes("Codec reclaimed due to inactivity")){this.decoder=null,Q.warn(i.message);return}const s=`VideoFinder VideoDecoder err: ${i.message}, config: ${JSON.stringify(e)}, state: ${JSON.stringify(this.getState())}`;throw Q.error(s),Error(s)}}),this.decoder.configure(e)};getState=()=>({time:this.timestamp,decState:this.decoder?.state,decQSize:this.decoder?.decodeQueueSize,decCursorIdx:this.videoDecCursorIdx,sampleLen:this.samples.length,inputCnt:this.inputChunkCnt,outputCnt:this.outputFrameCnt,cacheFrameLen:this.videoFrames.length,softDecode:this.downgradeSoftDecode,clipIdCnt:oe,sleepCnt:this.sleepCnt,memInfo:qe()});destroy=async()=>{if(this.curAborter.abort=!0,this.videoFrames.forEach(t=>t.close()),this.videoFrames=[],this.decoder&&this.decoder.state!=="closed")try{this.decoder.close()}catch{}this.decoder=null,this.localFileReader.close()}}function ws(l,t){for(let e=0;e<t.length;e++){const i=t[e];if(l>=i.cts&&l<i.cts+i.duration)return e;if(i.cts>l)break}return 0}class bs{constructor(t,e,i,s){this.localFileReader=t,this.samples=e,this.conf=i,this.volume=s.volume,this.sampleRate=s.targetSampleRate}localFileReader;samples;conf;volume=1;sampleRate;setVolume(t){this.volume=t,this.reset()}decoder=null;curAborter={abort:!1,st:performance.now()};find=async t=>{const e=t<=this.timestamp||t-this.timestamp>1e5;(this.decoder==null||this.decoder.state==="closed"||e)&&this.reset(),e&&(this.timestamp=t,this.decCursorIdx=ws(t,this.samples)),this.curAborter.abort=!0;const i=t-this.timestamp;this.timestamp=t,this.curAborter={abort:!1,st:performance.now()};const s=await this.parseFrame(Math.ceil(i*(this.sampleRate/1e6)),this.decoder,this.curAborter);return this.sleepCnt=0,s};timestamp=0;decCursorIdx=0;pcmData={frameCnt:0,data:[]};sleepCnt=0;parseFrame=async(t,e=null,i)=>{if(e==null||i.abort||e.state==="closed"||t===0)return[];const s=this.pcmData.frameCnt-t;if(s>0)return s<L.sampleRate/10&&this.startDecode(e),ae(this.pcmData,t);if(e.decoding){if(performance.now()-i.st>6e4)return console.warn("[Video.tick] Audio decode wait exceeded 60s, using the PCM decoded so far",this.getState()),this.pcmData.frameCnt>0?ae(this.pcmData,this.pcmData.frameCnt):[];this.sleepCnt+=1,await Ae(15)}else{if(this.decCursorIdx>=this.samples.length-1)return ae(this.pcmData,this.pcmData.frameCnt);this.startDecode(e)}return this.parseFrame(t,e,i)};startDecode=t=>{if(t.decodeQueueSize>10)return;const i=[];let s=this.decCursorIdx;for(;s<this.samples.length;){const r=this.samples[s];if(s+=1,!r.deleted&&(i.push(r),i.length>=10))break}this.decCursorIdx=s,t.decode(i.map(r=>new EncodedAudioChunk({type:"key",timestamp:r.cts,duration:r.duration,data:r.data})))};reset=()=>{this.timestamp=0,this.decCursorIdx=0,this.pcmData={frameCnt:0,data:[]},this.decoder?.close(),this.decoder=Cs(this.conf,{resampleRate:L.sampleRate,volume:this.volume},t=>{this.pcmData.data.push(t),this.pcmData.frameCnt+=t[0].length})};getState=()=>({time:this.timestamp,decState:this.decoder?.state,decQSize:this.decoder?.decodeQueueSize,decCursorIdx:this.decCursorIdx,sampleLen:this.samples.length,pcmLen:this.pcmData.frameCnt,clipIdCnt:oe,sleepCnt:this.sleepCnt,memInfo:qe()});destroy=()=>{this.decoder=null,this.curAborter.abort=!0,this.pcmData={frameCnt:0,data:[]},this.localFileReader.close()}}function Cs(l,t,e){let i=0,s=0;const r=h=>{if(s+=1,h.length!==0){if(t.volume!==1)for(const d of h)for(let u=0;u<d.length;u++)d[u]*=t.volume;h.length===1&&(h=[h[0],h[0]]),e(h)}},o=Ts(r),a=t.resampleRate!==l.sampleRate;let n=new AudioDecoder({output:h=>{const d=be(h);a?o(()=>Ai(d,h.sampleRate,{rate:t.resampleRate,chanCount:h.numberOfChannels})):r(d),h.close()},error:h=>{h.message.includes("Codec reclaimed due to inactivity")||c("Video AudioDecoder err",h)}});n.configure(l);function c(h,d){const u=`${h}: ${d.message}, state: ${JSON.stringify({qSize:n.decodeQueueSize,state:n.state,inputCnt:i,outputCnt:s,decoderConf:l,opts:t})}`;throw Q.error(u),Error(u)}return{decode(h){i+=h.length;try{for(const d of h)n.decode(d)}catch(d){c("decode audio chunk error",d)}},close(){n.state!=="closed"&&n.close()},get decoding(){return i>s&&n.decodeQueueSize>0},get state(){return n.state},get decodeQueueSize(){return n.decodeQueueSize}}}function Ts(l){const t=[];let e=0;function i(o,a){t[a]=o,s()}function s(){const o=t[e];o!=null&&(l(o),e+=1,s())}let r=0;return o=>{const a=r;r+=1,o().then(n=>i(n,a)).catch(n=>i(n,a))}}function ae(l,t){const e=[new Float32Array(t),new Float32Array(t)];let i=0,s=0;for(;s<l.data.length;){const[r,o]=l.data[s];if(i+r.length>t){const a=t-i;e[0].set(r.subarray(0,a),i),e[1].set(o.subarray(0,a),i),l.data[s][0]=r.subarray(a,r.length),l.data[s][1]=o.subarray(a,o.length);break}else e[0].set(r,i),e[1].set(o,i),i+=r.length,s++}return l.data=l.data.slice(s),l.frameCnt-=t,e}async function Ss(l,t){const e=l[0],i=l.at(-1);if(i==null)return[];const s=i.offset+i.size-e.offset;if(s<3e7){const r=new Uint8Array(await t.read(s,{at:e.offset}));return l.map(o=>{const a=o.offset-e.offset;return new EncodedVideoChunk({type:o.is_sync?"key":"delta",timestamp:o.cts,duration:o.duration,data:r.subarray(a,a+o.size)})})}return await Promise.all(l.map(async r=>new EncodedVideoChunk({type:r.is_sync?"key":"delta",timestamp:r.cts,duration:r.duration,data:await t.read(r.size,{at:r.offset})})))}function As(l,t,e){if(l.state==="configured"){for(let i=0;i<t.length;i++)l.decode(t[i]);l.flush().catch(i=>{if(!(i instanceof Error))throw i;if(i.message.includes("Decoding error")&&e.onDecodingError!=null){e.onDecodingError(i);return}if(!i.message.includes("Aborted due to close"))throw i})}}function ks(l,t){if(t!=="avc1"&&t!=="hvc1")return 0;const e=new DataView(l.buffer);for(let i=0;i<l.byteLength-4;){if(t==="avc1"){const s=e.getUint8(i+4)&31;if(s===5||s===7||s===8)return i}else if(t==="hvc1"){const s=e.getUint8(i+4)>>1&63;if(s===19||s===20||s===32||s===33||s===34)return i}i+=e.getUint32(i)+4}return-1}const Fs=2e5;function Rs(l){let t=null,e=0;for(const i of l)if(!i.deleted){if(i.is_sync&&e++,e>=2)break;i.is_sync&&(t==null||i.cts<t.cts)&&(t=i)}t!=null&&t.cts<Fs&&(t.duration+=t.cts,t.cts=0)}function qe(){try{const l=performance.memory;return{jsHeapSizeLimit:l.jsHeapSizeLimit,totalJSHeapSize:l.totalJSHeapSize,usedJSHeapSize:l.usedJSHeapSize,percentUsed:(l.usedJSHeapSize/l.jsHeapSizeLimit).toFixed(3),percentTotal:(l.totalJSHeapSize/l.jsHeapSizeLimit).toFixed(3)}}catch{return{}}}class at extends Ze{type="Text";get width(){return this._width}set width(t){Math.abs(this.width-t)<.1||(this._width=t,this._targetWidth=t,this.refreshText().then(()=>{this._explicitHeight?this.emit("propsChange",{width:t}):this.emit("propsChange",{width:t,height:this.height})}))}get height(){return this._height}_explicitHeight=!1;get isExplicitHeight(){return this._explicitHeight}resetHeightToAuto(){this._explicitHeight=!1,this._height=0,this.refreshText().then(()=>{this.emit("propsChange",{height:this.height})})}set height(t){if(Math.abs(this.height-t)<.1)return;const e=t;this._height=t,this.refreshText().then(()=>{const i=this.meta.height,r=e-i<-5;this._explicitHeight=e>0&&(r||this._explicitHeight),this.emit("propsChange",{height:this.height})})}get text(){return this._text}set text(t){this._text!==t&&(this._text=t,this.originalOpts&&this.textStyle&&this.refreshText().then(()=>{this.emit("propsChange",{text:t})}))}get style(){return{fontSize:this.originalOpts.fontSize,fontFamily:this.originalOpts.fontFamily,fontUrl:this.originalOpts.fontUrl,fontWeight:this.originalOpts.fontWeight,fontStyle:this.originalOpts.fontStyle,color:this.originalOpts.color,align:this.originalOpts.align,stroke:this.originalOpts.stroke?typeof this.originalOpts.stroke=="object"?{color:this.originalOpts.stroke.color,width:this.originalOpts.stroke.width,join:this.originalOpts.stroke.join,cap:this.originalOpts.stroke.cap,miterLimit:this.originalOpts.stroke.miterLimit}:{color:this.originalOpts.stroke,width:this.originalOpts.strokeWidth??0}:void 0,shadow:this.originalOpts.shadow?{color:this.originalOpts.shadow.color??"#000000",alpha:this.originalOpts.shadow.alpha??.5,blur:this.originalOpts.shadow.blur??4,offsetX:this.originalOpts.shadow.offsetX??0,offsetY:this.originalOpts.shadow.offsetY??0}:void 0,wordWrap:this.originalOpts.wordWrap,wordWrapWidth:this.originalOpts.wordWrapWidth,lineHeight:this.originalOpts.lineHeight,letterSpacing:this.originalOpts.letterSpacing,textCase:this.originalOpts.textCase,textDecoration:this.originalOpts.textDecoration,background:this.originalOpts.background}}set style(t){this.updateStyle(t)}get textAlign(){return this.originalOpts.align||this.originalOpts.textAlign||"left"}set textAlign(t){this.updateStyle({align:t})}get verticalAlign(){return this.originalOpts.verticalAlign||this.originalOpts.textDecoration||"top"}set verticalAlign(t){["underline","overline","strikethrough","line-through"].includes(t)?(this.updateStyle({textDecoration:t==="strikethrough"?"line-through":t}),this.originalOpts.verticalAlign=t):this.updateStyle({verticalAlign:t})}get textCase(){return this.originalOpts.textCase||"none"}set textCase(t){this.updateStyle({textCase:t})}get underline(){return this.originalOpts.textDecoration==="underline"}set underline(t){this.updateStyle({textDecoration:t?"underline":"none"})}get overline(){return this.originalOpts.textDecoration==="overline"}set overline(t){this.updateStyle({textDecoration:t?"overline":"none"})}get linethrough(){return this.originalOpts.textDecoration==="line-through"}set linethrough(t){this.updateStyle({textDecoration:t?"line-through":"none"})}_targetWidth=0;_wordCache=[];_measuredTextHeight=0;_lineHeightMultiplier=1;_fontSize=40;_textOnlyContainer=null;constructor(t,e={},i){super(),this.originalOpts={...e},this._text=t,i&&this.setRenderer(i),this._buildTextStyles(),this.ready=(async()=>(await this.refreshText(),{...this.meta}))()}_onAfterRefresh(t,e,i,s,r,o){this._populateWordCache(t,e,i,s,r,o)}async clone(){await this.ready;const t=this.textStyle,e=this.originalOpts||{},i=n=>{if(n!=null){if(typeof n=="number")return n;if(n instanceof m.Color)return n.toNumber()}},{stroke:s,strokeWidth:r}=this._cloneStrokeOpts(i),o={fontSize:e.fontSize??t.fontSize,fontFamily:e.fontFamily??(Array.isArray(t.fontFamily)?t.fontFamily[0]:typeof t.fontFamily=="string"?t.fontFamily:"Roboto"),fontUrl:e.fontUrl,fontWeight:e.fontWeight??t.fontWeight,fontStyle:e.fontStyle??t.fontStyle,align:e.align??(t.align==="justify"?"left":t.align),textCase:e.textCase,textDecoration:e.textDecoration,color:this._cloneColorOpts(i),stroke:s,strokeWidth:r,shadow:this._cloneShadowOpts(i)};if(e.wordWrap!==void 0?(o.wordWrap=e.wordWrap,o.wordWrapWidth=e.wordWrapWidth):t.wordWrap&&(o.wordWrap=t.wordWrap,o.wordWrapWidth=t.wordWrapWidth),e.background!==void 0&&(o.background=e.background),e.lineHeight!==void 0)o.lineHeight=e.lineHeight;else if(t.lineHeight!==void 0){const n=o.fontSize??t.fontSize??40;o.lineHeight=t.lineHeight/n}e.letterSpacing!==void 0?o.letterSpacing=e.letterSpacing:t.letterSpacing!==void 0&&(o.letterSpacing=t.letterSpacing);const a=new at(this.text,o);return await a.ready,this.copyStateTo(a),a.id=this.id,a.effects=[...this.effects],a}async updateStyle(t){const e=this._normalizeStyleOpts(t);this.originalOpts={...this.originalOpts,...e},this._buildTextStyles(),await this.refreshText(),this.emit("propsChange",t)}_populateWordCache(t,e,i,s,r,o){this._wordCache=this.wordTexts.map((a,n)=>({text:t[n],width:Math.ceil(a.getLocalBounds().width||a.width),height:Math.ceil(a.getLocalBounds().height||a.height),textObj:a})),this._spaceWidth=i,this._measuredTextHeight=s,this._lineHeightMultiplier=r,this._fontSize=o,this._textOnlyContainer=e}updateLayoutForWidth(t){if(!this._wordCache.length||!this._textOnlyContainer||!this.pixiTextContainer)return this._targetWidth=t,this.refreshText(),{width:this.width,height:this.height};const e=this.originalOpts.background?.paddingX??8,i=this.originalOpts.background?.paddingY??4,s=this._lineHeightMultiplier,o=this._fontSize*s,a=this._measuredTextHeight,n=this._spaceWidth,c=Math.max(1,t-e*2),h=[];let d=[],u=0,f=0;for(let C=0;C<this._wordCache.length;C++){const R=this._wordCache[C],D=R.width,E=R.height,N=u+(u>0?n:0)+D;N<=c||d.length===0?(d.push(C),u=N,f=Math.max(f,E)):(d.length>0&&h.push({wordIndices:d,width:u,height:Math.max(f,o)}),d=[C],u=D,f=E)}d.length>0&&h.push({wordIndices:d,width:u,height:Math.max(f,o)});const p=a+i*2;h.forEach(C=>{C.height=Math.max(C.height,p)});let g=0,v=0;h.forEach(C=>{g=Math.max(g,C.width),v+=C.height});const x=g+e*2,w=v,T=Math.max(x,t),y=w,S=this.textAlign,F=this.originalOpts.verticalAlign||"top";let O=0;F==="center"?O=(y-w)/2:F==="bottom"&&(O=y-w);let k=O;h.forEach(C=>{let R=0;S==="center"?R=(T-C.width)/2:S==="right"?R=T-C.width-e*2:R=e,C.wordIndices.forEach((D,E)=>{const N=this._wordCache[D];N.textObj&&(N.textObj.x=Math.round(R),N.textObj.y=Math.round(k+(C.height-a)/2-9)),R+=N.width+(E<C.wordIndices.length-1?n:0)}),k+=C.height}),this._meta.width=T,this._meta.height=y,this._width=T,this._height=y,this._targetWidth=T;const b=T+(this.renderTexturePadding??0)*2,A=y+(this.renderTexturePadding??0)*2;return this.renderTexture&&(Math.abs(this.renderTexture.width-b)>10||Math.abs(this.renderTexture.height-A)>10)&&this.getTexture(),{width:T,height:y}}toJSON(t=!1){const e=super.toJSON(t),i={};return this.originalOpts.fontSize!==void 0&&(i.fontSize=this.originalOpts.fontSize),this.originalOpts.fontFamily!==void 0&&(i.fontFamily=this.originalOpts.fontFamily),this.originalOpts.fontUrl!==void 0&&(i.fontUrl=this.originalOpts.fontUrl),this.originalOpts.fontWeight!==void 0&&(i.fontWeight=this.originalOpts.fontWeight),this.originalOpts.fontStyle!==void 0&&(i.fontStyle=this.originalOpts.fontStyle),this.originalOpts.color!==void 0&&(i.color=this.originalOpts.color),this.originalOpts.align!==void 0&&(i.align=this.originalOpts.align),this.originalOpts.wordWrap!==void 0&&(i.wordWrap=this.originalOpts.wordWrap),this.originalOpts.wordWrapWidth!==void 0&&(i.wordWrapWidth=this.originalOpts.wordWrapWidth),this.originalOpts.lineHeight!==void 0&&(i.lineHeight=this.originalOpts.lineHeight),this.originalOpts.letterSpacing!==void 0&&(i.letterSpacing=this.originalOpts.letterSpacing),this.originalOpts.background!==void 0&&(i.background=this.originalOpts.background),this.originalOpts.stroke&&(typeof this.originalOpts.stroke=="object"?i.stroke={color:this.originalOpts.stroke.color,width:this.originalOpts.stroke.width,join:this.originalOpts.stroke.join,cap:this.originalOpts.stroke.cap,miterLimit:this.originalOpts.stroke.miterLimit}:i.stroke={color:this.originalOpts.stroke,width:this.originalOpts.strokeWidth??0}),this.originalOpts.shadow&&(i.shadow={color:this.originalOpts.shadow.color??"#000000",alpha:this.originalOpts.shadow.alpha??.5,blur:this.originalOpts.shadow.blur??4,offsetX:this.originalOpts.shadow.offsetX??0,offsetY:this.originalOpts.shadow.offsetY??0}),{...e,type:"Text",text:this.text,style:i,id:this.id,effects:this.effects}}static async fromObject(t){if(t.type!=="Text")throw new Error(`Expected Text, got ${t.type}`);const e=t.text||"",i=t.style||{},s={};i.fontSize!==void 0&&(s.fontSize=i.fontSize),i.fontFamily!==void 0&&(s.fontFamily=i.fontFamily),i.fontUrl!==void 0&&(s.fontUrl=i.fontUrl),i.fontWeight!==void 0&&(s.fontWeight=i.fontWeight),i.fontStyle!==void 0&&(s.fontStyle=i.fontStyle),i.color!==void 0&&(s.color=i.color),i.align!==void 0&&(s.align=i.align),i.wordWrap!==void 0&&(s.wordWrap=i.wordWrap),i.wordWrapWidth!==void 0&&(s.wordWrapWidth=i.wordWrapWidth),i.lineHeight!==void 0&&(s.lineHeight=i.lineHeight),i.letterSpacing!==void 0&&(s.letterSpacing=i.letterSpacing),i.background!==void 0&&(s.background=i.background),i.stroke&&(i.stroke.join||i.stroke.cap||i.stroke.miterLimit!==void 0?s.stroke={color:i.stroke.color,width:i.stroke.width,join:i.stroke.join,cap:i.stroke.cap,miterLimit:i.stroke.miterLimit}:(s.stroke=i.stroke.color,s.strokeWidth=i.stroke.width)),i.shadow&&(s.shadow={color:i.shadow.color,alpha:i.shadow.alpha,blur:i.shadow.blur,offsetX:i.shadow.offsetX??0,offsetY:i.shadow.offsetY??0});const r=new at(e,s);return X.deserializeBaseProperties(r,t),t.effects&&(r.effects=t.effects),await r.ready,r}getVisibleHandles(){return["mr","mb","br","rot"]}}function Ms(l){return l.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,t=>t.toUpperCase())}class lt extends X{type="Effect";ready;_meta={duration:5e6,width:0,height:0};get meta(){return{...this._meta}}id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;effectKey;values={};constructor(t){super(),this.effectKey=t,this.name=Ms(t),this.ready=Promise.resolve(this._meta),this.duration=this._meta.duration}async clone(){const t=new lt(this.effectKey);return this.copyStateTo(t),t.values={...this.values},t}async tick(t){return{video:void 0,state:"success"}}async split(t){const e=await this.clone(),i=await this.clone();return[e,i]}toJSON(t=!1){return{id:this.id,type:"Effect",name:this.name,timing:{display:{from:this.timing.display.from,to:this.timing.display.to},trim:{from:this.timing.trim.from,to:this.timing.trim.to},duration:this.timing.duration,playbackRate:this.timing.playbackRate},effectKey:this.effectKey,values:this.values}}static async fromObject(t){if(t.type!=="Effect")throw new Error(`Expected Effect, got ${t.type}`);const e=t.effectKey;if(!e)throw new Error("Missing effectKey in Effect JSON");const i=new lt(e);return i.values=t.values||{},X.deserializeBaseProperties(i,t),await i.ready,i}}class It extends X{type="Placeholder";meta={width:0,height:0,duration:0};constructor(t,e={},i="Placeholder"){super(),this.type=i,this.src=t,this.meta={width:e.width||1280,height:e.height||720,duration:e.duration||5e6},this.width=this.meta.width,this.height=this.meta.height,this.duration=this.meta.duration,this.trim.to=this.duration,this.display.to=this.display.from+this.duration,this.ready=Promise.resolve(this.meta)}canvas=null;ctx=null;animationRafId=null;renderPending=!1;async tick(t){this.canvas||(this.canvas=document.createElement("canvas"),this.canvas.width=this.meta.width,this.canvas.height=this.meta.height,this.ctx=this.canvas.getContext("2d"));const{canvas:e,ctx:i}=this;if(i){const{width:r,height:o}=e;if(r>0&&o>0){i.fillStyle="#1e1e1e",i.fillRect(0,0,r,o);const a=r/2,n=o/2,c=100,h=c/4,d=performance.now()/2e3*Math.PI*2;i.save();const u=i.createConicGradient(d,a,n);u.addColorStop(0,"#ffffff"),u.addColorStop(.2,"#ffffff"),u.addColorStop(.5,"rgba(255, 255, 255, 0.4)"),u.addColorStop(.8,"rgba(255, 255, 255, 0.1)"),u.addColorStop(1,"rgba(255, 255, 255, 0)"),i.strokeStyle=u,i.lineWidth=h,i.lineCap="round",i.beginPath(),i.arc(a,n,c,d,d+Math.PI*1.5),i.stroke(),i.restore(),i.strokeStyle="#333333",i.lineWidth=10,i.strokeRect(0,0,r,o)}}if(this.renderPending=!1,this.animationRafId===null){const r=()=>{if(this.destroyed){this.animationRafId=null;return}this.renderPending||(this.renderPending=!0,this.emit("request-render")),this.animationRafId=requestAnimationFrame(r)};this.animationRafId=requestAnimationFrame(r)}return{video:e.width>0&&e.height>0?await createImageBitmap(e):null,state:"success",audio:[]}}async clone(){const t=new It(this.src,this.meta);return this.copyStateTo(t),t.id=this.id,t}async split(t){const e=await this.clone(),i=await this.clone();return e.trim.to=t+this.trim.from,i.trim.from=t+this.trim.from,e.duration=e.trim.to-e.trim.from,i.duration=i.trim.to-i.trim.from,e.display.to=e.display.from+e.duration,i.display.from=e.display.to,i.display.to=i.display.from+i.duration,[e,i]}static async fromObject(t){if(t.type!=="Placeholder")throw new Error(`Expected Placeholder, got ${t.type}`);const e=t.timing||{display:t.display||{},trim:t.trim||{},duration:t.duration??0,playbackRate:t.playbackRate??1},i=t.transform?.width??t.width??0,s=t.transform?.height??t.height??0,r=new It(t.src,{width:i,height:s,duration:e.duration});return X.deserializeBaseProperties(r,t),await r.ready,r}}class it extends X{type="Transition";ready;_meta={duration:2e6,width:0,height:0};get meta(){return{...this._meta}}id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;transitionKey;fromClipId=null;toClipId=null;constructor(t){super(),this.transitionKey=t,this.ready=Promise.resolve(this._meta),this.duration=this._meta.duration}async clone(){const t=new it(this.transitionKey);return this.copyStateTo(t),t.fromClipId=this.fromClipId,t.toClipId=this.toClipId,t}async tick(t){return{video:void 0,state:"success"}}async split(t){const e=await this.clone(),i=await this.clone();return[e,i]}toJSON(t=!1){return{id:this.id,type:"Transition",name:this.name,timing:{display:{from:this.timing.display.from,to:this.timing.display.to},trim:{from:this.timing.trim.from,to:this.timing.trim.to},duration:this.timing.duration,playbackRate:this.timing.playbackRate},transitionKey:this.transitionKey,fromClipId:this.fromClipId,toClipId:this.toClipId}}static async fromObject(t){if(t.type!=="Transition")throw new Error(`Expected Transition, got ${t.type}`);const e=t.transitionKey;if(!e)throw new Error("Missing transitionKey in Transition JSON");const i=new it(e);return i.fromClipId=t.fromClipId||null,i.toClipId=t.toClipId||null,X.deserializeBaseProperties(i,t),await i.ready,i}}class Bt extends X{type="Shape";shapeType;graphics;_meta;renderTexture=null;externalRenderer=null;constructor(t){super(),this.shapeType=t.shapeType,this.id=Xt.nanoid(),this.name=`${t.shapeType} Shape`,this.src=`shape://${t.shapeType}`,this.externalRenderer=t.renderer??null,this.width=t.width??200,this.height=t.height??200,this.graphics=new m.Graphics,this._meta={width:this.width,height:this.height,duration:0},this.style={fill:t.fill??"#3b82f6",fillOpacity:t.fillOpacity??1,stroke:t.stroke??{color:"#1e40af",width:2},borderRadius:t.borderRadius??0},this.ready=Promise.resolve(this._meta)}async getRenderer(){if(this.externalRenderer!=null)return this.externalRenderer;throw new Error("ShapeClip: No renderer available. Provide a renderer via options.renderer or setRenderer().")}setRenderer(t){this.externalRenderer=t}async getRenderTexture(){return this.renderTexture==null&&(this.renderTexture=m.RenderTexture.create({width:Math.ceil(this.width),height:Math.ceil(this.height)})),(this.renderTexture.width!==Math.ceil(this.width)||this.renderTexture.height!==Math.ceil(this.height))&&this.renderTexture.resize(Math.ceil(this.width),Math.ceil(this.height)),this.renderTexture}get meta(){return this._meta}drawShape(){const t=this.style;if(this.graphics.clear(),this.drawRectangle(t),t.fill){const e=this.hexToNumber(t.fill);this.graphics.fill({color:e,alpha:t.fillOpacity??1})}if(t.stroke){const e=this.hexToNumber(t.stroke.color);this.graphics.stroke({color:e,width:t.stroke.width,alpha:1})}}drawRectangle(t){const e=t.borderRadius??0;e>0?this.graphics.roundRect(-this.width/2,-this.height/2,this.width,this.height,e):this.graphics.rect(-this.width/2,-this.height/2,this.width,this.height)}hexToNumber(t){const e=t.startsWith("#")?t.slice(1):t;return parseInt(e,16)}async tick(t){await this.ready;const e=await this.getRenderTexture();this.drawShape();const i=await this.getRenderer();this.graphics.x=this.width/2,this.graphics.y=this.height/2,i.render({container:this.graphics,target:e});const s=e.source?.resource?.source;let r;if(s instanceof HTMLCanvasElement||s instanceof OffscreenCanvas)r=await createImageBitmap(s);else{const a=i.extract.canvas(e);if(a instanceof HTMLCanvasElement||a instanceof OffscreenCanvas)r=await createImageBitmap(a);else throw new Error("Unable to extract canvas from render texture")}return{video:r,state:"success"}}async clone(){const t=new Bt({shapeType:this.shapeType,width:this.width,height:this.height,fill:this.style.fill,fillOpacity:this.style.fillOpacity,stroke:this.style.stroke,borderRadius:this.style.borderRadius});return t.left=this.left,t.top=this.top,t.angle=this.angle,t.opacity=this.opacity,t.zIndex=this.zIndex,t.display={...this.display},t.duration=this.duration,t.timing={...this.timing},t}async split(t){const e=await this.clone(),i=await this.clone();return[e,i]}toJSON(t=!1){return{...super.toJSON(t),shapeType:this.shapeType}}set style(t){super.style=t,this.graphics&&this.drawShape()}get style(){return super.style}set width(t){super.width=t,this.graphics&&this.drawShape(),this.renderTexture&&this.renderTexture.resize(Math.ceil(this.width),Math.ceil(this.height))}get width(){return super.width}set height(t){super.height=t,this.graphics&&this.drawShape(),this.renderTexture&&this.renderTexture.resize(Math.ceil(this.width),Math.ceil(this.height))}get height(){return super.height}static async fromObject(t){const e=new Bt({shapeType:t.shapeType,width:t.transform?.width,height:t.transform?.height,fill:t.style?.fill,fillOpacity:t.style?.fillOpacity,stroke:t.style?.stroke,borderRadius:t.style?.borderRadius});return X.deserializeBaseProperties(e,t),e}}const Os=["#6A5AF9","#B14EFF","#FF7A7A"];class Nt extends X{type="Backdrop";backdropType;container;_meta;renderTexture=null;externalRenderer=null;bgGraphics=null;meshContainer=null;meshCircles=[];blobsContainer=null;blobCircles=[];noiseSprite=null;noiseTexture=null;constructor(t){super(),this.backdropType=t.backdropType,this.id=Xt.nanoid(),this.name=`${t.backdropType} Backdrop`,this.src=`backdrop://${t.backdropType}`,this.externalRenderer=t.renderer??null,this.width=t.width??1280,this.height=t.height??720,this.container=new m.Container,this.container.label="BackdropContainer",this._meta={width:this.width,height:this.height,duration:1/0},this.style={backdropType:t.backdropType,colors:t.colors??Os,gradientType:t.gradientType??"linear",speed:t.speed??1,scale:t.scale??1,density:t.density??8},this.ready=Promise.resolve(this._meta),this.rebuildBackdrop()}setRenderer(t){this.externalRenderer=t}async getRenderer(){if(this.externalRenderer!=null)return this.externalRenderer;throw new Error("BackdropClip: No renderer available. Provide a renderer via options.renderer or setRenderer().")}async getRenderTexture(){const t=Math.max(1,Math.ceil(this.width)),e=Math.max(1,Math.ceil(this.height));return this.renderTexture==null&&(this.renderTexture=m.RenderTexture.create({width:t,height:e})),(this.renderTexture.width!==t||this.renderTexture.height!==e)&&this.renderTexture.resize(t,e),this.renderTexture}get meta(){return this._meta}rebuildBackdrop(){this.container.removeChildren(),this.bgGraphics=null,this.meshContainer=null,this.meshCircles=[],this.blobsContainer=null,this.blobCircles=[],this.noiseSprite=null;const t=this.style,e=t.backdropType||this.backdropType;this.backdropType=e;const i=t.colors||["#6A5AF9"],s=i.map(o=>$(o)??16777215),r=()=>{this.bgGraphics=new m.Graphics,this.bgGraphics.rect(0,0,this.width,this.height).fill({color:s[0]}),this.container.addChild(this.bgGraphics)};if(e==="solid")r();else if(e==="gradient")if((t.gradientType??"linear")==="radial"){const o=document.createElement("canvas");o.width=Math.max(1,Math.ceil(this.width)),o.height=Math.max(1,Math.ceil(this.height));const a=o.getContext("2d"),n=this.width/2,c=this.height/2,h=Math.min(this.width,this.height)/2,d=a.createRadialGradient(n,c,0,n,c,h);i.forEach((u,f)=>d.addColorStop(f/Math.max(1,i.length-1),u)),a.fillStyle=d,a.fillRect(0,0,this.width,this.height),this.container.addChild(new m.Sprite(m.Texture.from(o)))}else{this.bgGraphics=new m.Graphics;const o=new m.FillGradient(0,0,this.width,this.height);s.forEach((a,n)=>o.addColorStop(n/Math.max(1,s.length-1),a)),this.bgGraphics.rect(0,0,this.width,this.height).fill(o),this.container.addChild(this.bgGraphics)}else if(e==="meshGradient"){r(),this.meshContainer=new m.Container,this.meshContainer.label="MeshContainer";const o=Math.max(3,s.length),a=Math.max(this.width,this.height)*.35;this.meshContainer.filters=[new m.BlurFilter({strength:a})];for(let n=0;n<o;n++){const c=new m.Graphics,h=Math.max(this.width,this.height)*(.35+Math.random()*.15);c.circle(0,0,h).fill({color:s[n%s.length],alpha:.8});const d={graphics:c,baseX:this.width*(.2+Math.random()*.6),baseY:this.height*(.2+Math.random()*.6),phase:Math.random()*Math.PI*2,speedX:.3+Math.random()*.4,speedY:.3+Math.random()*.4,radius:h};c.x=d.baseX,c.y=d.baseY,this.meshContainer.addChild(c),this.meshCircles.push(d)}this.container.addChild(this.meshContainer)}else if(e==="floatingBlobs"){r(),this.blobsContainer=new m.Container,this.blobsContainer.label="BlobsContainer";const o=Math.max(4,t.density??8),a=s.slice(1).length>0?s.slice(1):s,n=Math.max(this.width,this.height)*.08;this.blobsContainer.filters=[new m.BlurFilter({strength:n})];for(let c=0;c<o;c++){const h=new m.Graphics,d=Math.max(this.width,this.height)*(.1+Math.random()*.12);h.circle(0,0,d).fill({color:a[c%a.length],alpha:.6});const u={graphics:h,baseX:this.width*Math.random(),baseY:this.height*Math.random(),phase:Math.random()*Math.PI*2,speedX:.2+Math.random()*.3,speedY:.2+Math.random()*.3,radius:d};h.x=u.baseX,h.y=u.baseY,this.blobsContainer.addChild(h),this.blobCircles.push(u)}this.container.addChild(this.blobsContainer)}else if(e==="noise"){if(r(),!this.noiseTexture){const o=document.createElement("canvas");o.width=256,o.height=256;const a=o.getContext("2d"),n=a.createImageData(256,256),c=n.data;for(let h=0;h<c.length;h+=4){const d=Math.floor(Math.random()*255);c[h]=d,c[h+1]=d,c[h+2]=d,c[h+3]=18}a.putImageData(n,0,0),this.noiseTexture=m.Texture.from(o)}this.noiseSprite=new m.TilingSprite({texture:this.noiseTexture,width:this.width,height:this.height}),this.noiseSprite.tileScale.set(t.scale??1),this.container.addChild(this.noiseSprite)}}async tick(t){await this.ready;const e=await this.getRenderTexture(),i=await this.getRenderer(),s=t/1e6*(this.style.speed??1);if(this.backdropType==="meshGradient"&&this.meshCircles.length>0){const a=this.style.scale??1;for(const n of this.meshCircles){const c=s*n.speedX+n.phase,h=s*n.speedY+n.phase*1.5;n.graphics.x=n.baseX+Math.cos(c)*(this.width*.25*a),n.graphics.y=n.baseY+Math.sin(h)*(this.height*.25*a)}}if(this.backdropType==="floatingBlobs"&&this.blobCircles.length>0){const a=this.style.scale??1;for(const n of this.blobCircles){const c=s*n.speedX+n.phase,h=s*n.speedY+n.phase*1.3;n.graphics.x=(n.baseX+Math.sin(c)*(this.width*.35*a)+this.width)%this.width,n.graphics.y=(n.baseY+Math.cos(h)*(this.height*.35*a)+this.height)%this.height}}this.backdropType==="noise"&&this.noiseSprite&&(this.noiseSprite.tilePosition.x=Math.random()*256,this.noiseSprite.tilePosition.y=Math.random()*256),i.render({container:this.container,target:e});const r=e.source?.resource?.source;let o;if(r instanceof HTMLCanvasElement||r instanceof OffscreenCanvas)o=await createImageBitmap(r);else{const a=i.extract.canvas(e);if(a instanceof HTMLCanvasElement||a instanceof OffscreenCanvas)o=await createImageBitmap(a);else throw new Error("Unable to extract canvas from render texture")}return{video:o,state:"success"}}async clone(){const t=new Nt({backdropType:this.backdropType,width:this.width,height:this.height,colors:this.style.colors,gradientType:this.style.gradientType,speed:this.style.speed,scale:this.style.scale,density:this.style.density});return t.left=this.left,t.top=this.top,t.angle=this.angle,t.opacity=this.opacity,t.zIndex=this.zIndex,t.display={...this.display},t.duration=this.duration,t.timing={...this.timing},t}async split(t){return[await this.clone(),await this.clone()]}toJSON(t=!1){return{...super.toJSON(t),backdropType:this.backdropType}}set style(t){super.style=t,this.container&&this.rebuildBackdrop()}get style(){return super.style}set width(t){super.width=t,this.container&&this.rebuildBackdrop(),this.renderTexture?.resize(Math.max(1,Math.ceil(this.width)),Math.max(1,Math.ceil(this.height)))}get width(){return super.width}set height(t){super.height=t,this.container&&this.rebuildBackdrop(),this.renderTexture?.resize(Math.max(1,Math.ceil(this.width)),Math.max(1,Math.ceil(this.height)))}get height(){return super.height}static async fromObject(t){const e=new Nt({backdropType:t.backdropType,width:t.transform?.width,height:t.transform?.height,colors:t.style?.colors,gradientType:t.style?.gradientType,speed:t.style?.speed,scale:t.style?.scale,density:t.style?.density});return X.deserializeBaseProperties(e,t),e}}class st{static registry=new Map;static register(t,e){this.registry.set(t,e)}static get(t){return this.registry.get(t)}static getRegisteredTypes(){return Array.from(this.registry.keys())}}st.register("Video",nt),st.register("Audio",dt),st.register("Image",Pt),st.register("Text",at),st.register("Caption",pt),st.register("Effect",lt),st.register("Transition",it),st.register("Placeholder",It),st.register("Shape",Bt),st.register("Backdrop",Nt);function _e(l,t){let e=!1;async function i(){const s=l.getReader();for(;!e;){const{value:r,done:o}=await s.read();if(o){t.onDone();return}await t.onChunk(r)}s.releaseLock(),await l.cancel()}return i().catch(console.error),()=>{e=!0}}class $e{readable;writable;inputBufOffset=0;isStreamCancelled=!1;constructor(){const t=tt.mp4box.createFile();this.readable=new ReadableStream({start:e=>this.initMP4Box(t,e),cancel:()=>{this.isStreamCancelled=!0,t.stop()}},{highWaterMark:50}),this.writable=new WritableStream({write:async e=>{if(this.isStreamCancelled)throw new Error("Stream cancelled");const i=e.buffer;i.fileStart=this.inputBufOffset,this.inputBufOffset+=i.byteLength,t.appendBuffer(i)},close:()=>{t.flush(),t.stop(),t.onFlush?.()},abort:e=>{Es.error("SampleTransform writable aborted:",e),t.stop()}})}initMP4Box(t,e){t.onReady=s=>{[s.videoTracks[0],s.audioTracks[0]].forEach(r=>{r&&t.setExtractionOptions(r.id,r.video?"video":"audio",{nbSamples:100})}),e.enqueue({chunkType:"ready",data:{info:s,file:t}}),t.start()};const i={};t.onSamples=(s,r,o)=>{const a=o.map(n=>({...n}));e.enqueue({chunkType:"samples",data:{id:s,type:r,samples:a}}),i[s]=(i[s]??0)+o.length,t.releaseUsedSamples(s,i[s])},t.onFlush=()=>{e.close()},t.onError=s=>{e.error(new Error(`mp4box error: ${s}`))}}}const Es={error:(...l)=>console.error("[SampleTransform]",...l)};function Ds(l){let t=0;const e=l.boxes,i=[];let s=0;async function r(){const p=f(e,t);t=e.length,i.forEach(({track:g,id:v})=>{const x=g.samples.at(-1);x!=null&&(s=Math.max(s,x.cts+x.duration)),l.releaseUsedSamples(v,g.samples.length),g.samples=[]}),l.mdats=[],l.moofs=[],p!=null&&await h?.write(p)}let o=[];function a(){if(o.length>0)return!0;const p=e.findIndex(g=>g.type==="moov");if(p===-1)return!1;if(o=e.slice(0,p+1),t=p+1,i.length===0)for(let g=1;;g+=1){const v=l.getTrackById(g);if(v==null)break;i.push({track:v,id:g})}return!0}let n=0;const c=et.tmpfile();let h=null;const d=(async()=>{h=await c.createWriter(),n=self.setInterval(()=>{a()&&r()},100)})();let u=!1;return async()=>{if(u)throw Error("File exported");if(u=!0,await d,clearInterval(n),!a()||h==null)return null;l.flush(),await r(),await h?.close();const p=o.find(x=>x.type==="moov");if(p==null)return null;p.mvhd.duration=s;const g=et.tmpfile(),v=f(o,0);return await et.write(g,v.slice()),await et.write(g,c,{overwrite:!1}),await g.stream()};function f(p,g){if(g>=p.length)return null;const v=new tt.mp4box.DataStream;for(let x=g;x<p.length;x++)p[x]!==null&&(p[x].write(v),delete p[x]);return new Uint8Array(v.buffer).slice()}}function Ps(l){const t=new ArrayBuffer(l.byteLength);l.copyTo(t);const e=l.timestamp;return{duration:l.duration??0,dts:e,cts:e,is_sync:l.type==="key",data:t}}async function ti(l){const t=tt.mp4box.createFile(),e=Ds(t);await Is(l,t);const i=await e();if(i==null)throw Error("Can not generate file from streams");return i}async function Is(l,t){let e=0,i=0,s=0,r=0,o=0,a=0,n=null,c=null;for(const h of l){let d=null,u=null,f=null,p=null;if(await new Promise(async g=>{_e(h.pipeThrough(new $e),{onDone:g,onChunk:async({chunkType:v,data:x})=>{if(v==="ready"){const{videoTrackConf:w,audioTrackConf:T}=re(x.file,x.info);e===0&&w!=null&&(e=t.addTrack(w)),r===0&&T!=null&&(r=t.addTrack(T))}else if(v==="samples"){const{type:w,samples:T}=x,y=w==="video"?e:r,S=w==="video"?i:o,F=w==="video"?s:a;T.forEach(k=>{let b,A;w==="video"?(d===null&&(d=k.dts,u=k.cts),b=k.dts-d,A=k.cts-(u??0)):(f===null&&(f=k.dts,p=k.cts),b=k.dts-f,A=k.cts-(p??0)),t.addSample(y,new Uint8Array(k.data),{duration:k.duration,dts:b+S,cts:A+F,is_sync:k.is_sync})});const O=T.at(-1);if(O==null)return;w==="video"?n=O:w==="audio"&&(c=O)}}})}),n!=null&&d!==null&&u!==null){const g=n.dts-d+n.duration,v=n.cts-u+n.duration;i+=g,s+=v}if(c!=null&&n!=null){const g=c.timescale/n.timescale;o=Math.round(i*g),a=Math.round(s*g)}}}async function Bs(l){return await ti([l])}function Ns(l){let t=[];const e=new AudioDecoder({output:i=>{t.push(i)},error:Q.error});return e.configure(l),{decode:async i=>{i.forEach(r=>{e.decode(new EncodedAudioChunk({type:r.is_sync?"key":"delta",timestamp:1e6*r.cts/r.timescale,duration:1e6*r.duration/r.timescale,data:r.data}))}),await e.flush();const s=t;return t=[],s},close:()=>{e.close()}}}function zs(l,t){const e={codec:l.codec,sampleRate:l.sampleRate,numberOfChannels:l.numberOfChannels},i=new AudioEncoder({output:o=>{t(Ps(o))},error:o=>{Q.error("AudioEncoder error:",o,", config:",e)}});i.configure(e);let s=null;function r(o,a){return new AudioData({timestamp:a,numberOfChannels:l.numberOfChannels,numberOfFrames:o.length/l.numberOfChannels,sampleRate:l.sampleRate,format:"f32-planar",data:new Float32Array(o)})}return{encode:async(o,a)=>{s!=null&&i.encode(r(s.data,s.ts)),s={data:o,ts:a}},stop:async()=>{s!=null&&(Ls(s.data,l.numberOfChannels,l.sampleRate),i.encode(r(s.data,s.ts)),s=null),await i.flush(),i.close()}}}function Ls(l,t,e){const i=l.length-1,s=Math.min(e/2,i);for(let r=0;r<s;r++)for(let o=1;o<=t;o++)l[Math.floor(i/o)-r]*=r/s}function Hs(l,t){Q.info("mixinMP4AndAudio, opts:",{volume:t.volume,loop:t.loop});const e=tt.mp4box.createFile();let i,s=0,r=0;const o=e.boxes;let a=!1;const n=()=>{if(!a)if(o.find(C=>C.type==="moof")!=null)a=!0;else return null;if(r>=o.length)return null;const k=new tt.mp4box.DataStream;let b=r;try{for(;b<o.length;)o[b].write(k),delete o[b],b+=1}catch(C){throw C}if(e.moov!=null){for(var A=0;A<e.moov.traks.length;A++)e.moov.traks[A].samples=[];e.mdats=[],e.moofs=[]}return r=o.length,new Uint8Array(k.buffer)};let c=!1,h=!1,d=null;i=new ReadableStream({start(k){s=self.setInterval(()=>{const b=n();b!=null&&!h&&k.enqueue(b)},500),d=b=>{if(clearInterval(s),e.flush(),b!=null){k.error(b);return}const A=n();A!=null&&!h&&k.enqueue(A),h||k.close()}},cancel(){h=!0,clearInterval(s)}});const u=k=>{c||(c=!0,d?.(k))};let f=null,p=null,g=[],v=0,x=0,w=0,T=!0,y=L.sampleRate;_e(l.pipeThrough(new $e),{onDone:async()=>{await p?.stop(),f?.close(),u()},onChunk:async({chunkType:k,data:b})=>{if(k==="ready"){const{videoTrackConf:A,audioTrackConf:C,audioDecoderConf:R}=re(b.file,b.info);v===0&&A!=null&&(v=e.addTrack(A));const D=C??{timescale:1e6,samplerate:y,channel_count:L.channelCount,hdlr:"soun",name:"SoundHandler",type:"mp4a"};x===0&&(x=e.addTrack(D),y=C?.samplerate??y,T=C!=null);const E=new AudioContext({sampleRate:y});g=qt(await E.decodeAudioData(await new Response(t.stream).arrayBuffer())),R!=null&&(f=Ns(R)),p=zs(R??{codec:D.type==="mp4a"?L.codec:D.type,numberOfChannels:D.channel_count,sampleRate:D.samplerate},N=>e.addSample(x,new Uint8Array(N.data),N))}else if(k==="samples"){const{id:A,type:C,samples:R}=b;if(C==="video"){R.forEach(D=>e.addSample(A,new Uint8Array(D.data),D)),T||await F(R);return}C==="audio"&&await O(R)}}});function S(k){const b=g.map(A=>t.loop?_t(A,w,w+k):A.slice(w,w+k));if(w+=k,t.volume!==1)for(const A of b)for(let C=0;C<A.length;C++)A[C]*=t.volume;return b}async function F(k){const b=k[0],A=k[k.length-1],C=Math.floor((A.cts+A.duration-b.cts)/b.timescale*y),R=Ce([S(C)]);R.length!==0&&p?.encode(R,b.cts/b.timescale*1e6)}async function O(k){if(f==null)return;const b=(await f.decode(k)).map(be),A=Ci(b),C=S(A[0].length),R=k[0];p?.encode(Ce([A,C]),R.cts/R.timescale*1e6)}return i}function Gs(l){const t={...l};if(t.timing?t.timing={display:t.timing.display||{from:0,to:0},trim:t.timing.trim||{from:0,to:0},duration:t.timing.duration??0,playbackRate:t.timing.playbackRate??1,fadeIn:t.timing.fadeIn??l.fadeIn,fadeOut:t.timing.fadeOut??l.fadeOut}:t.timing={display:l.display||{from:0,to:0},trim:l.trim||{from:0,to:0},duration:l.duration??0,playbackRate:l.playbackRate??1,fadeIn:l.fadeIn,fadeOut:l.fadeOut},delete t.fadeIn,delete t.fadeOut,t.transform)t.transform={x:t.transform.x??0,y:t.transform.y??0,width:t.transform.width??0,height:t.transform.height??0,angle:t.transform.angle??0,opacity:t.transform.opacity??1,zIndex:t.transform.zIndex??0,flip:t.transform.flip||null};else{const e=l;t.transform={x:e.left??0,y:e.top??0,width:e.width??0,height:e.height??0,angle:e.angle??0,opacity:e.opacity??1,zIndex:e.zIndex??0,flip:e.flip||null}}return t.style&&(t.style=Us(t.style,l.type)),t}function Us(l,t){if(!l)return l;const e={...l};if(e.dropShadow&&(e.shadow=e.dropShadow,delete e.dropShadow),e.shadow){const i={...e.shadow},s=i.offsetX!==void 0||i.offsetY!==void 0;if((i.distance!==void 0||i.angle!==void 0)&&!s){const o=i.distance??0,a=i.angle??0;i.offsetX=Math.cos(a)*o,i.offsetY=Math.sin(a)*o}delete i.distance,delete i.angle,e.shadow=i}return(t==="Text"||t==="Caption")&&e.fill!==void 0&&(e.color=e.fill,delete e.fill),e}function zt(l,t=!1){return l.toJSON(t)}async function vt(l,t){const e=Gs(l);let i;const s=st.get(e.type);if(s&&typeof s.fromObject=="function")i=await s.fromObject(e,t);else throw new Error(`Unsupported clip type or missing fromObject: ${e.type}`);if(e.animations&&Array.isArray(e.animations)){i.clearAnimations();for(const r of e.animations)i.addAnimation(r.type,r.options,r.params)}return e.id&&(i.id=e.id),e.name&&(i.name=e.name),e.metadata&&(i.metadata=e.metadata),i}const ei=new MessageChannel;function ii(){return new Promise(l=>{ei.port1.onmessage=()=>l(),ei.port2.postMessage(null)})}const Ws=20;async function Vs(l){for(;l()>Ws;)await ii()}const Ys=`
185
+ in vec2 vTextureCoord;
186
+ in vec4 vColor;
187
+
188
+ uniform sampler2D uTexture;
189
+ uniform float uTime;
190
+ uniform float rotationCount;
191
+
192
+ void main(void)
193
+ {
194
+ vec2 center = vec2(0.35, 0.35);
195
+ vec2 uvs = vTextureCoord.xy - center;
196
+
197
+ // Rotación en función de la cantidad de vueltas
198
+ float angle = uTime * rotationCount * 6.28318530718;
199
+
200
+ float cosAngle = cos(angle);
201
+ float sinAngle = sin(angle);
202
+ mat2 rotation = mat2(cosAngle, -sinAngle, sinAngle, cosAngle);
203
+
204
+ uvs = rotation * uvs;
205
+ uvs += center;
206
+
207
+ if (uvs.x < 0.0 || uvs.x > 1.0 || uvs.y < 0.0 || uvs.y > 1.0) {
208
+ discard;
209
+ }
210
+
211
+ vec4 fg = texture2D(uTexture, uvs);
212
+ gl_FragColor = fg;
213
+ }
214
+ `,Qs={uTime:{value:0,type:"f32"},rotationCount:{value:4,type:"f32"}},js=`
215
+ in vec2 vTextureCoord;
216
+ in vec4 vColor;
217
+
218
+ uniform sampler2D uTexture;
219
+ uniform float uTime;
220
+ uniform float maxIntensity;
221
+
222
+ void main(void)
223
+ {
224
+ vec2 uvs = vTextureCoord.xy;
225
+ vec4 color = texture2D(uTexture, uvs);
226
+
227
+ float intensity = (sin(uTime) * 0.5 + 0.5) * maxIntensity;
228
+
229
+ vec3 sepiaColor;
230
+ sepiaColor.r = dot(color.rgb, vec3(0.393, 0.769, 0.189));
231
+ sepiaColor.g = dot(color.rgb, vec3(0.349, 0.686, 0.168));
232
+ sepiaColor.b = dot(color.rgb, vec3(0.272, 0.534, 0.131));
233
+
234
+ color.rgb = mix(color.rgb, sepiaColor, intensity);
235
+
236
+ gl_FragColor = color;
237
+ }
238
+ `,Js={uTime:{value:0,type:"f32"},maxIntensity:{value:1,type:"f32"}},Zs=`
239
+ in vec2 vTextureCoord;
240
+ in vec4 vColor;
241
+
242
+ uniform sampler2D uTexture;
243
+ uniform float uTime;
244
+ uniform float intensity;
245
+ uniform float sliceCount;
246
+ uniform float rgbShift;
247
+
248
+ float rand(float n) { return fract(sin(n) * 43758.5453123); }
249
+ float rand2(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }
250
+
251
+ void main(void)
252
+ {
253
+ vec2 uv = vTextureCoord.xy;
254
+
255
+ float sliceId = floor(uv.y * sliceCount);
256
+ float sliceShift = (rand(sliceId + uTime * 10.0) - 0.5) * 0.2 * intensity;
257
+
258
+ uv.x += sliceShift;
259
+
260
+ float rShift = rgbShift * intensity;
261
+ float gShift = -rgbShift * 0.5 * intensity;
262
+ float bShift = rgbShift * 0.75 * intensity;
263
+
264
+ vec3 col;
265
+ col.r = texture2D(uTexture, uv + vec2(rShift, 0.0)).r;
266
+ col.g = texture2D(uTexture, uv + vec2(gShift, 0.0)).g;
267
+ col.b = texture2D(uTexture, uv + vec2(bShift, 0.0)).b;
268
+
269
+ float noise = rand2(vec2(uTime * 50.0, uv.y * 100.0));
270
+ float noiseIntensity = noise * 0.15 * intensity;
271
+
272
+ col += noiseIntensity;
273
+
274
+ gl_FragColor = vec4(col, 1.0);
275
+ }
276
+ `,Ks={uTime:{value:0,type:"f32"},intensity:{value:.5,type:"f32"},sliceCount:{value:12,type:"f32"},rgbShift:{value:.01,type:"f32"}},si=`
277
+ in vec2 vTextureCoord;
278
+ in vec4 vColor;
279
+
280
+ uniform sampler2D uTexture;
281
+ uniform float pixelSize;
282
+ uniform float uTime;
283
+ uniform float jitterStrength;
284
+
285
+ float hash(vec2 p) {
286
+ return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453);
287
+ }
288
+
289
+ void main(void)
290
+ {
291
+ vec2 uv = vTextureCoord.xy;
292
+
293
+ vec2 pixelUV = floor(uv / pixelSize) * pixelSize;
294
+
295
+ float n1 = hash(pixelUV + uTime * 1.5);
296
+ float n2 = hash(pixelUV * 2.3 + uTime * 1.7);
297
+
298
+ vec2 jitter = (vec2(n1, n2) - 0.5) * jitterStrength * pixelSize;
299
+
300
+ vec2 finalUV = pixelUV + jitter;
301
+
302
+ finalUV = clamp(finalUV, 0.0, 1.0);
303
+ vec4 color = texture2D(uTexture, finalUV);
304
+
305
+ gl_FragColor = color;
306
+ }
307
+ `,ri={pixelSize:{value:.02,type:"f32"},uTime:{value:0,type:"f32"},jitterStrength:{value:.8,type:"f32"}},Xs=`
308
+ precision highp float;
309
+
310
+ varying vec2 vTextureCoord;
311
+
312
+ uniform sampler2D uTexture;
313
+ uniform float uTime;
314
+ uniform float glitchStrength;
315
+ uniform float glitchSpeed;
316
+
317
+ float hash(vec2 p) {
318
+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);
319
+ }
320
+
321
+ float rand2(vec2 p) {
322
+ return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453);
323
+ }
324
+
325
+ void main(void)
326
+ {
327
+ vec2 uv = vTextureCoord;
328
+
329
+ vec4 base = texture2D(uTexture, uv);
330
+ if (base.a < 0.01) {
331
+ gl_FragColor = base;
332
+ return;
333
+ }
334
+
335
+ float lineNoise =
336
+ hash(vec2(floor(uv.y * 300.0), uTime * glitchSpeed));
337
+
338
+ float rOffset =
339
+ (hash(vec2(uTime, 1.0)) - 0.5) * glitchStrength;
340
+
341
+ float gOffset =
342
+ (hash(vec2(uTime, 2.0)) - 0.5) * glitchStrength * 0.5;
343
+
344
+ float bOffset =
345
+ (hash(vec2(uTime, 3.0)) - 0.5) * glitchStrength;
346
+
347
+ float rShift = rOffset * lineNoise;
348
+ float gShift = gOffset * lineNoise;
349
+ float bShift = bOffset * lineNoise;
350
+
351
+ vec2 uvR = clamp(uv + vec2(rShift, 0.0), 0.0, 1.0);
352
+ vec2 uvG = clamp(uv + vec2(gShift, 0.0), 0.0, 1.0);
353
+ vec2 uvB = clamp(uv + vec2(bShift, 0.0), 0.0, 1.0);
354
+
355
+ vec3 col;
356
+ col.r = texture2D(uTexture, uvR).r;
357
+ col.g = texture2D(uTexture, uvG).g;
358
+ col.b = texture2D(uTexture, uvB).b;
359
+
360
+ float noise =
361
+ (rand2(vec2(uTime * 50.0, uv.y * 100.0)) - 0.5) * 0.15;
362
+
363
+ col += noise;
364
+
365
+ gl_FragColor = vec4(col, base.a);
366
+ }
367
+ `,qs={uTime:{value:0,type:"f32"},glitchStrength:{value:.02,type:"f32"},glitchSpeed:{value:2,type:"f32"}},_s=`
368
+ precision highp float;
369
+
370
+ varying vec2 vTextureCoord;
371
+
372
+ uniform sampler2D uTexture;
373
+ uniform float shiftAmount;
374
+ uniform float angle;
375
+ uniform float uTime;
376
+ uniform float wobbleAmount;
377
+ uniform float wobbleSpeed;
378
+
379
+ void main(void)
380
+ {
381
+ vec2 uv = vTextureCoord;
382
+
383
+ vec4 base = texture2D(uTexture, uv);
384
+
385
+ if (base.a < 0.01) {
386
+ gl_FragColor = base;
387
+ return;
388
+ }
389
+
390
+ vec2 dir = vec2(cos(angle), sin(angle));
391
+ float wobble = sin(uTime * wobbleSpeed) * wobbleAmount;
392
+
393
+ vec2 rUV = uv + dir * shiftAmount + vec2(wobble, 0.0);
394
+ vec2 gUV = uv;
395
+ vec2 bUV = uv - dir * shiftAmount - vec2(wobble, 0.0);
396
+
397
+ rUV = clamp(rUV, 0.0, 1.0);
398
+ gUV = clamp(gUV, 0.0, 1.0);
399
+ bUV = clamp(bUV, 0.0, 1.0);
400
+
401
+ float r = texture2D(uTexture, rUV).r;
402
+ float g = texture2D(uTexture, gUV).g;
403
+ float b = texture2D(uTexture, bUV).b;
404
+
405
+ gl_FragColor = vec4(r, g, b, base.a);
406
+ }
407
+ `,$s={shiftAmount:{value:.01,type:"f32"},angle:{value:0,type:"f32"},uTime:{value:0,type:"f32"},wobbleAmount:{value:.003,type:"f32"},wobbleSpeed:{value:20,type:"f32"}},tr=`
408
+ in vec2 vTextureCoord;
409
+ in vec4 vColor;
410
+
411
+ uniform sampler2D uTexture;
412
+ uniform float dotSize;
413
+ uniform float intensity;
414
+ uniform float angle;
415
+ uniform float uTime;
416
+ uniform float vibrateStrength;
417
+
418
+ float luminance(vec3 c) {
419
+ return dot(c, vec3(0.299, 0.587, 0.114));
420
+ }
421
+
422
+ void main(void)
423
+ {
424
+ vec2 uv = vTextureCoord.xy;
425
+
426
+ float ca = cos(angle);
427
+ float sa = sin(angle);
428
+ mat2 rot = mat2(ca, -sa, sa, ca);
429
+ vec2 rotatedUV = rot * (uv - 0.5) + 0.5;
430
+ vec2 grid = rotatedUV / dotSize;
431
+ vec2 cell = floor(grid) + 0.5;
432
+
433
+ vec2 cellCenter = cell * dotSize;
434
+
435
+ float jitter = sin(uTime * 10.0 + cell.x * 12.989 + cell.y * 78.233) * 0.5;
436
+ float dist = distance(rotatedUV, cellCenter + jitter * vibrateStrength * dotSize);
437
+ vec4 texColor = texture2D(uTexture, uv);
438
+ float lum = luminance(texColor.rgb);
439
+ float radius = (1.0 - lum) * dotSize * 0.5;
440
+ float mask = smoothstep(radius, radius * 0.8, dist);
441
+
442
+ vec3 halftone = texColor.rgb * mask;
443
+ texColor.rgb = mix(texColor.rgb, halftone, intensity);
444
+
445
+ gl_FragColor = texColor;
446
+ }
447
+ `,er={dotSize:{value:.03,type:"f32"},intensity:{value:1,type:"f32"},angle:{value:0,type:"f32"},uTime:{value:0,type:"f32"},vibrateStrength:{value:.2,type:"f32"}},ir=`
448
+ in vec2 vTextureCoord;
449
+ in vec4 vColor;
450
+
451
+ uniform sampler2D uTexture;
452
+ uniform float uTime;
453
+ uniform float amplitude;
454
+ uniform float frequency;
455
+ uniform float speed;
456
+ uniform int direction;
457
+
458
+ void main(void)
459
+ {
460
+ vec2 uv = vTextureCoord.xy;
461
+
462
+ vec2 offset = vec2(0.0);
463
+
464
+ if(direction == 0) {
465
+ offset.y = sin((uv.x + uTime * speed) * frequency * 6.2831853) * amplitude;
466
+ } else {
467
+ offset.x = sin((uv.y + uTime * speed) * frequency * 6.2831853) * amplitude;
468
+ }
469
+
470
+ vec4 color = texture2D(uTexture, uv + offset);
471
+ gl_FragColor = color;
472
+ }
473
+ `,sr={uTime:{value:0,type:"f32"},amplitude:{value:.02,type:"f32"},frequency:{value:3,type:"f32"},speed:{value:.5,type:"f32"},direction:{value:0,type:"i32"}},rr=`
474
+ in vec2 vTextureCoord;
475
+ in vec4 vColor;
476
+
477
+ uniform sampler2D uTexture;
478
+ uniform float uTime; // tiempo para animación
479
+ uniform vec3 shineColor; // color de los rayos
480
+ uniform float rayWidth; // grosor del rayo
481
+ uniform float rayCount; // cantidad de rayos
482
+ uniform float rotationSpeed; // velocidad de rotación
483
+
484
+ void main(void)
485
+ {
486
+ vec2 uv = vTextureCoord.xy;
487
+ vec2 center = vec2(0.3, 0.35);
488
+
489
+ vec2 dir = uv - center;
490
+
491
+ float angle = atan(dir.y, dir.x);
492
+
493
+ angle += uTime * rotationSpeed;
494
+
495
+ float normAngle = fract(angle / 6.28318530718); // 2π
496
+
497
+ float rays = sin(normAngle * rayCount * 6.28318530718);
498
+
499
+ float intensity = smoothstep(0.0, rayWidth, rays) - smoothstep(rayWidth, rayWidth*1.5, rays);
500
+
501
+ vec4 color = texture2D(uTexture, uv);
502
+
503
+ color.rgb += shineColor * intensity;
504
+
505
+ gl_FragColor = color;
506
+ }
507
+ `,or={uTime:{value:0,type:"f32"},shineColor:{value:[1,1,1],type:"vec3<f32>"},rayWidth:{value:.05,type:"f32"},rayCount:{value:12,type:"f32"},rotationSpeed:{value:.5,type:"f32"}},nr=`
508
+ in vec2 vTextureCoord;
509
+ in vec4 vColor;
510
+
511
+ uniform sampler2D uTexture;
512
+ uniform float uTime;
513
+ uniform float blinkSpeed;
514
+ uniform float minIntensity;
515
+ uniform float maxIntensity;
516
+
517
+ void main(void)
518
+ {
519
+ vec2 uv = vTextureCoord.xy;
520
+ vec4 color = texture2D(uTexture, uv);
521
+ float t = sin(uTime * blinkSpeed * 6.2831853) * 0.5 + 0.5;
522
+ float intensity = mix(minIntensity, maxIntensity, t);
523
+
524
+ color.rgb *= intensity;
525
+
526
+ gl_FragColor = color;
527
+ }
528
+ `,ar={uTime:{value:0,type:"f32"},blinkSpeed:{value:2,type:"f32"},minIntensity:{value:.3,type:"f32"},maxIntensity:{value:1,type:"f32"}},lr=`
529
+ in vec2 vTextureCoord;
530
+ in vec4 vColor;
531
+
532
+ uniform sampler2D uTexture;
533
+ uniform float uTime;
534
+ uniform float frequency;
535
+ uniform float damping;
536
+ uniform float strength;
537
+
538
+ void main(void)
539
+ {
540
+ vec2 uv = vTextureCoord.xy;
541
+
542
+ float spring = exp(-damping * uTime) *
543
+ sin(uTime * frequency * 6.2831853);
544
+
545
+ uv.x += spring * strength;
546
+ uv.y += spring * strength * 0.5;
547
+
548
+ vec4 color = texture2D(uTexture, uv);
549
+
550
+ gl_FragColor = color;
551
+ }
552
+ `,cr={uTime:{value:0,type:"f32"},frequency:{value:2,type:"f32"},damping:{value:.8,type:"f32"},strength:{value:.04,type:"f32"}},hr=`
553
+ in vec2 vTextureCoord;
554
+ in vec4 vColor;
555
+
556
+ uniform sampler2D uTexture;
557
+ uniform vec3 colorA;
558
+ uniform vec3 colorB;
559
+ uniform float intensity;
560
+
561
+ void main(void)
562
+ {
563
+ vec2 uv = vTextureCoord.xy;
564
+
565
+ vec4 tex = texture2D(uTexture, uv);
566
+ float gray = dot(tex.rgb, vec3(0.299, 0.587, 0.114));
567
+ vec3 duo = mix(colorA, colorB, gray);
568
+ tex.rgb = mix(tex.rgb, duo, intensity);
569
+ gl_FragColor = tex;
570
+ }
571
+ `,dr={colorA:{value:[.1,.1,.5],type:"vec3<f32>"},colorB:{value:[1,.8,.2],type:"vec3<f32>"},intensity:{value:1,type:"f32"}},fr=`
572
+ in vec2 vTextureCoord;
573
+ in vec4 vColor;
574
+
575
+ uniform sampler2D uTexture;
576
+ uniform vec3 colorShadow;
577
+ uniform vec3 colorMid;
578
+ uniform vec3 colorHighlight;
579
+
580
+ uniform float intensity;
581
+
582
+ void main(void)
583
+ {
584
+ vec2 uv = vTextureCoord.xy;
585
+ vec4 tex = texture2D(uTexture, uv);
586
+ float gray = dot(tex.rgb, vec3(0.299, 0.587, 0.114));
587
+
588
+
589
+ vec3 duoA = mix(colorShadow, colorMid, smoothstep(0.0, 0.5, gray));
590
+ vec3 duoB = mix(colorMid, colorHighlight, smoothstep(0.5, 1.0, gray));
591
+ vec3 tritone = mix(duoA, duoB, smoothstep(0.33, 0.66, gray));
592
+ tex.rgb = mix(tex.rgb, tritone, intensity);
593
+
594
+ gl_FragColor = tex;
595
+ }
596
+ `,ur={colorShadow:{value:[.1,0,.3],type:"vec3<f32>"},colorMid:{value:[.2,.8,.8],type:"vec3<f32>"},colorHighlight:{value:[1,.9,.4],type:"vec3<f32>"},intensity:{value:1,type:"f32"}},pr=`
597
+ in vec2 vTextureCoord;
598
+ in vec4 vColor;
599
+
600
+ uniform sampler2D uTexture;
601
+ uniform float uTime;
602
+ uniform float amount;
603
+
604
+ vec3 hueShift(vec3 color, float angle) {
605
+ float cosA = cos(angle);
606
+ float sinA = sin(angle);
607
+ mat3 rot = mat3(
608
+ 0.299 + 0.701 * cosA + 0.168 * sinA,
609
+ 0.587 - 0.587 * cosA + 0.330 * sinA,
610
+ 0.114 - 0.114 * cosA - 0.497 * sinA,
611
+
612
+ 0.299 - 0.299 * cosA - 0.328 * sinA,
613
+ 0.587 + 0.413 * cosA + 0.035 * sinA,
614
+ 0.114 - 0.114 * cosA + 0.292 * sinA,
615
+
616
+ 0.299 - 0.300 * cosA + 1.250 * sinA,
617
+ 0.587 - 0.588 * cosA - 1.050 * sinA,
618
+ 0.114 + 0.886 * cosA - 0.203 * sinA
619
+ );
620
+
621
+ return color * rot;
622
+ }
623
+
624
+ void main(void)
625
+ {
626
+ vec2 uv = vTextureCoord.xy;
627
+ vec4 tex = texture2D(uTexture, uv);
628
+
629
+ vec3 shifted = hueShift(tex.rgb, uTime*2.5);
630
+
631
+ tex.rgb = mix(tex.rgb, shifted, amount);
632
+
633
+ gl_FragColor = tex;
634
+ }
635
+ `,mr={uTime:{value:0,type:"f32"},amount:{value:1,type:"f32"}},gr=`
636
+ in vec2 vTextureCoord;
637
+ in vec4 vColor;
638
+
639
+ uniform sampler2D uTexture;
640
+ uniform float uTime;
641
+ uniform float uStrength;
642
+ uniform float swirl;
643
+
644
+ void main(void)
645
+ {
646
+ vec2 uv = vTextureCoord.xy;
647
+ vec2 center = vec2(0.5, 0.5);
648
+ vec2 dir = uv - center;
649
+ float dist = length(dir);
650
+ float warpAmount = pow(dist, 2.0) * uStrength * uTime;
651
+ float angle = swirl * uTime * 6.283185;
652
+
653
+ float s = sin(angle * dist);
654
+ float c = cos(angle * dist);
655
+
656
+ mat2 rot = mat2(c, -s, s, c);
657
+ vec2 warpedUV = center + rot * dir * (1.0 - warpAmount);
658
+ vec4 color = texture2D(uTexture, warpedUV);
659
+
660
+ gl_FragColor = color;
661
+ }
662
+ `,vr={uTime:{value:0,type:"f32"},uStrength:{value:.8,type:"f32"},swirl:{value:.3,type:"f32"}},yr=`
663
+ in vec2 vTextureCoord;
664
+ in vec4 vColor;
665
+
666
+ uniform sampler2D uTexture;
667
+ uniform float uTime;
668
+ uniform float uStrength;
669
+ uniform int direction;
670
+
671
+ void main(void)
672
+ {
673
+ vec2 uv = vTextureCoord.xy;
674
+ float offset;
675
+ if(direction == 0) {
676
+ offset = (uv.y - 0.5) * uStrength * uTime;
677
+ uv.x += offset;
678
+ } else {
679
+ offset = (uv.x - 0.5) * uStrength * uTime;
680
+ uv.y += offset;
681
+ }
682
+
683
+ vec4 color = texture2D(uTexture, uv);
684
+
685
+ gl_FragColor = color;
686
+ }
687
+ `,xr={uTime:{value:0,type:"f32"},uStrength:{value:.2,type:"f32"},direction:{value:0,type:"i32"}},wr=`
688
+ in vec2 vTextureCoord;
689
+ in vec4 vColor;
690
+
691
+ uniform sampler2D uTexture;
692
+ uniform float uTime;
693
+ uniform float uStrength;
694
+ uniform float uNoise;
695
+ uniform int direction;
696
+
697
+ float hash(float n) {
698
+ return fract(sin(n) * 43758.5453);
699
+ }
700
+
701
+ float hash(vec2 p) {
702
+ return fract(sin(dot(p ,vec2(12.9898,78.233))) * 43758.5453);
703
+ }
704
+
705
+ void main(void)
706
+ {
707
+ vec2 uv = vTextureCoord.xy;
708
+
709
+ float offset;
710
+ if(direction == 0) {
711
+ offset = (uv.y - 0.5) * uStrength * uTime;
712
+ uv.x += offset;
713
+ } else {
714
+ offset = (uv.x - 0.5) * uStrength * uTime;
715
+ uv.y += offset;
716
+ }
717
+
718
+ float jitter = (hash(floor(uv * 100.0) + uTime) - 0.5) * uNoise;
719
+ if(direction == 0) {
720
+ uv.x += jitter;
721
+ } else {
722
+ uv.y += jitter;
723
+ }
724
+
725
+ float rOffset = (hash(uv + 1.0) - 0.5) * uNoise * 0.5;
726
+ float gOffset = (hash(uv + 2.0) - 0.5) * uNoise * 0.5;
727
+ float bOffset = (hash(uv + 3.0) - 0.5) * uNoise * 0.5;
728
+
729
+ vec4 texR = texture2D(uTexture, uv + vec2(rOffset, 0.0));
730
+ vec4 texG = texture2D(uTexture, uv + vec2(gOffset, 0.0));
731
+ vec4 texB = texture2D(uTexture, uv + vec2(bOffset, 0.0));
732
+
733
+ gl_FragColor = vec4(texR.r, texG.g, texB.b, 1.0);
734
+ }
735
+ `,br={uTime:{value:0,type:"f32"},uStrength:{value:.2,type:"f32"},uNoise:{value:.05,type:"f32"},direction:{value:0,type:"i32"}},Cr=`
736
+ in vec2 vTextureCoord;
737
+ in vec4 vColor;
738
+
739
+ uniform sampler2D uTexture;
740
+ uniform float uTime;
741
+ uniform float maxPixelSize;
742
+
743
+ void main(void)
744
+ {
745
+ vec2 uv = vTextureCoord.xy;
746
+ float pixelSize = maxPixelSize * uTime;
747
+ pixelSize = max(pixelSize, 0.001);
748
+ vec2 pixelUV = floor(uv / pixelSize) * pixelSize;
749
+
750
+ vec4 color = texture2D(uTexture, pixelUV);
751
+
752
+ gl_FragColor = color;
753
+ }
754
+ `,Tr={uTime:{value:0,type:"f32"},maxPixelSize:{value:.05,type:"f32"}},Sr=`
755
+ in vec2 vTextureCoord;
756
+ in vec4 vColor;
757
+
758
+ uniform sampler2D uTexture;
759
+ uniform float uTime;
760
+ uniform float maxBlur;
761
+
762
+ void main(void)
763
+ {
764
+ vec2 uv = vTextureCoord.xy;
765
+ vec4 color = vec4(0.0);
766
+ float blur = maxBlur * (1.0 - uTime);
767
+
768
+ if(blur < 0.001) {
769
+ color = texture2D(uTexture, uv);
770
+ } else {
771
+ vec2 offsets[9];
772
+ offsets[0] = vec2(-blur, -blur);
773
+ offsets[1] = vec2(0.0, -blur);
774
+ offsets[2] = vec2(blur, -blur);
775
+ offsets[3] = vec2(-blur, 0.0);
776
+ offsets[4] = vec2(0.0, 0.0);
777
+ offsets[5] = vec2(blur, 0.0);
778
+ offsets[6] = vec2(-blur, blur);
779
+ offsets[7] = vec2(0.0, blur);
780
+ offsets[8] = vec2(blur, blur);
781
+
782
+ for(int i = 0; i < 9; i++) {
783
+ color += texture2D(uTexture, uv + offsets[i]);
784
+ }
785
+
786
+ color /= 9.0;
787
+ }
788
+
789
+ gl_FragColor = color;
790
+ }
791
+ `,Ar={uTime:{value:0,type:"f32"},maxBlur:{value:.01,type:"f32"}},kr=`
792
+ precision highp float;
793
+
794
+ varying vec2 vTextureCoord;
795
+
796
+ uniform sampler2D uTexture;
797
+ uniform float amount;
798
+
799
+ void main(void)
800
+ {
801
+ vec2 uv = vTextureCoord;
802
+ vec4 tex = texture2D(uTexture, uv);
803
+
804
+ vec3 inverted = vec3(1.0) - tex.rgb;
805
+
806
+ float strength = amount * tex.a;
807
+
808
+ tex.rgb = mix(tex.rgb, inverted, strength);
809
+
810
+ gl_FragColor = tex;
811
+ }
812
+ `,Fr={amount:{value:1,type:"f32"}},Rr=`
813
+ in vec2 vTextureCoord;
814
+ in vec4 vColor;
815
+
816
+ uniform sampler2D uTexture;
817
+ uniform float amount;
818
+
819
+ void main(void)
820
+ {
821
+ vec2 uv = vTextureCoord.xy;
822
+ vec4 tex = texture2D(uTexture, uv);
823
+ float gray = dot(tex.rgb, vec3(0.299, 0.587, 0.114));
824
+ vec3 grayscale = vec3(gray);
825
+
826
+ tex.rgb = mix(tex.rgb, grayscale, amount);
827
+
828
+ gl_FragColor = tex;
829
+ }
830
+ `,Mr={amount:{value:1,type:"f32"}},Or=`
831
+ in vec2 vTextureCoord;
832
+
833
+ uniform sampler2D uTexture;
834
+ uniform float uIntensity;
835
+ uniform float uSoftness;
836
+
837
+ void main(void)
838
+ {
839
+ vec2 uv = vTextureCoord.xy;
840
+
841
+ vec2 centered = uv - vec2(0.5);
842
+ float dist = length(centered);
843
+ float vignette = smoothstep(0.5, 0.5 - uSoftness, dist);
844
+ vec4 color = texture(uTexture, uv);
845
+ color.rgb *= 1.0 - (vignette * uIntensity);
846
+
847
+ gl_FragColor = color;
848
+ }
849
+ `,Er={uIntensity:{value:.5,type:"f32"},uSoftness:{value:.2,type:"f32"}},Dr=`
850
+ in vec2 vTextureCoord;
851
+
852
+ uniform sampler2D uTexture;
853
+ uniform float uIntensity;
854
+ uniform vec2 uDirection;
855
+
856
+ void main(void)
857
+ {
858
+ vec2 uv = vTextureCoord;
859
+ vec2 offset = uDirection * uIntensity;
860
+ float r = texture(uTexture, uv + offset).r;
861
+ float g = texture(uTexture, uv).g;
862
+ float b = texture(uTexture, uv - offset).b;
863
+ vec4 color = vec4(r, g, b, 1.0);
864
+
865
+ gl_FragColor = color;
866
+ }
867
+ `,Pr={uIntensity:{value:.005,type:"f32"},uDirection:{value:[1,0],type:"vec2<f32>"}},Ir=`
868
+ in vec2 vTextureCoord;
869
+ in vec4 vColor;
870
+
871
+ uniform sampler2D uTexture;
872
+ uniform float uTime;
873
+ uniform float rotationCount;
874
+
875
+ uniform float swirlStrength;
876
+ uniform float swirlRadius;
877
+ uniform float rainbowIntensity;
878
+
879
+ vec3 hsv2rgb(vec3 c)
880
+ {
881
+ vec3 rgb = clamp( abs(mod(c.x*6.0 + vec3(0.0,4.0,2.0), 6.0) - 3.0) - 1.0,
882
+ 0.0,
883
+ 1.0 );
884
+ return c.z * mix(vec3(1.0), rgb, c.y);
885
+ }
886
+
887
+ float flamePattern(float dist, float angle, float time) {
888
+ return pow(sin(dist * 10.0 - time * 5.0 + angle * 5.0) * 0.5 + 0.5, 2.0);
889
+ }
890
+
891
+ void main(void)
892
+ {
893
+ vec2 center = vec2(0.3, 0.45);
894
+ vec2 uvs = vTextureCoord - center;
895
+
896
+ // fade del rainbow (0 cuando uTime >= 0.75)
897
+ float fadeRainbow = clamp(1.0 - smoothstep(0.7, 0.75, uTime), 0.0, 1.0);
898
+
899
+ // fade de swirl, wave y blur (disminuye entre 0.8 y 1.0)
900
+ float fadeMotion = clamp(1.0 - smoothstep(0.8, 1.0, uTime), 0.0, 1.0);
901
+
902
+ // ángulo total acumulado para mantener la dirección del giro
903
+ float angleTotal = uTime * rotationCount * 6.2831853;
904
+
905
+ float cosA = cos(angleTotal);
906
+ float sinA = sin(angleTotal);
907
+ mat2 rotation = mat2(cosA, -sinA, sinA, cosA);
908
+ vec2 rotatedUV = rotation * uvs + center;
909
+
910
+ float dist = distance(rotatedUV, center);
911
+ float d = clamp(dist / swirlRadius, 0.0, 1.0);
912
+
913
+ // swirl disminuye suavemente sin invertir la dirección
914
+ float swirlAngle = swirlStrength * d * d * 6.2831853 * fadeMotion;
915
+ float cosS = cos(swirlAngle);
916
+ float sinS = sin(swirlAngle);
917
+
918
+ vec2 dir = rotatedUV - center;
919
+ rotatedUV = vec2(
920
+ dir.x * cosS - dir.y * sinS,
921
+ dir.x * sinS + dir.y * cosS
922
+ ) + center;
923
+
924
+ float wave = sin(dist * 12.0 - uTime * 4.0) * 0.015 * fadeMotion;
925
+ rotatedUV += wave * normalize(dir);
926
+
927
+ // blur de la textura
928
+ vec4 color = vec4(0.0);
929
+ float blurAmount = (0.004 + rotationCount * 0.001) * fadeMotion;
930
+
931
+ for (int i = -3; i <= 3; i++) {
932
+ float offset = float(i) * blurAmount;
933
+ vec2 blurUV = rotatedUV + vec2(offset * cosA, offset * sinA);
934
+ color += texture2D(uTexture, blurUV);
935
+ }
936
+ color /= 7.0;
937
+
938
+ // rainbow
939
+ float rainbowScale = 0.05;
940
+ float ang = atan(dir.y, dir.x);
941
+ float hue = (ang / 6.2831853) + 0.5 + dist * rainbowScale;
942
+ hue += uTime * 0.2 + rotationCount * 0.05;
943
+
944
+ vec3 rainbow = hsv2rgb(vec3(hue, 0.35, 1.0));
945
+ color.rgb = mix(color.rgb, rainbow, rainbowIntensity * fadeRainbow);
946
+
947
+ // Flame disminuye con fadeMotion
948
+ float flame = flamePattern(dist, ang, uTime) * fadeMotion;
949
+ vec3 flameColor = vec3(1.0, 0.5, 0.0) * flame;
950
+ flameColor = mix(flameColor, vec3(1.0,1.0,0.2), flame * 0.5);
951
+ color.rgb += flameColor * 0.3;
952
+
953
+ if (rotatedUV.x < 0.0 || rotatedUV.x > 1.0 || rotatedUV.y < 0.0 || rotatedUV.y > 1.0) {
954
+ discard;
955
+ }
956
+
957
+ gl_FragColor = color;
958
+ }
959
+
960
+ `,Br={uTime:{value:0,type:"f32"},rotationCount:{value:4,type:"f32"},swirlStrength:{value:.9,type:"f32"},swirlRadius:{value:1,type:"f32"},rainbowIntensity:{value:.25,type:"f32"}},Nr=`
961
+ in vec2 vTextureCoord;
962
+
963
+ uniform sampler2D uTexture;
964
+ uniform float amplitude;
965
+ uniform float speed;
966
+ uniform float uTime;
967
+
968
+ void main() {
969
+ vec2 p = vTextureCoord;
970
+ vec2 center = vec2(0.28, 0.45);
971
+
972
+ vec2 dir = p - center;
973
+ float dist = length(dir);
974
+
975
+ vec2 offset = vec2(0.0);
976
+
977
+ if (dist <= uTime) {
978
+ offset = dir * sin(dist * amplitude - uTime * speed);
979
+ }
980
+
981
+ gl_FragColor = texture2D(uTexture, p + offset);
982
+ }
983
+ `,zr={uTime:{value:0,type:"f32"},amplitude:{value:30,type:"f32"},speed:{value:30,type:"f32"}},Lr=`
984
+ precision mediump float;
985
+
986
+ uniform sampler2D uTexture;
987
+ uniform float persp;
988
+ uniform float unzoom;
989
+ uniform float reflection;
990
+ uniform float floating;
991
+ uniform float uTime;
992
+
993
+ varying vec2 vTextureCoord;
994
+
995
+ bool inBounds(vec2 p) {
996
+ return all(greaterThanEqual(p, vec2(0.0))) &&
997
+ all(lessThanEqual(p, vec2(1.0)));
998
+ }
999
+
1000
+ vec2 project(vec2 p) {
1001
+ return p * vec2(1.0, -1.2) + vec2(0.0, -floating / 100.0);
1002
+ }
1003
+
1004
+ vec2 xskew(vec2 p, float persp, float center) {
1005
+ float x = mix(p.x, 1.0 - p.x, center);
1006
+
1007
+ return (
1008
+ (
1009
+ vec2(
1010
+ x,
1011
+ (p.y - 0.5*(1.0-persp) * x) /
1012
+ (1.0+(persp-1.0)*x)
1013
+ )
1014
+ - vec2(0.5 - abs(center - 0.5), 0.0)
1015
+ )
1016
+ * vec2(
1017
+ 0.5 / abs(center - 0.5) * (center < 0.5 ? 1.0 : -1.0),
1018
+ 1.0
1019
+ )
1020
+ + vec2(center < 0.5 ? 0.0 : 1.0, 0.0)
1021
+ );
1022
+ }
1023
+
1024
+ void main() {
1025
+ vec2 p = vTextureCoord;
1026
+
1027
+ float uz = unzoom * sin(uTime * 0.5);
1028
+ p = -uz * 0.5 + (1.0 + uz) * p;
1029
+
1030
+ vec2 warped = xskew(p, persp, 0.0);
1031
+
1032
+ vec4 baseColor = vec4(0.0);
1033
+
1034
+ if (inBounds(warped)) {
1035
+ baseColor = texture2D(uTexture, warped);
1036
+ }
1037
+
1038
+ vec2 proj = project(warped);
1039
+ if (inBounds(proj)) {
1040
+ vec4 refl = texture2D(uTexture, proj);
1041
+ refl.rgb *= reflection * (1.0 - proj.y);
1042
+ baseColor += refl;
1043
+ }
1044
+
1045
+ gl_FragColor = baseColor;
1046
+ }
1047
+
1048
+ `,Hr={uTime:{value:0,type:"f32"},persp:{value:.7,type:"f32"},unzoom:{value:.3,type:"f32"},reflection:{value:0,type:"f32"},floating:{value:3,type:"f32"}},Gr=`
1049
+ in vec2 vTextureCoord;
1050
+
1051
+ uniform sampler2D uTexture;
1052
+ uniform float uTime;
1053
+ uniform float radius;
1054
+ uniform float spinPower;
1055
+ uniform float speed;
1056
+
1057
+ void main() {
1058
+ vec2 uv = vTextureCoord;
1059
+ vec2 center = vec2(0.28, 0.45);
1060
+
1061
+ vec2 pos = uv - center;
1062
+
1063
+ float dist = length(pos);
1064
+
1065
+ if (dist < radius) {
1066
+ float percent = (radius - dist) / radius;
1067
+
1068
+ float theta = percent * percent * spinPower * sin(uTime * speed);
1069
+
1070
+ float s = sin(theta);
1071
+ float c = cos(theta);
1072
+
1073
+ pos = vec2(
1074
+ pos.x * c - pos.y * s,
1075
+ pos.x * s + pos.y * c
1076
+ );
1077
+ }
1078
+
1079
+ uv = pos + center;
1080
+
1081
+ gl_FragColor = texture2D(uTexture, uv);
1082
+ }
1083
+ `,Ur={uTime:{value:0,type:"f32"},radius:{value:1,type:"f32"},spinPower:{value:18,type:"f32"},speed:{value:4,type:"f32"}},Wr=`
1084
+ in vec2 vTextureCoord;
1085
+
1086
+ uniform sampler2D uTexture;
1087
+ uniform float uTime;
1088
+
1089
+ uniform float speed;
1090
+ uniform float intensity;
1091
+ uniform int endx;
1092
+ uniform int endy;
1093
+
1094
+ #define PI 3.14159265358979323
1095
+
1096
+ float rand(vec2 v) {
1097
+ return fract(sin(dot(v.xy , vec2(12.9898,78.233))) * 43758.5453);
1098
+ }
1099
+
1100
+ vec2 rotate2d(vec2 v, float a) {
1101
+ mat2 rm = mat2(cos(a), -sin(a),
1102
+ sin(a), cos(a));
1103
+ return rm * v;
1104
+ }
1105
+
1106
+ void main() {
1107
+ vec2 uv = vTextureCoord;
1108
+
1109
+ vec2 p = uv - 0.5;
1110
+
1111
+ float t = sin(uTime * speed) * 0.5 + 0.5;
1112
+
1113
+ float warp = 1.0 + intensity * abs(t - 0.5);
1114
+
1115
+ vec2 rp = p * warp;
1116
+ float tx = float(endx) + 0.5;
1117
+ float ty = float(endy) + 0.5;
1118
+
1119
+ vec2 shifted = mix(vec2(0.5, 0.5), vec2(tx, ty), t*t);
1120
+
1121
+ vec2 tiled = fract(rp + shifted);
1122
+
1123
+ vec2 cell = floor(rp + shifted);
1124
+
1125
+ bool isEnd = int(cell.x) == endx && int(cell.y) == endy;
1126
+
1127
+ if (!isEnd) {
1128
+ float rnd = rand(cell);
1129
+ float angle = float(int(rnd * 4.0)) * 0.5 * PI;
1130
+ tiled = vec2(0.5) + rotate2d(tiled - vec2(0.5), angle);
1131
+ }
1132
+ gl_FragColor = texture2D(uTexture, tiled);
1133
+ }
1134
+ `,Vr={uTime:{value:0,type:"f32"},speed:{value:2,type:"f32"},intensity:{value:1.5,type:"f32"},endx:{value:2,type:"i32"},endy:{value:-1,type:"i32"}},Yr=`
1135
+ precision highp float;
1136
+
1137
+ in vec2 vTextureCoord;
1138
+ uniform sampler2D uTexture;
1139
+ uniform float uTime;
1140
+
1141
+ vec2 mirrorTile(vec2 st, float zoom) {
1142
+ st *= zoom;
1143
+
1144
+ if (fract(st.y * 0.5) > 0.5) {
1145
+ st.x = st.x + 0.5;
1146
+ st.y = 1.0 - st.y;
1147
+ }
1148
+
1149
+ return fract(st);
1150
+ }
1151
+
1152
+ float zigzag(vec2 st) {
1153
+ float x = st.x * 2.0;
1154
+ float a = floor(1.0 + sin(x * 3.14159));
1155
+ float b = floor(1.0 + sin((x + 1.0) * 3.14159));
1156
+ float f = fract(x);
1157
+ return mix(a, b, f);
1158
+ }
1159
+
1160
+ void main() {
1161
+ vec2 st = vTextureCoord;
1162
+
1163
+ st = mirrorTile(st * vec2(1.0, 2.0), 5.0);
1164
+
1165
+ float zz = zigzag(st);
1166
+
1167
+ st.y += zz * 0.03;
1168
+
1169
+ vec4 tex = texture(uTexture, st);
1170
+
1171
+ gl_FragColor = tex;
1172
+ }
1173
+ `,Qr={uTime:{value:0,type:"f32"}},jr=`
1174
+ precision highp float;
1175
+
1176
+ in vec2 vTextureCoord;
1177
+ in vec4 vColor;
1178
+
1179
+ uniform sampler2D uTexture;
1180
+ uniform float uTime;
1181
+ uniform float speed;
1182
+ uniform float intensity;
1183
+
1184
+ void main(void)
1185
+ {
1186
+ vec4 tex = texture2D(uTexture, vTextureCoord);
1187
+ float t = fract(uTime * speed);
1188
+ float wave = sin(t * 3.141592);
1189
+ float base = 0.6;
1190
+ float brightness = mix(base, 1.0, wave);
1191
+ float flash = 1.0 + brightness * intensity;
1192
+
1193
+ vec3 color = tex.rgb * flash;
1194
+
1195
+ gl_FragColor = vec4(color, tex.a);
1196
+ }
1197
+ `,Jr={uTime:{value:0,type:"f32"},speed:{value:10.2,type:"f32"},intensity:{value:1.5,type:"f32"}},Zr=`
1198
+ precision highp float;
1199
+
1200
+ in vec2 vTextureCoord;
1201
+
1202
+ uniform sampler2D uTexture;
1203
+ uniform float uTime;
1204
+
1205
+ uniform float framesPerScreen;
1206
+ uniform float scrollSpeed;
1207
+ uniform float gateWeave;
1208
+
1209
+ void main() {
1210
+ vec2 uv = vTextureCoord;
1211
+
1212
+ vec3 color = vec3(0.0);
1213
+
1214
+ uv.y += uTime * scrollSpeed;
1215
+ uv.y += sin(uTime * 2.0) * 0.003 * gateWeave;
1216
+
1217
+ float stripLeft = 0.025;
1218
+ float stripRight = 0.5;
1219
+
1220
+ if (uv.x < stripLeft || uv.x > stripRight) {
1221
+ gl_FragColor = vec4(color, 1.0);
1222
+ return;
1223
+ }
1224
+
1225
+ vec2 stripUV;
1226
+ stripUV.x = (uv.x - stripLeft) / (stripRight - stripLeft);
1227
+ stripUV.y = fract(uv.y);
1228
+
1229
+ float holeZone = 0.06;
1230
+ float frameZone = 1.0 - holeZone * 2.0;
1231
+
1232
+ float frameH = 1.0 / framesPerScreen;
1233
+ float localY = fract(stripUV.y / frameH);
1234
+
1235
+ bool inFrameX =
1236
+ stripUV.x > holeZone &&
1237
+ stripUV.x < holeZone + frameZone;
1238
+
1239
+ float marginX = 0.08;
1240
+ float marginY = 0.10;
1241
+
1242
+
1243
+ bool insideFrame =
1244
+ inFrameX &&
1245
+ stripUV.x > holeZone + marginX &&
1246
+ stripUV.x < holeZone + frameZone - marginX &&
1247
+ localY > marginY &&
1248
+ localY < 1.0 - marginY;
1249
+
1250
+ float frameZoneX = frameZone - marginX * 4.0;
1251
+ float centerOffset = (1.0 - frameZoneX - holeZone * 2.0) * 0.5;
1252
+
1253
+ vec2 frameUV;
1254
+ frameUV.x = (stripUV.x - (holeZone + marginX * 2.0) - centerOffset) / frameZoneX;
1255
+ frameUV.y = (localY - marginY) / (1.0 - marginY * 2.0);
1256
+
1257
+ float holeH = 0.01;
1258
+ float holeSpacing = frameH * 0.1;
1259
+
1260
+ float holeRow = step(mod(stripUV.y, holeSpacing), holeH);
1261
+
1262
+ bool leftHole = stripUV.x < holeZone * 0.8;
1263
+ bool rightHole = stripUV.x > 1.0 - holeZone * 0.8;
1264
+
1265
+ bool isHole = holeRow > 0.5 && (leftHole || rightHole);
1266
+ if (isHole) {
1267
+ color = vec3(1.0);
1268
+ }
1269
+ else if (insideFrame) {
1270
+ color = texture2D(uTexture, frameUV).rgb;
1271
+ }
1272
+ else {
1273
+ color = vec3(0.0);
1274
+ }
1275
+
1276
+ gl_FragColor = vec4(color, 1.0);
1277
+ }
1278
+ `,Kr={uTime:{value:0,type:"f32"},framesPerScreen:{value:2,type:"f32"},scrollSpeed:{value:.35,type:"f32"},gateWeave:{value:.6,type:"f32"}},Xr=`
1279
+ precision highp float;
1280
+
1281
+ in vec2 vTextureCoord;
1282
+ in vec4 vColor;
1283
+
1284
+ uniform sampler2D uTexture;
1285
+ uniform float uTime;
1286
+
1287
+ uniform float feather;
1288
+
1289
+ void main(void)
1290
+ {
1291
+ vec2 uv = vTextureCoord;
1292
+
1293
+ vec2 center = vec2(0.28, 0.48);
1294
+
1295
+ float dist = distance(uv, center);
1296
+
1297
+ float maxRadius = 0.8;
1298
+
1299
+ float radius = mix(maxRadius, 0.0, uTime);
1300
+
1301
+ float mask = smoothstep(
1302
+ radius - feather,
1303
+ radius + feather,
1304
+ dist
1305
+ );
1306
+
1307
+ vec4 color = texture2D(uTexture, uv);
1308
+
1309
+ gl_FragColor = vec4(color.rgb * mask, color.a);
1310
+ }
1311
+
1312
+ `,qr={uTime:{value:0,type:"f32"},feather:{value:.03,type:"f32"}},_r=`
1313
+ precision highp float;
1314
+
1315
+ in vec2 vTextureCoord;
1316
+ in vec4 vColor;
1317
+
1318
+ uniform sampler2D uTexture;
1319
+ uniform float uTime;
1320
+
1321
+ void main(void)
1322
+ {
1323
+ vec2 uv = vTextureCoord;
1324
+
1325
+ float openPhase = smoothstep(0.0, 0.6, uTime);
1326
+ float zoomPhase = smoothstep(0.6, 1.0, uTime);
1327
+
1328
+ float zoom =
1329
+ 1.0 +
1330
+ sin(zoomPhase * 3.141592) * 0.2;
1331
+
1332
+ vec2 center = vec2(0.28, 0.35);
1333
+ vec2 zoomUV = (uv - center) / zoom + center;
1334
+
1335
+ vec4 tex = texture2D(uTexture, zoomUV);
1336
+
1337
+ float centerY = 0.48;
1338
+ float halfOpen = openPhase * 0.5;
1339
+
1340
+ float mask = step(abs(zoomUV.y - centerY), halfOpen);
1341
+
1342
+ gl_FragColor = vec4(tex.rgb * mask, tex.a);
1343
+ }
1344
+
1345
+ `,$r={uTime:{value:0,type:"f32"}},to=`
1346
+ precision highp float;
1347
+
1348
+ in vec2 vTextureCoord;
1349
+ in vec4 vColor;
1350
+
1351
+ uniform sampler2D uTexture;
1352
+ uniform float uTime;
1353
+
1354
+ vec4 blur9(sampler2D tex, vec2 uv, vec2 resolution, float radius)
1355
+ {
1356
+ vec4 color = vec4(0.0);
1357
+ vec2 off = radius / resolution;
1358
+
1359
+ color += texture2D(tex, uv + off * vec2(-1.0, -1.0)) * 0.0625;
1360
+ color += texture2D(tex, uv + off * vec2( 0.0, -1.0)) * 0.125;
1361
+ color += texture2D(tex, uv + off * vec2( 1.0, -1.0)) * 0.0625;
1362
+
1363
+ color += texture2D(tex, uv + off * vec2(-1.0, 0.0)) * 0.125;
1364
+ color += texture2D(tex, uv) * 0.25;
1365
+ color += texture2D(tex, uv + off * vec2( 1.0, 0.0)) * 0.125;
1366
+
1367
+ color += texture2D(tex, uv + off * vec2(-1.0, 1.0)) * 0.0625;
1368
+ color += texture2D(tex, uv + off * vec2( 0.0, 1.0)) * 0.125;
1369
+ color += texture2D(tex, uv + off * vec2( 1.0, 1.0)) * 0.0625;
1370
+
1371
+ return color;
1372
+ }
1373
+
1374
+ void main(void)
1375
+ {
1376
+ vec2 uv = vTextureCoord;
1377
+
1378
+ float openPhase = smoothstep(0.0, 0.3, uTime);
1379
+ float zoomPhase = smoothstep(0.3, 1.0, uTime);
1380
+
1381
+ float zoom =
1382
+ 1.0 +
1383
+ sin(zoomPhase * 3.141592) * 0.2;
1384
+
1385
+ vec2 center = vec2(0.28, 0.35);
1386
+ vec2 zoomUV = (uv - center) / zoom + center;
1387
+
1388
+ float blurAmount = mix(10.0, 0.0, openPhase);
1389
+
1390
+ vec4 blurred =
1391
+ blur9(uTexture, zoomUV, vec2(1024.0, 1024.0), blurAmount);
1392
+
1393
+ float pulse =
1394
+ (sin(uTime * 2.0) * 0.5 + 0.5) * 0.8;
1395
+ blurred.rgb *= (1.0 + pulse);
1396
+ float centerY = 0.48;
1397
+ float halfOpen = openPhase * 0.5;
1398
+
1399
+ float mask = step(abs(zoomUV.y - centerY), halfOpen);
1400
+
1401
+ gl_FragColor = vec4(blurred.rgb * mask, blurred.a);
1402
+ }
1403
+
1404
+ `,eo={uTime:{value:0,type:"f32"}},io=`
1405
+ precision highp float;
1406
+
1407
+ in vec2 vTextureCoord;
1408
+
1409
+ uniform sampler2D uTexture;
1410
+ uniform float uTime;
1411
+
1412
+ uniform float strength;
1413
+
1414
+ uniform float frequency;
1415
+
1416
+ void main(void)
1417
+ {
1418
+ vec2 uv = vTextureCoord;
1419
+
1420
+ float waveX = sin((uv.y + uTime * 0.6) * frequency) * strength;
1421
+ float waveY = cos((uv.x + uTime * 0.4) * frequency) * strength;
1422
+
1423
+ vec2 distortedUV = uv + vec2(waveX, waveY);
1424
+
1425
+ distortedUV = clamp(distortedUV, 0.0, 1.0);
1426
+
1427
+ vec4 color = texture2D(uTexture, distortedUV);
1428
+
1429
+ gl_FragColor = color;
1430
+ }
1431
+ `,so={uTime:{value:0,type:"f32"},strength:{value:.015,type:"f32"},frequency:{value:10,type:"f32"}},ro=`
1432
+ precision highp float;
1433
+
1434
+ in vec2 vTextureCoord;
1435
+
1436
+ uniform sampler2D uTexture;
1437
+ uniform float uTime;
1438
+ uniform float uIntensity;
1439
+
1440
+ uniform float neonR;
1441
+ uniform float neonG;
1442
+ uniform float neonB;
1443
+
1444
+ void main(void)
1445
+ {
1446
+ vec4 base = texture2D(uTexture, vTextureCoord);
1447
+
1448
+ float speed = 4.2;
1449
+ float t = fract(uTime * speed);
1450
+
1451
+ float rise = smoothstep(0.0, 0.25, t);
1452
+ float fall = smoothstep(0.85, 0.55, t);
1453
+ float flash = rise * fall;
1454
+
1455
+ flash = mix(0.25, 1.0, flash);
1456
+
1457
+ flash *= uIntensity;
1458
+
1459
+ base.r += base.r * neonR * flash;
1460
+ base.g += base.g * neonG * flash;
1461
+ base.b += base.b * neonB * flash;
1462
+
1463
+ gl_FragColor = base;
1464
+ }
1465
+ `,oo={uTime:{value:0,type:"f32"},uIntensity:{value:1.8,type:"f32"},neonR:{value:.1,type:"f32"},neonG:{value:.9,type:"f32"},neonB:{value:1,type:"f32"}},no=`
1466
+ precision highp float;
1467
+
1468
+ in vec2 vTextureCoord;
1469
+
1470
+ uniform sampler2D uTexture;
1471
+ uniform float uTime;
1472
+ uniform float uStrength;
1473
+ uniform float uSpeed;
1474
+
1475
+ void main(void)
1476
+ {
1477
+ vec2 uv = vTextureCoord;
1478
+ float time = uTime * uSpeed;
1479
+
1480
+ float wave = sin((uv.y * 18.0) - time);
1481
+
1482
+ float offsetX = wave * uStrength;
1483
+
1484
+ vec2 distortedUV = uv + vec2(offsetX, 0.0);
1485
+
1486
+ distortedUV = clamp(distortedUV, 0.0, 1.0);
1487
+
1488
+ vec4 color = texture2D(uTexture, distortedUV);
1489
+
1490
+ gl_FragColor = color;
1491
+ }
1492
+ `,ao={uTime:{value:0,type:"f32"},uStrength:{value:.02,type:"f32"},uSpeed:{value:20,type:"f32"}},lo=`
1493
+ precision highp float;
1494
+
1495
+ in vec2 vTextureCoord;
1496
+
1497
+ uniform sampler2D uTexture;
1498
+ uniform float uTime;
1499
+
1500
+ vec4 blur5(sampler2D tex, vec2 uv, float strength)
1501
+ {
1502
+ vec4 col = vec4(0.0);
1503
+ float s = strength;
1504
+
1505
+ col += texture2D(tex, uv + vec2(-s, -s)) * 0.05;
1506
+ col += texture2D(tex, uv + vec2( 0.0, -s)) * 0.10;
1507
+ col += texture2D(tex, uv + vec2( s, -s)) * 0.05;
1508
+
1509
+ col += texture2D(tex, uv + vec2(-s, 0.0)) * 0.10;
1510
+ col += texture2D(tex, uv) * 0.40;
1511
+ col += texture2D(tex, uv + vec2( s, 0.0)) * 0.10;
1512
+
1513
+ col += texture2D(tex, uv + vec2(-s, s)) * 0.05;
1514
+ col += texture2D(tex, uv + vec2( 0.0, s)) * 0.10;
1515
+ col += texture2D(tex, uv + vec2( s, s)) * 0.05;
1516
+
1517
+ return col;
1518
+ }
1519
+
1520
+ void main(void)
1521
+ {
1522
+ vec2 uv = vTextureCoord;
1523
+ vec2 center = vec2(0.5, 0.5);
1524
+
1525
+ float t = clamp(uTime, 0.0, 1.0);
1526
+ float zoomPhase = smoothstep(0.0, 0.5, t) *
1527
+ (1.0 - smoothstep(0.5, 1.0, t));
1528
+
1529
+ float scale = 1.0 + zoomPhase * 0.5;
1530
+
1531
+ vec2 offset = vec2(0.0);
1532
+
1533
+ if (t < 0.33)
1534
+ {
1535
+ offset = vec2(0.12 * (t / 0.33), 0.0);
1536
+ }
1537
+ else if (t < 0.66)
1538
+ {
1539
+ offset = vec2(
1540
+ 0.12 * (1.0 - (t - 0.33) / 0.33),
1541
+ 0.0
1542
+ );
1543
+ }
1544
+ else
1545
+ {
1546
+ offset = vec2(
1547
+ 0.08 * ((t - 0.66) / 0.34),
1548
+ -0.08 * ((t - 0.66) / 0.34)
1549
+ );
1550
+ }
1551
+
1552
+ offset *= zoomPhase;
1553
+ vec2 transformedUV =
1554
+ (uv - center) / scale +
1555
+ center -
1556
+ offset;
1557
+
1558
+ transformedUV = clamp(transformedUV, 0.0, 1.0);
1559
+ float blurStrength = zoomPhase * 0.015;
1560
+
1561
+ vec4 color = blur5(uTexture, transformedUV, blurStrength);
1562
+
1563
+ gl_FragColor = color;
1564
+ }
1565
+ `,co={uTime:{value:0,type:"f32"}},ho=`
1566
+ precision highp float;
1567
+
1568
+ in vec2 vTextureCoord;
1569
+
1570
+ uniform sampler2D uTexture;
1571
+ uniform float uTime;
1572
+ uniform float uCutPos;
1573
+
1574
+
1575
+ float noise(float x)
1576
+ {
1577
+ return sin(x * 28.0) * 0.035;
1578
+ }
1579
+
1580
+ vec4 blur5(sampler2D tex, vec2 uv, float s)
1581
+ {
1582
+ vec4 c = vec4(0.0);
1583
+ c += texture2D(tex, uv + vec2(-s, -s)) * 0.05;
1584
+ c += texture2D(tex, uv + vec2( 0.0, -s)) * 0.10;
1585
+ c += texture2D(tex, uv + vec2( s, -s)) * 0.05;
1586
+ c += texture2D(tex, uv + vec2(-s, 0.0)) * 0.10;
1587
+ c += texture2D(tex, uv) * 0.40;
1588
+ c += texture2D(tex, uv + vec2( s, 0.0)) * 0.10;
1589
+ c += texture2D(tex, uv + vec2(-s, s)) * 0.05;
1590
+ c += texture2D(tex, uv + vec2( 0.0, s)) * 0.10;
1591
+ c += texture2D(tex, uv + vec2( s, s)) * 0.05;
1592
+ return c;
1593
+ }
1594
+
1595
+ void main(void)
1596
+ {
1597
+ vec2 uv = vTextureCoord;
1598
+ vec2 center = vec2(0.5);
1599
+ float movePhase = smoothstep(0.0, 0.45, uTime);
1600
+ float settle = smoothstep(0.45, 0.6, uTime);
1601
+ float cutPhase = smoothstep(0.7, 0.9, uTime);
1602
+ float cleanPhase = smoothstep(0.9, 1.0, uTime);
1603
+ float scale = mix(1.5, 1.0, settle);
1604
+
1605
+ float moveAlive = 1.0 - settle;
1606
+
1607
+ vec2 movement = vec2(
1608
+ sin(uTime * 6.0) * 0.18 * moveAlive,
1609
+ 0.0
1610
+ );
1611
+
1612
+ vec2 uvScaled =
1613
+ (uv - center) / scale +
1614
+ center -
1615
+ movement;
1616
+
1617
+ uvScaled = clamp(uvScaled, 0.0, 1.0);
1618
+
1619
+ float blurStrength = (1.0 - cleanPhase) * 0.025;
1620
+ vec4 blurred = blur5(uTexture, uvScaled, blurStrength);
1621
+ vec4 clean = texture2D(uTexture, uv);
1622
+
1623
+ float tearLine =
1624
+ mix(
1625
+ uCutPos,
1626
+ uCutPos + noise(uv.y + uTime * 3.0),
1627
+ cutPhase
1628
+ );
1629
+
1630
+ tearLine = clamp(tearLine, uCutPos - 0.05, uCutPos + 0.05);
1631
+
1632
+ float split = cutPhase * 0.35;
1633
+
1634
+ vec2 leftUV = uv;
1635
+ vec2 rightUV = uv;
1636
+
1637
+ leftUV.x -= split * step(uv.x, tearLine);
1638
+ rightUV.x += split * step(tearLine, uv.x);
1639
+
1640
+ leftUV = clamp(leftUV, 0.0, 1.0);
1641
+ rightUV = clamp(rightUV, 0.0, 1.0);
1642
+
1643
+ vec4 left = texture2D(uTexture, leftUV);
1644
+ vec4 right = texture2D(uTexture, rightUV);
1645
+
1646
+ float cutMask =
1647
+ smoothstep(tearLine - 0.02, tearLine + 0.02, uv.x);
1648
+
1649
+ vec4 broken = mix(left, right, cutMask);
1650
+
1651
+ float edge =
1652
+ smoothstep(0.0, 0.02, abs(uv.x - tearLine)) *
1653
+ (1.0 - smoothstep(0.02, 0.05, abs(uv.x - tearLine)));
1654
+
1655
+ vec3 edgeColor = vec3(1.0) * edge * cutPhase;
1656
+
1657
+ broken.rgb += edgeColor;
1658
+
1659
+ vec4 result = mix(blurred, broken, cutPhase);
1660
+ result = mix(result, clean, cleanPhase);
1661
+
1662
+ gl_FragColor = result;
1663
+ }
1664
+ `,fo={uTime:{value:0,type:"f32"},uCutPos:{value:.28,type:"f32"}},uo=`
1665
+ precision highp float;
1666
+
1667
+ varying vec2 vTextureCoord;
1668
+
1669
+ uniform sampler2D uTexture;
1670
+ uniform float uTime;
1671
+ uniform vec3 uColor;
1672
+ uniform float uThickness;
1673
+ uniform float uIntensity;
1674
+
1675
+ float noise(float x) {
1676
+ return sin(x * 40.0) * 0.005;
1677
+ }
1678
+
1679
+ void main() {
1680
+ vec2 uv = vTextureCoord;
1681
+
1682
+ vec4 baseColor = texture2D(uTexture, uv);
1683
+
1684
+ float beamY = 0.48 + noise(uv.x + uTime * 5.0);
1685
+
1686
+ float dist = abs(uv.y - beamY);
1687
+
1688
+ float core = smoothstep(uThickness, 0.0, dist);
1689
+
1690
+ float glow = smoothstep(uThickness * 4.0, uThickness, dist);
1691
+
1692
+ float pulse = 0.6 + 0.4 * sin(uTime * 10.0);
1693
+
1694
+ float laserMask = (core + glow * uIntensity) * pulse;
1695
+
1696
+ vec3 laserColor = uColor * laserMask;
1697
+
1698
+ vec3 color = baseColor.rgb + laserColor;
1699
+
1700
+ gl_FragColor = vec4(color, baseColor.a);
1701
+ }
1702
+ `,po={uTime:{value:0,type:"f32"},uColor:{value:[1,0,.2],type:"vec3<f32>"},uThickness:{value:.02,type:"f32"},uIntensity:{value:1.5,type:"f32"}},mo=`
1703
+ precision highp float;
1704
+
1705
+ varying vec2 vTextureCoord;
1706
+
1707
+ uniform sampler2D uTexture;
1708
+ uniform float uTime;
1709
+ uniform float uStrength;
1710
+ uniform float uFrequency;
1711
+ uniform float uSpeed;
1712
+
1713
+ void main() {
1714
+ vec2 uv = vTextureCoord;
1715
+
1716
+ vec2 center = vec2(0.5, 0.5);
1717
+
1718
+ float dist = distance(uv, center);
1719
+
1720
+ float wave =
1721
+ sin(dist * uFrequency - uTime * uSpeed) *
1722
+ uStrength *
1723
+ smoothstep(1.0, 0.0, dist);
1724
+
1725
+ vec2 dir = normalize(uv - center);
1726
+
1727
+ vec2 distortedUV = uv + dir * wave;
1728
+
1729
+ vec4 color = texture2D(uTexture, distortedUV);
1730
+
1731
+ gl_FragColor = color;
1732
+ }
1733
+ `,go={uTime:{value:0,type:"f32"},uStrength:{value:.02,type:"f32"},uFrequency:{value:20,type:"f32"},uSpeed:{value:4,type:"f32"}},vo=`
1734
+ precision highp float;
1735
+
1736
+ varying vec2 vTextureCoord;
1737
+
1738
+ uniform sampler2D uTexture;
1739
+ uniform float uTime;
1740
+ uniform float uDensity;
1741
+ uniform float uSpeed;
1742
+ uniform float uSize;
1743
+
1744
+ float hash(vec2 p) {
1745
+ return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453);
1746
+ }
1747
+ vec3 randomColor(float h) {
1748
+ return vec3(
1749
+ 0.5 + 0.5 * sin(h * 6.2831),
1750
+ 0.5 + 0.5 * sin(h * 6.2831 + 2.1),
1751
+ 0.5 + 0.5 * sin(h * 6.2831 + 4.2)
1752
+ );
1753
+ }
1754
+
1755
+ void main() {
1756
+ vec2 uv = vTextureCoord;
1757
+
1758
+ vec4 base = texture2D(uTexture, uv);
1759
+
1760
+ vec3 sparkColor = vec3(0.0);
1761
+ float sparkAlpha = 0.0;
1762
+
1763
+ vec2 grid = floor(uv * uDensity);
1764
+ vec2 id = grid;
1765
+
1766
+ float h = hash(id);
1767
+
1768
+ vec2 sparkPos = fract(vec2(
1769
+ h,
1770
+ h + uTime * uSpeed
1771
+ ));
1772
+
1773
+ float d = distance(fract(uv * uDensity), sparkPos);
1774
+
1775
+ float spark = smoothstep(uSize, 0.0, d);
1776
+
1777
+ vec3 color = randomColor(h) * spark;
1778
+
1779
+ sparkColor += color;
1780
+ sparkAlpha += spark;
1781
+
1782
+ vec3 colorValue = base.rgb + sparkColor;
1783
+
1784
+ gl_FragColor = vec4(colorValue, max(base.a, sparkAlpha));
1785
+ }
1786
+ `,yo={uTime:{value:0,type:"f32"},uDensity:{value:30,type:"f32"},uSpeed:{value:2.5,type:"f32"},uSize:{value:.15,type:"f32"}},xo=`
1787
+ precision highp float;
1788
+
1789
+ varying vec2 vTextureCoord;
1790
+
1791
+ uniform sampler2D uTexture;
1792
+ uniform float uTime;
1793
+ uniform float uLineThickness;
1794
+ uniform float uLineIntensity;
1795
+ uniform float uNoiseIntensity;
1796
+ uniform vec3 uLineColor;
1797
+
1798
+ float rand(vec2 p){
1799
+ return fract(sin(dot(p ,vec2(12.9898,78.233))) * 43758.5453);
1800
+ }
1801
+
1802
+ void main() {
1803
+ vec2 uv = vTextureCoord;
1804
+
1805
+ vec4 tex = texture2D(uTexture, uv);
1806
+ vec3 base = tex.rgb;
1807
+
1808
+ float line = sin(uv.y * 800.0 * uLineThickness) * 0.5 + 0.5;
1809
+ line = mix(1.0, line, uLineIntensity);
1810
+
1811
+ float noise =
1812
+ (rand(vec2(uTime, uv.y * 1000.0)) - 0.5) * uNoiseIntensity;
1813
+
1814
+ vec3 colorValue = base * line + noise;
1815
+
1816
+ gl_FragColor = vec4(colorValue, tex.a);
1817
+ }
1818
+ `,wo={uTime:{value:0,type:"f32"},uLineThickness:{value:2,type:"f32"},uLineIntensity:{value:.6,type:"f32"},uNoiseIntensity:{value:.05,type:"f32"},uLineColor:{value:[.8,1,.8],type:"vec3<f32>"}},bo=`
1819
+ precision highp float;
1820
+
1821
+ varying vec2 vTextureCoord;
1822
+
1823
+ uniform sampler2D uTexture;
1824
+ uniform float uExposure;
1825
+ uniform float uSaturation;
1826
+ uniform float uContrast;
1827
+
1828
+ vec3 adjustSaturation(vec3 color, float sat) {
1829
+ float grey = dot(color, vec3(0.299, 0.587, 0.114));
1830
+ return mix(vec3(grey), color, sat);
1831
+ }
1832
+
1833
+ vec3 adjustContrast(vec3 color, float contrast) {
1834
+ return (color - 0.5) * contrast + 0.5;
1835
+ }
1836
+
1837
+ void main() {
1838
+ vec2 uv = vTextureCoord;
1839
+
1840
+ vec4 tex = texture2D(uTexture, uv);
1841
+ vec3 color = tex.rgb;
1842
+ color *= uExposure;
1843
+
1844
+ color = adjustSaturation(color, uSaturation);
1845
+
1846
+ color = adjustContrast(color, uContrast);
1847
+
1848
+ color = color / (color + vec3(1.0));
1849
+
1850
+ gl_FragColor = vec4(color, tex.a);
1851
+ }
1852
+ `,Co={uExposure:{value:1.2,type:"f32"},uSaturation:{value:4.3,type:"f32"},uContrast:{value:2.2,type:"f32"}},To=`
1853
+ precision highp float;
1854
+
1855
+ varying vec2 vTextureCoord;
1856
+
1857
+ uniform sampler2D uTexture;
1858
+ uniform float uTime;
1859
+ uniform float uIntensity;
1860
+ uniform float uDuration;
1861
+
1862
+ void main() {
1863
+ vec2 uv = vTextureCoord;
1864
+ vec4 base = texture2D(uTexture, uv);
1865
+
1866
+ float flash = smoothstep(0.0, uDuration * 0.5, mod(uTime, uDuration)) *
1867
+ (1.0 - smoothstep(uDuration * 0.5, uDuration, mod(uTime, uDuration)));
1868
+
1869
+ flash *= uIntensity;
1870
+
1871
+ vec3 color = mix(base.rgb, vec3(0.0), flash);
1872
+
1873
+ gl_FragColor = vec4(color, base.a);
1874
+ }
1875
+ `,So={uTime:{value:0,type:"f32"},uIntensity:{value:.7,type:"f32"},uDuration:{value:.2,type:"f32"}},Ao=`
1876
+ precision highp float;
1877
+
1878
+ varying vec2 vTextureCoord;
1879
+
1880
+ uniform sampler2D uTexture;
1881
+ uniform float uTime;
1882
+ uniform float uPulseScale;
1883
+ uniform float uBlurStrength;
1884
+ uniform float uGlowBoost;
1885
+
1886
+ vec4 blur3(sampler2D tex, vec2 uv, float s) {
1887
+ vec4 c = vec4(0.0);
1888
+ c += texture2D(tex, uv + vec2(-s, -s)) * 0.0625;
1889
+ c += texture2D(tex, uv + vec2( 0.0, -s)) * 0.125;
1890
+ c += texture2D(tex, uv + vec2( s, -s)) * 0.0625;
1891
+ c += texture2D(tex, uv + vec2(-s, 0.0)) * 0.125;
1892
+ c += texture2D(tex, uv) * 0.25;
1893
+ c += texture2D(tex, uv + vec2( s, 0.0)) * 0.125;
1894
+ c += texture2D(tex, uv + vec2(-s, s)) * 0.0625;
1895
+ c += texture2D(tex, uv + vec2( 0.0, s)) * 0.125;
1896
+ c += texture2D(tex, uv + vec2( s, s)) * 0.0625;
1897
+ return c * uGlowBoost;
1898
+ }
1899
+
1900
+ void main() {
1901
+ vec2 uv = vTextureCoord;
1902
+
1903
+ float scale = 1.0 + uPulseScale * (0.5 + 0.5 * sin(uTime * 3.0));
1904
+ vec2 center = vec2(0.28,0.48);
1905
+ vec2 uvScaled = (uv - center) / scale + center;
1906
+ uvScaled = clamp(uvScaled, 0.0, 1.0);
1907
+ vec4 base = texture2D(uTexture, uvScaled);
1908
+ vec4 blurred = blur3(uTexture, uvScaled, uBlurStrength);
1909
+ vec4 colorValue = mix(base, blurred, 0.8);
1910
+
1911
+ gl_FragColor = colorValue;
1912
+ }
1913
+ `,ko={uTime:{value:0,type:"f32"},uPulseScale:{value:.2,type:"f32"},uBlurStrength:{value:.02,type:"f32"},uGlowBoost:{value:2,type:"f32"}},Fo=`
1914
+ precision highp float;
1915
+
1916
+ varying vec2 vTextureCoord;
1917
+
1918
+ uniform sampler2D uTexture;
1919
+ uniform float uTime;
1920
+ uniform float uIntensity;
1921
+ uniform float uSpeed;
1922
+
1923
+ float rand(float x){
1924
+ return fract(sin(x * 12.9898) * 43758.5453);
1925
+ }
1926
+
1927
+ vec2 shakeOffset(float time){
1928
+ float x = (rand(time * 0.7) - 0.5) * uIntensity;
1929
+ float y = (rand(time * 1.3 + 10.0) - 0.5) * uIntensity;
1930
+ return vec2(x, y);
1931
+ }
1932
+
1933
+ void main() {
1934
+ vec2 uv = vTextureCoord;
1935
+
1936
+ vec2 offset = shakeOffset(uTime * uSpeed);
1937
+
1938
+ vec2 uvMoved = clamp(uv + offset, 0.0, 1.0);
1939
+
1940
+ vec4 color = texture2D(uTexture, uvMoved);
1941
+
1942
+ gl_FragColor = color;
1943
+ }
1944
+
1945
+ `,Ro={uTime:{value:0,type:"f32"},uIntensity:{value:1,type:"f32"},uSpeed:{value:1,type:"f32"}},Mo=`
1946
+ precision highp float;
1947
+
1948
+ varying vec2 vTextureCoord;
1949
+
1950
+ uniform sampler2D uTexture;
1951
+ uniform float uExposure;
1952
+ uniform float uBloom;
1953
+ uniform float uContrast;
1954
+
1955
+ vec3 tonemapReinhard(vec3 color){
1956
+ return color / (color + vec3(1.0));
1957
+ }
1958
+
1959
+ void main() {
1960
+ vec2 uv = vTextureCoord;
1961
+ vec4 tex = texture2D(uTexture, uv);
1962
+
1963
+ if (tex.a < 0.01) {
1964
+ gl_FragColor = tex;
1965
+ return;
1966
+ }
1967
+
1968
+ vec3 color = tex.rgb;
1969
+
1970
+ vec3 bright = max(color - 0.6, 0.0) * uBloom;
1971
+ bright = tonemapReinhard(bright);
1972
+
1973
+ vec3 hdrColor = color + bright * 0.6;
1974
+
1975
+ hdrColor *= uExposure;
1976
+
1977
+ hdrColor = (hdrColor - 0.5) * uContrast + 0.5;
1978
+
1979
+ hdrColor = clamp(hdrColor, 0.0, 1.0);
1980
+
1981
+ gl_FragColor = vec4(hdrColor, tex.a);
1982
+ }
1983
+ `,Oo={uExposure:{value:1,type:"f32"},uBloom:{value:1.5,type:"f32"},uContrast:{value:2,type:"f32"}},Eo=`
1984
+ precision highp float;
1985
+
1986
+ varying vec2 vTextureCoord;
1987
+
1988
+ uniform sampler2D uTexture;
1989
+ uniform float uTime;
1990
+ uniform float uZoomSpeed;
1991
+ uniform float uMaxZoom;
1992
+ uniform float uBlurStrength;
1993
+
1994
+ vec4 blur3(sampler2D tex, vec2 uv, float s) {
1995
+ vec4 c = vec4(0.0);
1996
+ c += texture2D(tex, uv + vec2(-s, -s)) * 0.0625;
1997
+ c += texture2D(tex, uv + vec2( 0.0, -s)) * 0.125;
1998
+ c += texture2D(tex, uv + vec2( s, -s)) * 0.0625;
1999
+ c += texture2D(tex, uv + vec2(-s, 0.0)) * 0.125;
2000
+ c += texture2D(tex, uv) * 0.25;
2001
+ c += texture2D(tex, uv + vec2( s, 0.0)) * 0.125;
2002
+ c += texture2D(tex, uv + vec2(-s, s)) * 0.0625;
2003
+ c += texture2D(tex, uv + vec2( 0.0, s)) * 0.125;
2004
+ c += texture2D(tex, uv + vec2( s, s)) * 0.0625;
2005
+ return c;
2006
+ }
2007
+
2008
+ void main() {
2009
+ vec2 uv = vTextureCoord;
2010
+ vec2 center = vec2(0.28,0.48);
2011
+
2012
+ float zoom = 1.0 + (uMaxZoom - 1.0) * smoothstep(0.0, 1.0, sin(uTime * uZoomSpeed));
2013
+
2014
+ vec2 uvZoomed = (uv - center) / zoom + center;
2015
+
2016
+ uvZoomed = clamp(uvZoomed, 0.0, 1.0);
2017
+
2018
+ vec4 color = texture2D(uTexture, uvZoomed);
2019
+
2020
+ if (uBlurStrength > 0.0) {
2021
+ vec4 blurred = blur3(uTexture, uvZoomed, uBlurStrength);
2022
+ color = mix(color, blurred, 0.5);
2023
+ }
2024
+
2025
+ gl_FragColor = color;
2026
+ }
2027
+ `,Do={uTime:{value:0,type:"f32"},uZoomSpeed:{value:5,type:"f32"},uMaxZoom:{value:2,type:"f32"},uBlurStrength:{value:.01,type:"f32"}},oi=`
2028
+ precision highp float;
2029
+
2030
+ varying vec2 vTextureCoord;
2031
+ uniform sampler2D uTexture;
2032
+
2033
+ uniform vec3 uKeyColor;
2034
+ uniform float uSimilarity;
2035
+ uniform float uSpill;
2036
+
2037
+ void main() {
2038
+ vec4 color = texture2D(uTexture, vTextureCoord);
2039
+
2040
+ float maxChannel = max(max(uKeyColor.r, uKeyColor.g), uKeyColor.b);
2041
+
2042
+ float diff;
2043
+ float spillAmount = 0.0;
2044
+
2045
+ if (maxChannel == uKeyColor.g && uKeyColor.g > uKeyColor.r && uKeyColor.g > uKeyColor.b) {
2046
+ diff = color.g - max(color.r, color.b);
2047
+ spillAmount = max(0.0, color.g - max(color.r, color.b));
2048
+ color.g -= spillAmount * uSpill;
2049
+
2050
+ float avg = (color.r + color.b) * 0.5;
2051
+ color.r = mix(color.r, avg, spillAmount);
2052
+ color.b = mix(color.b, avg, spillAmount);
2053
+ }
2054
+ else if (maxChannel == uKeyColor.b && uKeyColor.b > uKeyColor.r && uKeyColor.b > uKeyColor.g) {
2055
+ diff = color.b - max(color.r, color.g);
2056
+ spillAmount = max(0.0, color.b - max(color.r, color.g));
2057
+ color.b -= spillAmount * uSpill;
2058
+
2059
+ float avg = (color.r + color.g) * 0.5;
2060
+ color.r = mix(color.r, avg, spillAmount);
2061
+ color.g = mix(color.g, avg, spillAmount);
2062
+ }
2063
+ else {
2064
+ diff = color.r - max(color.g, color.b);
2065
+ spillAmount = max(0.0, color.r - max(color.g, color.b));
2066
+ color.r -= spillAmount * uSpill;
2067
+
2068
+ float avg = (color.g + color.b) * 0.5;
2069
+ color.g = mix(color.g, avg, spillAmount);
2070
+ color.b = mix(color.b, avg, spillAmount);
2071
+ }
2072
+
2073
+ float mask = step(uSimilarity, diff);
2074
+ float alpha = 1.0 - mask;
2075
+
2076
+ if (diff > uSimilarity) {
2077
+ gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
2078
+ return;
2079
+ }
2080
+
2081
+ gl_FragColor = vec4(color.rgb, color.a * alpha);
2082
+ }
2083
+ `,le=`
2084
+ in vec2 vTextureCoord;
2085
+ in vec4 vColor;
2086
+ uniform sampler2D uTexture;
2087
+ out vec4 finalColor;
2088
+
2089
+ uniform vec3 uTargetColor;
2090
+ uniform float uHueShift;
2091
+ uniform float uSatShift;
2092
+ uniform float uLightShift;
2093
+ uniform float uTolerance;
2094
+ uniform float uSoftness;
2095
+
2096
+ vec3 rgb2hsl(vec3 c) {
2097
+ float maxc = max(max(c.r, c.g), c.b);
2098
+ float minc = min(min(c.r, c.g), c.b);
2099
+ float h = 0.0;
2100
+ float s = 0.0;
2101
+ float l = (maxc + minc) * 0.5;
2102
+
2103
+ float d = maxc - minc;
2104
+ if (d > 0.00001) {
2105
+ s = l > 0.5 ? d / (2.0 - maxc - minc) : d / (maxc + minc);
2106
+ if (maxc == c.r) {
2107
+ h = (c.g - c.b) / d + (c.g < c.b ? 6.0 : 0.0);
2108
+ } else if (maxc == c.g) {
2109
+ h = (c.b - c.r) / d + 2.0;
2110
+ } else {
2111
+ h = (c.r - c.g) / d + 4.0;
2112
+ }
2113
+ h /= 6.0;
2114
+ }
2115
+ return vec3(h, s, l);
2116
+ }
2117
+
2118
+ float hue2rgb(float p, float q, float t) {
2119
+ if (t < 0.0) t += 1.0;
2120
+ if (t > 1.0) t -= 1.0;
2121
+ if (t < 1.0 / 6.0) return p + (q - p) * 6.0 * t;
2122
+ if (t < 1.0 / 2.0) return q;
2123
+ if (t < 2.0 / 3.0) return p + (q - p) * (2.0 / 3.0 - t) * 6.0;
2124
+ return p;
2125
+ }
2126
+
2127
+ vec3 hsl2rgb(vec3 hsl) {
2128
+ float h = hsl.x;
2129
+ float s = hsl.y;
2130
+ float l = hsl.z;
2131
+ if (s <= 0.00001) return vec3(l);
2132
+ float q = l < 0.5 ? l * (1.0 + s) : l + s - l * s;
2133
+ float p = 2.0 * l - q;
2134
+ return vec3(
2135
+ hue2rgb(p, q, h + 1.0 / 3.0),
2136
+ hue2rgb(p, q, h),
2137
+ hue2rgb(p, q, h - 1.0 / 3.0)
2138
+ );
2139
+ }
2140
+
2141
+ void main() {
2142
+ vec4 src = texture(uTexture, vTextureCoord);
2143
+ float dist = distance(src.rgb, uTargetColor);
2144
+ float mask = 1.0 - smoothstep(uTolerance, uTolerance + uSoftness, dist);
2145
+
2146
+ vec3 hsl = rgb2hsl(src.rgb);
2147
+ hsl.x = mod(hsl.x + (uHueShift / 360.0), 1.0);
2148
+ hsl.y = clamp(hsl.y + uSatShift, 0.0, 1.0);
2149
+ hsl.z = clamp(hsl.z + uLightShift, 0.0, 1.0);
2150
+ vec3 adjusted = hsl2rgb(hsl);
2151
+
2152
+ vec3 resultColor = mix(src.rgb, adjusted, mask);
2153
+ finalColor = vec4(resultColor, src.a);
2154
+ }
2155
+ `,Po=`
2156
+ in vec2 vTextureCoord;
2157
+
2158
+ uniform sampler2D uTexture;
2159
+ uniform float uTime;
2160
+ uniform float uDuration;
2161
+
2162
+ void main(void)
2163
+ {
2164
+ vec2 uv = vTextureCoord.xy;
2165
+ vec4 color = texture2D(uTexture, uv);
2166
+
2167
+ float t = clamp(uTime / max(uDuration, 0.0001), 0.0, 1.0);
2168
+ float alpha = smoothstep(0.0, 1.0, t);
2169
+
2170
+ color.rgb *= alpha;
2171
+ color.a *= alpha;
2172
+
2173
+ gl_FragColor = color;
2174
+ }
2175
+ `,Io={uTime:{value:0,type:"f32"},uDuration:{value:1,type:"f32"}},Bo=`
2176
+ in vec2 vTextureCoord;
2177
+
2178
+ uniform sampler2D uTexture;
2179
+ uniform float uTime;
2180
+ uniform float uDuration;
2181
+
2182
+ void main(void)
2183
+ {
2184
+ vec2 uv = vTextureCoord.xy;
2185
+ vec4 color = texture2D(uTexture, uv);
2186
+
2187
+ float t = clamp(uTime / max(uDuration, 0.0001), 0.0, 1.0);
2188
+ float alpha = smoothstep(1.0, 0.0, t);
2189
+
2190
+ color.rgb *= alpha;
2191
+ color.a *= alpha;
2192
+
2193
+ gl_FragColor = color;
2194
+ }
2195
+ `,No={uTime:{value:0,type:"f32"},uDuration:{value:1,type:"f32"}},kt=`
2196
+ in vec2 aPosition;
2197
+ out vec2 vTextureCoord;
2198
+
2199
+ uniform vec4 uInputSize;
2200
+ uniform vec4 uOutputFrame;
2201
+ uniform vec4 uOutputTexture;
2202
+
2203
+ vec4 filterVertexPosition( void )
2204
+ {
2205
+ vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
2206
+
2207
+ position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
2208
+ position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;
2209
+
2210
+ return vec4(position, 0.0, 1.0);
2211
+ }
2212
+
2213
+ vec2 filterTextureCoord( void )
2214
+ {
2215
+ return aPosition * (uOutputFrame.zw * uInputSize.zw);
2216
+ }
2217
+
2218
+ void main(void)
2219
+ {
2220
+ gl_Position = filterVertexPosition();
2221
+ vTextureCoord = filterTextureCoord();
2222
+ }
2223
+ `;function _(l,t,e){return Math.min(e,Math.max(t,l))}function jt(l,t){if(!l||l.length===0)return t;const e=[...l].sort((i,s)=>i.x-s.x);if(t<=e[0].x)return e[0].y;if(t>=e[e.length-1].x)return e[e.length-1].y;for(let i=0;i<e.length-1;i++){const s=e[i],r=e[i+1];if(t>=s.x&&t<=r.x){const o=(t-s.x)/Math.max(r.x-s.x,1e-6);return s.y+(r.y-s.y)*o}}return t}function ce(l){return!l||l.enabled===!1?!1:!!(l.basic||l.hsl||l.curves)}function zo(l){const t=Jt(l);return t.length>0?t[0]:null}function Jt(l){if(!l||l.enabled===!1)return[];const t=l.hsl;if(!t)return[];const e=t.byColor??{},i=Object.entries(e).map(([a,n])=>({targetColor:a,hue:n?.hue??0,saturation:n?.saturation??0,lightness:n?.lightness??0})).filter(a=>a.hue!==0||a.saturation!==0||a.lightness!==0);if(i.length>0)return i;if(!t.selectedColor)return[];const s=t.hue??0,r=t.saturation??0,o=t.lightness??0;return s===0&&r===0&&o===0?[]:[{targetColor:t.selectedColor,hue:s,saturation:r,lightness:o}]}function he(l,t,e=1){l.reset();const i=t?.basic??{},s=t?.hsl??{},r=t?.curves,o=zo(t),a=(i.saturation??0)+(o?0:s.saturation??0);a!==0&&l.saturate(_(a/100,-1,2),!0);const n=(i.hue??0)+(o?0:s.hue??0);n!==0&&l.hue(n,!0);const c=i.brightness??0,h=i.shine??0,d=i.highlight??0,u=i.shadow??0,f=o?0:s.lightness??0,p=c+f+h*.25+d*.25-u*.25,g=_(1+p/100,0,5)*e;g!==1&&l.brightness(g,!0);const v=_(1+(i.contrast??0)/100,0,5);v!==1&&l.contrast(v,!0);const x=i.sharpness??0;if(x!==0){const F=_(1+x/300,0,5);l.contrast(F,!0)}const w=i.fade??0;if(w!==0){const F=_(w/100,0,1),O=_(1-F*.35,0,5),k=_(-F*.45,-1,2);l.contrast(O,!0),l.saturate(k,!0)}const T=Math.abs(i.vignette??0);if(T!==0){const F=_(T/100,0,1),O=_(1-F*.2,0,5);l.brightness(O,!0)}const y=i.grain??0;if(y!==0){const F=_(y/100,0,1),O=_(1+F*.08,0,5),k=_(-F*.05,-1,2);l.contrast(O,!0),l.saturate(k,!0)}const S=_((i.temperature??0)/100,-1,1);if(S!==0){const F=l.matrix,O=1+S*.2,k=1-S*.2;F[0]*=O,F[6]*=1,F[12]*=k}if(r){const F=jt(r.rgb,.5),O=jt(r.red,.5),k=jt(r.green,.5),b=jt(r.blue,.5),A=_((F-.5)*1.8,-.6,.6);A!==0&&l.contrast(1+A,!0);const C=l.matrix;C[0]*=_(1+(O-.5)*.8,.6,1.4),C[6]*=_(1+(k-.5)*.8,.6,1.4),C[12]*=_(1+(b-.5)*.8,.6,1.4)}}function Lo(l,t){const{opacity:e,zIndex:i,flip:s,left:r,top:o,width:a,height:n,angle:c}=l;t.x=r,t.y=o,t.width=Math.abs(a),t.height=Math.abs(n),t.angle=c,t.alpha=e,t.zIndex=i,s?.x?t.scale.x=-Math.abs(t.scale.x):t.scale.x=Math.abs(t.scale.x),s?.y?t.scale.y=-Math.abs(t.scale.y):t.scale.y=Math.abs(t.scale.y)}class de{constructor(t,e,i=null){this.sprite=e,this.targetContainer=i,!i&&t&&(this.targetContainer=t.stage),this.resolution=t?.renderer?.resolution??1,this.root=new m.Container,this.root.label="RootContainer",this.root.visible=!1,this.animationContainer=new m.Container,this.animationContainer.label="AnimationContainer",this.root.addChild(this.animationContainer),this.targetContainer&&this.targetContainer.addChild(this.root)}sprite;targetContainer;pixiSprite=null;mirrorSprites=[];mirrorContainer=null;isMirrorActive=!1;texture=null;root=null;strokeGraphics=null;maskGraphics=null;shadowGraphics=null;shadowContainer=null;animationContainer=null;resolution=1;destroyed=!1;lastFrame=null;async updateFrame(t){if(this.destroyed)return;if(t===this.lastFrame){this.root!=null&&(this.root.visible=t!=null,this.applySpriteTransforms());return}if(this.lastFrame=t,t==null){this.root!=null&&(this.root.visible=!1,this.applySpriteTransforms());return}if(t instanceof m.Texture||t&&typeof t.source<"u"&&!(t instanceof VideoFrame)){if(t.width===0||t.height===0){console.warn("PixiSpriteRenderer: Texture has zero dimensions",t.width,t.height);return}this.pixiSprite==null?(this.pixiSprite=new m.Sprite(t),this.pixiSprite.label="MainSprite",this.animationContainer.addChild(this.pixiSprite),this.applySpriteTransforms()):this.pixiSprite.texture=t,this.root!=null&&(this.root.visible=!0,this.applySpriteTransforms());return}const i=t.width,s=t.height;if(typeof i!="number"||typeof s!="number"||i<=0||s<=0){console.warn("PixiSpriteRenderer: Invalid frame dimensions",i,s),t instanceof VideoFrame&&t.close();return}if(this.texture!=null&&(this.texture.destroy(!0),this.texture=null),this.texture=m.Texture.from(t),!this.texture||!this.texture.source){console.error("PixiSpriteRenderer: Failed to create valid texture"),t instanceof VideoFrame&&t.close();return}this.pixiSprite==null?(this.pixiSprite=new m.Sprite(this.texture),this.pixiSprite.label="MainSprite",this.animationContainer.addChild(this.pixiSprite),this.applySpriteTransforms()):this.pixiSprite.texture=this.texture,t instanceof VideoFrame&&t.close(),this.root!=null&&(this.root.visible=!0,this.applySpriteTransforms())}applySpriteTransforms(){if(this.pixiSprite==null||this.root==null||this.destroyed)return;const{flip:t,center:e,width:i,height:s,angle:r,opacity:o,zIndex:a,renderTransform:n}=this.sprite,c=n?.x??0,h=n?.y??0,d=n?.angle??0,u=n?.scale??1,f=n?.scaleX??1,p=n?.scaleY??1,g=n?.opacity??1,v=n?.blur??0,x=n?.motionBlur??0,w=n?.brightness??1,T=(n?.mirror??0)>.5;this.root.renderTexturePadding=this.sprite.renderTexturePadding??0,this.root.x=e.x,this.root.y=e.y,this.root.angle=(t?.x||t?.y?-1:1)*r,this.root.alpha=o,this.root.zIndex=a,this.root.scale.set(1,1),this.animationContainer&&(this.animationContainer.x=c,this.animationContainer.y=h,this.animationContainer.angle=(t?.x||t?.y?-1:1)*d,this.animationContainer.alpha=g,this.animationContainer.scale.set(u*f,u*p),this.applyBlur(v),this.applyMotionBlur(x),this.applyBrightness(w),this.applySelectiveHsl(),this.applyChromaKey()),this.pixiSprite.anchor.set(.5,.5),this.pixiSprite.position.set(0,0);const y=this.pixiSprite.texture?.width??1,S=this.pixiSprite.texture?.height??1,F=this.sprite.type==="Caption",O=this.sprite.type==="Text",k=this.sprite.renderTexturePadding??0,b=F||O||k>0?1:i&&i!==0?Math.abs(i)/y:1,A=F||O||k>0?1:s&&s!==0?Math.abs(s)/S:1;if(T){if(!this.isMirrorActive){if(this.isMirrorActive=!0,this.mirrorContainer=new m.Container,this.mirrorContainer.label="MirrorContainer",this.animationContainer){const E=this.animationContainer.getChildIndex(this.pixiSprite);this.animationContainer.removeChild(this.pixiSprite),this.mirrorContainer.addChild(this.pixiSprite),this.animationContainer.addChildAt(this.mirrorContainer,E)}this.mirrorSprites=[];for(let E=0;E<8;E++){const N=new m.Sprite(this.pixiSprite.texture);N.label=`MirrorSprite_${E}`,N.anchor.set(.5,.5),this.mirrorContainer.addChild(N),this.mirrorSprites.push(N)}}for(const E of this.mirrorSprites)E.texture=this.pixiSprite.texture;const C=y*b,R=S*A;this.pixiSprite.position.set(0,0),this.pixiSprite.scale.set(b,A);const D=[[C,0,-b,A],[-C,0,-b,A],[0,R,b,-A],[0,-R,b,-A],[C,R,-b,-A],[-C,R,-b,-A],[C,-R,-b,-A],[-C,-R,-b,-A]];for(let E=0;E<8;E++){const[N,Y,I,P]=D[E];this.mirrorSprites[E].position.set(N,Y),this.mirrorSprites[E].scale.set(I,P)}if(t?.x){this.pixiSprite.scale.x=-b;for(let E=0;E<8;E++)this.mirrorSprites[E].scale.x=-D[E][2]}if(t?.y){this.pixiSprite.scale.y=-A;for(let E=0;E<8;E++)this.mirrorSprites[E].scale.y=-D[E][3]}}else{if(this.isMirrorActive&&(this.isMirrorActive=!1,this.mirrorContainer&&this.animationContainer)){const C=this.animationContainer.getChildIndex(this.mirrorContainer);this.mirrorContainer.removeChild(this.pixiSprite),this.animationContainer.addChildAt(this.pixiSprite,C);for(const R of this.mirrorSprites)R.destroy();this.mirrorSprites=[],this.animationContainer.removeChild(this.mirrorContainer),this.mirrorContainer.destroy(),this.mirrorContainer=null}this.pixiSprite.scale.x=t?.x?-b:b,this.pixiSprite.scale.y=t?.y?-A:A}this.applyStyle(),this.applyContainerAnimations()}applyContainerAnimations(){if(!this.animationContainer||this.destroyed)return;const i=(this.sprite.renderTransform??{}).mask;if(!i){if(this.animationContainer.mask){this.animationContainer.mask=null;const x=this.animationContainer.__maskGraphics;x&&(x.visible=!1)}return}const{progress:s,shape:r,direction:o,angle:a,origin:n,feather:c}=i;if(s>=1){this.animationContainer.mask=null;const x=this.animationContainer.__maskGraphics;x&&(x.visible=!1);return}const h=this._getMaskDimensions();if(h.width<=0||h.height<=0)return;const{width:d,height:u}=h;let f=this.animationContainer.__maskGraphics;f||(f=new m.Graphics,f.label="MaskGraphics",this.animationContainer.addChild(f),this.animationContainer.__maskGraphics=f),f.visible=!0,f.clear();const p=c??0,g=i.initialProgress??0,v=g+(1-g)*s;if(v<=0){this.animationContainer.mask=f;return}if(r==="custom"&&i.painter)i.painter(f,d,u,v);else if(r==="circle"||r==="ellipse")this._drawExpandMask(f,d,u,v,n??"center",r,p);else{const x=a??0;x!==0?this._drawAngleWipeMask(f,d,u,v,x,p):this._drawRectWipeMask(f,d,u,v,o??"left",p)}this.animationContainer.mask=f}_getMaskDimensions(){const t=this.animationContainer,i=t.parent?.renderTexturePadding??0;if(t.children){for(const s of t.children)if(!(!s||s.label==="MaskGraphics"||s.label==="WipeMask")){if(s.label==="MainSprite"){const r=Math.abs(s.width??0)-i*2,o=Math.abs(s.height??0)-i*2;if(r>0&&o>0)return{width:r,height:o}}if(s.children){for(const r of s.children)if(r?.label==="MainSprite"){const o=Math.abs(r.width??0)-i*2,a=Math.abs(r.height??0)-i*2;if(o>0&&a>0)return{width:o,height:a}}}}}try{const s=t.getLocalBounds();if(s.width>0&&s.height>0)return{width:s.width-i*2,height:s.height-i*2}}catch{}return{width:0,height:0}}_drawRectWipeMask(t,e,i,s,r,o){let a=-e/2,n=-i/2,c=e,h=i;switch(r){case"left":c=e*s,a=-e/2;break;case"right":c=e*s,a=e/2-c;break;case"top":h=i*s,n=-i/2;break;case"bottom":h=i*s,n=i/2-h;break}c<=0||h<=0||(o>0?t.rect(a,n,c,h).fill({color:16777215,alpha:1}):t.rect(a,n,c,h).fill({color:16777215}))}_drawAngleWipeMask(t,e,i,s,r,o){const a=Math.sqrt(e*e+i*i),n=a*s;t.rotation=r*Math.PI/180,t.rect(-a/2,-a/2,n,a).fill({color:16777215}),t.rotation=0}_drawExpandMask(t,e,i,s,r,o,a){let n=0,c=0;switch(r){case"topLeft":n=-e/2,c=-i/2;break;case"topRight":n=e/2,c=-i/2;break;case"bottomLeft":n=-e/2,c=i/2;break;case"bottomRight":n=e/2,c=i/2;break;default:n=0,c=0}const h=[{x:-e/2,y:-i/2},{x:e/2,y:-i/2},{x:-e/2,y:i/2},{x:e/2,y:i/2}],u=Math.max(...h.map(f=>Math.hypot(f.x-n,f.y-c)))*s;if(o==="circle")t.circle(n,c,u).fill({color:16777215});else{const f=e/2*s,p=i/2*s;t.ellipse(n,c,f,p).fill({color:16777215})}}applyStyle(){if(this.pixiSprite==null||this.destroyed)return;const t=this.sprite.style||{},e=this.pixiSprite.texture?.width??0,i=this.pixiSprite.texture?.height??0;if(e===0||i===0)return;const s=Math.abs(this.sprite.width??0),r=Math.abs(this.sprite.height??0),o=t.borderRadius||0;o>0?(this.maskGraphics==null&&(this.maskGraphics=new m.Graphics,this.maskGraphics.label="MaskGraphics",this.maskGraphics._calculateBounds=()=>{},this.animationContainer.addChild(this.maskGraphics)),this.maskGraphics.clear(),this.maskGraphics.roundRect(-s/2,-r/2,s,r,Math.min(o,s/2,r/2)),this.maskGraphics.fill({color:16777215,alpha:1}),this.maskGraphics.visible=!0,this.pixiSprite.mask=null,this.pixiSprite.mask=this.maskGraphics):this.maskGraphics&&(this.maskGraphics.visible=!1,this.pixiSprite.mask=null),this.sprite.type!=="Text"&&this.sprite.type!=="Caption"&&this.sprite.type!=="Shape"?this.applyStroke(t):this.strokeGraphics&&(this.strokeGraphics.visible=!1),this.sprite.type!=="Text"&&this.sprite.type!=="Caption"&&this.sprite.type!=="Shape"?this.applyShadow(t):this.shadowContainer&&(this.shadowContainer.visible=!1,this.shadowContainer.filters=[])}applyStroke(t){const e=t.stroke;if(e&&e.width>0){this.strokeGraphics==null&&(this.strokeGraphics=new m.Graphics,this.strokeGraphics.label="StrokeGraphics",this.strokeGraphics._calculateBounds=()=>{},this.animationContainer.addChild(this.strokeGraphics)),this.strokeGraphics.clear();const i=$(e.color)??16777215,s=e.width,r=t.borderRadius||0,o=Math.abs(this.sprite.width??0),a=Math.abs(this.sprite.height??0);let n=1;if(e.alignment!==void 0&&(typeof e.alignment=="number"?n=e.alignment:e.alignment==="center"||e.alignment==="middle"?n=.5:e.alignment==="inside"?n=0:e.alignment==="outside"&&(n=1)),this.strokeGraphics.setStrokeStyle({width:s,color:i,alignment:n}),r>0){const c=Math.min(r,o/2,a/2);this.strokeGraphics.roundRect(-o/2,-a/2,o,a,c)}else this.strokeGraphics.rect(-o/2,-a/2,o,a);this.strokeGraphics.stroke(),this.strokeGraphics.visible=!0}else this.strokeGraphics!=null&&(this.strokeGraphics.visible=!1)}applyShadow(t){const e=t.shadow,i=Math.abs(this.sprite.width??0),s=Math.abs(this.sprite.height??0);if(e&&i>0&&s>0&&(e.blur>0||(e.offsetX??0)!==0||(e.offsetY??0)!==0)){this.shadowContainer==null&&(this.shadowContainer=new m.Container,this.shadowContainer.label="ShadowContainer",this.shadowContainer._calculateBounds=()=>{},this.shadowGraphics=new m.Graphics,this.shadowGraphics.label="ShadowGraphics",this.shadowGraphics._calculateBounds=()=>{},this.shadowContainer.addChild(this.shadowGraphics),this.animationContainer.addChildAt(this.shadowContainer,0));const r=$(e.color)??0,o=e.alpha??.5,a=e.blur??0,n=e.offsetX??0,c=e.offsetY??0;this.shadowContainer.position.set(n,c),this.shadowGraphics.clear();const h=t.borderRadius||0;if(h>0){const d=Math.min(h,i/2,s/2);this.shadowGraphics.roundRect(-i/2,-s/2,i,s,d)}else this.shadowGraphics.rect(-i/2,-s/2,i,s);if(this.shadowGraphics.fill({color:r,alpha:o}),a>0){(!this.shadowContainer.filters||this.shadowContainer.filters.length===0)&&(this.shadowContainer.filters=[new m.BlurFilter]);const d=this.shadowContainer.filters[0],u=this.root?Math.sqrt(this.root.worldTransform.a**2+this.root.worldTransform.b**2):1;d.strength=a*u,d.resolution=this.resolution,d.padding=Math.max(a*2*u,20)}else this.shadowContainer.filters=[];this.shadowContainer.visible=!0}else this.shadowContainer!=null&&(this.shadowContainer.visible=!1,this.shadowContainer.filters=[])}applyBlur(t){if(!this.animationContainer||this.destroyed)return;if(typeof t!="number"||!isFinite(t)||t<=0){this.animationContainer.filters&&this.animationContainer.filters.length>0&&(this.animationContainer.filters=[]);return}let e=this.animationContainer.filters?.find(r=>r instanceof m.BlurFilter);if(!e){e=new m.BlurFilter;const r=this.animationContainer.filters||[];this.animationContainer.filters=[...r,e]}const i=this.root?Math.sqrt(this.root.worldTransform.a**2+this.root.worldTransform.b**2):1,s=Math.max(i,.001);e.strength=t*s,e.resolution=this.resolution,e.padding=Math.max(t*2*s,20),e.quality=4,e.repeatEdgePixels=!0}applyMotionBlur(t){if(!this.animationContainer||this.destroyed)return;if(typeof t!="number"||!isFinite(t)||t<=0){this.animationContainer.filters&&(this.animationContainer.filters=this.animationContainer.filters.filter(i=>!(i instanceof j.ZoomBlurFilter)));return}let e=this.animationContainer.filters?.find(i=>i instanceof j.ZoomBlurFilter);if(!e){e=new j.ZoomBlurFilter;const i=this.animationContainer.filters||[];this.animationContainer.filters=[...i,e]}if(e.strength=t/200,this.pixiSprite){const i=this.pixiSprite.getBounds();e.center={x:i.width/2,y:i.height/2}}e.innerRadius=0,e.radius=-1}applyBrightness(t){if(!this.animationContainer||this.destroyed)return;const e=ce(this.sprite.colorAdjustment);if(t===1&&!e){this.animationContainer.filters&&(this.animationContainer.filters=this.animationContainer.filters.filter(s=>s.label!=="ColorAdjustmentFilter"));return}let i=this.animationContainer.filters?.find(s=>s.label==="ColorAdjustmentFilter");if(!i){i=new m.ColorMatrixFilter,i.label="ColorAdjustmentFilter";const s=this.animationContainer.filters||[];this.animationContainer.filters=[...s,i]}he(i,this.sprite.colorAdjustment,t)}applySelectiveHsl(){if(!this.animationContainer||this.destroyed)return;const t=Jt(this.sprite.colorAdjustment),e=(this.animationContainer.filters||[]).filter(s=>!s.label?.startsWith("SelectiveHslFilter"));if(t.length===0){this.animationContainer.filters=e;return}const i=[];for(let s=0;s<t.length;s++){const r=t[s],o=new m.UniformGroup({uTargetColor:{value:[1,1,0],type:"vec3<f32>"},uHueShift:{value:r.hue,type:"f32"},uSatShift:{value:r.saturation/100,type:"f32"},uLightShift:{value:r.lightness/100,type:"f32"},uTolerance:{value:.22,type:"f32"},uSoftness:{value:.12,type:"f32"}}),a=Et(r.targetColor);a&&(o.uniforms.uTargetColor[0]=a.r/255,o.uniforms.uTargetColor[1]=a.g/255,o.uniforms.uTargetColor[2]=a.b/255);const n=new m.Filter({glProgram:new m.GlProgram({vertex:kt,fragment:le,name:`SelectiveHslShader_${s}`}),resources:{hslUniforms:o}});n.label=`SelectiveHslFilter_${s}`,i.push(n)}this.animationContainer.filters=[...e,...i]}applyChromaKey(){if(!this.animationContainer||this.destroyed)return;const{chromaKey:t}=this.sprite;if(!t||!t.enabled){this.animationContainer.filters&&(this.animationContainer.filters=this.animationContainer.filters.filter(r=>r.label!=="ChromaKeyFilter"));return}let e=this.animationContainer.filters?.find(r=>r.label==="ChromaKeyFilter");if(!e){const r=new m.GlProgram({vertex:kt,fragment:oi,name:"ChromaKeyShader"}),o=new m.UniformGroup({uKeyColor:{value:[0,1,0],type:"vec3<f32>"},uSimilarity:{value:.1,type:"f32"},uSpill:{value:0,type:"f32"}});e=new m.Filter({glProgram:r,resources:{chromaUniforms:o}}),e.label="ChromaKeyFilter";const a=this.animationContainer.filters||[];this.animationContainer.filters=[...a,e]}const i=e.resources.chromaUniforms.uniforms,s=Et(t.color);s&&(i.uKeyColor[0]=s.r/255,i.uKeyColor[1]=s.g/255,i.uKeyColor[2]=s.b/255),i.uSimilarity=t.similarity,i.uSpill=t.spill}updateTransforms(){this.root!=null&&!this.destroyed&&this.applySpriteTransforms()}getSprite(){return this.pixiSprite}getRoot(){return this.root}destroy(){this.destroyed||(this.destroyed=!0,this.root!=null&&(this.root.parent&&this.root.parent.removeChild(this.root),this.root.destroy({children:!0}),this.root=null,this.pixiSprite=null),this.strokeGraphics!=null&&(this.strokeGraphics.destroy(),this.strokeGraphics=null),this.maskGraphics!=null&&(this.maskGraphics.destroy(),this.maskGraphics=null),this.shadowGraphics!=null&&(this.shadowGraphics.destroy(),this.shadowGraphics=null),this.shadowContainer!=null&&(this.shadowContainer.destroy({children:!0}),this.shadowContainer=null),this.texture!=null&&(this.texture.destroy(),this.texture=null))}}const Ho=`
2224
+ in vec2 aPosition;
2225
+ out vec2 _uv;
2226
+ uniform mat3 projectionMatrix;
2227
+ uniform vec4 uInputSize;
2228
+ uniform vec4 uOutputFrame;
2229
+ out vec2 vTextureCoord;
2230
+ uniform vec4 uOutputTexture;
2231
+
2232
+ vec4 filterVertexPosition( void )
2233
+ {
2234
+ vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
2235
+
2236
+ position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
2237
+ position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;
2238
+
2239
+ return vec4(position, 0.0, 1.0);
2240
+ }
2241
+
2242
+ vec2 filterTextureCoord( void )
2243
+ {
2244
+ return aPosition * (uOutputFrame.zw * uInputSize.zw);
2245
+ }
2246
+
2247
+ void main(void)
2248
+ {
2249
+ gl_Position = filterVertexPosition();
2250
+ vTextureCoord = filterTextureCoord();
2251
+ vec2 absolute = aPosition * uOutputFrame.zw + uOutputFrame.xy;
2252
+ _uv = absolute / uOutputTexture.xy;
2253
+ }
2254
+ `,J={custom:l=>{const t=l.defaultParams||{},e=l.paramsTypes||{};return Object.fromEntries(Object.entries(t).map(([i,s])=>[i,{value:s,type:Go(e[i])}]))},basics:{_fromR:{value:1,type:"f32"},_toR:{value:1,type:"f32"},ratio:{value:1,type:"f32"},progress:{value:0,type:"f32"},customUniform:{value:0,type:"f32"},center:{value:[.5,.5],type:"vec2<f32>"}}},Go=l=>l==="f32"||l==="i32"?l:l==="float"?"f32":`${l}<f32>`,Uo=l=>`
2255
+ precision highp float;
2256
+ in vec2 vTextureCoord;
2257
+ in vec2 _uv; // Normalized [0,1] coordinates with center at (0.5, 0.5) for canvas-centered transitions
2258
+ uniform sampler2D from, to;
2259
+ uniform float progress, ratio, _fromR, _toR;
2260
+ uniform float customUniform;
2261
+ uniform vec2 center; // Center point of the canvas (0.5, 0.5) - NOT element centers
2262
+
2263
+ vec4 getFromColor(vec2 uv){
2264
+ return texture2D(from, .5+(uv-.5)*vec2(max(ratio/_fromR,1.), max(_fromR/ratio,1.)));
2265
+ }
2266
+ vec4 getToColor(vec2 uv){
2267
+ return texture2D(to, .5+(uv-.5)*vec2(max(ratio/_toR,1.), max(_toR/ratio,1.)));
2268
+ }
2269
+
2270
+ // Helper function to get distance from canvas center
2271
+ float distanceFromCenter(vec2 uv) {
2272
+ return distance(uv, center);
2273
+ }
2274
+
2275
+ // Helper function to get angle from canvas center
2276
+ float angleFromCenter(vec2 uv) {
2277
+ vec2 centered = uv - center;
2278
+ return atan(centered.y, centered.x);
2279
+ }
2280
+
2281
+ // Helper function to get centered coordinates relative to canvas center
2282
+ vec2 getCenteredCoord(vec2 uv) {
2283
+ return uv - center; // Coordinates relative to canvas center
2284
+ }
2285
+
2286
+ // gl-transition code here
2287
+ ${l}
2288
+ // gl-transition code end
2289
+
2290
+ void main(){
2291
+ // Use _uv which is properly normalized to [0,1] range with center at (0.5, 0.5)
2292
+ // This ensures transitions are centered on the canvas, not element centers
2293
+ vec2 uv = _uv;
2294
+ gl_FragColor = transition(uv);
2295
+ }
2296
+ `,Wo=`
2297
+ const float PI = 3.141592653589;
2298
+
2299
+ vec4 transition(vec2 p) {
2300
+ vec2 rp = p * 2.0 - 1.0;
2301
+ float angle = atan(rp.y, rp.x);
2302
+ float threshold = (progress - 0.5) * PI * 2.5;
2303
+ float mix_factor = smoothstep(0.0, 0.1, angle - threshold);
2304
+ return mix(getToColor(p), getFromColor(p), mix_factor);
2305
+ }
2306
+ `,Vo=`
2307
+ uniform vec2 gridSize;
2308
+ uniform float pause;
2309
+ uniform float dividerWidth;
2310
+ uniform vec4 bgColor;
2311
+ uniform float randomness;
2312
+
2313
+ float rand(vec2 co) {
2314
+ return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
2315
+ }
2316
+
2317
+ float getDelta(vec2 p) {
2318
+ vec2 rectanglePos = floor(gridSize * p);
2319
+ vec2 rectangleSize = vec2(1.0 / gridSize.x, 1.0 / gridSize.y);
2320
+ float top = rectangleSize.y * (rectanglePos.y + 1.0);
2321
+ float bottom = rectangleSize.y * rectanglePos.y;
2322
+ float left = rectangleSize.x * rectanglePos.x;
2323
+ float right = rectangleSize.x * (rectanglePos.x + 1.0);
2324
+ float minX = min(abs(p.x - left), abs(p.x - right));
2325
+ float minY = min(abs(p.y - top), abs(p.y - bottom));
2326
+ return min(minX, minY);
2327
+ }
2328
+
2329
+ float getDividerSize() {
2330
+ vec2 rectangleSize = vec2(1.0 / gridSize.x, 1.0 / gridSize.y);
2331
+ return min(rectangleSize.x, rectangleSize.y) * dividerWidth;
2332
+ }
2333
+
2334
+ vec4 transition(vec2 p) {
2335
+ if (progress < pause) {
2336
+ float currentProg = progress / pause;
2337
+ float a = 1.0;
2338
+ if (getDelta(p) < getDividerSize()) {
2339
+ a = 1.0 - currentProg;
2340
+ }
2341
+ return mix(bgColor, getFromColor(p), a);
2342
+ }
2343
+
2344
+ if (progress < 1.0 - pause) {
2345
+ if (getDelta(p) < getDividerSize()) {
2346
+ return bgColor;
2347
+ }
2348
+
2349
+ float currentProg = (progress - pause) / (1.0 - pause * 2.0);
2350
+ vec2 rectanglePos = floor(gridSize * p);
2351
+ float r = rand(rectanglePos) - randomness;
2352
+ float cp = smoothstep(0.0, 1.0 - r, currentProg);
2353
+ float rectangleSize = 1.0 / gridSize.x;
2354
+ float delta = rectanglePos.x * rectangleSize;
2355
+ float offset = rectangleSize * 0.5 + delta;
2356
+
2357
+ vec2 warped = p;
2358
+ warped.x = (warped.x - offset) / max(abs(cp - 0.5), 0.001) * 0.5 + offset;
2359
+
2360
+ float s = step(abs(gridSize.x * (p.x - delta) - 0.5), abs(cp - 0.5));
2361
+ vec4 mixColor = mix(getToColor(warped), getFromColor(warped), step(cp, 0.5));
2362
+ return mix(bgColor, mixColor, s);
2363
+ }
2364
+
2365
+ float currentProg = (progress - 1.0 + pause) / pause;
2366
+ float a = 1.0;
2367
+ if (getDelta(p) < getDividerSize()) {
2368
+ a = currentProg;
2369
+ }
2370
+ return mix(bgColor, getToColor(p), a);
2371
+ }
2372
+ `,Yo={gridSize:{value:[4,4],type:"vec2<f32>"},pause:{value:.1,type:"f32"},dividerWidth:{value:.05,type:"f32"},bgColor:{value:[0,0,0,1],type:"vec4<f32>"},randomness:{value:.1,type:"f32"}},Qo=`
2373
+ uniform vec3 backColor;
2374
+
2375
+ vec4 transition(vec2 uv) {
2376
+ float distance = length(uv - center);
2377
+ float radius = sqrt(8.0) * abs(progress - 0.5);
2378
+
2379
+ if (distance > radius) {
2380
+ return vec4(backColor, 1.0);
2381
+ } else {
2382
+ if (progress < 0.5) return getFromColor(uv);
2383
+ else return getToColor(uv);
2384
+ }
2385
+ }
2386
+ `,jo=`
2387
+ uniform vec2 direction;
2388
+
2389
+ vec4 transition(vec2 uv) {
2390
+ vec2 p = uv + progress * sign(direction);
2391
+ vec2 f = fract(p);
2392
+ return mix(
2393
+ getToColor(f),
2394
+ getFromColor(f),
2395
+ step(0.0, p.y) * step(p.y, 1.0) * step(0.0, p.x) * step(p.x, 1.0)
2396
+ );
2397
+ }
2398
+ `,Jo={direction:{value:[0,1],type:"vec2<f32>"}},Zo=`
2399
+ uniform float smoothness;
2400
+ uniform vec3 color;
2401
+
2402
+ const float M_PI = 3.14159265358979323846;
2403
+
2404
+ float quadraticInOut(float t) {
2405
+ float p = 2.0 * t * t;
2406
+ return t < 0.5 ? p : -p + (4.0 * t) - 1.0;
2407
+ }
2408
+
2409
+ float getGradient(float r, float dist) {
2410
+ float d = r - dist;
2411
+ return mix(
2412
+ smoothstep(-smoothness, 0.0, r - dist * (1.0 + smoothness)),
2413
+ -1.0 - step(0.005, d),
2414
+ step(-0.005, d) * step(d, 0.01)
2415
+ );
2416
+ }
2417
+
2418
+ float getWave(vec2 p){
2419
+ vec2 _p = p - center; // offset from center
2420
+ float rads = atan(_p.y, _p.x);
2421
+ float degs = degrees(rads) + 180.0;
2422
+ vec2 range = vec2(0.0, M_PI * 30.0);
2423
+ vec2 domain = vec2(0.0, 360.0);
2424
+ float ratio = (M_PI * 30.0) / 360.0;
2425
+ degs = degs * ratio;
2426
+ float x = progress;
2427
+ float magnitude = mix(0.02, 0.09, smoothstep(0.0, 1.0, x));
2428
+ float offset = mix(40.0, 30.0, smoothstep(0.0, 1.0, x));
2429
+ float ease_degs = quadraticInOut(sin(degs));
2430
+ float deg_wave_pos = (ease_degs * magnitude) * sin(x * offset);
2431
+ return x + deg_wave_pos;
2432
+ }
2433
+
2434
+ vec4 transition(vec2 p) {
2435
+ float dist = distance(center, p);
2436
+ float m = getGradient(getWave(p), dist);
2437
+ vec4 cfrom = getFromColor(p);
2438
+ vec4 cto = getToColor(p);
2439
+ return mix(mix(cfrom, cto, m), mix(cfrom, vec4(color, 1.0), 0.75), step(m, -2.0));
2440
+ }
2441
+ `,Ko={smoothness:{value:.1,type:"f32"},center:{value:[.5,.5],type:"vec2<f32>"},color:{value:[1,.5,0],type:"vec3<f32>"}},Xo=`
2442
+ uniform ivec2 squares;
2443
+ uniform vec2 direction;
2444
+ uniform float smoothness;
2445
+
2446
+ vec4 transition (vec2 p) {
2447
+ vec2 v = normalize(direction);
2448
+ v /= abs(v.x)+abs(v.y);
2449
+ float d = v.x * center.x + v.y * center.y;
2450
+ float offset = smoothness;
2451
+ float pr = smoothstep(-offset, 0.0, v.x * p.x + v.y * p.y - (d-0.5+progress*(1.+offset)));
2452
+ vec2 squarep = fract(p*vec2(squares));
2453
+ vec2 squaremin = vec2(pr/2.0);
2454
+ vec2 squaremax = vec2(1.0 - pr/2.0);
2455
+ float a = (1.0 - step(progress, 0.0)) * step(squaremin.x, squarep.x) * step(squaremin.y, squarep.y) * step(squarep.x, squaremax.x) * step(squarep.y, squaremax.y);
2456
+ return mix(getFromColor(p), getToColor(p), a);
2457
+ }
2458
+ `,qo={squares:{value:[10,10],type:"vec2<i32>"},direction:{value:[1,-.5],type:"vec2<f32>"},smoothness:{value:1.6,type:"f32"}},_o=`
2459
+ #define PI 3.14159265359
2460
+
2461
+ uniform float rotations;
2462
+ uniform float scale;
2463
+ uniform vec4 backColor;
2464
+
2465
+ vec4 transition (vec2 uv) {
2466
+ vec2 difference = uv - center;
2467
+ vec2 dir = normalize(difference);
2468
+ float dist = length(difference);
2469
+
2470
+ float angle = 2.0 * PI * rotations * progress;
2471
+
2472
+ float c = cos(angle);
2473
+ float s = sin(angle);
2474
+
2475
+ float currentScale = mix(scale, 1.0, 2.0 * abs(progress - 0.5));
2476
+
2477
+ vec2 rotatedDir = vec2(dir.x * c - dir.y * s, dir.x * s + dir.y * c);
2478
+ vec2 rotatedUv = center + rotatedDir * dist / currentScale;
2479
+
2480
+ if (rotatedUv.x < 0.0 || rotatedUv.x > 1.0 ||
2481
+ rotatedUv.y < 0.0 || rotatedUv.y > 1.0)
2482
+ return backColor;
2483
+
2484
+ return mix(getFromColor(rotatedUv), getToColor(rotatedUv), progress);
2485
+ }
2486
+ `,$o={center:{value:[.5,.5],type:"vec2<f32>"},rotations:{value:1,type:"f32"},scale:{value:8,type:"f32"},backColor:{value:[.15,.15,.15,1],type:"vec4<f32>"}},tn=`
2487
+ uniform ivec2 size;
2488
+ uniform float smoothness;
2489
+
2490
+ float rand (vec2 co) {
2491
+ return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
2492
+ }
2493
+
2494
+ vec4 transition(vec2 p) {
2495
+ float r = rand(floor(vec2(size) * p));
2496
+ float m = smoothstep(0.0, -smoothness, r - (progress * (1.0 + smoothness)));
2497
+ return mix(getFromColor(p), getToColor(p), m);
2498
+ }
2499
+ `,en={size:{value:[10,10],type:"vec2<i32>"},smoothness:{value:.5,type:"f32"}},sn=`
2500
+ #define PI 3.14159265359
2501
+
2502
+ uniform int segments;
2503
+
2504
+ vec4 transition (vec2 uv) {
2505
+ float angle = atan(uv.y - 0.5, uv.x - 0.5) - 0.5 * PI;
2506
+ float normalized = (angle + 1.5 * PI) * (2.0 * PI);
2507
+
2508
+ float radius = (cos(float(segments) * angle) + 4.0) / 4.0;
2509
+ float difference = length(uv - vec2(0.5, 0.5));
2510
+
2511
+ if (difference > radius * progress)
2512
+ return getFromColor(uv);
2513
+ else
2514
+ return getToColor(uv);
2515
+ }
2516
+ `,rn={segments:{value:5,type:"i32"}},on=`
2517
+ uniform ivec2 squaresMin;
2518
+ uniform int steps;
2519
+
2520
+ vec4 transition(vec2 uv) {
2521
+ float d = min(progress, 1.0 - progress);
2522
+ float dist = steps>0 ? ceil(d * float(steps)) / float(steps) : d;
2523
+ vec2 squareSize = 2.0 * dist / vec2(squaresMin);
2524
+
2525
+ vec2 p = dist>0.0 ? (floor(uv / squareSize) + 0.5) * squareSize : uv;
2526
+ return mix(getFromColor(p), getToColor(p), progress);
2527
+ }
2528
+ `,nn={squaresMin:{value:[20,20],type:"vec2<i32>"},steps:{value:50,type:"i32"}},an=`
2529
+ uniform float scale;
2530
+ uniform float smoothness;
2531
+ uniform float seed;
2532
+
2533
+ // http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/
2534
+ float random(vec2 co)
2535
+ {
2536
+ float a = seed;
2537
+ float b = 78.233;
2538
+ float c = 43758.5453;
2539
+ float dt = dot(co.xy, vec2(a, b));
2540
+ float sn = mod(dt, 3.14);
2541
+ return fract(sin(sn) * c);
2542
+ }
2543
+
2544
+ // 2D Noise based on Morgan McGuire @morgan3d
2545
+ // https://www.shadertoy.com/view/4dS3Wd
2546
+ float noise(vec2 st) {
2547
+ vec2 i = floor(st);
2548
+ vec2 f = fract(st);
2549
+
2550
+ // Four corners in 2D of a tile
2551
+ float a = random(i);
2552
+ float b = random(i + vec2(1.0, 0.0));
2553
+ float c = random(i + vec2(0.0, 1.0));
2554
+ float d = random(i + vec2(1.0, 1.0));
2555
+
2556
+ //Smooth Interpolation
2557
+
2558
+ // Cubic Hermine Curve. Same as SmoothStep()
2559
+ vec2 u = f*f*(3.0-2.0*f);
2560
+ // u = smoothstep(0.,1.,f);
2561
+
2562
+ // Mix 4 coorners percentages
2563
+ return mix(a, b, u.x) +
2564
+ (c - a)* u.y * (1.0 - u.x) +
2565
+ (d - b) * u.x * u.y;
2566
+ }
2567
+
2568
+ vec4 transition (vec2 uv) {
2569
+ vec4 from = getFromColor(uv);
2570
+ vec4 to = getToColor(uv);
2571
+ float n = noise(uv * scale);
2572
+
2573
+ float p = mix(-smoothness, 1.0 + smoothness, progress);
2574
+ float lower = p - smoothness;
2575
+ float higher = p + smoothness;
2576
+
2577
+ float q = smoothstep(lower, higher, n);
2578
+
2579
+ return mix(
2580
+ from,
2581
+ to,
2582
+ 1.0 - q
2583
+ );
2584
+ }
2585
+ `,ln={scale:{value:4,type:"f32"},smoothness:{value:.01,type:"f32"},seed:{value:12.9898,type:"f32"}},cn=`
2586
+
2587
+ #define PI 3.14159265358979323846
2588
+
2589
+ uniform float spiralTurns;
2590
+ uniform float spiralWidth;
2591
+
2592
+ vec4 transition(vec2 uv) {
2593
+
2594
+ vec2 p = uv - center;
2595
+
2596
+ float r = length(p);
2597
+ float angle = atan(p.y, p.x);
2598
+
2599
+ float normalizedAngle = (angle + PI) / (2.0 * PI);
2600
+
2601
+ float spiral = normalizedAngle + r * spiralTurns;
2602
+ spiral = fract(spiral);
2603
+
2604
+ float factor = smoothstep(
2605
+ progress - spiralWidth,
2606
+ progress + spiralWidth,
2607
+ spiral
2608
+ );
2609
+ return mix(
2610
+ getToColor(uv), // ahora aparece primero
2611
+ getFromColor(uv), // aparece después
2612
+ factor
2613
+ );
2614
+ }
2615
+
2616
+
2617
+ `,hn={spiralTurns:{value:1.5,type:"f32"},spiralWidth:{value:.02,type:"f32"}},dn=`
2618
+ //direction of movement : 0 : up, 1, down
2619
+ uniform float direction; // = 1.0 (using float instead of bool for WebGPU)
2620
+
2621
+ //luminance threshold
2622
+ uniform float l_threshold; // = 0.8
2623
+
2624
+ //does the movement take effect above or below luminance threshold ?
2625
+ uniform float above; // = 0.0 (false) (using float instead of bool for WebGPU)
2626
+
2627
+ //Random function borrowed from everywhere
2628
+ float rand(vec2 co){
2629
+ return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
2630
+ }
2631
+
2632
+ // Simplex noise:
2633
+ // Description : Array and textureless GLSL 2D simplex noise function.
2634
+ // Author: Ian McEwan, Ashima Arts.
2635
+ // Maintainer : ijm
2636
+ // Lastmod: 20110822 (ijm)
2637
+ // License: MIT
2638
+ // 2011 Ashima Arts. All rights reserved.
2639
+ // Distributed under the MIT License. See LICENSE file.
2640
+ // https://github.com/ashima/webgl-noise
2641
+
2642
+ vec3 mod289(vec3 x) {
2643
+ return x - floor(x * (1.0 / 289.0)) * 289.0;
2644
+ }
2645
+
2646
+ vec2 mod289(vec2 x) {
2647
+ return x - floor(x * (1.0 / 289.0)) * 289.0;
2648
+ }
2649
+
2650
+ vec3 permute(vec3 x) {
2651
+ return mod289(((x*34.0)+1.0)*x);
2652
+ }
2653
+
2654
+ float snoise(vec2 v)
2655
+ {
2656
+ const vec4 C = vec4(0.211324865405187, // (3.0-sqrt(3.0))/6.0
2657
+ 0.366025403784439, // 0.5*(sqrt(3.0)-1.0)
2658
+ -0.577350269189626, // -1.0 + 2.0 * C.x
2659
+ 0.024390243902439); // 1.0 / 41.0
2660
+ // First corner
2661
+ vec2 i = floor(v + dot(v, C.yy) );
2662
+ vec2 x0 = v - i + dot(i, C.xx);
2663
+
2664
+ // Other corners
2665
+ vec2 i1;
2666
+ //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0
2667
+ //i1.y = 1.0 - i1.x;
2668
+ i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
2669
+ // x0 = x0 - 0.0 + 0.0 * C.xx ;
2670
+ // x1 = x0 - i1 + 1.0 * C.xx ;
2671
+ // x2 = x0 - 1.0 + 2.0 * C.xx ;
2672
+ vec4 x12 = x0.xyxy + C.xxzz;
2673
+ x12.xy -= i1;
2674
+
2675
+ //Permutations
2676
+ i = mod289(i); // Avoid truncation effects in permutation
2677
+ vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))
2678
+ + i.x + vec3(0.0, i1.x, 1.0 ));
2679
+
2680
+ vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);
2681
+ m = m*m ;
2682
+ m = m*m ;
2683
+
2684
+ // Gradients: 41 points uniformly over a line, mapped onto a diamond.
2685
+ // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)
2686
+
2687
+ vec3 x = 2.0 * fract(p * C.www) - 1.0;
2688
+ vec3 h = abs(x) - 0.5;
2689
+ vec3 ox = floor(x + 0.5);
2690
+ vec3 a0 = x - ox;
2691
+
2692
+ // Normalize gradients implicitly by scaling m
2693
+ // Approximation of: m *= inversesqrt( a0*a0 + h*h );
2694
+ m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );
2695
+
2696
+ // Compute final noise value at P
2697
+ vec3 g;
2698
+ g.x = a0.x * x0.x + h.x * x0.y;
2699
+ g.yz = a0.yz * x12.xz + h.yz * x12.yw;
2700
+ return 130.0 * dot(m, g);
2701
+ }
2702
+
2703
+ // Simplex noise -- end
2704
+
2705
+ float luminance(vec4 color){
2706
+ //(0.299*R + 0.587*G + 0.114*B)
2707
+ return color.r*0.299+color.g*0.587+color.b*0.114;
2708
+ }
2709
+
2710
+ vec4 transition(vec2 uv) {
2711
+ vec2 p = uv.xy / vec2(1.0).xy;
2712
+ vec2 center = vec2(1.0, direction);
2713
+
2714
+ if (progress == 0.0) {
2715
+ return getFromColor(p);
2716
+ } else if (progress == 1.0) {
2717
+ return getToColor(p);
2718
+ } else {
2719
+ float x = progress;
2720
+ float dist = distance(center, p) - progress*exp(snoise(vec2(p.x, 0.0)));
2721
+ float r = x - rand(vec2(p.x, 0.1));
2722
+ float m;
2723
+ if(above > 0.5){
2724
+ m = dist <= r && luminance(getFromColor(p))>l_threshold ? 1.0 : (progress*progress*progress);
2725
+ }
2726
+ else{
2727
+ m = dist <= r && luminance(getFromColor(p))<l_threshold ? 1.0 : (progress*progress*progress);
2728
+ }
2729
+ return mix(getFromColor(p), getToColor(p), m);
2730
+ }
2731
+ }
2732
+ `,fn={direction:{value:1,type:"f32"},l_threshold:{value:.8,type:"f32"},above:{value:0,type:"f32"}},un=`
2733
+ uniform int steps; // = 50
2734
+ uniform float horizontalHexagons; // = 20.0
2735
+
2736
+ struct Hexagon {
2737
+ float q;
2738
+ float r;
2739
+ float s;
2740
+ };
2741
+
2742
+ Hexagon createHexagon(float q, float r){
2743
+ Hexagon hex;
2744
+ hex.q = q;
2745
+ hex.r = r;
2746
+ hex.s = -q - r;
2747
+ return hex;
2748
+ }
2749
+
2750
+ Hexagon roundHexagon(Hexagon hex){
2751
+ float q = floor(hex.q + 0.5);
2752
+ float r = floor(hex.r + 0.5);
2753
+ float s = floor(hex.s + 0.5);
2754
+
2755
+ float deltaQ = abs(q - hex.q);
2756
+ float deltaR = abs(r - hex.r);
2757
+ float deltaS = abs(s - hex.s);
2758
+
2759
+ if (deltaQ > deltaR && deltaQ > deltaS)
2760
+ q = -r - s;
2761
+ else if (deltaR > deltaS)
2762
+ r = -q - s;
2763
+ else
2764
+ s = -q - r;
2765
+
2766
+ return createHexagon(q, r);
2767
+ }
2768
+
2769
+ Hexagon hexagonFromPoint(vec2 point, float size) {
2770
+ point.y /= ratio;
2771
+ point = (point - 0.5) / size;
2772
+
2773
+ float q = (sqrt(3.0) / 3.0) * point.x + (-1.0 / 3.0) * point.y;
2774
+ float r = 0.0 * point.x + 2.0/3.0 * point.y;
2775
+
2776
+ Hexagon hex = createHexagon(q, r);
2777
+ return roundHexagon(hex);
2778
+ }
2779
+
2780
+ vec2 pointFromHexagon(Hexagon hex, float size) {
2781
+ float x = (sqrt(3.0) * hex.q + (sqrt(3.0) / 2.0) * hex.r) * size + 0.5;
2782
+ float y = (0.0 * hex.q + (3.0/2.0) * hex.r) * size + 0.5;
2783
+
2784
+ return vec2(x, y * ratio);
2785
+ }
2786
+
2787
+ vec4 transition (vec2 uv) {
2788
+ float dist = 2.0 * min(progress, 1.0 - progress);
2789
+ dist = steps > 0 ? ceil(dist * float(steps)) / float(steps) : dist;
2790
+
2791
+ float size = (sqrt(3.0) / 3.0) * dist / horizontalHexagons;
2792
+
2793
+ vec2 point = dist > 0.0 ? pointFromHexagon(hexagonFromPoint(uv, size), size) : uv;
2794
+
2795
+ return mix(getFromColor(point), getToColor(point), progress);
2796
+ }
2797
+ `,pn={steps:{value:50,type:"i32"},horizontalHexagons:{value:20,type:"f32"}},mn=`
2798
+ float inHeart (vec2 p, vec2 center, float size) {
2799
+ if (size==0.0) return 0.0;
2800
+ vec2 o = (p-center)/(1.6*size);
2801
+ o.y = -o.y;
2802
+ float a = o.x*o.x+o.y*o.y-0.3;
2803
+ return step(a*a*a, o.x*o.x*o.y*o.y*o.y);
2804
+ }
2805
+
2806
+ vec4 transition (vec2 uv) {
2807
+ return mix(
2808
+ getFromColor(uv),
2809
+ getToColor(uv),
2810
+ inHeart(uv, vec2(0.5, 0.5), progress)
2811
+ );
2812
+ }
2813
+ `,gn={},vn=`
2814
+ uniform sampler2D displacementMap;
2815
+ uniform float strength; // = 0.5
2816
+
2817
+ vec4 transition (vec2 uv) {
2818
+ float displacement = texture2D(displacementMap, uv).r * strength;
2819
+
2820
+ vec2 uvFrom = vec2(uv.x + progress * displacement, uv.y);
2821
+ vec2 uvTo = vec2(uv.x - (1.0 - progress) * displacement, uv.y);
2822
+
2823
+ return mix(
2824
+ getFromColor(uvFrom),
2825
+ getToColor(uvTo),
2826
+ progress
2827
+ );
2828
+ }
2829
+ `,yn={strength:{value:.5,type:"f32"}},xn=`
2830
+ uniform vec2 direction; // = vec2(1.0, -1.0)
2831
+ uniform float smoothness; // = 0.5
2832
+
2833
+ // Note: center is already defined as a uniform in the fragment wrapper
2834
+
2835
+ vec4 transition (vec2 uv) {
2836
+ vec2 v = normalize(direction);
2837
+ v /= abs(v.x)+abs(v.y);
2838
+ float d = v.x * center.x + v.y * center.y;
2839
+ float m =
2840
+ (1.0-step(progress, 0.0)) * // there is something wrong with our formula that makes m not equals 0.0 with progress is 0.0
2841
+ (1.0 - smoothstep(-smoothness, 0.0, v.x * uv.x + v.y * uv.y - (d-0.5+progress*(1.+smoothness))));
2842
+ return mix(getFromColor(uv), getToColor(uv), m);
2843
+ }
2844
+ `,wn={direction:{value:[1,-1],type:"vec2<f32>"},smoothness:{value:.5,type:"f32"}},bn=`
2845
+ uniform vec2 direction; // = vec2(-1.0, 1.0)
2846
+
2847
+ const float smoothness = 0.5;
2848
+ // Note: center is already defined as a uniform in the fragment wrapper
2849
+
2850
+ vec4 transition (vec2 uv) {
2851
+ vec2 v = normalize(direction);
2852
+ v /= abs(v.x) + abs(v.y);
2853
+ float d = v.x * center.x + v.y * center.y;
2854
+ float m = 1.0 - smoothstep(-smoothness, 0.0, v.x * uv.x + v.y * uv.y - (d - 0.5 + progress * (1.0 + smoothness)));
2855
+ return mix(getFromColor((uv - 0.5) * (1.0 - m) + 0.5), getToColor((uv - 0.5) * m + 0.5), m);
2856
+ }
2857
+ `,Cn={direction:{value:[-1,1],type:"vec2<f32>"}},Tn=`
2858
+ uniform float threshold; // = 3.0
2859
+ uniform float fadeEdge; // = 0.1
2860
+
2861
+ // Note: center is already defined as a uniform in the fragment wrapper
2862
+
2863
+ float rand(vec2 co) {
2864
+ return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
2865
+ }
2866
+
2867
+ vec4 transition(vec2 p) {
2868
+ float dist = distance(center, p) / threshold;
2869
+ float r = progress - min(rand(vec2(p.y, 0.0)), rand(vec2(0.0, p.x)));
2870
+ return mix(getFromColor(p), getToColor(p), mix(0.0, mix(step(dist, r), 1.0, smoothstep(1.0-fadeEdge, 1.0, progress)), smoothstep(0.0, fadeEdge, progress)));
2871
+ }
2872
+ `,Sn={threshold:{value:3,type:"f32"},fadeEdge:{value:.1,type:"f32"}},An=`
2873
+ uniform float smoothness; // = 0.3
2874
+ uniform float opening; // = 1.0 (using float instead of bool for WebGPU: 1.0 = true, 0.0 = false)
2875
+
2876
+ // Note: center is already defined as a uniform in the fragment wrapper
2877
+ const float SQRT_2 = 1.414213562373;
2878
+
2879
+ vec4 transition (vec2 uv) {
2880
+ float x = opening > 0.5 ? progress : 1.0 - progress;
2881
+ float m = smoothstep(-smoothness, 0.0, SQRT_2*distance(center, uv) - x*(1.0+smoothness));
2882
+ return mix(getFromColor(uv), getToColor(uv), opening > 0.5 ? 1.0 - m : m);
2883
+ }
2884
+ `,ni={smoothness:{value:.3,type:"f32"},opening:{value:1,type:"f32"}},kn=`
2885
+ vec4 transition (vec2 uv) {
2886
+ if(progress == 0.0){
2887
+ return getFromColor(uv);
2888
+ }
2889
+ vec2 leaf_uv = (uv - vec2(0.5))/10.0/pow(progress,3.5);
2890
+ leaf_uv.y = -leaf_uv.y;
2891
+ leaf_uv.y += 0.35;
2892
+ float r = 0.18;
2893
+ float o = atan(leaf_uv.y, leaf_uv.x);
2894
+ return mix(getFromColor(uv), getToColor(uv), 1.0-step(1.0 - length(leaf_uv)+r*(1.0+sin(o))*(1.0+0.9 * cos(8.0*o))*(1.0+0.1*cos(24.0*o))*(0.9+0.05*cos(200.0*o)), 1.0));
2895
+ }
2896
+ `,Fn={},Rn=`
2897
+ uniform float zoom; // = 0.88
2898
+ uniform float corner_radius; // = 0.22
2899
+
2900
+ const vec4 black = vec4(0.0, 0.0, 0.0, 1.0);
2901
+ const vec2 c00 = vec2(0.0, 0.0);
2902
+ const vec2 c01 = vec2(0.0, 1.0);
2903
+ const vec2 c11 = vec2(1.0, 1.0);
2904
+ const vec2 c10 = vec2(1.0, 0.0);
2905
+
2906
+ bool in_corner(vec2 p, vec2 corner, vec2 radius) {
2907
+ vec2 axis = (c11 - corner) - corner;
2908
+ p = p - (corner + axis * radius);
2909
+ p *= axis / radius;
2910
+ return (p.x > 0.0 && p.y > -1.0) || (p.y > 0.0 && p.x > -1.0) || dot(p, p) < 1.0;
2911
+ }
2912
+
2913
+ bool test_rounded_mask(vec2 p, vec2 corner_size) {
2914
+ return
2915
+ in_corner(p, c00, corner_size) &&
2916
+ in_corner(p, c01, corner_size) &&
2917
+ in_corner(p, c10, corner_size) &&
2918
+ in_corner(p, c11, corner_size);
2919
+ }
2920
+
2921
+ vec4 screen(vec4 a, vec4 b) {
2922
+ return 1.0 - (1.0 - a) * (1.0 - b);
2923
+ }
2924
+
2925
+ vec4 unscreen(vec4 c) {
2926
+ return 1.0 - sqrt(1.0 - c);
2927
+ }
2928
+
2929
+ vec4 sample_with_corners_from(vec2 p, vec2 corner_size) {
2930
+ p = (p - 0.5) / zoom + 0.5;
2931
+ if (!test_rounded_mask(p, corner_size)) {
2932
+ return black;
2933
+ }
2934
+ return unscreen(getFromColor(p));
2935
+ }
2936
+
2937
+ vec4 sample_with_corners_to(vec2 p, vec2 corner_size) {
2938
+ p = (p - 0.5) / zoom + 0.5;
2939
+ if (!test_rounded_mask(p, corner_size)) {
2940
+ return black;
2941
+ }
2942
+ return unscreen(getToColor(p));
2943
+ }
2944
+
2945
+ vec4 simple_sample_with_corners_from(vec2 p, vec2 corner_size, float zoom_amt) {
2946
+ p = (p - 0.5) / (1.0 - zoom_amt + zoom * zoom_amt) + 0.5;
2947
+ if (!test_rounded_mask(p, corner_size)) {
2948
+ return black;
2949
+ }
2950
+ return getFromColor(p);
2951
+ }
2952
+
2953
+ vec4 simple_sample_with_corners_to(vec2 p, vec2 corner_size, float zoom_amt) {
2954
+ p = (p - 0.5) / (1.0 - zoom_amt + zoom * zoom_amt) + 0.5;
2955
+ if (!test_rounded_mask(p, corner_size)) {
2956
+ return black;
2957
+ }
2958
+ return getToColor(p);
2959
+ }
2960
+
2961
+ mat3 rotate2d(float angle, float ratio) {
2962
+ float s = sin(angle);
2963
+ float c = cos(angle);
2964
+ return mat3(
2965
+ c, s, 0.0,
2966
+ -s, c, 0.0,
2967
+ 0.0, 0.0, 1.0);
2968
+ }
2969
+
2970
+ mat3 translate2d(float x, float y) {
2971
+ return mat3(
2972
+ 1.0, 0.0, 0.0,
2973
+ 0.0, 1.0, 0.0,
2974
+ -x, -y, 1.0);
2975
+ }
2976
+
2977
+ mat3 scale2d(float x, float y) {
2978
+ return mat3(
2979
+ x, 0.0, 0.0,
2980
+ 0.0, y, 0.0,
2981
+ 0.0, 0.0, 1.0);
2982
+ }
2983
+
2984
+ // Split an image and rotate one up and one down along off screen pivot points
2985
+ vec4 get_cross_rotated(vec3 p3, float angle, vec2 corner_size, float ratio) {
2986
+ angle = angle * angle; // easing
2987
+ angle /= 2.4; // works out to be a good number of radians
2988
+
2989
+ mat3 center_and_scale = translate2d(-0.5, -0.5) * scale2d(1.0, ratio);
2990
+ mat3 unscale_and_uncenter = scale2d(1.0, 1.0/ratio) * translate2d(0.5, 0.5);
2991
+ mat3 slide_left = translate2d(-2.0, 0.0);
2992
+ mat3 slide_right = translate2d(2.0, 0.0);
2993
+ mat3 rotate = rotate2d(angle, ratio);
2994
+
2995
+ mat3 op_a = center_and_scale * slide_right * rotate * slide_left * unscale_and_uncenter;
2996
+ mat3 op_b = center_and_scale * slide_left * rotate * slide_right * unscale_and_uncenter;
2997
+
2998
+ vec4 a = sample_with_corners_from((op_a * p3).xy, corner_size);
2999
+ vec4 b = sample_with_corners_from((op_b * p3).xy, corner_size);
3000
+
3001
+ return screen(a, b);
3002
+ }
3003
+
3004
+ // Image stays put, but this time moves two masks
3005
+ vec4 get_cross_masked(vec3 p3, float angle, vec2 corner_size, float ratio) {
3006
+ angle = 1.0 - angle;
3007
+ angle = angle * angle; // easing
3008
+ angle /= 2.4;
3009
+
3010
+ vec4 img;
3011
+
3012
+ mat3 center_and_scale = translate2d(-0.5, -0.5) * scale2d(1.0, ratio);
3013
+ mat3 unscale_and_uncenter = scale2d(1.0 / zoom, 1.0 / (zoom * ratio)) * translate2d(0.5, 0.5);
3014
+ mat3 slide_left = translate2d(-2.0, 0.0);
3015
+ mat3 slide_right = translate2d(2.0, 0.0);
3016
+ mat3 rotate = rotate2d(angle, ratio);
3017
+
3018
+ mat3 op_a = center_and_scale * slide_right * rotate * slide_left * unscale_and_uncenter;
3019
+ mat3 op_b = center_and_scale * slide_left * rotate * slide_right * unscale_and_uncenter;
3020
+
3021
+ bool mask_a = test_rounded_mask((op_a * p3).xy, corner_size);
3022
+ bool mask_b = test_rounded_mask((op_b * p3).xy, corner_size);
3023
+
3024
+ if (mask_a || mask_b) {
3025
+ img = sample_with_corners_to(p3.xy, corner_size);
3026
+ return screen(mask_a ? img : black, mask_b ? img : black);
3027
+ } else {
3028
+ return black;
3029
+ }
3030
+ }
3031
+
3032
+ vec4 transition(vec2 uv) {
3033
+ float a;
3034
+ vec2 p = uv.xy / vec2(1.0).xy;
3035
+ vec3 p3 = vec3(p.xy, 1.0);
3036
+
3037
+ vec2 corner_size = vec2(corner_radius / ratio, corner_radius);
3038
+
3039
+ if (progress <= 0.0) {
3040
+ return getFromColor(p);
3041
+ } else if (progress < 0.1) {
3042
+ a = progress / 0.1;
3043
+ return simple_sample_with_corners_from(p, corner_size * a, a);
3044
+ } else if (progress < 0.48) {
3045
+ a = (progress - 0.1) / 0.38;
3046
+ return get_cross_rotated(p3, a, corner_size, ratio);
3047
+ } else if (progress < 0.9) {
3048
+ return get_cross_masked(p3, (progress - 0.52) / 0.38, corner_size, ratio);
3049
+ } else if (progress < 1.0) {
3050
+ a = (1.0 - progress) / 0.1;
3051
+ return simple_sample_with_corners_to(p, corner_size * a, a);
3052
+ } else {
3053
+ return getToColor(p);
3054
+ }
3055
+ }
3056
+ `,Mn={zoom:{value:.88,type:"f32"},corner_radius:{value:.22,type:"f32"}},On=`
3057
+ float random(vec2 co) {
3058
+ float a = 12.9898;
3059
+ float b = 78.233;
3060
+ float c = 43758.5453;
3061
+ float dt = dot(co.xy, vec2(a, b));
3062
+ float sn = mod(dt, 3.14);
3063
+ return fract(sin(sn) * c);
3064
+ }
3065
+
3066
+ float voronoi(vec2 x) {
3067
+ vec2 p = floor(x);
3068
+ vec2 f = fract(x);
3069
+ float res = 8.0;
3070
+ for(float j = -1.; j <= 1.; j++)
3071
+ for(float i = -1.; i <= 1.; i++) {
3072
+ vec2 b = vec2(i, j);
3073
+ vec2 r = b - f + random(p + b);
3074
+ float d = dot(r, r);
3075
+ res = min(res, d);
3076
+ }
3077
+ return sqrt(res);
3078
+ }
3079
+
3080
+ vec2 displace(vec4 tex, vec2 texCoord, float dotDepth, float textureDepth, float strength) {
3081
+ float b = voronoi(.003 * texCoord + 2.0);
3082
+ float g = voronoi(0.2 * texCoord);
3083
+ float r = voronoi(texCoord - 1.0);
3084
+ vec4 dt = tex * 1.0;
3085
+ vec4 dis = dt * dotDepth + 1.0 - tex * textureDepth;
3086
+
3087
+ dis.x = dis.x - 1.0 + textureDepth * dotDepth;
3088
+ dis.y = dis.y - 1.0 + textureDepth * dotDepth;
3089
+ dis.x *= strength;
3090
+ dis.y *= strength;
3091
+ vec2 res_uv = texCoord;
3092
+ res_uv.x = res_uv.x + dis.x - 0.0;
3093
+ res_uv.y = res_uv.y + dis.y;
3094
+ return res_uv;
3095
+ }
3096
+
3097
+ float ease1(float t) {
3098
+ return t == 0.0 || t == 1.0
3099
+ ? t
3100
+ : t < 0.5
3101
+ ? +0.5 * pow(2.0, (20.0 * t) - 10.0)
3102
+ : -0.5 * pow(2.0, 10.0 - (t * 20.0)) + 1.0;
3103
+ }
3104
+
3105
+ float ease2(float t) {
3106
+ return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t);
3107
+ }
3108
+
3109
+ vec4 transition(vec2 uv) {
3110
+ vec2 p = uv.xy / vec2(1.0).xy;
3111
+ vec4 color1 = getFromColor(p);
3112
+ vec4 color2 = getToColor(p);
3113
+ vec2 disp = displace(color1, p, 0.33, 0.7, 1.0 - ease1(progress));
3114
+ vec2 disp2 = displace(color2, p, 0.33, 0.5, ease2(progress));
3115
+ vec4 dColor1 = getToColor(disp);
3116
+ vec4 dColor2 = getFromColor(disp2);
3117
+ float val = ease1(progress);
3118
+ vec3 gray = vec3(dot(min(dColor2, dColor1).rgb, vec3(0.299, 0.587, 0.114)));
3119
+ dColor2 = vec4(gray, 1.0);
3120
+ dColor2 *= 2.0;
3121
+ color1 = mix(color1, dColor2, smoothstep(0.0, 0.5, progress));
3122
+ color2 = mix(color2, dColor1, smoothstep(1.0, 0.5, progress));
3123
+ return mix(color1, color2, val);
3124
+ }
3125
+ `,En=`
3126
+ uniform float strength; // = 0.4
3127
+
3128
+ const float PI = 3.141592653589793;
3129
+
3130
+ float Linear_ease(float begin, float change, float duration, float time) {
3131
+ return change * time / duration + begin;
3132
+ }
3133
+
3134
+ float Exponential_easeInOut(float begin, float change, float duration, float time) {
3135
+ if (time == 0.0)
3136
+ return begin;
3137
+ else if (time == duration)
3138
+ return begin + change;
3139
+ time = time / (duration / 2.0);
3140
+ if (time < 1.0)
3141
+ return change / 2.0 * pow(2.0, 10.0 * (time - 1.0)) + begin;
3142
+ return change / 2.0 * (-pow(2.0, -10.0 * (time - 1.0)) + 2.0) + begin;
3143
+ }
3144
+
3145
+ float Sine_easeInOut(float begin, float change, float duration, float time) {
3146
+ return -change / 2.0 * (cos(PI * time / duration) - 1.0) + begin;
3147
+ }
3148
+
3149
+ float rand(vec2 co) {
3150
+ return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
3151
+ }
3152
+
3153
+ vec3 crossFade(vec2 uv, float dissolve) {
3154
+ return mix(getFromColor(uv).rgb, getToColor(uv).rgb, dissolve);
3155
+ }
3156
+
3157
+ vec4 transition(vec2 uv) {
3158
+ vec2 texCoord = uv.xy / vec2(1.0).xy;
3159
+
3160
+ // Linear interpolate center across center half of the image
3161
+ vec2 center = vec2(Linear_ease(0.25, 0.5, 1.0, progress), 0.5);
3162
+ float dissolve = Exponential_easeInOut(0.0, 1.0, 1.0, progress);
3163
+
3164
+ // Mirrored sine loop. 0->strength then strength->0
3165
+ float strengthValue = Sine_easeInOut(0.0, strength, 0.5, progress);
3166
+
3167
+ vec3 color = vec3(0.0);
3168
+ float total = 0.0;
3169
+ vec2 toCenter = center - texCoord;
3170
+
3171
+ /* randomize the lookup values to hide the fixed number of samples */
3172
+ float offset = rand(uv);
3173
+
3174
+ for (float t = 0.0; t <= 40.0; t++) {
3175
+ float percent = (t + offset) / 40.0;
3176
+ float weight = 4.0 * (percent - percent * percent);
3177
+ color += crossFade(texCoord + toCenter * percent * strengthValue, dissolve) * weight;
3178
+ total += weight;
3179
+ }
3180
+ return vec4(color / total, 1.0);
3181
+ }
3182
+ `,Dn={strength:{value:.4,type:"f32"}},Pn=`
3183
+ uniform float a; // = 4
3184
+ uniform float b; // = 1
3185
+ uniform float amplitude; // = 120
3186
+ uniform float smoothness; // = 0.1
3187
+
3188
+ vec4 transition(vec2 uv) {
3189
+ vec2 p = uv.xy / vec2(1.0).xy;
3190
+ vec2 dir = p - vec2(.5);
3191
+ float dist = length(dir);
3192
+ float x = (a - b) * cos(progress) + b * cos(progress * ((a / b) - 1.));
3193
+ float y = (a - b) * sin(progress) - b * sin(progress * ((a / b) - 1.));
3194
+ vec2 offset = dir * vec2(sin(progress * dist * amplitude * x), sin(progress * dist * amplitude * y)) / smoothness;
3195
+ return mix(getFromColor(p + offset), getToColor(p), smoothstep(0.2, 1.0, progress));
3196
+ }
3197
+ `,In={a:{value:4,type:"f32"},b:{value:1,type:"f32"},amplitude:{value:120,type:"f32"},smoothness:{value:.1,type:"f32"}},Bn=`
3198
+ // License: MIT
3199
+
3200
+ vec2 bottom_left = vec2(0.0, 1.0);
3201
+ vec2 bottom_right = vec2(1.0, 1.0);
3202
+ vec2 top_left = vec2(0.0, 0.0);
3203
+ vec2 top_right = vec2(1.0, 0.0);
3204
+
3205
+ float check(vec2 p1, vec2 p2, vec2 p3)
3206
+ {
3207
+ return (p1.x - p3.x) * (p2.y - p3.y) - (p2.x - p3.x) * (p1.y - p3.y);
3208
+ }
3209
+
3210
+ bool PointInTriangle (vec2 pt, vec2 p1, vec2 p2, vec2 p3)
3211
+ {
3212
+ bool b1, b2, b3;
3213
+ b1 = check(pt, p1, p2) < 0.0;
3214
+ b2 = check(pt, p2, p3) < 0.0;
3215
+ b3 = check(pt, p3, p1) < 0.0;
3216
+ return ((b1 == b2) && (b2 == b3));
3217
+ }
3218
+
3219
+ bool in_left_triangle(vec2 p){
3220
+ vec2 vertex1, vertex2, vertex3;
3221
+ vertex1 = vec2(progress, 0.5);
3222
+ vertex2 = vec2(0.0, 0.5-progress);
3223
+ vertex3 = vec2(0.0, 0.5+progress);
3224
+ if (PointInTriangle(p, vertex1, vertex2, vertex3))
3225
+ {
3226
+ return true;
3227
+ }
3228
+ return false;
3229
+ }
3230
+
3231
+ bool in_right_triangle(vec2 p){
3232
+ vec2 vertex1, vertex2, vertex3;
3233
+ vertex1 = vec2(1.0-progress, 0.5);
3234
+ vertex2 = vec2(1.0, 0.5-progress);
3235
+ vertex3 = vec2(1.0, 0.5+progress);
3236
+ if (PointInTriangle(p, vertex1, vertex2, vertex3))
3237
+ {
3238
+ return true;
3239
+ }
3240
+ return false;
3241
+ }
3242
+
3243
+ float blur_edge(vec2 bot1, vec2 bot2, vec2 top, vec2 testPt)
3244
+ {
3245
+ vec2 lineDir = bot1 - top;
3246
+ vec2 perpDir = vec2(lineDir.y, -lineDir.x);
3247
+ vec2 dirToPt1 = bot1 - testPt;
3248
+ float dist1 = abs(dot(normalize(perpDir), dirToPt1));
3249
+
3250
+ lineDir = bot2 - top;
3251
+ perpDir = vec2(lineDir.y, -lineDir.x);
3252
+ dirToPt1 = bot2 - testPt;
3253
+ float min_dist = min(abs(dot(normalize(perpDir), dirToPt1)), dist1);
3254
+
3255
+ if (min_dist < 0.005) {
3256
+ return min_dist / 0.005;
3257
+ }
3258
+ else {
3259
+ return 1.0;
3260
+ };
3261
+ }
3262
+
3263
+
3264
+ vec4 transition (vec2 uv) {
3265
+ if (in_left_triangle(uv))
3266
+ {
3267
+ if (progress < 0.1)
3268
+ {
3269
+ return getFromColor(uv);
3270
+ }
3271
+ if (uv.x < 0.5)
3272
+ {
3273
+ vec2 vertex1 = vec2(progress, 0.5);
3274
+ vec2 vertex2 = vec2(0.0, 0.5-progress);
3275
+ vec2 vertex3 = vec2(0.0, 0.5+progress);
3276
+ return mix(
3277
+ getFromColor(uv),
3278
+ getToColor(uv),
3279
+ blur_edge(vertex2, vertex3, vertex1, uv)
3280
+ );
3281
+ }
3282
+ else
3283
+ {
3284
+ if (progress > 0.0)
3285
+ {
3286
+ return getToColor(uv);
3287
+ }
3288
+ else
3289
+ {
3290
+ return getFromColor(uv);
3291
+ }
3292
+ }
3293
+ }
3294
+ else if (in_right_triangle(uv))
3295
+ {
3296
+ if (uv.x >= 0.5)
3297
+ {
3298
+ vec2 vertex1 = vec2(1.0-progress, 0.5);
3299
+ vec2 vertex2 = vec2(1.0, 0.5-progress);
3300
+ vec2 vertex3 = vec2(1.0, 0.5+progress);
3301
+ return mix(
3302
+ getFromColor(uv),
3303
+ getToColor(uv),
3304
+ blur_edge(vertex2, vertex3, vertex1, uv)
3305
+ );
3306
+ }
3307
+ else
3308
+ {
3309
+ return getFromColor(uv);
3310
+ }
3311
+ }
3312
+ else {
3313
+ return getFromColor(uv);
3314
+ }
3315
+ }
3316
+ `,Nn=`
3317
+
3318
+ const float SQRT_2 = 1.414213562373;
3319
+ uniform float dots;// = 20.0;
3320
+
3321
+ vec4 transition(vec2 uv) {
3322
+ bool nextImage = distance(fract(uv * dots), vec2(0.5, 0.5)) < ( progress / distance(uv, center));
3323
+ return nextImage ? getToColor(uv) : getFromColor(uv);
3324
+ }
3325
+ `,zn={radialSwipe:{label:"Radial Swipe",fragment:Wo}},Zt={};function Ln(l,t){Zt[l]=t}function Hn(l){delete Zt[l]}function Ft(){return{...xt.reduce((l,t)=>(l[t.name]={label:t.name,fragment:t.glsl,uniforms:t.defaultParams,previewDynamic:""},l),{}),...zn,...Zt}}Ft();function ai(){const l=Object.keys(Zt);return Object.entries(Ft()).map(([t,e])=>{const i=xe.getTransitionByKey(t);return{key:t,label:i?.name??e.label,description:i?.description,category:i?.category,isCustom:l.includes(t)||(i?.isCustom??!1),previewStatic:e.previewStatic||`https://cdn.subgen.co/previews/static/transition_${t}_static.webp`,previewDynamic:e.previewDynamic||`https://cdn.subgen.co/previews/dynamic/transition_${t}_dynamic.webp`}})}const Gn=ai();function fe({name:l,renderer:t}){let e=xt.find(G=>G.name===l);if(!e){const G=Ft(),H=Object.keys(G).find(V=>V.toLowerCase()===l.toLowerCase());H&&(e=G[H])}if(e||(e=xt.find(G=>G.name.toLowerCase()===l.toLowerCase())),!e){const G=[l,l.toLowerCase(),l.charAt(0).toUpperCase()+l.slice(1).toLowerCase(),l.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,""),l.replace(/_/g,"")],H=Ft();for(const V of G){if(e=xt.find(yt=>yt.name.toLowerCase()===V.toLowerCase()),e)break;const q=Object.keys(H).find(yt=>yt.toLowerCase()===V.toLowerCase());if(q){e=H[q];break}}}if(!e){const G=xt.length,H=xt.slice(0,5).map(yt=>yt.name).join(", "),V=Ft(),q=Object.keys(V).slice(0,3).join(", ");throw console.error(`Transition not found: "${l}". Available in gl-transitions (${G} total):`,H+"..."),console.error("Available locally:",q+"..."),new Error(`Transition "${l}" not found in gl-transitions library or local definitions`)}const i=new m.Sprite(m.Texture.WHITE),s=m.RenderTexture.create({width:t.width,height:t.height}),r=new m.ImageSource({}),o=new m.ImageSource({}),a=e.name==="displacement"||l.toLowerCase()==="displacement"||e.label==="displacement",n=a?new m.ImageSource({}):void 0;let c=null;if(a){c=document.createElement("canvas"),c.width=256,c.height=256;const G=c.getContext("2d");if(G){const H=G.createImageData(256,256);for(let V=0;V<H.data.length;V+=4){const q=Math.random();H.data[V]=q*255,H.data[V+1]=q*255,H.data[V+2]=q*255,H.data[V+3]=255}G.putImageData(H,0,0)}}let h=e.glsl||e.fragment;if(!h)throw new Error(`Transition "${l}" has no glsl or fragment code`);let d={...J.basics,...J.custom(e)};Object.entries(d).forEach(([,G])=>{G.type==="int<f32>"&&(G.type="i32",typeof G.value=="number"&&(G.value=Math.trunc(G.value))),G.type==="ivec2<f32>"&&(G.type="vec2<f32>")});const u=e.name==="GridFlip"||l.toLowerCase()==="gridflip"||e.label==="gridflip",f=e.name==="circle"||l.toLowerCase()==="circle"||e.label==="circle",p=e.name==="directional"||l.toLowerCase()==="directional"||e.label==="directional",g=e.name==="UndulatingBurnOut"||l.toLowerCase()==="undulatingburnout"||e.label==="undulatingBurnOut",v=e.name==="SquaresWire"||l.toLowerCase()==="squareswire"||e.label==="squaresWire",x=e.name==="rotate_scale_fade"||l.toLowerCase()==="rotatescalefade"||e.label==="rotateScaleFade",w=e.name==="RandomSquares"||l.toLowerCase()==="randomsquares"||e.label==="randomSquares",T=e.name==="polar_function"||l.toLowerCase()==="polar_function"||e.label==="polar_function",y=e.name==="pixelate"||l.toLowerCase()==="pixelate"||e.label==="pixelate",S=e.name==="perlin"||l.toLowerCase()==="perlin"||e.label==="perlin",F=e.name==="luma"||l.toLowerCase()==="luma"||e.label==="luma",O=e.name==="luminance_melt"||l.toLowerCase()==="luminance_melt"||l.toLowerCase()==="luminancemelt"||e.label==="luminance_melt",k=e.name==="hexagonalize"||l.toLowerCase()==="hexagonalize"||e.label==="hexagonalize",b=e.name==="heart"||l.toLowerCase()==="heart"||e.label==="heart",A=e.name==="displacement"||l.toLowerCase()==="displacement"||e.label==="displacement",C=e.name==="directionalwipe"||l.toLowerCase()==="directionalwipe"||l.toLowerCase()==="directional_wipe"||e.label==="directionalwipe",R=e.name==="directionalwarp"||l.toLowerCase()==="directionalwarp"||l.toLowerCase()==="directional_warp"||e.label==="directionalwarp",D=e.name==="crosshatch"||l.toLowerCase()==="crosshatch"||e.label==="crosshatch",E=e.name==="circleopen"||l.toLowerCase()==="circleopen"||l.toLowerCase()==="circle_open"||e.label==="circleopen",N=e.name==="cannabisleaf"||l.toLowerCase()==="cannabisleaf"||l.toLowerCase()==="cannabis_leaf"||e.label==="cannabisleaf",Y=e.name==="StereoViewer"||l.toLowerCase()==="stereoviewer"||l.toLowerCase()==="stereo_viewer"||e.label==="StereoViewer",I=e.name==="GlitchDisplace"||l.toLowerCase()==="glitchDisplace"||e.label==="GlitchDisplace",P=e.name==="CrossZoom"||l.toLowerCase()==="crosszoom"||e.label==="CrossZoom",z=e.name==="CrazyParametricFun"||l.toLowerCase()==="crazyparametricfun"||e.label==="CrazyParametricFun",U=e.name==="BowTieHorizontal"||l.toLowerCase()==="bowtiehorizontal"||e.label==="BowTieHorizontal",Z=e.name==="PolkaDotsCurtain"||l.toLowerCase()==="polkadotscurtain"||e.label==="PolkaDotsCurtain",B=e.name==="Pixelize"||l.toLowerCase()==="pixelize"||e.label==="Pixelize";u&&(h=Vo,d={...J.basics,...Yo}),f&&(h=Qo,d={...J.basics,...ni}),p&&(h=jo,d={...J.basics,...Jo}),g&&(h=Zo,d={...J.basics,...Ko}),v&&(h=Xo,d={...J.basics,...qo}),x&&(h=_o,d={...J.basics,...$o}),w&&(h=tn,d={...J.basics,...en}),T&&(h=sn,d={...J.basics,...rn}),y&&(h=si,d={...J.basics,...ri}),S&&(h=an,d={...J.basics,...ln}),F&&(h=cn,d={...J.basics,...hn}),O&&(h=dn,d={...J.basics,...fn}),k&&(h=un,d={...J.basics,...pn}),b&&(h=mn,d={...J.basics,...gn}),A&&(h=vn,d={...J.basics,...yn}),C&&(h=xn,d={...J.basics,...wn}),R&&(h=bn,d={...J.basics,...Cn}),D&&(h=Tn,d={...J.basics,...Sn}),E&&(h=An,d={...J.basics,...ni}),N&&(h=kn,d={...J.basics,...Fn}),Y&&(h=Rn,d={...J.basics,...Mn}),I&&(h=On),P&&(h=En,d={...J.basics,...Dn}),z&&(h=Pn,d={...J.basics,...In}),U&&(h=Bn),Z&&(h=Nn),B&&(h=on,d={...J.basics,...nn});const W={from:r,to:o,uniforms:d};a&&n&&(W.displacementMap=n,c&&(n.resource=c,n.update()));const K=new m.Filter({glProgram:new m.GlProgram({vertex:Ho,fragment:Uo(h)}),resources:W});return i.filters=[K],{render({width:G,height:H,from:V,to:q,progress:yt}){if((i.width!==G||i.height!==H)&&(i.setSize({width:G,height:H}),s.resize(G,H)),V instanceof m.Texture?K.resources.from=V.source:(r.resource=V,r.update(),K.resources.from=r),q instanceof m.Texture?K.resources.to=q.source:(o.resource=q,o.update(),K.resources.to=o),a&&n&&c){if(c.width!==G||c.height!==H){c.width=G,c.height=H;const ge=c.getContext("2d");if(ge){const Rt=ge.createImageData(G,H);for(let Mt=0;Mt<Rt.data.length;Mt+=4){const ve=Math.random();Rt.data[Mt]=ve*255,Rt.data[Mt+1]=ve*255,Rt.data[Mt+2]=ve*255,Rt.data[Mt+3]=255}ge.putImageData(Rt,0,0)}}n.resource=c,n.update()}return K.resources.uniforms.uniforms.progress=yt,t.render({container:i,target:s,clear:!0,width:G,height:H}),s},destroy(){s.destroy(),i.destroy({children:!0})}}}function Un(l){const{clip:t,tex:e,rootContainer:i,tempSprite:s,pooled:r,scaleX:o,scaleY:a}=l,n=t.style||{},{renderTransform:c}=t,h=(c?.mirror??0)>.5,d=c?.x??0,u=c?.y??0,f=c?.angle??0,p=c?.scale??1,g=c?.scaleX??1,v=c?.scaleY??1,x=c?.opacity??1,w=c?.blur??0,T=c?.brightness??1,y=e.width||1,S=e.height||1,F=t.type==="Caption",O=!F&&t.width&&t.width!==0?Math.abs(t.width)/y:1,k=!F&&t.height&&t.height!==0?Math.abs(t.height)/S:1,b=O*p*g*o,A=k*p*v*a;if(i.x=(t.center.x+d)*o,i.y=(t.center.y+u)*a,i.rotation=(t.flip==null?1:-1)*((t.angle+f)*Math.PI)/180,i.alpha=t.opacity*x,s.texture=e,h){const I=b,P=A,z=y*I,U=S*P;s.position.set(0,0),s.scale.set(I,P);const Z=[[z,0,-I,P],[-z,0,-I,P],[0,U,I,-P],[0,-U,I,-P],[z,U,-I,-P],[-z,U,-I,-P],[z,-U,-I,-P],[-z,-U,-I,-P]];for(;r.mirrors.length<8;){const B=new m.Sprite;B.anchor.set(.5,.5),i.addChild(B),r.mirrors.push(B)}for(let B=0;B<8;B++){const[W,K,G,H]=Z[B],V=r.mirrors[B];V.texture=e,V.visible=!0,V.position.set(W,K),V.scale.set(G,H)}if(t.flip?.x){s.scale.x=-I;for(let B=0;B<8;B++)r.mirrors[B].scale.x=-Z[B][2]}if(t.flip?.y){s.scale.y=-P;for(let B=0;B<8;B++)r.mirrors[B].scale.y=-Z[B][3]}}else{for(const I of r.mirrors)I.visible=!1;t.flip?.x?(s.scale.x=-b,s.scale.y=A):t.flip?.y?(s.scale.x=b,s.scale.y=-A):(s.scale.x=b,s.scale.y=A)}const C=[];if(w>0){const I=new m.BlurFilter;I.strength=w,I.quality=4,I.repeatEdgePixels=!0,C.push(I)}const R=ce(t.colorAdjustment);if(T!==1||R){const I=new m.ColorMatrixFilter;he(I,t.colorAdjustment,T),C.push(I)}const D=Jt(t.colorAdjustment);for(let I=0;I<D.length;I++){const P=D[I],z=new m.UniformGroup({uTargetColor:{value:[1,1,0],type:"vec3<f32>"},uHueShift:{value:P.hue,type:"f32"},uSatShift:{value:P.saturation/100,type:"f32"},uLightShift:{value:P.lightness/100,type:"f32"},uTolerance:{value:.22,type:"f32"},uSoftness:{value:.12,type:"f32"}}),U=Et(P.targetColor);U&&(z.uniforms.uTargetColor[0]=U.r/255,z.uniforms.uTargetColor[1]=U.g/255,z.uniforms.uTargetColor[2]=U.b/255);const Z=new m.Filter({glProgram:new m.GlProgram({vertex:kt,fragment:le,name:`SelectiveHslShader_${I}`}),resources:{hslUniforms:z}});C.push(Z)}if(t.chromaKey&&t.chromaKey.enabled){const I=new m.UniformGroup({uKeyColor:{value:[0,1,0],type:"vec3<f32>"},uSimilarity:{value:.1,type:"f32"},uSpill:{value:0,type:"f32"}}),P=Et(t.chromaKey.color);P&&(I.uniforms.uKeyColor[0]=P.r/255,I.uniforms.uKeyColor[1]=P.g/255,I.uniforms.uKeyColor[2]=P.b/255),I.uniforms.uSimilarity=t.chromaKey.similarity,I.uniforms.uSpill=t.chromaKey.spill;const z=new m.Filter({glProgram:new m.GlProgram({vertex:kt,fragment:oi,name:"ChromaKeyShader"}),resources:{chromaUniforms:I}});C.push(z)}i.filters=C;const E=n.borderRadius||0;E>0?(r.maskGfx==null&&(r.maskGfx=new m.Graphics,s.addChild(r.maskGfx)),r.maskGfx.clear(),r.maskGfx.roundRect(-y/2,-S/2,y,S,Math.min(E,y/2,S/2)),r.maskGfx.fill({color:16777215,alpha:1}),s.mask=null,s.mask=r.maskGfx):r.maskGfx!=null&&(s.mask=null);const N=n.stroke;if(N&&N.width>0){r.strokeGfx==null&&(r.strokeGfx=new m.Graphics,s.addChild(r.strokeGfx)),r.strokeGfx.clear();const I=$(N.color)??16777215;let P=1;if(N.alignment!==void 0&&(typeof N.alignment=="number"?P=N.alignment:N.alignment==="center"||N.alignment==="middle"?P=.5:N.alignment==="inside"?P=0:N.alignment==="outside"&&(P=1)),r.strokeGfx.setStrokeStyle({width:N.width,color:I,alignment:P}),E>0){const z=Math.min(E,y/2,S/2);r.strokeGfx.roundRect(-y/2,-S/2,y,S,z)}else r.strokeGfx.rect(-y/2,-S/2,y,S);r.strokeGfx.stroke(),r.strokeGfx.visible=!0}else r.strokeGfx!=null&&(r.strokeGfx.visible=!1);const Y=n.shadow;if(Y&&(Y.blur>0||(Y.offsetX??0)!==0||(Y.offsetY??0)!==0)){r.shadowGfx==null&&(r.shadowGfx=new m.Graphics,i.addChildAt(r.shadowGfx,0)),r.shadowGfx.clear();const I=$(Y.color)??0,P=Y.alpha??.5,z=Y.offsetX??0,U=Y.offsetY??0;if(E>0){const Z=Math.min(E,y/2,S/2);r.shadowGfx.roundRect(-y/2+z,-S/2+U,y,S,Z)}else r.shadowGfx.rect(-y/2+z,-S/2+U,y,S);r.shadowGfx.fill({color:I,alpha:P}),r.shadowGfx.visible=!0}else r.shadowGfx!=null&&(r.shadowGfx.visible=!1)}class Wn{pixiApp;scaleX;scaleY;transitionRenderers=new Map;transitionSprites=new Map;transFromTexture;transToTexture;transBgGraphics;transClipPool=new Map;constructor(t,e,i){this.pixiApp=t,this.scaleX=e,this.scaleY=i,this.transFromTexture=m.RenderTexture.create({width:t.renderer.width,height:t.renderer.height}),this.transToTexture=m.RenderTexture.create({width:t.renderer.width,height:t.renderer.height}),this.transBgGraphics=new m.Graphics().rect(0,0,t.renderer.width/e,t.renderer.height/i).fill({color:0})}resetFrame(){for(const t of this.transitionSprites.values())t.visible=!1}getTransitionSprite(t){return this.transitionSprites.get(t)}getTransClipObjects(t){let e=this.transClipPool.get(t);if(e==null){const i=new m.Container,s=new m.Sprite;s.anchor.set(.5,.5),i.addChild(s),e={root:i,mainSprite:s,mirrors:[],maskGfx:null,strokeGfx:null,shadowGfx:null},this.transClipPool.set(t,e)}return e}async getClipFrameAtTimestamp(t,e,i){const s=Math.max(0,Math.min(e-t.display.from,t.duration));t.animate(s*t.playbackRate);const{video:r}=await i(t,s);return r}renderClipToTransitionTexture(t,e,i){const s=e instanceof m.Texture,r=s?e:m.Texture.from(e),o=this.getTransClipObjects(t.id),{root:a,mainSprite:n}=o;Un({clip:t,tex:r,rootContainer:a,tempSprite:n,pooled:o,scaleX:this.scaleX,scaleY:this.scaleY}),this.pixiApp.renderer.render({container:a,target:i,clear:!0}),s||r.destroy(!0)}async renderTransition(t){const{sprite:e,timestamp:i,fromClip:s,toClip:r,getFrameCached:o,clipsNormalContainer:a,clipsClaimedByTransition:n,onVideoState:c}=t,h=i-e.display.from;if(h>=e.duration){e.expired=!0;const T=this.transitionSprites.get(e.id);return T&&(T.visible=!1),!1}const d=await this.getClipFrameAtTimestamp(s,i,o),u=await this.getClipFrameAtTimestamp(r,i,o);if(!d||!u)return!1;const f=Math.min(Math.max(h/e.duration,0),1);this.renderClipToTransitionTexture(s,d,this.transFromTexture),this.renderClipToTransitionTexture(r,u,this.transToTexture);let p=this.transitionRenderers.get(e.id);p||(p=fe({name:e.transitionKey,renderer:this.pixiApp.renderer}),this.transitionRenderers.set(e.id,p));const g=p.render({width:this.pixiApp.renderer.width,height:this.pixiApp.renderer.height,from:this.transFromTexture,to:this.transToTexture,progress:f});let v=this.transitionSprites.get(e.id);v||(v=new m.Sprite,v.label=`TransitionSprite_${e.id}`,this.transitionSprites.set(e.id,v),a.addChild(v));const x=this.pixiApp.renderer.width/this.scaleX,w=this.pixiApp.renderer.height/this.scaleY;return v.texture=g,v.visible=!0,v.x=0,v.y=0,v.width=x,v.height=w,v.anchor.set(0,0),v.zIndex=e.zIndex,c(),n.add(s.id),n.add(r.id),!0}cleanup(){this.transFromTexture&&this.transFromTexture.destroy(!0),this.transToTexture&&this.transToTexture.destroy(!0),this.transBgGraphics&&this.transBgGraphics.destroy(!0);for(const t of this.transitionSprites.values())t.destroy();this.transitionSprites.clear(),this.transitionRenderers.clear();for(const t of this.transClipPool.values())t.root.destroy({children:!0});this.transClipPool.clear()}}const Kt={};function Vn(l,t){Kt[l]=t}function Yn(l){delete Kt[l]}const Qn={rotationMovement:{label:"Rotation Movement",fragment:Ys,uniforms:Qs},sepia:{label:"Sepia",fragment:js,uniforms:Js},glitch:{label:"Glitch",fragment:Zs,uniforms:Ks},pixelate:{label:"Pixelate",fragment:si,uniforms:ri},rgbGlitch:{label:"RGB Glitch",fragment:Xs,uniforms:qs},rgbShift:{label:"RGB Shift",fragment:_s,uniforms:$s},halftone:{label:"Halftone",fragment:tr,uniforms:er},sinewave:{label:"Sinewave",fragment:ir,uniforms:sr},shine:{label:"Shine",fragment:rr,uniforms:or},blink:{label:"Blink",fragment:nr,uniforms:ar},spring:{label:"Spring",fragment:lr,uniforms:cr},duotone:{label:"Duotone",fragment:hr,uniforms:dr},tritone:{label:"Tritone",fragment:fr,uniforms:ur},hueShift:{label:"Hue Shift",fragment:pr,uniforms:mr},warpTransition:{label:"Warp Transition",fragment:gr,uniforms:vr},slitScan:{label:"Slit Scan",fragment:yr,uniforms:xr},slitScanGlitch:{label:"Slit Scan Glitch",fragment:wr,uniforms:br},pixelateTransition:{label:"Pixelate Transition",fragment:Cr,uniforms:Tr},focusTransition:{label:"Focus Transition",fragment:Sr,uniforms:Ar},invert:{label:"Invert",fragment:kr,uniforms:Fr},grayscale:{label:"Grayscale",fragment:Rr,uniforms:Mr},vignette:{label:"Vignette",fragment:Or,uniforms:Er},chromatic:{label:"Chromatic",fragment:Dr,uniforms:Pr},swirlMovement:{label:"Swirl Movement",fragment:Ir,uniforms:Br},distort:{label:"Distort",fragment:Nr,uniforms:zr},perspectiveSingle:{label:"Perspective Single",fragment:Lr,uniforms:Hr},distortSpin:{label:"Distort Spin",fragment:Gr,uniforms:Ur},distortGrid:{label:"Distort Grid",fragment:Wr,uniforms:Vr},mirrorTile:{label:"Mirror Tile",fragment:Yr,uniforms:Qr},flashLoop:{label:"Flash Loop",fragment:jr,uniforms:Jr},filmStripPro:{label:"Film Strip Pro",fragment:Zr,uniforms:Kr},inverseAperture:{label:"Inverse Aperture",fragment:Xr,uniforms:qr},curtainOpen:{label:"Curtain Open",fragment:_r,uniforms:$r},curtainBlur:{label:"Curtain Blur",fragment:to,uniforms:eo},distortV2:{label:"Distort V2",fragment:io,uniforms:so},neonFlash:{label:"Neon Flash",fragment:ro,uniforms:oo},waveDistort:{label:"Wave Distort",fragment:no,uniforms:ao},scaleMoveBlur:{label:"Scale Move Blur",fragment:lo,uniforms:co},paperBreakReveal:{label:"Paper Break Reveal",fragment:ho,uniforms:fo},laser:{label:"Laser",fragment:uo,uniforms:po},wave:{label:"Wave",fragment:mo,uniforms:go},sparks:{label:"Sparks",fragment:vo,uniforms:yo},tvScanlines:{label:"TV Scanlines",fragment:xo,uniforms:wo},hdr:{label:"HDR",fragment:bo,uniforms:Co},blackFlash:{label:"Black Flash",fragment:To,uniforms:So},brightPulse:{label:"Bright Pulse",fragment:Ao,uniforms:ko},cameraMove:{label:"Camera Move",fragment:Fo,uniforms:Ro},hdrV2:{label:"HDR V2",fragment:Mo,uniforms:Oo},fastZoom:{label:"Fast Zoom",fragment:Eo,uniforms:Do},fadeIn:{label:"Fade In",fragment:Po,uniforms:Io},fadeOut:{label:"Fade Out",fragment:Bo,uniforms:No}};function ue(){return{...Qn,...Kt}}function li(){const l=Object.keys(Kt);return Object.entries(ue()).map(([t,e])=>({key:t,label:e.label,isCustom:l.includes(t),previewStatic:e.previewStatic||`https://cdn.subgen.co/previews/effects/static/effect_${t}_static.webp`,previewDynamic:e.previewDynamic||`https://cdn.subgen.co/previews/effects/dynamic/effect_${t}_dynamic.webp`}))}const jn=li(),Jn={adjustmentFilter:j.AdjustmentFilter,advancedBloomFilter:j.AdvancedBloomFilter,backdropBlurFilter:j.BackdropBlurFilter,bloomFilter:j.BloomFilter,colorMapFilter:j.ColorMapFilter,colorOverlayFilter:j.ColorOverlayFilter,convolutionFilter:j.ConvolutionFilter,dotFilter:j.DotFilter,dropShadowFilter:j.DropShadowFilter,glitchFilter:j.GlitchFilter,glowFilter:j.GlowFilter,godrayFilter:j.GodrayFilter,grayscaleFilter:j.GrayscaleFilter,hslAdjustmentFilter:j.HslAdjustmentFilter,kawaseBlurFilter:j.KawaseBlurFilter,motionBlurFilter:j.MotionBlurFilter,oldFilmFilter:j.OldFilmFilter,pixelateFilter:j.PixelateFilter,radialBlurFilter:j.RadialBlurFilter,reflectionFilter:j.ReflectionFilter,rgbSplitFilter:j.RGBSplitFilter,tiltShiftFilter:j.TiltShiftFilter},pe={adjustmentFilter:{gamma:1.5,saturation:.5,contrast:1.2,brightness:1.5,red:1.5,green:1.5,blue:1.5,alpha:1},advancedBloomFilter:{threshold:.2,bloomScale:1,brightness:1,blur:20,quality:1},backdropBlurFilter:{blur:10,quality:4},bloomFilter:{kernelSize:5,quality:2,resolution:3,strength:{x:10,y:10}},colorMapFilter:{mix:1,nearest:!0},colorOverlayFilter:{color:"#ffffff",alpha:1},convolutionFilter:{width:3,height:3,matrix:[1,0,0,0,1,0,0,0,1]},dotFilter:{scale:1,angle:1,grayscale:!0},dropShadowFilter:{blur:1,quality:3,alpha:.5,offset:{x:4,y:4},color:"#000000",shadowOnly:!0},glitchFilter:{seed:.5,slices:10,offset:.1,direction:0,fillMode:0,red:{x:2,y:2},green:{x:10,y:-4},blue:{x:-10,y:4}},glowFilter:{distance:10,outerStrength:2,innerStrength:0,color:"#ffffff",quality:1,alpha:1,knockout:!1},godrayFilter:{time:0,gain:.6,lacunarity:2.75,alpha:1,parallel:!0,angle:30,center:{x:426,y:-100}},grayscaleFilter:{},hslAdjustmentFilter:{hue:100,saturation:1,lightness:0,colorize:!1,alpha:1},kawaseBlurFilter:{strength:4,quality:3,pixelSize:{x:1,y:1}},motionBlurFilter:{velocity:{x:40,y:40},kernelSize:5,offset:0},oldFilmFilter:{sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.5,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3},pixelateFilter:{size:10},radialBlurFilter:{angle:20,center:{x:0,y:0},radius:300,kernelSize:15},reflectionFilter:{mirror:!0,boundary:.5,amplitude:[20,50],waveLength:[30,100],alpha:[1,1],time:0},rgbSplitFilter:{red:{x:2,y:2},green:{x:10,y:-4},blue:{x:-10,y:4}},tiltShiftFilter:{blur:100,gradientBlur:600,start:{x:0,y:0},end:{x:853,y:414}}},Zn={adjustmentFilter:{gamma:{min:0,max:5,step:.07},saturation:{min:0,max:5,step:.07},contrast:{min:0,max:5,step:.07},brightness:{min:0,max:5,step:.07},red:{min:0,max:5,step:.07},green:{min:0,max:5,step:.07},blue:{min:0,max:5,step:.07},alpha:{min:0,max:5,step:.07}},advancedBloomFilter:{threshold:{min:.1,max:.9,step:.009},bloomScale:{min:.5,max:1.5,step:.015},brightness:{min:.5,max:1.5,step:.015},blur:{min:0,max:20,step:.2},quality:{min:1,max:20,step:1}},backdropBlurFilter:{blur:{min:0,max:100,step:2.3},quality:{min:1,max:10,step:.1}},bloomFilter:{kernelSize:{min:0,max:15,step:1},quality:{min:0,max:10,step:1},resolution:{min:0,max:10,step:1},strength:{x:{min:0,max:20,step:.5},y:{min:0,max:20,step:.5}}},colorMapFilter:{mix:{min:0,max:1,step:.013}},colorOverlayFilter:{alpha:{min:0,max:1,step:.013}},convolutionFilter:{width:{min:0,max:500,step:1},height:{min:0,max:500,step:1},matrix:[{max:0,min:1,step:.01},{max:0,min:1,step:.01},{max:0,min:1,step:.01},{max:0,min:1,step:.01},{max:0,min:1,step:.01},{max:0,min:1,step:.01},{max:0,min:1,step:.01},{max:0,min:1,step:.01}]},dotFilter:{scale:{min:.3,max:1,step:.01},angle:{min:0,max:5,step:.01}},dropShadowFilter:{blur:{min:0,max:20,step:.5},quality:{min:1,max:20,step:1},alpha:{min:0,max:1,step:.013},offset:{x:{min:-50,max:50,step:2.5},y:{min:-50,max:50,step:2.5}}},glitchFilter:{seed:{min:0,max:1,step:.01},slices:{min:2,max:20,step:.01},offset:{min:-400,max:400,step:.1},direction:{min:-180,max:180,step:.1},red:{x:{min:-50,max:50,step:1},y:{min:-50,max:50,step:1}},green:{x:{min:-50,max:50,step:1},y:{min:-50,max:50,step:1}},blue:{x:{min:-50,max:50,step:1},y:{min:-50,max:50,step:1}}},glowFilter:{distance:{min:0,max:20,step:.013},outerStrength:{min:0,max:20,step:.013},innerStrength:{min:0,max:20,step:.013},quality:{min:0,max:1,step:.013},alpha:{min:0,max:1,step:.013}},godrayFilter:{time:{min:0,max:1,step:.013},gain:{min:0,max:1,step:.013},lacunarity:{min:0,max:5,step:.013},alpha:{min:0,max:1,step:.013},angle:{min:-60,max:60,step:.1},center:{x:{min:-100,max:960,step:14},y:{min:-1e3,max:-100,step:14}}},grayscaleFilter:{},hslAdjustmentFilter:{hue:{min:-180,max:180,step:.013},saturation:{min:-1,max:1,step:.013},lightness:{min:-1,max:1,step:.013},alpha:{min:0,max:1,step:.013}},kawaseBlurFilter:{strength:{min:0,max:20,step:.013},quality:{min:1,max:20,step:.013},pixelSize:{x:{min:0,max:10,step:.013},y:{min:0,max:10,step:.013}}},motionBlurFilter:{velocity:{x:{min:-90,max:90,step:.013},y:{min:-90,max:90,step:.013}},kernelSize:{min:0,max:25,step:3},offset:{min:-150,max:150,step:.1}},oldFilmFilter:{sepia:{min:0,max:1,step:.01},noise:{min:0,max:1,step:.01},noiseSize:{min:1,max:20,step:1},scratch:{min:-1,max:1,step:.01},scratchDensity:{min:0,max:1,step:.01},scratchWidth:{min:1,max:20,step:1},vignetting:{min:0,max:1,step:.01},vignettingAlpha:{min:0,max:1,step:.01},vignettingBlur:{min:0,max:1,step:.01}},pixelateFilter:{size:{min:4,max:40,step:.013}},radialBlurFilter:{angle:{min:-180,max:180,step:.1},center:{x:{min:0,max:2e3,step:.1},y:{min:0,max:2e3,step:.1}},radius:{min:-1,max:860,step:.1},kernelSize:{min:0,max:25,step:3}},reflectionFilter:{boundary:{min:0,max:1,step:.01},amplitude:[{min:0,max:50,step:.013},{min:0,max:50,step:.013}],waveLength:[{min:0,max:200,step:.013},{min:0,max:200,step:.013}],alpha:[{min:0,max:1,step:.01},{min:0,max:1,step:.01}],time:{min:0,max:20,step:.01}},rgbSplitFilter:{red:{x:{min:-20,max:20,step:.013},y:{min:-20,max:20,step:.013}},green:{x:{min:-20,max:20,step:.013},y:{min:-20,max:20,step:.013}},blue:{x:{min:-20,max:20,step:.013},y:{min:-20,max:20,step:.013}}},tiltShiftFilter:{blur:{min:0,max:200,step:.1},gradientBlur:{min:0,max:1e3,step:1},start:{x:{min:0,max:2e3,step:.1},y:{min:0,max:2e3,step:.1}},end:{x:{min:0,max:2e3,step:.1},y:{min:0,max:2e3,step:.1}}}},Kn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAAQCAIAAAB2sTYeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF6GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV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Yn2anUO0U1sVNFwUc+zPrqPio4o7Kn+eLRvizw1xNJGqrGAyv7MQfUuG0mH4NOtgA7Our8mWLRZoTy47zm3GHXdZYiTmDIQjEbo8lANblheNYb1T66Br2CgrXdsSzHAvK+1hs+PmUII4TqBCCfQTGHcEr/IdWLhm9AAAAAElFTkSuQmCC";async function me({name:l,renderer:t,values:e}){let i=null;const s=l in pe;let r={};if(s){const n=Jn[l];r={...pe[l],...e},l==="colorMapFilter"&&(r.colorMap=await m.Assets.load(Kn)),l==="simpleLightmapFilter"&&(r.lightMap=await m.Assets.load(Xn)),i=new n(r)}else{const n=ue(),c=Object.keys(n).find(g=>g.toLowerCase()===l.toLowerCase());if(!c)return console.warn(`Effect ${l} not found`),{filter:null,render(g){return null}};const{fragment:h,uniforms:d,label:u}=n[c],f=new m.GlProgram({vertex:kt,fragment:h,name:`${u}-shader`}),p=new m.UniformGroup({uTime:{value:0,type:"f32"},...d});i=new m.Filter({glProgram:f,resources:{effectUniforms:p}})}const o=new m.Sprite,a=m.RenderTexture.create({width:t.width,height:t.height});return o.filters=[i],{filter:i,render({width:n,height:c,canvasTexture:h,progress:d,values:u}){(a.width!==n||a.height!==c)&&a.resize(n,c);const f=h instanceof m.RenderTexture?h:m.Texture.from(h);o.texture=f,o.width=n,o.height=c;const p={...r,...u};if(s)u&&Object.assign(i,p);else if(i.resources?.effectUniforms&&(i.resources.effectUniforms.uniforms.uTime=d,u))for(const[g,v]of Object.entries(u))i.resources.effectUniforms.uniforms[g]&&(i.resources.effectUniforms.uniforms[g]=v);return t.render({container:o,target:a,clear:!0}),a}}}class qn{pixiApp;effectCache=new Map;effectInputTexture=null;constructor(t,e){this.pixiApp=t,this.effectInputTexture=e?m.RenderTexture.create({width:t.renderer.width,height:t.renderer.height}):null}async processEffects(t){const{timestamp:e,sprites:i,spriteById:s,spriteIndexById:r,spriteRenderers:o,transitionSprites:a,clipsEffectContainer:n,clipsNormalContainer:c,postProcessContainer:h}=t;if(!this.effectInputTexture)return;const d=[];for(const u of i)if(u instanceof lt&&e>=u.display.from&&e<u.display.from+u.duration&&d.push({id:u.id,key:u.effectKey,startTime:u.display.from,duration:u.duration,zIndex:u.zIndex,values:u.values}),u.effects&&u.effects.length>0)for(const f of u.effects)e>=f.startTime&&e<f.startTime+f.duration&&d.push({...f,zIndex:u.zIndex});d.sort((u,f)=>u.zIndex-f.zIndex),h.removeChildren();for(const u of o.values()){const f=u.getRoot();f&&f.parent!==c&&(f.parent&&f.parent.removeChild(f),c.addChild(f))}if(d.length>0){const u=this.pixiApp.renderer.width,f=this.pixiApp.renderer.height;let p=null;const g=new Set;for(const v of d){const{key:x,startTime:w,duration:T,id:y,zIndex:S}=v,F=e-w,O=T>0?Math.min(Math.max(F/T,0),1):0,k=s.get(y),b=k!=null&&k instanceof lt;if(n.removeChildren(),p){const C=new m.Sprite(p);C.width=u,C.height=f,n.addChild(C)}const A=r.get(y)??-1;for(const C of i){if(g.has(C.id))continue;let R=!1;if(b){if(C.id===y)continue;const D=r.get(C.id)??-1;R=C.zIndex<S||C.zIndex===S&&D>A}else R=!!C.effects&&C.effects.some(D=>D.id===y);if(R){const D=o.get(C);if(D){const N=D.getRoot();N&&(N.parent&&N.parent.removeChild(N),n.addChild(N),g.add(C.id))}const E=a.get(C.id);E&&(E.parent&&E.parent.removeChild(E),n.addChild(E),g.add(C.id))}}if(n.children.length>0){let C=this.effectCache.get(y);if(!C)try{const R=await me({name:x,renderer:this.pixiApp.renderer,values:v.values});R&&R.filter&&(C={filter:R.filter,render:R.render},this.effectCache.set(y,C))}catch(R){console.warn("Failed to create effect",x,R)}if(C){const{filter:R,render:D}=C;R.resources&&R.resources.effectUniforms&&(R.resources.effectUniforms.uniforms.uTime=O),n.visible=!0,this.pixiApp.renderer.render({container:n,target:this.effectInputTexture,clear:!0}),n.visible=!1,D&&(p=D({canvasTexture:this.effectInputTexture,progress:O,width:u,height:f}))}}}if(p){const v=new m.Sprite(p);v.width=u,v.height=f,h.addChild(v);for(const x of i){if(g.has(x.id)||x instanceof lt||x.expired)continue;const w=o.get(x);if(w){const T=w.getRoot();T&&T.visible&&(T.parent&&T.parent.removeChild(T),h.addChild(T))}}}}}cleanup(){this.effectInputTexture&&this.effectInputTexture.destroy(!0),this.effectCache.clear()}}function ci(l){const{pixiApp:t,sprites:e,aborter:i,scaleX:s,scaleY:r}=l,o=t!=null,a=new Map,n=o&&t?new Wn(t,s,r):null,c=o&&t?new qn(t,o):null;let h=null,d=null,u=null;o&&t!=null&&(h=new m.Container,d=new m.Container,u=new m.Container,d.scale.set(s,r),h.scale.set(s,r),u.scale.set(s,r),d.sortableChildren=!0,u.sortableChildren=!0,t.stage.addChild(d),t.stage.addChild(u),h.visible=!1,t.stage.addChild(h));const f=[...e].sort((w,T)=>w.zIndex-T.zIndex),p=new Map,g=new Map;for(let w=0;w<e.length;w++)p.set(e[w].id,e[w]),g.set(e[w].id,w);return{render:async w=>{const T=[];let y=!1,S=!1;const F=new Map,O=async(b,A)=>{if(F.has(b))return F.get(b);const C=await b.getFrame(A);return F.set(b,C),C};n&&n.resetFrame();const k=new Set;for(const b of f){if(i.aborted)break;if(b.display.to>0&&w>=b.display.to&&(b.expired=!0),w<b.display.from||b.expired){if(o&&t!=null){const B=a.get(b);B&&await B.updateFrame(null)}continue}const C=w-b.display.from,R=C*b.playbackRate;if(b.animate(R),o&&t!=null&&d!=null&&(b.type==="Text"||b.type==="Caption")){b.type==="Caption"&&typeof b.updateState=="function"&&b.updateState(C*b.playbackRate),typeof b.setRenderer=="function"&&b.setRenderer(t.renderer);let B=a.get(b);if(B==null&&(B=new de(t,b,d),a.set(b,B)),k.has(b.id)){const H=B.getRoot();H&&(H.visible=!1),await B.updateFrame(null)}else{const H=await b.getTexture();if(H!=null){S=!0;const V=B.getRoot();V&&(V.visible=!0),await B.updateFrame(H)}}B.updateTransforms(),T.push([]);const K=b.duration>0&&C>b.duration,G=b.display.to>0&&w>=b.display.to;if(K||G){b.main&&(y=!0),b.expired=!0;const H=B.getRoot();H&&(H.visible=!1)}continue}const{video:D,audio:E,done:N}=await O(b,C);if(E&&E.length>0&&(b.timing?.fadeIn||b.timing?.fadeOut)){const B=b.duration&&b.duration!==1/0?b.duration:b.display.to-b.display.from,W=E[0].length/L.sampleRate*1e6,K=C+W;ki(E,K,B,L.sampleRate,b.timing?.fadeIn,b.timing?.fadeOut)}T.push(E);const Y=b.type==="Video"||b.type==="Image",I=b.transition?b.transition.start:0,P=b.transition?b.transition.end:0,z=Y&&b.transition&&w>=I&&w<P;if(o&&t!=null&&d!=null&&n!=null){if(b instanceof it){const W=p.get(b.fromClipId??""),K=p.get(b.toClipId??"");if(W&&K&&await n.renderTransition({sprite:b,timestamp:w,fromClip:W,toClip:K,getFrameCached:O,clipsNormalContainer:d,clipsClaimedByTransition:k,onVideoState:()=>{S=!0}})){const H=a.get(W);if(H){const q=H.getRoot();q&&(q.visible=!1)}const V=a.get(K);if(V){const q=V.getRoot();q&&(q.visible=!1)}continue}}let B=a.get(b);if(B==null&&D!=null&&(B=new de(t,b,d),a.set(b,B)),B!=null){const W=B.getRoot(),K=k.has(b.id);D!=null&&!z&&!K?(S=!0,W&&(W.visible=!0),await B.updateFrame(D)):(W&&(W.visible=!1),await B.updateFrame(null)),B.updateTransforms()}}const U=b.duration>0&&C>b.duration,Z=b.display.to>0&&w>=b.display.to;if((U||Z||N)&&(b.main&&(y=!0),b.expired=!0,o)){const B=a.get(b);if(B!=null){const W=B.getRoot();W&&(W.visible=!1)}}}if(o&&t!=null&&h!=null&&d!=null&&u!=null&&c!=null){const b=new Map;for(const A of e)if(A instanceof it){const C=n?.getTransitionSprite(A.id);C&&b.set(A.id,C)}await c.processEffects({timestamp:w,sprites:e,spriteById:p,spriteIndexById:g,spriteRenderers:a,transitionSprites:b,clipsEffectContainer:h,clipsNormalContainer:d,postProcessContainer:u})}return o&&t!=null&&t.render(),{audios:T,mainSprDone:y,hasVideo:S}},cleanup:()=>{n&&n.cleanup(),c&&c.cleanup(),h&&h.destroy({children:!0}),d&&d.destroy({children:!0}),u&&u.destroy({children:!0}),a.forEach(w=>{w.destroy()}),a.clear()}}}function _n(l,t=30){const e=l*L.channelCount,s=Math.ceil(L.sampleRate/t)*L.channelCount+e*2;let r=new Float32Array(Math.max(e*3,s)),o=0;const a=u=>{if(r.length<u){const f=new Float32Array(u);f.set(r.subarray(0,o),0),r=f}};let n=0;const c=l/L.sampleRate*1e6,h=new Float32Array(e),d=(u,f)=>{let p=0;const g=Math.floor(o/e),v=[];for(let T=0;T<g;T++)v.push(new AudioData({timestamp:n,numberOfChannels:L.channelCount,numberOfFrames:l,sampleRate:L.sampleRate,format:"f32",data:r.subarray(p,p+e)})),p+=e,n+=c;const x=o-p,w=Math.floor(x/L.channelCount);for(!f&&w>0&&(v.push(new AudioData({timestamp:n,numberOfChannels:L.channelCount,numberOfFrames:w,sampleRate:L.sampleRate,format:"f32",data:r.subarray(p,p+w*L.channelCount)})),p+=w*L.channelCount,n+=w/L.sampleRate*1e6),r.set(r.subarray(p,o),0),o-=p;u-n>c;)v.push(new AudioData({timestamp:n,numberOfChannels:L.channelCount,numberOfFrames:l,sampleRate:L.sampleRate,format:"f32",data:h})),n+=c;return v};return(u,f)=>{const p=f.length===0?0:Math.max(...f.map(v=>v[0]?.length??0)),g=p>0;g&&a(o+p*L.channelCount);for(let v=0;v<p;v++){let x=0,w=0;for(let T=0;T<f.length;T++){const y=f[T][0]?.[v]??0,S=f[T][1]?.[v]??y;x+=y,w+=S}r[o]=x,r[o+1]=w,o+=2}return d(u,g)}}function $n(l){try{return l.getContext("webgl2")??l.getContext("webgl")}catch{return null}}function ta(l){const{canvas:t,outputAudio:e,muxer:i,hasVideoTrack:s,timeSlice:r}=l;let o=0;const a=Math.floor(3*l.fps),n=s?$n(t):null,c=_n(1024,l.fps);return async(h,d,u)=>{if(e!==!1)for(const f of c(h,d))await i.encodeAudio(f);if(s&&u)try{n!=null&&!n.isContextLost()&&n.finish();const f=new VideoFrame(t,{duration:r,timestamp:h});await i.encodeVideo(f,{keyFrame:o%a===0}),o+=1}catch(f){console.warn("Failed to create VideoFrame from canvas, skipping frame:",f)}}}let ea=0;class ia extends te{static async isSupported(t={}){return(self.OffscreenCanvas!=null&&self.VideoEncoder!=null&&self.VideoDecoder!=null&&self.VideoFrame!=null&&self.AudioEncoder!=null&&self.AudioDecoder!=null&&self.AudioData!=null&&((await self.VideoEncoder.isConfigSupported({codec:t.videoCodec??"avc1.42E032",width:t.width??1920,height:t.height??1080,bitrate:t.bitrate??7e6})).supported??!1)&&(await self.AudioEncoder.isConfigSupported({codec:(await Ge()).codec,sampleRate:L.sampleRate,numberOfChannels:L.channelCount})).supported)??!1}logger=Q.create(`id:${ea++},`);destroyed=!1;sprites=[];canvas;pixiApp=null;stopOutput=null;opts;resolvedAudio=void 0;explicitOpts;hasVideoTrack;jsonDimensions={width:0,height:0};constructor(t={}){super();const{width:e=0,height:i=0}=t;this.canvas=new OffscreenCanvas(e,i),this.opts=Object.assign({backgroundColor:"#000",width:0,height:0,format:"mp4",videoCodec:"avc1.42E032",audio:!0,audioCodec:"aac",audioSampleRate:48e3,bitrate:5e6,fps:30,metaDataTags:null},t),this.explicitOpts={...t},this.hasVideoTrack=e*i>0,Ge().catch(s=>{this.logger.warn("Failed to detect audio codec:",s)})}async initPixiApp(){const{width:t,height:e}=this.opts;if(this.pixiApp=new m.Application,await this.pixiApp.init({canvas:this.canvas,width:t,height:e,backgroundColor:0,antialias:!1,autoDensity:!1,resolution:1,preference:"webgl"}),this.pixiApp.renderer==null||this.pixiApp.stage==null)throw new Error("Pixi.js Application failed to initialize properly");try{const i=this.pixiApp;i.ticker&&typeof i.ticker.stop=="function"&&i.ticker.stop()}catch{}await this.resolveAudioEncoding()}async resolveAudioEncoding(){if(this.opts.audio===!1){this.resolvedAudio=void 0;return}this.resolvedAudio=await Ei(this.opts.audioCodec||L.codecType,this.opts.audioSampleRate||L.sampleRate,L.channelCount)}async addSprite(t,e={}){const i={rect:{x:t.left,y:t.top,w:t.width,h:t.height},display:{...t.display},duration:t.duration,playbackRate:t.playbackRate,zIndex:t.zIndex};this.logger.info("Compositor add clip",i);const s=await t.clone();this.pixiApp!=null&&this.pixiApp.renderer!=null&&typeof s.setRenderer=="function"&&s.setRenderer(this.pixiApp.renderer),this.logger.info("Compositor add clip ready"),this.sprites.push(Object.assign(s,{main:e.main??!1,expired:!1})),this.sprites.sort((r,o)=>r.zIndex-o.zIndex)}initMuxer(t){const{fps:e,width:i,height:s,videoCodec:r,bitrate:o,audio:a,metaDataTags:n,format:c,audioCodec:h,audioSampleRate:d}=this.opts,u=this.sprites.some(g=>g.width>0&&g.height>0),f=this.hasVideoTrack&&u;return tt.recodemux({format:c||"mp4",video:f?{width:i,height:s,expectFPS:e,codec:r,bitrate:o,__unsafe_hardwareAcceleration__:this.opts.__unsafe_hardwareAcceleration__}:null,audio:a===!1||this.resolvedAudio===null?null:{codec:this.resolvedAudio?.codecType??(h||L.codecType),sampleRate:this.resolvedAudio?.sampleRate??(d||L.sampleRate),channelCount:L.channelCount},duration:t,metaDataTags:n})}output(t={}){if(this.sprites.length===0)throw Error("No sprite added");const e=this.sprites.find(c=>c.main),s=this.sprites.map(c=>c.display.to>0?c.display.to:c.display.from+c.duration).filter(c=>c!==1/0),r=t.maxTime??(e!=null?e.display.to>0?e.display.to:e.display.from+e.duration:s.length>0?Math.max(...s):0);if(r===1/0||r<=0)throw Error("Unable to determine the end time, please specify a main sprite, or limit the duration of Image, Audio");r===-1&&this.logger.warn("Unable to determine the end time, process value don't update"),this.logger.info(`start combinate video, maxTime:${r}`);const o=this.initMuxer(r),a=performance.now(),n=this.runEncoding(o,r,{onProgress:c=>{this.logger.debug("export:progress:",c),this.emit("export:progress",c)},onEnded:async()=>{await o.flush(),this.logger.info("===== output ended =====, cost:",performance.now()-a),this.emit("export:progress",1),this.destroy()},onError:c=>{this.emit("error",c),o.close(),this.destroy()}});return this.stopOutput=()=>{n(),o.close()},o.stream}destroy(){if(!this.destroyed&&(this.destroyed=!0,this.stopOutput?.(),this.off("export:progress"),this.off("error"),this.pixiApp!=null))try{const t=this.pixiApp;if(t.destroyed===!0){this.pixiApp=null;return}if(t.ticker&&typeof t.ticker.stop=="function")try{t.ticker.stop()}catch{}if(t.renderer!=null){const e=t.renderer.gl;if(e&&e.isContextLost()){this.pixiApp=null;return}this.pixiApp.destroy()}}catch(t){console.warn("Error while destroying Pixi application:",t)}finally{this.pixiApp=null}}runEncoding(t,e,{onProgress:i,onEnded:s,onError:r}){let o=0;const a={aborted:!1};let n=null,c=null;const h=async()=>{const{fps:f,backgroundColor:p,audio:g}=this.opts,v=Math.round(1e6/f),x=this.sprites.some(A=>A.width>0&&A.height>0),w=this.jsonDimensions.width||this.opts.width||1920,T=this.jsonDimensions.height||this.opts.height||1080,y=this.opts.width>0?this.opts.width/w:1,S=this.opts.height>0?this.opts.height/T:1;c=ci({pixiApp:this.pixiApp,sprites:this.sprites,aborter:a,scaleX:y,scaleY:S});const F=ta({muxer:t,canvas:this.canvas,outputAudio:g,hasVideoTrack:this.hasVideoTrack&&x,timeSlice:v,fps:f});let O=0;const k=4;let b=0;for(;;){if(n!=null)return;if(a.aborted||e!==-1&&O>e||this.sprites.length===0){d(),await s();return}o=O/e;const{audios:A,mainSprDone:C,hasVideo:R}=await c.render(O);if(C){d(),await s();return}if(a.aborted)return;this.hasVideoTrack&&R&&(O===0?(await new Promise(D=>setTimeout(D,50)),b=0):(b++,b>=k&&(await ii(),b=0))),await F(O,A,R),O+=v,await Vs(t.getEncodeQueueSize)}},d=()=>{a.aborted||(a.aborted=!0,clearInterval(u),c?.cleanup(),this.sprites.forEach(f=>{f.destroy()}))};h().catch(f=>{n=f,this.logger.error(f),d(),r(f)});const u=setInterval(()=>{i(o)},500);return d}exportToJSON(){const t={};for(const i of this.sprites)t[i.id]=zt(i,i.main);const e=[];return this.sprites.forEach(i=>{if(i.transition){const s=this.sprites.filter(r=>r.id!==i.id&&r.zIndex===i.zIndex&&r.display.from<i.display.from&&(r instanceof nt||r instanceof Pt)).sort((r,o)=>o.display.to-r.display.to)[0];s&&e.push({key:i.transition.name,duration:i.transition.duration,clips:[s.id,i.id]})}}),{clips:t,settings:{width:this.opts.width,height:this.opts.height,fps:this.opts.fps,backgroundColor:this.opts.backgroundColor,format:this.opts.format,videoCodec:this.opts.videoCodec,bitrate:this.opts.bitrate,audio:this.opts.audio,audioCodec:this.opts.audioCodec,audioSampleRate:this.opts.audioSampleRate,metaDataTags:this.opts.metaDataTags}}}async loadFromJSON(t){this.sprites.forEach(r=>{r.destroy()}),this.sprites=[];let e=!1;t.settings&&(t.settings.width!==void 0&&this.explicitOpts.width===void 0&&(this.opts.width!==t.settings.width&&(e=!0),this.opts.width=t.settings.width),t.settings.height!==void 0&&this.explicitOpts.height===void 0&&(this.opts.height!==t.settings.height&&(e=!0),this.opts.height=t.settings.height),e&&this.opts.width>0&&this.opts.height>0&&(this.canvas.width=this.opts.width,this.canvas.height=this.opts.height,this.pixiApp?.renderer&&this.pixiApp.renderer.resize(this.opts.width,this.opts.height)),t.settings.width&&t.settings.height&&(this.jsonDimensions={width:t.settings.width,height:t.settings.height}),t.settings.fps!==void 0&&this.explicitOpts.fps===void 0&&(this.opts.fps=t.settings.fps),t.settings.backgroundColor!==void 0&&this.explicitOpts.backgroundColor===void 0&&(this.opts.backgroundColor=t.settings.backgroundColor),t.settings.format!==void 0&&this.explicitOpts.format===void 0&&(this.opts.format=t.settings.format),t.settings.videoCodec!==void 0&&this.explicitOpts.videoCodec===void 0&&(this.opts.videoCodec=t.settings.videoCodec),t.settings.bitrate!==void 0&&this.explicitOpts.bitrate===void 0&&(this.opts.bitrate=t.settings.bitrate),t.settings.audio!==void 0&&this.explicitOpts.audio===void 0&&(this.opts.audio=t.settings.audio===!1?!1:void 0),t.settings.audioCodec!==void 0&&this.explicitOpts.audioCodec===void 0&&(this.opts.audioCodec=t.settings.audioCodec),t.settings.audioSampleRate!==void 0&&this.explicitOpts.audioSampleRate===void 0&&(this.opts.audioSampleRate=t.settings.audioSampleRate),t.settings.metaDataTags!==void 0&&this.explicitOpts.metaDataTags===void 0&&(this.opts.metaDataTags=t.settings.metaDataTags));const i=new Map;if(t.tracks){const r=t.tracks.length;t.tracks.forEach((o,a)=>{if(o.clipIds)for(const n of o.clipIds)i.set(n,(r-a)*10)})}const s=Object.values(t.clips??{});for(const r of s){const o=await vt(r);i.has(o.id)&&(o.zIndex=i.get(o.id)),await this.addSprite(o,{main:r.main||!1})}for(const r of this.sprites)if(r instanceof it){const o=r.fromClipId?this.sprites.find(c=>c.id===r.fromClipId):null,a=r.toClipId?this.sprites.find(c=>c.id===r.toClipId):null;if(o&&a){const c=a.display.from,h=Math.max(0,c-r.duration/2),d=h+r.duration;r.display.from=h,r.display.to=d}const n={name:r.transitionKey,key:r.transitionKey,duration:r.duration,fromClipId:r.fromClipId,toClipId:r.toClipId,start:r.display.from,end:r.display.to};o&&(o.transition={...n}),a&&(a.transition={...n})}await this.resolveAudioEncoding()}async renderFrame(t,e){if(this.destroyed)throw new Error("Compositor has been destroyed.");if(this.pixiApp==null&&await this.initPixiApp(),this.pixiApp==null)throw new Error("Compositor Pixi application could not be initialised. Ensure width and height are greater than 0.");const i=t*1e3,s=this.jsonDimensions.width||this.opts.width||1920,r=this.jsonDimensions.height||this.opts.height||1080,o=ci({pixiApp:this.pixiApp,backgroundColor:this.opts.backgroundColor,sprites:this.sprites,aborter:{aborted:!1},scaleX:this.opts.width>0?this.opts.width/s:1,scaleY:this.opts.height>0?this.opts.height/r:1});let a;try{await o.render(i);const n=e?.transparent??!1,c=this.pixiApp.renderer.background.alpha;n&&(this.pixiApp.renderer.background.alpha=0);const h=m.RenderTexture.create({width:this.opts.width,height:this.opts.height});try{this.pixiApp.renderer.render({container:this.pixiApp.stage,target:h,clear:!0}),a=await this.pixiApp.renderer.extract.base64(h,"image/png",1)}finally{h.destroy(),n&&(this.pixiApp.renderer.background.alpha=c)}}finally{o.cleanup()}return a}async snapshot(t,e){const i=typeof t=="number"?e:t,s=typeof t=="number"?t:void 0;return this.renderFrame(s??0,i)}}class sa{core;studio;constructor(t,e){this.core=t,this.studio=e,this.init()}isSyncing=!1;disposed=!1;queue=Promise.resolve();generation=0;resyncQueued=!1;pendingSeek=null;seekRunning=!1;unsubscribers=[];async init(){if(await this.studio.ready,this.disposed)return;const t=(s,r)=>{this.core.on(s,r),this.unsubscribers.push(()=>this.core.off(s,r))},e=(s,r)=>{const o=this.studio.on(s,r);this.unsubscribers.push(typeof o=="function"?o:()=>this.studio.off(s,r))};t("timeupdate",s=>this.requestSeek(s)),t("play",()=>this.guarded(()=>this.studio.play())),t("pause",()=>this.guarded(()=>this.studio.pause())),e("currentTime",({currentTime:s})=>{if(this.studio.isPlaying&&!this.isSyncing){this.isSyncing=!0;try{this.core.seek(s)}finally{this.isSyncing=!1}}}),e("play",()=>this.guarded(()=>this.core.play())),e("pause",()=>this.guarded(()=>this.core.pause()));const i=s=>{if(!this.isSyncing){this.isSyncing=!0;try{const r=s.selected.map(a=>a.id),o=this.core.store.getState().selectedIds;JSON.stringify(r)!==JSON.stringify(o)&&this.core.store.getState().select(r)}finally{this.isSyncing=!1}}};e("selection:created",i),e("selection:updated",i),e("selection:cleared",()=>i({selected:[]})),t("change",s=>this.onCoreChange(s)),await this.requestResync()}guarded(t){if(!this.isSyncing){this.isSyncing=!0;try{t()}finally{this.isSyncing=!1}}}enqueue(t){const e=this.queue.then(async()=>{if(!this.disposed)try{await t()}catch(i){console.error("[StudioBridge] Failed to apply Core changes:",i)}});return this.queue=e,e}requestResync(){return this.generation+=1,this.resyncQueued?this.queue:(this.resyncQueued=!0,this.enqueue(async()=>{this.resyncQueued=!1,await this.syncInitialState()}))}requestSeek(t){this.pendingSeek=t,!this.seekRunning&&(this.seekRunning=!0,(async()=>{try{for(;this.pendingSeek!=null&&!this.disposed;){const e=this.pendingSeek;this.pendingSeek=null;const i=this.isSyncing;this.isSyncing=!0;try{await this.studio.transport.seek(e)}finally{this.isSyncing=i}}}finally{this.seekRunning=!1}})())}syncSelectionToStudio(t){const e=this.studio.selection.getSelection().map(i=>i.id);JSON.stringify(t)!==JSON.stringify(e)&&this.studio.selectClipsByIds(t)}onCoreChange(t){if(t.some(i=>i.path==="/")){this.requestResync();return}const e=this.generation;this.enqueue(async()=>{e===this.generation&&await this.handlePatches(t)})}async handlePatches(t){for(const e of t){const i=e.path.split("/").filter(Boolean);if(i[0]==="clips"){const s=i[1];e.op==="add"&&!i[2]?await this.handleAddClip(e.value):e.op==="remove"&&!i[2]?await this.handleRemoveClip(s):e.op==="update"&&await this.handleUpdateClip(s,i.slice(2),e.value)}if(i[0]==="tracks"&&await this.studio.setTracks(this.core.store.getState().tracks),i[0]==="settings"){const s=this.core.store.getState().settings;(this.studio.opts.width!==s.width||this.studio.opts.height!==s.height)&&this.studio.setSize(s.width,s.height),this.studio.updateFrame(this.core.store.getState().currentTime)}i[0]==="selectedIds"&&this.syncSelectionToStudio(this.core.store.getState().selectedIds)}}getTrackCaptionConfig(t){return this.core.store.getState().tracks.find(s=>s.clipIds.includes(t))?.config?.captions??void 0}buildClipContext(t){if(t.type!=="Caption")return;const e=this.getTrackCaptionConfig(t.id);return e?{captionConfig:e}:void 0}async handleAddClip(t){if(t.type==="Transition")await this.studio.addTransition(t.transitionKey||"none",t.duration,t.fromClipId,t.toClipId,t.id);else{const e=this.buildClipContext(t);await this.ensureFontForClip(t,e?.captionConfig);const i=await vt(t,e),s=this.findTrackIdForClip(t.id);await this.studio.addClip(i,{trackId:s})}}async handleRemoveClip(t){const e=this.studio.timeline.getClipById(t);e&&await this.studio.removeClip(e)}async handleUpdateClip(t,e,i){const s=this.studio.timeline.getClipById(t);if(s)if(e.length===0){const r=s.locked;this.syncClipProperties(s,i)&&(r!==s.locked&&this.studio.selection.selectedClips.has(s)&&this.studio.selection.recreateTransformer(),await this.studio.timeline.recalculateMaxDuration(),this.studio.updateFrame(this.studio.currentTime))}else{const r=e[0];let o=!1;if(r==="timing")if(e.length===1)i&&(i.display&&(s.display={...i.display}),i.trim&&(s.trim={...i.trim}),i.duration!==void 0&&(s.duration=i.duration),i.playbackRate!==void 0&&(s.playbackRate=i.playbackRate),i.fadeIn!==void 0?s.timing.fadeIn=i.fadeIn:delete s.timing.fadeIn,i.fadeOut!==void 0?s.timing.fadeOut=i.fadeOut:delete s.timing.fadeOut,o=!0);else{const a=e[1];a==="display"?(s.display={...i},o=!0):a==="trim"?(s.trim={...i},o=!0):a==="duration"?(s.duration=i,o=!0):a==="playbackRate"?(s.playbackRate=i,o=!0):a==="fadeIn"?(i!==void 0?s.timing.fadeIn=i:delete s.timing.fadeIn,o=!0):a==="fadeOut"&&(i!==void 0?s.timing.fadeOut=i:delete s.timing.fadeOut,o=!0)}else if(r==="display")(!s.display||s.display.from!==i.from||s.display.to!==i.to)&&(s.display={...i},o=!0);else if(r==="transform")if(e.length===1)i&&(i.x!==void 0&&s.left!==i.x&&(s.left=i.x,o=!0),i.y!==void 0&&s.top!==i.y&&(s.top=i.y,o=!0),i.width!==void 0&&s.width!==i.width&&(s.width=i.width,o=!0),i.height!==void 0&&s.height!==i.height&&(s.height=i.height,o=!0),i.angle!==void 0&&s.angle!==i.angle&&(s.angle=i.angle,o=!0),i.opacity!==void 0&&s.opacity!==i.opacity&&(s.opacity=i.opacity,o=!0),i.zIndex!==void 0&&s.zIndex!==i.zIndex&&(s.zIndex=i.zIndex,o=!0),i.flip!==void 0&&JSON.stringify(s.flip)!==JSON.stringify(i.flip)&&(s.flip=i.flip,o=!0));else{const a=e[1];a==="x"&&s.left!==i?(s.left=i,o=!0):a==="y"&&s.top!==i?(s.top=i,o=!0):a==="width"&&s.width!==i?(s.width=i,o=!0):a==="height"&&s.height!==i?(s.height=i,o=!0):a==="angle"&&s.angle!==i?(s.angle=i,o=!0):a==="opacity"&&s.opacity!==i?(s.opacity=i,o=!0):a==="zIndex"&&s.zIndex!==i?(s.zIndex=i,o=!0):a==="flip"&&JSON.stringify(s.flip)!==JSON.stringify(i)&&(s.flip=i,o=!0)}else{const a=s.locked;s[r]!==i&&(Object.assign(s,{[r]:i}),r==="locked"&&a!==i&&this.studio.selection.selectedClips.has(s)&&this.studio.selection.recreateTransformer(),o=!0)}o&&(await this.studio.timeline.recalculateMaxDuration(),this.studio.updateFrame(this.studio.currentTime))}}async syncInitialState(){this.isSyncing=!0;try{await this.studio.clear();const t=this.core.store.getState();this.studio.setSize(t.settings.width,t.settings.height);for(const e in t.clips)await this.handleAddClip(t.clips[e]);this.studio.setTracks(t.tracks),this.syncSelectionToStudio(t.selectedIds),this.studio.updateFrame(t.currentTime)}finally{this.isSyncing=!1}}findTrackIdForClip(t){return this.core.store.getState().tracks.find(e=>e.clipIds.includes(t))?.id}async ensureFontForClip(t,e){const i=t.style,s=i?.fontUrl||e?.style?.fontUrl||t.fontUrl,r=i?.fontFamily||e?.style?.fontFamily||t.fontFamily;if(!(!s||!r))try{await Qt.addFont({name:r,url:s})}catch(o){console.warn(`[StudioBridge] Failed to pre-load font "${r}":`,o)}}syncClipProperties(t,e){let i=!1;const s=e.transform;s&&(s.x!==void 0&&Math.abs((t.left??0)-s.x)>=.01&&(t.left=s.x,i=!0),s.y!==void 0&&Math.abs((t.top??0)-s.y)>=.01&&(t.top=s.y,i=!0),s.width!==void 0&&Math.abs((t.width??0)-s.width)>=.01&&(t.width=s.width,i=!0),s.height!==void 0&&Math.abs((t.height??0)-s.height)>=.01&&(t.height=s.height,i=!0),s.angle!==void 0&&Math.abs((t.angle??0)-s.angle)>=.01&&(t.angle=s.angle,i=!0),s.opacity!==void 0&&Math.abs((t.opacity??1)-s.opacity)>=.01&&(t.opacity=s.opacity,i=!0),s.zIndex!==void 0&&t.zIndex!==s.zIndex&&(t.zIndex=s.zIndex,i=!0),s.flip!==void 0&&JSON.stringify(t.flip)!==JSON.stringify(s.flip)&&(t.flip=s.flip,i=!0)),["volume","text","words","style","chromaKey","colorAdjustment","animations","locked","caption","textBoxStyle","wordsPerLine","videoWidth","videoHeight","fontUrl","mediaId","bottomOffset","transitionKey","effectKey","values"].forEach(a=>{const n=e[a];if(n===void 0)return;const c=t[a];c!==n&&(typeof c=="number"&&typeof n=="number"&&Math.abs(c-n)<.01||(a==="style"||a==="values"||a==="caption")&&JSON.stringify(c)===JSON.stringify(n)||(Object.assign(t,{[a]:n}),i=!0))});const o=e.timing;if(o)o.display&&(!t.display||t.display.from!==o.display.from||t.display.to!==o.display.to)&&(t.display={...o.display},i=!0),o.trim&&(!t.trim||t.trim.from!==o.trim.from||t.trim.to!==o.trim.to)&&(t.trim={...o.trim},i=!0),o.duration!==void 0&&t.duration!==o.duration&&(t.duration=o.duration,i=!0),o.playbackRate!==void 0&&t.playbackRate!==o.playbackRate&&(t.playbackRate=o.playbackRate,i=!0),o.fadeIn!==void 0?JSON.stringify(t.timing.fadeIn)!==JSON.stringify(o.fadeIn)&&(t.timing.fadeIn=o.fadeIn,i=!0):t.timing.fadeIn!==void 0&&(delete t.timing.fadeIn,i=!0),o.fadeOut!==void 0?JSON.stringify(t.timing.fadeOut)!==JSON.stringify(o.fadeOut)&&(t.timing.fadeOut=o.fadeOut,i=!0):t.timing.fadeOut!==void 0&&(delete t.timing.fadeOut,i=!0);else{const a=e.display;a&&(!t.display||t.display.from!==a.from||t.display.to!==a.to)&&(t.display={...a},i=!0);const n=e.trim;n&&(!t.trim||t.trim.from!==n.from||t.trim.to!==n.to)&&(t.trim={...n},i=!0);const c=e.duration;c!==void 0&&t.duration!==c&&(t.duration=c,i=!0);const h=e.playbackRate;h!==void 0&&t.playbackRate!==h&&(t.playbackRate=h,i=!0)}return i}dispose(){this.disposed=!0,this.unsubscribers.forEach(t=>t()),this.unsubscribers=[]}}class ra extends m.Graphics{constructor(){super(),this.eventMode="static",this.cursor="move"}draw(t,e=1){const s=1.5*e;this.clear(),this.setStrokeStyle({width:s,color:165063}).rect(t.x,t.y,t.width,t.height).stroke(),this.hitArea=t}}class rt extends m.Graphics{#t=!1;handle;cursor;callbacks;constructor(t,e,i){super(),this.handle=t,this.cursor=e,this.callbacks=i,this.eventMode="static",this.#a(),this.on("pointerdown",this.#i),this.on("globalpointermove",this.#o),this.on("pointerup",this.#d),this.on("pointerupoutside",this.#d)}#a(){this.clear();const t=165063;if(this.handle==="rot_tl")this.hitArea=new m.Rectangle(-22,-22,24,24);else if(this.handle==="rot_tr")this.hitArea=new m.Rectangle(-2,-22,24,24);else if(this.handle==="rot_bl")this.hitArea=new m.Rectangle(-22,-2,24,24);else if(this.handle==="rot_br")this.hitArea=new m.Rectangle(-2,-2,24,24);else if(this.handle==="rot")this.circle(0,0,8),this.fill({color:"#ffffff"}),this.stroke({width:1,color:13421772}),this.moveTo(0,-4),this.arc(0,0,4,-Math.PI/2,Math.PI,!1),this.stroke({width:1,color:0}),this.moveTo(0,-8),this.lineTo(-3,-5),this.lineTo(0,-2),this.stroke({width:1,color:0,cap:"round",join:"round"}),this.hitArea=new m.Circle(0,0,24);else if(["ml","mr","mt","mb"].includes(this.handle)){const e=this.handle==="ml"||this.handle==="mr",i=e?6:24,s=e?24:6;this.roundRect(-i/2,-s/2,i,s,3),this.fill({color:"#ffffff"}),this.stroke({width:1,color:t}),this.hitArea=new m.Rectangle(-10,-10,20,20)}else this.rect(-4,-4,8,8),this.fill({color:"#ffffff"}),this.stroke({width:1,color:t}),this.hitArea=new m.Rectangle(-10,-10,20,20)}#i=t=>{this.#t=!0,this.handle.startsWith("rot")||(this.cursor="grabbing"),this.callbacks.beginDrag(this.handle,t.global)};#o=t=>{this.#t&&this.callbacks.updateDrag(this.handle,t.global)};#d=t=>{this.#t&&(this.#t=!1,this.handle.startsWith("rot")||(this.cursor="pointer"),this.callbacks.endDrag())}}class Lt{constructor(t,e,i=1){this.artboardWidth=t,this.artboardHeight=e,this.scale=i}artboardWidth;artboardHeight;scale;static SNAP_THRESHOLD=5;updateContext(t,e,i){this.artboardWidth=t,this.artboardHeight=e,this.scale=i}snapMove(t,e){const i=[];let s=0,r=0;const o=Lt.SNAP_THRESHOLD/this.scale,a=[{value:this.artboardWidth/2,label:"center",boundsY:[0,this.artboardHeight]},{value:0,label:"start",boundsY:[0,this.artboardHeight]},{value:this.artboardWidth,label:"end",boundsY:[0,this.artboardHeight]}];if(e)for(const f of e)a.push({value:f.x,label:"other-start",boundsY:[f.y,f.y+f.height]},{value:f.x+f.width/2,label:"other-center",boundsY:[f.y,f.y+f.height]},{value:f.x+f.width,label:"other-end",boundsY:[f.y,f.y+f.height]});const n=[{value:t.x,type:"start"},{value:t.x+t.width/2,type:"center"},{value:t.x+t.width,type:"end"}];let c=!1;for(const f of a){if(c)break;for(const p of n){const g=f.value-p.value;if(Math.abs(g)<o){s=g,c=!0;const v=f.boundsY?f.boundsY[0]:0,x=f.boundsY?f.boundsY[1]:this.artboardHeight;i.push({type:"vertical",position:f.value,start:Math.min(v,t.y),end:Math.max(x,t.y+t.height)});break}}}const h=[{value:this.artboardHeight/2,label:"center",boundsX:[0,this.artboardWidth]},{value:0,label:"start",boundsX:[0,this.artboardWidth]},{value:this.artboardHeight,label:"end",boundsX:[0,this.artboardWidth]}];if(e)for(const f of e)h.push({value:f.y,label:"other-start",boundsX:[f.x,f.x+f.width]},{value:f.y+f.height/2,label:"other-center",boundsX:[f.x,f.x+f.width]},{value:f.y+f.height,label:"other-end",boundsX:[f.x,f.x+f.width]});const d=[{value:t.y,type:"start"},{value:t.y+t.height/2,type:"center"},{value:t.y+t.height,type:"end"}];let u=!1;for(const f of h){if(u)break;for(const p of d){const g=f.value-p.value;if(Math.abs(g)<o){r=g,u=!0;const v=f.boundsX?f.boundsX[0]:0,x=f.boundsX?f.boundsX[1]:this.artboardWidth;i.push({type:"horizontal",position:f.value,start:Math.min(v,t.x),end:Math.max(x,t.x+t.width)});break}}}return{dx:s,dy:r,guides:i}}snapResize(t,e,i,s){const r=t.clone(),o=[],a=Lt.SNAP_THRESHOLD/this.scale,n=[{value:0,label:"start",boundsY:[0,this.artboardHeight]},{value:this.artboardWidth/2,label:"center",boundsY:[0,this.artboardHeight]},{value:this.artboardWidth,label:"end",boundsY:[0,this.artboardHeight]}],c=[{value:0,label:"start",boundsX:[0,this.artboardWidth]},{value:this.artboardHeight/2,label:"center",boundsX:[0,this.artboardWidth]},{value:this.artboardHeight,label:"end",boundsX:[0,this.artboardWidth]}];if(s)for(const y of s)n.push({value:y.x,label:"other-start",boundsY:[y.y,y.y+y.height]},{value:y.x+y.width/2,label:"other-center",boundsY:[y.y,y.y+y.height]},{value:y.x+y.width,label:"other-end",boundsY:[y.y,y.y+y.height]}),c.push({value:y.y,label:"other-start",boundsX:[y.x,y.x+y.width]},{value:y.y+y.height/2,label:"other-center",boundsX:[y.x,y.x+y.width]},{value:y.y+y.height,label:"other-end",boundsX:[y.x,y.x+y.width]});const h=["tl","ml","bl"].includes(i),d=["tr","mr","br"].includes(i),u=["tl","mt","tr"].includes(i),f=["bl","mb","br"].includes(i),p=e.x,g=e.y,v=r.width*this.scale,x=r.height*this.scale,w=p+v,T=g+x;for(const y of n){if(h){const S=y.value-p;if(Math.abs(S)<a){const F=S/this.scale;r.x+=F,r.width-=F;const O=y.boundsY?y.boundsY[0]:0,k=y.boundsY?y.boundsY[1]:this.artboardHeight;o.push({type:"vertical",position:y.value,start:Math.min(O,g),end:Math.max(k,T)});break}}if(d){const S=y.value-w;if(Math.abs(S)<a){const F=S/this.scale;r.width+=F;const O=y.boundsY?y.boundsY[0]:0,k=y.boundsY?y.boundsY[1]:this.artboardHeight;o.push({type:"vertical",position:y.value,start:Math.min(O,g),end:Math.max(k,T)});break}}}for(const y of c){if(u){const S=y.value-g;if(Math.abs(S)<a){const F=S/this.scale;r.y+=F,r.height-=F;const O=y.boundsX?y.boundsX[0]:0,k=y.boundsX?y.boundsX[1]:this.artboardWidth;o.push({type:"horizontal",position:y.value,start:Math.min(O,p),end:Math.max(k,w)});break}}if(f){const S=y.value-T;if(Math.abs(S)<a){const F=S/this.scale;r.height+=F;const O=y.boundsX?y.boundsX[0]:0,k=y.boundsX?y.boundsX[1]:this.artboardWidth;o.push({type:"horizontal",position:y.value,start:Math.min(O,p),end:Math.max(k,w)});break}}}return{corrected:r,guides:o}}snapPoint(t){const e=Lt.SNAP_THRESHOLD/this.scale,i=[],s=t.clone(),r=[0,this.artboardWidth/2,this.artboardWidth];for(const a of r)if(Math.abs(a-t.x)<e){s.x=a,i.push({type:"vertical",position:a,start:0,end:this.artboardHeight});break}const o=[0,this.artboardHeight/2,this.artboardHeight];for(const a of o)if(Math.abs(a-t.y)<e){s.y=a,i.push({type:"horizontal",position:a,start:0,end:this.artboardWidth});break}return{p:s,guides:i}}}const hi={delta:new m.Matrix,newLocal:new m.Matrix};class di extends m.Container{group;wireframe=new ra;selectionOutlines=new m.Graphics;isDragging=!1;lastPointer=new m.Point;activeHandle=null;#t;#a=new Map;#i=new m.Point;#o=0;#d=0;#s=new m.Rectangle;#r=new m.Point;#n=new m.Rectangle;#e=[new m.Point,new m.Point,new m.Point,new m.Point];#l=0;#c=0;#f=1;#u=1;#p;#m=new m.Graphics;#y=new m.Point;opts;constructor(t){super(),this.opts=t,this.group=t.group,this.eventMode="static",this.#p=new Lt(t.artboardWidth??1920,t.artboardHeight??1080),this.addChild(this.#m);const e={beginDrag:(i,s)=>this.#D(i,s),updateDrag:(i,s)=>this.#P(i,s),endDrag:()=>this.#h()};this.#t={tl:new rt("tl","nwse-resize",e),tr:new rt("tr","nesw-resize",e),bl:new rt("bl","nesw-resize",e),br:new rt("br","nwse-resize",e),ml:new rt("ml","ew-resize",e),mr:new rt("mr","ew-resize",e),mt:new rt("mt","ns-resize",e),mb:new rt("mb","ns-resize",e),rot_tl:new rt("rot_tl","crosshair",{beginDrag:(i,s)=>this.#w(s),updateDrag:(i,s)=>this.#b(s),endDrag:()=>this.#h()}),rot_tr:new rt("rot_tr","crosshair",{beginDrag:(i,s)=>this.#w(s),updateDrag:(i,s)=>this.#b(s),endDrag:()=>this.#h()}),rot_bl:new rt("rot_bl","crosshair",{beginDrag:(i,s)=>this.#w(s),updateDrag:(i,s)=>this.#b(s),endDrag:()=>this.#h()}),rot_br:new rt("rot_br","crosshair",{beginDrag:(i,s)=>this.#w(s),updateDrag:(i,s)=>this.#b(s),endDrag:()=>this.#h()})},this.addChild(this.selectionOutlines,this.wireframe,this.#t.rot_tl,this.#t.rot_tr,this.#t.rot_bl,this.#t.rot_br,this.#t.tl,this.#t.tr,this.#t.bl,this.#t.br,this.#t.ml,this.#t.mr,this.#t.mt,this.#t.mb),this.#R(),this.visible=!1,m.Ticker.shared.addOnce(()=>{this.showImmediate()})}#C=!1;showImmediate(){this.#C||this.destroyed||!this.parent||(this.#g(),this.visible=!0,this.#C=!0)}#R(){this.on("pointerdown",this.#M),this.on("pointerup",this.#T),this.on("pointerupoutside",this.#T),this.on("globalpointermove",this.#O)}#g(){if(this.group.length===1){const t=this.group[0];this.#o=t.rotation;const e=this.#x(t);let i,s;this.opts.clip?(i=this.opts.clip.width,s=this.opts.clip.height):(i=e.width,s=e.height);const r=t.toGlobal(new m.Point(0,0));this.#i.set(r.x,r.y),this.#n.copyFrom(new m.Rectangle(-i/2,-s/2,i,s))}else{let t=1/0,e=1/0,i=-1/0,s=-1/0;if(this.parent)for(const c of this.group){const h=this.#x(c);this.#e[0].set(h.x,h.y),this.#e[1].set(h.x+h.width,h.y),this.#e[2].set(h.x+h.width,h.y+h.height),this.#e[3].set(h.x,h.y+h.height);for(const d of this.#e)c.toGlobal(d,d),this.toLocal(d,void 0,d),t=Math.min(t,d.x),e=Math.min(e,d.y),i=Math.max(i,d.x),s=Math.max(s,d.y)}const r=i-t,o=s-e,a=t+r/2,n=e+o/2;if(this.#n.copyFrom(new m.Rectangle(-r/2,-o/2,r,o)),this.parent){const c=this.toGlobal(new m.Point(a,n));this.#i.set(c.x,c.y)}}this.#v()}#x(t){let e=null;const i=c=>{if(c.label==="MainSprite"&&c instanceof m.Sprite)return c;for(const h of c.children)if(h instanceof m.Container){const d=i(h);if(d)return d}return null};if(e=i(t),e){const c=e.getLocalBounds(),h=t.renderTexturePadding??0,d=h>0?new m.Rectangle(-(c.width-h*2)/2,-(c.height-h*2)/2,c.width-h*2,c.height-h*2):c,u=e.localTransform.clone(),f=u.apply(new m.Point(d.x,d.y)),p=u.apply(new m.Point(d.x+d.width,d.y)),g=u.apply(new m.Point(d.x+d.width,d.y+d.height)),v=u.apply(new m.Point(d.x,d.y+d.height)),x=Math.min(f.x,p.x,g.x,v.x),w=Math.max(f.x,p.x,g.x,v.x),T=Math.min(f.y,p.y,g.y,v.y),y=Math.max(f.y,p.y,g.y,v.y);return new m.Rectangle(x,T,w-x,y-T)}let s=1/0,r=1/0,o=-1/0,a=-1/0;const n=t.children.filter(c=>c.label!=="ShadowContainer"&&c.label!=="AnimationContainer");if(n.length===0&&t.children.length>0){const c=t.children.find(h=>h.label==="AnimationContainer");if(c){const h=c.getLocalBounds();return new m.Rectangle(h.minX,h.minY,h.maxX-h.minX,h.maxY-h.minY)}}for(const c of n){const h=c.getBounds(),d=t.toLocal(new m.Point(h.minX,h.minY)),u=t.toLocal(new m.Point(h.maxX,h.maxY));s=Math.min(s,d.x,u.x),r=Math.min(r,d.y,u.y),o=Math.max(o,d.x,u.x),a=Math.max(a,d.y,u.y)}if(s===1/0){const c=t.getLocalBounds();return new m.Rectangle(c.minX,c.minY,c.maxX-c.minX,c.maxY-c.minY)}return new m.Rectangle(s,r,o-s,a-r)}updateBounds(){this.#g()}#M=t=>{t.button===0&&(this.opts.locked||(this.#g(),this.#y.copyFrom(this.#i),this.isDragging=!0,this.lastPointer.copyFrom(t.global),this.cursor="grabbing"))};#T=()=>{this.isDragging&&this.#h(),this.cursor="default"};#O=t=>{if(!this.isDragging||this.activeHandle||!this.parent)return;const{moveDx:e,moveDy:i,newPivotWorld:s}=this.#E(t);for(const r of this.group)r.x+=e,r.y+=i;this.#i.copyFrom(s),this.lastPointer.copyFrom(t.global),this.#v(),this.emit("transforming")};#S(){const t=[];if(!this.parent)return t;const e=this.parent.children.find(o=>o.label==="ClipContainer");if(!e)return t;const i=e.children.find(o=>o.label==="ClipsNormal"),s=e.children.find(o=>o.label==="ClipsEffect"),r=[i,s].filter(Boolean);for(const o of r)for(const a of o.children){if(this.group.includes(a)||!a.visible)continue;const n=this.#x(a),c=this.parent.toLocal(new m.Point(n.x,n.y),a),h=this.parent.toLocal(new m.Point(n.x+n.width,n.y),a),d=this.parent.toLocal(new m.Point(n.x+n.width,n.y+n.height),a),u=this.parent.toLocal(new m.Point(n.x,n.y+n.height),a),f=Math.min(c.x,h.x,d.x,u.x),p=Math.max(c.x,h.x,d.x,u.x),g=Math.min(c.y,h.y,d.y,u.y),v=Math.max(c.y,h.y,d.y,u.y);t.push(new m.Rectangle(f,g,p-f,v-g))}return t}#E(t){const e=Math.abs(this.parent.worldTransform.a);this.#p.updateContext(this.opts.artboardWidth??1920,this.opts.artboardHeight??1080,e);const i=t.global.x-this.lastPointer.x,s=t.global.y-this.lastPointer.y;this.#y.x+=i,this.#y.y+=s;const r=this.parent.toLocal(this.#y),o=new m.Rectangle(r.x+this.#n.x,r.y+this.#n.y,this.#n.width,this.#n.height),a=this.#S(),{dx:n,dy:c,guides:h}=this.#p.snapMove(o,a);this.#A(h,e);const d=r.x+n,u=r.y+c,f=this.parent.toLocal(this.#i),p=d-f.x,g=u-f.y,v=this.parent.toGlobal(new m.Point(d,u));return{moveDx:p,moveDy:g,newPivotWorld:v}}#D(t,e){this.#g(),this.isDragging=!0,this.activeHandle=t,this.#a.clear();for(const i of this.group)this.#a.set(i,i.localTransform.clone());if(this.rotation=this.#o,this.#s.copyFrom(this.#n),this.#z(t),["ml","mr","mt","mb"].includes(t)){const i=this.#r,s=this.rotation,r=Math.cos(s),o=Math.sin(s),a=this.toLocal(e),n=a.x-i.x,c=a.y-i.y;t==="ml"||t==="mr"?(this.#l=n*r+c*o,this.#c=this.#s.width):(this.#l=-n*o+c*r,this.#c=this.#s.height)}}#P(t,e){this.#I(t,e)}async#I(t,e){const{proposed:i,sx:s,sy:r,pivotWorld:o}=await this.#B(t,e),a=this.opts.clip&&this.opts.clip.type==="Text",n=this.opts.clip&&this.opts.clip.type==="Caption";a||n?this.emit("textClipResize",{handle:t,newWidth:i.width,newHeight:i.height,pivotWorld:o,proposed:i,sx:s,sy:r}):this.#F(this.#L(o,this.#o,s,r)),this.#n.copyFrom(i),this.#v(),this.emit("transforming")}async#B(t,e){const i=this.#r,s=this.parent?Math.abs(this.parent.worldTransform.a):1,r=this.parent?this.parent.toLocal(e):e;let o;const a=this.localTransform,n=a.a*a.d-a.b*a.c;if(n!==0){const p=1/n,g=r.x-a.tx,v=r.y-a.ty,x=(a.d*g-a.b*v)*p,w=(-a.c*g+a.a*v)*p,T=new m.Point(x,w);o=this.#k(t,T,i)}else o=this.#k(t,this.toLocal(e),i);if(this.#p.updateContext(this.opts.artboardWidth??1920,this.opts.artboardHeight??1080,1),["tl","tr","bl","br","ml","mr","mt","mb"].includes(t)){const p=this.localTransform.apply(new m.Point(o.x,o.y)),g=this.#S(),{corrected:v,guides:x}=this.#p.snapResize(o,p,t,g);this.#A(x,s);const w=v.width/this.#s.width,T=v.height/this.#s.height,y=this.toGlobal(i);return{proposed:v,sx:w,sy:T,pivotWorld:y}}const d=o.width/this.#s.width,u=o.height/this.#s.height,f=this.toGlobal(i);return{proposed:o,sx:d,sy:u,pivotWorld:f}}#w(t){this.#g(),this.isDragging=!0,this.activeHandle="rot",this.#a.clear();for(const e of this.group)this.#a.set(e,e.localTransform.clone());this.#d=Math.atan2(t.y-this.#i.y,t.x-this.#i.x)}#b(t){const i=Math.atan2(t.y-this.#i.y,t.x-this.#i.x)-this.#d,s=this.#o+i;this.#F(this.#H(this.#i,i)),this.rotation=s,this.#v(s),this.emit("transforming")}#h(){this.isDragging=!1,this.#o=this.rotation,this.activeHandle=null,this.#m.clear(),this.#v(this.#o),this.emit("transformEnd")}#A(t,e){if(this.#m.clear(),!(!t.length||!this.parent)){this.#m.stroke({width:1/e,color:4774907});for(const i of t){let s,r;i.type==="vertical"?(s=new m.Point(i.position,i.start),r=new m.Point(i.position,i.end)):(s=new m.Point(i.start,i.position),r=new m.Point(i.end,i.position)),this.toLocal(s,this.parent,s),this.toLocal(r,this.parent,r),this.#m.moveTo(s.x,s.y).lineTo(r.x,r.y).stroke({width:1/e,color:4774907})}}}#v(t=this.#o){this.parent&&this.position.copyFrom(this.parent.toLocal(this.#i)),this.rotation=t;const i=1/((this.parent?Math.abs(this.parent.worldTransform.a):1)||1),s=this.#n;this.wireframe.draw(s,i);const r=s.x+s.width/2,o=s.y+s.height/2,n=this.opts.locked?[]:this.opts.clip?.getVisibleHandles?.()??["tl","tr","bl","br","ml","mr","mt","mb","rot"],c=[this.#t.tl,this.#t.tr,this.#t.bl,this.#t.br,this.#t.ml,this.#t.mr,this.#t.mt,this.#t.mb,this.#t.rot_tl,this.#t.rot_tr,this.#t.rot_bl,this.#t.rot_br];for(const u of c)u.scale.set(i);const h=n.includes("rot");this.#t.tl.visible=n.includes("tl"),this.#t.tr.visible=n.includes("tr"),this.#t.bl.visible=n.includes("bl"),this.#t.br.visible=n.includes("br"),this.#t.ml.visible=n.includes("ml"),this.#t.mr.visible=n.includes("mr"),this.#t.mt.visible=n.includes("mt"),this.#t.mb.visible=n.includes("mb"),this.#t.rot_tl.visible=h,this.#t.rot_tr.visible=h,this.#t.rot_bl.visible=h,this.#t.rot_br.visible=h,this.#t.tl.position.set(s.x,s.y),this.#t.tr.position.set(s.x+s.width,s.y),this.#t.bl.position.set(s.x,s.y+s.height),this.#t.br.position.set(s.x+s.width,s.y+s.height),this.#t.ml.position.set(s.x,o),this.#t.mr.position.set(s.x+s.width,o),this.#t.mt.position.set(r,s.y),this.#t.mb.position.set(r,s.y+s.height),this.#t.rot_tl.position.set(s.x,s.y),this.#t.rot_tr.position.set(s.x+s.width,s.y),this.#t.rot_bl.position.set(s.x,s.y+s.height),this.#t.rot_br.position.set(s.x+s.width,s.y+s.height);const d=(u,f)=>{const p=u-r,g=f-o,v=Math.atan2(p,-g),x=t+v,T=`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
3326
+ <g transform="rotate(${Math.round(x*180/Math.PI)-90} 16 16)">
3327
+ <path d="M 24 10 A 10 10 0 0 1 24 22" fill="none" stroke="white" stroke-width="4" stroke-linecap="round"/>
3328
+ <path d="M 20 10 L 24 10 L 24 6" fill="none" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
3329
+ <path d="M 24 26 L 24 22 L 20 22" fill="none" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
3330
+ <path d="M 24 10 A 10 10 0 0 1 24 22" fill="none" stroke="black" stroke-width="2" stroke-linecap="round"/>
3331
+ <path d="M 20 10 L 24 10 L 24 6" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3332
+ <path d="M 24 26 L 24 22 L 20 22" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3333
+ </g>
3334
+ </svg>`;return`url('data:image/svg+xml;utf8,${encodeURIComponent(T).replace(/'/g,"%27").replace(/"/g,"%22")}') 16 16, auto`};this.#t.rot_tl.cursor=d(s.x,s.y),this.#t.rot_tr.cursor=d(s.x+s.width,s.y),this.#t.rot_bl.cursor=d(s.x,s.y+s.height),this.#t.rot_br.cursor=d(s.x+s.width,s.y+s.height),this.#N(i)}#N(t){if(this.selectionOutlines.clear(),this.group.length<=1||!this.parent)return;const e={width:1*t,color:43775,alpha:1};for(const i of this.group){const s=this.#x(i);this.#e[0].set(s.x,s.y),this.#e[1].set(s.x+s.width,s.y),this.#e[2].set(s.x+s.width,s.y+s.height),this.#e[3].set(s.x,s.y+s.height);for(const r of this.#e)i.toGlobal(r,r),this.toLocal(r,void 0,r);this.selectionOutlines.moveTo(this.#e[0].x,this.#e[0].y).lineTo(this.#e[1].x,this.#e[1].y).lineTo(this.#e[2].x,this.#e[2].y).lineTo(this.#e[3].x,this.#e[3].y).closePath().stroke(e)}}#z(t){const e=this.#s;if(this.opts.centeredScaling){this.#r.set(e.x+e.width/2,e.y+e.height/2);return}t==="tl"?this.#r.set(e.x+e.width,e.y+e.height):t==="tr"?this.#r.set(e.x,e.y+e.height):t==="bl"?this.#r.set(e.x+e.width,e.y):t==="br"?this.#r.set(e.x,e.y):t==="ml"?this.#r.set(e.x+e.width,e.y+e.height/2):t==="mr"?this.#r.set(e.x,e.y+e.height/2):t==="mt"?this.#r.set(e.x+e.width/2,e.y+e.height):t==="mb"&&this.#r.set(e.x+e.width/2,e.y)}#k(t,e,i){let s=!1;if(this.opts.clip&&(this.opts.clip.type==="Image"||this.opts.clip.type==="Video")&&(s=!0),this.opts.centeredScaling){let g=Math.abs(e.x-i.x)*2,v=Math.abs(e.y-i.y)*2;if(s){const x=this.#s.width,w=this.#s.height,T=x/w;g/x>v/w?v=g/T:g=v*T}return g=Math.max(this.#f,g),v=Math.max(this.#u,v),new m.Rectangle(i.x-g/2,i.y-v/2,g,v)}if(["tl","tr","bl","br"].includes(t)){let g=Math.abs(e.x-i.x),v=Math.abs(e.y-i.y);if(s){const x=this.#s.width,w=this.#s.height,T=x/w;g/x>v/w?v=g/T:g=v*T}if(g=Math.max(this.#f,g),v=Math.max(this.#u,v),t==="tl")return new m.Rectangle(i.x-g,i.y-v,g,v);if(t==="tr")return new m.Rectangle(i.x,i.y-v,g,v);if(t==="bl")return new m.Rectangle(i.x-g,i.y,g,v);if(t==="br")return new m.Rectangle(i.x,i.y,g,v)}const r=this.#s,o=this.rotation,a=Math.cos(o),n=Math.sin(o),c=(i.x-r.x)/r.width,h=(i.y-r.y)/r.height,d=e.x-i.x,u=e.y-i.y,f=d*a+u*n,p=-d*n+u*a;if(t==="ml"){const g=this.#l-f,v=Math.max(this.#f,this.#c+g),x=i.x-v*c,w=i.y-r.height*h;return new m.Rectangle(x,w,v,r.height)}if(t==="mr"){const g=f-this.#l,v=Math.max(this.#f,this.#c+g),x=i.x-v*c,w=i.y-r.height*h;return new m.Rectangle(x,w,v,r.height)}if(t==="mt"){const g=this.#l-p,v=Math.max(this.#u,this.#c+g),x=i.x-r.width*c,w=i.y-v*h;return new m.Rectangle(x,w,r.width,v)}if(t==="mb"){const g=p-this.#l,v=Math.max(this.#u,this.#c+g),x=i.x-r.width*c,w=i.y-v*h;return new m.Rectangle(x,w,r.width,v)}return new m.Rectangle(i.x,i.y,this.#f,this.#u)}#L(t,e,i,s){return hi.delta.identity().translate(-t.x,-t.y).rotate(-e).scale(i,s).rotate(e).translate(t.x,t.y)}#H(t,e){return hi.delta.identity().translate(-t.x,-t.y).rotate(e).translate(t.x,t.y)}#F(t){for(const e of this.group){const i=this.#a.get(e),s=e.parent;if(!i||!s)continue;const r=s.worldTransform.clone().invert(),o=s.worldTransform.clone().append(i),a=t.clone().append(o),n=r.clone().append(a);e.setFromMatrix(n)}}}class oa{constructor(t){this.studio=t}studio;selectedClips=new Set;activeTransformer=null;interactiveClips=new Set;getSelection(){return Array.from(this.selectedClips)}selectionGraphics=null;isDragSelecting=!1;dragSelectionStart=new m.Point;isUpdatingTextRealtime=!1;textClipResizedWidth=null;textClipResizeHandle=null;textClipResizedSx=null;textClipResizedSy=null;lastPointerDownTime=0;lastPointerDownClip=null;init(t,e){this.selectionGraphics=new m.Graphics,this.selectionGraphics.visible=!1,this.selectionGraphics.zIndex=1e3,e.addChild(this.selectionGraphics),t.stage.eventMode="static",t.stage.hitArea=t.screen,t.stage.on("pointerdown",i=>this.onStagePointerDown(i)),t.stage.on("globalpointermove",i=>this.onStagePointerMove(i)),t.stage.on("pointerup",()=>this.onStagePointerUp()),t.stage.on("pointerupoutside",()=>this.onStagePointerUp())}onStagePointerDown(t){t.target===this.studio.pixiApp?.stage&&(t.shiftKey||this.deselectClip(),this.isDragSelecting=!0,this.studio.artboard?.toLocal(t.global,void 0,this.dragSelectionStart),this.selectionGraphics&&(this.selectionGraphics.clear(),this.selectionGraphics.visible=!0))}onStagePointerMove(t){if(this.isDragSelecting&&this.selectionGraphics&&this.studio.artboard){const e=this.studio.artboard.toLocal(t.global),i=Math.min(this.dragSelectionStart.x,e.x),s=Math.min(this.dragSelectionStart.y,e.y),r=Math.abs(e.x-this.dragSelectionStart.x),o=Math.abs(e.y-this.dragSelectionStart.y);this.selectionGraphics.clear(),this.selectionGraphics.rect(i,s,r,o).fill({color:703971,alpha:.3}),this.selectionGraphics.rect(i,s,r,o).stroke({width:2,color:703971});const a=this.selectionGraphics.getBounds(),n=new m.Rectangle(a.x,a.y,a.width,a.height);if(n.width>2||n.height>2){const c=this.getIntersectingClips(n);this.updatePreviewSelection(c)}else this.selectedClips.size===0&&this.destroyTransformer();this.studio.pixiApp?.render()}}onStagePointerUp(){if(this.isDragSelecting&&this.selectionGraphics&&this.studio.artboard){const t=this.selectionGraphics.getBounds(),e=new m.Rectangle(t.x,t.y,t.width,t.height);if(e.width>2||e.height>2){const i=this.getIntersectingClips(e);if(i.length>0){for(const s of i)this.selectedClips.add(s);this.recreateTransformer(),this.studio.emit("selection:created",{selected:Array.from(this.selectedClips)})}else this.selectedClips.size===0&&this.destroyTransformer()}else this.selectedClips.size===0&&this.destroyTransformer();this.selectionGraphics.clear(),this.selectionGraphics.visible=!1,this.isDragSelecting=!1,this.studio.pixiApp?.render()}}getIntersectingClips(t){const e=[];for(const i of this.studio.clips){const s=this.studio.spriteRenderers.get(i);if(!s)continue;const r=s.getRoot();if(!r||!r.visible)continue;const o=r.getBounds();t.x<o.x+o.width&&t.x+t.width>o.x&&t.y<o.y+o.height&&t.y+t.height>o.y&&e.push(i)}return e}updatePreviewSelection(t){if(t.length===0){this.selectedClips.size===0?this.destroyTransformer():this.recreateTransformer();return}const e=new Set(t),i=[];let s=null;for(const r of e){const o=this.studio.spriteRenderers.get(r);if(o==null)continue;const a=o.getRoot();a!=null&&(i.push(a),e.size===1&&(s=r))}if(i.length===0){this.selectedClips.size===0&&this.destroyTransformer();return}this.activeTransformer?(this.activeTransformer.group=i,this.activeTransformer.opts.group=i,this.activeTransformer.opts.clip=s,this.activeTransformer.updateBounds(),this.activeTransformer.showImmediate()):(this.activeTransformer=new di({group:i,clip:s,artboardWidth:this.studio.opts.width,artboardHeight:this.studio.opts.height}),this.studio.artboard?.addChild(this.activeTransformer),this.activeTransformer.showImmediate()),this.studio.pixiApp?.render()}refreshClipHitArea(t){const e=this.studio.spriteRenderers.get(t);if(e==null)return;const i=e.getRoot();i!=null&&(i.hitArea=new m.Rectangle(-t.width/2,-t.height/2,t.width,t.height))}setupSpriteInteractivity(t){if(this.interactiveClips.has(t))return;const e=this.studio.spriteRenderers.get(t);if(e==null)return;const i=e.getRoot();i!=null&&(i.eventMode="static",i.cursor="pointer",this.refreshClipHitArea(t),i.on("pointerdown",s=>{const r=Date.now(),o=this.getTopmostClipAtPoint(s.global);o===t&&o===this.lastPointerDownClip&&r-this.lastPointerDownTime<350&&(o.type==="Text"||o.type==="Caption")&&this.studio.emit("clip:dblclick",{clip:o}),this.lastPointerDownTime=r,this.lastPointerDownClip=o,o&&this.selectClip(o,s.shiftKey)}),this.interactiveClips.add(t))}getTopmostClipAtPoint(t){if(!this.studio.pixiApp)return null;let e=null,i=-1/0;for(const s of this.interactiveClips){const r=this.studio.spriteRenderers.get(s);if(!r)continue;const o=r.getRoot();if(!o||!o.visible)continue;const a=o.toLocal(t),n=s.width/2,c=s.height/2;a.x>=-n&&a.x<=n&&a.y>=-c&&a.y<=c&&s.zIndex>i&&(i=s.zIndex,e=s)}return e}selectClip(t,e=!1){if(!(this.studio.destroyed||this.studio.pixiApp==null)){if(e||this.deselectClip(),e&&this.selectedClips.has(t)){this.selectedClips.delete(t),this.recreateTransformer(),this.studio.emit("selection:updated",{selected:Array.from(this.selectedClips)}),this.studio.pixiApp?.render();return}this.selectedClips.add(t),this.recreateTransformer(),e?this.studio.emit("selection:updated",{selected:Array.from(this.selectedClips)}):this.studio.emit("selection:created",{selected:Array.from(this.selectedClips)}),this.studio.pixiApp?.render()}}selectClipsByIds(t){const e=this.studio.clips.filter(i=>t.includes(i.id));this.setSelection(e)}setSelection(t){if(!(this.studio.destroyed||this.studio.pixiApp==null)&&!(this.selectedClips.size===t.length&&t.every(e=>this.selectedClips.has(e)))){for(const e of this.selectedClips)this.syncSpriteToClipProperties(e);this.destroyTransformer(),this.selectedClips.clear();for(const e of t)this.selectedClips.add(e);this.selectedClips.size>0?(this.createTransformer(),this.studio.emit("selection:updated",{selected:Array.from(this.selectedClips)})):this.studio.emit("selection:cleared",{deselected:[]}),this.studio.pixiApp?.render()}}deselectClip(){if(this.selectedClips.size>0)for(const e of this.selectedClips)this.syncSpriteToClipProperties(e);this.destroyTransformer();const t=Array.from(this.selectedClips);this.selectedClips.clear(),t.length>0&&this.studio.emit("selection:cleared",{deselected:t}),this.studio.pixiApp?.render()}async move(t,e){if(this.selectedClips.size===0)return;const i=[];for(const s of this.selectedClips)i.push({id:s.id,updates:{left:(s.left??0)+t,top:(s.top??0)+e}});await this.studio.updateClips(i),this.activeTransformer&&this.activeTransformer.updateBounds()}clear(){this.deselectClip(),this.interactiveClips.clear()}recreateTransformer(){this.destroyTransformer(),this.selectedClips.size>0&&this.createTransformer()}destroyTransformer(){this.activeTransformer!=null&&(this.activeTransformer.parent!=null&&this.activeTransformer.parent.removeChild(this.activeTransformer),this.activeTransformer.destroy(),this.activeTransformer=null)}createTransformer(){if(this.studio.destroyed||this.studio.artboard==null||this.selectedClips.size===0)return;const t=[];let e=null;for(const r of this.selectedClips){const o=this.studio.spriteRenderers.get(r);if(o==null)continue;const a=o.getRoot();a!=null&&(t.push(a),this.selectedClips.size===1&&(e=r))}if(t.length===0){console.warn("Cannot create transformer: no sprites found");return}const i=e?.locked??!1;this.activeTransformer=new di({group:t,clip:e,artboardWidth:this.studio.opts.width,artboardHeight:this.studio.opts.height,locked:i});let s=null;this.activeTransformer.on("transforming",()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,this.syncSelectedClipsTransformsRealtime();for(const r of this.selectedClips){const o=this.studio.spriteRenderers.get(r);if(!o)continue;const a=o.getRoot();if(!a)continue;const c=(r.flip?.x||r.flip?.y?-1:1)*a.angle;this.studio.emit("clip:transforming",{clip:r,ephemeral:{left:r.left,top:r.top,width:r.width,height:r.height,angle:c,scaleX:a.scale.x,scaleY:a.scale.y}})}this.studio.pixiApp?.render()}))}),this.activeTransformer.on("textClipResize",r=>{this.textClipResizedWidth=r.newWidth,this.textClipResizeHandle=r.handle,this.textClipResizedSx=r.sx,this.textClipResizedSy=r.sy;const o=this.selectedClips.size===1?Array.from(this.selectedClips)[0]:null;if(o instanceof at&&this.textClipResizedWidth!==null){const a=o.updateLayoutForWidth(this.textClipResizedWidth);r.proposed&&a.height!==r.proposed.height&&(r.proposed.height=a.height)}}),this.activeTransformer.on("transformEnd",async()=>{s!==null&&(cancelAnimationFrame(s),s=null);const r=this.studio.opts.core;if(r){const o=[];for(const a of this.selectedClips){const n=this.studio.spriteRenderers.get(a);if(!n)continue;const c=n.getRoot(),h=n.getSprite();if(!c||!h||!h.texture)continue;const d=a.renderTexturePadding??0,u=h.texture.width-d*2,f=h.texture.height-d*2,p=Math.abs(c.scale.x*h.scale.x)*u,g=Math.abs(c.scale.y*h.scale.y)*f,v={left:c.x-p/2,top:c.y-g/2,width:p,height:g,angle:(a.flip?.x||a.flip?.y?-1:1)*c.angle};(a.type==="Text"||a.type==="Caption")&&this.textClipResizedWidth!==null&&(v.width=this.textClipResizedWidth),o.push({id:a.id,updates:v})}o.length>0&&r.execute({id:Xt.nanoid(),type:"clip.update",payload:o.length===1?o[0]:o})}else await this.syncSelectedClipsTransforms();for(const o of this.selectedClips)this.studio.emit("clip:updated",{clip:o});this.studio.emit("transform:end",{transformer:this.activeTransformer})}),this.activeTransformer.on("pointerdown",r=>{if(r.button!==0||(this.studio.emit("transform:start",{transformer:this.activeTransformer}),this.activeTransformer?.activeHandle!==null))return;const o=this.getTopmostClipAtPoint(r.global),a=Date.now();o&&o===this.lastPointerDownClip&&a-this.lastPointerDownTime<350&&(o.type==="Text"||o.type==="Caption")&&this.studio.emit("clip:dblclick",{clip:o}),this.lastPointerDownTime=a,this.lastPointerDownClip=o,o&&!this.selectedClips.has(o)&&(this.selectClip(o,r.shiftKey),r.stopPropagation())}),this.studio.artboard.addChild(this.activeTransformer),this.activeTransformer.showImmediate(),this.studio.pixiApp?.render()}async syncSelectedClipsTransformsRealtime(){if(this.selectedClips.size===0||this.activeTransformer==null)return;const t=this.activeTransformer.activeHandle;if(t===null){for(const e of this.selectedClips){const i=this.studio.spriteRenderers.get(e);if(i==null)continue;const s=i.getRoot(),r=i.getSprite();if(s==null||r==null||r.texture==null)continue;const o=e.renderTexturePadding??0,a=r.texture.width-o*2,n=r.texture.height-o*2,c=Math.abs(s.scale.x*r.scale.x)*a,h=Math.abs(s.scale.y*r.scale.y)*n;e.left=s.x-c/2,e.top=s.y-h/2}return}if(t==="mr"||t==="ml"){if(this.isUpdatingTextRealtime)return;this.isUpdatingTextRealtime=!0;try{for(const e of this.selectedClips){if(!(e instanceof at))continue;const i=this.studio.spriteRenderers.get(e);if(i==null)continue;const s=i.getRoot(),r=i.getSprite();if(s==null||r==null||r.texture==null)continue;const o=Math.abs(s.scale.x*r.scale.x);if(o===1)continue;const a=e.left,n=e.top,c=e.width,h=e.renderTexturePadding??0,d=r.texture.width-h*2,u=o*d;await e.updateStyle({wordWrap:!0,wordWrapWidth:u});const f=await e.getTexture();f&&(await i.updateFrame(f),r.scale.set(1,1),s.scale.set(1,1),t==="ml"?e.left=a+c-e.width:e.left=a,e.top=n,s.x=e.left+e.width/2,s.y=e.top+e.height/2,this.activeTransformer.updateBounds(),this.refreshClipHitArea(e))}}finally{this.isUpdatingTextRealtime=!1}}}async syncSelectedClipsTransforms(){if(!(this.selectedClips.size===0||this.activeTransformer==null)){for(const t of this.selectedClips){const e=this.studio.spriteRenderers.get(t);if(e==null)continue;const i=e.getRoot(),s=e.getSprite();if(i==null||s==null||s.texture==null)continue;const r=t.renderTexturePadding??0,o=s.texture.width-r*2,a=s.texture.height-r*2,n=Math.abs(i.scale.x*s.scale.x)*o,c=Math.abs(i.scale.y*s.scale.y)*a,h=(t instanceof at||t instanceof pt)&&this.textClipResizedWidth!==null?this.textClipResizedWidth:n,d=t.width,f=(t.style?.fontSize??16)*Math.max(this.textClipResizedSx||1,this.textClipResizedSy||1);let p=i.x;if((t instanceof at||t instanceof pt)&&this.textClipResizedWidth!==null){const v={wordWrap:!0,wordWrapWidth:h};this.textClipResizeHandle==="mr"?(p=t.left+h/2,i.x=p):this.textClipResizeHandle==="ml"?(p=t.left+h/2-(h-d),i.x=p):["br","tr"].includes(this.textClipResizeHandle)?(p=t.left+h/2,v.fontSize=f):["bl","tl"].includes(this.textClipResizeHandle)&&(p=t.left+h/2-(h-d),v.fontSize=f),await t.updateStyle(v);const x=await t.getTexture();if(x){await e.updateFrame(x),t.width=h;const w=t.renderTexturePadding??0;t.height=x.height-w*2,this.textClipResizedWidth=null,t.left=p-t.width/2,t.top=i.y-t.height/2,s.scale.set(1,1),i.scale.set(1,1)}}else{const v=n,x=c;t.left=i.x-v/2,t.top=i.y-x/2,t.width=v,t.height=x;const w=t.flip?.x||t.flip?.y?-1:1;t.angle=w*i.angle}}this.activeTransformer!=null&&this.activeTransformer.updateBounds();for(const t of this.selectedClips){const e=this.studio.spriteRenderers.get(t);e?.updateTransforms(),this.refreshClipHitArea(t)}}}syncSpriteToClipProperties(t){const e=this.studio.spriteRenderers.get(t);if(e!=null){const i=e.getRoot(),s=e.getSprite();if(i!=null&&s!=null&&s.texture!=null){const r=t.renderTexturePadding??0,o=s.texture.width-r*2,a=s.texture.height-r*2,n=Math.abs(i.scale.x*s.scale.x)*o,c=Math.abs(i.scale.y*s.scale.y)*a,h=n,d=c,u=i.x-h/2,f=i.y-d/2;t.left=u,t.top=f,t.width=h,t.height=d;const p=t.flip?.x||t.flip?.y?-1:1;t.angle=p*i.angle,e.updateTransforms(),this.studio.emit("clip:updated",{clip:t})}}}async deleteSelected(){return this.studio.deleteSelected()}}class na{constructor(t){this.studio=t}studio;isPlaying=!1;currentTime=0;maxDuration=0;playStartTime=0;playStartTimestamp=0;rafId=null;playbackElements=new Map;setMaxDuration(t){this.maxDuration=t}async play(){if(!(this.isPlaying||this.studio.destroyed)){if(this.maxDuration<=0||this.maxDuration===1/0||isNaN(this.maxDuration)){console.warn("Cannot play: invalid duration",this.maxDuration);return}this.isPlaying||(this.isPlaying=!0),this.playStartTime=this.currentTime,this.playStartTimestamp=performance.now(),this.renderLoop(),this.studio.emit("play",{isPlaying:!0})}}pause(){this.isPlaying=!1,this.rafId!=null&&(cancelAnimationFrame(this.rafId),this.rafId=null);for(const[t,{element:e}]of this.playbackElements.entries())this.isPlaybackCapable(t)&&t.pause(e);this.studio.emit("pause",{isPlaying:!1})}async stop(){this.pause(),await this.seek(0)}async seek(t){if(this.studio.destroyed)return;const e=this.isPlaying;this.playStartTime=Math.max(0,Math.min(t,this.maxDuration)),this.playStartTimestamp=performance.now(),this.currentTime=this.playStartTime;for(const[i,{element:s}]of this.playbackElements.entries()){if(!(this.currentTime>=i.display.from&&(i.display.to===0||this.currentTime<=i.display.to))){this.isPlaybackCapable(i)&&i.pause(s);continue}const o=(this.currentTime-i.display.from)/1e6;if(this.isPlaybackCapable(i)){const a=this.currentTime,n=s;n.__pendingRender=()=>{this.currentTime===a&&this.studio.updateFrame(a)},await i.seek(s,o)}}await this.studio.updateFrame(this.currentTime),this.studio.emit("currentTime",{currentTime:this.currentTime}),e&&(this.isPlaying=!0)}async frameNext(){const e=1e6/(this.studio.opts.fps||30),i=Math.min(this.currentTime+e,this.maxDuration);await this.seek(i)}async framePrev(){const e=1e6/(this.studio.opts.fps||30),i=Math.max(0,this.currentTime-e);await this.seek(i)}async renderLoop(){if(!this.isPlaying||this.studio.destroyed||this.studio.pixiApp==null)return;if(this.maxDuration<=0||this.maxDuration===1/0||isNaN(this.maxDuration)){this.pause();return}const t=async()=>{if(!this.isPlaying||this.studio.destroyed||this.studio.pixiApp==null)return;if(this.currentTime>=this.maxDuration){this.currentTime=this.maxDuration,this.pause();return}const i=(performance.now()-this.playStartTimestamp)*1e3;this.currentTime=Math.min(this.playStartTime+i,this.maxDuration),this.studio.emit("currentTime",{currentTime:this.currentTime});try{await this.studio.updateFrame(this.currentTime)}catch(s){console.warn("Error updating frame:",s)}this.isPlaying&&(this.rafId=requestAnimationFrame(t))};t()}isPlaybackCapable(t){return"play"in t&&"pause"in t&&"seek"in t}}class aa{constructor(t){this.studio=t}studio;tracks=[];clips=[];getTrackById(t){return this.tracks.find(e=>e.id===t)}getClipById(t){return this.clips.find(e=>e.id===t)}findTrackIdByClipId(t){for(const e of this.tracks)if(e.clipIds.includes(t))return e.id}getTrackIndex(t){return this.tracks.findIndex(e=>e.id===t)}addTrack(t,e){const i={id:t.id||`track_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,name:t.name,type:t.type,clipIds:[]};return typeof e=="number"?this.tracks.splice(e,0,i):this.tracks.unshift(i),this.studio.emit("track:added",{track:i,index:e??0}),this.studio.emit("track:order-changed",{tracks:this.tracks}),i}async removeTrack(t){const e=this.tracks.findIndex(r=>r.id===t);if(e===-1)return;const s=[...this.tracks[e].clipIds];for(const r of s)await this.removeClipById(r);this.tracks.splice(e,1),this.studio.emit("track:removed",{trackId:t}),this.studio.emit("track:order-changed",{tracks:this.tracks})}async moveTrack(t,e){const i=this.tracks.findIndex(r=>r.id===t);if(i===-1)return;const s=this.tracks[i];this.tracks.splice(i,1),this.tracks.splice(e,0,s),this.studio.emit("track:order-changed",{tracks:this.tracks}),await this.studio.updateFrame(this.studio.currentTime)}async setTrackOrder(t){const e=[],i=new Map(this.tracks.map(s=>[s.id,s]));for(const s of t){const r=i.get(s);r&&e.push(r)}e.length!==this.tracks.length&&console.warn("[Studio] setTrackOrder: invalid track IDs provided, order not updated fully"),this.tracks=e,this.studio.emit("track:order-changed",{tracks:this.tracks}),await this.studio.updateFrame(this.studio.currentTime)}async addTransition(t,e=2e6,i,s,r){if(this.studio.destroyed)return;let o=null,a=null;if(i&&s&&(o=this.getClipById(i)??null,a=this.getClipById(s)??null),!o||!a){console.warn("[Studio] Invalid fromClipId or toClipId",{fromClipId:i,toClipId:s});return}await Promise.all([o.ready,a.ready]);const n=e,c=a.display.from-n/2,h=c+n,d={key:t,name:t,duration:n,fromClipId:o.id,toClipId:a.id,start:Math.max(0,c),end:h},u=this.findTrackIdByClipId(a.id);if(u){const g=this.tracks.find(v=>v.id===u);if(g){const v=g.clipIds.map(x=>this.getClipById(x)).filter(x=>{if(!x||x.type!=="Transition")return!1;const w=x;return w.fromClipId===o.id&&w.toClipId===a.id});for(const x of v)await this.removeClip(x)}}const f=`${o.id}_${a.id}`;this.studio.transitionRenderers.has(f)&&(this.studio.transitionRenderers.get(f)?.destroy(),this.studio.transitionRenderers.delete(f)),o.transition={...d},a.transition={...d};const p=new it(t);r&&(p.id=r),p.duration=n,p.fromClipId=Math.max(0,c)===0?null:o.id,p.toClipId=a.id,p.fromClipId===null&&o&&(p.fromClipId=o.id),p.display.from=Math.max(0,c),p.display.to=h,await this.addClip(p,{trackId:u}),this.studio.seek(this.studio.currentTime)}async addClip(t,e){const i=Array.isArray(t)?t:[t];if(i.length===0)return;const{trackId:s,audioSource:r}=this.normalizeAddClipOptions(e);if(this.studio.destroyed)return;if(this.studio.pixiApp==null)throw new Error("Failed to initialize Pixi.js Application");const o=i.filter(n=>!this.getClipById(n.id)),a=[];for(const n of o)await this.prepareClipForTimeline(n,s),a.push(n);await this.recalculateMaxDuration();for(const n of a)await this.setupClipVisuals(n,r);await this.studio.updateFrame(this.studio.currentTime),this.emitAddClipEvents(a,s)}normalizeAddClipOptions(t){let e,i;if(t&&(typeof t=="string"||t instanceof File||t instanceof Blob))e=t;else if(typeof t=="object"&&t!==null&&!("size"in t)){const s=t;e=s.audioSource,i=s.trackId}return{trackId:i,audioSource:e}}async prepareClipForTimeline(t,e){t.id||(t.id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`),this.getClipById(t.id)||this.clips.push(t),this.addClipToTrack(t,e);const i=async()=>{await this.studio.updateFrame(this.studio.currentTime);const s=this.studio.selection;s.activeTransformer!=null&&s.selectedClips.has(t)&&typeof s.activeTransformer.updateBounds=="function"&&s.activeTransformer.updateBounds(),s.refreshClipHitArea(t)};t.on("propsChange",i),this.studio.clipListeners.set(t,i),this.studio.pixiApp!=null&&typeof t.setRenderer=="function"&&t.setRenderer(this.studio.pixiApp.renderer),await t.ready}addClipToTrack(t,e){if(e){const i=this.tracks.find(s=>s.id===e);if(i)i.clipIds.includes(t.id)||i.clipIds.push(t.id);else{const s={id:e,name:`Track ${this.tracks.length+1}`,type:t.type,clipIds:[t.id]};this.tracks.unshift(s),this.studio.emit("track:added",{track:s,index:0}),this.studio.emit("track:order-changed",{tracks:this.tracks})}}else{const s={id:`track_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,name:`Track ${this.tracks.length+1}`,type:t.type,clipIds:[t.id]};this.tracks.unshift(s),this.studio.emit("track:added",{track:s,index:0}),this.studio.emit("track:order-changed",{tracks:this.tracks})}}async setupClipVisuals(t,e){const i=this.studio.spriteRenderers.get(t);if(i){const s=this.studio.clipsNormalContainer,r=i.getRoot();r&&!r.parent&&s.addChild(r)}else{const s=await t.ready;if(s.width>0&&s.height>0){const r=this.studio.clipsNormalContainer,o=t.type==="Video"&&this.isPlaybackCapable(t);if(!o||o&&t.tickInterceptor!=null){const a=new de(this.studio.pixiApp,t,r);this.studio.spriteRenderers.set(t,a)}}}await this.setupPlaybackForClip(t,e),this.studio.opts.interactivity&&this.studio.selection.setupSpriteInteractivity(t)}emitAddClipEvents(t,e){if(t.length!==0)if(t.length===1){const i=t[0],s=e||this.tracks.find(r=>r.clipIds.includes(i.id))?.id||"";this.studio.emit("clip:added",{clip:i,trackId:s})}else this.studio.emit("clips:added",{clips:t,trackId:e})}async removeClip(t,e={permanent:!0}){const{permanent:i}=e;if(t.locked)return;const s=this.clips.findIndex(h=>h===t);if(s===-1)return;if(t instanceof it){if(t.fromClipId){const h=this.getClipById(t.fromClipId);h&&"transition"in h&&delete h.transition}if(t.toClipId){const h=this.getClipById(t.toClipId);h&&"transition"in h&&delete h.transition}}this.studio.selection.selectedClips.has(t)&&this.studio.selection.deselectClip(),this.clips.splice(s,1);const r=[];for(const h of this.tracks){const d=h.clipIds.indexOf(t.id);d!==-1&&(h.clipIds.splice(d,1),r.push(h.id))}this.reconcileTracks(),this.studio.selection.interactiveClips.delete(t);const o=this.studio.clipListeners.get(t);o&&(t.off("propsChange",o),this.studio.clipListeners.delete(t));const a=this.studio.spriteRenderers.get(t);if(a!=null)if(i)a.destroy(),this.studio.spriteRenderers.delete(t);else{const h=a.getRoot();h&&h.parent&&h.parent.removeChild(h)}const n=this.studio.transport.playbackElements.get(t);n!=null&&(this.isPlaybackCapable(t)&&t.pause(n.element),this.studio.transport.playbackElements.delete(t),i&&this.isPlaybackCapable(t)&&t.cleanupPlayback(n.element,n.objectUrl));const c=this.studio.videoSprites.get(t);c!=null&&this.studio.pixiApp!=null&&(c.parent&&c.parent.removeChild(c),i&&(c.destroy(),this.studio.videoSprites.delete(t))),await this.recalculateMaxDuration(),this.studio.emit("clip:removed",{clipId:t.id})}async removeClips(t,e={permanent:!0}){if(t.length!==0){for(const i of t){if(i.locked)continue;const s=this.clips.findIndex(c=>c===i);if(s===-1)continue;if(i instanceof it){if(i.fromClipId){const c=this.getClipById(i.fromClipId);c&&"transition"in c&&delete c.transition}if(i.toClipId){const c=this.getClipById(i.toClipId);c&&"transition"in c&&delete c.transition}}this.studio.selection.selectedClips.has(i)&&this.studio.selection.deselectClip(),this.clips.splice(s,1);for(const c of this.tracks){const h=c.clipIds.indexOf(i.id);h!==-1&&c.clipIds.splice(h,1)}this.studio.selection.interactiveClips.delete(i);const r=this.studio.clipListeners.get(i);r&&(i.off("propsChange",r),this.studio.clipListeners.delete(i));const o=this.studio.spriteRenderers.get(i);if(o!=null)if(e.permanent)o.destroy(),this.studio.spriteRenderers.delete(i);else{const c=o.getRoot();c&&c.parent&&c.parent.removeChild(c)}const a=this.studio.transport.playbackElements.get(i);a!=null&&(this.isPlaybackCapable(i)&&i.pause(a.element),this.studio.transport.playbackElements.delete(i),e.permanent&&this.isPlaybackCapable(i)&&i.cleanupPlayback(a.element,a.objectUrl));const n=this.studio.videoSprites.get(i);n!=null&&this.studio.pixiApp!=null&&(n.parent&&n.parent.removeChild(n),e.permanent&&(n.destroy(),this.studio.videoSprites.delete(i)))}for(let i=this.tracks.length-1;i>=0;i--)if(this.tracks[i].clipIds.length===0){const s=this.tracks[i].id;this.tracks.splice(i,1),this.studio.emit("track:removed",{trackId:s})}await this.recalculateMaxDuration(),this.studio.emit("clips:removed",{clipIds:t.map(i=>i.id)})}}async removeClipById(t){const e=this.clips.find(i=>i.id===t);e&&await this.removeClip(e)}async updateClip(t,e){const i=this.clips.find(s=>s.id===t);i&&(i.locked&&!("locked"in e)||(i.locked&&"locked"in e&&(Object.keys(e).length===1||(e={locked:e.locked})),await this.applyClipUpdate(i,e),await this.recalculateMaxDuration(),await this.studio.updateFrame(this.studio.currentTime),this.updateTransformer(i),this.studio.emit("clip:updated",{clip:i})))}async updateClips(t){const e=[];for(const{id:i,updates:s}of t){const r=this.clips.find(o=>o.id===i);r&&(await this.applyClipUpdate(r,s),e.push(r))}if(e.length!==0){await this.recalculateMaxDuration(),await this.studio.updateFrame(this.studio.currentTime);for(const i of e)this.updateTransformer(i),this.studio.emit("clip:updated",{clip:i})}}async replaceClipsBySource(t,e){const i=this.clips.filter(s=>s.src===t);if(i.length!==0){this.studio.suspendRendering();for(const s of i){if(!this.clips.includes(s))continue;const r=this.findTrackIdByClipId(s.id);if(!r)continue;const o=this.getTrackById(r);if(!o)continue;const a=await e(s),n=async()=>{await this.studio.updateFrame(this.studio.currentTime),this.updateTransformer(a)};a.on("propsChange",n),this.studio.clipListeners.set(a,n),this.studio.pixiApp!=null&&typeof a.setRenderer=="function"&&a.setRenderer(this.studio.pixiApp.renderer),await a.ready;const c=this.clips.indexOf(s);c!==-1&&(this.clips[c]=a);const h=o.clipIds.indexOf(s.id);h!==-1&&(o.clipIds[h]=a.id),await this.setupClipVisuals(a);const d=this.studio.spriteRenderers.get(s);d&&(d.destroy(),this.studio.spriteRenderers.delete(s));const u=this.studio.videoSprites.get(s);u&&(u.parent&&u.parent.removeChild(u),u.destroy(),this.studio.videoSprites.delete(s));const f=this.studio.clipListeners.get(s);f&&(s.off("propsChange",f),this.studio.clipListeners.delete(s)),this.studio.selection.selectedClips.has(s)&&(this.studio.selection.selectedClips.delete(s),this.studio.selection.selectedClips.add(a)),this.studio.emit("clip:replaced",{oldClip:s,newClip:a,trackId:r})}await this.recalculateMaxDuration(),this.studio.resumeRendering(),await this.studio.updateFrame(this.studio.currentTime)}}async applyClipUpdate(t,e){if(t.type==="Text"||t.type==="Caption"){const i=t;typeof i.updateStyle=="function"&&await i.updateStyle(e),"style"in e&&delete e.style}if(Object.assign(t,e),e.display&&!e.duration?t.duration=e.display.to-e.display.from:e.duration&&(!e.display||!e.display.to)&&(t.display||(t.display={from:0,to:e.duration}),t.display.to=t.display.from+e.duration),e.display&&e.duration){const i=e.display.to-e.display.from;i!==e.duration&&(t.duration=i)}else t.display&&(t.display.to=t.display.from+t.duration)}updateTransformer(t){const e=this.studio.selection;e.selectedClips.has(t)&&e.activeTransformer&&e.activeTransformer.updateBounds()}exportToJSON(){this.reconcileTracks();const t={};for(const s of this.clips)t[s.id]=zt(s,!1);const e=this.tracks.map(s=>({id:s.id,name:s.name,type:s.type,clipIds:[...s.clipIds]})),i=[];return this.clips.forEach(s=>{if(s.transition){const r=this.tracks.find(o=>o.clipIds.includes(s.id));if(r){const o=r.clipIds.indexOf(s.id);if(o>0){const a=r.clipIds[o-1];i.push({key:s.transition.name,duration:s.transition.duration,clips:[a,s.id]})}}}}),{tracks:e,clips:t,settings:{width:this.studio.opts.width,height:this.studio.opts.height,fps:this.studio.opts.fps,backgroundColor:this.studio.opts.backgroundColor}}}async loadFromJSON(t){if(await this.clear(),t.settings){const s=t.settings.width&&t.settings.width!==this.studio.opts.width||t.settings.height&&t.settings.height!==this.studio.opts.height;if(t.settings.width&&(this.studio.opts.width=t.settings.width),t.settings.height&&(this.studio.opts.height=t.settings.height),t.settings.fps&&(this.studio.opts.fps=t.settings.fps),t.settings.backgroundColor&&(this.studio.opts.backgroundColor=t.settings.backgroundColor),s&&this.studio.pixiApp!=null){const r=this.studio.opts.width,o=this.studio.opts.height;this.studio.pixiApp.renderer.resize(r,o),this.studio.opts.canvas&&(this.studio.opts.canvas.width=r,this.studio.opts.canvas.height=o)}}const e=[],i=Object.values(t.clips??{});if(i.length>0){await this.ensureFontsForClips(i);const s=i.map(a=>a.src).filter(a=>a&&a.trim()!=="");this.studio.resourceManager.preload(s);const r=new Map;if(t.tracks){for(const a of t.tracks)if(a.clipIds)for(const n of a.clipIds)r.set(n,a.id)}if(t.tracks)for(const a of t.tracks)this.tracks.push({id:a.id,name:a.name,type:a.type,clipIds:[]});for(const a of i)e.push((async()=>{try{let n=a.id?r.get(a.id):void 0;if(a.type==="Transition"){const h=a,d=h.toClipId||h.fromClipId;d&&(n=r.get(d))}if(a.type!=="Text"&&a.type!=="Caption"&&a.type!=="Effect"&&a.type!=="Transition"&&(!a.src||a.src.trim()===""))return console.warn(`Skipping clip ${a.type} with empty source`,a),{clip:null};const c=await vt(a);return(c.type==="Video"||c.type==="Image")&&(!a.transform?.width||!a.transform?.height)&&this.studio.opts.width&&this.studio.opts.height&&(typeof c.scaleToFit=="function"&&await c.scaleToFit(this.studio.opts.width,this.studio.opts.height),typeof c.centerInScene=="function"&&c.centerInScene(this.studio.opts.width,this.studio.opts.height)),{clip:c,intendedTrackId:n}}catch(n){return console.error(`Failed to load clip ${a.id||"unknown"}:`,n),{clip:null}}})());const o=await Promise.all(e);for(const{clip:a,intendedTrackId:n}of o)a&&(a.id||(a.id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`),this.clips.push(a),this.addClipToTrack(a,n))}this.studio.pixiApp&&this.clips.forEach(s=>{const r=async()=>{await this.studio.updateFrame(this.studio.currentTime);const o=this.studio.selection;o.activeTransformer!=null&&o.selectedClips.has(s)&&typeof o.activeTransformer.updateBounds=="function"&&o.activeTransformer.updateBounds()};s.on("propsChange",r),this.studio.clipListeners.set(s,r),typeof s.setRenderer=="function"&&s.setRenderer(this.studio.pixiApp.renderer),(async()=>{try{await s.ready,await this.setupClipVisuals(s),await this.studio.updateFrame(this.studio.currentTime)}catch(o){console.warn(`[Studio] Failed to setup visuals for clip ${s.id}:`,o)}})()});for(const s of this.clips){const r=s.effects;if(Array.isArray(r))for(const o of r)this.studio.globalEffects.has(o.id)||this.studio.globalEffects.set(o.id,{id:o.id,key:o.key,startTime:o.startTime,duration:o.duration})}for(const s of this.clips)if(s instanceof it){const r={name:s.transitionKey,key:s.transitionKey,duration:s.duration,fromClipId:s.fromClipId,toClipId:s.toClipId,start:s.display.from,end:s.display.to};if(s.fromClipId){const o=this.getClipById(s.fromClipId);o&&(o.transition={...r})}if(s.toClipId){const o=this.getClipById(s.toClipId);o&&(o.transition={...r})}}await this.recalculateMaxDuration();try{await this.studio.updateFrame(this.studio.currentTime)}catch(s){console.error("[Studio] Failed to update initial frame:",s)}this.studio.emit("studio:restored",{clips:this.clips,tracks:this.tracks,settings:this.studio.opts})}async deleteSelected(){const t=this.studio.selection.selectedClips,e=Array.from(t);if(e.length!==0)for(const i of e)await this.removeClip(i)}async duplicateSelected(){const t=this.studio.selection.selectedClips,e=Array.from(t).filter(s=>!s.locked);if(e.length===0)return;const i=[];for(const s of e){const r=this.findTrackIdByClipId(s.id);if(!r)continue;const o=this.tracks.find(d=>d.id===r);if(!o)continue;const a=zt(s,!1),n=await vt(a);n.id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;const c=`track_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,h=`${o.name} (Copy)`;this.addTrack({id:c,name:h,type:o.type}),await this.addClip(n,{trackId:c}),i.push(n.id)}i.length>0&&this.studio.selection.selectClipsByIds(i)}async splitSelected(t){if(this.studio.opts.core){this.studio.opts.core.clip.split(t);return}const e=Array.from(this.studio.selection.selectedClips);if(e.length!==1){console.warn("[Studio] Split requires exactly one selected clip");return}const i=e[0];if(i.locked){console.warn("[Studio] Cannot split a locked clip");return}const s=t??this.studio.currentTime;if(s<=i.display.from||i.display.to>0&&s>=i.display.to){console.warn("[Studio] Split time is outside clip bounds");return}const r=zt(i,!1),o=s-i.display.from,a=i.playbackRate||1,n=o*a,c={duration:o,display:{from:i.display.from,to:s}};i.trim&&(c.trim={from:i.trim.from,to:i.trim.from+n}),await this.updateClip(i.id,c);const h={...r};h.timing||(h.timing={});const d=r.timing?.display?.to??0,u=r.timing?.display?.from??0,f=r.timing?.duration??i.duration,p=d>0?d:u+f;h.timing.display={from:s,to:p},h.timing.duration=f-o,h.timing.trim&&(h.timing.trim={from:h.timing.trim.from+n,to:h.timing.trim.to});const g=await vt(h);g.id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;const v=this.findTrackIdByClipId(i.id);v&&(await this.addClip(g,{trackId:v}),this.studio.selection.selectClipsByIds([g.id]))}async trimSelected(t){const e=Array.from(this.studio.selection.selectedClips);if(e.length!==1){console.warn("[Studio] Trim requires exactly one selected clip");return}const i=e[0];if(i.locked){console.warn("[Studio] Cannot trim a locked clip");return}const s=t*1e6,r=i.playbackRate||1,o=s*r;if(s>=i.duration){console.warn("[Studio] Trim amount exceeds clip duration");return}const a=i.duration-s,n=i.display.from+s,c=i.display.to,h={duration:a,display:{from:n,to:c}};if(i.trim)h.trim={from:i.trim.from+o,to:i.trim.to};else{const d=i.sourceDuration||i.duration;h.trim={from:o,to:d}}await this.updateClip(i.id,h)}async updateSelected(t){const e=Array.from(this.studio.selection.selectedClips);if(e.length!==0)for(const i of e)await this.updateClip(i.id,t)}async setTracks(t){const e=JSON.parse(JSON.stringify(this.tracks));this.tracks=JSON.parse(JSON.stringify(t)),this.reconcileTracks(),this.tracks.length===0&&this.clips.length>0&&(this.tracks=e,this.reconcileTracks()),await this.recalculateMaxDuration(),this.studio.isRestoring||this.studio.emit("track:order-changed",{tracks:this.tracks}),await this.studio.updateFrame(this.studio.currentTime)}reconcileTracks(){const t=new Set(this.clips.map(e=>e.id));for(let e=this.tracks.length-1;e>=0;e--){const i=this.tracks[e],s=i.clipIds.filter(r=>t.has(r));s.length!==i.clipIds.length&&(i.clipIds=s),i.clipIds.length===0&&(this.tracks.splice(e,1),this.studio.isRestoring||this.studio.emit("track:removed",{trackId:i.id}))}this.tracks.length===0&&!this.studio.isRestoring&&this.studio.emit("track:order-changed",{tracks:this.tracks})}async ensureFontsForClips(t){const e=new Map;for(const i of t){if(i.type==="Text"){const s=i.style?.fontUrl||i.fontUrl;s&&e.set(s,{name:i.style?.fontFamily||i.fontFamily||"CustomFont",url:s})}if(i.type==="Caption"){const s=i.style?.fontUrl||i.fontUrl;s&&e.set(s,{name:i.style?.fontFamily||i.fontFamily||"CustomFont",url:s})}}if(e.size>0)try{await Qt.loadFonts(Array.from(e.values()))}catch(i){console.warn("Failed to load some fonts:",i)}}async recalculateMaxDuration(){let t=0;for(const e of this.clips){e.display.to===0&&e.duration!==1/0&&!isNaN(e.duration)&&e.duration>0;const i=e.duration>0?e.duration:0;if(i===1/0)continue;const s=e.display.to>0?e.display.to:e.display.from+i;s>t&&(t=s)}this.studio.maxDuration=t}async setupPlaybackForClip(t,e){if(this.studio.pixiApp!=null&&this.isPlaybackCapable(t))try{const i=t;if(t.type==="Audio"&&e&&typeof e!="string"){const o=URL.createObjectURL(e);t.src=o}const{element:s,objectUrl:r}=await i.createPlaybackElement();if(t.type==="Video"){const o=m.Texture.from(s),a=new m.Sprite(o);a.visible=!1,this.studio.clipsNormalContainer&&this.studio.clipsNormalContainer.addChild(a),this.studio.videoSprites.set(t,a)}this.studio.transport.playbackElements.set(t,{element:s,objectUrl:r})}catch(i){console.warn(`Failed to setup playback for ${t.constructor.name}`,i)}}isPlaybackCapable(t){return"createPlaybackElement"in t&&"play"in t&&"pause"in t&&"seek"in t&&"syncPlayback"in t&&"cleanupPlayback"in t}async clear(){this.studio.selection.deselectClip(),this.studio.selection.interactiveClips.clear();for(const[t,e]of this.studio.clipListeners)t.off("propsChange",e);this.studio.clipListeners.clear(),this.studio.globalEffects.clear(),this.studio.effectFilters.clear(),this.studio.transitionRenderers.forEach(t=>t.destroy()),this.studio.transitionRenderers.clear(),this.studio.transitionSprites.forEach(t=>{t.parent&&t.parent.removeChild(t),t.destroy()}),this.studio.transitionSprites.clear(),this.studio.spriteRenderers.forEach(t=>t.destroy()),this.studio.spriteRenderers.clear();for(const[t,e]of this.studio.transport.playbackElements)this.isPlaybackCapable(t)&&t.cleanupPlayback(e.element,e.objectUrl);this.studio.transport.playbackElements.clear();for(const t of this.studio.videoSprites.values())t.destroy();this.studio.videoSprites.clear(),this.tracks=[],this.clips=[],this.studio.maxDuration=0,this.studio.currentTime=0,this.studio.emit("reset")}async rippleDelete(t,e){if(t>=e)return;const i=e-t,s=[...this.clips];for(const r of s){const o=r.display.from,a=r.display.to;if(!(a<=t)){if(o>=e){await this.updateClip(r.id,{display:{from:r.display.from-i,to:r.display.to-i}});continue}if(o>=t&&a<=e){await this.removeClip(r);continue}if(o<t&&a>e){const n=await r.clone();n.id=`clip_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;const c=t,h=t+(a-e),d=r.trim.from+(e-o)*r.playbackRate,u=r.trim.to,f=this.tracks.find(p=>p.clipIds.includes(r.id));f&&(await this.addClip(n,{trackId:f.id}),await this.updateClip(n.id,{display:{from:c,to:h},trim:{from:d,to:u}})),await this.updateClip(r.id,{display:{from:r.display.from,to:t},trim:{from:r.trim.from,to:r.trim.from+(t-o)*r.playbackRate}});continue}if(o<t&&a<=e){await this.updateClip(r.id,{display:{from:r.display.from,to:t},trim:{from:r.trim.from,to:r.trim.from+(t-o)*r.playbackRate}});continue}if(o>=t&&a>e){await this.updateClip(r.id,{display:{from:t,to:t+(a-e)},trim:{from:r.trim.from+(e-o)*r.playbackRate,to:r.trim.to}});continue}}}await this.recalculateMaxDuration(),await this.studio.updateFrame(this.studio.currentTime)}}class la{past=[];future=[];lastState=null;maxSize;constructor(t={}){this.maxSize=t.maxSize||50}projectToHistoryState(t){const e={},i=JSON.parse(JSON.stringify(t.tracks||[]));for(const[s,r]of Object.entries(t.clips??{}))e[s]=JSON.parse(JSON.stringify(r));return{clips:e,tracks:i,settings:JSON.parse(JSON.stringify(t.settings||{}))}}init(t){this.lastState=this.projectToHistoryState(JSON.parse(JSON.stringify(t))),this.past=[],this.future=[]}push(t){if(!this.lastState){this.init(t);return}const e=this.projectToHistoryState(JSON.parse(JSON.stringify(t))),i=pi(this.lastState,e);i.length!==0&&(this.past.push(i),this.past.length>this.maxSize&&this.past.shift(),this.future=[],this.lastState=e)}undo(t){const e=this.past.pop();if(!e)return null;const i=this.projectToHistoryState(JSON.parse(JSON.stringify(t))),s=this.applyPatches(i,e,!0);return this.future.push(e),this.lastState=s,{patches:e,state:s}}redo(t){const e=this.future.pop();if(!e)return null;const i=this.projectToHistoryState(JSON.parse(JSON.stringify(t))),s=this.applyPatches(i,e,!1);return this.past.push(e),this.lastState=s,{patches:e,state:s}}applyPatches(t,e,i){const s=JSON.parse(JSON.stringify(t)),r=i?[...e].reverse():e;for(const o of r){const{type:a,path:n}=o,c=o.value,h=o.oldValue;let d=s,u=!1;for(let p=0;p<n.length-1;p++){if(d[n[p]]===void 0||d[n[p]]===null){u=!0;break}d=d[n[p]]}if(u)continue;const f=n[n.length-1];if(i)switch(a){case"CREATE":Array.isArray(d)?d.splice(f,1):delete d[f];break;case"REMOVE":d[f]=h&&typeof h=="object"?JSON.parse(JSON.stringify(h)):h;break;case"CHANGE":d[f]=h&&typeof h=="object"?JSON.parse(JSON.stringify(h)):h;break}else switch(a){case"CREATE":d[f]=c&&typeof c=="object"?JSON.parse(JSON.stringify(c)):c;break;case"REMOVE":Array.isArray(d)?d.splice(f,1):delete d[f];break;case"CHANGE":d[f]=c&&typeof c=="object"?JSON.parse(JSON.stringify(c)):c;break}}return s}canUndo(){return this.past.length>0}canRedo(){return this.future.length>0}}class fi extends te{selection;transport;timeline;history;resourceManager;pixiApp=null;get tracks(){return this.timeline.tracks}get clips(){return this.timeline.clips}spriteRenderers=new Map;artboard=null;clipContainer=null;artboardMask=null;artboardBg=null;get activeTransformer(){return this.selection.activeTransformer}set activeTransformer(t){this.selection.activeTransformer=t}get selectedClips(){return this.selection.selectedClips}set selectedClips(t){this.selection.selectedClips=t}get interactiveClips(){return this.selection.interactiveClips}set interactiveClips(t){this.selection.interactiveClips=t}get playbackElements(){return this.transport.playbackElements}videoSprites=new Map;clipListeners=new Map;get isPlaying(){return this.transport.isPlaying}set isPlaying(t){this.transport.isPlaying=t}get currentTime(){return this.transport.currentTime}set currentTime(t){this.transport.currentTime=t}get maxDuration(){return this.transport.maxDuration}set maxDuration(t){this.transport.maxDuration=t}opts;destroyed=!1;renderingSuspended=!1;frameToken=0;historyPaused=!1;processingHistory=!1;isRestoring=!1;historyGroupDepth=0;clipCache=new Map;_isUpdatingLayout=!1;bridge=null;_zoomLevel=1;_panOffset={x:0,y:0};_baseScale=1;_allowZoom=!1;_allowPan=!1;_isPanning=!1;_isSpaceDown=!1;_lastPointerPos={x:0,y:0};_boundOnWheel=null;_boundOnPointerDown=null;_boundOnPointerMove=null;_boundOnPointerUp=null;_boundOnKeyDown=null;_boundOnKeyUp=null;globalEffects=new Map;activeGlobalEffects=[];currentGlobalEffectSprite=null;effectFilters=new Map;transitionRenderers=new Map;transitionSprites=new Map;transFromTexture=null;transToTexture=null;transBgGraphics=null;clipsNormalContainer=null;clipsEffectContainer=null;videoTextureCache=new WeakMap;lastFromFrame=null;lastToFrame=null;hexToNumber(t){const e=t.startsWith("#")?t.slice(1):t;return parseInt(e,16)}ready;constructor(t){super(),this.opts={fps:30,backgroundColor:"#000000",artboardColor:"#000000",interactivity:!0,spacing:0,allowZoom:!1,allowPan:!1,previewScale:1,...t},this._allowZoom=!!this.opts.allowZoom,this._allowPan=!!this.opts.allowPan,this.selection=new oa(this),this.transport=new na(this),this.timeline=new aa(this),this.history=new la,this.resourceManager=new gt,this.ready=this.initPixiApp().then(()=>{this.history.init(this.exportToJSON()),this._initViewportEvents()}),this.on("clip:added",e=>this.handleTimelineChange(e)),this.on("clips:added",e=>this.handleTimelineChange(e)),this.on("clip:replaced",e=>this.handleTimelineChange({clip:e.newClip})),this.on("studio:restored",e=>{e.clips.forEach(i=>this.attachClipEvents(i)),this.handleTimelineChange()}),this.on("clip:removed",this.handleClipRemoved),this.on("clips:removed",this.handleClipsRemoved),this.on("clip:updated",this.handleTimelineChange),this.on("track:removed",()=>this.handleTimelineChange()),this.on("track:added",()=>this.handleTimelineChange()),this.opts.core&&(this.bridge=new sa(this.opts.core,this))}attachClipEvents(t){if(this.clipListeners.has(t))return;const e=()=>{this.updateFrame(this.currentTime)};t.on("request-render",e),this.clipListeners.set(t,e)}handleTimelineChange=t=>{t?.clip&&this.attachClipEvents(t.clip),t?.clips&&t.clips.forEach(e=>this.attachClipEvents(e)),this.updateFrame(this.currentTime),this.saveHistory()};saveHistory(){this.historyPaused||this.processingHistory||(this.history.push(this.exportToJSON()),this.emit("history:changed",{canUndo:this.history.canUndo(),canRedo:this.history.canRedo()}))}beginHistoryGroup(){this.processingHistory||this.isRestoring||(this.historyGroupDepth++,this.historyPaused=!0)}endHistoryGroup(){this.processingHistory||this.isRestoring||(this.historyGroupDepth=Math.max(0,this.historyGroupDepth-1),this.historyGroupDepth===0&&(this.historyPaused=!1,this.saveHistory()))}setPath(t,e,i){let s=t;for(let r=0;r<e.length-1;r++){const o=e[r];s[o]||(s[o]=typeof e[r+1]=="number"?[]:{}),s=s[o]}s[e[e.length-1]]=i}async applyHistoryPatches(t,e,i){const s=new Map,r=new Map,o=new Set;for(const a of t){const{type:n,path:c}=a,h=a.value,d=a.oldValue;if(c[0]==="clips"){const u=c[1];i?n==="CREATE"?o.add(u):n==="REMOVE"?r.set(u,d):n==="CHANGE"&&(s.has(u)||s.set(u,{}),this.setPath(s.get(u),c.slice(2),d)):n==="CREATE"?r.set(u,h):n==="REMOVE"?o.add(u):n==="CHANGE"&&(s.has(u)||s.set(u,{}),this.setPath(s.get(u),c.slice(2),h))}else c[0]==="settings"&&(i?this.setPath(this.opts,c.slice(1),d):this.setPath(this.opts,c.slice(1),h))}for(const a of o){const n=this.timeline.getClipById(a);n&&await this.removeClip(n)}for(const[a,n]of r){let c=this.clipCache.get(a);c||(c=await vt(n),this.clipCache.set(a,c),this.attachClipEvents(c));let h;for(const d of e.tracks)if(d.clipIds.includes(a)){h=d.id;break}await this.addClip(c,{trackId:h})}for(const[a,n]of s)await this.updateClip(a,n);this.timeline.setTracks(e.tracks),this.emit("studio:restored",{clips:this.clips,tracks:this.tracks,settings:this.opts})}async undo(){if(!(!this.history.canUndo()||this.processingHistory)){this.processingHistory=!0,this.isRestoring=!0,this.historyPaused=!0;try{const t=this.history.undo(this.exportToJSON());t&&await this.applyHistoryPatches(t.patches,t.state,!0),this.emit("history:changed",{canUndo:this.history.canUndo(),canRedo:this.history.canRedo()})}finally{this.historyPaused=!1,this.isRestoring=!1,this.processingHistory=!1}}}async redo(){if(!(!this.history.canRedo()||this.processingHistory)){this.processingHistory=!0,this.isRestoring=!0,this.historyPaused=!0;try{const t=this.history.redo(this.exportToJSON());t&&await this.applyHistoryPatches(t.patches,t.state,!1),this.emit("history:changed",{canUndo:this.history.canUndo(),canRedo:this.history.canRedo()})}finally{this.historyPaused=!1,this.isRestoring=!1,this.processingHistory=!1}}}cleanupClipVisuals=t=>{for(const[r,o]of this.spriteRenderers)if(r.id===t){const a=o.getRoot();a&&a.parent&&a.parent.removeChild(a),o.destroy(),this.spriteRenderers.delete(r);break}const e=this.transitionSprites.get(t);e&&(e.parent&&e.parent.removeChild(e),e.destroy(),this.transitionSprites.delete(t)),this.transitionRenderers.get(t)&&this.transitionRenderers.delete(t);for(const[r,o]of this.videoSprites)if(r.id===t){o.parent&&o.parent.removeChild(o),o.destroy(),this.videoSprites.delete(r);break}const s=this.timeline.getClipById(t);if(s){const r=this.clipListeners.get(s);r&&(s.off("request-render",r),this.clipListeners.delete(s))}};handleClipRemoved=({clipId:t})=>{this.cleanupClipVisuals(t),this.updateFrame(this.currentTime),this.saveHistory()};handleClipsRemoved=({clipIds:t})=>{for(const e of t)this.cleanupClipVisuals(e);this.updateFrame(this.currentTime),this.saveHistory()};async initPixiApp(){if(this.destroyed)return;const t=this.opts.canvas||document.createElement("canvas");t.width=this.opts.width,t.height=this.opts.height;const e=new m.Application,i=t.parentElement||window;await e.init({canvas:t,resizeTo:i,backgroundColor:this.hexToNumber(this.opts.backgroundColor),antialias:!0,resolution:(window.devicePixelRatio||1)*this.opts.previewScale,autoDensity:!0,autoStart:!1}),this.pixiApp=e,e.renderer.background.color=this.hexToNumber(this.opts.backgroundColor),e.render(),e.stage.eventMode="static",e.stage.hitArea=e.screen,this.artboard=new m.Container,this.artboard.label="ArtboardRoot",e.stage.addChild(this.artboard),this.selection.init(e,this.artboard),this.artboardBg=new m.Graphics,this.artboardBg.rect(0,0,this.opts.width,this.opts.height).fill({color:this.hexToNumber(this.opts.artboardColor)}),this.artboard.addChild(this.artboardBg),this.clipContainer=new m.Container,this.clipContainer.label="ClipContainer",this.artboard.addChild(this.clipContainer),this.artboardMask=new m.Graphics,this.artboardMask.rect(0,0,this.opts.width,this.opts.height).fill({color:16777215}),this.clipContainer.addChild(this.artboardMask),this.clipContainer.mask=this.artboardMask,this.clipsEffectContainer=new m.Container,this.clipsEffectContainer.label="ClipsEffect",this.clipsEffectContainer.visible=!1,this.clipsEffectContainer.zIndex=1,this.clipsEffectContainer.sortableChildren=!0,this.clipContainer.addChild(this.clipsEffectContainer),this.clipsNormalContainer=new m.Container,this.clipsNormalContainer.label="ClipsNormal",this.clipsNormalContainer.zIndex=10,this.clipsNormalContainer.sortableChildren=!0,this.clipContainer.addChild(this.clipsNormalContainer),this.recreateTransitionTextures(),this.transBgGraphics=new m.Graphics,this.transBgGraphics.rect(0,0,this.opts.width,this.opts.height).fill({color:0,alpha:0}),this.clipContainer.sortableChildren=!0,this.updateArtboardLayout(),e.renderer.on("resize",()=>{this.handleResize()})}getOptions(){return this.opts}setSize(t,e){this.updateDimensions(t,e)}setPreviewScale(t){this.opts.previewScale=Math.max(.1,Math.min(1,t)),this.pixiApp&&(this.pixiApp.renderer.resolution=(window.devicePixelRatio||1)*this.opts.previewScale,this.pixiApp.resize()),this.recreateTransitionTextures(),this.updateArtboardLayout(),this.updateFrame(this.currentTime)}recreateTransitionTextures(){this.transFromTexture&&(this.transFromTexture.destroy(!0),this.transFromTexture=null),this.transToTexture&&(this.transToTexture.destroy(!0),this.transToTexture=null),this.transFromTexture=m.RenderTexture.create({width:this.opts.width,height:this.opts.height,resolution:this.opts.previewScale}),this.transToTexture=m.RenderTexture.create({width:this.opts.width,height:this.opts.height,resolution:this.opts.previewScale})}setBackgroundColor(t){this.opts.backgroundColor=t;const e=this.hexToNumber(t);this.pixiApp&&(this.pixiApp.renderer.background.color=e,this.pixiApp.render()),this.updateFrame(this.currentTime)}setArtboardColor(t){this.opts.artboardColor=t;const e=this.hexToNumber(t);this.artboardBg&&this.artboardBg.clear().rect(0,0,this.opts.width,this.opts.height).fill({color:e}),this.pixiApp&&this.pixiApp.render(),this.updateFrame(this.currentTime)}updateDimensions(t,e){this.opts.width=t,this.opts.height=e,this.artboardBg&&this.artboardBg.clear().rect(0,0,t,e).fill({color:this.hexToNumber(this.opts.artboardColor)}),this.artboardMask&&this.artboardMask.clear().rect(0,0,t,e).fill({color:16777215}),this.recreateTransitionTextures(),this.transBgGraphics&&this.transBgGraphics.clear().rect(0,0,t,e).fill({color:0,alpha:0}),this.updateArtboardLayout(),this.updateFrame(this.currentTime)}handleResize=()=>{this.destroyed||!this.pixiApp||this._isUpdatingLayout||this.updateArtboardLayout()};updateArtboardLayout(t={}){if(!(!this.pixiApp||!this.artboard||this._isUpdatingLayout)){this._isUpdatingLayout=!0;try{t.skipResize||this.pixiApp.resize();const i=this.pixiApp.canvas.parentElement,s=i?i.getBoundingClientRect().width:this.pixiApp.screen.width,r=i?i.getBoundingClientRect().height:this.pixiApp.screen.height,o=this.opts.width,a=this.opts.height,n=this.opts.spacing||0,c=Math.max(0,s-n*2),h=Math.max(0,r-n*2),d=c/o,u=h/a,f=Math.min(d,u);this._baseScale=f;const p=f*this._zoomLevel;this.artboard.scale.set(p),this.artboard.x=(s-o*p)/2+this._panOffset.x,this.artboard.y=(r-a*p)/2+this._panOffset.y,this.pixiApp.render(),this.emit("viewport:changed",{zoomLevel:this._zoomLevel,panOffset:{...this._panOffset}})}finally{this._isUpdatingLayout=!1}}}get zoomLevel(){return this._zoomLevel}get baseScale(){return this._baseScale}setZoom(t,e,i){if(!this.pixiApp||!this.artboard)return;const s=this._zoomLevel,r=Math.min(10,Math.max(.1,t));if(s!==r){if(e!==void 0&&i!==void 0){const a=this.pixiApp.canvas.parentElement,n=a?a.getBoundingClientRect().width:this.pixiApp.screen.width,c=a?a.getBoundingClientRect().height:this.pixiApp.screen.height,h=this._baseScale,d=h*s,u=h*r,f=this.opts.width,p=this.opts.height,g=(n-f*d)/2+this._panOffset.x,v=(c-p*d)/2+this._panOffset.y,x=e-g,w=i-v,T=u/d,y=e-x*T,S=i-w*T;this._panOffset.x=y-(n-f*u)/2,this._panOffset.y=S-(c-p*u)/2}this._zoomLevel=r,this.updateArtboardLayout({skipResize:!0})}}pan(t,e){this._panOffset.x+=t,this._panOffset.y+=e,this.updateArtboardLayout({skipResize:!0})}resetView(){this._zoomLevel=1,this._panOffset={x:0,y:0},this.updateArtboardLayout()}setAllowZoom(t){this._allowZoom=t}setAllowPan(t){this._allowPan=t}_initViewportEvents(){if(!this.pixiApp)return;const t=this.pixiApp.canvas;this._boundOnWheel=e=>{if(!this._allowZoom&&!this._allowPan)return;e.preventDefault();const i=Math.abs(e.deltaY)>0&&Math.abs(e.deltaY)<100&&Math.floor(e.deltaY)!==Math.ceil(e.deltaY);if(e.ctrlKey||e.metaKey){if(!this._allowZoom)return;const s=t.getBoundingClientRect(),r=e.clientX-s.left,o=e.clientY-s.top,n=Math.pow(i?.992:.996,e.deltaY),c=this._zoomLevel*n;this.setZoom(c,r,o)}else{if(!this._allowPan)return;let s=e.deltaX,r=e.deltaY;e.deltaMode===1?(s*=25,r*=25):e.deltaMode===2&&(s*=400,r*=400),this.pan(-s,-r)}},this._boundOnPointerDown=e=>{this._allowPan&&(e.button===1||e.button===0&&this._isSpaceDown)&&(this._isPanning=!0,this._lastPointerPos={x:e.clientX,y:e.clientY},t.setPointerCapture(e.pointerId),t.style.cursor="grabbing",e.preventDefault())},this._boundOnPointerMove=e=>{if(!this._isPanning)return;const i=e.clientX-this._lastPointerPos.x,s=e.clientY-this._lastPointerPos.y;this._lastPointerPos={x:e.clientX,y:e.clientY},this.pan(i,s)},this._boundOnPointerUp=e=>{this._isPanning&&(this._isPanning=!1,t.style.cursor=this._isSpaceDown?"grab":"")},this._boundOnKeyDown=e=>{if(this._allowPan&&e.code==="Space"&&!e.repeat){const i=document.activeElement?.tagName;if(i==="INPUT"||i==="TEXTAREA")return;this._isSpaceDown=!0,t.style.cursor="grab",e.preventDefault()}},this._boundOnKeyUp=e=>{e.code==="Space"&&(this._isSpaceDown=!1,this._isPanning||(t.style.cursor=""))},t.addEventListener("wheel",this._boundOnWheel,{passive:!1}),t.addEventListener("pointerdown",this._boundOnPointerDown),window.addEventListener("pointermove",this._boundOnPointerMove),window.addEventListener("pointerup",this._boundOnPointerUp),window.addEventListener("pointercancel",this._boundOnPointerUp),window.addEventListener("keydown",this._boundOnKeyDown),window.addEventListener("keyup",this._boundOnKeyUp)}_destroyViewportEvents(){const t=this.pixiApp?.canvas;t&&this._boundOnWheel&&t.removeEventListener("wheel",this._boundOnWheel),t&&this._boundOnPointerDown&&t.removeEventListener("pointerdown",this._boundOnPointerDown),this._boundOnPointerMove&&window.removeEventListener("pointermove",this._boundOnPointerMove),this._boundOnPointerUp&&(window.removeEventListener("pointerup",this._boundOnPointerUp),window.removeEventListener("pointercancel",this._boundOnPointerUp)),this._boundOnKeyDown&&window.removeEventListener("keydown",this._boundOnKeyDown),this._boundOnKeyUp&&window.removeEventListener("keyup",this._boundOnKeyUp)}getCanvas(){if(this.opts.canvas)return this.opts.canvas;if(this.pixiApp?.canvas)return this.pixiApp.canvas;throw new Error("Canvas not initialized yet. Wait for initPixiApp to complete.")}async addTransition(t,e=2e6,i,s,r){return this.timeline.addTransition(t,e,i,s,r)}findTrackIdByClipId(t){return this.timeline.findTrackIdByClipId(t)}async addClip(t,e){const i=Array.isArray(t)?t:[t];i.forEach(s=>this.clipCache.set(s.id,s)),this.beginHistoryGroup();try{const s=await this.timeline.addClip(t,e);return i.forEach(r=>this.attachClipEvents(r)),s}finally{this.endHistoryGroup()}}addTrack(t,e){return this.timeline.addTrack(t,e)}async setTracks(t){if(this.isRestoring)return;const e=new Set(this.timeline.clips.map(i=>i.id));if(!(t.length===0&&e.size>0)&&!(t.length>0&&e.size>0&&!t.some(s=>s.clipIds.some(r=>e.has(r)))))return this.timeline.setTracks(t)}async moveTrack(t,e){return this.timeline.moveTrack(t,e)}async setTrackOrder(t){return this.timeline.setTrackOrder(t)}async removeTrack(t){return this.timeline.removeTrack(t)}getClipById(t){return this.timeline.getClipById(t)}async updateClip(t,e){return this.timeline.updateClip(t,e)}async centerClip(t){const e=typeof t=="string"?this.getClipById(t):t;if(!e)return;const i=(this.opts.width-e.width)/2,s=(this.opts.height-e.height)/2;if(this.getClipById(e.id))return this.updateClip(e.id,{left:i,top:s});e.left=i,e.top=s}async centerClipH(t){const e=typeof t=="string"?this.getClipById(t):t;if(!e)return;const i=(this.opts.width-e.width)/2;if(this.getClipById(e.id))return this.updateClip(e.id,{left:i});e.left=i}async centerClipV(t){const e=typeof t=="string"?this.getClipById(t):t;if(!e)return;const i=(this.opts.height-e.height)/2;if(this.getClipById(e.id))return this.updateClip(e.id,{top:i});e.top=i}async scaleToFit(t){const e=typeof t=="string"?this.getClipById(t):t;if(!e)return;const i=await e.ready,{width:s,height:r}=i;if(s===0||r===0)return;const o=Math.min(this.opts.width/s,this.opts.height/r),a=s*o,n=r*o;if(this.getClipById(e.id))return this.updateClip(e.id,{width:a,height:n});e.width=a,e.height=n}async scaleToCover(t){const e=typeof t=="string"?this.getClipById(t):t;if(!e)return;const i=await e.ready,{width:s,height:r}=i;if(s===0||r===0)return;const o=Math.max(this.opts.width/s,this.opts.height/r),a=s*o,n=r*o;if(this.getClipById(e.id))return this.updateClip(e.id,{width:a,height:n});e.width=a,e.height=n}async updateClips(t){this.suspendRendering(),await this.timeline.updateClips(t),this.resumeRendering(),this.updateFrame(this.currentTime)}suspendRendering(){this.renderingSuspended=!0}resumeRendering(){this.renderingSuspended=!1}getTracks(){return this.timeline.tracks}getClip(t){return this.timeline.getClipById(t)}findClip(t){return this.timeline.getClipById(t)}setupSpriteInteractivity(t){this.selection.setupSpriteInteractivity(t)}async removeClip(t){const e=typeof t=="string"?this.getClipById(t):t;if(!e){console.warn("[Studio] removeClip: Clip not found",t);return}this.beginHistoryGroup();try{return this.clipCache.set(e.id,e),this.timeline.removeClip(e,{permanent:!this.processingHistory})}finally{this.endHistoryGroup()}}async removeClips(t){this.beginHistoryGroup();try{return t.forEach(e=>this.clipCache.set(e.id,e)),this.timeline.removeClips(t,{permanent:!this.processingHistory})}finally{this.endHistoryGroup()}}async removeClipById(t){const e=this.timeline.getClipById(t);if(e)return this.removeClip(e)}async removeClipsById(t){const e=t.map(i=>this.timeline.getClipById(i)).filter(Boolean);return this.removeClips(e)}async deleteSelected(){const t=this.selection.selectedClips;if(t.size!==0){this.beginHistoryGroup();try{await this.removeClips(Array.from(t))}finally{this.endHistoryGroup()}}}async duplicateSelected(){this.beginHistoryGroup();try{return await this.timeline.duplicateSelected()}finally{this.endHistoryGroup()}}async splitSelected(t){this.beginHistoryGroup();try{return await this.timeline.splitSelected(t)}finally{this.endHistoryGroup()}}async trimSelected(t){return this.timeline.trimSelected(t)}async updateSelected(t){return this.timeline.updateSelected(t)}async clear(){await this.timeline.clear(),this.transFromTexture&&(this.transFromTexture.destroy(!0),this.transFromTexture=null),this.transToTexture&&(this.transToTexture.destroy(!0),this.transToTexture=null),this.transBgGraphics&&(this.transBgGraphics.destroy(!0),this.transBgGraphics=null),this.transitionRenderers.forEach(t=>t.destroy()),this.transitionRenderers.clear(),this.transitionSprites.forEach(t=>t.destroy()),this.transitionSprites.clear(),this.emit("reset")}async play(){return this.transport.play()}pause(){this.transport.pause()}async stop(){return this.transport.stop()}async seek(t){return this.transport.seek(t)}async frameNext(){return this.transport.frameNext()}async framePrev(){return this.transport.framePrev()}async renderFrame(t,e){if(await this.ready,!this.pixiApp||!this.artboard)throw new Error("Studio is not initialized yet. Wait for studio.ready before calling renderFrame().");const i=t*1e3;await this.updateFrame(i);const s=this.artboard.scale.clone(),r=this.artboard.x,o=this.artboard.y;this.artboard.scale.set(1),this.artboard.x=0,this.artboard.y=0;const a=e?.transparent??!1;a&&this.artboardBg&&(this.artboardBg.visible=!1);const n=m.RenderTexture.create({width:this.opts.width,height:this.opts.height}),c=this.pixiApp.renderer.background.alpha;a&&(this.pixiApp.renderer.background.alpha=0);let h;try{this.pixiApp.renderer.render({container:this.artboard,target:n,clear:!0}),h=await this.pixiApp.renderer.extract.base64(n,"image/png",1)}finally{n.destroy(),a&&(this.pixiApp.renderer.background.alpha=c),a&&this.artboardBg&&(this.artboardBg.visible=!0),this.artboard.scale.set(s.x,s.y),this.artboard.x=r,this.artboard.y=o,this.pixiApp.render()}return h}async snapshot(t,e){const i=typeof t=="number"?e:t,s=typeof t=="number"?t:void 0;return this.renderFrame(s??this.currentTime/1e3,i)}getCurrentTime(){return this.transport.currentTime}getMaxDuration(){return this.transport.maxDuration}getIsPlaying(){return this.transport.isPlaying}getSelectedClips(){return Array.from(this.selectedClips)}getVideoTexture(t){let e=this.videoTextureCache.get(t);return e||(e=m.Texture.from(t),this.videoTextureCache.set(t,e)),e}isPlaybackCapable(t){return"createPlaybackElement"in t&&"play"in t&&"pause"in t&&"seek"in t&&"syncPlayback"in t&&"cleanupPlayback"in t}async updateFrame(t){if(this.destroyed||this.pixiApp==null||this.renderingSuspended)return;const e=++this.frameToken;this.updateActiveGlobalEffect(t);const i=new Set,s=new Set,r=new Set,o=this.tracks.length;for(const n of this.clips){const c=this.getTrackIndex(n.id);if(c!==-1){const h=(o-c)*10;n.zIndex=h;const d=this.spriteRenderers.get(n);if(d){const f=d.getRoot();f&&(f.zIndex=h)}const u=this.videoSprites.get(n);u&&(u.zIndex=h)}}const a=[...this.clips].sort((n,c)=>n.zIndex-c.zIndex);for(const n of a){const c=n.type==="Video"||n.type==="Image";let h=n.transition?.start??0,d=n.transition?.end??0;if(n.transition&&(n.transition.fromClipId||n.transition.toClipId)){const T=n.transition.fromClipId?this.getClipById(n.transition.fromClipId):null,y=n.transition.toClipId?this.getClipById(n.transition.toClipId):null;if(y){const S=n.transition.duration??2e6;h=Math.max(0,y.display.from-S/2),d=h+S}else if(T){const S=n.transition.duration??2e6;h=Math.max(0,T.display.to-S/2),d=h+S}}const u=c&&n.transition&&t>=h&&t<d;if(!u&&t<n.display.from){const T=this.spriteRenderers.get(n);T!=null&&await T.updateFrame(null);const y=this.videoSprites.get(n);y!=null&&(y.visible=!1);const S=this.playbackElements.get(n);S!=null&&this.isPlaybackCapable(n)&&n.pause(S.element);continue}if(!u&&n.display.to>0&&t>n.display.to){const T=this.spriteRenderers.get(n);T!=null&&await T.updateFrame(null);const y=this.videoSprites.get(n);y!=null&&(y.visible=!1);const S=this.playbackElements.get(n);S!=null&&this.isPlaybackCapable(n)&&n.pause(S.element);continue}const f=t-n.display.from,p=f*n.playbackRate;n.animate(p);const g=await n.ready,v=n.duration||g.duration;if(!u&&v>0&&f>v){const T=this.spriteRenderers.get(n);T!=null&&await T.updateFrame(null);const y=this.videoSprites.get(n);y!=null&&(y.visible=!1);const S=this.playbackElements.get(n);S!=null&&this.isPlaybackCapable(n)&&n.pause(S.element);continue}const x=this.playbackElements.get(n);if(x!=null&&this.isPlaybackCapable(n)){const T=f/1e6;if(n.syncPlayback(x.element,this.isPlaying,T),n.type==="Video"&&this.isPlaybackCapable(n)){const y=this.videoSprites.get(n);if(y!=null){const S=(n.duration||n.meta.duration)/1e6;if(this.spriteRenderers.has(n))y.visible=!1;else if(y.visible=!u&&!r.has(n.id)&&T>=0&&T<S,y.visible&&Lo(n,y),!u)continue}}else continue}if(u){const T=n?.transition?.fromClipId,y=n?.transition?.toClipId,S=`${T}_${y}`;if(s.has(S)){const A=this.spriteRenderers.get(n);A?.getRoot()&&(A.getRoot().visible=!1);const C=this.videoSprites.get(n);C&&(C.visible=!1);continue}s.add(S),(!this.transFromTexture||!this.transToTexture)&&this.recreateTransitionTextures(),this.transBgGraphics||(this.transBgGraphics=new m.Graphics,this.transBgGraphics.rect(0,0,this.opts.width,this.opts.height).fill({color:0,alpha:0}));const F=T?this.getClipById(T):null,O=y?this.getClipById(y):null;let k=null,b=null;if(F){const A=Math.max(0,t-F.display.from),{video:C}=await F.getFrame(A);C instanceof HTMLVideoElement?k=this.getVideoTexture(C):k=C,k&&(this.lastFromFrame=k)}if(O){const A=Math.max(0,t-O.display.from),{video:C}=await O.getFrame(A);C instanceof HTMLVideoElement?b=this.getVideoTexture(C):b=C,b&&(this.lastToFrame=b)}if(k||(k=this.lastFromFrame),b||(b=this.lastToFrame),!k||!b)continue;if(k&&b&&this.pixiApp&&this.transFromTexture&&this.transToTexture){const A=(t-h)/n?.transition?.duration;F&&k&&this.renderClipToTransitionTexture(F,k,this.transFromTexture),O&&b&&this.renderClipToTransitionTexture(O,b,this.transToTexture);let C=this.transitionRenderers.get(S);if(!C)try{C=fe({name:n?.transition?.name,renderer:this.pixiApp.renderer}),this.transitionRenderers.set(S,C)}catch(R){console.error("[Studio] Failed to create transition renderer:",R)}if(C){const R=C.render({width:this.opts.width,height:this.opts.height,from:this.transFromTexture,to:this.transToTexture,progress:A});let D=this.transitionSprites.get(n.id);D||(D=new m.Sprite,D.label=`TransitionSprite_${n.id}`,this.transitionSprites.set(n.id,D),this.clipsNormalContainer&&this.clipsNormalContainer.addChild(D)),D.texture=R,D.visible=!0,D.x=0,D.y=0,D.width=this.opts.width,D.height=this.opts.height,D.anchor.set(0,0),D.zIndex=n.zIndex,i.add(n.id);const E=this.spriteRenderers.get(n);E?.getRoot()&&(E.getRoot().visible=!1);const N=this.videoSprites.get(n);if(N&&(N.visible=!1),F){const Y=this.spriteRenderers.get(F);Y?.getRoot()&&(Y.getRoot().visible=!1);const I=this.videoSprites.get(F);I&&(I.visible=!1),r.add(F.id)}if(O){const Y=this.spriteRenderers.get(O);Y?.getRoot()&&(Y.getRoot().visible=!1);const I=this.videoSprites.get(O);I&&(I.visible=!1),r.add(O.id)}continue}}}const w=this.spriteRenderers.get(n);if(w!=null){if(r.has(n.id)){const S=w.getRoot();S&&(S.visible=!1);const F=this.videoSprites.get(n);F&&(F.visible=!1);continue}const T=this.selectedClips.has(n);if(n.type!=="Text"&&n.type!=="Caption"&&typeof n.getTexture=="function"&&n.getTexture()!=null){const S=n.getTexture();if(S!=null){await w.updateFrame(S),T||w.updateTransforms(),this.opts.interactivity&&this.selection.setupSpriteInteractivity(n);continue}}if(n.type==="Text"){const S=n;this.pixiApp?.renderer&&typeof S.setRenderer=="function"&&S.setRenderer(this.pixiApp.renderer);const F=await S.getTexture();if(F!=null){await w.updateFrame(F),T||w.updateTransforms(),this.opts.interactivity&&this.selection.setupSpriteInteractivity(n);continue}}if(n.type==="Caption"){n.updateState(f);const S=n;this.pixiApp?.renderer&&typeof S.setRenderer=="function"&&S.setRenderer(this.pixiApp.renderer);const F=await S.getTexture();if(F!=null){await w.updateFrame(F),T||w.updateTransforms(),this.opts.interactivity&&this.selection.setupSpriteInteractivity(n);continue}}if(n.type==="Shape"){const S=n;this.pixiApp?.renderer&&typeof S.setRenderer=="function"&&S.setRenderer(this.pixiApp.renderer)}const{video:y}=await n.getFrame(f);if(e!==this.frameToken)return;await w.updateFrame(y),T||w.updateTransforms(),this.opts.interactivity&&this.selection.setupSpriteInteractivity(n)}}if(this.activeGlobalEffects.length>0&&this.clipsNormalContainer&&this.clipsEffectContainer){for(const n of this.clips)this.moveClipToEffectContainer(n,!1);this.clipsNormalContainer.visible=!0,await this.applyGlobalEffects(t)}else if(this.clipsNormalContainer){for(const n of this.clips)this.moveClipToEffectContainer(n,!1);this.clipsNormalContainer.visible=!0,this.currentGlobalEffectSprite&&(this.currentGlobalEffectSprite.parent&&this.currentGlobalEffectSprite.parent.removeChild(this.currentGlobalEffectSprite),this.currentGlobalEffectSprite.destroy(),this.currentGlobalEffectSprite=null)}for(const[n,c]of this.transitionSprites.entries())i.has(n)||(c.visible=!1);this.pixiApp!=null&&this.pixiApp.render()}moveClipToEffectContainer(t,e=!0){if(!this.clipsNormalContainer||!this.clipsEffectContainer)return;const i=e?this.clipsEffectContainer:this.clipsNormalContainer,s=this.spriteRenderers.get(t);if(s){const a=s.getRoot();if(a&&a.parent!==i){try{a.parent&&a.parent.removeChild&&a.parent.removeChild(a)}catch(n){console.warn("moveClipToEffectContainer: could not remove root from parent",n)}i.addChild(a)}}const r=this.transitionSprites.get(t.id);if(r&&r.parent!==i){try{r.parent&&r.parent.removeChild&&r.parent.removeChild(r)}catch(a){console.warn("moveClipToEffectContainer: could not remove transSprite from parent",a)}i.addChild(r)}const o=this.videoSprites.get(t);if(o&&o.parent!==i){try{o.parent&&o.parent.removeChild&&o.parent.removeChild(o)}catch(a){console.warn("moveClipToEffectContainer: could not remove videoSprite from parent",a)}i.addChild(o)}}applyGlobalEffect(t,e,i){const s=e.id||`${t}_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,r={id:s,key:t,startTime:e.startTime,duration:e.duration??1e6};for(const o of i)o instanceof Pt&&o.addEffect(r),o instanceof nt&&o.addEffect(r),o instanceof at&&o.addEffect(r),o instanceof pt&&o.addEffect(r);return this.globalEffects.set(s,r),s}getTrackIndex(t){return this.tracks.findIndex(e=>e.clipIds.includes(t))}async getTransitionFromFrame(t,e){let i=null;if(t.transition?.prevClipId&&(i=this.clips.find(a=>a.id===t.transition.prevClipId)||null),i||(i=this.getPreviousClipOnTrack(t)),!i)return null;const s=i.duration>0?i.duration:0,r=Math.max(0,Math.min(e-i.display.from,s)),{video:o}=await i.getFrame(r);return o}getPreviousClipOnTrack(t){const e=this.getTrackIndex(t.id);return e===-1?null:this.clips.filter(i=>i.id!==t.id&&this.getTrackIndex(i.id)===e&&i.display.from<t.display.from&&(i instanceof nt||i instanceof Pt)).sort((i,s)=>s.display.to-i.display.to)[0]||null}renderClipToTransitionTexture(t,e,i){if(!this.pixiApp)return;const s=t.style||{},{renderTransform:r}=t,o=(r?.mirror??0)>.5,a=e instanceof m.Texture?e:m.Texture.from(e),n=r?.x??0,c=r?.y??0,h=r?.angle??0,d=r?.scale??1,u=r?.opacity??1,f=r?.blur??0,p=r?.brightness??1,g=a.width||1,v=a.height||1,x=t.type==="Caption",w=!x&&t.width&&t.width!==0?Math.abs(t.width)/g:1,T=!x&&t.height&&t.height!==0?Math.abs(t.height)/v:1,y=new m.Container;y.x=t.center.x+n,y.y=t.center.y+c,y.rotation=(t.flip?.x||t.flip?.y?-1:1)*((t.angle+h)*Math.PI)/180,y.alpha=t.opacity*u;const S=new m.Sprite(a);S.anchor.set(.5,.5);let F=[];if(o){const P=w*d,z=T*d,U=g*P,Z=v*z;S.position.set(0,0),S.scale.set(P,z);const B=[[U,0,-P,z],[-U,0,-P,z],[0,Z,P,-z],[0,-Z,P,-z],[U,Z,-P,-z],[-U,Z,-P,-z],[U,-Z,-P,-z],[-U,-Z,-P,-z]];for(const[W,K,G,H]of B){const V=new m.Sprite(a);V.anchor.set(.5,.5),V.position.set(W,K),V.scale.set(G,H),F.push(V)}if(t.flip?.x){S.scale.x=-P;for(let W=0;W<8;W++)F[W].scale.x=-B[W][2]}if(t.flip?.y){S.scale.y=-z;for(let W=0;W<8;W++)F[W].scale.y=-B[W][3]}y.addChild(S);for(const W of F)y.addChild(W)}else S.scale.x=t.flip?.x?-w*d:w*d,S.scale.y=t.flip?.y?-T*d:T*d,y.addChild(S);const O=[];if(f>0){const P=new m.BlurFilter;P.strength=f,P.quality=4,P.repeatEdgePixels=!0,O.push(P)}const k=ce(t.colorAdjustment);if(p!==1||k){const P=new m.ColorMatrixFilter;he(P,t.colorAdjustment,p),O.push(P)}const b=Jt(t.colorAdjustment);for(let P=0;P<b.length;P++){const z=b[P],U=new m.UniformGroup({uTargetColor:{value:[1,1,0],type:"vec3<f32>"},uHueShift:{value:z.hue,type:"f32"},uSatShift:{value:z.saturation/100,type:"f32"},uLightShift:{value:z.lightness/100,type:"f32"},uTolerance:{value:.22,type:"f32"},uSoftness:{value:.12,type:"f32"}}),Z=Et(z.targetColor);Z&&(U.uniforms.uTargetColor[0]=Z.r/255,U.uniforms.uTargetColor[1]=Z.g/255,U.uniforms.uTargetColor[2]=Z.b/255);const B=new m.Filter({glProgram:new m.GlProgram({vertex:kt,fragment:le,name:`SelectiveHslShader_${P}`}),resources:{hslUniforms:U}});O.push(B)}y.filters=O;const A=Math.abs(t.width??0)*d,C=Math.abs(t.height??0)*d,R=s.borderRadius||0;let D=null;R>0&&(D=new m.Graphics,D.roundRect(-A/2,-C/2,A,C,Math.min(R,A/2,C/2)),D.fill({color:16777215,alpha:1}),y.addChild(D),S.mask=null,S.mask=D);const E=s.stroke;let N=null;if(E&&E.width>0){N=new m.Graphics;const P=$(E.color)??16777215;let z=1;if(E.alignment!==void 0&&(typeof E.alignment=="number"?z=E.alignment:E.alignment==="center"||E.alignment==="middle"?z=.5:E.alignment==="inside"?z=0:E.alignment==="outside"&&(z=1)),N.setStrokeStyle({width:E.width,color:P,alignment:z}),R>0){const U=Math.min(R,A/2,C/2);N.roundRect(-A/2,-C/2,A,C,U)}else N.rect(-A/2,-C/2,A,C);N.stroke(),y.addChild(N)}const Y=s.shadow;let I=null;if(Y&&(Y.blur>0||(Y.offsetX??0)!==0||(Y.offsetY??0)!==0)){I=new m.Graphics;const P=$(Y.color)??0,z=Y.alpha??.5,U=Y.offsetX??0,Z=Y.offsetY??0;if(R>0){const B=Math.min(R,A/2,C/2);I.roundRect(-A/2+U,-C/2+Z,A,C,B)}else I.rect(-A/2+U,-C/2+Z,A,C);I.fill({color:P,alpha:z}),y.addChildAt(I,0)}this.pixiApp.renderer.render({container:y,target:i,clear:!0}),e instanceof m.Texture||S.texture.destroy(!0),D&&D.destroy(),N&&N.destroy(),I&&I.destroy();for(const P of F)P.destroy();S.destroy(),y.destroy()}removeGlobalEffect(t){this.globalEffects.delete(t)}clearGlobalEffects(){this.globalEffects.clear()}updateActiveGlobalEffect(t){const e=[];for(const i of this.clips)if(i instanceof lt){const s=i.duration>0?i.duration:i.display.to-i.display.from;t>=i.display.from&&(i.display.to===0||t<i.display.to)&&t<i.display.from+s&&e.push({id:i.id,key:i.effectKey,startTime:i.display.from,duration:s,trackIndex:this.getTrackIndex(i.id),values:i.values})}for(const i of this.globalEffects.values()){const s=i.startTime+i.duration;t>=i.startTime&&t<s&&e.push({id:i.id,key:i.key,startTime:i.startTime,duration:i.duration,trackIndex:-1})}this.activeGlobalEffects=e.sort((i,s)=>(s.trackIndex??-1)-(i.trackIndex??-1))}async applyGlobalEffects(t){if(this.currentGlobalEffectSprite&&(this.currentGlobalEffectSprite.parent&&this.currentGlobalEffectSprite.parent.removeChild(this.currentGlobalEffectSprite),this.currentGlobalEffectSprite.destroy(),this.currentGlobalEffectSprite=null),this.activeGlobalEffects.length===0||!this.pixiApp||!this.clipContainer||!this.clipsNormalContainer||!this.clipsEffectContainer)return;const e=this.opts.width,i=this.opts.height;let s=null,r=new Set;const o=[];for(const n of this.activeGlobalEffects){const{key:c,startTime:h,duration:d,trackIndex:u,values:f}=n,p=t-h,g=Math.min(Math.max(p/d,0),1);if(g<0||g>=1)continue;if(this.clipsEffectContainer.visible=!0,this.clipsEffectContainer.removeChildren(),s){const y=new m.Sprite(s);y.label="PrevEffectResult",y.width=e,y.height=i,this.clipsEffectContainer.addChild(y)}const v=u??-1;for(const y of this.clips){if(r.has(y.id))continue;const S=this.getTrackIndex(y.id);!(y instanceof lt)&&(v===-1||S>v)&&(this.moveClipToEffectContainer(y,!0),r.add(y.id))}let x=this.effectFilters.get(c);if(!x)try{if(x=await me({name:c,renderer:this.pixiApp.renderer,values:f}),x)this.effectFilters.set(c,x);else continue}catch(y){console.error(y);continue}const w=m.RenderTexture.create({width:e,height:i,resolution:this.opts.previewScale});o.push(w),this.pixiApp.renderer.render({container:this.clipsEffectContainer,target:w,clear:!0});const T=x.render({canvasTexture:w,progress:g,width:e,height:i,values:f});this.clipsEffectContainer.visible=!1,s=T}const a=s;if(a&&!o.includes(a)&&!a.destroyed&&a._source){const n=new m.Sprite(a);n.x=0,n.y=0,n.width=e,n.height=i,n.scale.set(1),n.zIndex=5,this.clipContainer.addChild(n),this.currentGlobalEffectSprite=n}for(const n of o)n!==a&&!n.destroyed&&n.destroy(!0)}destroy(){if(!this.destroyed){this._destroyViewportEvents(),window.removeEventListener("resize",this.handleResize),this.bridge&&(this.bridge.dispose(),this.bridge=null),this.destroyed=!0,this.stop(),this.clear(),this.transitionRenderers.clear(),this.transFromTexture&&(this.transFromTexture.destroy(!0),this.transFromTexture=null),this.transToTexture&&(this.transToTexture.destroy(!0),this.transToTexture=null),this.transBgGraphics&&(this.transBgGraphics.destroy(!0),this.transBgGraphics=null);for(const t of this.transitionSprites.values())t.destroy();this.transitionSprites.clear(),this.pixiApp&&(this.pixiApp.destroy(!0,{children:!0,texture:!0}),this.pixiApp=null)}}selectClip(t,e=!1){this.selection.selectClip(t,e)}setSelection(t){this.selection.setSelection(t)}selectClipsByIds(t){this.selection.selectClipsByIds(t)}deselectClip(){this.selection.deselectClip()}async lockClip(t,e){const i=this.timeline.getClipById(t);i&&(await this.timeline.updateClip(t,{locked:e}),this.emit("clip:lock-changed",{clip:i,locked:e}),this.selection.selectedClips.has(i)&&this.selection.recreateTransformer(),await this.updateFrame(this.currentTime))}exportToJSON(){return this.timeline.exportToJSON()}async loadFromJSON(t){return this.timeline.loadFromJSON(t)}}M.ANIMATABLE_PROPERTIES=qi,M.AngleWipeAnimation=Le,M.AssetManager=Vt,M.Audio=dt,M.Backdrop=Nt,M.BlockRevealAnimation=Ie,M.Caption=pt,M.CenterExpandAnimation=ze,M.CircleRevealAnimation=Be,M.ClipRegistry=st,M.Compositor=ia,M.DEFAULT_AUDIO_CONF=L,M.Effect=lt,M.FontManager=ut,M.GL_EFFECT_OPTIONS=jn,M.GL_TRANSITION_OPTIONS=Gn,M.GsapAnimation=Ee,M.Image=Pt,M.KeyframeAnimation=Fe,M.Log=Q,M.MP4Clip=nt,M.MediaCache=Ue,M.PixiEngine=fi,M.Placeholder=It,M.RectExpandAnimation=Ne,M.ResourceManager=gt,M.ResourceStatus=Ye,M.ShapeClip=Bt,M.StarRevealAnimation=He,M.Studio=fi,M.Text=at,M.Transition=it,M.VALUES_FILTER_SPECIAL=pe,M.VALUES_FILTER_SPECIAL_LIMITS=Zn,M.Video=nt,M.WipeAnimation=De,M.animationRegistry=Wt,M.clipToJSON=zt,M.createChromakey=Wi,M.createSlowMo=ke,M.easings=Ut,M.fastConcatMP4=ti,M.fixFMP4Duration=Bs,M.fontManager=Qt,M.getAllEffects=ue,M.getAllTransitions=Ft,M.getAnimatedKeys=Me,M.getEasing=Tt,M.getEffectOptions=li,M.getPixiProperty=Oe,M.getTransitionOptions=ai,M.hasPixiProp=Re,M.jsonToClip=vt,M.makeEffect=me,M.makeTransition=fe,M.mediaCache=Yt,M.mixinMP4AndAudio=Hs,M.pixiProps=ee,M.prepareVars=ft,M.registerCustomEffect=Vn,M.registerCustomTransition=Ln,M.renderTxt2ImgBitmap=Ki,M.resolveValue=ht,M.resolveVars=St,M.unregisterCustomEffect=Yn,M.unregisterCustomTransition=Hn,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
3335
+ //# sourceMappingURL=index.umd.cjs.map