@lottiefiles/dotlottie-web
Advanced tools
Comparing version 0.14.1 to 0.15.0
@@ -1,4 +0,4 @@ | ||
var wi=Object.defineProperty;var Ti=(w,s,a)=>s in w?wi(w,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):w[s]=a;var P=(w,s,a)=>(Ti(w,typeof s!="symbol"?s+"":s,a),a);var Ye=class{requestAnimationFrame(s){return requestAnimationFrame(s)}cancelAnimationFrame(s){cancelAnimationFrame(s);}},Ne=class{constructor(){P(this,"_lastHandleId",0);P(this,"_lastImmediate",null);}requestAnimationFrame(s){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{s(Date.now());}),this._lastHandleId}cancelAnimationFrame(s){this._lastImmediate&&clearImmediate(this._lastImmediate);}},Fe=class{constructor(){P(this,"_strategy");this._strategy=typeof requestAnimationFrame=="function"?new Ye:new Ne;}requestAnimationFrame(s){return this._strategy.requestAnimationFrame(s)}cancelAnimationFrame(s){this._strategy.cancelAnimationFrame(s);}};var qe=typeof window<"u"&&typeof window.document<"u";var me={name:"@lottiefiles/dotlottie-web",version:"0.14.1",type:"module",description:"Lottie and DotLottie player for the web",repository:{type:"git",url:"git+https://github.com/LottieFiles/dotlottie-web.git",directory:"packages/web"},homepage:"https://github.com/LottieFiles/dotlottie-web#readme",bugs:"https://github.com/LottieFiles/dotlottie-web/issues",author:"LottieFiles",contributors:["Abdelrahman Ashraf <a.theashraf@gmail.com>"],license:"MIT",engines:{node:">=18"},main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:["dotlottie","lottie","player","animation","web","canvas","javascript","thorvg"],scripts:{build:"tsup",dev:"tsup --watch",lint:"eslint --fix .","stats:eslint":"cross-env TIMING=1 eslint .","stats:ts":"tsc -p tsconfig.build.json --extendedDiagnostics",test:"vitest run --browser.headless","test:coverage":"vitest run --browser.headless --coverage","test:watch":"vitest","type-check":"tsc --noEmit"},devDependencies:{"@types/node":"^20.10.5","@vitest/browser":"^1.1.0","@vitest/coverage-istanbul":"^1.1.0","cross-env":"7.0.3",tsup:"8.0.1",typescript:"5.0.4",vitest:"^1.1.0",webdriverio:"^8.27.0"},publishConfig:{access:"public"}};var $i=(()=>{var w=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(s={}){var a=s,g,k;a.ready=new Promise((e,t)=>{g=e,k=t;});var Z=Object.assign({},a),Je="./this.program",Ke=!0,I="";function Bt(e){return a.locateFile?a.locateFile(e,I):I+e}(typeof document<"u"&&document.currentScript&&(I=document.currentScript.src),w&&(I=w),I.indexOf("blob:")!==0?I=I.substr(0,I.replace(/[?#].*/,"").lastIndexOf("/")+1):I="",(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{if(n.status==200||n.status==0&&n.response){t(n.response);return}r();},n.onerror=r,n.send(null);});var Yt=a.print||console.log.bind(console),Q=a.printErr||console.error.bind(console);Object.assign(a,Z),Z=null,a.arguments&&(a.arguments),a.thisProgram&&(Je=a.thisProgram),a.quit&&(a.quit);var ae;a.wasmBinary&&(ae=a.wasmBinary),typeof WebAssembly!="object"&&le("no native wasm support detected");var ge,Ze=!1,j,M,ee,oe,A,b,Qe,et;function tt(){var e=ge.buffer;a.HEAP8=j=new Int8Array(e),a.HEAP16=ee=new Int16Array(e),a.HEAPU8=M=new Uint8Array(e),a.HEAPU16=oe=new Uint16Array(e),a.HEAP32=A=new Int32Array(e),a.HEAPU32=b=new Uint32Array(e),a.HEAPF32=Qe=new Float32Array(e),a.HEAPF64=et=new Float64Array(e);}var rt=[],nt=[],it=[];function Gt(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)Kt(a.preRun.shift());Re(rt);}function Xt(){Re(nt);}function Jt(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Qt(a.postRun.shift());Re(it);}function Kt(e){rt.unshift(e);}function Zt(e){nt.unshift(e);}function Qt(e){it.unshift(e);}var Y=0,se=null;function er(e){Y++,a.monitorRunDependencies?.(Y);}function tr(e){if(Y--,a.monitorRunDependencies?.(Y),Y==0&&(se)){var t=se;se=null,t();}}function le(e){a.onAbort?.(e),e="Aborted("+e+")",Q(e),Ze=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw k(t),t}var rr="data:application/octet-stream;base64,",at=e=>e.startsWith(rr),te;te="DotLottiePlayer.wasm",at(te)||(te=Bt(te));function ot(e){if(e==te&&ae)return new Uint8Array(ae);throw "both async and sync fetching of the wasm failed"}function nr(e){return !ae&&(Ke)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw "failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>ot(e)):Promise.resolve().then(()=>ot(e))}function st(e,t,r){return nr(e).then(n=>WebAssembly.instantiate(n,t)).then(n=>n).then(r,n=>{Q(`failed to asynchronously prepare wasm: ${n}`),le(n);})}function ir(e,t,r,n){return !e&&typeof WebAssembly.instantiateStreaming=="function"&&!at(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(i=>{var o=WebAssembly.instantiateStreaming(i,r);return o.then(n,function(u){return Q(`wasm streaming compile failed: ${u}`),Q("falling back to ArrayBuffer instantiation"),st(t,r,n)})}):st(t,r,n)}function ar(){var e={a:Qn};function t(n,i){return C=n.exports,ge=C.Z,tt(),wt=C.aa,Zt(C._),tr(),C}er();function r(n){t(n.instance);}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(n){Q(`Module.instantiateWasm callback failed with error: ${n}`),k(n);}return ir(ae,te,e,r).catch(k),{}}var Re=e=>{for(;e.length>0;)e.shift()(a);};a.noExitRuntime||!0;var lt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ut=(e,t,r)=>{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&<)return lt.decode(e.subarray(t,i));for(var o="";t<i;){var u=e[t++];if(!(u&128)){o+=String.fromCharCode(u);continue}var l=e[t++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|l);continue}var c=e[t++]&63;if((u&240)==224?u=(u&15)<<12|l<<6|c:u=(u&7)<<18|l<<12|c<<6|e[t++]&63,u<65536)o+=String.fromCharCode(u);else {var f=u-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023);}}return o},N=(e,t)=>e?ut(M,e,t):"",or=(e,t,r,n)=>{le(`Assertion failed: ${N(e)}, at: `+[t?N(t):"unknown filename",r,n?N(n):"unknown function"]);};function sr(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){b[this.ptr+4>>2]=t;},this.get_type=function(){return b[this.ptr+4>>2]},this.set_destructor=function(t){b[this.ptr+8>>2]=t;},this.get_destructor=function(){return b[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,j[this.ptr+12>>0]=t;},this.get_caught=function(){return j[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,j[this.ptr+13>>0]=t;},this.get_rethrown=function(){return j[this.ptr+13>>0]!=0},this.init=function(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r);},this.set_adjusted_ptr=function(t){b[this.ptr+16>>2]=t;},this.get_adjusted_ptr=function(){return b[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=kt(this.get_type());if(t)return b[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr};}var dt=0,ur=(e,t,r)=>{var n=new sr(e);throw n.init(t,r),dt=e,dt};function dr(e,t,r){return 0}var ct=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3;}return t},ft=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,o=r+n-1,u=0;u<e.length;++u){var l=e.charCodeAt(u);if(l>=55296&&l<=57343){var c=e.charCodeAt(++u);l=65536+((l&1023)<<10)|c&1023;}if(l<=127){if(r>=o)break;t[r++]=l;}else if(l<=2047){if(r+1>=o)break;t[r++]=192|l>>6,t[r++]=128|l&63;}else if(l<=65535){if(r+2>=o)break;t[r++]=224|l>>12,t[r++]=128|l>>6&63,t[r++]=128|l&63;}else {if(r+3>=o)break;t[r++]=240|l>>18,t[r++]=128|l>>12&63,t[r++]=128|l>>6&63,t[r++]=128|l&63;}}return t[r]=0,r-i},cr=(e,t,r)=>ft(e,M,t,r),fr=(e,t)=>{};function vr(e,t,r){return 0}function pr(e,t,r,n){}var ye={},Se=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t);}};function xe(e){return this.fromWireType(A[e>>2])}var ne={},q={},be={},vt,Ce=e=>{throw new vt(e)},G=(e,t,r)=>{e.forEach(function(l){be[l]=t;});function n(l){var c=r(l);c.length!==e.length&&Ce("Mismatched type converter count");for(var f=0;f<e.length;++f)O(e[f],c[f]);}var i=new Array(t.length),o=[],u=0;t.forEach((l,c)=>{q.hasOwnProperty(l)?i[c]=q[l]:(o.push(l),ne.hasOwnProperty(l)||(ne[l]=[]),ne[l].push(()=>{i[c]=q[l],++u,u===o.length&&n(i);}));}),o.length===0&&n(i);},hr=e=>{var t=ye[e];delete ye[e];var r=t.rawConstructor,n=t.rawDestructor,i=t.fields,o=i.map(u=>u.getterReturnType).concat(i.map(u=>u.setterArgumentType));G([e],o,u=>{var l={};return i.forEach((c,f)=>{var v=c.fieldName,h=u[f],m=c.getter,_=c.getterContext,E=u[f+i.length],R=c.setter,T=c.setterContext;l[v]={read:x=>h.fromWireType(m(_,x)),write:(x,d)=>{var p=[];R(T,x,E.toWireType(p,d)),Se(p);}};}),[{name:t.name,fromWireType:c=>{var f={};for(var v in l)f[v]=l[v].read(c);return n(c),f},toWireType:(c,f)=>{for(var v in l)if(!(v in f))throw new TypeError(`Missing field: "${v}"`);var h=r();for(v in l)l[v].write(h,f[v]);return c!==null&&c.push(n,h),h},argPackAdvance:W,readValueFromPointer:xe,destructorFunction:n}]});},mr=(e,t,r,n,i)=>{},_r=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);pt=e;},pt,L=e=>{for(var t="",r=e;M[r];)t+=pt[M[r++]];return t},ie,y=e=>{throw new ie(e)};function gr(e,t,r={}){var n=t.name;if(e||y(`type "${n}" must have a positive integer typeid pointer`),q.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;y(`Cannot register type '${n}' twice`);}if(q[e]=t,delete be[e],ne.hasOwnProperty(e)){var i=ne[e];delete ne[e],i.forEach(o=>o());}}function O(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return gr(e,t,r)}var W=8,yr=(e,t,r,n)=>{t=L(t),O(e,{name:t,fromWireType:function(i){return !!i},toWireType:function(i,o){return o?r:n},argPackAdvance:W,readValueFromPointer:function(i){return this.fromWireType(M[i])},destructorFunction:null});},br=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),ke=e=>{function t(r){return r.$$.ptrType.registeredClass.name}y(t(e)+" instance already deleted");},De=!1,ht=e=>{},Cr=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr);},mt=e=>{e.count.value-=1;var t=e.count.value===0;t&&Cr(e);},_t=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var n=_t(e,t,r.baseClass);return n===null?null:r.downcast(n)},gt={},wr=()=>Object.keys(ce).length,Tr=()=>{var e=[];for(var t in ce)ce.hasOwnProperty(t)&&e.push(ce[t]);return e},ue=[],je=()=>{for(;ue.length;){var e=ue.pop();e.$$.deleteScheduled=!1,e.delete();}},de,Er=e=>{de=e,ue.length&&de&&de(je);},$r=()=>{a.getInheritedInstanceCount=wr,a.getLiveInheritedInstances=Tr,a.flushPendingDeletes=je,a.setDelayFunction=Er;},ce={},Pr=(e,t)=>{for(t===void 0&&y("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Fr=(e,t)=>(t=Pr(e,t),ce[t]),we=(e,t)=>{(!t.ptrType||!t.ptr)&&Ce("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&Ce("Both smartPtrType and smartPtr must be specified"),t.count={value:1},fe(Object.create(e,{$$:{value:t,writable:!0}}))};function Ar(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Fr(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?we(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):we(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o=this.registeredClass.getActualType(t),u=gt[o];if(!u)return i.call(this);var l;this.isConst?l=u.constPointerType:l=u.pointerType;var c=_t(t,this.registeredClass,l.registeredClass);return c===null?i.call(this):this.isSmartPointer?we(l.registeredClass.instancePrototype,{ptrType:l,ptr:c,smartPtrType:this,smartPtr:e}):we(l.registeredClass.instancePrototype,{ptrType:l,ptr:c})}var fe=e=>typeof FinalizationRegistry>"u"?(fe=t=>t,e):(De=new FinalizationRegistry(t=>{mt(t.$$);}),fe=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var i={$$:r};De.register(t,i,t);}return t},ht=t=>De.unregister(t),fe(e)),Mr=()=>{Object.assign(Te.prototype,{isAliasOf(e){if(!(this instanceof Te)||!(e instanceof Te))return !1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||ke(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=fe(Object.create(Object.getPrototypeOf(this),{$$:{value:br(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||ke(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&y("Object already scheduled for deletion"),ht(this),mt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0);},isDeleted(){return !this.$$.ptr},deleteLater(){return this.$$.ptr||ke(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&y("Object already scheduled for deletion"),ue.push(this),ue.length===1&&de&&de(je),this.$$.deleteScheduled=!0,this}});};function Te(){}var ve=(e,t)=>Object.defineProperty(t,"name",{value:e}),yt=(e,t,r)=>{if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||y(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n;}},bt=(e,t,r)=>{a.hasOwnProperty(e)?((r===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[r]!==void 0)&&y(`Cannot register public name '${e}' twice`),yt(a,e,e),a.hasOwnProperty(r)&&y(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),a[e].overloadTable[r]=t):(a[e]=t,r!==void 0&&(a[e].numArguments=r));},Lr=48,Rr=57,Sr=e=>{if(e===void 0)return "_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Lr&&t<=Rr?`_${e}`:e};function xr(e,t,r,n,i,o,u,l){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=u,this.downcast=l,this.pureVirtualFunctions=[];}var Ie=(e,t,r)=>{for(;t!==r;)t.upcast||y(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function kr(e,t){if(t===null)return this.isReference&&y(`null is not a valid ${this.name}`),0;t.$$||y(`Cannot pass "${He(t)}" as a ${this.name}`),t.$$.ptr||y(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Ie(t.$$.ptr,r,this.registeredClass);return n}function Dr(e,t){var r;if(t===null)return this.isReference&&y(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&y(`Cannot pass "${He(t)}" as a ${this.name}`),t.$$.ptr||y(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&y(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=Ie(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&y("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:y(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else {var i=t.clone();r=this.rawShare(r,X.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,r);}break;default:y("Unsupporting sharing policy");}return r}function jr(e,t){if(t===null)return this.isReference&&y(`null is not a valid ${this.name}`),0;t.$$||y(`Cannot pass "${He(t)}" as a ${this.name}`),t.$$.ptr||y(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&y(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Ie(t.$$.ptr,r,this.registeredClass);return n}function Ct(e){return this.fromWireType(b[e>>2])}var Ir=()=>{Object.assign(pe.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e);},argPackAdvance:W,readValueFromPointer:Ct,deleteObject(e){e!==null&&e.delete();},fromWireType:Ar});};function pe(e,t,r,n,i,o,u,l,c,f,v){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=l,this.rawConstructor=c,this.rawShare=f,this.rawDestructor=v,!i&&t.baseClass===void 0?n?(this.toWireType=kr,this.destructorFunction=null):(this.toWireType=jr,this.destructorFunction=null):this.toWireType=Dr;}var Or=(e,t,r)=>{a.hasOwnProperty(e)||Ce("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&r!==void 0?a[e].overloadTable[r]=t:(a[e]=t,a[e].argCount=r);},Wr=(e,t,r)=>{var n=a["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},wt,U=e=>wt.get(e),Ur=(e,t,r)=>{if(e.includes("j"))return Wr(e,t,r);var n=U(t).apply(null,r);return n},Hr=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Ur(e,t,r)}},S=(e,t)=>{e=L(e);function r(){return e.includes("j")?Hr(e,t):U(t)}var n=r();return typeof n!="function"&&y(`unknown function pointer with signature ${e}: ${t}`),n},Br=(e,t)=>{var r=ve(t,function(n){this.name=t,this.message=n;var i=new Error(n).stack;i!==void 0&&(this.stack=this.toString()+` | ||
var wi=Object.defineProperty;var Ti=(w,s,a)=>s in w?wi(w,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):w[s]=a;var P=(w,s,a)=>(Ti(w,typeof s!="symbol"?s+"":s,a),a);var Ye=class{requestAnimationFrame(s){return requestAnimationFrame(s)}cancelAnimationFrame(s){cancelAnimationFrame(s);}},Ne=class{constructor(){P(this,"_lastHandleId",0);P(this,"_lastImmediate",null);}requestAnimationFrame(s){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{s(Date.now());}),this._lastHandleId}cancelAnimationFrame(s){this._lastImmediate&&clearImmediate(this._lastImmediate);}},Fe=class{constructor(){P(this,"_strategy");this._strategy=typeof requestAnimationFrame=="function"?new Ye:new Ne;}requestAnimationFrame(s){return this._strategy.requestAnimationFrame(s)}cancelAnimationFrame(s){this._strategy.cancelAnimationFrame(s);}};var qe=typeof window<"u"&&typeof window.document<"u";var me={name:"@lottiefiles/dotlottie-web",version:"0.15.0",type:"module",description:"Lottie and DotLottie player for the web",repository:{type:"git",url:"git+https://github.com/LottieFiles/dotlottie-web.git",directory:"packages/web"},homepage:"https://github.com/LottieFiles/dotlottie-web#readme",bugs:"https://github.com/LottieFiles/dotlottie-web/issues",author:"LottieFiles",contributors:["Abdelrahman Ashraf <a.theashraf@gmail.com>"],license:"MIT",engines:{node:">=18"},main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:["dotlottie","lottie","player","animation","web","canvas","javascript","thorvg"],scripts:{build:"tsup",dev:"tsup --watch",lint:"eslint --fix .","stats:eslint":"cross-env TIMING=1 eslint .","stats:ts":"tsc -p tsconfig.build.json --extendedDiagnostics",test:"vitest run --browser.headless","test:coverage":"vitest run --browser.headless --coverage","test:watch":"vitest","type-check":"tsc --noEmit"},devDependencies:{"@types/node":"^20.10.5","@vitest/browser":"^1.2.2 ","@vitest/coverage-istanbul":"^1.2.2","cross-env":"7.0.3",tsup:"8.0.1",typescript:"5.0.4",vitest:"^1.2.2",webdriverio:"^8.32.0"},publishConfig:{access:"public"}};var $i=(()=>{var w=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(s={}){var a=s,g,k;a.ready=new Promise((e,t)=>{g=e,k=t;});var Z=Object.assign({},a),Je="./this.program",Ke=!0,I="";function Bt(e){return a.locateFile?a.locateFile(e,I):I+e}(typeof document<"u"&&document.currentScript&&(I=document.currentScript.src),w&&(I=w),I.indexOf("blob:")!==0?I=I.substr(0,I.replace(/[?#].*/,"").lastIndexOf("/")+1):I="",(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{if(n.status==200||n.status==0&&n.response){t(n.response);return}r();},n.onerror=r,n.send(null);});var Yt=a.print||console.log.bind(console),Q=a.printErr||console.error.bind(console);Object.assign(a,Z),Z=null,a.arguments&&(a.arguments),a.thisProgram&&(Je=a.thisProgram),a.quit&&(a.quit);var ae;a.wasmBinary&&(ae=a.wasmBinary),typeof WebAssembly!="object"&&le("no native wasm support detected");var ge,Ze=!1,j,M,ee,oe,A,b,Qe,et;function tt(){var e=ge.buffer;a.HEAP8=j=new Int8Array(e),a.HEAP16=ee=new Int16Array(e),a.HEAPU8=M=new Uint8Array(e),a.HEAPU16=oe=new Uint16Array(e),a.HEAP32=A=new Int32Array(e),a.HEAPU32=b=new Uint32Array(e),a.HEAPF32=Qe=new Float32Array(e),a.HEAPF64=et=new Float64Array(e);}var rt=[],nt=[],it=[];function Gt(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)Kt(a.preRun.shift());Re(rt);}function Xt(){Re(nt);}function Jt(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)Qt(a.postRun.shift());Re(it);}function Kt(e){rt.unshift(e);}function Zt(e){nt.unshift(e);}function Qt(e){it.unshift(e);}var Y=0,se=null;function er(e){Y++,a.monitorRunDependencies?.(Y);}function tr(e){if(Y--,a.monitorRunDependencies?.(Y),Y==0&&(se)){var t=se;se=null,t();}}function le(e){a.onAbort?.(e),e="Aborted("+e+")",Q(e),Ze=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw k(t),t}var rr="data:application/octet-stream;base64,",at=e=>e.startsWith(rr),te;te="DotLottiePlayer.wasm",at(te)||(te=Bt(te));function ot(e){if(e==te&&ae)return new Uint8Array(ae);throw "both async and sync fetching of the wasm failed"}function nr(e){return !ae&&(Ke)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw "failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>ot(e)):Promise.resolve().then(()=>ot(e))}function st(e,t,r){return nr(e).then(n=>WebAssembly.instantiate(n,t)).then(n=>n).then(r,n=>{Q(`failed to asynchronously prepare wasm: ${n}`),le(n);})}function ir(e,t,r,n){return !e&&typeof WebAssembly.instantiateStreaming=="function"&&!at(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(i=>{var o=WebAssembly.instantiateStreaming(i,r);return o.then(n,function(u){return Q(`wasm streaming compile failed: ${u}`),Q("falling back to ArrayBuffer instantiation"),st(t,r,n)})}):st(t,r,n)}function ar(){var e={a:Qn};function t(n,i){return C=n.exports,ge=C.Z,tt(),wt=C.aa,Zt(C._),tr(),C}er();function r(n){t(n.instance);}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(n){Q(`Module.instantiateWasm callback failed with error: ${n}`),k(n);}return ir(ae,te,e,r).catch(k),{}}var Re=e=>{for(;e.length>0;)e.shift()(a);};a.noExitRuntime||!0;var lt=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ut=(e,t,r)=>{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&<)return lt.decode(e.subarray(t,i));for(var o="";t<i;){var u=e[t++];if(!(u&128)){o+=String.fromCharCode(u);continue}var l=e[t++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|l);continue}var c=e[t++]&63;if((u&240)==224?u=(u&15)<<12|l<<6|c:u=(u&7)<<18|l<<12|c<<6|e[t++]&63,u<65536)o+=String.fromCharCode(u);else {var f=u-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023);}}return o},N=(e,t)=>e?ut(M,e,t):"",or=(e,t,r,n)=>{le(`Assertion failed: ${N(e)}, at: `+[t?N(t):"unknown filename",r,n?N(n):"unknown function"]);};function sr(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){b[this.ptr+4>>2]=t;},this.get_type=function(){return b[this.ptr+4>>2]},this.set_destructor=function(t){b[this.ptr+8>>2]=t;},this.get_destructor=function(){return b[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,j[this.ptr+12>>0]=t;},this.get_caught=function(){return j[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,j[this.ptr+13>>0]=t;},this.get_rethrown=function(){return j[this.ptr+13>>0]!=0},this.init=function(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r);},this.set_adjusted_ptr=function(t){b[this.ptr+16>>2]=t;},this.get_adjusted_ptr=function(){return b[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=kt(this.get_type());if(t)return b[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr};}var dt=0,ur=(e,t,r)=>{var n=new sr(e);throw n.init(t,r),dt=e,dt};function dr(e,t,r){return 0}var ct=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3;}return t},ft=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,o=r+n-1,u=0;u<e.length;++u){var l=e.charCodeAt(u);if(l>=55296&&l<=57343){var c=e.charCodeAt(++u);l=65536+((l&1023)<<10)|c&1023;}if(l<=127){if(r>=o)break;t[r++]=l;}else if(l<=2047){if(r+1>=o)break;t[r++]=192|l>>6,t[r++]=128|l&63;}else if(l<=65535){if(r+2>=o)break;t[r++]=224|l>>12,t[r++]=128|l>>6&63,t[r++]=128|l&63;}else {if(r+3>=o)break;t[r++]=240|l>>18,t[r++]=128|l>>12&63,t[r++]=128|l>>6&63,t[r++]=128|l&63;}}return t[r]=0,r-i},cr=(e,t,r)=>ft(e,M,t,r),fr=(e,t)=>{};function vr(e,t,r){return 0}function pr(e,t,r,n){}var ye={},Se=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t);}};function xe(e){return this.fromWireType(A[e>>2])}var ne={},q={},be={},vt,Ce=e=>{throw new vt(e)},G=(e,t,r)=>{e.forEach(function(l){be[l]=t;});function n(l){var c=r(l);c.length!==e.length&&Ce("Mismatched type converter count");for(var f=0;f<e.length;++f)O(e[f],c[f]);}var i=new Array(t.length),o=[],u=0;t.forEach((l,c)=>{q.hasOwnProperty(l)?i[c]=q[l]:(o.push(l),ne.hasOwnProperty(l)||(ne[l]=[]),ne[l].push(()=>{i[c]=q[l],++u,u===o.length&&n(i);}));}),o.length===0&&n(i);},hr=e=>{var t=ye[e];delete ye[e];var r=t.rawConstructor,n=t.rawDestructor,i=t.fields,o=i.map(u=>u.getterReturnType).concat(i.map(u=>u.setterArgumentType));G([e],o,u=>{var l={};return i.forEach((c,f)=>{var v=c.fieldName,h=u[f],m=c.getter,_=c.getterContext,E=u[f+i.length],R=c.setter,T=c.setterContext;l[v]={read:x=>h.fromWireType(m(_,x)),write:(x,d)=>{var p=[];R(T,x,E.toWireType(p,d)),Se(p);}};}),[{name:t.name,fromWireType:c=>{var f={};for(var v in l)f[v]=l[v].read(c);return n(c),f},toWireType:(c,f)=>{for(var v in l)if(!(v in f))throw new TypeError(`Missing field: "${v}"`);var h=r();for(v in l)l[v].write(h,f[v]);return c!==null&&c.push(n,h),h},argPackAdvance:W,readValueFromPointer:xe,destructorFunction:n}]});},mr=(e,t,r,n,i)=>{},_r=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);pt=e;},pt,L=e=>{for(var t="",r=e;M[r];)t+=pt[M[r++]];return t},ie,y=e=>{throw new ie(e)};function gr(e,t,r={}){var n=t.name;if(e||y(`type "${n}" must have a positive integer typeid pointer`),q.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;y(`Cannot register type '${n}' twice`);}if(q[e]=t,delete be[e],ne.hasOwnProperty(e)){var i=ne[e];delete ne[e],i.forEach(o=>o());}}function O(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return gr(e,t,r)}var W=8,yr=(e,t,r,n)=>{t=L(t),O(e,{name:t,fromWireType:function(i){return !!i},toWireType:function(i,o){return o?r:n},argPackAdvance:W,readValueFromPointer:function(i){return this.fromWireType(M[i])},destructorFunction:null});},br=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),ke=e=>{function t(r){return r.$$.ptrType.registeredClass.name}y(t(e)+" instance already deleted");},De=!1,ht=e=>{},Cr=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr);},mt=e=>{e.count.value-=1;var t=e.count.value===0;t&&Cr(e);},_t=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var n=_t(e,t,r.baseClass);return n===null?null:r.downcast(n)},gt={},wr=()=>Object.keys(ce).length,Tr=()=>{var e=[];for(var t in ce)ce.hasOwnProperty(t)&&e.push(ce[t]);return e},ue=[],je=()=>{for(;ue.length;){var e=ue.pop();e.$$.deleteScheduled=!1,e.delete();}},de,Er=e=>{de=e,ue.length&&de&&de(je);},$r=()=>{a.getInheritedInstanceCount=wr,a.getLiveInheritedInstances=Tr,a.flushPendingDeletes=je,a.setDelayFunction=Er;},ce={},Pr=(e,t)=>{for(t===void 0&&y("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Fr=(e,t)=>(t=Pr(e,t),ce[t]),we=(e,t)=>{(!t.ptrType||!t.ptr)&&Ce("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&Ce("Both smartPtrType and smartPtr must be specified"),t.count={value:1},fe(Object.create(e,{$$:{value:t,writable:!0}}))};function Ar(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Fr(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?we(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):we(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o=this.registeredClass.getActualType(t),u=gt[o];if(!u)return i.call(this);var l;this.isConst?l=u.constPointerType:l=u.pointerType;var c=_t(t,this.registeredClass,l.registeredClass);return c===null?i.call(this):this.isSmartPointer?we(l.registeredClass.instancePrototype,{ptrType:l,ptr:c,smartPtrType:this,smartPtr:e}):we(l.registeredClass.instancePrototype,{ptrType:l,ptr:c})}var fe=e=>typeof FinalizationRegistry>"u"?(fe=t=>t,e):(De=new FinalizationRegistry(t=>{mt(t.$$);}),fe=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var i={$$:r};De.register(t,i,t);}return t},ht=t=>De.unregister(t),fe(e)),Mr=()=>{Object.assign(Te.prototype,{isAliasOf(e){if(!(this instanceof Te)||!(e instanceof Te))return !1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||ke(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=fe(Object.create(Object.getPrototypeOf(this),{$$:{value:br(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||ke(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&y("Object already scheduled for deletion"),ht(this),mt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0);},isDeleted(){return !this.$$.ptr},deleteLater(){return this.$$.ptr||ke(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&y("Object already scheduled for deletion"),ue.push(this),ue.length===1&&de&&de(je),this.$$.deleteScheduled=!0,this}});};function Te(){}var ve=(e,t)=>Object.defineProperty(t,"name",{value:e}),yt=(e,t,r)=>{if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||y(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n;}},bt=(e,t,r)=>{a.hasOwnProperty(e)?((r===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[r]!==void 0)&&y(`Cannot register public name '${e}' twice`),yt(a,e,e),a.hasOwnProperty(r)&&y(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),a[e].overloadTable[r]=t):(a[e]=t,r!==void 0&&(a[e].numArguments=r));},Lr=48,Rr=57,Sr=e=>{if(e===void 0)return "_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Lr&&t<=Rr?`_${e}`:e};function xr(e,t,r,n,i,o,u,l){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=u,this.downcast=l,this.pureVirtualFunctions=[];}var Ie=(e,t,r)=>{for(;t!==r;)t.upcast||y(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function kr(e,t){if(t===null)return this.isReference&&y(`null is not a valid ${this.name}`),0;t.$$||y(`Cannot pass "${He(t)}" as a ${this.name}`),t.$$.ptr||y(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Ie(t.$$.ptr,r,this.registeredClass);return n}function Dr(e,t){var r;if(t===null)return this.isReference&&y(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&y(`Cannot pass "${He(t)}" as a ${this.name}`),t.$$.ptr||y(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&y(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=Ie(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&y("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:y(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else {var i=t.clone();r=this.rawShare(r,X.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,r);}break;default:y("Unsupporting sharing policy");}return r}function jr(e,t){if(t===null)return this.isReference&&y(`null is not a valid ${this.name}`),0;t.$$||y(`Cannot pass "${He(t)}" as a ${this.name}`),t.$$.ptr||y(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&y(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Ie(t.$$.ptr,r,this.registeredClass);return n}function Ct(e){return this.fromWireType(b[e>>2])}var Ir=()=>{Object.assign(pe.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e);},argPackAdvance:W,readValueFromPointer:Ct,deleteObject(e){e!==null&&e.delete();},fromWireType:Ar});};function pe(e,t,r,n,i,o,u,l,c,f,v){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=l,this.rawConstructor=c,this.rawShare=f,this.rawDestructor=v,!i&&t.baseClass===void 0?n?(this.toWireType=kr,this.destructorFunction=null):(this.toWireType=jr,this.destructorFunction=null):this.toWireType=Dr;}var Or=(e,t,r)=>{a.hasOwnProperty(e)||Ce("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&r!==void 0?a[e].overloadTable[r]=t:(a[e]=t,a[e].argCount=r);},Wr=(e,t,r)=>{var n=a["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},wt,U=e=>wt.get(e),Ur=(e,t,r)=>{if(e.includes("j"))return Wr(e,t,r);var n=U(t).apply(null,r);return n},Hr=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Ur(e,t,r)}},S=(e,t)=>{e=L(e);function r(){return e.includes("j")?Hr(e,t):U(t)}var n=r();return typeof n!="function"&&y(`unknown function pointer with signature ${e}: ${t}`),n},Br=(e,t)=>{var r=ve(t,function(n){this.name=t,this.message=n;var i=new Error(n).stack;i!==void 0&&(this.stack=this.toString()+` | ||
`+i.replace(/^Error(:[^\n]*)?\n/,""));});return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Tt,Et=e=>{var t=xt(e),r=L(t);return H(t),r},Oe=(e,t)=>{var r=[],n={};function i(o){if(!n[o]&&!q[o]){if(be[o]){be[o].forEach(i);return}r.push(o),n[o]=!0;}}throw t.forEach(i),new Tt(`${e}: `+r.map(Et).join([", "]))},zr=(e,t,r,n,i,o,u,l,c,f,v,h,m)=>{v=L(v),o=S(i,o),l&&(l=S(u,l)),f&&(f=S(c,f)),m=S(h,m);var _=Sr(v);bt(_,function(){Oe(`Cannot construct ${v} due to unbound types`,[n]);}),G([e,t,r],n?[n]:[],function(E){var Pe;E=E[0];var R,T;n?(R=E.registeredClass,T=R.instancePrototype):T=Te.prototype;var x=ve(v,function(){if(Object.getPrototypeOf(this)!==d)throw new ie("Use 'new' to construct "+v);if(p.constructor_body===void 0)throw new ie(v+" has no accessible constructor");var It=p.constructor_body[arguments.length];if(It===void 0)throw new ie(`Tried to invoke ctor of ${v} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return It.apply(this,arguments)}),d=Object.create(T,{constructor:{value:x}});x.prototype=d;var p=new xr(v,x,d,m,R,o,l,f);p.baseClass&&((Pe=p.baseClass).__derivedClasses??(Pe.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var $=new pe(v,p,!0,!1,!1),F=new pe(v+"*",p,!1,!1,!1),J=new pe(v+" const*",p,!1,!0,!1);return gt[e]={pointerType:F,constPointerType:J},Or(_,x),[$,F,J]});},$t=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(b[t+n*4>>2]);return r};function Vr(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return !0;return !1}function Pt(e,t,r,n,i,o){var u=t.length;u<2&&y("argTypes array size mismatch! Must at least get return value and 'this' types!");var l=t[1]!==null&&r!==null,c=Vr(t),f=t[0].name!=="void",v=u-2,h=new Array(v),m=[],_=[],E=function(){arguments.length!==v&&y(`function ${e} called with ${arguments.length} arguments, expected ${v}`),_.length=0;var R;m.length=l?2:1,m[0]=i,l&&(R=t[1].toWireType(_,this),m[1]=R);for(var T=0;T<v;++T)h[T]=t[T+2].toWireType(_,arguments[T]),m.push(h[T]);var x=n.apply(null,m);function d(p){if(c)Se(_);else for(var $=l?1:2;$<t.length;$++){var F=$===1?R:h[$-2];t[$].destructorFunction!==null&&t[$].destructorFunction(F);}if(f)return t[0].fromWireType(p)}return d(x)};return ve(e,E)}var Yr=(e,t,r,n,i,o)=>{var u=$t(t,r);i=S(n,i),G([],[e],function(l){l=l[0];var c=`constructor ${l.name}`;if(l.registeredClass.constructor_body===void 0&&(l.registeredClass.constructor_body=[]),l.registeredClass.constructor_body[t-1]!==void 0)throw new ie(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${l.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return l.registeredClass.constructor_body[t-1]=()=>{Oe(`Cannot construct ${l.name} due to unbound types`,u);},G([],u,f=>(f.splice(1,0,null),l.registeredClass.constructor_body[t-1]=Pt(c,f,null,i,o),[])),[]});},Nr=e=>{e=e.trim();let t=e.indexOf("(");return t!==-1?e.substr(0,t):e},qr=(e,t,r,n,i,o,u,l,c)=>{var f=$t(r,n);t=L(t),t=Nr(t),o=S(i,o),G([],[e],function(v){v=v[0];var h=`${v.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),l&&v.registeredClass.pureVirtualFunctions.push(t);function m(){Oe(`Cannot call ${h} due to unbound types`,f);}var _=v.registeredClass.instancePrototype,E=_[t];return E===void 0||E.overloadTable===void 0&&E.className!==v.name&&E.argCount===r-2?(m.argCount=r-2,m.className=v.name,_[t]=m):(yt(_,t,h),_[t].overloadTable[r-2]=m),G([],f,function(R){var T=Pt(h,R,v,o,u);return _[t].overloadTable===void 0?(T.argCount=r-2,_[t]=T):_[t].overloadTable[r-2]=T,[]}),[]});};function Gr(){Object.assign(Ft.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e);}});}function Ft(){this.allocated=[void 0],this.freelist=[];}var D=new Ft,We=e=>{e>=D.reserved&&--D.get(e).refcount===0&&D.free(e);},Xr=()=>{for(var e=0,t=D.reserved;t<D.allocated.length;++t)D.allocated[t]!==void 0&&++e;return e},Jr=()=>{D.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),D.reserved=D.allocated.length,a.count_emval_handles=Xr;},X={toValue:e=>(e||y("Cannot use deleted val. handle = "+e),D.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return D.allocate({refcount:1,value:e})}}},Kr=(e,t)=>{t=L(t),O(e,{name:t,fromWireType:r=>{var n=X.toValue(r);return We(r),n},toWireType:(r,n)=>X.toHandle(n),argPackAdvance:W,readValueFromPointer:xe,destructorFunction:null});},Zr=(e,t,r)=>{switch(t){case 1:return r?function(n){return this.fromWireType(j[n>>0])}:function(n){return this.fromWireType(M[n>>0])};case 2:return r?function(n){return this.fromWireType(ee[n>>1])}:function(n){return this.fromWireType(oe[n>>1])};case 4:return r?function(n){return this.fromWireType(A[n>>2])}:function(n){return this.fromWireType(b[n>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Qr=(e,t,r,n)=>{t=L(t);function i(){}i.values={},O(e,{name:t,constructor:i,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,u)=>u.value,argPackAdvance:W,readValueFromPointer:Zr(t,r,n),destructorFunction:null}),bt(t,i);},Ue=(e,t)=>{var r=q[e];return r===void 0&&y(t+" has unknown type "+Et(e)),r},en=(e,t,r)=>{var n=Ue(e,"enum");t=L(t);var i=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:ve(`${n.name}_${t}`,function(){})}});i.values[r]=o,i[t]=o;},He=e=>{if(e===null)return "null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},tn=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(Qe[r>>2])};case 8:return function(r){return this.fromWireType(et[r>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},rn=(e,t,r)=>{t=L(t),O(e,{name:t,fromWireType:n=>n,toWireType:(n,i)=>i,argPackAdvance:W,readValueFromPointer:tn(t,r),destructorFunction:null});},nn=(e,t,r)=>{switch(t){case 1:return r?n=>j[n>>0]:n=>M[n>>0];case 2:return r?n=>ee[n>>1]:n=>oe[n>>1];case 4:return r?n=>A[n>>2]:n=>b[n>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},an=(e,t,r,n,i)=>{t=L(t);var o=v=>v;if(n===0){var u=32-8*r;o=v=>v<<u>>>u;}var l=t.includes("unsigned"),c=(v,h)=>{},f;l?f=function(v,h){return c(h,this.name),h>>>0}:f=function(v,h){return c(h,this.name),h},O(e,{name:t,fromWireType:o,toWireType:f,argPackAdvance:W,readValueFromPointer:nn(t,r,n!==0),destructorFunction:null});},on=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=n[t];function o(u){var l=b[u>>2],c=b[u+4>>2];return new i(j.buffer,c,l)}r=L(r),O(e,{name:r,fromWireType:o,argPackAdvance:W,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0});},sn=(e,t,r,n,i,o,u,l,c,f,v,h)=>{r=L(r),o=S(i,o),l=S(u,l),f=S(c,f),h=S(v,h),G([e],[t],function(m){m=m[0];var _=new pe(r,m.registeredClass,!1,!1,!0,m,n,o,l,f,h);return [_]});},ln=(e,t)=>{t=L(t);var r=t==="std::string";O(e,{name:t,fromWireType(n){var i=b[n>>2],o=n+4,u;if(r)for(var l=o,c=0;c<=i;++c){var f=o+c;if(c==i||M[f]==0){var v=f-l,h=N(l,v);u===void 0?u=h:(u+="\0",u+=h),l=f+1;}}else {for(var m=new Array(i),c=0;c<i;++c)m[c]=String.fromCharCode(M[o+c]);u=m.join("");}return H(n),u},toWireType(n,i){i instanceof ArrayBuffer&&(i=new Uint8Array(i));var o,u=typeof i=="string";u||i instanceof Uint8Array||i instanceof Uint8ClampedArray||i instanceof Int8Array||y("Cannot pass non-string to std::string"),r&&u?o=ct(i):o=i.length;var l=Ve(4+o+1),c=l+4;if(b[l>>2]=o,r&&u)cr(i,c,o+1);else if(u)for(var f=0;f<o;++f){var v=i.charCodeAt(f);v>255&&(H(c),y("String has UTF-16 code units that do not fit in 8 bits")),M[c+f]=v;}else for(var f=0;f<o;++f)M[c+f]=i[f];return n!==null&&n.push(H,l),l},argPackAdvance:W,readValueFromPointer:Ct,destructorFunction(n){H(n);}});},At=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,un=(e,t)=>{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&oe[n];)++n;if(r=n<<1,r-e>32&&At)return At.decode(M.subarray(e,r));for(var o="",u=0;!(u>=t/2);++u){var l=ee[e+u*2>>1];if(l==0)break;o+=String.fromCharCode(l);}return o},dn=(e,t,r)=>{if(r??(r=2147483647),r<2)return 0;r-=2;for(var n=t,i=r<e.length*2?r/2:e.length,o=0;o<i;++o){var u=e.charCodeAt(o);ee[t>>1]=u,t+=2;}return ee[t>>1]=0,t-n},cn=e=>e.length*2,fn=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=A[e+r*4>>2];if(i==0)break;if(++r,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023);}else n+=String.fromCharCode(i);}return n},vn=(e,t,r)=>{if(r??(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,o=0;o<e.length;++o){var u=e.charCodeAt(o);if(u>=55296&&u<=57343){var l=e.charCodeAt(++o);u=65536+((u&1023)<<10)|l&1023;}if(A[t>>2]=u,t+=4,t+4>i)break}return A[t>>2]=0,t-n},pn=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4;}return t},hn=(e,t,r)=>{r=L(r);var n,i,o,u,l;t===2?(n=un,i=dn,u=cn,o=()=>oe,l=1):t===4&&(n=fn,i=vn,u=pn,o=()=>b,l=2),O(e,{name:r,fromWireType:c=>{for(var f=b[c>>2],v=o(),h,m=c+4,_=0;_<=f;++_){var E=c+4+_*t;if(_==f||v[E>>l]==0){var R=E-m,T=n(m,R);h===void 0?h=T:(h+="\0",h+=T),m=E+t;}}return H(c),h},toWireType:(c,f)=>{typeof f!="string"&&y(`Cannot pass non-string to C++ string type ${r}`);var v=u(f),h=Ve(4+v+t);return b[h>>2]=v>>l,i(f,h+4,v+t),c!==null&&c.push(H,h),h},argPackAdvance:W,readValueFromPointer:xe,destructorFunction(c){H(c);}});},mn=(e,t,r,n,i,o)=>{ye[e]={name:L(t),rawConstructor:S(r,n),rawDestructor:S(i,o),fields:[]};},_n=(e,t,r,n,i,o,u,l,c,f)=>{ye[e].fields.push({fieldName:L(t),getterReturnType:r,getter:S(n,i),getterContext:o,setterArgumentType:u,setter:S(l,c),setterContext:f});},gn=(e,t)=>{t=L(t),O(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}});},yn=()=>{throw 1/0},Be=[],bn=(e,t,r,n)=>(e=Be[e],t=X.toValue(t),e(null,t,r,n)),Cn=e=>{var t=Be.length;return Be.push(e),t},wn=(e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Ue(b[t+n*4>>2],"parameter "+n);return r},Tn=Reflect.construct,En=(e,t,r)=>{var n=[],i=e.toWireType(n,r);return n.length&&(b[t>>2]=X.toHandle(n)),i},$n=(e,t,r)=>{var n=wn(e,t),i=n.shift();e--;var o=new Array(e),u=(c,f,v,h)=>{for(var m=0,_=0;_<e;++_)o[_]=n[_].readValueFromPointer(h+m),m+=n[_].argPackAdvance;for(var E=r===1?Tn(f,o):f.apply(c,o),_=0;_<e;++_)n[_].deleteObject?.(o[_]);return En(i,v,E)},l=`methodCaller<(${n.map(c=>c.name).join(", ")}) => ${i.name}>`;return Cn(ve(l,u))},Pn=e=>{e>4&&(D.get(e).refcount+=1);},Fn=e=>{var t=X.toValue(e);Se(t),We(e);},An=(e,t)=>{e=Ue(e,"_emval_take_value");var r=e.readValueFromPointer(t);return X.toHandle(r)},Mn=()=>{le("");},Mt;Mt=()=>performance.now();var Ln=(e,t,r)=>M.copyWithin(e,t,t+r),Rn=()=>2147483648,Sn=e=>{var t=ge.buffer,r=(e-t.byteLength+65535)/65536;try{return ge.grow(r),tt(),1}catch{}},xn=e=>{var t=M.length;e>>>=0;var r=Rn();if(e>r)return !1;for(var n=(c,f)=>c+(f-c%f)%f,i=1;i<=4;i*=2){var o=t*(1+.2/i);o=Math.min(o,e+100663296);var u=Math.min(r,n(Math.max(e,o),65536)),l=Sn(u);if(l)return !0}return !1},ze={},kn=()=>Je||"./this.program",he=()=>{if(!he.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:kn()};for(var r in ze)ze[r]===void 0?delete t[r]:t[r]=ze[r];var n=[];for(var r in t)n.push(`${r}=${t[r]}`);he.strings=n;}return he.strings},Dn=(e,t)=>{for(var r=0;r<e.length;++r)j[t++>>0]=e.charCodeAt(r);j[t>>0]=0;},jn=(e,t)=>{var r=0;return he().forEach((n,i)=>{var o=t+r;b[e+i*4>>2]=o,Dn(n,o),r+=n.length+1;}),0},In=(e,t)=>{var r=he();b[e>>2]=r.length;var n=0;return r.forEach(i=>n+=i.length+1),b[t>>2]=n,0},On=e=>52,Wn=(e,t,r,n)=>52;function Hn(e,t,r,n,i){return 70}var Bn=[null,[],[]],zn=(e,t)=>{var r=Bn[e];t===0||t===10?((e===1?Yt:Q)(ut(r,0)),r.length=0):r.push(t);},Vn=(e,t,r,n)=>{for(var i=0,o=0;o<r;o++){var u=b[t>>2],l=b[t+4>>2];t+=8;for(var c=0;c<l;c++)zn(e,M[u+c]);i+=l;}return b[n>>2]=i,0},Yn=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return e=>crypto.getRandomValues(e);le("initRandomDevice");},Lt=e=>(Lt=Yn())(e),Nn=(e,t)=>(Lt(M.subarray(e,e+t)),0),Ee=e=>e%4===0&&(e%100!==0||e%400===0),qn=(e,t)=>{for(var r=0,n=0;n<=t;r+=e[n++]);return r},Rt=[31,29,31,30,31,30,31,31,30,31,30,31],St=[31,28,31,30,31,30,31,31,30,31,30,31],Gn=(e,t)=>{for(var r=new Date(e.getTime());t>0;){var n=Ee(r.getFullYear()),i=r.getMonth(),o=(n?Rt:St)[i];if(t>o-r.getDate())t-=o-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+t),r}return r};function Xn(e,t,r){var n=r>0?r:ct(e)+1,i=new Array(n),o=ft(e,i,0,i.length);return t&&(i.length=o),i}var Jn=(e,t)=>{j.set(e,t);},Kn=(e,t,r,n)=>{var i=b[n+40>>2],o={tm_sec:A[n>>2],tm_min:A[n+4>>2],tm_hour:A[n+8>>2],tm_mday:A[n+12>>2],tm_mon:A[n+16>>2],tm_year:A[n+20>>2],tm_wday:A[n+24>>2],tm_yday:A[n+28>>2],tm_isdst:A[n+32>>2],tm_gmtoff:A[n+36>>2],tm_zone:i?N(i):""},u=N(r),l={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in l)u=u.replace(new RegExp(c,"g"),l[c]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],v=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(d,p,$){for(var F=typeof d=="number"?d.toString():d||"";F.length<p;)F=$[0]+F;return F}function m(d,p){return h(d,p,"0")}function _(d,p){function $(J){return J<0?-1:J>0?1:0}var F;return (F=$(d.getFullYear()-p.getFullYear()))===0&&(F=$(d.getMonth()-p.getMonth()))===0&&(F=$(d.getDate()-p.getDate())),F}function E(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function R(d){var p=Gn(new Date(d.tm_year+1900,0,1),d.tm_yday),$=new Date(p.getFullYear(),0,4),F=new Date(p.getFullYear()+1,0,4),J=E($),Pe=E(F);return _(J,p)<=0?_(Pe,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var T={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>v[d.tm_mon].substring(0,3),"%B":d=>v[d.tm_mon],"%C":d=>{var p=d.tm_year+1900;return m(p/100|0,2)},"%d":d=>m(d.tm_mday,2),"%e":d=>h(d.tm_mday,2," "),"%g":d=>R(d).toString().substring(2),"%G":d=>R(d),"%H":d=>m(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),m(p,2)},"%j":d=>m(d.tm_mday+qn(Ee(d.tm_year+1900)?Rt:St,d.tm_mon-1),3),"%m":d=>m(d.tm_mon+1,2),"%M":d=>m(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>m(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return m(Math.floor(p/7),2)},"%V":d=>{var p=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&p++,p){if(p==53){var F=(d.tm_wday+371-d.tm_yday)%7;F!=4&&(F!=3||!Ee(d.tm_year))&&(p=1);}}else {p=52;var $=(d.tm_wday+7-d.tm_yday-1)%7;($==4||$==5&&Ee(d.tm_year%400-1))&&p++;}return m(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return m(Math.floor(p/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var p=d.tm_gmtoff,$=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,($?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};u=u.replace(/%%/g,"\0\0");for(var c in T)u.includes(c)&&(u=u.replace(new RegExp(c,"g"),T[c](o)));u=u.replace(/\0\0/g,"%");var x=Xn(u,!1);return x.length>t?0:(Jn(x,e),x.length-1)},Zn=(e,t,r,n,i)=>Kn(e,t,r,n);vt=a.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError";}},_r(),ie=a.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError";}},Mr(),$r(),Ir(),Tt=a.UnboundTypeError=Br(Error,"UnboundTypeError"),Gr(),Jr();var Qn={a:or,i:ur,r:dr,I:fr,L:vr,M:pr,Y:hr,D:mr,R:yr,x:zr,v:Yr,e:qr,Q:Kr,z:Qr,l:en,t:rn,g:an,c:on,X:sn,u:ln,p:hn,y:mn,k:_n,S:gn,F:yn,W:bn,B:We,V:$n,o:Pn,U:Fn,n:An,w:Mn,f:Mt,N:Ln,H:xn,O:jn,P:In,s:On,K:Wn,C:Hn,J:Vn,T:Nn,m:gi,d:_i,h:mi,q:yi,j:pi,b:hi,E:bi,A:Ci,G:Zn},C=ar(),Ve=e=>(Ve=C.$)(e),H=e=>(H=C.ba)(e),xt=e=>(xt=C.ca)(e),B=(e,t)=>(B=C.da)(e,t),z=()=>(z=C.ea)(),V=e=>(V=C.fa)(e),kt=e=>(kt=C.ga)(e);a.dynCall_iijj=(e,t,r,n,i,o)=>(a.dynCall_iijj=C.ha)(e,t,r,n,i,o);a.dynCall_vijj=(e,t,r,n,i,o)=>(a.dynCall_vijj=C.ia)(e,t,r,n,i,o);a.dynCall_jii=(e,t,r)=>(a.dynCall_jii=C.ja)(e,t,r);var Dt=a.dynCall_viiij=(e,t,r,n,i,o)=>(Dt=a.dynCall_viiij=C.ka)(e,t,r,n,i,o);a.dynCall_jiji=(e,t,r,n,i)=>(a.dynCall_jiji=C.la)(e,t,r,n,i);a.dynCall_viijii=(e,t,r,n,i,o,u)=>(a.dynCall_viijii=C.ma)(e,t,r,n,i,o,u);a.dynCall_iiiiij=(e,t,r,n,i,o,u)=>(a.dynCall_iiiiij=C.na)(e,t,r,n,i,o,u);a.dynCall_iiiiijj=(e,t,r,n,i,o,u,l,c)=>(a.dynCall_iiiiijj=C.oa)(e,t,r,n,i,o,u,l,c);a.dynCall_iiiiiijj=(e,t,r,n,i,o,u,l,c,f)=>(a.dynCall_iiiiiijj=C.pa)(e,t,r,n,i,o,u,l,c,f);function pi(e,t){var r=z();try{U(e)(t);}catch(n){if(V(r),n!==n+0)throw n;B(1,0);}}function hi(e,t,r){var n=z();try{U(e)(t,r);}catch(i){if(V(n),i!==i+0)throw i;B(1,0);}}function mi(e,t,r,n){var i=z();try{return U(e)(t,r,n)}catch(o){if(V(i),o!==o+0)throw o;B(1,0);}}function _i(e,t,r){var n=z();try{return U(e)(t,r)}catch(i){if(V(n),i!==i+0)throw i;B(1,0);}}function gi(e,t){var r=z();try{return U(e)(t)}catch(n){if(V(r),n!==n+0)throw n;B(1,0);}}function yi(e,t,r,n,i,o){var u=z();try{return U(e)(t,r,n,i,o)}catch(l){if(V(u),l!==l+0)throw l;B(1,0);}}function bi(e,t,r,n,i){var o=z();try{U(e)(t,r,n,i);}catch(u){if(V(o),u!==u+0)throw u;B(1,0);}}function Ci(e,t,r,n,i,o){var u=z();try{Dt(e,t,r,n,i,o);}catch(l){if(V(u),l!==l+0)throw l;B(1,0);}}var $e;se=function e(){$e||jt(),$e||(se=e);};function jt(){if(Y>0||(Gt(),Y>0))return;function e(){$e||($e=!0,a.calledRun=!0,!Ze&&(Xt(),g(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),Jt()));}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("");},1),e();},1)):e();}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return jt(),s.ready}})(),Ot=$i;var K=class{constructor(){throw new Error("RendererLoader is a static class and cannot be instantiated.")}static async _tryLoad(s){return await Ot({locateFile:()=>s})}static async _loadWithBackup(){return this._ModulePromise||(this._ModulePromise=this._tryLoad(this._wasmURL).catch(async s=>{let a=`https://unpkg.com/${me.name}@${me.version}/dist/dotlottie-player.wasm`;console.warn(`Trying backup URL for WASM loading: ${a}`);try{return await this._tryLoad(a)}catch(g){throw console.error(`Both primary and backup WASM URLs failed. Primary error: ${s.message}, Backup error: ${g.message}`),new Error("WASM loading failed from all sources.")}})),this._ModulePromise}static async load(){return this._loadWithBackup()}static setWasmUrl(s){this._wasmURL=s,this._ModulePromise=null;}};P(K,"_ModulePromise",null),P(K,"_wasmURL",`https://cdn.jsdelivr.net/npm/${me.name}@${me.version}/dist/dotlottie-player.wasm`);var Ae=class{constructor(){P(this,"_eventListeners",new Map);}addEventListener(s,a){let g=this._eventListeners.get(s);g||(g=new Set,this._eventListeners.set(s,g)),g.add(a);}removeEventListener(s,a){let g=this._eventListeners.get(s);g&&(a?(g.delete(a),g.size===0&&this._eventListeners.delete(s)):this._eventListeners.delete(s));}dispatch(s){this._eventListeners.get(s.type)?.forEach(g=>g(s));}removeAllEventListeners(){this._eventListeners.clear();}};var Ge=(w,s)=>w==="reverse"?s.Mode.Reverse:w==="bounce"?s.Mode.Bounce:w==="reverse-bounce"?s.Mode.ReverseBounce:s.Mode.Forward,Xe=(w,s)=>{let a=new s.VectorFloat;return w.length!==2||(a.push_back(w[0]),a.push_back(w[1])),a},Wt=class{constructor(s){P(this,"_canvas");P(this,"_context");P(this,"_eventManager");P(this,"_animationFrameId",null);P(this,"_frameManager");P(this,"_dotLottieCore",null);P(this,"_wasmModule",null);P(this,"_renderConfig",{});P(this,"_isFrozen",!1);P(this,"_backgroundColor",null);this._canvas=s.canvas,this._context=this._canvas.getContext("2d"),this._eventManager=new Ae,this._frameManager=new Fe,this._renderConfig=s.renderConfig??{},K.load().then(a=>{this._wasmModule=a,this._dotLottieCore=new a.DotLottiePlayer({autoplay:s.autoplay??!1,backgroundColor:0,loopAnimation:s.loop??!1,mode:Ge(s.mode??"forward",a),segments:Xe(s.segments??[],a),speed:s.speed??1,useFrameInterpolation:s.useFrameInterpolation??!0}),s.data?this._loadFromData(s.data):s.src&&this._loadFromSrc(s.src),s.backgroundColor&&this.setBackgroundColor(s.backgroundColor);}).catch(a=>{this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to load wasm module: ${a}`)});});}_loadFromSrc(s){async function a(){let g=await fetch(s);if(!g.ok)throw new Error(`Failed to fetch the animation data from URL: ${s}. ${g.status}: ${g.statusText}`);let k=g.headers.get("content-type"),Z;return ["application/json","text/plain"].includes(k??"")?Z=await g.text():Z=await g.arrayBuffer(),Z}a().then(g=>{this._loadFromData(g);}).catch(g=>{this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to load animation data from URL: ${s}. ${g}`)});});}_loadFromData(s){if(this._dotLottieCore===null)return;let a=this._canvas.width,g=this._canvas.height,k=!1;if(typeof s=="string")k=this._dotLottieCore.loadAnimationData(s,a,g);else if(s instanceof ArrayBuffer)k=this._dotLottieCore.loadDotLottieData(s,a,g);else if(typeof s=="object")k=this._dotLottieCore.loadAnimationData(JSON.stringify(s),a,g);else {this._eventManager.dispatch({type:"loadError",error:new Error("Unsupported data type for animation data. Expected a string or ArrayBuffer.")});return}k?(this._eventManager.dispatch({type:"load"}),qe&&this.resize(),this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render(),this._dotLottieCore.config().autoplay&&(this._dotLottieCore.play(),this._dotLottieCore.isPlaying()?(this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this))):console.error("something went wrong, the animation was suppose to autoplay"))):this._eventManager.dispatch({type:"loadError",error:new Error("Failed to load animation data")});}get manifest(){try{let s=this._dotLottieCore?.manifestString();if(this._dotLottieCore===null||!s)return null;let a=JSON.parse(s);return Object.keys(a).length===0?null:a}catch{return null}}get renderConfig(){return this._renderConfig}get segments(){let s=this._dotLottieCore?.config().segments;if(s&&s.size()===2)return [s.get(0),s.get(1)]}get loop(){return this._dotLottieCore?.config().loopAnimation??!1}get mode(){let s=this._dotLottieCore?.config().mode;return s===this._wasmModule?.Mode.Reverse?"reverse":s===this._wasmModule?.Mode.Bounce?"bounce":s===this._wasmModule?.Mode.ReverseBounce?"reverse-bounce":"forward"}get isFrozen(){return this._isFrozen}get backgroundColor(){return this._backgroundColor??""}get autoplay(){return this._dotLottieCore?.config().autoplay??!1}get useFrameInterpolation(){return this._dotLottieCore?.config().useFrameInterpolation??!1}get speed(){return this._dotLottieCore?.config().speed??0}get isLoaded(){return this._dotLottieCore?.isLoaded()??!1}get isPlaying(){return this._dotLottieCore?.isPlaying()??!1}get isPaused(){return this._dotLottieCore?.isPaused()??!1}get isStopped(){return this._dotLottieCore?.isStopped()??!1}get currentFrame(){return this._dotLottieCore?.currentFrame()??0}get loopCount(){return this._dotLottieCore?.loopCount()??0}get totalFrames(){return this._dotLottieCore?.totalFrames()??0}get duration(){return this._dotLottieCore?.duration()??0}load(s){this._dotLottieCore===null||this._wasmModule===null||(this._dotLottieCore.setConfig({autoplay:s.autoplay??!1,backgroundColor:0,loopAnimation:s.loop??!1,mode:Ge(s.mode??"forward",this._wasmModule),segments:Xe(s.segments??[],this._wasmModule),speed:s.speed??1,useFrameInterpolation:s.useFrameInterpolation??!0}),s.data?this._loadFromData(s.data):s.src&&this._loadFromSrc(s.src),this.setBackgroundColor(s.backgroundColor??""));}_render(){if(this._dotLottieCore===null||this._context===null)return !1;if(this._dotLottieCore.render()){let a=this._dotLottieCore.buffer(),g=this._context.createImageData(this._canvas.width,this._canvas.height);return g.data.set(a),this._context.putImageData(g,0,0),this._eventManager.dispatch({type:"render",currentFrame:this._dotLottieCore.currentFrame()}),!0}return !1}_draw(){if(this._dotLottieCore===null||this._context===null||!this._dotLottieCore.isPlaying())return;let s=this._dotLottieCore.requestFrame();this._dotLottieCore.setFrame(s)&&(this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render()&&this._dotLottieCore.isComplete()&&(this._dotLottieCore.config().loopAnimation?this._eventManager.dispatch({type:"loop",loopCount:this._dotLottieCore.loopCount()}):this._eventManager.dispatch({type:"complete"}))),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this));}play(){if(this._dotLottieCore===null)return;let s=this._dotLottieCore.play();this._isFrozen=!1,s&&(this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this)));}pause(){if(this._dotLottieCore===null)return;this._dotLottieCore.pause()&&this._eventManager.dispatch({type:"pause"});}stop(){if(this._dotLottieCore===null)return;this._dotLottieCore.stop()&&(this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render(),this._eventManager.dispatch({type:"stop"}));}setFrame(s){if(this._dotLottieCore===null||s<0||s>this._dotLottieCore.totalFrames())return;this._dotLottieCore.seek(s)&&(this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render());}setSpeed(s){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),speed:s});}setBackgroundColor(s){this._dotLottieCore!==null&&(this._canvas instanceof HTMLCanvasElement&&(this._canvas.style.backgroundColor=s),this._backgroundColor=s);}setLoop(s){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),loopAnimation:s});}setUseFrameInterpolation(s){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),useFrameInterpolation:s});}addEventListener(s,a){this._eventManager.addEventListener(s,a);}removeEventListener(s,a){this._eventManager.removeEventListener(s,a);}destroy(){this._dotLottieCore?.delete(),this._dotLottieCore=null,this._context=null,this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners();}freeze(){this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null,this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}));}unfreeze(){this._animationFrameId===null&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this)),this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}));}resize(){if(!qe||!(this._canvas instanceof HTMLCanvasElement))return;let s=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:a,width:g}=this._canvas.getBoundingClientRect();this._canvas.width=g*s,this._canvas.height=a*s,this._dotLottieCore?.resize(this._canvas.width,this._canvas.height)&&this._render();}setSegments(s,a){this._dotLottieCore===null||this._wasmModule===null||this._dotLottieCore.setConfig({...this._dotLottieCore.config(),segments:Xe([s,a],this._wasmModule)});}setMode(s){this._dotLottieCore===null||this._wasmModule===null||this._dotLottieCore.setConfig({...this._dotLottieCore.config(),mode:Ge(s,this._wasmModule)});}setRenderConfig(s){this._renderConfig=s;}loadAnimation(s){if(this._dotLottieCore===null)return;this._dotLottieCore.loadAnimation(s,this._canvas.width,this._canvas.height)?(this._eventManager.dispatch({type:"load"}),this.resize()):this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to animation :${s}`)});}static setWasmUrl(s){K.setWasmUrl(s);}}; | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>m(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return m(Math.floor(p/7),2)},"%V":d=>{var p=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&p++,p){if(p==53){var F=(d.tm_wday+371-d.tm_yday)%7;F!=4&&(F!=3||!Ee(d.tm_year))&&(p=1);}}else {p=52;var $=(d.tm_wday+7-d.tm_yday-1)%7;($==4||$==5&&Ee(d.tm_year%400-1))&&p++;}return m(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return m(Math.floor(p/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var p=d.tm_gmtoff,$=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,($?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};u=u.replace(/%%/g,"\0\0");for(var c in T)u.includes(c)&&(u=u.replace(new RegExp(c,"g"),T[c](o)));u=u.replace(/\0\0/g,"%");var x=Xn(u,!1);return x.length>t?0:(Jn(x,e),x.length-1)},Zn=(e,t,r,n,i)=>Kn(e,t,r,n);vt=a.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError";}},_r(),ie=a.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError";}},Mr(),$r(),Ir(),Tt=a.UnboundTypeError=Br(Error,"UnboundTypeError"),Gr(),Jr();var Qn={a:or,h:ur,r:dr,I:fr,L:vr,M:pr,Y:hr,D:mr,R:yr,x:zr,v:Yr,e:qr,Q:Kr,z:Qr,l:en,t:rn,g:an,c:on,X:sn,u:ln,p:hn,y:mn,k:_n,S:gn,F:yn,W:bn,B:We,V:$n,o:Pn,U:Fn,n:An,w:Mn,f:Mt,N:Ln,H:xn,O:jn,P:In,s:On,K:Wn,C:Hn,J:Vn,T:Nn,m:gi,d:_i,i:mi,q:yi,j:pi,b:hi,E:bi,A:Ci,G:Zn},C=ar(),Ve=e=>(Ve=C.$)(e),H=e=>(H=C.ba)(e),xt=e=>(xt=C.ca)(e),B=(e,t)=>(B=C.da)(e,t),z=()=>(z=C.ea)(),V=e=>(V=C.fa)(e),kt=e=>(kt=C.ga)(e);a.dynCall_iijj=(e,t,r,n,i,o)=>(a.dynCall_iijj=C.ha)(e,t,r,n,i,o);a.dynCall_vijj=(e,t,r,n,i,o)=>(a.dynCall_vijj=C.ia)(e,t,r,n,i,o);a.dynCall_jii=(e,t,r)=>(a.dynCall_jii=C.ja)(e,t,r);var Dt=a.dynCall_viiij=(e,t,r,n,i,o)=>(Dt=a.dynCall_viiij=C.ka)(e,t,r,n,i,o);a.dynCall_jiji=(e,t,r,n,i)=>(a.dynCall_jiji=C.la)(e,t,r,n,i);a.dynCall_viijii=(e,t,r,n,i,o,u)=>(a.dynCall_viijii=C.ma)(e,t,r,n,i,o,u);a.dynCall_iiiiij=(e,t,r,n,i,o,u)=>(a.dynCall_iiiiij=C.na)(e,t,r,n,i,o,u);a.dynCall_iiiiijj=(e,t,r,n,i,o,u,l,c)=>(a.dynCall_iiiiijj=C.oa)(e,t,r,n,i,o,u,l,c);a.dynCall_iiiiiijj=(e,t,r,n,i,o,u,l,c,f)=>(a.dynCall_iiiiiijj=C.pa)(e,t,r,n,i,o,u,l,c,f);function pi(e,t){var r=z();try{U(e)(t);}catch(n){if(V(r),n!==n+0)throw n;B(1,0);}}function hi(e,t,r){var n=z();try{U(e)(t,r);}catch(i){if(V(n),i!==i+0)throw i;B(1,0);}}function mi(e,t,r,n){var i=z();try{return U(e)(t,r,n)}catch(o){if(V(i),o!==o+0)throw o;B(1,0);}}function _i(e,t,r){var n=z();try{return U(e)(t,r)}catch(i){if(V(n),i!==i+0)throw i;B(1,0);}}function gi(e,t){var r=z();try{return U(e)(t)}catch(n){if(V(r),n!==n+0)throw n;B(1,0);}}function yi(e,t,r,n,i,o){var u=z();try{return U(e)(t,r,n,i,o)}catch(l){if(V(u),l!==l+0)throw l;B(1,0);}}function bi(e,t,r,n,i){var o=z();try{U(e)(t,r,n,i);}catch(u){if(V(o),u!==u+0)throw u;B(1,0);}}function Ci(e,t,r,n,i,o){var u=z();try{Dt(e,t,r,n,i,o);}catch(l){if(V(u),l!==l+0)throw l;B(1,0);}}var $e;se=function e(){$e||jt(),$e||(se=e);};function jt(){if(Y>0||(Gt(),Y>0))return;function e(){$e||($e=!0,a.calledRun=!0,!Ze&&(Xt(),g(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),Jt()));}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("");},1),e();},1)):e();}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return jt(),s.ready}})(),Ot=$i;var K=class{constructor(){throw new Error("RendererLoader is a static class and cannot be instantiated.")}static async _tryLoad(s){return await Ot({locateFile:()=>s})}static async _loadWithBackup(){return this._ModulePromise||(this._ModulePromise=this._tryLoad(this._wasmURL).catch(async s=>{let a=`https://unpkg.com/${me.name}@${me.version}/dist/dotlottie-player.wasm`;console.warn(`Trying backup URL for WASM loading: ${a}`);try{return await this._tryLoad(a)}catch(g){throw console.error(`Both primary and backup WASM URLs failed. Primary error: ${s.message}, Backup error: ${g.message}`),new Error("WASM loading failed from all sources.")}})),this._ModulePromise}static async load(){return this._loadWithBackup()}static setWasmUrl(s){this._wasmURL=s,this._ModulePromise=null;}};P(K,"_ModulePromise",null),P(K,"_wasmURL",`https://cdn.jsdelivr.net/npm/${me.name}@${me.version}/dist/dotlottie-player.wasm`);var Ae=class{constructor(){P(this,"_eventListeners",new Map);}addEventListener(s,a){let g=this._eventListeners.get(s);g||(g=new Set,this._eventListeners.set(s,g)),g.add(a);}removeEventListener(s,a){let g=this._eventListeners.get(s);g&&(a?(g.delete(a),g.size===0&&this._eventListeners.delete(s)):this._eventListeners.delete(s));}dispatch(s){this._eventListeners.get(s.type)?.forEach(g=>g(s));}removeAllEventListeners(){this._eventListeners.clear();}};var Ge=(w,s)=>w==="reverse"?s.Mode.Reverse:w==="bounce"?s.Mode.Bounce:w==="reverse-bounce"?s.Mode.ReverseBounce:s.Mode.Forward,Xe=(w,s)=>{let a=new s.VectorFloat;return w.length!==2||(a.push_back(w[0]),a.push_back(w[1])),a},Wt=class{constructor(s){P(this,"_canvas");P(this,"_context");P(this,"_eventManager");P(this,"_animationFrameId",null);P(this,"_frameManager");P(this,"_dotLottieCore",null);P(this,"_wasmModule",null);P(this,"_renderConfig",{});P(this,"_isFrozen",!1);P(this,"_backgroundColor",null);this._canvas=s.canvas,this._context=this._canvas.getContext("2d"),this._eventManager=new Ae,this._frameManager=new Fe,this._renderConfig=s.renderConfig??{},K.load().then(a=>{this._wasmModule=a,this._dotLottieCore=new a.DotLottiePlayer({autoplay:s.autoplay??!1,backgroundColor:0,loopAnimation:s.loop??!1,mode:Ge(s.mode??"forward",a),segments:Xe(s.segments??[],a),speed:s.speed??1,useFrameInterpolation:s.useFrameInterpolation??!0}),s.data?this._loadFromData(s.data):s.src&&this._loadFromSrc(s.src),s.backgroundColor&&this.setBackgroundColor(s.backgroundColor);}).catch(a=>{this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to load wasm module: ${a}`)});});}_loadFromSrc(s){async function a(){let g=await fetch(s);if(!g.ok)throw new Error(`Failed to fetch the animation data from URL: ${s}. ${g.status}: ${g.statusText}`);let k=g.headers.get("content-type"),Z;return ["application/json","text/plain"].includes(k??"")?Z=await g.text():Z=await g.arrayBuffer(),Z}a().then(g=>{this._loadFromData(g);}).catch(g=>{this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to load animation data from URL: ${s}. ${g}`)});});}_loadFromData(s){if(this._dotLottieCore===null)return;let a=this._canvas.width,g=this._canvas.height,k=!1;if(typeof s=="string")k=this._dotLottieCore.loadAnimationData(s,a,g);else if(s instanceof ArrayBuffer)k=this._dotLottieCore.loadDotLottieData(s,a,g);else if(typeof s=="object")k=this._dotLottieCore.loadAnimationData(JSON.stringify(s),a,g);else {this._eventManager.dispatch({type:"loadError",error:new Error("Unsupported data type for animation data. Expected a string or ArrayBuffer.")});return}k?(this._eventManager.dispatch({type:"load"}),qe&&this.resize(),this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render(),this._dotLottieCore.config().autoplay&&(this._dotLottieCore.play(),this._dotLottieCore.isPlaying()?(this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this))):console.error("something went wrong, the animation was suppose to autoplay"))):this._eventManager.dispatch({type:"loadError",error:new Error("Failed to load animation data")});}get manifest(){try{let s=this._dotLottieCore?.manifestString();if(this._dotLottieCore===null||!s)return null;let a=JSON.parse(s);return Object.keys(a).length===0?null:a}catch{return null}}get renderConfig(){return this._renderConfig}get segments(){let s=this._dotLottieCore?.config().segments;if(s&&s.size()===2)return [s.get(0),s.get(1)]}get loop(){return this._dotLottieCore?.config().loopAnimation??!1}get mode(){let s=this._dotLottieCore?.config().mode;return s===this._wasmModule?.Mode.Reverse?"reverse":s===this._wasmModule?.Mode.Bounce?"bounce":s===this._wasmModule?.Mode.ReverseBounce?"reverse-bounce":"forward"}get isFrozen(){return this._isFrozen}get backgroundColor(){return this._backgroundColor??""}get autoplay(){return this._dotLottieCore?.config().autoplay??!1}get useFrameInterpolation(){return this._dotLottieCore?.config().useFrameInterpolation??!1}get speed(){return this._dotLottieCore?.config().speed??0}get isLoaded(){return this._dotLottieCore?.isLoaded()??!1}get isPlaying(){return this._dotLottieCore?.isPlaying()??!1}get isPaused(){return this._dotLottieCore?.isPaused()??!1}get isStopped(){return this._dotLottieCore?.isStopped()??!1}get currentFrame(){return this._dotLottieCore?.currentFrame()??0}get loopCount(){return this._dotLottieCore?.loopCount()??0}get totalFrames(){return this._dotLottieCore?.totalFrames()??0}get duration(){return this._dotLottieCore?.duration()??0}load(s){this._dotLottieCore===null||this._wasmModule===null||(this._dotLottieCore.setConfig({autoplay:s.autoplay??!1,backgroundColor:0,loopAnimation:s.loop??!1,mode:Ge(s.mode??"forward",this._wasmModule),segments:Xe(s.segments??[],this._wasmModule),speed:s.speed??1,useFrameInterpolation:s.useFrameInterpolation??!0}),s.data?this._loadFromData(s.data):s.src&&this._loadFromSrc(s.src),this.setBackgroundColor(s.backgroundColor??""));}_render(){if(this._dotLottieCore===null||this._context===null)return !1;if(this._dotLottieCore.render()){let a=this._dotLottieCore.buffer(),g=this._context.createImageData(this._canvas.width,this._canvas.height);return g.data.set(a),this._context.putImageData(g,0,0),this._eventManager.dispatch({type:"render",currentFrame:this._dotLottieCore.currentFrame()}),!0}return !1}_draw(){if(this._dotLottieCore===null||this._context===null||!this._dotLottieCore.isPlaying())return;let s=this._dotLottieCore.requestFrame();this._dotLottieCore.setFrame(s)&&(this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render()&&this._dotLottieCore.isComplete()&&(this._dotLottieCore.config().loopAnimation?this._eventManager.dispatch({type:"loop",loopCount:this._dotLottieCore.loopCount()}):this._eventManager.dispatch({type:"complete"}))),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this));}play(){if(this._dotLottieCore===null)return;let s=this._dotLottieCore.play();this._isFrozen=!1,s&&(this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this)));}pause(){if(this._dotLottieCore===null)return;this._dotLottieCore.pause()&&this._eventManager.dispatch({type:"pause"});}stop(){if(this._dotLottieCore===null)return;this._dotLottieCore.stop()&&(this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render(),this._eventManager.dispatch({type:"stop"}));}setFrame(s){if(this._dotLottieCore===null||s<0||s>this._dotLottieCore.totalFrames())return;this._dotLottieCore.seek(s)&&(this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render());}setSpeed(s){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),speed:s});}setBackgroundColor(s){this._dotLottieCore!==null&&(this._canvas instanceof HTMLCanvasElement&&(this._canvas.style.backgroundColor=s),this._backgroundColor=s);}setLoop(s){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),loopAnimation:s});}setUseFrameInterpolation(s){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),useFrameInterpolation:s});}addEventListener(s,a){this._eventManager.addEventListener(s,a);}removeEventListener(s,a){this._eventManager.removeEventListener(s,a);}destroy(){this._dotLottieCore?.delete(),this._dotLottieCore=null,this._context=null,this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners();}freeze(){this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null,this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}));}unfreeze(){this._animationFrameId===null&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this)),this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}));}resize(){if(!qe||!(this._canvas instanceof HTMLCanvasElement))return;let s=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:a,width:g}=this._canvas.getBoundingClientRect();this._canvas.width=g*s,this._canvas.height=a*s,this._dotLottieCore?.resize(this._canvas.width,this._canvas.height)&&this._render();}setSegments(s,a){this._dotLottieCore===null||this._wasmModule===null||this._dotLottieCore.setConfig({...this._dotLottieCore.config(),segments:Xe([s,a],this._wasmModule)});}setMode(s){this._dotLottieCore===null||this._wasmModule===null||this._dotLottieCore.setConfig({...this._dotLottieCore.config(),mode:Ge(s,this._wasmModule)});}setRenderConfig(s){this._renderConfig=s;}loadAnimation(s){if(this._dotLottieCore===null)return;this._dotLottieCore.loadAnimation(s,this._canvas.width,this._canvas.height)?(this._eventManager.dispatch({type:"load"}),this.resize()):this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to animation :${s}`)});}static setWasmUrl(s){K.setWasmUrl(s);}}; | ||
@@ -5,0 +5,0 @@ export { Wt as DotLottie }; |
{ | ||
"name": "@lottiefiles/dotlottie-web", | ||
"version": "0.14.1", | ||
"version": "0.15.0", | ||
"type": "module", | ||
@@ -39,9 +39,9 @@ "description": "Lottie and DotLottie player for the web", | ||
"@types/node": "^20.10.5", | ||
"@vitest/browser": "^1.1.0", | ||
"@vitest/coverage-istanbul": "^1.1.0", | ||
"@vitest/browser": "^1.2.2 ", | ||
"@vitest/coverage-istanbul": "^1.2.2", | ||
"cross-env": "7.0.3", | ||
"tsup": "8.0.1", | ||
"typescript": "5.0.4", | ||
"vitest": "^1.1.0", | ||
"webdriverio": "^8.27.0" | ||
"vitest": "^1.2.2", | ||
"webdriverio": "^8.32.0" | ||
}, | ||
@@ -48,0 +48,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1203320