@motionscript/canvaskit 0.0.0-stage → 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ var Zr=(ne=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(ne,{get:(ge,He)=>(typeof require<"u"?require:ge)[He]}):ne)(function(ne){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+ne+'" is not supported')});var eo=(ne,ge)=>()=>{try{return ge||ne((ge={exports:{}}).exports,ge),ge.exports}catch(He){throw ge=0,He}};var to=eo((qr,xt)=>{var rr=(()=>{var ne=typeof document<"u"?document.currentScript?.src:void 0;return typeof __filename<"u"&&(ne=ne||__filename),(async function(ge={}){var He,k=ge,nr,Bt,en=new Promise((e,t)=>{nr=e,Bt=t}),tn=typeof window=="object",Pt=typeof WorkerGlobalScope<"u",or=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";(function(e){e.Dd=e.Dd||[],e.Dd.push(function(){e.MakeSWCanvasSurface=function(t){var n=t,i=typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas;if(!(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||i||(n=document.getElementById(t),n)))throw"Canvas with id "+t+" was not found";return(t=e.MakeSurface(n.width,n.height))&&(t.ae=n),t},e.MakeCanvasSurface||(e.MakeCanvasSurface=e.MakeSWCanvasSurface),e.MakeSurface=function(t,n){var i={width:t,height:n,colorType:e.ColorType.RGBA_8888,alphaType:e.AlphaType.Unpremul,colorSpace:e.ColorSpace.SRGB},u=t*n*4,d=e._malloc(u);return(i=e.Surface._makeRasterDirect(i,d,4*t))&&(i.ae=null,i.Ae=t,i.xe=n,i.ye=u,i.he=d,i.getCanvas().clear(e.TRANSPARENT)),i},e.MakeRasterDirectSurface=function(t,n,i){return e.Surface._makeRasterDirect(t,n.byteOffset,i)},e.Surface.prototype.flush=function(t){if(e.Ad(this.zd),this._flush(),this.ae){var n=new Uint8ClampedArray(e.HEAPU8.buffer,this.he,this.ye);n=new ImageData(n,this.Ae,this.xe),t?this.ae.getContext("2d").putImageData(n,0,0,t[0],t[1],t[2]-t[0],t[3]-t[1]):this.ae.getContext("2d").putImageData(n,0,0)}},e.Surface.prototype.dispose=function(){this.he&&e._free(this.he),this.delete()},e.Ad=e.Ad||function(){},e.be=e.be||function(){return null}})})(k),(function(e){e.Dd=e.Dd||[],e.Dd.push(function(){function t(l,f,_){return l&&l.hasOwnProperty(f)?l[f]:_}function n(l){var f=Ie(ee);return ee[f]=l,f}function i(l){return l.naturalHeight||l.videoHeight||l.displayHeight||l.height}function u(l){return l.naturalWidth||l.videoWidth||l.displayWidth||l.width}function d(l,f,_,m){return l.bindTexture(l.TEXTURE_2D,f),m||_.alphaType!==e.AlphaType.Premul||l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),f}function y(l,f,_){_||f.alphaType!==e.AlphaType.Premul||l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),l.bindTexture(l.TEXTURE_2D,null)}e.GetWebGLContext=function(l,f){if(!l)throw"null canvas passed into makeWebGLContext";var _={alpha:t(f,"alpha",1),depth:t(f,"depth",1),stencil:t(f,"stencil",8),antialias:t(f,"antialias",0),premultipliedAlpha:t(f,"premultipliedAlpha",1),preserveDrawingBuffer:t(f,"preserveDrawingBuffer",0),preferLowPowerToHighPerformance:t(f,"preferLowPowerToHighPerformance",0),failIfMajorPerformanceCaveat:t(f,"failIfMajorPerformanceCaveat",0),enableExtensionsByDefault:t(f,"enableExtensionsByDefault",1),explicitSwapControl:t(f,"explicitSwapControl",0),renderViaOffscreenBackBuffer:t(f,"renderViaOffscreenBackBuffer",0)};if(_.majorVersion=f&&f.majorVersion?f.majorVersion:typeof WebGL2RenderingContext<"u"?2:1,_.explicitSwapControl)throw"explicitSwapControl is not supported";return l=Rn(l,_),l?(Br(l),B.Md.getExtension("WEBGL_debug_renderer_info"),l):0},e.deleteContext=function(l){B===Ae[l]&&(B=null),typeof JSEvents=="object"&&JSEvents.Ye(Ae[l].Md.canvas),Ae[l]?.Md.canvas&&(Ae[l].Md.canvas.ve=void 0),Ae[l]=null},e._setTextureCleanup({deleteTexture:function(l,f){var _=ee[f];_&&Ae[l].Md.deleteTexture(_),ee[f]=null}}),e.MakeWebGLContext=function(l){if(!this.Ad(l))return null;var f=this._MakeGrContext();if(!f)return null;f.zd=l;var _=f.delete.bind(f);return f.delete=function(){e.Ad(this.zd),_()}.bind(f),B.je=f},e.MakeGrContext=e.MakeWebGLContext,e.GrDirectContext.prototype.getResourceCacheLimitBytes=function(){e.Ad(this.zd),this._getResourceCacheLimitBytes()},e.GrDirectContext.prototype.getResourceCacheUsageBytes=function(){e.Ad(this.zd),this._getResourceCacheUsageBytes()},e.GrDirectContext.prototype.releaseResourcesAndAbandonContext=function(){e.Ad(this.zd),this._releaseResourcesAndAbandonContext()},e.GrDirectContext.prototype.setResourceCacheLimitBytes=function(l){e.Ad(this.zd),this._setResourceCacheLimitBytes(l)},e.MakeOnScreenGLSurface=function(l,f,_,m,E,T){return!this.Ad(l.zd)||(f=E===void 0||T===void 0?this._MakeOnScreenGLSurface(l,f,_,m):this._MakeOnScreenGLSurface(l,f,_,m,E,T),!f)?null:(f.zd=l.zd,f)},e.MakeRenderTarget=function(){var l=arguments[0];if(!this.Ad(l.zd))return null;if(arguments.length===3){var f=this._MakeRenderTargetWH(l,arguments[1],arguments[2]);if(!f)return null}else if(arguments.length===2){if(f=this._MakeRenderTargetII(l,arguments[1]),!f)return null}else return null;return f.zd=l.zd,f},e.MakeWebGLCanvasSurface=function(l,f,_){f=f||null;var m=l,E=typeof OffscreenCanvas<"u"&&m instanceof OffscreenCanvas;if(!(typeof HTMLCanvasElement<"u"&&m instanceof HTMLCanvasElement||E||(m=document.getElementById(l),m)))throw"Canvas with id "+l+" was not found";if(l=this.GetWebGLContext(m,_),!l||0>l)throw"failed to create webgl context: err "+l;return l=this.MakeWebGLContext(l),f=this.MakeOnScreenGLSurface(l,m.width,m.height,f),f||(f=m.cloneNode(!0),m.parentNode.replaceChild(f,m),f.classList.add("ck-replaced"),e.MakeSWCanvasSurface(f))},e.MakeCanvasSurface=e.MakeWebGLCanvasSurface,e.Surface.prototype.makeImageFromTexture=function(l,f){return e.Ad(this.zd),l=n(l),(f=this._makeImageFromTexture(this.zd,l,f))&&(f.Vd=l),f},e.Surface.prototype.makeImageFromTextureSource=function(l,f,_){f||={height:i(l),width:u(l),colorType:e.ColorType.RGBA_8888,alphaType:_?e.AlphaType.Premul:e.AlphaType.Unpremul},f.colorSpace||(f.colorSpace=e.ColorSpace.SRGB),e.Ad(this.zd);var m=B.Md;return _=d(m,m.createTexture(),f,_),B.version===2?m.texImage2D(m.TEXTURE_2D,0,m.RGBA,f.width,f.height,0,m.RGBA,m.UNSIGNED_BYTE,l):m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,l),y(m,f),this._resetContext(),this.makeImageFromTexture(_,f)},e.Surface.prototype.updateTextureFromSource=function(l,f,_){if(l.Vd){e.Ad(this.zd);var m=l.getImageInfo(),E=B.Md,T=d(E,ee[l.Vd],m,_);B.version===2?E.texImage2D(E.TEXTURE_2D,0,E.RGBA,u(f),i(f),0,E.RGBA,E.UNSIGNED_BYTE,f):E.texImage2D(E.TEXTURE_2D,0,E.RGBA,E.RGBA,E.UNSIGNED_BYTE,f),y(E,m,_),this._resetContext(),ee[l.Vd]=null,l.Vd=n(T),m.colorSpace=l.getColorSpace(),f=this._makeImageFromTexture(this.zd,l.Vd,m),_=l.yd.Cd,E=l.yd.Fd,l.yd.Cd=f.yd.Cd,l.yd.Fd=f.yd.Fd,f.yd.Cd=_,f.yd.Fd=E,f.delete(),m.colorSpace.delete()}},e.MakeLazyImageFromTextureSource=function(l,f,_){f||={height:i(l),width:u(l),colorType:e.ColorType.RGBA_8888,alphaType:_?e.AlphaType.Premul:e.AlphaType.Unpremul},f.colorSpace||(f.colorSpace=e.ColorSpace.SRGB);var m={makeTexture:function(){var E=B,T=E.Md,N=d(T,T.createTexture(),f,_);return E.version===2?T.texImage2D(T.TEXTURE_2D,0,T.RGBA,f.width,f.height,0,T.RGBA,T.UNSIGNED_BYTE,l):T.texImage2D(T.TEXTURE_2D,0,T.RGBA,T.RGBA,T.UNSIGNED_BYTE,l),y(T,f,_),n(N)},freeSrc:function(){}};return l.constructor.name==="VideoFrame"&&(m.freeSrc=function(){l.close()}),e.Image._makeFromGenerator(f,m)},e.Ad=function(l){return l?Br(l):!1},e.be=function(){return B&&B.je&&!B.je.isDeleted()?B.je:null}})})(k),(function(e){function t(o,r,a,s,c){for(var v=0;v<o.length;v++)r[v*a+(v*c+s+a)%a]=o[v];return r}function n(o){for(var r=o*o,a=Array(r);r--;)a[r]=r%(o+1)===0?1:0;return a}function i(o){return(y(255*o[3])<<24|y(255*o[0])<<16|y(255*o[1])<<8|y(255*o[2])<<0)>>>0}function u(o){if(o&&o._ck)return o;if(o instanceof Float32Array){for(var r=Math.floor(o.length/4),a=new Uint32Array(r),s=0;s<r;s++)a[s]=i(o.slice(4*s,4*(s+1)));return a}if(o instanceof Uint32Array)return o;if(o instanceof Array&&o[0]instanceof Float32Array)return o.map(i)}function d(o){if(o===void 0)return 1;var r=parseFloat(o);return o&&o.indexOf("%")!==-1?r/100:r}function y(o){return Math.round(Math.max(0,Math.min(o||0,255)))}function l(o,r){r&&r._ck||e._free(o)}function f(o,r,a){if(!o||!o.length)return L;if(o&&o._ck)return o.byteOffset;var s=e[r].BYTES_PER_ELEMENT;return a||=e._malloc(o.length*s),e[r].set(o,a/s),a}function _(o){var r={Jd:L,count:o.length,colorType:e.ColorType.RGBA_F32};if(o instanceof Float32Array)r.Jd=f(o,"HEAPF32"),r.count=o.length/4;else if(o instanceof Uint32Array)r.Jd=f(o,"HEAPU32"),r.colorType=e.ColorType.RGBA_8888;else if(o instanceof Array){if(o&&o.length){for(var a=e._malloc(16*o.length),s=0,c=a/4,v=0;v<o.length;v++)for(var g=0;4>g;g++)e.HEAPF32[c+s]=o[v][g],s++;o=a}else o=L;r.Jd=o}else throw"Invalid argument to copyFlexibleColorArray, Not a color array "+typeof o;return r}function m(o){if(!o)return L;var r=We.toTypedArray();if(o.length){if(o.length===6||o.length===9)return f(o,"HEAPF32",te),o.length===6&&e.HEAPF32.set(Zn,6+te/4),te;if(o.length===16)return r[0]=o[0],r[1]=o[1],r[2]=o[3],r[3]=o[4],r[4]=o[5],r[5]=o[7],r[6]=o[12],r[7]=o[13],r[8]=o[15],te;throw"invalid matrix size"}if(o.m11===void 0)throw"invalid matrix argument";return r[0]=o.m11,r[1]=o.m21,r[2]=o.m41,r[3]=o.m12,r[4]=o.m22,r[5]=o.m42,r[6]=o.m14,r[7]=o.m24,r[8]=o.m44,te}function E(o){if(!o)return L;var r=Jt.toTypedArray();if(o.length){if(o.length!==16&&o.length!==6&&o.length!==9)throw"invalid matrix size";return o.length===16?f(o,"HEAPF32",De):(r.fill(0),r[0]=o[0],r[1]=o[1],r[3]=o[2],r[4]=o[3],r[5]=o[4],r[7]=o[5],r[10]=1,r[12]=o[6],r[13]=o[7],r[15]=o[8],o.length===6&&(r[12]=0,r[13]=0,r[15]=1),De)}if(o.m11===void 0)throw"invalid matrix argument";return r[0]=o.m11,r[1]=o.m21,r[2]=o.m31,r[3]=o.m41,r[4]=o.m12,r[5]=o.m22,r[6]=o.m32,r[7]=o.m42,r[8]=o.m13,r[9]=o.m23,r[10]=o.m33,r[11]=o.m43,r[12]=o.m14,r[13]=o.m24,r[14]=o.m34,r[15]=o.m44,De}function T(o,r){return f(o,"HEAPF32",r||$e)}function N(o,r,a,s){var c=Yt.toTypedArray();return c[0]=o,c[1]=r,c[2]=a,c[3]=s,$e}function W(o){for(var r=new Float32Array(4),a=0;4>a;a++)r[a]=e.HEAPF32[o/4+a];return r}function x(o,r){return f(o,"HEAPF32",r||z)}function V(o,r){return f(o,"HEAPF32",r||er)}function Te(){for(var o=0,r=0;r<arguments.length-1;r+=2)o+=arguments[r]*arguments[r+1];return o}function Q(o,r,a){for(var s=Array(o.length),c=0;c<a;c++)for(var v=0;v<a;v++){for(var g=0,w=0;w<a;w++)g+=o[a*c+w]*r[a*w+v];s[c*a+v]=g}return s}function Se(o,r){for(var a=Q(r[0],r[1],o),s=2;s<r.length;)a=Q(a,r[s],o),s++;return a}e.Color=function(o,r,a,s){return s===void 0&&(s=1),e.Color4f(y(o)/255,y(r)/255,y(a)/255,s)},e.ColorAsInt=function(o,r,a,s){return s===void 0&&(s=255),(y(s)<<24|y(o)<<16|y(r)<<8|y(a)<<0&268435455)>>>0},e.Color4f=function(o,r,a,s){return s===void 0&&(s=1),Float32Array.of(o,r,a,s)},Object.defineProperty(e,"TRANSPARENT",{get:function(){return e.Color4f(0,0,0,0)}}),Object.defineProperty(e,"BLACK",{get:function(){return e.Color4f(0,0,0,1)}}),Object.defineProperty(e,"WHITE",{get:function(){return e.Color4f(1,1,1,1)}}),Object.defineProperty(e,"RED",{get:function(){return e.Color4f(1,0,0,1)}}),Object.defineProperty(e,"GREEN",{get:function(){return e.Color4f(0,1,0,1)}}),Object.defineProperty(e,"BLUE",{get:function(){return e.Color4f(0,0,1,1)}}),Object.defineProperty(e,"YELLOW",{get:function(){return e.Color4f(1,1,0,1)}}),Object.defineProperty(e,"CYAN",{get:function(){return e.Color4f(0,1,1,1)}}),Object.defineProperty(e,"MAGENTA",{get:function(){return e.Color4f(1,0,1,1)}}),e.getColorComponents=function(o){return[Math.floor(255*o[0]),Math.floor(255*o[1]),Math.floor(255*o[2]),o[3]]},e.parseColorString=function(o,r){if(o=o.toLowerCase(),o.startsWith("#")){switch(r=255,o.length){case 9:r=parseInt(o.slice(7,9),16);case 7:var a=parseInt(o.slice(1,3),16),s=parseInt(o.slice(3,5),16),c=parseInt(o.slice(5,7),16);break;case 5:r=17*parseInt(o.slice(4,5),16);case 4:a=17*parseInt(o.slice(1,2),16),s=17*parseInt(o.slice(2,3),16),c=17*parseInt(o.slice(3,4),16)}return e.Color(a,s,c,r/255)}return o.startsWith("rgba")?(o=o.slice(5,-1),o=o.split(","),e.Color(+o[0],+o[1],+o[2],d(o[3]))):o.startsWith("rgb")?(o=o.slice(4,-1),o=o.split(","),e.Color(+o[0],+o[1],+o[2],d(o[3]))):o.startsWith("gray(")||o.startsWith("hsl")||!r||(o=r[o],o===void 0)?e.BLACK:o},e.multiplyByAlpha=function(o,r){return o=o.slice(),o[3]=Math.max(0,Math.min(o[3]*r,1)),o},e.Malloc=function(o,r){var a=e._malloc(r*o.BYTES_PER_ELEMENT);return{_ck:!0,length:r,byteOffset:a,Rd:null,subarray:function(s,c){return s=this.toTypedArray().subarray(s,c),s._ck=!0,s},toTypedArray:function(){return this.Rd&&this.Rd.length?this.Rd:(this.Rd=new o(e.HEAPU8.buffer,a,r),this.Rd._ck=!0,this.Rd)}}},e.Free=function(o){e._free(o.byteOffset),o.byteOffset=L,o.toTypedArray=null,o.Rd=null};var te=L,We,De=L,Jt,$e=L,Yt,re,z=L,jr,Me=L,Vr,Zt=L,Xr,qt=L,Mt,it=L,Qr,er=L,Kr,Jr=L,Zn=Float32Array.of(0,0,1),L=0;e.onRuntimeInitialized=function(){function o(r,a,s,c,v,g,w){g||(g=4*c.width,c.colorType===e.ColorType.RGBA_F16?g*=2:c.colorType===e.ColorType.RGBA_F32&&(g*=4));var F=g*c.height,S=v?v.byteOffset:e._malloc(F);if(w?!r._readPixels(c,S,g,a,s,w):!r._readPixels(c,S,g,a,s))return v||e._free(S),null;if(v)return v.toTypedArray();switch(c.colorType){case e.ColorType.RGBA_8888:case e.ColorType.RGBA_F16:r=new Uint8Array(e.HEAPU8.buffer,S,F).slice();break;case e.ColorType.RGBA_F32:r=new Float32Array(e.HEAPU8.buffer,S,F).slice();break;default:return null}return e._free(S),r}Yt=e.Malloc(Float32Array,4),$e=Yt.byteOffset,Jt=e.Malloc(Float32Array,16),De=Jt.byteOffset,We=e.Malloc(Float32Array,9),te=We.byteOffset,Qr=e.Malloc(Float32Array,12),er=Qr.byteOffset,Kr=e.Malloc(Float32Array,12),Jr=Kr.byteOffset,re=e.Malloc(Float32Array,4),z=re.byteOffset,jr=e.Malloc(Float32Array,4),Me=jr.byteOffset,Vr=e.Malloc(Float32Array,3),Zt=Vr.byteOffset,Xr=e.Malloc(Float32Array,3),qt=Xr.byteOffset,Mt=e.Malloc(Int32Array,4),it=Mt.byteOffset,e.ColorSpace.SRGB=e.ColorSpace._MakeSRGB(),e.ColorSpace.DISPLAY_P3=e.ColorSpace._MakeDisplayP3(),e.ColorSpace.ADOBE_RGB=e.ColorSpace._MakeAdobeRGB(),e.GlyphRunFlags={IsWhiteSpace:e._GlyphRunFlags_isWhiteSpace},e.Path.MakeFromCmds=function(r){var a=f(r,"HEAPF32"),s=e.Path._MakeFromCmds(a,r.length);return l(a,r),s},e.Path.MakeFromVerbsPointsWeights=function(r,a,s){var c=f(r,"HEAPU8"),v=f(a,"HEAPF32"),g=f(s,"HEAPF32"),w=e.Path._MakeFromVerbsPointsWeights(c,r.length,v,a.length/2,g,s&&s.length||0);return l(c,r),l(v,a),l(g,s),w},e.PathBuilder.prototype.addArc=function(r,a,s){return r=x(r),this._addArc(r,a,s),this},e.PathBuilder.prototype.addCircle=function(r,a,s,c){return this._addCircle(r,a,s,!!c),this},e.PathBuilder.prototype.addOval=function(r,a,s){return s===void 0&&(s=1),r=x(r),this._addOval(r,!!a,s),this},e.PathBuilder.prototype.addPath=function(){var r=Array.prototype.slice.call(arguments),a=r[0],s=!1;if(typeof r[r.length-1]=="boolean"&&(s=r.pop()),r.length===1)this._addPath(a,1,0,0,0,1,0,0,0,1,s);else if(r.length===2)r=r[1],this._addPath(a,r[0],r[1],r[2],r[3],r[4],r[5],r[6]||0,r[7]||0,r[8]||1,s);else if(r.length===7||r.length===10)this._addPath(a,r[1],r[2],r[3],r[4],r[5],r[6],r[7]||0,r[8]||0,r[9]||1,s);else return null;return this},e.PathBuilder.prototype.addPolygon=function(r,a){var s=f(r,"HEAPF32");return this._addPolygon(s,r.length/2,a),l(s,r),this},e.PathBuilder.prototype.addRect=function(r,a){return r=x(r),this._addRect(r,!!a),this},e.PathBuilder.prototype.addRRect=function(r,a){return r=V(r),this._addRRect(r,!!a),this},e.PathBuilder.prototype.addVerbsPointsWeights=function(r,a,s){var c=f(r,"HEAPU8"),v=f(a,"HEAPF32"),g=f(s,"HEAPF32");return this._addVerbsPointsWeights(c,r.length,v,a.length/2,g,s&&s.length||0),l(c,r),l(v,a),l(g,s),this},e.PathBuilder.prototype.arc=function(r,a,s,c,v,g){return r=e.LTRBRect(r-s,a-s,r+s,a+s),v=(v-c)/Math.PI*180-360*!!g,c=new e.PathBuilder().addArc(r,c/Math.PI*180,v).detachAndDelete(),this.addPath(c,!0),c.delete(),this},e.PathBuilder.prototype.arcToOval=function(r,a,s,c){return r=x(r),this._arcToOval(r,a,s,c),this},e.PathBuilder.prototype.arcToRotated=function(r,a,s,c,v,g,w){return this._arcToRotated(r,a,s,!!c,!!v,g,w),this},e.PathBuilder.prototype.arcToTangent=function(r,a,s,c,v){return this._arcToTangent(r,a,s,c,v),this},e.PathBuilder.prototype.close=function(){return this._close(),this},e.PathBuilder.prototype.conicTo=function(r,a,s,c,v){return this._conicTo(r,a,s,c,v),this},e.Path.prototype.computeTightBounds=function(r){this._computeTightBounds(z);var a=re.toTypedArray();return r?(r.set(a),r):a.slice()},e.PathBuilder.prototype.cubicTo=function(r,a,s,c,v,g){return this._cubicTo(r,a,s,c,v,g),this},e.PathBuilder.prototype.detachAndDelete=function(){var r=this.detach();return this.delete(),r},e.Path.prototype.getBounds=function(r){this._getBounds(z);var a=re.toTypedArray();return r?(r.set(a),r):a.slice()},e.PathBuilder.prototype.getBounds=function(r){this._getBounds(z);var a=re.toTypedArray();return r?(r.set(a),r):a.slice()},e.PathBuilder.prototype.lineTo=function(r,a){return this._lineTo(r,a),this},e.PathBuilder.prototype.moveTo=function(r,a){return this._moveTo(r,a),this},e.PathBuilder.prototype.offset=function(r,a){return this._transform(1,0,r,0,1,a,0,0,1),this},e.PathBuilder.prototype.quadTo=function(r,a,s,c){return this._quadTo(r,a,s,c),this},e.PathBuilder.prototype.rArcTo=function(r,a,s,c,v,g,w){return this._rArcTo(r,a,s,c,v,g,w),this},e.PathBuilder.prototype.rConicTo=function(r,a,s,c,v){return this._rConicTo(r,a,s,c,v),this},e.PathBuilder.prototype.rCubicTo=function(r,a,s,c,v,g){return this._rCubicTo(r,a,s,c,v,g),this},e.PathBuilder.prototype.rLineTo=function(r,a){return this._rLineTo(r,a),this},e.PathBuilder.prototype.rMoveTo=function(r,a){return this._rMoveTo(r,a),this},e.PathBuilder.prototype.rQuadTo=function(r,a,s,c){return this._rQuadTo(r,a,s,c),this},e.Path.prototype.makeStroked=function(r){return r=r||{},r.width=r.width||1,r.miter_limit=r.miter_limit||4,r.cap=r.cap||e.StrokeCap.Butt,r.join=r.join||e.StrokeJoin.Miter,r.precision=r.precision||1,this._makeStroked(r)},e.PathBuilder.prototype.transform=function(){if(arguments.length===1){var r=arguments[0];this._transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6]||0,r[7]||0,r[8]||1)}else if(arguments.length===6||arguments.length===9)r=arguments,this._transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6]||0,r[7]||0,r[8]||1);else throw"transform expected to take 1 or 9 arguments. Got "+arguments.length;return this},e.Path.prototype.makeTrimmed=function(r,a,s){return this._makeTrimmed(r,a,!!s)},e.Image.prototype.encodeToBytes=function(r,a){var s=e.be();return r=r||e.ImageFormat.PNG,a=a||100,s?this._encodeToBytes(r,a,s):this._encodeToBytes(r,a)},e.Image.prototype.makeShaderCubic=function(r,a,s,c,v){return v=m(v),this._makeShaderCubic(r,a,s,c,v)},e.Image.prototype.makeShaderOptions=function(r,a,s,c,v){return v=m(v),this._makeShaderOptions(r,a,s,c,v)},e.Image.prototype.readPixels=function(r,a,s,c,v){var g=e.be();return o(this,r,a,s,c,v,g)},e.Canvas.prototype.clear=function(r){e.Ad(this.zd),r=T(r),this._clear(r)},e.Canvas.prototype.clipRRect=function(r,a,s){e.Ad(this.zd),r=V(r),this._clipRRect(r,a,s)},e.Canvas.prototype.clipRect=function(r,a,s){e.Ad(this.zd),r=x(r),this._clipRect(r,a,s)},e.Canvas.prototype.concat=function(r){e.Ad(this.zd),r=E(r),this._concat(r)},e.Canvas.prototype.drawArc=function(r,a,s,c,v){e.Ad(this.zd),r=x(r),this._drawArc(r,a,s,c,v)},e.Canvas.prototype.drawAtlas=function(r,a,s,c,v,g,w){if(r&&c&&a&&s&&a.length===s.length){e.Ad(this.zd),v||(v=e.BlendMode.SrcOver);var F=f(a,"HEAPF32"),S=f(s,"HEAPF32"),H=s.length/4,U=f(u(g),"HEAPU32");if(w&&"B"in w&&"C"in w)this._drawAtlasCubic(r,S,F,U,H,v,w.B,w.C,c);else{let h=e.FilterMode.Linear,A=e.MipmapMode.None;w&&(h=w.filter,"mipmap"in w&&(A=w.mipmap)),this._drawAtlasOptions(r,S,F,U,H,v,h,A,c)}l(F,a),l(S,s),l(U,g)}},e.Canvas.prototype.drawCircle=function(r,a,s,c){e.Ad(this.zd),this._drawCircle(r,a,s,c)},e.Canvas.prototype.drawColor=function(r,a){e.Ad(this.zd),r=T(r),a!==void 0?this._drawColor(r,a):this._drawColor(r)},e.Canvas.prototype.drawColorInt=function(r,a){e.Ad(this.zd),this._drawColorInt(r,a||e.BlendMode.SrcOver)},e.Canvas.prototype.drawColorComponents=function(r,a,s,c,v){e.Ad(this.zd),r=N(r,a,s,c),v!==void 0?this._drawColor(r,v):this._drawColor(r)},e.Canvas.prototype.drawDRRect=function(r,a,s){e.Ad(this.zd),r=V(r,er),a=V(a,Jr),this._drawDRRect(r,a,s)},e.Canvas.prototype.drawImage=function(r,a,s,c){e.Ad(this.zd),this._drawImage(r,a,s,c||null)},e.Canvas.prototype.drawImageCubic=function(r,a,s,c,v,g){e.Ad(this.zd),this._drawImageCubic(r,a,s,c,v,g||null)},e.Canvas.prototype.drawImageOptions=function(r,a,s,c,v,g){e.Ad(this.zd),this._drawImageOptions(r,a,s,c,v,g||null)},e.Canvas.prototype.drawImageNine=function(r,a,s,c,v){e.Ad(this.zd),a=f(a,"HEAP32",it),s=x(s),this._drawImageNine(r,a,s,c,v||null)},e.Canvas.prototype.drawImageRect=function(r,a,s,c,v){e.Ad(this.zd),x(a,z),x(s,Me),this._drawImageRect(r,z,Me,c,!!v)},e.Canvas.prototype.drawImageRectCubic=function(r,a,s,c,v,g){e.Ad(this.zd),x(a,z),x(s,Me),this._drawImageRectCubic(r,z,Me,c,v,g||null)},e.Canvas.prototype.drawImageRectOptions=function(r,a,s,c,v,g){e.Ad(this.zd),x(a,z),x(s,Me),this._drawImageRectOptions(r,z,Me,c,v,g||null)},e.Canvas.prototype.drawLine=function(r,a,s,c,v){e.Ad(this.zd),this._drawLine(r,a,s,c,v)},e.Canvas.prototype.drawOval=function(r,a){e.Ad(this.zd),r=x(r),this._drawOval(r,a)},e.Canvas.prototype.drawPaint=function(r){e.Ad(this.zd),this._drawPaint(r)},e.Canvas.prototype.drawParagraph=function(r,a,s){e.Ad(this.zd),this._drawParagraph(r,a,s)},e.Canvas.prototype.drawPatch=function(r,a,s,c,v){if(24>r.length)throw"Need 12 cubic points";if(a&&4>a.length)throw"Need 4 colors";if(s&&8>s.length)throw"Need 4 shader coordinates";e.Ad(this.zd);let g=f(r,"HEAPF32"),w=a?f(u(a),"HEAPU32"):L,F=s?f(s,"HEAPF32"):L;c||(c=e.BlendMode.Modulate),this._drawPatch(g,w,F,c,v),l(F,s),l(w,a),l(g,r)},e.Canvas.prototype.drawPath=function(r,a){e.Ad(this.zd),this._drawPath(r,a)},e.Canvas.prototype.drawPicture=function(r){e.Ad(this.zd),this._drawPicture(r)},e.Canvas.prototype.drawPoints=function(r,a,s){e.Ad(this.zd);var c=f(a,"HEAPF32");this._drawPoints(r,c,a.length/2,s),l(c,a)},e.Canvas.prototype.drawRRect=function(r,a){e.Ad(this.zd),r=V(r),this._drawRRect(r,a)},e.Canvas.prototype.drawRect=function(r,a){e.Ad(this.zd),r=x(r),this._drawRect(r,a)},e.Canvas.prototype.drawRect4f=function(r,a,s,c,v){e.Ad(this.zd),this._drawRect4f(r,a,s,c,v)},e.Canvas.prototype.drawShadow=function(r,a,s,c,v,g,w){e.Ad(this.zd);var F=f(v,"HEAPF32"),S=f(g,"HEAPF32");a=f(a,"HEAPF32",Zt),s=f(s,"HEAPF32",qt),this._drawShadow(r,a,s,c,F,S,w),l(F,v),l(S,g)},e.getShadowLocalBounds=function(r,a,s,c,v,g,w){return r=m(r),s=f(s,"HEAPF32",Zt),c=f(c,"HEAPF32",qt),this._getShadowLocalBounds(r,a,s,c,v,g,z)?(a=re.toTypedArray(),w?(w.set(a),w):a.slice()):null},e.Canvas.prototype.drawTextBlob=function(r,a,s,c){e.Ad(this.zd),this._drawTextBlob(r,a,s,c)},e.Canvas.prototype.drawVertices=function(r,a,s){e.Ad(this.zd),this._drawVertices(r,a,s)},e.Canvas.prototype.getDeviceClipBounds=function(r){this._getDeviceClipBounds(it);var a=Mt.toTypedArray();return r?r.set(a):r=a.slice(),r},e.Canvas.prototype.quickReject=function(r){return r=x(r),this._quickReject(r)},e.Canvas.prototype.getLocalToDevice=function(){this._getLocalToDevice(De);for(var r=De,a=Array(16),s=0;16>s;s++)a[s]=e.HEAPF32[r/4+s];return a},e.Canvas.prototype.getTotalMatrix=function(){this._getTotalMatrix(te);for(var r=Array(9),a=0;9>a;a++)r[a]=e.HEAPF32[te/4+a];return r},e.Canvas.prototype.makeSurface=function(r){return r=this._makeSurface(r),r.zd=this.zd,r},e.Canvas.prototype.readPixels=function(r,a,s,c,v){return e.Ad(this.zd),o(this,r,a,s,c,v)},e.Canvas.prototype.saveLayer=function(r,a,s,c,v){return a=x(a),this._saveLayer(r||null,a,s||null,c||0,v||e.TileMode.Clamp)},e.Canvas.prototype.writePixels=function(r,a,s,c,v,g,w,F){if(r.byteLength%(a*s))throw"pixels length must be a multiple of the srcWidth * srcHeight";e.Ad(this.zd);var S=r.byteLength/(a*s);g=g||e.AlphaType.Unpremul,w=w||e.ColorType.RGBA_8888,F=F||e.ColorSpace.SRGB;var H=S*a;return S=f(r,"HEAPU8"),a=this._writePixels({width:a,height:s,colorType:w,alphaType:g,colorSpace:F},S,H,c,v),l(S,r),a},e.ColorFilter.MakeBlend=function(r,a,s){return r=T(r),s=s||e.ColorSpace.SRGB,e.ColorFilter._MakeBlend(r,a,s)},e.ColorFilter.MakeMatrix=function(r){if(!r||r.length!==20)throw"invalid color matrix";var a=f(r,"HEAPF32"),s=e.ColorFilter._makeMatrix(a);return l(a,r),s},e.ContourMeasure.prototype.getPosTan=function(r,a){return this._getPosTan(r,z),r=re.toTypedArray(),a?(a.set(r),a):r.slice()},e.ImageFilter.prototype.getOutputBounds=function(r,a,s){return r=x(r,z),a=m(a),this._getOutputBounds(r,a,it),a=Mt.toTypedArray(),s?(s.set(a),s):a.slice()},e.ImageFilter.MakeDropShadow=function(r,a,s,c,v,g){return v=T(v,$e),e.ImageFilter._MakeDropShadow(r,a,s,c,v,g)},e.ImageFilter.MakeDropShadowOnly=function(r,a,s,c,v,g){return v=T(v,$e),e.ImageFilter._MakeDropShadowOnly(r,a,s,c,v,g)},e.ImageFilter.MakeImage=function(r,a,s,c){if(s=x(s,z),c=x(c,Me),"B"in a&&"C"in a)return e.ImageFilter._MakeImageCubic(r,a.B,a.C,s,c);let v=a.filter,g=e.MipmapMode.None;return"mipmap"in a&&(g=a.mipmap),e.ImageFilter._MakeImageOptions(r,v,g,s,c)},e.ImageFilter.MakeMatrixTransform=function(r,a,s){if(r=m(r),"B"in a&&"C"in a)return e.ImageFilter._MakeMatrixTransformCubic(r,a.B,a.C,s);let c=a.filter,v=e.MipmapMode.None;return"mipmap"in a&&(v=a.mipmap),e.ImageFilter._MakeMatrixTransformOptions(r,c,v,s)},e.Paint.prototype.getColor=function(){return this._getColor($e),W($e)},e.Paint.prototype.setColor=function(r,a){a=a||null,r=T(r),this._setColor(r,a)},e.Paint.prototype.setColorComponents=function(r,a,s,c,v){v=v||null,r=N(r,a,s,c),this._setColor(r,v)},e.Path.prototype.getPoint=function(r,a){return this._getPoint(r,z),r=re.toTypedArray(),a?(a[0]=r[0],a[1]=r[1],a):r.slice(0,2)},e.Picture.prototype.makeShader=function(r,a,s,c,v){return c=m(c),v=x(v),this._makeShader(r,a,s,c,v)},e.Picture.prototype.cullRect=function(r){this._cullRect(z);var a=re.toTypedArray();return r?(r.set(a),r):a.slice()},e.PictureRecorder.prototype.beginRecording=function(r,a){return r=x(r),this._beginRecording(r,!!a)},e.Surface.prototype.getCanvas=function(){var r=this._getCanvas();return r.zd=this.zd,r},e.Surface.prototype.makeImageSnapshot=function(r){return e.Ad(this.zd),r=f(r,"HEAP32",it),this._makeImageSnapshot(r)},e.Surface.prototype.makeSurface=function(r){return e.Ad(this.zd),r=this._makeSurface(r),r.zd=this.zd,r},e.Surface.prototype.ze=function(r,a){return this.Ud||(this.Ud=this.getCanvas()),requestAnimationFrame(function(){e.Ad(this.zd),r(this.Ud),this.flush(a)}.bind(this))},e.Surface.prototype.requestAnimationFrame||(e.Surface.prototype.requestAnimationFrame=e.Surface.prototype.ze),e.Surface.prototype.we=function(r,a){this.Ud||(this.Ud=this.getCanvas()),requestAnimationFrame(function(){e.Ad(this.zd),r(this.Ud),this.flush(a),this.dispose()}.bind(this))},e.Surface.prototype.drawOnce||(e.Surface.prototype.drawOnce=e.Surface.prototype.we),e.PathEffect.MakeDash=function(r,a){if(a||=0,!r.length||r.length%2===1)throw"Intervals array must have even length";var s=f(r,"HEAPF32");return a=e.PathEffect._MakeDash(s,r.length,a),l(s,r),a},e.PathEffect.MakeLine2D=function(r,a){return a=m(a),e.PathEffect._MakeLine2D(r,a)},e.PathEffect.MakePath2D=function(r,a){return r=m(r),e.PathEffect._MakePath2D(r,a)},e.Shader.MakeColor=function(r,a){return a=a||null,r=T(r),e.Shader._MakeColor(r,a)},e.Shader.Blend=e.Shader.MakeBlend,e.Shader.Color=e.Shader.MakeColor,e.Shader.MakeLinearGradient=function(r,a,s,c,v,g,w,F){F=F||null;var S=_(s),H=f(c,"HEAPF32");w=w||0,g=m(g);var U=re.toTypedArray();return U.set(r),U.set(a,2),r=e.Shader._MakeLinearGradient(z,S.Jd,S.colorType,H,S.count,v,w,g,F),l(S.Jd,s),c&&l(H,c),r},e.Shader.MakeRadialGradient=function(r,a,s,c,v,g,w,F){F=F||null;var S=_(s),H=f(c,"HEAPF32");return w=w||0,g=m(g),r=e.Shader._MakeRadialGradient(r[0],r[1],a,S.Jd,S.colorType,H,S.count,v,w,g,F),l(S.Jd,s),c&&l(H,c),r},e.Shader.MakeSweepGradient=function(r,a,s,c,v,g,w,F,S,H){H=H||null;var U=_(s),h=f(c,"HEAPF32");return w=w||0,F=F||0,S=S||360,g=m(g),r=e.Shader._MakeSweepGradient(r,a,U.Jd,U.colorType,h,U.count,v,F,S,w,g,H),l(U.Jd,s),c&&l(h,c),r},e.Shader.MakeTwoPointConicalGradient=function(r,a,s,c,v,g,w,F,S,H){H=H||null;var U=_(v),h=f(g,"HEAPF32");S=S||0,F=m(F);var A=re.toTypedArray();return A.set(r),A.set(s,2),r=e.Shader._MakeTwoPointConicalGradient(z,a,c,U.Jd,U.colorType,h,U.count,w,S,F,H),l(U.Jd,v),g&&l(h,g),r},e.Vertices.prototype.bounds=function(r){this._bounds(z);var a=re.toTypedArray();return r?(r.set(a),r):a.slice()},e.Dd&&e.Dd.forEach(function(r){r()})},e.computeTonalColors=function(o){var r=f(o.ambient,"HEAPF32"),a=f(o.spot,"HEAPF32");this._computeTonalColors(r,a);var s={ambient:W(r),spot:W(a)};return l(r,o.ambient),l(a,o.spot),s},e.LTRBRect=function(o,r,a,s){return Float32Array.of(o,r,a,s)},e.XYWHRect=function(o,r,a,s){return Float32Array.of(o,r,o+a,r+s)},e.LTRBiRect=function(o,r,a,s){return Int32Array.of(o,r,a,s)},e.XYWHiRect=function(o,r,a,s){return Int32Array.of(o,r,o+a,r+s)},e.RRectXY=function(o,r,a){return Float32Array.of(o[0],o[1],o[2],o[3],r,a,r,a,r,a,r,a)},e.MakeAnimatedImageFromEncoded=function(o){o=new Uint8Array(o);var r=e._malloc(o.byteLength);return e.HEAPU8.set(o,r),(o=e._decodeAnimatedImage(r,o.byteLength))?o:null},e.MakeImageFromEncoded=function(o){o=new Uint8Array(o);var r=e._malloc(o.byteLength);return e.HEAPU8.set(o,r),(o=e._decodeImage(r,o.byteLength))?o:null};var Ft=null;e.MakeImageFromCanvasImageSource=function(o){var r=o.width,a=o.height;Ft||=document.createElement("canvas"),Ft.width=r,Ft.height=a;var s=Ft.getContext("2d",{willReadFrequently:!0});return s.drawImage(o,0,0),o=s.getImageData(0,0,r,a),e.MakeImage({width:r,height:a,alphaType:e.AlphaType.Unpremul,colorType:e.ColorType.RGBA_8888,colorSpace:e.ColorSpace.SRGB},o.data,4*r)},e.MakeImage=function(o,r,a){var s=e._malloc(r.length);return e.HEAPU8.set(r,s),e._MakeImage(o,s,r.length,a)},e.MakeVertices=function(o,r,a,s,c,v){var g=c&&c.length||0,w=0;return a&&a.length&&(w|=1),s&&s.length&&(w|=2),v===void 0||v||(w|=4),o=new e._VerticesBuilder(o,r.length/2,g,w),f(r,"HEAPF32",o.positions()),o.texCoords()&&f(a,"HEAPF32",o.texCoords()),o.colors()&&f(u(s),"HEAPU32",o.colors()),o.indices()&&f(c,"HEAPU16",o.indices()),o.detach()},e.Matrix={},e.Matrix.identity=function(){return n(3)},e.Matrix.invert=function(o){var r=o[0]*o[4]*o[8]+o[1]*o[5]*o[6]+o[2]*o[3]*o[7]-o[2]*o[4]*o[6]-o[1]*o[3]*o[8]-o[0]*o[5]*o[7];return r?[(o[4]*o[8]-o[5]*o[7])/r,(o[2]*o[7]-o[1]*o[8])/r,(o[1]*o[5]-o[2]*o[4])/r,(o[5]*o[6]-o[3]*o[8])/r,(o[0]*o[8]-o[2]*o[6])/r,(o[2]*o[3]-o[0]*o[5])/r,(o[3]*o[7]-o[4]*o[6])/r,(o[1]*o[6]-o[0]*o[7])/r,(o[0]*o[4]-o[1]*o[3])/r]:null},e.Matrix.mapPoints=function(o,r){for(var a=0;a<r.length;a+=2){var s=r[a],c=r[a+1],v=o[6]*s+o[7]*c+o[8],g=o[3]*s+o[4]*c+o[5];r[a]=(o[0]*s+o[1]*c+o[2])/v,r[a+1]=g/v}return r},e.Matrix.multiply=function(){return Se(3,arguments)},e.Matrix.rotated=function(o,r,a){r=r||0,a=a||0;var s=Math.sin(o);return o=Math.cos(o),[o,-s,Te(s,a,1-o,r),s,o,Te(-s,r,1-o,a),0,0,1]},e.Matrix.scaled=function(o,r,a,s){a=a||0,s=s||0;var c=t([o,r],n(3),3,0,1);return t([a-o*a,s-r*s],c,3,2,0)},e.Matrix.skewed=function(o,r,a,s){a=a||0,s=s||0;var c=t([o,r],n(3),3,1,-1);return t([-o*a,-r*s],c,3,2,0)},e.Matrix.translated=function(o,r){return t(arguments,n(3),3,2,0)},e.Vector={},e.Vector.dot=function(o,r){return o.map(function(a,s){return a*r[s]}).reduce(function(a,s){return a+s})},e.Vector.lengthSquared=function(o){return e.Vector.dot(o,o)},e.Vector.length=function(o){return Math.sqrt(e.Vector.lengthSquared(o))},e.Vector.mulScalar=function(o,r){return o.map(function(a){return a*r})},e.Vector.add=function(o,r){return o.map(function(a,s){return a+r[s]})},e.Vector.sub=function(o,r){return o.map(function(a,s){return a-r[s]})},e.Vector.dist=function(o,r){return e.Vector.length(e.Vector.sub(o,r))},e.Vector.normalize=function(o){return e.Vector.mulScalar(o,1/e.Vector.length(o))},e.Vector.cross=function(o,r){return[o[1]*r[2]-o[2]*r[1],o[2]*r[0]-o[0]*r[2],o[0]*r[1]-o[1]*r[0]]},e.M44={},e.M44.identity=function(){return n(4)},e.M44.translated=function(o){return t(o,n(4),4,3,0)},e.M44.scaled=function(o){return t(o,n(4),4,0,1)},e.M44.rotated=function(o,r){return e.M44.rotatedUnitSinCos(e.Vector.normalize(o),Math.sin(r),Math.cos(r))},e.M44.rotatedUnitSinCos=function(o,r,a){var s=o[0],c=o[1];o=o[2];var v=1-a;return[v*s*s+a,v*s*c-r*o,v*s*o+r*c,0,v*s*c+r*o,v*c*c+a,v*c*o-r*s,0,v*s*o-r*c,v*c*o+r*s,v*o*o+a,0,0,0,0,1]},e.M44.lookat=function(o,r,a){r=e.Vector.normalize(e.Vector.sub(r,o)),a=e.Vector.normalize(a),a=e.Vector.normalize(e.Vector.cross(r,a));var s=e.M44.identity();return t(a,s,4,0,0),t(e.Vector.cross(a,r),s,4,1,0),t(e.Vector.mulScalar(r,-1),s,4,2,0),t(o,s,4,3,0),o=e.M44.invert(s),o===null?e.M44.identity():o},e.M44.perspective=function(o,r,a){var s=1/(r-o);return a/=2,a=Math.cos(a)/Math.sin(a),[a,0,0,0,0,a,0,0,0,0,(r+o)*s,2*r*o*s,0,0,-1,1]},e.M44.rc=function(o,r,a){return o[4*r+a]},e.M44.multiply=function(){return Se(4,arguments)},e.M44.invert=function(o){var r=o[0],a=o[4],s=o[8],c=o[12],v=o[1],g=o[5],w=o[9],F=o[13],S=o[2],H=o[6],U=o[10],h=o[14],A=o[3],P=o[7],D=o[11];o=o[15];var K=r*g-a*v,ve=r*w-s*v,me=r*F-c*v,Ee=a*w-s*g,j=a*F-c*g,be=s*F-c*w,Ne=S*P-H*A,ze=S*D-U*A,je=S*o-h*A,Ve=H*D-U*P,Xe=H*o-h*P,Qe=U*o-h*D,Yr=K*Qe-ve*Xe+me*Ve+Ee*je-j*ze+be*Ne,Z=1/Yr;return Yr===0||Z===1/0?null:(K*=Z,ve*=Z,me*=Z,Ee*=Z,j*=Z,be*=Z,Ne*=Z,ze*=Z,je*=Z,Ve*=Z,Xe*=Z,Qe*=Z,r=[g*Qe-w*Xe+F*Ve,w*je-v*Qe-F*ze,v*Xe-g*je+F*Ne,g*ze-v*Ve-w*Ne,s*Xe-a*Qe-c*Ve,r*Qe-s*je+c*ze,a*je-r*Xe-c*Ne,r*Ve-a*ze+s*Ne,P*be-D*j+o*Ee,D*me-A*be-o*ve,A*j-P*me+o*K,P*ve-A*Ee-D*K,U*j-H*be-h*Ee,S*be-U*me+h*ve,H*me-S*j-h*K,S*Ee-H*ve+U*K],r.every(function(tr){return!isNaN(tr)&&tr!==1/0&&tr!==-1/0})?r:null)},e.M44.transpose=function(o){return[o[0],o[4],o[8],o[12],o[1],o[5],o[9],o[13],o[2],o[6],o[10],o[14],o[3],o[7],o[11],o[15]]},e.M44.mustInvert=function(o){if(o=e.M44.invert(o),o===null)throw"Matrix not invertible";return o},e.M44.setupCamera=function(o,r,a){var s=e.M44.lookat(a.eye,a.coa,a.up);return a=e.M44.perspective(a.near,a.far,a.angle),r=[(o[2]-o[0])/2,(o[3]-o[1])/2,r],o=e.M44.multiply(e.M44.translated([(o[0]+o[2])/2,(o[1]+o[3])/2,0]),e.M44.scaled(r)),e.M44.multiply(o,a,s,e.M44.mustInvert(o))},e.ColorMatrix={},e.ColorMatrix.identity=function(){var o=new Float32Array(20);return o[0]=1,o[6]=1,o[12]=1,o[18]=1,o},e.ColorMatrix.scaled=function(o,r,a,s){var c=new Float32Array(20);return c[0]=o,c[6]=r,c[12]=a,c[18]=s,c};var qn=[[6,7,11,12],[0,10,2,12],[0,1,5,6]];e.ColorMatrix.rotated=function(o,r,a){var s=e.ColorMatrix.identity();return o=qn[o],s[o[0]]=a,s[o[1]]=r,s[o[2]]=-r,s[o[3]]=a,s},e.ColorMatrix.postTranslate=function(o,r,a,s,c){return o[4]+=r,o[9]+=a,o[14]+=s,o[19]+=c,o},e.ColorMatrix.concat=function(o,r){for(var a=new Float32Array(20),s=0,c=0;20>c;c+=5){for(var v=0;4>v;v++)a[s++]=o[c]*r[v]+o[c+1]*r[v+5]+o[c+2]*r[v+10]+o[c+3]*r[v+15];a[s++]=o[c]*r[4]+o[c+1]*r[9]+o[c+2]*r[14]+o[c+3]*r[19]+o[c+4]}return a},(function(o){o.Dd=o.Dd||[],o.Dd.push(function(){function r(h){return h&&(h.dir=h.dir===0?o.TextDirection.RTL:o.TextDirection.LTR),h}function a(h){if(!h||!h.length)return[];for(var A=[],P=0;P<h.length;P+=5){var D=o.LTRBRect(h[P],h[P+1],h[P+2],h[P+3]),K=o.TextDirection.LTR;h[P+4]===0&&(K=o.TextDirection.RTL),A.push({rect:D,dir:K})}return o._free(h.byteOffset),A}function s(h){return h=h||{},h.weight===void 0&&(h.weight=o.FontWeight.Normal),h.width=h.width||o.FontWidth.Normal,h.slant=h.slant||o.FontSlant.Upright,h}function c(h){if(!h||!h.length)return L;for(var A=[],P=0;P<h.length;P++){var D=v(h[P]);A.push(D)}return f(A,"HEAPU32")}function v(h){if(F[h])return F[h];var A=se(h)+1,P=o._malloc(A);return J(h,P,A),F[h]=P}function g(h){if(h._colorPtr=T(h.color),h._foregroundColorPtr=L,h._backgroundColorPtr=L,h._decorationColorPtr=L,h.foregroundColor&&(h._foregroundColorPtr=T(h.foregroundColor,S)),h.backgroundColor&&(h._backgroundColorPtr=T(h.backgroundColor,H)),h.decorationColor&&(h._decorationColorPtr=T(h.decorationColor,U)),Array.isArray(h.fontFamilies)&&h.fontFamilies.length?(h._fontFamiliesPtr=c(h.fontFamilies),h._fontFamiliesLen=h.fontFamilies.length):(h._fontFamiliesPtr=L,h._fontFamiliesLen=0),h.locale){var A=h.locale;h._localePtr=v(A),h._localeLen=se(A)}else h._localePtr=L,h._localeLen=0;if(Array.isArray(h.shadows)&&h.shadows.length){A=h.shadows;var P=A.map(function(j){return j.color||o.BLACK}),D=A.map(function(j){return j.blurRadius||0});h._shadowLen=A.length;for(var K=o._malloc(8*A.length),ve=K/4,me=0;me<A.length;me++){var Ee=A[me].offset||[0,0];o.HEAPF32[ve]=Ee[0],o.HEAPF32[ve+1]=Ee[1],ve+=2}h._shadowColorsPtr=_(P).Jd,h._shadowOffsetsPtr=K,h._shadowBlurRadiiPtr=f(D,"HEAPF32")}else h._shadowLen=0,h._shadowColorsPtr=L,h._shadowOffsetsPtr=L,h._shadowBlurRadiiPtr=L;Array.isArray(h.fontFeatures)&&h.fontFeatures.length?(A=h.fontFeatures,P=A.map(function(j){return j.name}),D=A.map(function(j){return j.value}),h._fontFeatureLen=A.length,h._fontFeatureNamesPtr=c(P),h._fontFeatureValuesPtr=f(D,"HEAPU32")):(h._fontFeatureLen=0,h._fontFeatureNamesPtr=L,h._fontFeatureValuesPtr=L),Array.isArray(h.fontVariations)&&h.fontVariations.length?(A=h.fontVariations,P=A.map(function(j){return j.axis}),D=A.map(function(j){return j.value}),h._fontVariationLen=A.length,h._fontVariationAxesPtr=c(P),h._fontVariationValuesPtr=f(D,"HEAPF32")):(h._fontVariationLen=0,h._fontVariationAxesPtr=L,h._fontVariationValuesPtr=L)}function w(h){o._free(h._fontFamiliesPtr),o._free(h._shadowColorsPtr),o._free(h._shadowOffsetsPtr),o._free(h._shadowBlurRadiiPtr),o._free(h._fontFeatureNamesPtr),o._free(h._fontFeatureValuesPtr),o._free(h._fontVariationAxesPtr),o._free(h._fontVariationValuesPtr)}o.Paragraph.prototype.getRectsForRange=function(h,A,P,D){return h=this._getRectsForRange(h,A,P,D),a(h)},o.Paragraph.prototype.getRectsForPlaceholders=function(){var h=this._getRectsForPlaceholders();return a(h)},o.Paragraph.prototype.getGlyphInfoAt=function(h){return r(this._getGlyphInfoAt(h))},o.Paragraph.prototype.getClosestGlyphInfoAtCoordinate=function(h,A){return r(this._getClosestGlyphInfoAtCoordinate(h,A))},o.TypefaceFontProvider.prototype.registerFont=function(h,A){if(h=o.Typeface.MakeTypefaceFromData(h),!h)return null;A=v(A),this._registerFont(h,A),h.delete()},o.ParagraphStyle=function(h){if(h.disableHinting=h.disableHinting||!1,h.ellipsis){var A=h.ellipsis;h._ellipsisPtr=v(A),h._ellipsisLen=se(A)}else h._ellipsisPtr=L,h._ellipsisLen=0;return h.heightMultiplier==null&&(h.heightMultiplier=-1),h.maxLines=h.maxLines||0,h.replaceTabCharacters=h.replaceTabCharacters||!1,A=(A=h.strutStyle)||{},A.strutEnabled=A.strutEnabled||!1,A.strutEnabled&&Array.isArray(A.fontFamilies)&&A.fontFamilies.length?(A._fontFamiliesPtr=c(A.fontFamilies),A._fontFamiliesLen=A.fontFamilies.length):(A._fontFamiliesPtr=L,A._fontFamiliesLen=0),A.fontStyle=s(A.fontStyle),A.fontSize==null&&(A.fontSize=-1),A.heightMultiplier==null&&(A.heightMultiplier=-1),A.halfLeading=A.halfLeading||!1,A.leading=A.leading||0,A.forceStrutHeight=A.forceStrutHeight||!1,h.strutStyle=A,h.textAlign=h.textAlign||o.TextAlign.Start,h.textDirection=h.textDirection||o.TextDirection.LTR,h.textHeightBehavior=h.textHeightBehavior||o.TextHeightBehavior.All,h.textStyle=o.TextStyle(h.textStyle),h.applyRoundingHack=h.applyRoundingHack!==!1,h},o.TextStyle=function(h){return h.color||(h.color=o.BLACK),h.decoration=h.decoration||0,h.decorationThickness=h.decorationThickness||0,h.decorationStyle=h.decorationStyle||o.DecorationStyle.Solid,h.textBaseline=h.textBaseline||o.TextBaseline.Alphabetic,h.fontSize==null&&(h.fontSize=-1),h.letterSpacing=h.letterSpacing||0,h.wordSpacing=h.wordSpacing||0,h.heightMultiplier==null&&(h.heightMultiplier=-1),h.halfLeading=h.halfLeading||!1,h.fontStyle=s(h.fontStyle),h};var F={},S=o._malloc(16),H=o._malloc(16),U=o._malloc(16);o.ParagraphBuilder.Make=function(h,A){return g(h.textStyle),A=o.ParagraphBuilder._Make(h,A),w(h.textStyle),A},o.ParagraphBuilder.MakeFromFontProvider=function(h,A){return g(h.textStyle),A=o.ParagraphBuilder._MakeFromFontProvider(h,A),w(h.textStyle),A},o.ParagraphBuilder.MakeFromFontCollection=function(h,A){return g(h.textStyle),A=o.ParagraphBuilder._MakeFromFontCollection(h,A),w(h.textStyle),A},o.ParagraphBuilder.ShapeText=function(h,A,P){let D=0;for(let K of A)D+=K.length;if(D!==h.length)throw"Accumulated block lengths must equal text.length";return o.ParagraphBuilder._ShapeText(h,A,P)},o.ParagraphBuilder.prototype.pushStyle=function(h){g(h),this._pushStyle(h),w(h)},o.ParagraphBuilder.prototype.pushPaintStyle=function(h,A,P){g(h),this._pushPaintStyle(h,A,P),w(h)},o.ParagraphBuilder.prototype.addPlaceholder=function(h,A,P,D,K){P=P||o.PlaceholderAlignment.Baseline,D=D||o.TextBaseline.Alphabetic,this._addPlaceholder(h||0,A||0,P,D,K||0)},o.ParagraphBuilder.prototype.setWordsUtf8=function(h){var A=f(h,"HEAPU32");this._setWordsUtf8(A,h&&h.length||0),l(A,h)},o.ParagraphBuilder.prototype.setWordsUtf16=function(h){var A=f(h,"HEAPU32");this._setWordsUtf16(A,h&&h.length||0),l(A,h)},o.ParagraphBuilder.prototype.setGraphemeBreaksUtf8=function(h){var A=f(h,"HEAPU32");this._setGraphemeBreaksUtf8(A,h&&h.length||0),l(A,h)},o.ParagraphBuilder.prototype.setGraphemeBreaksUtf16=function(h){var A=f(h,"HEAPU32");this._setGraphemeBreaksUtf16(A,h&&h.length||0),l(A,h)},o.ParagraphBuilder.prototype.setLineBreaksUtf8=function(h){var A=f(h,"HEAPU32");this._setLineBreaksUtf8(A,h&&h.length||0),l(A,h)},o.ParagraphBuilder.prototype.setLineBreaksUtf16=function(h){var A=f(h,"HEAPU32");this._setLineBreaksUtf16(A,h&&h.length||0),l(A,h)}})})(k),e.Dd=e.Dd||[],e.Dd.push(function(){}),e.Dd=e.Dd||[],e.Dd.push(function(){e.Canvas.prototype.drawText=function(o,r,a,s,c){var v=se(o),g=e._malloc(v+1);J(o,g,v+1),this._drawSimpleText(g,v,r,a,c,s),e._free(g)},e.Canvas.prototype.drawGlyphs=function(o,r,a,s,c,v){if(!(2*o.length<=r.length))throw"Not enough positions for the array of gyphs";e.Ad(this.zd);let g=f(o,"HEAPU16"),w=f(r,"HEAPF32");this._drawGlyphs(o.length,g,w,a,s,c,v),l(w,r),l(g,o)},e.Font.prototype.getGlyphBounds=function(o,r,a){var s=f(o,"HEAPU16"),c=e._malloc(16*o.length);return this._getGlyphWidthBounds(s,o.length,L,c,r||null),r=new Float32Array(e.HEAPU8.buffer,c,4*o.length),l(s,o),a?(a.set(r),e._free(c),a):(o=Float32Array.from(r),e._free(c),o)},e.Font.prototype.getGlyphIDs=function(o,r,a){r||(r=o.length);var s=se(o)+1,c=e._malloc(s);return J(o,c,s),o=e._malloc(2*r),r=this._getGlyphIDs(c,s-1,r,o),e._free(c),0>r?(e._free(o),null):(c=new Uint16Array(e.HEAPU8.buffer,o,r),a?(a.set(c),e._free(o),a):(a=Uint16Array.from(c),e._free(o),a))},e.Font.prototype.getGlyphPaths=function(o,r){var a=f(o,"HEAPU16"),s=f(r,"HEAPF32"),c=this._getGlyphPaths(a,o.length,s);return l(a,o),l(s,r),c},e.Font.prototype.getGlyphIntercepts=function(o,r,a,s){var c=f(o,"HEAPU16"),v=f(r,"HEAPF32");return this._getGlyphIntercepts(c,o.length,!(o&&o._ck),v,r.length,!(r&&r._ck),a,s)},e.Font.prototype.getGlyphWidths=function(o,r,a){var s=f(o,"HEAPU16"),c=e._malloc(4*o.length);return this._getGlyphWidthBounds(s,o.length,c,L,r||null),r=new Float32Array(e.HEAPU8.buffer,c,o.length),l(s,o),a?(a.set(r),e._free(c),a):(o=Float32Array.from(r),e._free(c),o)},e.FontMgr.FromData=function(){if(!arguments.length)return null;var o=arguments;if(o.length===1&&Array.isArray(o[0])&&(o=arguments[0]),!o.length)return null;for(var r=[],a=[],s=0;s<o.length;s++){var c=new Uint8Array(o[s]),v=f(c,"HEAPU8");r.push(v),a.push(c.byteLength)}return r=f(r,"HEAPU32"),a=f(a,"HEAPU32"),o=e.FontMgr._fromData(r,a,o.length),e._free(r),e._free(a),o},e.Typeface.MakeTypefaceFromData=function(o){o=new Uint8Array(o);var r=f(o,"HEAPU8");return(o=e.Typeface._MakeTypefaceFromData(r,o.byteLength))?o:null},e.Typeface.MakeFreeTypeFaceFromData=e.Typeface.MakeTypefaceFromData,e.Typeface.prototype.getGlyphIDs=function(o,r,a){r||(r=o.length);var s=se(o)+1,c=e._malloc(s);return J(o,c,s),o=e._malloc(2*r),r=this._getGlyphIDs(c,s-1,r,o),e._free(c),0>r?(e._free(o),null):(c=new Uint16Array(e.HEAPU8.buffer,o,r),a?(a.set(c),e._free(o),a):(a=Uint16Array.from(c),e._free(o),a))},e.TextBlob.MakeOnPath=function(o,r,a,s){if(o&&o.length&&r&&r.countPoints()){if(r.countPoints()===1)return this.MakeFromText(o,a);s||=0;var c=a.getGlyphIDs(o);c=a.getGlyphWidths(c);var v=[];r=new e.ContourMeasureIter(r,!1,1);for(var g=r.next(),w=new Float32Array(4),F=0;F<o.length&&g;F++){var S=c[F];if(s+=S/2,s>g.length()){if(g.delete(),g=r.next(),!g){o=o.substring(0,F);break}s=S/2}g.getPosTan(s,w);var H=w[2],U=w[3];v.push(H,U,w[0]-S/2*H,w[1]-S/2*U),s+=S/2}return o=this.MakeFromRSXform(o,v,a),g&&g.delete(),r.delete(),o}},e.TextBlob.MakeFromRSXform=function(o,r,a){var s=se(o)+1,c=e._malloc(s);return J(o,c,s),o=f(r,"HEAPF32"),a=e.TextBlob._MakeFromRSXform(c,s-1,o,a),e._free(c),a||null},e.TextBlob.MakeFromRSXformGlyphs=function(o,r,a){var s=f(o,"HEAPU16");return r=f(r,"HEAPF32"),a=e.TextBlob._MakeFromRSXformGlyphs(s,2*o.length,r,a),l(s,o),a||null},e.TextBlob.MakeFromGlyphs=function(o,r){var a=f(o,"HEAPU16");return r=e.TextBlob._MakeFromGlyphs(a,2*o.length,r),l(a,o),r||null},e.TextBlob.MakeFromText=function(o,r){var a=se(o)+1,s=e._malloc(a);return J(o,s,a),o=e.TextBlob._MakeFromText(s,a-1,r),e._free(s),o||null},e.MallocGlyphIDs=function(o){return e.Malloc(Uint16Array,o)}}),e.Dd=e.Dd||[],e.Dd.push(function(){e.RuntimeEffect.Make=function(o,r){return e.RuntimeEffect._Make(o,{onError:r||function(a){console.log("RuntimeEffect error",a)}})},e.RuntimeEffect.MakeForBlender=function(o,r){return e.RuntimeEffect._MakeForBlender(o,{onError:r||function(a){console.log("RuntimeEffect error",a)}})},e.RuntimeEffect.prototype.makeShader=function(o,r){var a=!o._ck,s=f(o,"HEAPF32");return r=m(r),this._makeShader(s,4*o.length,a,r)},e.RuntimeEffect.prototype.makeShaderWithChildren=function(o,r,a){var s=!o._ck,c=f(o,"HEAPF32");a=m(a);for(var v=[],g=0;g<r.length;g++)v.push(r[g].yd.Cd);return r=f(v,"HEAPU32"),this._makeShaderWithChildren(c,4*o.length,s,r,v.length,a)},e.RuntimeEffect.prototype.makeBlender=function(o){var r=!o._ck,a=f(o,"HEAPF32");return this._makeBlender(a,4*o.length,r)}})})(k);var ir="./this.program",oe="",Lt,at;if(or){var ar=Zr("fs");Zr("path"),oe=__dirname+"/",at=e=>(e=st(e)?new URL(e):e,ar.readFileSync(e)),Lt=async e=>(e=st(e)?new URL(e):e,ar.readFileSync(e,void 0)),1<process.argv.length&&(ir=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2)}else(tn||Pt)&&(Pt?oe=self.location.href:typeof document<"u"&&document.currentScript&&(oe=document.currentScript.src),ne&&(oe=ne),oe.startsWith("blob:")?oe="":oe=oe.slice(0,oe.replace(/[?#].*/,"").lastIndexOf("/")+1),Pt&&(at=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),Lt=async e=>{if(st(e))return new Promise((n,i)=>{var u=new XMLHttpRequest;u.open("GET",e,!0),u.responseType="arraybuffer",u.onload=()=>{u.status==200||u.status==0&&u.response?n(u.response):i(u.status)},u.onerror=i,u.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw Error(t.status+" : "+t.url)});var rn=console.log.bind(console),Fe=console.error.bind(console),ut,ur=!1,xe,O,Be,Ue,C,G,M,kt,sr,lr,st=e=>e.startsWith("file://");function fr(){var e=ut.buffer;xe=new Int8Array(e),Be=new Int16Array(e),k.HEAPU8=O=new Uint8Array(e),k.HEAPU16=Ue=new Uint16Array(e),k.HEAP32=C=new Int32Array(e),k.HEAPU32=G=new Uint32Array(e),k.HEAPF32=M=new Float32Array(e),lr=new Float64Array(e),kt=new BigInt64Array(e),sr=new BigUint64Array(e)}var Ke=0,Je=null;function dr(e){throw e="Aborted("+e+")",Fe(e),ur=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),Bt(e),e}var cr;async function nn(e){try{var t=await Lt(e);return new Uint8Array(t)}catch{}if(at)e=at(e);else throw"both async and sync fetching of the wasm failed";return e}async function on(e,t){try{var n=await nn(e);return await WebAssembly.instantiate(n,t)}catch(i){Fe(`failed to asynchronously prepare wasm: ${i}`),dr(i)}}async function an(e){var t=cr;if(typeof WebAssembly.instantiateStreaming=="function"&&!st(t)&&!or)try{var n=fetch(t,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,e)}catch(i){Fe(`wasm streaming compile failed: ${i}`),Fe("falling back to ArrayBuffer instantiation")}return on(t,e)}var hr=typeof TextDecoder<"u"?new TextDecoder:void 0,Ye=(e,t=0,n=NaN)=>{var i=t+n;for(n=t;e[n]&&!(n>=i);)++n;if(16<n-t&&e.buffer&&hr)return hr.decode(e.subarray(t,n));for(i="";t<n;){var u=e[t++];if(u&128){var d=e[t++]&63;if((u&224)==192)i+=String.fromCharCode((u&31)<<6|d);else{var y=e[t++]&63;u=(u&240)==224?(u&15)<<12|d<<6|y:(u&7)<<18|d<<12|y<<6|e[t++]&63,65536>u?i+=String.fromCharCode(u):(u-=65536,i+=String.fromCharCode(55296|u>>10,56320|u&1023))}}else i+=String.fromCharCode(u)}return i},lt={},It=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Ze(e){return this.fromWireType(G[e>>2])}var Oe={},Pe={},ft={},dt=k.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},ie=(e,t,n)=>{function i(l){if(l=n(l),l.length!==e.length)throw new dt("Mismatched type converter count");for(var f=0;f<e.length;++f)ae(e[f],l[f])}e.forEach(l=>ft[l]=t);var u=Array(t.length),d=[],y=0;t.forEach((l,f)=>{Pe.hasOwnProperty(l)?u[f]=Pe[l]:(d.push(l),Oe.hasOwnProperty(l)||(Oe[l]=[]),Oe[l].push(()=>{u[f]=Pe[l],++y,y===d.length&&i(u)}))}),d.length===0&&i(u)},ct=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},pr,b=e=>{for(var t="";O[e];)t+=pr[O[e++]];return t},I=k.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}};function un(e,t,n={}){var i=t.name;if(!e)throw new I(`type "${i}" must have a positive integer typeid pointer`);if(Pe.hasOwnProperty(e)){if(n.Le)return;throw new I(`Cannot register type '${i}' twice`)}Pe[e]=t,delete ft[e],Oe.hasOwnProperty(e)&&(t=Oe[e],delete Oe[e],t.forEach(u=>u()))}function ae(e,t,n={}){return un(e,t,n)}var yr=(e,t,n)=>{switch(t){case 1:return n?i=>xe[i]:i=>O[i];case 2:return n?i=>Be[i>>1]:i=>Ue[i>>1];case 4:return n?i=>C[i>>2]:i=>G[i>>2];case 8:return n?i=>kt[i>>3]:i=>sr[i>>3];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Rt=e=>{throw new I(e.yd.Ed.Bd.name+" instance already deleted")},Gt=!1,vr=()=>{},qe=e=>typeof FinalizationRegistry>"u"?(qe=t=>t,e):(Gt=new FinalizationRegistry(t=>{t=t.yd,--t.count.value,t.count.value===0&&(t.Fd?t.Ld.Od(t.Fd):t.Ed.Bd.Od(t.Cd))}),qe=t=>{var n=t.yd;return n.Fd&&Gt.register(t,{yd:n},t),t},vr=t=>{Gt.unregister(t)},qe(e)),sn=[];function ht(){}var pt=(e,t)=>Object.defineProperty(t,"name",{value:e}),mr={},$t=(e,t,n)=>{if(e[t].Gd===void 0){var i=e[t];e[t]=function(...u){if(!e[t].Gd.hasOwnProperty(u.length))throw new I(`Function '${n}' called with an invalid number of arguments (${u.length}) - expects one of (${e[t].Gd})!`);return e[t].Gd[u.length].apply(this,u)},e[t].Gd=[],e[t].Gd[i.Pd]=i}},Ht=(e,t,n)=>{if(k.hasOwnProperty(e)){if(n===void 0||k[e].Gd!==void 0&&k[e].Gd[n]!==void 0)throw new I(`Cannot register public name '${e}' twice`);if($t(k,e,e),k[e].Gd.hasOwnProperty(n))throw new I(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);k[e].Gd[n]=t}else k[e]=t,k[e].Pd=n},ln=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e};function fn(e,t,n,i,u,d,y,l){this.name=e,this.constructor=t,this.Td=n,this.Od=i,this.Hd=u,this.Ge=d,this.Zd=y,this.De=l,this.Oe=[]}var Ut=(e,t,n)=>{for(;t!==n;){if(!t.Zd)throw new I(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.Zd(e),t=t.Hd}return e};function dn(e,t){if(t===null){if(this.ke)throw new I(`null is not a valid ${this.name}`);return 0}if(!t.yd)throw new I(`Cannot pass "${ct(t)}" as a ${this.name}`);if(!t.yd.Cd)throw new I(`Cannot pass deleted object as a pointer of type ${this.name}`);return Ut(t.yd.Cd,t.yd.Ed.Bd,this.Bd)}function cn(e,t){if(t===null){if(this.ke)throw new I(`null is not a valid ${this.name}`);if(this.de){var n=this.le();return e!==null&&e.push(this.Od,n),n}return 0}if(!t||!t.yd)throw new I(`Cannot pass "${ct(t)}" as a ${this.name}`);if(!t.yd.Cd)throw new I(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ce&&t.yd.Ed.ce)throw new I(`Cannot convert argument of type ${t.yd.Ld?t.yd.Ld.name:t.yd.Ed.name} to parameter type ${this.name}`);if(n=Ut(t.yd.Cd,t.yd.Ed.Bd,this.Bd),this.de){if(t.yd.Fd===void 0)throw new I("Passing raw pointer to smart pointer is illegal");switch(this.Te){case 0:if(t.yd.Ld===this)n=t.yd.Fd;else throw new I(`Cannot convert argument of type ${t.yd.Ld?t.yd.Ld.name:t.yd.Ed.name} to parameter type ${this.name}`);break;case 1:n=t.yd.Fd;break;case 2:if(t.yd.Ld===this)n=t.yd.Fd;else{var i=t.clone();n=this.Pe(n,ce(()=>i.delete())),e!==null&&e.push(this.Od,n)}break;default:throw new I("Unsupporting sharing policy")}}return n}function hn(e,t){if(t===null){if(this.ke)throw new I(`null is not a valid ${this.name}`);return 0}if(!t.yd)throw new I(`Cannot pass "${ct(t)}" as a ${this.name}`);if(!t.yd.Cd)throw new I(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.yd.Ed.ce)throw new I(`Cannot convert argument of type ${t.yd.Ed.name} to parameter type ${this.name}`);return Ut(t.yd.Cd,t.yd.Ed.Bd,this.Bd)}var gr=(e,t,n)=>t===n?e:n.Hd===void 0?null:(e=gr(e,t,n.Hd),e===null?null:n.De(e)),pn={},yn=(e,t)=>{if(t===void 0)throw new I("ptr should not be undefined");for(;e.Hd;)t=e.Zd(t),e=e.Hd;return pn[t]},yt=(e,t)=>{if(!t.Ed||!t.Cd)throw new dt("makeClassHandle requires ptr and ptrType");if(!!t.Ld!=!!t.Fd)throw new dt("Both smartPtrType and smartPtr must be specified");return t.count={value:1},qe(Object.create(e,{yd:{value:t,writable:!0}}))};function et(e,t,n,i,u,d,y,l,f,_,m){this.name=e,this.Bd=t,this.ke=n,this.ce=i,this.de=u,this.Ne=d,this.Te=y,this.re=l,this.le=f,this.Pe=_,this.Od=m,u||t.Hd!==void 0?this.toWireType=cn:(this.toWireType=i?dn:hn,this.Kd=null)}var _r=(e,t,n)=>{if(!k.hasOwnProperty(e))throw new dt("Replacing nonexistent public symbol");k[e].Gd!==void 0&&n!==void 0?k[e].Gd[n]=t:(k[e]=t,k[e].Pd=n)},q,X=(e,t)=>{e=b(e);var n=q.get(t);if(typeof n!="function")throw new I(`unknown function pointer with signature ${e}: ${t}`);return n};class vn extends Error{}var Ar=e=>{e=Dn(e);var t=b(e);return Ge(e),t},tt=(e,t)=>{function n(d){u[d]||Pe[d]||(ft[d]?ft[d].forEach(n):(i.push(d),u[d]=!0))}var i=[],u={};throw t.forEach(n),new vn(`${e}: `+i.map(Ar).join([", "]))};function mn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].Kd===void 0)return!0;return!1}function vt(e,t,n,i,u){var d=t.length;if(2>d)throw new I("argTypes array size mismatch! Must at least get return value and 'this' types!");var y=t[1]!==null&&n!==null,l=mn(t),f=t[0].name!=="void",_=d-2,m=Array(_),E=[],T=[];return pt(e,function(...N){if(T.length=0,E.length=y?2:1,E[0]=u,y){var W=t[1].toWireType(T,this);E[1]=W}for(var x=0;x<_;++x)m[x]=t[x+2].toWireType(T,N[x]),E.push(m[x]);if(N=i(...E),l)It(T);else for(x=y?1:2;x<t.length;x++){var V=x===1?W:m[x-2];t[x].Kd!==null&&t[x].Kd(V)}return W=f?t[0].fromWireType(N):void 0,W})}for(var mt=(e,t)=>{for(var n=[],i=0;i<e;i++)n.push(G[t+4*i>>2]);return n},Ot=e=>{e=e.trim();let t=e.indexOf("(");return t===-1?e:e.slice(0,t)},Wt=[],_e=[],Dt=e=>{9<e&&--_e[e+1]===0&&(_e[e]=void 0,Wt.push(e))},ue=e=>{if(!e)throw new I(`Cannot use deleted val. handle = ${e}`);return _e[e]},ce=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let t=Wt.pop()||_e.length;return _e[t]=e,_e[t+1]=1,t}},gn={name:"emscripten::val",fromWireType:e=>{var t=ue(e);return Dt(e),t},toWireType:(e,t)=>ce(t),Id:8,readValueFromPointer:Ze,Kd:null},_n=(e,t,n)=>{switch(t){case 1:return n?function(i){return this.fromWireType(xe[i])}:function(i){return this.fromWireType(O[i])};case 2:return n?function(i){return this.fromWireType(Be[i>>1])}:function(i){return this.fromWireType(Ue[i>>1])};case 4:return n?function(i){return this.fromWireType(C[i>>2])}:function(i){return this.fromWireType(G[i>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},gt=(e,t)=>{var n=Pe[e];if(n===void 0)throw e=`${t} has unknown type ${Ar(e)}`,new I(e);return n},An=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(M[n>>2])};case 8:return function(n){return this.fromWireType(lr[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},J=(e,t,n)=>{var i=O;if(!(0<n))return 0;var u=t;n=t+n-1;for(var d=0;d<e.length;++d){var y=e.charCodeAt(d);if(55296<=y&&57343>=y){var l=e.charCodeAt(++d);y=65536+((y&1023)<<10)|l&1023}if(127>=y){if(t>=n)break;i[t++]=y}else{if(2047>=y){if(t+1>=n)break;i[t++]=192|y>>6}else{if(65535>=y){if(t+2>=n)break;i[t++]=224|y>>12}else{if(t+3>=n)break;i[t++]=240|y>>18,i[t++]=128|y>>12&63}i[t++]=128|y>>6&63}i[t++]=128|y&63}}return i[t]=0,t-u},se=e=>{for(var t=0,n=0;n<e.length;++n){var i=e.charCodeAt(n);127>=i?t++:2047>=i?t+=2:55296<=i&&57343>=i?(t+=4,++n):t+=3}return t},wr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,wn=(e,t)=>{for(var n=e>>1,i=n+t/2;!(n>=i)&&Ue[n];)++n;if(n<<=1,32<n-e&&wr)return wr.decode(O.subarray(e,n));for(n="",i=0;!(i>=t/2);++i){var u=Be[e+2*i>>1];if(u==0)break;n+=String.fromCharCode(u)}return n},En=(e,t,n)=>{if(n??=2147483647,2>n)return 0;n-=2;var i=t;n=n<2*e.length?n/2:e.length;for(var u=0;u<n;++u)Be[t>>1]=e.charCodeAt(u),t+=2;return Be[t>>1]=0,t-i},Cn=e=>2*e.length,Tn=(e,t)=>{for(var n=0,i="";!(n>=t/4);){var u=C[e+4*n>>2];if(u==0)break;++n,65536<=u?(u-=65536,i+=String.fromCharCode(55296|u>>10,56320|u&1023)):i+=String.fromCharCode(u)}return i},Sn=(e,t,n)=>{if(n??=2147483647,4>n)return 0;var i=t;n=i+n-4;for(var u=0;u<e.length;++u){var d=e.charCodeAt(u);if(55296<=d&&57343>=d){var y=e.charCodeAt(++u);d=65536+((d&1023)<<10)|y&1023}if(C[t>>2]=d,t+=4,t+4>n)break}return C[t>>2]=0,t-i},Mn=e=>{for(var t=0,n=0;n<e.length;++n){var i=e.charCodeAt(n);55296<=i&&57343>=i&&++n,t+=4}return t},Er=(e,t,n)=>{var i=[];return e=e.toWireType(i,n),i.length&&(G[t>>2]=ce(i)),e},_t=[],Fn={},bt=e=>{var t=Fn[e];return t===void 0?b(e):t},Cr=()=>{function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof globalThis=="object")return globalThis;if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},xn=e=>{var t=_t.length;return _t.push(e),t},Bn=(e,t)=>{for(var n=Array(e),i=0;i<e;++i)n[i]=gt(G[t+4*i>>2],`parameter ${i}`);return n},Pn=Reflect.construct,p,Ln=e=>{var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=(n,i)=>t.vertexAttribDivisorANGLE(n,i),e.drawArraysInstanced=(n,i,u,d)=>t.drawArraysInstancedANGLE(n,i,u,d),e.drawElementsInstanced=(n,i,u,d,y)=>t.drawElementsInstancedANGLE(n,i,u,d,y))},kn=e=>{var t=e.getExtension("OES_vertex_array_object");t&&(e.createVertexArray=()=>t.createVertexArrayOES(),e.deleteVertexArray=n=>t.deleteVertexArrayOES(n),e.bindVertexArray=n=>t.bindVertexArrayOES(n),e.isVertexArray=n=>t.isVertexArrayOES(n))},In=e=>{var t=e.getExtension("WEBGL_draw_buffers");t&&(e.drawBuffers=(n,i)=>t.drawBuffersWEBGL(n,i))},Tr=e=>{var t="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(e.getSupportedExtensions()||[]).filter(n=>t.includes(n))},Sr=1,At=[],le=[],wt=[],rt=[],ee=[],fe=[],Et=[],Ae=[],Y=[],Le=[],ke=[],Mr={},Fr={},Nt=4,xr=0,Ie=e=>{for(var t=Sr++,n=e.length;n<t;n++)e[n]=null;return t},Re=(e,t,n,i)=>{for(var u=0;u<e;u++){var d=p[n](),y=d&&Ie(i);d?(d.name=y,i[y]=d):R||=1282,C[t+4*u>>2]=y}},Rn=(e,t)=>{e.ue||(e.ue=e.getContext,e.getContext=function(i,u){return u=e.ue(i,u),i=="webgl"==u instanceof WebGLRenderingContext?u:null});var n=1<t.majorVersion?e.getContext("webgl2",t):e.getContext("webgl",t);return n?Gn(n,t):0},Gn=(e,t)=>{var n=Ie(Ae),i={handle:n,attributes:t,version:t.majorVersion,Md:e};return e.canvas&&(e.canvas.ve=i),Ae[n]=i,(typeof t.Ee>"u"||t.Ee)&&$n(i),n},Br=e=>(B=Ae[e],k.ctx=p=B?.Md,!(e&&!p)),$n=e=>{if(e||=B,!e.Me){e.Me=!0;var t=e.Md;t.Xe=t.getExtension("WEBGL_multi_draw"),t.Ve=t.getExtension("EXT_polygon_offset_clamp"),t.Ue=t.getExtension("EXT_clip_control"),t.Ze=t.getExtension("WEBGL_polygon_mode"),Ln(t),kn(t),In(t),t.oe=t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"),t.qe=t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"),2<=e.version&&(t.Nd=t.getExtension("EXT_disjoint_timer_query_webgl2")),(2>e.version||!t.Nd)&&(t.Nd=t.getExtension("EXT_disjoint_timer_query")),Tr(t).forEach(n=>{n.includes("lose_context")||n.includes("debug")||t.getExtension(n)})}},B,R,Pr=(e,t)=>{p.bindFramebuffer(e,wt[t])},Lr=e=>{p.bindVertexArray(Et[e])},kr=e=>p.clear(e),Ir=(e,t,n,i)=>p.clearColor(e,t,n,i),Rr=e=>p.clearStencil(e),Gr=(e,t)=>{for(var n=0;n<e;n++){var i=C[t+4*n>>2];p.deleteVertexArray(Et[i]),Et[i]=null}},Ct=[],$r=(e,t)=>{Re(e,t,"createVertexArray",Et)},zt=()=>{var e=Tr(p);return e=e.concat(e.map(t=>"GL_"+t))},Hr=(e,t,n)=>{if(t){var i=void 0;switch(e){case 36346:i=1;break;case 36344:n!=0&&n!=1&&(R||=1280);return;case 34814:case 36345:i=0;break;case 34466:var u=p.getParameter(34467);i=u?u.length:0;break;case 33309:if(2>B.version){R||=1282;return}i=zt().length;break;case 33307:case 33308:if(2>B.version){R||=1280;return}i=e==33307?3:0}if(i===void 0)switch(u=p.getParameter(e),typeof u){case"number":i=u;break;case"boolean":i=u?1:0;break;case"string":R||=1280;return;case"object":if(u===null)switch(e){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:i=0;break;default:R||=1280;return}else{if(u instanceof Float32Array||u instanceof Uint32Array||u instanceof Int32Array||u instanceof Array){for(e=0;e<u.length;++e)switch(n){case 0:C[t+4*e>>2]=u[e];break;case 2:M[t+4*e>>2]=u[e];break;case 4:xe[t+e]=u[e]?1:0}return}try{i=u.name|0}catch(d){R||=1280,Fe(`GL_INVALID_ENUM in glGet${n}v: Unknown object returned from WebGL getParameter(${e})! (error: ${d})`);return}}break;default:R||=1280,Fe(`GL_INVALID_ENUM in glGet${n}v: Native code calling glGet${n}v(${e}) and it returns ${u} of type ${typeof u}!`);return}switch(n){case 1:n=i,G[t>>2]=n,G[t+4>>2]=(n-G[t>>2])/4294967296;break;case 0:C[t>>2]=i;break;case 2:M[t>>2]=i;break;case 4:xe[t]=i?1:0}}else R||=1281},Ur=(e,t)=>Hr(e,t,0),Or=(e,t,n)=>{if(n){e=Y[e],t=2>B.version?p.Nd.getQueryObjectEXT(e,t):p.getQueryParameter(e,t);var i;typeof t=="boolean"?i=t?1:0:i=t,G[n>>2]=i,G[n+4>>2]=(i-G[n>>2])/4294967296}else R||=1281},nt=e=>{var t=se(e)+1,n=Qt(t);return n&&J(e,n,t),n},Wr=e=>{var t=Mr[e];if(!t){switch(e){case 7939:t=nt(zt().join(" "));break;case 7936:case 7937:case 37445:case 37446:(t=p.getParameter(e))||(R||=1280),t=t?nt(t):0;break;case 7938:t=p.getParameter(7938);var n=`OpenGL ES 2.0 (${t})`;2<=B.version&&(n=`OpenGL ES 3.0 (${t})`),t=nt(n);break;case 35724:t=p.getParameter(35724),n=t.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/),n!==null&&(n[1].length==3&&(n[1]+="0"),t=`OpenGL ES GLSL ES ${n[1]} (${t})`),t=nt(t);break;default:R||=1280}Mr[e]=t}return t},Dr=(e,t)=>{if(2>B.version)return R||=1282,0;var n=Fr[e];return n?0>t||t>=n.length?(R||=1281,0):n[t]:e===7939?(n=zt().map(nt),n=Fr[e]=n,0>t||t>=n.length?(R||=1281,0):n[t]):(R||=1280,0)},br=e=>e.slice(-1)=="]"&&e.lastIndexOf("["),Tt=e=>(e-=5120,e==0?xe:e==1?O:e==2?Be:e==4?C:e==6?M:e==5||e==28922||e==28520||e==30779||e==30782?G:Ue),jt=(e,t,n,i,u)=>(e=Tt(e),t=i*((xr||n)*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[t-6402]||1)*e.BYTES_PER_ELEMENT+Nt-1&-Nt),e.subarray(u>>>31-Math.clz32(e.BYTES_PER_ELEMENT),u+t>>>31-Math.clz32(e.BYTES_PER_ELEMENT))),$=e=>{var t=p.Ce;if(t){var n=t.Yd[e];return typeof n=="number"&&(t.Yd[e]=n=p.getUniformLocation(t,t.se[e]+(0<n?`[${n}]`:""))),n}R||=1282},Ce=[],ot=[],Vt={},Nr=()=>{if(!Xt){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ir||"./this.program"},t;for(t in Vt)Vt[t]===void 0?delete e[t]:e[t]=Vt[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);Xt=n}return Xt},Xt,Hn=[null,[],[]],zr=Array(256),St=0;256>St;++St)zr[St]=String.fromCharCode(St);pr=zr,(()=>{let e=ht.prototype;Object.assign(e,{isAliasOf:function(n){if(!(this instanceof ht&&n instanceof ht))return!1;var i=this.yd.Ed.Bd,u=this.yd.Cd;n.yd=n.yd;var d=n.yd.Ed.Bd;for(n=n.yd.Cd;i.Hd;)u=i.Zd(u),i=i.Hd;for(;d.Hd;)n=d.Zd(n),d=d.Hd;return i===d&&u===n},clone:function(){if(this.yd.Cd||Rt(this),this.yd.Xd)return this.yd.count.value+=1,this;var n=qe,i=Object,u=i.create,d=Object.getPrototypeOf(this),y=this.yd;return n=n(u.call(i,d,{yd:{value:{count:y.count,Wd:y.Wd,Xd:y.Xd,Cd:y.Cd,Ed:y.Ed,Fd:y.Fd,Ld:y.Ld}}})),n.yd.count.value+=1,n.yd.Wd=!1,n},delete(){if(this.yd.Cd||Rt(this),this.yd.Wd&&!this.yd.Xd)throw new I("Object already scheduled for deletion");vr(this);var n=this.yd;--n.count.value,n.count.value===0&&(n.Fd?n.Ld.Od(n.Fd):n.Ed.Bd.Od(n.Cd)),this.yd.Xd||(this.yd.Fd=void 0,this.yd.Cd=void 0)},isDeleted:function(){return!this.yd.Cd},deleteLater:function(){if(this.yd.Cd||Rt(this),this.yd.Wd&&!this.yd.Xd)throw new I("Object already scheduled for deletion");return sn.push(this),this.yd.Wd=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)})(),Object.assign(et.prototype,{He(e){return this.re&&(e=this.re(e)),e},ne(e){this.Od?.(e)},Id:8,readValueFromPointer:Ze,fromWireType:function(e){function t(){return this.de?yt(this.Bd.Td,{Ed:this.Ne,Cd:n,Ld:this,Fd:e}):yt(this.Bd.Td,{Ed:this,Cd:e})}var n=this.He(e);if(!n)return this.ne(e),null;var i=yn(this.Bd,n);if(i!==void 0)return i.yd.count.value===0?(i.yd.Cd=n,i.yd.Fd=e,i.clone()):(i=i.clone(),this.ne(e),i);if(i=this.Bd.Ge(n),i=mr[i],!i)return t.call(this);i=this.ce?i.Be:i.pointerType;var u=gr(n,this.Bd,i.Bd);return u===null?t.call(this):this.de?yt(i.Bd.Td,{Ed:i,Cd:u,Ld:this,Fd:e}):yt(i.Bd.Td,{Ed:i,Cd:u})}}),_e.push(0,1,void 0,1,null,1,!0,1,!1,1),k.count_emval_handles=()=>_e.length/2-5-Wt.length;for(let e=0;32>e;++e)Ct.push(Array(e));for(var Un=new Float32Array(288),we=0;288>=we;++we)Ce[we]=Un.subarray(0,we);var On=new Int32Array(288);for(we=0;288>=we;++we)ot[we]=On.subarray(0,we);var Wn={P:function(){return 0},ob:()=>{},qb:function(){return 0},lb:()=>{},mb:()=>{},Q:function(){},nb:()=>{},rb:()=>dr(""),v:e=>{var t=lt[e];delete lt[e];var n=t.le,i=t.Od,u=t.pe,d=u.map(y=>y.Ke).concat(u.map(y=>y.Re));ie([e],d,y=>{var l={};return u.forEach((f,_)=>{var m=y[_],E=f.Ie,T=f.Je,N=y[_+u.length],W=f.Qe,x=f.Se;l[f.Fe]={read:V=>m.fromWireType(E(T,V)),write:(V,Te)=>{var Q=[];W(x,V,N.toWireType(Q,Te)),It(Q)},optional:y[_].optional}}),[{name:t.name,fromWireType:f=>{var _={},m;for(m in l)_[m]=l[m].read(f);return i(f),_},toWireType:(f,_)=>{for(var m in l)if(!(m in _||l[m].optional))throw new TypeError(`Missing field: "${m}"`);var E=n();for(m in l)l[m].write(E,_[m]);return f!==null&&f.push(i,E),E},Id:8,readValueFromPointer:Ze,Kd:i}]})},N:(e,t,n)=>{t=b(t),ae(e,{name:t,fromWireType:i=>i,toWireType:function(i,u){if(typeof u!="bigint"&&typeof u!="number")throw new TypeError(`Cannot convert "${ct(u)}" to ${this.name}`);return typeof u=="number"&&(u=BigInt(u)),u},Id:8,readValueFromPointer:yr(t,n,t.indexOf("u")==-1),Kd:null})},_a:(e,t,n,i)=>{t=b(t),ae(e,{name:t,fromWireType:function(u){return!!u},toWireType:function(u,d){return d?n:i},Id:8,readValueFromPointer:function(u){return this.fromWireType(O[u])},Kd:null})},k:(e,t,n,i,u,d,y,l,f,_,m,E,T)=>{m=b(m),d=X(u,d),l&&=X(y,l),_&&=X(f,_),T=X(E,T);var N=ln(m);Ht(N,function(){tt(`Cannot construct ${m} due to unbound types`,[i])}),ie([e,t,n],i?[i]:[],W=>{if(W=W[0],i)var x=W.Bd,V=x.Td;else V=ht.prototype;W=pt(m,function(...te){if(Object.getPrototypeOf(this)!==Te)throw new I(`Use 'new' to construct ${m}`);if(Q.Qd===void 0)throw new I(`${m} has no accessible constructor`);var We=Q.Qd[te.length];if(We===void 0)throw new I(`Tried to invoke ctor of ${m} with invalid number of parameters (${te.length}) - expected (${Object.keys(Q.Qd).toString()}) parameters instead!`);return We.apply(this,te)});var Te=Object.create(V,{constructor:{value:W}});W.prototype=Te;var Q=new fn(m,W,Te,T,x,d,l,_);if(Q.Hd){var Se;(Se=Q.Hd).$d??(Se.$d=[]),Q.Hd.$d.push(Q)}return x=new et(m,Q,!0,!1,!1),Se=new et(m+"*",Q,!1,!1,!1),V=new et(m+" const*",Q,!1,!0,!1),mr[e]={pointerType:Se,Be:V},_r(N,W),[x,Se,V]})},f:(e,t,n,i,u,d,y)=>{var l=mt(n,i);t=b(t),t=Ot(t),d=X(u,d),ie([],[e],f=>{function _(){tt(`Cannot call ${m} due to unbound types`,l)}f=f[0];var m=`${f.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var E=f.Bd.constructor;return E[t]===void 0?(_.Pd=n-1,E[t]=_):($t(E,t,m),E[t].Gd[n-1]=_),ie([],l,T=>{if(T=[T[0],null].concat(T.slice(1)),T=vt(m,T,null,d,y),E[t].Gd===void 0?(T.Pd=n-1,E[t]=T):E[t].Gd[n-1]=T,f.Bd.$d)for(let N of f.Bd.$d)N.constructor.hasOwnProperty(t)||(N.constructor[t]=T);return[]}),[]})},s:(e,t,n,i,u,d)=>{var y=mt(t,n);u=X(i,u),ie([],[e],l=>{l=l[0];var f=`constructor ${l.name}`;if(l.Bd.Qd===void 0&&(l.Bd.Qd=[]),l.Bd.Qd[t-1]!==void 0)throw new I(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${l.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return l.Bd.Qd[t-1]=()=>{tt(`Cannot construct ${l.name} due to unbound types`,y)},ie([],y,_=>(_.splice(1,0,null),l.Bd.Qd[t-1]=vt(f,_,null,u,d),[])),[]})},a:(e,t,n,i,u,d,y,l)=>{var f=mt(n,i);t=b(t),t=Ot(t),d=X(u,d),ie([],[e],_=>{function m(){tt(`Cannot call ${E} due to unbound types`,f)}_=_[0];var E=`${_.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),l&&_.Bd.Oe.push(t);var T=_.Bd.Td,N=T[t];return N===void 0||N.Gd===void 0&&N.className!==_.name&&N.Pd===n-2?(m.Pd=n-2,m.className=_.name,T[t]=m):($t(T,t,E),T[t].Gd[n-2]=m),ie([],f,W=>(W=vt(E,W,_,d,y),T[t].Gd===void 0?(W.Pd=n-2,T[t]=W):T[t].Gd[n-2]=W,[])),[]})},o:(e,t,n)=>{e=b(e),ie([],[t],i=>(i=i[0],k[e]=i.fromWireType(n),[]))},Ya:e=>ae(e,gn),i:(e,t,n,i)=>{function u(){}t=b(t),u.values={},ae(e,{name:t,constructor:u,fromWireType:function(d){return this.constructor.values[d]},toWireType:(d,y)=>y.value,Id:8,readValueFromPointer:_n(t,n,i),Kd:null}),Ht(t,u)},b:(e,t,n)=>{var i=gt(e,"enum");t=b(t),e=i.constructor,i=Object.create(i.constructor.prototype,{value:{value:n},constructor:{value:pt(`${i.name}_${t}`,function(){})}}),e.values[n]=i,e[t]=i},M:(e,t,n)=>{t=b(t),ae(e,{name:t,fromWireType:i=>i,toWireType:(i,u)=>u,Id:8,readValueFromPointer:An(t,n),Kd:null})},r:(e,t,n,i,u,d)=>{var y=mt(t,n);e=b(e),e=Ot(e),u=X(i,u),Ht(e,function(){tt(`Cannot call ${e} due to unbound types`,y)},t-1),ie([],y,l=>(l=[l[0],null].concat(l.slice(1)),_r(e,vt(e,l,null,u,d),t-1),[]))},x:(e,t,n,i,u)=>{if(t=b(t),u===-1&&(u=4294967295),u=l=>l,i===0){var d=32-8*n;u=l=>l<<d>>>d}var y=t.includes("unsigned")?function(l,f){return f>>>0}:function(l,f){return f};ae(e,{name:t,fromWireType:u,toWireType:y,Id:8,readValueFromPointer:yr(t,n,i!==0),Kd:null})},n:(e,t,n)=>{function i(d){return new u(xe.buffer,G[d+4>>2],G[d>>2])}var u=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];n=b(n),ae(e,{name:n,fromWireType:i,Id:8,readValueFromPointer:i},{Le:!0})},m:(e,t,n,i,u,d,y,l,f,_,m,E)=>{n=b(n),d=X(u,d),l=X(y,l),_=X(f,_),E=X(m,E),ie([e],[t],T=>(T=T[0],[new et(n,T.Bd,!1,!1,!0,T,i,d,l,_,E)]))},Za:(e,t)=>{t=b(t),ae(e,{name:t,fromWireType:function(n){for(var i=G[n>>2],u=n+4,d,y=u,l=0;l<=i;++l){var f=u+l;(l==i||O[f]==0)&&(y=y?Ye(O,y,f-y):"",d===void 0?d=y:(d+="\0",d+=y),y=f+1)}return Ge(n),d},toWireType:function(n,i){i instanceof ArrayBuffer&&(i=new Uint8Array(i));var u=typeof i=="string";if(!(u||ArrayBuffer.isView(i)&&i.BYTES_PER_ELEMENT==1))throw new I("Cannot pass non-string to std::string");var d=u?se(i):i.length,y=Qt(4+d+1),l=y+4;return G[y>>2]=d,u?J(i,l,d+1):O.set(i,l),n!==null&&n.push(Ge,y),y},Id:8,readValueFromPointer:Ze,Kd(n){Ge(n)}})},G:(e,t,n)=>{if(n=b(n),t===2)var i=wn,u=En,d=Cn,y=l=>Ue[l>>1];else t===4&&(i=Tn,u=Sn,d=Mn,y=l=>G[l>>2]);ae(e,{name:n,fromWireType:l=>{for(var f=G[l>>2],_,m=l+4,E=0;E<=f;++E){var T=l+4+E*t;(E==f||y(T)==0)&&(m=i(m,T-m),_===void 0?_=m:(_+="\0",_+=m),m=T+t)}return Ge(l),_},toWireType:(l,f)=>{if(typeof f!="string")throw new I(`Cannot pass non-string to C++ string type ${n}`);var _=d(f),m=Qt(4+_+t);return G[m>>2]=_/t,u(f,m+4,_+t),l!==null&&l.push(Ge,m),m},Id:8,readValueFromPointer:Ze,Kd(l){Ge(l)}})},w:(e,t,n,i,u,d)=>{lt[e]={name:b(t),le:X(n,i),Od:X(u,d),pe:[]}},e:(e,t,n,i,u,d,y,l,f,_)=>{lt[e].pe.push({Fe:b(t),Ke:n,Ie:X(i,u),Je:d,Re:y,Qe:X(l,f),Se:_})},$a:(e,t)=>{t=b(t),ae(e,{We:!0,name:t,Id:0,fromWireType:()=>{},toWireType:()=>{}})},db:()=>{throw 1/0},t:(e,t,n)=>(e=ue(e),t=gt(t,"emval::as"),Er(t,n,e)),D:(e,t,n,i)=>(e=_t[e],t=ue(t),e(null,t,n,i)),p:(e,t,n,i,u)=>(e=_t[e],t=ue(t),n=bt(n),e(t,t[n],i,u)),c:Dt,E:e=>e===0?ce(Cr()):(e=bt(e),ce(Cr()[e])),l:(e,t,n)=>{var i=Bn(e,t),u=i.shift();e--;var d=Array(e);return t=`methodCaller<(${i.map(y=>y.name).join(", ")}) => ${u.name}>`,xn(pt(t,(y,l,f,_)=>{for(var m=0,E=0;E<e;++E)d[E]=i[E].readValueFromPointer(_+m),m+=i[E].Id;return y=n===1?Pn(l,d):l.apply(y,d),Er(u,f,y)}))},q:(e,t)=>(e=ue(e),t=ue(t),ce(e[t])),B:e=>{9<e&&(_e[e+1]+=1)},y:()=>ce([]),d:e=>ce(bt(e)),u:()=>ce({}),Xa:e=>(e=ue(e),!e),j:e=>{var t=ue(e);It(t),Dt(e)},h:(e,t,n)=>{e=ue(e),t=ue(t),n=ue(n),e[t]=n},g:(e,t)=>(e=gt(e,"_emval_take_value"),e=e.readValueFromPointer(t),ce(e)),gb:function(){return-52},hb:function(){},sb:(e,t,n,i)=>{var u=new Date().getFullYear(),d=new Date(u,0,1).getTimezoneOffset();u=new Date(u,6,1).getTimezoneOffset(),G[e>>2]=60*Math.max(d,u),C[t>>2]=+(d!=u),t=y=>{var l=Math.abs(y);return`UTC${0<=y?"-":"+"}${String(Math.floor(l/60)).padStart(2,"0")}${String(l%60).padStart(2,"0")}`},e=t(d),t=t(u),u<d?(J(e,n,17),J(t,i,17)):(J(e,i,17),J(t,n,17))},cb:function(e,t,n){return 0<=e&&3>=e?(kt[n>>3]=BigInt(Math.round(1e6*(e===0?Date.now():performance.now()))),0):28},bd:e=>p.activeTexture(e),cd:(e,t)=>{p.attachShader(le[e],fe[t])},Hb:(e,t)=>{p.beginQuery(e,Y[t])},Bb:(e,t)=>{p.Nd.beginQueryEXT(e,Y[t])},dd:(e,t,n)=>{p.bindAttribLocation(le[e],t,n?Ye(O,n):"")},ed:(e,t)=>{e==35051?p.ie=t:e==35052&&(p.Sd=t),p.bindBuffer(e,At[t])},dc:Pr,ec:(e,t)=>{p.bindRenderbuffer(e,rt[t])},Nb:(e,t)=>{p.bindSampler(e,Le[t])},fd:(e,t)=>{p.bindTexture(e,ee[t])},zc:Lr,Cc:Lr,gd:(e,t,n,i)=>p.blendColor(e,t,n,i),hd:e=>p.blendEquation(e),id:(e,t)=>p.blendFunc(e,t),Zb:(e,t,n,i,u,d,y,l,f,_)=>p.blitFramebuffer(e,t,n,i,u,d,y,l,f,_),jd:(e,t,n,i)=>{2<=B.version?n&&t?p.bufferData(e,O,i,n,t):p.bufferData(e,t,i):p.bufferData(e,n?O.subarray(n,n+t):t,i)},kd:(e,t,n,i)=>{2<=B.version?n&&p.bufferSubData(e,t,O,i,n):p.bufferSubData(e,t,O.subarray(i,i+n))},fc:e=>p.checkFramebufferStatus(e),ld:kr,md:Ir,U:Rr,Wb:(e,t,n)=>(n=Number(n),p.clientWaitSync(ke[e],t,n)),V:(e,t,n,i)=>{p.colorMask(!!e,!!t,!!n,!!i)},W:e=>{p.compileShader(fe[e])},X:(e,t,n,i,u,d,y,l)=>{2<=B.version?p.Sd||!y?p.compressedTexImage2D(e,t,n,i,u,d,y,l):p.compressedTexImage2D(e,t,n,i,u,d,O,l,y):p.compressedTexImage2D(e,t,n,i,u,d,O.subarray(l,l+y))},Y:(e,t,n,i,u,d,y,l,f)=>{2<=B.version?p.Sd||!l?p.compressedTexSubImage2D(e,t,n,i,u,d,y,l,f):p.compressedTexSubImage2D(e,t,n,i,u,d,y,O,f,l):p.compressedTexSubImage2D(e,t,n,i,u,d,y,O.subarray(f,f+l))},Yb:(e,t,n,i,u)=>p.copyBufferSubData(e,t,n,i,u),Z:(e,t,n,i,u,d,y,l)=>p.copyTexSubImage2D(e,t,n,i,u,d,y,l),_:()=>{var e=Ie(le),t=p.createProgram();return t.name=e,t.ge=t.ee=t.fe=0,t.me=1,le[e]=t,e},$:e=>{var t=Ie(fe);return fe[t]=p.createShader(e),t},aa:e=>p.cullFace(e),ba:(e,t)=>{for(var n=0;n<e;n++){var i=C[t+4*n>>2],u=At[i];u&&(p.deleteBuffer(u),u.name=0,At[i]=null,i==p.ie&&(p.ie=0),i==p.Sd&&(p.Sd=0))}},gc:(e,t)=>{for(var n=0;n<e;++n){var i=C[t+4*n>>2],u=wt[i];u&&(p.deleteFramebuffer(u),u.name=0,wt[i]=null)}},ca:e=>{if(e){var t=le[e];t?(p.deleteProgram(t),t.name=0,le[e]=null):R||=1281}},Ib:(e,t)=>{for(var n=0;n<e;n++){var i=C[t+4*n>>2],u=Y[i];u&&(p.deleteQuery(u),Y[i]=null)}},Cb:(e,t)=>{for(var n=0;n<e;n++){var i=C[t+4*n>>2],u=Y[i];u&&(p.Nd.deleteQueryEXT(u),Y[i]=null)}},hc:(e,t)=>{for(var n=0;n<e;n++){var i=C[t+4*n>>2],u=rt[i];u&&(p.deleteRenderbuffer(u),u.name=0,rt[i]=null)}},Ob:(e,t)=>{for(var n=0;n<e;n++){var i=C[t+4*n>>2],u=Le[i];u&&(p.deleteSampler(u),u.name=0,Le[i]=null)}},da:e=>{if(e){var t=fe[e];t?(p.deleteShader(t),fe[e]=null):R||=1281}},Xb:e=>{if(e){var t=ke[e];t?(p.deleteSync(t),t.name=0,ke[e]=null):R||=1281}},ea:(e,t)=>{for(var n=0;n<e;n++){var i=C[t+4*n>>2],u=ee[i];u&&(p.deleteTexture(u),u.name=0,ee[i]=null)}},Ac:Gr,Dc:Gr,fa:e=>{p.depthMask(!!e)},ga:e=>p.disable(e),ha:e=>{p.disableVertexAttribArray(e)},ia:(e,t,n)=>{p.drawArrays(e,t,n)},xc:(e,t,n,i)=>{p.drawArraysInstanced(e,t,n,i)},uc:(e,t,n,i,u)=>{p.oe.drawArraysInstancedBaseInstanceWEBGL(e,t,n,i,u)},sc:(e,t)=>{for(var n=Ct[e],i=0;i<e;i++)n[i]=C[t+4*i>>2];p.drawBuffers(n)},ja:(e,t,n,i)=>{p.drawElements(e,t,n,i)},yc:(e,t,n,i,u)=>{p.drawElementsInstanced(e,t,n,i,u)},vc:(e,t,n,i,u,d,y)=>{p.oe.drawElementsInstancedBaseVertexBaseInstanceWEBGL(e,t,n,i,u,d,y)},mc:(e,t,n,i,u,d)=>{p.drawElements(e,i,u,d)},ka:e=>p.enable(e),la:e=>{p.enableVertexAttribArray(e)},Jb:e=>p.endQuery(e),Db:e=>{p.Nd.endQueryEXT(e)},Tb:(e,t)=>(e=p.fenceSync(e,t))?(t=Ie(ke),e.name=t,ke[t]=e,t):0,ma:()=>p.finish(),na:()=>p.flush(),ic:(e,t,n,i)=>{p.framebufferRenderbuffer(e,t,n,rt[i])},jc:(e,t,n,i,u)=>{p.framebufferTexture2D(e,t,n,ee[i],u)},oa:e=>p.frontFace(e),pa:(e,t)=>{Re(e,t,"createBuffer",At)},kc:(e,t)=>{Re(e,t,"createFramebuffer",wt)},Kb:(e,t)=>{Re(e,t,"createQuery",Y)},Eb:(e,t)=>{for(var n=0;n<e;n++){var i=p.Nd.createQueryEXT();if(!i){for(R||=1282;n<e;)C[t+4*n++>>2]=0;break}var u=Ie(Y);i.name=u,Y[u]=i,C[t+4*n>>2]=u}},lc:(e,t)=>{Re(e,t,"createRenderbuffer",rt)},Pb:(e,t)=>{Re(e,t,"createSampler",Le)},qa:(e,t)=>{Re(e,t,"createTexture",ee)},wc:$r,Ec:$r,$b:e=>p.generateMipmap(e),ra:(e,t,n)=>{n?C[n>>2]=p.getBufferParameter(e,t):R||=1281},sa:()=>{var e=p.getError()||R;return R=0,e},ta:(e,t)=>Hr(e,t,2),ac:(e,t,n,i)=>{e=p.getFramebufferAttachmentParameter(e,t,n),(e instanceof WebGLRenderbuffer||e instanceof WebGLTexture)&&(e=e.name|0),C[i>>2]=e},ua:Ur,va:(e,t,n,i)=>{e=p.getProgramInfoLog(le[e]),e===null&&(e="(unknown error)"),t=0<t&&i?J(e,i,t):0,n&&(C[n>>2]=t)},wa:(e,t,n)=>{if(n)if(e>=Sr)R||=1281;else if(e=le[e],t==35716)e=p.getProgramInfoLog(e),e===null&&(e="(unknown error)"),C[n>>2]=e.length+1;else if(t==35719){if(!e.ge){var i=p.getProgramParameter(e,35718);for(t=0;t<i;++t)e.ge=Math.max(e.ge,p.getActiveUniform(e,t).name.length+1)}C[n>>2]=e.ge}else if(t==35722){if(!e.ee)for(i=p.getProgramParameter(e,35721),t=0;t<i;++t)e.ee=Math.max(e.ee,p.getActiveAttrib(e,t).name.length+1);C[n>>2]=e.ee}else if(t==35381){if(!e.fe)for(i=p.getProgramParameter(e,35382),t=0;t<i;++t)e.fe=Math.max(e.fe,p.getActiveUniformBlockName(e,t).length+1);C[n>>2]=e.fe}else C[n>>2]=p.getProgramParameter(e,t);else R||=1281},yb:Or,zb:Or,Lb:(e,t,n)=>{if(n){e=p.getQueryParameter(Y[e],t);var i;typeof e=="boolean"?i=e?1:0:i=e,C[n>>2]=i}else R||=1281},Fb:(e,t,n)=>{if(n){e=p.Nd.getQueryObjectEXT(Y[e],t);var i;typeof e=="boolean"?i=e?1:0:i=e,C[n>>2]=i}else R||=1281},Mb:(e,t,n)=>{n?C[n>>2]=p.getQuery(e,t):R||=1281},Gb:(e,t,n)=>{n?C[n>>2]=p.Nd.getQueryEXT(e,t):R||=1281},bc:(e,t,n)=>{n?C[n>>2]=p.getRenderbufferParameter(e,t):R||=1281},xa:(e,t,n,i)=>{e=p.getShaderInfoLog(fe[e]),e===null&&(e="(unknown error)"),t=0<t&&i?J(e,i,t):0,n&&(C[n>>2]=t)},vb:(e,t,n,i)=>{e=p.getShaderPrecisionFormat(e,t),C[n>>2]=e.rangeMin,C[n+4>>2]=e.rangeMax,C[i>>2]=e.precision},ya:(e,t,n)=>{n?t==35716?(e=p.getShaderInfoLog(fe[e]),e===null&&(e="(unknown error)"),C[n>>2]=e?e.length+1:0):t==35720?(e=p.getShaderSource(fe[e]),C[n>>2]=e?e.length+1:0):C[n>>2]=p.getShaderParameter(fe[e],t):R||=1281},za:Wr,Bc:Dr,Aa:(e,t)=>{if(t=t?Ye(O,t):"",e=le[e]){var n=e,i=n.Yd,u=n.te,d;if(!i){n.Yd=i={},n.se={};var y=p.getProgramParameter(n,35718);for(d=0;d<y;++d){var l=p.getActiveUniform(n,d),f=l.name;l=l.size;var _=br(f);_=0<_?f.slice(0,_):f;var m=n.me;for(n.me+=l,u[_]=[l,m],f=0;f<l;++f)i[m]=f,n.se[m++]=_}}if(n=e.Yd,i=0,u=t,d=br(t),0<d&&(i=parseInt(t.slice(d+1))>>>0,u=t.slice(0,d)),(u=e.te[u])&&i<u[0]&&(i+=u[1],n[i]=n[i]||p.getUniformLocation(e,t)))return i}else R||=1281;return-1},wb:(e,t,n)=>{for(var i=Ct[t],u=0;u<t;u++)i[u]=C[n+4*u>>2];p.invalidateFramebuffer(e,i)},xb:(e,t,n,i,u,d,y)=>{for(var l=Ct[t],f=0;f<t;f++)l[f]=C[n+4*f>>2];p.invalidateSubFramebuffer(e,l,i,u,d,y)},Ub:e=>p.isSync(ke[e]),Ba:e=>(e=ee[e])?p.isTexture(e):0,Ca:e=>p.lineWidth(e),Da:e=>{e=le[e],p.linkProgram(e),e.Yd=0,e.te={}},qc:(e,t,n,i,u,d)=>{p.qe.multiDrawArraysInstancedBaseInstanceWEBGL(e,C,t>>2,C,n>>2,C,i>>2,G,u>>2,d)},rc:(e,t,n,i,u,d,y,l)=>{p.qe.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(e,C,t>>2,n,C,i>>2,C,u>>2,C,d>>2,G,y>>2,l)},Ea:(e,t)=>{e==3317?Nt=t:e==3314&&(xr=t),p.pixelStorei(e,t)},Ab:(e,t)=>{p.Nd.queryCounterEXT(Y[e],t)},tc:e=>p.readBuffer(e),Fa:(e,t,n,i,u,d,y)=>{if(2<=B.version)if(p.ie)p.readPixels(e,t,n,i,u,d,y);else{var l=Tt(d);y>>>=31-Math.clz32(l.BYTES_PER_ELEMENT),p.readPixels(e,t,n,i,u,d,l,y)}else(l=jt(d,u,n,i,y))?p.readPixels(e,t,n,i,u,d,l):R||=1280},cc:(e,t,n,i)=>p.renderbufferStorage(e,t,n,i),_b:(e,t,n,i,u)=>p.renderbufferStorageMultisample(e,t,n,i,u),Qb:(e,t,n)=>{p.samplerParameterf(Le[e],t,n)},Rb:(e,t,n)=>{p.samplerParameteri(Le[e],t,n)},Sb:(e,t,n)=>{p.samplerParameteri(Le[e],t,C[n>>2])},Ga:(e,t,n,i)=>p.scissor(e,t,n,i),Ha:(e,t,n,i)=>{for(var u="",d=0;d<t;++d){var y=(y=G[n+4*d>>2])?Ye(O,y,i?G[i+4*d>>2]:void 0):"";u+=y}p.shaderSource(fe[e],u)},Ia:(e,t,n)=>p.stencilFunc(e,t,n),Ja:(e,t,n,i)=>p.stencilFuncSeparate(e,t,n,i),Ka:e=>p.stencilMask(e),La:(e,t)=>p.stencilMaskSeparate(e,t),Ma:(e,t,n)=>p.stencilOp(e,t,n),Na:(e,t,n,i)=>p.stencilOpSeparate(e,t,n,i),Oa:(e,t,n,i,u,d,y,l,f)=>{if(2<=B.version){if(p.Sd){p.texImage2D(e,t,n,i,u,d,y,l,f);return}if(f){var _=Tt(l);f>>>=31-Math.clz32(_.BYTES_PER_ELEMENT),p.texImage2D(e,t,n,i,u,d,y,l,_,f);return}}_=f?jt(l,y,i,u,f):null,p.texImage2D(e,t,n,i,u,d,y,l,_)},Pa:(e,t,n)=>p.texParameterf(e,t,n),Qa:(e,t,n)=>{p.texParameterf(e,t,M[n>>2])},Ra:(e,t,n)=>p.texParameteri(e,t,n),Sa:(e,t,n)=>{p.texParameteri(e,t,C[n>>2])},nc:(e,t,n,i,u)=>p.texStorage2D(e,t,n,i,u),Ta:(e,t,n,i,u,d,y,l,f)=>{if(2<=B.version){if(p.Sd){p.texSubImage2D(e,t,n,i,u,d,y,l,f);return}if(f){var _=Tt(l);p.texSubImage2D(e,t,n,i,u,d,y,l,_,f>>>31-Math.clz32(_.BYTES_PER_ELEMENT));return}}f=f?jt(l,y,u,d,f):null,p.texSubImage2D(e,t,n,i,u,d,y,l,f)},Ua:(e,t)=>{p.uniform1f($(e),t)},Va:(e,t,n)=>{if(2<=B.version)t&&p.uniform1fv($(e),M,n>>2,t);else{if(288>=t)for(var i=Ce[t],u=0;u<t;++u)i[u]=M[n+4*u>>2];else i=M.subarray(n>>2,n+4*t>>2);p.uniform1fv($(e),i)}},Zc:(e,t)=>{p.uniform1i($(e),t)},_c:(e,t,n)=>{if(2<=B.version)t&&p.uniform1iv($(e),C,n>>2,t);else{if(288>=t)for(var i=ot[t],u=0;u<t;++u)i[u]=C[n+4*u>>2];else i=C.subarray(n>>2,n+4*t>>2);p.uniform1iv($(e),i)}},$c:(e,t,n)=>{p.uniform2f($(e),t,n)},ad:(e,t,n)=>{if(2<=B.version)t&&p.uniform2fv($(e),M,n>>2,2*t);else{if(144>=t){t*=2;for(var i=Ce[t],u=0;u<t;u+=2)i[u]=M[n+4*u>>2],i[u+1]=M[n+(4*u+4)>>2]}else i=M.subarray(n>>2,n+8*t>>2);p.uniform2fv($(e),i)}},Yc:(e,t,n)=>{p.uniform2i($(e),t,n)},Xc:(e,t,n)=>{if(2<=B.version)t&&p.uniform2iv($(e),C,n>>2,2*t);else{if(144>=t){t*=2;for(var i=ot[t],u=0;u<t;u+=2)i[u]=C[n+4*u>>2],i[u+1]=C[n+(4*u+4)>>2]}else i=C.subarray(n>>2,n+8*t>>2);p.uniform2iv($(e),i)}},Wc:(e,t,n,i)=>{p.uniform3f($(e),t,n,i)},Vc:(e,t,n)=>{if(2<=B.version)t&&p.uniform3fv($(e),M,n>>2,3*t);else{if(96>=t){t*=3;for(var i=Ce[t],u=0;u<t;u+=3)i[u]=M[n+4*u>>2],i[u+1]=M[n+(4*u+4)>>2],i[u+2]=M[n+(4*u+8)>>2]}else i=M.subarray(n>>2,n+12*t>>2);p.uniform3fv($(e),i)}},Uc:(e,t,n,i)=>{p.uniform3i($(e),t,n,i)},Tc:(e,t,n)=>{if(2<=B.version)t&&p.uniform3iv($(e),C,n>>2,3*t);else{if(96>=t){t*=3;for(var i=ot[t],u=0;u<t;u+=3)i[u]=C[n+4*u>>2],i[u+1]=C[n+(4*u+4)>>2],i[u+2]=C[n+(4*u+8)>>2]}else i=C.subarray(n>>2,n+12*t>>2);p.uniform3iv($(e),i)}},Sc:(e,t,n,i,u)=>{p.uniform4f($(e),t,n,i,u)},Rc:(e,t,n)=>{if(2<=B.version)t&&p.uniform4fv($(e),M,n>>2,4*t);else{if(72>=t){var i=Ce[4*t],u=M;n>>=2,t*=4;for(var d=0;d<t;d+=4){var y=n+d;i[d]=u[y],i[d+1]=u[y+1],i[d+2]=u[y+2],i[d+3]=u[y+3]}}else i=M.subarray(n>>2,n+16*t>>2);p.uniform4fv($(e),i)}},Fc:(e,t,n,i,u)=>{p.uniform4i($(e),t,n,i,u)},Gc:(e,t,n)=>{if(2<=B.version)t&&p.uniform4iv($(e),C,n>>2,4*t);else{if(72>=t){t*=4;for(var i=ot[t],u=0;u<t;u+=4)i[u]=C[n+4*u>>2],i[u+1]=C[n+(4*u+4)>>2],i[u+2]=C[n+(4*u+8)>>2],i[u+3]=C[n+(4*u+12)>>2]}else i=C.subarray(n>>2,n+16*t>>2);p.uniform4iv($(e),i)}},Hc:(e,t,n,i)=>{if(2<=B.version)t&&p.uniformMatrix2fv($(e),!!n,M,i>>2,4*t);else{if(72>=t){t*=4;for(var u=Ce[t],d=0;d<t;d+=4)u[d]=M[i+4*d>>2],u[d+1]=M[i+(4*d+4)>>2],u[d+2]=M[i+(4*d+8)>>2],u[d+3]=M[i+(4*d+12)>>2]}else u=M.subarray(i>>2,i+16*t>>2);p.uniformMatrix2fv($(e),!!n,u)}},Ic:(e,t,n,i)=>{if(2<=B.version)t&&p.uniformMatrix3fv($(e),!!n,M,i>>2,9*t);else{if(32>=t){t*=9;for(var u=Ce[t],d=0;d<t;d+=9)u[d]=M[i+4*d>>2],u[d+1]=M[i+(4*d+4)>>2],u[d+2]=M[i+(4*d+8)>>2],u[d+3]=M[i+(4*d+12)>>2],u[d+4]=M[i+(4*d+16)>>2],u[d+5]=M[i+(4*d+20)>>2],u[d+6]=M[i+(4*d+24)>>2],u[d+7]=M[i+(4*d+28)>>2],u[d+8]=M[i+(4*d+32)>>2]}else u=M.subarray(i>>2,i+36*t>>2);p.uniformMatrix3fv($(e),!!n,u)}},Jc:(e,t,n,i)=>{if(2<=B.version)t&&p.uniformMatrix4fv($(e),!!n,M,i>>2,16*t);else{if(18>=t){var u=Ce[16*t],d=M;i>>=2,t*=16;for(var y=0;y<t;y+=16){var l=i+y;u[y]=d[l],u[y+1]=d[l+1],u[y+2]=d[l+2],u[y+3]=d[l+3],u[y+4]=d[l+4],u[y+5]=d[l+5],u[y+6]=d[l+6],u[y+7]=d[l+7],u[y+8]=d[l+8],u[y+9]=d[l+9],u[y+10]=d[l+10],u[y+11]=d[l+11],u[y+12]=d[l+12],u[y+13]=d[l+13],u[y+14]=d[l+14],u[y+15]=d[l+15]}}else u=M.subarray(i>>2,i+64*t>>2);p.uniformMatrix4fv($(e),!!n,u)}},Kc:e=>{e=le[e],p.useProgram(e),p.Ce=e},Lc:(e,t)=>p.vertexAttrib1f(e,t),Mc:(e,t)=>{p.vertexAttrib2f(e,M[t>>2],M[t+4>>2])},Nc:(e,t)=>{p.vertexAttrib3f(e,M[t>>2],M[t+4>>2],M[t+8>>2])},Oc:(e,t)=>{p.vertexAttrib4f(e,M[t>>2],M[t+4>>2],M[t+8>>2],M[t+12>>2])},oc:(e,t)=>{p.vertexAttribDivisor(e,t)},pc:(e,t,n,i,u)=>{p.vertexAttribIPointer(e,t,n,i,u)},Pc:(e,t,n,i,u,d)=>{p.vertexAttribPointer(e,t,n,!!i,u,d)},Qc:(e,t,n,i)=>p.viewport(e,t,n,i),Vb:(e,t,n)=>{n=Number(n),p.waitSync(ke[e],t,n)},eb:e=>{var t=O.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var i=t*(1+.2/n);i=Math.min(i,e+100663296);e:{i=(Math.min(2147483648,65536*Math.ceil(Math.max(e,i)/65536))-ut.buffer.byteLength+65535)/65536|0;try{ut.grow(i),fr();var u=1;break e}catch{}u=void 0}if(u)return!0}return!1},ab:()=>B?B.handle:0,jb:(e,t)=>{var n=0,i=0,u;for(u of Nr()){var d=t+n;G[e+i>>2]=d,n+=J(u,d,1/0)+1,i+=4}return 0},kb:(e,t)=>{var n=Nr();G[e>>2]=n.length,e=0;for(var i of n)e+=se(i)+1;return G[t>>2]=e,0},H:()=>52,fb:function(){return 52},pb:()=>52,ib:function(){return 70},O:(e,t,n,i)=>{for(var u=0,d=0;d<n;d++){var y=G[t>>2],l=G[t+4>>2];t+=8;for(var f=0;f<l;f++){var _=e,m=O[y+f],E=Hn[_];m===0||m===10?((_===1?rn:Fe)(Ye(E)),E.length=0):E.push(m)}u+=l}return G[i>>2]=u,0},od:Pr,bb:kr,nd:Ir,ub:Rr,F:Ur,L:Wr,Wa:Dr,I:Vn,J:Nn,S:Xn,T:zn,tb:Yn,R:Kn,z:Jn,A:Qn,C:jn,K:bn},de=await(async function(){Ke++;var e={a:Wn};cr??=k.locateFile?k.locateFile("canvaskit.wasm",oe):oe+"canvaskit.wasm";try{return de=(await an(e)).instance.exports,ut=de.pd,fr(),q=de.sd,Ke--,Ke==0&&Je&&(e=Je,Je=null,e()),de}catch(t){return Bt(t),Promise.reject(t)}})(),Dn=de.rd,Qt=k._malloc=de.td,Ge=k._free=de.ud,he=de.vd,pe=de.wd,ye=de.xd;function bn(e,t,n,i,u){var d=ye();try{q.get(e)(t,n,i,u)}catch(y){if(pe(d),y!==y+0)throw y;he(1,0)}}function Nn(e,t,n){var i=ye();try{return q.get(e)(t,n)}catch(u){if(pe(i),u!==u+0)throw u;he(1,0)}}function zn(e,t,n,i,u){var d=ye();try{return q.get(e)(t,n,i,u)}catch(y){if(pe(d),y!==y+0)throw y;he(1,0)}}function jn(e,t,n,i){var u=ye();try{q.get(e)(t,n,i)}catch(d){if(pe(u),d!==d+0)throw d;he(1,0)}}function Vn(e,t){var n=ye();try{return q.get(e)(t)}catch(i){if(pe(n),i!==i+0)throw i;he(1,0)}}function Xn(e,t,n,i){var u=ye();try{return q.get(e)(t,n,i)}catch(d){if(pe(u),d!==d+0)throw d;he(1,0)}}function Qn(e,t,n){var i=ye();try{q.get(e)(t,n)}catch(u){if(pe(i),u!==u+0)throw u;he(1,0)}}function Kn(e,t,n,i,u,d,y,l,f,_){var m=ye();try{return q.get(e)(t,n,i,u,d,y,l,f,_)}catch(E){if(pe(m),E!==E+0)throw E;he(1,0)}}function Jn(e,t){var n=ye();try{q.get(e)(t)}catch(i){if(pe(n),i!==i+0)throw i;he(1,0)}}function Yn(e,t,n,i,u,d,y){var l=ye();try{return q.get(e)(t,n,i,u,d,y)}catch(f){if(pe(l),f!==f+0)throw f;he(1,0)}}function Kt(){0<Ke||0<Ke?Je=Kt:(k.calledRun=!0,ur||(de.qd(),nr(k),k.onRuntimeInitialized?.()))}return Kt(),He=en,He})})();typeof qr=="object"&&typeof xt=="object"?(xt.exports=rr,xt.exports.default=rr):typeof define=="function"&&define.amd&&define([],()=>rr)});export default to();
2
+ //# sourceMappingURL=index.js.map