var CanvasKitInit = (() => { var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; return ( function(CanvasKitInit) { CanvasKitInit = CanvasKitInit || {}; null;var w;w||(w=typeof CanvasKitInit !== 'undefined' ? CanvasKitInit : {});var aa,ea;w.ready=new Promise(function(a,b){aa=a;ea=b}); (function(a){a.Vd=a.Vd||[];a.Vd.push(function(){a.MakeSWCanvasSurface=function(b){var d=b;if("CANVAS"!==d.tagName&&(d=document.getElementById(b),!d))throw"Canvas with id "+b+" was not found";if(b=a.MakeSurface(d.width,d.height))b.Nd=d;return b};a.MakeCanvasSurface||(a.MakeCanvasSurface=a.MakeSWCanvasSurface);a.MakeSurface=function(b,d){var f={width:b,height:d,colorType:a.ColorType.RGBA_8888,alphaType:a.AlphaType.Unpremul,colorSpace:a.ColorSpace.SRGB},h=b*d*4,m=a._malloc(h);if(f=a.Surface._makeRasterDirect(f, m,4*b))f.Nd=null,f.Ef=b,f.Af=d,f.Cf=h,f.$e=m,f.getCanvas().clear(a.TRANSPARENT);return f};a.MakeRasterDirectSurface=function(b,d,f){return a.Surface._makeRasterDirect(b,d.byteOffset,f)};a.Surface.prototype.flush=function(b){a.Od(this.Md);this._flush();if(this.Nd){var d=new Uint8ClampedArray(a.HEAPU8.buffer,this.$e,this.Cf);d=new ImageData(d,this.Ef,this.Af);b?this.Nd.getContext("2d").putImageData(d,0,0,b[0],b[1],b[2]-b[0],b[3]-b[1]):this.Nd.getContext("2d").putImageData(d,0,0)}};a.Surface.prototype.dispose= function(){this.$e&&a._free(this.$e);this.delete()};a.Od=a.Od||function(){};a.df=a.df||function(){return null}})})(w); (function(a){a.Vd=a.Vd||[];a.Vd.push(function(){function b(n,q,v){return n&&n.hasOwnProperty(q)?n[q]:v}function d(n){var q=fa(ia);ia[q]=n;return q}function f(n){return n.naturalHeight||n.videoHeight||n.displayHeight||n.height}function h(n){return n.naturalWidth||n.videoWidth||n.displayWidth||n.width}function m(n,q,v,D){n.bindTexture(n.TEXTURE_2D,q);D||v.alphaType!==a.AlphaType.Premul||n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);return q}function u(n,q,v){v||q.alphaType!==a.AlphaType.Premul|| n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);n.bindTexture(n.TEXTURE_2D,null)}a.GetWebGLContext=function(n,q){if(!n)throw"null canvas passed into makeWebGLContext";var v={alpha:b(q,"alpha",1),depth:b(q,"depth",1),stencil:b(q,"stencil",8),antialias:b(q,"antialias",0),premultipliedAlpha:b(q,"premultipliedAlpha",1),preserveDrawingBuffer:b(q,"preserveDrawingBuffer",0),preferLowPowerToHighPerformance:b(q,"preferLowPowerToHighPerformance",0),failIfMajorPerformanceCaveat:b(q,"failIfMajorPerformanceCaveat", 0),enableExtensionsByDefault:b(q,"enableExtensionsByDefault",1),explicitSwapControl:b(q,"explicitSwapControl",0),renderViaOffscreenBackBuffer:b(q,"renderViaOffscreenBackBuffer",0)};v.majorVersion=q&&q.majorVersion?q.majorVersion:"undefined"!==typeof WebGL2RenderingContext?2:1;if(v.explicitSwapControl)throw"explicitSwapControl is not supported";n=ka(n,v);if(!n)return 0;ma(n);x.ge.getExtension("WEBGL_debug_renderer_info");return n};a.deleteContext=function(n){x===na[n]&&(x=null);"object"==typeof JSEvents&& JSEvents.ug(na[n].ge.canvas);na[n]&&na[n].ge.canvas&&(na[n].ge.canvas.yf=void 0);na[n]=null};a._setTextureCleanup({deleteTexture:function(n,q){var v=ia[q];v&&na[n].ge.deleteTexture(v);ia[q]=null}});a.MakeWebGLContext=function(n){if(!this.Od(n))return null;var q=this._MakeGrContext();if(!q)return null;q.Md=n;return x.ef=q};a.MakeGrContext=a.MakeWebGLContext;a.MakeOnScreenGLSurface=function(n,q,v,D){if(!this.Od(n.Md))return null;q=this._MakeOnScreenGLSurface(n,q,v,D);if(!q)return null;q.Md=n.Md;return q}; a.MakeRenderTarget=function(){var n=arguments[0];if(!this.Od(n.Md))return null;if(3===arguments.length){var q=this._MakeRenderTargetWH(n,arguments[1],arguments[2]);if(!q)return null}else if(2===arguments.length){if(q=this._MakeRenderTargetII(n,arguments[1]),!q)return null}else return null;q.Md=n.Md;return q};a.MakeWebGLCanvasSurface=function(n,q,v){q=q||null;var D=n,I="undefined"!==typeof OffscreenCanvas&&D instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&D instanceof HTMLCanvasElement|| I||(D=document.getElementById(n),D)))throw"Canvas with id "+n+" was not found";n=this.GetWebGLContext(D,v);if(!n||0>n)throw"failed to create webgl context: err "+n;n=this.MakeWebGLContext(n);q=this.MakeOnScreenGLSurface(n,D.width,D.height,q);return q?q:(q=D.cloneNode(!0),D.parentNode.replaceChild(q,D),q.classList.add("ck-replaced"),a.MakeSWCanvasSurface(q))};a.MakeCanvasSurface=a.MakeWebGLCanvasSurface;a.Surface.prototype.makeImageFromTexture=function(n,q){a.Od(this.Md);n=d(n);if(q=this._makeImageFromTexture(this.Md, n,q))q.Le=n;return q};a.Surface.prototype.makeImageFromTextureSource=function(n,q,v){q||(q={height:f(n),width:h(n),colorType:a.ColorType.RGBA_8888,alphaType:v?a.AlphaType.Premul:a.AlphaType.Unpremul});q.colorSpace||(q.colorSpace=a.ColorSpace.SRGB);a.Od(this.Md);var D=x.ge;v=m(D,D.createTexture(),q,v);2===x.version?D.texImage2D(D.TEXTURE_2D,0,D.RGBA,q.width,q.height,0,D.RGBA,D.UNSIGNED_BYTE,n):D.texImage2D(D.TEXTURE_2D,0,D.RGBA,D.RGBA,D.UNSIGNED_BYTE,n);u(D,q);return this.makeImageFromTexture(v,q)}; a.Surface.prototype.updateTextureFromSource=function(n,q,v){if(n.Le){a.Od(this.Md);var D=n.getImageInfo(),I=x.ge,M=m(I,ia[n.Le],D,v);2===x.version?I.texImage2D(I.TEXTURE_2D,0,I.RGBA,h(q),f(q),0,I.RGBA,I.UNSIGNED_BYTE,q):I.texImage2D(I.TEXTURE_2D,0,I.RGBA,I.RGBA,I.UNSIGNED_BYTE,q);u(I,D,v);this._resetContext();ia[n.Le]=null;n.Le=d(M);D.colorSpace=n.getColorSpace();q=this._makeImageFromTexture(this.Md,n.Le,D);v=n.Ld.Td;I=n.Ld.$d;n.Ld.Td=q.Ld.Td;n.Ld.$d=q.Ld.$d;q.Ld.Td=v;q.Ld.$d=I;q.delete();D.colorSpace.delete()}}; a.MakeLazyImageFromTextureSource=function(n,q,v){q||(q={height:f(n),width:h(n),colorType:a.ColorType.RGBA_8888,alphaType:v?a.AlphaType.Premul:a.AlphaType.Unpremul});q.colorSpace||(q.colorSpace=a.ColorSpace.SRGB);var D={makeTexture:function(){var I=x,M=I.ge,z=m(M,M.createTexture(),q,v);2===I.version?M.texImage2D(M.TEXTURE_2D,0,M.RGBA,q.width,q.height,0,M.RGBA,M.UNSIGNED_BYTE,n):M.texImage2D(M.TEXTURE_2D,0,M.RGBA,M.RGBA,M.UNSIGNED_BYTE,n);u(M,q,v);return d(z)},freeSrc:function(){}};"VideoFrame"===n.constructor.name&& (D.freeSrc=function(){n.close()});return a.Image._makeFromGenerator(q,D)};a.Od=function(n){return n?ma(n):!1};a.df=function(){return x&&x.ef&&!x.ef.isDeleted()?x.ef:null}})})(w); (function(a){function b(e,c,g,l,r){for(var y=0;y>>0}function m(e){if(e&&e._ck)return e;if(e instanceof Float32Array){for(var c=Math.floor(e.length/4),g=new Uint32Array(c),l=0;lC;C++)a.HEAPF32[r+l]=e[y][C],l++;e=g}else e=V;c.ce=e}else throw"Invalid argument to copyFlexibleColorArray, Not a color array "+typeof e;return c}function I(e){if(!e)return V;var c=Ub.toTypedArray();if(e.length){if(6===e.length|| 9===e.length)return v(e,"HEAPF32",Oa),6===e.length&&a.HEAPF32.set(yd,6+Oa/4),Oa;if(16===e.length)return c[0]=e[0],c[1]=e[1],c[2]=e[3],c[3]=e[4],c[4]=e[5],c[5]=e[7],c[6]=e[12],c[7]=e[13],c[8]=e[15],Oa;throw"invalid matrix size";}if(void 0===e.m11)throw"invalid matrix argument";c[0]=e.m11;c[1]=e.m21;c[2]=e.m41;c[3]=e.m12;c[4]=e.m22;c[5]=e.m42;c[6]=e.m14;c[7]=e.m24;c[8]=e.m44;return Oa}function M(e){if(!e)return V;var c=Vb.toTypedArray();if(e.length){if(16!==e.length&&6!==e.length&&9!==e.length)throw"invalid matrix size"; if(16===e.length)return v(e,"HEAPF32",ab);c.fill(0);c[0]=e[0];c[1]=e[1];c[3]=e[2];c[4]=e[3];c[5]=e[4];c[7]=e[5];c[10]=1;c[12]=e[6];c[13]=e[7];c[15]=e[8];6===e.length&&(c[12]=0,c[13]=0,c[15]=1);return ab}if(void 0===e.m11)throw"invalid matrix argument";c[0]=e.m11;c[1]=e.m21;c[2]=e.m31;c[3]=e.m41;c[4]=e.m12;c[5]=e.m22;c[6]=e.m32;c[7]=e.m42;c[8]=e.m13;c[9]=e.m23;c[10]=e.m33;c[11]=e.m43;c[12]=e.m14;c[13]=e.m24;c[14]=e.m34;c[15]=e.m44;return ab}function z(e,c){return v(e,"HEAPF32",c||Ua)}function N(e, c,g,l){var r=Wb.toTypedArray();r[0]=e;r[1]=c;r[2]=g;r[3]=l;return Ua}function T(e){for(var c=new Float32Array(4),g=0;4>g;g++)c[g]=a.HEAPF32[e/4+g];return c}function U(e,c){return v(e,"HEAPF32",c||ja)}function ra(e,c){return v(e,"HEAPF32",c||Xb)}function va(){for(var e=0,c=0;c>>0};a.Color4f=function(e,c,g,l){void 0===l&&(l=1);return Float32Array.of(e,c,g,l)};Object.defineProperty(a,"TRANSPARENT",{get:function(){return a.Color4f(0,0,0,0)}});Object.defineProperty(a,"BLACK",{get:function(){return a.Color4f(0,0,0,1)}});Object.defineProperty(a, "WHITE",{get:function(){return a.Color4f(1,1,1,1)}});Object.defineProperty(a,"RED",{get:function(){return a.Color4f(1,0,0,1)}});Object.defineProperty(a,"GREEN",{get:function(){return a.Color4f(0,1,0,1)}});Object.defineProperty(a,"BLUE",{get:function(){return a.Color4f(0,0,1,1)}});Object.defineProperty(a,"YELLOW",{get:function(){return a.Color4f(1,1,0,1)}});Object.defineProperty(a,"CYAN",{get:function(){return a.Color4f(0,1,1,1)}});Object.defineProperty(a,"MAGENTA",{get:function(){return a.Color4f(1, 0,1,1)}});a.getColorComponents=function(e){return[Math.floor(255*e[0]),Math.floor(255*e[1]),Math.floor(255*e[2]),e[3]]};a.parseColorString=function(e,c){e=e.toLowerCase();if(e.startsWith("#")){c=255;switch(e.length){case 9:c=parseInt(e.slice(7,9),16);case 7:var g=parseInt(e.slice(1,3),16);var l=parseInt(e.slice(3,5),16);var r=parseInt(e.slice(5,7),16);break;case 5:c=17*parseInt(e.slice(4,5),16);case 4:g=17*parseInt(e.slice(1,2),16),l=17*parseInt(e.slice(2,3),16),r=17*parseInt(e.slice(3,4),16)}return a.Color(g, l,r,c/255)}return e.startsWith("rgba")?(e=e.slice(5,-1),e=e.split(","),a.Color(+e[0],+e[1],+e[2],u(e[3]))):e.startsWith("rgb")?(e=e.slice(4,-1),e=e.split(","),a.Color(+e[0],+e[1],+e[2],u(e[3]))):e.startsWith("gray(")||e.startsWith("hsl")||!c||(e=c[e],void 0===e)?a.BLACK:e};a.multiplyByAlpha=function(e,c){e=e.slice();e[3]=Math.max(0,Math.min(e[3]*c,1));return e};a.Malloc=function(e,c){var g=a._malloc(c*e.BYTES_PER_ELEMENT);return{_ck:!0,length:c,byteOffset:g,re:null,subarray:function(l,r){l=this.toTypedArray().subarray(l, r);l._ck=!0;return l},toTypedArray:function(){if(this.re&&this.re.length)return this.re;this.re=new e(a.HEAPU8.buffer,g,c);this.re._ck=!0;return this.re}}};a.Free=function(e){a._free(e.byteOffset);e.byteOffset=V;e.toTypedArray=null;e.re=null};var Oa=V,Ub,ab=V,Vb,Ua=V,Wb,Ha,ja=V,Cc,Pa=V,Dc,Yb=V,Ec,Zb=V,$b,xb=V,Fc,Xb=V,Gc,Hc=V,yd=Float32Array.of(0,0,1),V=0;a.onRuntimeInitialized=function(){function e(c,g,l,r,y,C,J){C||(C=4*r.width,r.colorType===a.ColorType.RGBA_F16?C*=2:r.colorType===a.ColorType.RGBA_F32&& (C*=4));var Q=C*r.height;var O=y?y.byteOffset:a._malloc(Q);if(J?!c._readPixels(r,O,C,g,l,J):!c._readPixels(r,O,C,g,l))return y||a._free(O),null;if(y)return y.toTypedArray();switch(r.colorType){case a.ColorType.RGBA_8888:case a.ColorType.RGBA_F16:c=(new Uint8Array(a.HEAPU8.buffer,O,Q)).slice();break;case a.ColorType.RGBA_F32:c=(new Float32Array(a.HEAPU8.buffer,O,Q)).slice();break;default:return null}a._free(O);return c}Wb=a.Malloc(Float32Array,4);Ua=Wb.byteOffset;Vb=a.Malloc(Float32Array,16);ab=Vb.byteOffset; Ub=a.Malloc(Float32Array,9);Oa=Ub.byteOffset;Fc=a.Malloc(Float32Array,12);Xb=Fc.byteOffset;Gc=a.Malloc(Float32Array,12);Hc=Gc.byteOffset;Ha=a.Malloc(Float32Array,4);ja=Ha.byteOffset;Cc=a.Malloc(Float32Array,4);Pa=Cc.byteOffset;Dc=a.Malloc(Float32Array,3);Yb=Dc.byteOffset;Ec=a.Malloc(Float32Array,3);Zb=Ec.byteOffset;$b=a.Malloc(Int32Array,4);xb=$b.byteOffset;a.ColorSpace.SRGB=a.ColorSpace._MakeSRGB();a.ColorSpace.DISPLAY_P3=a.ColorSpace._MakeDisplayP3();a.ColorSpace.ADOBE_RGB=a.ColorSpace._MakeAdobeRGB(); a.GlyphRunFlags={IsWhiteSpace:a._GlyphRunFlags_isWhiteSpace};a.Path.MakeFromCmds=function(c){var g=v(c,"HEAPF32"),l=a.Path._MakeFromCmds(g,c.length);q(g,c);return l};a.Path.MakeFromVerbsPointsWeights=function(c,g,l){var r=v(c,"HEAPU8"),y=v(g,"HEAPF32"),C=v(l,"HEAPF32"),J=a.Path._MakeFromVerbsPointsWeights(r,c.length,y,g.length,C,l&&l.length||0);q(r,c);q(y,g);q(C,l);return J};a.Path.prototype.addArc=function(c,g,l){c=U(c);this._addArc(c,g,l);return this};a.Path.prototype.addCircle=function(c,g,l,r){this._addCircle(c, g,l,!!r);return this};a.Path.prototype.addOval=function(c,g,l){void 0===l&&(l=1);c=U(c);this._addOval(c,!!g,l);return this};a.Path.prototype.addPath=function(){var c=Array.prototype.slice.call(arguments),g=c[0],l=!1;"boolean"===typeof c[c.length-1]&&(l=c.pop());if(1===c.length)this._addPath(g,1,0,0,0,1,0,0,0,1,l);else if(2===c.length)c=c[1],this._addPath(g,c[0],c[1],c[2],c[3],c[4],c[5],c[6]||0,c[7]||0,c[8]||1,l);else if(7===c.length||10===c.length)this._addPath(g,c[1],c[2],c[3],c[4],c[5],c[6],c[7]|| 0,c[8]||0,c[9]||1,l);else return null;return this};a.Path.prototype.addPoly=function(c,g){var l=v(c,"HEAPF32");this._addPoly(l,c.length/2,g);q(l,c);return this};a.Path.prototype.addRect=function(c,g){c=U(c);this._addRect(c,!!g);return this};a.Path.prototype.addRRect=function(c,g){c=ra(c);this._addRRect(c,!!g);return this};a.Path.prototype.addVerbsPointsWeights=function(c,g,l){var r=v(c,"HEAPU8"),y=v(g,"HEAPF32"),C=v(l,"HEAPF32");this._addVerbsPointsWeights(r,c.length,y,g.length,C,l&&l.length||0); q(r,c);q(y,g);q(C,l)};a.Path.prototype.arc=function(c,g,l,r,y,C){c=a.LTRBRect(c-l,g-l,c+l,g+l);y=(y-r)/Math.PI*180-360*!!C;C=new a.Path;C.addArc(c,r/Math.PI*180,y);this.addPath(C,!0);C.delete();return this};a.Path.prototype.arcToOval=function(c,g,l,r){c=U(c);this._arcToOval(c,g,l,r);return this};a.Path.prototype.arcToRotated=function(c,g,l,r,y,C,J){this._arcToRotated(c,g,l,!!r,!!y,C,J);return this};a.Path.prototype.arcToTangent=function(c,g,l,r,y){this._arcToTangent(c,g,l,r,y);return this};a.Path.prototype.close= function(){this._close();return this};a.Path.prototype.conicTo=function(c,g,l,r,y){this._conicTo(c,g,l,r,y);return this};a.Path.prototype.computeTightBounds=function(c){this._computeTightBounds(ja);var g=Ha.toTypedArray();return c?(c.set(g),c):g.slice()};a.Path.prototype.cubicTo=function(c,g,l,r,y,C){this._cubicTo(c,g,l,r,y,C);return this};a.Path.prototype.dash=function(c,g,l){return this._dash(c,g,l)?this:null};a.Path.prototype.getBounds=function(c){this._getBounds(ja);var g=Ha.toTypedArray();return c? (c.set(g),c):g.slice()};a.Path.prototype.lineTo=function(c,g){this._lineTo(c,g);return this};a.Path.prototype.moveTo=function(c,g){this._moveTo(c,g);return this};a.Path.prototype.offset=function(c,g){this._transform(1,0,c,0,1,g,0,0,1);return this};a.Path.prototype.quadTo=function(c,g,l,r){this._quadTo(c,g,l,r);return this};a.Path.prototype.rArcTo=function(c,g,l,r,y,C,J){this._rArcTo(c,g,l,r,y,C,J);return this};a.Path.prototype.rConicTo=function(c,g,l,r,y){this._rConicTo(c,g,l,r,y);return this};a.Path.prototype.rCubicTo= function(c,g,l,r,y,C){this._rCubicTo(c,g,l,r,y,C);return this};a.Path.prototype.rLineTo=function(c,g){this._rLineTo(c,g);return this};a.Path.prototype.rMoveTo=function(c,g){this._rMoveTo(c,g);return this};a.Path.prototype.rQuadTo=function(c,g,l,r){this._rQuadTo(c,g,l,r);return this};a.Path.prototype.stroke=function(c){c=c||{};c.width=c.width||1;c.miter_limit=c.miter_limit||4;c.cap=c.cap||a.StrokeCap.Butt;c.join=c.join||a.StrokeJoin.Miter;c.precision=c.precision||1;return this._stroke(c)?this:null}; a.Path.prototype.transform=function(){if(1===arguments.length){var c=arguments[0];this._transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6]||0,c[7]||0,c[8]||1)}else if(6===arguments.length||9===arguments.length)c=arguments,this._transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6]||0,c[7]||0,c[8]||1);else throw"transform expected to take 1 or 9 arguments. Got "+arguments.length;return this};a.Path.prototype.trim=function(c,g,l){return this._trim(c,g,!!l)?this:null};a.Image.prototype.makeShaderCubic=function(c,g, l,r,y){y=I(y);return this._makeShaderCubic(c,g,l,r,y)};a.Image.prototype.makeShaderOptions=function(c,g,l,r,y){y=I(y);return this._makeShaderOptions(c,g,l,r,y)};a.Image.prototype.readPixels=function(c,g,l,r,y){var C=a.df();return e(this,c,g,l,r,y,C)};a.Canvas.prototype.clear=function(c){a.Od(this.Md);c=z(c);this._clear(c)};a.Canvas.prototype.clipRRect=function(c,g,l){a.Od(this.Md);c=ra(c);this._clipRRect(c,g,l)};a.Canvas.prototype.clipRect=function(c,g,l){a.Od(this.Md);c=U(c);this._clipRect(c,g,l)}; a.Canvas.prototype.concat=function(c){a.Od(this.Md);c=M(c);this._concat(c)};a.Canvas.prototype.drawArc=function(c,g,l,r,y){a.Od(this.Md);c=U(c);this._drawArc(c,g,l,r,y)};a.Canvas.prototype.drawAtlas=function(c,g,l,r,y,C,J){if(c&&r&&g&&l&&g.length===l.length){a.Od(this.Md);y||(y=a.BlendMode.SrcOver);var Q=v(g,"HEAPF32"),O=v(l,"HEAPF32"),W=l.length/4,t=v(m(C),"HEAPU32");if(J&&"B"in J&&"C"in J)this._drawAtlasCubic(c,O,Q,t,W,y,J.B,J.C,r);else{let F=a.FilterMode.Linear,P=a.MipmapMode.None;J&&(F=J.filter, "mipmap"in J&&(P=J.mipmap));this._drawAtlasOptions(c,O,Q,t,W,y,F,P,r)}q(Q,g);q(O,l);q(t,C)}};a.Canvas.prototype.drawCircle=function(c,g,l,r){a.Od(this.Md);this._drawCircle(c,g,l,r)};a.Canvas.prototype.drawColor=function(c,g){a.Od(this.Md);c=z(c);void 0!==g?this._drawColor(c,g):this._drawColor(c)};a.Canvas.prototype.drawColorInt=function(c,g){a.Od(this.Md);this._drawColorInt(c,g||a.BlendMode.SrcOver)};a.Canvas.prototype.drawColorComponents=function(c,g,l,r,y){a.Od(this.Md);c=N(c,g,l,r);void 0!==y? this._drawColor(c,y):this._drawColor(c)};a.Canvas.prototype.drawDRRect=function(c,g,l){a.Od(this.Md);c=ra(c,Xb);g=ra(g,Hc);this._drawDRRect(c,g,l)};a.Canvas.prototype.drawImage=function(c,g,l,r){a.Od(this.Md);this._drawImage(c,g,l,r||null)};a.Canvas.prototype.drawImageCubic=function(c,g,l,r,y,C){a.Od(this.Md);this._drawImageCubic(c,g,l,r,y,C||null)};a.Canvas.prototype.drawImageOptions=function(c,g,l,r,y,C){a.Od(this.Md);this._drawImageOptions(c,g,l,r,y,C||null)};a.Canvas.prototype.drawImageNine=function(c, g,l,r,y){a.Od(this.Md);g=v(g,"HEAP32",xb);l=U(l);this._drawImageNine(c,g,l,r,y||null)};a.Canvas.prototype.drawImageRect=function(c,g,l,r,y){a.Od(this.Md);U(g,ja);U(l,Pa);this._drawImageRect(c,ja,Pa,r,!!y)};a.Canvas.prototype.drawImageRectCubic=function(c,g,l,r,y,C){a.Od(this.Md);U(g,ja);U(l,Pa);this._drawImageRectCubic(c,ja,Pa,r,y,C||null)};a.Canvas.prototype.drawImageRectOptions=function(c,g,l,r,y,C){a.Od(this.Md);U(g,ja);U(l,Pa);this._drawImageRectOptions(c,ja,Pa,r,y,C||null)};a.Canvas.prototype.drawLine= function(c,g,l,r,y){a.Od(this.Md);this._drawLine(c,g,l,r,y)};a.Canvas.prototype.drawOval=function(c,g){a.Od(this.Md);c=U(c);this._drawOval(c,g)};a.Canvas.prototype.drawPaint=function(c){a.Od(this.Md);this._drawPaint(c)};a.Canvas.prototype.drawParagraph=function(c,g,l){a.Od(this.Md);this._drawParagraph(c,g,l)};a.Canvas.prototype.drawPatch=function(c,g,l,r,y){if(24>c.length)throw"Need 12 cubic points";if(g&&4>g.length)throw"Need 4 colors";if(l&&8>l.length)throw"Need 4 shader coordinates";a.Od(this.Md); const C=v(c,"HEAPF32"),J=g?v(m(g),"HEAPU32"):V,Q=l?v(l,"HEAPF32"):V;r||(r=a.BlendMode.Modulate);this._drawPatch(C,J,Q,r,y);q(Q,l);q(J,g);q(C,c)};a.Canvas.prototype.drawPath=function(c,g){a.Od(this.Md);this._drawPath(c,g)};a.Canvas.prototype.drawPicture=function(c){a.Od(this.Md);this._drawPicture(c)};a.Canvas.prototype.drawPoints=function(c,g,l){a.Od(this.Md);var r=v(g,"HEAPF32");this._drawPoints(c,r,g.length/2,l);q(r,g)};a.Canvas.prototype.drawRRect=function(c,g){a.Od(this.Md);c=ra(c);this._drawRRect(c, g)};a.Canvas.prototype.drawRect=function(c,g){a.Od(this.Md);c=U(c);this._drawRect(c,g)};a.Canvas.prototype.drawRect4f=function(c,g,l,r,y){a.Od(this.Md);this._drawRect4f(c,g,l,r,y)};a.Canvas.prototype.drawShadow=function(c,g,l,r,y,C,J){a.Od(this.Md);var Q=v(y,"HEAPF32"),O=v(C,"HEAPF32");g=v(g,"HEAPF32",Yb);l=v(l,"HEAPF32",Zb);this._drawShadow(c,g,l,r,Q,O,J);q(Q,y);q(O,C)};a.getShadowLocalBounds=function(c,g,l,r,y,C,J){c=I(c);l=v(l,"HEAPF32",Yb);r=v(r,"HEAPF32",Zb);if(!this._getShadowLocalBounds(c, g,l,r,y,C,ja))return null;g=Ha.toTypedArray();return J?(J.set(g),J):g.slice()};a.Canvas.prototype.drawTextBlob=function(c,g,l,r){a.Od(this.Md);this._drawTextBlob(c,g,l,r)};a.Canvas.prototype.drawVertices=function(c,g,l){a.Od(this.Md);this._drawVertices(c,g,l)};a.Canvas.prototype.getDeviceClipBounds=function(c){this._getDeviceClipBounds(xb);var g=$b.toTypedArray();c?c.set(g):c=g.slice();return c};a.Canvas.prototype.getLocalToDevice=function(){this._getLocalToDevice(ab);for(var c=ab,g=Array(16),l=0;16> l;l++)g[l]=a.HEAPF32[c/4+l];return g};a.Canvas.prototype.getTotalMatrix=function(){this._getTotalMatrix(Oa);for(var c=Array(9),g=0;9>g;g++)c[g]=a.HEAPF32[Oa/4+g];return c};a.Canvas.prototype.makeSurface=function(c){c=this._makeSurface(c);c.Md=this.Md;return c};a.Canvas.prototype.readPixels=function(c,g,l,r,y){a.Od(this.Md);return e(this,c,g,l,r,y)};a.Canvas.prototype.saveLayer=function(c,g,l,r){g=U(g);return this._saveLayer(c||null,g,l||null,r||0)};a.Canvas.prototype.writePixels=function(c,g,l,r, y,C,J,Q){if(c.byteLength%(g*l))throw"pixels length must be a multiple of the srcWidth * srcHeight";a.Od(this.Md);var O=c.byteLength/(g*l);C=C||a.AlphaType.Unpremul;J=J||a.ColorType.RGBA_8888;Q=Q||a.ColorSpace.SRGB;var W=O*g;O=v(c,"HEAPU8");g=this._writePixels({width:g,height:l,colorType:J,alphaType:C,colorSpace:Q},O,W,r,y);q(O,c);return g};a.ColorFilter.MakeBlend=function(c,g,l){c=z(c);l=l||a.ColorSpace.SRGB;return a.ColorFilter._MakeBlend(c,g,l)};a.ColorFilter.MakeMatrix=function(c){if(!c||20!== c.length)throw"invalid color matrix";var g=v(c,"HEAPF32"),l=a.ColorFilter._makeMatrix(g);q(g,c);return l};a.ContourMeasure.prototype.getPosTan=function(c,g){this._getPosTan(c,ja);c=Ha.toTypedArray();return g?(g.set(c),g):c.slice()};a.ImageFilter.MakeDropShadow=function(c,g,l,r,y,C){y=z(y,Ua);return a.ImageFilter._MakeDropShadow(c,g,l,r,y,C)};a.ImageFilter.MakeDropShadowOnly=function(c,g,l,r,y,C){y=z(y,Ua);return a.ImageFilter._MakeDropShadowOnly(c,g,l,r,y,C)};a.ImageFilter.MakeImage=function(c,g, l,r){l=U(l,ja);r=U(r,Pa);if("B"in g&&"C"in g)return a.ImageFilter._MakeImageCubic(c,g.B,g.C,l,r);const y=g.filter;let C=a.MipmapMode.None;"mipmap"in g&&(C=g.mipmap);return a.ImageFilter._MakeImageOptions(c,y,C,l,r)};a.ImageFilter.MakeMatrixTransform=function(c,g,l){c=I(c);if("B"in g&&"C"in g)return a.ImageFilter._MakeMatrixTransformCubic(c,g.B,g.C,l);const r=g.filter;let y=a.MipmapMode.None;"mipmap"in g&&(y=g.mipmap);return a.ImageFilter._MakeMatrixTransformOptions(c,r,y,l)};a.Paint.prototype.getColor= function(){this._getColor(Ua);return T(Ua)};a.Paint.prototype.setColor=function(c,g){g=g||null;c=z(c);this._setColor(c,g)};a.Paint.prototype.setColorComponents=function(c,g,l,r,y){y=y||null;c=N(c,g,l,r);this._setColor(c,y)};a.Path.prototype.getPoint=function(c,g){this._getPoint(c,ja);c=Ha.toTypedArray();return g?(g[0]=c[0],g[1]=c[1],g):c.slice(0,2)};a.Picture.prototype.makeShader=function(c,g,l,r,y){r=I(r);y=U(y);return this._makeShader(c,g,l,r,y)};a.PictureRecorder.prototype.beginRecording=function(c){c= U(c);return this._beginRecording(c)};a.Surface.prototype.getCanvas=function(){var c=this._getCanvas();c.Md=this.Md;return c};a.Surface.prototype.makeImageSnapshot=function(c){a.Od(this.Md);c=v(c,"HEAP32",xb);return this._makeImageSnapshot(c)};a.Surface.prototype.makeSurface=function(c){a.Od(this.Md);c=this._makeSurface(c);c.Md=this.Md;return c};a.Surface.prototype.Df=function(c,g){this.He||(this.He=this.getCanvas());requestAnimationFrame(function(){a.Od(this.Md);c(this.He);this.flush(g)}.bind(this))}; a.Surface.prototype.requestAnimationFrame||(a.Surface.prototype.requestAnimationFrame=a.Surface.prototype.Df);a.Surface.prototype.zf=function(c,g){this.He||(this.He=this.getCanvas());requestAnimationFrame(function(){a.Od(this.Md);c(this.He);this.flush(g);this.dispose()}.bind(this))};a.Surface.prototype.drawOnce||(a.Surface.prototype.drawOnce=a.Surface.prototype.zf);a.PathEffect.MakeDash=function(c,g){g||(g=0);if(!c.length||1===c.length%2)throw"Intervals array must have even length";var l=v(c,"HEAPF32"); g=a.PathEffect._MakeDash(l,c.length,g);q(l,c);return g};a.PathEffect.MakeLine2D=function(c,g){g=I(g);return a.PathEffect._MakeLine2D(c,g)};a.PathEffect.MakePath2D=function(c,g){c=I(c);return a.PathEffect._MakePath2D(c,g)};a.Shader.MakeColor=function(c,g){g=g||null;c=z(c);return a.Shader._MakeColor(c,g)};a.Shader.Blend=a.Shader.MakeBlend;a.Shader.Color=a.Shader.MakeColor;a.Shader.MakeLinearGradient=function(c,g,l,r,y,C,J,Q){Q=Q||null;var O=D(l),W=v(r,"HEAPF32");J=J||0;C=I(C);var t=Ha.toTypedArray(); t.set(c);t.set(g,2);c=a.Shader._MakeLinearGradient(ja,O.ce,O.colorType,W,O.count,y,J,C,Q);q(O.ce,l);r&&q(W,r);return c};a.Shader.MakeRadialGradient=function(c,g,l,r,y,C,J,Q){Q=Q||null;var O=D(l),W=v(r,"HEAPF32");J=J||0;C=I(C);c=a.Shader._MakeRadialGradient(c[0],c[1],g,O.ce,O.colorType,W,O.count,y,J,C,Q);q(O.ce,l);r&&q(W,r);return c};a.Shader.MakeSweepGradient=function(c,g,l,r,y,C,J,Q,O,W){W=W||null;var t=D(l),F=v(r,"HEAPF32");J=J||0;Q=Q||0;O=O||360;C=I(C);c=a.Shader._MakeSweepGradient(c,g,t.ce,t.colorType, F,t.count,y,Q,O,J,C,W);q(t.ce,l);r&&q(F,r);return c};a.Shader.MakeTwoPointConicalGradient=function(c,g,l,r,y,C,J,Q,O,W){W=W||null;var t=D(y),F=v(C,"HEAPF32");O=O||0;Q=I(Q);var P=Ha.toTypedArray();P.set(c);P.set(l,2);c=a.Shader._MakeTwoPointConicalGradient(ja,g,r,t.ce,t.colorType,F,t.count,J,O,Q,W);q(t.ce,y);C&&q(F,C);return c};a.Vertices.prototype.bounds=function(c){this._bounds(ja);var g=Ha.toTypedArray();return c?(c.set(g),c):g.slice()};a.Vd&&a.Vd.forEach(function(c){c()})};a.computeTonalColors= function(e){var c=v(e.ambient,"HEAPF32"),g=v(e.spot,"HEAPF32");this._computeTonalColors(c,g);var l={ambient:T(c),spot:T(g)};q(c,e.ambient);q(g,e.spot);return l};a.LTRBRect=function(e,c,g,l){return Float32Array.of(e,c,g,l)};a.XYWHRect=function(e,c,g,l){return Float32Array.of(e,c,e+g,c+l)};a.LTRBiRect=function(e,c,g,l){return Int32Array.of(e,c,g,l)};a.XYWHiRect=function(e,c,g,l){return Int32Array.of(e,c,e+g,c+l)};a.RRectXY=function(e,c,g){return Float32Array.of(e[0],e[1],e[2],e[3],c,g,c,g,c,g,c,g)}; a.MakeAnimatedImageFromEncoded=function(e){e=new Uint8Array(e);var c=a._malloc(e.byteLength);a.HEAPU8.set(e,c);return(e=a._decodeAnimatedImage(c,e.byteLength))?e:null};a.MakeImageFromEncoded=function(e){e=new Uint8Array(e);var c=a._malloc(e.byteLength);a.HEAPU8.set(e,c);return(e=a._decodeImage(c,e.byteLength))?e:null};var ib=null;a.MakeImageFromCanvasImageSource=function(e){var c=e.width,g=e.height;ib||(ib=document.createElement("canvas"));ib.width=c;ib.height=g;var l=ib.getContext("2d",{wg:!0}); l.drawImage(e,0,0);e=l.getImageData(0,0,c,g);return a.MakeImage({width:c,height:g,alphaType:a.AlphaType.Unpremul,colorType:a.ColorType.RGBA_8888,colorSpace:a.ColorSpace.SRGB},e.data,4*c)};a.MakeImage=function(e,c,g){var l=a._malloc(c.length);a.HEAPU8.set(c,l);return a._MakeImage(e,l,c.length,g)};a.MakeVertices=function(e,c,g,l,r,y){var C=r&&r.length||0,J=0;g&&g.length&&(J|=1);l&&l.length&&(J|=2);void 0===y||y||(J|=4);e=new a._VerticesBuilder(e,c.length/2,C,J);v(c,"HEAPF32",e.positions());e.texCoords()&& v(g,"HEAPF32",e.texCoords());e.colors()&&v(m(l),"HEAPU32",e.colors());e.indices()&&v(r,"HEAPU16",e.indices());return e.detach()};a.Matrix={};a.Matrix.identity=function(){return d(3)};a.Matrix.invert=function(e){var c=e[0]*e[4]*e[8]+e[1]*e[5]*e[6]+e[2]*e[3]*e[7]-e[2]*e[4]*e[6]-e[1]*e[3]*e[8]-e[0]*e[5]*e[7];return c?[(e[4]*e[8]-e[5]*e[7])/c,(e[2]*e[7]-e[1]*e[8])/c,(e[1]*e[5]-e[2]*e[4])/c,(e[5]*e[6]-e[3]*e[8])/c,(e[0]*e[8]-e[2]*e[6])/c,(e[2]*e[3]-e[0]*e[5])/c,(e[3]*e[7]-e[4]*e[6])/c,(e[1]*e[6]-e[0]* e[7])/c,(e[0]*e[4]-e[1]*e[3])/c]:null};a.Matrix.mapPoints=function(e,c){for(var g=0;gr;r+=5){for(var y=0;4>y;y++)g[l++]=e[r]*c[y]+e[r+1]*c[y+5]+e[r+2]*c[y+10]+e[r+3]*c[y+15];g[l++]=e[r]*c[4]+e[r+1]*c[9]+e[r+2]*c[14]+e[r+3]*c[19]+e[r+4]}return g};(function(e){e.Vd=e.Vd||[];e.Vd.push(function(){function c(t){if(!t||!t.length)return[];for(var F=[],P=0;Pc)return a._free(e),null;r=new Uint16Array(a.HEAPU8.buffer,e,c);if(g)return g.set(r),a._free(e),g;g=Uint16Array.from(r);a._free(e);return g};a.Font.prototype.getGlyphIntercepts=function(e,c,g,l){var r=v(e,"HEAPU16"),y=v(c,"HEAPF32");return this._getGlyphIntercepts(r,e.length,!(e&&e._ck),y,c.length,!(c&&c._ck),g,l)};a.Font.prototype.getGlyphWidths=function(e,c,g){var l= v(e,"HEAPU16"),r=a._malloc(4*e.length);this._getGlyphWidthBounds(l,e.length,r,V,c||null);c=new Float32Array(a.HEAPU8.buffer,r,e.length);q(l,e);if(g)return g.set(c),a._free(r),g;e=Float32Array.from(c);a._free(r);return e};a.FontMgr.FromData=function(){if(!arguments.length)return null;var e=arguments;1===e.length&&Array.isArray(e[0])&&(e=arguments[0]);if(!e.length)return null;for(var c=[],g=[],l=0;lc)return a._free(e),null;r=new Uint16Array(a.HEAPU8.buffer,e,c);if(g)return g.set(r),a._free(e), g;g=Uint16Array.from(r);a._free(e);return g};a.TextBlob.MakeOnPath=function(e,c,g,l){if(e&&e.length&&c&&c.countPoints()){if(1===c.countPoints())return this.MakeFromText(e,g);l||(l=0);var r=g.getGlyphIDs(e);r=g.getGlyphWidths(r);var y=[];c=new a.ContourMeasureIter(c,!1,1);for(var C=c.next(),J=new Float32Array(4),Q=0;QC.length()){C.delete();C=c.next();if(!C){e=e.substring(0,Q);break}l=O/2}C.getPosTan(l,J);var W=J[2],t=J[3];y.push(W,t,J[0]-O/2*W,J[1]-O/2*t);l+= O/2}e=this.MakeFromRSXform(e,y,g);C&&C.delete();c.delete();return e}};a.TextBlob.MakeFromRSXform=function(e,c,g){var l=oa(e)+1,r=a._malloc(l);pa(e,K,r,l);e=v(c,"HEAPF32");g=a.TextBlob._MakeFromRSXform(r,l-1,e,g);a._free(r);return g?g:null};a.TextBlob.MakeFromRSXformGlyphs=function(e,c,g){var l=v(e,"HEAPU16");c=v(c,"HEAPF32");g=a.TextBlob._MakeFromRSXformGlyphs(l,2*e.length,c,g);q(l,e);return g?g:null};a.TextBlob.MakeFromGlyphs=function(e,c){var g=v(e,"HEAPU16");c=a.TextBlob._MakeFromGlyphs(g,2*e.length, c);q(g,e);return c?c:null};a.TextBlob.MakeFromText=function(e,c){var g=oa(e)+1,l=a._malloc(g);pa(e,K,l,g);e=a.TextBlob._MakeFromText(l,g-1,c);a._free(l);return e?e:null};a.MallocGlyphIDs=function(e){return a.Malloc(Uint16Array,e)}});a.Vd=a.Vd||[];a.Vd.push(function(){a.MakePicture=function(e){e=new Uint8Array(e);var c=a._malloc(e.byteLength);a.HEAPU8.set(e,c);return(e=a._MakePicture(c,e.byteLength))?e:null}});(function(){function e(H){for(var k=0;kk||1=k||!k||(this.Ke=k,this.Qd.setStrokeWidth(k))}});Object.defineProperty(this,"miterLimit",{enumerable:!0,get:function(){return this.Qd.getStrokeMiter()},set:function(k){0>=k||!k||this.Qd.setStrokeMiter(k)}});Object.defineProperty(this,"shadowBlur",{enumerable:!0, get:function(){return this.we},set:function(k){0>k||!isFinite(k)||(this.we=k)}});Object.defineProperty(this,"shadowColor",{enumerable:!0,get:function(){return c(this.Je)},set:function(k){this.Je=g(k)}});Object.defineProperty(this,"shadowOffsetX",{enumerable:!0,get:function(){return this.xe},set:function(k){isFinite(k)&&(this.xe=k)}});Object.defineProperty(this,"shadowOffsetY",{enumerable:!0,get:function(){return this.ye},set:function(k){isFinite(k)&&(this.ye=k)}});Object.defineProperty(this,"strokeStyle", {enumerable:!0,get:function(){return c(this.he)},set:function(k){"string"===typeof k?this.he=g(k):k.ue&&(this.he=k)}});this.arc=function(k,p,A,B,E,G){F(this.Sd,k,p,A,A,0,B,E,G)};this.arcTo=function(k,p,A,B,E){O(this.Sd,k,p,A,B,E)};this.beginPath=function(){this.Sd.delete();this.Sd=new a.Path};this.bezierCurveTo=function(k,p,A,B,E,G){var L=this.Sd;e([k,p,A,B,E,G])&&(L.isEmpty()&&L.moveTo(k,p),L.cubicTo(k,p,A,B,E,G))};this.clearRect=function(k,p,A,B){this.Qd.setStyle(a.PaintStyle.Fill);this.Qd.setBlendMode(a.BlendMode.Clear); this.Nd.drawRect(a.XYWHRect(k,p,A,B),this.Qd);this.Qd.setBlendMode(this.Pd)};this.clip=function(k,p){"string"===typeof k?(p=k,k=this.Sd):k&&k.Ze&&(k=k.Wd);k||(k=this.Sd);k=k.copy();p&&"evenodd"===p.toLowerCase()?k.setFillType(a.FillType.EvenOdd):k.setFillType(a.FillType.Winding);this.Nd.clipPath(k,a.ClipOp.Intersect,!0);k.delete()};this.closePath=function(){W(this.Sd)};this.createImageData=function(){if(1===arguments.length){var k=arguments[0];return new J(new Uint8ClampedArray(4*k.width*k.height), k.width,k.height)}if(2===arguments.length){k=arguments[0];var p=arguments[1];return new J(new Uint8ClampedArray(4*k*p),k,p)}throw"createImageData expects 1 or 2 arguments, got "+arguments.length;};this.createLinearGradient=function(k,p,A,B){if(e(arguments)){var E=new Q(k,p,A,B);this.Ce.push(E);return E}};this.createPattern=function(k,p){k=new ha(k,p);this.Ce.push(k);return k};this.createRadialGradient=function(k,p,A,B,E,G){if(e(arguments)){var L=new la(k,p,A,B,E,G);this.Ce.push(L);return L}};this.drawImage= function(k){k instanceof C&&(k=k.tf());var p=this.Pe();if(3===arguments.length||5===arguments.length)var A=a.XYWHRect(arguments[1],arguments[2],arguments[3]||k.width(),arguments[4]||k.height()),B=a.XYWHRect(0,0,k.width(),k.height());else if(9===arguments.length)A=a.XYWHRect(arguments[5],arguments[6],arguments[7],arguments[8]),B=a.XYWHRect(arguments[1],arguments[2],arguments[3],arguments[4]);else throw"invalid number of args for drawImage, need 3, 5, or 9; got "+arguments.length;this.Nd.drawImageRect(k, B,A,p,!1);p.dispose()};this.ellipse=function(k,p,A,B,E,G,L,ca){F(this.Sd,k,p,A,B,E,G,L,ca)};this.Pe=function(){var k=this.Qd.copy();k.setStyle(a.PaintStyle.Fill);if(f(this.be)){var p=a.multiplyByAlpha(this.be,this.ke);k.setColor(p)}else p=this.be.ue(this.Ud),k.setColor(a.Color(0,0,0,this.ke)),k.setShader(p);k.dispose=function(){this.delete()};return k};this.fill=function(k,p){"string"===typeof k?(p=k,k=this.Sd):k&&k.Ze&&(k=k.Wd);if("evenodd"===p)this.Sd.setFillType(a.FillType.EvenOdd);else{if("nonzero"!== p&&p)throw"invalid fill rule";this.Sd.setFillType(a.FillType.Winding)}k||(k=this.Sd);p=this.Pe();var A=this.ze(p);A&&(this.Nd.save(),this.se(),this.Nd.drawPath(k,A),this.Nd.restore(),A.dispose());this.Nd.drawPath(k,p);p.dispose()};this.fillRect=function(k,p,A,B){var E=this.Pe(),G=this.ze(E);G&&(this.Nd.save(),this.se(),this.Nd.drawRect(a.XYWHRect(k,p,A,B),G),this.Nd.restore(),G.dispose());this.Nd.drawRect(a.XYWHRect(k,p,A,B),E);E.dispose()};this.fillText=function(k,p,A){var B=this.Pe();k=a.TextBlob.MakeFromText(k, this.ne);var E=this.ze(B);E&&(this.Nd.save(),this.se(),this.Nd.drawTextBlob(k,p,A,E),this.Nd.restore(),E.dispose());this.Nd.drawTextBlob(k,p,A,B);k.delete();B.dispose()};this.getImageData=function(k,p,A,B){return(k=this.Nd.readPixels(k,p,{width:A,height:B,colorType:a.ColorType.RGBA_8888,alphaType:a.AlphaType.Unpremul,colorSpace:a.ColorSpace.SRGB}))?new J(new Uint8ClampedArray(k.buffer),A,B):null};this.getLineDash=function(){return this.ve.slice()};this.nf=function(k){var p=a.Matrix.invert(this.Ud); a.Matrix.mapPoints(p,k);return k};this.isPointInPath=function(k,p,A){var B=arguments;if(3===B.length)var E=this.Sd;else if(4===B.length)E=B[0],k=B[1],p=B[2],A=B[3];else throw"invalid arg count, need 3 or 4, got "+B.length;if(!isFinite(k)||!isFinite(p))return!1;A=A||"nonzero";if("nonzero"!==A&&"evenodd"!==A)return!1;B=this.nf([k,p]);k=B[0];p=B[1];E.setFillType("nonzero"===A?a.FillType.Winding:a.FillType.EvenOdd);return E.contains(k,p)};this.isPointInStroke=function(k,p){var A=arguments;if(2===A.length)var B= this.Sd;else if(3===A.length)B=A[0],k=A[1],p=A[2];else throw"invalid arg count, need 2 or 3, got "+A.length;if(!isFinite(k)||!isFinite(p))return!1;A=this.nf([k,p]);k=A[0];p=A[1];B=B.copy();B.setFillType(a.FillType.Winding);B.stroke({width:this.lineWidth,miter_limit:this.miterLimit,cap:this.Qd.getStrokeCap(),join:this.Qd.getStrokeJoin(),precision:.3});A=B.contains(k,p);B.delete();return A};this.lineTo=function(k,p){P(this.Sd,k,p)};this.measureText=function(k){k=this.ne.getGlyphIDs(k);k=this.ne.getGlyphWidths(k); let p=0;for(const A of k)p+=A;return{width:p}};this.moveTo=function(k,p){var A=this.Sd;e([k,p])&&A.moveTo(k,p)};this.putImageData=function(k,p,A,B,E,G,L){if(e([p,A,B,E,G,L]))if(void 0===B)this.Nd.writePixels(k.data,k.width,k.height,p,A);else if(B=B||0,E=E||0,G=G||k.width,L=L||k.height,0>G&&(B+=G,G=Math.abs(G)),0>L&&(E+=L,L=Math.abs(L)),0>B&&(G+=B,B=0),0>E&&(L+=E,E=0),!(0>=G||0>=L)){k=a.MakeImage({width:k.width,height:k.height,alphaType:a.AlphaType.Unpremul,colorType:a.ColorType.RGBA_8888,colorSpace:a.ColorSpace.SRGB}, k.data,4*k.width);var ca=a.XYWHRect(B,E,G,L);p=a.XYWHRect(p+B,A+E,G,L);A=a.Matrix.invert(this.Ud);this.Nd.save();this.Nd.concat(A);this.Nd.drawImageRect(k,ca,p,null,!1);this.Nd.restore();k.delete()}};this.quadraticCurveTo=function(k,p,A,B){var E=this.Sd;e([k,p,A,B])&&(E.isEmpty()&&E.moveTo(k,p),E.quadTo(k,p,A,B))};this.rect=function(k,p,A,B){var E=this.Sd;k=a.XYWHRect(k,p,A,B);e(k)&&E.addRect(k)};this.resetTransform=function(){this.Sd.transform(this.Ud);var k=a.Matrix.invert(this.Ud);this.Nd.concat(k); this.Ud=this.Nd.getTotalMatrix()};this.restore=function(){var k=this.mf.pop();if(k){var p=a.Matrix.multiply(this.Ud,a.Matrix.invert(k.Gf));this.Sd.transform(p);this.Qd.delete();this.Qd=k.$f;this.ve=k.Yf;this.Ke=k.mg;this.he=k.lg;this.be=k.fs;this.xe=k.jg;this.ye=k.kg;this.we=k.dg;this.Je=k.ig;this.ke=k.Nf;this.Pd=k.Of;this.Ie=k.Zf;this.Qe=k.Mf;this.Nd.restore();this.Ud=this.Nd.getTotalMatrix()}};this.rotate=function(k){if(isFinite(k)){var p=a.Matrix.rotated(-k);this.Sd.transform(p);this.Nd.rotate(k/ Math.PI*180,0,0);this.Ud=this.Nd.getTotalMatrix()}};this.save=function(){if(this.be.te){var k=this.be.te();this.Ce.push(k)}else k=this.be;if(this.he.te){var p=this.he.te();this.Ce.push(p)}else p=this.he;this.mf.push({Gf:this.Ud.slice(),Yf:this.ve.slice(),mg:this.Ke,lg:p,fs:k,jg:this.xe,kg:this.ye,dg:this.we,ig:this.Je,Nf:this.ke,Zf:this.Ie,Of:this.Pd,$f:this.Qd.copy(),Mf:this.Qe});this.Nd.save()};this.scale=function(k,p){if(e(arguments)){var A=a.Matrix.scaled(1/k,1/p);this.Sd.transform(A);this.Nd.scale(k, p);this.Ud=this.Nd.getTotalMatrix()}};this.setLineDash=function(k){for(var p=0;pk[p])return;1===k.length%2&&Array.prototype.push.apply(k,k);this.ve=k};this.setTransform=function(k,p,A,B,E,G){e(arguments)&&(this.resetTransform(),this.transform(k,p,A,B,E,G))};this.se=function(){var k=a.Matrix.invert(this.Ud);this.Nd.concat(k);this.Nd.concat(a.Matrix.translated(this.xe,this.ye));this.Nd.concat(this.Ud)};this.ze=function(k){var p=a.multiplyByAlpha(this.Je,this.ke); if(!a.getColorComponents(p)[3]||!(this.we||this.ye||this.xe))return null;k=k.copy();k.setColor(p);var A=a.MaskFilter.MakeBlur(a.BlurStyle.Normal,this.we/2,!1);k.setMaskFilter(A);k.dispose=function(){A.delete();this.delete()};return k};this.af=function(){var k=this.Qd.copy();k.setStyle(a.PaintStyle.Stroke);if(f(this.he)){var p=a.multiplyByAlpha(this.he,this.ke);k.setColor(p)}else p=this.he.ue(this.Ud),k.setColor(a.Color(0,0,0,this.ke)),k.setShader(p);k.setStrokeWidth(this.Ke);if(this.ve.length){var A= a.PathEffect.MakeDash(this.ve,this.Ie);k.setPathEffect(A)}k.dispose=function(){A&&A.delete();this.delete()};return k};this.stroke=function(k){k=k?k.Wd:this.Sd;var p=this.af(),A=this.ze(p);A&&(this.Nd.save(),this.se(),this.Nd.drawPath(k,A),this.Nd.restore(),A.dispose());this.Nd.drawPath(k,p);p.dispose()};this.strokeRect=function(k,p,A,B){var E=this.af(),G=this.ze(E);G&&(this.Nd.save(),this.se(),this.Nd.drawRect(a.XYWHRect(k,p,A,B),G),this.Nd.restore(),G.dispose());this.Nd.drawRect(a.XYWHRect(k,p,A, B),E);E.dispose()};this.strokeText=function(k,p,A){var B=this.af();k=a.TextBlob.MakeFromText(k,this.ne);var E=this.ze(B);E&&(this.Nd.save(),this.se(),this.Nd.drawTextBlob(k,p,A,E),this.Nd.restore(),E.dispose());this.Nd.drawTextBlob(k,p,A,B);k.delete();B.dispose()};this.translate=function(k,p){if(e(arguments)){var A=a.Matrix.translated(-k,-p);this.Sd.transform(A);this.Nd.translate(k,p);this.Ud=this.Nd.getTotalMatrix()}};this.transform=function(k,p,A,B,E,G){k=[k,A,E,p,B,G,0,0,1];p=a.Matrix.invert(k); this.Sd.transform(p);this.Nd.concat(k);this.Ud=this.Nd.getTotalMatrix()};this.addHitRegion=function(){};this.clearHitRegions=function(){};this.drawFocusIfNeeded=function(){};this.removeHitRegion=function(){};this.scrollPathIntoView=function(){};Object.defineProperty(this,"canvas",{value:null,writable:!1})}function y(H){this.bf=H;this.Md=new r(H.getCanvas());this.Re=[];this.decodeImage=function(k){k=a.MakeImageFromEncoded(k);if(!k)throw"Invalid input";this.Re.push(k);return new C(k)};this.loadFont= function(k,p){k=a.Typeface.MakeFreeTypeFaceFromData(k);if(!k)return null;this.Re.push(k);var A=(p.style||"normal")+"|"+(p.variant||"normal")+"|"+(p.weight||"normal");p=p.family;ba[p]||(ba[p]={"*":k});ba[p][A]=k};this.makePath2D=function(k){k=new X(k);this.Re.push(k.Wd);return k};this.getContext=function(k){return"2d"===k?this.Md:null};this.toDataURL=function(k,p){this.bf.flush();var A=this.bf.makeImageSnapshot();if(A){k=k||"image/png";var B=a.ImageFormat.PNG;"image/jpeg"===k&&(B=a.ImageFormat.JPEG); if(p=A.encodeToBytes(B,p||.92)){A.delete();k="data:"+k+";base64,";if("undefined"!==typeof Buffer)p=Buffer.from(p).toString("base64");else{A=0;B=p.length;for(var E="",G;AB||1B);G++);this.ae.splice(G,0,B);this.de.splice(G,0,E)}};this.te=function(){var B=new Q(H,k,p,A);B.de=this.de.slice();B.ae=this.ae.slice();return B};this.me=function(){this.Yd&&(this.Yd.delete(),this.Yd=null)};this.ue=function(B){var E=[H,k,p,A];a.Matrix.mapPoints(B,E);B=E[0];var G=E[1],L=E[2];E=E[3];this.me();return this.Yd=a.Shader.MakeLinearGradient([B,G],[L,E],this.de,this.ae,a.TileMode.Clamp)}}function O(H, k,p,A,B,E){if(e([k,p,A,B,E])){if(0>E)throw"radii cannot be negative";H.isEmpty()&&H.moveTo(k,p);H.arcToTangent(k,p,A,B,E)}}function W(H){if(!H.isEmpty()){var k=H.getBounds();(k[3]-k[1]||k[2]-k[0])&&H.close()}}function t(H,k,p,A,B,E,G){G=(G-E)/Math.PI*180;E=E/Math.PI*180;k=a.LTRBRect(k-A,p-B,k+A,p+B);1E-5>Math.abs(Math.abs(G)-360)?(p=G/2,H.arcToOval(k,E,p,!1),H.arcToOval(k,E+p,p,!1)):H.arcToOval(k,E,G,!1)}function F(H,k,p,A,B,E,G,L,ca){if(e([k,p,A,B,E,G,L])){if(0>A||0>B)throw"radii cannot be negative"; var da=2*Math.PI,Ia=G%da;0>Ia&&(Ia+=da);var bb=Ia-G;G=Ia;L+=bb;!ca&&L-G>=da?L=G+da:ca&&G-L>=da?L=G-da:!ca&&G>L?L=G+(da-(G-L)%da):ca&&GG||1G);ca++);this.ae.splice(ca,0,G);this.de.splice(ca,0,L)}};this.te=function(){var G=new la(H,k,p,A,B,E);G.de=this.de.slice();G.ae=this.ae.slice();return G};this.me=function(){this.Yd&&(this.Yd.delete(),this.Yd=null)};this.ue=function(G){var L= [H,k,A,B];a.Matrix.mapPoints(G,L);var ca=L[0],da=L[1],Ia=L[2];L=L[3];var bb=(Math.abs(G[0])+Math.abs(G[4]))/2;G=p*bb;bb*=E;this.me();return this.Yd=a.Shader.MakeTwoPointConicalGradient([ca,da],G,[Ia,L],bb,this.de,this.ae,a.TileMode.Clamp)}}a._testing={};var qa={aliceblue:Float32Array.of(.941,.973,1,1),antiquewhite:Float32Array.of(.98,.922,.843,1),aqua:Float32Array.of(0,1,1,1),aquamarine:Float32Array.of(.498,1,.831,1),azure:Float32Array.of(.941,1,1,1),beige:Float32Array.of(.961,.961,.863,1),bisque:Float32Array.of(1, .894,.769,1),black:Float32Array.of(0,0,0,1),blanchedalmond:Float32Array.of(1,.922,.804,1),blue:Float32Array.of(0,0,1,1),blueviolet:Float32Array.of(.541,.169,.886,1),brown:Float32Array.of(.647,.165,.165,1),burlywood:Float32Array.of(.871,.722,.529,1),cadetblue:Float32Array.of(.373,.62,.627,1),chartreuse:Float32Array.of(.498,1,0,1),chocolate:Float32Array.of(.824,.412,.118,1),coral:Float32Array.of(1,.498,.314,1),cornflowerblue:Float32Array.of(.392,.584,.929,1),cornsilk:Float32Array.of(1,.973,.863,1), crimson:Float32Array.of(.863,.078,.235,1),cyan:Float32Array.of(0,1,1,1),darkblue:Float32Array.of(0,0,.545,1),darkcyan:Float32Array.of(0,.545,.545,1),darkgoldenrod:Float32Array.of(.722,.525,.043,1),darkgray:Float32Array.of(.663,.663,.663,1),darkgreen:Float32Array.of(0,.392,0,1),darkgrey:Float32Array.of(.663,.663,.663,1),darkkhaki:Float32Array.of(.741,.718,.42,1),darkmagenta:Float32Array.of(.545,0,.545,1),darkolivegreen:Float32Array.of(.333,.42,.184,1),darkorange:Float32Array.of(1,.549,0,1),darkorchid:Float32Array.of(.6, .196,.8,1),darkred:Float32Array.of(.545,0,0,1),darksalmon:Float32Array.of(.914,.588,.478,1),darkseagreen:Float32Array.of(.561,.737,.561,1),darkslateblue:Float32Array.of(.282,.239,.545,1),darkslategray:Float32Array.of(.184,.31,.31,1),darkslategrey:Float32Array.of(.184,.31,.31,1),darkturquoise:Float32Array.of(0,.808,.82,1),darkviolet:Float32Array.of(.58,0,.827,1),deeppink:Float32Array.of(1,.078,.576,1),deepskyblue:Float32Array.of(0,.749,1,1),dimgray:Float32Array.of(.412,.412,.412,1),dimgrey:Float32Array.of(.412, .412,.412,1),dodgerblue:Float32Array.of(.118,.565,1,1),firebrick:Float32Array.of(.698,.133,.133,1),floralwhite:Float32Array.of(1,.98,.941,1),forestgreen:Float32Array.of(.133,.545,.133,1),fuchsia:Float32Array.of(1,0,1,1),gainsboro:Float32Array.of(.863,.863,.863,1),ghostwhite:Float32Array.of(.973,.973,1,1),gold:Float32Array.of(1,.843,0,1),goldenrod:Float32Array.of(.855,.647,.125,1),gray:Float32Array.of(.502,.502,.502,1),green:Float32Array.of(0,.502,0,1),greenyellow:Float32Array.of(.678,1,.184,1),grey:Float32Array.of(.502, .502,.502,1),honeydew:Float32Array.of(.941,1,.941,1),hotpink:Float32Array.of(1,.412,.706,1),indianred:Float32Array.of(.804,.361,.361,1),indigo:Float32Array.of(.294,0,.51,1),ivory:Float32Array.of(1,1,.941,1),khaki:Float32Array.of(.941,.902,.549,1),lavender:Float32Array.of(.902,.902,.98,1),lavenderblush:Float32Array.of(1,.941,.961,1),lawngreen:Float32Array.of(.486,.988,0,1),lemonchiffon:Float32Array.of(1,.98,.804,1),lightblue:Float32Array.of(.678,.847,.902,1),lightcoral:Float32Array.of(.941,.502,.502, 1),lightcyan:Float32Array.of(.878,1,1,1),lightgoldenrodyellow:Float32Array.of(.98,.98,.824,1),lightgray:Float32Array.of(.827,.827,.827,1),lightgreen:Float32Array.of(.565,.933,.565,1),lightgrey:Float32Array.of(.827,.827,.827,1),lightpink:Float32Array.of(1,.714,.757,1),lightsalmon:Float32Array.of(1,.627,.478,1),lightseagreen:Float32Array.of(.125,.698,.667,1),lightskyblue:Float32Array.of(.529,.808,.98,1),lightslategray:Float32Array.of(.467,.533,.6,1),lightslategrey:Float32Array.of(.467,.533,.6,1),lightsteelblue:Float32Array.of(.69, .769,.871,1),lightyellow:Float32Array.of(1,1,.878,1),lime:Float32Array.of(0,1,0,1),limegreen:Float32Array.of(.196,.804,.196,1),linen:Float32Array.of(.98,.941,.902,1),magenta:Float32Array.of(1,0,1,1),maroon:Float32Array.of(.502,0,0,1),mediumaquamarine:Float32Array.of(.4,.804,.667,1),mediumblue:Float32Array.of(0,0,.804,1),mediumorchid:Float32Array.of(.729,.333,.827,1),mediumpurple:Float32Array.of(.576,.439,.859,1),mediumseagreen:Float32Array.of(.235,.702,.443,1),mediumslateblue:Float32Array.of(.482, .408,.933,1),mediumspringgreen:Float32Array.of(0,.98,.604,1),mediumturquoise:Float32Array.of(.282,.82,.8,1),mediumvioletred:Float32Array.of(.78,.082,.522,1),midnightblue:Float32Array.of(.098,.098,.439,1),mintcream:Float32Array.of(.961,1,.98,1),mistyrose:Float32Array.of(1,.894,.882,1),moccasin:Float32Array.of(1,.894,.71,1),navajowhite:Float32Array.of(1,.871,.678,1),navy:Float32Array.of(0,0,.502,1),oldlace:Float32Array.of(.992,.961,.902,1),olive:Float32Array.of(.502,.502,0,1),olivedrab:Float32Array.of(.42, .557,.137,1),orange:Float32Array.of(1,.647,0,1),orangered:Float32Array.of(1,.271,0,1),orchid:Float32Array.of(.855,.439,.839,1),palegoldenrod:Float32Array.of(.933,.91,.667,1),palegreen:Float32Array.of(.596,.984,.596,1),paleturquoise:Float32Array.of(.686,.933,.933,1),palevioletred:Float32Array.of(.859,.439,.576,1),papayawhip:Float32Array.of(1,.937,.835,1),peachpuff:Float32Array.of(1,.855,.725,1),peru:Float32Array.of(.804,.522,.247,1),pink:Float32Array.of(1,.753,.796,1),plum:Float32Array.of(.867,.627, .867,1),powderblue:Float32Array.of(.69,.878,.902,1),purple:Float32Array.of(.502,0,.502,1),rebeccapurple:Float32Array.of(.4,.2,.6,1),red:Float32Array.of(1,0,0,1),rosybrown:Float32Array.of(.737,.561,.561,1),royalblue:Float32Array.of(.255,.412,.882,1),saddlebrown:Float32Array.of(.545,.271,.075,1),salmon:Float32Array.of(.98,.502,.447,1),sandybrown:Float32Array.of(.957,.643,.376,1),seagreen:Float32Array.of(.18,.545,.341,1),seashell:Float32Array.of(1,.961,.933,1),sienna:Float32Array.of(.627,.322,.176,1), silver:Float32Array.of(.753,.753,.753,1),skyblue:Float32Array.of(.529,.808,.922,1),slateblue:Float32Array.of(.416,.353,.804,1),slategray:Float32Array.of(.439,.502,.565,1),slategrey:Float32Array.of(.439,.502,.565,1),snow:Float32Array.of(1,.98,.98,1),springgreen:Float32Array.of(0,1,.498,1),steelblue:Float32Array.of(.275,.51,.706,1),tan:Float32Array.of(.824,.706,.549,1),teal:Float32Array.of(0,.502,.502,1),thistle:Float32Array.of(.847,.749,.847,1),tomato:Float32Array.of(1,.388,.278,1),transparent:Float32Array.of(0, 0,0,0),turquoise:Float32Array.of(.251,.878,.816,1),violet:Float32Array.of(.933,.51,.933,1),wheat:Float32Array.of(.961,.871,.702,1),white:Float32Array.of(1,1,1,1),whitesmoke:Float32Array.of(.961,.961,.961,1),yellow:Float32Array.of(1,1,0,1),yellowgreen:Float32Array.of(.604,.804,.196,1)};a._testing.parseColor=g;a._testing.colorToString=c;var sa=RegExp("(italic|oblique|normal|)\\s*(small-caps|normal|)\\s*(bold|bolder|lighter|[1-9]00|normal|)\\s*([\\d\\.]+)(px|pt|pc|in|cm|mm|%|em|ex|ch|rem|q)(.+)"),ba= {"Noto Mono":{"*":null},monospace:{"*":null}};a._testing.parseFontString=l;a.MakeCanvas=function(H,k){return(H=a.MakeSurface(H,k))?new y(H):null};a.ImageData=function(){if(2===arguments.length){var H=arguments[0],k=arguments[1];return new J(new Uint8ClampedArray(4*H*k),H,k)}if(3===arguments.length){var p=arguments[0];if(p.prototype.constructor!==Uint8ClampedArray)throw"bytes must be given as a Uint8ClampedArray";H=arguments[1];k=arguments[2];if(p%4)throw"bytes must be given in a multiple of 4";if(p% H)throw"bytes must divide evenly by width";if(k&&k!==p/(4*H))throw"invalid height given";return new J(p,H,p/(4*H))}throw"invalid number of arguments - takes 2 or 3, saw "+arguments.length;}})()})(w);var ta=Object.assign({},w),ua="./this.program",wa=(a,b)=>{throw b;},xa="object"==typeof window,ya="function"==typeof importScripts,za="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,Aa="",Ba,Ca,Da,fs,Ea,Fa; if(za)Aa=ya?require("path").dirname(Aa)+"/":__dirname+"/",Fa=()=>{Ea||(fs=require("fs"),Ea=require("path"))},Ba=function(a,b){Fa();a=Ea.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")},Da=a=>{a=Ba(a,!0);a.buffer||(a=new Uint8Array(a));return a},Ca=(a,b,d)=>{Fa();a=Ea.normalize(a);fs.readFile(a,function(f,h){f?d(f):b(h.buffer)})},1{if(noExitRuntime)throw process.exitCode= a,b;b instanceof Ga||Ja("exiting due to exception: "+b);process.exit(a)},w.inspect=function(){return"[Emscripten Module object]"};else if(xa||ya)ya?Aa=self.location.href:"undefined"!=typeof document&&document.currentScript&&(Aa=document.currentScript.src),_scriptDir&&(Aa=_scriptDir),0!==Aa.indexOf("blob:")?Aa=Aa.substr(0,Aa.replace(/[?#].*/,"").lastIndexOf("/")+1):Aa="",Ba=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},ya&&(Da=a=>{var b=new XMLHttpRequest;b.open("GET", a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),Ca=(a,b,d)=>{var f=new XMLHttpRequest;f.open("GET",a,!0);f.responseType="arraybuffer";f.onload=()=>{200==f.status||0==f.status&&f.response?b(f.response):d()};f.onerror=d;f.send(null)};var Ka=w.print||console.log.bind(console),Ja=w.printErr||console.warn.bind(console);Object.assign(w,ta);ta=null;w.thisProgram&&(ua=w.thisProgram);w.quit&&(wa=w.quit);var La=0,Ma;w.wasmBinary&&(Ma=w.wasmBinary); var noExitRuntime=w.noExitRuntime||!0;"object"!=typeof WebAssembly&&Na("no native wasm support detected");var Qa,Ra=!1,Sa="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0; function Ta(a,b,d){var f=b+d;for(d=b;a[d]&&!(d>=f);)++d;if(16h?f+=String.fromCharCode(h):(h-=65536,f+=String.fromCharCode(55296|h>>10,56320|h&1023))}}else f+=String.fromCharCode(h)}return f}function Va(a,b){return a?Ta(K,a,b):""} function pa(a,b,d,f){if(!(0=u){var n=a.charCodeAt(++m);u=65536+((u&1023)<<10)|n&1023}if(127>=u){if(d>=f)break;b[d++]=u}else{if(2047>=u){if(d+1>=f)break;b[d++]=192|u>>6}else{if(65535>=u){if(d+2>=f)break;b[d++]=224|u>>12}else{if(d+3>=f)break;b[d++]=240|u>>18;b[d++]=128|u>>12&63}b[d++]=128|u>>6&63}b[d++]=128|u&63}}b[d]=0;return d-h} function oa(a){for(var b=0,d=0;d=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++d)&1023);127>=f?++b:b=2047>=f?b+2:65535>=f?b+3:b+4}return b}var Wa="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Xa(a,b){var d=a>>1;for(var f=d+b/2;!(d>=f)&&Ya[d];)++d;d<<=1;if(32=b/2);++f){var h=Za[a+2*f>>1];if(0==h)break;d+=String.fromCharCode(h)}return d} function $a(a,b,d){void 0===d&&(d=2147483647);if(2>d)return 0;d-=2;var f=b;d=d<2*a.length?d/2:a.length;for(var h=0;h>1]=a.charCodeAt(h),b+=2;Za[b>>1]=0;return b-f}function cb(a){return 2*a.length}function db(a,b){for(var d=0,f="";!(d>=b/4);){var h=R[a+4*d>>2];if(0==h)break;++d;65536<=h?(h-=65536,f+=String.fromCharCode(55296|h>>10,56320|h&1023)):f+=String.fromCharCode(h)}return f} function eb(a,b,d){void 0===d&&(d=2147483647);if(4>d)return 0;var f=b;d=f+d-4;for(var h=0;h=m){var u=a.charCodeAt(++h);m=65536+((m&1023)<<10)|u&1023}R[b>>2]=m;b+=4;if(b+4>d)break}R[b>>2]=0;return b-f}function fb(a){for(var b=0,d=0;d=f&&++d;b+=4}return b}var jb,kb,K,Za,Ya,R,lb,S,mb; function nb(){var a=Qa.buffer;jb=a;w.HEAP8=kb=new Int8Array(a);w.HEAP16=Za=new Int16Array(a);w.HEAP32=R=new Int32Array(a);w.HEAPU8=K=new Uint8Array(a);w.HEAPU16=Ya=new Uint16Array(a);w.HEAPU32=lb=new Uint32Array(a);w.HEAPF32=S=new Float32Array(a);w.HEAPF64=mb=new Float64Array(a)}var ob,pb=[],qb=[],rb=[];function sb(){var a=w.preRun.shift();pb.unshift(a)}var tb=0,ub=null,vb=null; function Na(a){if(w.onAbort)w.onAbort(a);a="Aborted("+a+")";Ja(a);Ra=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ea(a);throw a;}function wb(){return yb.startsWith("data:application/octet-stream;base64,")}var yb;yb="canvaskit.wasm";if(!wb()){var zb=yb;yb=w.locateFile?w.locateFile(zb,Aa):Aa+zb}function Ab(){var a=yb;try{if(a==yb&&Ma)return new Uint8Array(Ma);if(Da)return Da(a);throw"both async and sync fetching of the wasm failed";}catch(b){Na(b)}} function Bb(){if(!Ma&&(xa||ya)){if("function"==typeof fetch&&!yb.startsWith("file://"))return fetch(yb,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+yb+"'";return a.arrayBuffer()}).catch(function(){return Ab()});if(Ca)return new Promise(function(a,b){Ca(yb,function(d){a(new Uint8Array(d))},b)})}return Promise.resolve().then(function(){return Ab()})}function Cb(a){for(;0>2])}var Hb={},Ib={},Jb={};function Kb(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function Lb(a,b){a=Kb(a);return function(){null;return b.apply(this,arguments)}} function Mb(a){var b=Error,d=Lb(a,function(f){this.name=a;this.message=f;f=Error(f).stack;void 0!==f&&(this.stack=this.toString()+"\n"+f.replace(/^Error(:[^\n]*)?\n/,""))});d.prototype=Object.create(b.prototype);d.prototype.constructor=d;d.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return d}var Nb=void 0;function Ob(a){throw new Nb(a);} function Pb(a,b,d){function f(n){n=d(n);n.length!==a.length&&Ob("Mismatched type converter count");for(var q=0;q{Ib.hasOwnProperty(n)?h[q]=Ib[n]:(m.push(n),Hb.hasOwnProperty(n)||(Hb[n]=[]),Hb[n].push(()=>{h[q]=Ib[n];++u;u===m.length&&f(h)}))});0===m.length&&f(h)} function Rb(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var Sb=void 0;function Tb(a){for(var b="";K[a];)b+=Sb[K[a++]];return b}var ac=void 0;function Y(a){throw new ac(a);} function Qb(a,b,d={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var f=b.name;a||Y('type "'+f+'" must have a positive integer typeid pointer');if(Ib.hasOwnProperty(a)){if(d.Vf)return;Y("Cannot register type '"+f+"' twice")}Ib[a]=b;delete Jb[a];Hb.hasOwnProperty(a)&&(b=Hb[a],delete Hb[a],b.forEach(h=>h()))}function bc(a){Y(a.Ld.Xd.Rd.name+" instance already deleted")}var cc=!1;function dc(){} function ec(a){--a.count.value;0===a.count.value&&(a.$d?a.fe.le(a.$d):a.Xd.Rd.le(a.Td))}function fc(a,b,d){if(b===d)return a;if(void 0===d.ie)return null;a=fc(a,b,d.ie);return null===a?null:d.Jf(a)}var gc={},hc=[];function ic(){for(;hc.length;){var a=hc.pop();a.Ld.Fe=!1;a["delete"]()}}var jc=void 0,kc={};function lc(a,b){for(void 0===b&&Y("ptr should not be undefined");a.ie;)b=a.Oe(b),a=a.ie;return kc[b]} function mc(a,b){b.Xd&&b.Td||Ob("makeClassHandle requires ptr and ptrType");!!b.fe!==!!b.$d&&Ob("Both smartPtrType and smartPtr must be specified");b.count={value:1};return nc(Object.create(a,{Ld:{value:b}}))}function nc(a){if("undefined"===typeof FinalizationRegistry)return nc=b=>b,a;cc=new FinalizationRegistry(b=>{ec(b.Ld)});nc=b=>{var d=b.Ld;d.$d&&cc.register(b,{Ld:d},b);return b};dc=b=>{cc.unregister(b)};return nc(a)}function oc(){} function pc(a,b,d){if(void 0===a[b].Zd){var f=a[b];a[b]=function(){a[b].Zd.hasOwnProperty(arguments.length)||Y("Function '"+d+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b].Zd+")!");return a[b].Zd[arguments.length].apply(this,arguments)};a[b].Zd=[];a[b].Zd[f.De]=f}} function qc(a,b,d){w.hasOwnProperty(a)?((void 0===d||void 0!==w[a].Zd&&void 0!==w[a].Zd[d])&&Y("Cannot register public name '"+a+"' twice"),pc(w,a,a),w.hasOwnProperty(d)&&Y("Cannot register multiple overloads of a function with the same number of arguments ("+d+")!"),w[a].Zd[d]=b):(w[a]=b,void 0!==d&&(w[a].tg=d))}function rc(a,b,d,f,h,m,u,n){this.name=a;this.constructor=b;this.Ge=d;this.le=f;this.ie=h;this.Pf=m;this.Oe=u;this.Jf=n;this.bg=[]} function sc(a,b,d){for(;b!==d;)b.Oe||Y("Expected null or instance of "+d.name+", got an instance of "+b.name),a=b.Oe(a),b=b.ie;return a}function tc(a,b){if(null===b)return this.ff&&Y("null is not a valid "+this.name),0;b.Ld||Y('Cannot pass "'+uc(b)+'" as a '+this.name);b.Ld.Td||Y("Cannot pass deleted object as a pointer of type "+this.name);return sc(b.Ld.Td,b.Ld.Xd.Rd,this.Rd)} function vc(a,b){if(null===b){this.ff&&Y("null is not a valid "+this.name);if(this.Te){var d=this.gf();null!==a&&a.push(this.le,d);return d}return 0}b.Ld||Y('Cannot pass "'+uc(b)+'" as a '+this.name);b.Ld.Td||Y("Cannot pass deleted object as a pointer of type "+this.name);!this.Se&&b.Ld.Xd.Se&&Y("Cannot convert argument of type "+(b.Ld.fe?b.Ld.fe.name:b.Ld.Xd.name)+" to parameter type "+this.name);d=sc(b.Ld.Td,b.Ld.Xd.Rd,this.Rd);if(this.Te)switch(void 0===b.Ld.$d&&Y("Passing raw pointer to smart pointer is illegal"), this.hg){case 0:b.Ld.fe===this?d=b.Ld.$d:Y("Cannot convert argument of type "+(b.Ld.fe?b.Ld.fe.name:b.Ld.Xd.name)+" to parameter type "+this.name);break;case 1:d=b.Ld.$d;break;case 2:if(b.Ld.fe===this)d=b.Ld.$d;else{var f=b.clone();d=this.cg(d,wc(function(){f["delete"]()}));null!==a&&a.push(this.le,d)}break;default:Y("Unsupporting sharing policy")}return d} function xc(a,b){if(null===b)return this.ff&&Y("null is not a valid "+this.name),0;b.Ld||Y('Cannot pass "'+uc(b)+'" as a '+this.name);b.Ld.Td||Y("Cannot pass deleted object as a pointer of type "+this.name);b.Ld.Xd.Se&&Y("Cannot convert argument of type "+b.Ld.Xd.name+" to parameter type "+this.name);return sc(b.Ld.Td,b.Ld.Xd.Rd,this.Rd)} function yc(a,b,d,f,h,m,u,n,q,v,D){this.name=a;this.Rd=b;this.ff=d;this.Se=f;this.Te=h;this.ag=m;this.hg=u;this.vf=n;this.gf=q;this.cg=v;this.le=D;h||void 0!==b.ie?this.toWireType=vc:(this.toWireType=f?tc:xc,this.ee=null)}function zc(a,b,d){w.hasOwnProperty(a)||Ob("Replacing nonexistant public symbol");void 0!==w[a].Zd&&void 0!==d?w[a].Zd[d]=b:(w[a]=b,w[a].De=d)} function Ac(a,b){var d=[];return function(){d.length=0;Object.assign(d,arguments);if(a.includes("j")){var f=w["dynCall_"+a];f=d&&d.length?f.apply(null,[b].concat(d)):f.call(null,b)}else f=Db(b).apply(null,d);return f}}function Bc(a,b){a=Tb(a);var d=a.includes("j")?Ac(a,b):Db(b);"function"!=typeof d&&Y("unknown function pointer with signature "+a+": "+b);return d}var Ic=void 0;function Jc(a){a=Kc(a);var b=Tb(a);Lc(a);return b} function Mc(a,b){function d(m){h[m]||Ib[m]||(Jb[m]?Jb[m].forEach(d):(f.push(m),h[m]=!0))}var f=[],h={};b.forEach(d);throw new Ic(a+": "+f.map(Jc).join([", "]));} function Nc(a,b,d,f,h){var m=b.length;2>m&&Y("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=null!==b[1]&&null!==d,n=!1;for(d=1;d>2]);return d}var Pc=[],Qc=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Rc(a){4{a||Y("Cannot use deleted val. handle = "+a);return Qc[a].value},wc=a=>{switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:var b=Pc.length?Pc.pop():Qc.length;Qc[b]={hf:1,value:a};return b}}; function Tc(a,b,d){switch(b){case 0:return function(f){return this.fromWireType((d?kb:K)[f])};case 1:return function(f){return this.fromWireType((d?Za:Ya)[f>>1])};case 2:return function(f){return this.fromWireType((d?R:lb)[f>>2])};default:throw new TypeError("Unknown integer type: "+a);}}function Uc(a,b){var d=Ib[a];void 0===d&&Y(b+" has unknown type "+Jc(a));return d}function uc(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a} function Vc(a,b){switch(b){case 2:return function(d){return this.fromWireType(S[d>>2])};case 3:return function(d){return this.fromWireType(mb[d>>3])};default:throw new TypeError("Unknown float type: "+a);}} function Wc(a,b,d){switch(b){case 0:return d?function(f){return kb[f]}:function(f){return K[f]};case 1:return d?function(f){return Za[f>>1]}:function(f){return Ya[f>>1]};case 2:return d?function(f){return R[f>>2]}:function(f){return lb[f>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var Xc={};function Yc(a){var b=Xc[a];return void 0===b?Tb(a):b}var Zc=[]; function $c(){function a(b){b.$$$embind_global$$$=b;var d="object"==typeof $$$embind_global$$$&&b.$$$embind_global$$$==b;d||delete b.$$$embind_global$$$;return d}if("object"==typeof globalThis)return globalThis;if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;"object"==typeof global&&a(global)?$$$embind_global$$$=global:"object"==typeof self&&a(self)&&($$$embind_global$$$=self);if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object."); }function ad(a){var b=Zc.length;Zc.push(a);return b}function bd(a,b){for(var d=Array(a),f=0;f>2],"parameter "+f);return d}var cd=[];function dd(a){var b=Array(a+1);return function(d,f,h){b[0]=d;for(var m=0;m>2],"parameter "+m);b[m+1]=u.readValueFromPointer(h);h+=u.argPackAdvance}d=new (d.bind.apply(d,b));return wc(d)}}var ed={},fd;fd=za?()=>{var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:()=>performance.now(); function gd(a){var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=function(d,f){b.vertexAttribDivisorANGLE(d,f)},a.drawArraysInstanced=function(d,f,h,m){b.drawArraysInstancedANGLE(d,f,h,m)},a.drawElementsInstanced=function(d,f,h,m,u){b.drawElementsInstancedANGLE(d,f,h,m,u)})} function hd(a){var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=function(){return b.createVertexArrayOES()},a.deleteVertexArray=function(d){b.deleteVertexArrayOES(d)},a.bindVertexArray=function(d){b.bindVertexArrayOES(d)},a.isVertexArray=function(d){return b.isVertexArrayOES(d)})}function jd(a){var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=function(d,f){b.drawBuffersWEBGL(d,f)})} var kd=1,ld=[],md=[],nd=[],od=[],ia=[],pd=[],qd=[],na=[],rd=[],sd=[],td={},ud={},vd=4;function wd(a){xd||(xd=a)}function fa(a){for(var b=kd++,d=a.length;da.version||!b.rf)b.rf=b.getExtension("EXT_disjoint_timer_query");b.sg=b.getExtension("WEBGL_multi_draw");(b.getSupportedExtensions()||[]).forEach(function(d){d.includes("lose_context")||d.includes("debug")||b.getExtension(d)})}} var x,xd,Cd=[];function Dd(a,b,d,f){for(var h=0;h>2]=u}} function Ed(a,b,d){if(b){var f=void 0;switch(a){case 36346:f=1;break;case 36344:0!=d&&1!=d&&wd(1280);return;case 34814:case 36345:f=0;break;case 34466:var h=Z.getParameter(34467);f=h?h.length:0;break;case 33309:if(2>x.version){wd(1282);return}f=2*(Z.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>x.version){wd(1280);return}f=33307==a?3:0}if(void 0===f)switch(h=Z.getParameter(a),typeof h){case "number":f=h;break;case "boolean":f=h?1:0;break;case "string":wd(1280);return;case "object":if(null=== h)switch(a){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:f=0;break;default:wd(1280);return}else{if(h instanceof Float32Array||h instanceof Uint32Array||h instanceof Int32Array||h instanceof Array){for(a=0;a>2]=h[a];break;case 2:S[b+4*a>>2]=h[a];break;case 4:kb[b+a>>0]=h[a]?1:0}return}try{f=h.name| 0}catch(m){wd(1280);Ja("GL_INVALID_ENUM in glGet"+d+"v: Unknown object returned from WebGL getParameter("+a+")! (error: "+m+")");return}}break;default:wd(1280);Ja("GL_INVALID_ENUM in glGet"+d+"v: Native code calling glGet"+d+"v("+a+") and it returns "+h+" of type "+typeof h+"!");return}switch(d){case 1:d=f;lb[b>>2]=d;lb[b+4>>2]=(d-lb[b>>2])/4294967296;break;case 0:R[b>>2]=f;break;case 2:S[b>>2]=f;break;case 4:kb[b>>0]=f?1:0}}else wd(1281)} function Fd(a){var b=oa(a)+1,d=Gd(b);pa(a,K,d,b);return d}function Hd(a){return"]"==a.slice(-1)&&a.lastIndexOf("[")}function Id(a){a-=5120;return 0==a?kb:1==a?K:2==a?Za:4==a?R:6==a?S:5==a||28922==a||28520==a||30779==a||30782==a?lb:Ya}function Jd(a,b,d,f,h){a=Id(a);var m=31-Math.clz32(a.BYTES_PER_ELEMENT),u=vd;return a.subarray(h>>m,h+f*(d*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*(1<>m)} function Kd(a){var b=Z.Hf;if(b){var d=b.Ne[a];"number"==typeof d&&(b.Ne[a]=d=Z.getUniformLocation(b,b.wf[a]+(0ra?-1:0U-z.getDate())N-=U-z.getDate()+1,z.setDate(1),11>T?z.setMonth(T+1):(z.setMonth(0),z.setFullYear(z.getFullYear()+1));else{z.setDate(z.getDate()+N);break}}T=new Date(z.getFullYear()+1,0,4);N=n(new Date(z.getFullYear(), 0,4));T=n(T);return 0>=u(N,z)?0>=u(T,z)?z.getFullYear()+1:z.getFullYear():z.getFullYear()-1}var v=R[f+40>>2];f={pg:R[f>>2],og:R[f+4>>2],Xe:R[f+8>>2],jf:R[f+12>>2],Ye:R[f+16>>2],qe:R[f+20>>2],je:R[f+24>>2],pe:R[f+28>>2],vg:R[f+32>>2],ng:R[f+36>>2],qg:v?Va(v):""};d=Va(d);v={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y", "%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var D in v)d=d.replace(new RegExp(D,"g"),v[D]);var I="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),M="January February March April May June July August September October November December".split(" ");v={"%a":function(z){return I[z.je].substring(0,3)},"%A":function(z){return I[z.je]},"%b":function(z){return M[z.Ye].substring(0,3)}, "%B":function(z){return M[z.Ye]},"%C":function(z){return m((z.qe+1900)/100|0,2)},"%d":function(z){return m(z.jf,2)},"%e":function(z){return h(z.jf,2," ")},"%g":function(z){return q(z).toString().substring(2)},"%G":function(z){return q(z)},"%H":function(z){return m(z.Xe,2)},"%I":function(z){z=z.Xe;0==z?z=12:12z.Xe?"AM":"PM"},"%S":function(z){return m(z.pg,2)},"%t":function(){return"\t"},"%u":function(z){return z.je||7},"%U":function(z){return m(Math.floor((z.pe+7-z.je)/7),2)},"%V":function(z){var N=Math.floor((z.pe+7-(z.je+6)%7)/7);2>=(z.je+371-z.pe-2)%7&&N++;if(N)53==N&&(T=(z.je+371-z.pe)%7,4==T||3==T&&Rd(z.qe)||(N=1));else{N=52;var T=(z.je+7-z.pe-1)%7;(4==T||5==T&&Rd(z.qe%400-1))&&N++}return m(N,2)},"%w":function(z){return z.je},"%W":function(z){return m(Math.floor((z.pe+ 7-(z.je+6)%7)/7),2)},"%y":function(z){return(z.qe+1900).toString().substring(2)},"%Y":function(z){return z.qe+1900},"%z":function(z){z=z.ng;var N=0<=z;z=Math.abs(z)/60;return(N?"+":"-")+String("0000"+(z/60*100+z%60)).slice(-4)},"%Z":function(z){return z.qg},"%%":function(){return"%"}};d=d.replace(/%%/g,"\x00\x00");for(D in v)d.includes(D)&&(d=d.replace(new RegExp(D,"g"),v[D](f)));d=d.replace(/\0\0/g,"%");D=Vd(d);if(D.length>b)return 0;kb.set(D,a);return D.length-1}Nb=w.InternalError=Mb("InternalError"); for(var Wd=Array(256),Xd=0;256>Xd;++Xd)Wd[Xd]=String.fromCharCode(Xd);Sb=Wd;ac=w.BindingError=Mb("BindingError");oc.prototype.isAliasOf=function(a){if(!(this instanceof oc&&a instanceof oc))return!1;var b=this.Ld.Xd.Rd,d=this.Ld.Td,f=a.Ld.Xd.Rd;for(a=a.Ld.Td;b.ie;)d=b.Oe(d),b=b.ie;for(;f.ie;)a=f.Oe(a),f=f.ie;return b===f&&d===a}; oc.prototype.clone=function(){this.Ld.Td||bc(this);if(this.Ld.Me)return this.Ld.count.value+=1,this;var a=nc,b=Object,d=b.create,f=Object.getPrototypeOf(this),h=this.Ld;a=a(d.call(b,f,{Ld:{value:{count:h.count,Fe:h.Fe,Me:h.Me,Td:h.Td,Xd:h.Xd,$d:h.$d,fe:h.fe}}}));a.Ld.count.value+=1;a.Ld.Fe=!1;return a};oc.prototype["delete"]=function(){this.Ld.Td||bc(this);this.Ld.Fe&&!this.Ld.Me&&Y("Object already scheduled for deletion");dc(this);ec(this.Ld);this.Ld.Me||(this.Ld.$d=void 0,this.Ld.Td=void 0)}; oc.prototype.isDeleted=function(){return!this.Ld.Td};oc.prototype.deleteLater=function(){this.Ld.Td||bc(this);this.Ld.Fe&&!this.Ld.Me&&Y("Object already scheduled for deletion");hc.push(this);1===hc.length&&jc&&jc(ic);this.Ld.Fe=!0;return this};w.getInheritedInstanceCount=function(){return Object.keys(kc).length};w.getLiveInheritedInstances=function(){var a=[],b;for(b in kc)kc.hasOwnProperty(b)&&a.push(kc[b]);return a};w.flushPendingDeletes=ic;w.setDelayFunction=function(a){jc=a;hc.length&&jc&&jc(ic)}; yc.prototype.Qf=function(a){this.vf&&(a=this.vf(a));return a};yc.prototype.pf=function(a){this.le&&this.le(a)};yc.prototype.argPackAdvance=8;yc.prototype.readValueFromPointer=Gb;yc.prototype.deleteObject=function(a){if(null!==a)a["delete"]()}; yc.prototype.fromWireType=function(a){function b(){return this.Te?mc(this.Rd.Ge,{Xd:this.ag,Td:d,fe:this,$d:a}):mc(this.Rd.Ge,{Xd:this,Td:a})}var d=this.Qf(a);if(!d)return this.pf(a),null;var f=lc(this.Rd,d);if(void 0!==f){if(0===f.Ld.count.value)return f.Ld.Td=d,f.Ld.$d=a,f.clone();f=f.clone();this.pf(a);return f}f=this.Rd.Pf(d);f=gc[f];if(!f)return b.call(this);f=this.Se?f.Ff:f.pointerType;var h=fc(d,this.Rd,f.Rd);return null===h?b.call(this):this.Te?mc(f.Rd.Ge,{Xd:f,Td:h,fe:this,$d:a}):mc(f.Rd.Ge, {Xd:f,Td:h})};Ic=w.UnboundTypeError=Mb("UnboundTypeError");w.count_emval_handles=function(){for(var a=0,b=5;bYd;++Yd)Cd.push(Array(Yd));var Zd=new Float32Array(288);for(Yd=0;288>Yd;++Yd)Ld[Yd]=Zd.subarray(0,Yd+1);var $d=new Int32Array(288);for(Yd=0;288>Yd;++Yd)Md[Yd]=$d.subarray(0,Yd+1); function Vd(a){var b=Array(oa(a)+1);pa(a,b,0,b.length);return b} var pe={U:function(){return 0},Bb:function(){},Db:function(){return 0},yb:function(){},zb:function(){},V:function(){},Ab:function(){},D:function(a){var b=Eb[a];delete Eb[a];var d=b.gf,f=b.le,h=b.sf,m=h.map(u=>u.Tf).concat(h.map(u=>u.fg));Pb([a],m,u=>{var n={};h.forEach((q,v)=>{var D=u[v],I=q.Rf,M=q.Sf,z=u[v+h.length],N=q.eg,T=q.gg;n[q.Lf]={read:U=>D.fromWireType(I(M,U)),write:(U,ra)=>{var va=[];N(T,U,z.toWireType(va,ra));Fb(va)}}});return[{name:b.name,fromWireType:function(q){var v={},D;for(D in n)v[D]= n[D].read(q);f(q);return v},toWireType:function(q,v){for(var D in n)if(!(D in v))throw new TypeError('Missing field: "'+D+'"');var I=d();for(D in n)n[D].write(I,v[D]);null!==q&&q.push(f,I);return I},argPackAdvance:8,readValueFromPointer:Gb,ee:f}]})},qb:function(){},Hb:function(a,b,d,f,h){var m=Rb(d);b=Tb(b);Qb(a,{name:b,fromWireType:function(u){return!!u},toWireType:function(u,n){return n?f:h},argPackAdvance:8,readValueFromPointer:function(u){if(1===d)var n=kb;else if(2===d)n=Za;else if(4===d)n= R;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(n[u>>m])},ee:null})},p:function(a,b,d,f,h,m,u,n,q,v,D,I,M){D=Tb(D);m=Bc(h,m);n&&(n=Bc(u,n));v&&(v=Bc(q,v));M=Bc(I,M);var z=Kb(D);qc(z,function(){Mc("Cannot construct "+D+" due to unbound types",[f])});Pb([a,b,d],f?[f]:[],function(N){N=N[0];if(f){var T=N.Rd;var U=T.Ge}else U=oc.prototype;N=Lb(z,function(){if(Object.getPrototypeOf(this)!==ra)throw new ac("Use 'new' to construct "+D);if(void 0===va.oe)throw new ac(D+ " has no accessible constructor");var hb=va.oe[arguments.length];if(void 0===hb)throw new ac("Tried to invoke ctor of "+D+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(va.oe).toString()+") parameters instead!");return hb.apply(this,arguments)});var ra=Object.create(U,{constructor:{value:N}});N.prototype=ra;var va=new rc(D,N,ra,M,T,m,n,v);T=new yc(D,va,!0,!1,!1);U=new yc(D+"*",va,!1,!1,!1);var gb=new yc(D+" const*",va,!1,!0,!1);gc[a]={pointerType:U,Ff:gb};zc(z, N);return[T,U,gb]})},h:function(a,b,d,f,h,m,u){var n=Oc(d,f);b=Tb(b);m=Bc(h,m);Pb([],[a],function(q){function v(){Mc("Cannot call "+D+" due to unbound types",n)}q=q[0];var D=q.name+"."+b;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var I=q.Rd.constructor;void 0===I[b]?(v.De=d-1,I[b]=v):(pc(I,b,D),I[b].Zd[d-1]=v);Pb([],n,function(M){M=[M[0],null].concat(M.slice(1));M=Nc(D,M,null,m,u);void 0===I[b].Zd?(M.De=d-1,I[b]=M):I[b].Zd[d-1]=M;return[]});return[]})},z:function(a,b,d,f,h,m){0{Mc("Cannot construct "+n.name+" due to unbound types",u)};Pb([],u,function(v){v.splice(1,0,null);n.Rd.oe[b-1]=Nc(q,v,null,h,m);return[]}); return[]})},b:function(a,b,d,f,h,m,u,n){var q=Oc(d,f);b=Tb(b);m=Bc(h,m);Pb([],[a],function(v){function D(){Mc("Cannot call "+I+" due to unbound types",q)}v=v[0];var I=v.name+"."+b;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);n&&v.Rd.bg.push(b);var M=v.Rd.Ge,z=M[b];void 0===z||void 0===z.Zd&&z.className!==v.name&&z.De===d-2?(D.De=d-2,D.className=v.name,M[b]=D):(pc(M,b,I),M[b].Zd[d-2]=D);Pb([],q,function(N){N=Nc(I,N,v,m,u);void 0===M[b].Zd?(N.De=d-2,M[b]=N):M[b].Zd[d-2]=N;return[]});return[]})},w:function(a, b,d){a=Tb(a);Pb([],[b],function(f){f=f[0];w[a]=f.fromWireType(d);return[]})},Gb:function(a,b){b=Tb(b);Qb(a,{name:b,fromWireType:function(d){var f=Sc(d);Rc(d);return f},toWireType:function(d,f){return wc(f)},argPackAdvance:8,readValueFromPointer:Gb,ee:null})},n:function(a,b,d,f){function h(){}d=Rb(d);b=Tb(b);h.values={};Qb(a,{name:b,constructor:h,fromWireType:function(m){return this.constructor.values[m]},toWireType:function(m,u){return u.value},argPackAdvance:8,readValueFromPointer:Tc(b,d,f),ee:null}); qc(b,h)},e:function(a,b,d){var f=Uc(a,"enum");b=Tb(b);a=f.constructor;f=Object.create(f.constructor.prototype,{value:{value:d},constructor:{value:Lb(f.name+"_"+b,function(){})}});a.values[d]=f;a[b]=f},Y:function(a,b,d){d=Rb(d);b=Tb(b);Qb(a,{name:b,fromWireType:function(f){return f},toWireType:function(f,h){return h},argPackAdvance:8,readValueFromPointer:Vc(b,d),ee:null})},x:function(a,b,d,f,h,m){var u=Oc(b,d);a=Tb(a);h=Bc(f,h);qc(a,function(){Mc("Cannot call "+a+" due to unbound types",u)},b-1);Pb([], u,function(n){n=[n[0],null].concat(n.slice(1));zc(a,Nc(a,n,null,h,m),b-1);return[]})},B:function(a,b,d,f,h){b=Tb(b);-1===h&&(h=4294967295);h=Rb(d);var m=n=>n;if(0===f){var u=32-8*d;m=n=>n<>>u}d=b.includes("unsigned")?function(n,q){return q>>>0}:function(n,q){return q};Qb(a,{name:b,fromWireType:m,toWireType:d,argPackAdvance:8,readValueFromPointer:Wc(b,h,0!==f),ee:null})},t:function(a,b,d){function f(m){m>>=2;var u=lb;return new h(jb,u[m+1],u[m])}var h=[Int8Array,Uint8Array,Int16Array,Uint16Array, Int32Array,Uint32Array,Float32Array,Float64Array][b];d=Tb(d);Qb(a,{name:d,fromWireType:f,argPackAdvance:8,readValueFromPointer:f},{Vf:!0})},u:function(a,b,d,f,h,m,u,n,q,v,D,I){d=Tb(d);m=Bc(h,m);n=Bc(u,n);v=Bc(q,v);I=Bc(D,I);Pb([a],[b],function(M){M=M[0];return[new yc(d,M.Rd,!1,!1,!0,M,f,m,n,v,I)]})},X:function(a,b){b=Tb(b);var d="std::string"===b;Qb(a,{name:b,fromWireType:function(f){var h=lb[f>>2],m=f+4;if(d)for(var u=m,n=0;n<=h;++n){var q=m+n;if(n==h||0==K[q]){u=Va(u,q-u);if(void 0===v)var v=u; else v+=String.fromCharCode(0),v+=u;u=q+1}}else{v=Array(h);for(n=0;n>2]=u;if(d&&m)pa(h,K,q,u+1);else if(m)for(m=0;mYa;var n=1}else 4===b&&(f=db,h=eb,m=fb,u=()=>lb,n=2);Qb(a,{name:d,fromWireType:function(q){for(var v=lb[q>>2],D=u(),I,M=q+4,z=0;z<=v;++z){var N=q+4+z*b;if(z==v||0==D[N>>n])M=f(M,N-M),void 0===I?I=M:(I+=String.fromCharCode(0),I+= M),M=N+b}Lc(q);return I},toWireType:function(q,v){"string"!=typeof v&&Y("Cannot pass non-string to C++ string type "+d);var D=m(v),I=Gd(4+D+b);lb[I>>2]=D>>n;h(v,I+4,D+b);null!==q&&q.push(Lc,I);return I},argPackAdvance:8,readValueFromPointer:Gb,ee:function(q){Lc(q)}})},E:function(a,b,d,f,h,m){Eb[a]={name:Tb(b),gf:Bc(d,f),le:Bc(h,m),sf:[]}},g:function(a,b,d,f,h,m,u,n,q,v){Eb[a].sf.push({Lf:Tb(b),Tf:d,Rf:Bc(f,h),Sf:m,fg:u,eg:Bc(n,q),gg:v})},Ib:function(a,b){b=Tb(b);Qb(a,{Xf:!0,name:b,argPackAdvance:0, fromWireType:function(){},toWireType:function(){}})},Fb:function(){return!0},sb:function(){throw Infinity;},I:function(a,b,d){a=Sc(a);b=Uc(b,"emval::as");var f=[],h=wc(f);lb[d>>2]=h;return b.toWireType(f,a)},$:function(a,b,d,f,h){a=Zc[a];b=Sc(b);d=Yc(d);var m=[];lb[f>>2]=wc(m);return a(b,d,m,h)},C:function(a,b,d,f){a=Zc[a];b=Sc(b);d=Yc(d);a(b,d,null,f)},f:Rc,L:function(a){if(0===a)return wc($c());a=Yc(a);return wc($c()[a])},A:function(a,b){var d=bd(a,b),f=d[0];b=f.name+"_$"+d.slice(1).map(function(u){return u.name}).join("_")+ "$";var h=cd[b];if(void 0!==h)return h;var m=Array(a-1);h=ad((u,n,q,v)=>{for(var D=0,I=0;I>>0)+4294967296*f)},ka:function(a,b,d,f){Z.colorMask(!!a,!!b,!!d,!!f)},la:function(a){Z.compileShader(pd[a])},ma:function(a,b,d,f,h,m,u,n){2<= x.version?Z.Ee||!u?Z.compressedTexImage2D(a,b,d,f,h,m,u,n):Z.compressedTexImage2D(a,b,d,f,h,m,K,n,u):Z.compressedTexImage2D(a,b,d,f,h,m,n?K.subarray(n,n+u):null)},na:function(a,b,d,f,h,m,u,n,q){2<=x.version?Z.Ee||!n?Z.compressedTexSubImage2D(a,b,d,f,h,m,u,n,q):Z.compressedTexSubImage2D(a,b,d,f,h,m,u,K,q,n):Z.compressedTexSubImage2D(a,b,d,f,h,m,u,q?K.subarray(q,q+n):null)},Zb:function(a,b,d,f,h){Z.copyBufferSubData(a,b,d,f,h)},oa:function(a,b,d,f,h,m,u,n){Z.copyTexSubImage2D(a,b,d,f,h,m,u,n)},pa:function(){var a= fa(md),b=Z.createProgram();b.name=a;b.We=b.Ue=b.Ve=0;b.kf=1;md[a]=b;return a},qa:function(a){var b=fa(pd);pd[b]=Z.createShader(a);return b},ra:function(a){Z.cullFace(a)},sa:function(a,b){for(var d=0;d>2],h=ld[f];h&&(Z.deleteBuffer(h),h.name=0,ld[f]=null,f==Z.cf&&(Z.cf=0),f==Z.Ee&&(Z.Ee=0))}},hc:function(a,b){for(var d=0;d>2],h=nd[f];h&&(Z.deleteFramebuffer(h),h.name=0,nd[f]=null)}},ta:function(a){if(a){var b=md[a];b?(Z.deleteProgram(b),b.name=0,md[a]=null): wd(1281)}},ic:function(a,b){for(var d=0;d>2],h=od[f];h&&(Z.deleteRenderbuffer(h),h.name=0,od[f]=null)}},Sb:function(a,b){for(var d=0;d>2],h=rd[f];h&&(Z.deleteSampler(h),h.name=0,rd[f]=null)}},ua:function(a){if(a){var b=pd[a];b?(Z.deleteShader(b),pd[a]=null):wd(1281)}},_b:function(a){if(a){var b=sd[a];b?(Z.deleteSync(b),b.name=0,sd[a]=null):wd(1281)}},va:function(a,b){for(var d=0;d>2],h=ia[f];h&&(Z.deleteTexture(h),h.name=0,ia[f]=null)}}, Dc:function(a,b){for(var d=0;d>2];Z.deleteVertexArray(qd[f]);qd[f]=null}},yc:function(a,b){for(var d=0;d>2];Z.deleteVertexArray(qd[f]);qd[f]=null}},wa:function(a){Z.depthMask(!!a)},xa:function(a){Z.disable(a)},ya:function(a){Z.disableVertexAttribArray(a)},za:function(a,b,d){Z.drawArrays(a,b,d)},Ac:function(a,b,d,f){Z.drawArraysInstanced(a,b,d,f)},vc:function(a,b,d,f,h){Z.qf.drawArraysInstancedBaseInstanceWEBGL(a,b,d,f,h)},tc:function(a,b){for(var d=Cd[a], f=0;f>2];Z.drawBuffers(d)},Aa:function(a,b,d,f){Z.drawElements(a,b,d,f)},Bc:function(a,b,d,f,h){Z.drawElementsInstanced(a,b,d,f,h)},wc:function(a,b,d,f,h,m,u){Z.qf.drawElementsInstancedBaseVertexBaseInstanceWEBGL(a,b,d,f,h,m,u)},nc:function(a,b,d,f,h,m){Z.drawElements(a,f,h,m)},Ba:function(a){Z.enable(a)},Ca:function(a){Z.enableVertexAttribArray(a)},Xb:function(a,b){return(a=Z.fenceSync(a,b))?(b=fa(sd),a.name=b,sd[b]=a,b):0},Da:function(){Z.finish()},Ea:function(){Z.flush()},jc:function(a, b,d,f){Z.framebufferRenderbuffer(a,b,d,od[f])},kc:function(a,b,d,f,h){Z.framebufferTexture2D(a,b,d,ia[f],h)},Fa:function(a){Z.frontFace(a)},Ga:function(a,b){Dd(a,b,"createBuffer",ld)},lc:function(a,b){Dd(a,b,"createFramebuffer",nd)},mc:function(a,b){Dd(a,b,"createRenderbuffer",od)},Tb:function(a,b){Dd(a,b,"createSampler",rd)},Ha:function(a,b){Dd(a,b,"createTexture",ia)},Ec:function(a,b){Dd(a,b,"createVertexArray",qd)},zc:function(a,b){Dd(a,b,"createVertexArray",qd)},bc:function(a){Z.generateMipmap(a)}, Ia:function(a,b,d){d?R[d>>2]=Z.getBufferParameter(a,b):wd(1281)},Ja:function(){var a=Z.getError()||xd;xd=0;return a},Ka:function(a,b){Ed(a,b,2)},cc:function(a,b,d,f){a=Z.getFramebufferAttachmentParameter(a,b,d);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;R[f>>2]=a},M:function(a,b){Ed(a,b,0)},La:function(a,b,d,f){a=Z.getProgramInfoLog(md[a]);null===a&&(a="(unknown error)");b=0>2]=b)},Ma:function(a,b,d){if(d)if(a>=kd)wd(1281);else if(a=md[a],35716== b)a=Z.getProgramInfoLog(a),null===a&&(a="(unknown error)"),R[d>>2]=a.length+1;else if(35719==b){if(!a.We)for(b=0;b>2]=a.We}else if(35722==b){if(!a.Ue)for(b=0;b>2]=a.Ue}else if(35381==b){if(!a.Ve)for(b=0;b> 2]=a.Ve}else R[d>>2]=Z.getProgramParameter(a,b);else wd(1281)},dc:function(a,b,d){d?R[d>>2]=Z.getRenderbufferParameter(a,b):wd(1281)},Na:function(a,b,d,f){a=Z.getShaderInfoLog(pd[a]);null===a&&(a="(unknown error)");b=0>2]=b)},Ob:function(a,b,d,f){a=Z.getShaderPrecisionFormat(a,b);R[d>>2]=a.rangeMin;R[d+4>>2]=a.rangeMax;R[f>>2]=a.precision},Oa:function(a,b,d){d?35716==b?(a=Z.getShaderInfoLog(pd[a]),null===a&&(a="(unknown error)"),R[d>>2]=a?a.length+1:0):35720==b?(a=Z.getShaderSource(pd[a]), R[d>>2]=a?a.length+1:0):R[d>>2]=Z.getShaderParameter(pd[a],b):wd(1281)},R:function(a){var b=td[a];if(!b){switch(a){case 7939:b=Z.getSupportedExtensions()||[];b=b.concat(b.map(function(f){return"GL_"+f}));b=Fd(b.join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=Z.getParameter(a))||wd(1280);b=b&&Fd(b);break;case 7938:b=Z.getParameter(7938);b=2<=x.version?"OpenGL ES 3.0 ("+b+")":"OpenGL ES 2.0 ("+b+")";b=Fd(b);break;case 35724:b=Z.getParameter(35724);var d=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/); null!==d&&(3==d[1].length&&(d[1]+="0"),b="OpenGL ES GLSL ES "+d[1]+" ("+b+")");b=Fd(b);break;default:wd(1280)}td[a]=b}return b},jb:function(a,b){if(2>x.version)return wd(1282),0;var d=ud[a];if(d)return 0>b||b>=d.length?(wd(1281),0):d[b];switch(a){case 7939:return d=Z.getSupportedExtensions()||[],d=d.concat(d.map(function(f){return"GL_"+f})),d=d.map(function(f){return Fd(f)}),d=ud[a]=d,0>b||b>=d.length?(wd(1281),0):d[b];default:return wd(1280),0}},Pa:function(a,b){b=Va(b);if(a=md[a]){var d=a,f=d.Ne, h=d.xf,m;if(!f)for(d.Ne=f={},d.wf={},m=0;m>>0,h=b.slice(0,m));if((h=a.xf[h])&&f>2];Z.invalidateFramebuffer(a,f)}, Qb:function(a,b,d,f,h,m,u){for(var n=Cd[b],q=0;q>2];Z.invalidateSubFramebuffer(a,n,f,h,m,u)},Yb:function(a){return Z.isSync(sd[a])},Qa:function(a){return(a=ia[a])?Z.isTexture(a):0},Ra:function(a){Z.lineWidth(a)},Sa:function(a){a=md[a];Z.linkProgram(a);a.Ne=0;a.xf={}},rc:function(a,b,d,f,h,m){Z.uf.multiDrawArraysInstancedBaseInstanceWEBGL(a,R,b>>2,R,d>>2,R,f>>2,lb,h>>2,m)},sc:function(a,b,d,f,h,m,u,n){Z.uf.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(a,R,b>>2,d,R,f>>2, R,h>>2,R,m>>2,lb,u>>2,n)},Ta:function(a,b){3317==a&&(vd=b);Z.pixelStorei(a,b)},uc:function(a){Z.readBuffer(a)},Ua:function(a,b,d,f,h,m,u){if(2<=x.version)if(Z.cf)Z.readPixels(a,b,d,f,h,m,u);else{var n=Id(m);Z.readPixels(a,b,d,f,h,m,n,u>>31-Math.clz32(n.BYTES_PER_ELEMENT))}else(u=Jd(m,h,d,f,u))?Z.readPixels(a,b,d,f,h,m,u):wd(1280)},ec:function(a,b,d,f){Z.renderbufferStorage(a,b,d,f)},ac:function(a,b,d,f,h){Z.renderbufferStorageMultisample(a,b,d,f,h)},Ub:function(a,b,d){Z.samplerParameterf(rd[a],b, d)},Vb:function(a,b,d){Z.samplerParameteri(rd[a],b,d)},Wb:function(a,b,d){Z.samplerParameteri(rd[a],b,R[d>>2])},Va:function(a,b,d,f){Z.scissor(a,b,d,f)},Wa:function(a,b,d,f){for(var h="",m=0;m>2]:-1;h+=Va(R[d+4*m>>2],0>u?void 0:u)}Z.shaderSource(pd[a],h)},Xa:function(a,b,d){Z.stencilFunc(a,b,d)},Ya:function(a,b,d,f){Z.stencilFuncSeparate(a,b,d,f)},Za:function(a){Z.stencilMask(a)},_a:function(a,b){Z.stencilMaskSeparate(a,b)},$a:function(a,b,d){Z.stencilOp(a,b,d)},ab:function(a, b,d,f){Z.stencilOpSeparate(a,b,d,f)},bb:function(a,b,d,f,h,m,u,n,q){if(2<=x.version)if(Z.Ee)Z.texImage2D(a,b,d,f,h,m,u,n,q);else if(q){var v=Id(n);Z.texImage2D(a,b,d,f,h,m,u,n,v,q>>31-Math.clz32(v.BYTES_PER_ELEMENT))}else Z.texImage2D(a,b,d,f,h,m,u,n,null);else Z.texImage2D(a,b,d,f,h,m,u,n,q?Jd(n,u,f,h,q):null)},cb:function(a,b,d){Z.texParameterf(a,b,d)},db:function(a,b,d){Z.texParameterf(a,b,S[d>>2])},eb:function(a,b,d){Z.texParameteri(a,b,d)},fb:function(a,b,d){Z.texParameteri(a,b,R[d>>2])},oc:function(a, b,d,f,h){Z.texStorage2D(a,b,d,f,h)},gb:function(a,b,d,f,h,m,u,n,q){if(2<=x.version)if(Z.Ee)Z.texSubImage2D(a,b,d,f,h,m,u,n,q);else if(q){var v=Id(n);Z.texSubImage2D(a,b,d,f,h,m,u,n,v,q>>31-Math.clz32(v.BYTES_PER_ELEMENT))}else Z.texSubImage2D(a,b,d,f,h,m,u,n,null);else v=null,q&&(v=Jd(n,u,h,m,q)),Z.texSubImage2D(a,b,d,f,h,m,u,n,v)},hb:function(a,b){Z.uniform1f(Kd(a),b)},ib:function(a,b,d){if(2<=x.version)b&&Z.uniform1fv(Kd(a),S,d>>2,b);else{if(288>=b)for(var f=Ld[b-1],h=0;h>2]; else f=S.subarray(d>>2,d+4*b>>2);Z.uniform1fv(Kd(a),f)}},Zc:function(a,b){Z.uniform1i(Kd(a),b)},_c:function(a,b,d){if(2<=x.version)b&&Z.uniform1iv(Kd(a),R,d>>2,b);else{if(288>=b)for(var f=Md[b-1],h=0;h>2];else f=R.subarray(d>>2,d+4*b>>2);Z.uniform1iv(Kd(a),f)}},$c:function(a,b,d){Z.uniform2f(Kd(a),b,d)},ad:function(a,b,d){if(2<=x.version)b&&Z.uniform2fv(Kd(a),S,d>>2,2*b);else{if(144>=b)for(var f=Ld[2*b-1],h=0;h<2*b;h+=2)f[h]=S[d+4*h>>2],f[h+1]=S[d+(4*h+4)>>2];else f=S.subarray(d>> 2,d+8*b>>2);Z.uniform2fv(Kd(a),f)}},Yc:function(a,b,d){Z.uniform2i(Kd(a),b,d)},Xc:function(a,b,d){if(2<=x.version)b&&Z.uniform2iv(Kd(a),R,d>>2,2*b);else{if(144>=b)for(var f=Md[2*b-1],h=0;h<2*b;h+=2)f[h]=R[d+4*h>>2],f[h+1]=R[d+(4*h+4)>>2];else f=R.subarray(d>>2,d+8*b>>2);Z.uniform2iv(Kd(a),f)}},Wc:function(a,b,d,f){Z.uniform3f(Kd(a),b,d,f)},Vc:function(a,b,d){if(2<=x.version)b&&Z.uniform3fv(Kd(a),S,d>>2,3*b);else{if(96>=b)for(var f=Ld[3*b-1],h=0;h<3*b;h+=3)f[h]=S[d+4*h>>2],f[h+1]=S[d+(4*h+4)>>2],f[h+ 2]=S[d+(4*h+8)>>2];else f=S.subarray(d>>2,d+12*b>>2);Z.uniform3fv(Kd(a),f)}},Uc:function(a,b,d,f){Z.uniform3i(Kd(a),b,d,f)},Tc:function(a,b,d){if(2<=x.version)b&&Z.uniform3iv(Kd(a),R,d>>2,3*b);else{if(96>=b)for(var f=Md[3*b-1],h=0;h<3*b;h+=3)f[h]=R[d+4*h>>2],f[h+1]=R[d+(4*h+4)>>2],f[h+2]=R[d+(4*h+8)>>2];else f=R.subarray(d>>2,d+12*b>>2);Z.uniform3iv(Kd(a),f)}},Sc:function(a,b,d,f,h){Z.uniform4f(Kd(a),b,d,f,h)},Rc:function(a,b,d){if(2<=x.version)b&&Z.uniform4fv(Kd(a),S,d>>2,4*b);else{if(72>=b){var f= Ld[4*b-1],h=S;d>>=2;for(var m=0;m<4*b;m+=4){var u=d+m;f[m]=h[u];f[m+1]=h[u+1];f[m+2]=h[u+2];f[m+3]=h[u+3]}}else f=S.subarray(d>>2,d+16*b>>2);Z.uniform4fv(Kd(a),f)}},Fc:function(a,b,d,f,h){Z.uniform4i(Kd(a),b,d,f,h)},Gc:function(a,b,d){if(2<=x.version)b&&Z.uniform4iv(Kd(a),R,d>>2,4*b);else{if(72>=b)for(var f=Md[4*b-1],h=0;h<4*b;h+=4)f[h]=R[d+4*h>>2],f[h+1]=R[d+(4*h+4)>>2],f[h+2]=R[d+(4*h+8)>>2],f[h+3]=R[d+(4*h+12)>>2];else f=R.subarray(d>>2,d+16*b>>2);Z.uniform4iv(Kd(a),f)}},Hc:function(a,b,d,f){if(2<= x.version)b&&Z.uniformMatrix2fv(Kd(a),!!d,S,f>>2,4*b);else{if(72>=b)for(var h=Ld[4*b-1],m=0;m<4*b;m+=4)h[m]=S[f+4*m>>2],h[m+1]=S[f+(4*m+4)>>2],h[m+2]=S[f+(4*m+8)>>2],h[m+3]=S[f+(4*m+12)>>2];else h=S.subarray(f>>2,f+16*b>>2);Z.uniformMatrix2fv(Kd(a),!!d,h)}},Ic:function(a,b,d,f){if(2<=x.version)b&&Z.uniformMatrix3fv(Kd(a),!!d,S,f>>2,9*b);else{if(32>=b)for(var h=Ld[9*b-1],m=0;m<9*b;m+=9)h[m]=S[f+4*m>>2],h[m+1]=S[f+(4*m+4)>>2],h[m+2]=S[f+(4*m+8)>>2],h[m+3]=S[f+(4*m+12)>>2],h[m+4]=S[f+(4*m+16)>>2],h[m+ 5]=S[f+(4*m+20)>>2],h[m+6]=S[f+(4*m+24)>>2],h[m+7]=S[f+(4*m+28)>>2],h[m+8]=S[f+(4*m+32)>>2];else h=S.subarray(f>>2,f+36*b>>2);Z.uniformMatrix3fv(Kd(a),!!d,h)}},Jc:function(a,b,d,f){if(2<=x.version)b&&Z.uniformMatrix4fv(Kd(a),!!d,S,f>>2,16*b);else{if(18>=b){var h=Ld[16*b-1],m=S;f>>=2;for(var u=0;u<16*b;u+=16){var n=f+u;h[u]=m[n];h[u+1]=m[n+1];h[u+2]=m[n+2];h[u+3]=m[n+3];h[u+4]=m[n+4];h[u+5]=m[n+5];h[u+6]=m[n+6];h[u+7]=m[n+7];h[u+8]=m[n+8];h[u+9]=m[n+9];h[u+10]=m[n+10];h[u+11]=m[n+11];h[u+12]=m[n+12]; h[u+13]=m[n+13];h[u+14]=m[n+14];h[u+15]=m[n+15]}}else h=S.subarray(f>>2,f+64*b>>2);Z.uniformMatrix4fv(Kd(a),!!d,h)}},Kc:function(a){a=md[a];Z.useProgram(a);Z.Hf=a},Lc:function(a,b){Z.vertexAttrib1f(a,b)},Mc:function(a,b){Z.vertexAttrib2f(a,S[b>>2],S[b+4>>2])},Nc:function(a,b){Z.vertexAttrib3f(a,S[b>>2],S[b+4>>2],S[b+8>>2])},Oc:function(a,b){Z.vertexAttrib4f(a,S[b>>2],S[b+4>>2],S[b+8>>2],S[b+12>>2])},pc:function(a,b){Z.vertexAttribDivisor(a,b)},qc:function(a,b,d,f,h){Z.vertexAttribIPointer(a,b,d,f, h)},Pc:function(a,b,d,f,h,m){Z.vertexAttribPointer(a,b,d,!!f,h,m)},Qc:function(a,b,d,f){Z.viewport(a,b,d,f)},lb:function(a,b,d,f){Z.waitSync(sd[a],b,(d>>>0)+4294967296*f)},tb:function(a){var b=K.length;a>>>=0;if(2147483648=d;d*=2){var f=b*(1+.2/d);f=Math.min(f,a+100663296);var h=Math;f=Math.max(a,f);h=h.min.call(h,2147483648,f+(65536-f%65536)%65536);a:{try{Qa.grow(h-jb.byteLength+65535>>>16);nb();var m=1;break a}catch(u){}m=void 0}if(m)return!0}return!1},nb:function(){return x? x.Uf:0},wb:function(a,b){var d=0;Od().forEach(function(f,h){var m=b+d;h=lb[a+4*h>>2]=m;for(m=0;m>0]=f.charCodeAt(m);kb[h>>0]=0;d+=f.length+1});return 0},xb:function(a,b){var d=Od();lb[a>>2]=d.length;var f=0;d.forEach(function(h){f+=h.length+1});lb[b>>2]=f;return 0},Jb:function(a){if(!noExitRuntime){if(w.onExit)w.onExit(a);Ra=!0}wa(a,new Ga(a))},O:function(){return 52},ob:function(){return 52},Cb:function(){return 52},pb:function(){return 70},T:function(a,b,d,f){for(var h=0,m= 0;m>2],n=lb[b+4>>2];b+=8;for(var q=0;q>2]=h;return 0},c:function(){return La},m:ae,s:be,k:ce,J:de,Nb:ee,_:fe,Z:ge,Q:he,q:ie,y:je,o:ke,v:le,Mb:me,Kb:ne,Lb:oe,d:function(a){La=a},rb:function(a,b,d,f){return Ud(a,b,d,f)}}; (function(){function a(h){w.asm=h.exports;Qa=w.asm.dd;nb();ob=w.asm.fd;qb.unshift(w.asm.ed);tb--;w.monitorRunDependencies&&w.monitorRunDependencies(tb);0==tb&&(null!==ub&&(clearInterval(ub),ub=null),vb&&(h=vb,vb=null,h()))}function b(h){a(h.instance)}function d(h){return Bb().then(function(m){return WebAssembly.instantiate(m,f)}).then(function(m){return m}).then(h,function(m){Ja("failed to asynchronously prepare wasm: "+m);Na(m)})}var f={a:pe};tb++;w.monitorRunDependencies&&w.monitorRunDependencies(tb); if(w.instantiateWasm)try{return w.instantiateWasm(f,a)}catch(h){return Ja("Module.instantiateWasm callback failed with error: "+h),!1}(function(){return Ma||"function"!=typeof WebAssembly.instantiateStreaming||wb()||yb.startsWith("file://")||za||"function"!=typeof fetch?d(b):fetch(yb,{credentials:"same-origin"}).then(function(h){return WebAssembly.instantiateStreaming(h,f).then(b,function(m){Ja("wasm streaming compile failed: "+m);Ja("falling back to ArrayBuffer instantiation");return d(b)})})})().catch(ea); return{}})();w.___wasm_call_ctors=function(){return(w.___wasm_call_ctors=w.asm.ed).apply(null,arguments)};var Lc=w._free=function(){return(Lc=w._free=w.asm.gd).apply(null,arguments)},Gd=w._malloc=function(){return(Gd=w._malloc=w.asm.hd).apply(null,arguments)},Kc=w.___getTypeName=function(){return(Kc=w.___getTypeName=w.asm.id).apply(null,arguments)};w.___embind_register_native_and_builtin_types=function(){return(w.___embind_register_native_and_builtin_types=w.asm.jd).apply(null,arguments)}; var qe=w._setThrew=function(){return(qe=w._setThrew=w.asm.kd).apply(null,arguments)},re=w.stackSave=function(){return(re=w.stackSave=w.asm.ld).apply(null,arguments)},se=w.stackRestore=function(){return(se=w.stackRestore=w.asm.md).apply(null,arguments)};w.dynCall_viji=function(){return(w.dynCall_viji=w.asm.nd).apply(null,arguments)};w.dynCall_vijiii=function(){return(w.dynCall_vijiii=w.asm.od).apply(null,arguments)};w.dynCall_viiiiij=function(){return(w.dynCall_viiiiij=w.asm.pd).apply(null,arguments)}; w.dynCall_jiiiijiiiii=function(){return(w.dynCall_jiiiijiiiii=w.asm.qd).apply(null,arguments)};w.dynCall_viiij=function(){return(w.dynCall_viiij=w.asm.rd).apply(null,arguments)};w.dynCall_jii=function(){return(w.dynCall_jii=w.asm.sd).apply(null,arguments)};w.dynCall_vij=function(){return(w.dynCall_vij=w.asm.td).apply(null,arguments)};w.dynCall_iiij=function(){return(w.dynCall_iiij=w.asm.ud).apply(null,arguments)};w.dynCall_iiiij=function(){return(w.dynCall_iiiij=w.asm.vd).apply(null,arguments)}; w.dynCall_viij=function(){return(w.dynCall_viij=w.asm.wd).apply(null,arguments)};w.dynCall_ji=function(){return(w.dynCall_ji=w.asm.xd).apply(null,arguments)};w.dynCall_iij=function(){return(w.dynCall_iij=w.asm.yd).apply(null,arguments)};w.dynCall_jiiiiii=function(){return(w.dynCall_jiiiiii=w.asm.zd).apply(null,arguments)};w.dynCall_jiiiiji=function(){return(w.dynCall_jiiiiji=w.asm.Ad).apply(null,arguments)};w.dynCall_iijj=function(){return(w.dynCall_iijj=w.asm.Bd).apply(null,arguments)}; w.dynCall_iiiji=function(){return(w.dynCall_iiiji=w.asm.Cd).apply(null,arguments)};w.dynCall_iiji=function(){return(w.dynCall_iiji=w.asm.Dd).apply(null,arguments)};w.dynCall_iijjiii=function(){return(w.dynCall_iijjiii=w.asm.Ed).apply(null,arguments)};w.dynCall_vijjjii=function(){return(w.dynCall_vijjjii=w.asm.Fd).apply(null,arguments)};w.dynCall_jiji=function(){return(w.dynCall_jiji=w.asm.Gd).apply(null,arguments)};w.dynCall_viijii=function(){return(w.dynCall_viijii=w.asm.Hd).apply(null,arguments)}; w.dynCall_iiiiij=function(){return(w.dynCall_iiiiij=w.asm.Id).apply(null,arguments)};w.dynCall_iiiiijj=function(){return(w.dynCall_iiiiijj=w.asm.Jd).apply(null,arguments)};w.dynCall_iiiiiijj=function(){return(w.dynCall_iiiiiijj=w.asm.Kd).apply(null,arguments)};function ae(a,b){var d=re();try{return Db(a)(b)}catch(f){se(d);if(f!==f+0)throw f;qe(1,0)}}function be(a,b,d){var f=re();try{return Db(a)(b,d)}catch(h){se(f);if(h!==h+0)throw h;qe(1,0)}} function ke(a,b,d,f){var h=re();try{Db(a)(b,d,f)}catch(m){se(h);if(m!==m+0)throw m;qe(1,0)}}function ce(a,b,d,f){var h=re();try{return Db(a)(b,d,f)}catch(m){se(h);if(m!==m+0)throw m;qe(1,0)}}function ie(a,b){var d=re();try{Db(a)(b)}catch(f){se(d);if(f!==f+0)throw f;qe(1,0)}}function ee(a,b,d,f,h,m){var u=re();try{return Db(a)(b,d,f,h,m)}catch(n){se(u);if(n!==n+0)throw n;qe(1,0)}}function le(a,b,d,f,h){var m=re();try{Db(a)(b,d,f,h)}catch(u){se(m);if(u!==u+0)throw u;qe(1,0)}} function fe(a,b,d,f,h,m,u){var n=re();try{return Db(a)(b,d,f,h,m,u)}catch(q){se(n);if(q!==q+0)throw q;qe(1,0)}}function de(a,b,d,f,h){var m=re();try{return Db(a)(b,d,f,h)}catch(u){se(m);if(u!==u+0)throw u;qe(1,0)}}function me(a,b,d,f,h,m){var u=re();try{Db(a)(b,d,f,h,m)}catch(n){se(u);if(n!==n+0)throw n;qe(1,0)}}function je(a,b,d){var f=re();try{Db(a)(b,d)}catch(h){se(f);if(h!==h+0)throw h;qe(1,0)}} function oe(a,b,d,f,h,m,u,n,q,v){var D=re();try{Db(a)(b,d,f,h,m,u,n,q,v)}catch(I){se(D);if(I!==I+0)throw I;qe(1,0)}}function he(a){var b=re();try{Db(a)()}catch(d){se(b);if(d!==d+0)throw d;qe(1,0)}}function ne(a,b,d,f,h,m,u){var n=re();try{Db(a)(b,d,f,h,m,u)}catch(q){se(n);if(q!==q+0)throw q;qe(1,0)}}function ge(a,b,d,f,h,m,u,n,q,v){var D=re();try{return Db(a)(b,d,f,h,m,u,n,q,v)}catch(I){se(D);if(I!==I+0)throw I;qe(1,0)}}var te; function Ga(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}vb=function ue(){te||ve();te||(vb=ue)}; function ve(){function a(){if(!te&&(te=!0,w.calledRun=!0,!Ra)){Cb(qb);aa(w);if(w.onRuntimeInitialized)w.onRuntimeInitialized();if(w.postRun)for("function"==typeof w.postRun&&(w.postRun=[w.postRun]);w.postRun.length;){var b=w.postRun.shift();rb.unshift(b)}Cb(rb)}}if(!(0