
var CanvasKitInit = (() => {
  var _scriptName = import.meta.url;
  
  return (
function(moduleArg = {}) {
  var moduleRtn;

var p=moduleArg,aa,ba,da=new Promise((a,b)=>{aa=a;ba=b}),ea="object"==typeof window,fa="function"==typeof importScripts;
(function(a){a.Fd=a.Fd||[];a.Fd.push(function(){a.MakeSWCanvasSurface=function(b){var c=b,e="undefined"!==typeof OffscreenCanvas&&c instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&c instanceof HTMLCanvasElement||e||(c=document.getElementById(b),c)))throw"Canvas with id "+b+" was not found";if(b=a.MakeSurface(c.width,c.height))b.ce=c;return b};a.MakeCanvasSurface||(a.MakeCanvasSurface=a.MakeSWCanvasSurface);a.MakeSurface=function(b,c){var e={width:b,height:c,colorType:a.ColorType.RGBA_8888,
alphaType:a.AlphaType.Unpremul,colorSpace:a.ColorSpace.SRGB},f=b*c*4,g=a._malloc(f);if(e=a.Surface._makeRasterDirect(e,g,4*b))e.ce=null,e.Ee=b,e.Be=c,e.Ce=f,e.le=g,e.getCanvas().clear(a.TRANSPARENT);return e};a.MakeRasterDirectSurface=function(b,c,e){return a.Surface._makeRasterDirect(b,c.byteOffset,e)};a.Surface.prototype.flush=function(b){a.Cd(this.Bd);this._flush();if(this.ce){var c=new Uint8ClampedArray(a.HEAPU8.buffer,this.le,this.Ce);c=new ImageData(c,this.Ee,this.Be);b?this.ce.getContext("2d").putImageData(c,
0,0,b[0],b[1],b[2]-b[0],b[3]-b[1]):this.ce.getContext("2d").putImageData(c,0,0)}};a.Surface.prototype.dispose=function(){this.le&&a._free(this.le);this.delete()};a.Cd=a.Cd||function(){};a.fe=a.fe||function(){return null}})})(p);
(function(a){a.Fd=a.Fd||[];a.Fd.push(function(){function b(g,k,n){return g&&g.hasOwnProperty(k)?g[k]:n}function c(g){var k=ha(ia);ia[k]=g;return k}function e(g,k,n,q){g.bindTexture(g.TEXTURE_2D,k);q||n.alphaType!==a.AlphaType.Premul||g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);return k}function f(g,k,n){n||k.alphaType!==a.AlphaType.Premul||g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);g.bindTexture(g.TEXTURE_2D,null)}a.GetWebGLContext=function(g,k){if(!g)throw"null canvas passed into makeWebGLContext";
var n={alpha:b(k,"alpha",1),depth:b(k,"depth",1),stencil:b(k,"stencil",8),antialias:b(k,"antialias",0),premultipliedAlpha:b(k,"premultipliedAlpha",1),preserveDrawingBuffer:b(k,"preserveDrawingBuffer",0),preferLowPowerToHighPerformance:b(k,"preferLowPowerToHighPerformance",0),failIfMajorPerformanceCaveat:b(k,"failIfMajorPerformanceCaveat",0),enableExtensionsByDefault:b(k,"enableExtensionsByDefault",1),explicitSwapControl:b(k,"explicitSwapControl",0),renderViaOffscreenBackBuffer:b(k,"renderViaOffscreenBackBuffer",
0)};n.majorVersion=k&&k.majorVersion?k.majorVersion:"undefined"!==typeof WebGL2RenderingContext?2:1;if(n.explicitSwapControl)throw"explicitSwapControl is not supported";g=ja(g,n);if(!g)return 0;ka(g);x.Od.getExtension("WEBGL_debug_renderer_info");return g};a.deleteContext=function(g){x===la[g]&&(x=null);"object"==typeof JSEvents&&JSEvents.cf(la[g].Od.canvas);la[g]&&la[g].Od.canvas&&(la[g].Od.canvas.ze=void 0);la[g]=null};a._setTextureCleanup({deleteTexture:function(g,k){var n=ia[k];n&&la[g].Od.deleteTexture(n);
ia[k]=null}});a.MakeWebGLContext=function(g){if(!this.Cd(g))return null;var k=this._MakeGrContext();if(!k)return null;k.Bd=g;var n=k.delete.bind(k);k["delete"]=function(){a.Cd(this.Bd);n()}.bind(k);return x.ne=k};a.MakeGrContext=a.MakeWebGLContext;a.GrDirectContext.prototype.getResourceCacheLimitBytes=function(){a.Cd(this.Bd);this._getResourceCacheLimitBytes()};a.GrDirectContext.prototype.getResourceCacheUsageBytes=function(){a.Cd(this.Bd);this._getResourceCacheUsageBytes()};a.GrDirectContext.prototype.releaseResourcesAndAbandonContext=
function(){a.Cd(this.Bd);this._releaseResourcesAndAbandonContext()};a.GrDirectContext.prototype.setResourceCacheLimitBytes=function(g){a.Cd(this.Bd);this._setResourceCacheLimitBytes(g)};a.MakeOnScreenGLSurface=function(g,k,n,q,u,v){if(!this.Cd(g.Bd))return null;k=void 0===u||void 0===v?this._MakeOnScreenGLSurface(g,k,n,q):this._MakeOnScreenGLSurface(g,k,n,q,u,v);if(!k)return null;k.Bd=g.Bd;return k};a.MakeRenderTarget=function(){var g=arguments[0];if(!this.Cd(g.Bd))return null;if(3===arguments.length){var k=
this._MakeRenderTargetWH(g,arguments[1],arguments[2]);if(!k)return null}else if(2===arguments.length){if(k=this._MakeRenderTargetII(g,arguments[1]),!k)return null}else return null;k.Bd=g.Bd;return k};a.MakeWebGLCanvasSurface=function(g,k,n){k=k||null;var q=g,u="undefined"!==typeof OffscreenCanvas&&q instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&q instanceof HTMLCanvasElement||u||(q=document.getElementById(g),q)))throw"Canvas with id "+g+" was not found";g=this.GetWebGLContext(q,
n);if(!g||0>g)throw"failed to create webgl context: err "+g;g=this.MakeWebGLContext(g);k=this.MakeOnScreenGLSurface(g,q.width,q.height,k);return k?k:(k=q.cloneNode(!0),q.parentNode.replaceChild(k,q),k.classList.add("ck-replaced"),a.MakeSWCanvasSurface(k))};a.MakeCanvasSurface=a.MakeWebGLCanvasSurface;a.Surface.prototype.makeImageFromTexture=function(g,k){a.Cd(this.Bd);g=c(g);if(k=this._makeImageFromTexture(this.Bd,g,k))k.Xd=g;return k};a.Surface.prototype.makeImageFromTextureSource=function(g,k,n){k||=
{height:a.de(g),width:a.ee(g),colorType:a.ColorType.RGBA_8888,alphaType:n?a.AlphaType.Premul:a.AlphaType.Unpremul};k.colorSpace||(k.colorSpace=a.ColorSpace.SRGB);a.Cd(this.Bd);var q=x.Od;n=e(q,q.createTexture(),k,n);2===x.version?q.texImage2D(q.TEXTURE_2D,0,q.RGBA,k.width,k.height,0,q.RGBA,q.UNSIGNED_BYTE,g):q.texImage2D(q.TEXTURE_2D,0,q.RGBA,q.RGBA,q.UNSIGNED_BYTE,g);f(q,k);this._resetContext();return this.makeImageFromTexture(n,k)};a.Surface.prototype.updateTextureFromSource=function(g,k,n){if(g.Xd){a.Cd(this.Bd);
var q=g.getImageInfo(),u=x.Od,v=e(u,ia[g.Xd],q,n);2===x.version?u.texImage2D(u.TEXTURE_2D,0,u.RGBA,a.ee(k),a.de(k),0,u.RGBA,u.UNSIGNED_BYTE,k):u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,k);f(u,q,n);this._resetContext();ia[g.Xd]=null;g.Xd=c(v);q.colorSpace=g.getColorSpace();k=this._makeImageFromTexture(this.Bd,g.Xd,q);n=g.Ad.Dd;u=g.Ad.Hd;g.Ad.Dd=k.Ad.Dd;g.Ad.Hd=k.Ad.Hd;k.Ad.Dd=n;k.Ad.Hd=u;k.delete();q.colorSpace.delete()}};a.MakeLazyImageFromTextureSource=function(g,k,n){k||={height:a.de(g),
width:a.ee(g),colorType:a.ColorType.RGBA_8888,alphaType:n?a.AlphaType.Premul:a.AlphaType.Unpremul};k.colorSpace||(k.colorSpace=a.ColorSpace.SRGB);var q={makeTexture:function(){var u=x,v=u.Od,B=e(v,v.createTexture(),k,n);2===u.version?v.texImage2D(v.TEXTURE_2D,0,v.RGBA,k.width,k.height,0,v.RGBA,v.UNSIGNED_BYTE,g):v.texImage2D(v.TEXTURE_2D,0,v.RGBA,v.RGBA,v.UNSIGNED_BYTE,g);f(v,k,n);return c(B)},freeSrc:function(){}};"VideoFrame"===g.constructor.name&&(q.freeSrc=function(){g.close()});return a.Image._makeFromGenerator(k,
q)};a.Cd=function(g){return g?ka(g):!1};a.fe=function(){return x&&x.ne&&!x.ne.isDeleted()?x.ne:null}})})(p);
(function(a){function b(l){return(f(255*l[3])<<24|f(255*l[0])<<16|f(255*l[1])<<8|f(255*l[2])<<0)>>>0}function c(l){if(l&&l._ck)return l;if(l instanceof Float32Array){for(var d=Math.floor(l.length/4),h=new Uint32Array(d),m=0;m<d;m++)h[m]=b(l.slice(4*m,4*(m+1)));return h}if(l instanceof Uint32Array)return l;if(l instanceof Array&&l[0]instanceof Float32Array)return l.map(b)}function e(l){if(void 0===l)return 1;var d=parseFloat(l);return l&&-1!==l.indexOf("%")?d/100:d}function f(l){return Math.round(Math.max(0,
Math.min(l||0,255)))}function g(l,d){d&&d._ck||a._free(l)}function k(l,d,h){if(!l||!l.length)return R;if(l&&l._ck)return l.byteOffset;var m=a[d].BYTES_PER_ELEMENT;h||=a._malloc(l.length*m);a[d].set(l,h/m);return h}function n(l){var d={Md:R,count:l.length,colorType:a.ColorType.RGBA_F32};if(l instanceof Float32Array)d.Md=k(l,"HEAPF32"),d.count=l.length/4;else if(l instanceof Uint32Array)d.Md=k(l,"HEAPU32"),d.colorType=a.ColorType.RGBA_8888;else if(l instanceof Array){if(l&&l.length){for(var h=a._malloc(16*
l.length),m=0,r=h/4,t=0;t<l.length;t++)for(var w=0;4>w;w++)a.HEAPF32[r+m]=l[t][w],m++;l=h}else l=R;d.Md=l}else throw"Invalid argument to copyFlexibleColorArray, Not a color array "+typeof l;return d}function q(l){if(!l)return R;var d=W.toTypedArray();if(l.length){if(6===l.length||9===l.length)return k(l,"HEAPF32",L),6===l.length&&a.HEAPF32.set(Pc,6+L/4),L;if(16===l.length)return d[0]=l[0],d[1]=l[1],d[2]=l[3],d[3]=l[4],d[4]=l[5],d[5]=l[7],d[6]=l[12],d[7]=l[13],d[8]=l[15],L;throw"invalid matrix size";
}if(void 0===l.m11)throw"invalid matrix argument";d[0]=l.m11;d[1]=l.m21;d[2]=l.m41;d[3]=l.m12;d[4]=l.m22;d[5]=l.m42;d[6]=l.m14;d[7]=l.m24;d[8]=l.m44;return L}function u(l){if(!l)return R;var d=T.toTypedArray();if(l.length){if(16!==l.length&&6!==l.length&&9!==l.length)throw"invalid matrix size";if(16===l.length)return k(l,"HEAPF32",ca);d.fill(0);d[0]=l[0];d[1]=l[1];d[3]=l[2];d[4]=l[3];d[5]=l[4];d[7]=l[5];d[10]=1;d[12]=l[6];d[13]=l[7];d[15]=l[8];6===l.length&&(d[12]=0,d[13]=0,d[15]=1);return ca}if(void 0===
l.m11)throw"invalid matrix argument";d[0]=l.m11;d[1]=l.m21;d[2]=l.m31;d[3]=l.m41;d[4]=l.m12;d[5]=l.m22;d[6]=l.m32;d[7]=l.m42;d[8]=l.m13;d[9]=l.m23;d[10]=l.m33;d[11]=l.m43;d[12]=l.m14;d[13]=l.m24;d[14]=l.m34;d[15]=l.m44;return ca}function v(l,d){return k(l,"HEAPF32",d||Y)}function B(l,d,h,m){var r=za.toTypedArray();r[0]=l;r[1]=d;r[2]=h;r[3]=m;return Y}function D(l){for(var d=new Float32Array(4),h=0;4>h;h++)d[h]=a.HEAPF32[l/4+h];return d}function E(l,d){return k(l,"HEAPF32",d||P)}function M(l,d){return k(l,
"HEAPF32",d||pb)}a.Color=function(l,d,h,m){void 0===m&&(m=1);return a.Color4f(f(l)/255,f(d)/255,f(h)/255,m)};a.ColorAsInt=function(l,d,h,m){void 0===m&&(m=255);return(f(m)<<24|f(l)<<16|f(d)<<8|f(h)<<0&268435455)>>>0};a.Color4f=function(l,d,h,m){void 0===m&&(m=1);return Float32Array.of(l,d,h,m)};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(l){return[Math.floor(255*
l[0]),Math.floor(255*l[1]),Math.floor(255*l[2]),l[3]]};a.parseColorString=function(l,d){l=l.toLowerCase();if(l.startsWith("#")){d=255;switch(l.length){case 9:d=parseInt(l.slice(7,9),16);case 7:var h=parseInt(l.slice(1,3),16);var m=parseInt(l.slice(3,5),16);var r=parseInt(l.slice(5,7),16);break;case 5:d=17*parseInt(l.slice(4,5),16);case 4:h=17*parseInt(l.slice(1,2),16),m=17*parseInt(l.slice(2,3),16),r=17*parseInt(l.slice(3,4),16)}return a.Color(h,m,r,d/255)}return l.startsWith("rgba")?(l=l.slice(5,
-1),l=l.split(","),a.Color(+l[0],+l[1],+l[2],e(l[3]))):l.startsWith("rgb")?(l=l.slice(4,-1),l=l.split(","),a.Color(+l[0],+l[1],+l[2],e(l[3]))):l.startsWith("gray(")||l.startsWith("hsl")||!d||(l=d[l],void 0===l)?a.BLACK:l};a.multiplyByAlpha=function(l,d){l=l.slice();l[3]=Math.max(0,Math.min(l[3]*d,1));return l};a.Malloc=function(l,d){var h=a._malloc(d*l.BYTES_PER_ELEMENT);return{_ck:!0,length:d,byteOffset:h,Td:null,subarray:function(m,r){m=this.toTypedArray().subarray(m,r);m._ck=!0;return m},toTypedArray:function(){if(this.Td&&
this.Td.length)return this.Td;this.Td=new l(a.HEAPU8.buffer,h,d);this.Td._ck=!0;return this.Td}}};a.Free=function(l){a._free(l.byteOffset);l.byteOffset=R;l.toTypedArray=null;l.Td=null};var L=R,W,ca=R,T,Y=R,za,X,P=R,Nb,sa=R,Ob,qb=R,Pb,rb=R,Wa,Ha=R,Qb,pb=R,Rb,Sb=R,Pc=Float32Array.of(0,0,1),R=0;a.ee=function(l){return l.naturalWidth||l.videoWidth||l.displayWidth||l.width};a.de=function(l){return l.naturalHeight||l.videoHeight||l.displayHeight||l.height};a.onRuntimeInitialized=function(){function l(d,
h,m,r,t,w,z){w||(w=4*r.width,r.colorType===a.ColorType.RGBA_F16?w*=2:r.colorType===a.ColorType.RGBA_F32&&(w*=4));var J=w*r.height;var F=t?t.byteOffset:a._malloc(J);if(z?!d._readPixels(r,F,w,h,m,z):!d._readPixels(r,F,w,h,m))return t||a._free(F),null;if(t)return t.toTypedArray();switch(r.colorType){case a.ColorType.RGBA_8888:case a.ColorType.RGBA_F16:d=(new Uint8Array(a.HEAPU8.buffer,F,J)).slice();break;case a.ColorType.RGBA_F32:d=(new Float32Array(a.HEAPU8.buffer,F,J)).slice();break;default:return null}a._free(F);
return d}za=a.Malloc(Float32Array,4);Y=za.byteOffset;T=a.Malloc(Float32Array,16);ca=T.byteOffset;W=a.Malloc(Float32Array,9);L=W.byteOffset;Qb=a.Malloc(Float32Array,12);pb=Qb.byteOffset;Rb=a.Malloc(Float32Array,12);Sb=Rb.byteOffset;X=a.Malloc(Float32Array,4);P=X.byteOffset;Nb=a.Malloc(Float32Array,4);sa=Nb.byteOffset;Ob=a.Malloc(Float32Array,3);qb=Ob.byteOffset;Pb=a.Malloc(Float32Array,3);rb=Pb.byteOffset;Wa=a.Malloc(Int32Array,4);Ha=Wa.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(d){var h=k(d,"HEAPF32"),m=a.Path._MakeFromCmds(h,d.length);g(h,d);return m};a.Path.MakeFromVerbsPointsWeights=function(d,h,m){var r=k(d,"HEAPU8"),t=k(h,"HEAPF32"),w=k(m,"HEAPF32"),z=a.Path._MakeFromVerbsPointsWeights(r,d.length,t,h.length/2,w,m&&m.length||0);g(r,d);g(t,h);g(w,m);return z};a.PathBuilder.prototype.addArc=function(d,
h,m){d=E(d);this._addArc(d,h,m);return this};a.PathBuilder.prototype.addCircle=function(d,h,m,r){this._addCircle(d,h,m,!!r);return this};a.PathBuilder.prototype.addOval=function(d,h,m){void 0===m&&(m=1);d=E(d);this._addOval(d,!!h,m);return this};a.PathBuilder.prototype.addPath=function(){var d=Array.prototype.slice.call(arguments),h=d[0],m=!1;"boolean"===typeof d[d.length-1]&&(m=d.pop());if(1===d.length)this._addPath(h,1,0,0,0,1,0,0,0,1,m);else if(2===d.length)d=d[1],this._addPath(h,d[0],d[1],d[2],
d[3],d[4],d[5],d[6]||0,d[7]||0,d[8]||1,m);else if(7===d.length||10===d.length)this._addPath(h,d[1],d[2],d[3],d[4],d[5],d[6],d[7]||0,d[8]||0,d[9]||1,m);else return null;return this};a.PathBuilder.prototype.addPolygon=function(d,h){var m=k(d,"HEAPF32");this._addPolygon(m,d.length/2,h);g(m,d);return this};a.PathBuilder.prototype.addRect=function(d,h){d=E(d);this._addRect(d,!!h);return this};a.PathBuilder.prototype.addRRect=function(d,h){d=M(d);this._addRRect(d,!!h);return this};a.PathBuilder.prototype.addVerbsPointsWeights=
function(d,h,m){var r=k(d,"HEAPU8"),t=k(h,"HEAPF32"),w=k(m,"HEAPF32");this._addVerbsPointsWeights(r,d.length,t,h.length/2,w,m&&m.length||0);g(r,d);g(t,h);g(w,m);return this};a.PathBuilder.prototype.arc=function(d,h,m,r,t,w){d=a.LTRBRect(d-m,h-m,d+m,h+m);t=(t-r)/Math.PI*180-360*!!w;r=(new a.PathBuilder).addArc(d,r/Math.PI*180,t).detachAndDelete();this.addPath(r,!0);r.delete();return this};a.PathBuilder.prototype.arcToOval=function(d,h,m,r){d=E(d);this._arcToOval(d,h,m,r);return this};a.PathBuilder.prototype.arcToRotated=
function(d,h,m,r,t,w,z){this._arcToRotated(d,h,m,!!r,!!t,w,z);return this};a.PathBuilder.prototype.arcToTangent=function(d,h,m,r,t){this._arcToTangent(d,h,m,r,t);return this};a.PathBuilder.prototype.close=function(){this._close();return this};a.PathBuilder.prototype.conicTo=function(d,h,m,r,t){this._conicTo(d,h,m,r,t);return this};a.Path.prototype.computeTightBounds=function(d){this._computeTightBounds(P);var h=X.toTypedArray();return d?(d.set(h),d):h.slice()};a.PathBuilder.prototype.cubicTo=function(d,
h,m,r,t,w){this._cubicTo(d,h,m,r,t,w);return this};a.PathBuilder.prototype.detachAndDelete=function(){var d=this.detach();this.delete();return d};a.Path.prototype.getBounds=function(d){this._getBounds(P);var h=X.toTypedArray();return d?(d.set(h),d):h.slice()};a.PathBuilder.prototype.getBounds=function(d){this._getBounds(P);var h=X.toTypedArray();return d?(d.set(h),d):h.slice()};a.PathBuilder.prototype.lineTo=function(d,h){this._lineTo(d,h);return this};a.PathBuilder.prototype.moveTo=function(d,h){this._moveTo(d,
h);return this};a.PathBuilder.prototype.offset=function(d,h){this._transform(1,0,d,0,1,h,0,0,1);return this};a.PathBuilder.prototype.quadTo=function(d,h,m,r){this._quadTo(d,h,m,r);return this};a.PathBuilder.prototype.rArcTo=function(d,h,m,r,t,w,z){this._rArcTo(d,h,m,r,t,w,z);return this};a.PathBuilder.prototype.rConicTo=function(d,h,m,r,t){this._rConicTo(d,h,m,r,t);return this};a.PathBuilder.prototype.rCubicTo=function(d,h,m,r,t,w){this._rCubicTo(d,h,m,r,t,w);return this};a.PathBuilder.prototype.rLineTo=
function(d,h){this._rLineTo(d,h);return this};a.PathBuilder.prototype.rMoveTo=function(d,h){this._rMoveTo(d,h);return this};a.PathBuilder.prototype.rQuadTo=function(d,h,m,r){this._rQuadTo(d,h,m,r);return this};a.PathBuilder.prototype.setFillType=function(d){this._setFillType(d);return this};a.Path.prototype.makeStroked=function(d){d=d||{};d.width=d.width||1;d.miter_limit=d.miter_limit||4;d.cap=d.cap||a.StrokeCap.Butt;d.join=d.join||a.StrokeJoin.Miter;d.precision=d.precision||1;return this._makeStroked(d)};
a.PathBuilder.prototype.transform=function(){if(1===arguments.length){var d=arguments[0];this._transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6]||0,d[7]||0,d[8]||1)}else if(6===arguments.length||9===arguments.length)d=arguments,this._transform(d[0],d[1],d[2],d[3],d[4],d[5],d[6]||0,d[7]||0,d[8]||1);else throw"transform expected to take 1 or 9 arguments. Got "+arguments.length;return this};a.Path.prototype.makeTrimmed=function(d,h,m){return this._makeTrimmed(d,h,!!m)};a.Image.prototype.encodeToBytes=function(d,
h){var m=a.fe();d=d||a.ImageFormat.PNG;h=h||100;return m?this._encodeToBytes(d,h,m):this._encodeToBytes(d,h)};a.Image.prototype.makeShaderCubic=function(d,h,m,r,t){t=q(t);return this._makeShaderCubic(d,h,m,r,t)};a.Image.prototype.makeShaderOptions=function(d,h,m,r,t){t=q(t);return this._makeShaderOptions(d,h,m,r,t)};a.Image.prototype.readPixels=function(d,h,m,r,t){var w=a.fe();return l(this,d,h,m,r,t,w)};a.Canvas.prototype.clear=function(d){a.Cd(this.Bd);d=v(d);this._clear(d)};a.Canvas.prototype.clipRRect=
function(d,h,m){a.Cd(this.Bd);d=M(d);this._clipRRect(d,h,m)};a.Canvas.prototype.clipRect=function(d,h,m){a.Cd(this.Bd);d=E(d);this._clipRect(d,h,m)};a.Canvas.prototype.concat=function(d){a.Cd(this.Bd);d=u(d);this._concat(d)};a.Canvas.prototype.drawArc=function(d,h,m,r,t){a.Cd(this.Bd);d=E(d);this._drawArc(d,h,m,r,t)};a.Canvas.prototype.drawAtlas=function(d,h,m,r,t,w,z){if(d&&r&&h&&m&&h.length===m.length){a.Cd(this.Bd);t||(t=a.BlendMode.SrcOver);var J=k(h,"HEAPF32"),F=k(m,"HEAPF32"),S=m.length/4,U=
k(c(w),"HEAPU32");if(z&&"B"in z&&"C"in z)this._drawAtlasCubic(d,F,J,U,S,t,z.B,z.C,r);else{let ta=a.FilterMode.Linear,Ia=a.MipmapMode.None;z&&(ta=z.filter,"mipmap"in z&&(Ia=z.mipmap));this._drawAtlasOptions(d,F,J,U,S,t,ta,Ia,r)}g(J,h);g(F,m);g(U,w)}};a.Canvas.prototype.drawCircle=function(d,h,m,r){a.Cd(this.Bd);this._drawCircle(d,h,m,r)};a.Canvas.prototype.drawColor=function(d,h){a.Cd(this.Bd);d=v(d);void 0!==h?this._drawColor(d,h):this._drawColor(d)};a.Canvas.prototype.drawColorInt=function(d,h){a.Cd(this.Bd);
this._drawColorInt(d,h||a.BlendMode.SrcOver)};a.Canvas.prototype.drawColorComponents=function(d,h,m,r,t){a.Cd(this.Bd);d=B(d,h,m,r);void 0!==t?this._drawColor(d,t):this._drawColor(d)};a.Canvas.prototype.drawDRRect=function(d,h,m){a.Cd(this.Bd);d=M(d,pb);h=M(h,Sb);this._drawDRRect(d,h,m)};a.Canvas.prototype.drawImage=function(d,h,m,r){a.Cd(this.Bd);this._drawImage(d,h,m,r||null)};a.Canvas.prototype.drawImageCubic=function(d,h,m,r,t,w){a.Cd(this.Bd);this._drawImageCubic(d,h,m,r,t,w||null)};a.Canvas.prototype.drawImageOptions=
function(d,h,m,r,t,w){a.Cd(this.Bd);this._drawImageOptions(d,h,m,r,t,w||null)};a.Canvas.prototype.drawImageNine=function(d,h,m,r,t){a.Cd(this.Bd);h=k(h,"HEAP32",Ha);m=E(m);this._drawImageNine(d,h,m,r,t||null)};a.Canvas.prototype.drawImageRect=function(d,h,m,r,t){a.Cd(this.Bd);E(h,P);E(m,sa);this._drawImageRect(d,P,sa,r,!!t)};a.Canvas.prototype.drawImageRectCubic=function(d,h,m,r,t,w){a.Cd(this.Bd);E(h,P);E(m,sa);this._drawImageRectCubic(d,P,sa,r,t,w||null)};a.Canvas.prototype.drawImageRectOptions=
function(d,h,m,r,t,w){a.Cd(this.Bd);E(h,P);E(m,sa);this._drawImageRectOptions(d,P,sa,r,t,w||null)};a.Canvas.prototype.drawLine=function(d,h,m,r,t){a.Cd(this.Bd);this._drawLine(d,h,m,r,t)};a.Canvas.prototype.drawOval=function(d,h){a.Cd(this.Bd);d=E(d);this._drawOval(d,h)};a.Canvas.prototype.drawPaint=function(d){a.Cd(this.Bd);this._drawPaint(d)};a.Canvas.prototype.drawParagraph=function(d,h,m){a.Cd(this.Bd);this._drawParagraph(d,h,m)};a.Canvas.prototype.drawPatch=function(d,h,m,r,t){if(24>d.length)throw"Need 12 cubic points";
if(h&&4>h.length)throw"Need 4 colors";if(m&&8>m.length)throw"Need 4 shader coordinates";a.Cd(this.Bd);const w=k(d,"HEAPF32"),z=h?k(c(h),"HEAPU32"):R,J=m?k(m,"HEAPF32"):R;r||(r=a.BlendMode.Modulate);this._drawPatch(w,z,J,r,t);g(J,m);g(z,h);g(w,d)};a.Canvas.prototype.drawPath=function(d,h){a.Cd(this.Bd);this._drawPath(d,h)};a.Canvas.prototype.drawPicture=function(d){a.Cd(this.Bd);this._drawPicture(d)};a.Canvas.prototype.drawPoints=function(d,h,m){a.Cd(this.Bd);var r=k(h,"HEAPF32");this._drawPoints(d,
r,h.length/2,m);g(r,h)};a.Canvas.prototype.drawRRect=function(d,h){a.Cd(this.Bd);d=M(d);this._drawRRect(d,h)};a.Canvas.prototype.drawRect=function(d,h){a.Cd(this.Bd);d=E(d);this._drawRect(d,h)};a.Canvas.prototype.drawRect4f=function(d,h,m,r,t){a.Cd(this.Bd);this._drawRect4f(d,h,m,r,t)};a.Canvas.prototype.drawShadow=function(d,h,m,r,t,w,z){a.Cd(this.Bd);var J=k(t,"HEAPF32"),F=k(w,"HEAPF32");h=k(h,"HEAPF32",qb);m=k(m,"HEAPF32",rb);this._drawShadow(d,h,m,r,J,F,z);g(J,t);g(F,w)};a.getShadowLocalBounds=
function(d,h,m,r,t,w,z){d=q(d);m=k(m,"HEAPF32",qb);r=k(r,"HEAPF32",rb);if(!this._getShadowLocalBounds(d,h,m,r,t,w,P))return null;h=X.toTypedArray();return z?(z.set(h),z):h.slice()};a.Canvas.prototype.drawTextBlob=function(d,h,m,r){a.Cd(this.Bd);this._drawTextBlob(d,h,m,r)};a.Canvas.prototype.drawVertices=function(d,h,m){a.Cd(this.Bd);this._drawVertices(d,h,m)};a.Canvas.prototype.getDeviceClipBounds=function(d){this._getDeviceClipBounds(Ha);var h=Wa.toTypedArray();d?d.set(h):d=h.slice();return d};
a.Canvas.prototype.quickReject=function(d){d=E(d);return this._quickReject(d)};a.Canvas.prototype.getLocalToDevice=function(){this._getLocalToDevice(ca);for(var d=ca,h=Array(16),m=0;16>m;m++)h[m]=a.HEAPF32[d/4+m];return h};a.Canvas.prototype.getTotalMatrix=function(){this._getTotalMatrix(L);for(var d=Array(9),h=0;9>h;h++)d[h]=a.HEAPF32[L/4+h];return d};a.Canvas.prototype.makeSurface=function(d){d=this._makeSurface(d);d.Bd=this.Bd;return d};a.Canvas.prototype.readPixels=function(d,h,m,r,t){a.Cd(this.Bd);
return l(this,d,h,m,r,t)};a.Canvas.prototype.saveLayer=function(d,h,m,r,t){h=E(h);return this._saveLayer(d||null,h,m||null,r||0,t||a.TileMode.Clamp)};a.Canvas.prototype.writePixels=function(d,h,m,r,t,w,z,J){if(d.byteLength%(h*m))throw"pixels length must be a multiple of the srcWidth * srcHeight";a.Cd(this.Bd);var F=d.byteLength/(h*m);w=w||a.AlphaType.Unpremul;z=z||a.ColorType.RGBA_8888;J=J||a.ColorSpace.SRGB;var S=F*h;F=k(d,"HEAPU8");h=this._writePixels({width:h,height:m,colorType:z,alphaType:w,colorSpace:J},
F,S,r,t);g(F,d);return h};a.ColorFilter.MakeBlend=function(d,h,m){d=v(d);m=m||a.ColorSpace.SRGB;return a.ColorFilter._MakeBlend(d,h,m)};a.ColorFilter.MakeMatrix=function(d){if(!d||20!==d.length)throw"invalid color matrix";var h=k(d,"HEAPF32"),m=a.ColorFilter._makeMatrix(h);g(h,d);return m};a.ContourMeasure.prototype.getPosTan=function(d,h){this._getPosTan(d,P);d=X.toTypedArray();return h?(h.set(d),h):d.slice()};a.ImageFilter.prototype.getOutputBounds=function(d,h,m){d=E(d,P);h=q(h);this._getOutputBounds(d,
h,Ha);h=Wa.toTypedArray();return m?(m.set(h),m):h.slice()};a.ImageFilter.MakeDropShadow=function(d,h,m,r,t,w){t=v(t,Y);return a.ImageFilter._MakeDropShadow(d,h,m,r,t,w)};a.ImageFilter.MakeDropShadowOnly=function(d,h,m,r,t,w){t=v(t,Y);return a.ImageFilter._MakeDropShadowOnly(d,h,m,r,t,w)};a.ImageFilter.MakeImage=function(d,h,m,r){m=E(m,P);r=E(r,sa);if("B"in h&&"C"in h)return a.ImageFilter._MakeImageCubic(d,h.B,h.C,m,r);const t=h.filter;let w=a.MipmapMode.None;"mipmap"in h&&(w=h.mipmap);return a.ImageFilter._MakeImageOptions(d,
t,w,m,r)};a.ImageFilter.MakeMatrixTransform=function(d,h,m){d=q(d);if("B"in h&&"C"in h)return a.ImageFilter._MakeMatrixTransformCubic(d,h.B,h.C,m);const r=h.filter;let t=a.MipmapMode.None;"mipmap"in h&&(t=h.mipmap);return a.ImageFilter._MakeMatrixTransformOptions(d,r,t,m)};a.Paint.prototype.getColor=function(){this._getColor(Y);return D(Y)};a.Paint.prototype.setColor=function(d,h){h=h||null;d=v(d);this._setColor(d,h)};a.Paint.prototype.setColorComponents=function(d,h,m,r,t){t=t||null;d=B(d,h,m,r);
this._setColor(d,t)};a.Path.prototype.getPoint=function(d,h){this._getPoint(d,P);d=X.toTypedArray();return h?(h[0]=d[0],h[1]=d[1],h):d.slice(0,2)};a.Picture.prototype.makeShader=function(d,h,m,r,t){r=q(r);t=E(t);return this._makeShader(d,h,m,r,t)};a.Picture.prototype.cullRect=function(d){this._cullRect(P);var h=X.toTypedArray();return d?(d.set(h),d):h.slice()};a.PictureRecorder.prototype.beginRecording=function(d,h){d=E(d);return this._beginRecording(d,!!h)};a.Surface.prototype.getCanvas=function(){var d=
this._getCanvas();d.Bd=this.Bd;return d};a.Surface.prototype.makeImageSnapshot=function(d){a.Cd(this.Bd);d=k(d,"HEAP32",Ha);return this._makeImageSnapshot(d)};a.Surface.prototype.makeSurface=function(d){a.Cd(this.Bd);d=this._makeSurface(d);d.Bd=this.Bd;return d};a.Surface.prototype.De=function(d,h){this.Wd||(this.Wd=this.getCanvas());return requestAnimationFrame(function(){a.Cd(this.Bd);d(this.Wd);this.flush(h)}.bind(this))};a.Surface.prototype.requestAnimationFrame||(a.Surface.prototype.requestAnimationFrame=
a.Surface.prototype.De);a.Surface.prototype.Ae=function(d,h){this.Wd||(this.Wd=this.getCanvas());requestAnimationFrame(function(){a.Cd(this.Bd);d(this.Wd);this.flush(h);this.dispose()}.bind(this))};a.Surface.prototype.drawOnce||(a.Surface.prototype.drawOnce=a.Surface.prototype.Ae);a.PathEffect.MakeDash=function(d,h){h||=0;if(!d.length||1===d.length%2)throw"Intervals array must have even length";var m=k(d,"HEAPF32");h=a.PathEffect._MakeDash(m,d.length,h);g(m,d);return h};a.PathEffect.MakeLine2D=function(d,
h){h=q(h);return a.PathEffect._MakeLine2D(d,h)};a.PathEffect.MakePath2D=function(d,h){d=q(d);return a.PathEffect._MakePath2D(d,h)};a.Shader.MakeColor=function(d,h){h=h||null;d=v(d);return a.Shader._MakeColor(d,h)};a.Shader.Blend=a.Shader.MakeBlend;a.Shader.Color=a.Shader.MakeColor;a.Shader.MakeLinearGradient=function(d,h,m,r,t,w,z,J){J=J||null;var F=n(m),S=k(r,"HEAPF32");z=z||0;w=q(w);var U=X.toTypedArray();U.set(d);U.set(h,2);d=a.Shader._MakeLinearGradient(P,F.Md,F.colorType,S,F.count,t,z,w,J);g(F.Md,
m);r&&g(S,r);return d};a.Shader.MakeRadialGradient=function(d,h,m,r,t,w,z,J){J=J||null;var F=n(m),S=k(r,"HEAPF32");z=z||0;w=q(w);d=a.Shader._MakeRadialGradient(d[0],d[1],h,F.Md,F.colorType,S,F.count,t,z,w,J);g(F.Md,m);r&&g(S,r);return d};a.Shader.MakeSweepGradient=function(d,h,m,r,t,w,z,J,F,S){S=S||null;var U=n(m),ta=k(r,"HEAPF32");z=z||0;J=J||0;F=F||360;w=q(w);d=a.Shader._MakeSweepGradient(d,h,U.Md,U.colorType,ta,U.count,t,J,F,z,w,S);g(U.Md,m);r&&g(ta,r);return d};a.Shader.MakeTwoPointConicalGradient=
function(d,h,m,r,t,w,z,J,F,S){S=S||null;var U=n(t),ta=k(w,"HEAPF32");F=F||0;J=q(J);var Ia=X.toTypedArray();Ia.set(d);Ia.set(m,2);d=a.Shader._MakeTwoPointConicalGradient(P,h,r,U.Md,U.colorType,ta,U.count,z,F,J,S);g(U.Md,t);w&&g(ta,w);return d};a.Vertices.prototype.bounds=function(d){this._bounds(P);var h=X.toTypedArray();return d?(d.set(h),d):h.slice()};a.Fd&&a.Fd.forEach(function(d){d()})};a.computeTonalColors=function(l){var d=k(l.ambient,"HEAPF32"),h=k(l.spot,"HEAPF32");this._computeTonalColors(d,
h);var m={ambient:D(d),spot:D(h)};g(d,l.ambient);g(h,l.spot);return m};a.LTRBRect=function(l,d,h,m){return Float32Array.of(l,d,h,m)};a.XYWHRect=function(l,d,h,m){return Float32Array.of(l,d,l+h,d+m)};a.LTRBiRect=function(l,d,h,m){return Int32Array.of(l,d,h,m)};a.XYWHiRect=function(l,d,h,m){return Int32Array.of(l,d,l+h,d+m)};a.RRectXY=function(l,d,h){return Float32Array.of(l[0],l[1],l[2],l[3],d,h,d,h,d,h,d,h)};a.MakeAnimatedImageFromEncoded=function(l){l=new Uint8Array(l);var d=a._malloc(l.byteLength);
a.HEAPU8.set(l,d);return(l=a._decodeAnimatedImage(d,l.byteLength))?l:null};a.MakeImageFromEncoded=function(l){l=new Uint8Array(l);var d=a._malloc(l.byteLength);a.HEAPU8.set(l,d);return(l=a._decodeImage(d,l.byteLength))?l:null};var Xa=null;a.MakeImageFromCanvasImageSource=function(l){var d=a.ee(l),h=a.de(l);Xa||=document.createElement("canvas");Xa.width=d;Xa.height=h;var m=Xa.getContext("2d",{willReadFrequently:!0});m.drawImage(l,0,0);l=m.getImageData(0,0,d,h);return a.MakeImage({width:d,height:h,
alphaType:a.AlphaType.Unpremul,colorType:a.ColorType.RGBA_8888,colorSpace:a.ColorSpace.SRGB},l.data,4*d)};a.MakeImage=function(l,d,h){var m=a._malloc(d.length);a.HEAPU8.set(d,m);return a._MakeImage(l,m,d.length,h)};a.MakeVertices=function(l,d,h,m,r,t){var w=r&&r.length||0,z=0;h&&h.length&&(z|=1);m&&m.length&&(z|=2);void 0===t||t||(z|=4);l=new a._VerticesBuilder(l,d.length/2,w,z);k(d,"HEAPF32",l.positions());l.texCoords()&&k(h,"HEAPF32",l.texCoords());l.colors()&&k(c(m),"HEAPU32",l.colors());l.indices()&&
k(r,"HEAPU16",l.indices());return l.detach()};(function(l){l.Fd=l.Fd||[];l.Fd.push(function(){l.Bidi.getBidiRegions=function(d,h){if((d=l.Bidi._getBidiRegions(d,h===l.TextDirection.LTR?1:0))&&d.length){h=[];for(let m=0;m<d.length;m+=3)h.push({start:d[m],end:d[m+1],level:d[m+2]});d=h}else d=[];return d};l.Bidi.reorderVisual=function(d){var h=k(d,"HEAPU8"),m=l.Bidi._reorderVisual(h,d&&d.length||0);g(h,d);if(m&&m.length){d=[];for(h=0;h<m.length;h+=1)d.push({index:m[h]});m=d}else m=[];return m};l.CodeUnits.compute=
function(d){if((d=l.CodeUnits._compute(d))&&d.length){var h=[];for(let m=0;m<d.length;m+=1)h.push({flags:d[m]});d=h}else d=[];return d};l.TextDirection||(l.TextDirection={LTR:{value:1},RTL:{value:0}})})})(p);a.Fd=a.Fd||[];a.Fd.push(function(){});a.Fd=a.Fd||[];a.Fd.push(function(){a.MakePicture=function(l){l=new Uint8Array(l);var d=a._malloc(l.byteLength);a.HEAPU8.set(l,d);return(l=a._MakePicture(d,l.byteLength))?l:null}});a.Fd=a.Fd||[];a.Fd.push(function(){a.RuntimeEffect.Make=function(l,d){return a.RuntimeEffect._Make(l,
{onError:d||function(h){console.log("RuntimeEffect error",h)}})};a.RuntimeEffect.MakeForBlender=function(l,d){return a.RuntimeEffect._MakeForBlender(l,{onError:d||function(h){console.log("RuntimeEffect error",h)}})};a.RuntimeEffect.prototype.makeShader=function(l,d){var h=!l._ck,m=k(l,"HEAPF32");d=q(d);return this._makeShader(m,4*l.length,h,d)};a.RuntimeEffect.prototype.makeShaderWithChildren=function(l,d,h){var m=!l._ck,r=k(l,"HEAPF32");h=q(h);for(var t=[],w=0;w<d.length;w++)t.push(d[w].Ad.Dd);d=
k(t,"HEAPU32");return this._makeShaderWithChildren(r,4*l.length,m,d,t.length,h)};a.RuntimeEffect.prototype.makeBlender=function(l){var d=!l._ck,h=k(l,"HEAPF32");return this._makeBlender(h,4*l.length,d)}})})(p);var ma=Object.assign({},p),na="",oa,pa;
if(ea||fa)fa?na=self.location.href:"undefined"!=typeof document&&document.currentScript&&(na=document.currentScript.src),_scriptName&&(na=_scriptName),na.startsWith("blob:")?na="":na=na.substr(0,na.replace(/[?#].*/,"").lastIndexOf("/")+1),fa&&(pa=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),oa=a=>fetch(a,{credentials:"same-origin"}).then(b=>b.ok?b.arrayBuffer():Promise.reject(Error(b.status+" : "+b.url)));
var qa=console.log.bind(console),ra=console.error.bind(console);Object.assign(p,ma);ma=null;var ua,va=!1,wa,y,xa,ya,A,C,G,Aa;function Ba(){var a=ua.buffer;p.HEAP8=wa=new Int8Array(a);p.HEAP16=xa=new Int16Array(a);p.HEAPU8=y=new Uint8Array(a);p.HEAPU16=ya=new Uint16Array(a);p.HEAP32=A=new Int32Array(a);p.HEAPU32=C=new Uint32Array(a);p.HEAPF32=G=new Float32Array(a);p.HEAPF64=Aa=new Float64Array(a)}var Ca=[],Da=[],Ea=[],Fa=0,Ga=null,Ja=null;
function Ka(a){a="Aborted("+a+")";ra(a);va=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var La=a=>a.startsWith("data:application/octet-stream;base64,"),Ma;function Na(a){return oa(a).then(b=>new Uint8Array(b),()=>{if(pa)var b=pa(a);else throw"both async and sync fetching of the wasm failed";return b})}function Oa(a,b,c){return Na(a).then(e=>WebAssembly.instantiate(e,b)).then(c,e=>{ra(`failed to asynchronously prepare wasm: ${e}`);Ka(e)})}
function Pa(a,b){var c=Ma;return"function"!=typeof WebAssembly.instantiateStreaming||La(c)||"function"!=typeof fetch?Oa(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){ra(`wasm streaming compile failed: ${f}`);ra("falling back to ArrayBuffer instantiation");return Oa(c,a,b)}))}var Qa=a=>{a.forEach(b=>b(p))};class Ra{constructor(a){this.Dd=a-24}}var Sa=0,Ta=0,Ua={},Va=a=>{for(;a.length;){var b=a.pop();a.pop()(b)}};
function Ya(a){return this.fromWireType(C[a>>2])}var Za={},$a={},ab={},bb,db=(a,b,c)=>{function e(n){n=c(n);if(n.length!==a.length)throw new bb("Mismatched type converter count");for(var q=0;q<a.length;++q)cb(a[q],n[q])}a.forEach(n=>ab[n]=b);var f=Array(b.length),g=[],k=0;b.forEach((n,q)=>{$a.hasOwnProperty(n)?f[q]=$a[n]:(g.push(n),Za.hasOwnProperty(n)||(Za[n]=[]),Za[n].push(()=>{f[q]=$a[n];++k;k===g.length&&e(f)}))});0===g.length&&e(f)},eb,H=a=>{for(var b="";y[a];)b+=eb[y[a++]];return b},I;
function fb(a,b,c={}){var e=b.name;if(!a)throw new I(`type "${e}" must have a positive integer typeid pointer`);if($a.hasOwnProperty(a)){if(c.Pe)return;throw new I(`Cannot register type '${e}' twice`);}$a[a]=b;delete ab[a];Za.hasOwnProperty(a)&&(b=Za[a],delete Za[a],b.forEach(f=>f()))}function cb(a,b,c={}){return fb(a,b,c)}
var gb=a=>{throw new I(a.Ad.Gd.Ed.name+" instance already deleted");},hb=!1,ib=()=>{},jb=(a,b,c)=>{if(b===c)return a;if(void 0===c.Jd)return null;a=jb(a,b,c.Jd);return null===a?null:c.He(a)},kb={},lb={},mb=(a,b)=>{if(void 0===b)throw new I("ptr should not be undefined");for(;a.Jd;)b=a.ae(b),a=a.Jd;return lb[b]},ob=(a,b)=>{if(!b.Gd||!b.Dd)throw new bb("makeClassHandle requires ptr and ptrType");if(!!b.Kd!==!!b.Hd)throw new bb("Both smartPtrType and smartPtr must be specified");b.count={value:1};return nb(Object.create(a,
{Ad:{value:b,writable:!0}}))},nb=a=>{if("undefined"===typeof FinalizationRegistry)return nb=b=>b,a;hb=new FinalizationRegistry(b=>{b=b.Ad;--b.count.value;0===b.count.value&&(b.Hd?b.Kd.Qd(b.Hd):b.Gd.Ed.Qd(b.Dd))});nb=b=>{var c=b.Ad;c.Hd&&hb.register(b,{Ad:c},b);return b};ib=b=>{hb.unregister(b)};return nb(a)},sb=[];function tb(){}
var ub=(a,b)=>Object.defineProperty(b,"name",{value:a}),vb=(a,b,c)=>{if(void 0===a[b].Id){var e=a[b];a[b]=function(...f){if(!a[b].Id.hasOwnProperty(f.length))throw new I(`Function '${c}' called with an invalid number of arguments (${f.length}) - expects one of (${a[b].Id})!`);return a[b].Id[f.length].apply(this,f)};a[b].Id=[];a[b].Id[e.Rd]=e}},wb=(a,b,c)=>{if(p.hasOwnProperty(a)){if(void 0===c||void 0!==p[a].Id&&void 0!==p[a].Id[c])throw new I(`Cannot register public name '${a}' twice`);vb(p,a,a);
if(p[a].Id.hasOwnProperty(c))throw new I(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);p[a].Id[c]=b}else p[a]=b,p[a].Rd=c},xb=a=>{a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a};function yb(a,b,c,e,f,g,k,n){this.name=a;this.constructor=b;this.Vd=c;this.Qd=e;this.Jd=f;this.Ke=g;this.ae=k;this.He=n;this.Se=[]}
var zb=(a,b,c)=>{for(;b!==c;){if(!b.ae)throw new I(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);a=b.ae(a);b=b.Jd}return a};function Ab(a,b){if(null===b){if(this.oe)throw new I(`null is not a valid ${this.name}`);return 0}if(!b.Ad)throw new I(`Cannot pass "${Bb(b)}" as a ${this.name}`);if(!b.Ad.Dd)throw new I(`Cannot pass deleted object as a pointer of type ${this.name}`);return zb(b.Ad.Dd,b.Ad.Gd.Ed,this.Ed)}
function Cb(a,b){if(null===b){if(this.oe)throw new I(`null is not a valid ${this.name}`);if(this.he){var c=this.pe();null!==a&&a.push(this.Qd,c);return c}return 0}if(!b||!b.Ad)throw new I(`Cannot pass "${Bb(b)}" as a ${this.name}`);if(!b.Ad.Dd)throw new I(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ge&&b.Ad.Gd.ge)throw new I(`Cannot convert argument of type ${b.Ad.Kd?b.Ad.Kd.name:b.Ad.Gd.name} to parameter type ${this.name}`);c=zb(b.Ad.Dd,b.Ad.Gd.Ed,this.Ed);if(this.he){if(void 0===
b.Ad.Hd)throw new I("Passing raw pointer to smart pointer is illegal");switch(this.Xe){case 0:if(b.Ad.Kd===this)c=b.Ad.Hd;else throw new I(`Cannot convert argument of type ${b.Ad.Kd?b.Ad.Kd.name:b.Ad.Gd.name} to parameter type ${this.name}`);break;case 1:c=b.Ad.Hd;break;case 2:if(b.Ad.Kd===this)c=b.Ad.Hd;else{var e=b.clone();c=this.Te(c,Db(()=>e["delete"]()));null!==a&&a.push(this.Qd,c)}break;default:throw new I("Unsupporting sharing policy");}}return c}
function Eb(a,b){if(null===b){if(this.oe)throw new I(`null is not a valid ${this.name}`);return 0}if(!b.Ad)throw new I(`Cannot pass "${Bb(b)}" as a ${this.name}`);if(!b.Ad.Dd)throw new I(`Cannot pass deleted object as a pointer of type ${this.name}`);if(b.Ad.Gd.ge)throw new I(`Cannot convert argument of type ${b.Ad.Gd.name} to parameter type ${this.name}`);return zb(b.Ad.Dd,b.Ad.Gd.Ed,this.Ed)}
function Fb(a,b,c,e,f,g,k,n,q,u,v){this.name=a;this.Ed=b;this.oe=c;this.ge=e;this.he=f;this.Re=g;this.Xe=k;this.we=n;this.pe=q;this.Te=u;this.Qd=v;f||void 0!==b.Jd?this.toWireType=Cb:(this.toWireType=e?Ab:Eb,this.Nd=null)}
var Gb=(a,b,c)=>{if(!p.hasOwnProperty(a))throw new bb("Replacing nonexistent public symbol");void 0!==p[a].Id&&void 0!==c?p[a].Id[c]=b:(p[a]=b,p[a].Rd=c)},Hb,Ib=(a,b,c=[])=>{a.includes("j")?(a=a.replace(/p/g,"i"),b=(0,p["dynCall_"+a])(b,...c)):b=Hb.get(b)(...c);return b},Jb=(a,b)=>(...c)=>Ib(a,b,c),K=(a,b)=>{a=H(a);var c=a.includes("j")?Jb(a,b):Hb.get(b);if("function"!=typeof c)throw new I(`unknown function pointer with signature ${a}: ${b}`);return c},Kb,Tb=a=>{a=Lb(a);var b=H(a);Mb(a);return b},
Ub=(a,b)=>{function c(g){f[g]||$a[g]||(ab[g]?ab[g].forEach(c):(e.push(g),f[g]=!0))}var e=[],f={};b.forEach(c);throw new Kb(`${a}: `+e.map(Tb).join([", "]));};function Vb(a){for(var b=1;b<a.length;++b)if(null!==a[b]&&void 0===a[b].Nd)return!0;return!1}
function Wb(a,b,c,e,f){var g=b.length;if(2>g)throw new I("argTypes array size mismatch! Must at least get return value and 'this' types!");var k=null!==b[1]&&null!==c,n=Vb(b),q="void"!==b[0].name,u=g-2,v=Array(u),B=[],D=[];return ub(a,function(...E){D.length=0;B.length=k?2:1;B[0]=f;if(k){var M=b[1].toWireType(D,this);B[1]=M}for(var L=0;L<u;++L)v[L]=b[L+2].toWireType(D,E[L]),B.push(v[L]);E=e(...B);if(n)Va(D);else for(L=k?1:2;L<b.length;L++){var W=1===L?M:v[L-2];null!==b[L].Nd&&b[L].Nd(W)}M=q?b[0].fromWireType(E):
void 0;return M})}
var Xb=(a,b)=>{for(var c=[],e=0;e<a;e++)c.push(C[b+4*e>>2]);return c},Yb=a=>{a=a.trim();const b=a.indexOf("(");return-1!==b?a.substr(0,b):a},Zb=[],$b=[],ac=a=>{9<a&&0===--$b[a+1]&&($b[a]=void 0,Zb.push(a))},bc=a=>{if(!a)throw new I("Cannot use deleted val. handle = "+a);return $b[a]},Db=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=Zb.pop()||$b.length;$b[b]=a;$b[b+1]=1;return b}},cc={name:"emscripten::val",fromWireType:a=>{var b=bc(a);ac(a);
return b},toWireType:(a,b)=>Db(b),Ld:8,readValueFromPointer:Ya,Nd:null},dc=(a,b,c)=>{switch(b){case 1:return c?function(e){return this.fromWireType(wa[e])}:function(e){return this.fromWireType(y[e])};case 2:return c?function(e){return this.fromWireType(xa[e>>1])}:function(e){return this.fromWireType(ya[e>>1])};case 4:return c?function(e){return this.fromWireType(A[e>>2])}:function(e){return this.fromWireType(C[e>>2])};default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},ec=(a,b)=>
{var c=$a[a];if(void 0===c)throw a=`${b} has unknown type ${Tb(a)}`,new I(a);return c},Bb=a=>{if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a},fc=(a,b)=>{switch(b){case 4:return function(c){return this.fromWireType(G[c>>2])};case 8:return function(c){return this.fromWireType(Aa[c>>3])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}},gc=(a,b,c)=>{switch(b){case 1:return c?e=>wa[e]:e=>y[e];case 2:return c?e=>xa[e>>1]:e=>ya[e>>
1];case 4:return c?e=>A[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},hc=(a,b,c)=>{var e=y;if(!(0<c))return 0;var f=b;c=b+c-1;for(var g=0;g<a.length;++g){var k=a.charCodeAt(g);if(55296<=k&&57343>=k){var n=a.charCodeAt(++g);k=65536+((k&1023)<<10)|n&1023}if(127>=k){if(b>=c)break;e[b++]=k}else{if(2047>=k){if(b+1>=c)break;e[b++]=192|k>>6}else{if(65535>=k){if(b+2>=c)break;e[b++]=224|k>>12}else{if(b+3>=c)break;e[b++]=240|k>>18;e[b++]=128|k>>12&63}e[b++]=128|k>>6&
63}e[b++]=128|k&63}}e[b]=0;return b-f},ic=a=>{for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);127>=e?b++:2047>=e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},jc="undefined"!=typeof TextDecoder?new TextDecoder:void 0,kc=(a,b=0,c=NaN)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16<c-b&&a.buffer&&jc)return jc.decode(a.subarray(b,c));for(e="";b<c;){var f=a[b++];if(f&128){var g=a[b++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|g);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|k:
(f&7)<<18|g<<12|k<<6|a[b++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e},lc="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,mc=(a,b)=>{var c=a>>1;for(var e=c+b/2;!(c>=e)&&ya[c];)++c;c<<=1;if(32<c-a&&lc)return lc.decode(y.subarray(a,c));c="";for(e=0;!(e>=b/2);++e){var f=xa[a+2*e>>1];if(0==f)break;c+=String.fromCharCode(f)}return c},nc=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var e=
b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)xa[b>>1]=a.charCodeAt(f),b+=2;xa[b>>1]=0;return b-e},oc=a=>2*a.length,pc=(a,b)=>{for(var c=0,e="";!(c>=b/4);){var f=A[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e},qc=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}A[b>>2]=g;b+=
4;if(b+4>c)break}A[b>>2]=0;return b-e},rc=a=>{for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);55296<=e&&57343>=e&&++c;b+=4}return b},sc=(a,b,c)=>{var e=[];a=a.toWireType(e,c);e.length&&(C[b>>2]=Db(e));return a},tc=[],uc={},vc=a=>{var b=uc[a];return void 0===b?H(a):b},wc=()=>{function a(b){b.$$$embind_global$$$=b;var c="object"==typeof $$$embind_global$$$&&b.$$$embind_global$$$==b;c||delete b.$$$embind_global$$$;return c}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.");},xc=a=>{var b=tc.length;tc.push(a);return b},yc=(a,b)=>{for(var c=Array(a),e=0;e<a;++e)c[e]=ec(C[b+4*e>>2],"parameter "+e);return c},zc=Reflect.construct,N,Ac=a=>{var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=(c,e)=>b.vertexAttribDivisorANGLE(c,
e),a.drawArraysInstanced=(c,e,f,g)=>b.drawArraysInstancedANGLE(c,e,f,g),a.drawElementsInstanced=(c,e,f,g,k)=>b.drawElementsInstancedANGLE(c,e,f,g,k))},Bc=a=>{var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=()=>b.createVertexArrayOES(),a.deleteVertexArray=c=>b.deleteVertexArrayOES(c),a.bindVertexArray=c=>b.bindVertexArrayOES(c),a.isVertexArray=c=>b.isVertexArrayOES(c))},Cc=a=>{var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=(c,e)=>b.drawBuffersWEBGL(c,e))},Dc=a=>
{var b="ANGLE_instanced_arrays EXT_blend_minmax EXT_disjoint_timer_query EXT_frag_depth EXT_shader_texture_lod EXT_sRGB OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_depth_texture WEBGL_draw_buffers EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_clip_control EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_polygon_offset_clamp EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw WEBGL_polygon_mode".split(" ");
return(a.getSupportedExtensions()||[]).filter(c=>b.includes(c))},Ec=1,Fc=[],Gc=[],Hc=[],Ic=[],ia=[],Jc=[],Kc=[],la=[],O=[],Lc=[],Mc=[],Nc={},Oc={},Qc=4,Rc=0,ha=a=>{for(var b=Ec++,c=a.length;c<b;c++)a[c]=null;return b},Sc=(a,b,c,e)=>{for(var f=0;f<a;f++){var g=N[c](),k=g&&ha(e);g?(g.name=k,e[k]=g):Q||=1282;A[b+4*f>>2]=k}},ja=(a,b)=>{a.re||(a.re=a.getContext,a.getContext=function(e,f){f=a.re(e,f);return"webgl"==e==f instanceof WebGLRenderingContext?f:null});var c=1<b.majorVersion?a.getContext("webgl2",
b):a.getContext("webgl",b);return c?Tc(c,b):0},Tc=(a,b)=>{var c=ha(la),e={handle:c,attributes:b,version:b.majorVersion,Od:a};a.canvas&&(a.canvas.ze=e);la[c]=e;("undefined"==typeof b.Ie||b.Ie)&&Uc(e);return c},ka=a=>{x=la[a];p.Ye=N=x?.Od;return!(a&&!N)},Uc=a=>{a||=x;if(!a.Qe){a.Qe=!0;var b=a.Od;b.bf=b.getExtension("WEBGL_multi_draw");b.$e=b.getExtension("EXT_polygon_offset_clamp");b.Ze=b.getExtension("EXT_clip_control");b.df=b.getExtension("WEBGL_polygon_mode");Ac(b);Bc(b);Cc(b);b.te=b.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");
b.ve=b.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");2<=a.version&&(b.Pd=b.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>a.version||!b.Pd)b.Pd=b.getExtension("EXT_disjoint_timer_query");Dc(b).forEach(c=>{c.includes("lose_context")||c.includes("debug")||b.getExtension(c)})}},x,Q,Vc=(a,b)=>{N.bindFramebuffer(a,Hc[b])},Wc=a=>{N.bindVertexArray(Kc[a])},Xc=a=>N.clear(a),Yc=(a,b,c,e)=>N.clearColor(a,b,c,e),Zc=a=>N.clearStencil(a),$c=(a,b)=>{for(var c=0;c<a;c++){var e=A[b+
4*c>>2];N.deleteVertexArray(Kc[e]);Kc[e]=null}},ad=[],bd=(a,b)=>{Sc(a,b,"createVertexArray",Kc)};function cd(){var a=Dc(N);return a=a.concat(a.map(b=>"GL_"+b))}
var dd=(a,b,c)=>{if(b){var e=void 0;switch(a){case 36346:e=1;break;case 36344:0!=c&&1!=c&&(Q||=1280);return;case 34814:case 36345:e=0;break;case 34466:var f=N.getParameter(34467);e=f?f.length:0;break;case 33309:if(2>x.version){Q||=1282;return}e=cd().length;break;case 33307:case 33308:if(2>x.version){Q||=1280;return}e=33307==a?3:0}if(void 0===e)switch(f=N.getParameter(a),typeof f){case "number":e=f;break;case "boolean":e=f?1:0;break;case "string":Q||=1280;return;case "object":if(null===f)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:e=
0;break;default:Q||=1280;return}else{if(f instanceof Float32Array||f instanceof Uint32Array||f instanceof Int32Array||f instanceof Array){for(a=0;a<f.length;++a)switch(c){case 0:A[b+4*a>>2]=f[a];break;case 2:G[b+4*a>>2]=f[a];break;case 4:wa[b+a]=f[a]?1:0}return}try{e=f.name|0}catch(g){Q||=1280;ra(`GL_INVALID_ENUM in glGet${c}v: Unknown object returned from WebGL getParameter(${a})! (error: ${g})`);return}}break;default:Q||=1280;ra(`GL_INVALID_ENUM in glGet${c}v: Native code calling glGet${c}v(${a}) and it returns ${f} of type ${typeof f}!`);
return}switch(c){case 1:c=e;C[b>>2]=c;C[b+4>>2]=(c-C[b>>2])/4294967296;break;case 0:A[b>>2]=e;break;case 2:G[b>>2]=e;break;case 4:wa[b]=e?1:0}}else Q||=1281},ed=(a,b)=>dd(a,b,0),fd=(a,b,c)=>{if(c){a=O[a];b=2>x.version?N.Pd.getQueryObjectEXT(a,b):N.getQueryParameter(a,b);var e;"boolean"==typeof b?e=b?1:0:e=b;C[c>>2]=e;C[c+4>>2]=(e-C[c>>2])/4294967296}else Q||=1281},hd=a=>{var b=ic(a)+1,c=gd(b);c&&hc(a,c,b);return c},jd=a=>{var b=Nc[a];if(!b){switch(a){case 7939:b=hd(cd().join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=
N.getParameter(a))||(Q||=1280);b=b?hd(b):0;break;case 7938:b=N.getParameter(7938);var c=`OpenGL ES 2.0 (${b})`;2<=x.version&&(c=`OpenGL ES 3.0 (${b})`);b=hd(c);break;case 35724:b=N.getParameter(35724);c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b=`OpenGL ES GLSL ES ${c[1]} (${b})`);b=hd(b);break;default:Q||=1280}Nc[a]=b}return b},kd=(a,b)=>{if(2>x.version)return Q||=1282,0;var c=Oc[a];if(c)return 0>b||b>=c.length?(Q||=1281,0):c[b];switch(a){case 7939:return c=
cd().map(hd),c=Oc[a]=c,0>b||b>=c.length?(Q||=1281,0):c[b];default:return Q||=1280,0}},ld=a=>"]"==a.slice(-1)&&a.lastIndexOf("["),md=a=>{a-=5120;return 0==a?wa:1==a?y:2==a?xa:4==a?A:6==a?G:5==a||28922==a||28520==a||30779==a||30782==a?C:ya},nd=(a,b,c,e,f)=>{a=md(a);b=e*((Rc||c)*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*a.BYTES_PER_ELEMENT+Qc-1&-Qc);return a.subarray(f>>>31-Math.clz32(a.BYTES_PER_ELEMENT),f+b>>>31-Math.clz32(a.BYTES_PER_ELEMENT))},V=a=>{var b=N.Ge;if(b){var c=
b.$d[a];"number"==typeof c&&(b.$d[a]=c=N.getUniformLocation(b,b.xe[a]+(0<c?`[${c}]`:"")));return c}Q||=1282},od=[],pd=[],qd={},sd=()=>{if(!rd){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:"./this.program"},b;for(b in qd)void 0===qd[b]?delete a[b]:a[b]=qd[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);rd=c}return rd},rd,td=[null,[],[]];
bb=p.InternalError=class extends Error{constructor(a){super(a);this.name="InternalError"}};for(var ud=Array(256),vd=0;256>vd;++vd)ud[vd]=String.fromCharCode(vd);eb=ud;I=p.BindingError=class extends Error{constructor(a){super(a);this.name="BindingError"}};
Object.assign(tb.prototype,{isAliasOf:function(a){if(!(this instanceof tb&&a instanceof tb))return!1;var b=this.Ad.Gd.Ed,c=this.Ad.Dd;a.Ad=a.Ad;var e=a.Ad.Gd.Ed;for(a=a.Ad.Dd;b.Jd;)c=b.ae(c),b=b.Jd;for(;e.Jd;)a=e.ae(a),e=e.Jd;return b===e&&c===a},clone:function(){this.Ad.Dd||gb(this);if(this.Ad.Zd)return this.Ad.count.value+=1,this;var a=nb,b=Object,c=b.create,e=Object.getPrototypeOf(this),f=this.Ad;a=a(c.call(b,e,{Ad:{value:{count:f.count,Yd:f.Yd,Zd:f.Zd,Dd:f.Dd,Gd:f.Gd,Hd:f.Hd,Kd:f.Kd}}}));a.Ad.count.value+=
1;a.Ad.Yd=!1;return a},["delete"](){this.Ad.Dd||gb(this);if(this.Ad.Yd&&!this.Ad.Zd)throw new I("Object already scheduled for deletion");ib(this);var a=this.Ad;--a.count.value;0===a.count.value&&(a.Hd?a.Kd.Qd(a.Hd):a.Gd.Ed.Qd(a.Dd));this.Ad.Zd||(this.Ad.Hd=void 0,this.Ad.Dd=void 0)},isDeleted:function(){return!this.Ad.Dd},deleteLater:function(){this.Ad.Dd||gb(this);if(this.Ad.Yd&&!this.Ad.Zd)throw new I("Object already scheduled for deletion");sb.push(this);this.Ad.Yd=!0;return this}});
Object.assign(Fb.prototype,{Le(a){this.we&&(a=this.we(a));return a},se(a){this.Qd?.(a)},Ld:8,readValueFromPointer:Ya,fromWireType:function(a){function b(){return this.he?ob(this.Ed.Vd,{Gd:this.Re,Dd:c,Kd:this,Hd:a}):ob(this.Ed.Vd,{Gd:this,Dd:a})}var c=this.Le(a);if(!c)return this.se(a),null;var e=mb(this.Ed,c);if(void 0!==e){if(0===e.Ad.count.value)return e.Ad.Dd=c,e.Ad.Hd=a,e.clone();e=e.clone();this.se(a);return e}e=this.Ed.Ke(c);e=kb[e];if(!e)return b.call(this);e=this.ge?e.Fe:e.pointerType;var f=
jb(c,this.Ed,e.Ed);return null===f?b.call(this):this.he?ob(e.Ed.Vd,{Gd:e,Dd:f,Kd:this,Hd:a}):ob(e.Ed.Vd,{Gd:e,Dd:f})}});Kb=p.UnboundTypeError=((a,b)=>{var c=ub(b,function(e){this.name=b;this.message=e;e=Error(e).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(a.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`};return c})(Error,"UnboundTypeError");
$b.push(0,1,void 0,1,null,1,!0,1,!1,1);p.count_emval_handles=()=>$b.length/2-5-Zb.length;for(var wd=0;32>wd;++wd)ad.push(Array(wd));var xd=new Float32Array(288);for(wd=0;288>=wd;++wd)od[wd]=xd.subarray(0,wd);var yd=new Int32Array(288);for(wd=0;288>=wd;++wd)pd[wd]=yd.subarray(0,wd);
var Id={w:(a,b,c)=>{var e=new Ra(a);C[e.Dd+16>>2]=0;C[e.Dd+4>>2]=b;C[e.Dd+8>>2]=c;Sa=a;Ta++;throw Sa;},$c:()=>{Ka("")},B:a=>{var b=Ua[a];delete Ua[a];var c=b.pe,e=b.Qd,f=b.ue,g=f.map(k=>k.Oe).concat(f.map(k=>k.Ve));db([a],g,k=>{var n={};f.forEach((q,u)=>{var v=k[u],B=q.Me,D=q.Ne,E=k[u+f.length],M=q.Ue,L=q.We;n[q.Je]={read:W=>v.fromWireType(B(D,W)),write:(W,ca)=>{var T=[];M(L,W,E.toWireType(T,ca));Va(T)}}});return[{name:b.name,fromWireType:q=>{var u={},v;for(v in n)u[v]=n[v].read(q);e(q);return u},
toWireType:(q,u)=>{for(var v in n)if(!(v in u))throw new TypeError(`Missing field: "${v}"`);var B=c();for(v in n)n[v].write(B,u[v]);null!==q&&q.push(e,B);return B},Ld:8,readValueFromPointer:Ya,Nd:e}]})},L:()=>{},_c:(a,b,c,e)=>{b=H(b);cb(a,{name:b,fromWireType:function(f){return!!f},toWireType:function(f,g){return g?c:e},Ld:8,readValueFromPointer:function(f){return this.fromWireType(y[f])},Nd:null})},d:(a,b,c,e,f,g,k,n,q,u,v,B,D)=>{v=H(v);g=K(f,g);n&&=K(k,n);u&&=K(q,u);D=K(B,D);var E=xb(v);wb(E,function(){Ub(`Cannot construct ${v} due to unbound types`,
[e])});db([a,b,c],e?[e]:[],M=>{M=M[0];if(e){var L=M.Ed;var W=L.Vd}else W=tb.prototype;M=ub(v,function(...za){if(Object.getPrototypeOf(this)!==ca)throw new I("Use 'new' to construct "+v);if(void 0===T.Sd)throw new I(v+" has no accessible constructor");var X=T.Sd[za.length];if(void 0===X)throw new I(`Tried to invoke ctor of ${v} with invalid number of parameters (${za.length}) - expected (${Object.keys(T.Sd).toString()}) parameters instead!`);return X.apply(this,za)});var ca=Object.create(W,{constructor:{value:M}});
M.prototype=ca;var T=new yb(v,M,ca,D,L,g,n,u);if(T.Jd){var Y;(Y=T.Jd).be??(Y.be=[]);T.Jd.be.push(T)}L=new Fb(v,T,!0,!1,!1);Y=new Fb(v+"*",T,!1,!1,!1);W=new Fb(v+" const*",T,!1,!0,!1);kb[a]={pointerType:Y,Fe:W};Gb(E,M);return[L,Y,W]})},c:(a,b,c,e,f,g,k)=>{var n=Xb(c,e);b=H(b);b=Yb(b);g=K(f,g);db([],[a],q=>{function u(){Ub(`Cannot call ${v} due to unbound types`,n)}q=q[0];var v=`${q.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var B=q.Ed.constructor;void 0===B[b]?(u.Rd=c-1,B[b]=u):(vb(B,
b,v),B[b].Id[c-1]=u);db([],n,D=>{D=[D[0],null].concat(D.slice(1));D=Wb(v,D,null,g,k);void 0===B[b].Id?(D.Rd=c-1,B[b]=D):B[b].Id[c-1]=D;if(q.Ed.be)for(const E of q.Ed.be)E.constructor.hasOwnProperty(b)||(E.constructor[b]=D);return[]});return[]})},s:(a,b,c,e,f,g)=>{var k=Xb(b,c);f=K(e,f);db([],[a],n=>{n=n[0];var q=`constructor ${n.name}`;void 0===n.Ed.Sd&&(n.Ed.Sd=[]);if(void 0!==n.Ed.Sd[b-1])throw new I(`Cannot register multiple constructors with identical number of parameters (${b-1}) for class '${n.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
n.Ed.Sd[b-1]=()=>{Ub(`Cannot construct ${n.name} due to unbound types`,k)};db([],k,u=>{u.splice(1,0,null);n.Ed.Sd[b-1]=Wb(q,u,null,f,g);return[]});return[]})},a:(a,b,c,e,f,g,k,n)=>{var q=Xb(c,e);b=H(b);b=Yb(b);g=K(f,g);db([],[a],u=>{function v(){Ub(`Cannot call ${B} due to unbound types`,q)}u=u[0];var B=`${u.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);n&&u.Ed.Se.push(b);var D=u.Ed.Vd,E=D[b];void 0===E||void 0===E.Id&&E.className!==u.name&&E.Rd===c-2?(v.Rd=c-2,v.className=u.name,D[b]=
v):(vb(D,b,B),D[b].Id[c-2]=v);db([],q,M=>{M=Wb(B,M,u,g,k);void 0===D[b].Id?(M.Rd=c-2,D[b]=M):D[b].Id[c-2]=M;return[]});return[]})},n:(a,b,c)=>{a=H(a);db([],[b],e=>{e=e[0];p[a]=e.fromWireType(c);return[]})},Zc:a=>cb(a,cc),f:(a,b,c,e)=>{function f(){}b=H(b);f.values={};cb(a,{name:b,constructor:f,fromWireType:function(g){return this.constructor.values[g]},toWireType:(g,k)=>k.value,Ld:8,readValueFromPointer:dc(b,c,e),Nd:null});wb(b,f)},b:(a,b,c)=>{var e=ec(a,"enum");b=H(b);a=e.constructor;e=Object.create(e.constructor.prototype,
{value:{value:c},constructor:{value:ub(`${e.name}_${b}`,function(){})}});a.values[c]=e;a[b]=e},J:(a,b,c)=>{b=H(b);cb(a,{name:b,fromWireType:e=>e,toWireType:(e,f)=>f,Ld:8,readValueFromPointer:fc(b,c),Nd:null})},l:(a,b,c,e,f,g)=>{var k=Xb(b,c);a=H(a);a=Yb(a);f=K(e,f);wb(a,function(){Ub(`Cannot call ${a} due to unbound types`,k)},b-1);db([],k,n=>{n=[n[0],null].concat(n.slice(1));Gb(a,Wb(a,n,null,f,g),b-1);return[]})},r:(a,b,c,e,f)=>{b=H(b);-1===f&&(f=4294967295);f=n=>n;if(0===e){var g=32-8*c;f=n=>n<<
g>>>g}var k=b.includes("unsigned")?function(n,q){return q>>>0}:function(n,q){return q};cb(a,{name:b,fromWireType:f,toWireType:k,Ld:8,readValueFromPointer:gc(b,c,0!==e),Nd:null})},g:(a,b,c)=>{function e(g){return new f(wa.buffer,C[g+4>>2],C[g>>2])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=H(c);cb(a,{name:c,fromWireType:e,Ld:8,readValueFromPointer:e},{Pe:!0})},j:(a,b,c,e,f,g,k,n,q,u,v,B)=>{c=H(c);g=K(f,g);n=K(k,n);u=K(q,u);B=K(v,B);db([a],
[b],D=>{D=D[0];return[new Fb(c,D.Ed,!1,!1,!0,D,e,g,n,u,B)]})},I:(a,b)=>{b=H(b);var c="std::string"===b;cb(a,{name:b,fromWireType:function(e){var f=C[e>>2],g=e+4;if(c)for(var k=g,n=0;n<=f;++n){var q=g+n;if(n==f||0==y[q]){k=k?kc(y,k,q-k):"";if(void 0===u)var u=k;else u+=String.fromCharCode(0),u+=k;k=q+1}}else{u=Array(f);for(n=0;n<f;++n)u[n]=String.fromCharCode(y[g+n]);u=u.join("")}Mb(e);return u},toWireType:function(e,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g="string"==typeof f;if(!(g||
f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array))throw new I("Cannot pass non-string to std::string");var k=c&&g?ic(f):f.length;var n=gd(4+k+1),q=n+4;C[n>>2]=k;if(c&&g)hc(f,q,k+1);else if(g)for(g=0;g<k;++g){var u=f.charCodeAt(g);if(255<u)throw Mb(q),new I("String has UTF-16 code units that do not fit in 8 bits");y[q+g]=u}else for(g=0;g<k;++g)y[q+g]=f[g];null!==e&&e.push(Mb,n);return n},Ld:8,readValueFromPointer:Ya,Nd(e){Mb(e)}})},G:(a,b,c)=>{c=H(c);if(2===b){var e=
mc;var f=nc;var g=oc;var k=n=>ya[n>>1]}else 4===b&&(e=pc,f=qc,g=rc,k=n=>C[n>>2]);cb(a,{name:c,fromWireType:n=>{for(var q=C[n>>2],u,v=n+4,B=0;B<=q;++B){var D=n+4+B*b;if(B==q||0==k(D))v=e(v,D-v),void 0===u?u=v:(u+=String.fromCharCode(0),u+=v),v=D+b}Mb(n);return u},toWireType:(n,q)=>{if("string"!=typeof q)throw new I(`Cannot pass non-string to C++ string type ${c}`);var u=g(q),v=gd(4+u+b);C[v>>2]=u/b;f(q,v+4,u+b);null!==n&&n.push(Mb,v);return v},Ld:8,readValueFromPointer:Ya,Nd(n){Mb(n)}})},A:(a,b,c,
e,f,g)=>{Ua[a]={name:H(b),pe:K(c,e),Qd:K(f,g),ue:[]}},i:(a,b,c,e,f,g,k,n,q,u)=>{Ua[a].ue.push({Je:H(b),Oe:c,Me:K(e,f),Ne:g,Ve:k,Ue:K(n,q),We:u})},Yc:(a,b)=>{b=H(b);cb(a,{af:!0,name:b,Ld:0,fromWireType:()=>{},toWireType:()=>{}})},Xc:()=>1,Wc:()=>{throw Infinity;},Vc:(a,b,c)=>{a=bc(a);b=ec(b,"emval::as");return sc(b,c,a)},Uc:(a,b,c,e)=>{a=tc[a];b=bc(b);return a(null,b,c,e)},o:(a,b,c,e,f)=>{a=tc[a];b=bc(b);c=vc(c);return a(b,b[c],e,f)},e:ac,Tc:a=>{if(0===a)return Db(wc());a=vc(a);return Db(wc()[a])},
m:(a,b,c)=>{var e=yc(a,b),f=e.shift();a--;var g=Array(a);b=`methodCaller<(${e.map(k=>k.name).join(", ")}) => ${f.name}>`;return xc(ub(b,(k,n,q,u)=>{for(var v=0,B=0;B<a;++B)g[B]=e[B].readValueFromPointer(u+v),v+=e[B].Ld;k=1===c?zc(n,g):n.apply(k,g);return sc(f,q,k)}))},F:a=>{9<a&&($b[a+1]+=1)},E:()=>Db([]),v:a=>Db(vc(a)),Sc:()=>Db({}),k:a=>{var b=bc(a);Va(b);ac(a)},z:(a,b,c)=>{a=bc(a);b=bc(b);c=bc(c);a[b]=c},h:(a,b)=>{a=ec(a,"_emval_take_value");a=a.readValueFromPointer(b);return Db(a)},Rc:(a,b,c,
e)=>{var f=(new Date).getFullYear(),g=(new Date(f,0,1)).getTimezoneOffset();f=(new Date(f,6,1)).getTimezoneOffset();C[a>>2]=60*Math.max(g,f);A[b>>2]=Number(g!=f);b=k=>{var n=Math.abs(k);return`UTC${0<=k?"-":"+"}${String(Math.floor(n/60)).padStart(2,"0")}${String(n%60).padStart(2,"0")}`};a=b(g);b=b(f);f<g?(hc(a,c,17),hc(b,e,17)):(hc(a,e,17),hc(b,c,17))},Qc:()=>performance.now(),Pc:a=>N.activeTexture(a),Oc:(a,b)=>{N.attachShader(Gc[a],Jc[b])},Nc:(a,b)=>{N.beginQuery(a,O[b])},Mc:(a,b)=>{N.Pd.beginQueryEXT(a,
O[b])},Lc:(a,b,c)=>{N.bindAttribLocation(Gc[a],b,c?kc(y,c):"")},Kc:(a,b)=>{35051==a?N.me=b:35052==a&&(N.Ud=b);N.bindBuffer(a,Fc[b])},Jc:Vc,Ic:(a,b)=>{N.bindRenderbuffer(a,Ic[b])},Hc:(a,b)=>{N.bindSampler(a,Lc[b])},Gc:(a,b)=>{N.bindTexture(a,ia[b])},Fc:Wc,Ec:Wc,Dc:(a,b,c,e)=>N.blendColor(a,b,c,e),Cc:a=>N.blendEquation(a),Bc:(a,b)=>N.blendFunc(a,b),Ac:(a,b,c,e,f,g,k,n,q,u)=>N.blitFramebuffer(a,b,c,e,f,g,k,n,q,u),zc:(a,b,c,e)=>{2<=x.version?c&&b?N.bufferData(a,y,e,c,b):N.bufferData(a,b,e):N.bufferData(a,
c?y.subarray(c,c+b):b,e)},yc:(a,b,c,e)=>{2<=x.version?c&&N.bufferSubData(a,b,y,e,c):N.bufferSubData(a,b,y.subarray(e,e+c))},xc:a=>N.checkFramebufferStatus(a),wc:Xc,vc:Yc,uc:Zc,tc:(a,b,c,e)=>N.clientWaitSync(Mc[a],b,(c>>>0)+4294967296*e),sc:(a,b,c,e)=>{N.colorMask(!!a,!!b,!!c,!!e)},rc:a=>{N.compileShader(Jc[a])},qc:(a,b,c,e,f,g,k,n)=>{2<=x.version?N.Ud||!k?N.compressedTexImage2D(a,b,c,e,f,g,k,n):N.compressedTexImage2D(a,b,c,e,f,g,y,n,k):N.compressedTexImage2D(a,b,c,e,f,g,y.subarray(n,n+k))},pc:(a,
b,c,e,f,g,k,n,q)=>{2<=x.version?N.Ud||!n?N.compressedTexSubImage2D(a,b,c,e,f,g,k,n,q):N.compressedTexSubImage2D(a,b,c,e,f,g,k,y,q,n):N.compressedTexSubImage2D(a,b,c,e,f,g,k,y.subarray(q,q+n))},oc:(a,b,c,e,f)=>N.copyBufferSubData(a,b,c,e,f),nc:(a,b,c,e,f,g,k,n)=>N.copyTexSubImage2D(a,b,c,e,f,g,k,n),mc:()=>{var a=ha(Gc),b=N.createProgram();b.name=a;b.ke=b.ie=b.je=0;b.qe=1;Gc[a]=b;return a},lc:a=>{var b=ha(Jc);Jc[b]=N.createShader(a);return b},kc:a=>N.cullFace(a),jc:(a,b)=>{for(var c=0;c<a;c++){var e=
A[b+4*c>>2],f=Fc[e];f&&(N.deleteBuffer(f),f.name=0,Fc[e]=null,e==N.me&&(N.me=0),e==N.Ud&&(N.Ud=0))}},ic:(a,b)=>{for(var c=0;c<a;++c){var e=A[b+4*c>>2],f=Hc[e];f&&(N.deleteFramebuffer(f),f.name=0,Hc[e]=null)}},hc:a=>{if(a){var b=Gc[a];b?(N.deleteProgram(b),b.name=0,Gc[a]=null):Q||=1281}},gc:(a,b)=>{for(var c=0;c<a;c++){var e=A[b+4*c>>2],f=O[e];f&&(N.deleteQuery(f),O[e]=null)}},fc:(a,b)=>{for(var c=0;c<a;c++){var e=A[b+4*c>>2],f=O[e];f&&(N.Pd.deleteQueryEXT(f),O[e]=null)}},ec:(a,b)=>{for(var c=0;c<
a;c++){var e=A[b+4*c>>2],f=Ic[e];f&&(N.deleteRenderbuffer(f),f.name=0,Ic[e]=null)}},dc:(a,b)=>{for(var c=0;c<a;c++){var e=A[b+4*c>>2],f=Lc[e];f&&(N.deleteSampler(f),f.name=0,Lc[e]=null)}},cc:a=>{if(a){var b=Jc[a];b?(N.deleteShader(b),Jc[a]=null):Q||=1281}},bc:a=>{if(a){var b=Mc[a];b?(N.deleteSync(b),b.name=0,Mc[a]=null):Q||=1281}},ac:(a,b)=>{for(var c=0;c<a;c++){var e=A[b+4*c>>2],f=ia[e];f&&(N.deleteTexture(f),f.name=0,ia[e]=null)}},$b:$c,_b:$c,Zb:a=>{N.depthMask(!!a)},Yb:a=>N.disable(a),Xb:a=>{N.disableVertexAttribArray(a)},
Wb:(a,b,c)=>{N.drawArrays(a,b,c)},Vb:(a,b,c,e)=>{N.drawArraysInstanced(a,b,c,e)},Ub:(a,b,c,e,f)=>{N.te.drawArraysInstancedBaseInstanceWEBGL(a,b,c,e,f)},Tb:(a,b)=>{for(var c=ad[a],e=0;e<a;e++)c[e]=A[b+4*e>>2];N.drawBuffers(c)},Sb:(a,b,c,e)=>{N.drawElements(a,b,c,e)},Rb:(a,b,c,e,f)=>{N.drawElementsInstanced(a,b,c,e,f)},Qb:(a,b,c,e,f,g,k)=>{N.te.drawElementsInstancedBaseVertexBaseInstanceWEBGL(a,b,c,e,f,g,k)},Pb:(a,b,c,e,f,g)=>{N.drawElements(a,e,f,g)},Ob:a=>N.enable(a),Nb:a=>{N.enableVertexAttribArray(a)},
Mb:a=>N.endQuery(a),Lb:a=>{N.Pd.endQueryEXT(a)},Kb:(a,b)=>(a=N.fenceSync(a,b))?(b=ha(Mc),a.name=b,Mc[b]=a,b):0,Jb:()=>N.finish(),Ib:()=>N.flush(),Hb:(a,b,c,e)=>{N.framebufferRenderbuffer(a,b,c,Ic[e])},Gb:(a,b,c,e,f)=>{N.framebufferTexture2D(a,b,c,ia[e],f)},Fb:a=>N.frontFace(a),Eb:(a,b)=>{Sc(a,b,"createBuffer",Fc)},Db:(a,b)=>{Sc(a,b,"createFramebuffer",Hc)},Cb:(a,b)=>{Sc(a,b,"createQuery",O)},Bb:(a,b)=>{for(var c=0;c<a;c++){var e=N.Pd.createQueryEXT();if(!e){for(Q||=1282;c<a;)A[b+4*c++>>2]=0;break}var f=
ha(O);e.name=f;O[f]=e;A[b+4*c>>2]=f}},Ab:(a,b)=>{Sc(a,b,"createRenderbuffer",Ic)},zb:(a,b)=>{Sc(a,b,"createSampler",Lc)},yb:(a,b)=>{Sc(a,b,"createTexture",ia)},xb:bd,wb:bd,vb:a=>N.generateMipmap(a),ub:(a,b,c)=>{c?A[c>>2]=N.getBufferParameter(a,b):Q||=1281},tb:()=>{var a=N.getError()||Q;Q=0;return a},sb:(a,b)=>dd(a,b,2),rb:(a,b,c,e)=>{a=N.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;A[e>>2]=a},qb:ed,pb:(a,b,c,e)=>{a=N.getProgramInfoLog(Gc[a]);
null===a&&(a="(unknown error)");b=0<b&&e?hc(a,e,b):0;c&&(A[c>>2]=b)},ob:(a,b,c)=>{if(c)if(a>=Ec)Q||=1281;else if(a=Gc[a],35716==b)a=N.getProgramInfoLog(a),null===a&&(a="(unknown error)"),A[c>>2]=a.length+1;else if(35719==b){if(!a.ke){var e=N.getProgramParameter(a,35718);for(b=0;b<e;++b)a.ke=Math.max(a.ke,N.getActiveUniform(a,b).name.length+1)}A[c>>2]=a.ke}else if(35722==b){if(!a.ie)for(e=N.getProgramParameter(a,35721),b=0;b<e;++b)a.ie=Math.max(a.ie,N.getActiveAttrib(a,b).name.length+1);A[c>>2]=a.ie}else if(35381==
b){if(!a.je)for(e=N.getProgramParameter(a,35382),b=0;b<e;++b)a.je=Math.max(a.je,N.getActiveUniformBlockName(a,b).length+1);A[c>>2]=a.je}else A[c>>2]=N.getProgramParameter(a,b);else Q||=1281},nb:fd,mb:fd,lb:(a,b,c)=>{if(c){a=N.getQueryParameter(O[a],b);var e;"boolean"==typeof a?e=a?1:0:e=a;A[c>>2]=e}else Q||=1281},kb:(a,b,c)=>{if(c){a=N.Pd.getQueryObjectEXT(O[a],b);var e;"boolean"==typeof a?e=a?1:0:e=a;A[c>>2]=e}else Q||=1281},jb:(a,b,c)=>{c?A[c>>2]=N.getQuery(a,b):Q||=1281},ib:(a,b,c)=>{c?A[c>>2]=
N.Pd.getQueryEXT(a,b):Q||=1281},hb:(a,b,c)=>{c?A[c>>2]=N.getRenderbufferParameter(a,b):Q||=1281},gb:(a,b,c,e)=>{a=N.getShaderInfoLog(Jc[a]);null===a&&(a="(unknown error)");b=0<b&&e?hc(a,e,b):0;c&&(A[c>>2]=b)},fb:(a,b,c,e)=>{a=N.getShaderPrecisionFormat(a,b);A[c>>2]=a.rangeMin;A[c+4>>2]=a.rangeMax;A[e>>2]=a.precision},eb:(a,b,c)=>{c?35716==b?(a=N.getShaderInfoLog(Jc[a]),null===a&&(a="(unknown error)"),A[c>>2]=a?a.length+1:0):35720==b?(a=N.getShaderSource(Jc[a]),A[c>>2]=a?a.length+1:0):A[c>>2]=N.getShaderParameter(Jc[a],
b):Q||=1281},db:jd,cb:kd,bb:(a,b)=>{b=b?kc(y,b):"";if(a=Gc[a]){var c=a,e=c.$d,f=c.ye,g;if(!e){c.$d=e={};c.xe={};var k=N.getProgramParameter(c,35718);for(g=0;g<k;++g){var n=N.getActiveUniform(c,g);var q=n.name;n=n.size;var u=ld(q);u=0<u?q.slice(0,u):q;var v=c.qe;c.qe+=n;f[u]=[n,v];for(q=0;q<n;++q)e[v]=q,c.xe[v++]=u}}c=a.$d;e=0;f=b;g=ld(b);0<g&&(e=parseInt(b.slice(g+1))>>>0,f=b.slice(0,g));if((f=a.ye[f])&&e<f[0]&&(e+=f[1],c[e]=c[e]||N.getUniformLocation(a,b)))return e}else Q||=1281;return-1},ab:(a,
b,c)=>{for(var e=ad[b],f=0;f<b;f++)e[f]=A[c+4*f>>2];N.invalidateFramebuffer(a,e)},$a:(a,b,c,e,f,g,k)=>{for(var n=ad[b],q=0;q<b;q++)n[q]=A[c+4*q>>2];N.invalidateSubFramebuffer(a,n,e,f,g,k)},_a:a=>N.isSync(Mc[a]),Za:a=>(a=ia[a])?N.isTexture(a):0,Ya:a=>N.lineWidth(a),Xa:a=>{a=Gc[a];N.linkProgram(a);a.$d=0;a.ye={}},Wa:(a,b,c,e,f,g)=>{N.ve.multiDrawArraysInstancedBaseInstanceWEBGL(a,A,b>>2,A,c>>2,A,e>>2,C,f>>2,g)},Va:(a,b,c,e,f,g,k,n)=>{N.ve.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(a,A,b>>
2,c,A,e>>2,A,f>>2,A,g>>2,C,k>>2,n)},Ua:(a,b)=>{3317==a?Qc=b:3314==a&&(Rc=b);N.pixelStorei(a,b)},Ta:(a,b)=>{N.Pd.queryCounterEXT(O[a],b)},Sa:a=>N.readBuffer(a),Ra:(a,b,c,e,f,g,k)=>{if(2<=x.version)if(N.me)N.readPixels(a,b,c,e,f,g,k);else{var n=md(g);k>>>=31-Math.clz32(n.BYTES_PER_ELEMENT);N.readPixels(a,b,c,e,f,g,n,k)}else(n=nd(g,f,c,e,k))?N.readPixels(a,b,c,e,f,g,n):Q||=1280},Qa:(a,b,c,e)=>N.renderbufferStorage(a,b,c,e),Pa:(a,b,c,e,f)=>N.renderbufferStorageMultisample(a,b,c,e,f),Oa:(a,b,c)=>{N.samplerParameterf(Lc[a],
b,c)},Na:(a,b,c)=>{N.samplerParameteri(Lc[a],b,c)},Ma:(a,b,c)=>{N.samplerParameteri(Lc[a],b,A[c>>2])},La:(a,b,c,e)=>N.scissor(a,b,c,e),Ka:(a,b,c,e)=>{for(var f="",g=0;g<b;++g){var k=(k=C[c+4*g>>2])?kc(y,k,e?C[e+4*g>>2]:void 0):"";f+=k}N.shaderSource(Jc[a],f)},Ja:(a,b,c)=>N.stencilFunc(a,b,c),Ia:(a,b,c,e)=>N.stencilFuncSeparate(a,b,c,e),Ha:a=>N.stencilMask(a),Ga:(a,b)=>N.stencilMaskSeparate(a,b),Fa:(a,b,c)=>N.stencilOp(a,b,c),Ea:(a,b,c,e)=>N.stencilOpSeparate(a,b,c,e),Da:(a,b,c,e,f,g,k,n,q)=>{if(2<=
x.version){if(N.Ud){N.texImage2D(a,b,c,e,f,g,k,n,q);return}if(q){var u=md(n);q>>>=31-Math.clz32(u.BYTES_PER_ELEMENT);N.texImage2D(a,b,c,e,f,g,k,n,u,q);return}}u=q?nd(n,k,e,f,q):null;N.texImage2D(a,b,c,e,f,g,k,n,u)},Ca:(a,b,c)=>N.texParameterf(a,b,c),Ba:(a,b,c)=>{N.texParameterf(a,b,G[c>>2])},Aa:(a,b,c)=>N.texParameteri(a,b,c),za:(a,b,c)=>{N.texParameteri(a,b,A[c>>2])},ya:(a,b,c,e,f)=>N.texStorage2D(a,b,c,e,f),xa:(a,b,c,e,f,g,k,n,q)=>{if(2<=x.version){if(N.Ud){N.texSubImage2D(a,b,c,e,f,g,k,n,q);return}if(q){var u=
md(n);N.texSubImage2D(a,b,c,e,f,g,k,n,u,q>>>31-Math.clz32(u.BYTES_PER_ELEMENT));return}}q=q?nd(n,k,f,g,q):null;N.texSubImage2D(a,b,c,e,f,g,k,n,q)},wa:(a,b)=>{N.uniform1f(V(a),b)},va:(a,b,c)=>{if(2<=x.version)b&&N.uniform1fv(V(a),G,c>>2,b);else{if(288>=b)for(var e=od[b],f=0;f<b;++f)e[f]=G[c+4*f>>2];else e=G.subarray(c>>2,c+4*b>>2);N.uniform1fv(V(a),e)}},ua:(a,b)=>{N.uniform1i(V(a),b)},ta:(a,b,c)=>{if(2<=x.version)b&&N.uniform1iv(V(a),A,c>>2,b);else{if(288>=b)for(var e=pd[b],f=0;f<b;++f)e[f]=A[c+4*
f>>2];else e=A.subarray(c>>2,c+4*b>>2);N.uniform1iv(V(a),e)}},sa:(a,b,c)=>{N.uniform2f(V(a),b,c)},ra:(a,b,c)=>{if(2<=x.version)b&&N.uniform2fv(V(a),G,c>>2,2*b);else{if(144>=b){b*=2;for(var e=od[b],f=0;f<b;f+=2)e[f]=G[c+4*f>>2],e[f+1]=G[c+(4*f+4)>>2]}else e=G.subarray(c>>2,c+8*b>>2);N.uniform2fv(V(a),e)}},qa:(a,b,c)=>{N.uniform2i(V(a),b,c)},pa:(a,b,c)=>{if(2<=x.version)b&&N.uniform2iv(V(a),A,c>>2,2*b);else{if(144>=b){b*=2;for(var e=pd[b],f=0;f<b;f+=2)e[f]=A[c+4*f>>2],e[f+1]=A[c+(4*f+4)>>2]}else e=
A.subarray(c>>2,c+8*b>>2);N.uniform2iv(V(a),e)}},oa:(a,b,c,e)=>{N.uniform3f(V(a),b,c,e)},na:(a,b,c)=>{if(2<=x.version)b&&N.uniform3fv(V(a),G,c>>2,3*b);else{if(96>=b){b*=3;for(var e=od[b],f=0;f<b;f+=3)e[f]=G[c+4*f>>2],e[f+1]=G[c+(4*f+4)>>2],e[f+2]=G[c+(4*f+8)>>2]}else e=G.subarray(c>>2,c+12*b>>2);N.uniform3fv(V(a),e)}},ma:(a,b,c,e)=>{N.uniform3i(V(a),b,c,e)},la:(a,b,c)=>{if(2<=x.version)b&&N.uniform3iv(V(a),A,c>>2,3*b);else{if(96>=b){b*=3;for(var e=pd[b],f=0;f<b;f+=3)e[f]=A[c+4*f>>2],e[f+1]=A[c+(4*
f+4)>>2],e[f+2]=A[c+(4*f+8)>>2]}else e=A.subarray(c>>2,c+12*b>>2);N.uniform3iv(V(a),e)}},ka:(a,b,c,e,f)=>{N.uniform4f(V(a),b,c,e,f)},ja:(a,b,c)=>{if(2<=x.version)b&&N.uniform4fv(V(a),G,c>>2,4*b);else{if(72>=b){var e=od[4*b],f=G;c>>=2;b*=4;for(var g=0;g<b;g+=4){var k=c+g;e[g]=f[k];e[g+1]=f[k+1];e[g+2]=f[k+2];e[g+3]=f[k+3]}}else e=G.subarray(c>>2,c+16*b>>2);N.uniform4fv(V(a),e)}},ia:(a,b,c,e,f)=>{N.uniform4i(V(a),b,c,e,f)},ha:(a,b,c)=>{if(2<=x.version)b&&N.uniform4iv(V(a),A,c>>2,4*b);else{if(72>=b){b*=
4;for(var e=pd[b],f=0;f<b;f+=4)e[f]=A[c+4*f>>2],e[f+1]=A[c+(4*f+4)>>2],e[f+2]=A[c+(4*f+8)>>2],e[f+3]=A[c+(4*f+12)>>2]}else e=A.subarray(c>>2,c+16*b>>2);N.uniform4iv(V(a),e)}},ga:(a,b,c,e)=>{if(2<=x.version)b&&N.uniformMatrix2fv(V(a),!!c,G,e>>2,4*b);else{if(72>=b){b*=4;for(var f=od[b],g=0;g<b;g+=4)f[g]=G[e+4*g>>2],f[g+1]=G[e+(4*g+4)>>2],f[g+2]=G[e+(4*g+8)>>2],f[g+3]=G[e+(4*g+12)>>2]}else f=G.subarray(e>>2,e+16*b>>2);N.uniformMatrix2fv(V(a),!!c,f)}},fa:(a,b,c,e)=>{if(2<=x.version)b&&N.uniformMatrix3fv(V(a),
!!c,G,e>>2,9*b);else{if(32>=b){b*=9;for(var f=od[b],g=0;g<b;g+=9)f[g]=G[e+4*g>>2],f[g+1]=G[e+(4*g+4)>>2],f[g+2]=G[e+(4*g+8)>>2],f[g+3]=G[e+(4*g+12)>>2],f[g+4]=G[e+(4*g+16)>>2],f[g+5]=G[e+(4*g+20)>>2],f[g+6]=G[e+(4*g+24)>>2],f[g+7]=G[e+(4*g+28)>>2],f[g+8]=G[e+(4*g+32)>>2]}else f=G.subarray(e>>2,e+36*b>>2);N.uniformMatrix3fv(V(a),!!c,f)}},ea:(a,b,c,e)=>{if(2<=x.version)b&&N.uniformMatrix4fv(V(a),!!c,G,e>>2,16*b);else{if(18>=b){var f=od[16*b],g=G;e>>=2;b*=16;for(var k=0;k<b;k+=16){var n=e+k;f[k]=g[n];
f[k+1]=g[n+1];f[k+2]=g[n+2];f[k+3]=g[n+3];f[k+4]=g[n+4];f[k+5]=g[n+5];f[k+6]=g[n+6];f[k+7]=g[n+7];f[k+8]=g[n+8];f[k+9]=g[n+9];f[k+10]=g[n+10];f[k+11]=g[n+11];f[k+12]=g[n+12];f[k+13]=g[n+13];f[k+14]=g[n+14];f[k+15]=g[n+15]}}else f=G.subarray(e>>2,e+64*b>>2);N.uniformMatrix4fv(V(a),!!c,f)}},da:a=>{a=Gc[a];N.useProgram(a);N.Ge=a},ca:(a,b)=>N.vertexAttrib1f(a,b),ba:(a,b)=>{N.vertexAttrib2f(a,G[b>>2],G[b+4>>2])},aa:(a,b)=>{N.vertexAttrib3f(a,G[b>>2],G[b+4>>2],G[b+8>>2])},$:(a,b)=>{N.vertexAttrib4f(a,G[b>>
2],G[b+4>>2],G[b+8>>2],G[b+12>>2])},_:(a,b)=>{N.vertexAttribDivisor(a,b)},Z:(a,b,c,e,f)=>{N.vertexAttribIPointer(a,b,c,e,f)},Y:(a,b,c,e,f,g)=>{N.vertexAttribPointer(a,b,c,!!e,f,g)},X:(a,b,c,e)=>N.viewport(a,b,c,e),W:(a,b,c,e)=>{N.waitSync(Mc[a],b,(c>>>0)+4294967296*e)},V:a=>{var b=y.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var e=b*(1+1/c);e=Math.min(e,a+100663296);a:{e=(Math.min(2147483648,65536*Math.ceil(Math.max(a,e)/65536))-ua.buffer.byteLength+65535)/65536|0;try{ua.grow(e);
Ba();var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},U:()=>x?x.handle:0,cd:(a,b)=>{var c=0;sd().forEach((e,f)=>{var g=b+c;f=C[a+4*f>>2]=g;for(g=0;g<e.length;++g)wa[f++]=e.charCodeAt(g);wa[f]=0;c+=e.length+1});return 0},bd:(a,b)=>{var c=sd();C[a>>2]=c.length;var e=0;c.forEach(f=>e+=f.length+1);C[b>>2]=e;return 0},ad:()=>52,M:function(){return 70},K:(a,b,c,e)=>{for(var f=0,g=0;g<c;g++){var k=C[b>>2],n=C[b+4>>2];b+=8;for(var q=0;q<n;q++){var u=y[k+q],v=td[a];0===u||10===u?((1===a?qa:ra)(kc(v)),
v.length=0):v.push(u)}f+=n}C[e>>2]=f;return 0},T:Vc,S:Xc,R:Yc,Q:Zc,D:ed,H:jd,P:kd,q:zd,C:Ad,p:Bd,y:Cd,u:Dd,x:Ed,t:Fd,O:Gd,N:Hd},Z=function(){function a(c){Z=c.exports;ua=Z.dd;Ba();Hb=Z.gd;Da.unshift(Z.ed);Fa--;0==Fa&&(null!==Ga&&(clearInterval(Ga),Ga=null),Ja&&(c=Ja,Ja=null,c()));return Z}var b={a:Id};Fa++;if(p.instantiateWasm)try{return p.instantiateWasm(b,a)}catch(c){ra(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ma??=p.locateFile?La("canvaskit.wasm")?"canvaskit.wasm":na+"canvaskit.wasm":
(new URL("canvaskit.wasm",import.meta.url)).href;Pa(b,function(c){a(c.instance)}).catch(ba);return{}}(),Lb=a=>(Lb=Z.fd)(a),gd=p._malloc=a=>(gd=p._malloc=Z.hd)(a),Mb=p._free=a=>(Mb=p._free=Z.id)(a),Jd=(a,b)=>(Jd=Z.jd)(a,b),Kd=a=>(Kd=Z.kd)(a),Ld=()=>(Ld=Z.ld)();p.dynCall_viji=(a,b,c,e,f)=>(p.dynCall_viji=Z.md)(a,b,c,e,f);p.dynCall_vijiii=(a,b,c,e,f,g,k)=>(p.dynCall_vijiii=Z.nd)(a,b,c,e,f,g,k);p.dynCall_viiiiij=(a,b,c,e,f,g,k,n)=>(p.dynCall_viiiiij=Z.od)(a,b,c,e,f,g,k,n);
p.dynCall_vij=(a,b,c,e)=>(p.dynCall_vij=Z.pd)(a,b,c,e);p.dynCall_jii=(a,b,c)=>(p.dynCall_jii=Z.qd)(a,b,c);p.dynCall_jiiiiii=(a,b,c,e,f,g,k)=>(p.dynCall_jiiiiii=Z.rd)(a,b,c,e,f,g,k);p.dynCall_jiiiiji=(a,b,c,e,f,g,k,n)=>(p.dynCall_jiiiiji=Z.sd)(a,b,c,e,f,g,k,n);p.dynCall_ji=(a,b)=>(p.dynCall_ji=Z.td)(a,b);p.dynCall_iijj=(a,b,c,e,f,g)=>(p.dynCall_iijj=Z.ud)(a,b,c,e,f,g);p.dynCall_jiji=(a,b,c,e,f)=>(p.dynCall_jiji=Z.vd)(a,b,c,e,f);
p.dynCall_viijii=(a,b,c,e,f,g,k)=>(p.dynCall_viijii=Z.wd)(a,b,c,e,f,g,k);p.dynCall_iiiiij=(a,b,c,e,f,g,k)=>(p.dynCall_iiiiij=Z.xd)(a,b,c,e,f,g,k);p.dynCall_iiiiijj=(a,b,c,e,f,g,k,n,q)=>(p.dynCall_iiiiijj=Z.yd)(a,b,c,e,f,g,k,n,q);p.dynCall_iiiiiijj=(a,b,c,e,f,g,k,n,q,u)=>(p.dynCall_iiiiiijj=Z.zd)(a,b,c,e,f,g,k,n,q,u);function Bd(a,b,c,e){var f=Ld();try{return Hb.get(a)(b,c,e)}catch(g){Kd(f);if(g!==g+0)throw g;Jd(1,0)}}
function zd(a,b){var c=Ld();try{return Hb.get(a)(b)}catch(e){Kd(c);if(e!==e+0)throw e;Jd(1,0)}}function Hd(a,b,c,e,f,g,k,n,q,u){var v=Ld();try{Hb.get(a)(b,c,e,f,g,k,n,q,u)}catch(B){Kd(v);if(B!==B+0)throw B;Jd(1,0)}}function Ed(a,b,c,e){var f=Ld();try{Hb.get(a)(b,c,e)}catch(g){Kd(f);if(g!==g+0)throw g;Jd(1,0)}}function Dd(a,b,c){var e=Ld();try{Hb.get(a)(b,c)}catch(f){Kd(e);if(f!==f+0)throw f;Jd(1,0)}}function Cd(a,b){var c=Ld();try{Hb.get(a)(b)}catch(e){Kd(c);if(e!==e+0)throw e;Jd(1,0)}}
function Fd(a,b,c,e,f){var g=Ld();try{Hb.get(a)(b,c,e,f)}catch(k){Kd(g);if(k!==k+0)throw k;Jd(1,0)}}function Ad(a,b,c){var e=Ld();try{return Hb.get(a)(b,c)}catch(f){Kd(e);if(f!==f+0)throw f;Jd(1,0)}}function Gd(a,b,c,e,f,g,k){var n=Ld();try{Hb.get(a)(b,c,e,f,g,k)}catch(q){Kd(n);if(q!==q+0)throw q;Jd(1,0)}}var Md,Nd;Ja=function Od(){Md||Pd();Md||(Ja=Od)};function Pd(){if(!(0<Fa)){if(!Nd&&(Nd=1,Qa(Ca),0<Fa))return;Md||(Md=1,p.calledRun=1,va||(Qa(Da),aa(p),p.onRuntimeInitialized?.(),Qa(Ea)))}}Pd();
moduleRtn=da;


  return moduleRtn;
}
);
})();
export default CanvasKitInit;
