null;varModule=typeofCanvasKitInit!="undefined"?CanvasKitInit:{};varreadyPromiseResolve,readyPromiseReject;Module["ready"]=newPromise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});functionDebug(msg){}varIsDebug=false;(function(CanvasKit){CanvasKit._extraInitializations=CanvasKit._extraInitializations||[];CanvasKit._extraInitializations.push(function(){CanvasKit.MakeSWCanvasSurface=function(idOrElement){varcanvas=idOrElement;if(canvas.tagName!=="CANVAS"){canvas=document.getElementById(idOrElement);if(!canvas){throw"Canvas with id "+idOrElement+" was not found"}}varsurface=CanvasKit.MakeSurface(canvas.width,canvas.height);if(surface){surface._canvas=canvas}returnsurface};if(!CanvasKit.MakeCanvasSurface){CanvasKit.MakeCanvasSurface=CanvasKit.MakeSWCanvasSurface}CanvasKit.MakeSurface=function(width,height){varimageInfo={"width":width,"height":height,"colorType":CanvasKit.ColorType.RGBA_8888,"alphaType":CanvasKit.AlphaType.Unpremul,"colorSpace":CanvasKit.ColorSpace.SRGB};varpixelLen=width*height*4;varpixelPtr=CanvasKit._malloc(pixelLen);varsurface=CanvasKit.Surface._makeRasterDirect(imageInfo,pixelPtr,width*4);if(surface){surface._canvas=null;surface._width=width;surface._height=height;surface._pixelLen=pixelLen;surface._pixelPtr=pixelPtr;surface.getCanvas().clear(CanvasKit.TRANSPARENT)}returnsurface};CanvasKit.MakeRasterDirectSurface=function(imageInfo,mallocObj,bytesPerRow){returnCanvasKit.Surface._makeRasterDirect(imageInfo,mallocObj["byteOffset"],bytesPerRow)};CanvasKit.Surface.prototype.flush=function(dirtyRect){CanvasKit.setCurrentContext(this._context);this._flush();if(this._canvas){varpixels=newUint8ClampedArray(CanvasKit.HEAPU8.buffer,this._pixelPtr,this._pixelLen);varimageData=newImageData(pixels,this._width,this._height);if(!dirtyRect){this._canvas.getContext("2d").putImageData(imageData,0,0)}else{this._canvas.getContext("2d").putImageData(imageData,0,0,dirtyRect[0],dirtyRect[1],dirtyRect[2]-dirtyRect[0],dirtyRect[3]-dirtyRect[1])}}};CanvasKit.Surface.prototype.dispose=function(){if(this._pixelPtr){CanvasKit._free(this._pixelPtr)}this.delete()};CanvasKit.setCurrentContext=CanvasKit.setCurrentContext||function(){};CanvasKit.getCurrentGrDirectContext=CanvasKit.getCurrentGrDirectContext||function(){returnnull}})})(Module);(function(CanvasKit){CanvasKit._extraInitializations=CanvasKit._extraInitializations||[];CanvasKit._extraInitializations.push(function(){functionget(obj,attr,defaultValue){if(obj&&obj.hasOwnProperty(attr)){returnobj[attr]}returndefaultValue}CanvasKit.GetWebGLContext=function(canvas,attrs){if(!canvas){throw"null canvas passed into makeWebGLContext"}varcontextAttributes={"alpha":get(attrs,"alpha",1),"depth":get(attrs,"depth",1),"stencil":get(attrs,"stencil",8),"antialias":get(attrs,"antialias",0),"premultipliedAlpha":get(attrs,"premultipliedAlpha",1),"preserveDrawingBuffer":get(attrs,"preserveDrawingBuffer",0),"preferLowPowerToHighPerformance":get(attrs,"preferLowPowerToHighPerformance",0),"failIfMajorPerformanceCaveat":get(attrs,"failIfMajorPerformanceCaveat",0),"enableExtensionsByDefault":get(attrs,"enableExtensionsByDefault",1),"explicitSwapControl":get(attrs,"explicitSwapControl",0),"renderViaOffscreenBackBuffer":get(attrs,"renderViaOffscreenBackBuffer",0)};if(attrs&&attrs["majorVersion"]){contextAttributes["majorVersion"]=attrs["majorVersion"]}else{contextAttributes["majorVersion"]=typeofWebGL2RenderingContext!=="undefined"?2:1}if(contextAttributes["explicitSwapControl"]){throw"explicitSwapControl is not supported"}varhandle=GL.createContext(canvas,contextAttributes);if(!handle){return0}GL.makeContextCurrent(handle);GL.currentContext.GLctx.getExtension("WEBGL_debug_renderer_info");returnhandle};CanvasKit.deleteContext=function(handle){GL.deleteContext(handle)};CanvasKit._setTextureCleanup({"deleteTexture":function(webglHandle,texHandle){vartex=GL.textures[texHandle];if(tex){GL.getContext(webglHandle).GLctx.deleteTexture(tex)}GL.textures[texHandle]=null}});CanvasKit.MakeWebGLContext=function(ctx){if(!this.setCurrentContext(ctx)){retur