var Zt={},qe=function(t,e,i,n,r){var o=new Worker(Zt[e]||(Zt[e]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(a){var s=a.data,l=s.$e$;if(l){var h=new Error(l[0]);h.code=l[1],h.stack=l[2],r(h,null);}else r(null,s);},o.postMessage(i,n),o},x=Uint8Array,Y=Uint16Array,ae=Int32Array,zt=new x([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ft=new x([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),se=new x([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),le=function(t,e){for(var i=new Y(31),n=0;n<31;++n)i[n]=e+=1<<t[n-1];for(var r=new ae(i[30]),n=1;n<30;++n)for(var o=i[n];o<i[n+1];++o)r[o]=o-i[n]<<5|n;return {b:i,r}},ue=le(zt,2),Dt=ue.b,Be=ue.r;Dt[28]=258,Be[258]=28;var Je=le(Ft,0),he=Je.b,yt=new Y(32768);for(b=0;b<32768;++b)Q=(b&43690)>>1|(b&21845)<<1,Q=(Q&52428)>>2|(Q&13107)<<2,Q=(Q&61680)>>4|(Q&3855)<<4,yt[b]=((Q&65280)>>8|(Q&255)<<8)>>1;var Q,b,nt=function(t,e,i){for(var n=t.length,r=0,o=new Y(e);r<n;++r)t[r]&&++o[t[r]-1];var a=new Y(e);for(r=1;r<e;++r)a[r]=a[r-1]+o[r-1]<<1;var s;if(i){s=new Y(1<<e);var l=15-e;for(r=0;r<n;++r)if(t[r])for(var h=r<<4|t[r],u=e-t[r],d=a[t[r]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[yt[d]>>l]=h;}else for(s=new Y(n),r=0;r<n;++r)t[r]&&(s[r]=yt[a[t[r]-1]++]>>15-t[r]);return s},ut=new x(288);for(b=0;b<144;++b)ut[b]=8;var b;for(b=144;b<256;++b)ut[b]=9;var b;for(b=256;b<280;++b)ut[b]=7;var b;for(b=280;b<288;++b)ut[b]=8;var b,de=new x(32);for(b=0;b<32;++b)de[b]=5;var b,ce=nt(ut,9,1),fe=nt(de,5,1),_t=function(t){for(var e=t[0],i=1;i<t.length;++i)t[i]>e&&(e=t[i]);return e},U=function(t,e,i){var n=e/8|0;return (t[n]|t[n+1]<<8)>>(e&7)&i},vt=function(t,e){var i=e/8|0;return (t[i]|t[i+1]<<8|t[i+2]<<16)>>(e&7)},pe=function(t){return (t+7)/8|0},gt=function(t,e,i){(e==null||e<0)&&(e=0),(i==null||i>t.length)&&(i=t.length);var n=new x(i-e);return n.set(t.subarray(e,i)),n},me=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],T=function(t,e,i){var n=new Error(e||me[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,T),!i)throw n;return n},_e=function(t,e,i,n){var r=t.length,o=n?n.length:0;if(!r||e.f&&!e.l)return i||new x(0);var a=!i||e.i!=2,s=e.i;i||(i=new x(r*3));var l=function(Qt){var Xt=i.length;if(Qt>Xt){var Yt=new x(Math.max(Xt*2,Qt));Yt.set(i),i=Yt;}},h=e.f||0,u=e.p||0,d=e.b||0,f=e.l,p=e.d,m=e.m,c=e.n,v=r*8;do{if(!f){h=U(t,u,1);var _=U(t,u+1,3);if(u+=3,_)if(_==1)f=ce,p=fe,m=9,c=5;else if(_==2){var S=U(t,u,31)+257,y=U(t,u+10,15)+4,E=S+U(t,u+5,31)+1;u+=14;for(var M=new x(E),D=new x(19),I=0;I<y;++I)D[se[I]]=U(t,u+I*3,7);u+=y*3;for(var F=_t(D),j=(1<<F)-1,q=nt(D,F,1),I=0;I<E;){var A=q[U(t,u,j)];u+=A&15;var k=A>>4;if(k<16)M[I++]=k;else {var B=0,W=0;for(k==16?(W=3+U(t,u,3),u+=2,B=M[I-1]):k==17?(W=3+U(t,u,7),u+=3):k==18&&(W=11+U(t,u,127),u+=7);W--;)M[I++]=B;}}var N=M.subarray(0,S),P=M.subarray(S);m=_t(N),c=_t(P),f=nt(N,m,1),p=nt(P,c,1);}else T(1);else {var k=pe(u)+4,It=t[k-4]|t[k-3]<<8,Lt=k+It;if(Lt>r){s&&T(0);break}a&&l(d+It),i.set(t.subarray(k,Lt),d),e.b=d+=It,e.p=u=Lt*8,e.f=h;continue}if(u>v){s&&T(0);break}}a&&l(d+131072);for(var Ue=(1<<m)-1,Ve=(1<<c)-1,kt=u;;kt=u){var B=f[vt(t,u)&Ue],it=B>>4;if(u+=B&15,u>v){s&&T(0);break}if(B||T(2),it<256)i[d++]=it;else if(it==256){kt=u,f=null;break}else {var Gt=it-254;if(it>264){var I=it-257,st=zt[I];Gt=U(t,u,(1<<st)-1)+Dt[I],u+=st;}var Ot=p[vt(t,u)&Ve],Mt=Ot>>4;Ot||T(3),u+=Ot&15;var P=he[Mt];if(Mt>3){var st=Ft[Mt];P+=vt(t,u)&(1<<st)-1,u+=st;}if(u>v){s&&T(0);break}a&&l(d+131072);var At=d+Gt;if(d<P){var Kt=o-P,$e=Math.min(P,At);for(Kt+d<0&&T(3);d<$e;++d)i[d]=n[Kt+d];}for(;d<At;d+=4)i[d]=i[d-P],i[d+1]=i[d+1-P],i[d+2]=i[d+2-P],i[d+3]=i[d+3-P];d=At;}}e.l=f,e.p=kt,e.b=d,e.f=h,f&&(h=1,e.m=m,e.d=p,e.n=c);}while(!h);return d==i.length?i:gt(i,0,d)},Re=new x(0),He=function(t,e){var i={};for(var n in t)i[n]=t[n];for(var n in e)i[n]=e[n];return i},te=function(t,e,i){for(var n=t(),r=t.toString(),o=r.slice(r.indexOf("[")+1,r.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var s=n[a],l=o[a];if(typeof s=="function"){e+=";"+l+"=";var h=s.toString();if(s.prototype)if(h.indexOf("[native code]")!=-1){var u=h.indexOf(" ",8)+1;e+=h.slice(u,h.indexOf("(",u));}else {e+=h;for(var d in s.prototype)e+=";"+l+".prototype."+d+"="+s.prototype[d].toString();}else e+=h;}else i[l]=s;}return e},mt=[],We=function(t){var e=[];for(var i in t)t[i].buffer&&e.push((t[i]=new t[i].constructor(t[i])).buffer);return e},Ge=function(t,e,i,n){if(!mt[i]){for(var r="",o={},a=t.length-1,s=0;s<a;++s)r=te(t[s],r,o);mt[i]={c:te(t[a],r,o),e:o};}var l=He({},mt[i].e);return qe(mt[i].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",i,l,We(l),n)},Ke=function(){return [x,Y,ae,zt,Ft,se,Dt,he,ce,fe,yt,me,nt,_t,U,vt,pe,gt,T,_e,Ut,ve,ye]},ve=function(t){return postMessage(t,[t.buffer])},ye=function(t){return t&&{out:t.size&&new x(t.size),dictionary:t.dictionary}},Qe=function(t,e,i,n,r,o){var a=Ge(i,n,r,function(s,l){a.terminate(),o(s,l);});return a.postMessage([t,e],e.consume?[t.buffer]:[]),function(){a.terminate();}},G=function(t,e){return t[e]|t[e+1]<<8},J=function(t,e){return (t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},Pt=function(t,e){return J(t,e)+J(t,e+4)*4294967296};function Xe(t,e,i){return i||(i=e,e={}),typeof i!="function"&&T(7),Qe(t,e,[Ke],function(n){return ve(Ut(n.data[0],ye(n.data[1])))},1,i)}function Ut(t,e){return _e(t,{i:2},e&&e.out,e&&e.dictionary)}var Et=typeof TextDecoder<"u"&&new TextDecoder,Ye=0;try{Et.decode(Re,{stream:!0}),Ye=1;}catch{}var Ze=function(t){for(var e="",i=0;;){var n=t[i++],r=(n>127)+(n>223)+(n>239);if(i+r>t.length)return {s:e,r:gt(t,i-1)};r?r==3?(n=((n&15)<<18|(t[i++]&63)<<12|(t[i++]&63)<<6|t[i++]&63)-65536,e+=String.fromCharCode(55296|n>>10,56320|n&1023)):r&1?e+=String.fromCharCode((n&31)<<6|t[i++]&63):e+=String.fromCharCode((n&15)<<12|(t[i++]&63)<<6|t[i++]&63):e+=String.fromCharCode(n);}};function rt(t,e){if(e){for(var i="",n=0;n<t.length;n+=16384)i+=String.fromCharCode.apply(null,t.subarray(n,n+16384));return i}else {if(Et)return Et.decode(t);var r=Ze(t),o=r.s,i=r.r;return i.length&&T(8),o}}var ti=function(t,e){return e+30+G(t,e+26)+G(t,e+28)},ei=function(t,e,i){var n=G(t,e+28),r=rt(t.subarray(e+46,e+46+n),!(G(t,e+8)&2048)),o=e+46+n,a=J(t,e+20),s=i&&a==4294967295?ii(t,o):[a,J(t,e+24),J(t,e+42)],l=s[0],h=s[1],u=s[2];return [G(t,e+10),l,h,r,o+G(t,e+30)+G(t,e+32),u]},ii=function(t,e){for(;G(t,e)!=1;e+=4+G(t,e+2));return [Pt(t,e+12),Pt(t,e+4),Pt(t,e+20)]},ee=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(t){t();};function ni(t,e,i){i||(i=e,e={}),typeof i!="function"&&T(7);var n=[],r=function(){for(var v=0;v<n.length;++v)n[v]();},o={},a=function(v,_){ee(function(){i(v,_);});};ee(function(){a=i;});for(var s=t.length-22;J(t,s)!=101010256;--s)if(!s||t.length-s>65558)return a(T(13,0,1),null),r;var l=G(t,s+8);if(l){var h=l,u=J(t,s+16),d=u==4294967295||h==65535;if(d){var f=J(t,s-12);d=J(t,f)==101075792,d&&(h=l=J(t,f+32),u=J(t,f+48));}for(var p=e&&e.filter,m=function(v){var _=ei(t,u,d),S=_[0],y=_[1],E=_[2],M=_[3],D=_[4],I=_[5],F=ti(t,I);u=D;var j=function(A,k){A?(r(),a(A,null)):(k&&(o[M]=k),--l||a(null,o));};if(!p||p({name:M,size:y,originalSize:E,compression:S}))if(!S)j(null,gt(t,F,F+y));else if(S==8){var q=t.subarray(F,F+y);if(y<32e4)try{j(null,Ut(q,{out:new x(E)}));}catch(A){j(A,null);}else n.push(Xe(q,{size:E},j));}else j(T(14,"unknown compression type "+S,1),null);else j(null,null);},c=0;c<h;++c)m(c);}else a(null,{});return r}function ri(t){return (Array.isArray(t)?t:t.issues).reduce((e,i)=>{if(i.path){let n=i.path.map(({key:r})=>r).join(".");e.nested[n]=[...e.nested[n]||[],i.message];}else e.root=[...e.root||[],i.message];return e},{nested:{}})}var oi=class extends Error{issues;constructor(t){super(t[0].message),this.name="ValiError",this.issues=t;}};function ai(t,e){return {reason:t==null?void 0:t.reason,validation:e.validation,origin:(t==null?void 0:t.origin)||"value",message:e.message,input:e.input,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly}}function si(t,e){return {reason:e,origin:t==null?void 0:t.origin,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly}}function X(t,e,i,n){if(!e||!e.length)return {output:t};let r,o,a=t;for(let s of e){let l=s(a);if(l.issue){r=r||si(i,n);let h=ai(r,l.issue);if(o?o.push(h):o=[h],r.abortEarly||r.abortPipeEarly)break}else a=l.output;}return o?{issues:o}:{output:a}}function H(t,e){return !t||typeof t=="string"?[t,e]:[void 0,t]}function K(t,e,i,n,r,o){return {issues:[{reason:e,validation:i,origin:(t==null?void 0:t.origin)||"value",message:n,input:r,issues:o,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly}]}}function li(t=[]){return {schema:"any",async:!1,_parse(e,i){return X(e,t,i,"any")}}}function lt(t,e,i){let[n,r]=H(e,i);return {schema:"array",array:{item:t},async:!1,_parse(o,a){if(!Array.isArray(o))return K(a,"type","array",n||"Invalid type",o);let s,l=[];for(let h=0;h<o.length;h++){let u=o[h],d=t._parse(u,a);if(d.issues){let f={schema:"array",input:o,key:h,value:u};for(let p of d.issues)p.path?p.path.unshift(f):p.path=[f],s==null||s.push(p);if(s||(s=d.issues),a!=null&&a.abortEarly)break}else l.push(d.output);}return s?{issues:s}:X(l,r,a,"array")}}}function Ct(t,e){let[i,n]=H(t,e);return {schema:"boolean",async:!1,_parse(r,o){return typeof r!="boolean"?K(o,"type","boolean",i||"Invalid type",r):X(r,n,o,"boolean")}}}function ie(t,e){return {schema:"literal",literal:t,async:!1,_parse(i,n){return i!==t?K(n,"type","literal",e||"Invalid type",i):{output:i}}}}function ui(t,e){return {schema:"native_enum",nativeEnum:t,async:!1,_parse(i,n){return Object.values(t).includes(i)?{output:i}:K(n,"type","native_enum",e||"Invalid type",i)}}}function R(t,e){let[i,n]=H(t,e);return {schema:"number",async:!1,_parse(r,o){return typeof r!="number"?K(o,"type","number",i||"Invalid type",r):X(r,n,o,"number")}}}function V(t,e,i){let[n,r]=H(e,i),o;return {schema:"object",object:t,async:!1,_parse(a,s){if(!a||typeof a!="object")return K(s,"type","object",n||"Invalid type",a);o=o||Object.entries(t);let l,h={};for(let[u,d]of o){let f=a[u],p=d._parse(f,s);if(p.issues){let m={schema:"object",input:a,key:u,value:f};for(let c of p.issues)c.path?c.path.unshift(m):c.path=[m],l==null||l.push(c);if(l||(l=p.issues),s!=null&&s.abortEarly)break}else h[u]=p.output;}return l?{issues:l}:X(h,r,s,"object")}}}function w(t){return {schema:"optional",wrapped:t,async:!1,_parse(e,i){return e===void 0?{output:e}:t._parse(e,i)}}}function C(t,e){let[i,n]=H(t,e);return {schema:"string",async:!1,_parse(r,o){return typeof r!="string"?K(o,"type","string",i||"Invalid type",r):X(r,n,o,"string")}}}function hi(t,e,i,n){if(typeof e=="object"&&!Array.isArray(e)){let[a,s]=H(i,n);return [t,e,a,s]}let[r,o]=H(e,i);return [C(),t,r,o]}var di=["__proto__","prototype","constructor"];function ci(t,e,i,n){let[r,o,a,s]=hi(t,e,i,n);return {schema:"record",record:{key:r,value:o},async:!1,_parse(l,h){if(!l||typeof l!="object")return K(h,"type","record",a||"Invalid type",l);let u,d={};for(let[f,p]of Object.entries(l))if(!di.includes(f)){let m,c=r._parse(f,{origin:"key",abortEarly:h==null?void 0:h.abortEarly,abortPipeEarly:h==null?void 0:h.abortPipeEarly});if(c.issues){m={schema:"record",input:l,key:f,value:p};for(let _ of c.issues)_.path=[m],u==null||u.push(_);if(u||(u=c.issues),h!=null&&h.abortEarly)break}let v=o._parse(p,h);if(v.issues){m=m||{schema:"record",input:l,key:f,value:p};for(let _ of v.issues)_.path?_.path.unshift(m):_.path=[m],u==null||u.push(_);if(u||(u=v.issues),h!=null&&h.abortEarly)break}!c.issues&&!v.issues&&(d[c.output]=v.output);}return u?{issues:u}:X(d,s,h,"record")}}}function fi(t,e,i){if(typeof t=="object"&&!Array.isArray(t)){let[o,a]=H(e,i);return [t,o,a]}let[n,r]=H(t,e);return [void 0,n,r]}function ne(t,e,i,n){let[r,o,a]=fi(e,i,n);return {schema:"tuple",tuple:{items:t,rest:r},async:!1,_parse(s,l){if(!Array.isArray(s)||!r&&t.length!==s.length||r&&t.length>s.length)return K(l,"type","tuple",o||"Invalid type",s);let h,u=[];for(let d=0;d<t.length;d++){let f=s[d],p=t[d]._parse(f,l);if(p.issues){let m={schema:"tuple",input:s,key:d,value:f};for(let c of p.issues)c.path?c.path.unshift(m):c.path=[m],h==null||h.push(c);if(h||(h=p.issues),l!=null&&l.abortEarly)break}else u[d]=p.output;}if(r)for(let d=t.length;d<s.length;d++){let f=s[d],p=r._parse(f,l);if(p.issues){let m={schema:"tuple",input:s,key:d,value:f};for(let c of p.issues)c.path?c.path.unshift(m):c.path=[m],h==null||h.push(c);if(h||(h=p.issues),l!=null&&l.abortEarly)break}else u[d]=p.output;}return h?{issues:h}:X(u,a,l,"tuple")}}}function Tt(t,e){return {schema:"union",union:t,async:!1,_parse(i,n){let r,o;for(let a of t){let s=a._parse(i,n);if(s.issues)if(r)for(let l of s.issues)r.push(l);else r=s.issues;else {o=[s.output];break}}return o?{output:o[0]}:K(n,"type","union",e||"Invalid type",i,r)}}}function ht(t,e,i){let[n,r]=H(e,i);return V(t.reduce((o,a)=>({...o,...a.object}),{}),n,r)}function pi(t,e,i,n){let[r,o]=H(i,n);return V(Object.entries(t.object).reduce((a,[s,l])=>e.includes(s)?a:{...a,[s]:l},{}),r,o)}function mi(t,e,i){let n=t._parse(e,i);return n.issues?{success:!1,error:new oi(n.issues),issues:n.issues}:{success:!0,data:n.output,output:n.output}}function xt(t,e){return i=>i>t?{issue:{validation:"max_value",message:e||"Invalid value",input:i}}:{output:i}}function jt(t,e){return i=>i<t?{issue:{validation:"min_value",message:e||"Invalid value",input:i}}:{output:i}}var _i=Object.create,Vt=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,ge=Object.getOwnPropertyNames,yi=Object.getPrototypeOf,gi=Object.prototype.hasOwnProperty,bi=(t,e,i)=>e in t?Vt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,dt=(t,e)=>function(){return e||(0, t[ge(t)[0]])((e={exports:{}}).exports,e),e.exports},wi=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ge(e))!gi.call(t,r)&&r!==i&&Vt(t,r,{get:()=>e[r],enumerable:!(n=vi(e,r))||n.enumerable});return t},Si=(t,e,i)=>(i=t!=null?_i(yi(t)):{},wi(e||!t||!t.__esModule?Vt(i,"default",{value:t,enumerable:!0}):i,t)),Ii=(t,e,i)=>(bi(t,typeof e!="symbol"?e+"":e,i),i),Li=dt({"../../node_modules/.pnpm/@rgba-image+copy@0.1.3/node_modules/@rgba-image/copy/dist/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.copy=void 0;var e=(i,n,r=0,o=0,a=i.width-r,s=i.height-o,l=0,h=0)=>{if(r=r|0,o=o|0,a=a|0,s=s|0,l=l|0,h=h|0,a<=0||s<=0)return;let u=new Uint32Array(i.data.buffer),d=new Uint32Array(n.data.buffer);for(let f=0;f<s;f++){let p=o+f;if(p<0||p>=i.height)continue;let m=h+f;if(!(m<0||m>=n.height))for(let c=0;c<a;c++){let v=r+c;if(v<0||v>=i.width)continue;let _=l+c;if(_<0||_>=n.width)continue;let S=p*i.width+v,y=m*n.width+_;d[y]=u[S];}}};t.copy=e;}}),ki=dt({"../../node_modules/.pnpm/@rgba-image+create-image@0.1.1/node_modules/@rgba-image/create-image/dist/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CreateImageFactory=(e=[0,0,0,0],i=4)=>{if(i=Math.floor(i),isNaN(i)||i<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in e)||e.length<i)throw TypeError(`fill should be iterable with at least ${i} members`);e=new Uint8ClampedArray(e).slice(0,i);let n=e.every(r=>r===0);return (r,o,a)=>{if(r===void 0||o===void 0)throw TypeError("Not enough arguments");if(r=Math.floor(r),o=Math.floor(o),isNaN(r)||r<1||isNaN(o)||o<1)throw TypeError("Index or size is negative or greater than the allowed amount");let s=r*o*i;if(a===void 0&&(a=new Uint8ClampedArray(s)),a instanceof Uint8ClampedArray){if(a.length!==s)throw TypeError("Index or size is negative or greater than the allowed amount");if(!n)for(let l=0;l<o;l++)for(let h=0;h<r;h++){let u=(l*r+h)*i;for(let d=0;d<i;d++)a[u+d]=e[d];}return {get width(){return r},get height(){return o},get data(){return a}}}throw TypeError("Expected data to be Uint8ClampedArray or undefined")}},t.createImage=t.CreateImageFactory();}}),Oi=dt({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/filters.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.filters=void 0;var e=14,i=(o,a)=>{if(o<=-a||o>=a||o==0)return 0;let s=o*Math.PI;return Math.sin(s)/s*Math.sin(s/a)/(s/a)},n=o=>Math.round(o*((1<<e)-1)),r=(o,a,s,l,h)=>{let u=h?2:3,d=1/s,f=Math.min(1,s),p=u/f,m=Math.floor((p+1)*2),c=new Int16Array((m+2)*a),v=0;for(let _=0;_<a;_++){let S=(_+.5)*d+l,y=Math.max(0,Math.floor(S-p)),E=Math.min(o-1,Math.ceil(S+p)),M=E-y+1,D=new Float32Array(M),I=new Int16Array(M),F=0,j=0;for(let N=y;N<=E;N++){let P=i((N+.5-S)*f,u);F+=P,D[j]=P,j++;}let q=0;for(let N=0;N<D.length;N++){let P=D[N]/F;q+=P,I[N]=n(P);}I[a>>1]+=n(1-q);let A=0;for(;A<I.length&&I[A]===0;)A++;let k=I.length-1;for(;k>0&&I[k]===0;)k--;let B=y+A,W=k-A+1;c[v++]=B,c[v++]=W,c.set(I.subarray(A,k+1),v),v+=W;}return c};t.filters=r;}}),Mi=dt({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/convolve.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.convolve=void 0;var e=14,i=(n,r,o,a,s,l)=>{let h=0,u=0;for(let d=0;d<a;d++){let f=0;for(let p=0;p<s;p++){let m=l[f++],c=h+m*4|0,v=0,_=0,S=0,y=0;for(let E=l[f++];E>0;E--){let M=l[f++];v=v+M*n[c]|0,_=_+M*n[c+1]|0,S=S+M*n[c+2]|0,y=y+M*n[c+3]|0,c=c+4|0;}r[u]=v+8192>>e,r[u+1]=_+8192>>e,r[u+2]=S+8192>>e,r[u+3]=y+8192>>e,u=u+a*4|0;}u=(d+1)*4|0,h=(d+1)*o*4|0;}};t.convolve=i;}}),Ai=dt({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.lanczos2=t.lanczos=void 0;var e=Li(),i=ki(),n=Oi(),r=Mi(),o=(l,h,u=!1)=>{let d=h.width/l.width,f=h.height/l.height,p=n.filters(l.width,h.width,d,0,u),m=n.filters(l.height,h.height,f,0,u),c=new Uint8ClampedArray(h.width*l.height*4);r.convolve(l.data,c,l.width,l.height,h.width,p),r.convolve(c,h.data,l.height,h.width,h.height,m);},a=(l,h,u=0,d=0,f=l.width-u,p=l.height-d,m=0,c=0,v=h.width-m,_=h.height-c)=>{if(u=u|0,d=d|0,f=f|0,p=p|0,m=m|0,c=c|0,v=v|0,_=_|0,f<=0||p<=0||v<=0||_<=0)return;if(u===0&&d===0&&f===l.width&&p===l.height&&m===0&&c===0&&v===h.width&&_===h.height){o(l,h);return}let S=i.createImage(f,p),y=i.createImage(v,_);e.copy(l,S,u,d),o(S,y),e.copy(y,h,0,0,y.width,y.height,m,c);};t.lanczos=a;var s=(l,h,u=0,d=0,f=l.width-u,p=l.height-d,m=0,c=0,v=h.width-m,_=h.height-c)=>{if(u=u|0,d=d|0,f=f|0,p=p|0,m=m|0,c=c|0,v=v|0,_=_|0,f<=0||p<=0||v<=0||_<=0)return;if(u===0&&d===0&&f===l.width&&p===l.height&&m===0&&c===0&&v===h.width&&_===h.height){o(l,h,!0);return}let S=i.createImage(f,p),y=i.createImage(v,_);e.copy(l,S,u,d),o(S,y,!0),e.copy(y,h,0,0,y.width,y.height,m,c);};t.lanczos2=s;}}),be=(t=>(t.Bounce="bounce",t.Normal="normal",t))(be||{}),Pi=ui(be),we=V({autoplay:w(Ct()),defaultTheme:w(C()),direction:w(Tt([ie(1),ie(-1)])),hover:w(Ct()),id:C(),intermission:w(R()),loop:w(Tt([Ct(),R()])),playMode:w(Pi),speed:w(R()),themeColor:w(C())}),Ci=V({animations:lt(C()),id:C()}),Ei=V({activeAnimationId:w(C()),animations:lt(we),author:w(C()),custom:w(ci(C(),li())),description:w(C()),generator:w(C()),keywords:w(C()),revision:w(R()),themes:w(lt(Ci)),states:w(lt(C())),version:w(C())}),$t=pi(we,["id"]),Z=V({state:C()}),Ti=Z,xi=ht([Z,V({ms:R()})]),ji=ht([Z,V({count:R()})]),Ni=Z,zi=Z,Fi=Z,Di=ht([Z,V({threshold:w(lt(R([jt(0),xt(1)])))})]),Ui=V({onAfter:w(xi),onClick:w(Ti),onComplete:w(Fi),onEnter:w(ji),onMouseEnter:w(Ni),onMouseLeave:w(zi),onShow:w(Di)}),Vi=ht([$t,V({playOnScroll:w(ne([R([jt(0),xt(1)]),R([jt(0),xt(1)])])),segments:w(Tt([ne([R(),R()]),C()]))})]);ht([Ui,V({animationId:w(C()),playbackSettings:Vi})]);var $i={jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp",mpeg:"audio/mpeg",mp3:"audio/mp3"},re={jpeg:[255,216,255],png:[137,80,78,71,13,10,26,10],gif:[71,73,70],bmp:[66,77],webp:[82,73,70,70,87,69,66,80],svg:[60,63,120],mp3:[73,68,51,3,0,0,0,0],mpeg:[73,68,51,3,0,0,0,0]},qi=t=>{let e=null,i=[];if(!t)return null;let n=t.substring(t.indexOf(",")+1);typeof window>"u"?e=Buffer.from(n,"base64").toString("binary"):e=atob(n);let r=new Uint8Array(e.length);for(let o=0;o<e.length;o+=1)r[o]=e.charCodeAt(o);i=Array.from(r.subarray(0,8));for(let o in re){let a=re[o];if(a&&i.every((s,l)=>s===a[l]))return $i[o]}return null},qt=class extends Error{constructor(t,e){super(t),Ii(this,"code"),this.name="[dotlottie-js]",this.code=e;}};function Se(t){let e;if(typeof window>"u")e=Buffer.from(t).toString("base64");else {let i=Array.prototype.map.call(t,n=>String.fromCharCode(n)).join("");e=window.btoa(i);}return `data:${qi(e)};base64,${e}`}function oe(t){return "w"in t&&"h"in t&&!("xt"in t)&&"p"in t}function Nt(t){return !("h"in t)&&!("w"in t)&&"p"in t&&"e"in t&&"u"in t&&"id"in t}async function ct(t,e=()=>!0){if(!(t instanceof Uint8Array))throw new qt("DotLottie not found","INVALID_DOTLOTTIE");return await new Promise((i,n)=>{ni(t,{filter:e},(r,o)=>{r&&n(r),i(o);});})}async function Bt(t,e,i){if(!(t instanceof Uint8Array))throw new qt("DotLottie not found","INVALID_DOTLOTTIE");return (await ct(t,n=>n.name===e&&(!i||i(n))))[e]}async function bt(t){let e="manifest.json",i=(await ct(t,n=>n.name===e))[e];if(!(typeof i>"u"))return JSON.parse(rt(i,!1))}async function Bi(t){if(!(t instanceof Uint8Array))return {success:!1,error:"DotLottie not found"};let e=await bt(t);if(typeof e>"u")return {success:!1,error:"Invalid .lottie file, manifest.json is missing"};let i=mi(Ei,e);return i.success?{success:!0}:{success:!1,error:`Invalid .lottie file, manifest.json structure is invalid, ${JSON.stringify(ri(i.error).nested,null,2)}`}}async function Jt(t){let e=new Uint8Array(t),i=await Bi(e);if(i.error)throw new qt(i.error,"INVALID_DOTLOTTIE");return e}async function Ji(t,e){let i=await ct(t,r=>{let o=r.name.replace("audio/","");return r.name.startsWith("audio/")&&(!e||e({...r,name:o}))}),n={};for(let r in i){let o=i[r];if(o instanceof Uint8Array){let a=r.replace("audio/","");n[a]=Se(o);}}return n}async function Ri(t,e){var i;let n=new Map;for(let[o,a]of Object.entries(e))for(let s of a.assets||[])if(Nt(s)){let l=s.p;n.has(l)||n.set(l,new Set),(i=n.get(l))==null||i.add(o);}let r=await Ji(t,o=>n.has(o.name));for(let[o,a]of n){let s=r[o];if(s)for(let l of a){let h=e[l];for(let u of (h==null?void 0:h.assets)||[])Nt(u)&&u.p===o&&(u.p=s,u.u="",u.e=1);}}}async function Hi(t,e){let i=await ct(t,r=>{let o=r.name.replace("images/","");return r.name.startsWith("images/")&&(!e||e({...r,name:o}))}),n={};for(let r in i){let o=i[r];if(o instanceof Uint8Array){let a=r.replace("images/","");n[a]=Se(o);}}return n}async function Wi(t,e){var i;let n=new Map;for(let[o,a]of Object.entries(e))for(let s of a.assets||[])if(oe(s)){let l=s.p;n.has(l)||n.set(l,new Set),(i=n.get(l))==null||i.add(o);}let r=await Hi(t,o=>n.has(o.name));for(let[o,a]of n){let s=r[o];if(s)for(let l of a){let h=e[l];for(let u of (h==null?void 0:h.assets)||[])oe(u)&&u.p===o&&(u.p=s,u.u="",u.e=1);}}}async function Ie(t,e,{inlineAssets:i}={},n){let r=`animations/${e}.json`,o=await Bt(t,r,n);if(typeof o>"u")return;let a=JSON.parse(rt(o,!1));if(!i)return a;let s={[e]:a};return await Wi(t,s),await Ri(t,s),a}async function Le(t,e,i){let n=`themes/${e}.lss`,r=await Bt(t,n,i);if(!(typeof r>"u"))return rt(r,!1)}async function ke(t,e){let i={},n=await ct(t,r=>{let o=r.name.replace("states/","").replace(".json","");return r.name.startsWith("states/")&&(!e||e({...r,name:o}))});for(let r in n){let o=n[r];if(o instanceof Uint8Array){let a=r.replace("states/","").replace(".json","");i[a]=rt(o,!1);}}return i}async function Oe(t,e,i){let n=`states/${e}.json`,r=await Bt(t,n,i);return typeof r>"u"?void 0:JSON.parse(rt(r,!1))}Si(Ai());function g(t,e="dotLottie-common"){return new Error(`[${e}]: ${t}`)}function tt(t,e="dotLottie-common",...i){console.error(`[${e}]:`,t,...i);}function L(t,e="dotLottie-common",...i){console.warn(`[${e}]:`,t,...i);}function Me(t=""){let e=t.trim(),i=e.lastIndexOf("/"),n=e.substring(i+1),r=n.indexOf(".");return r!==-1?n.substring(0,r):n}function ot(t){return ["v","ip","op","layers","fr","w","h"].every(e=>Object.prototype.hasOwnProperty.call(t,e))}function Ae(t){let e=t.assets;return e?e.some(i=>Nt(i)):!1}function Pe(t){try{let e=JSON.parse(t);return ot(e)}catch{return !1}}function nn(t,e){let i=Object.keys(t).find(n=>t[n]===e);if(i===void 0)throw new Error("Value not found in the object.");return i}var Ce=class{_dotLottie;_animationsMap=new Map;_themeMap=new Map;_stateMachinesMap=new Map;_manifest;get dotLottie(){return this._dotLottie}get animationsMap(){return this._animationsMap}get themeMap(){return this._themeMap}get stateMachinesMap(){return this._stateMachinesMap}get manifest(){return this._manifest}async loadFromUrl(t){let e=await fetch(t,{method:"GET",mode:"cors"});if(!e.ok)throw new Error(`Failed to load dotLottie from ${t} with status ${e.status}`);let i=e.headers.get("content-type");if(i!=null&&i.includes("application/json")){let n=await e.json();if(!ot(n))throw new Error(`Invalid lottie JSON at ${t}`);let r=Me(t);this._animationsMap.set(r,n);let o={activeAnimationId:r,animations:[{id:r}]};this._manifest=o;}else {this._dotLottie=await Jt(await e.arrayBuffer());let n=await bt(this._dotLottie);if(!n)throw new Error("Manifest not found");this._manifest=n;}}loadFromLottieJSON(t){if(!ot(t))throw new Error("Invalid lottie JSON");let e="my-animation";this._animationsMap.set(e,t);let i={activeAnimationId:e,animations:[{id:e}]};this._manifest=i;}async loadFromArrayBuffer(t){this._dotLottie=await Jt(t);let e=await bt(this._dotLottie);if(!e)throw new Error("Manifest not found");this._manifest=e;}async getAnimation(t){if(this._animationsMap.get(t))return this._animationsMap.get(t);if(!this._dotLottie)return;let e=await Ie(this._dotLottie,t,{inlineAssets:!0});return e&&this._animationsMap.set(t,e),e}async getTheme(t){if(this._themeMap.get(t))return this._themeMap.get(t);if(!this._dotLottie)return;let e=await Le(this._dotLottie,t);return e&&this._themeMap.set(t,e),e}async getStateMachines(){if(!this._dotLottie)return;let t=await ke(this._dotLottie);for(let e in t)if(e){let i=t[e];if(i){let n=JSON.parse(i);if(n){let r=n.descriptor.id;this._stateMachinesMap.get(r)||this._stateMachinesMap.set(r,n);}}}return Array.from(this._stateMachinesMap.values())}async getStateMachine(t){if(this._stateMachinesMap.get(t))return this._stateMachinesMap.get(t);if(!this._dotLottie)return;let e=await Oe(this._dotLottie,t);return e&&this._stateMachinesMap.set(e.descriptor.id,e),e}};async function Ee(t,e){let[{relottie:i},{default:n}]=await Promise.all([import('./dist-TF5BXIJN-GNSUL5QU.mjs'),import('./dist-K62S3CAZ-EPQMQGUE.mjs')]),r=await i().use(n,{lss:e}).process(JSON.stringify(t));return JSON.parse(r.value)}function St(){throw new Error("Cycle detected")}function Ht(){if(at>1)at--;else {for(var t,e=!1;ft!==void 0;){var i=ft;for(ft=void 0,Rt++;i!==void 0;){var n=i.o;if(i.o=void 0,i.f&=-3,!(8&i.f)&&xe(i))try{i.c();}catch(r){e||(t=r,e=!0);}i=n;}}if(Rt=0,at--,e)throw t}}var O=void 0,ft=void 0,at=0,Rt=0,wt=0;function Te(t){if(O!==void 0){var e=t.n;if(e===void 0||e.t!==O)return e={i:0,S:t,p:O.s,n:void 0,t:O,e:void 0,x:void 0,r:e},O.s!==void 0&&(O.s.n=e),O.s=e,t.n=e,32&O.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=O.s,e.n=void 0,O.s.n=e,O.s=e),e}}function z(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0;}z.prototype.h=function(){return !0};z.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t);};z.prototype.U=function(t){if(this.t!==void 0){var e=t.e,i=t.x;e!==void 0&&(e.x=i,t.e=void 0),i!==void 0&&(i.e=e,t.x=void 0),t===this.t&&(this.t=i);}};z.prototype.subscribe=function(t){var e=this;return Qi(function(){var i=e.value,n=32&this.f;this.f&=-33;try{t(i);}finally{this.f|=n;}})};z.prototype.valueOf=function(){return this.value};z.prototype.toString=function(){return this.value+""};z.prototype.toJSON=function(){return this.value};z.prototype.peek=function(){return this.v};Object.defineProperty(z.prototype,"value",{get:function(){var t=Te(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(O instanceof et&&function(){throw new Error("Computed cannot have side-effects")}(),t!==this.v){Rt>100&&St(),this.v=t,this.i++,wt++,at++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N();}finally{Ht();}}}});function Gi(t){return new z(t)}function xe(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return !0;return !1}function je(t){for(var e=t.s;e!==void 0;e=e.n){var i=e.S.n;if(i!==void 0&&(e.r=i),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Ne(t){for(var e=t.s,i=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):i=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n;}t.s=i;}function et(t){z.call(this,void 0),this.x=t,this.s=void 0,this.g=wt-1,this.f=4;}(et.prototype=new z).h=function(){if(this.f&=-3,1&this.f)return !1;if((36&this.f)==32||(this.f&=-5,this.g===wt))return !0;if(this.g=wt,this.f|=1,this.i>0&&!xe(this))return this.f&=-2,!0;var t=O;try{je(this),O=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++);}catch(i){this.v=i,this.f|=16,this.i++;}return O=t,Ne(this),this.f&=-2,!0};et.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e);}z.prototype.S.call(this,t);};et.prototype.U=function(t){if(this.t!==void 0&&(z.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e);}};et.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N();}};et.prototype.peek=function(){if(this.h()||St(),16&this.f)throw this.v;return this.v};Object.defineProperty(et.prototype,"value",{get:function(){1&this.f&&St();var t=Te(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function ze(t){var e=t.u;if(t.u=void 0,typeof e=="function"){at++;var i=O;O=void 0;try{e();}catch(n){throw t.f&=-2,t.f|=8,Wt(t),n}finally{O=i,Ht();}}}function Wt(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ze(t);}function Ki(t){if(O!==this)throw new Error("Out-of-order effect");Ne(this),O=t,this.f&=-2,8&this.f&&Wt(this),Ht();}function pt(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32;}pt.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e);}finally{t();}};pt.prototype.S=function(){1&this.f&&St(),this.f|=1,this.f&=-9,ze(this),je(this),at++;var t=O;return O=this,Ki.bind(this,t)};pt.prototype.N=function(){2&this.f||(this.f|=2,this.o=ft,ft=this);};pt.prototype.d=function(){this.f|=8,1&this.f||Wt(this);};function Qi(t){var e=new pt(t);try{e.c();}catch(i){throw e.d(),i}return e.d.bind(e)}var Fe=class{_state;_prevState;constructor(t){this._prevState=t,this._state=Gi(t);}setState(t){this._prevState=this._state.value,this._state.value=t;}subscribe(t){return this._state.subscribe(e=>t(e,this._prevState))}};async function De(t,e){let[{DotLottieStateMachineManager:i}]=await Promise.all([import('./dotlottie-state-machine-manager-7AXSPEV3-C4JS27KT.mjs')]);if(!t.length)throw g("No state machines available inside this .lottie!");return new i(t,e)}var Xi={name:"@dotlottie/common",version:"0.7.3",type:"module",description:"",author:"Afsal <afsal@lottiefiles.com>, Sam Osborne <sam@lottiefiles.com>",license:"MIT",engines:{node:">18.0.0"},module:"dist/index.js",main:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:[],scripts:{build:"tsup",dev:"tsup --watch",lint:"eslint .","type-check":"tsc --noEmit"},dependencies:{"@dotlottie/dotlottie-js":"0.6.0","@lottiefiles/relottie":"1.0.0","@lottiefiles/relottie-style":"0.4.1","@preact/signals-core":"^1.2.3",howler:"^2.2.3","lottie-web":"^5.12.2",xstate:"^4.38.1"},devDependencies:{"@lottiefiles/lottie-types":"^1.2.0","@types/howler":"^2.2.8",tsup:"^7.2.0",typescript:"^4.7.4"},publishConfig:{access:"public"}},Yi=(t=>(t.Complete="complete",t.DataFail="data_fail",t.DataReady="data_ready",t.Error="error",t.Frame="frame",t.Freeze="freeze",t.LoopComplete="loopComplete",t.Pause="pause",t.Play="play",t.Ready="ready",t.Stop="stop",t.VisibilityChange="visibilityChange",t))(Yi||{}),Zi=(t=>(t.Completed="completed",t.Error="error",t.Fetching="fetching",t.Frozen="frozen",t.Initial="initial",t.Loading="loading",t.Paused="paused",t.Playing="playing",t.Ready="ready",t.Stopped="stopped",t))(Zi||{}),tn=(t=>(t.Bounce="bounce",t.Normal="normal",t))(tn||{}),$={autoplay:!1,direction:1,hover:!1,intermission:0,loop:!1,playMode:"normal",speed:1,defaultTheme:""},en={activeStateId:"",autoplay:!1,currentState:"initial",frame:0,seeker:0,direction:1,hover:!1,loop:!1,playMode:"normal",speed:1,background:"transparent",intermission:0,currentAnimationId:void 0,visibilityPercentage:0},bn=class{_lottie;_src;_animationConfig;_prevUserPlaybackOptions={};_userPlaybackOptions;_hover=!1;_loop=!1;_counter=0;_intermission=0;_counterInterval=null;_container=null;_name;_mode="normal";_background="transparent";_animation;_defaultTheme;_activeAnimationId;_currentAnimationId;_testId;_listeners=new Map;_currentState="initial";_stateBeforeFreeze="initial";state=new Fe(en);_light=!1;_worker=!1;_dotLottieLoader=new Ce;_activeStateId;_inInteractiveMode=!1;_scrollTicking=!1;_scrollCallback=void 0;_onShowIntersectionObserver=void 0;_visibilityPercentage=0;_audios=[];_stateMachineManager;constructor(t,e,i){typeof t=="string"?this._src=t:this._src=Object.assign({},t),i!=null&&i.testId&&(this._testId=i.testId),this._defaultTheme=(i==null?void 0:i.defaultTheme)||"",this._userPlaybackOptions=this._validatePlaybackOptions(i||{}),typeof(i==null?void 0:i.activeAnimationId)=="string"&&(this._activeAnimationId=i.activeAnimationId),this._container=e||null,typeof(i==null?void 0:i.background)=="string"&&this.setBackground(i.background),typeof(i==null?void 0:i.activeStateId)<"u"&&(this._activeStateId=i.activeStateId);let{rendererSettings:n,...r}=i||{};this._animationConfig={loop:!1,autoplay:!1,renderer:"svg",rendererSettings:{clearCanvas:!0,progressiveLoad:!0,hideOnTransparent:!0,filterSize:{width:"200%",height:"200%",x:"-50%",y:"-50%"},...n},...r},i!=null&&i.light&&(this._light=i.light),i!=null&&i.worker&&(this._worker=i.worker),this._listenToHover(),this._listenToVisibilityChange();}_listenToHover(){var t,e,i,n;let r=()=>{this._hover&&this.currentState!=="playing"&&this.play();},o=()=>{this._hover&&this.currentState==="playing"&&this.stop();};(t=this._container)==null||t.removeEventListener("mouseenter",r),(e=this._container)==null||e.removeEventListener("mouseleave",o),(i=this._container)==null||i.addEventListener("mouseleave",o),(n=this._container)==null||n.addEventListener("mouseenter",r);}_onVisibilityChange(){!this._lottie||typeof document>"u"||(document.hidden&&this.currentState==="playing"?this.freeze():this.currentState==="frozen"&&this.unfreeze());}_listenToVisibilityChange(){typeof document<"u"&&typeof document.hidden<"u"&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange());}_getOption(t){var e;if(typeof this._userPlaybackOptions[t]<"u")return this._userPlaybackOptions[t];let i=(e=this._dotLottieLoader.manifest)==null?void 0:e.animations.find(n=>n.id===this._currentAnimationId);return i&&typeof i[t]<"u"?i[t]:$[t]}_getPlaybackOptions(){let t={};for(let e in $)typeof $[e]<"u"&&(t[e]=this._getOption(e));return t}_setPlayerState(t){var e,i,n;let r=t(this._getPlaybackOptions());try{$t._parse(r);}catch{L(`Invalid PlaybackOptions, ${JSON.stringify(r,null,2)}`);return}typeof r.defaultTheme<"u"&&(this._defaultTheme=r.defaultTheme),typeof r.playMode<"u"&&(this._mode=r.playMode),typeof r.intermission<"u"&&(this._intermission=r.intermission),typeof r.hover<"u"&&(this._hover=r.hover),typeof r.loop<"u"&&(this.clearCountTimer(),this._loop=r.loop,this._counter=0,(e=this._lottie)==null||e.setLoop(typeof r.loop=="number"?!0:r.loop)),typeof r.speed<"u"&&((i=this._lottie)==null||i.setSpeed(r.speed)),typeof r.autoplay<"u"&&this._lottie&&(this._lottie.autoplay=r.autoplay),typeof r.direction<"u"&&((n=this._lottie)==null||n.setDirection(r.direction));}_getOptionsFromAnimation(t){let{id:e,...i}=t;return {...$,...i}}_updateTestData(){!this._testId||!this._lottie||(window.dotLottiePlayer||(window.dotLottiePlayer={[this._testId]:{}}),window.dotLottiePlayer[this._testId]={direction:this._lottie.playDirection,currentState:this._currentState,loop:this.loop,mode:this._mode,speed:this._lottie.playSpeed});}setContainer(t){t!==this._container&&(this._container=t,this.setBackground(this._background),this._listenToHover());}get currentState(){return this._currentState}clearCountTimer(){this._counterInterval&&clearInterval(this._counterInterval);}setCurrentState(t){this._currentState=t,this._notify(),this._updateTestData();}static isPathJSON(t){var e;return ((e=t.split(".").pop())==null?void 0:e.toLowerCase())==="json"}get src(){return this._src}updateSrc(t){this._src!==t&&(typeof t=="string"?this._src=t:this._src=Object.assign({},t),this._activeAnimationId=void 0,this._currentAnimationId=void 0,this.load());}get intermission(){return this._intermission}get hover(){return this._hover}setHover(t){typeof t=="boolean"&&(this._hover=t,this._userPlaybackOptions.hover=t,this._notify());}setIntermission(t){this._intermission=t,this._userPlaybackOptions.intermission=t,this._notify();}get mode(){return this._mode}get animations(){return this._dotLottieLoader.animationsMap}get themes(){return this._dotLottieLoader.themeMap}setMode(t){typeof t=="string"&&(this._mode=t,this._userPlaybackOptions.playMode=t,this._setPlayerState(()=>({playMode:t})),this._notify(),this._updateTestData());}get container(){if(this._container)return this._container}goToAndPlay(t,e,i){if(!this._lottie||["loading"].includes(this._currentState)){L("goToAndPlay() Can't use whilst loading.");return}this._lottie.goToAndPlay(t,e,i),this.setCurrentState("playing");}goToAndStop(t,e,i){if(!this._lottie||["loading"].includes(this._currentState)){L("goToAndStop() Can't use whilst loading.");return}this._lottie.goToAndStop(t,e,i),this.setCurrentState("stopped");}seek(t){if(!this._lottie||["loading"].includes(this._currentState)){L("seek() Can't use whilst loading.");return}let e=t;typeof e=="number"&&(e=Math.round(e));let i=/^(\d+)(%?)$/u.exec(e.toString());if(!i)return;let n=i[2]==="%"?this.totalFrames*Number(i[1])/100:i[1];n!==void 0&&(this._lottie.goToAndPlay(n,!0),this.currentState==="playing"?this.play():this.currentState==="frozen"?this.freeze():this.pause());}_areNumbersInRange(t,e){return t>=0&&t<=1&&e>=0&&e<=1}_updatePosition(t,e,i){let[n,r]=t!=null?t:[0,this.totalFrames-1],[o,a]=e!=null?e:[0,1];if(!this._areNumbersInRange(o,a)){tt("threshold values must be between 0 and 1");return}if(this.container){let{height:s,top:l}=this.container.getBoundingClientRect(),h=window.innerHeight-l,u=window.innerHeight+s,d=h/u,f=n+Math.round((d-o)/(a-o)*(r-n));i&&i(d),this.goToAndStop(f,!0),(f>=r||d>=a)&&this._handleAnimationComplete();}this._scrollTicking=!1;}_requestTick(t,e,i){this._scrollTicking||(requestAnimationFrame(()=>this._updatePosition(t,e,i)),this._scrollTicking=!0);}playOnScroll(t){this.stop(),this._scrollCallback&&this.stopPlayOnScroll(),this._scrollCallback=()=>this._requestTick(t==null?void 0:t.segments,t==null?void 0:t.threshold,t==null?void 0:t.positionCallback),window.addEventListener("scroll",this._scrollCallback);}stopPlayOnScroll(){this._scrollCallback&&(window.removeEventListener("scroll",this._scrollCallback),this._scrollCallback=void 0);}stopPlayOnShow(){this._onShowIntersectionObserver&&(this._onShowIntersectionObserver.disconnect(),this._onShowIntersectionObserver=void 0);}addIntersectionObserver(t){if(!this.container)throw g("Can't play on show, player container element not available.");let e={root:null,rootMargin:"0px",threshold:t!=null&&t.threshold?t.threshold:[0,1]},i=n=>{n.forEach(r=>{var o,a;this._visibilityPercentage=r.intersectionRatio*100,r.isIntersecting?(t!=null&&t.callbackOnIntersect&&t.callbackOnIntersect(this._visibilityPercentage),(o=this._container)==null||o.dispatchEvent(new Event("visibilityChange"))):t!=null&&t.callbackOnIntersect&&(t.callbackOnIntersect(0),(a=this._container)==null||a.dispatchEvent(new Event("visibilityChange")));});};this._onShowIntersectionObserver=new IntersectionObserver(i,e),this._onShowIntersectionObserver.observe(this.container);}playOnShow(t){var e;if(this.stop(),!this.container)throw g("Can't play on show, player container element not available.");this._onShowIntersectionObserver&&this.stopPlayOnShow(),this.addIntersectionObserver({threshold:(e=t==null?void 0:t.threshold)!=null?e:[],callbackOnIntersect:i=>{i===0?this.pause():this.play();}});}_validatePlaybackOptions(t){if(!t)return {};let e={};for(let[i,n]of Object.entries(t))switch(i){case"autoplay":typeof n=="boolean"&&(e.autoplay=n);break;case"direction":typeof n=="number"&&[1,-1].includes(n)&&(e.direction=n);break;case"loop":(typeof n=="boolean"||typeof n=="number")&&(e.loop=n);break;case"playMode":typeof n=="string"&&["normal","bounce"].includes(n)&&(e.playMode=n);break;case"speed":typeof n=="number"&&(e.speed=n);break;case"themeColor":typeof n=="string"&&(e.themeColor=n);break;case"hover":typeof n=="boolean"&&(e.hover=n);break;case"intermission":typeof n=="number"&&(e.intermission=n);break;case"defaultTheme":typeof n=="string"&&(e.defaultTheme=n);break}return this._requireValidPlaybackOptions(e),e}_requireAnimationsInTheManifest(){var t;if(!((t=this._dotLottieLoader.manifest)!=null&&t.animations.length))throw g("No animations found in manifest.")}_requireAnimationsToBeLoaded(){if(this._dotLottieLoader.animationsMap.size===0)throw g("No animations have been loaded.")}async play(t,e){var i,n;if(["initial","loading"].includes(this._currentState)){L("Player unable to play whilst loading.");return}if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),this._lottie&&!t){this._lottie.playDirection===-1&&this._lottie.currentFrame===0?this._lottie.goToAndPlay(this._lottie.totalFrames,!0):this._lottie.play(),this.setCurrentState("playing");return}if(typeof t=="number"){let r=(i=this._dotLottieLoader.manifest)==null?void 0:i.animations[t];if(!r)throw g("animation not found.");typeof e=="function"?await this.render({id:r.id,...e(this._getPlaybackOptions(),this._getOptionsFromAnimation(r))}):await this.render({id:r.id});}if(typeof t=="string"){let r=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations.find(o=>o.id===t);if(!r)throw g("animation not found.");typeof e=="function"?await this.render({id:r.id,...e(this._getPlaybackOptions(),this._getOptionsFromAnimation(r))}):await this.render({id:r.id});}}playSegments(t,e){if(!this._lottie||["loading"].includes(this._currentState)){L("playSegments() Can't use whilst loading.");return}this._lottie.playSegments(t,e),this.setCurrentState("playing");}resetSegments(t){if(!this._lottie||["loading"].includes(this._currentState)){L("resetSegments() Can't use whilst loading.");return}this._lottie.resetSegments(t);}togglePlay(){this.currentState==="playing"?this.pause():this.play();}_getAnimationByIdOrIndex(t){var e,i;if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),typeof t=="number"){let n=(e=this._dotLottieLoader.manifest)==null?void 0:e.animations[t];if(!n)throw g("animation not found.");return n}if(typeof t=="string"){let n=(i=this._dotLottieLoader.manifest)==null?void 0:i.animations.find(r=>r.id===t);if(!n)throw g("animation not found.");return n}throw g("first param must be a number or string")}get activeAnimationId(){return this._getActiveAnimationId()}get currentAnimationId(){return this._currentAnimationId}get activeStateId(){return this._activeStateId}async _startInteractivity(t){if(!this._inInteractiveMode){tt("Can't start interactivity. Not in interactive mode. Call enterInteractiveMode(stateId: string) to start.");return}if(this._dotLottieLoader.stateMachinesMap.size===0&&await this._dotLottieLoader.getStateMachines(),this._dotLottieLoader.stateMachinesMap.size===0)throw g("No interactivity states are available.");if(t==="undefined")throw g("stateId is not specified.");this._stateMachineManager||(this._stateMachineManager=await De(Array.from(this._dotLottieLoader.stateMachinesMap.values()),this)),this._stateMachineManager.start(t);}enterInteractiveMode(t){var e;if(t)this._inInteractiveMode||(this._prevUserPlaybackOptions={...this._userPlaybackOptions}),this._inInteractiveMode&&((e=this._stateMachineManager)==null||e.stop()),this._activeStateId=t,this._inInteractiveMode=!0,this._startInteractivity(t);else throw g("stateId must be a non-empty string.")}exitInteractiveMode(){var t;this._inInteractiveMode&&(this._inInteractiveMode=!1,this._activeStateId="",(t=this._stateMachineManager)==null||t.stop(),this._userPlaybackOptions={},this._userPlaybackOptions={...this._prevUserPlaybackOptions},this._prevUserPlaybackOptions={},this.reset());}reset(){var t;let e=this._getActiveAnimationId(),i=(t=this._dotLottieLoader.manifest)==null?void 0:t.animations.find(n=>n.id===e);if(this._inInteractiveMode&&this.exitInteractiveMode(),!i)throw g("animation not found.");this.play(e);}previous(t){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw g("manifest not found.");if(this._inInteractiveMode){L("previous() is not supported in interactive mode.");return}let e=this._dotLottieLoader.manifest.animations.findIndex(n=>n.id===this._currentAnimationId);if(e===-1)throw g("animation not found.");let i=this._dotLottieLoader.manifest.animations[(e-1+this._dotLottieLoader.manifest.animations.length)%this._dotLottieLoader.manifest.animations.length];if(!i||!i.id)throw g("animation not found.");typeof t=="function"?this.render({id:i.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(i))}):this.render({id:i.id});}next(t){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw g("manifest not found.");if(this._inInteractiveMode){L("next() is not supported in interactive mode.");return}let e=this._dotLottieLoader.manifest.animations.findIndex(n=>n.id===this._currentAnimationId);if(e===-1)throw g("animation not found.");let i=this._dotLottieLoader.manifest.animations[(e+1)%this._dotLottieLoader.manifest.animations.length];if(!i||!i.id)throw g("animation not found.");typeof t=="function"?this.render({id:i.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(i))}):this.render({id:i.id});}getManifest(){return this._dotLottieLoader.manifest}resize(){if(!this._lottie||["loading"].includes(this._currentState)){L("resize() Can't use whilst loading.");return}this._lottie.resize();}stop(){if(!this._lottie||["loading"].includes(this._currentState)){L("stop() Can't use whilst loading.");return}this.clearCountTimer(),this._counter=0,this._setPlayerState(()=>({direction:this._getOption("direction")})),this._lottie.stop(),this.setCurrentState("stopped");}pause(){if(!this._lottie||["loading"].includes(this._currentState)){L("pause() Can't use whilst loading.");return}this.clearCountTimer(),this._lottie.pause(),this.setCurrentState("paused");}freeze(){if(!this._lottie||["loading"].includes(this._currentState)){L("freeze() Can't use whilst loading.");return}this.currentState!=="frozen"&&(this._stateBeforeFreeze=this.currentState),this._lottie.pause(),this.setCurrentState("frozen");}unfreeze(){if(!this._lottie||["loading"].includes(this._currentState)){L("unfreeze() Can't use whilst loading.");return}this._stateBeforeFreeze==="playing"?this.play():this.pause();}destroy(){var t,e;(t=this._container)!=null&&t.__lottie&&(this._container.__lottie.destroy(),this._container.__lottie=null),this._audios.length&&(this._audios.forEach(i=>{i.unload();}),this._audios=[]),this.clearCountTimer(),typeof document<"u"&&document.removeEventListener("visibilitychange",()=>this._onVisibilityChange()),this._counter=0,(e=this._lottie)==null||e.destroy(),this._lottie=void 0;}getAnimationInstance(){return this._lottie}static getLottieWebVersion(){return `${Xi.dependencies["lottie-web"]}`}addEventListener(t,e){var i,n,r;this._listeners.has(t)||this._listeners.set(t,new Set),(i=this._listeners.get(t))==null||i.add(e);try{t==="complete"?(n=this._container)==null||n.addEventListener(t,e):(r=this._lottie)==null||r.addEventListener(t,e);}catch(o){tt(`addEventListener ${o}`);}}getState(){var t,e,i,n,r,o,a;return {autoplay:(e=(t=this._lottie)==null?void 0:t.autoplay)!=null?e:!1,currentState:this._currentState,frame:this._frame,visibilityPercentage:this._visibilityPercentage,seeker:this._seeker,direction:(n=(i=this._lottie)==null?void 0:i.playDirection)!=null?n:1,hover:this._hover,loop:this._loop||!1,playMode:this._mode,speed:(o=(r=this._lottie)==null?void 0:r.playSpeed)!=null?o:1,background:this._background,intermission:this._intermission,defaultTheme:this._defaultTheme,currentAnimationId:this._currentAnimationId,activeStateId:(a=this._activeStateId)!=null?a:""}}_notify(){this.state.setState(this.getState());}get totalFrames(){var t;return ((t=this._lottie)==null?void 0:t.totalFrames)||0}get direction(){return this._lottie?this._lottie.playDirection:1}setDirection(t){this._requireValidDirection(t),this._setPlayerState(()=>({direction:t})),this._userPlaybackOptions.direction=t;}get speed(){var t;return ((t=this._lottie)==null?void 0:t.playSpeed)||1}setSpeed(t){this._requireValidSpeed(t),this._setPlayerState(()=>({speed:t})),this._userPlaybackOptions.speed=t;}get autoplay(){var t,e;return (e=(t=this._lottie)==null?void 0:t.autoplay)!=null?e:!1}setAutoplay(t){if(this._requireValidAutoplay(t),!this._lottie||["loading"].includes(this._currentState)){L("setAutoplay() Can't use whilst loading.");return}this._setPlayerState(()=>({autoplay:t})),this._userPlaybackOptions.autoplay=t;}toggleAutoplay(){if(!this._lottie||["loading"].includes(this._currentState)){L("toggleAutoplay() Can't use whilst loading.");return}this.setAutoplay(!this._lottie.autoplay);}get defaultTheme(){return this._defaultTheme}setDefaultTheme(t){this._setPlayerState(()=>({defaultTheme:t})),this._userPlaybackOptions.defaultTheme=t,this._animation&&this.render();}get loop(){return this._loop}setLoop(t){this._requireValidLoop(t),this._setPlayerState(()=>({loop:t})),this._userPlaybackOptions.loop=t;}toggleLoop(){if(!this._lottie||["loading"].includes(this._currentState)){L("toggleLoop() Can't use whilst loading.");return}this.setLoop(!this._loop);}get background(){return this._background}setBackground(t){this._requireValidBackground(t),this._background=t,this._container&&(this._container.style.backgroundColor=t);}get _frame(){return this._lottie?this.currentState==="completed"?this.direction===-1?0:this._lottie.totalFrames:this._lottie.currentFrame:0}get _seeker(){return this._lottie?this._frame/this._lottie.totalFrames*100:0}async revertToManifestValues(t){var e;let i;!Array.isArray(t)||t.length===0?i=["autoplay","defaultTheme","direction","hover","intermission","loop","playMode","speed","activeAnimationId"]:i=t;let n=!1;if(i.includes("activeAnimationId")){let r=(e=this._dotLottieLoader.manifest)==null?void 0:e.activeAnimationId,o=this._getAnimationByIdOrIndex(r||0);this._activeAnimationId=r,await this._setCurrentAnimation(o.id),n=!0;}i.forEach(r=>{switch(r){case"autoplay":delete this._userPlaybackOptions.autoplay,this.setAutoplay(this._getOption("autoplay"));break;case"defaultTheme":delete this._userPlaybackOptions.defaultTheme,this.setDefaultTheme(this._getOption("defaultTheme"));break;case"direction":delete this._userPlaybackOptions.direction,this.setDirection(this._getOption("direction"));break;case"hover":delete this._userPlaybackOptions.hover,this.setHover(this._getOption("hover"));break;case"intermission":delete this._userPlaybackOptions.intermission,this.setIntermission(this._getOption("intermission"));break;case"loop":delete this._userPlaybackOptions.loop,this.setLoop(this._getOption("loop"));break;case"playMode":delete this._userPlaybackOptions.playMode,this.setMode(this._getOption("playMode")),this.setDirection(this._getOption("direction"));break;case"speed":delete this._userPlaybackOptions.speed,this.setSpeed(this._getOption("speed"));break}}),n&&this.render();}removeEventListener(t,e){var i,n,r;try{t==="complete"?(i=this._container)==null||i.removeEventListener(t,e):(n=this._lottie)==null||n.removeEventListener(t,e),(r=this._listeners.get(t))==null||r.delete(e);}catch(o){tt("removeEventListener",o);}}_handleAnimationComplete(){var t;typeof this._loop=="number"&&this.stop();let e=this.direction===-1?0:this.totalFrames;this.goToAndStop(e,!0),this._counter=0,this.clearCountTimer(),this.setCurrentState("completed"),(t=this._container)==null||t.dispatchEvent(new Event("complete"));}addEventListeners(){var t;if(!this._lottie||["loading"].includes(this._currentState)){L("addEventListeners() Can't use whilst loading.");return}this._lottie.addEventListener("enterFrame",()=>{var e;if(!this._lottie){L("enterFrame event : Lottie is undefined.");return}Math.floor(this._lottie.currentFrame)===0&&this.direction===-1&&((e=this._container)==null||e.dispatchEvent(new Event("complete")),this.loop||this.setCurrentState("completed")),this._notify();}),this._lottie.addEventListener("loopComplete",()=>{var e;if(!this._lottie){L("loopComplete event : Lottie is undefined.");return}(e=this._container)==null||e.dispatchEvent(new Event("loopComplete")),this.intermission>0&&this.pause();let i=this._lottie.playDirection;if(typeof this._loop=="number"&&this._loop>0&&(this._counter+=this._mode==="bounce"?.5:1,this._counter>=this._loop)){this._handleAnimationComplete();return}this._mode==="bounce"&&typeof i=="number"&&(i=Number(i)*-1);let n=i===-1?this._lottie.totalFrames-1:0;this.intermission?(this.goToAndPlay(n,!0),this.pause(),this._counterInterval=window.setTimeout(()=>{this._lottie&&(this._setPlayerState(()=>({direction:i})),this.goToAndPlay(n,!0));},this._intermission)):(this._setPlayerState(()=>({direction:i})),this.goToAndPlay(i===-1?this.totalFrames-1:0,!0));}),this._lottie.addEventListener("complete",()=>{if(this._lottie&&this._loop===!1&&this._mode==="bounce"){if(this._counter+=.5,this._counter>=1){this._handleAnimationComplete();return}this._counterInterval=window.setTimeout(()=>{if(!this._lottie)return;let e=this._lottie.playDirection;this._mode==="bounce"&&typeof e=="number"&&(e=Number(e)*-1);let i=e===-1?this.totalFrames-1:0;this._setPlayerState(()=>({direction:e})),this.goToAndPlay(i,!0);},this._intermission);}else this._handleAnimationComplete();});for(let[e,i]of this._listeners)if(e==="complete")for(let n of i)(t=this._container)==null||t.addEventListener(e,n);else for(let n of i)this._lottie.addEventListener(e,n);}async _setCurrentAnimation(t){this._currentState="loading";let e=await this._dotLottieLoader.getAnimation(t);this._currentAnimationId=t,this._animation=e,this._currentState="ready";}async _getAudioFactory(){if(this._animation&&Ae(this._animation)){let{DotLottieAudio:t}=await import('./dotlottie-audio-75C54RUV.mjs');return e=>{let i=new t({src:[e]});return this._audios.push(i),i}}return null}async render(t){var e,i,n,r,o,a,s,l,h,u,d,f,p,m,c,v,_,S;if(t!=null&&t.id)await this._setCurrentAnimation(t.id);else if(!this._animation)throw g("no animation selected");let y=(e=$.loop)!=null?e:!1,E=(i=$.autoplay)!=null?i:!1,M=(n=$.playMode)!=null?n:"normal",D=(r=$.intermission)!=null?r:0,I=(o=$.hover)!=null?o:!1,F=(a=$.direction)!=null?a:1,j=(s=$.speed)!=null?s:1,q=(l=$.defaultTheme)!=null?l:"";y=(h=t==null?void 0:t.loop)!=null?h:this._getOption("loop"),E=(u=t==null?void 0:t.autoplay)!=null?u:this._getOption("autoplay"),M=(d=t==null?void 0:t.playMode)!=null?d:this._getOption("playMode"),D=(f=t==null?void 0:t.intermission)!=null?f:this._getOption("intermission"),I=(p=t==null?void 0:t.hover)!=null?p:this._getOption("hover"),F=(m=t==null?void 0:t.direction)!=null?m:this._getOption("direction"),j=(c=t==null?void 0:t.speed)!=null?c:this._getOption("speed"),q=(v=t==null?void 0:t.defaultTheme)!=null?v:this._getOption("defaultTheme");let A={...this._animationConfig,autoplay:I?!1:E,loop:typeof y=="number"?!0:y,renderer:this._worker?"svg":(_=this._animationConfig.renderer)!=null?_:"svg"},[k,B,W]=await Promise.all([this._dotLottieLoader.getTheme(q),this._getLottiePlayerInstance(),this._getAudioFactory()]);if(k&&this._animation?this._animation=await Ee(this._animation,k):this._animation=await this._dotLottieLoader.getAnimation((S=this._currentAnimationId)!=null?S:""),this._activeStateId&&!this._inInteractiveMode){this.enterInteractiveMode(this._activeStateId);return}this.destroy(),this._setPlayerState(()=>({defaultTheme:q,playMode:M,intermission:D,hover:I,loop:y})),W?this._lottie=B.loadAnimation({...A,container:this._container,animationData:this._animation,audioFactory:W}):this._lottie=B.loadAnimation({...A,container:this._container,animationData:this._animation}),typeof this._lottie.resetSegments>"u"&&(this._lottie.resetSegments=()=>{var N;(N=this._lottie)==null||N.playSegments([0,this._lottie.totalFrames],!0);}),this.addEventListeners(),this._container&&(this._container.__lottie=this._lottie),this._setPlayerState(()=>({direction:F,speed:j})),E&&!I&&this.play(),this._updateTestData();}async _getLottiePlayerInstance(){var t;let e=(t=this._animationConfig.renderer)!=null?t:"svg",i;if(this._worker)return e!=="svg"&&L("Worker is only supported with svg renderer. Change or remove renderer prop to get rid of this warning."),i=await import('./lottie_worker-Q23FJ6ZR-YP5OKMTN.mjs'),i.default;switch(e){case"svg":{this._light?i=await import('./lottie_light-KMJEUZFY-TNG7ODX7.mjs'):i=await import('./lottie_svg-MJGYILXD-NRTSROOT.mjs');break}case"canvas":{this._light?i=await import('./lottie_light_canvas-B5UTTNXA-PRI6IBWW.mjs'):i=await import('./lottie_canvas-CDSUBMCL-MZNYH5VV.mjs');break}case"html":{this._light?i=await import('./lottie_light_html-SLCECTRT-SYWXEBDN.mjs'):i=await import('./lottie_html-X3TYKVQI-L6774NQS.mjs');break}default:throw new Error(`Invalid renderer: ${e}`)}return i.default}_getActiveAnimationId(){var t,e,i,n;let r=this._dotLottieLoader.manifest;return (n=(i=(t=this._activeAnimationId)!=null?t:r==null?void 0:r.activeAnimationId)!=null?i:(e=r==null?void 0:r.animations[0])==null?void 0:e.id)!=null?n:void 0}async load(t){if(this._currentState==="loading"){L("Loading in progress..");return}try{if(this.setCurrentState("loading"),typeof this._src=="string")if(Pe(this._src)){let i=JSON.parse(this._src);this._dotLottieLoader.loadFromLottieJSON(i);}else {let i=new URL(this._src,window.location.href);await this._dotLottieLoader.loadFromUrl(i.toString());}else if(typeof this._src=="object"&&ot(this._src))this._dotLottieLoader.loadFromLottieJSON(this._src);else throw g("Invalid src provided");if(!this._dotLottieLoader.manifest)throw g("No manifest found");let e=this._getActiveAnimationId();if(!e)throw g("No active animation found");await this._setCurrentAnimation(e),await this.render(t);}catch(e){this.setCurrentState("error"),e instanceof Error&&tt(`Error loading animation: ${e.message}`);}}setErrorState(t){this.setCurrentState("error"),tt(t);}_requireValidDirection(t){if(t!==-1&&t!==1)throw g("Direction can only be -1 (backwards) or 1 (forwards)")}_requireValidIntermission(t){if(t<0||!Number.isInteger(t))throw g("intermission must be a positive number")}_requireValidLoop(t){if(typeof t=="number"&&(!Number.isInteger(t)||t<0))throw g("loop must be a positive number or boolean")}_requireValidSpeed(t){if(typeof t!="number")throw g("speed must be a number")}_requireValidBackground(t){if(typeof t!="string")throw g("background must be a string")}_requireValidAutoplay(t){if(typeof t!="boolean")throw g("autoplay must be a boolean")}_requireValidPlaybackOptions(t){t.direction&&this._requireValidDirection(t.direction),t.intermission&&this._requireValidIntermission(t.intermission),t.loop&&this._requireValidLoop(t.loop),t.speed&&this._requireValidSpeed(t.speed);}};

export { g as a, tt as b, L as c, nn as d, Yi as e, Zi as f, tn as g, $ as h, en as i, bn as j };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-4FUEJKE4.mjs.map