PageSourceSearch

https://astian.org/wp-content/plugins/pixfort-core/dist/front/rive-vendors.aff9d4a82d5cc99565da.js

js astian.org collected 2026-09-24 09:30:36 UTC 135,121 bytes, 1 lines download raw bytes

1(self.webpackChunkpixfort_core=self.webpackChunkpixfort_core||[]).push([[1489],{4052(e){var t;t=()=>(()=>{"use strict";var e=[,(e,t,n)=>{var r;n.r(t),n.d(t,{default:()=>i});const i=(r="undefined"!=typeof document?document.currentScript?.src:void 0,function(e={}){var t,n,i=e,a=new Promise((e,r)=>{t=e,n=r}),o="object"==typeof window,s="function"==typeof importScripts;function u(){function e(e){const a=r;n=t=0,r=new Map,a.forEach(t=>{try{t(e)}catch(e){}}),this.nb(),i&&i.Pb()}let t=0,n=0,r=new Map,i=null,a=null;this.requestAnimationFrame=function(i){t||=requestAnimationFrame(e.bind(this));const a=++n;return r.set(a,i),a},this.cancelAnimationFrame=function(e){r.delete(e),t&&0==r.size&&(cancelAnimationFrame(t),t=0)},this.Nb=function(e){a&&(document.body.remove(a),a=null),e||(a=document.createElement("div"),a.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.Pb=function(){var r=performance.now();n?(++t,1e3<(r-=n)&&(e(1e3*t/r),t=n=0)):(n=r,t=0)}}},this.Kb=function(){a&&(document.body.remove(a),a=null),i=null},this.nb=function(){}}function l(e){const t=new Map;let 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&&(n=Math.max(...t.keys()))},1e3)),n=Math.max(r,n),n<<e}}const c=i.onRuntimeInitialized;i.onRuntimeInitialized=function(){c&&c();let e=i.decodeAudio;i.decodeAudio=function(t,n){n(t=e(t))};let t=i.decodeFont;
1i.decodeFont=function(e,n){n(e=t(e))};const n=i.FileAssetLoader;i.ptrToAsset=e=>{let t=i.ptrToFileAsset(e);return t.isImage?i.ptrToImageAsset(e):t.isFont?i.ptrToFontAsset(e):t.isAudio?i.ptrToAudioAsset(e):t},i.CustomFileAssetLoader=n.extend("CustomFileAssetLoader",{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.Db=e},loadContents:function(e,t){return e=i.ptrToAsset(e),this.Db(e,t)}}),i.CDNFileAssetLoader=n.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(e){let t=i.ptrToAsset(e);return""!==(e=t.cdnUuid)&&(n=t.cdnBaseUrl+"/"+e,(r=new XMLHttpRequest).responseType="arraybuffer",r.onreadystatechange=function(){4==r.readyState&&200==r.status&&(e=>{t.decode(new Uint8Array(e.response))})(r)},r.open("GET",n,!0),r.send(null),!0);var n,r}}),i.FallbackFileAssetLoader=n.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.jb=[]},addLoader:function(e){this.jb.push(e)},loadContents:function(e,t){for(let n of this.jb)if(n.loadContents(e,t))return!0;return!1}});let r=i.computeAlignment;i.computeAlignment=function(e,t,n,i,a=1){return r.call(this,e,t,n,i,a)}};const h="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),d=new function(){function e(){if(!t){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};let s;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(s=e.getContext("webgl",o),n=1,!s)return!1}else if(s=e.getContext("webgl2",o))n=2;else{if(!(s=e.getContext("webgl",o)))return!1;n=1}function l(e,t,n){if(t=s.createShader(t),s.shaderSource(t,n),s.compileShader(t),0<((n=s.getShaderInfoLog(t))||"").length)throw n;s.attachShader(e,t)}if(s=new Proxy(s,{get:(e,t)=>e.isContextLost()?(u||(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||(u=!0)}}),r=Math.min(s.getParameter(s.MAX_RENDERBUFFER_SIZE),s.getParameter(s.MAX_TEXTURE_SIZE)),l(e=s.createProgram(),s.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                }"),l(e,s.FRAGMENT_SHADER,"precision highp float;\n                uniform sampler2D image;\n                varying vec2 st;\n                void main() {\n                    gl_FragColor = texture2D(image, st);\n                }"),s.bindAttribLocation(e,0,"vertex"),s.bindAttribLocation(e,1,"uv"),s.linkProgram(e),0<((o=s.getProgramInfoLog(e))||"").trim().length)throw o;i=s.getUniformLocation(e,"mat"),a=s.getUniformLocation(e,"translate"),s.useProgram(e),s.bindBuffer(s.ARRAY_BUFFER,s.createBuffer()),s.enableVertexAttribArray(0),s.enableVertexAttribArray(1),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,s.createBuffer()),s.uniform1i(s.getUniformLocation(e,"image"),0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=s}return!0}let t=null,n=0,r=0,i=null,a=null,o=0,s=0,u=!1;e(),this.ac=function(){return e(),r},this.Jb=function(e){t.deleteTexture&&t.deleteTexture(e)},this.Ib=function(r){if(!e())return null;const 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};const c=new l(8),h=new l(8),d=new l(10),f=new l(10);this.Mb=function(n,r,u,l,p){if(e()){var m=c.push(n),v=h.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.ub-e.ub),m=d.push(l),o!=m&&(t.bufferData(t.ARRAY_BUFFER,8*m,t.DYNAMIC_DRAW),o=m),m=0,u))t.bufferSubData(t.ARRAY_BUFFER,m,b.Sa),m+=4*b.Sa.length;for(var g of u)t.bufferSubData(t.ARRAY_BUFFER,m,g.Ab),m+=4*g.Ab.length;for(var y of(m=f.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;y=0,g=!0,m=b=0;for(const e of u){e.image.Ia!=y&&(t.bindTexture(t.TEXTURE_2D,e.image.Ha||null),y=e.image.Ia),e.fc?(t.scissor(e.Ya,v-e.Za-e.ib,e.tc,e.ib),g=!0):g&&(t.scissor(0,v-r,n,r),g=!1),u=2/n;const o=-2/r;t.uniform4f(i,e.ga[0]*u*e.za,e.ga[1]*o*e.Aa,e.ga[2]*u*e.za,e.ga[3]*o*e.Aa),t.uniform2f(a,e.ga[4]*u*e.za+u*(e.Ya-e.bc*e.za)-1,e.ga[5]*o*e.Aa+o*(e.Za-e.cc*e.Aa)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,m),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,m+4*l),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,b),m+=4*e.Sa.length,b+=2*e.indices.length}}}},this.canvas=function(){return e()&&t.canvas}},f=i.onRuntimeInitialized;i.onRuntimeInitialized=function(){function e(e){switch(e){case p.srcOver:return"source-over";case p.screen:return"screen";case p.overlay:return"overlay";case p.darken:return"darken";case p.lighten:return"lighten";case p.colorDodge:return"color-dodge";case p.colorBurn:return"color-burn";case p.hardLight:return"hard-light";case p.softLight:return"soft-light";case p.difference:return"difference";case p.exclusion:return"exclusion";case p.multiply:return"multiply";case p.hue:return"hue";case p.saturation:return"saturation";case p.color:return"color";case p.luminosity:return"luminosity"}}function t(e){return"rgba("+((16711680&e)>>>16)+","+((65280&e)>>>8)+","+((255&e)>>>0)+","+((4278190080&e)>>>24)/255+")"}function n(){0<M.length&&(d.Mb(C.drawWidth(),C.drawHeight(),M,P,E),M=[],E=P=0,C.reset(512,512));for(const e of A){for(const t of e.H)t();e.H=[]}A.clear()}f&&f();var r=i.RenderPaintStyle;const a=i.RenderPath,o=i.RenderPaint,s=i.Renderer,l=i.StrokeCap,c=i.StrokeJoin,p=i.BlendMode,m=r.fill,v=r.stroke,b=i.FillRule.evenOdd;let g=1;var y=i.RenderImage.extend("CanvasRenderImage",{__construct:function({ka:e,va:t}={}){this.__parent.__construct.call(this),this.Ia=g,g=g+1&2147483647||1,this.ka=e,this.va=t},__destruct:function(){this.Ha&&(d.Jb(this.Ha),URL.revokeObjectURL(this.Va)),this.__parent.__destruct.call(this)},decode:function(e){var t=this;t.va&&t.va(t);var n=new Image;t.Va=URL.createObjectURL(new Blob([e],{type:"image/png"})),n.onload=function(){t.Cb=n,t.Ha=d.Ib(n),t.size(n.width,n.height),t.ka&&t.ka(t)},n.src=t.Va}}),w=a.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.T=new Path2D},rewind:function(){this.T=new Path2D},addPath:function(e,t,n,r,i,a,o){var s=this.T,u=s.addPath;e=e.T;const 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.Ua=e},moveTo:function(e,t){this.T.moveTo(e,t)},lineTo:function(e,t){this.T.lineTo(e,t)},cubicTo:function(e,t,n,r,i,a){this.T.bezierCurveTo(e,t,n,r,i,a)},close:function(){this.T.closePath()}}),_=o.extend("CanvasRenderPaint",{color:function(e){this.Wa=t(e)},thickness:function(e){this.Fb=e},join:function(e){switch(e){case c.miter:this.Ga="miter";break;case c.round:this.Ga="round";break;case c.bevel:this.Ga="bevel"}},cap:function(e){switch(e){case l.butt:this.Fa="butt";break;case l.round:this.Fa="round";break;case l.square:this.Fa="square"}},style:function(e){this.Eb=e},blendMode:function(t){this.Bb=e(t)},clearGradient:function(){this.ia=null},linearGradient:function(e,t,n,r){this.ia={wb:e,xb:t,bb:n,cb:r,Pa:[]}},radialGradient:function(e,t,n,r){this.ia={wb:e,xb:t,bb:n,cb:r,Pa:[],$b:!0}},addStop:function(e,t){this.ia.Pa.push({color:e,stop:t})},completeGradient:function(){},draw:function(e,n,r){let i=this.Eb;var a=this.Wa,o=this.ia;if(e.globalCompositeOperation=this.Bb,null!=o){a=o.wb;var s=o.xb;const n=o.bb;var u=o.cb;const r=o.Pa;o.$b?(o=n-a,u-=s,a=e.createRadialGradient(a,s,0,a,s,Math.sqrt(o*o+u*u))):a=e.createLinearGradient(a,s,n,u);for(let e=0,n=r.length;e<n;e++)s=r[e],a.addColorStop(s.stop,t(s.color));this.Wa=a,this.ia=null}switch(i){case v:e.strokeStyle=a,e.lineWidth=this.Fb,e.lineCap=this.Fa,e.lineJoin=this.Ga,e.stroke(n);break;case m:e.fillStyle=a,e.fill(n,r)}}});const A=new Set;let C=null,M=[],P=0,E=0;var I=i.CanvasRenderer=s.extend("Renderer",{__construct:function(e){this.__parent.__construct.call(this),this.S=[1,0,0,1,0,0],this.B=e.getContext("2d"),this.Ta=e,this.H=[]},save:function(){this.S.push(...this.S.slice(this.S.length-6)),this.H.push(this.B.save.bind(this.B))},restore:function(){const e=this.S.length-6;if(6>
1e)throw"restore() called without matching save().";this.S.splice(e),this.H.push(this.B.restore.bind(this.B))},transform:function(e,t,n,r,i,a){const o=this.S,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.H.push(this.B.transform.bind(this.B,e,t,n,r,i,a))},rotate:function(e){const t=Math.sin(e);e=Math.cos(e),this.transform(e,t,-t,e,0,0)},_drawPath:function(e,t){this.H.push(t.draw.bind(t,this.B,e.T,e.Ua===b?"evenodd":"nonzero"))},_drawRiveImage:function(t,n,r,i){var a=t.Cb;if(a){var o=this.B,s=e(r);this.H.push(function(){o.globalCompositeOperation=s,o.globalAlpha=i,o.drawImage(a,0,0),o.globalAlpha=1})}},_getMatrix:function(e){const t=this.S,n=t.length-6;for(let r=0;6>r;++r)e[r]=t[n+r]},_drawImageMesh:function(t,r,a,o,s,u,l,c,h,f,p){r=this.B.canvas.width;var m=this.B.canvas.height;const v=f-c,b=p-h;c=Math.max(c,0),h=Math.max(h,0),f=Math.min(f,r),p=Math.min(p,m);const g=f-c,y=p-h;if(!(0>=g||0>=y)){f=g<v||y<b,r=p=1;var w=Math.ceil(g*p),_=Math.ceil(y*r);m=d.ac(),w>m&&(p*=m/w,w=m),_>m&&(r*=m/_,_=m),C||(C=new i.DynamicRectanizer(m),C.reset(512,512)),0>(m=C.addRect(w,_))&&(n(),A.add(this),m=C.addRect(w,_));var I=65535&m,F=m>>16;M.push({ga:this.S.slice(this.S.length-6),image:t,Ya:I,Za:F,bc:c,cc:h,tc:w,ib:_,za:p,Aa:r,Sa:new Float32Array(s),Ab:new Float32Array(u),indices:new Uint16Array(l),fc:f,ub:t.Ia<<1|(f?1:0)}),P+=s.length,E+=l.length;var R=this.B,T=e(a);this.H.push(function(){R.save(),R.resetTransform(),R.globalCompositeOperation=T,R.globalAlpha=o;const e=d.canvas();e&&R.drawImage(e,I,F,w,_,c,h,g,y),R.restore()})}},_clipPath:function(e){this.H.push(this.B.clip.bind(this.B,e.T,e.Ua===b?"evenodd":"nonzero"))},clear:function(){A.add(this),this.H.push(this.B.clearRect.bind(this.B,0,0,this.Ta.width,this.Ta.height))},flush:function(){},translate:function(e,t){this.transform(1,0,0,1,e,t)}});i.makeRenderer=function(e){const t=new I(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<h.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.H.push(n[r].bind(n,...e))}}return e[r]},set(e,r,i){if(r in n)return t.H.push(()=>{n[r]=i}),!0}})},i.decodeImage=function(e,t){new y({ka:t}).decode(e)},i.renderFactory={makeRenderPaint:function(){return new _},makeRenderPath:function(){return new w},makeRenderImage:function(){let e=R;return new y({va:()=>{e.total++},ka:()=>{if(e.loaded++,e.loaded===e.total){const t=e.ready;t&&(t(),e.ready=null)}}})}};let F=i.load,R=null;i.load=function(e,t,n=!0){const r=new i.FallbackFileAssetLoader;return void 0!==t&&r.addLoader(t),n&&(t=new i.CDNFileAssetLoader,r.addLoader(t)),new Promise(function(t){let n=null;R={total:0,loaded:0,ready:function(){t(n)}},n=F(e,r),0==R.total&&t(n)})};let T=i.RendererWrapper.prototype.align;i.RendererWrapper.prototype.align=function(e,t,n,r,i=1){T.call(this,e,t,n,r,i)},r=new u,i.requestAnimationFrame=r.requestAnimationFrame.bind(r),i.cancelAnimationFrame=r.cancelAnimationFrame.bind(r),i.enableFPSCounter=r.Nb.bind(r),i.disableFPSCounter=r.Kb,r.nb=n,i.resolveAnimationFrame=n,i.cleanup=function(){C&&C.delete()}};var p,m,v=Object.assign({},i),b="./this.program",g="";(o||s)&&(s?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),r&&(g=r),g=g.startsWith("blob:")?"":g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1),s&&(m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),p=(e,t,n)=>{if($(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 y,w=i.print||function(){}.bind(),_=i.printErr||function(){}.bind();Object.assign(i,v),v=null,i.thisProgram&&(b=i.thisProgram),i.wasmBinary&&(y=i.wasmBinary);var A,C,M,P,E,I,F,R,T,L=!1;function O(){var e=A.buffer;i.HEAP8=C=new Int8Array(e),i.HEAP16=P=new Int16Array(e),i.HEAPU8=M=new Uint8Array(e),i.HEAPU16=E=new Uint16Array(e),i.HEAP32=I=new Int32Array(e),i.HEAPU32=F=new Uint32Array(e),i.HEAPF32=R=new Float32Array(e),i.HEAPF64=T=new Float64Array(e)}var j=[],k=[],S=[];function x(){var e=i.preRun.shift();j.unshift(e)}var D=0,W=null,U=null;function B(e){throw i.onAbort?.(e),_(e="Aborted("+e+")"),L=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),n(e),e}var V,N=e=>e.startsWith("data:application/octet-stream;base64,"),$=e=>e.startsWith("file://");function z(e){if(e==V&&y)return new Uint8Array(y);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}function Y(e,t,n){return function(e){return y?Promise.resolve().then(()=>z(e)):new Promise((t,n)=>{p(e,e=>
1t(new Uint8Array(e)),()=>{try{t(z(e))}catch(e){n(e)}})})}(e).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{_(`failed to asynchronously prepare wasm: ${e}`),B(e)})}var H,X,G={489554:(e,t,n,r,i)=>{if("undefined"==typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if(void 0===window.h){window.h={ya:0},window.h.I={},window.h.I.wa=e,window.h.I.capture=t,window.h.I.Ja=n,window.h.fa={},window.h.fa.stopped=r,window.h.fa.vb=i;let a=window.h;a.D=[],a.rc=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.zb=function(e){for(a.D[e]=null;0<a.D.length&&null==a.D[a.D.length-1];)a.D.pop()},a.Oc=function(e){for(var t=0;t<a.D.length;++t)if(a.D[t]==e)return a.zb(t)},a.pa=function(e){return a.D[e]},a.Ra=["touchend","click"],a.unlock=function(){for(var e=0;e<a.D.length;++e){var t=a.D[e];null!=t&&null!=t.K&&t.state===a.fa.vb&&t.K.resume().then(()=>{jn(t.ob)},e=>{})}a.Ra.map(function(e){document.removeEventListener(e,a.unlock,!0)})},a.Ra.map(function(e){document.addEventListener(e,a.unlock,!0)})}return window.h.ya+=1,1},491732:()=>{void 0!==window.h&&(window.h.Ra.map(function(e){document.removeEventListener(e,window.h.unlock,!0)}),--window.h.ya,0===window.h.ya&&delete window.h)},492036:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,492140:()=>{try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.sampleRate;return e.close(),t}catch(e){return 0}},492311:(e,t,n,r,i,a)=>{if(void 0===window.h)return-1;var o={},s={};return e==window.h.I.wa&&0!=n&&(s.sampleRate=n),o.K=new(window.AudioContext||window.webkitAudioContext)(s),o.K.suspend(),o.state=window.h.fa.stopped,n=0,e!=window.h.I.wa&&(n=t),o.Y=o.K.createScriptProcessor(r,n,t),o.Y.onaudioprocess=function(n){if(null!=o.qa&&0!=o.qa.length||(o.qa=new Float32Array(R.buffer,i,r*t)),e==window.h.I.capture||e==window.h.I.Ja){for(var s=0;s<t;s+=1)for(var u=n.inputBuffer.getChannelData(s),l=o.qa,c=0;c<r;c+=1)l[c*t+s]=u[c];Sn(a,r,i)}if(e==window.h.I.wa||e==window.h.I.Ja)for(xn(a,r,i),s=0;s<n.outputBuffer.numberOfChannels;++s)for(u=n.outputBuffer.getChannelData(s),l=o.qa,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.I.capture&&e!=window.h.I.Ja||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(e){o.Ba=o.K.createMediaStreamSource(e),o.Ba.connect(o.Y),o.Y.connect(o.K.destination)}).catch(function(e){}),e==window.h.I.wa&&o.Y.connect(o.K.destination),o.ob=a,window.h.rc(o)},495188:e=>window.h.pa(e).K.sampleRate,495261:e=>{void 0!==(e=window.h.pa(e)).Y&&(e.Y.onaudioprocess=function(){},e.Y.disconnect(),e.Y=void 0),void 0!==e.Ba&&(e.Ba.disconnect(),e.Ba=void 0),e.K.close(),e.K=void 0,e.ob=void 0},495661:e=>{window.h.zb(e)},495711:e=>{(e=window.h.pa(e)).K.resume(),e.state=window.h.fa.vb},495850:e=>{(e=window.h.pa(e)).K.suspend(),e.state=window.h.fa.stopped}},q=e=>{for(;0<e.length;)e.shift()(i)};function J(){var e=I[+tt>>2];return tt+=4,e}var K=(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},Z=e=>{var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=K(e.split("/").filter(e=>!!e),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},Q=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&=t.substr(0,t.length-1),e+t):"."},ee=e=>{if("/"===e)return"/";var t=(e=(e=Z(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},te=e=>(te=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);B("initRandomDevice")})())(e),ne=(...e)=>{for(var t="",n=!1,r=e.length-1;-1<=r&&!n;r--){if("string"!=typeof(n=0<=r?e[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,n="/"===n.charAt(0)}return(n?"/":"")+(t=K(t.split("/").filter(e=>!!e),!n).join("/"))||"."},re="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ie=(e,t,n)=>{var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.buffer&&re)return re.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},ae=[],oe=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},se=(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>
1=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 ue(e,t){var n=Array(oe(e)+1);return e=se(e,n,0,n.length),t&&(n.length=e),n}var le=[];function ce(e,t){le[e]={input:[],G:[],V:t},We(e,he)}var he={open(e){var t=le[e.node.xa];if(!t)throw new Ae(43);e.s=t,e.seekable=!1},close(e){e.s.V.oa(e.s)},oa(e){e.s.V.oa(e.s)},read(e,t,n,r){if(!e.s||!e.s.V.hb)throw new Ae(60);for(var i=0,a=0;a<r;a++){try{var o=e.s.V.hb(e.s)}catch(e){throw new Ae(29)}if(void 0===o&&0===i)throw new Ae(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.V.Ma)throw new Ae(60);try{for(var i=0;i<r;i++)e.s.V.Ma(e.s,t[n+i])}catch(e){throw new Ae(29)}return r&&(e.node.timestamp=Date.now()),i}},de={hb(){e:{if(!ae.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n"),!e){e=null;break e}ae=ue(e,!0)}e=ae.shift()}return e},Ma(e,t){null===t||10===t?(w(ie(e.G,0)),e.G=[]):0!=t&&e.G.push(t)},oa(e){e.G&&0<e.G.length&&(w(ie(e.G,0)),e.G=[])},Xb:()=>({zc:25856,Bc:5,yc:191,Ac:35387,xc:[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]}),Yb:()=>0,Zb:()=>[24,80]},fe={Ma(e,t){null===t||10===t?(_(ie(e.G,0)),e.G=[]):0!=t&&e.G.push(t)},oa(e){e.G&&0<e.G.length&&(_(ie(e.G,0)),e.G=[])}};function pe(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 me={N:null,U:()=>me.createNode(null,"/",16895,0),createNode(e,t,n,r){if(24576==(61440&n)||4096==(61440&n))throw new Ae(63);return me.N||(me.N={dir:{node:{X:me.j.X,P:me.j.P,ja:me.j.ja,ta:me.j.ta,sb:me.j.sb,yb:me.j.yb,tb:me.j.tb,rb:me.j.rb,Ca:me.j.Ca},stream:{aa:me.m.aa}},file:{node:{X:me.j.X,P:me.j.P},stream:{aa:me.m.aa,read:me.m.read,write:me.m.write,Xa:me.m.Xa,kb:me.m.kb,mb:me.m.mb}},link:{node:{X:me.j.X,P:me.j.P,la:me.j.la},stream:{}},$a:{node:{X:me.j.X,P:me.j.P},stream:De}}),16384==(61440&(n=Te(e,t,n,r)).mode)?(n.j=me.N.dir.node,n.m=me.N.dir.stream,n.l={}):32768==(61440&n.mode)?(n.j=me.N.file.node,n.m=me.N.file.stream,n.v=0,n.l=null):40960==(61440&n.mode)?(n.j=me.N.link.node,n.m=me.N.link.stream):8192==(61440&n.mode)&&(n.j=me.N.$a.node,n.m=me.N.$a.stream),n.timestamp=Date.now(),e&&(e.l[t]=n,e.timestamp=n.timestamp),n},Fc:e=>e.l?e.l.subarray?e.l.subarray(0,e.v):new Uint8Array(e.l):new Uint8Array(0),j:{X(e){var t={};return t.Dc=8192==(61440&e.mode)?e.id:1,t.Hc=e.id,t.mode=e.mode,t.Kc=1,t.uid=0,t.Gc=0,t.xa=e.xa,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.vc=new Date(e.timestamp),t.Jc=new Date(e.timestamp),t.Cc=new Date(e.timestamp),t.Gb=4096,t.wc=Math.ceil(t.size/t.Gb),t},P(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}},ja(){throw Ce[44]},ta:(e,t,n,r)=>me.createNode(e,t,n,r),sb(e,t,n){if(16384==(61440&e.mode)){try{var r=Re(t,n)}catch(e){}if(r)for(var i in r.l)throw new Ae(55)}delete e.parent.l[e.name],e.parent.timestamp=Date.now(),e.name=n,t.l[n]=e,t.timestamp=e.parent.timestamp},yb(e,t){delete e.l[t],e.timestamp=Date.now()},tb(e,t){var n,r=Re(e,t);for(n in r.l)throw new Ae(55);delete e.l[t],e.timestamp=Date.now()},rb(e){var t,n=[".",".."];for(t of Object.keys(e.l))n.push(t);return n},Ca:(e,t,n)=>((e=me.createNode(e,t,41471,0)).link=n,e),la(e){if(40960!=(61440&e.mode))throw new Ae(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===C.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(pe(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}
1,aa(e,t,n){if(1===n?t+=e.position:2===n&&32768==(61440&e.node.mode)&&(t+=e.node.v),0>t)throw new Ae(28);return t},Xa(e,t,n){pe(e.node,t+n),e.node.v=Math.max(e.node.v,t+n)},kb(e,t,n,r,i){if(32768!=(61440&e.node.mode))throw new Ae(43);if(e=e.node.l,2&i||e.buffer!==C.buffer){if((0<n||n+t<e.length)&&(e=e.subarray?e.subarray(n,n+t):Array.prototype.slice.call(e,n,n+t)),n=!0,B(),!(t=void 0))throw new Ae(48);C.set(e,t)}else n=!1,t=e.byteOffset;return{o:t,uc:n}},mb:(e,t,n,r)=>(me.m.write(e,t,0,r,n,!1),0)}},ve=null,be={},ge=[],ye=1,we=null,_e=!0,Ae=class{constructor(e){this.name="ErrnoError",this.$=e}},Ce={},Me=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}},Pe=class{constructor(e,t,n,r){e||=this,this.parent=e,this.U=e.U,this.ua=null,this.id=ye++,this.name=t,this.mode=n,this.j={},this.m={},this.xa=r}get read(){return!(365&~this.mode)}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(e){e?this.mode|=146:this.mode&=-147}};function Ee(e,t={}){if(!(e=ne(e)))return{path:"",node:null};if(8<(t=Object.assign({gb:!0,Oa:0},t)).Oa)throw new Ae(32);e=e.split("/").filter(e=>!!e);for(var n=ve,r="/",i=0;i<e.length;i++){var a=i===e.length-1;if(a&&t.parent)break;if(n=Re(n,e[i]),r=Z(r+"/"+e[i]),n.ua&&(!a||a&&t.gb)&&(n=n.ua.root),!a||t.fb)for(a=0;40960==(61440&n.mode);)if(n=ze(r),n=Ee(r=ne(Q(r),n),{Oa:t.Oa+1}).node,40<a++)throw new Ae(32)}return{path:r,node:n}}function Ie(e){for(var t;;){if(e===e.parent)return e=e.U.lb,t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function Fe(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%we.length}function Re(e,t){var n=16384==(61440&e.mode)?(n=Oe(e,"x"))?n:e.j.ja?0:2:54;if(n)throw new Ae(n);for(n=we[Fe(e.id,t)];n;n=n.ec){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.j.ja(e,t)}function Te(e,t,n,r){return t=Fe((e=new Pe(e,t,n,r)).parent.id,e.name),e.ec=we[t],we[t]=e}function Le(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Oe(e,t){return _e?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function je(e,t){try{return Re(e,t),20}catch(e){}return Oe(e,"wx")}function ke(e){if(!(e=ge[e]))throw new Ae(8);return e}function Se(e,t=-1){if(e=Object.assign(new Me,e),-1==t)e:{for(t=0;4096>=t;t++)if(!ge[t])break e;throw new Ae(33)}return e.W=t,ge[t]=e}var xe,De={open(e){e.m=be[e.node.xa].m,e.m.open?.(e)},aa(){throw new Ae(70)}};function We(e,t){be[e]={m:t}}function Ue(e,t){var n="/"===t;if(n&&ve)throw new Ae(10);if(!n&&t){var r=Ee(t,{gb:!1});if(t=r.path,(r=r.node).ua)throw new Ae(10);if(16384!=(61440&r.mode))throw new Ae(54)}t={type:e,Mc:{},lb:t,dc:[]},(e=e.U(t)).U=t,t.root=e,n?ve=e:r&&(r.ua=t,r.U&&r.U.dc.push(t))}function Be(e,t,n){var r=Ee(e,{parent:!0}).node;if(!(e=ee(e))||"."===e||".."===e)throw new Ae(28);var i=je(r,e);if(i)throw new Ae(i);if(!r.j.ta)throw new Ae(63);return r.j.ta(r,e,t,n)}function Ve(e){return Be(e,16895,0)}function Ne(e,t,n){void 0===n&&(n=t,t=438),Be(e,8192|t,n)}function $e(e,t){if(!ne(e))throw new Ae(44);var n=Ee(t,{parent:!0}).node;if(!n)throw new Ae(44);var r=je(n,t=ee(t));if(r)throw new Ae(r);if(!n.j.Ca)throw new Ae(63);n.j.Ca(n,t,e)}function ze(e){if(!(e=Ee(e).node))throw new Ae(44);if(!e.j.la)throw new Ae(28);return ne(Ie(e.parent),e.j.la(e))}function Ye(e,t,n){if(""===e)throw new Ae(44);if("string"==typeof t){var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(void 0===r)throw Error(`Unknown file open mode: ${t}`);t=r}if(n=64&t?4095&(void 0===n?438:n)|32768:0,"object"==typeof e)var a=e;else{e=Z(e);try{a=Ee(e,{fb:!(131072&t)}).node}catch(e){}}if(r=!1,64&t)if(a){if(128&t)throw new Ae(20)}else a=Be(e,n,0),r=!0;if(!a)throw new Ae(44);if(8192==(61440&a.mode)&&(t&=-513),65536&t&&16384!=(61440&a.mode))throw new Ae(54);if(!r&&(n=a?40960==(61440&a.mode)?32:16384==(61440&a.mode)&&("r"!==Le(t)||512&t)?31:Oe(a,Le(t)):44))throw new Ae(n);if(512&t&&!r){if(!(n="string"==typeof(n=a)?Ee(n,{fb:!0}).node:n).j.P)throw new Ae(63);if(16384==(61440&n.mode))throw new Ae(31);if(32768!=(61440&n.mode))throw new Ae(28);
1if(r=Oe(n,"w"))throw new Ae(r);n.j.P(n,{size:0,timestamp:Date.now()})}return t&=-131713,(a=Se({node:a,path:Ie(a),flags:t,seekable:!0,position:0,m:a.m,sc:[],error:!1})).m.open&&a.m.open(a),!i.logReadFiles||1&t||(qe||={},e in qe||(qe[e]=1)),a}function He(e,t,n){if(null===e.W)throw new Ae(8);if(!e.seekable||!e.m.aa)throw new Ae(70);if(0!=n&&1!=n&&2!=n)throw new Ae(28);e.position=e.m.aa(e,t,n),e.sc=[]}function Xe(e,t,n){e=Z("/dev/"+e);var r=((e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n})(!!t,!!n);Ge||=64;var i=Ge++<<8;We(i,{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 Ae(29)}if(void 0===s&&0===a)throw new Ae(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 Ae(29)}return i&&(e.node.timestamp=Date.now()),a}}),Ne(e,r,i)}var Ge,qe,Je,Ke,Ze,Qe,et,tt=void 0,nt=(e,t)=>Object.defineProperty(t,"name",{value:e}),rt=[],it=[],at=e=>{if(!e)throw new Je("Cannot use deleted val. handle = "+e);return it[e]},ot=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const t=rt.pop()||it.length;return it[t]=e,it[t+1]=1,t}},st=e=>{var t=Error,n=nt(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},ut=e=>{for(var t="";M[e];)t+=Ze[M[e++]];return t},lt=[],ct=()=>{for(;lt.length;){var e=lt.pop();e.g.ea=!1,e.delete()}},ht={},dt=(e,t)=>{if(void 0===t)throw new Je("ptr should not be undefined");for(;e.C;)t=e.ma(t),e=e.C;return t},ft={},pt=e=>{e=On(e);var t=ut(e);return Tn(e),t},mt=(e,t)=>{var n=ft[e];if(void 0===n)throw e=`${t} has unknown type ${pt(e)}`,new Je(e);return n},vt=()=>{},bt=!1,gt=(e,t,n)=>t===n?e:void 0===n.C||null===(e=gt(e,t,n.C))?null:n.Lb(e),yt={},wt=(e,t)=>{if(!t.u||!t.o)throw new et("makeClassHandle requires ptr and ptrType");if(!!t.J!=!!t.F)throw new et("Both smartPtrType and smartPtr must be specified");return t.count={value:1},_t(Object.create(e,{g:{value:t,writable:!0}}))},_t=e=>"undefined"==typeof FinalizationRegistry?(_t=e=>e,e):(bt=new FinalizationRegistry(e=>{--(e=e.g).count.value,0===e.count.value&&(e.F?e.J.O(e.F):e.u.i.O(e.o))}),vt=e=>{bt.unregister(e)},(_t=e=>{var t=e.g;return t.F&&bt.register(e,{g:t},e),e})(e)),At={},Ct=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Mt(e){return this.fromWireType(F[e>>2])}var Pt={},Et={},It=(e,t,n)=>{function r(t){if((t=n(t)).length!==e.length)throw new et("Mismatched type converter count");for(var r=0;r<e.length;++r)Ft(e[r],t[r])}e.forEach(function(e){Et[e]=t});var i=Array(t.length),a=[],o=0;t.forEach((e,t)=>{ft.hasOwnProperty(e)?i[t]=ft[e]:(a.push(e),Pt.hasOwnProperty(e)||(Pt[e]=[]),Pt[e].push(()=>{i[t]=ft[e],++o===a.length&&r(i)}))}),0===a.length&&r(i)};function Ft(e,t,n={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,n={}){var r=t.name;if(!e)throw new Je(`type "${r}" must have a positive integer typeid pointer`);if(ft.hasOwnProperty(e)){if(n.Vb)return;throw new Je(`Cannot register type '${r}' twice`)}ft[e]=t,delete Et[e],Pt.hasOwnProperty(e)&&(t=Pt[e],delete Pt[e],t.forEach(e=>e()))}(e,t,n)}var Rt=e=>{throw new Je(e.g.u.i.name+" instance already deleted")};function Tt(){}var Lt=(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 Je(`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.da]=r}},Ot=(e,t,n)=>{if(i.hasOwnProperty(e)){if(void 0===n||void 0!==i[e].A&&void 0!==i[e].A[n])throw new Je(`Cannot register public name '${e}' twice`);if(Lt(i,e,e),i.hasOwnProperty(n))throw new Je(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);i[e].A[n]=t}else i[e]=t,void 0!==n&&(i[e].Lc=n)};function jt(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.M=n,this.O=r,this.C=i,this.Qb=a,this.ma=o,this.Lb=s,this.pb=[]}
1var kt=(e,t,n)=>{for(;t!==n;){if(!t.ma)throw new Je(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.ma(e),t=t.C}return e};function St(e,t){if(null===t){if(this.La)throw new Je(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new Je(`Cannot pass "${tn(t)}" as a ${this.name}`);if(!t.g.o)throw new Je(`Cannot pass deleted object as a pointer of type ${this.name}`);return kt(t.g.o,t.g.u.i,this.i)}function xt(e,t){if(null===t){if(this.La)throw new Je(`null is not a valid ${this.name}`);if(this.sa){var n=this.Na();return null!==e&&e.push(this.O,n),n}return 0}if(!t||!t.g)throw new Je(`Cannot pass "${tn(t)}" as a ${this.name}`);if(!t.g.o)throw new Je(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ra&&t.g.u.ra)throw new Je(`Cannot convert argument of type ${t.g.J?t.g.J.name:t.g.u.name} to parameter type ${this.name}`);if(n=kt(t.g.o,t.g.u.i,this.i),this.sa){if(void 0===t.g.F)throw new Je("Passing raw pointer to smart pointer is illegal");switch(this.mc){case 0:if(t.g.J!==this)throw new Je(`Cannot convert argument of type ${t.g.J?t.g.J.name:t.g.u.name} to parameter type ${this.name}`);n=t.g.F;break;case 1:n=t.g.F;break;case 2:if(t.g.J===this)n=t.g.F;else{var r=t.clone();n=this.ic(n,ot(()=>r.delete())),null!==e&&e.push(this.O,n)}break;default:throw new Je("Unsupporting sharing policy")}}return n}function Dt(e,t){if(null===t){if(this.La)throw new Je(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new Je(`Cannot pass "${tn(t)}" as a ${this.name}`);if(!t.g.o)throw new Je(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.g.u.ra)throw new Je(`Cannot convert argument of type ${t.g.u.name} to parameter type ${this.name}`);return kt(t.g.o,t.g.u.i,this.i)}function Wt(e,t,n,r,i,a,o,s,u,l,c){this.name=e,this.i=t,this.La=n,this.ra=r,this.sa=i,this.hc=a,this.mc=o,this.qb=s,this.Na=u,this.ic=l,this.O=c,i||void 0!==t.C?this.toWireType=xt:(this.toWireType=r?St:Dt,this.L=null)}var Ut,Bt,Vt=(e,t,n)=>{if(!i.hasOwnProperty(e))throw new et("Replacing nonexistent public symbol");void 0!==i[e].A&&void 0!==n?i[e].A[n]=t:(i[e]=t,i[e].da=n)},Nt=[],$t=e=>{var t=Nt[e];return t||(e>=Nt.length&&(Nt.length=e+1),Nt[e]=t=Ut.get(e)),t},zt=(e,t)=>(...n)=>((e,t,n=[])=>(e.includes("j")?(e=e.replace(/p/g,"i"),t=(0,i["dynCall_"+e])(t,...n)):t=$t(t)(...n),t))(e,t,n),Yt=(e,t)=>{var n=(e=ut(e)).includes("j")?zt(e,t):$t(t);if("function"!=typeof n)throw new Je(`unknown function pointer with signature ${e}: ${t}`);return n},Ht=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){r[t]||ft[t]||(Et[t]?Et[t].forEach(e):(n.push(t),r[t]=!0))}),new Bt(`${e}: `+n.map(pt).join([", "]))};function Xt(e,t,n,r,i){var a=t.length;if(2>a)throw new Je("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].L)return!0;return!1}(t),u="void"!==t[0].name,l=a-2,c=Array(l),h=[],d=[];return nt(e,function(...n){if(n.length!==l)throw new Je(`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)Ct(d);else for(f=o?1:2;f<t.length;f++){var p=1===f?a:c[f-2];null!==t[f].L&&t[f].L(p)}return a=u?t[0].fromWireType(n):void 0})}var Gt,qt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(F[t+4*r>>2]);return n},Jt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Kt=(e,t,n)=>{if(!(e instanceof Object))throw new Je(`${n} with invalid "this": ${e}`);if(!(e instanceof t.i.constructor))throw new Je(`${n} incompatible with "this" of type ${e.constructor.name}`);if(!e.g.o)throw new Je(`cannot call emscripten binding method ${n} on deleted object`);return kt(e.g.o,e.g.u.i,t.i)},Zt=e=>{9<e&&0===--it[e+1]&&(it[e]=void 0,rt.push(e))},Qt={name:"emscripten::val",fromWireType:e=>{var t=at(e);return Zt(e),t},toWireType:(e,t)=>ot(t),argPackAdvance:8,readValueFromPointer:Mt,L:null},en=(e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(C[e])}:function(e){return this.fromWireType(M[e])};case 2:return n?function(e){return this.fromWireType(P[e>>1])}:function(e){return this.fromWireType(E[e>>1])};case 4:return n?function(e){return this.fromWireType(I[e>>2])}:function(e){return this.fromWireType(F[e>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},tn=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},nn=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(R[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},rn=(e,t,n)=>{switch(t){case 1:return n?e=>C[e]:e=>M[e];case 2:return n?e=>P[e>>1]:e=>E[e>>1];case 4:return n?e=>I[e>>2]:e=>F[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},an="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,on=(e,t)=>{for(var n=e>>1,r=n+t/2;!(n>=r)&&E[n];)++n;if(32<(n<<=1)-e&&an)return an.decode(M.subarray(e,n));for(n="",r=0;!(r>=t/2);++r){var i=P[e+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n},sn=(e,t,n)=>{if(n??=2147483647,2>n)return 0;var r=t;n=(n-=2)<2*e.length?n/2:e.length;for(var i=0;i<n;++i)P[t>>1]=e.charCodeAt(i),t+=2;return P[t>>1]=0,t-r},un=e=>2*e.length,ln=(e,t)=>{for(var n=0,r="";!(n>=t/4);){var i=I[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},cn=(e,t,n)=>{if(n??=2147483647,4>n)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)),I[t>>2]=a,(t+=4)+4>n)break}return I[t>>2]=0,t-r},hn=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},dn=(e,t,n)=>{var r=[];return e=e.toWireType(r,n),r.length&&(F[t>>2]=ot(r)),e},fn={},pn=e=>{var t=fn[e];return void 0===t?ut(e):t},mn=[],vn=Reflect.construct,bn=e=>0==e%4&&(0!=e%100||0==e%400),gn=[0,31,60,91,121,152,182,213,244,274,305,335],yn=[0,31,59,90,120,151,181,212,243,273,304,334],wn=[],_n={},An=()=>
1{if(!Gt){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",_:b||"./this.program"};for(e in _n)void 0===_n[e]?delete t[e]:t[e]=_n[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);Gt=n}return Gt},Cn=[31,29,31,30,31,30,31,31,30,31,30,31],Mn=[31,28,31,30,31,30,31,31,30,31,30,31],Pn=(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){function n(e){return 0>e?-1:0<e?1:0}var r;return 0===(r=n(e.getFullYear()-t.getFullYear()))&&0===(r=n(e.getMonth()-t.getMonth()))&&(r=n(e.getDate()-t.getDate())),r}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.ba;for(e=new Date(new Date(e.ca+1900,0,1).getTime());0<t;){var n=e.getMonth(),r=(bn(e.getFullYear())?Cn:Mn)[n];if(!(t>r-e.getDate())){e.setDate(e.getDate()+t);break}t-=r-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}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=F[r+40>>2];for(var c in r={pc:I[r>>2],oc:I[r+4>>2],Da:I[r+8>>2],Qa:I[r+12>>2],Ea:I[r+16>>2],ca:I[r+20>>2],R:I[r+24>>2],ba:I[r+28>>2],Nc:I[r+32>>2],nc:I[r+36>>2],qc:l&&l?ie(M,l):""},n=n?ie(M,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(new 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.R].substring(0,3),"%A":e=>h[e.R],"%b":e=>d[e.Ea].substring(0,3),"%B":e=>d[e.Ea],"%C":e=>a((e.ca+1900)/100|0,2),"%d":e=>a(e.Qa,2),"%e":e=>i(e.Qa,2," "),"%g":e=>u(e).toString().substring(2),"%G":u,"%H":e=>a(e.Da,2),"%I":e=>(0==(e=e.Da)?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.Ea-1;t+=(bn(e.ca+1900)?Cn:Mn)[n++]);return a(e.Qa+t,3)},"%m":e=>a(e.Ea+1,2),"%M":e=>a(e.oc,2),"%n":()=>"\n","%p":e=>0<=e.Da&&12>e.Da?"AM":"PM","%S":e=>a(e.pc,2),"%t":()=>"\t","%u":e=>e.R||7,"%U":e=>a(Math.floor((e.ba+7-e.R)/7),2),"%V":e=>{var t=Math.floor((e.ba+7-(e.R+6)%7)/7);if(2>=(e.R+371-e.ba-2)%7&&t++,t)53==t&&(4==(n=(e.R+371-e.ba)%7)||3==n&&bn(e.ca)||(t=1));else{t=52;var n=(e.R+7-e.ba-1)%7;(4==n||5==n&&bn(e.ca%400-1))&&t++}return a(t,2)},"%w":e=>e.R,"%W":e=>a(Math.floor((e.ba+7-(e.R+6)%7)/7),2),"%y":e=>(e.ca+1900).toString().substring(2),"%Y":e=>e.ca+1900,"%z":e=>{var t=0<=(e=e.nc);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.qc,"%%":()=>"%"},n=n.replace(/%%/g,"\0\0"),l)n.includes(c)&&(n=n.replace(new RegExp(c,"g"),l[c](r)));return(c=ue(n=n.replace(/\0\0/g,"%"),!1)).length>t?0:(C.set(c,e),c.length-1)};[44].forEach(e=>{Ce[e]=new Ae(e),Ce[e].stack="<generic error, no stack>"}),we=Array(4096),Ue(me,"/"),Ve("/tmp"),Ve("/home"),Ve("/home/web_user"),function(){Ve("/dev"),We(259,{read:()=>0,write:(e,t,n,r)=>r}),Ne("/dev/null",259),ce(1280,de),ce(1536,fe),Ne("/dev/tty",1280),Ne("/dev/tty1",1536);var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=te(e).byteLength),e[--t]);Xe("random",n),Xe("urandom",n),Ve("/dev/shm"),Ve("/dev/shm/tmp")}(),function(){Ve("/proc");var e=Ve("/proc/self");Ve("/proc/self/fd"),Ue({U(){var t=Te(e,"fd",16895,73);return t.j={ja(e,t){var n=ke(+t);return(e={parent:null,U:{lb:"fake"},j:{la:()=>n.path}}).parent=e}},t}},"/proc/self/fd")}
1(),Je=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},it.push(0,1,void 0,1,null,1,!0,1,!1,1),i.count_emval_handles=()=>it.length/2-5-rt.length,Ke=i.PureVirtualError=st("PureVirtualError");for(var En=Array(256),In=0;256>In;++In)En[In]=String.fromCharCode(In);Ze=En,i.getInheritedInstanceCount=()=>Object.keys(ht).length,i.getLiveInheritedInstances=()=>{var e,t=[];for(e in ht)ht.hasOwnProperty(e)&&t.push(ht[e]);return t},i.flushPendingDeletes=ct,i.setDelayFunction=e=>{Qe=e,lt.length&&Qe&&Qe(ct)},et=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(Tt.prototype,{isAliasOf:function(e){if(!(this instanceof Tt&&e instanceof Tt))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.ma(n),t=t.C;for(;r.C;)e=r.ma(e),r=r.C;return t===r&&n===e},clone:function(){if(this.g.o||Rt(this),this.g.ha)return this.g.count.value+=1,this;var e=_t,t=Object,n=t.create,r=Object.getPrototypeOf(this),i=this.g;return(e=e(n.call(t,r,{g:{value:{count:i.count,ea:i.ea,ha:i.ha,o:i.o,u:i.u,F:i.F,J:i.J}}}))).g.count.value+=1,e.g.ea=!1,e},delete(){if(this.g.o||Rt(this),this.g.ea&&!this.g.ha)throw new Je("Object already scheduled for deletion");vt(this);var e=this.g;--e.count.value,0===e.count.value&&(e.F?e.J.O(e.F):e.u.i.O(e.o)),this.g.ha||(this.g.F=void 0,this.g.o=void 0)},isDeleted:function(){return!this.g.o},deleteLater:function(){if(this.g.o||Rt(this),this.g.ea&&!this.g.ha)throw new Je("Object already scheduled for deletion");return lt.push(this),1===lt.length&&Qe&&Qe(ct),this.g.ea=!0,this}}),Object.assign(Wt.prototype,{Rb(e){return this.qb&&(e=this.qb(e)),e},ab(e){this.O?.(e)},argPackAdvance:8,readValueFromPointer:Mt,fromWireType:function(e){function t(){return this.sa?wt(this.i.M,{u:this.hc,o:n,J:this,F:e}):wt(this.i.M,{u:this,o:e})}var n=this.Rb(e);if(!n)return this.ab(e),null;var r=((e,t)=>(t=dt(e,t),ht[t]))(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.ab(e),r);if(r=this.i.Qb(n),!(r=yt[r]))return t.call(this);r=this.ra?r.Hb:r.pointerType;var i=gt(n,this.i,r.i);return null===i?t.call(this):this.sa?wt(r.i.M,{u:r,o:i,J:this,F:e}):wt(r.i.M,{u:r,o:i})}}),Bt=i.UnboundTypeError=st("UnboundTypeError");var Fn={__syscall_fcntl64:function(e,t,n){tt=n;try{var r=ke(e);switch(t){case 0:var i=J();if(0>i)break;for(;ge[i];)i++;return function(e,t=-1){return e=Se(e,t),e.m?.Ec?.(e),e}(r,i).W;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:return i=J(),r.flags|=i,0;case 12:return i=J(),P[i+0>>1]=2,0}return-28}catch(e){if("ErrnoError"!==e.name)throw e;return-e.$}},__syscall_ioctl:function(e,t,n){tt=n;try{var r=ke(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.V.Xb){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=J();I[i>>2]=25856,I[i+4>>2]=5,I[i+8>>2]=191,I[i+12>>2]=35387;for(var a=0;32>a;a++)C[i+a+17]=e[a]||0}return 0;case 21506:case 21507:case 21508:if(!r.s)return-59;if(r.s.V.Yb)for(i=J(),e=[],a=0;32>a;a++)e.push(C[i+a+17]);return 0;case 21519:return r.s?(i=J(),I[i>>2]=0):-59;case 21520:return r.s?-28:-59;case 21531:if(i=J(),!r.m.Wb)throw new Ae(59);return r.m.Wb(r,t,i);case 21523:return r.s?(r.s.V.Zb&&(a=[24,80],i=J(),P[i>>1]=a[0],P[i+2>>1]=a[1]),0):-59;default:return-28}}catch(e){if("ErrnoError"!==e.name)throw e;return-e.$}}
1,__syscall_openat:function(e,t,n,r){tt=r;try{var i=t=t?ie(M,t):"";if("/"===i.charAt(0))t=i;else{var a=-100===e?"/":ke(e).path;if(0==i.length)throw new Ae(44);t=Z(a+"/"+i)}return Ye(t,n,r?J():0).W}catch(e){if("ErrnoError"!==e.name)throw e;return-e.$}},_abort_js:()=>{B("")},_embind_create_inheriting_constructor:(e,t,n)=>{e=ut(e),t=mt(t,"wrapper"),n=at(n);var r=t.i,i=r.M,a=r.C.M,o=r.C.constructor;return e=nt(e,function(...e){r.C.pb.forEach(function(e){if(this[e]===a[e])throw new Ke(`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 Je("Pass correct 'this' to __construct");e=o.implement(this,...e),vt(e);var t=e.g;if(e.notifyOnDestruction(),t.ha=!0,Object.defineProperties(this,{g:{value:t}}),_t(this),e=t.o,e=dt(r,e),ht.hasOwnProperty(e))throw new Je(`Tried to register registered instance: ${e}`);ht[e]=this},i.__destruct=function(){if(this===i)throw new Je("Pass correct 'this' to __destruct");vt(this);var e=this.g.o;if(e=dt(r,e),!ht.hasOwnProperty(e))throw new Je(`Tried to unregister unregistered instance: ${e}`);delete ht[e]},e.prototype=Object.create(i),Object.assign(e.prototype,n),ot(e)},_embind_finalize_value_object:e=>{var t=At[e];delete At[e];var n=t.Na,r=t.O,i=t.eb,a=i.map(e=>e.Ub).concat(i.map(e=>e.kc));It([e],a,e=>{var a={};return i.forEach((t,n)=>{var r=e[n],o=t.Sb,s=t.Tb,u=e[n+i.length],l=t.jc,c=t.lc;a[t.Ob]={read:e=>r.fromWireType(o(s,e)),write:(e,t)=>{var n=[];l(c,e,u.toWireType(n,t)),Ct(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 new 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:Mt,L:r}]})},_embind_register_bigint:()=>{},_embind_register_bool:(e,t,n,r)=>{Ft(e,{name:t=ut(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(M[e])},L:null})},_embind_register_class:(e,t,n,r,i,a,o,s,u,l,c,h,d)=>{c=ut(c),a=Yt(i,a),s&&=Yt(o,s),l&&=Yt(u,l),d=Yt(h,d);var f=(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})(c);Ot(f,function(){Ht(`Cannot construct ${c} due to unbound types`,[r])}),It([e,t,n],r?[r]:[],t=>{if(t=t[0],r)var n=t.i,i=n.M;else i=Tt.prototype;t=nt(c,function(...e){if(Object.getPrototypeOf(this)!==o)throw new Je("Use 'new' to construct "+c);if(void 0===h.Z)throw new Je(c+" has no accessible constructor");var t=h.Z[e.length];if(void 0===t)throw new Je(`Tried to invoke ctor of ${c} with invalid number of parameters (${e.length}) - expected (${Object.keys(h.Z).toString()}) parameters instead!`);return t.apply(this,e)});var o=Object.create(i,{constructor:{value:t}});t.prototype=o;var u,h=new jt(c,t,o,d,n,a,s,l);return h.C&&((u=h.C).na??(u.na=[]),h.C.na.push(h)),n=new Wt(c,h,!0,!1,!1),u=new Wt(c+"*",h,!1,!1,!1),i=new Wt(c+" const*",h,!1,!0,!1),yt[e]={pointerType:u,Hb:i},Vt(f,t),[n,u,i]})},_embind_register_class_class_function:(e,t,n,r,i,a,o)=>{var s=qt(n,r);t=ut(t),t=Jt(t),a=Yt(i,a),It([],[e],e=>{function r(){Ht(`Cannot call ${i} due to unbound types`,s)}var i=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var u=e.i.constructor;return void 0===u[t]?(r.da=n-1,u[t]=r):(Lt(u,t,i),u[t].A[n-1]=r),It([],s,r=>{if(r=Xt(i,[r[0],null].concat(r.slice(1)),null,a,o),void 0===u[t].A?(r.da=n-1,u[t]=r):u[t].A[n-1]=r,e.i.na)for(const n of e.i.na)n.constructor.hasOwnProperty(t)||(n.constructor[t]=r);return[]}),[]})},_embind_register_class_class_property:(e,t,n,r,i,a,o,s)=>{t=ut(t),a=Yt(i,a),It([],[e],e=>{var i=`${(e=e[0]).name}.${t}`,u={get(){Ht(`Cannot access ${i} due to unbound types`,[n])},enumerable:!0,configurable:!0};return u.set=s?()=>{Ht(`Cannot access ${i} due to unbound types`,[n])}:()=>{throw new Je(`${i} is a read-only property`)},Object.defineProperty(e.i.constructor,t,u),It([],[n],n=>{n=n[0];var i={get:()=>n.fromWireType(a(r)),enumerable:!0};return s&&(s=Yt(o,s),i.set=e=>{var t=[];s(r,n.toWireType(t,e)),Ct(t)}),Object.defineProperty(e.i.constructor,t,i),[]}),[]})},_embind_register_class_constructor:(e,t,n,r,i,a)=>{var o=qt(t,n);i=Yt(r,i),It([],[e],e=>{var n=`constructor ${(e=e[0]).name}`;if(void 0===e.i.Z&&(e.i.Z=[]),void 0!==e.i.Z[t-1])throw new Je(`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.Z[t-1]=()=>{Ht(`Cannot construct ${e.name} due to unbound types`,o)},It([],o,r=>(r.splice(1,0,null),e.i.Z[t-1]=Xt(n,r,null,i,a),[])),[]})},_embind_register_class_function:(e,t,n,r,i,a,o,s)=>{var u=qt(n,r);t=ut(t),t=Jt(t),a=Yt(i,a),It([],[e],e=>{function r(){Ht(`Cannot call ${i} due to unbound types`,u)}var i=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.i.pb.push(t);var l=e.i.M,c=l[t];return void 0===c||void 0===c.A&&c.className!==e.name&&c.da===n-2?(r.da=n-2,r.className=e.n
1ame,l[t]=r):(Lt(l,t,i),l[t].A[n-2]=r),It([],u,r=>(r=Xt(i,r,e,a,o),void 0===l[t].A?(r.da=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=ut(t),i=Yt(r,i),It([],[e],e=>{var r=`${(e=e[0]).name}.${t}`,c={get(){Ht(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return c.set=u?()=>Ht(`Cannot access ${r} due to unbound types`,[n,o]):()=>{throw new Je(r+" is a read-only property")},Object.defineProperty(e.i.M,t,c),It([],u?[n,o]:[n],n=>{var o=n[0],c={get(){var t=Kt(this,e,r+" getter");return o.fromWireType(i(a,t))},enumerable:!0};if(u){u=Yt(s,u);var h=n[1];c.set=function(t){var n=Kt(this,e,r+" setter"),i=[];u(l,n,h.toWireType(i,t)),Ct(i)}}return Object.defineProperty(e.i.M,t,c),[]}),[]})},_embind_register_emval:e=>Ft(e,Qt),_embind_register_enum:(e,t,n,r)=>{function i(){}t=ut(t),i.values={},Ft(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,argPackAdvance:8,readValueFromPointer:en(t,n,r),L:null}),Ot(t,i)},_embind_register_enum_value:(e,t,n)=>{var r=mt(e,"enum");t=ut(t),e=r.constructor,r=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:nt(`${r.name}_${t}`,function(){})}}),e.values[n]=r,e[t]=r},_embind_register_float:(e,t,n)=>{Ft(e,{name:t=ut(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:nn(t,n),L:null})},_embind_register_function:(e,t,n,r,i,a)=>{var o=qt(t,n);e=ut(e),e=Jt(e),i=Yt(r,i),Ot(e,function(){Ht(`Cannot call ${e} due to unbound types`,o)},t-1),It([],o,n=>(Vt(e,Xt(e,[n[0],null].concat(n.slice(1)),null,i,a),t-1),[]))},_embind_register_integer:(e,t,n,r,i)=>{if(t=ut(t),-1===i&&(i=4294967295),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};Ft(e,{name:t,fromWireType:i,toWireType:o,argPackAdvance:8,readValueFromPointer:rn(t,n,0!==r),L:null})},_embind_register_memory_view:(e,t,n)=>{function r(e){return new i(C.buffer,F[e+4>>2],F[e>>2])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];Ft(e,{name:n=ut(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Vb:!0})},_embind_register_std_string:(e,t)=>{var n="std::string"===(t=ut(t));Ft(e,{name:t,fromWireType:function(e){var t=F[e>>2],r=e+4;if(n)for(var i=r,a=0;a<=t;++a){var o=r+a;if(a==t||0==M[o]){if(i=i?ie(M,i,o-i):"",void 0===s)var s=i;else s+=String.fromCharCode(0),s+=i;i=o+1}}else{for(s=Array(t),a=0;a<t;++a)s[a]=String.fromCharCode(M[r+a]);s=s.join("")}return Tn(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 Je("Cannot pass non-string to std::string");var i=n&&r?oe(t):t.length,a=Ln(4+i+1),o=a+4;if(F[a>>2]=i,n&&r)se(t,M,o,i+1);else if(r)for(r=0;r<i;++r){var s=t.charCodeAt(r);if(255<s)throw Tn(o),new Je("String has UTF-16 code units that do not fit in 8 bits");M[o+r]=s}else for(r=0;r<i;++r)M[o+r]=t[r];return null!==e&&e.push(Tn,a),a},argPackAdvance:8,readValueFromPointer:Mt,L(e){Tn(e)}})},_embind_register_std_wstring:(e,t,n)=>{if(n=ut(n),2===t)var r=on,i=sn,a=un,o=e=>E[e>>1];else 4===t&&(r=ln,i=cn,a=hn,o=e=>F[e>>2]);Ft(e,{name:n,fromWireType:e=>{for(var n,i=F[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+=String.fromCharCode(0),n+=a),a=u+t)}return Tn(e),n},toWireType:(e,r)=>{if("string"!=typeof r)throw new Je(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Ln(4+o+t);return F[s>>2]=o/t,i(r,s+4,o+t),null!==e&&e.push(Tn,s),s},argPackAdvance:8,readValueFromPointer:Mt,L(e){Tn(e)}})},_embind_register_value_object:(e,t,n,r,i,a)=>{At[e]={name:ut(t),Na:Yt(n,r),O:Yt(i,a),eb:[]}},_embind_register_value_object_field:(e,t,n,r,i,a,o,s,u,l)=>{At[e].eb.push({Ob:ut(t),Ub:n,Sb:Yt(r,i),Tb:a,kc:o,jc:Yt(s,u),lc:l})},_embind_register_void:(e,t)=>{Ft(e,{Ic:!0,name:t=ut(t),argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:(e,t,n)=>M.copyWithin(e,t,t+n),_emscripten_throw_longjmp:()=>{throw 1/0},_emval_as:(e,t,n)=>(e=at(e),t=mt(t,"emval::as"),dn(t,n,e)),_emval_call_method:(e,t,n,r,i)=>(e=mn[e])(t=at(t),t[n=pn(n)],r,i),_emval_decref:Zt,_emval_get_method_caller:(e,t,n)=>{var r=((e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=mt(F[t+4*r>>2],"parameter "+r);return n})(e,t),i=r.shift();e--;var a=Array(e);return t=`methodCaller<(${r.map(e=>e.name).join(", ")}) => ${i.name}>`,(e=>{var t=mn.length;return mn.push(e),t})(nt(t,(t,o,s,u)=>{for(var l=0,c=0;c<e;
1++c)a[c]=r[c].readValueFromPointer(u+l),l+=r[c].argPackAdvance;return t=1===n?vn(o,a):o.apply(t,a),dn(i,s,t)}))},_emval_get_module_property:e=>(e=pn(e),ot(i[e])),_emval_get_property:(e,t)=>(e=at(e),t=at(t),ot(e[t])),_emval_incref:e=>{9<e&&(it[e+1]+=1)},_emval_new_array:()=>ot([]),_emval_new_cstring:e=>ot(pn(e)),_emval_new_object:()=>ot({}),_emval_run_destructors:e=>{var t=at(e);Ct(t),Zt(e)},_emval_set_property:(e,t,n)=>{e=at(e),t=at(t),n=at(n),e[t]=n},_emval_take_value:(e,t)=>(e=(e=mt(e,"_emval_take_value")).readValueFromPointer(t),ot(e)),_gmtime_js:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),I[n>>2]=e.getUTCSeconds(),I[n+4>>2]=e.getUTCMinutes(),I[n+8>>2]=e.getUTCHours(),I[n+12>>2]=e.getUTCDate(),I[n+16>>2]=e.getUTCMonth(),I[n+20>>2]=e.getUTCFullYear()-1900,I[n+24>>2]=e.getUTCDay(),I[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)+4294967296*t:NaN)),I[n>>2]=e.getSeconds(),I[n+4>>2]=e.getMinutes(),I[n+8>>2]=e.getHours(),I[n+12>>2]=e.getDate(),I[n+16>>2]=e.getMonth(),I[n+20>>2]=e.getFullYear()-1900,I[n+24>>2]=e.getDay(),I[n+28>>2]=(bn(e.getFullYear())?gn:yn)[e.getMonth()]+e.getDate()-1|0,I[n+36>>2]=-60*e.getTimezoneOffset(),t=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();I[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();F[e>>2]=60*Math.max(i,s),I[t>>2]=Number(i!=s),a=(e=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1])(a),o=e(o),s<i?(se(a,M,n,17),se(o,M,r,17)):(se(a,M,r,17),se(o,M,n,17))},emscripten_asm_const_int:(e,t,n)=>{wn.length=0;for(var r;r=M[t++];){var i=105!=r;n+=(i&=112!=r)&&n%8?4:0,wn.push(112==r?F[n>>2]:105==r?I[n>>2]:T[n>>3]),n+=i?8:4}return G[e](...wn)},emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:e=>{var t=M.length;if(2147483648<(e>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);var i=Math;r=Math.max(e,r);e:{i=(i.min.call(i,2147483648,r+(65536-r%65536)%65536)-A.buffer.byteLength+65535)/65536;try{A.grow(i),O();var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return An().forEach((r,i)=>{var a=t+n;for(i=F[e+4*i>>2]=a,a=0;a<r.length;++a)C[i++]=r.charCodeAt(a);C[i]=0,n+=r.length+1}),0},environ_sizes_get:(e,t)=>{var n=An();F[e>>2]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),F[t>>2]=r,0},fd_close:function(e){try{var t=ke(e);if(null===t.W)throw new Ae(8);t.Ka&&(t.Ka=null);try{t.m.close&&t.m.close(t)}catch(e){throw e}finally{ge[t.W]=null}return t.W=null,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.$}},fd_read:function(e,t,n,r){try{e:{var i=ke(e);e=t;for(var a,o=t=0;o<n;o++){var s=F[e>>2],u=F[e+4>>2];e+=8;var l=i,c=a,h=C;if(0>u||0>c)throw new Ae(28);if(null===l.W)throw new Ae(8);if(1==(2097155&l.flags))throw new Ae(8);if(16384==(61440&l.node.mode))throw new Ae(31);if(!l.m.read)throw new Ae(28);var d=void 0!==c;if(d){if(!l.seekable)throw new Ae(70)}else c=l.position;var f=l.m.read(l,h,s,u,c);d||(l.position+=f);var p=f;if(0>p){var m=-1;break e}if(t+=p,p<u)break;void 0!==a&&(a+=p)}m=t}return F[r>>2]=m,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.$}},fd_seek:function(e,t,n,r,i){t=n+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*n:NaN;try{if(isNaN(t))return 61;var a=ke(e);return He(a,t,r),X=[a.position>>>0,(H=a.position,1<=+Math.abs(H)?0<H?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],I[i>>2]=X[0],I[i+4>>2]=X[1],a.Ka&&0===t&&0===r&&(a.Ka=null),0}catch(e){if("ErrnoError"!==e.name)throw e;return e.$}},fd_write:function(e,t,n,r){try{e:{var i=ke(e);e=t;for(var a,o=t=0;o<n;o++){var s=F[e>>2],u=F[e+4>>2];e+=8;var l=i,c=s,h=u,d=a,f=C;if(0>h||0>d)throw new Ae(28);if(null===l.W)throw new Ae(8);if(!(2097155&l.flags))throw new Ae(8);if(16384==(61440&l.node.mode))throw new Ae(31);if(!l.m.write)throw new Ae(28);l.seekable&&1024&l.flags&&He(l,0,2);var p=void 0!==d;if(p){if(!l.seekable)throw new Ae(70)}else d=l.position;var m=l.m.write(l,f,c,h,d,void 0);p||(l.position+=m);var v=m;if(0>v){var b=-1;break e}t+=v,void 0!==a&&(a+=v)}b=t}return F[r>>2]=b,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.$}},invoke_vii:function(e,t,n){var r=Un();try{$t(e)(t,n)}catch(e){if(Wn(r),e!==e+0)throw e;Dn(1,0)}},isWindowsBrowser:function(){return-1<navigator.platform.indexOf("Win")},strftime:Pn,strftime_l:(e,t,n,r)=>Pn(e,t,n,r)},Rn=function(){function e(e){return Rn=e.exports,A=Rn.memory,O(),Ut=Rn.__indirect_function_table,k.unshift(Rn.__wasm_call_ctors),D--,i.monitorRunDependencies?.(D),0==D&&(null!==W&&(clearInterval(W),W=null),U&&(e=U,U=null,e())),Rn}var t={env:Fn,wasi_snapshot_preview1:Fn};if(D++,i.monitorRunDependencies?.(D),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(e){_(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return V||=N("canvas_advanced.wasm")?"canvas_advanced.wasm":i.locateFile?i.locateFile("canvas_advanced.wasm",g):g+"canvas_advanced.wasm",function(e,t){var n=V;return y||"function"!=typeof WebAssembly.instantiateStreaming||N(n)||$(n)||"function"!=typeof fetch?Y(n,e,t):fetch(n,{credentials:"same-origin"}).then(r=>WebAssembly.instantiateStreaming(r,e).then(t,function(r){return _(`wasm streaming compile failed: ${r}`),_("falling back to ArrayBuffer instantiation"),Y(n,e,t)}))}(t,function(t){e(t.instance)}).catch(n),{}}(),Tn=e=>(Tn=Rn.free)(e),Ln=e=>(Ln=Rn.malloc)(e),On=e=>(On=Rn.__getTypeName)(e),jn=i._ma_device__on_notification_unlocked=e=>(jn=i._ma_device__on_notification_unlocked=Rn.ma_device__on_notification_unlocked)(e);i._ma_malloc_emscripten=(e,t)=>(i._ma_malloc_emscripten=Rn.ma_malloc_emscripten)(e,t),i._ma_free_emscripten=(e,t)=>(i._ma_free_emscripten=Rn.ma_free_emscripten)(e,t);var kn,Sn=i._ma_device_process_pcm_frames_capture__webaudio=(e,t,n)=>(Sn=i._ma_device_process_pcm_frames_capture__webaudio=Rn.ma_device_process_pcm_frames_capture__webaudio)(e,t,n),xn=i._ma_device_process_pcm_frames_playback__webaudio=(e,t,n)=>(xn=i._ma_device_process_pcm_frames_playback__webaudio=Rn.ma_device_process_pcm_frames_playback__webaudio)(e,t,n),Dn=(e,t)=>(Dn=Rn.setThrew)(e,t),Wn=e=>(Wn=Rn._emscripten_stack_restore)(e),Un=()=>(Un=Rn.emscripten_stack_get_current)();function Bn(){function e(){if(!kn&&(kn=!0,i.calledRun=!0,!L)){if
1(i.noFSInit||xe||(xe=!0,i.stdin=i.stdin,i.stdout=i.stdout,i.stderr=i.stderr,i.stdin?Xe("stdin",i.stdin):$e("/dev/tty","/dev/stdin"),i.stdout?Xe("stdout",null,i.stdout):$e("/dev/tty","/dev/stdout"),i.stderr?Xe("stderr",null,i.stderr):$e("/dev/tty1","/dev/stderr"),Ye("/dev/stdin",0),Ye("/dev/stdout",1),Ye("/dev/stderr",1)),_e=!1,q(k),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var e=i.postRun.shift();S.unshift(e)}q(S)}}if(!(0<D)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)x();q(j),0<D||(i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),e()},1)):e())}}if(i.dynCall_iiji=(e,t,n,r,a)=>(i.dynCall_iiji=Rn.dynCall_iiji)(e,t,n,r,a),i.dynCall_jiji=(e,t,n,r,a)=>(i.dynCall_jiji=Rn.dynCall_jiji)(e,t,n,r,a),i.dynCall_iiiji=(e,t,n,r,a,o)=>(i.dynCall_iiiji=Rn.dynCall_iiiji)(e,t,n,r,a,o),i.dynCall_iij=(e,t,n,r)=>(i.dynCall_iij=Rn.dynCall_iij)(e,t,n,r),i.dynCall_jii=(e,t,n)=>(i.dynCall_jii=Rn.dynCall_jii)(e,t,n),i.dynCall_viijii=(e,t,n,r,a,o,s)=>(i.dynCall_viijii=Rn.dynCall_viijii)(e,t,n,r,a,o,s),i.dynCall_iiiiij=(e,t,n,r,a,o,s)=>(i.dynCall_iiiiij=Rn.dynCall_iiiiij)(e,t,n,r,a,o,s),i.dynCall_iiiiijj=(e,t,n,r,a,o,s,u,l)=>(i.dynCall_iiiiijj=Rn.dynCall_iiiiijj)(e,t,n,r,a,o,s,u,l),i.dynCall_iiiiiijj=(e,t,n,r,a,o,s,u,l,c)=>(i.dynCall_iiiiiijj=Rn.dynCall_iiiiiijj)(e,t,n,r,a,o,s,u,l,c),U=function e(){kn||Bn(),kn||(U=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0<i.preInit.length;)i.preInit.pop()();return Bn(),a})},e=>{e.exports=JSON.parse('{"name":"@rive-app/canvas","version":"2.33.3","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"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}')},(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>r.Animation});var r=n(4)},(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,{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,createFinalization:()=>a.createFinalization,finalizationRegistry:()=>a.finalizationRegistry,registerTouchInteractions:()=>r.registerTouchInteractions,sanitizeUrl:()=>i.sanitizeUrl});var r=n(6),i=n(7),a=n(8)},(e,t,n)=>{n.r(t),n.d(t,{registerTouchInteractions:()=>r});var r=function(e){var t=e.canvas,n=e.artboard,r=e.stateMachines,i=void 0===r?[]:r,a=e.renderer,o=e.rive,s=e.fit,u=e.alignment,l=e.isTouchScrollEnabled,c=void 0!==l&&l,h=e.dispatchPointerExit,d=void 0===h||h,f=e.enableMultiTouch,p=void 0!==f&&f,m=e.layoutScaleFactor,v=void 0===m?1:m;if(!(t&&i.length&&a&&o&&n&&"undefined"!=typeof window))return null;var b=null,g=!1,y=function(e){if(g&&e instanceof MouseEvent)"mouseup"==e.type&&(g=!1);else{g=c&&"touchend"===e.type&&"touchstart"===b,b=e.type;var t=e.currentTarget.getBoundingClientRect(),r=function(e,t,n){var r,i,a=[];if(["touchstart","touchmove"].indexOf(e.type)>-1&&(null===(r=e.changedTouches)||void 0===r?void 0:r.length)){t||e.preventDefault();for(var o=0,s=n?e.changedTouches.length:1;o<s;){var u=e.changedTouches[o];a.push({clientX:u.clientX,clientY:u.clientY,identifier:u.identifier}),o++}}else if("touchend"===e.type&&(null===(i=e.changedTouches)||void 0===i?void 0:i.length))for(o=0,s=n?e.changedTouches.length:1;o<s;)u=e.changedTouches[o],a.push({clientX:u.clientX,clientY:u.clientY,identifier:u.identifier}),o++;else a.push({clientX:e.clientX,clientY:e.clientY,identifier:0});return a}(e,c,p),a=o.computeAlignment(s,u,{minX:0,minY:0,maxX:t.width,maxY:t.height},n.bounds,v),l=new o.Mat2D;switch(a.invert(l),r.forEach(function(e){var n=e.clientX,r=e.clientY;if(n||r){var i=n-t.left,a=r-t.top,s=new o.Vec2D(i,a),u=o.mapXY(l,s),c=u.x(),h=u.y();e.transformedX=c,e.transformedY=h,u.delete(),s.delete()}}),l.delete(),a.delete(),e.type){case"mouseout":for(var h=function(e){d?r.forEach(function(t){e.pointerExit(t.transformedX,t.transformedY,t.identifier)}):r.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},f=0,m=i;f<m.length;f++)h(m[f]);break;case"touchmove":case"mouseover":case"mousemove":for(var y=function(e){r.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},w=0,_=i;w<_.length;w++)y(_[w]);break;case"touchstart":case"mousedown":for(var A=function(e){r.forEach(function(t){e.pointerDown(t.transformedX,t.transformedY,t.identifier)})},C=0,M=i;C<M.length;C++)A(M[C]);break;case"touchend":for(var P=function(e){r.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier),e.pointerExit(t.transformedX,t.transformedY,t.identifier)})},E=0,I=i;E<I.length;E++)P(I[E]);break;case"mouseup":for(var F=function(e){r.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier)})},R=0,T=i;R<T.length;R++)F(T[R])}}}.bind(void 0);return t.addEventListener("mouseover",y),t.addEventListener("mouseout",y),t.addEventListener("mousemove",y),t.addEventListener("mousedown",y),t.addEventListener("mouseup",y),t.addEventListener("touchmove",y,{passive:c}),t.addEventListener("touchstart",y,{passive:c}),t.addEventListener("touchend",y),function(){t.removeEventListener("mouseover",y),t.removeEventListener("mouseout",y),t.removeEventListener("mousemove",y),t.removeEventListener("mousedown",y),t.removeEventListener("mouseup",y),t.removeEventListener("touchmove",y),t.removeEventListener("touchstart",y),t.removeEventListener("touchend",y)}}},(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,n=(t=e,t.replace(o,"").replace(i,function(e,t){return String.fromCharCode(t)})).replace(a,"").replace(o,"").trim();if(!n)return l;if(function(e){return u.indexOf(e[0])>-1}(n))return n;var c=n.match(s);if(!c)return n;var h=c[0];return r.test(h)?l:n}},(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])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new 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}
1,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},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)}}],t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Alignment:()=>i,DataEnum:()=>B,DrawOptimizationOptions:()=>a,EventType:()=>_,Fit:()=>t,Layout:()=>b,LoopType:()=>A,Rive:()=>W,RiveEventType:()=>y,RiveFile:()=>D,RuntimeLoader:()=>g,StateMachineInput:()=>w,StateMachineInputType:()=>v,Testing:()=>ee,ViewModel:()=>U,ViewModelInstance:()=>V,ViewModelInstanceArtboard:()=>K,ViewModelInstanceAssetImage:()=>J,ViewModelInstanceBoolean:()=>Y,ViewModelInstanceColor:()=>q,ViewModelInstanceEnum:()=>X,ViewModelInstanceList:()=>G,ViewModelInstanceNumber:()=>z,ViewModelInstanceString:()=>$,ViewModelInstanceTrigger:()=>H,ViewModelInstanceValue:()=>N,decodeAudio:()=>te,decodeFont:()=>re,decodeImage:()=>ne});var e,t,i,a,o=n(1),s=n(2),u=n(3),l=n(5),c=(e=function(t,n){return e=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,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),h=function(){return h=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},h.apply(this,arguments)}
1,d=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,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}u((r=r.apply(e,t||[])).next())})},f=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){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}},p=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))},m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return c(t,e),t}(Error);!function(e){e.Cover="cover",e.Contain="contain",e.Fill="fill",e.FitWidth="fitWidth",e.FitHeight="fitHeight",e.None="none",e.ScaleDown="scaleDown",e.Layout="layout"}(t||(t={})),function(e){e.Center="center",e.TopLeft="topLeft",e.TopCenter="topCenter",e.TopRight="topRight",e.CenterLeft="centerLeft",e.CenterRight="centerRight",e.BottomLeft="bottomLeft",e.BottomCenter="bottomCenter",e.BottomRight="bottomRight"}(i||(i={})),function(e){e.AlwaysDraw="alwaysDraw",e.DrawOnChanged="drawOnChanged"}(a||(a={}));var v,b=function(){function e(e){var n,r,a,o,s,u,l;this.fit=null!==(n=null==e?void 0:e.fit)&&void 0!==n?n:t.Contain,this.alignment=null!==(r=null==e?void 0:e.alignment)&&void 0!==r?r:i.Center,this.layoutScaleFactor=null!==(a=null==e?void 0:e.layoutScaleFactor)&&void 0!==a?a:1,this.minX=null!==(o=null==e?void 0:e.minX)&&void 0!==o?o:0,this.minY=null!==(s=null==e?void 0:e.minY)&&void 0!==s?s:0,this.maxX=null!==(u=null==e?void 0:e.maxX)&&void 0!==u?u:0,this.maxY=null!==(l=null==e?void 0:e.maxY)&&void 0!==l?l:0}return e.new=function(t){return new e({fit:t.fit,alignment:t.alignment,minX:t.minX,minY:t.minY,maxX:t.maxX,maxY:t.maxY})},e.prototype.copyWith=function(t){var n=t.fit,r=t.alignment,i=t.layoutScaleFactor,a=t.minX,o=t.minY,s=t.maxX,u=t.maxY;return new e({fit:null!=n?n: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})},e.prototype.runtimeFit=function(e){return this.cachedRuntimeFit?this.cachedRuntimeFit:(n=this.fit===t.Cover?e.Fit.cover:this.fit===t.Contain?e.Fit.contain:this.fit===t.Fill?e.Fit.fill:this.fit===t.FitWidth?e.Fit.fitWidth:this.fit===t.FitHeight?e.Fit.fitHeight:this.fit===t.ScaleDown?e.Fit.scaleDown:this.fit===t.Layout?e.Fit.layout:e.Fit.none,this.cachedRuntimeFit=n,n);var n},e.prototype.runtimeAlignment=function(e){return this.cachedRuntimeAlignment?this.cachedRuntimeAlignment:(t=this.alignment===i.TopLeft?e.Alignment.topLeft:this.alignment===i.TopCenter?e.Alignment.topCenter:this.alignment===i.TopRight?e.Alignment.topRight:this.alignment===i.CenterLeft?e.Alignment.centerLeft:this.alignment===i.CenterRight?e.Alignment.centerRight:this.alignment===i.BottomLeft?e.Alignment.bottomLeft:this.alignment===i.BottomCenter?e.Alignment.bottomCenter:this.alignment===i.BottomRight?e.Alignment.bottomRight:e.Alignment.center,this.cachedRuntimeAlignment=t,t);var t},e}(),g=function(){function e(){}return e.loadRuntime=function(){o.default({locateFile:function(){return e.wasmURL}
1}).then(function(t){var n;for(e.runtime=t;e.callBackQueue.length>0;)null===(n=e.callBackQueue.shift())||void 0===n||n(e.runtime)}).catch(function(t){var n={message:(null==t?void 0:t.message)||"Unknown error",type:(null==t?void 0:t.name)||"Error",wasmError:t instanceof WebAssembly.CompileError||t instanceof WebAssembly.RuntimeError,originalError:t},r="https://cdn.jsdelivr.net/npm/".concat(s.name,"@").concat(s.version,"/rive_fallback.wasm");e.wasmURL.toLowerCase()!==r?(e.setWasmUrl(r),e.loadRuntime()):["Could not load Rive WASM file from ".concat(e.wasmURL," or ").concat(r,"."),"Possible reasons:","- Network connection is down","- WebAssembly is not supported in this environment","- The WASM file is corrupted or incompatible","\nError details:","- Type: ".concat(n.type),"- Message: ".concat(n.message),"- WebAssembly-specific error: ".concat(n.wasmError),"\nTo resolve, you may need to:","1. Check your network connection","2. Set a new WASM source via RuntimeLoader.setWasmUrl()","3. Call RuntimeLoader.loadRuntime() again"].join("\n")})},e.getInstance=function(t){e.isLoading||(e.isLoading=!0,e.loadRuntime()),e.runtime?t(e.runtime):e.callBackQueue.push(t)},e.awaitInstance=function(){return new Promise(function(t){return e.getInstance(function(e){return t(e)})})},e.setWasmUrl=function(t){e.wasmURL=t},e.getWasmUrl=function(){return e.wasmURL},e.isLoading=!1,e.callBackQueue=[],e.wasmURL="https://unpkg.com/".concat(s.name,"@").concat(s.version,"/rive.wasm"),e}();!function(e){e[e.Number=56]="Number",e[e.Trigger=58]="Trigger",e[e.Boolean=59]="Boolean"}(v||(v={}));var y,w=function(){function e(e,t){this.type=e,this.runtimeInput=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.runtimeInput.name},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===v.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}();!function(e){e[e.General=128]="General",e[e.OpenUrl=131]="OpenUrl"}(y||(y={}));var _,A,C=function(e){this.isBindableArtboard=!1,this.isBindableArtboard=e},M=function(e){function t(t,n){var r=e.call(this,!1)||this;return r.nativeArtboard=t,r.file=n,r}return c(t,e),t}(C),P=function(e){function t(t){var n=e.call(this,!0)||this;return n.selfUnref=!1,n.nativeArtboard=t,n}return c(t,e),t.prototype.destroy=function(){this.selfUnref&&this.nativeArtboard.unref()},t}(C),E=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 w(v.Boolean,e.asBool()):e.type===t.SMIInput.number?new w(v.Number,e.asNumber()):e.type===t.SMIInput.trigger?new w(v.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}(),I=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=Q(e)).length)this.animations.forEach(function(e){return e.playing=t}
1),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}),a=0;a<e.length;a++){var o=r.indexOf(e[a]),s=i.indexOf(e[a]);if(o>=0||s>=0)o>=0?this.animations[o].playing=t:this.stateMachines[s].playing=t;else{var l=this.artboard.animationByName(e[a]);if(l){var c=new u.Animation(l,this.artboard,this.runtime,t);c.advance(0),c.apply(1),this.animations.push(c)}else{var h=this.artboard.stateMachineByName(e[a]);if(h){var d=new E(h,this.runtime,t,this.artboard);this.stateMachines.push(d)}}}}return n&&(t?this.eventManager.fire({type:_.Play,data:this.playing}):this.eventManager.fire({type:_.Pause,data:this.paused})),t?this.playing:this.paused},e.prototype.initLinearAnimations=function(e,t){for(var n=this.animations.map(function(e){return e.name}),r=0;r<e.length;r++){var i=n.indexOf(e[r]);if(i>=0)this.animations[i].playing=t;else{var a=this.artboard.animationByName(e[r]);if(a){var o=new u.Animation(a,this.artboard,this.runtime,t);o.advance(0),o.apply(1),this.animations.push(o)}}}},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 E(a,this.runtime,t,this.artboard);this.stateMachines.push(o)}else this.initLinearAnimations([e[r]],t)}}},e.prototype.play=function(e){return this.add(e,!0)},e.prototype.advanceIfPaused=function(){this.stateMachines.forEach(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,n=[];if(0===(e=Q(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:_.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:_.Loop,data:{animation:n.name,type:A.Loop}}),n.loopCount=0):2===n.loopValue&&n.loopCount>1&&(this.eventManager.fire({type:_.Loop,data:{animation:n.name,type:A.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:_.StateChange,data:e})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:_.Advance,data:e})},e}();
1!function(e){e.Load="load",e.LoadError="loaderror",e.Play="play",e.Pause="pause",e.Stop="stop",e.Loop="loop",e.Draw="draw",e.Advance="advance",e.StateChange="statechange",e.RiveEvent="riveevent",e.AudioStatusChange="audiostatuschange"}(_||(_={})),function(e){e.OneShot="oneshot",e.Loop="loop",e.PingPong="pingpong"}(A||(A={}));var F,R=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}).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}(),T=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}();!function(e){e[e.AVAILABLE=0]="AVAILABLE",e[e.UNAVAILABLE=1]="UNAVAILABLE"}(F||(F={}));var L,O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=F.UNAVAILABLE,t}return c(t,e),t.prototype.delay=function(e){return d(this,void 0,void 0,function(){return f(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return d(this,void 0,void 0,function(){return f(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:_.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return d(this,void 0,void 0,function(){return f(this,function(e){return this._enabled||(this._enabled=!0,this._status=F.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return d(this,void 0,void 0,function(){return f(this,function(e){switch(e.label){case 0:if(this._status!==F.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 d(this,void 0,void 0,function(){return f(this,function(e){switch(e.label){case 0:return this._started?[3,5]:(this._started=!0,"undefined"!=typeof window?[3,1]:(this.enableAudio(),[3,5]));case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:return this._status!==F.UNAVAILABLE?[3,5]:[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 d(e,void 0,void 0,function(){return f(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return d(this,void 0,void 0,function(){return f(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===F.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(R),j=new O,k=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),S=globalThis.ResizeObserver||k,x=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 S(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}()),D=function(){function e(e){this.enableRiveAssetCDN=!0,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.eventManager=new R,e.onLoad&&this.on(_.Load,e.onLoad),e.onLoadError&&this.on(_.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 d(this,void 0,void 0,function(){var t,n,r,i,a;return f(this,function(o){switch(o.label){case 0:return this.src?(t=this,[4,Z(this.src)]):[3,2];case 1:t.buffer=o.sent(),o.label=2;case 2:return this.destroyed?[2]:(this.assetLoader&&(r=new l.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),n=r.assetLoader),i=this,[4,this.runtime.load(new Uint8Array(this.buffer),n,this.enableRiveAssetCDN)]);case 3:return i.file=o.sent(),a=new l.FileFinalizer(this.file),l.finalizationRegistry.register(this,a),this.destroyed?(this.releaseFile(),[2]):(null!==this.file?this.eventManager.fire({type:_.Load,data:this}):this.fireLoadError(e.fileLoadErrorMessage),[2])}})})},e.prototype.init=function(){return d(this,void 0,void 0,function(){var t,n;return f(this,function(r){switch(r.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(e.missingErrorMessage),[2];r.label=1;case 1:return r.trys.push([1,4,,5]),t=this,[4,g.awaitInstance()];case 2:return t.runtime=r.sent(),this.destroyed?[2]:[4,this.initData()];case 3:return r.sent(),[3,5];case 4:return n=r.sent(),this.fireLoadError(n instanceof Error?n.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:_.LoadError,data:e}),new Error(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 P(e);return(0,l.createFinalization)(t,t.nativeArtboard),this.bindableArtboards.push(t),t}return null},e.prototype.getArtboard=function(e){var t=this.file.artboardByName(e);
1if(null!=t)return new M(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.missingErrorMessage="Rive source file or data buffer required",e.fileLoadErrorMessage="The file failed to load",e}(),W=function(){function e(e){var t,n,r=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._audioEventListener=null,this._boundDraw=null,this._viewModelInstance=null,this._dataEnums=null,this.drawOptimization=a.DrawOnChanged,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(e){var t=r._hasZeroSize!==e;r._hasZeroSize=e,e?r._layout.maxX&&r._layout.maxY||r.resizeToCanvas():t&&r.resizeDrawingSurfaceToCanvas()},this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=x.add(this.canvas,this.onCanvasResize)),this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=null!==(t=e.layout)&&void 0!==t?t:new b,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!==(n=e.drawingOptions)&&void 0!==n?n:this.drawOptimization,this.enableRiveAssetCDN=void 0===e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.eventManager=new R,e.onLoad&&this.on(_.Load,e.onLoad),e.onLoadError&&this.on(_.LoadError,e.onLoadError),e.onPlay&&this.on(_.Play,e.onPlay),e.onPause&&this.on(_.Pause,e.onPause),e.onStop&&this.on(_.Stop,e.onStop),e.onLoop&&this.on(_.Loop,e.onLoop),e.onStateChange&&this.on(_.StateChange,e.onStateChange),e.onAdvance&&this.on(_.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(_.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(_.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(_.Play,e.onplay),e.onpause&&!e.onPause&&this.on(_.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(_.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(_.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(_.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new T(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(e.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),e.new=function(t){return new e(t)},e.prototype.onSystemAudioChanged=function(){this.volume=this._volume},e.prototype.init=function(t){var n=this,r=t.src,i=t.buffer,a=t.riveFile,o=t.animations,s=t.stateMachines,u=t.artboard,l=t.autoplay,c=void 0!==l&&l,h=t.useOffscreenRenderer,d=void 0!==h&&h,f=t.autoBind,p=void 0!==f&&f;if(!this.destroyed){if(this.src=r,this.buffer=i,this.riveFile=a,!this.src&&!this.buffer&&!this.riveFile)throw new m(e.missingErrorMessage);var v=Q(o),b=Q(s);this.loaded=!1,this.readyForPlaying=!1,g.awaitInstance().then(function(e){n.destroyed||(n.runtime=e,n.removeRiveListeners(),n.deleteRiveRenderer(),n.renderer=n.runtime.makeRenderer(n.canvas,d),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(u,v,b,c,p).then(function(e){if(e)return n.setupRiveListeners()}).catch(function(e){}))}).catch(function(e){})}},e.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,l.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})}},e.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null)},e.prototype.initializeAudio=function(){var e,t=this;j.status==F.UNAVAILABLE&&(null===(e=this.artboard)||void 0===e?void 0:e.hasAudio)&&null===this._audioEventListener&&(this._audioEventListener={type:_.AudioStatusChange,callback:function(){return t.onSystemAudioChanged()}},j.add(this._audioEventListener),j.establishAudio())},e.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)},e.prototype.initData=function(e,t,n,r,i){return d(this,void 0,void 0,function(){var a,o,s,u;return f(this,function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),null!=this.riveFile?[3,2]:(a=new D({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader}),this.riveFile=a,[4,a.init()]);case 1:if(l.sent(),this.destroyed)return a.destroyIfUnused(),[2,!1];l.label=2;case 2:return this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,r,i),this.initArtboardSize(),this.initializeAudio(),this.loaded=!0,this.eventManager.fire({type:_.Load,data:null!==(u=this.src)&&void 0!==u?u:"buffer"}),this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return o=l.sent(),s=(c=o)&&c.isHandledError?c.message:"Problem loading file; may be corrupt!",this.eventManager.fire({type:_.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}var c})})},e.prototype.initArtboard=function(e,t,n,r,i){if(this.file){var a,o=e?this.file.artboardByName(e):this.file.defaultArtboard();if(o){if(this.artboard=o,o.volume=this._volume*j.systemVolume,this.animator=new I(this.runtime,this.artboard,this.eventManager),t.length>0||n.length>0?(a=t.concat(n),this.animator.initLinearAnimations(t,r),this.animator.initStateMachines(n,r)):a=[this.animator.atLeastOne(r,!1)],this.taskQueue.add({event:{type:r?_.Play:_.Pause,data:a}}),i){var s=this.file.defaultArtboardViewModel(o);if(null!==s){var u=s.defaultInstance();if(null!==u){var c=new V(u,null);(0,l.createFinalization)(c,c.runtimeInstance),this.bindViewModelInstance(c)}}}}else this.eventManager.fire({type:_.LoadError,data:"Invalid artboard name or no default artboard"})}},e.prototype.drawFrame=function(){var e,t;(null===(e=null===document||void 0===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()},e.prototype.draw=function(e,t){var n;this.frameRequestId=null;var r=performance.now();this.lastRenderTime||(this.lastRenderTime=e),this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,null==t||t());var i=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e;for(var o=0,s=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1});o<s.length;o++){var u=s[o];u.advance(i),u.instance.didLoop&&(u.loopCount+=1),u.apply(1)}for(var c=0,h=this.animator.stateMachines.filter(function(e){return e.playing});c<h.length;c++){var d=h[c],f=d.reportedEventCount();if(f)for(var p=0;p<f;p++){var m=d.reportedEventAt(p);if(m)if(m.type===y.OpenUrl){if(this.eventManager.fire({type:_.RiveEvent,data:m}),this.automaticallyHandleEvents){var v=document.createElement("a"),b=m,g=b.url,w=b.target,A=(0,l.sanitizeUrl)(g);g&&v.setAttribute("href",A),w&&v.setAttribute("target",w),A&&A!==l.BLANK_URL&&v.click()}}else this.eventManager.fire({type:_.RiveEvent,data:m})}d.advanceAndApply(i)}0==this.animator.stateMachines.length&&this.artboard.advance(i);var C=this.renderer;this._hasZeroSize||(this.drawOptimization==a.AlwaysDraw||this.artboard.didChange())&&(C.clear(),
1C.save(),this.alignRenderer(),this.artboard.draw(C),C.restore(),C.flush()),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(i),this.frameCount++;var M=performance.now();for(this.frameTimes.push(M),this.durations.push(M-r);this.frameTimes[0]<=M-1e3;)this.frameTimes.shift(),this.durations.shift();null===(n=this._viewModelInstance)||void 0===n||n.handleCallbacks(),this.animator.isPlaying?this.scheduleRendering():(this.animator.isPaused||this.animator.isStopped)&&(this.lastRenderTime=0)},e.prototype.alignRenderer=function(){var e=this,t=e.renderer,n=e.runtime,r=e._layout,i=e.artboard;t.align(r.runtimeFit(n),r.runtimeAlignment(n),{minX:r.minX,minY:r.minY,maxX:r.maxX,maxY:r.maxY},i.bounds,this._devicePixelRatioUsed*r.layoutScaleFactor)},Object.defineProperty(e.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.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}),e.prototype.cleanup=function(){var e,t;this.destroyed=!0,this.stopRendering(),this.cleanupInstances(),null!==this._observed&&x.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&&(j.remove(this._audioEventListener),this._audioEventListener=null),null===(t=this._viewModelInstance)||void 0===t||t.cleanup(),this._viewModelInstance=null,this._dataEnums=null},e.prototype.deleteRiveRenderer=function(){var e;null===(e=this.renderer)||void 0===e||e.delete(),this.renderer=null},e.prototype.cleanupInstances=function(){null!==this.eventCleanup&&this.eventCleanup(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},e.prototype.retrieveTextRun=function(e){if(e&&this.artboard){var t=this.artboard.textRun(e);if(t)return t}},e.prototype.getTextRunValue=function(e){var t=this.retrieveTextRun(e);return t?t.text:void 0},e.prototype.setTextRunValue=function(e,t){var n=this.retrieveTextRun(e);n&&(n.text=t)},e.prototype.play=function(e,t){var n=this;e=Q(e),this.readyForPlaying?(this.animator.play(e),this.eventCleanup&&this.eventCleanup(),this.setupRiveListeners(),this.startRendering()):this.taskQueue.add({action:function(){return n.play(e,t)}})},e.prototype.pause=function(e){var t=this;e=Q(e),this.readyForPlaying?(this.eventCleanup&&this.eventCleanup(),this.animator.pause(e)):this.taskQueue.add({action:function(){return t.pause(e)}})},e.prototype.scrub=function(e,t){var n=this;e=Q(e),this.readyForPlaying?(this.animator.scrub(e,t||0),this.drawFrame()):this.taskQueue.add({action:function(){return n.scrub(e,t)}})},e.prototype.stop=function(e){var t=this;e=Q(e),this.readyForPlaying?(this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup()):this.taskQueue.add({action:function(){return t.stop(e)}})},e.prototype.reset=function(e){var t,n,r=null==e?void 0:e.artboard,i=Q(null==e?void 0:e.animations),a=Q(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()},e.prototype.load=function(e){this.file=null,this.stop(),this.init(e)},Object.defineProperty(e.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()},enumerable:!1,configurable:!0}),e.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height})},e.prototype.resizeDrawingSurfaceToCanvas=function(e){if(this.canvas instanceof HTMLCanvasElement&&window){var n=this.canvas.getBoundingClientRect(),r=n.width,i=n.height,a=e||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=a,this.canvas.width=a*r,this.canvas.height=a*i,this.resizeToCanvas(),this.drawFrame(),this.layout.fit===t.Layout){var o=this._layout.layoutScaleFactor;this.artboard.width=r/o,this.artboard.height=i/o}}},Object.defineProperty(e.prototype,"source",{get:function(){return this.src}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.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}),e.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}},e.prototype.retrieveInputAtPath=function(e,t){if(e&&this.artboard){var n=this.artboard.inputByPath(e,t);if(n)return n}},e.prototype.setBooleanStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&r.type===v.Boolean&&(r.asBool().value=t)},e.prototype.setNumberStateAtPath=function(e,t,n){var r=this.retrieveInputAtPath(e,n);r&&r.type===v.Number&&(r.asNumber().value=t)},e.prototype.fireStateAtPath=function(e,t){var n=this.retrieveInputAtPath(e,t);n&&n.type===v.Trigger&&n.asTrigger().fire()},e.prototype.retrieveTextAtPath=function(e,t){if(e&&t&&this.artboard){var n=this.artboard.textByPath(e,t);if(n)return n}},e.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);if(n)return n.text},e.prototype.setTextRunValueAtPath=function(e,t,n){var r=this.retrieveTextAtPath(e,n);r&&(r.text=t)},Object.defineProperty(e.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(e.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(e.prototype,"pausedAnimationNames",{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(e.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(e.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return this.animator.isStopped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),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.unsubscribe=function(e,t){this.off(e,t)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.unsubscribeAll=function(e){this.removeAllRiveEventListeners(e)},e.prototype.stopRendering=function(){this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},e.prototype.startRendering=function(){this.drawFrame()},e.prototype.scheduleRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},e.prototype.enableFPSCounter=function(e){this.runtime.enableFPSCounter(e)},e.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(e.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();
1o++){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(e.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*j.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.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}),e.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(e.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(e){this._devicePixelRatioUsed=e},enumerable:!1,configurable:!0}),e.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>0?this.animator.stateMachines.forEach(function(t){return t.bindViewModelInstance(e)}):this.artboard.bindViewModelInstance(e.runtimeInstance))},Object.defineProperty(e.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),e.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return null!==t?new U(t):null},e.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return null!==t?new U(t):null},e.prototype.enums=function(){if(null===this._dataEnums){var e=this.file.enums();this._dataEnums=e.map(function(e){return new B(e)})}return this._dataEnums},e.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new U(e)}return null},e.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},e.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},e.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},e.missingErrorMessage="Rive source file or data buffer required",e.cleanupErrorMessage="Attempt to use file after calling cleanup.",e}(),U=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 V(t,null);return(0,l.createFinalization)(n,t),n}return null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);if(null!==t){var n=new V(t,null);return(0,l.createFinalization)(n,t),n}return null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();if(null!==e){var t=new V(e,null);return(0,l.createFinalization)(t,e),t}return null},e.prototype.instance=function(){var e=this._viewModel.instance();if(null!==e){var t=new V(e,null);return(0,l.createFinalization)(t,e),t}return null},Object.defineProperty(e.prototype,"properties",{get:function(){return this._viewModel.getProperties()}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instanceNames",{get:function(){return this._viewModel.getInstanceNames()},enumerable:!1,configurable:!0}),e}(),B=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}();!function(e){e.Number="number",e.String="string",e.Boolean="boolean",e.Color="color",e.Trigger="trigger",e.Enum="enum",e.List="list",e.Image="image",e.Artboard="artboard"}(L||(L={}));var V=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()})),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]);return null!==n?t==e.length-1?n:n.viewModelFromPathSegments(e,t++):null},e.prototype.propertyFromPathSegments=function(e,t,n){var r,i,a,o,s,u,l,c,h,d,f,p,m,v,b,g,y,w;if(t<e.length-1){var _=this.internalViewModelInstance(e[t]);return null!==_?_.propertyFromPathSegments(e,t+1,n):null}var A=null;switch(n){case L.Number:if(null!==(A=null!==(i=null===(r=this._runtimeInstance)||void 0===r?void 0:r.number(e[t]))&&void 0!==i?i:null))return new z(A,this);break;case L.String:if(null!==(A=null!==(o=null===(a=this._runtimeInstance)||void 0===a?void 0:a.string(e[t]))&&void 0!==o?o:null))return new $(A,this);break;case L.Boolean:if(null!==(A=null!==(u=null===(s=this._runtimeInstance)||void 0===s?void 0:s.boolean(e[t]))&&void 0!==u?u:null))return new Y(A,this);break;case L.Color:if(null!==(A=null!==(c=null===(l=this._runtimeInstance)||void 0===l?void 0:l.color(e[t]))&&void 0!==c?c:null))return new q(A,this);break;case L.Trigger:if(null!==(A=null!==(d=null===(h=this._runtimeInstance)||void 0===h?void 0:h.trigger(e[t]))&&void 0!==d?d:null))return new H(A,this);break;case L.Enum:if(null!==(A=null!==(p=null===(f=this._runtimeInstance)||void 0===f?void 0:f.enum(e[t]))&&void 0!==p?p:null))return new X(A,this);break;case L.List:if(null!==(A=null!==(v=null===(m=this._runtimeInstance)||void 0===m?void 0:m.list(e[t]))&&void 0!==v?v:null))return new G(A,this);break;case L.Image:if(null!==(A=null!==(g=null===(b=this._runtimeInstance)||void 0===b?void 0:b.image(e[t]))&&void 0!==g?g:null))return new J
1(A,this);break;case L.Artboard:if(null!==(A=null!==(w=null===(y=this._runtimeInstance)||void 0===y?void 0:y.artboard(e[t]))&&void 0!==w?w:null))return new K(A,this)}return null},e.prototype.internalViewModelInstance=function(t){var n;if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var r=null===(n=this._runtimeInstance)||void 0===n?void 0:n.viewModel(t);if(null!==r){var i=new e(r,this);return(0,l.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 h({},e)}))||[]},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=p([],this._children,!0);this._children.length=0;var r=p([],this._parents,!0);this._parents.length=0,n.forEach(function(e){e.removeParent(t)}),r.forEach(function(e){e.removeFromViewModelCallbacks(t)})}},e}(),N=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}
1,enumerable:!1,configurable:!0}),e}(),$=function(e){function t(t,n){return e.call(this,t,n)||this}return c(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}(N),z=function(e){function t(t,n){return e.call(this,t,n)||this}return c(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}(N),Y=function(e){function t(t,n){return e.call(this,t,n)||this}return c(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}(N),H=function(e){function t(t,n){return e.call(this,t,n)||this}return c(t,e),t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(N),X=function(e){function t(t,n){return e.call(this,t,n)||this}return c(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}(N),G=function(e){function t(t,n){return e.call(this,t,n)||this}return c(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 V(t,this._parentViewModel);return(0,l.createFinalization)(n,t),n}return null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(N),q=function(e){function t(t,n){return e.call(this,t,n)||this}return c(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.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}(N),J=function(e){function t(t,n){return e.call(this,t,n)||this}return c(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}(N),K=function(e){function t(t,n){return e.call(this,t,n)||this}return c(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t,n;n=e.isBindableArtboard?e:e.file.internalBindableArtboardFromArtboard(e.nativeArtboard),this._viewModelInstanceValue.value(null!==(t=null==n?void 0:n.nativeArtboard)&&void 0!==t?t:null)}
1,enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(N),Z=function(e){return d(void 0,void 0,void 0,function(){var t;return f(this,function(n){switch(n.label){case 0:return t=new Request(e),[4,fetch(t)];case 1:return[4,n.sent().arrayBuffer()];case 2:return[2,n.sent()]}})})},Q=function(e){return"string"==typeof e?[e]:e instanceof Array?e:[]},ee={EventManager:R,TaskQueueManager:T},te=function(e){return d(void 0,void 0,void 0,function(){var t,n;return f(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return g.getInstance(function(n){n.decodeAudio(e,t)})})];case 1:return t=r.sent(),n=new l.AudioWrapper(t),l.finalizationRegistry.register(n,t),[2,n]}})})},ne=function(e){return d(void 0,void 0,void 0,function(){var t,n;return f(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return g.getInstance(function(n){n.decodeImage(e,t)})})];case 1:return t=r.sent(),n=new l.ImageWrapper(t),l.finalizationRegistry.register(n,t),[2,n]}})})},re=function(e){return d(void 0,void 0,void 0,function(){var t,n;return f(this,function(r){switch(r.label){case 0:return[4,new Promise(function(t){return g.getInstance(function(n){n.decodeFont(e,t)})})];case 1:return t=r.sent(),n=new l.FontWrapper(t),l.finalizationRegistry.register(n,t),[2,n]}})})}})(),r})(),e.exports=t()}}]);

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.