PageSourceSearch

https://innovito.com/_next/static/chunks/d791e310-4fb6c64071b6fbb3.js

js innovito.com collected 2026-10-02 02:19:04 UTC 146,568 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2329],{26131:function(e){e.exports=(()=>{"use strict";var e,t,n,r,i,a,o,s,u,l,c,h,d,f,p,m,v,b,g,y,w,_,A,C,M,P,F,E,I,R,k,T,L,O,j,x,S,D,B,W,U,V,N,$,z,H,Y,X,G,q,J,Q,K,Z,ee,et,en,er,ei,ea,eo,es,eu,el,ec=[,(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r.Animation});var r=n(2)},(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r});var r=function(){function e(e,t,n,r){this.animation=e,this.artboard=t,this.playing=r,this.loopCount=0,this.scrubTo=null,this.instance=new n.LinearAnimationInstance(e,t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this.instance.time},set:function(e){this.instance.time=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needsScrub",{get:function(){return null!==this.scrubTo},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){null===this.scrubTo?this.instance.advance(e):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},e.prototype.apply=function(e){this.instance.apply(e)},e.prototype.cleanup=function(){this.instance.delete()},e}()},(e,t,n)=>{n.r(t),n.d(t,{RuntimeLoader:()=>o});var r=n(4),i=n(5),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(){function e(){}return e.notifyError=function(t){var n;for(e.isLoading=!1;e.errorCallbackQueue.length>0;)null===(n=e.errorCallbackQueue.shift())||void 0===n||n(t);e.callBackQueue=[]},e.loadRuntime=function(){var t=e.wasmURL,n=e.wasmBinary;e.enablePerfMarks&&performance.mark("rive:wasm-init:start"),r.default(a({locateFile:function(){return t}},n?{wasmBinary:n}:{})).then(function(t){var n;for(e.enablePerfMarks&&(performance.mark("rive:wasm-init:end"),performance.measure("rive:wasm-init","rive:wasm-init:start","rive:wasm-init:end")),e.runtime=t,e.errorCallbackQueue=[];e.callBackQueue.length>0;)null===(n=e.callBackQueue.shift())||void 0===n||n(e.runtime)}).catch(function(n){var r={message:(null==n?void 0:n.message)||"Unknown error",type:(null==n?void 0:n.name)||"Error",wasmError:n instanceof WebAssembly.CompileError||n instanceof WebAssembly.RuntimeError,originalError:n};
1console.debug("Rive WASM load error details:",r);var i=e.wasmFallbackURL,a=null!==i&&t.toLowerCase()===i.toLowerCase();if(null===i||a){var o=a?"the configured WASM URL or its fallback (".concat(i,")"):t,s=["Could not load Rive WASM file from ".concat(o,"."),"Possible reasons:","- Network connection is down","- WebAssembly is not supported in this environment","- The WASM file is corrupted or incompatible","\nError details:","- Type: ".concat(r.type),"- Message: ".concat(r.message),"- WebAssembly-specific error: ".concat(r.wasmError),"\nTo resolve, you may need to:","1. Check your network connection","2. Set a new WASM source via RuntimeLoader.setWasmUrl()","3. Call RuntimeLoader.awaitInstance() again"].join("\n");console.error(s),e.notifyError(Error(s))}else console.warn("Failed to load WASM from ".concat(t," (").concat(r.message,"), trying fallback URL: ").concat(i)),e.wasmBinary=null,e.setWasmUrl(i),e.loadRuntime()})},e.getInstance=function(t,n){e.isLoading||(e.isLoading=!0,e.loadRuntime()),e.runtime?t(e.runtime):(e.callBackQueue.push(t),n&&e.errorCallbackQueue.push(n))},e.awaitInstance=function(){return new Promise(function(t,n){return e.getInstance(t,n)})},e.setWasmUrl=function(t){e.wasmURL=t},e.getWasmUrl=function(){return e.wasmURL},e.setWasmFallbackUrl=function(t){e.wasmFallbackURL=t},e.getWasmFallbackUrl=function(){return e.wasmFallbackURL},e.setWasmBinary=function(t){if(t instanceof ArrayBuffer||null===t){e.wasmBinary=t;return}console.error("setWasmBinary expects an ArrayBuffer or null")},e.getWasmBinary=function(){return e.wasmBinary},e.isLoading=!1,e.callBackQueue=[],e.wasmURL="https://unpkg.com/".concat(i.name,"@").concat(i.version,"/rive.wasm"),e.wasmFallbackURL="https://cdn.jsdelivr.net/npm/".concat(i.name,"@").concat(i.version,"/rive_fallback.wasm"),e.wasmBinary=null,e.errorCallbackQueue=[],e.enablePerfMarks=!1,e}()},(e,t,n)=>{var r;n.r(t),n.d(t,{default:()=>i});let i=(r="undefined"!=typeof document?document.currentScript?.src:void 0,function(e={}){var t,n,i,a,o,s,u,l=new Promise((e,t)=>{s=e,u=t}),c="object"==typeof window,h="function"==typeof importScripts;function d(){function e(e){let a=r;n=t=0,r=new Map,a.forEach(t=>{try{t(e)}catch(e){console.error(e)}}),this.ob(),i&&i.Rb()}let t=0,n=0,r=new Map,i=null,a=null;this.requestAnimationFrame=function(i){t||=requestAnimationFrame(e.bind(this));let a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(e){r.delete(e),t&&0==r.size&&(cancelAnimationFrame(t),t=0)},this.Pb=function(e){a&&(document.body.remove(a),a=null),e||((a=document.createElement("div")).style.backgroundColor="black",a.style.position="fixed",a.style.right=0,a.style.top=0,a.style.color="white",a.style.padding="4px",a.innerHTML="RIVE FPS",e=function(e){a.innerHTML="RIVE FPS "+e.toFixed(1)},document.body.appendChild(a)),i=new function(){let t=0,n=0;this.Rb=function(){var r=performance.now();n?(++t,1e3<(r-=n)&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.Mb=function(){a&&(document.body.remove(a),a=null),i=null},this.ob=function(){}}function f(e){console.assert(!0);let t=new Map,n=-1/0;this.push=function(r){return r=r+((1<<e)-1)>>e,t.has(r)&&clearTimeout(t.get(r)),t.set(r,setTimeout(function(){t.delete(r),0==t.length?n=-1/0:r==n&&console.assert((n=Math.max(...t.keys()))<r)},1e3)),(n=Math.max(r,n))<<e}}let p=e.onRuntimeInitialized;e.onRuntimeInitialized=function(){p&&p();let t=e.decodeAudio;
1e.decodeAudio=function(e,n){n(e=t(e))};let n=e.decodeFont;e.decodeFont=function(e,t){t(e=n(e))};let r=e.setFallbackFontCb;e.setFallbackFontCallback="function"==typeof r?function(e){r(e)}:function(){console.warn("Module.setFallbackFontCallback called, but text support is not enabled in this build.")};let i=e.FileAssetLoader;e.ptrToAsset=t=>{let n=e.ptrToFileAsset(t);return n.isImage?e.ptrToImageAsset(t):n.isFont?e.ptrToFontAsset(t):n.isAudio?e.ptrToAudioAsset(t):n},e.CustomFileAssetLoader=i.extend("CustomFileAssetLoader",{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Eb=e},loadContents:function(t,n){return t=e.ptrToAsset(t),this.Eb(t,n)}}),e.CDNFileAssetLoader=i.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(t){var n,r,i;let a=e.ptrToAsset(t);return""!==(t=a.cdnUuid)&&(n=a.cdnBaseUrl+"/"+t,r=e=>{a.decode(new Uint8Array(e.response))},(i=new XMLHttpRequest).responseType="arraybuffer",i.onreadystatechange=function(){4==i.readyState&&200==i.status&&r(i)},i.open("GET",n,!0),i.send(null),!0)}}),e.FallbackFileAssetLoader=i.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.kb=[]},addLoader:function(e){this.kb.push(e)},loadContents:function(e,t){for(let n of this.kb)if(n.loadContents(e,t))return!0;return!1}});let a=e.computeAlignment;e.computeAlignment=function(e,t,n,r,i=1){return a.call(this,e,t,n,r,i)}};let m="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),v=new function(){function e(){if(!t){let l;var e=document.createElement("canvas"),o={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(l=e.getContext("webgl",o),n=1,!l)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(l=e.getContext("webgl2",o))n=2;else{if(!(l=e.getContext("webgl",o)))return console.log("No WebGL support. Image mesh will not be drawn."),!1;n=1}function s(e,t,n){if(t=l.createShader(t),l.shaderSource(t,n),l.compileShader(t),0<((n=l.getShaderInfoLog(t))||"").length)throw n;l.attachShader(e,t)}if(r=Math.min((l=new Proxy(l,{get:(e,t)=>e.isContextLost()?(u||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",t),u=!0),"function"==typeof e[t])?function(){}:void 0:"function"==typeof e[t]?function(...n){return e[t].apply(e,n)}:e[t],set(e,t,n){if(!e.isContextLost())return e[t]=n,!0;u||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+t),u=!0)}})).getParameter(l.MAX_RENDERBUFFER_SIZE),l.getParameter(l.MAX_TEXTURE_SIZE)),s(e=l.createProgram(),l.VERTEX_SHADER,"attribute vec2 vertex;\n                attribute vec2 uv;\n                uniform vec4 mat;\n                uniform vec2 translate;\n                varying vec2 st;\n                void main() {\n                    st = uv;\n                    gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n                }"),s(e,l.FRAGMENT_SHADER,"precision highp float;\n                uniform sampler2D image;\n                varying vec2 st;\n                void main() {\n                    gl_FragColor = texture2D(image, st);\n                }"),l.bindAttribLocation(e,0,"vertex"),l.bindAttribLocation(e,1,"uv"),l.linkProgram(e),0<((o=l.getProgramInfoLog(e))||"").trim().length)throw o;i=l.getUniformLocation(e,"mat"),a=l.getUniformLocation(e,"translate"),l.useProgram(e),l.bindBuffer(l.ARRAY_BUFFER,l.createBuffer()),l.enableVertexAttribArray(0),l.enableVertexAttribArray(1),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,l.createBuffer()),l.uniform1i(l.getUniformLocation(e,"image"),0),l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=l}return!0}let t=null,n=0,r=0,i=null,a=null,o=0,s=0,u=!1;e(),this.cc=function(){return e(),r},this.Lb=function(e){t.deleteTexture&&t.deleteTexture(e)},this.Kb=function(r){if(!e())return null;let i=t.createTexture();return i?(t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),2==n?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.generateMipmap(t.TEXTURE_2D)):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),i):null};let l=new f(8),c=new f(8),h=new f(10),d=new f(10);this.Ob=function(n,r,u,f,p){if(e()){var m=l.push(n),v=c.push(r);if(t.canvas){for(var b of((t.canvas.width!=m||t.canvas.height!=v)&&(t.canvas.width=m,t.canvas.height=v),t.viewport(0,v-r,n,r),t.disable(t.SCISSOR_TEST),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.SCISSOR_TEST),u.sort((e,t)=>
1t.vb-e.vb),m=h.push(f),o!=m&&(t.bufferData(t.ARRAY_BUFFER,8*m,t.DYNAMIC_DRAW),o=m),m=0,u))t.bufferSubData(t.ARRAY_BUFFER,m,b.Ta),m+=4*b.Ta.length;for(var g of(console.assert(m==4*f),u))t.bufferSubData(t.ARRAY_BUFFER,m,g.Bb),m+=4*g.Bb.length;for(var y of(console.assert(m==8*f),m=d.push(p),s!=m&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*m,t.DYNAMIC_DRAW),s=m),b=0,u))t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,b,y.indices),b+=2*y.indices.length;for(let e of(console.assert(b==2*p),y=0,g=!0,m=b=0,u)){e.image.Ja!=y&&(t.bindTexture(t.TEXTURE_2D,e.image.Ia||null),y=e.image.Ja),e.ic?(t.scissor(e.Za,v-e.$a-e.jb,e.vc,e.jb),g=!0):g&&(t.scissor(0,v-r,n,r),g=!1),u=2/n;let o=-2/r;t.uniform4f(i,e.ha[0]*u*e.Aa,e.ha[1]*o*e.Ba,e.ha[2]*u*e.Aa,e.ha[3]*o*e.Ba),t.uniform2f(a,e.ha[4]*u*e.Aa+u*(e.Za-e.dc*e.Aa)-1,e.ha[5]*o*e.Ba+o*(e.$a-e.ec*e.Ba)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,m),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,m+4*f),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,b),m+=4*e.Ta.length,b+=2*e.indices.length}console.assert(m==4*f),console.assert(b==2*p)}}},this.canvas=function(){return e()&&t.canvas}},b=e.onRuntimeInitialized;e.onRuntimeInitialized=function(){function t(e){switch(e){case c.srcOver:return"source-over";case c.screen:return"screen";case c.overlay:return"overlay";case c.darken:return"darken";case c.lighten:return"lighten";case c.colorDodge:return"color-dodge";case c.colorBurn:return"color-burn";case c.hardLight:return"hard-light";case c.softLight:return"soft-light";case c.difference:return"difference";case c.exclusion:return"exclusion";case c.multiply:return"multiply";case c.hue:return"hue";case c.saturation:return"saturation";case c.color:return"color";case c.luminosity:return"luminosity"}}function n(e){return"rgba("+((0xff0000&e)>>>16)+","+((65280&e)>>>8)+","+((255&e)>>>0)+","+((0xff000000&e)>>>24)/255+")"}function r(){for(let e of(0<M.length&&(v.Ob(C.drawWidth(),C.drawHeight(),M,P,F),M=[],F=P=0,C.reset(512,512)),A)){for(let t of e.I)t();e.I=[]}A.clear()}b&&b();var i=e.RenderPaintStyle;let a=e.RenderPath,o=e.RenderPaint,s=e.Renderer,u=e.StrokeCap,l=e.StrokeJoin,c=e.BlendMode,h=i.fill,f=i.stroke,p=e.FillRule.evenOdd,g=1;var y=e.RenderImage.extend("CanvasRenderImage",{__construct:function({la:e,wa:t}={}){this.__parent.__construct.call(this),this.Ja=g,g=g+1&0x7fffffff||1,this.la=e,this.wa=t},__destruct:function(){this.Ia&&(v.Lb(this.Ia),URL.revokeObjectURL(this.Wa)),this.__parent.__destruct.call(this)},decode:function(e){var t=this;t.wa&&t.wa(t);var n=new Image;t.Wa=URL.createObjectURL(new Blob([e],{type:"image/png"})),n.onload=function(){t.Db=n,t.Ia=v.Kb(n),t.size(n.width,n.height),t.la&&t.la(t)},n.src=t.Wa}}),w=a.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.U=new Path2D},rewind:function(){this.U=new Path2D},addPath:function(e,t,n,r,i,a,o){var s=this.U,u=s.addPath;e=e.U;let l=new DOMMatrix;l.a=t,l.b=n,l.c=r,l.d=i,l.e=a,l.f=o,u.call(s,e,l)},fillRule:function(e){this.Va=e},moveTo:function(e,t){this.U.moveTo(e,t)},lineTo:function(e,t){this.U.lineTo(e,t)},cubicTo:function(e,t,n,r,i,a){this.U.bezierCurveTo(e,t,n,r,i,a)},close:function(){this.U.closePath()}}),_=o.extend("CanvasRenderPaint",{color:function(e){this.Xa=n(e)},thickness:function(e){this.Hb=e},join:function(e){switch(e){case l.miter:this.Ha="miter";break;case l.round:this.Ha="round";break;case l.bevel:this.Ha="bevel"}},cap:function(e){switch(e){case u.butt:this.Ga="butt";break;case u.round:this.Ga="round";break;case u.square:this.Ga="square"}},style:function(e){this.Gb=e},blendMode:function(e){this.Cb=t(e)},clearGradient:function(){this.ja=null},linearGradient:function(e,t,n,r){this.ja={xb:e,yb:t,cb:n,eb:r,Qa:[]}},radialGradient:function(e,t,n,r){this.ja={xb:e,yb:t,cb:n,eb:r,Qa:[],bc:!0}},addStop:function(e,t){this.ja.Qa.push({color:e,stop:t})},completeGradient:function(){},draw:function(e,t,r,i){let a=this.Gb;var o=this.Xa,s=this.ja;let u=e.globalCompositeOperation,l=e.globalAlpha;if(e.globalCompositeOperation=this.Cb,e.globalAlpha=i,null!=s){o=s.xb;let t=s.yb,r=s.cb;var c=s.eb;i=s.Qa,s.bc?(s=r-o,c-=t,o=e.createRadialGradient(o,t,0,o,t,Math.sqrt(s*s+c*c))):o=e.createLinearGradient(o,t,r,c);for(let e=0,t=i.length;e<t;e++)s=i[e],o.addColorStop(s.stop,n(s.color));this.Xa=o,this.ja=null}switch(a){case f:e.strokeStyle=o,e.lineWidth=this.Hb,e.lineCap=this.Ga,e.lineJoin=this.Ha,e.stroke(t);break;case h:e.fillStyle=o,e.fill(t,r)}e.globalCompositeOperation=u,e.globalAlpha=l}});let A=new Set,C=null,M=[],P=0,F=0;var E=e.CanvasRenderer=s.extend("Renderer",{__construct:function(e){this.__parent.__construct.call(this),this.T=[1,0,0,1,0,0],this.G=[1],this.B=e.getContext("2d"),this.Ua=e,this.I=[]},save:function(){this.T.push(...this.T.slice(this.T.length-6)),this.G.push(this.G[this.G.length-1]),this.I.push(this.B.save.bind(this.B))},restore:function(){let e=this.T.length-6;if(6>
1e)throw"restore() called without matching save().";this.T.splice(e),this.G.pop(),this.I.push(this.B.restore.bind(this.B))},transform:function(e,t,n,r,i,a){let o=this.T,s=o.length-6;o.splice(s,6,o[s]*e+o[s+2]*t,o[s+1]*e+o[s+3]*t,o[s]*n+o[s+2]*r,o[s+1]*n+o[s+3]*r,o[s]*i+o[s+2]*a+o[s+4],o[s+1]*i+o[s+3]*a+o[s+5]),this.I.push(this.B.transform.bind(this.B,e,t,n,r,i,a))},rotate:function(e){let t=Math.sin(e);e=Math.cos(e),this.transform(e,t,-t,e,0,0)},modulateOpacity:function(e){this.G[this.G.length-1]*=e},_drawPath:function(e,t){this.I.push(t.draw.bind(t,this.B,e.U,e.Va===p?"evenodd":"nonzero",Math.max(0,this.G[this.G.length-1])))},_drawRiveImage:function(e,n,r,i){var a=e.Db;if(a){var o=this.B,s=t(r),u=Math.max(0,i*this.G[this.G.length-1]);this.I.push(function(){o.globalCompositeOperation=s,o.globalAlpha=u,o.drawImage(a,0,0),o.globalAlpha=1})}},_getMatrix:function(e){let t=this.T,n=t.length-6;for(let r=0;6>r;++r)e[r]=t[n+r]},_drawImageMesh:function(n,i,a,o,s,u,l,c,h,d,f,p,m,b){let g,y,w;try{g=e.HEAPF32.slice(s>>2,(s>>2)+u),y=e.HEAPF32.slice(l>>2,(l>>2)+c),w=e.HEAPU16.slice(h>>1,(h>>1)+d)}catch(e){console.error("[Rive] _drawImageMesh: failed to read mesh data from WASM heap. Mesh skipped for this frame.");return}i=this.B.canvas.width,s=this.B.canvas.height,l=m-f,c=b-p,f=Math.max(f,0),p=Math.max(p,0);let _=(m=Math.min(m,i))-f,E=(b=Math.min(b,s))-p;if(console.assert(_<=Math.min(l,i)),console.assert(E<=Math.min(c,s)),!(0>=_||0>=E)){m=_<l||E<c,i=b=1;var I=Math.ceil(_*b),R=Math.ceil(E*i);s=v.cc(),I>s&&(b*=s/I,I=s),R>s&&(i*=s/R,R=s),C||(C=new e.DynamicRectanizer(s)).reset(512,512),0>(s=C.addRect(I,R))&&(r(),A.add(this),console.assert(0<=(s=C.addRect(I,R))));var k=65535&s,T=s>>16;M.push({ha:this.T.slice(this.T.length-6),image:n,Za:k,$a:T,dc:f,ec:p,vc:I,jb:R,Aa:b,Ba:i,Ta:g,Bb:y,indices:w,ic:m,vb:n.Ja<<1|+!!m}),P+=u,F+=d;var L=this.B,O=t(a),j=Math.max(0,o*this.G[this.G.length-1]);this.I.push(function(){L.save(),L.resetTransform(),L.globalCompositeOperation=O,L.globalAlpha=j;let e=v.canvas();e&&L.drawImage(e,k,T,I,R,f,p,_,E),L.restore()})}},_clipPath:function(e){this.I.push(this.B.clip.bind(this.B,e.U,e.Va===p?"evenodd":"nonzero"))},clear:function(){A.add(this),this.I.push(this.B.clearRect.bind(this.B,0,0,this.Ua.width,this.Ua.height))},flush:function(){},translate:function(e,t){this.transform(1,0,0,1,e,t)}});e.makeRenderer=function(e){let t=new E(e),n=t.B;return new Proxy(t,{get(e,r){if("function"==typeof e[r])return function(...t){return e[r].apply(e,t)};if("function"==typeof n[r]){if(-1<m.indexOf(r))throw Error("RiveException: Method call to '"+r+"()' is not allowed, as the renderer cannot immediately pass through the return                 values of any canvas 2d context methods.");return function(...e){t.I.push(n[r].bind(n,...e))}}return e[r]},set(e,r,i){if(r in n)return t.I.push(()=>{n[r]=i}),!0}})},e.decodeImage=function(e,t){new y({la:t}).decode(e)},e.renderFactory={makeRenderPaint:function(){return new _},makeRenderPath:function(){return new w},makeRenderImage:function(){let e=R;return new y({wa:()=>{e.total++},la:()=>{if(e.loaded++,e.loaded===e.total){let t=e.ready;t&&(t(),e.ready=null)}}})}};let I=e.load,R=null;e.load=function(t,n,r=!0){let i=new e.FallbackFileAssetLoader;return void 0!==n&&i.addLoader(n),r&&(n=new e.CDNFileAssetLoader,i.addLoader(n)),new Promise(function(e){let n=null;R={total:0,loaded:0,ready:function(){e(n)}},n=I(t,i),0==R.total&&e(n)})};let k=e.RendererWrapper.prototype.align;e.RendererWrapper.prototype.align=function(e,t,n,r,i=1){k.call(this,e,t,n,r,i)},e.requestAnimationFrame=(i=new d).requestAnimationFrame.bind(i),e.cancelAnimationFrame=i.cancelAnimationFrame.bind(i),e.enableFPSCounter=i.Pb.bind(i),e.disableFPSCounter=i.Mb,i.ob=r,e.resolveAnimationFrame=r,e.cleanup=function(){C&&C.delete()}};var g,y,w=Object.assign({},e),_="./this.program",A="";(c||h)&&(h?A=self.location.href:"undefined"!=typeof document&&document.currentScript&&(A=document.currentScript.src),r&&(A=r),A=A.startsWith("blob:")?"":A.substr(0,A.replace(/[?#].*/,"").lastIndexOf("/")+1),h&&(y=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),g=(e,t,n)=>{if(Y(e)){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?t(r.response):n()},r.onerror=n,r.send(null)}else fetch(e,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url))).then(t,n)});var C=e.print||console.log.bind(console),M=e.printErr||console.error.bind(console);Object.assign(e,w),w=null,e.thisProgram&&(_=e.thisProgram),e.wasmBinary&&(P=e.wasmBinary);var P,F,E,I,R,k,T,L,O,j,x=!1;function S(){var t=F.buffer;e.HEAP8=E=new Int8Array(t),e.HEAP16=R=new Int16Array(t),e.HEAPU8=I=new Uint8Array(t),e.HEAPU16=k=new Uint16Array(t),e.HEAP32=T=new Int32Array(t),e.HEAPU32
1=L=new Uint32Array(t),e.HEAPF32=O=new Float32Array(t),e.HEAPF64=j=new Float64Array(t)}var D=[],B=[],W=[],U=0,V=null,N=null;function $(t){throw e.onAbort?.(t),M(t="Aborted("+t+")"),x=!0,t=new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info."),u(t),t}var z,H=e=>e.startsWith("data:application/octet-stream;base64,"),Y=e=>e.startsWith("file://");function X(e){if(e==z&&P)return new Uint8Array(P);if(y)return y(e);throw"both async and sync fetching of the wasm failed"}function G(e,t,n){return(P?Promise.resolve().then(()=>X(e)):new Promise((t,n)=>{g(e,e=>t(new Uint8Array(e)),()=>{try{t(X(e))}catch(e){n(e)}})})).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{M(`failed to asynchronously prepare wasm: ${e}`),$(e)})}var q,J,Q={484173:(e,t,n,r,i)=>{if("undefined"==typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if(void 0===window.h){window.h={za:0},window.h.J={},window.h.J.xa=e,window.h.J.capture=t,window.h.J.Ka=n,window.h.ga={},window.h.ga.stopped=r,window.h.ga.wb=i;let a=window.h;a.D=[],a.tc=function(e){for(var t=0;t<a.D.length;++t)if(null==a.D[t])return a.D[t]=e,t;return a.D.push(e),a.D.length-1},a.Ab=function(e){for(a.D[e]=null;0<a.D.length;)if(null==a.D[a.D.length-1])a.D.pop();else break},a.Wc=function(e){for(var t=0;t<a.D.length;++t)if(a.D[t]==e)return a.Ab(t)},a.qa=function(e){return a.D[e]},a.Sa=["touchend","click"],a.unlock=function(){for(var e=0;e<a.D.length;++e){var t=a.D[e];null!=t&&null!=t.L&&t.state===a.ga.wb&&t.L.resume().then(()=>{ny(t.pb)},e=>{console.error("Failed to resume audiocontext",e)})}a.Sa.map(function(e){document.removeEventListener(e,a.unlock,!0)})},a.Sa.map(function(e){document.addEventListener(e,a.unlock,!0)})}return window.h.za+=1,1},486351:()=>{void 0!==window.h&&(window.h.Sa.map(function(e){document.removeEventListener(e,window.h.unlock,!0)}),--window.h.za,0===window.h.za&&delete window.h)},486655:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,486759:()=>{try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.sampleRate;return e.close(),t}catch(e){return 0}},486930:(e,t,n,r,i,a)=>{if(void 0===window.h)return -1;var o={},s={};return e==window.h.J.xa&&0!=n&&(s.sampleRate=n),o.L=new(window.AudioContext||window.webkitAudioContext)(s),o.L.suspend(),o.state=window.h.ga.stopped,n=0,e!=window.h.J.xa&&(n=t),o.Z=o.L.createScriptProcessor(r,n,t),o.Z.onaudioprocess=function(n){if((null==o.ra||0==o.ra.length)&&(o.ra=new Float32Array(O.buffer,i,r*t)),e==window.h.J.capture||e==window.h.J.Ka){for(var s=0;s<t;s+=1)for(var u=n.inputBuffer.getChannelData(s),l=o.ra,c=0;c<r;c+=1)l[c*t+s]=u[c];nw(a,r,i)}if(e==window.h.J.xa||e==window.h.J.Ka)for(n_(a,r,i),s=0;s<n.outputBuffer.numberOfChannels;++s)for(u=n.outputBuffer.getChannelData(s),l=o.ra,c=0;c<r;c+=1)u[c]=l[c*t+s];else for(s=0;s<n.outputBuffer.numberOfChannels;++s)n.outputBuffer.getChannelData(s).fill(0)},e!=window.h.J.capture&&e!=window.h.J.Ka||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(e){o.Ca=o.L.createMediaStreamSource(e),o.Ca.connect(o.Z),o.Z.connect(o.L.destination)}).catch(function(e){console.log("Failed to get user media: "+e)}),e==window.h.J.xa&&o.Z.connect(o.L.destination),o.pb=a,window.h.tc(o)},489807:e=>window.h.qa(e).L.sampleRate,489880:e=>{void 0!==(e=window.h.qa(e)).Z&&(e.Z.onaudioprocess=function(){},e.Z.disconnect(),e.Z=void 0),void 0!==e.Ca&&(e.Ca.disconnect(),e.Ca=void 0),e.L.close(),e.L=void 0,e.pb=void 0},490280:e=>{window.h.Ab(e)},490330:e=>{(e=window.h.qa(e)).L.resume(),e.state=window.h.ga.wb},490469:e=>{(e=window.h.qa(e)).L.suspend(),e.state=window.h.ga.stopped}},K=t=>{for(;0<t.length;)t.shift()(e)};function Z(){var e=T[+e4>>2];return e4+=4,e}var ee=(e,t)=>{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},et=e=>{var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=ee(e.split("/").filter(e=>!!e),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},en=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return(e=t[0],t=t[1],e||t)?e+(t&&=t.substr(0,t.length-1)):"."},er=e=>{if("/"===e)return"/";var t=(e=(e=et(e)).replace(/\/$/,"")).lastIndexOf("/");return -1===t?e:e.substr(t+1)},ei=()=>
1{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);$("initRandomDevice")},ea=e=>(ea=ei())(e),eo=(...e)=>{for(var t="",n=!1,r=e.length-1;-1<=r&&!n;r--){if("string"!=typeof(n=0<=r?e[r]:"/"))throw TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,n="/"===n.charAt(0)}return t=ee(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."},es="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,eu=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&es)return es.decode(e.subarray(t,n));for(r="";t<n;){var i=e[t++];if(128&i){var a=63&e[t++];if(192==(224&i))r+=String.fromCharCode((31&i)<<6|a);else{var o=63&e[t++];65536>(i=224==(240&i)?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r},el=[],ec=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},eh=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.charCodeAt(a);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),127>=o){if(n>=r)break;t[n++]=o}else{if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6}else{if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63}t[n++]=128|o>>6&63}t[n++]=128|63&o}}return t[n]=0,n-i};function ed(e,t){var n=Array(ec(e)+1);return e=eh(e,n,0,n.length),t&&(n.length=e),n}var ef=[];function ep(e,t){var n,r;ef[e]={input:[],H:[],W:t},n=e,r=em,ew[n]={m:r}}var em={open(e){var t=ef[e.node.ya];if(!t)throw new eP(43);e.s=t,e.seekable=!1},close(e){e.s.W.pa(e.s)},pa(e){e.s.W.pa(e.s)},read(e,t,n,r){if(!e.s||!e.s.W.ib)throw new eP(60);for(var i=0,a=0;a<r;a++){try{var o=e.s.W.ib(e.s)}catch(e){throw new eP(29)}if(void 0===o&&0===i)throw new eP(6);if(null==o)break;i++,t[n+a]=o}return i&&(e.node.timestamp=Date.now()),i},write(e,t,n,r){if(!e.s||!e.s.W.Na)throw new eP(60);try{for(var i=0;i<r;i++)e.s.W.Na(e.s,t[n+i])}catch(e){throw new eP(29)}return r&&(e.node.timestamp=Date.now()),i}};function ev(e,t){var n=e.l?e.l.length:0;n>=t||(t=Math.max(t,n*(1048576>n?2:1.125)>>>0),0!=n&&(t=Math.max(t,256)),n=e.l,e.l=new Uint8Array(t),0<e.v&&e.l.set(n.subarray(0,e.v),0))}var eb={O:null,V:()=>eb.createNode(null,"/",16895,0),createNode(e,t,n,r){if(24576==(61440&n)||4096==(61440&n))throw new eP(63);return eb.O||(eb.O={dir:{node:{Y:eb.j.Y,R:eb.j.R,ka:eb.j.ka,ua:eb.j.ua,tb:eb.j.tb,zb:eb.j.zb,ub:eb.j.ub,sb:eb.j.sb,Da:eb.j.Da},stream:{ba:eb.m.ba}},file:{node:{Y:eb.j.Y,R:eb.j.R},stream:{ba:eb.m.ba,read:eb.m.read,write:eb.m.write,Ya:eb.m.Ya,lb:eb.m.lb,nb:eb.m.nb}},link:{node:{Y:eb.j.Y,R:eb.j.R,ma:eb.j.ma},stream:{}},ab:{node:{Y:eb.j.Y,R:eb.j.R},stream:eW}}),16384==(61440&(n=eO(e,t,n,r)).mode)?(n.j=eb.O.dir.node,n.m=eb.O.dir.stream,n.l={}):32768==(61440&n.mode)?(n.j=eb.O.file.node,n.m=eb.O.file.stream,n.v=0,n.l=null):40960==(61440&n.mode)?(n.j=eb.O.link.node,n.m=eb.O.link.stream):8192==(61440&n.mode)&&(n.j=eb.O.ab.node,n.m=eb.O.ab.stream),n.timestamp=Date.now(),e&&(e.l[t]=n,e.timestamp=n.timestamp),n},Lc:e=>e.l?e.l.subarray?e.l.subarray(0,e.v):new Uint8Array(e.l):new Uint8Array(0),j:{Y(e){var t={};return t.Jc=8192==(61440&e.mode)?e.id:1,t.Nc=e.id,t.mode=e.mode,t.Rc=1,t.uid=0,t.Mc=0,t.ya=e.ya,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.v:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.Bc=new Date(e.timestamp),t.Qc=new Date(e.timestamp),t.Ic=new Date(e.timestamp),t.Ib=4096,t.Cc=Math.ceil(t.size/t.Ib),t},R(e,t){if(void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&(t=t.size,e.v!=t))if(0==t)e.l=null,e.v=0;else{var n=e.l;e.l=new Uint8Array(t),n&&e.l.set(n.subarray(0,Math.min(t,e.v))),e.v=t}},ka(){throw eF[44]},ua:(e,t,n,r)=>eb.createNode(e,t,n,r),tb(e,t,n){if(16384==(61440&e.mode)){try{var r=eL(t,n)}catch(e){}if(r)for(var i in r.l)throw new eP(55)}delete e.parent.l[e.name],e.parent.timestamp=Date.now(),e.name=n,t.l[n]=e,t.timestamp=e.parent.timestamp},zb(e,t){delete e.l[t],e.timestamp=Date.now()},ub(e,t){var n,r=eL(e,t);for(n in r.l)throw new eP(55);delete e.l[t],e.timestamp=Date.now()},sb(e){var t,n=[".",".."];
1for(t of Object.keys(e.l))n.push(t);return n},Da:(e,t,n)=>((e=eb.createNode(e,t,41471,0)).link=n,e),ma(e){if(40960!=(61440&e.mode))throw new eP(28);return e.link}},m:{read(e,t,n,r,i){var a=e.node.l;if(i>=e.node.v)return 0;if(8<(e=Math.min(e.node.v-i,r))&&a.subarray)t.set(a.subarray(i,i+e),n);else for(r=0;r<e;r++)t[n+r]=a[i+r];return e},write(e,t,n,r,i,a){if(t.buffer===E.buffer&&(a=!1),!r)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.l||e.l.subarray)){if(a)return e.l=t.subarray(n,n+r),e.v=r;if(0===e.v&&0===i)return e.l=t.slice(n,n+r),e.v=r;if(i+r<=e.v)return e.l.set(t.subarray(n,n+r),i),r}if(ev(e,i+r),e.l.subarray&&t.subarray)e.l.set(t.subarray(n,n+r),i);else for(a=0;a<r;a++)e.l[i+a]=t[n+a];return e.v=Math.max(e.v,i+r),r},ba(e,t,n){if(1===n?t+=e.position:2===n&&32768==(61440&e.node.mode)&&(t+=e.node.v),0>t)throw new eP(28);return t},Ya(e,t,n){ev(e.node,t+n),e.node.v=Math.max(e.node.v,t+n)},lb(e,t,n,r,i){if(32768!=(61440&e.node.mode))throw new eP(43);if(e=e.node.l,2&i||e.buffer!==E.buffer)throw(0<n||n+t<e.length)&&(e=e.subarray?e.subarray(n,n+t):Array.prototype.slice.call(e,n,n+t)),n=!0,$(),t=void 0,new eP(48);return n=!1,{o:t=e.byteOffset,Ac:n}},nb:(e,t,n,r)=>(eb.m.write(e,t,0,r,n,!1),0)}},eg=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},ey=null,ew={},e_=[],eA=1,eC=null,eM=!0,eP=class{constructor(e){this.name="ErrnoError",this.aa=e}},eF={},eE=class{constructor(){this.h={},this.node=null}get flags(){return this.h.flags}set flags(e){this.h.flags=e}get position(){return this.h.position}set position(e){this.h.position=e}},eI=class{constructor(e,t,n,r){e||=this,this.parent=e,this.V=e.V,this.va=null,this.id=eA++,this.name=t,this.mode=n,this.j={},this.m={},this.ya=r}get read(){return 365==(365&this.mode)}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return 146==(146&this.mode)}set write(e){e?this.mode|=146:this.mode&=-147}};function eR(e,t={}){if(!(e=eo(e)))return{path:"",node:null};if(8<(t=Object.assign({hb:!0,Pa:0},t)).Pa)throw new eP(32);e=e.split("/").filter(e=>!!e);for(var n=ey,r="/",i=0;i<e.length;i++){var a=i===e.length-1;if(a&&t.parent)break;if(n=eL(n,e[i]),r=et(r+"/"+e[i]),n.va&&(!a||a&&t.hb)&&(n=n.va.root),!a||t.gb){for(a=0;40960==(61440&n.mode);)if(n=function(e){if(!(e=eR(e).node))throw new eP(44);if(!e.j.ma)throw new eP(28);return eo(ek(e.parent),e.j.ma(e))}(r),n=eR(r=eo(en(r),n),{Pa:t.Pa+1}).node,40<a++)throw new eP(32)}}return{path:r,node:n}}function ek(e){for(var t;;){if(e===e.parent)return e=e.V.mb,t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function eT(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%eC.length}function eL(e,t){var n=16384==(61440&e.mode)?(n=ex(e,"x"))?n:2*!e.j.ka:54;if(n)throw new eP(n);for(n=eC[eT(e.id,t)];n;n=n.hc){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.j.ka(e,t)}function eO(e,t,n,r){return t=eT((e=new eI(e,t,n,r)).parent.id,e.name),e.hc=eC[t],eC[t]=e}function ej(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function ex(e,t){return eM?0:t.includes("r")&&!(292&e.mode)?2:t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0}function eS(e,t){try{return eL(e,t),20}catch(e){}return ex(e,"wx")}function eD(e){if(!(e=e_[e]))throw new eP(8);return e}function eB(e,t=-1){if(e=Object.assign(new eE,e),-1==t)e:{for(t=0;4096>=t;t++)if(!e_[t])break e;throw new eP(33)}return e.X=t,e_[t]=e}var eW={open(e){e.m=ew[e.node.ya].m,e.m.open?.(e)},ba(){throw new eP(70)}};function eU(e,t){var n="/"===t;if(n&&ey)throw new eP(10);if(!n&&t){var r=eR(t,{hb:!1});if(t=r.path,(r=r.node).va)throw new eP(10);if(16384!=(61440&r.mode))throw new eP(54)}t={type:e,Tc:{},mb:t,fc:[]},(e=e.V(t)).V=t,t.root=e,n?ey=e:r&&(r.va=t,r.V&&r.V.fc.push(t))}function eV(e,t,n){var r=eR(e,{parent:!0}).node;if(!(e=er(e))||"."===e||".."===e)throw new eP(28);var i=eS(r,e);if(i)throw new eP(i);if(!r.j.ua)throw new eP(63);return r.j.ua(r,e,t,n)}function eN(e){return eV(e,16895,0)}function e$(e,t,n){void 0===n&&(n=t,t=438),eV(e,8192|t,n)}function ez(e,t){if(!eo(e))throw new eP(44);var n=eR(t,{parent:!0}).node;if(!n)throw new eP(44);var r=eS(n,t=er(t));if(r)throw new eP(r);if(!n.j.Da)throw new eP(63);n.j.Da(n,t,e)}function eH(t,n,r){if(""===t)throw new eP(44);if("string"==typeof n){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[n];if(void 0===i)throw Error(`Unknown file open mode: ${n}`);n=i}if(r=64&n?(void 0===r?438:r)&4095|32768:0,"object"==typeof t)var a=t;else{t=et(t);try{a=eR(t,{gb:!(131072&n)}).node}catch(e){}}if(i=!1,64&n)if(a){if(128&n)throw new eP(20)}else a=eV(t,r,0),i=!0;if(!a)throw new eP(44);if(8192==(61440&a.mode)&&(n&=-513),65536&n&&16384!=(61440&a.mode))throw new eP(54);if(!i&&(r=a?40960==(61440&a.mode)?32:16384==(61440&a.mode)&&("r"!==ej(n)||512&n)?31:ex(a,ej(n)):44))throw new eP(r);if(512&n&&!i){if(!(r="string"==typeof(r=a)?eR(r,{gb:!0}).node:r).j.R)throw new eP(63);if(16384==(61440&r.mode))throw new eP(31);if(32768!=(61440&r.mode))throw new eP(28);if(i=ex(r,"w"))throw new eP(i);r.j.R(r,{size:0,timestamp:Date.now()})}return n&=-131713,(a=eB({node:a,path:ek(a),flags:n,seekable:!0,position:0,m:a.m,uc:[],error:!1})).m.open&&a.m.open(a),!e.logReadFiles||1&n||t in(eJ||={})||(eJ[t]=1),a}function eY(e,t,n){if(null===e.X)throw new eP(8);
1if(!e.seekable||!e.m.ba)throw new eP(70);if(0!=n&&1!=n&&2!=n)throw new eP(28);e.position=e.m.ba(e,t,n),e.uc=[]}function eX(e,t,n){e=et("/dev/"+e);var r=eg(!!t,!!n);eq||=64;var i=eq++<<8|0;ew[i]={m:{open(e){e.seekable=!1},close(){n?.buffer?.length&&n(10)},read(e,n,r,i){for(var a=0,o=0;o<i;o++){try{var s=t()}catch(e){throw new eP(29)}if(void 0===s&&0===a)throw new eP(6);if(null==s)break;a++,n[r+o]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,t,r,i){for(var a=0;a<i;a++)try{n(t[r+a])}catch(e){throw new eP(29)}return i&&(e.node.timestamp=Date.now()),a}}},e$(e,r,i)}var eG,eq,eJ,eQ,eK,eZ,e0,e1,e2={},e4=void 0,e3=(e,t)=>Object.defineProperty(t,"name",{value:e}),e6=[],e5=[],e8=e=>{if(!e)throw new eQ("Cannot use deleted val. handle = "+e);return e5[e]},e9=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=e6.pop()||e5.length;return e5[t]=e,e5[t+1]=1,t}},e7=e=>{var t=Error,n=e3(e,function(t){this.name=e,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},n},te=e=>{for(var t="";I[e];)t+=eZ[I[e++]];return t},tt=[],tn=()=>{for(;tt.length;){var e=tt.pop();e.g.fa=!1,e.delete()}},tr={},ti=(e,t)=>{if(void 0===t)throw new eQ("ptr should not be undefined");for(;e.C;)t=e.na(t),e=e.C;return t},ta={},to=e=>{var t=te(e=ng(e));return nv(e),t},ts=(e,t)=>{var n=ta[e];if(void 0===n)throw e=`${t} has unknown type ${to(e)}`,new eQ(e);return n},tu=()=>{},tl=!1,tc=(e,t,n)=>t===n?e:void 0===n.C?null:null===(e=tc(e,t,n.C))?null:n.Nb(e),th={},td=(e,t)=>tr[t=ti(e,t)],tf=(e,t)=>{if(!t.u||!t.o)throw new e1("makeClassHandle requires ptr and ptrType");if(!!t.K!=!!t.F)throw new e1("Both smartPtrType and smartPtr must be specified");return t.count={value:1},tp(Object.create(e,{g:{value:t,writable:!0}}))},tp=e=>"undefined"==typeof FinalizationRegistry?(tp=e=>e,e):(tl=new FinalizationRegistry(e=>{e=e.g,--e.count.value,0===e.count.value&&(e.F?e.K.P(e.F):e.u.i.P(e.o))}),tp=e=>{var t=e.g;return t.F&&tl.register(e,{g:t},e),e},tu=e=>{tl.unregister(e)},tp(e)),tm={},tv=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function tb(e){return this.fromWireType(L[e>>2])}var tg={},ty={},tw=(e,t,n)=>{function r(t){if((t=n(t)).length!==e.length)throw new e1("Mismatched type converter count");for(var r=0;r<e.length;++r)t_(e[r],t[r])}e.forEach(function(e){ty[e]=t});var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{ta.hasOwnProperty(e)?i[t]=ta[e]:(a.push(e),tg.hasOwnProperty(e)||(tg[e]=[]),tg[e].push(()=>{i[t]=ta[e],++o===a.length&&r(i)}))}),0===a.length&&r(i)};function t_(e,t,n={}){if(!("argPackAdvance"in t))throw TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,n={}){var r=t.name;if(!e)throw new eQ(`type "${r}" must have a positive integer typeid pointer`);if(ta.hasOwnProperty(e)){if(n.Xb)return;throw new eQ(`Cannot register type '${r}' twice`)}ta[e]=t,delete ty[e],tg.hasOwnProperty(e)&&(t=tg[e],delete tg[e],t.forEach(e=>e()))}(e,t,n)}var tA=e=>{throw new eQ(e.g.u.i.name+" instance already deleted")};function tC(){}var tM=(e,t,n)=>{if(void 0===e[t].A){var r=e[t];e[t]=function(...r){if(!e[t].A.hasOwnProperty(r.length))throw new eQ(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].A})!`);return e[t].A[r.length].apply(this,r)},e[t].A=[],e[t].A[r.ea]=r}},tP=(t,n,r)=>{if(e.hasOwnProperty(t)){if(void 0===r||void 0!==e[t].A&&void 0!==e[t].A[r])throw new eQ(`Cannot register public name '${t}' twice`);if(tM(e,t,t),e.hasOwnProperty(r))throw new eQ(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);e[t].A[r]=n}else e[t]=n,void 0!==r&&(e[t].Sc=r)},tF=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e};function tE(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.N=n,this.P=r,this.C=i,this.Sb=a,this.na=o,this.Nb=s,this.qb=[]}var tI=(e,t,n)=>{for(;t!==n;){if(!t.na)throw new eQ(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.na(e),t=t.C}return e};function tR(e,t){if(null===t){if(this.Ma)throw new eQ(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new eQ(`Cannot pass "${tJ(t)}" as a ${this.name}`);if(!t.g.o)throw new eQ(`Cannot pass deleted object as a pointer of type ${this.name}`);return tI(t.g.o,t.g.u.i,this.i)}function tk(e,t){if(null===t){if(this.Ma)throw new eQ(`null is not a valid ${this.name}`);if(this.ta){var n=this.Oa();return null!==e&&e.push(this.P,n),n}return 0}if(!t||!t.g)throw new eQ(`Cannot pass "${tJ(t)}" as a ${this.name}`);if(!t.g.o)throw new eQ(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.sa&&t.g.u.sa)throw new eQ(`Cannot convert argument of type ${t.g.K?t.g.K.name:t.g.u.name} to parameter type ${this.name}`);if(n=tI(t.g.o,t.g.u.i,this.i),this.ta){if(void 0===t.g.F)throw new eQ("Passing raw pointer to smart pointer is illegal");
1switch(this.oc){case 0:if(t.g.K===this)n=t.g.F;else throw new eQ(`Cannot convert argument of type ${t.g.K?t.g.K.name:t.g.u.name} to parameter type ${this.name}`);break;case 1:n=t.g.F;break;case 2:if(t.g.K===this)n=t.g.F;else{var r=t.clone();n=this.kc(n,e9(()=>r.delete())),null!==e&&e.push(this.P,n)}break;default:throw new eQ("Unsupporting sharing policy")}}return n}function tT(e,t){if(null===t){if(this.Ma)throw new eQ(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new eQ(`Cannot pass "${tJ(t)}" as a ${this.name}`);if(!t.g.o)throw new eQ(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.g.u.sa)throw new eQ(`Cannot convert argument of type ${t.g.u.name} to parameter type ${this.name}`);return tI(t.g.o,t.g.u.i,this.i)}function tL(e,t,n,r,i,a,o,s,u,l,c){this.name=e,this.i=t,this.Ma=n,this.sa=r,this.ta=i,this.jc=a,this.oc=o,this.rb=s,this.Oa=u,this.kc=l,this.P=c,i||void 0!==t.C?this.toWireType=tk:(this.toWireType=r?tR:tT,this.M=null)}var tO,tj,tx=(t,n,r)=>{if(!e.hasOwnProperty(t))throw new e1("Replacing nonexistent public symbol");void 0!==e[t].A&&void 0!==r?e[t].A[r]=n:(e[t]=n,e[t].ea=r)},tS=[],tD=e=>{var t=tS[e];return t||(e>=tS.length&&(tS.length=e+1),tS[e]=t=tO.get(e)),t},tB=(t,n,r=[])=>n=t.includes("j")?(0,e["dynCall_"+(t=t.replace(/p/g,"i"))])(n,...r):tD(n)(...r),tW=(e,t)=>(...n)=>tB(e,t,n),tU=(e,t)=>{var n=(e=te(e)).includes("j")?tW(e,t):tD(t);if("function"!=typeof n)throw new eQ(`unknown function pointer with signature ${e}: ${t}`);return n},tV=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){r[t]||ta[t]||(ty[t]?ty[t].forEach(e):(n.push(t),r[t]=!0))}),new tj(`${e}: `+n.map(to).join([", "]))};function tN(e,t,n,r,i){var a=t.length;if(2>a)throw new eQ("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==t[1]&&null!==n,s=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].M)return!0;return!1}(t),u="void"!==t[0].name,l=a-2,c=Array(l),h=[],d=[];return e3(e,function(...n){if(n.length!==l)throw new eQ(`function ${e} called with ${n.length} arguments, expected ${l}`);if(d.length=0,h.length=o?2:1,h[0]=i,o){var a=t[1].toWireType(d,this);h[1]=a}for(var f=0;f<l;++f)c[f]=t[f+2].toWireType(d,n[f]),h.push(c[f]);if(n=r(...h),s)tv(d);else for(f=o?1:2;f<t.length;f++){var p=1===f?a:c[f-2];null!==t[f].M&&t[f].M(p)}return u?t[0].fromWireType(n):void 0})}var t$,tz=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(L[t+4*r>>2]);return n},tH=e=>{let t=(e=e.trim()).indexOf("(");return -1!==t?e.substr(0,t):e},tY=(e,t,n)=>{if(!(e instanceof Object))throw new eQ(`${n} with invalid "this": ${e}`);if(!(e instanceof t.i.constructor))throw new eQ(`${n} incompatible with "this" of type ${e.constructor.name}`);if(!e.g.o)throw new eQ(`cannot call emscripten binding method ${n} on deleted object`);return tI(e.g.o,e.g.u.i,t.i)},tX=e=>{9<e&&0==--e5[e+1]&&(e5[e]=void 0,e6.push(e))},tG={name:"emscripten::val",fromWireType:e=>{var t=e8(e);return tX(e),t},toWireType:(e,t)=>e9(t),argPackAdvance:8,readValueFromPointer:tb,M:null},tq=(e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(E[e])}:function(e){return this.fromWireType(I[e])};case 2:return n?function(e){return this.fromWireType(R[e>>1])}:function(e){return this.fromWireType(k[e>>1])};case 4:return n?function(e){return this.fromWireType(T[e>>2])}:function(e){return this.fromWireType(L[e>>2])};default:throw TypeError(`invalid integer width (${t}): ${e}`)}},tJ=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},tQ=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(O[e>>2])};case 8:return function(e){return this.fromWireType(j[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},tK=(e,t,n)=>{switch(t){case 1:return n?e=>E[e]:e=>I[e];case 2:return n?e=>R[e>>1]:e=>k[e>>1];case 4:return n?e=>T[e>>2]:e=>L[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},tZ="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,t0=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&k[n];)++n;if(32<(n<<=1)-e&&tZ)return tZ.decode(I.subarray(e,n));for(r=0,n="";!(r>=t/2);++r){var i=R[e+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n},t1=(e,t,n)=>{if(2>(n??=0x7fffffff))return 0;n-=2;var r=t;n=n<2*e.length?n/2:e.length;for(var i=0;i<n;++i)R[t>>1]=e.charCodeAt(i),t+=2;return R[t>>1]=0,t-r},t2=e=>2*e.length,t4=(e,t)=>{for(var n=0,r="";!(n>=t/4);){var i=T[e+4*n>>2];if(0==i)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}return r}
1,t3=(e,t,n)=>{if(4>(n??=0x7fffffff))return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),T[t>>2]=a,(t+=4)+4>n)break}return T[t>>2]=0,t-r},t6=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&++n,t+=4}return t},t5=(e,t,n)=>{var r=[];return e=e.toWireType(r,n),r.length&&(L[t>>2]=e9(r)),e},t8=[],t9={},t7=e=>{var t=t9[e];return void 0===t?te(e):t},ne=e=>{var t=t8.length;return t8.push(e),t},nt=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=ts(L[t+4*r>>2],"parameter "+r);return n},nn=Reflect.construct,nr=e=>0==e%4&&(0!=e%100||0==e%400),ni=[0,31,60,91,121,152,182,213,244,274,305,335],na=[0,31,59,90,120,151,181,212,243,273,304,334],no=[],ns={},nu=()=>{if(!t$){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:_||"./this.program"};for(e in ns)void 0===ns[e]?delete t[e]:t[e]=ns[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);t$=n}return t$},nl=[31,29,31,30,31,30,31,31,30,31,30,31],nc=[31,28,31,30,31,30,31,31,30,31,30,31],nh=(e,t,n,r)=>{function i(e,t,n){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=n[0]+e;return e}function a(e,t){return i(e,t,"0")}function o(e,t){var n;function r(e){return 0>e?-1:+(0<e)}return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function u(e){var t=e.ca;for(e=new Date(new Date(e.da+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(nr(e.getFullYear())?nl:nc)[n];if(t>r-e.getDate())t-=r-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else{e.setDate(e.getDate()+t);break}}return n=new Date(e.getFullYear()+1,0,4),t=s(new Date(e.getFullYear(),0,4)),n=s(n),0>=o(t,e)?0>=o(n,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var l=L[r+40>>2];for(var c in r={rc:T[r>>2],qc:T[r+4>>2],Ea:T[r+8>>2],Ra:T[r+12>>2],Fa:T[r+16>>2],da:T[r+20>>2],S:T[r+24>>2],ca:T[r+28>>2],Vc:T[r+32>>2],pc:T[r+36>>2],sc:l&&l?eu(I,l):""},n=n?eu(I,n):"",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"})n=n.replace(RegExp(c,"g"),l[c]);var h="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),d="January February March April May June July August September October November December".split(" ");for(c in l={"%a":e=>h[e.S].substring(0,3),"%A":e=>h[e.S],"%b":e=>d[e.Fa].substring(0,3),"%B":e=>d[e.Fa],"%C":e=>a((e.da+1900)/100|0,2),"%d":e=>a(e.Ra,2),"%e":e=>i(e.Ra,2," "),"%g":e=>u(e).toString().substring(2),"%G":u,"%H":e=>a(e.Ea,2),"%I":e=>(0==(e=e.Ea)?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.Fa-1;t+=(nr(e.da+1900)?nl:nc)[n++]);return a(e.Ra+t,3)},"%m":e=>a(e.Fa+1,2),"%M":e=>a(e.qc,2),"%n":()=>"\n","%p":e=>0<=e.Ea&&12>e.Ea?"AM":"PM","%S":e=>a(e.rc,2),"%t":()=>"	","%u":e=>e.S||7,"%U":e=>a(Math.floor((e.ca+7-e.S)/7),2),"%V":e=>{var t=Math.floor((e.ca+7-(e.S+6)%7)/7);if(2>=(e.S+371-e.ca-2)%7&&t++,t)53==t&&(4==(n=(e.S+371-e.ca)%7)||3==n&&nr(e.da)||(t=1));else{t=52;var n=(e.S+7-e.ca-1)%7;(4==n||5==n&&nr(e.da%400-1))&&t++}return a(t,2)},"%w":e=>e.S,"%W":e=>a(Math.floor((e.ca+7-(e.S+6)%7)/7),2),"%y":e=>(e.da+1900).toString().substring(2),"%Y":e=>e.da+1900,"%z":e=>{var t=0<=(e=e.pc);return(t?"+":"-")+String("0000"+((e=Math.abs(e)/60)/60*100+e%60)).slice(-4)},"%Z":e=>e.sc,"%%":()=>"%"},n=n.replace(/%%/g,"\0\0"),l)n.includes(c)&&(n=n.replace(RegExp(c,"g"),l[c](r)));return(c=ed(n=n.replace(/\0\0/g,"%"),!1)).length>t?0:(E.set(c,e),c.length-1)};
1[44].forEach(e=>{eF[e]=new eP(e),eF[e].stack="<generic error, no stack>"}),eC=Array(4096),eU(eb,"/"),eN("/tmp"),eN("/home"),eN("/home/web_user"),eN("/dev"),ew[259]={m:{read:()=>0,write:(e,t,n,r)=>r}},e$("/dev/null",259),ep(1280,{ib(){e:{if(!el.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n"),!e){e=null;break e}el=ed(e,!0)}e=el.shift()}return e},Na(e,t){null===t||10===t?(C(eu(e.H,0)),e.H=[]):0!=t&&e.H.push(t)},pa(e){e.H&&0<e.H.length&&(C(eu(e.H,0)),e.H=[])},Zb:()=>({Fc:25856,Hc:5,Ec:191,Gc:35387,Dc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),$b:()=>0,ac:()=>[24,80]}),ep(1536,{Na(e,t){null===t||10===t?(M(eu(e.H,0)),e.H=[]):0!=t&&e.H.push(t)},pa(e){e.H&&0<e.H.length&&(M(eu(e.H,0)),e.H=[])}}),e$("/dev/tty",1280),e$("/dev/tty1",1536),t=new Uint8Array(1024),n=0,eX("random",i=()=>(0===n&&(n=ea(t).byteLength),t[--n])),eX("urandom",i),eN("/dev/shm"),eN("/dev/shm/tmp"),eN("/proc"),a=eN("/proc/self"),eN("/proc/self/fd"),eU({V(){var e=eO(a,"fd",16895,73);return e.j={ka(e,t){var n=eD(+t);return(e={parent:null,V:{mb:"fake"},j:{ma:()=>n.path}}).parent=e}},e}},"/proc/self/fd"),eQ=e.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},e5.push(0,1,void 0,1,null,1,!0,1,!1,1),e.count_emval_handles=()=>
1e5.length/2-5-e6.length,eK=e.PureVirtualError=e7("PureVirtualError");for(var nd=Array(256),nf=0;256>nf;++nf)nd[nf]=String.fromCharCode(nf);eZ=nd,e.getInheritedInstanceCount=()=>Object.keys(tr).length,e.getLiveInheritedInstances=()=>{var e,t=[];for(e in tr)tr.hasOwnProperty(e)&&t.push(tr[e]);return t},e.flushPendingDeletes=tn,e.setDelayFunction=e=>{e0=e,tt.length&&e0&&e0(tn)},e1=e.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(tC.prototype,{isAliasOf:function(e){if(!(this instanceof tC&&e instanceof tC))return!1;var t=this.g.u.i,n=this.g.o;e.g=e.g;var r=e.g.u.i;for(e=e.g.o;t.C;)n=t.na(n),t=t.C;for(;r.C;)e=r.na(e),r=r.C;return t===r&&n===e},clone:function(){if(this.g.o||tA(this),this.g.ia)return this.g.count.value+=1,this;var e=tp,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return e=e(n.call(t,r,{g:{value:{count:i.count,fa:i.fa,ia:i.ia,o:i.o,u:i.u,F:i.F,K:i.K}}})),e.g.count.value+=1,e.g.fa=!1,e},delete(){if(this.g.o||tA(this),this.g.fa&&!this.g.ia)throw new eQ("Object already scheduled for deletion");tu(this);var e=this.g;--e.count.value,0===e.count.value&&(e.F?e.K.P(e.F):e.u.i.P(e.o)),this.g.ia||(this.g.F=void 0,this.g.o=void 0)},isDeleted:function(){return!this.g.o},deleteLater:function(){if(this.g.o||tA(this),this.g.fa&&!this.g.ia)throw new eQ("Object already scheduled for deletion");return tt.push(this),1===tt.length&&e0&&e0(tn),this.g.fa=!0,this}}),Object.assign(tL.prototype,{Tb(e){return this.rb&&(e=this.rb(e)),e},bb(e){this.P?.(e)},argPackAdvance:8,readValueFromPointer:tb,fromWireType:function(e){function t(){return this.ta?tf(this.i.N,{u:this.jc,o:n,K:this,F:e}):tf(this.i.N,{u:this,o:e})}var n=this.Tb(e);if(!n)return this.bb(e),null;var r=td(this.i,n);if(void 0!==r)return 0===r.g.count.value?(r.g.o=n,r.g.F=e,r.clone()):(r=r.clone(),this.bb(e),r);if(!(r=th[r=this.i.Sb(n)]))return t.call(this);r=this.sa?r.Jb:r.pointerType;var i=tc(n,this.i,r.i);return null===i?t.call(this):this.ta?tf(r.i.N,{u:r,o:i,K:this,F:e}):tf(r.i.N,{u:r,o:i})}}),tj=e.UnboundTypeError=e7("UnboundTypeError");var np={__syscall_fcntl64:function(e,t,n){e4=n;try{var r=eD(e);switch(t){case 0:var i=Z();if(0>i)break;for(;e_[i];)i++;return function(e,t=-1){return e=eB(e,t),e.m?.Kc?.(e),e}(r,i).X;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:return i=Z(),r.flags|=i,0;case 12:return R[(i=Z())+0>>1]=2,0}return -28}catch(e){if(void 0===e2||"ErrnoError"!==e.name)throw e;return-e.aa}},__syscall_ioctl:function(e,t,n){e4=n;try{var r=eD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return r.s?0:-59;case 21505:if(!r.s)return -59;if(r.s.W.Zb){e=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var i=Z();T[i>>2]=25856,T[i+4>>2]=5,T[i+8>>2]=191,T[i+12>>2]=35387;for(var a=0;32>a;a++)E[i+a+17]=e[a]||0}return 0;case 21506:case 21507:case 21508:if(!r.s)return -59;if(r.s.W.$b)for(i=Z(),e=[],a=0;32>a;a++)e.push(E[i+a+17]);return 0;case 21519:if(!r.s)return -59;return T[(i=Z())>>2]=0;case 21520:return r.s?-28:-59;case 21531:if(i=Z(),!r.m.Yb)throw new eP(59);return r.m.Yb(r,t,i);case 21523:if(!r.s)return -59;return r.s.W.ac&&(a=[24,80],R[(i=Z())>>1]=a[0],R[i+2>>1]=a[1]),0;default:return -28}}catch(e){if(void 0===e2||"ErrnoError"!==e.name)throw e;return-e.aa}}
1,__syscall_openat:function(e,t,n,r){e4=r;try{var i=t=t?eu(I,t):"";if("/"===i.charAt(0))t=i;else{var a=-100===e?"/":eD(e).path;if(0==i.length)throw new eP(44);t=et(a+"/"+i)}var o=r?Z():0;return eH(t,n,o).X}catch(e){if(void 0===e2||"ErrnoError"!==e.name)throw e;return-e.aa}},_abort_js:()=>{$("")},_embind_create_inheriting_constructor:(e,t,n)=>{e=te(e),t=ts(t,"wrapper"),n=e8(n);var r=t.i,i=r.N,a=r.C.N,o=r.C.constructor;return e=e3(e,function(...e){r.C.qb.forEach((function(e){if(this[e]===a[e])throw new eK(`Pure virtual function ${e} must be implemented in JavaScript`)}).bind(this)),Object.defineProperty(this,"__parent",{value:i}),this.__construct(...e)}),i.__construct=function(...e){if(this===i)throw new eQ("Pass correct 'this' to __construct");e=o.implement(this,...e),tu(e);var t=e.g;if(e.notifyOnDestruction(),t.ia=!0,Object.defineProperties(this,{g:{value:t}}),tp(this),e=ti(r,e=t.o),tr.hasOwnProperty(e))throw new eQ(`Tried to register registered instance: ${e}`);tr[e]=this},i.__destruct=function(){if(this===i)throw new eQ("Pass correct 'this' to __destruct");tu(this);var e=this.g.o;if(e=ti(r,e),tr.hasOwnProperty(e))delete tr[e];else throw new eQ(`Tried to unregister unregistered instance: ${e}`)},e.prototype=Object.create(i),Object.assign(e.prototype,n),e9(e)},_embind_finalize_value_object:e=>{var t=tm[e];delete tm[e];var n=t.Oa,r=t.P,i=t.fb;tw([e],i.map(e=>e.Wb).concat(i.map(e=>e.mc)),e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.Ub,s=t.Vb,u=e[n+i.length],l=t.lc,c=t.nc;a[t.Qb]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];l(c,e,u.toWireType(n,t)),tv(n)}}}),[{name:t.name,fromWireType:e=>{var t,n={};for(t in a)n[t]=a[t].read(e);return r(e),n},toWireType:(e,t)=>{for(var i in a)if(!(i in t))throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return null!==e&&e.push(r,o),o},argPackAdvance:8,readValueFromPointer:tb,M:r}]})},_embind_register_bigint:()=>{},_embind_register_bool:(e,t,n,r)=>{t_(e,{name:t=te(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(I[e])},M:null})},_embind_register_class:(e,t,n,r,i,a,o,s,u,l,c,h,d)=>{c=te(c),a=tU(i,a),s&&=tU(o,s),l&&=tU(u,l),d=tU(h,d);var f=tF(c);tP(f,function(){tV(`Cannot construct ${c} due to unbound types`,[r])}),tw([e,t,n],r?[r]:[],t=>{if(t=t[0],r)var n,i=t.i,o=i.N;else o=tC.prototype;var u=Object.create(o,{constructor:{value:t=e3(c,function(...e){if(Object.getPrototypeOf(this)!==u)throw new eQ("Use 'new' to construct "+c);if(void 0===h.$)throw new eQ(c+" has no accessible constructor");var t=h.$[e.length];if(void 0===t)throw new eQ(`Tried to invoke ctor of ${c} with invalid number of parameters (${e.length}) - expected (${Object.keys(h.$).toString()}) parameters instead!`);return t.apply(this,e)})}});t.prototype=u;var h=new tE(c,t,u,d,i,a,s,l);return h.C&&((n=h.C).oa??(n.oa=[]),h.C.oa.push(h)),i=new tL(c,h,!0,!1,!1),n=new tL(c+"*",h,!1,!1,!1),o=new tL(c+" const*",h,!1,!0,!1),th[e]={pointerType:n,Jb:o},tx(f,t),[i,n,o]})},_embind_register_class_class_function:(e,t,n,r,i,a,o)=>{var s=tz(n,r);t=tH(t=te(t)),a=tU(i,a),tw([],[e],e=>{function r(){tV(`Cannot call ${i} due to unbound types`,s)}e=e[0];var i=`${e.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.i.constructor;return void 0===u[t]?(r.ea=n-1,u[t]=r):(tM(u,t,i),u[t].A[n-1]=r),tw([],s,r=>{if(r=tN(i,[r[0],null].concat(r.slice(1)),null,a,o),void 0===u[t].A?(r.ea=n-1,u[t]=r):u[t].A[n-1]=r,e.i.oa)for(let n of e.i.oa)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]}),[]})},_embind_register_class_class_property:(e,t,n,r,i,a,o,s)=>{t=te(t),a=tU(i,a),tw([],[e],e=>{e=e[0];var i=`${e.name}.${t}`,u={get(){tV(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return u.set=s?()=>{tV(`Cannot access ${i} due to unbound types`,[n])}:()=>{throw new eQ(`${i} is a read-only property`)},Object.defineProperty(e.i.constructor,t,u),tw([],[n],n=>{n=n[0];var i={get:()=>n.fromWireType(a(r)),enumerable:!0};return s&&(s=tU(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),tv(t)}),Object.defineProperty(e.i.constructor,t,i),[]}),[]})},_embind_register_class_constructor:(e,t,n,r,i,a)=>{var o=tz(t,n);i=tU(r,i),tw([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(void 0===e.i.$&&(e.i.$=[]),void 0!==e.i.$[t-1])throw new eQ(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.i.$[t-1]=()=>{tV(`Cannot construct ${e.name} due to unbound types`,o)},tw([],o,r=>(r.splice(1,0,null),e.i.$[t-1]=tN(n,r,null,i,a),[])),[]})},_embind_register_class_function:(e,t,n,r,i,a,o,s)=>{var u=tz(n,r);t=tH(t=te(t)),a=tU(i,a),tw([],[e],e=>{function r(){tV(`Cannot call ${i} due to unbound types`,u)}e=e[0];var i=`${e.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.i.qb.push(t);var l=e.i.N,c=l[t];return void 0===c||void 0===c.A&&c.className!==e.name&&c.ea===n-2?(r.ea=n-2,r.className=e.n
1ame,l[t]=r):(tM(l,t,i),l[t].A[n-2]=r),tw([],u,r=>(r=tN(i,r,e,a,o),void 0===l[t].A?(r.ea=n-2,l[t]=r):l[t].A[n-2]=r,[])),[]})},_embind_register_class_property:(e,t,n,r,i,a,o,s,u,l)=>{t=te(t),i=tU(r,i),tw([],[e],e=>{e=e[0];var r=`${e.name}.${t}`,c={get(){tV(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return c.set=u?()=>tV(`Cannot access ${r} due to unbound types`,[n,o]):()=>{throw new eQ(r+" is a read-only property")},Object.defineProperty(e.i.N,t,c),tw([],u?[n,o]:[n],n=>{var o=n[0],c={get(){var t=tY(this,e,r+" getter");return o.fromWireType(i(a,t))},enumerable:!0};if(u){u=tU(s,u);var h=n[1];c.set=function(t){var n=tY(this,e,r+" setter"),i=[];u(l,n,h.toWireType(i,t)),tv(i)}}return Object.defineProperty(e.i.N,t,c),[]}),[]})},_embind_register_emval:e=>t_(e,tG),_embind_register_enum:(e,t,n,r)=>{function i(){}t=te(t),i.values={},t_(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,argPackAdvance:8,readValueFromPointer:tq(t,n,r),M:null}),tP(t,i)},_embind_register_enum_value:(e,t,n)=>{var r=ts(e,"enum");t=te(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:e3(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},_embind_register_float:(e,t,n)=>{t_(e,{name:t=te(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:tQ(t,n),M:null})},_embind_register_function:(e,t,n,r,i,a)=>{var o=tz(t,n);e=tH(e=te(e)),i=tU(r,i),tP(e,function(){tV(`Cannot call ${e} due to unbound types`,o)},t-1),tw([],o,n=>(tx(e,tN(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]))},_embind_register_integer:(e,t,n,r,i)=>{if(t=te(t),-1===i&&(i=0xffffffff),i=e=>e,0===r){var a=32-8*n;i=e=>e<<a>>>a}var o=t.includes("unsigned")?function(e,t){return t>>>0}:function(e,t){return t};t_(e,{name:t,fromWireType:i,toWireType:o,argPackAdvance:8,readValueFromPointer:tK(t,n,0!==r),M:null})},_embind_register_memory_view:(e,t,n)=>{function r(e){return new i(E.buffer,L[e+4>>2],L[e>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];t_(e,{name:n=te(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Xb:!0})},_embind_register_std_string:(e,t)=>{var n="std::string"===(t=te(t));t_(e,{name:t,fromWireType:function(e){var t=L[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||0==I[o]){if(i=i?eu(I,i,o-i):"",void 0===s)var s=i;else s+="\0",s+=i;i=o+1}}else{for(a=0,s=Array(t);a<t;++a)s[a]=String.fromCharCode(I[r+a]);s=s.join("")}return nv(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"==typeof t;if(!(r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array))throw new eQ("Cannot pass non-string to std::string");var i=n&&r?ec(t):t.length,a=nb(4+i+1),o=a+4;if(L[a>>2]=i,n&&r)eh(t,I,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);if(255<s)throw nv(o),new eQ("String has UTF-16 code units that do not fit in 8 bits");I[o+r]=s}else for(r=0;r<i;++r)I[o+r]=t[r];return null!==e&&e.push(nv,a),a},argPackAdvance:8,readValueFromPointer:tb,M(e){nv(e)}})},_embind_register_std_wstring:(e,t,n)=>{if(n=te(n),2===t)var r=t0,i=t1,a=t2,o=e=>k[e>>1];else 4===t&&(r=t4,i=t3,a=t6,o=e=>L[e>>2]);t_(e,{name:n,fromWireType:e=>{for(var n,i=L[e>>2],a=e+4,s=0;s<=i;++s){var u=e+4+s*t;(s==i||0==o(u))&&(a=r(a,u-a),void 0===n?n=a:(n+="\0",n+=a),a=u+t)}return nv(e),n},toWireType:(e,r)=>{if("string"!=typeof r)throw new eQ(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=nb(4+o+t);return L[s>>2]=o/t,i(r,s+4,o+t),null!==e&&e.push(nv,s),s},argPackAdvance:8,readValueFromPointer:tb,M(e){nv(e)}})},_embind_register_value_object:(e,t,n,r,i,a)=>{tm[e]={name:te(t),Oa:tU(n,r),P:tU(i,a),fb:[]}},_embind_register_value_object_field:(e,t,n,r,i,a,o,s,u,l)=>{tm[e].fb.push({Qb:te(t),Wb:n,Ub:tU(r,i),Vb:a,mc:o,lc:tU(s,u),nc:l})},_embind_register_void:(e,t)=>{t_(e,{Oc:!0,name:t=te(t),argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:(e,t,n)=>I.copyWithin(e,t,t+n),_emscripten_throw_longjmp:()=>{throw 1/0},_emval_as:(e,t,n)=>(e=e8(e),t5(t=ts(t,"emval::as"),n,e)),_emval_call:(e,t,n,r)=>
1(e=t8[e])(null,t=e8(t),n,r),_emval_call_method:(e,t,n,r,i)=>(e=t8[e])(t=e8(t),t[n=t7(n)],r,i),_emval_decref:tX,_emval_get_method_caller:(e,t,n)=>{var r=nt(e,t),i=r.shift(),a=Array(--e);return ne(e3(t=`methodCaller<(${r.map(e=>e.name).join(", ")}) => ${i.name}>`,(t,o,s,u)=>{for(var l=0,c=0;c<e;++c)a[c]=r[c].readValueFromPointer(u+l),l+=r[c].argPackAdvance;return t5(i,s,t=1===n?nn(o,a):o.apply(t,a))}))},_emval_get_module_property:t=>e9(e[t=t7(t)]),_emval_get_property:(e,t)=>e9((e=e8(e))[t=e8(t)]),_emval_incref:e=>{9<e&&(e5[e+1]+=1)},_emval_new_array:()=>e9([]),_emval_new_cstring:e=>e9(t7(e)),_emval_new_object:()=>e9({}),_emval_run_destructors:e=>{tv(e8(e)),tX(e)},_emval_set_property:(e,t,n)=>{e=e8(e),t=e8(t),n=e8(n),e[t]=n},_emval_take_value:(e,t)=>e9(e=(e=ts(e,"_emval_take_value")).readValueFromPointer(t)),_gmtime_js:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+0x100000000*t:NaN)),T[n>>2]=e.getUTCSeconds(),T[n+4>>2]=e.getUTCMinutes(),T[n+8>>2]=e.getUTCHours(),T[n+12>>2]=e.getUTCDate(),T[n+16>>2]=e.getUTCMonth(),T[n+20>>2]=e.getUTCFullYear()-1900,T[n+24>>2]=e.getUTCDay(),T[n+28>>2]=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},_localtime_js:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+0x100000000*t:NaN)),T[n>>2]=e.getSeconds(),T[n+4>>2]=e.getMinutes(),T[n+8>>2]=e.getHours(),T[n+12>>2]=e.getDate(),T[n+16>>2]=e.getMonth(),T[n+20>>2]=e.getFullYear()-1900,T[n+24>>2]=e.getDay(),T[n+28>>2]=(nr(e.getFullYear())?ni:na)[e.getMonth()]+e.getDate()-1|0,T[n+36>>2]=-(60*e.getTimezoneOffset()),t=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();T[n+32>>2]=0|(t!=r&&e.getTimezoneOffset()==Math.min(r,t))},_tzset_js:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1);i=a.getTimezoneOffset();var s=o.getTimezoneOffset();L[e>>2]=60*Math.max(i,s),T[t>>2]=Number(i!=s),a=(e=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1])(a),o=e(o),s<i?(eh(a,I,n,17),eh(o,I,r,17)):(eh(a,I,r,17),eh(o,I,n,17))},emscripten_asm_const_int:(e,t,n)=>{no.length=0;for(var r;r=I[t++];){var i=105!=r;i&=112!=r,n+=i&&n%8?4:0,no.push(112==r?L[n>>2]:105==r?T[n>>2]:j[n>>3]),n+=i?8:4}return Q[e](...no)},emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:e=>{var t=I.length;if(0x80000000<(e>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+0x6000000);var i=Math;r=Math.max(e,r);e:{i=(i.min.call(i,0x80000000,r+(65536-r%65536)%65536)-F.buffer.byteLength+65535)/65536;try{F.grow(i),S();var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return nu().forEach((r,i)=>{var a=t+n;for(i=L[e+4*i>>2]=a,a=0;a<r.length;++a)E[i++]=r.charCodeAt(a);E[i]=0,n+=r.length+1}),0},environ_sizes_get:(e,t)=>{var n=nu();L[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),L[t>>2]=r,0},fd_close:function(e){try{var t=eD(e);if(null===t.X)throw new eP(8);t.La&&(t.La=null);try{t.m.close&&t.m.close(t)}catch(e){throw e}finally{e_[t.X]=null}return t.X=null,0}catch(e){if(void 0===e2||"ErrnoError"!==e.name)throw e;return e.aa}},fd_read:function(e,t,n,r){try{e:{var i=eD(e);e=t;for(var a,o=t=0;o<n;o++){var s=L[e>>2],u=L[e+4>>2];e+=8;var l=a,c=E;if(0>u||0>l)throw new eP(28);if(null===i.X||1==(2097155&i.flags))throw new eP(8);if(16384==(61440&i.node.mode))throw new eP(31);if(!i.m.read)throw new eP(28);var h=void 0!==l;if(h){if(!i.seekable)throw new eP(70)}else l=i.position;var d=i.m.read(i,c,s,u,l);if(h||(i.position+=d),0>d){var f=-1;break e}if(t+=d,d<u)break;void 0!==a&&(a+=d)}f=t}return L[r>>2]=f,0}catch(e){if(void 0===e2||"ErrnoError"!==e.name)throw e;return e.aa}},fd_seek:function(e,t,n,r,i){t=n+2097152>>>0<4194305-!!t?(t>>>0)+0x100000000*n:NaN;try{if(isNaN(t))return 61;var a=eD(e);return eY(a,t,r),J=[a.position>>>0,(q=a.position,1<=+Math.abs(q)?0<q?+Math.floor(q/0x100000000)>>>0:~~+Math.ceil((q-+(~~q>>>0))/0x100000000)>>>0:0)],T[i>>2]=J[0],T[i+4>>2]=J[1],a.La&&0===t&&0===r&&(a.La=null),0}catch(e){if(void 0===e2||"ErrnoError"!==e.name)throw e;return e.aa}},fd_write:function(e,t,n,r){try{e:{var i=eD(e);e=t;for(var a,o=t=0;o<n;o++){var s=L[e>>2],u=L[e+4>>
12];e+=8;var l=a,c=E;if(0>u||0>l)throw new eP(28);if(null===i.X||0==(2097155&i.flags))throw new eP(8);if(16384==(61440&i.node.mode))throw new eP(31);if(!i.m.write)throw new eP(28);i.seekable&&1024&i.flags&&eY(i,0,2);var h=void 0!==l;if(h){if(!i.seekable)throw new eP(70)}else l=i.position;var d=i.m.write(i,c,s,u,l,void 0);if(h||(i.position+=d),0>d){var f=-1;break e}t+=d,void 0!==a&&(a+=d)}f=t}return L[r>>2]=f,0}catch(e){if(void 0===e2||"ErrnoError"!==e.name)throw e;return e.aa}},invoke_vii:function(e,t,n){var r=nM();try{tD(e)(t,n)}catch(e){if(nC(r),e!==e+0)throw e;nA(1,0)}},isWindowsBrowser:function(){return -1<navigator.platform.indexOf("Win")},strftime:nh,strftime_l:(e,t,n,r)=>nh(e,t,n,r),wasm_start_image_decode:function(t,n,r){n=e.HEAP8.subarray(n,n+r),(r=new Uint8Array(r)).set(n),createImageBitmap(new Blob([r])).then(function(n){var r=new OffscreenCanvas(n.width,n.height).getContext("2d");r.drawImage(n,0,0);var i=(r=r.getImageData(0,0,n.width,n.height)).data.length,a=e.Fb(i);e.wc.set(r.data,a),e.yc(t,n.width,n.height,a,i)}).catch(function(n){n=n.message||"decode failed";var r=e.Pc(n)+1,i=e.Fb(r);e.Uc(n,i,r),e.zc(t,i),e.xc(i)})}},nm=function(){function t(t){return F=(nm=t.exports).memory,S(),tO=nm.__indirect_function_table,B.unshift(nm.__wasm_call_ctors),U--,e.monitorRunDependencies?.(U),0==U&&(null!==V&&(clearInterval(V),V=null),N&&(t=N,N=null,t())),nm}var n,r={env:np,wasi_snapshot_preview1:np};if(U++,e.monitorRunDependencies?.(U),e.instantiateWasm)try{return e.instantiateWasm(r,t)}catch(e){M(`Module.instantiateWasm callback failed with error: ${e}`),u(e)}return z||=H("canvas_advanced.wasm")?"canvas_advanced.wasm":e.locateFile?e.locateFile("canvas_advanced.wasm",A):A+"canvas_advanced.wasm",(n=function(e){t(e.instance)},P||"function"!=typeof WebAssembly.instantiateStreaming||H(z)||Y(z)||"function"!=typeof fetch?G(z,r,n):fetch(z,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,r).then(n,function(e){return M(`wasm streaming compile failed: ${e}`),M("falling back to ArrayBuffer instantiation"),G(z,r,n)}))).catch(u),{}}(),nv=e=>(nv=nm.free)(e),nb=e=>(nb=nm.malloc)(e),ng=e=>(ng=nm.__getTypeName)(e);e._wasm_image_decode_complete=(t,n,r,i,a)=>(e._wasm_image_decode_complete=nm.wasm_image_decode_complete)(t,n,r,i,a),e._wasm_image_decode_error=(t,n)=>(e._wasm_image_decode_error=nm.wasm_image_decode_error)(t,n);var ny=e._ma_device__on_notification_unlocked=t=>(ny=e._ma_device__on_notification_unlocked=nm.ma_device__on_notification_unlocked)(t);e._ma_malloc_emscripten=(t,n)=>(e._ma_malloc_emscripten=nm.ma_malloc_emscripten)(t,n),e._ma_free_emscripten=(t,n)=>(e._ma_free_emscripten=nm.ma_free_emscripten)(t,n);var nw=e._ma_device_process_pcm_frames_capture__webaudio=(t,n,r)=>(nw=e._ma_device_process_pcm_frames_capture__webaudio=nm.ma_device_process_pcm_frames_capture__webaudio)(t,n,r),n_=e._ma_device_process_pcm_frames_playback__webaudio=(t,n,r)=>(n_=e._ma_device_process_pcm_frames_playback__webaudio=nm.ma_device_process_pcm_frames_playback__webaudio)(t,n,r),nA=(e,t)=>(nA=nm.setThrew)(e,t),nC=e=>(nC=nm._emscripten_stack_restore)(e),nM=()=>(nM=nm.emscripten_stack_get_current)();function nP(){function t(){if(!o&&(o=!0,e.calledRun=!0,!x)){if(e.noFSInit||eG||(eG=!0,e.stdin=e.stdin,e.stdout=e.stdout,e.stderr=e.stderr,e.stdin?eX("stdin",e.stdin):ez("/dev/tty","/dev/stdin"),e.stdout?eX("stdout",null,e.stdout):ez("/dev/tty","/dev/stdout"),e.stderr?eX("stderr",null,e.stderr):ez("/dev/tty1","/dev/stderr"),eH("/dev/stdin",0),eH("/dev/stdout",1),eH("/dev/stderr",1)),eM=!1,K(B),s(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var t=e.postRun.shift();W.unshift(t)}K(W)}}if(!(0<U)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)!function(){var t=e.preRun.shift();D.unshift(t)}();K(D),0<U||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),t()},1)):t())}}if(e.dynCall_iiji=(t,n,r,i,a)=>(e.dynCall_iiji=nm.dynCall_iiji)(t,n,r,i,a),e.dynCall_jiji=(t,n,r,i,a)=>
1(e.dynCall_jiji=nm.dynCall_jiji)(t,n,r,i,a),e.dynCall_iiiji=(t,n,r,i,a,o)=>(e.dynCall_iiiji=nm.dynCall_iiiji)(t,n,r,i,a,o),e.dynCall_iij=(t,n,r,i)=>(e.dynCall_iij=nm.dynCall_iij)(t,n,r,i),e.dynCall_jii=(t,n,r)=>(e.dynCall_jii=nm.dynCall_jii)(t,n,r),e.dynCall_viijii=(t,n,r,i,a,o,s)=>(e.dynCall_viijii=nm.dynCall_viijii)(t,n,r,i,a,o,s),e.dynCall_iiiiij=(t,n,r,i,a,o,s)=>(e.dynCall_iiiiij=nm.dynCall_iiiiij)(t,n,r,i,a,o,s),e.dynCall_iiiiijj=(t,n,r,i,a,o,s,u,l)=>(e.dynCall_iiiiijj=nm.dynCall_iiiiijj)(t,n,r,i,a,o,s,u,l),e.dynCall_iiiiiijj=(t,n,r,i,a,o,s,u,l,c)=>(e.dynCall_iiiiiijj=nm.dynCall_iiiiiijj)(t,n,r,i,a,o,s,u,l,c),N=function e(){o||nP(),o||(N=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return nP(),l})},e=>{e.exports=JSON.parse('{"name":"@rive-app/canvas","version":"2.37.6","description":"Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <[email protected]> (https://rive.app)","Maxwell Talbot <[email protected]> (https://rive.app)","Arthur Vivian <[email protected]> (https://rive.app)","Umberto Sonnino <[email protected]> (https://rive.app)","Matthew Sullivan <[email protected]> (mailto:[email protected])"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}')},(e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>a.AudioAssetWrapper,AudioWrapper:()=>a.AudioWrapper,BLANK_URL:()=>i.BLANK_URL,CustomFileAssetLoaderWrapper:()=>a.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>a.FileAssetWrapper,FileFinalizer:()=>a.FileFinalizer,FontAssetWrapper:()=>a.FontAssetWrapper,FontWrapper:()=>a.FontWrapper,ImageAssetWrapper:()=>a.ImageAssetWrapper,ImageWrapper:()=>a.ImageWrapper,RiveFont:()=>o.RiveFont,createFinalization:()=>a.createFinalization,finalizationRegistry:()=>a.finalizationRegistry,registerTouchInteractions:()=>r.registerTouchInteractions,sanitizeUrl:()=>i.sanitizeUrl});var r=n(7),i=n(8),a=n(9),o=n(10)},(e,t,n)=>{n.r(t),n.d(t,{registerTouchInteractions:()=>o});var r=void 0,i=function(e,t,n){var r,i=[];if(t)for(var a=0;a<e.length;a++){var o=e[a];i.push({clientX:o.clientX,clientY:o.clientY,identifier:o.identifier})}else{var s=null!==n?null!==(r=Array.from(e).find(function(e){return e.identifier===n}))&&void 0!==r?r:null:e[0];s&&i.push({clientX:s.clientX,clientY:s.clientY,identifier:s.identifier})}return i},a=function(e,t,n,r){var a;return(null===(a=e.changedTouches)||void 0===a?void 0:a.length)?(!t&&["touchstart","touchmove"].includes(e.type)&&e.preventDefault(),i(e.changedTouches,n,r)):[{clientX:e.clientX,clientY:e.clientY,identifier:0}]},o=function(e){var t=e.canvas,n=e.artboard,i=e.stateMachines,o=void 0===i?[]:i,s=e.renderer,u=e.rive,l=e.fit,c=e.alignment,h=e.isTouchScrollEnabled,d=void 0!==h&&h,f=e.dispatchPointerExit,p=void 0===f||f,m=e.enableMultiTouch,v=void 0!==m&&m,b=e.layoutScaleFactor,g=void 0===b?1:b;if(!t||!o.length||!s||!u||!n||"undefined"==typeof window)return null;var y=null,w=!1,_=null,A=function(){_=null},C=(function(e){if(w&&e instanceof MouseEvent){"mouseup"==e.type&&(w=!1);return}w=d&&"touchend"===e.type&&"touchstart"===y,y=e.type;var t,r=e.currentTarget.getBoundingClientRect();if(!v&&"touchstart"===e.type&&null===_){var i=null===(t=e.changedTouches)||void 0===t?void 0:t[0];i&&(_=i.identifier)}var s=a(e,d,v,v?null:_),h=u.computeAlignment(l,c,{minX:0,minY:0,maxX:r.width,maxY:r.height},n.bounds,g),f=new u.Mat2D;switch(h.invert(f),s.forEach(function(e){var t=e.clientX,n=e.clientY;if(t||n){var i=t-r.left,a=n-r.top,o=new u.Vec2D(i,a),s=u.mapXY(f,o),l=s.x(),c=s.y();e.transformedX=l,e.transformedY=c,s.delete(),o.delete()}}),f.delete(),h.delete(),e.type){case"mouseout":for(var m=function(e){p?s.forEach(function(t){e.pointerExit(t.transformedX,t.transformedY,t.identifier)}):s.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},b=0;b<o.length;b++){var A=o[b];m(A)}break;case"touchmove":case"mouseover":case"mousemove":for(var C=function(e){s.forEac
1h(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},M=0;M<o.length;M++){var A=o[M];C(A)}break;case"touchstart":case"mousedown":for(var P=function(e){s.forEach(function(t){e.pointerDown(t.transformedX,t.transformedY,t.identifier)})},F=0;F<o.length;F++){var A=o[F];P(A)}break;case"touchend":for(var E=function(e){s.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier),e.pointerExit(t.transformedX,t.transformedY,t.identifier)})},I=0;I<o.length;I++){var A=o[I];E(A)}!v&&s.some(function(e){return e.identifier===_})&&(_=null);break;case"mouseup":for(var R=function(e){s.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier)})},k=0;k<o.length;k++){var A=o[k];R(A)}}}).bind(r);return t.addEventListener("mouseover",C),t.addEventListener("mouseout",C),t.addEventListener("mousemove",C),t.addEventListener("mousedown",C),t.addEventListener("mouseup",C),t.addEventListener("touchmove",C,{passive:d}),t.addEventListener("touchstart",C,{passive:d}),t.addEventListener("touchend",C),t.addEventListener("touchcancel",A),function(){t.removeEventListener("mouseover",C),t.removeEventListener("mouseout",C),t.removeEventListener("mousemove",C),t.removeEventListener("mousedown",C),t.removeEventListener("mouseup",C),t.removeEventListener("touchmove",C),t.removeEventListener("touchstart",C),t.removeEventListener("touchend",C),t.removeEventListener("touchcancel",A)}}},(e,t,n)=>{n.r(t),n.d(t,{BLANK_URL:()=>l,sanitizeUrl:()=>c});var r=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,a=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|&colon;)/gim,u=[".","/"],l="about:blank";function c(e){if(!e)return l;var t=e.replace(o,"").replace(i,function(e,t){return String.fromCharCode(t)}).replace(a,"").replace(o,"").trim();if(!t)return l;if(u.indexOf(t[0])>-1)return t;var n=t.match(s);if(!n)return t;var c=n[0];return r.test(c)?l:t}},(e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>p,AudioWrapper:()=>l,CustomFileAssetLoaderWrapper:()=>h,FileAssetWrapper:()=>d,FileFinalizer:()=>a,FontAssetWrapper:()=>m,FontWrapper:()=>c,ImageAssetWrapper:()=>f,ImageWrapper:()=>u,createFinalization:()=>g,finalizationRegistry:()=>b});var r,i=(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(){function e(e){this.selfUnref=!1,this._file=e}return e.prototype.unref=function(){this._file&&this._file.unref()},e}(),o=function(){function e(e){this._finalizableObject=e}return e.prototype.unref=function(){this._finalizableObject.unref()},e}(),s=function(){function e(){this.selfUnref=!1}return e.prototype.unref=function(){},e}(),u=function(e){function t(t){var n=e.call(this)||this;return n._nativeImage=t,n}return i(t,e),Object.defineProperty(t.prototype,"nativeImage",{get:function(){return this._nativeImage},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},t}(s),l=function(e){function t(t){var n=e.call(this)||this;return n._nativeAudio=t,n}return i(t,e),Object.defineProperty(t.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},t}(s),c=function(e){function t(t){var n=e.call(this)||this;return n._nativeFont=t,n}return i(t,e),Object.defineProperty(t.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},t}(s),h=function(){function e(e,t){this._assetLoaderCallback=t,this.assetLoader=new e.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return e.prototype.loadContents=function(e,t){var n;return e.isImage?n=new f(e):e.isAudio?n=new p(e):e.isFont&&(n=new m(e)),this._assetLoaderCallback(n,t)},e}(),d=function(){function e(e){this._nativeFileAsset=e}return e.prototype.decode=function(e){this._nativeFileAsset.decode(e)},Object.defineProperty(e.prototype,"name",{get:function(){return this._nativeFileAsset.name}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fileExtension",{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueFilename",{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAudio",{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isImage",{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFont",{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cdnUuid",{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nativeFileAsset",{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),e}(),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setRenderImage=function(e){this._nativeFileAsset.setRenderImage(e.nativeImage)},t}(d),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setAudioSource=function(e){this._nativeFileAsset.setAudioSource(e.nativeAudio)},t}(d),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setFont=function(e){this._nativeFileAsset.setFont(e.nativeFont)},t}(d),v=function(){function e(e){}return e.prototype.register=function(e){e.selfUnref=!0},e.prototype.unregister=function(e){},e}(),b=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:v)(function(e){null==e||e.unref()}),g=function(e,t){var n=new o(t);b.register(e,n)}},(e,t,n)=>{n.r(t),n.d(t,{RiveFont:()=>i});var r=n(3),i=function(){function e(){}return e.setFallbackFontCallback=function(t){e._fallbackFontCallback=null!=t?t:null,e._wireFallbackProc()},e._fontToPtr=function(e){if(null==e)return null;var t,n=e.nativeFont,r=null===(t=null==n?void 0:n.ptr)||void 0===t?void 0:t.call(n);return null!=r?r:null},e._getFallbackPtr=function(t,n){return n<0||n>=t.length?null:e._fontToPtr(t[n])},e._wireFallbackProc=function(){r.RuntimeLoader.getInstance(function(t){var n=e._fallbackFontCallback;n?t.setFallbackFontCallback(function(t,r,i){var a=n(t,i);return a?Array.isArray(a)?e._getFallbackPtr(a,r):0===r?e._fontToPtr(a):null:null}):t.setFallbackFontCallback(null)})},e._fallbackFontCallback=null,e}()}],eh={};function ed(e){var t=eh[e];if(void 0!==t)return t.exports;var n=eh[e]={exports:{}};return ec[e](n,n.exports,ed),n.exports}ed.d=(e,t)=>{for(var n in t)ed.o(t,n)&&!ed.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},ed.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ed.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var ef={};return ed.r(ef),ed.d(ef,{Alignment:()=>t,DataEnum:()=>H,DataType:()=>u,DrawOptimizationOptions:()=>n,EventType:()=>a,Fit:()=>e,Layout:()=>C,LoopType:()=>o,Rive:()=>N,RiveEventType:()=>i,RiveFile:()=>V,RiveFont:()=>d.RiveFont,RuntimeLoader:()=>h.RuntimeLoader,StateMachineInput:()=>P,StateMachineInputType:()=>r,Testing:()=>eo,ViewModel:()=>z,ViewModelInstance:()=>X,ViewModelInstanceArtboard:()=>er,ViewModelInstanceAssetImage:()=>en,ViewModelInstanceBoolean:()=>Q,ViewModelInstanceColor:()=>et,ViewModelInstanceEnum:()=>Z,ViewModelInstanceList:()=>ee,ViewModelInstanceNumber:()=>J,ViewModelInstanceString:()=>q,ViewModelInstanceTrigger:()=>K,ViewModelInstanceValue:()=>G,decodeAudio:()=>es,decodeFont:()=>el,decodeImage:()=>eu}),c=ed(1),h=ed(3),d=ed(6),f=function(e,t){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},p=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},m=function(){return(m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)}
1,v=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(o,s)}u((r=r.apply(e,t||[])).next())})},b=function(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){var l=[s,u];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(6===l[0]&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}},g=function(e,t,n){if(n||2==arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return p(t,e),t}(Error),(w=e||(e={})).Cover="cover",w.Contain="contain",w.Fill="fill",w.FitWidth="fitWidth",w.FitHeight="fitHeight",w.None="none",w.ScaleDown="scaleDown",w.Layout="layout",(_=t||(t={})).Center="center",_.TopLeft="topLeft",_.TopCenter="topCenter",_.TopRight="topRight",_.CenterLeft="centerLeft",_.CenterRight="centerRight",_.BottomLeft="bottomLeft",_.BottomCenter="bottomCenter",_.BottomRight="bottomRight",(A=n||(n={})).AlwaysDraw="alwaysDraw",A.DrawOnChanged="drawOnChanged",C=function(){function n(n){var r,i,a,o,s,u,l;this.fit=null!==(r=null==n?void 0:n.fit)&&void 0!==r?r:e.Contain,this.alignment=null!==(i=null==n?void 0:n.alignment)&&void 0!==i?i:t.Center,this.layoutScaleFactor=null!==(a=null==n?void 0:n.layoutScaleFactor)&&void 0!==a?a:1,this.minX=null!==(o=null==n?void 0:n.minX)&&void 0!==o?o:0,this.minY=null!==(s=null==n?void 0:n.minY)&&void 0!==s?s:0,this.maxX=null!==(u=null==n?void 0:n.maxX)&&void 0!==u?u:0,this.maxY=null!==(l=null==n?void 0:n.maxY)&&void 0!==l?l:0}return n.new=function(e){var t=e.fit,r=e.alignment,i=e.minX,a=e.minY,o=e.maxX,s=e.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new n({fit:t,alignment:r,minX:i,minY:a,maxX:o,maxY:s})},n.prototype.copyWith=function(e){var t=e.fit,r=e.alignment,i=e.layoutScaleFactor,a=e.minX,o=e.minY,s=e.maxX,u=e.maxY;return new n({fit:null!=t?t:this.fit,alignment:null!=r?r:this.alignment,layoutScaleFactor:null!=i?i:this.layoutScaleFactor,minX:null!=a?a:this.minX,minY:null!=o?o:this.minY,maxX:null!=s?s:this.maxX,maxY:null!=u?u:this.maxY})},n.prototype.runtimeFit=function(t){var n;return this.cachedRuntimeFit?this.cachedRuntimeFit:(n=this.fit===e.Cover?t.Fit.cover:this.fit===e.Contain?t.Fit.contain:this.fit===e.Fill?t.Fit.fill:this.fit===e.FitWidth?t.Fit.fitWidth:this.fit===e.FitHeight?t.Fit.fitHeight:this.fit===e.ScaleDown?t.Fit.scaleDown:this.fit===e.Layout?t.Fit.layout:t.Fit.none,this.cachedRuntimeFit=n,n)},n.prototype.runtimeAlignment=function(e){var n;return this.cachedRuntimeAlignment?this.cachedRuntimeAlignment:(n=this.alignment===t.TopLeft?e.Alignment.topLeft:this.alignment===t.TopCenter?e.Alignment.topCenter:this.alignment===t.TopRight?e.Alignment.topRight:this.alignment===t.CenterLeft?e.Alignment.centerLeft:this.alignment===t.CenterRight?e.Alignment.centerRight:this.alignment===t.BottomLeft?e.Alignment.bottomLeft:this.alignment===t.BottomCenter?e.Alignment.bottomCenter:this.alignment===t.BottomRight?e.Alignment.bottomRight:e.Alignment.center,this.cachedRuntimeAlignment=n,n)},n}(),(M=r||(r={}))[M.Number=56]="Number",M[M.Trigger=58]="Trigger",M[M.Boolean=59]="Boolean",P=function(){function e(e,t){this.type=e,this.runtimeInput=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.runtimeInput.name}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(e){this.runtimeInput.value=e},enumerable:!1,configurable:!0}),e.prototype.fire=function(){this.type===r.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}(),(F=i||(i={}))[F.General=128]="General",F[F.OpenUrl=131]="OpenUrl",I=function(e){function t(t,n){var r=e.call(this,!1)||this;return r.nativeArtboard=t,r.file=n,r}return p(t,e),t}(E=function(e){this.isBindableArtboard=!1,this.isBindableArtboard=e}),R=function(e){function t(t){var n=e.call(this,!0)||this;return n.selfUnref=!1,n.nativeArtboard=t,n}return p(t,e),Object.defineProperty(t.prototype,"viewModel",{set:function(e){this.nativeViewModel=e.nativeInstance},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){var e;this.selfUnref&&(this.nativeArtboard.unref(),null===(e=this.nativeViewModel)||void 0===e||e.unref())},t}(E),k=function(){function e(e,t,n,r){this.stateMachine=e,this.playing=n,this.artboard=r,this.inputs=[],this.instance=new t.StateMachineInstance(e,r),this.initInputs(t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statesChanged",{get:function(){for(var e=[],t=0;t<this.instance.stateChangedCount();t++)e.push(this.instance.stateChangedNameByIndex(t));return e},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.instance.advance(e)},e.prototype.advanceAndApply=function(e){this.instance.advanceAndApply(e)},e.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},e.prototype.reportedEventAt=function(e){return this.instance.reportedEventAt(e)},e.prototype.initInputs=function(e){for(var t=0;t<this.instance.inputCount();t++){var n=this.instance.input(t);this.inputs.push(this.mapRuntimeInput(n,e))}},e.prototype.mapRuntimeInput=function(e,t){return e.type===t.SMIInput.bool?new P(r.Boolean,e.asBool()):e.type===t.SMIInput.number?new P(r.Number,e.asNumber()):e.type===t.SMIInput.trigger?new P(r.Trigger,e.asTrigger()):void 0},e.prototype.cleanup=function(){this.inputs.forEach(function(e){e.delete()}),this.inputs.length=0,this.instance.delete()},e.prototype.bindViewModelInstance=function(e){null!=e.runtimeInstance&&this.instance.bindViewModelInstance(e.runtimeInstance)},e}(),T=function(){function e(e,t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=[]),this.runtime=e,this.artboard=t,this.eventManager=n,this.animations=r,this.stateMachines=i}return e.prototype.add=function(e,t,n){if(void 0===n&&(n=!0),0===(e=ea(e)).length)this.animations.forEach(function(e){return e.playing=t}),this.stateMachines.forEach(function(e){return e.playing=t});else for(var r=this.animations.map(function(e){return e.name}),i=this.stateMachines.map(function(e){return e.name}),o=0;o<e.length;o++){var s=r.indexOf(e[o]),u=i.indexOf(e[o]);if(s>=0||u>=0)s>=0?this.animations[s].playing=t:this.stateMachines[u].playing=t;else{var l=this.artboard.animationByName(e[o]);if(l){var h=new c.Animation(l,this.artboard,this.runtime,t);h.advance(0),h.apply(1),this.animations.push(h)}else{var d=this.artboard.stateMachineByName(e[o]);if(d){var f=new k(d,this.runtime,t,this.artboard);this.stateMachines.push(f)}}}}return n&&(t?this.eventManager.fire({type:a.Play,data:this.playing}):this.eventManager.fire({type:a.Pause,data:this.paused})),t?this.playing:this.paused},e.prototype.initLinearAnimations=function(e,t,n){void 0===n&&(n=!1);for(var r=this.animations.map(function(e){return e.name}),i=0;i<e.length;i++){var a=r.indexOf(e[i]);if(a>=0)this.animations[a].playing=t;else{var o=this.artboard.animationByName(e[i]);if(o){var s=new c.Animation(o,this.artboard,this.runtime,t);s.advance(0),s.apply(1),this.animations.push(s)}else if(n)throw new y("State Machine with name ".concat(e[i]," not found"));else console.error("Animation with name ".concat(e[i]," not found."))}}},e.prototype.initStateMachines=function(e,t){for(var n=this.stateMachines.map(function(e){return e.name}),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.stateMachines[i].playing=t;else{var a=this.artboard.stateMachineByName(e[r]);if(a){var o=new k(a,this.runtime,t,this.artboard);this.stateMachines.push(o)}else console.warn("State Machine with name ".concat(e[r]," not found. Falling back to find an animation with the same name.")),this.initLinearAnimations([e[r]],t,!0)}}},e.prototype.play=function(e){return this.add(e,!0)},e.prototype.advanceIfPaused=function(){this.stateMachines.forEac
1h(function(e){e.playing||e.advanceAndApply(0)})},e.prototype.pause=function(e){return this.add(e,!1)},e.prototype.scrub=function(e,t){var n=this.animations.filter(function(t){return e.includes(t.name)});return n.forEach(function(e){return e.scrubTo=t}),n.map(function(e){return e.name})},Object.defineProperty(e.prototype,"playing",{get:function(){return this.animations.filter(function(e){return e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),e.prototype.stop=function(e){var t=this;e=ea(e);var n=[];if(0===e.length)n=this.animations.map(function(e){return e.name}).concat(this.stateMachines.map(function(e){return e.name})),this.animations.forEach(function(e){return e.cleanup()}),this.stateMachines.forEach(function(e){return e.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var r=this.animations.filter(function(t){return e.includes(t.name)});r.forEach(function(e){e.cleanup(),t.animations.splice(t.animations.indexOf(e),1)});var i=this.stateMachines.filter(function(t){return e.includes(t.name)});i.forEach(function(e){e.cleanup(),t.stateMachines.splice(t.stateMachines.indexOf(e),1)}),n=r.map(function(e){return e.name}).concat(i.map(function(e){return e.name}))}return this.eventManager.fire({type:a.Stop,data:n}),n},Object.defineProperty(e.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(e,t){return e||t.playing},!1)||this.stateMachines.reduce(function(e,t){return e||t.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return 0===this.animations.length&&0===this.stateMachines.length},enumerable:!1,configurable:!0}),e.prototype.atLeastOne=function(e,t){var n;return void 0===t&&(t=!0),0===this.animations.length&&0===this.stateMachines.length&&(this.artboard.animationCount()>0?this.add([n=this.artboard.animationByIndex(0).name],e,t):this.artboard.stateMachineCount()>0&&this.add([n=this.artboard.stateMachineByIndex(0).name],e,t)),n},e.prototype.handleLooping=function(){for(var e=0,t=this.animations.filter(function(e){return e.playing});e<t.length;e++){var n=t[e];0===n.loopValue&&n.loopCount?(n.loopCount=0,this.stop(n.name)):1===n.loopValue&&n.loopCount?(this.eventManager.fire({type:a.Loop,data:{animation:n.name,type:o.Loop}}),n.loopCount=0):2===n.loopValue&&n.loopCount>1&&(this.eventManager.fire({type:a.Loop,data:{animation:n.name,type:o.PingPong}}),n.loopCount=0)}},e.prototype.handleStateChanges=function(){for(var e=[],t=0,n=this.stateMachines.filter(function(e){return e.playing});t<n.length;t++){var r=n[t];e.push.apply(e,r.statesChanged)}e.length>0&&this.eventManager.fire({type:a.StateChange,data:e})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:a.Advance,data:e})},e}(),(L=a||(a={})).Load="load",L.LoadError="loaderror",L.Play="play",L.Pause="pause",L.Stop="stop",L.Loop="loop",L.Draw="draw",L.Advance="advance",L.StateChange="statechange",L.RiveEvent="riveevent",L.AudioStatusChange="audiostatuschange",(O=o||(o={})).OneShot="oneshot",O.Loop="loop",O.PingPong="pingpong",j=function(){function e(e){void 0===e&&(e=[]),this.listeners=e}return e.prototype.getListeners=function(e){return this.listeners.filter(function(t){return t.type===e})},e.prototype.add=function(e){this.listeners.includes(e)||this.listeners.push(e)},e.prototype.remove=function(e){for(var t=0;t<this.listeners.length;t++){var n=this.listeners[t];if(n.type===e.type&&n.callback===e.callback){this.listeners.splice(t,1);break}}},e.prototype.removeAll=function(e){var t=this;e?this.listeners.filter(function(t){return t.type===e}
1).forEach(function(e){return t.remove(e)}):this.listeners.splice(0,this.listeners.length)},e.prototype.fire=function(e){this.getListeners(e.type).forEach(function(t){return t.callback(e)})},e}(),x=function(){function e(e){this.eventManager=e,this.queue=[]}return e.prototype.add=function(e){this.queue.push(e)},e.prototype.process=function(){for(;this.queue.length>0;){var e=this.queue.shift();(null==e?void 0:e.action)&&e.action(),(null==e?void 0:e.event)&&this.eventManager.fire(e.event)}},e}(),(S=s||(s={}))[S.AVAILABLE=0]="AVAILABLE",S[S.UNAVAILABLE=1]="UNAVAILABLE",D=new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=s.UNAVAILABLE,t}return p(t,e),t.prototype.delay=function(e){return v(this,void 0,void 0,function(){return b(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return v(this,void 0,void 0,function(){return b(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:a.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return v(this,void 0,void 0,function(){return b(this,function(e){return this._enabled||(this._enabled=!0,this._status=s.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return v(this,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:if(this._status!==s.UNAVAILABLE||null===this._audioContext)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return e.sent(),this.enableAudio(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}})})},t.prototype._establishAudio=function(){return v(this,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:if(this._started)return[3,5];if(this._started=!0,"undefined"!=typeof window)return[3,1];return this.enableAudio(),[3,5];case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:if(this._status!==s.UNAVAILABLE)return[3,5];return[4,this.testAudio()];case 3:return e.sent(),[4,this.delay(1e3)];case 4:return e.sent(),[3,2];case 5:return[2]}})})},t.prototype.listenForUserAction=function(){var e=this;document.addEventListener("pointerdown",function(){return v(e,void 0,void 0,function(){return b(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return v(this,void 0,void 0,function(){return b(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===s.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(j)),B=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),W=globalThis.ResizeObserver||B,U=new(function(){function e(){var e=this;this._elementsMap=new Map,this._onObservedEntry=function(t){var n=e._elementsMap.get(t.target);null!==n?n.onResize(0==t.target.clientWidth||0==t.target.clientHeight):e._resizeObserver.unobserve(t.target)},this._onObserved=function(t){t.forEach(e._onObservedEntry)},this._resizeObserver=new W(this._onObserved)}return e.prototype.add=function(e,t){var n={onResize:t,element:e};return this._elementsMap.set(e,n),this._resizeObserver.observe(e),n},e.prototype.remove=function(e){this._resizeObserver.unobserve(e.element),this._elementsMap.delete(e.element)},e}()),V=function(){function e(e){this.enableRiveAssetCDN=!0,this.enablePerfMarks=!1,this.referenceCount=0,this.destroyed=!1,this.selfUnref=!1,this.bindableArtboards=[],this.src=e.src,this.buffer=e.buffer,e.assetLoader&&(this.assetLoader=e.assetLoader),this.enableRiveAssetCDN="boolean"!=typeof e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.enablePerfMarks=!!e.enablePerfMarks,this.enablePerfMarks&&(h.RuntimeLoader.enablePerfMarks=!0),this.eventManager=new j,e.onLoad&&this.on(a.Lo
1ad,e.onLoad),e.onLoadError&&this.on(a.LoadError,e.onLoadError)}return e.prototype.releaseFile=function(){var e;this.selfUnref&&(null===(e=this.file)||void 0===e||e.unref()),this.file=null},e.prototype.releaseBindableArtboards=function(){this.bindableArtboards.forEach(function(e){return e.destroy()})},e.prototype.initData=function(){return v(this,void 0,void 0,function(){var t,n,r,i,o;return b(this,function(s){switch(s.label){case 0:if(!(this.src&&!this.buffer))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),t=this,[4,ei(this.src)];case 2:return t.buffer=s.sent(),[3,4];case 3:if((n=s.sent())instanceof Error)throw n;throw new y(e.fileLoadErrorMessage);case 4:if(this.destroyed)return[2];return this.assetLoader&&(r=new d.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader).assetLoader),this.enablePerfMarks&&performance.mark("rive:file-load:start"),i=this,[4,this.runtime.load(new Uint8Array(this.buffer),r,this.enableRiveAssetCDN)];case 5:if(i.file=s.sent(),this.enablePerfMarks&&(performance.mark("rive:file-load:end"),performance.measure("rive:file-load","rive:file-load:start","rive:file-load:end")),o=new d.FileFinalizer(this.file),d.finalizationRegistry.register(this,o),this.destroyed)return this.releaseFile(),[2];return null!==this.file?this.eventManager.fire({type:a.Load,data:this}):this.fireLoadError(e.fileLoadErrorMessage),[2]}})})},e.prototype.loadRiveFileBytes=function(){return v(this,void 0,void 0,function(){var e;return b(this,function(t){return this.enablePerfMarks&&performance.mark("rive:fetch-riv:start"),e=this.src?ei(this.src):Promise.resolve(this.buffer),this.enablePerfMarks&&this.src&&e.then(function(){performance.mark("rive:fetch-riv:end"),performance.measure("rive:fetch-riv","rive:fetch-riv:start","rive:fetch-riv:end")}),[2,e]})})},e.prototype.loadRuntime=function(){return v(this,void 0,void 0,function(){var e;return b(this,function(t){return this.enablePerfMarks&&performance.mark("rive:await-wasm:start"),e=h.RuntimeLoader.awaitInstance(),this.enablePerfMarks&&e.then(function(){performance.mark("rive:await-wasm:end"),performance.measure("rive:await-wasm","rive:await-wasm:start","rive:await-wasm:end")}),[2,e]})})},e.prototype.init=function(){return v(this,void 0,void 0,function(){var t,n,r,i;return b(this,function(a){switch(a.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(e.missingErrorMessage),[2];a.label=1;case 1:return a.trys.push([1,4,,5]),[4,Promise.all([this.loadRiveFileBytes(),this.loadRuntime()])];case 2:if(n=(t=a.sent())[0],r=t[1],this.destroyed)return[2];return this.buffer=n,this.runtime=r,this.enablePerfMarks&&performance.mark("rive:init-data:start"),[4,this.initData()];case 3:return a.sent(),this.enablePerfMarks&&(performance.mark("rive:init-data:end"),performance.measure("rive:init-data","rive:init-data:start","rive:init-data:end")),[3,5];case 4:return i=a.sent(),this.fireLoadError(i instanceof Error?i.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:a.LoadError,data:e}),new y(e)},e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.cleanup=function(){this.referenceCount-=1,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),this.releaseFile(),this.releaseBindableArtboards(),this.destroyed=!0)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.getInstance=function(){if(null!==this.file)return this.referenceCount+=1,this.file},e.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},e.prototype.createBindableArtboard=function(e){if(null!=e){var t=new R(e);return(0,d.createFinalization)(t,t.nativeArtboard),this.bindableArtboards.push(t),t}return null},e.prototype.getArtboard=function(e){var t=this.file.artboardByName(e);if(null!=t)return new I(t,this)},e.prototype.getBindableArtboard=function(e){var t=this.file.bindableArtboardByName(e);return this.createBindableArtboard(t)},e.prototype.getDefaultBindableArtboard=function(){var e=this.file.bindableArtboardDefault();return this.createBindableArtboard(e)},e.prototype.internalBindableArtboardFromArtboard=function(e){var t=this.file.internalBindableArtboardFromArtboard(e);return this.createBindableArtboard(t)},e.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return null!==t?new z(t):null},e.missingErrorMessage="Rive source file or data buffer required",e.fileLoadErrorMessage="The file failed to load",e}(),N=function(){function t(e){var t,r,i=this;this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.dispatchPointerExit=!0,this.enableMultiTouch=!1,this.enableRiveAssetCDN=!0,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._needsRedraw=!1,this._currentCanvasWidth=0,this._currentCanvasHeight=0,this._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.drawOptimization=n.DrawOnChanged,this.enablePerfMarks=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(e){var t=i._hasZeroSize!==e;i._hasZeroSize=e,e?i._layout.maxX&&i._layout.maxY||i.resizeToCanvas():t&&i.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=U.add(this.canvas,this.onCanvasResize)),this._currentCanvasWidth=this.canvas.width,this._currentCanvasHeight=this.canvas.height,this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=null!==(t=e.layout)&&void 0!==t?t:new C,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.dispatchPointerExit=!1===e.dispatchPointerExit?e.dispatchPointerExit:this.dispatchPointerExit,this.enableMultiTouch=!!e.enableMultiTouch,this.drawOptimization=null!==(r=e.drawingOptions)&&void 0!==r?r:this.drawOptimization,this.enableRiveAssetCDN=void 0===e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.enablePerfMarks=!!e.enablePerfMarks,this.enablePerfMarks&&(h.RuntimeLoader.enablePerfMarks=!0),this.eventManager=new j,e.onLoad&&this.on(a.Lo
1ad,e.onLoad),e.onLoadError&&this.on(a.LoadError,e.onLoadError),e.onPlay&&this.on(a.Play,e.onPlay),e.onPause&&this.on(a.Pause,e.onPause),e.onStop&&this.on(a.Stop,e.onStop),e.onLoop&&this.on(a.Loop,e.onLoop),e.onStateChange&&this.on(a.StateChange,e.onStateChange),e.onAdvance&&this.on(a.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(a.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(a.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(a.Play,e.onplay),e.onpause&&!e.onPause&&this.on(a.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(a.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(a.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(a.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new x(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:e.autoplay,autoBind:e.autoBind,animations:e.animations,stateMachines:e.stateMachines,artboard:e.artboard,useOffscreenRenderer:e.useOffscreenRenderer})}return Object.defineProperty(t.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),t.new=function(e){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new t(e)},t.prototype.onSystemAudioChanged=function(){this.volume=this._volume},t.prototype.init=function(e){var n=this,r=e.src,i=e.buffer,o=e.riveFile,s=e.animations,u=e.stateMachines,l=e.artboard,c=e.autoplay,d=void 0!==c&&c,f=e.useOffscreenRenderer,p=void 0!==f&&f,m=e.autoBind,v=void 0!==m&&m;if(!this.destroyed){if(this.src=r,this.buffer=i,this.riveFile=o,!this.src&&!this.buffer&&!this.riveFile)throw new y(t.missingErrorMessage);var b=ea(s),g=ea(u);this.loaded=!1,this.readyForPlaying=!1,h.RuntimeLoader.awaitInstance().then(function(e){n.destroyed||(n.runtime=e,n.removeRiveListeners(),n.deleteRiveRenderer(),n.enablePerfMarks&&performance.mark("rive:make-renderer:start"),n.renderer=n.runtime.makeRenderer(n.canvas,p),n.enablePerfMarks&&(performance.mark("rive:make-renderer:end"),performance.measure("rive:make-renderer","rive:make-renderer:start","rive:make-renderer:end")),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(l,b,g,d,v).then(function(e){if(e)return n.setupRiveListeners()}).catch(function(e){console.error(e)}))}).catch(function(e){n.eventManager.fire({type:a.LoadError,data:e.message})})}},t.prototype.setupRiveListeners=function(e){var t=this;if(this.eventCleanup&&this.eventCleanup(),!this.shouldDisableRiveListeners){var n=(this.animator.stateMachines||[]).filter(function(e){return e.playing&&t.runtime.hasListeners(e.instance)}).map(function(e){return e.instance}),r=this.isTouchScrollEnabled,i=this.dispatchPointerExit,a=this.enableMultiTouch;e&&"isTouchScrollEnabled"in e&&(r=e.isTouchScrollEnabled),this.eventCleanup=(0,d.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:n,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:r,dispatchPointerExit:i,enableMultiTouch:a,layoutScaleFactor:this._layout.layoutScaleFactor})}},t.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null)},t.prototype.initializeAudio=function(){var e,t=this;D.status==s.UNAVAILABLE&&(this.file.hasAudio||(null===(e=this.artboard)||void 0===e?void 0:e.hasAudio)&&null===this._audioEventListener)&&(this._audioEventListener={type:a.AudioStatusChange,callback:function(){return t.onSystemAudioChanged()}},D.add(this._audioEventListener),D.establishAudio())},t.prototype.initArtboardSize=function(){this.artboard&&(this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height)},t.prototype.initData=function(e,t,n,r,i){return v(this,void 0,void 0,function(){var o,s,u;return b(this,function(l){switch(l.label){case 0:if(l.trys.push([0,3,,4]),null!=this.riveFile)return[3,2];return o=new V({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader,enablePerfMarks:this.enablePerfMarks}),this.riveFile=o,[4,o.init()];case 1:if(l.sent(),this.destroyed)return o.destroyIfUnused(),[2,!1];l.label=2;case 2:this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,i),this.initArtboardSize(),this.initializeAudio();try{this.loaded=!0,this.eventManager.fire({type:a.Load,data:null!==(u=this.src)&&void 0!==u?u:"buffer"})}catch(e){console.error(e)}return this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:var c;return s=(c=l.sent())&&c.isHandledError?c.message:"Problem loading file; may be corrupt!",this.eventManager.fire({type:a.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}})})},t.prototype.initArtboard=function(e,t,n,r,i){if(this.file){var o,s=e?this.file.artboardByName(e):this.file.defaultArtboard();if(!s)throw new y("Invalid artboard name or no default artboard");if(this.artboard=s,s.volume=this._volume*D.systemVolume,this.animator=new T(this.runtime,this.artboard,this.eventManager),t.length>0||n.length>0?(o=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):o=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?a.Play:a.Pause,data:o}}),i){var u=this.file.defaultArtboardViewModel(s);if(null!==u){var l=u.defaultInstance();if(null!==l){var c=new X(l,null);(0,d.createFinalization)(c,c.runtimeInstance),this.bindViewModelInstance(c)}}}}},t.prototype.drawFrame=function(){var e,t;(null===(e=null==document?void 0:document.timeline)||void 0===e?void 0:e.currentTime)?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),null===(t=this.runtime)||void 0===t||t.resolveAnimationFrame()):this.scheduleRendering()},t.prototype._canvasSizeChanged=function(){var e=!1;return this.canvas&&(this.canvas.width!==this._currentCanvasWidth&&(this._currentCanvasWidth=this.canvas.width,e=!0),this.canvas.height!==this._currentCanvasHeight&&(this._currentCanvasHeight=this.canvas.height,e=!0)),e},t.prototype.draw=function(e,t){this.frameRequestId=null;var r,o=performance.now();this.lastRenderTime||(this.lastRenderTime=e),this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,null==t||t());var s=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var u=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1}),l=0;l<u.length;l++){var c=u[l];c.advance(s),c.instance.didLoop&&(c.loopCount+=1),c.apply(1)}for(var h=this.animator.stateMachines.filter(function(e){return e.playing}),f=this.enablePerfMarks&&this.frameCount<3?this.frameCount:-1,p=0;p<h.length;p++){var m=h[p],v=m.reportedEventCount();if(v)for(var b=0;b<v;b++){var g=m.reportedEventAt(b);if(g)if(g.type===i.OpenUrl){if(this.eventManager.fire({type:a.RiveEvent,data:g}),this.automaticallyHandleEvents){var y=document.createElement("a"),w=g.url,_=g.target,A=(0,d.sanitizeUrl)(w);w&&y.setAttribute("href",A),_&&y.setAttribute("target",_),A&&A!==d.BLANK_URL&&y.click()}}else this.eventManager.fire({type:a.RiveEvent,data:g})}f>=0&&performance.mark("rive:sm-advance:start:f".concat(f)),m.advanceAndApply(s),f>=0&&(performance.mark("rive:sm-advance:end:f".concat(f)),performance.measure("rive:sm-advance:f".concat(f),"rive:sm-advance:start:f".concat(f),"rive:sm-advance:end:f".concat(f)))}0==this.animator.stateMachines.length&&this.artboard.advance(s);var C=this.renderer;!this._hasZeroSize&&(this.drawOptimization==n.AlwaysDraw||this.artboard.didChange()||this._needsRedraw||this._canvasSizeChanged())&&(C.clear(),
1C.save(),f>=0&&performance.mark("rive:align-renderer:start:f".concat(f)),this.alignRenderer(),f>=0&&(performance.mark("rive:align-renderer:end:f".concat(f)),performance.measure("rive:align-renderer:f".concat(f),"rive:align-renderer:start:f".concat(f),"rive:align-renderer:end:f".concat(f))),f>=0&&performance.mark("rive:artboard-draw:start:f".concat(f)),this.artboard.draw(C),f>=0&&(performance.mark("rive:artboard-draw:end:f".concat(f)),performance.measure("rive:artboard-draw:f".concat(f),"rive:artboard-draw:start:f".concat(f),"rive:artboard-draw:end:f".concat(f))),C.restore(),f>=0&&performance.mark("rive:renderer-flush:start:f".concat(f)),C.flush(),f>=0&&(performance.mark("rive:renderer-flush:end:f".concat(f)),performance.measure("rive:renderer-flush:f".concat(f),"rive:renderer-flush:start:f".concat(f),"rive:renderer-flush:end:f".concat(f))),this._needsRedraw=!1),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(s),this.frameCount++;var M=performance.now();for(this.frameTimes.push(M),this.durations.push(M-o);this.frameTimes[0]<=M-1e3;)this.frameTimes.shift(),this.durations.shift();null===(r=this._viewModelInstance)||void 0===r||r.handleCallbacks(),this.animator.isPlaying?this.scheduleRendering():this.animator.isPaused?this.lastRenderTime=0:this.animator.isStopped&&(this.lastRenderTime=0)},t.prototype.alignRenderer=function(){var e=this.renderer,t=this.runtime,n=this._layout,r=this.artboard;e.align(n.runtimeFit(t),n.runtimeAlignment(t),{minX:n.minX,minY:n.minY,maxX:n.maxX,maxY:n.maxY},r.bounds,this._devicePixelRatioUsed*n.layoutScaleFactor)},Object.defineProperty(t.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"frameTime",{get:function(){return 0===this.durations.length?0:(this.durations.reduce(function(e,t){return e+t},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),t.prototype.cleanup=function(){var e,t;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),null!==this._observed&&U.remove(this._observed),this.removeRiveListeners(),this.file&&(null===(e=this.riveFile)||void 0===e||e.cleanup(),this.file=null),this.riveFile=null,this.deleteRiveRenderer(),null!==this._audioEventListener&&(D.remove(this._audioEventListener),this._audioEventListener=null),null===(t=this._viewModelInstance)||void 0===t||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},t.prototype.deleteRiveRenderer=function(){var e;null===(e=this.renderer)||void 0===e||e.delete(),this.renderer=null},t.prototype.cleanupInstances=function(){null!==this.eventCleanup&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},t.prototype.retrieveTextRun=function(e){if(!e){console.warn("No text run name provided");return}if(!this.artboard){console.warn("Tried to access text run, but the Artboard is null");return}var t,n=this.artboard.textRun(e);if(!n){console.warn("Could not access a text run with name '".concat(e,"' in the '").concat(null===(t=this.artboard)||void 0===t?void 0:t.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."));return}return n},t.prototype.getTextRunValue=function(e){var t=this.retrieveTextRun(e);return t?t.text:void 0},t.prototype.setTextRunValue=function(e,t){var n=this.retrieveTextRun(e);n&&(n.text=t)},t.prototype.play=function(e,t){var n=this;if(e=ea(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.play(e,t)}});return}this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()},t.prototype.pause=function(e){var t=this;if(e=ea(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.pause(e)}});return}this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)},t.prototype.scrub=function(e,t){var n=this;if(e=ea(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return n.scrub(e,t)}});return}this.animator.scrub(e,t||0),this.drawFrame()},t.prototype.stop=function(e){var t=this;if(e=ea(e),!this.readyForPlaying){this.taskQueue.add({action:function(){return t.stop(e)}});return}this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()},t.prototype.reset=function(e){var t,n,r=null==e?void 0:e.artboard,i=ea(null==e?void 0:e.animations),a=ea(null==e?void 0:e.stateMachines),o=null!==(t=null==e?void 0:e.autoplay)&&void 0!==t&&t,s=null!==(n=null==e?void 0:e.autoBind)&&void 0!==n&&n;this.cleanupInstances(),this.initArtboard(r,i,a,o,s),this.taskQueue.process()},t.prototype.load=function(e){this.file=null,this.stop(),this.init(e)},Object.defineProperty(t.prototype,"layout",{get:function(){return this._layout},set:function(e){this._layout=e,e.maxX&&e.maxY||this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()}
1,enumerable:!1,configurable:!0}),t.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},t.prototype.resizeDrawingSurfaceToCanvas=function(t){if(this.canvas instanceof HTMLCanvasElement&&window){var n=this.canvas.getBoundingClientRect(),r=n.width,i=n.height,a=t||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=a,this.canvas.width=a*r,this.canvas.height=a*i,this._needsRedraw=!0,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===e.Layout){var o=this._layout.layoutScaleFactor;this.artboard.width=r/o,this.artboard.height=i/o}}},Object.defineProperty(t.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"animationNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.animationCount();t++)e.push(this.artboard.animationByIndex(t).name);return e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.stateMachineCount();t++)e.push(this.artboard.stateMachineByIndex(t).name);return e},enumerable:!1,configurable:!0}),t.prototype.stateMachineInputs=function(e){if(this.loaded){var t=this.animator.stateMachines.find(function(t){return t.name===e});return null==t?void 0:t.inputs}},t.prototype.retrieveInputAtPath=function(e,t){if(!e){console.warn("No input name provided for path '".concat(t,"'"));return}if(!this.artboard){console.warn("Tried to access input: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));return}var n=this.artboard.inputByPath(e,t);if(!n){console.warn("Could not access an input with name: '".concat(e,"', at path:'").concat(t,"'"));return}return n},t.prototype.setBooleanStateAtPath=function(e,t,n){var i=this.retrieveInputAtPath(e,n);i&&(i.type===r.Boolean?i.asBool().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(n,"' is not a boolean")))},t.prototype.setNumberStateAtPath=function(e,t,n){var i=this.retrieveInputAtPath(e,n);i&&(i.type===r.Number?i.asNumber().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(n,"' is not a number")))},t.prototype.fireStateAtPath=function(e,t){var n=this.retrieveInputAtPath(e,t);n&&(n.type===r.Trigger?n.asTrigger().fire():console.warn("Input with name: '".concat(e,"', at path:'").concat(t,"' is not a trigger")))},t.prototype.retrieveTextAtPath=function(e,t){if(!e){console.warn("No text name provided for path '".concat(t,"'"));return}if(!t){console.warn("No path provided for text '".concat(e,"'"));return}if(!this.artboard){console.warn("Tried to access text: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));return}var n=this.artboard.textByPath(e,t);if(!n){console.warn("Could not access text with name: '".concat(e,"', at path:'").concat(t,"'"));return}return n},t.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);if(!n){console.warn("Could not get text with name: '".concat(e,"', at path:'").concat(t,"'"));return}return n.text},t.prototype.setTextRunValueAtPath=function(e,t,n){var r=this.retrieveTextAtPath(e,n);if(!r){console.warn("Could not set text with name: '".concat(e,"', at path:'").concat(n,"'"));return}r.text=t},Object.defineProperty(t.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStopped",{get:function(){var e,t;return null===(t=null===(e=this.animator)||void 0===e?void 0:e.isStopped)||void 0===t||t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),t.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},t.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},t.prototype.unsubscribe=function(e,t){console.warn("This function is deprecated: please use `off()` instead."),this.off(e,t)},t.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},t.prototype.unsubscribeAll=function(e){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(e)},t.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},t.prototype.startRendering=function(){this.drawFrame()},t.prototype.scheduleRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},t.prototype.enableFPSCounter=function(e){this.runtime.enableFPSCounter(e)},t.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(t.prototype,"contents",{get:function(){if(this.loaded){for(var e={artboards:[]},t=0;t<this.file.artboardCount();t++){for(var n=this.file.artboardByIndex(t),r={name:n.name,animations:[],stateMachines:[]},i=0;i<n.animationCount();i++){var a=n.animationByIndex(i);r.animations.push(a.name)}for(var o=0;o<n.stateMachineCount();o++){for(var s=n.stateMachineByIndex(o),u=s.name,l=new this.runtime.StateMachineInstance(s,n),c=[],h=0;h<l.inputCount();h++){var d=l.input(h);c.push({name:d.name,type:d.type})}r.stateMachines.push({name:u,inputs:c})}e.artboards.push(r)}return e}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volume",{get:function(){return this.artboard&&this.artboard.volume!==this._volume&&(this._volume=this.artboard.volume),this._volume},set:function(e){this._volume=e,this.artboard&&(this.artboard.volume=e*D.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"artboardWidth",{get:function(){var e;return this.artboard?this.artboard.width:null!==(e=this._artboardWidth)&&void 0!==e?e:0},set:function(e){this._artboardWidth=e,this.artboard&&(this.artboard.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"artboardHeight",{get:function(){var e;return this.artboard?this.artboard.height:null!==(e=this._artboardHeight)&&void 0!==e?e:0},set:function(e){this._artboardHeight=e,this.artboard&&(this.artboard.height=e)},enumerable:!1,configurable:!0}),t.prototype.resetArtboardSize=function(){this.artboard?(this.artboard.resetArtboardSize(),this._artboardWidth=this.artboard.width,this._artboardHeight=this.artboard.height):(this._artboardWidth=void 0,this._artboardHeight=void 0)},Object.defineProperty(t.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(e){this._devicePixelRatioUsed=e},enumerable:!1,configurable:!0}),t.prototype.bindViewModelInstance=function(e){var t;this.artboard&&!this.destroyed&&e&&e.runtimeInstance&&(e.internalIncrementReferenceCount(),null===(t=this._viewModelInstance)||void 0===t||t.cleanup(),this._viewModelInstance=e,this.animator.stateMachines.length>
10?this.animator.stateMachines.forEach(function(t){return t.bindViewModelInstance(e)}):this.artboard.bindViewModelInstance(e.runtimeInstance))},Object.defineProperty(t.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),t.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return null!==t?new z(t):null},t.prototype.viewModelByName=function(e){var t;return null===(t=this.riveFile)||void 0===t?void 0:t.viewModelByName(e)},t.prototype.enums=function(){if(null===this._dataEnums){var e=this.file.enums();this._dataEnums=e.map(function(e){return new H(e)})}return this._dataEnums},t.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new z(e)}return null},t.prototype.getArtboard=function(e){var t,n;return null!==(n=null===(t=this.riveFile)||void 0===t?void 0:t.getArtboard(e))&&void 0!==n?n:null},t.prototype.getBindableArtboard=function(e){var t,n;return null!==(n=null===(t=this.riveFile)||void 0===t?void 0:t.getBindableArtboard(e))&&void 0!==n?n:null},t.prototype.getDefaultBindableArtboard=function(){var e,t;return null!==(t=null===(e=this.riveFile)||void 0===e?void 0:e.getDefaultBindableArtboard())&&void 0!==t?t:null},t.missingErrorMessage="Rive source file or data buffer required",t.cleanupErrorMessage="Attempt to use file after calling cleanup.",t}(),($=u||(u={})).none="none",$.string="string",$.number="number",$.boolean="boolean",$.color="color",$.list="list",$.enumType="enumType",$.trigger="trigger",$.viewModel="viewModel",$.integer="integer",$.listIndex="listIndex",$.image="image",$.artboard="artboard",z=function(){function e(e){this._viewModel=e}return Object.defineProperty(e.prototype,"instanceCount",{get:function(){return this._viewModel.instanceCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModel.name},enumerable:!1,configurable:!0}),e.prototype.instanceByIndex=function(e){var t=this._viewModel.instanceByIndex(e);if(null!==t){var n=new X(t,null);return(0,d.createFinalization)(n,t),n}return null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);if(null!==t){var n=new X(t,null);return(0,d.createFinalization)(n,t),n}return null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();if(null!==e){var t=new X(e,null);return(0,d.createFinalization)(t,e),t}return null},e.prototype.instance=function(){var e=this._viewModel.instance();if(null!==e){var t=new X(e,null);return(0,d.createFinalization)(t,e),t}return null},Object.defineProperty(e.prototype,"properties",{get:function(){return this._viewModel.getProperties()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instanceNames",{get:function(){return this._viewModel.getInstanceNames()},enumerable:!1,configurable:!0}),e}(),H=function(){function e(e){this._dataEnum=e}return Object.defineProperty(e.prototype,"name",{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),e}(),(Y=l||(l={})).Number="number",Y.String="string",Y.Boolean="boolean",Y.Color="color",Y.Trigger="trigger",Y.Enum="enum",Y.List="list",Y.Image="image",Y.Artboard="artboard",X=function(){function e(e,t){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this.selfUnref=!1,this._runtimeInstance=e,null!==t&&this._parents.push(t)}return Object.defineProperty(e.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nativeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),e.prototype.handleCallbacks=function(){0!==this._propertiesWithCallbacks.length&&(this._propertiesWithCallbacks.forEach(function(e){e.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(e){e.clearChanges()}
1)),this._children.forEach(function(e){return e.handleCallbacks()})},e.prototype.addParent=function(e){!this._parents.includes(e)&&(this._parents.push(e),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&e.addToViewModelCallbacks(this))},e.prototype.removeParent=function(e){var t=this._parents.indexOf(e);-1!==t&&(this._parents[t].removeFromViewModelCallbacks(this),this._parents.splice(t,1))},e.prototype.addToPropertyCallbacks=function(e){var t=this;!this._propertiesWithCallbacks.includes(e)&&(this._propertiesWithCallbacks.push(e),this._propertiesWithCallbacks.length>0&&this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(t){return t!==e}),0===this._children.length&&0===this._propertiesWithCallbacks.length&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.addToViewModelCallbacks=function(e){var t=this;this._children.includes(e)||(this._children.push(e),this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromViewModelCallbacks=function(e){var t=this;this._children.includes(e)&&(this._children=this._children.filter(function(t){return t!==e}),0===this._children.length&&0===this._propertiesWithCallbacks.length&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(e){e.clearCallbacks()})},e.prototype.propertyFromPath=function(e,t){var n=e.split("/");return this.propertyFromPathSegments(n,0,t)},e.prototype.viewModelFromPathSegments=function(e,t){var n=this.internalViewModelInstance(e[t]);if(null!==n)if(t==e.length-1)return n;else return n.viewModelFromPathSegments(e,t++);return null},e.prototype.propertyFromPathSegments=function(e,t,n){if(t<e.length-1){var r,i,a,o,s,u,c,h,d,f,p,m,v,b,g,y,w,_,A=this.internalViewModelInstance(e[t]);return null!==A?A.propertyFromPathSegments(e,t+1,n):null}var C=null;switch(n){case l.Number:if(null!==(C=null!==(i=null===(r=this._runtimeInstance)||void 0===r?void 0:r.number(e[t]))&&void 0!==i?i:null))return new J(C,this);break;case l.String:if(null!==(C=null!==(o=null===(a=this._runtimeInstance)||void 0===a?void 0:a.string(e[t]))&&void 0!==o?o:null))return new q(C,this);break;case l.Boolean:if(null!==(C=null!==(u=null===(s=this._runtimeInstance)||void 0===s?void 0:s.boolean(e[t]))&&void 0!==u?u:null))return new Q(C,this);break;case l.Color:if(null!==(C=null!==(h=null===(c=this._runtimeInstance)||void 0===c?void 0:c.color(e[t]))&&void 0!==h?h:null))return new et(C,this);break;case l.Trigger:if(null!==(C=null!==(f=null===(d=this._runtimeInstance)||void 0===d?void 0:d.trigger(e[t]))&&void 0!==f?f:null))return new K(C,this);break;case l.Enum:if(null!==(C=null!==(m=null===(p=this._runtimeInstance)||void 0===p?void 0:p.enum(e[t]))&&void 0!==m?m:null))return new Z(C,this);break;case l.List:if(null!==(C=null!==(b=null===(v=this._runtimeInstance)||void 0===v?void 0:v.list(e[t]))&&void 0!==b?b:null))return new ee(C,this);break;case l.Image:if(null!==(C=null!==(y=null===(g=this._runtimeInstance)||void 0===g?void 0:g.image(e[t]))&&void 0!==y?y:null))return new en(C,this);break;case l.Artboard:if(null!==(C=null!==(_=null===(w=this._runtimeInstance)||void 0===w?void 0:w.artboard(e[t]))&&void 0!==_?_:null))return new er(C,this)}return null},e.prototype.internalViewModelInstance=function(t){if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var n,r=null===(n=this._runtimeInstance)||void 0===n?void 0:n.viewModel(t);if(null!==r){var i=new e(r,this);return(0,d.createFinalization)(i,r),i.internalIncrementReferenceCount(),this._viewModelInstances.set(t,i),i}return null},e.prototype.number=function(e){return this.propertyFromPath(e,l.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,l.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,l.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,l.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,l.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,l.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,l.List)},e.prototype.image=function(e){return this.propertyFromPath(e,l.Image)},e.prototype.artboard=function(e){return this.propertyFromPath(e,l.Artboard)},e.prototype.viewModel=function(e){var t=e.split("/"),n=t.length>1?this.viewModelFromPathSegments(t.slice(0,t.length-1),0):this;return null!=n?n.internalViewModelInstance(t[t.length-1]):null},e.prototype.internalReplaceViewModel=function(e,t){var n;if(null!==t.runtimeInstance){var r=(null===(n=this._runtimeInstance)||void 0===n?void 0:n.replaceViewModel(e,t.runtimeInstance))||!1;if(r){t.internalIncrementReferenceCount();var i=this.internalViewModelInstance(e);null!==i&&(i.removeParent(this),this._children.includes(i)&&(this._children=this._children.filter(function(e){return e!==i})),i.cleanup()),this._viewModelInstances.set(e,t),t.addParent(this)}return r}return!1},e.prototype.replaceViewModel=function(e,t){var n,r=e.split("/"),i=r.length>1?this.viewModelFromPathSegments(r.slice(0,r.length-1),0):this;return null!==(n=null==i?void 0:i.internalReplaceViewModel(r[r.length-1],t))&&void 0!==n&&n},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,null===(e=this._runtimeInstance)||void 0===e||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,null===(e=this._runtimeInstance)||void 0===e||e.decrementReferenceCount()},Object.defineProperty(e.prototype,"properties",{get:function(){var e;return(null===(e=this._runtimeInstance)||void 0===e?void 0:e.getProperties().map(function(e){return m({},e)}))||[]}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewModelName",{get:function(){var e,t;return null!==(t=null===(e=this._runtimeInstance)||void 0===e?void 0:e.getViewModelName())&&void 0!==t?t:""},enumerable:!1,configurable:!0}),e.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},e.prototype.cleanup=function(){var e,t=this;if(this._referenceCount--,this._referenceCount<=0){this.selfUnref&&(null===(e=this._runtimeInstance)||void 0===e||e.unref()),this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(e){e.cleanup()}),this._viewModelInstances.clear();var n=g([],this._children,!0);this._children.length=0;var r=g([],this._parents,!0);this._parents.length=0,n.forEach(function(e){e.removeParent(t)}),r.forEach(function(e){e.removeFromViewModelCallbacks(t)})}},e}(),q=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(G=function(){function e(e,t){this.callbacks=[],this._viewModelInstanceValue=e,this._parentViewModel=t}return e.prototype.on=function(e){0===this.callbacks.length&&this._viewModelInstanceValue.clearChanges(),this.callbacks.includes(e)||(this.callbacks.push(e),this._parentViewModel.addToPropertyCallbacks(this))},e.prototype.off=function(e){e?this.callbacks=this.callbacks.filter(function(t){return t!==e}):this.callbacks.length=0,0===this.callbacks.length&&this._parentViewModel.removeFromPropertyCallbacks(this)},e.prototype.internalHandleCallback=function(e){},e.prototype.handleCallbacks=function(){var e=this;this._viewModelInstanceValue.hasChanged&&this.callbacks.forEach(function(t){e.internalHandleCallback(t)})},e.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},e.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),e}()),J=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(G),Q=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(G),K=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(G),Z=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(e){this._viewModelInstanceValue.valueIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(G),ee=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),t.prototype.addInstance=function(e){null!=e.runtimeInstance&&(this._viewModelInstanceValue.addInstance(e.runtimeInstance),e.addParent(this._parentViewModel))},t.prototype.addInstanceAt=function(e,t){return!!(null!=e.runtimeInstance&&this._viewModelInstanceValue.addInstanceAt(e.runtimeInstance,t))&&(e.addParent(this._parentViewModel),!0)},t.prototype.removeInstance=function(e){null!=e.runtimeInstance&&(this._viewModelInstanceValue.removeInstance(e.runtimeInstance),e.removeParent(this._parentViewModel))},t.prototype.removeInstanceAt=function(e){this._viewModelInstanceValue.removeInstanceAt(e)},t.prototype.instanceAt=function(e){var t=this._viewModelInstanceValue.instanceAt(e);if(null!=t){var n=new X(t,this._parentViewModel);return(0,d.createFinalization)(n,t),n}return null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(G),et=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e}
1,enumerable:!1,configurable:!0}),t.prototype.rgb=function(e,t,n){this._viewModelInstanceValue.rgb(e,t,n)},t.prototype.rgba=function(e,t,n,r){this._viewModelInstanceValue.argb(r,e,t,n)},t.prototype.argb=function(e,t,n,r){this._viewModelInstanceValue.argb(e,t,n,r)},t.prototype.alpha=function(e){this._viewModelInstanceValue.alpha(e)},t.prototype.opacity=function(e){this._viewModelInstanceValue.alpha(Math.round(255*Math.max(0,Math.min(1,e))))},t.prototype.internalHandleCallback=function(e){e(this.value)},t}(G),en=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t;this._viewModelInstanceValue.value(null!==(t=null==e?void 0:e.nativeImage)&&void 0!==t?t:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(G),er=function(e){function t(t,n){return e.call(this,t,n)||this}return p(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t,n,r;r=e.isBindableArtboard?e:e.file.internalBindableArtboardFromArtboard(e.nativeArtboard),this._viewModelInstanceValue.value(null!==(t=null==r?void 0:r.nativeArtboard)&&void 0!==t?t:null),(null==r?void 0:r.nativeViewModel)&&this._viewModelInstanceValue.viewModelInstance(null!==(n=null==r?void 0:r.nativeViewModel)&&void 0!==n?n:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(G),ei=function(e){return v(void 0,void 0,void 0,function(){var t;return b(this,function(n){switch(n.label){case 0:return[4,fetch(new Request(e))];case 1:if(!(t=n.sent()).ok)throw Error("Failed to fetch the Rive file: HTTP ".concat(t.status));return[4,t.arrayBuffer()];case 2:return[2,n.sent()]}})})},ea=function(e){return"string"==typeof e?[e]:e instanceof Array?e:[]},eo={EventManager:j,TaskQueueManager:x},es=function(e){return v(void 0,void 0,void 0,function(){var t,n;return b(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return h.RuntimeLoader.getInstance(function(n){n.decodeAudio(e,t)})})];case 1:return t=r.sent(),n=new d.AudioWrapper(t),d.finalizationRegistry.register(n,t),[2,n]}})})},eu=function(e){return v(void 0,void 0,void 0,function(){var t,n;return b(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return h.RuntimeLoader.getInstance(function(n){n.decodeImage(e,t)})})];case 1:return t=r.sent(),n=new d.ImageWrapper(t),d.finalizationRegistry.register(n,t),[2,n]}})})},el=function(e){return v(void 0,void 0,void 0,function(){var t,n;return b(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return h.RuntimeLoader.getInstance(function(n){n.decodeFont(e,t)})})];case 1:return t=r.sent(),n=new d.FontWrapper(t),d.finalizationRegistry.register(n,t),[2,n]}})})},ef})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.