sliccy 1.22.4 → 1.23.1

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,43 @@
1
+ function si(_){return _ instanceof Int8Array||_ instanceof Uint8Array||_ instanceof Uint8ClampedArray}var Qr=class{fileName;data;constructor(_,r){this.fileName=_,this.data=r}},Jr={XmlResourceFiles:{log:`<?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE logmap [
3
+ <!ELEMENT logmap (log)+>
4
+ <!ELEMENT log (#PCDATA)>
5
+ <!ATTLIST log events CDATA #IMPLIED>
6
+ <!ATTLIST log output CDATA #IMPLIED>
7
+ <!ATTLIST log filename CDATA #IMPLIED>
8
+ <!ATTLIST log generations CDATA #IMPLIED>
9
+ <!ATTLIST log limit CDATA #IMPLIED>
10
+ <!ATTLIST log format CDATA #IMPLIED>
11
+ ]>
12
+ <logmap>
13
+ <log events="None"/>
14
+ <log output="Debug"/>
15
+ <log filename="Magick-%g.log"/>
16
+ <log generations="3"/>
17
+ <log limit="2000"/>
18
+ <log format="%t %r %u %v %d %c[%p]: %m/%f/%l/%d
19
+ %e"/>
20
+ </logmap>
21
+ `,policy:`<?xml version="1.0" encoding="UTF-8"?>
22
+ <!DOCTYPE policymap [
23
+ <!ELEMENT policymap (policy)*>
24
+ <!ATTLIST policymap xmlns CDATA #FIXED "">
25
+ <!ELEMENT policy EMPTY>
26
+ <!ATTLIST policy xmlns CDATA #FIXED "">
27
+ <!ATTLIST policy domain NMTOKEN #REQUIRED>
28
+ <!ATTLIST policy name NMTOKEN #IMPLIED>
29
+ <!ATTLIST policy pattern CDATA #IMPLIED>
30
+ <!ATTLIST policy rights NMTOKEN #IMPLIED>
31
+ <!ATTLIST policy stealth NMTOKEN #IMPLIED>
32
+ <!ATTLIST policy value CDATA #IMPLIED>
33
+ ]>
34
+ <policymap>
35
+ <policy domain="cache" name="shared-secret" value="passphrase"/>
36
+ <policy domain="coder" rights="none" pattern="EPHEMERAL" />
37
+ <policy domain="coder" rights="none" pattern="MVG" />
38
+ <policy domain="coder" rights="none" pattern="MSL" />
39
+ <policy domain="path" rights="none" pattern="@*" />
40
+ <policy domain="path" rights="none" pattern="|*" />
41
+ </policymap>
42
+ `}},So=class oi{constructor(){this.log=new Qr("log.xml",Jr.XmlResourceFiles.log),this.policy=new Qr("policy.xml",Jr.XmlResourceFiles.policy)}static default=new oi;*all(){yield this.log,yield this.policy}log;policy},Jt=class{constructor(_,r,a){this.format=_,this.name=r,this.value=a}format;name;value},Co=class{format;constructor(_){this.format=_}createDefine(_,r){return typeof r=="boolean"?new Jt(this.format,_,r?"true":"false"):typeof r=="string"?new Jt(this.format,_,r):new Jt(this.format,_,r.toString())}hasValue(_){return _!=null}},Io=class he{_scaleX;_scaleY;_shearX;_shearY;_translateX;_translateY;constructor(r=1,a=1,e=0,g=0,p=0,f=0){this._scaleX=r,this._scaleY=a,this._shearX=e,this._shearY=g,this._translateX=p,this._translateY=f}get scaleX(){return this._scaleX}get scaleY(){return this._scaleY}get shearX(){return this._shearX}get shearY(){return this._shearY}get translateX(){return this._translateX}get translateY(){return this._translateY}draw(r){r.affine(this._scaleX,this._scaleY,this._shearX,this._shearY,this._translateX,this._translateY)}reset(){this._scaleX=1,this._scaleY=1,this._shearX=0,this._shearY=0,this._translateX=0,this._translateY=0}transformOrigin(r,a){let e=new he;e._translateX=r,e._translateY=a,this.transform(e)}transformRotation(r){let a=new he;a._scaleX=Math.cos(he.normalizeAngleToRadians(r)),a._scaleY=Math.cos(he.normalizeAngleToRadians(r)),a._shearX=-Math.sin(he.normalizeAngleToRadians(r)),a._shearY=Math.sin(he.normalizeAngleToRadians(r)),this.transform(a)}transformScale(r,a){let e=new he;e._scaleX=r,e._scaleY=a,this.transform(e)}transformSkewX(r){let a=new he;a._shearX=Math.tan(he.normalizeAngleToRadians(r)),this.transform(a)}transformSkewY(r){let a=new he;a._shearY=Math.tan(he.normalizeAngleToRadians(r)),this.transform(a)}static normalizeAngleToRadians(r){let a=r/360,e=Math.round(a);return Math.abs(a-e)===.5&&e%2!=0&&(e=a>0?e-1:e+1),Math.PI*(r-e*360)/180}transform(r){let a=this._scaleX,e=this._scaleY,g=this._shearX,p=this._shearY,f=this._translateX,k=this._translateY;this._scaleX=a*r._scaleX+p*r._shearX,this._scaleY=g*r._shearY+e*r._scaleY,this._shearX=g*r._scaleX+e*r._shearX,this._shearY=a*r._shearY+p*r._scaleY,this._translateX=a*r._translateX+p*r._translateY+f,this._translateY=g*r._translateX+e*r._translateY+k}},Po=class{_color;constructor(_){this._color=_}get color(){return this._color}draw(_){_.borderColor(this._color)}},Do=class{_x;_y;_paintMethod;constructor(_,r,a){this._x=_,this._y=r,this._paintMethod=a}get x(){return this._x}get y(){return this._y}get paintMethod(){return this._paintMethod}draw(_){_.color(this._x,this._y,this._paintMethod)}},bo=class{_color;constructor(_){this._color=_}get color(){return this._color}draw(_){_.fillColor(this._color)}},Eo=class{_opacity;constructor(_){this._opacity=_}get opacity(){return this._opacity}draw(_){_.fillOpacity(this._opacity.toDouble()/100)}},To=class{_fillRule;constructor(_){this._fillRule=_}get fillRule(){return this._fillRule}draw(_){_.fillRule(this._fillRule)}},Ao=class{_pointSize;constructor(_){this._pointSize=_}get pointSize(){return this._pointSize}draw(_){_.fontPointSize(this._pointSize)}},xo=class{constructor(_,r){this.eventType=_,this.message=r??""}eventType;message},Go={Undefined:0,Activate:1,Associate:2,Background:3,Copy:4,Deactivate:5,Discrete:6,Disassociate:7,Extract:8,Off:9,On:10,Opaque:11,Remove:12,Set:13,Shape:14,Transparent:15,OffIfOpaque:16},G={Red:0,Cyan:0,Gray:0,Green:1,Magenta:1,Blue:2,Yellow:2,Black:3,Alpha:4,Index:5,Meta0:10,Meta1:11,Meta2:12,Meta3:13,Meta4:14,Meta5:15,Meta6:16,Meta7:17,Meta8:18,Meta9:19,Meta10:20,Meta11:21,Meta12:22,Meta13:23,Meta14:24,Meta15:25,Meta16:26,Meta17:27,Meta18:28,Meta19:29,Meta20:30,Meta21:31,Meta22:32,Meta23:33,Meta24:34,Meta25:35,Meta26:36,Meta27:37,Meta28:38,Meta29:39,Meta30:40,Meta31:41,Meta32:42,Meta33:43,Meta34:44,Meta35:45,Meta36:46,Meta37:47,Meta38:48,Meta39:49,Meta40:50,Meta41:51,Meta42:52,Meta43:53,Meta44:54,Meta45:55,Meta46:56,Meta47:57,Meta48:58,Meta49:59,Meta50:60,Meta51:61,Meta52:62,Composite:64},H={Undefined:0,Red:1,Gray:1,Cyan:1,Green:2,Magenta:2,Blue:4,Yellow:4,Black:8,Alpha:16,Opacity:16,Index:32,Composite:31,TrueAlpha:256,get RGB(){return this.Red|this.Green|this.Blue},get CMYK(){return this.Cyan|this.Magenta|this.Yellow|this.Black},get CMYKA(){return this.Cyan|this.Magenta|this.Yellow|this.Black|this.Alpha},Meta0:1<<G.Meta0,Meta1:1<<G.Meta1,Meta2:1<<G.Meta2,Meta3:1<<G.Meta3,Meta4:1<<G.Meta4,Meta5:1<<G.Meta5,Meta6:1<<G.Meta6,Meta7:1<<G.Meta7,Meta8:1<<G.Meta8,Meta9:1<<G.Meta9,Meta10:1<<G.Meta10,Meta11:1<<G.Meta11,Meta12:1<<G.Meta12,Meta13:1<<G.Meta13,Meta14:1<<G.Meta14,Meta15:1<<G.Meta15,Meta16:1<<G.Meta16,Meta17:1<<G.Meta17,Meta18:1<<G.Meta18,Meta19:1<<G.Meta19,Meta20:1<<G.Meta20,Meta21:1<<G.Meta21,All:134217727},Ro=class{constructor(_,r,a,e){this.red=_,this.green=r,this.blue=a,this.white=e}red;green;blue;white},b={Undefined:0,CMY:1,CMYK:2,Gray:3,HCL:4,HCLp:5,HSB:6,HSI:7,HSL:8,HSV:9,HWB:10,Lab:11,LCH:12,LCHab:13,LCHuv:14,Log:15,LMS:16,Luv:17,OHTA:18,Rec601YCbCr:19,Rec709YCbCr:20,RGB:21,scRGB:22,sRGB:23,Transparent:24,XyY:25,XYZ:26,YCbCr:27,YCC:28,YDbDr:29,YIQ:30,YPbPr:31,YUV:32,LinearGray:33,Jzazbz:34,DisplayP3:35,Adobe98:36,ProPhoto:37,Oklab:38,Oklch:39,CAT02LMSC:40},Zr={[b.Undefined]:"Undefined",[b.CMY]:"CMY",[b.CMYK]:"CMYK",[b.Gray]:"Gray",[b.HCL]:"HCL",[b.HCLp]:"HCLp",[b.HSB]:"HSB",[b.HSI]:"HSI",[b.HSL]:"HSL",[b.HSV]:"HSV",[b.HWB]:"HWB",[b.Lab]:"Lab",[b.LCH]:"LCH",[b.LCHab]:"LCHab",[b.LCHuv]:"LCHuv",[b.Log]:"Log",[b.LMS]:"LMS",[b.Luv]:"Luv",[b.OHTA]:"OHTA",[b.Rec601YCbCr]:"Rec601YCbCr",[b.Rec709YCbCr]:"Rec709YCbCr",[b.RGB]:"RGB",[b.scRGB]:"scRGB",[b.sRGB]:"sRGB",[b.Transparent]:"Transparent",[b.XyY]:"XyY",[b.XYZ]:"XYZ",[b.YCbCr]:"YCbCr",[b.YCC]:"YCC",[b.YDbDr]:"YDbDr",[b.YIQ]:"YIQ",[b.YPbPr]:"YPbPr",[b.YUV]:"YUV",[b.LinearGray]:"LinearGray",[b.Jzazbz]:"Jzazbz",[b.DisplayP3]:"DisplayP3",[b.Adobe98]:"Adobe98",[b.ProPhoto]:"ProPhoto",[b.Oklab]:"Oklab",[b.Oklch]:"Oklch",[b.CAT02LMSC]:"CAT02LMS"},Fo=class{colorSpace=b.Undefined;copyright=null;description=null;manufacturer=null;model=null},Lo=class{_data;_index;constructor(_){this._data=_,this._index=0,this.isLittleEndian=!1}get index(){return this._index}isLittleEndian;readLong(){return this.canRead(4)?this.isLittleEndian?this.readLongLSB():this.readLongMSB():null}readString(_){if(_==0)return"";if(!this.canRead(_))return null;let r=new TextDecoder("utf-8").decode(this._data.subarray(this._index,this._index+_)),a=r.indexOf("\0");return a!=-1&&(r=r.substring(0,a)),this._index+=_,r}seek(_){return _>=this._data.length?!1:(this._index=_,!0)}skip(_){return this._index+_>=this._data.length?!1:(this._index+=_,!0)}canRead(_){return _>this._data.length?!1:this._index+_<=this._data.length}readLongLSB(){let _=this._data[this._index];return _|=this._data[this._index+1]<<8,_|=this._data[this._index+2]<<16,_|=this._data[this._index+3]<<24,this._index+=4,_}readLongMSB(){let _=this._data[this._index]<<24;return _|=this._data[this._index+1]<<16,_|=this._data[this._index+2]<<8,_|=this._data[this._index+3],this._index+=4,_}},Wo=class _i{_data=new Fo;_reader;constructor(r){this._reader=new Lo(r)}static read(r){let a=new _i(r);return a.readColorSpace(),a.readTagTable(),a._data}readColorSpace(){this._reader.seek(16);let r=this._reader.readString(4);r!=null&&(this._data.colorSpace=this.determineColorSpace(r.trimEnd()))}determineColorSpace(r){switch(r){case"CMY":return b.CMY;case"CMYK":return b.CMYK;case"GRAY":return b.Gray;case"HSL":return b.HSL;case"HSV":return b.HSV;case"Lab":return b.Lab;case"Luv":return b.Luv;case"RGB":return b.sRGB;case"XYZ":return b.XYZ;case"YCbr":return b.YCbCr;default:return b.Undefined}}readTagTable(){if(!this._reader.seek(128))return;let r=this._reader.readLong();if(r!=null)for(let a=0;a<r;a++)switch(this._reader.readLong()){case 1668313716:this._data.copyright=this.readTag();break;case 1684370275:this._data.description=this.readTag();break;case 1684893284:this._data.manufacturer=this.readTag();break;case 1684890724:this._data.model=this.readTag();break;default:this._reader.skip(8);break}}readTag(){let r=this._reader.readLong(),a=this._reader.readLong();if(r===null||a===null)return null;let e=this._reader.index;if(!this._reader.seek(r))return null;let g=this.readTagValue(a);return this._reader.seek(e),g}readTagValue(r){switch(this._reader.readString(4)){case"desc":return this.readTextDescriptionTypeValue();case"text":return this.readTextTypeValue(r);default:return null}}readTextDescriptionTypeValue(){if(!this._reader.skip(4))return null;let r=this._reader.readLong();return r==null?null:this._reader.readString(r)}readTextTypeValue(r){return this._reader.skip(4)?this._reader.readString(r):null}},ci=class{constructor(_,r){this.name=_,this.data=r}name;data},Bo=class extends ci{_data;constructor(_){super("icc",_)}get colorSpace(){return this.initialize(),this._data.colorSpace}get copyright(){return this.initialize(),this._data.copyright}get description(){return this.initialize(),this._data.description}get manufacturer(){return this.initialize(),this._data.manufacturer}get model(){return this.initialize(),this._data.model}initialize(){this._data||=Wo.read(this.data)}},ei={HighRes:0,Quantum:1},Oo=class li{constructor(r,a){this.distortion=r,this.difference=a}difference;distortion;static _create(r,a){return new li(r,a)}},zo=class{constructor(_){this.metric=_}metric;highlightColor;lowlightColor;masklightColor;_setArtifacts(_){this.highlightColor!==void 0&&_.setArtifact("compare:highlight-color",this.highlightColor),this.lowlightColor!==void 0&&_.setArtifact("compare:lowlight-color",this.lowlightColor),this.masklightColor!==void 0&&_.setArtifact("compare:masklight-color",this.masklightColor)}},Zt={Undefined:0,Alpha:1,Atop:2,Blend:3,Blur:4,Bumpmap:5,ChangeMask:6,Clear:7,ColorBurn:8,ColorDodge:9,Colorize:10,CopyBlack:11,CopyBlue:12,Copy:13,CopyCyan:14,CopyGreen:15,CopyMagenta:16,CopyAlpha:17,CopyRed:18,CopyYellow:19,Darken:20,DarkenIntensity:21,Difference:22,Displace:23,Dissolve:24,Distort:25,DivideDst:26,DivideSrc:27,DstAtop:28,Dst:29,DstIn:30,DstOut:31,DstOver:32,Exclusion:33,HardLight:34,HardMix:35,Hue:36,In:37,Intensity:38,Lighten:39,LightenIntensity:40,LinearBurn:41,LinearDodge:42,LinearLight:43,Luminize:44,Mathematics:45,MinusDst:46,MinusSrc:47,Modulate:48,ModulusAdd:49,ModulusSubtract:50,Multiply:51,No:52,Out:53,Over:54,Overlay:55,PegtopLight:56,PinLight:57,Plus:58,Replace:59,Saturate:60,Screen:61,SoftLight:62,SrcAtop:63,Src:64,SrcIn:65,SrcOut:66,SrcOver:67,Threshold:68,VividLight:69,Xor:70,Stereo:71,Freeze:72,Interpolate:73,Negate:74,Reflect:75,SoftBurn:76,SoftDodge:77,Stamp:78,RMSE:79,SaliencyBlend:80,SeamlessBlend:81},tr={Warning:300,ResourceLimitWarning:300,TypeWarning:305,OptionWarning:310,DelegateWarning:315,MissingDelegateWarning:320,CorruptImageWarning:325,FileOpenWarning:330,BlobWarning:335,StreamWarning:340,CacheWarning:345,CoderWarning:350,FilterWarning:352,ModuleWarning:355,DrawWarning:360,ImageWarning:365,WandWarning:370,RandomWarning:375,XServerWarning:380,MonitorWarning:385,RegistryWarning:390,ConfigureWarning:395,PolicyWarning:399,Error:400,ResourceLimitError:400,TypeError:405,OptionError:410,DelegateError:415,MissingDelegateError:420,CorruptImageError:425,FileOpenError:430,BlobError:435,StreamError:440,CacheError:445,CoderError:450,FilterError:452,ModuleError:455,DrawError:460,ImageError:465,WandError:470,RandomError:475,XServerError:480,MonitorError:485,RegistryError:490,ConfigureError:495,PolicyError:499},N=class extends Error{_relatedErrors=[];constructor(_,r=tr.Error){super(_),this.severity=r}severity;get relatedErrors(){return this._relatedErrors}_setRelatedErrors(_){this._relatedErrors=_}},Pe=class{static get depth(){return c._api._Quantum_Depth_Get()}static get max(){return c._api._Quantum_Max_Get()}};function se(_,r){return _===0?r??null:c._api.UTF8ToString(_)}function No(_,r){let a=se(r);return _._MagickMemory_Relinquish(r),a}function rr(_,r,a){let e=_.lengthBytesUTF8(r)+1,g=_._malloc(e);try{return _.stringToUTF8(r,g,e),a(g)}finally{_._free(g)}}function E(_,r){return _===null?r(0):rr(c._api,_,r)}var M=class gi{constructor(r,a,e,g,p){if(r!==void 0)if(typeof r=="string"){let f=0;try{f=c._api._MagickColor_Create(),E(r,k=>{if(c._api._MagickColor_Initialize(f,k)===0)throw new N("invalid color specified");this.initialize(f)})}finally{c._api._free(f)}}else this.r=r,this.g=a??0,this.b=e??0,p===void 0?this.a=g??Pe.max:(this.k=g??0,this.a=p,this.isCmyk=!0)}r=0;g=0;b=0;a=0;k=0;isCmyk=!1;static _create(r){let a=new gi;return a.initialize(r),a}fuzzyEquals(r,a){return r==this?!0:this._use(e=>r._use(g=>c._api._MagickColor_FuzzyEquals(e,g,a._toQuantum())===1))}toShortString(){return this.a===Pe.max?this.isCmyk?`cmyka(${this.r},${this.g},${this.b},${this.k})`:`#${this.toHex(this.r)}${this.toHex(this.g)}${this.toHex(this.b)}`:this.toString()}toString(){return this.isCmyk?`cmyka(${this.r},${this.g},${this.b},${this.k},${(this.a/Pe.max).toFixed(4)})`:`#${this.toHex(this.r)}${this.toHex(this.g)}${this.toHex(this.b)}${this.toHex(this.a)}`}_use(r){let a=0;try{return a=c._api._MagickColor_Create(),c._api._MagickColor_Red_Set(a,this.r),c._api._MagickColor_Green_Set(a,this.g),c._api._MagickColor_Blue_Set(a,this.b),c._api._MagickColor_Alpha_Set(a,this.a),this.isCmyk?(c._api._MagickColor_Black_Set(a,this.k),c._api._MagickColor_IsCMYK_Set(a,1)):c._api._MagickColor_IsCMYK_Set(a,0),r(a)}finally{c._api._MagickColor_Dispose(a)}}initialize(r){this.r=c._api._MagickColor_Red_Get(r),this.g=c._api._MagickColor_Green_Get(r),this.b=c._api._MagickColor_Blue_Get(r),this.a=c._api._MagickColor_Alpha_Get(r),this.isCmyk=c._api._MagickColor_IsCMYK_Get(r)===1,this.isCmyk&&(this.k=c._api._MagickColor_Black_Get(r))}toHex(r){return r.toString(16).padStart(2,"0")}},Ce=(function(_){return _[_.NoValue=0]="NoValue",_[_.PercentValue=4096]="PercentValue",_[_.IgnoreAspectRatio=8192]="IgnoreAspectRatio",_[_.Less=16384]="Less",_[_.Greater=32768]="Greater",_[_.FillArea=65536]="FillArea",_[_.LimitPixels=131072]="LimitPixels",_[_.AspectRatio=1048576]="AspectRatio",_})({}),oe=class hi{_includeXyInToString;_width=0;_height=0;_x=0;_y=0;_aspectRatio=!1;_fillArea=!1;_greater=!1;_isPercentage=!1;_ignoreAspectRatio=!1;_less=!1;_limitPixels=!1;constructor(r,a,e,g){if(typeof r=="number"){if(e!==void 0&&g!==void 0?(this._width=e,this._height=g,this._x=r,this._y=a??0,this._includeXyInToString=!0):(this._width=r,this._height=a??this._width,this._x=0,this._y=0,this._includeXyInToString=!1),this._width<0)throw new N("negative width is not allowed");if(this._height<0)throw new N("negative height is not allowed")}else{this._includeXyInToString=r.indexOf("+")>=0||r.indexOf("-")>=0;let p=c._api._MagickGeometry_Create();try{E(r,f=>{let k=c._api._MagickGeometry_Initialize(p,f);if(k===Ce.NoValue)throw new N("invalid geometry specified");this.hasFlag(k,Ce.AspectRatio)?this.initializeFromAspectRation(p,r):this.initialize(p,k)})}finally{c._api._MagickGeometry_Dispose(p)}}}get aspectRatio(){return this._aspectRatio}get fillArea(){return this._fillArea}set fillArea(r){this._fillArea=r}get greater(){return this._greater}set greater(r){this._greater=r}get height(){return this._height}set height(r){this._height=r}get ignoreAspectRatio(){return this._ignoreAspectRatio}set ignoreAspectRatio(r){this._ignoreAspectRatio=r}get isPercentage(){return this._isPercentage}set isPercentage(r){this._isPercentage=r}get less(){return this._less}set less(r){this._less=r}get limitPixels(){return this._limitPixels}set limitPixels(r){this._limitPixels=r}get width(){return this._width}set width(r){this._width=r}get x(){return this._x}set x(r){this._x=r}get y(){return this._y}set y(r){this._y=r}toString(){if(this._aspectRatio)return this._width+":"+this._height;let r="";return this._width==0&&this._height==0?r+="0x0":(this._width>0&&(r+=this._width.toString()),this._height>0?r+="x"+this._height.toString():r+="x"),(this._x!=0||this._y!=0||this._includeXyInToString)&&(this._x>=0&&(r+="+"),r+=this._x,this.y>=0&&(r+="+"),r+=this.y),this._fillArea&&(r+="^"),this._greater&&(r+=">"),this._isPercentage&&(r+="%"),this._ignoreAspectRatio&&(r+="!"),this._less&&(r+="<"),this._limitPixels&&(r+="@"),r}static _fromRectangle(r){if(r===0)throw new N("unable to allocate memory");try{let a=c._api._MagickRectangle_Width_Get(r),e=c._api._MagickRectangle_Height_Get(r);return new hi(c._api._MagickRectangle_X_Get(r),c._api._MagickRectangle_Y_Get(r),a,e)}finally{c._api._MagickRectangle_Dispose(r)}}_toRectangle(r){let a=c._api._MagickRectangle_Create();if(a===0)throw new N("unable to allocate memory");try{return c._api._MagickRectangle_Width_Set(a,this._width),c._api._MagickRectangle_Height_Set(a,this._height),c._api._MagickRectangle_X_Set(a,this._x),c._api._MagickRectangle_Y_Set(a,this._y),r(a)}finally{c._api._MagickRectangle_Dispose(a)}}initialize(r,a){this._width=c._api._MagickGeometry_Width_Get(r),this._height=c._api._MagickGeometry_Height_Get(r),this._x=c._api._MagickGeometry_X_Get(r),this._y=c._api._MagickGeometry_Y_Get(r),this._ignoreAspectRatio=this.hasFlag(a,Ce.IgnoreAspectRatio),this._isPercentage=this.hasFlag(a,Ce.PercentValue),this._fillArea=this.hasFlag(a,Ce.FillArea),this._greater=this.hasFlag(a,Ce.Greater),this._less=this.hasFlag(a,Ce.Less),this._limitPixels=this.hasFlag(a,Ce.LimitPixels)}initializeFromAspectRation(r,a){this._aspectRatio=!0;let e=a.split(":");this._width=this.parseNumber(e[0]),this._height=this.parseNumber(e[1]),this._x=c._api._MagickGeometry_X_Get(r),this._y=c._api._MagickGeometry_Y_Get(r)}parseNumber(r){let a=0;for(;a<r.length&&!this.isNumber(r[a]);)a++;let e=a;for(;a<r.length&&this.isNumber(r[a]);)a++;return parseInt(r.substr(e,a-e))}isNumber(r){return r>="0"&&r<="9"}hasFlag(r,a){return(r&a)===a}},Qe=class ir{constructor(r,a){this.x=r,this.y=a??r}x;y;static _create(r){return r===0?new ir(0,0):new ir(c._api._PointInfo_X_Get(r),c._api._PointInfo_Y_Get(r))}},$o=class ui{constructor(r){this.area=c._api._ConnectedComponent_GetArea(r),this.centroid=Qe._create(c._api._ConnectedComponent_GetCentroid(r)),this.color=M._create(c._api._ConnectedComponent_GetColor(r)),this.height=c._api._ConnectedComponent_GetHeight(r),this.id=c._api._ConnectedComponent_GetId(r),this.width=c._api._ConnectedComponent_GetWidth(r),this.x=c._api._ConnectedComponent_GetX(r),this.y=c._api._ConnectedComponent_GetY(r)}area;centroid;color;height;id;width;x;y;static _create(r,a){let e=[];if(r===0)return e;for(let g=0;g<a;g++){let p=c._api._ConnectedComponent_GetInstance(r,g);p===0||c._api._ConnectedComponent_GetArea(p)<2**-52||e.push(new ui(p))}return e}toGeometry(){return new oe(this.x,this.y,this.width,this.height)}},Uo=class{angleThreshold;areaThreshold;circularityThreshold;connectivity;diameterThreshold;eccentricityThreshold;majorAxisThreshold;meanColor;minorAxisThreshold;perimeterThreshold;constructor(_){this.connectivity=_}_setArtifacts(_){this.angleThreshold!==void 0&&_.setArtifact("connected-components:angle-threshold",this.angleThreshold.toString()),this.areaThreshold!==void 0&&_.setArtifact("connected-components:area-threshold",this.areaThreshold.toString()),this.circularityThreshold!==void 0&&_.setArtifact("connected-components:circularity-threshold",this.circularityThreshold.toString()),this.diameterThreshold!==void 0&&_.setArtifact("connected-components:diameter-threshold",this.diameterThreshold.toString()),this.eccentricityThreshold!==void 0&&_.setArtifact("connected-components:eccentricity-threshold",this.eccentricityThreshold.toString()),this.majorAxisThreshold!==void 0&&_.setArtifact("connected-components:major-axis-threshold",this.majorAxisThreshold.toString()),this.meanColor!==void 0&&_.setArtifact("connected-components:mean-color",this.meanColor.toString()),this.minorAxisThreshold!==void 0&&_.setArtifact("connected-components:minor-axis-threshold",this.minorAxisThreshold.toString()),this.perimeterThreshold!==void 0&&_.setArtifact("connected-components:perimeter-threshold",this.perimeterThreshold.toString())}},Le={Undefined:0,PixelsPerInch:1,PixelsPerCentimeter:2},pi=class St{constructor(r,a,e){a===void 0?(this.x=r,this.y=r,this.units=Le.PixelsPerInch):e===void 0?(this.x=r,this.y=r,this.units=a):(this.x=r,this.y=a,this.units=e)}x;y;units;toString(r){return r==this.units||r===Le.Undefined||r===void 0?St.toString(this.x,this.y,r??Le.Undefined):this.units==Le.PixelsPerCentimeter&&r==Le.PixelsPerInch?St.toString(this.x*2.54,this.y*2.54,r):St.toString(this.x/2.54,this.y/2.54,r)}static toString(r,a,e){let g=`${r}x${a}`;switch(e){case Le.PixelsPerCentimeter:g+="cm";break;case Le.PixelsPerInch:g+="inch";break}return g}},fe=class ar{static _disposeAfterExecution(r,a){try{let e=a(r);return e instanceof Promise?Promise.resolve(e).then(g=>(r.dispose(),ar.checkResult(r,g),g)):(r.dispose(),ar.checkResult(r,e),e)}catch(e){throw r.dispose(),e}}static checkResult(r,a){if(a===r)throw new N("The result of the function cannot be the instance that has been disposed.");return a}},di=class{_pointer;_bytes;_func;constructor(_,r,a){this._pointer=_,this._func=a,this._bytes=c._api.HEAPU8.subarray(_,_+r)}func(_){return _._bytes===void 0?_._func(new Uint8Array):_._func(_._bytes)}dispose(){this._pointer=c._api._MagickMemory_Relinquish(this._pointer)}},mi=class{instance;type;constructor(_,r){this.instance=c._api._malloc(_),this.type=r,c._api.setValue(this.instance,0,this.type)}get ptr(){return this.instance}get value(){return c._api.getValue(this.instance,this.type)}},ze=class fi extends mi{constructor(){super(4,"i32")}static use(r){let a=new fi;try{return r(a)}finally{c._api._free(a.ptr)}}},T=class ie{pointer;constructor(r){this.pointer=r}get ptr(){return this.pointer.ptr}check(r,a){return this.isError()?a():r()}static usePointer(r,a){return ze.use(e=>{let g=r(e.ptr);return ie.checkException(e,g,a)})}static use(r,a){return ze.use(e=>{let g=r(new ie(e));return ie.checkException(e,g,a)})}static checkException(r,a,e){if(!ie.isRaised(r))return a;let g=ie.getErrorSeverity(r.value);return g>=tr.Error?ie.throw(r,g):e===void 0?ie.dispose(r):e(ie.createError(r.value,g)),a}isError(){return ie.isRaised(this.pointer)?ie.getErrorSeverity(this.pointer.value)>=tr.Error:!1}static getErrorSeverity(r){return c._api._MagickExceptionHelper_Severity(r)}static isRaised(r){return r.value!==0}static throw(r,a){let e=ie.createError(r.value,a);throw ie.dispose(r),e}static createError(r,a){let e=new N(ie.getMessage(r),a),g=c._api._MagickExceptionHelper_RelatedCount(r);if(g===0)return e;let p=[];for(let f=0;f<g;f++){let k=c._api._MagickExceptionHelper_Related(r,f),C=ie.getErrorSeverity(k),A=ie.createError(k,C);p.push(A)}return e._setRelatedErrors(p),e}static getMessage(r){let a=c._api._MagickExceptionHelper_Message(r),e=c._api._MagickExceptionHelper_Description(r),g=se(a,"Unknown error");return e!==0&&(g+=`(${c._api.UTF8ToString(e)})`),g}static dispose(r){c._api._MagickExceptionHelper_Dispose(r.value)}},$e=class{disposeMethod;instance;constructor(_,r){this.instance=_,this.disposeMethod=r}get _instance(){if(this.instance>0)return this.instance;throw this.instance===-1&&this._instanceNotInitialized(),new N("instance is disposed")}set _instance(_){this.disposeInstance(this.instance),this.instance=_}dispose(){this.instance=this.disposeInstance(this.instance)}_instanceNotInitialized(){throw new N("instance is not initialized")}_setInstance(_,r){return r.check(()=>this.instance===0?!1:(this.dispose(),this.instance=_,!0),()=>(this.disposeInstance(_),!0))}disposeInstance(_){return _>0&&(this.onDispose!==void 0&&this.onDispose(),this.disposeMethod(_)),0}},Ho=class wi{constructor(r,a,e,g,p,f,k){this.ascent=r,this.descent=a,this.maxHorizontalAdvance=e,this.textHeight=g,this.textWidth=p,this.underlinePosition=f,this.underlineThickness=k}ascent;descent;maxHorizontalAdvance;textHeight;textWidth;underlinePosition;underlineThickness;static _create(r){if(r==0)return null;try{return new wi(c._api._TypeMetric_Ascent_Get(r),c._api._TypeMetric_Descent_Get(r),c._api._TypeMetric_MaxHorizontalAdvance_Get(r),c._api._TypeMetric_TextHeight_Get(r),c._api._TypeMetric_TextWidth_Get(r),c._api._TypeMetric_UnderlinePosition_Get(r),c._api._TypeMetric_UnderlineThickness_Get(r))}finally{c._api._TypeMetric_Dispose(r)}}};function ti(_,r){if(_.byteLength===0)throw new N("The specified array cannot be empty");let a=0;try{return a=c._api._malloc(_.byteLength),c._api.HEAPU8.set(_,a),r(a)}finally{a!==0&&c._api._free(a)}}function Pt(_,r){if(_.length===0)throw new N("The specified array cannot be empty");let a=_.length*8,e=0;try{e=c._api._malloc(a);let g=new ArrayBuffer(a),p=new Float64Array(g);for(let f=0;f<_.length;f++)p[f]=_[f];return c._api.HEAPU8.set(new Int8Array(g),e),r(e)}finally{e!==0&&c._api._free(e)}}function Yo(_,r){if(_.byteLength===0)throw new N("The specified array cannot be empty");let a=0;try{return a=c._api._malloc(_.byteLength),c._api.HEAPU8.set(_,a),r(a)}finally{a!==0&&c._api._free(a)}}var ki=class Mi extends $e{constructor(r){let a=r.settings._drawing._use(g=>c._api._DrawingWand_Create(r._instance,g._instance)),e=c._api._DrawingWand_Dispose;super(a,e)}affine(r,a,e,g,p,f){T.usePointer(k=>{c._api._DrawingWand_Affine(this._instance,r,a,e,g,p,f,k)})}borderColor(r){T.usePointer(a=>{r._use(e=>{c._api._DrawingWand_BorderColor(this._instance,e,a)})})}color(r,a,e){T.usePointer(g=>{c._api._DrawingWand_Color(this._instance,r,a,e,g)})}draw(r){r.forEach(a=>{a.draw(this)}),T.usePointer(a=>{c._api._DrawingWand_Render(this._instance,a)})}fillColor(r){T.usePointer(a=>{r._use(e=>{c._api._DrawingWand_FillColor(this._instance,e,a)})})}fillOpacity(r){T.usePointer(a=>{c._api._DrawingWand_FillOpacity(this._instance,r,a)})}fillRule(r){T.usePointer(a=>{c._api._DrawingWand_FillRule(this._instance,r,a)})}font(r){T.usePointer(a=>{E(r,e=>{c._api._DrawingWand_Font(this._instance,e,a)})})}fontPointSize(r){T.usePointer(a=>{c._api._DrawingWand_FontPointSize(this._instance,r,a)})}fontTypeMetrics(r,a){return T.usePointer(e=>E(r,g=>{let p=c._api._DrawingWand_FontTypeMetrics(this._instance,g,a?1:0,e);return Ho._create(p)}))}gravity(r){T.usePointer(a=>{c._api._DrawingWand_Gravity(this._instance,r,a)})}line(r,a,e,g){T.usePointer(p=>{c._api._DrawingWand_Line(this._instance,r,a,e,g,p)})}pathFinish(){T.usePointer(r=>{c._api._DrawingWand_PathFinish(this._instance,r)})}pathLineToAbs(r,a){T.usePointer(e=>{c._api._DrawingWand_PathLineToAbs(this._instance,r,a,e)})}pathLineToRel(r,a){T.usePointer(e=>{c._api._DrawingWand_PathLineToRel(this._instance,r,a,e)})}pathMoveToAbs(r,a){T.usePointer(e=>{c._api._DrawingWand_PathMoveToAbs(this._instance,r,a,e)})}pathMoveToRel(r,a){T.usePointer(e=>{c._api._DrawingWand_PathMoveToRel(this._instance,r,a,e)})}pathStart(){T.usePointer(r=>{c._api._DrawingWand_PathStart(this._instance,r)})}point(r,a){T.usePointer(e=>{c._api._DrawingWand_Point(this._instance,r,a,e)})}rectangle(r,a,e,g){T.usePointer(p=>{c._api._DrawingWand_Rectangle(this._instance,r,a,e,g,p)})}roundRectangle(r,a,e,g,p,f){T.usePointer(k=>{c._api._DrawingWand_RoundRectangle(this._instance,r,a,e,g,p,f,k)})}strokeColor(r){T.usePointer(a=>{r._use(e=>{c._api._DrawingWand_StrokeColor(this._instance,e,a)})})}strokeDashArray(r){T.usePointer(a=>{Pt(r,e=>{c._api._DrawingWand_StrokeDashArray(this._instance,e,r.length,a)})})}strokeDashOffset(r){T.usePointer(a=>{c._api._DrawingWand_StrokeDashOffset(this._instance,r,a)})}strokeWidth(r){T.usePointer(a=>{c._api._DrawingWand_StrokeWidth(this._instance,r,a)})}text(r,a,e){T.usePointer(g=>{E(e,p=>{c._api._DrawingWand_Text(this._instance,r,a,p,g)})})}textAlignment(r){T.usePointer(a=>{c._api._DrawingWand_TextAlignment(this._instance,r,a)})}textAntialias(r){T.usePointer(a=>{c._api._DrawingWand_TextAntialias(this._instance,r?1:0,a)})}textDecoration(r){T.usePointer(a=>{c._api._DrawingWand_TextDecoration(this._instance,r,a)})}textInterlineSpacing(r){T.usePointer(a=>{c._api._DrawingWand_TextInterlineSpacing(this._instance,r,a)})}textInterwordspacing(r){T.usePointer(a=>{c._api._DrawingWand_TextInterwordSpacing(this._instance,r,a)})}textKerning(r){T.usePointer(a=>{c._api._DrawingWand_TextKerning(this._instance,r,a)})}textUnderColor(r){T.usePointer(a=>{r._use(e=>{c._api._DrawingWand_TextUnderColor(this._instance,e,a)})})}static _use(r,a){let e=new Mi(r);return fe._disposeAfterExecution(e,a)}},Xo=class yi extends mi{constructor(){super(8,"double")}static use(r){let a=new yi;try{return r(a)}finally{c._api._free(a.ptr)}}},K={Undefined:0,Forget:0,Northwest:1,North:2,Northeast:3,West:4,Center:5,East:6,Southwest:7,South:8,Southeast:9};function*jo(_){for(let r of _)switch(r){case K.North:yield"north";break;case K.Northeast:yield"north",yield"east";break;case K.Northwest:yield"north",yield"west";break;case K.East:yield"east";break;case K.West:yield"west";break;case K.South:yield"south";break;case K.Southeast:yield"south",yield"east";break;case K.Southwest:yield"south",yield"west"}}function Vo(_){switch(_){case K.North:return"north";case K.Northeast:return"northeast";case K.Northwest:return"northwest";case K.East:return"east";case K.West:return"west";case K.South:return"south";case K.Southeast:return"southeast";case K.Southwest:return"southwest";case K.Center:return"center";default:return}}var vi=class Si{constructor(r,a,e){this.meanErrorPerPixel=r,this.normalizedMeanError=a,this.normalizedMaximumError=e}meanErrorPerPixel;normalizedMaximumError;normalizedMeanError;static _create(r){return new Si(c._api._MagickImage_MeanErrorPerPixel_Get(r._instance),c._api._MagickImage_NormalizedMeanError_Get(r._instance),c._api._MagickImage_NormalizedMaximumError_Get(r._instance))}},De={Unknown:"UNKNOWN",ThreeFr:"3FR",ThreeG2:"3G2",ThreeGp:"3GP",A:"A",Aai:"AAI",Ai:"AI",APng:"APNG",Art:"ART",Arw:"ARW",Ashlar:"ASHLAR",Avci:"AVCI",Avi:"AVI",Avif:"AVIF",Avs:"AVS",B:"B",Bayer:"BAYER",Bayera:"BAYERA",Bgr:"BGR",Bgra:"BGRA",Bgro:"BGRO",Bmp:"BMP",Bmp2:"BMP2",Bmp3:"BMP3",Brf:"BRF",C:"C",Cal:"CAL",Cals:"CALS",Canvas:"CANVAS",Caption:"CAPTION",Cin:"CIN",Cip:"CIP",Clip:"CLIP",Cmyk:"CMYK",Cmyka:"CMYKA",Cr2:"CR2",Cr3:"CR3",Crw:"CRW",Cube:"CUBE",Cur:"CUR",Cut:"CUT",Data:"DATA",Dcm:"DCM",Dcr:"DCR",Dcraw:"DCRAW",Dcx:"DCX",Dds:"DDS",Dfont:"DFONT",Dng:"DNG",Dpx:"DPX",Dxt1:"DXT1",Dxt5:"DXT5",Epdf:"EPDF",Epi:"EPI",Eps:"EPS",Eps2:"EPS2",Eps3:"EPS3",Epsf:"EPSF",Epsi:"EPSI",Ept:"EPT",Ept2:"EPT2",Ept3:"EPT3",Erf:"ERF",Exr:"EXR",Farbfeld:"FARBFELD",Fax:"FAX",Ff:"FF",Fff:"FFF",File:"FILE",Fits:"FITS",Fl32:"FL32",Flv:"FLV",Fractal:"FRACTAL",Ftp:"FTP",Fts:"FTS",Ftxt:"FTXT",G:"G",G3:"G3",G4:"G4",Gif:"GIF",Gif87:"GIF87",Gradient:"GRADIENT",Gray:"GRAY",Graya:"GRAYA",Group4:"GROUP4",Hald:"HALD",Hdr:"HDR",Heic:"HEIC",Heif:"HEIF",Histogram:"HISTOGRAM",Hrz:"HRZ",Htm:"HTM",Html:"HTML",Http:"HTTP",Https:"HTTPS",Icb:"ICB",Ico:"ICO",Icon:"ICON",Icn:"ICN",Iiq:"IIQ",Info:"INFO",Inline:"INLINE",Ipl:"IPL",Isobrl:"ISOBRL",Isobrl6:"ISOBRL6",J2c:"J2C",J2k:"J2K",Jng:"JNG",Jnx:"JNX",Jp2:"JP2",Jpc:"JPC",Jpe:"JPE",Jpeg:"JPEG",Jpg:"JPG",Jpm:"JPM",Jps:"JPS",Jpt:"JPT",Json:"JSON",Jxl:"JXL",K:"K",K25:"K25",Kdc:"KDC",Label:"LABEL",M:"M",M2v:"M2V",M4v:"M4V",Mac:"MAC",Map:"MAP",Mask:"MASK",Mat:"MAT",Matte:"MATTE",Mdc:"MDC",Mef:"MEF",Miff:"MIFF",Mkv:"MKV",Mng:"MNG",Mono:"MONO",Mov:"MOV",Mos:"MOS",Mp4:"MP4",Mpc:"MPC",Mpeg:"MPEG",Mpg:"MPG",Mpo:"MPO",Mrw:"MRW",Msl:"MSL",Msvg:"MSVG",Mtv:"MTV",Mvg:"MVG",Nef:"NEF",Nrw:"NRW",Null:"NULL",O:"O",Ora:"ORA",Orf:"ORF",Otb:"OTB",Otf:"OTF",Pal:"PAL",Palm:"PALM",Pam:"PAM",Pango:"PANGO",Pattern:"PATTERN",Pbm:"PBM",Pcd:"PCD",Pcds:"PCDS",Pcl:"PCL",Pct:"PCT",Pcx:"PCX",Pdb:"PDB",Pdf:"PDF",Pdfa:"PDFA",Pef:"PEF",Pes:"PES",Pfa:"PFA",Pfb:"PFB",Pfm:"PFM",Pgm:"PGM",Pgx:"PGX",Phm:"PHM",Picon:"PICON",Pict:"PICT",Pix:"PIX",Pjpeg:"PJPEG",Plasma:"PLASMA",Png:"PNG",Png00:"PNG00",Png24:"PNG24",Png32:"PNG32",Png48:"PNG48",Png64:"PNG64",Png8:"PNG8",Pnm:"PNM",Pocketmod:"POCKETMOD",Ppm:"PPM",Ps:"PS",Ps2:"PS2",Ps3:"PS3",Psb:"PSB",Psd:"PSD",Ptif:"PTIF",Pwp:"PWP",Qoi:"QOI",R:"R",RadialGradient:"RADIAL-GRADIENT",Raf:"RAF",Ras:"RAS",Raw:"RAW",Rgb:"RGB",Rgb565:"RGB565",Rgba:"RGBA",Rgbo:"RGBO",Rgf:"RGF",Rla:"RLA",Rle:"RLE",Rmf:"RMF",Rw2:"RW2",Rwl:"RWL",Scr:"SCR",Screenshot:"SCREENSHOT",Sct:"SCT",Sf3:"SF3",Sfw:"SFW",Sgi:"SGI",Shtml:"SHTML",Six:"SIX",Sixel:"SIXEL",SparseColor:"SPARSE-COLOR",Sr2:"SR2",Srf:"SRF",Srw:"SRW",Stegano:"STEGANO",Sti:"STI",StrImg:"STRIMG",Sun:"SUN",Svg:"SVG",Svgz:"SVGZ",Text:"TEXT",Tga:"TGA",Thumbnail:"THUMBNAIL",Tif:"TIF",Tiff:"TIFF",Tiff64:"TIFF64",Tile:"TILE",Tim:"TIM",Tm2:"TM2",Ttc:"TTC",Ttf:"TTF",Txt:"TXT",Ubrl:"UBRL",Ubrl6:"UBRL6",Uil:"UIL",Uyvy:"UYVY",Vda:"VDA",Vicar:"VICAR",Vid:"VID",Viff:"VIFF",Vips:"VIPS",Vst:"VST",WebM:"WEBM",WebP:"WEBP",Wbmp:"WBMP",Wmv:"WMV",Wpg:"WPG",X3f:"X3F",Xbm:"XBM",Xc:"XC",Xcf:"XCF",Xpm:"XPM",Xps:"XPS",Xv:"XV",Y:"Y",Yaml:"YAML",Ycbcr:"YCBCR",Ycbcra:"YCBCRA",Yuv:"YUV"},Mt={Merge:13,Flatten:14,Mosaic:15,Trimbounds:16},qo=class extends $e{constructor(_){let r=c._api._DrawingSettings_Create(),a=c._api._DrawingSettings_Dispose;super(r,a);let e=_.affine;e!==void 0&&c._api._DrawingSettings_SetAffine(this._instance,e.scaleX,e.scaleY,e.shearX,e.shearY,e.translateX,e.translateY),_.borderColor!==void 0&&_.borderColor._use(p=>{c._api._DrawingSettings_BorderColor_Set(this._instance,p)}),_.fillColor!==void 0&&_.fillColor._use(p=>{c._api._DrawingSettings_FillColor_Set(this._instance,p)}),_.fillRule!==void 0&&c._api._DrawingSettings_FillRule_Set(this._instance,_.fillRule),_.font!==void 0&&E(Dt._getFontFileName(_.font),p=>{c._api._DrawingSettings_Font_Set(this._instance,p)}),_.fontPointsize!==void 0&&c._api._DrawingSettings_FontPointsize_Set(this._instance,_.fontPointsize),_.strokeColor!==void 0&&_.strokeColor._use(p=>{c._api._DrawingSettings_StrokeColor_Set(this._instance,p)});let g=_.strokeDashArray;g!==void 0&&Pt(g,p=>{c._api._DrawingSettings_SetStrokeDashArray(this._instance,p,g.length)}),_.strokeDashOffset!==void 0&&c._api._DrawingSettings_StrokeDashOffset_Set(this._instance,_.strokeDashOffset),_.strokeWidth!==void 0&&c._api._DrawingSettings_StrokeWidth_Set(this._instance,_.strokeWidth),_.textAntiAlias!==void 0&&c._api._DrawingSettings_TextAntiAlias_Set(this._instance,_.textAntiAlias?1:0),_.textGravity!==void 0&&c._api._DrawingSettings_TextGravity_Set(this._instance,_.textGravity),_.textKerning!==void 0&&c._api._DrawingSettings_TextKerning_Set(this._instance,_.textKerning),_.textUnderColor!==void 0&&_.textUnderColor._use(p=>{c._api._DrawingSettings_TextUnderColor_Set(this._instance,p)})}setFillColor(_){_===void 0?c._api._DrawingSettings_FillColor_Set(this._instance,0):_._use(r=>{c._api._DrawingSettings_FillColor_Set(this._instance,r)})}setFillPattern(_){T.usePointer(r=>{_===void 0?c._api._DrawingSettings_SetFillPattern(this._instance,0,r):c._api._DrawingSettings_SetFillPattern(this._instance,_._instance,r)})}},Ko=class{affine;borderColor;backgroundColor;fillColor;fillRule;font;fontPointsize;strokeColor;strokeDashArray;strokeDashOffset;strokeWidth;textAntiAlias;textGravity;textKerning;textUnderColor;_use(_){let r=new qo(this);return fe._disposeAfterExecution(r,_)}},Qo={Undefined:0,EvenOdd:1,NonZero:2},Ci=class extends $e{constructor(_){let r=c._api._MagickSettings_Create(),a=c._api._MagickSettings_Dispose;super(r,a),_._colorFuzz!==void 0&&c._api._MagickSettings_SetColorFuzz(this._instance,_._colorFuzz),_._fileName!==void 0&&E(_._fileName,e=>{c._api._MagickSettings_SetFileName(this._instance,e)}),_._ping&&c._api._MagickSettings_SetPing(this._instance,1),_._quality!==void 0&&c._api._MagickSettings_SetQuality(this._instance,_._quality),_.antiAlias!==void 0&&c._api._MagickSettings_AntiAlias_Set(this._instance,_.antiAlias?1:0),_.backgroundColor!==void 0&&_.backgroundColor._use(e=>{c._api._MagickSettings_BackgroundColor_Set(this._instance,e)}),_.colorSpace!==void 0&&c._api._MagickSettings_ColorSpace_Set(this._instance,_.colorSpace),_.colorType!==void 0&&c._api._MagickSettings_ColorType_Set(this._instance,_.colorType),_.compression!==void 0&&c._api._MagickSettings_Compression_Set(this._instance,_.compression),_.debug!==void 0&&c._api._MagickSettings_Debug_Set(this._instance,_.debug?1:0),_.density!==void 0&&E(_.density.toString(),e=>{c._api._MagickSettings_Density_Set(this._instance,e)}),_.depth!==void 0&&c._api._MagickSettings_Depth_Set(this._instance,_.depth),_.endian!==void 0&&c._api._MagickSettings_Endian_Set(this._instance,_.endian),_.fillColor!==void 0&&this.setOption("fill",_.fillColor.toString()),_.font!==void 0&&E(Dt._getFontFileName(_.font),e=>{c._api._MagickSettings_SetFont(this._instance,e)}),_.fontPointsize!==void 0&&c._api._MagickSettings_FontPointsize_Set(this._instance,_.fontPointsize),_.format!==void 0&&E(_.format,e=>{c._api._MagickSettings_Format_Set(this._instance,e)}),_.interlace!==void 0&&c._api._MagickSettings_Interlace_Set(this._instance,_.interlace),_.page!==void 0&&E(_.page.toString(),e=>{c._api._MagickSettings_SetPage(this._instance,e)}),_.strokeColor!==void 0&&this.setOption("stroke",_.strokeColor.toString()),_.strokeWidth!==void 0&&this.setOption("strokeWidth",_.strokeWidth.toString()),_.textInterlineSpacing!==void 0&&this.setOption("interline-spacing",_.textInterlineSpacing.toString());for(let e in _._options)this.setOption(e,_._options[e])}setOption(_,r){E(_,a=>{E(r,e=>{c._api._MagickSettings_SetOption(this._instance,a,e)})})}},nr=class Ii{_colorFuzz;_drawing=new Ko;_fileName;_onArtifact;_options={};_ping=!1;_quality;get affine(){return this._drawing.affine}set affine(r){this._drawing.affine=r}antiAlias;backgroundColor;get borderColor(){return this._drawing.borderColor}set borderColor(r){this._drawing.borderColor=r}colorSpace;colorType;compression;debug;density;depth;endian;get fillColor(){return this._drawing.fillColor}set fillColor(r){this.setDefineAndArtifact("fill",r?.toString()),this._drawing.fillColor=r}get fillRule(){return this._drawing.fillRule??Qo.Undefined}set fillRule(r){this._drawing.fillRule=r}get font(){return this._drawing.font}set font(r){this._drawing.font=r}get fontPointsize(){return this._drawing.fontPointsize}set fontPointsize(r){this._drawing.fontPointsize=r}format;interlace;page;get strokeColor(){return this._drawing.strokeColor}set strokeColor(r){this._drawing.strokeColor=r}get strokeDashArray(){return this._drawing.strokeDashArray}set strokeDashArray(r){this._drawing.strokeDashArray=r}get strokeDashOffset(){return this._drawing.strokeDashOffset}set strokeDashOffset(r){this._drawing.strokeDashOffset=r}get strokeWidth(){return this._drawing.strokeWidth}set strokeWidth(r){this.setDefineAndArtifact("stroke",r?.toString()),this._drawing.strokeWidth=r}get textAntiAlias(){return this._drawing.textAntiAlias}set textAntiAlias(r){this._drawing.textAntiAlias=r}textInterlineSpacing;get textKerning(){return this._drawing.textKerning}set textKerning(r){this.setDefineAndArtifact("kerning",r?.toString()),this._drawing.textKerning=r}get textGravity(){return this._drawing.textGravity}set textGravity(r){this.setDefineAndArtifact("gravity",Vo(r)),this._drawing.textGravity=r}get textUnderColor(){return this._drawing.textUnderColor}set textUnderColor(r){this._drawing.textUnderColor=r}getDefine(r,a){return a===void 0?this._options[r]??null:this._options[`${r}:${a}`]??null}removeDefine(r,a){if(a===void 0)delete this._options[r];else{let e=this.parseDefine(r,a);delete this._options[e]}}setDefine(r,a,e){if(e===void 0)this._options[r]=a;else{let g=this.parseDefine(r,a);typeof e=="string"?this._options[g]=e:typeof e=="number"?this._options[g]=e.toString():this._options[g]=e?"true":"false"}}setDefines(r){r.getDefines().forEach(a=>{a!==void 0&&this.setDefine(a.format,a.name,a.value)})}_clone(){let r=new Ii;return Object.assign(r,this),r}_use(r){let a=new Ci(this);return fe._disposeAfterExecution(a,r)}parseDefine(r,a){return r===De.Unknown?a:`${r}:${a}`}setDefineAndArtifact(r,a){a===void 0?this.removeDefine(r):this.setDefine(r,a),this._onArtifact!==void 0&&this._onArtifact(r,a)}},ve=class extends nr{constructor(_){super(),Object.assign(this,_)}extractArea;frameIndex;frameCount;height;get syncImageWithExifProfile(){let _=this.getDefine("exif:sync-image");return _===null?!0:_.toLowerCase()==="true"}set syncImageWithExifProfile(_){this.setDefine("exif:sync-image",_.toString())}get syncImageWithTiffProperties(){let _=this.getDefine("tiff:sync-image");return _===null?!0:_.toLowerCase()==="true"}set syncImageWithTiffProperties(_){this.setDefine("tiff:sync-image",_.toString())}width;_use(_){let r=new Ci(this),a=this.getSize();if(a!==""&&E(a,e=>{c._api._MagickSettings_SetSize(r._instance,e)}),this.frameIndex!==void 0||this.frameCount!==void 0){let e=this.frameIndex??0,g=this.frameCount??1;c._api._MagickSettings_SetScene(r._instance,e),c._api._MagickSettings_SetNumberScenes(r._instance,g),E((this.frameCount===void 0?e.toString():`${e}-${e+g}`).toString(),p=>{c._api._MagickSettings_SetScenes(r._instance,p)})}return this.extractArea!==void 0&&E(this.extractArea.toString(),e=>{c._api._MagickSettings_Extract_Set(r._instance,e)}),fe._disposeAfterExecution(r,_)}getSize(){return this.width!==void 0&&this.height!==void 0?`${this.width}x${this.height}`:this.width===void 0?this.height===void 0?"":`x${this.height}`:`${this.width}x`}},Pi={Undefined:0,No:1,Riemersma:2,FloydSteinberg:3},Jo=class extends $e{constructor(_){let r=c._api._QuantizeSettings_Create(),a=c._api._QuantizeSettings_Dispose;super(r,a),c._api._QuantizeSettings_SetColors(this._instance,_.colors),c._api._QuantizeSettings_SetColorSpace(this._instance,_.colorSpace),c._api._QuantizeSettings_SetDitherMethod(this._instance,_.ditherMethod??Pi.No),c._api._QuantizeSettings_SetMeasureErrors(this._instance,_.measureErrors?1:0),c._api._QuantizeSettings_SetTreeDepth(this._instance,_.treeDepth)}},sr=class{constructor(){this.colors=256,this.colorSpace=b.Undefined,this.ditherMethod=Pi.Riemersma,this.measureErrors=!1,this.treeDepth=0}colors;colorSpace;ditherMethod;measureErrors;treeDepth;_use(_){let r=new Jo(this);return fe._disposeAfterExecution(r,_)}},We=class Di{_image;_names=[];constructor(r){this._image=r}setArtifact(r,a){this._names.push(r),this._image.setArtifact(r,a)}static use(r,a){let e=new Di(r);try{return a(e)}finally{e.dispose()}}dispose(){for(let r of this._names)this._image.removeArtifact(r)}},or=class Be extends Array{constructor(){super()}static create(r){let a=Be.createObject();return r!==void 0&&a.read(r),a}dispose(){let r=this.pop();for(;r!==void 0;)r.dispose(),r=this.pop()}appendHorizontally(r){return this.createImage((a,e)=>c._api._MagickImageCollection_Append(a,0,e.ptr),r)}appendVertically(r){return this.createImage((a,e)=>c._api._MagickImageCollection_Append(a,1,e.ptr),r)}clone(r){return Be.use(a=>{for(let e=0;e<this.length;e++)a.push(Ne._clone(this[e]));return r(a)})}coalesce(){this.replaceImages((r,a)=>c._api._MagickImageCollection_Coalesce(r,a.ptr))}combine(r,a){let e=a,g=b.sRGB;return typeof r=="number"?g=r:e=r,this.createImage((p,f)=>c._api._MagickImageCollection_Combine(p,g,f.ptr),e)}complex(r,a){return We.use(this[0],e=>(r._setArtifacts(e),this.createImage((g,p)=>c._api._MagickImageCollection_Complex(g,r.complexOperator,p.ptr),a)))}deconstruct(){this.replaceImages((r,a)=>c._api._MagickImageCollection_Deconstruct(r,a.ptr))}evaluate(r,a){return this.createImage((e,g)=>c._api._MagickImageCollection_Evaluate(e,r,g.ptr),a)}flatten(r){return this.mergeImages(Mt.Flatten,r)}fx(r,a,e){this.throwIfEmpty();let g=H.All,p=e;return typeof a=="number"?g=a:p=a,E(r,f=>this.createImage((k,C)=>c._api._MagickImageCollection_Fx(k,f,g,C.ptr),p))}merge(r){return this.mergeImages(Mt.Merge,r)}montage(r,a){return this.throwIfEmpty(),this.attachImages(e=>{let g=r._use(p=>T.use(f=>{let k=c._api._MagickImageCollection_Montage(e,p._instance,f.ptr);return this.checkResult(k,f)}));return Be._createFromImages(g,this.getSettings(),p=>{let f=r.transparentColor;return f!==void 0&&p.forEach(k=>{k.transparent(f)}),p.merge(a)})})}morph(r){if(this.length<2)throw new N("operation requires at least two images");this.replaceImages((a,e)=>c._api._MagickImageCollection_Morph(a,r,e.ptr))}mosaic(r){return this.mergeImages(Mt.Mosaic,r)}optimize(){this.replaceImages((r,a)=>c._api._MagickImageCollection_Optimize(r,a.ptr))}optimizePlus(){this.replaceImages((r,a)=>c._api._MagickImageCollection_OptimizePlus(r,a.ptr))}optimizeTransparency(){this.throwIfEmpty(),this.attachImages(r=>{T.usePointer(a=>{c._api._MagickImageCollection_OptimizeTransparency(r,a)})})}ping(r,a){this.readOrPing(!0,r,a)}polynomial(r,a){return this.createImage((e,g)=>Pt(r,p=>c._api._MagickImageCollection_Polynomial(e,p,r.length,g.ptr)),a)}quantize(r){this.throwIfEmpty();let a=r===void 0?new sr:r;return this.attachImages(e=>{a._use(g=>{T.usePointer(p=>{c._api._MagickImageCollection_Quantize(e,g._instance,p)})})}),a.measureErrors?vi._create(this[0]):null}read(r,a){this.readOrPing(!1,r,a)}remap(r,a){this.throwIfEmpty();let e=a===void 0?new sr:a;this.attachImages(g=>{e._use(p=>{T.use(f=>{c._api._MagickImageCollection_Remap(g,p._instance,r._instance,f.ptr)})})})}resetPage(){this.forEach(r=>{r.resetPage()})}smushHorizontal(r,a){return this.smush(r,!1,a)}smushVertical(r,a){return this.smush(r,!0,a)}trimBounds(){this.mergeImages(Mt.Trimbounds,()=>{})}static use(r){let a=Be.create();return fe._disposeAfterExecution(a,r)}write(r,a){this.throwIfEmpty();let e=0,g=0,p=this[0],f=this.getSettings();a===void 0?(a=r,f.format=p.format):f.format=r,T.use(C=>{ze.use(A=>{f._use(U=>{this.attachImages(X=>{e=c._api._MagickImage_WriteBlob(X,U._instance,A.ptr,C.ptr),g=A.value})})})});let k=new di(e,g,a);return fe._disposeAfterExecution(k,k.func)}static _createFromImages(r,a,e){let g=Be.createObject();return g.addImages(r,a._clone()),e(g)}addImages(r,a){a.format=De.Unknown;let e=r;for(;e!==0;){let g=c._api._MagickImage_GetNext(e);c._api._MagickImage_SetNext(e,0),this.push(Ne._createFromImage(e,a)),e=g}}attachImages(r){try{for(let a=0;a<this.length-1;a++)c._api._MagickImage_SetNext(this[a]._instance,this[a+1]._instance);return r(this[0]._instance)}finally{for(let a=0;a<this.length-1;a++)c._api._MagickImage_SetNext(this[a]._instance,0)}}checkResult(r,a){return a.check(()=>r,()=>(c._api._MagickImageCollection_Dispose(r),0))}static createObject(){return Object.create(Be.prototype)}createImage(r,a){this.throwIfEmpty();let e=this.attachImages(g=>T.use(p=>{let f=r(g,p);return this.checkResult(f,p)}));return Ne._createFromImage(e,this.getSettings())._use(a)}getSettings(){return this[0]._getSettings()._clone()}mergeImages(r,a){return this.createImage((e,g)=>c._api._MagickImageCollection_Merge(e,r,g.ptr),a)}readOrPing(r,a,e){this.dispose(),T.use(g=>{let p=e===void 0?new ve:new ve(e);p._ping=r,typeof a=="string"?(p._fileName=a,p._use(f=>{let k=c._api._MagickImageCollection_ReadFile(f._instance,g.ptr);this.addImages(k,p)})):p._use(f=>{let k=a.byteLength,C=0;try{C=c._api._malloc(k),c._api.HEAPU8.set(a,C);let A=c._api._MagickImageCollection_ReadBlob(f._instance,C,0,k,g.ptr);this.addImages(A,p)}finally{C!==0&&c._api._free(C)}})})}replaceImages(r){this.throwIfEmpty();let a=this.attachImages(g=>T.use(p=>{let f=r(g,p);return this.checkResult(f,p)})),e=this.getSettings()._clone();this.dispose(),this.addImages(a,e)}smush(r,a,e){return this.createImage((g,p)=>c._api._MagickImageCollection_Smush(g,r,a?1:0,p.ptr),e)}throwIfEmpty(){if(this.length===0)throw new N("operation requires at least one image")}},re=class bi{_value;constructor(r){this._value=r}static _fromQuantum(r){return new bi(r/Pe.max*100)}multiply(r){return r*this._value/100}toDouble(){return this._value}toString(){return`${parseFloat(this._value.toFixed(2))}%`}_toQuantum(){return Pe.max*(this._value/100)}},Zo=class{static use(_,r,a){let e=c._api._MagickRectangle_Create();try{c._api._MagickRectangle_X_Set(e,r.x),c._api._MagickRectangle_Y_Set(e,r.y);let g=r.width,p=r.height;return r.isPercentage&&(g=new re(r.width).multiply(_.width),p=new re(r.height).multiply(_.height)),c._api._MagickRectangle_Width_Set(e,g),c._api._MagickRectangle_Height_Set(e,p),a(e)}finally{c._api._MagickRectangle_Dispose(e)}}},e_=class{static _use(_,r,a){let e=0;try{return e=c._api._OffsetInfo_Create(),c._api._PrimaryInfo_X_Set(e,_),c._api._PrimaryInfo_Y_Set(e,r),a(e)}finally{c._api._free(e)}}},ri=class{_values;constructor(){this._values=Array(7).fill(0)}get(_){return this._values[_]}set(_,r){this._values[_]=r}},yt=class Ei{_huPhashes=new Map;_hash="";channel;constructor(r,a,e){if(this.channel=r,typeof e=="number")for(let g=0;g<a.length;g++){let p=new ri;for(let f=0;f<7;f++){let k=c._api._ChannelPerceptualHash_GetHuPhash(e,g,f);p.set(f,k)}this._huPhashes.set(a[g],p)}else this.parseHash(a,e)}huPhash(r,a){if(a<0||a>6)throw new N("Invalid index specified");let e=this._huPhashes.get(r);if(e===void 0)throw new N("Invalid color space specified");return e.get(a)}sumSquaredDistance(r){let a=0;return this._huPhashes.forEach((e,g)=>{for(let p=0;p<7;p++){let f=e.get(p),k=r.huPhash(g,p);a+=(f-k)*(f-k)}}),a}toString(){return this._hash==""&&this.setHash(),this._hash}parseHash(r,a){this._hash=a;let e=0;for(let g of r){let p=new ri;for(let f=0;f<7;f++,e+=5){let k=Number.parseInt(a.substring(e,e+5),16);if(isNaN(k))throw new N("Invalid hash specified");let C=k/Ei.powerOfTen(k>>17);k&65536&&(C=-C),p.set(f,C)}this._huPhashes.set(g,p)}}static powerOfTen(r){switch(r){case 2:return 100;case 3:return 1e3;case 4:return 1e4;case 5:return 1e5;case 6:return 1e6;default:return 10}}setHash(){this._hash="",this._huPhashes.forEach(r=>{for(let a=0;a<7;a++){let e=r.get(a),g=0;for(;g<7&&Math.abs(e*10)<65356;)e*=10,g++;g<<=1,g<0&&(g|=1),g=(g<<16)+Math.floor(e<0?-(e-.5):e+.5),this._hash+=g.toString(16)}})}},er=class Oe{_red;_green;_blue;constructor(r,a,e){if(typeof r=="string"){let g=a??Oe._defaultColorspaces();Oe._validateColorSpaces(g);let p=35*g.length;if(r.length!==3*p)throw new N("Invalid hash size");this._red=new yt(G.Red,g,r.substring(0,p)),this._blue=new yt(G.Blue,g,r.substring(p,p+p)),this._green=new yt(G.Green,g,r.substring(p+p))}else this._red=r,this._green=a,this._blue=e}static _create(r,a,e){if(e===0)throw new N("The native operation failed to create an instance");return new Oe(Oe.createChannel(r,a,e,G.Red),Oe.createChannel(r,a,e,G.Green),Oe.createChannel(r,a,e,G.Blue))}static _defaultColorspaces(){return[b.XyY,b.HSB]}static _validateColorSpaces(r){if(r.length<1||r.length>6)throw new N("Invalid number of colorspaces, the minimum is 1 and the maximum is 6");if(new Set(r).size!==r.length)throw new N("Specifying the same colorspace more than once is not allowed")}getChannel(r){switch(r){case G.Red:return this._red;case G.Green:return this._green;case G.Blue:return this._blue;default:return null}}sumSquaredDistance(r){let a=r.getChannel(G.Red),e=r.getChannel(G.Green),g=r.getChannel(G.Blue);if(a===null||e===null||g===null)throw new N("The other perceptual hash should contain a red, green and blue channel.");return this._red.sumSquaredDistance(a)+this._green.sumSquaredDistance(e)+this._blue.sumSquaredDistance(g)}toString(){return this._red.toString()+this._green.toString()+this._blue.toString()}static createChannel(r,a,e,g){return new yt(g,a,c._api._PerceptualHash_GetInstance(r._instance,e,g))}},ii=class Ct extends $e{image;constructor(r){let a=T.usePointer(g=>c._api._PixelCollection_Create(r._instance,g)),e=c._api._PixelCollection_Dispose;super(a,e),this.image=r}static _create(r){return new Ct(r)}static _use(r,a){let e=new Ct(r);return fe._disposeAfterExecution(e,a)}static _map(r,a,e){let g=new Ct(r);try{g.use(0,0,r.width,r.height,a,p=>{e(p)})}finally{g.dispose()}}getArea(r,a,e,g){return T.usePointer(p=>{let f=c._api._PixelCollection_GetArea(this._instance,r,a,e,g,p),k=e*g*this.image.channelCount;return c._api.HEAPU8.subarray(f,f+k)})}getReadOnlyArea(r,a,e,g){return T.usePointer(p=>{let f=c._api._PixelCollection_GetReadOnlyArea(this.image._instance,r,a,e,g,p),k=e*g*this.image.channelCount;return c._api.HEAPU8.subarray(f,f+k)})}getChannelIndex(r){return this.image._channelOffset(r)}getColor(r,a){let e=this.getArea(r,a,1,1),g=Array.from(e),p=this.image._channelOffset(G.Index);if(p>=0&&g.splice(p,1),g.length===0)return null;if(g.length===1)return new M(g[0],g[0],g[0]);if(g.length===2)return new M(g[0],g[0],g[0],g[1]);let f=this.image._channelOffset(G.Black)>=0,k=this.image._channelOffset(G.Alpha)>=0;return f?g.length===4||!k?new M(g[0],g[1],g[2],g[3],Pe.max):new M(g[0],g[1],g[2],g[3],g[4]):g.length===3||!k?new M(g[0],g[1],g[2]):new M(g[0],g[1],g[2],g[3])}getPixel(r,a){return this.getArea(r,a,1,1)}setArea(r,a,e,g,p){T.usePointer(f=>{let k=p instanceof Uint8Array?p:new Uint8Array(p);Yo(k,C=>{c._api._PixelCollection_SetArea(this._instance,r,a,e,g,C,k.length,f)})})}setPixel(r,a,e){this.setArea(r,a,1,1,e)}toByteArray(r,a,e,g,p){return this.use(r,a,e,g,p,f=>{if(f===0)return null;let k=e*g*p.length;return c._api.HEAPU8.slice(f,f+k)})}use(r,a,e,g,p,f){return E(p,k=>T.use(C=>{let A=c._api._PixelCollection_ToByteArray(this._instance,r,a,e,g,k,C.ptr);return C.check(()=>{let U=f(A);return A=c._api._MagickMemory_Relinquish(A),U},()=>(A=c._api._MagickMemory_Relinquish(A),null))}))}},t_={Undefined:0,Average:1,Brightness:2,Lightness:3,MS:4,Rec601Luma:5,Rec601Luminance:6,Rec709Luma:7,Rec709Luminance:8,RMS:9},r_={Undefined:0,Average:1,Average9:2,Average16:3,Background:4,Bilinear:5,Blend:6,Catrom:7,Integer:8,Mesh:9,Nearest:10,Spline:11},vt=class _r{constructor(r,a,e){this.x=r,this.y=a,this.z=e}x;y;z;static _create(r){return r===0?new _r(0,0,0):new _r(c._api._PrimaryInfo_X_Get(r),c._api._PrimaryInfo_Y_Get(r),c._api._PrimaryInfo_Z_Get(r))}_use(r){let a=0;try{a=c._api._PrimaryInfo_Create(),c._api._PrimaryInfo_X_Set(a,this.x),c._api._PrimaryInfo_Y_Set(a,this.y),c._api._PrimaryInfo_Z_Set(a,this.z),r(a)}finally{c._api._PrimaryInfo_Dispose(a)}}},i_=class{channel;depth;entropy;kurtosis;maximum;mean;minimum;skewness;standardDeviation;constructor(_,r){this.channel=_,this.depth=c._api._ChannelStatistics_Depth_Get(r),this.entropy=c._api._ChannelStatistics_Entropy_Get(r),this.kurtosis=c._api._ChannelStatistics_Kurtosis_Get(r),this.maximum=c._api._ChannelStatistics_Maximum_Get(r),this.mean=c._api._ChannelStatistics_Mean_Get(r),this.minimum=c._api._ChannelStatistics_Minimum_Get(r),this.skewness=c._api._ChannelStatistics_Skewness_Get(r),this.standardDeviation=c._api._ChannelStatistics_StandardDeviation_Get(r)}},a_=class Ti{_channels=new Map;get channels(){return Array.from(this._channels.keys())}composite(){return this._channels.get(G.Composite)}getChannel(r){let a=this._channels.get(r);return a===void 0?null:a}static _create(r,a,e){let g=new Ti;return r.channels.forEach(p=>{e>>p&1&&g.addChannel(a,p)}),g.addChannel(a,G.Composite),g}addChannel(r,a){let e=c._api._Statistics_GetInstance(r,a);e!==0&&this._channels.set(a,new i_(a,e))}},n_=class{static toArray(_){if(_===0)return null;let r=c._api._StringInfo_Datum_Get(_),a=c._api._StringInfo_Length_Get(_);return c._api.HEAPU8.subarray(r,r+a)}},ai=class{constructor(_){this.error=_}error},Ne=class ue extends $e{_settings;_progress;_warning;constructor(r,a){super(r,c._api._MagickImage_Dispose),this._settings=a,this._settings._onArtifact=this.onSettingsArtifactChanged.bind(this)}get animationDelay(){return c._api._MagickImage_AnimationDelay_Get(this._instance)}set animationDelay(r){c._api._MagickImage_AnimationDelay_Set(this._instance,r)}get animationIterations(){return c._api._MagickImage_AnimationIterations_Get(this._instance)}set animationIterations(r){c._api._MagickImage_AnimationIterations_Set(this._instance,r)}get animationTicksPerSecond(){return c._api._MagickImage_AnimationTicksPerSecond_Get(this._instance)}set animationTicksPerSecond(r){c._api._MagickImage_AnimationTicksPerSecond_Set(this._instance,r)}get artifactNames(){let r=[];c._api._MagickImage_ResetArtifactIterator(this._instance);let a=c._api._MagickImage_GetNextArtifactName(this._instance);for(;a!==0;)r.push(c._api.UTF8ToString(a)),a=c._api._MagickImage_GetNextArtifactName(this._instance);return r}get attributeNames(){let r=[];c._api._MagickImage_ResetAttributeIterator(this._instance);let a=c._api._MagickImage_GetNextAttributeName(this._instance);for(;a!==0;)r.push(c._api.UTF8ToString(a)),a=c._api._MagickImage_GetNextAttributeName(this._instance);return r}get backgroundColor(){let r=c._api._MagickImage_BackgroundColor_Get(this._instance);return M._create(r)}set backgroundColor(r){r._use(a=>{c._api._MagickImage_BackgroundColor_Set(this._instance,a)})}get baseHeight(){return c._api._MagickImage_BaseHeight_Get(this._instance)}get baseWidth(){return c._api._MagickImage_BaseWidth_Get(this._instance)}get blackPointCompensation(){return c._api._MagickImage_BlackPointCompensation_Get(this._instance)===1}set blackPointCompensation(r){c._api._MagickImage_BlackPointCompensation_Set(this._instance,r?1:0)}get borderColor(){let r=c._api._MagickImage_BorderColor_Get(this._instance);return M._create(r)}set borderColor(r){r._use(a=>{c._api._MagickImage_BorderColor_Set(this._instance,a)})}get boundingBox(){return this.useExceptionPointer(r=>{let a=c._api._MagickImage_BoundingBox_Get(this._instance,r),e=oe._fromRectangle(a);return e.width===0||e.height===0?null:e})}get channelCount(){return c._api._MagickImage_ChannelCount_Get(this._instance)}get channels(){let r=[];return[G.Red,G.Green,G.Blue,G.Black,G.Alpha].forEach(a=>{c._api._MagickImage_HasChannel(this._instance,a)&&r.push(a)}),r}get chromaticity(){return new Ro(vt._create(c._api._MagickImage_ChromaRed_Get(this._instance)),vt._create(c._api._MagickImage_ChromaGreen_Get(this._instance)),vt._create(c._api._MagickImage_ChromaBlue_Get(this._instance)),vt._create(c._api._MagickImage_ChromaWhite_Get(this._instance)))}set chromaticity(r){r.blue._use(a=>c._api._MagickImage_ChromaBlue_Set(this._instance,a)),r.green._use(a=>c._api._MagickImage_ChromaGreen_Set(this._instance,a)),r.red._use(a=>c._api._MagickImage_ChromaRed_Set(this._instance,a)),r.white._use(a=>c._api._MagickImage_ChromaWhite_Set(this._instance,a))}get classType(){return c._api._MagickImage_ClassType_Get(this._instance)}set classType(r){this.useExceptionPointer(a=>{c._api._MagickImage_ClassType_Set(this._instance,r,a)})}get colorFuzz(){return re._fromQuantum(c._api._MagickImage_ColorFuzz_Get(this._instance))}set colorFuzz(r){let a=r._toQuantum();c._api._MagickImage_ColorFuzz_Set(this._instance,a),this._settings._colorFuzz=a}get colormapSize(){return c._api._MagickImage_ColormapSize_Get(this._instance)}set colormapSize(r){this.useExceptionPointer(a=>{c._api._MagickImage_ColormapSize_Set(this._instance,r,a)})}get colorSpace(){return c._api._MagickImage_ColorSpace_Get(this._instance)}set colorSpace(r){this.useExceptionPointer(a=>{c._api._MagickImage_ColorSpace_Set(this._instance,r,a)})}get colorType(){return this.settings.colorType===void 0?c._api._MagickImage_ColorType_Get(this._instance):this.settings.colorType}set colorType(r){this.useExceptionPointer(a=>{c._api._MagickImage_ColorType_Set(this._instance,r,a)})}get comment(){return this.getAttribute("comment")}set comment(r){r===null?this.removeAttribute("comment"):this.setAttribute("comment",r)}get compose(){return c._api._MagickImage_Compose_Get(this._instance)}set compose(r){c._api._MagickImage_Compose_Set(this._instance,r)}get compression(){return c._api._MagickImage_Compression_Get(this._instance)}get density(){return new pi(c._api._MagickImage_ResolutionX_Get(this._instance),c._api._MagickImage_ResolutionY_Get(this._instance),c._api._MagickImage_ResolutionUnits_Get(this._instance))}set density(r){c._api._MagickImage_ResolutionX_Set(this._instance,r.x),c._api._MagickImage_ResolutionY_Set(this._instance,r.y),c._api._MagickImage_ResolutionUnits_Set(this._instance,r.units)}get depth(){return c._api._MagickImage_Depth_Get(this._instance)}set depth(r){c._api._MagickImage_Depth_Set(this._instance,r)}get endian(){return c._api._MagickImage_Endian_Get(this._instance)}set endian(r){c._api._MagickImage_Endian_Set(this._instance,r)}get fileName(){let r=c._api._MagickImage_FileName_Get(this._instance);return r===0?null:c._api.UTF8ToString(r)}get filterType(){return c._api._MagickImage_FilterType_Get(this._instance)}set filterType(r){c._api._MagickImage_FilterType_Set(this._instance,r)}get format(){return se(c._api._MagickImage_Format_Get(this._instance),"")}set format(r){E(r.toString(),a=>c._api._MagickImage_Format_Set(this._instance,a))}get gamma(){return c._api._MagickImage_Gamma_Get(this._instance)}get gifDisposeMethod(){return c._api._MagickImage_GifDisposeMethod_Get(this._instance)}set gifDisposeMethod(r){c._api._MagickImage_GifDisposeMethod_Set(this._instance,r)}get hasAlpha(){return this.toBool(c._api._MagickImage_HasAlpha_Get(this._instance))}set hasAlpha(r){this.useExceptionPointer(a=>{r&&this.alpha(Go.Opaque),c._api._MagickImage_HasAlpha_Set(this._instance,this.fromBool(r),a)})}get height(){return c._api._MagickImage_Height_Get(this._instance)}get interlace(){return c._api._MagickImage_Interlace_Get(this._instance)}get isOpaque(){return this.useExceptionPointer(r=>this.toBool(c._api._MagickImage_IsOpaque_Get(this._instance,r)))}get interpolate(){return c._api._MagickImage_Interpolate_Get(this._instance)}set interpolate(r){c._api._MagickImage_Interpolate_Set(this._instance,r)}get label(){return this.getAttribute("label")}set label(r){r===null?this.removeAttribute("label"):this.setAttribute("label",r)}get matteColor(){let r=c._api._MagickImage_MatteColor_Get(this._instance);return M._create(r)}set matteColor(r){r._use(a=>{c._api._MagickImage_MatteColor_Set(this._instance,a)})}get metaChannelCount(){return c._api._MagickImage_MetaChannelCount_Get(this._instance)}set metaChannelCount(r){this.useExceptionPointer(a=>{c._api._MagickImage_MetaChannelCount_Set(this._instance,r,a)})}get orientation(){return c._api._MagickImage_Orientation_Get(this._instance)}set orientation(r){c._api._MagickImage_Orientation_Set(this._instance,r)}get onProgress(){return this._progress}set onProgress(r){r===void 0?this.disposeProgressDelegate():cr.setProgressDelegate(this),this._progress=r}get onWarning(){return this._warning}set onWarning(r){this._warning=r}get page(){let r=c._api._MagickImage_Page_Get(this._instance);return oe._fromRectangle(r)}set page(r){r._toRectangle(a=>{c._api._MagickImage_Page_Set(this._instance,a)})}get profileNames(){let r=[];c._api._MagickImage_ResetProfileIterator(this._instance);let a=c._api._MagickImage_GetNextProfileName(this._instance);for(;a!==0;)r.push(c._api.UTF8ToString(a)),a=c._api._MagickImage_GetNextProfileName(this._instance);return r}get quality(){return c._api._MagickImage_Quality_Get(this._instance)}set quality(r){let a=r<1?1:r;a=a>100?100:a,c._api._MagickImage_Quality_Set(this._instance,a),this._settings._quality=a}get renderingIntent(){return c._api._MagickImage_RenderingIntent_Get(this._instance)}set renderingIntent(r){c._api._MagickImage_RenderingIntent_Set(this._instance,r)}get settings(){return this._settings}get signature(){return this.useExceptionPointer(r=>se(c._api._MagickImage_Signature_Get(this._instance,r)))}get totalColors(){return this.useExceptionPointer(r=>c._api._MagickImage_TotalColors_Get(this._instance,r))}get virtualPixelMethod(){return c._api._MagickImage_VirtualPixelMethod_Get(this._instance)}set virtualPixelMethod(r){this.useExceptionPointer(a=>{c._api._MagickImage_VirtualPixelMethod_Set(this._instance,r,a)})}get width(){return c._api._MagickImage_Width_Get(this._instance)}adaptiveBlur(r,a){let e=this.valueOrDefault(r,0),g=this.valueOrDefault(a,1);this.useException(p=>{let f=c._api._MagickImage_AdaptiveBlur(this._instance,e,g,p.ptr);this._setInstance(f,p)})}adaptiveResize(r,a){let e=typeof r=="number"?new oe(0,0,r,a):r;this.useException(g=>{E(e.toString(),p=>{let f=c._api._MagickImage_AdaptiveResize(this._instance,p,g.ptr);this._setInstance(f,g)})})}adaptiveSharpen(r,a,e){let g=0,p=a??1,f=e??H.Undefined;r!==void 0&&(a===void 0?f=r:g=r),this.useException(k=>{let C=c._api._MagickImage_AdaptiveSharpen(this._instance,g,p,f,k.ptr);this._setInstance(C,k)})}adaptiveThreshold(r,a,e,g){let p=e instanceof re?e._toQuantum():0,f=g??H.Undefined;typeof e=="number"&&(f=e),this.useException(k=>{let C=c._api._MagickImage_AdaptiveThreshold(this._instance,r,a,p,f,k.ptr);this._setInstance(C,k)})}addNoise(r,a,e){let g=1,p=e??H.Undefined;a!==void 0&&(e===void 0?p=a:g=a),this.useException(f=>{let k=c._api._MagickImage_AddNoise(this._instance,r,g,p,f.ptr);this._setInstance(k,f)})}affineTransform(r){this.useException(a=>{let e=c._api._MagickImage_AffineTransform(this._instance,r.scaleX,r.scaleY,r.shearX,r.shearY,r.translateX,r.translateY,a.ptr);this._setInstance(e,a)})}alpha(r){this.useExceptionPointer(a=>{c._api._MagickImage_SetAlpha(this._instance,r,a)})}annotate(r,a,e,g){return this.useExceptionPointer(p=>this._settings._drawing._use(f=>{E(r,k=>{let C=null,A=K.Undefined,U=0;typeof a=="object"?(C=a.toString(),e!==void 0&&(A=e),g!==void 0&&(U=g)):(A=a,e!==void 0&&(U=e)),E(C,X=>{c._api._MagickImage_Annotate(this._instance,f._instance,k,X,A,U,p)})})}))}autoGamma(r){this.useExceptionPointer(a=>{let e=this.valueOrDefault(r,H.Composite);c._api._MagickImage_AutoGamma(this._instance,e,a)})}autoLevel(r){this.useExceptionPointer(a=>{let e=this.valueOrDefault(r,H.Undefined);c._api._MagickImage_AutoLevel(this._instance,e,a)})}autoOrient(){this.useException(r=>{let a=c._api._MagickImage_AutoOrient(this._instance,r.ptr);this._setInstance(a,r)})}autoThreshold(r){this.useException(a=>{c._api._MagickImage_AutoThreshold(this._instance,r,a.ptr)})}bilateralBlur(r,a,e,g){let p=this.valueOrComputedDefault(e,()=>Math.sqrt(r*r+a*a)),f=this.valueOrDefault(g,p*.25);this.useException(k=>{let C=c._api._MagickImage_BilateralBlur(this._instance,r,a,p,f,k.ptr);this._setInstance(C,k)})}blackThreshold(r,a){let e=this.valueOrDefault(a,H.Composite);this.useException(g=>{E(r.toString(),p=>{c._api._MagickImage_BlackThreshold(this._instance,p,e,g.ptr)})})}blueShift(r){let a=this.valueOrDefault(r,1.5);this.useException(e=>{let g=c._api._MagickImage_BlueShift(this._instance,a,e.ptr);this._setInstance(g,e)})}blur(r,a,e){let g=0,p=this.valueOrDefault(a,1),f=this.valueOrDefault(e,H.Undefined);r!==void 0&&(a===void 0?f=r:g=r),this.useException(k=>{let C=c._api._MagickImage_Blur(this._instance,g,p,f,k.ptr);this._setInstance(C,k)})}border(r,a){let e=new oe(0,0,r,this.valueOrDefault(a,r));this.useException(g=>{e._toRectangle(p=>{let f=c._api._MagickImage_Border(this._instance,p,g.ptr);this._setInstance(f,g)})})}brightnessContrast(r,a,e){let g=this.valueOrDefault(e,H.Undefined);this.useException(p=>{c._api._MagickImage_BrightnessContrast(this._instance,r.toDouble(),a.toDouble(),g,p.ptr)})}cannyEdge(r,a,e,g){let p=this.valueOrDefault(r,0),f=this.valueOrDefault(a,1),k=this.valueOrDefault(e,new re(10)).toDouble()/100,C=this.valueOrDefault(g,new re(30)).toDouble()/100;this.useException(A=>{let U=c._api._MagickImage_CannyEdge(this._instance,p,f,k,C,A.ptr);this._setInstance(U,A)})}charcoal(r,a){let e=r===void 0?0:r,g=a===void 0?1:a;this.useException(p=>{let f=c._api._MagickImage_Charcoal(this._instance,e,g,p.ptr);this._setInstance(f,p)})}chop(r){this.useException(a=>{r._toRectangle(e=>{let g=c._api._MagickImage_Chop(this._instance,e,a.ptr);this._setInstance(g,a)})})}chopHorizontal(r,a){this.chop(new oe(r,0,a,0))}chopVertical(r,a){this.chop(new oe(0,r,0,a))}clahe(r,a,e,g){this.useExceptionPointer(p=>{let f=r instanceof re?r.multiply(this.width):r,k=a instanceof re?a.multiply(this.height):a;c._api._MagickImage_Clahe(this._instance,f,k,e,g,p)})}clone(r){return ue._clone(this)._use(r)}cloneArea(r,a){return T.usePointer(e=>r._toRectangle(g=>e_._use(0,0,p=>{let f=c._api._MagickImage_CloneArea(this._instance,r.width,r.height,e);return c._api._MagickImage_CopyPixels(f,this._instance,g,p,H.Undefined,e),a(new ue(f,this._settings))})))}clut(r,a,e){let g=this.valueOrDefault(a,r_.Undefined),p=this.valueOrDefault(e,H.Undefined);this.useExceptionPointer(f=>{c._api._MagickImage_Clut(this._instance,r._instance,g,p,f)})}colorAlpha(r){if(!this.hasAlpha)return;let a=ue.create();a.read(r,this.width,this.height),a.composite(this,Zt.SrcOver,new Qe(0,0)),this._instance=a._instance}colorDecisionList(r){this.useExceptionPointer(a=>{E(r,e=>{c._api._MagickImage_ColorDecisionList(this._instance,e,a)})})}compare(r,a,e,g){let p=a instanceof zo,f=p?a.metric:a,k=e;g!==void 0&&(k=g);let C=H.Undefined;if(typeof k!="function")return k!==void 0&&(C=k),this.useExceptionPointer(U=>c._api._MagickImage_CompareDistortion(this._instance,r._instance,f,C,U));e!==void 0&&typeof e!="function"&&(C=e);let A=We.use(this,U=>(p&&a._setArtifacts(U),Xo.use(X=>{let be=this.useExceptionPointer(He=>c._api._MagickImage_Compare(this._instance,r._instance,f,C,X.ptr,He)),Ee=X.value,Ue=ue._createFromImage(be,this._settings);return Oo._create(Ee,Ue)})));return A.difference._use(()=>k(A))}composite(r,a,e,g,p){let f=0,k=0,C=Zt.In,A=H.All,U=null;a instanceof Qe?(f=a.x,k=a.y):a!==void 0&&(C=a),e instanceof Qe?(f=e.x,k=e.y):typeof e=="string"?U=e:e!==void 0&&(A=e),typeof g=="string"?U=g:g!==void 0&&(A=g),p!==void 0&&(A=p),U!==null&&this.setArtifact("compose:args",U),this.useExceptionPointer(X=>{c._api._MagickImage_Composite(this._instance,r._instance,f,k,C,A,X)}),U!==null&&this.removeArtifact("compose:args")}compositeGravity(r,a,e,g,p,f){let k=0,C=0,A=Zt.In,U=H.All,X=null;e instanceof Qe?(k=e.x,C=e.y):e!==void 0&&(A=e),g instanceof Qe?(k=g.x,C=g.y):typeof g=="string"?X=g:g!==void 0&&(U=g),typeof p=="string"?X=p:p!==void 0&&(U=p),f!==void 0&&(U=f),X!==null&&this.setArtifact("compose:args",X),this.useExceptionPointer(be=>{c._api._MagickImage_CompositeGravity(this._instance,r._instance,a,k,C,A,U,be)}),X!==null&&this.removeArtifact("compose:args")}connectedComponents(r){let a=typeof r=="number"?new Uo(r):r;return We.use(this,e=>(a._setArtifacts(e),this.useException(g=>ze.use(p=>{try{let f=c._api._MagickImage_ConnectedComponents(this._instance,a.connectivity,p.ptr,g.ptr);return this._setInstance(f,g),$o._create(p.value,this.colormapSize)}finally{p.value!==0&&c._api._ConnectedComponent_DisposeList(p.value)}}))))}contrast=()=>this.contrastPrivate(!0);contrastStretch(r,a,e){let g=this.width*this.height,p=r.multiply(g),f=0,k=this.valueOrDefault(e,H.Undefined);a instanceof re?f=g-a.multiply(g):(f=g-r.multiply(g),a!==void 0&&(k=a)),this.useExceptionPointer(C=>{c._api._MagickImage_ContrastStretch(this._instance,p,f,k,C)})}static create(r,a,e){let g=new ue(ue.createInstance(),new nr);return r!==void 0&&g.readOrPing(!1,r,a,e),g}crop(r,a,e){let g,p;typeof r=="number"?a!==void 0&&(g=new oe(r,a),p=this.valueOrDefault(e,K.Undefined)):(g=r,p=this.valueOrDefault(a,K.Undefined)),this.useException(f=>{E(g.toString(),k=>{let C=c._api._MagickImage_Crop(this._instance,k,p,f.ptr);this._setInstance(C,f)})})}cropToTiles(r,a,e){let g,p;return typeof r=="number"&&typeof a=="number"&&e!==void 0?(g=new oe(0,0,r,a),p=e):typeof r!="number"&&typeof a!="number"&&(g=r,p=a),this.useException(f=>E(g.toString(),k=>{let C=c._api._MagickImage_CropToTiles(this._instance,k,f.ptr);return or._createFromImages(C,this._settings,A=>p(A))}))}cycleColormap(r){this.useExceptionPointer(a=>{c._api._MagickImage_CycleColormap(this._instance,r,a)})}deskew(r,a){return We.use(this,e=>{a!==void 0&&e.setArtifact("deskew:auto-crop",a),this.useException(p=>{let f=c._api._MagickImage_Deskew(this._instance,r._toQuantum(),p.ptr);this._setInstance(f,p)});let g=Number(this.getArtifact("deskew:angle"));return isNaN(g)?0:g})}determineBitDepth(r){let a=this.valueOrDefault(r,H.Undefined);return this.useExceptionPointer(e=>c._api._MagickImage_DetermineBitDepth(this._instance,a,e))}distort(r,a){We.use(this,e=>{let g,p=0;typeof r=="number"?g=r:(g=r.method,p=r.bestFit?1:0,r._setArtifacts(e)),this.useException(f=>{Pt(a,k=>{let C=c._api._MagickImage_Distort(this._instance,g,p,k,a.length,f.ptr);this._setInstance(C,f)})})})}draw(...r){let a=r.flat();a.length!==0&&ki._use(this,e=>{e.draw(a)})}evaluate(r,a,e,g){if(typeof a=="number"){let p=a,f=typeof e=="number"?e:e._toQuantum();this.useExceptionPointer(k=>{c._api._MagickImage_EvaluateOperator(this._instance,r,p,f,k)})}else if(g!==void 0){if(typeof e!="number")throw new N("this should not happen");let p=a,f=e,k=typeof g=="number"?g:g._toQuantum();if(p.isPercentage)throw new N("percentage is not supported");this.useExceptionPointer(C=>{Zo.use(this,p,A=>{c._api._MagickImage_EvaluateGeometry(this._instance,r,A,f,k,C)})})}}extent(r,a,e){let g=K.Undefined,p;typeof r=="number"?typeof a=="number"&&(p=new oe(r,a)):p=r,typeof a=="number"?g=a:a!==void 0&&(this.backgroundColor=a),typeof e=="number"?g=e:e!==void 0&&(this.backgroundColor=e),this.useException(f=>{E(p.toString(),k=>{let C=c._api._MagickImage_Extent(this._instance,k,g,f.ptr);this._setInstance(C,f)})})}flip(){this.useException(r=>{let a=c._api._MagickImage_Flip(this._instance,r.ptr);this._setInstance(a,r)})}floodFill(r,a,e,g){this.floodFillPrivate(r,a,e,g,!1)}flop(){this.useException(r=>{let a=c._api._MagickImage_Flop(this._instance,r.ptr);this._setInstance(a,r)})}formatExpression(r){return this.useExceptionPointer(a=>this._settings._use(e=>E(r,g=>{let p=c._api._MagickImage_FormatExpression(this._instance,e._instance,g,a);return No(c._api,p)})))}gammaCorrect(r,a){let e=this.valueOrDefault(a,H.Undefined);this.useExceptionPointer(g=>{c._api._MagickImage_GammaCorrect(this._instance,r,e,g)})}gaussianBlur(r,a,e){let g=this.valueOrDefault(a,1),p=this.valueOrDefault(e,H.Undefined);this.useException(f=>{let k=c._api._MagickImage_GaussianBlur(this._instance,r,g,p,f.ptr);this._setInstance(k,f)})}getArtifact(r){return E(r,a=>se(c._api._MagickImage_GetArtifact(this._instance,a)))}getAttribute(r){return this.useException(a=>E(r,e=>se(c._api._MagickImage_GetAttribute(this._instance,e,a.ptr))))}getColormapColor(r){let a=c._api._MagickImage_GetColormapColor(this._instance,r);return a===0?null:M._create(a)}getColorProfile(){for(let r of["icc","icm"]){let a=this.getProfilePrivate(r);if(a!==null)return new Bo(a)}return null}getPixels(r){if(this._settings._ping)throw new N("image contains no pixel data");return ii._use(this,r)}getProfile(r){let a=this.getProfilePrivate(r);return a===null?null:new ci(r,a)}getWriteMask(r){let a=this.useExceptionPointer(g=>c._api._MagickImage_GetWriteMask(this._instance,g)),e=a===0?null:new ue(a,new nr);return e==null?r(e):e._use(r)}grayscale(r=t_.Undefined){this.useExceptionPointer(a=>{c._api._MagickImage_Grayscale(this._instance,r,a)})}hasProfile(r){return E(r,a=>this.toBool(c._api._MagickImage_HasProfile(this._instance,a)))}histogram(){let r=new Map;return this.useExceptionPointer(a=>{ze.use(e=>{let g=c._api._MagickImage_Histogram(this._instance,e.ptr,a);if(g!==0){let p=e.value;for(let f=0;f<p;f++){let k=c._api._MagickColorCollection_GetInstance(g,f),C=M._create(k),A=c._api._MagickColor_Count_Get(k);r.set(C.toString(),A)}c._api._MagickColorCollection_DisposeList(g)}})}),r}inverseContrast=()=>this.contrastPrivate(!1);inverseFloodFill(r,a,e,g){this.floodFillPrivate(r,a,e,g,!0)}inverseLevel(r,a,e,g){let p=this.valueOrDefault(e,1),f=this.valueOrDefault(g,H.Composite);this.useExceptionPointer(k=>{c._api._MagickImage_InverseLevel(this._instance,r.toDouble(),a._toQuantum(),p,f,k)})}inverseOpaque=(r,a)=>this.opaquePrivate(r,a,!0);inverseSigmoidalContrast(r,a,e){this.sigmoidalContrastPrivate(!1,r,a,e)}inverseTransparent=r=>this.transparentPrivate(r,!0);level(r,a,e,g){let p=this.valueOrDefault(e,1),f=this.valueOrDefault(g,H.Composite);this.useExceptionPointer(k=>{c._api._MagickImage_Level(this._instance,r.toDouble(),a._toQuantum(),p,f,k)})}linearStretch(r,a){this.useExceptionPointer(e=>{c._api._MagickImage_LinearStretch(this._instance,r.toDouble(),a._toQuantum(),e)})}liquidRescale(r,a){let e=typeof r=="number"?new oe(r,a):r;this.useException(g=>{E(e.toString(),p=>{let f=c._api._MagickImage_LiquidRescale(this._instance,p,e.x,e.y,g.ptr);this._setInstance(f,g)})})}negate(r){this.useExceptionPointer(a=>{let e=this.valueOrDefault(r,H.Undefined);c._api._MagickImage_Negate(this._instance,0,e,a)})}negateGrayScale(r){this.useExceptionPointer(a=>{let e=this.valueOrDefault(r,H.Undefined);c._api._MagickImage_Negate(this._instance,1,e,a)})}normalize(){this.useExceptionPointer(r=>{c._api._MagickImage_Normalize(this._instance,r)})}modulate(r,a,e){let g=this.valueOrDefault(a,new re(100)),p=this.valueOrDefault(e,new re(100));this.useExceptionPointer(f=>{E(`${r.toDouble()}/${g.toDouble()}/${p.toDouble()}`,k=>{c._api._MagickImage_Modulate(this._instance,k,f)})})}morphology(r){this.useException(a=>{E(r.kernel,e=>{let g=c._api._MagickImage_Morphology(this._instance,r.method,e,r.channels,r.iterations,a.ptr);this._setInstance(g,a)})})}motionBlur(r,a,e){this.useException(g=>{let p=c._api._MagickImage_MotionBlur(this._instance,r,a,e,g.ptr);this._setInstance(p,g)})}oilPaint(r){let a=this.valueOrDefault(r,3);this.useException(e=>{let g=c._api._MagickImage_OilPaint(this._instance,a,0,e.ptr);this._setInstance(g,e)})}opaque=(r,a)=>this.opaquePrivate(r,a,!1);ping(r,a){this.readOrPing(!0,r,a)}perceptualHash(r){let a=this.valueOrDefault(r,er._defaultColorspaces());return er._validateColorSpaces(a),We.use(this,e=>{let g=a.map(p=>Zr[p]).join(",");return e.setArtifact("phash:colorspaces",g),this.useExceptionPointer(p=>{let f=c._api._MagickImage_PerceptualHash(this._instance,p);try{return er._create(this,a,f)}finally{c._api._PerceptualHash_DisposeList(f)}})})}quantize(r){let a=this.valueOrDefault(r,new sr);return this.useException(e=>{a._use(g=>{c._api._MagickImage_Quantize(this._instance,g._instance,e.ptr)})}),a.measureErrors?vi._create(this):null}read(r,a,e){this.readOrPing(!1,r,a,e)}readFromCanvas(r,a){let e=r.getContext("2d",a);if(e===null)return;let g=e.getImageData(0,0,r.width,r.height),p=new ve;p.format=De.Rgba,p.width=r.width,p.height=r.height,this.useException(f=>{this.readFromArray(g.data,p,f)})}removeArtifact(r){E(r,a=>{c._api._MagickImage_RemoveArtifact(this._instance,a)})}removeAttribute(r){E(r,a=>{c._api._MagickImage_RemoveAttribute(this._instance,a)})}removeProfile(r){E(typeof r=="string"?r:r.name,a=>{c._api._MagickImage_RemoveProfile(this._instance,a)})}removeWriteMask(){this.useExceptionPointer(r=>{c._api._MagickImage_SetWriteMask(this._instance,0,r)})}resetPage(){this.page=new oe(0,0,0,0)}resize(r,a,e){let g=this.filterType,p;typeof r=="number"?(p=new oe(r,a),e!==void 0&&(g=e)):(p=r,a!==void 0&&(g=a)),this.useException(f=>{E(p.toString(),k=>{let C=c._api._MagickImage_Resize(this._instance,k,g,f.ptr);this._setInstance(C,f)})})}roll(r,a){this.useException(e=>{let g=c._api._MagickImage_Roll(this._instance,r,a,e.ptr);this._setInstance(g,e)})}rotate(r){this.useException(a=>{let e=c._api._MagickImage_Rotate(this._instance,r,a.ptr);this._setInstance(e,a)})}separate(r,a){return this.useException(e=>{let g,p=H.Undefined;if(typeof r=="number"&&a!==void 0)p=r,g=a;else if(typeof r=="function")g=r;else throw new N("invalid arguments");let f=c._api._MagickImage_Separate(this._instance,p,e.ptr);return or._createFromImages(f,this._settings,k=>g(k))})}sepiaTone(r=new re(80)){this.useException(a=>{let e=typeof r=="number"?new re(r):r,g=c._api._MagickImage_SepiaTone(this._instance,e._toQuantum(),a.ptr);this._setInstance(g,a)})}setArtifact(r,a){let e;e=typeof a=="string"?a:typeof a=="boolean"?this.fromBool(a).toString():a.toString(),E(r,g=>{E(e,p=>{c._api._MagickImage_SetArtifact(this._instance,g,p)})})}setAttribute(r,a){this.useException(e=>{E(r,g=>{E(a,p=>{c._api._MagickImage_SetAttribute(this._instance,g,p,e.ptr)})})})}setCompression(r){c._api._MagickImage_Compression_Set(this._instance,r)}setProfile(r,a){let e=typeof r=="string"?r:r.name,g;a===void 0?typeof r!="string"&&(g=r.data):g=a,this.useException(p=>{E(e,f=>{ti(g,k=>{c._api._MagickImage_SetProfile(this._instance,f,k,g.byteLength,p.ptr)})})})}setWriteMask(r){this.useExceptionPointer(a=>{c._api._MagickImage_SetWriteMask(this._instance,r._instance,a)})}sharpen(r,a,e){let g=this.valueOrDefault(r,0),p=this.valueOrDefault(a,1),f=this.valueOrDefault(e,H.Undefined);this.useException(k=>{let C=c._api._MagickImage_Sharpen(this._instance,g,p,f,k.ptr);this._setInstance(C,k)})}shave(r,a){this.useException(e=>{let g=c._api._MagickImage_Shave(this._instance,r,a,e.ptr);this._setInstance(g,e)})}sigmoidalContrast(r,a,e){this.sigmoidalContrastPrivate(!0,r,a,e)}solarize(r=new re(50)){this.useException(a=>{let e=typeof r=="number"?new re(r):r;c._api._MagickImage_Solarize(this._instance,e._toQuantum(),a.ptr)})}splice(r,a){let e=this.valueOrDefault(a,K.Undefined);E(r.toString(),g=>{this.useException(p=>{let f=c._api._MagickImage_Splice(this._instance,g,e,p.ptr);this._setInstance(f,p)})})}statistics(r){let a=this.valueOrDefault(r,H.All);return this.useExceptionPointer(e=>{let g=c._api._MagickImage_Statistics(this._instance,a,e),p=a_._create(this,g,a);return c._api._Statistics_DisposeList(g),p})}strip(){this.useExceptionPointer(r=>{c._api._MagickImage_Strip(this._instance,r)})}transformColorSpace(r,a,e){let g=r,p,f=ei.Quantum;a!==void 0&&(typeof a=="number"?f=a:p=a),e!==void 0&&(f=e);let k=this.hasProfile("icc")||this.hasProfile("icm");if(p===void 0){if(!k)return!1;p=g}else{if(g.colorSpace!==this.colorSpace)return!1;k||this.setProfile(g)}return f===ei.Quantum?We.use(this,C=>{C.setArtifact("profile:highres-transform",!1),this.setProfile(p)}):this.setProfile(p),!0}threshold(r,a){let e=this.valueOrDefault(a,H.Undefined);this.useExceptionPointer(g=>{c._api._MagickImage_Threshold(this._instance,r._toQuantum(),e,g)})}thumbnail(r,a){let e=typeof r=="number"?new oe(r,a):r;this.useException(g=>{E(e.toString(),p=>{let f=c._api._MagickImage_Thumbnail(this._instance,p,g.ptr);this._setInstance(f,g)})})}toString=()=>`${this.format} ${this.width}x${this.height} ${this.depth}-bit ${Zr[this.colorSpace]}`;transparent(r){r._use(a=>{this.useExceptionPointer(e=>{c._api._MagickImage_Transparent(this._instance,a,0,e)})})}trim(...r){if(r.length>0)if(r.length==1&&r[0]instanceof re){let a=r[0];this.setArtifact("trim:percent-background",a.toDouble().toString())}else{let a=r,e=[...new Set(jo(a))].join(",");this.setArtifact("trim:edges",e)}this.useException(a=>{let e=c._api._MagickImage_Trim(this._instance,a.ptr);this._setInstance(e,a),this.removeArtifact("trim:edges"),this.removeArtifact("trim:percent-background")})}wave(r,a,e){let g=this.valueOrDefault(r,this.interpolate),p=this.valueOrDefault(a,25),f=this.valueOrDefault(e,150);this.useException(k=>{let C=c._api._MagickImage_Wave(this._instance,g,p,f,k.ptr);this._setInstance(C,k)})}vignette(r,a,e,g){let p=this.valueOrDefault(r,0),f=this.valueOrDefault(a,1),k=this.valueOrDefault(e,0),C=this.valueOrDefault(g,0);this.useException(A=>{let U=c._api._MagickImage_Vignette(this._instance,p,f,k,C,A.ptr);this._setInstance(U,A)})}whiteThreshold(r,a){let e=this.valueOrDefault(a,H.Composite);this.useException(g=>{E(r.toString(),p=>{c._api._MagickImage_WhiteThreshold(this._instance,p,e,g.ptr)})})}write(r,a){let e=0,g=0;a===void 0?a=r:this._settings.format=r,this.useException(f=>{ze.use(k=>{this._settings._use(C=>{try{e=c._api._MagickImage_WriteBlob(this._instance,C._instance,k.ptr,f.ptr),g=k.value}catch(A){throw e!==0&&(e=c._api._MagickMemory_Relinquish(e)),A}})})});let p=new di(e,g,a);return fe._disposeAfterExecution(p,p.func)}writeToCanvas(r,a){r.width=this.width,r.height=this.height;let e=r.getContext("2d",a);e!==null&&ii._map(this,"RGBA",g=>{let p=e.createImageData(this.width,this.height),f=0;for(let k=0;k<this.height;k++)for(let C=0;C<this.width;C++)p.data[f++]=c._api.HEAPU8[g++],p.data[f++]=c._api.HEAPU8[g++],p.data[f++]=c._api.HEAPU8[g++],p.data[f++]=c._api.HEAPU8[g++];e.putImageData(p,0,0)})}static _createFromImage(r,a){return new ue(r,a)}_channelOffset(r){return c._api._MagickImage_HasChannel(this._instance,r)?c._api._MagickImage_ChannelOffset(this._instance,r):-1}static _clone(r){return T.usePointer(a=>new ue(c._api._MagickImage_Clone(r._instance,a),r._settings._clone()))}_getSettings(){return this._settings}_instanceNotInitialized(){throw new N("no image has been read")}_setInstance(r,a){if(super._setInstance(r,a)===!0||r===0&&this.onProgress!==void 0)return!0;throw new N("out of memory")}_use(r){return fe._disposeAfterExecution(this,r)}static _create(r){return ue.create()._use(r)}onDispose(){this.disposeProgressDelegate()}contrastPrivate(r){this.useExceptionPointer(a=>{c._api._MagickImage_Contrast(this._instance,this.fromBool(r),a)})}static createInstance(){return T.usePointer(r=>c._api._MagickImage_Create(0,r))}disposeProgressDelegate(){cr.removeProgressDelegate(this),this._progress=void 0}floodFillPrivate(r,a,e,g,p){let f=g;f===void 0&&this.getPixels(k=>{let C=k.getColor(a,e);C!==null&&(f=C)}),typeof r=="number"&&f!==void 0&&(f.a=r),this.settings._drawing._use(k=>{r instanceof M?(k.setFillColor(r),k.setFillPattern()):r instanceof ue&&(k.setFillColor(),k.setFillPattern(r)),this.useExceptionPointer(C=>{f===void 0?c._api._MagickImage_FloodFill(this._instance,k._instance,a,e,0,this.fromBool(p),C):f._use(A=>{c._api._MagickImage_FloodFill(this._instance,k._instance,a,e,A,this.fromBool(p),C)})})})}fromBool(r){return r?1:0}getProfilePrivate(r){return E(r,a=>{let e=c._api._MagickImage_GetProfile(this._instance,a),g=n_.toArray(e);return g===null?null:g})}onSettingsArtifactChanged(r,a){a===void 0?this.removeArtifact(r):this.setArtifact(r,a)}opaquePrivate(r,a,e){this.useExceptionPointer(g=>{r._use(p=>{a._use(f=>{c._api._MagickImage_Opaque(this._instance,p,f,this.fromBool(e),g)})})})}readOrPing(r,a,e,g){this.useException(p=>{let f=e instanceof ve?e:new ve(this._settings);if(f._ping=r,this._settings._ping=r,f.frameCount!==void 0&&f.frameCount>1)throw new N("The frame count can only be set to 1 when a single image is being read.");if(typeof a=="string")f._fileName=a;else if(si(a)){this.readFromArray(a,f,p);return}else f._fileName="xc:"+a.toShortString(),f.width=typeof e=="number"?e:0,f.height=typeof g=="number"?g:0;f._use(k=>{let C=c._api._MagickImage_ReadFile(k._instance,p.ptr);this._setInstance(C,p)})})}readFromArray(r,a,e){a._use(g=>{ti(r,p=>{let f=c._api._MagickImage_ReadBlob(g._instance,p,0,r.byteLength,e.ptr);this._setInstance(f,e)})})}sigmoidalContrastPrivate(r,a,e,g){let p;p=e===void 0?Pe.max*.5:typeof e=="number"?e:e.multiply(Pe.max);let f=this.valueOrDefault(g,H.Undefined);this.useExceptionPointer(k=>{c._api._MagickImage_SigmoidalContrast(this._instance,this.fromBool(r),a,p,f,k)})}toBool(r){return r===1}transparentPrivate(r,a){r._use(e=>{this.useExceptionPointer(g=>{c._api._MagickImage_Transparent(this._instance,e,this.fromBool(a),g)})})}valueOrDefault(r,a){return r===void 0?a:r}valueOrComputedDefault(r,a){return r===void 0?a():r}useException(r){return T.use(r,a=>{this.onWarning!==void 0&&this.onWarning(new ai(a))})}useExceptionPointer(r){return T.usePointer(r,a=>{this.onWarning!==void 0&&this.onWarning(new ai(a))})}},s_=(()=>{var _=import.meta.url;return(async function(r={}){var a,e=r,g,p,f=new Promise((t,i)=>{g=t,p=i}),k=typeof window=="object",C=typeof WorkerGlobalScope<"u";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type,(!globalThis.crypto||!globalThis.crypto.getRandomValues)&&(globalThis.crypto={getRandomValues:t=>{for(let i=0;i<t.length;i++)t[i]=Math.random()*256|0}});var A="./this.program",U=(t,i)=>{throw i},X="";function be(t){return e.locateFile?e.locateFile(t,X):X+t}var Ee,Ue;(k||C)&&(C?X=self.location.href:typeof document<"u"&&document.currentScript&&(X=document.currentScript.src),_&&(X=_),X=X.startsWith("blob:")?"":X.slice(0,X.replace(/[?#].*/,"").lastIndexOf("/")+1),C&&(Ue=t=>{var i=new XMLHttpRequest;return i.open("GET",t,!1),i.responseType="arraybuffer",i.send(null),new Uint8Array(i.response)}),Ee=async t=>{if(hr(t))return new Promise((n,o)=>{var l=new XMLHttpRequest;l.open("GET",t,!0),l.responseType="arraybuffer",l.onload=()=>{if(l.status==200||l.status==0&&l.response){n(l.response);return}o(l.status)},l.onerror=o,l.send(null)});var i=await fetch(t,{credentials:"same-origin"});if(i.ok)return i.arrayBuffer();throw Error(i.status+" : "+i.url)});var He=console.log.bind(console),Se=console.error.bind(console),Je,st,bt=!1,j,ae,_e,Ze,P,F,ot,ne,gr,_t,hr=t=>t.startsWith("file://");function ur(){var t=st.buffer;j=new Int8Array(t),_e=new Int16Array(t),e.HEAPU8=ae=new Uint8Array(t),Ze=new Uint16Array(t),P=new Int32Array(t),F=new Uint32Array(t),ot=new Float32Array(t),_t=new Float64Array(t),ne=new BigInt64Array(t),gr=new BigUint64Array(t)}function xi(){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)Hi(e.preRun.shift());dr(fr)}function Gi(){!e.noFSInit&&!h.initialized&&h.init(),s.hb(),h.ignorePermissions=!1}function Ri(){if(e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;)Ui(e.postRun.shift());dr(mr)}var Te=0,et=null;function pr(t){Te++,e.monitorRunDependencies?.(Te)}function Et(t){if(Te--,e.monitorRunDependencies?.(Te),Te==0&&et){var i=et;et=null,i()}}function tt(t){e.onAbort?.(t),t="Aborted("+t+")",Se(t),bt=!0,t+=". Build with -sASSERTIONS for more info.";var i=new WebAssembly.RuntimeError(t);throw p(i),i}var Tt;function Fi(){return e.locateFile?be("magick.wasm"):new URL("data:text/plain;base64,").href}function Li(t){if(t==Tt&&Je)return new Uint8Array(Je);if(Ue)return Ue(t);throw"both async and sync fetching of the wasm failed"}async function Wi(t){if(!Je)try{var i=await Ee(t);return new Uint8Array(i)}catch{}return Li(t)}async function Bi(t,i){try{var n=await Wi(t);return await WebAssembly.instantiate(n,i)}catch(o){Se(`failed to asynchronously prepare wasm: ${o}`),tt(o)}}async function Oi(t,i,n){if(!t&&typeof WebAssembly.instantiateStreaming=="function"&&!hr(i))try{var o=fetch(i,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(o,n)}catch(l){Se(`wasm streaming compile failed: ${l}`),Se("falling back to ArrayBuffer instantiation")}return Bi(i,n)}function zi(){return{a:As}}async function Ni(){function t(o,l){return s=o.exports,s=yo(s),st=s.gb,ur(),Ae=s.Bb,Et(),s}pr();function i(o){return t(o.instance)}var n=zi();if(e.instantiateWasm)return new Promise((o,l)=>{e.instantiateWasm(n,(u,d)=>{o(t(u))})});Tt??=Fi();try{return i(await Oi(Je,Tt,n))}catch(o){return p(o),Promise.reject(o)}}class $i{name="ExitStatus";constructor(i){this.message=`Program terminated with exit(${i})`,this.status=i}}var dr=t=>{for(;t.length>0;)t.shift()(e)},mr=[],Ui=t=>mr.push(t),fr=[],Hi=t=>fr.push(t);function Yi(t,i="i8"){switch(i.endsWith("*")&&(i="*"),i){case"i1":return j[t>>>0];case"i8":return j[t>>>0];case"i16":return _e[t>>>1>>>0];case"i32":return P[t>>>2>>>0];case"i64":return ne[t>>>3];case"float":return ot[t>>>2>>>0];case"double":return _t[t>>>3>>>0];case"*":return F[t>>>2>>>0];default:tt(`invalid type for getValue: ${i}`)}}var At=!0;function Xi(t,i,n="i8"){switch(n.endsWith("*")&&(n="*"),n){case"i1":j[t>>>0]=i;break;case"i8":j[t>>>0]=i;break;case"i16":_e[t>>>1>>>0]=i;break;case"i32":P[t>>>2>>>0]=i;break;case"i64":ne[t>>>3]=BigInt(i);break;case"float":ot[t>>>2>>>0]=i;break;case"double":_t[t>>>3>>>0]=i;break;case"*":F[t>>>2>>>0]=i;break;default:tt(`invalid type for setValue: ${n}`)}}var O=t=>Fs(t),z=()=>Ls(),ji=9007199254740992,Vi=-9007199254740992,ke=t=>t<Vi||t>ji?NaN:Number(t),xt=[],Ae,W=t=>{var i=xt[t];return i||(xt[t]=i=Ae.get(t)),i};function qi(t,i){return t>>>=0,W(t)(i)}var wr=[],kr=0;function Ki(t){t>>>=0;var i=new Gt(t);return i.get_caught()||(i.set_caught(!0),kr--),i.set_rethrown(!1),wr.push(i),Bs(t),zs(t)}var Ye=0,Qi=()=>{B(0,0),Ws(wr.pop().excPtr),Ye=0};class Gt{constructor(i){this.excPtr=i,this.ptr=i-24}set_type(i){F[this.ptr+4>>>2>>>0]=i}get_type(){return F[this.ptr+4>>>2>>>0]}set_destructor(i){F[this.ptr+8>>>2>>>0]=i}get_destructor(){return F[this.ptr+8>>>2>>>0]}set_caught(i){i=i?1:0,j[this.ptr+12>>>0]=i}get_caught(){return j[this.ptr+12>>>0]!=0}set_rethrown(i){i=i?1:0,j[this.ptr+13>>>0]=i}get_rethrown(){return j[this.ptr+13>>>0]!=0}init(i,n){this.set_adjusted_ptr(0),this.set_type(i),this.set_destructor(n)}set_adjusted_ptr(i){F[this.ptr+16>>>2>>>0]=i}get_adjusted_ptr(){return F[this.ptr+16>>>2>>>0]}}var ct=t=>Rs(t),Mr=t=>{var i=Ye;if(!i)return ct(0),0;var n=new Gt(i);n.set_adjusted_ptr(i);var o=n.get_type();if(!o)return ct(0),i;for(var l of t){if(l===0||l===o)break;if(Os(l,o,n.ptr+16))return ct(l),i}return ct(o),i};function Ji(){return Mr([])}function Zi(t){return t>>>=0,Mr([t])}function ea(t,i,n){throw t>>>=0,i>>>=0,n>>>=0,new Gt(t).init(i,n),Ye=t,kr++,Ye}function ta(t){throw t>>>=0,Ye||=t,Ye}var Y={isAbs:t=>t.charAt(0)==="/",splitPath:t=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1),normalizeArray:(t,i)=>{for(var n=0,o=t.length-1;o>=0;o--){var l=t[o];l==="."?t.splice(o,1):l===".."?(t.splice(o,1),n++):n&&(t.splice(o,1),n--)}if(i)for(;n;n--)t.unshift("..");return t},normalize:t=>{var i=Y.isAbs(t),n=t.slice(-1)==="/";return t=Y.normalizeArray(t.split("/").filter(o=>!!o),!i).join("/"),!t&&!i&&(t="."),t&&n&&(t+="/"),(i?"/":"")+t},dirname:t=>{var i=Y.splitPath(t),n=i[0],o=i[1];return!n&&!o?".":(o&&=o.slice(0,-1),n+o)},basename:t=>t&&t.match(/([^\/]+|\/)\/*$/)[1],join:(...t)=>Y.normalize(t.join("/")),join2:(t,i)=>Y.normalize(t+"/"+i)},ra=()=>t=>crypto.getRandomValues(t),Rt=t=>{(Rt=ra())(t)},Xe={resolve:(...t)=>{for(var i="",n=!1,o=t.length-1;o>=-1&&!n;o--){var l=o>=0?t[o]:h.cwd();if(typeof l!="string")throw TypeError("Arguments to path.resolve must be strings");if(!l)return"";i=l+"/"+i,n=Y.isAbs(l)}return i=Y.normalizeArray(i.split("/").filter(u=>!!u),!n).join("/"),(n?"/":"")+i||"."},relative:(t,i)=>{t=Xe.resolve(t).slice(1),i=Xe.resolve(i).slice(1);function n(y){for(var S=0;S<y.length&&y[S]==="";S++);for(var v=y.length-1;v>=0&&y[v]==="";v--);return S>v?[]:y.slice(S,v-S+1)}for(var o=n(t.split("/")),l=n(i.split("/")),u=Math.min(o.length,l.length),d=u,m=0;m<u;m++)if(o[m]!==l[m]){d=m;break}for(var w=[],m=d;m<o.length;m++)w.push("..");return w=w.concat(l.slice(d)),w.join("/")}},yr=typeof TextDecoder<"u"?new TextDecoder:void 0,je=(t,i=0,n=NaN)=>{i>>>=0;for(var o=i+n,l=i;t[l]&&!(l>=o);)++l;if(l-i>16&&t.buffer&&yr)return yr.decode(t.subarray(i,l));for(var u="";i<l;){var d=t[i++];if(!(d&128)){u+=String.fromCharCode(d);continue}var m=t[i++]&63;if((d&224)==192){u+=String.fromCharCode((d&31)<<6|m);continue}var w=t[i++]&63;if(d=(d&240)==224?(d&15)<<12|m<<6|w:(d&7)<<18|m<<12|w<<6|t[i++]&63,d<65536)u+=String.fromCharCode(d);else{var y=d-65536;u+=String.fromCharCode(55296|y>>10,56320|y&1023)}}return u},Ft=[],xe=t=>{for(var i=0,n=0;n<t.length;++n){var o=t.charCodeAt(n);o<=127?i++:o<=2047?i+=2:o>=55296&&o<=57343?(i+=4,++n):i+=3}return i},Lt=(t,i,n,o)=>{if(n>>>=0,!(o>0))return 0;for(var l=n,u=n+o-1,d=0;d<t.length;++d){var m=t.charCodeAt(d);if(m>=55296&&m<=57343){var w=t.charCodeAt(++d);m=65536+((m&1023)<<10)|w&1023}if(m<=127){if(n>=u)break;i[n++>>>0]=m}else if(m<=2047){if(n+1>=u)break;i[n++>>>0]=192|m>>6,i[n++>>>0]=128|m&63}else if(m<=65535){if(n+2>=u)break;i[n++>>>0]=224|m>>12,i[n++>>>0]=128|m>>6&63,i[n++>>>0]=128|m&63}else{if(n+3>=u)break;i[n++>>>0]=240|m>>18,i[n++>>>0]=128|m>>12&63,i[n++>>>0]=128|m>>6&63,i[n++>>>0]=128|m&63}}return i[n>>>0]=0,n-l},vr=(t,i,n)=>{var o=xe(t)+1,l=Array(o),u=Lt(t,l,0,l.length);return l.length=u,l},ia=()=>{if(!Ft.length){var t=null;if(typeof window<"u"&&typeof window.prompt=="function"&&(t=window.prompt("Input: "),t!==null&&(t+=`
43
+ `)),!t)return null;Ft=vr(t)}return Ft.shift()},Ge={ttys:[],init(){},shutdown(){},register(t,i){Ge.ttys[t]={input:[],output:[],ops:i},h.registerDevice(t,Ge.stream_ops)},stream_ops:{open(t){var i=Ge.ttys[t.node.rdev];if(!i)throw new h.ErrnoError(43);t.tty=i,t.seekable=!1},close(t){t.tty.ops.fsync(t.tty)},fsync(t){t.tty.ops.fsync(t.tty)},read(t,i,n,o,l){if(!t.tty||!t.tty.ops.get_char)throw new h.ErrnoError(60);for(var u=0,d=0;d<o;d++){var m;try{m=t.tty.ops.get_char(t.tty)}catch{throw new h.ErrnoError(29)}if(m===void 0&&u===0)throw new h.ErrnoError(6);if(m==null)break;u++,i[n+d]=m}return u&&(t.node.atime=Date.now()),u},write(t,i,n,o,l){if(!t.tty||!t.tty.ops.put_char)throw new h.ErrnoError(60);try{for(var u=0;u<o;u++)t.tty.ops.put_char(t.tty,i[n+u])}catch{throw new h.ErrnoError(29)}return o&&(t.node.mtime=t.node.ctime=Date.now()),u}},default_tty_ops:{get_char(t){return ia()},put_char(t,i){i===null||i===10?(He(je(t.output)),t.output=[]):i!=0&&t.output.push(i)},fsync(t){t.output?.length>0&&(He(je(t.output)),t.output=[])},ioctl_tcgets(t){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(t,i,n){return 0},ioctl_tiocgwinsz(t){return[24,80]}},default_tty1_ops:{put_char(t,i){i===null||i===10?(Se(je(t.output)),t.output=[]):i!=0&&t.output.push(i)},fsync(t){t.output?.length>0&&(Se(je(t.output)),t.output=[])}}},aa=(t,i)=>ae.fill(0,t,t+i),Sr=(t,i)=>Math.ceil(t/i)*i,Cr=t=>{t=Sr(t,65536);var i=Gs(65536,t);return i&&aa(i,t),i},R={ops_table:null,mount(t){return R.createNode(null,"/",16895,0)},createNode(t,i,n,o){if(h.isBlkdev(n)||h.isFIFO(n))throw new h.ErrnoError(63);R.ops_table||={dir:{node:{getattr:R.node_ops.getattr,setattr:R.node_ops.setattr,lookup:R.node_ops.lookup,mknod:R.node_ops.mknod,rename:R.node_ops.rename,unlink:R.node_ops.unlink,rmdir:R.node_ops.rmdir,readdir:R.node_ops.readdir,symlink:R.node_ops.symlink},stream:{llseek:R.stream_ops.llseek}},file:{node:{getattr:R.node_ops.getattr,setattr:R.node_ops.setattr},stream:{llseek:R.stream_ops.llseek,read:R.stream_ops.read,write:R.stream_ops.write,mmap:R.stream_ops.mmap,msync:R.stream_ops.msync}},link:{node:{getattr:R.node_ops.getattr,setattr:R.node_ops.setattr,readlink:R.node_ops.readlink},stream:{}},chrdev:{node:{getattr:R.node_ops.getattr,setattr:R.node_ops.setattr},stream:h.chrdev_stream_ops}};var l=h.createNode(t,i,n,o);return h.isDir(l.mode)?(l.node_ops=R.ops_table.dir.node,l.stream_ops=R.ops_table.dir.stream,l.contents={}):h.isFile(l.mode)?(l.node_ops=R.ops_table.file.node,l.stream_ops=R.ops_table.file.stream,l.usedBytes=0,l.contents=null):h.isLink(l.mode)?(l.node_ops=R.ops_table.link.node,l.stream_ops=R.ops_table.link.stream):h.isChrdev(l.mode)&&(l.node_ops=R.ops_table.chrdev.node,l.stream_ops=R.ops_table.chrdev.stream),l.atime=l.mtime=l.ctime=Date.now(),t&&(t.contents[i]=l,t.atime=t.mtime=t.ctime=l.atime),l},getFileDataAsTypedArray(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array},expandFileStorage(t,i){var n=t.contents?t.contents.length:0;if(!(n>=i)){i=Math.max(i,n*(n<1024*1024?2:1.125)>>>0),n!=0&&(i=Math.max(i,256));var o=t.contents;t.contents=new Uint8Array(i),t.usedBytes>0&&t.contents.set(o.subarray(0,t.usedBytes),0)}},resizeFileStorage(t,i){if(t.usedBytes!=i)if(i==0)t.contents=null,t.usedBytes=0;else{var n=t.contents;t.contents=new Uint8Array(i),n&&t.contents.set(n.subarray(0,Math.min(i,t.usedBytes))),t.usedBytes=i}},node_ops:{getattr(t){var i={};return i.dev=h.isChrdev(t.mode)?t.id:1,i.ino=t.id,i.mode=t.mode,i.nlink=1,i.uid=0,i.gid=0,i.rdev=t.rdev,h.isDir(t.mode)?i.size=4096:h.isFile(t.mode)?i.size=t.usedBytes:h.isLink(t.mode)?i.size=t.link.length:i.size=0,i.atime=new Date(t.atime),i.mtime=new Date(t.mtime),i.ctime=new Date(t.ctime),i.blksize=4096,i.blocks=Math.ceil(i.size/i.blksize),i},setattr(t,i){for(let n of["mode","atime","mtime","ctime"])i[n]!=null&&(t[n]=i[n]);i.size!==void 0&&R.resizeFileStorage(t,i.size)},lookup(t,i){throw R.doesNotExistError},mknod(t,i,n,o){return R.createNode(t,i,n,o)},rename(t,i,n){var o;try{o=h.lookupNode(i,n)}catch{}if(o){if(h.isDir(t.mode))for(var l in o.contents)throw new h.ErrnoError(55);h.hashRemoveNode(o)}delete t.parent.contents[t.name],i.contents[n]=t,t.name=n,i.ctime=i.mtime=t.parent.ctime=t.parent.mtime=Date.now()},unlink(t,i){delete t.contents[i],t.ctime=t.mtime=Date.now()},rmdir(t,i){for(var n in h.lookupNode(t,i).contents)throw new h.ErrnoError(55);delete t.contents[i],t.ctime=t.mtime=Date.now()},readdir(t){return[".","..",...Object.keys(t.contents)]},symlink(t,i,n){var o=R.createNode(t,i,41471,0);return o.link=n,o},readlink(t){if(!h.isLink(t.mode))throw new h.ErrnoError(28);return t.link}},stream_ops:{read(t,i,n,o,l){var u=t.node.contents;if(l>=t.node.usedBytes)return 0;var d=Math.min(t.node.usedBytes-l,o);if(d>8&&u.subarray)i.set(u.subarray(l,l+d),n);else for(var m=0;m<d;m++)i[n+m]=u[l+m];return d},write(t,i,n,o,l,u){if(i.buffer===j.buffer&&(u=!1),!o)return 0;var d=t.node;if(d.mtime=d.ctime=Date.now(),i.subarray&&(!d.contents||d.contents.subarray)){if(u)return d.contents=i.subarray(n,n+o),d.usedBytes=o,o;if(d.usedBytes===0&&l===0)return d.contents=i.slice(n,n+o),d.usedBytes=o,o;if(l+o<=d.usedBytes)return d.contents.set(i.subarray(n,n+o),l),o}if(R.expandFileStorage(d,l+o),d.contents.subarray&&i.subarray)d.contents.set(i.subarray(n,n+o),l);else for(var m=0;m<o;m++)d.contents[l+m]=i[n+m];return d.usedBytes=Math.max(d.usedBytes,l+o),o},llseek(t,i,n){var o=i;if(n===1?o+=t.position:n===2&&h.isFile(t.node.mode)&&(o+=t.node.usedBytes),o<0)throw new h.ErrnoError(28);return o},mmap(t,i,n,o,l){if(!h.isFile(t.node.mode))throw new h.ErrnoError(43);var u,d,m=t.node.contents;if(!(l&2)&&m&&m.buffer===j.buffer)d=!1,u=m.byteOffset;else{if(d=!0,u=Cr(i),!u)throw new h.ErrnoError(48);m&&((n>0||n+i<m.length)&&(m=m.subarray?m.subarray(n,n+i):Array.prototype.slice.call(m,n,n+i)),j.set(m,u>>>0))}return{ptr:u,allocated:d}},msync(t,i,n,o,l){return R.stream_ops.write(t,i,0,o,n,!1),0}}},na=async t=>{var i=await Ee(t);return new Uint8Array(i)},sa=(t,i,n,o,l,u)=>{h.createDataFile(t,i,n,o,l,u)},Ir=[],oa=(t,i,n,o)=>{typeof Browser<"u"&&Browser.init();var l=!1;return Ir.forEach(u=>{l||u.canHandle(i)&&(u.handle(t,i,n,o),l=!0)}),l},_a=(t,i,n,o,l,u,d,m,w,y)=>{var S=i?Xe.resolve(Y.join2(t,i)):t;function v(I){function D(L){y?.(),m||sa(t,i,L,o,l,w),u?.(),Et()}oa(I,S,D,()=>{d?.(),Et()})||D(I)}pr(),typeof n=="string"?na(n).then(v,d):v(n)},ca=t=>{var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(i===void 0)throw Error(`Unknown file open mode: ${t}`);return i},Wt=(t,i)=>{var n=0;return t&&(n|=365),i&&(n|=146),n},h={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,filesystems:null,syncFSRequests:0,readFiles:{},ErrnoError:class{name="ErrnoError";constructor(t){this.errno=t}},FSStream:class{shared={};get object(){return this.node}set object(t){this.node=t}get isRead(){return(this.flags&2097155)!=1}get isWrite(){return(this.flags&2097155)!=0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(t){this.shared.flags=t}get position(){return this.shared.position}set position(t){this.shared.position=t}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(t,i,n,o){t||=this,this.parent=t,this.mount=t.mount,this.id=h.nextInode++,this.name=i,this.mode=n,this.rdev=o,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(t){t?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(t){t?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return h.isDir(this.mode)}get isDevice(){return h.isChrdev(this.mode)}},lookupPath(t,i={}){if(!t)throw new h.ErrnoError(44);i.follow_mount??=!0,Y.isAbs(t)||(t=h.cwd()+"/"+t);e:for(var n=0;n<40;n++){for(var o=t.split("/").filter(y=>!!y),l=h.root,u="/",d=0;d<o.length;d++){var m=d===o.length-1;if(m&&i.parent)break;if(o[d]!=="."){if(o[d]===".."){if(u=Y.dirname(u),h.isRoot(l)){t=u+"/"+o.slice(d+1).join("/");continue e}else l=l.parent;continue}u=Y.join2(u,o[d]);try{l=h.lookupNode(l,o[d])}catch(y){if(y?.errno===44&&m&&i.noent_okay)return{path:u};throw y}if(h.isMountpoint(l)&&(!m||i.follow_mount)&&(l=l.mounted.root),h.isLink(l.mode)&&(!m||i.follow)){if(!l.node_ops.readlink)throw new h.ErrnoError(52);var w=l.node_ops.readlink(l);Y.isAbs(w)||(w=Y.dirname(u)+"/"+w),t=w+"/"+o.slice(d+1).join("/");continue e}}}return{path:u,node:l}}throw new h.ErrnoError(32)},getPath(t){for(var i;;){if(h.isRoot(t)){var n=t.mount.mountpoint;return i?n[n.length-1]==="/"?n+i:`${n}/${i}`:n}i=i?`${t.name}/${i}`:t.name,t=t.parent}},hashName(t,i){for(var n=0,o=0;o<i.length;o++)n=(n<<5)-n+i.charCodeAt(o)|0;return(t+n>>>0)%h.nameTable.length},hashAddNode(t){var i=h.hashName(t.parent.id,t.name);t.name_next=h.nameTable[i],h.nameTable[i]=t},hashRemoveNode(t){var i=h.hashName(t.parent.id,t.name);if(h.nameTable[i]===t)h.nameTable[i]=t.name_next;else for(var n=h.nameTable[i];n;){if(n.name_next===t){n.name_next=t.name_next;break}n=n.name_next}},lookupNode(t,i){var n=h.mayLookup(t);if(n)throw new h.ErrnoError(n);for(var o=h.hashName(t.id,i),l=h.nameTable[o];l;l=l.name_next){var u=l.name;if(l.parent.id===t.id&&u===i)return l}return h.lookup(t,i)},createNode(t,i,n,o){var l=new h.FSNode(t,i,n,o);return h.hashAddNode(l),l},destroyNode(t){h.hashRemoveNode(t)},isRoot(t){return t===t.parent},isMountpoint(t){return!!t.mounted},isFile(t){return(t&61440)==32768},isDir(t){return(t&61440)==16384},isLink(t){return(t&61440)==40960},isChrdev(t){return(t&61440)==8192},isBlkdev(t){return(t&61440)==24576},isFIFO(t){return(t&61440)==4096},isSocket(t){return(t&49152)==49152},flagsToPermissionString(t){var i=["r","w","rw"][t&3];return t&512&&(i+="w"),i},nodePermissions(t,i){return h.ignorePermissions?0:i.includes("r")&&!(t.mode&292)||i.includes("w")&&!(t.mode&146)||i.includes("x")&&!(t.mode&73)?2:0},mayLookup(t){return h.isDir(t.mode)?h.nodePermissions(t,"x")||(t.node_ops.lookup?0:2):54},mayCreate(t,i){if(!h.isDir(t.mode))return 54;try{return h.lookupNode(t,i),20}catch{}return h.nodePermissions(t,"wx")},mayDelete(t,i,n){var o;try{o=h.lookupNode(t,i)}catch(u){return u.errno}var l=h.nodePermissions(t,"wx");if(l)return l;if(n){if(!h.isDir(o.mode))return 54;if(h.isRoot(o)||h.getPath(o)===h.cwd())return 10}else if(h.isDir(o.mode))return 31;return 0},mayOpen(t,i){return t?h.isLink(t.mode)?32:h.isDir(t.mode)&&(h.flagsToPermissionString(i)!=="r"||i&576)?31:h.nodePermissions(t,h.flagsToPermissionString(i)):44},checkOpExists(t,i){if(!t)throw new h.ErrnoError(i);return t},MAX_OPEN_FDS:4096,nextfd(){for(var t=0;t<=h.MAX_OPEN_FDS;t++)if(!h.streams[t])return t;throw new h.ErrnoError(33)},getStreamChecked(t){var i=h.getStream(t);if(!i)throw new h.ErrnoError(8);return i},getStream:t=>h.streams[t],createStream(t,i=-1){return t=Object.assign(new h.FSStream,t),i==-1&&(i=h.nextfd()),t.fd=i,h.streams[i]=t,t},closeStream(t){h.streams[t]=null},dupStream(t,i=-1){var n=h.createStream(t,i);return n.stream_ops?.dup?.(n),n},doSetAttr(t,i,n){var o=t?.stream_ops.setattr,l=o?t:i;o??=i.node_ops.setattr,h.checkOpExists(o,63),o(l,n)},chrdev_stream_ops:{open(t){t.stream_ops=h.getDevice(t.node.rdev).stream_ops,t.stream_ops.open?.(t)},llseek(){throw new h.ErrnoError(70)}},major:t=>t>>8,minor:t=>t&255,makedev:(t,i)=>t<<8|i,registerDevice(t,i){h.devices[t]={stream_ops:i}},getDevice:t=>h.devices[t],getMounts(t){for(var i=[],n=[t];n.length;){var o=n.pop();i.push(o),n.push(...o.mounts)}return i},syncfs(t,i){typeof t=="function"&&(i=t,t=!1),h.syncFSRequests++,h.syncFSRequests>1&&Se(`warning: ${h.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=h.getMounts(h.root.mount),o=0;function l(d){return h.syncFSRequests--,i(d)}function u(d){if(d)return u.errored?void 0:(u.errored=!0,l(d));++o>=n.length&&l(null)}n.forEach(d=>{if(!d.type.syncfs)return u(null);d.type.syncfs(d,t,u)})},mount(t,i,n){var o=n==="/",l=!n,u;if(o&&h.root)throw new h.ErrnoError(10);if(!o&&!l){var d=h.lookupPath(n,{follow_mount:!1});if(n=d.path,u=d.node,h.isMountpoint(u))throw new h.ErrnoError(10);if(!h.isDir(u.mode))throw new h.ErrnoError(54)}var m={type:t,opts:i,mountpoint:n,mounts:[]},w=t.mount(m);return w.mount=m,m.root=w,o?h.root=w:u&&(u.mounted=m,u.mount&&u.mount.mounts.push(m)),w},unmount(t){var i=h.lookupPath(t,{follow_mount:!1});if(!h.isMountpoint(i.node))throw new h.ErrnoError(28);var n=i.node,o=n.mounted,l=h.getMounts(o);Object.keys(h.nameTable).forEach(d=>{for(var m=h.nameTable[d];m;){var w=m.name_next;l.includes(m.mount)&&h.destroyNode(m),m=w}}),n.mounted=null;var u=n.mount.mounts.indexOf(o);n.mount.mounts.splice(u,1)},lookup(t,i){return t.node_ops.lookup(t,i)},mknod(t,i,n){var o=h.lookupPath(t,{parent:!0}).node,l=Y.basename(t);if(!l)throw new h.ErrnoError(28);if(l==="."||l==="..")throw new h.ErrnoError(20);var u=h.mayCreate(o,l);if(u)throw new h.ErrnoError(u);if(!o.node_ops.mknod)throw new h.ErrnoError(63);return o.node_ops.mknod(o,l,i,n)},statfs(t){return h.statfsNode(h.lookupPath(t,{follow:!0}).node)},statfsStream(t){return h.statfsNode(t.node)},statfsNode(t){var i={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:h.nextInode,ffree:h.nextInode-1,fsid:42,flags:2,namelen:255};return t.node_ops.statfs&&Object.assign(i,t.node_ops.statfs(t.mount.opts.root)),i},create(t,i=438){return i&=4095,i|=32768,h.mknod(t,i,0)},mkdir(t,i=511){return i&=1023,i|=16384,h.mknod(t,i,0)},mkdirTree(t,i){var n=t.split("/"),o="";for(var l of n)if(l){(o||Y.isAbs(t))&&(o+="/"),o+=l;try{h.mkdir(o,i)}catch(u){if(u.errno!=20)throw u}}},mkdev(t,i,n){return n===void 0&&(n=i,i=438),i|=8192,h.mknod(t,i,n)},symlink(t,i){if(!Xe.resolve(t))throw new h.ErrnoError(44);var n=h.lookupPath(i,{parent:!0}).node;if(!n)throw new h.ErrnoError(44);var o=Y.basename(i),l=h.mayCreate(n,o);if(l)throw new h.ErrnoError(l);if(!n.node_ops.symlink)throw new h.ErrnoError(63);return n.node_ops.symlink(n,o,t)},rename(t,i){var n=Y.dirname(t),o=Y.dirname(i),l=Y.basename(t),u=Y.basename(i),d=h.lookupPath(t,{parent:!0}),m=d.node,w;if(d=h.lookupPath(i,{parent:!0}),w=d.node,!m||!w)throw new h.ErrnoError(44);if(m.mount!==w.mount)throw new h.ErrnoError(75);var y=h.lookupNode(m,l),S=Xe.relative(t,o);if(S.charAt(0)!==".")throw new h.ErrnoError(28);if(S=Xe.relative(i,n),S.charAt(0)!==".")throw new h.ErrnoError(55);var v;try{v=h.lookupNode(w,u)}catch{}if(y!==v){var I=h.isDir(y.mode),D=h.mayDelete(m,l,I);if(D||(D=v?h.mayDelete(w,u,I):h.mayCreate(w,u),D))throw new h.ErrnoError(D);if(!m.node_ops.rename)throw new h.ErrnoError(63);if(h.isMountpoint(y)||v&&h.isMountpoint(v))throw new h.ErrnoError(10);if(w!==m&&(D=h.nodePermissions(m,"w"),D))throw new h.ErrnoError(D);h.hashRemoveNode(y);try{m.node_ops.rename(y,w,u),y.parent=w}catch(L){throw L}finally{h.hashAddNode(y)}}},rmdir(t){var i=h.lookupPath(t,{parent:!0}).node,n=Y.basename(t),o=h.lookupNode(i,n),l=h.mayDelete(i,n,!0);if(l)throw new h.ErrnoError(l);if(!i.node_ops.rmdir)throw new h.ErrnoError(63);if(h.isMountpoint(o))throw new h.ErrnoError(10);i.node_ops.rmdir(i,n),h.destroyNode(o)},readdir(t){var i=h.lookupPath(t,{follow:!0}).node;return h.checkOpExists(i.node_ops.readdir,54)(i)},unlink(t){var i=h.lookupPath(t,{parent:!0}).node;if(!i)throw new h.ErrnoError(44);var n=Y.basename(t),o=h.lookupNode(i,n),l=h.mayDelete(i,n,!1);if(l)throw new h.ErrnoError(l);if(!i.node_ops.unlink)throw new h.ErrnoError(63);if(h.isMountpoint(o))throw new h.ErrnoError(10);i.node_ops.unlink(i,n),h.destroyNode(o)},readlink(t){var i=h.lookupPath(t).node;if(!i)throw new h.ErrnoError(44);if(!i.node_ops.readlink)throw new h.ErrnoError(28);return i.node_ops.readlink(i)},stat(t,i){var n=h.lookupPath(t,{follow:!i}).node;return h.checkOpExists(n.node_ops.getattr,63)(n)},fstat(t){var i=h.getStreamChecked(t),n=i.node,o=i.stream_ops.getattr,l=o?i:n;return o??=n.node_ops.getattr,h.checkOpExists(o,63),o(l)},lstat(t){return h.stat(t,!0)},doChmod(t,i,n,o){h.doSetAttr(t,i,{mode:n&4095|i.mode&-4096,ctime:Date.now(),dontFollow:o})},chmod(t,i,n){var o=typeof t=="string"?h.lookupPath(t,{follow:!n}).node:t;h.doChmod(null,o,i,n)},lchmod(t,i){h.chmod(t,i,!0)},fchmod(t,i){var n=h.getStreamChecked(t);h.doChmod(n,n.node,i,!1)},doChown(t,i,n){h.doSetAttr(t,i,{timestamp:Date.now(),dontFollow:n})},chown(t,i,n,o){var l=typeof t=="string"?h.lookupPath(t,{follow:!o}).node:t;h.doChown(null,l,o)},lchown(t,i,n){h.chown(t,i,n,!0)},fchown(t,i,n){var o=h.getStreamChecked(t);h.doChown(o,o.node,!1)},doTruncate(t,i,n){if(h.isDir(i.mode))throw new h.ErrnoError(31);if(!h.isFile(i.mode))throw new h.ErrnoError(28);var o=h.nodePermissions(i,"w");if(o)throw new h.ErrnoError(o);h.doSetAttr(t,i,{size:n,timestamp:Date.now()})},truncate(t,i){if(i<0)throw new h.ErrnoError(28);var n=typeof t=="string"?h.lookupPath(t,{follow:!0}).node:t;h.doTruncate(null,n,i)},ftruncate(t,i){var n=h.getStreamChecked(t);if(i<0||!(n.flags&2097155))throw new h.ErrnoError(28);h.doTruncate(n,n.node,i)},utime(t,i,n){var o=h.lookupPath(t,{follow:!0}).node;h.checkOpExists(o.node_ops.setattr,63)(o,{atime:i,mtime:n})},open(t,i,n=438){if(t==="")throw new h.ErrnoError(44);i=typeof i=="string"?ca(i):i,n=i&64?n&4095|32768:0;var o,l;if(typeof t=="object")o=t;else{l=t.endsWith("/");var u=h.lookupPath(t,{follow:!(i&131072),noent_okay:!0});o=u.node,t=u.path}var d=!1;if(i&64)if(o){if(i&128)throw new h.ErrnoError(20)}else{if(l)throw new h.ErrnoError(31);o=h.mknod(t,n|511,0),d=!0}if(!o)throw new h.ErrnoError(44);if(h.isChrdev(o.mode)&&(i&=-513),i&65536&&!h.isDir(o.mode))throw new h.ErrnoError(54);if(!d){var m=h.mayOpen(o,i);if(m)throw new h.ErrnoError(m)}i&512&&!d&&h.truncate(o,0),i&=-131713;var w=h.createStream({node:o,path:h.getPath(o),flags:i,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return w.stream_ops.open&&w.stream_ops.open(w),d&&h.chmod(o,n&511),e.logReadFiles&&!(i&1)&&(t in h.readFiles||(h.readFiles[t]=1)),w},close(t){if(h.isClosed(t))throw new h.ErrnoError(8);t.getdents&&=null;try{t.stream_ops.close&&t.stream_ops.close(t)}catch(i){throw i}finally{h.closeStream(t.fd)}t.fd=null},isClosed(t){return t.fd===null},llseek(t,i,n){if(h.isClosed(t))throw new h.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new h.ErrnoError(70);if(n!=0&&n!=1&&n!=2)throw new h.ErrnoError(28);return t.position=t.stream_ops.llseek(t,i,n),t.ungotten=[],t.position},read(t,i,n,o,l){if(o<0||l<0)throw new h.ErrnoError(28);if(h.isClosed(t)||(t.flags&2097155)==1)throw new h.ErrnoError(8);if(h.isDir(t.node.mode))throw new h.ErrnoError(31);if(!t.stream_ops.read)throw new h.ErrnoError(28);var u=l!==void 0;if(!u)l=t.position;else if(!t.seekable)throw new h.ErrnoError(70);var d=t.stream_ops.read(t,i,n,o,l);return u||(t.position+=d),d},write(t,i,n,o,l,u){if(o<0||l<0)throw new h.ErrnoError(28);if(h.isClosed(t)||!(t.flags&2097155))throw new h.ErrnoError(8);if(h.isDir(t.node.mode))throw new h.ErrnoError(31);if(!t.stream_ops.write)throw new h.ErrnoError(28);t.seekable&&t.flags&1024&&h.llseek(t,0,2);var d=l!==void 0;if(!d)l=t.position;else if(!t.seekable)throw new h.ErrnoError(70);var m=t.stream_ops.write(t,i,n,o,l,u);return d||(t.position+=m),m},mmap(t,i,n,o,l){if(o&2&&!(l&2)&&(t.flags&2097155)!=2||(t.flags&2097155)==1)throw new h.ErrnoError(2);if(!t.stream_ops.mmap)throw new h.ErrnoError(43);if(!i)throw new h.ErrnoError(28);return t.stream_ops.mmap(t,i,n,o,l)},msync(t,i,n,o,l){return t.stream_ops.msync?t.stream_ops.msync(t,i,n,o,l):0},ioctl(t,i,n){if(!t.stream_ops.ioctl)throw new h.ErrnoError(59);return t.stream_ops.ioctl(t,i,n)},readFile(t,i={}){if(i.flags=i.flags||0,i.encoding=i.encoding||"binary",i.encoding!=="utf8"&&i.encoding!=="binary")throw Error(`Invalid encoding type "${i.encoding}"`);var n,o=h.open(t,i.flags),l=h.stat(t).size,u=new Uint8Array(l);return h.read(o,u,0,l,0),i.encoding==="utf8"?n=je(u):i.encoding==="binary"&&(n=u),h.close(o),n},writeFile(t,i,n={}){n.flags=n.flags||577;var o=h.open(t,n.flags,n.mode);if(typeof i=="string"){var l=new Uint8Array(xe(i)+1),u=Lt(i,l,0,l.length);h.write(o,l,0,u,void 0,n.canOwn)}else if(ArrayBuffer.isView(i))h.write(o,i,0,i.byteLength,void 0,n.canOwn);else throw Error("Unsupported data type");h.close(o)},cwd:()=>h.currentPath,chdir(t){var i=h.lookupPath(t,{follow:!0});if(i.node===null)throw new h.ErrnoError(44);if(!h.isDir(i.node.mode))throw new h.ErrnoError(54);var n=h.nodePermissions(i.node,"x");if(n)throw new h.ErrnoError(n);h.currentPath=i.path},createDefaultDirectories(){h.mkdir("/tmp"),h.mkdir("/home"),h.mkdir("/home/web_user")},createDefaultDevices(){h.mkdir("/dev"),h.registerDevice(h.makedev(1,3),{read:()=>0,write:(o,l,u,d,m)=>d,llseek:()=>0}),h.mkdev("/dev/null",h.makedev(1,3)),Ge.register(h.makedev(5,0),Ge.default_tty_ops),Ge.register(h.makedev(6,0),Ge.default_tty1_ops),h.mkdev("/dev/tty",h.makedev(5,0)),h.mkdev("/dev/tty1",h.makedev(6,0));var t=new Uint8Array(1024),i=0,n=()=>(i===0&&(Rt(t),i=t.byteLength),t[--i]);h.createDevice("/dev","random",n),h.createDevice("/dev","urandom",n),h.mkdir("/dev/shm"),h.mkdir("/dev/shm/tmp")},createSpecialDirectories(){h.mkdir("/proc");var t=h.mkdir("/proc/self");h.mkdir("/proc/self/fd"),h.mount({mount(){var i=h.createNode(t,"fd",16895,73);return i.stream_ops={llseek:R.stream_ops.llseek},i.node_ops={lookup(n,o){var l=+o,u=h.getStreamChecked(l),d={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>u.path},id:l+1};return d.parent=d,d},readdir(){return Array.from(h.streams.entries()).filter(([n,o])=>o).map(([n,o])=>n.toString())}},i}},{},"/proc/self/fd")},createStandardStreams(t,i,n){t?h.createDevice("/dev","stdin",t):h.symlink("/dev/tty","/dev/stdin"),i?h.createDevice("/dev","stdout",null,i):h.symlink("/dev/tty","/dev/stdout"),n?h.createDevice("/dev","stderr",null,n):h.symlink("/dev/tty1","/dev/stderr"),h.open("/dev/stdin",0),h.open("/dev/stdout",1),h.open("/dev/stderr",1)},staticInit(){h.nameTable=Array(4096),h.mount(R,{},"/"),h.createDefaultDirectories(),h.createDefaultDevices(),h.createSpecialDirectories(),h.filesystems={MEMFS:R}},init(t,i,n){h.initialized=!0,t??=e.stdin,i??=e.stdout,n??=e.stderr,h.createStandardStreams(t,i,n)},quit(){h.initialized=!1;for(var t of h.streams)t&&h.close(t)},findObject(t,i){var n=h.analyzePath(t,i);return n.exists?n.object:null},analyzePath(t,i){try{var n=h.lookupPath(t,{follow:!i});t=n.path}catch{}var o={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=h.lookupPath(t,{parent:!0});o.parentExists=!0,o.parentPath=n.path,o.parentObject=n.node,o.name=Y.basename(t),n=h.lookupPath(t,{follow:!i}),o.exists=!0,o.path=n.path,o.object=n.node,o.name=n.node.name,o.isRoot=n.path==="/"}catch(l){o.error=l.errno}return o},createPath(t,i,n,o){t=typeof t=="string"?t:h.getPath(t);for(var l=i.split("/").reverse();l.length;){var u=l.pop();if(u){var d=Y.join2(t,u);try{h.mkdir(d)}catch(m){if(m.errno!=20)throw m}t=d}}return d},createFile(t,i,n,o,l){var u=Y.join2(typeof t=="string"?t:h.getPath(t),i),d=Wt(o,l);return h.create(u,d)},createDataFile(t,i,n,o,l,u){var d=i;t&&(t=typeof t=="string"?t:h.getPath(t),d=i?Y.join2(t,i):t);var m=Wt(o,l),w=h.create(d,m);if(n){if(typeof n=="string"){for(var y=Array(n.length),S=0,v=n.length;S<v;++S)y[S]=n.charCodeAt(S);n=y}h.chmod(w,m|146);var I=h.open(w,577);h.write(I,n,0,n.length,0,u),h.close(I),h.chmod(w,m)}},createDevice(t,i,n,o){var l=Y.join2(typeof t=="string"?t:h.getPath(t),i),u=Wt(!!n,!!o);h.createDevice.major??=64;var d=h.makedev(h.createDevice.major++,0);return h.registerDevice(d,{open(m){m.seekable=!1},close(m){o?.buffer?.length&&o(10)},read(m,w,y,S,v){for(var I=0,D=0;D<S;D++){var L;try{L=n()}catch{throw new h.ErrnoError(29)}if(L===void 0&&I===0)throw new h.ErrnoError(6);if(L==null)break;I++,w[y+D]=L}return I&&(m.node.atime=Date.now()),I},write(m,w,y,S,v){for(var I=0;I<S;I++)try{o(w[y+I])}catch{throw new h.ErrnoError(29)}return S&&(m.node.mtime=m.node.ctime=Date.now()),I}}),h.mkdev(l,u,d)},forceLoadFile(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if(typeof XMLHttpRequest<"u")throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{t.contents=Ue(t.url),t.usedBytes=t.contents.length}catch{throw new h.ErrnoError(29)}},createLazyFile(t,i,n,o,l){class u{lengthKnown=!1;chunks=[];get(v){if(!(v>this.length-1||v<0)){var I=v%this.chunkSize,D=v/this.chunkSize|0;return this.getter(D)[I]}}setDataGetter(v){this.getter=v}cacheLength(){var v=new XMLHttpRequest;if(v.open("HEAD",n,!1),v.send(null),!(v.status>=200&&v.status<300||v.status===304))throw Error("Couldn't load "+n+". Status: "+v.status);var I=Number(v.getResponseHeader("Content-length")),D,L=(D=v.getResponseHeader("Accept-Ranges"))&&D==="bytes",Q=(D=v.getResponseHeader("Content-Encoding"))&&D==="gzip",te=1024*1024;L||(te=I);var Z=(V,me)=>{if(V>me)throw Error("invalid range ("+V+", "+me+") or no bytes requested!");if(me>I-1)throw Error("only "+I+" bytes available! programmer error!");var J=new XMLHttpRequest;if(J.open("GET",n,!1),I!==te&&J.setRequestHeader("Range","bytes="+V+"-"+me),J.responseType="arraybuffer",J.overrideMimeType&&J.overrideMimeType("text/plain; charset=x-user-defined"),J.send(null),!(J.status>=200&&J.status<300||J.status===304))throw Error("Couldn't load "+n+". Status: "+J.status);return J.response===void 0?vr(J.responseText||""):new Uint8Array(J.response||[])},le=this;le.setDataGetter(V=>{var me=V*te,J=(V+1)*te-1;if(J=Math.min(J,I-1),le.chunks[V]===void 0&&(le.chunks[V]=Z(me,J)),le.chunks[V]===void 0)throw Error("doXHR failed!");return le.chunks[V]}),(Q||!I)&&(te=I=1,I=this.getter(0).length,te=I,He("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=I,this._chunkSize=te,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){if(!C)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var d={isDevice:!1,contents:new u}}else var d={isDevice:!1,url:n};var m=h.createFile(t,i,d,o,l);d.contents?m.contents=d.contents:d.url&&(m.contents=null,m.url=d.url),Object.defineProperties(m,{usedBytes:{get:function(){return this.contents.length}}});var w={};Object.keys(m.stream_ops).forEach(S=>{var v=m.stream_ops[S];w[S]=(...I)=>(h.forceLoadFile(m),v(...I))});function y(S,v,I,D,L){var Q=S.node.contents;if(L>=Q.length)return 0;var te=Math.min(Q.length-L,D);if(Q.slice)for(var Z=0;Z<te;Z++)v[I+Z]=Q[L+Z];else for(var Z=0;Z<te;Z++)v[I+Z]=Q.get(L+Z);return te}return w.read=(S,v,I,D,L)=>(h.forceLoadFile(m),y(S,v,I,D,L)),w.mmap=(S,v,I,D,L)=>{h.forceLoadFile(m);var Q=Cr(v);if(!Q)throw new h.ErrnoError(48);return y(S,j,Q,v,I),{ptr:Q,allocated:!0}},m.stream_ops=w,m}},Bt=(t,i)=>(t>>>=0,t?je(ae,t,i):""),x={DEFAULT_POLLMASK:5,calculateAt(t,i,n){if(Y.isAbs(i))return i;var o=t===-100?h.cwd():x.getStreamFromFD(t).path;if(i.length==0){if(!n)throw new h.ErrnoError(44);return o}return o+"/"+i},writeStat(t,i){P[t>>>2>>>0]=i.dev,P[t+4>>>2>>>0]=i.mode,F[t+8>>>2>>>0]=i.nlink,P[t+12>>>2>>>0]=i.uid,P[t+16>>>2>>>0]=i.gid,P[t+20>>>2>>>0]=i.rdev,ne[t+24>>>3]=BigInt(i.size),P[t+32>>>2>>>0]=4096,P[t+36>>>2>>>0]=i.blocks;var n=i.atime.getTime(),o=i.mtime.getTime(),l=i.ctime.getTime();return ne[t+40>>>3]=BigInt(Math.floor(n/1e3)),F[t+48>>>2>>>0]=n%1e3*1e3*1e3,ne[t+56>>>3]=BigInt(Math.floor(o/1e3)),F[t+64>>>2>>>0]=o%1e3*1e3*1e3,ne[t+72>>>3]=BigInt(Math.floor(l/1e3)),F[t+80>>>2>>>0]=l%1e3*1e3*1e3,ne[t+88>>>3]=BigInt(i.ino),0},writeStatFs(t,i){P[t+4>>>2>>>0]=i.bsize,P[t+40>>>2>>>0]=i.bsize,P[t+8>>>2>>>0]=i.blocks,P[t+12>>>2>>>0]=i.bfree,P[t+16>>>2>>>0]=i.bavail,P[t+20>>>2>>>0]=i.files,P[t+24>>>2>>>0]=i.ffree,P[t+28>>>2>>>0]=i.fsid,P[t+44>>>2>>>0]=i.flags,P[t+36>>>2>>>0]=i.namelen},doMsync(t,i,n,o,l){if(!h.isFile(i.node.mode))throw new h.ErrnoError(43);if(o&2)return 0;var u=ae.slice(t,t+n);h.msync(i,u,l,n,o)},getStreamFromFD(t){return h.getStreamChecked(t)},varargs:void 0,getStr(t){return Bt(t)}};function la(t,i){t>>>=0;try{return t=x.getStr(t),h.chmod(t,i),0}catch(n){if(h===void 0||n.name!=="ErrnoError")throw n;return-n.errno}}function ga(t){try{var i=x.getStreamFromFD(t);return h.dupStream(i).fd}catch(n){if(h===void 0||n.name!=="ErrnoError")throw n;return-n.errno}}function ha(t,i,n,o){i>>>=0;try{if(i=x.getStr(i),i=x.calculateAt(t,i),n&-8)return-28;var l=h.lookupPath(i,{follow:!0}).node;if(!l)return-44;var u="";return n&4&&(u+="r"),n&2&&(u+="w"),n&1&&(u+="x"),u&&h.nodePermissions(l,u)?-2:0}catch(d){if(h===void 0||d.name!=="ErrnoError")throw d;return-d.errno}}function ua(t,i,n,o){n=ke(n),o=ke(o);try{if(isNaN(n))return 61;if(i!=0)return-138;if(n<0||o<0)return-28;var l=h.fstat(t).size,u=n+o;return u>l&&h.ftruncate(t,u),0}catch(d){if(h===void 0||d.name!=="ErrnoError")throw d;return-d.errno}}function pa(t,i){try{return h.fchmod(t,i),0}catch(n){if(h===void 0||n.name!=="ErrnoError")throw n;return-n.errno}}var lt=()=>{var t=P[x.varargs>>>2>>>0];return x.varargs+=4,t},Ve=lt;function da(t,i,n){n>>>=0,x.varargs=n;try{var o=x.getStreamFromFD(t);switch(i){case 0:var l=lt();if(l<0)return-28;for(;h.streams[l];)l++;return h.dupStream(o,l).fd;case 1:case 2:return 0;case 3:return o.flags;case 4:var l=lt();return o.flags|=l,0;case 12:var l=Ve(),u=0;return _e[l+u>>>1>>>0]=2,0;case 13:case 14:return 0}return-28}catch(d){if(h===void 0||d.name!=="ErrnoError")throw d;return-d.errno}}function ma(t,i){i>>>=0;try{return x.writeStat(i,h.fstat(t))}catch(n){if(h===void 0||n.name!=="ErrnoError")throw n;return-n.errno}}var we=(t,i,n)=>Lt(t,ae,i,n);function fa(t,i){t>>>=0,i>>>=0;try{if(i===0)return-28;var n=h.cwd(),o=xe(n)+1;return i<o?-68:(we(n,t,i),o)}catch(l){if(h===void 0||l.name!=="ErrnoError")throw l;return-l.errno}}function wa(t,i,n){i>>>=0,n>>>=0;try{var o=x.getStreamFromFD(t);o.getdents||=h.readdir(o.path);for(var l=280,u=0,d=h.llseek(o,0,1),m=Math.floor(d/l),w=Math.min(o.getdents.length,m+Math.floor(n/l)),y=m;y<w;y++){var S,v,I=o.getdents[y];if(I===".")S=o.node.id,v=4;else if(I==="..")S=h.lookupPath(o.path,{parent:!0}).node.id,v=4;else{var D;try{D=h.lookupNode(o.node,I)}catch(L){if(L?.errno===28)continue;throw L}S=D.id,v=h.isChrdev(D.mode)?2:h.isDir(D.mode)?4:h.isLink(D.mode)?10:8}ne[i+u>>>3]=BigInt(S),ne[i+u+8>>>3]=BigInt((y+1)*l),_e[i+u+16>>>1>>>0]=280,j[i+u+18>>>0]=v,we(I,i+u+19,256),u+=l}return h.llseek(o,y*l,0),u}catch(L){if(h===void 0||L.name!=="ErrnoError")throw L;return-L.errno}}function ka(t,i,n){n>>>=0,x.varargs=n;try{var o=x.getStreamFromFD(t);switch(i){case 21509:return o.tty?0:-59;case 21505:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcgets){var l=o.tty.ops.ioctl_tcgets(o),v=Ve();P[v>>>2>>>0]=l.c_iflag||0,P[v+4>>>2>>>0]=l.c_oflag||0,P[v+8>>>2>>>0]=l.c_cflag||0,P[v+12>>>2>>>0]=l.c_lflag||0;for(var u=0;u<32;u++)j[v+u+17>>>0]=l.c_cc[u]||0;return 0}return 0;case 21510:case 21511:case 21512:return o.tty?0:-59;case 21506:case 21507:case 21508:if(!o.tty)return-59;if(o.tty.ops.ioctl_tcsets){for(var v=Ve(),d=P[v>>>2>>>0],m=P[v+4>>>2>>>0],w=P[v+8>>>2>>>0],y=P[v+12>>>2>>>0],S=[],u=0;u<32;u++)S.push(j[v+u+17>>>0]);return o.tty.ops.ioctl_tcsets(o.tty,i,{c_iflag:d,c_oflag:m,c_cflag:w,c_lflag:y,c_cc:S})}return 0;case 21519:if(!o.tty)return-59;var v=Ve();return P[v>>>2>>>0]=0,0;case 21520:return o.tty?-28:-59;case 21531:var v=Ve();return h.ioctl(o,i,v);case 21523:if(!o.tty)return-59;if(o.tty.ops.ioctl_tiocgwinsz){var I=o.tty.ops.ioctl_tiocgwinsz(o.tty),v=Ve();_e[v>>>1>>>0]=I[0],_e[v+2>>>1>>>0]=I[1]}return 0;case 21524:return o.tty?0:-59;case 21515:return o.tty?0:-59;default:return-28}}catch(D){if(h===void 0||D.name!=="ErrnoError")throw D;return-D.errno}}function Ma(t,i){t>>>=0,i>>>=0;try{return t=x.getStr(t),x.writeStat(i,h.lstat(t))}catch(n){if(h===void 0||n.name!=="ErrnoError")throw n;return-n.errno}}function ya(t,i,n,o){i>>>=0,n>>>=0;try{i=x.getStr(i);var l=o&256,u=o&4096;return o&=-6401,i=x.calculateAt(t,i,u),x.writeStat(n,l?h.lstat(i):h.stat(i))}catch(d){if(h===void 0||d.name!=="ErrnoError")throw d;return-d.errno}}function va(t,i,n,o){i>>>=0,o>>>=0,x.varargs=o;try{i=x.getStr(i),i=x.calculateAt(t,i);var l=o?lt():0;return h.open(i,n,l).fd}catch(u){if(h===void 0||u.name!=="ErrnoError")throw u;return-u.errno}}function Sa(t,i,n,o){i>>>=0,n>>>=0,o>>>=0;try{if(i=x.getStr(i),i=x.calculateAt(t,i),o<=0)return-28;var l=h.readlink(i),u=Math.min(o,xe(l)),d=j[n+u>>>0];return we(l,n,o+1),j[n+u>>>0]=d,u}catch(m){if(h===void 0||m.name!=="ErrnoError")throw m;return-m.errno}}function Ca(t,i,n,o){i>>>=0,o>>>=0;try{return i=x.getStr(i),o=x.getStr(o),i=x.calculateAt(t,i),o=x.calculateAt(n,o),h.rename(i,o),0}catch(l){if(h===void 0||l.name!=="ErrnoError")throw l;return-l.errno}}function Ia(t){t>>>=0;try{return t=x.getStr(t),h.rmdir(t),0}catch(i){if(h===void 0||i.name!=="ErrnoError")throw i;return-i.errno}}function Pa(t,i){t>>>=0,i>>>=0;try{return t=x.getStr(t),x.writeStat(i,h.stat(t))}catch(n){if(h===void 0||n.name!=="ErrnoError")throw n;return-n.errno}}function Da(t,i,n){t>>>=0,n>>>=0;try{return t=x.getStr(t),n=x.getStr(n),n=x.calculateAt(i,n),h.symlink(t,n),0}catch(o){if(h===void 0||o.name!=="ErrnoError")throw o;return-o.errno}}function ba(t,i,n){i>>>=0;try{return i=x.getStr(i),i=x.calculateAt(t,i),n===0?h.unlink(i):n===512?h.rmdir(i):tt("Invalid flags passed to unlinkat"),0}catch(o){if(h===void 0||o.name!=="ErrnoError")throw o;return-o.errno}}var Ea=()=>tt(""),gt={},Ot=t=>{for(;t.length;){var i=t.pop();t.pop()(i)}};function rt(t){return this.fromWireType(F[t>>>2>>>0])}var qe={},Re={},ht={},Ta=e.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},ut=t=>{throw new Ta(t)},zt=(t,i,n)=>{t.forEach(m=>ht[m]=i);function o(m){var w=n(m);w.length!==t.length&&ut("Mismatched type converter count");for(var y=0;y<t.length;++y)pe(t[y],w[y])}var l=Array(i.length),u=[],d=0;i.forEach((m,w)=>{Re.hasOwnProperty(m)?l[w]=Re[m]:(u.push(m),qe.hasOwnProperty(m)||(qe[m]=[]),qe[m].push(()=>{l[w]=Re[m],++d,d===u.length&&o(l)}))}),u.length===0&&o(l)},Aa=function(t){t>>>=0;var i=gt[t];delete gt[t];var n=i.rawConstructor,o=i.rawDestructor,l=i.fields,u=l.map(d=>d.getterReturnType).concat(l.map(d=>d.setterArgumentType));zt([t],u,d=>{var m={};return l.forEach((w,y)=>{var S=w.fieldName,v=d[y],I=d[y].optional,D=w.getter,L=w.getterContext,Q=d[y+l.length],te=w.setter,Z=w.setterContext;m[S]={read:le=>v.fromWireType(D(L,le)),write:(le,V)=>{var me=[];te(Z,le,Q.toWireType(me,V)),Ot(me)},optional:I}}),[{name:i.name,fromWireType:w=>{var y={};for(var S in m)y[S]=m[S].read(w);return o(w),y},toWireType:(w,y)=>{for(var S in m)if(!(S in y)&&!m[S].optional)throw TypeError(`Missing field: "${S}"`);var v=n();for(S in m)m[S].write(v,y[S]);return w!==null&&w.push(o,v),v},argPackAdvance:de,readValueFromPointer:rt,destructorFunction:o}]})},pt=t=>{if(t===null)return"null";var i=typeof t;return i==="object"||i==="array"||i==="function"?t.toString():""+t},xa=()=>{for(var t=Array(256),i=0;i<256;++i)t[i]=String.fromCharCode(i);Pr=t},Pr,ee=t=>{for(var i="",n=t;ae[n>>>0];)i+=Pr[ae[n++>>>0]];return i},dt=e.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},$=t=>{throw new dt(t)};function Ga(t,i,n={}){var o=i.name;if(t||$(`type "${o}" must have a positive integer typeid pointer`),Re.hasOwnProperty(t)){if(n.ignoreDuplicateRegistrations)return;$(`Cannot register type '${o}' twice`)}if(Re[t]=i,delete ht[t],qe.hasOwnProperty(t)){var l=qe[t];delete qe[t],l.forEach(u=>u())}}function pe(t,i,n={}){return Ga(t,i,n)}var Dr=(t,i,n)=>{switch(i){case 1:return n?o=>j[o>>>0]:o=>ae[o>>>0];case 2:return n?o=>_e[o>>>1>>>0]:o=>Ze[o>>>1>>>0];case 4:return n?o=>P[o>>>2>>>0]:o=>F[o>>>2>>>0];case 8:return n?o=>ne[o>>>3]:o=>gr[o>>>3];default:throw TypeError(`invalid integer width (${i}): ${t}`)}};function Ra(t,i,n,o,l){t>>>=0,i>>>=0,n>>>=0,i=ee(i);var u=i.indexOf("u")!=-1;pe(t,{name:i,fromWireType:d=>d,toWireType:function(d,m){if(typeof m!="bigint"&&typeof m!="number")throw TypeError(`Cannot convert "${pt(m)}" to ${this.name}`);return typeof m=="number"&&(m=BigInt(m)),m},argPackAdvance:de,readValueFromPointer:Dr(i,n,!u),destructorFunction:null})}var de=8;function Fa(t,i,n,o){t>>>=0,i>>>=0,i=ee(i),pe(t,{name:i,fromWireType:function(l){return!!l},toWireType:function(l,u){return u?n:o},argPackAdvance:de,readValueFromPointer:function(l){return this.fromWireType(ae[l>>>0])},destructorFunction:null})}var La=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Nt=t=>{function i(n){return n.$$.ptrType.registeredClass.name}$(i(t)+" instance already deleted")},$t=!1,br=t=>{},Wa=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Er=t=>{--t.count.value,t.count.value===0&&Wa(t)},it=t=>typeof FinalizationRegistry>"u"?(it=i=>i,t):($t=new FinalizationRegistry(i=>{Er(i.$$)}),it=i=>{var n=i.$$;if(n.smartPtr){var o={$$:n};$t.register(i,o,i)}return i},br=i=>$t.unregister(i),it(t)),Ba=()=>{let t=mt.prototype;Object.assign(t,{isAliasOf(n){if(!(this instanceof mt)||!(n instanceof mt))return!1;var o=this.$$.ptrType.registeredClass,l=this.$$.ptr;n.$$=n.$$;for(var u=n.$$.ptrType.registeredClass,d=n.$$.ptr;o.baseClass;)l=o.upcast(l),o=o.baseClass;for(;u.baseClass;)d=u.upcast(d),u=u.baseClass;return o===u&&l===d},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var n=it(Object.create(Object.getPrototypeOf(this),{$$:{value:La(this.$$)}}));return n.$$.count.value+=1,n.$$.deleteScheduled=!1,n},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$("Object already scheduled for deletion"),br(this),Er(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});let i=Symbol.dispose;i&&(t[i]=t.delete)};function mt(){}var ft=(t,i)=>Object.defineProperty(i,"name",{value:t}),Tr={},Oa=(t,i,n)=>{if(t[i].overloadTable===void 0){var o=t[i];t[i]=function(...l){return t[i].overloadTable.hasOwnProperty(l.length)||$(`Function '${n}' called with an invalid number of arguments (${l.length}) - expects one of (${t[i].overloadTable})!`),t[i].overloadTable[l.length].apply(this,l)},t[i].overloadTable=[],t[i].overloadTable[o.argCount]=o}},Ut=(t,i,n)=>{e.hasOwnProperty(t)?((n===void 0||e[t].overloadTable!==void 0&&e[t].overloadTable[n]!==void 0)&&$(`Cannot register public name '${t}' twice`),Oa(e,t,t),e[t].overloadTable.hasOwnProperty(n)&&$(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),e[t].overloadTable[n]=i):(e[t]=i,e[t].argCount=n)},za=48,Na=57,$a=t=>{t=t.replace(/[^a-zA-Z0-9_]/g,"$");var i=t.charCodeAt(0);return i>=za&&i<=Na?`_${t}`:t};function Ua(t,i,n,o,l,u,d,m){this.name=t,this.constructor=i,this.instancePrototype=n,this.rawDestructor=o,this.baseClass=l,this.getActualType=u,this.upcast=d,this.downcast=m,this.pureVirtualFunctions=[]}var Ht=(t,i,n)=>{for(;i!==n;)i.upcast||$(`Expected null or instance of ${n.name}, got an instance of ${i.name}`),t=i.upcast(t),i=i.baseClass;return t};function Ha(t,i){if(i===null)return this.isReference&&$(`null is not a valid ${this.name}`),0;i.$$||$(`Cannot pass "${pt(i)}" as a ${this.name}`),i.$$.ptr||$(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=i.$$.ptrType.registeredClass;return Ht(i.$$.ptr,n,this.registeredClass)}function Ya(t,i){var n;if(i===null)return this.isReference&&$(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,n),n):0;(!i||!i.$$)&&$(`Cannot pass "${pt(i)}" as a ${this.name}`),i.$$.ptr||$(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&i.$$.ptrType.isConst&&$(`Cannot convert argument of type ${i.$$.smartPtrType?i.$$.smartPtrType.name:i.$$.ptrType.name} to parameter type ${this.name}`);var o=i.$$.ptrType.registeredClass;if(n=Ht(i.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(i.$$.smartPtr===void 0&&$("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:i.$$.smartPtrType===this?n=i.$$.smartPtr:$(`Cannot convert argument of type ${i.$$.smartPtrType?i.$$.smartPtrType.name:i.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=i.$$.smartPtr;break;case 2:if(i.$$.smartPtrType===this)n=i.$$.smartPtr;else{var l=i.clone();n=this.rawShare(n,ce.toHandle(()=>l.delete())),t!==null&&t.push(this.rawDestructor,n)}break;default:$("Unsupporting sharing policy")}return n}function Xa(t,i){if(i===null)return this.isReference&&$(`null is not a valid ${this.name}`),0;i.$$||$(`Cannot pass "${pt(i)}" as a ${this.name}`),i.$$.ptr||$(`Cannot pass deleted object as a pointer of type ${this.name}`),i.$$.ptrType.isConst&&$(`Cannot convert argument of type ${i.$$.ptrType.name} to parameter type ${this.name}`);var n=i.$$.ptrType.registeredClass;return Ht(i.$$.ptr,n,this.registeredClass)}var Ar=(t,i,n)=>{if(i===n)return t;if(n.baseClass===void 0)return null;var o=Ar(t,i,n.baseClass);return o===null?null:n.downcast(o)},ja={},Va=(t,i)=>{for(i===void 0&&$("ptr should not be undefined");t.baseClass;)i=t.upcast(i),t=t.baseClass;return i},qa=(t,i)=>(i=Va(t,i),ja[i]),wt=(t,i)=>((!i.ptrType||!i.ptr)&&ut("makeClassHandle requires ptr and ptrType"),!!i.smartPtrType!=!!i.smartPtr&&ut("Both smartPtrType and smartPtr must be specified"),i.count={value:1},it(Object.create(t,{$$:{value:i,writable:!0}})));function Ka(t){var i=this.getPointee(t);if(!i)return this.destructor(t),null;var n=qa(this.registeredClass,i);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=i,n.$$.smartPtr=t,n.clone();var o=n.clone();return this.destructor(t),o}function l(){return this.isSmartPointer?wt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:i,smartPtrType:this,smartPtr:t}):wt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var u=Tr[this.registeredClass.getActualType(i)];if(!u)return l.call(this);var d=this.isConst?u.constPointerType:u.pointerType,m=Ar(i,this.registeredClass,d.registeredClass);return m===null?l.call(this):this.isSmartPointer?wt(d.registeredClass.instancePrototype,{ptrType:d,ptr:m,smartPtrType:this,smartPtr:t}):wt(d.registeredClass.instancePrototype,{ptrType:d,ptr:m})}var Qa=()=>{Object.assign(kt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor?.(t)},argPackAdvance:de,readValueFromPointer:rt,fromWireType:Ka})};function kt(t,i,n,o,l,u,d,m,w,y,S){this.name=t,this.registeredClass=i,this.isReference=n,this.isConst=o,this.isSmartPointer=l,this.pointeeType=u,this.sharingPolicy=d,this.rawGetPointee=m,this.rawConstructor=w,this.rawShare=y,this.rawDestructor=S,!l&&i.baseClass===void 0?o?(this.toWireType=Ha,this.destructorFunction=null):(this.toWireType=Xa,this.destructorFunction=null):this.toWireType=Ya}var xr=(t,i,n)=>{e.hasOwnProperty(t)||ut("Replacing nonexistent public symbol"),e[t].overloadTable!==void 0&&n!==void 0?e[t].overloadTable[n]=i:(e[t]=i,e[t].argCount=n)},Ja=(t,i,n=[],o=!1)=>{var l=W(i)(...n);return t[0]=="p"?l>>>0:l},Za=(t,i,n=!1)=>(...o)=>Ja(t,i,o,n),Me=(t,i,n=!1)=>{t=ee(t);function o(){return t.includes("p")?Za(t,i,n):W(i)}var l=o();return typeof l!="function"&&$(`unknown function pointer with signature ${t}: ${i}`),l};class en extends Error{}var Gr=t=>{var i=xs(t),n=ee(i);return Fe(i),n},Rr=(t,i)=>{var n=[],o={};function l(u){if(!o[u]&&!Re[u]){if(ht[u]){ht[u].forEach(l);return}n.push(u),o[u]=!0}}throw i.forEach(l),new en(`${t}: `+n.map(Gr).join([", "]))};function tn(t,i,n,o,l,u,d,m,w,y,S,v,I){t>>>=0,i>>>=0,n>>>=0,o>>>=0,l>>>=0,u>>>=0,d>>>=0,m>>>=0,w>>>=0,y>>>=0,S>>>=0,v>>>=0,I>>>=0,S=ee(S),u=Me(l,u),m&&=Me(d,m),y&&=Me(w,y),I=Me(v,I);var D=$a(S);Ut(D,function(){Rr(`Cannot construct ${S} due to unbound types`,[o])}),zt([t,i,n],o?[o]:[],L=>{L=L[0];var Q,te;o?(Q=L.registeredClass,te=Q.instancePrototype):te=mt.prototype;var Z=ft(S,function(...Qt){if(Object.getPrototypeOf(this)!==le)throw new dt(`Use 'new' to construct ${S}`);if(V.constructor_body===void 0)throw new dt(`${S} has no accessible constructor`);var Kr=V.constructor_body[Qt.length];if(Kr===void 0)throw new dt(`Tried to invoke ctor of ${S} with invalid number of parameters (${Qt.length}) - expected (${Object.keys(V.constructor_body).toString()}) parameters instead!`);return Kr.apply(this,Qt)}),le=Object.create(te,{constructor:{value:Z}});Z.prototype=le;var V=new Ua(S,Z,le,I,Q,u,m,y);V.baseClass&&(V.baseClass.__derivedClasses??=[],V.baseClass.__derivedClasses.push(V));var me=new kt(S,V,!0,!1,!1),J=new kt(S+"*",V,!1,!1,!1),qr=new kt(S+" const*",V,!1,!0,!1);return Tr[t]={pointerType:J,constPointerType:qr},xr(D,Z),[me,J,qr]})}var Yt=[],ye=[];function Xt(t){t>>>=0,t>9&&--ye[t+1]===0&&(ye[t]=void 0,Yt.push(t))}var rn=()=>ye.length/2-5-Yt.length,an=()=>{ye.push(0,1,void 0,1,null,1,!0,1,!1,1),e.count_emval_handles=rn},ce={toValue:t=>(t||$(`Cannot use deleted val. handle = ${t}`),ye[t]),toHandle:t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let i=Yt.pop()||ye.length;return ye[i]=t,ye[i+1]=1,i}}}},nn={name:"emscripten::val",fromWireType:t=>{var i=ce.toValue(t);return Xt(t),i},toWireType:(t,i)=>ce.toHandle(i),argPackAdvance:de,readValueFromPointer:rt,destructorFunction:null};function sn(t){return t>>>=0,pe(t,nn)}var on=(t,i,n)=>{switch(i){case 1:return n?function(o){return this.fromWireType(j[o>>>0])}:function(o){return this.fromWireType(ae[o>>>0])};case 2:return n?function(o){return this.fromWireType(_e[o>>>1>>>0])}:function(o){return this.fromWireType(Ze[o>>>1>>>0])};case 4:return n?function(o){return this.fromWireType(P[o>>>2>>>0])}:function(o){return this.fromWireType(F[o>>>2>>>0])};default:throw TypeError(`invalid integer width (${i}): ${t}`)}};function _n(t,i,n,o){t>>>=0,i>>>=0,n>>>=0,i=ee(i);function l(){}l.values={},pe(t,{name:i,constructor:l,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,d)=>d.value,argPackAdvance:de,readValueFromPointer:on(i,n,o),destructorFunction:null}),Ut(i,l)}var jt=(t,i)=>{var n=Re[t];return n===void 0&&$(`${i} has unknown type ${Gr(t)}`),n};function cn(t,i,n){t>>>=0,i>>>=0;var o=jt(t,"enum");i=ee(i);var l=o.constructor,u=Object.create(o.constructor.prototype,{value:{value:n},constructor:{value:ft(`${o.name}_${i}`,function(){})}});l.values[n]=u,l[i]=u}var ln=(t,i)=>{switch(i){case 4:return function(n){return this.fromWireType(ot[n>>>2>>>0])};case 8:return function(n){return this.fromWireType(_t[n>>>3>>>0])};default:throw TypeError(`invalid float width (${i}): ${t}`)}},gn=function(t,i,n){t>>>=0,i>>>=0,n>>>=0,i=ee(i),pe(t,{name:i,fromWireType:o=>o,toWireType:(o,l)=>l,argPackAdvance:de,readValueFromPointer:ln(i,n),destructorFunction:null})};function hn(t){for(var i=1;i<t.length;++i)if(t[i]!==null&&t[i].destructorFunction===void 0)return!0;return!1}var un={ftf:function(t,i,n,o,l,u,d){return function(){var m=n(o);return u.fromWireType(m)}},ftft:function(t,i,n,o,l,u,d,m,w){return function(y){var S=m.toWireType(null,y),v=n(o,S);return w(S),u.fromWireType(v)}},ftfn:function(t,i,n,o,l,u,d,m){return function(w){var y=n(o,m.toWireType(null,w));return u.fromWireType(y)}},ftfnn:function(t,i,n,o,l,u,d,m,w){return function(y,S){var v=n(o,m.toWireType(null,y),w.toWireType(null,S));return u.fromWireType(v)}},fffn:function(t,i,n,o,l,u,d,m){return function(w){n(o,m.toWireType(null,w))}},ftfnnn:function(t,i,n,o,l,u,d,m,w,y){return function(S,v,I){var D=n(o,m.toWireType(null,S),w.toWireType(null,v),y.toWireType(null,I));return u.fromWireType(D)}},ftfnt:function(t,i,n,o,l,u,d,m,w,y){return function(S,v){var I=m.toWireType(null,S),D=w.toWireType(null,v),L=n(o,I,D);return y(D),u.fromWireType(L)}}};function pn(t,i,n,o){let l=[i?"t":"f",n?"t":"f",o?"t":"f"];for(let u=i?1:2;u<t.length;++u){let d=t[u],m="";m=d.destructorFunction===void 0?"u":d.destructorFunction===null?"n":"t",l.push(m)}return l.join("")}function dn(t,i,n,o,l,u){var d=i.length;d<2&&$("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var m=i[1]!==null&&n!==null,w=hn(i),y=i[0].name!=="void",S=[t,$,o,l,Ot,i[0],i[1]],v=0;v<d-2;++v)S.push(i[v+2]);if(!w)for(var v=m?1:2;v<i.length;++v)i[v].destructorFunction!==null&&S.push(i[v].destructorFunction);return ft(t,un[pn(i,m,y,u)](...S))}var mn=(t,i)=>{for(var n=[],o=0;o<t;o++)n.push(F[i+o*4>>>2>>>0]);return n},fn=t=>{t=t.trim();let i=t.indexOf("(");return i===-1?t:t.slice(0,i)};function wn(t,i,n,o,l,u,d,m){t>>>=0,n>>>=0,o>>>=0,l>>>=0,u>>>=0;var w=mn(i,n);t=ee(t),t=fn(t),l=Me(o,l,d),Ut(t,function(){Rr(`Cannot call ${t} due to unbound types`,w)},i-1),zt([],w,y=>{var S=[y[0],null].concat(y.slice(1));return xr(t,dn(t,S,null,l,u,d),i-1),[]})}function kn(t,i,n,o,l){t>>>=0,i>>>=0,n>>>=0,i=ee(i);var u=w=>w;if(o===0){var d=32-8*n;u=w=>w<<d>>>d}var m=i.includes("unsigned");pe(t,{name:i,fromWireType:u,toWireType:m?function(w,y){return this.name,y>>>0}:function(w,y){return this.name,y},argPackAdvance:de,readValueFromPointer:Dr(i,n,o!==0),destructorFunction:null})}function Mn(t,i,n){t>>>=0,n>>>=0;var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][i];function l(u){var d=F[u>>>2>>>0],m=F[u+4>>>2>>>0];return new o(j.buffer,m,d)}n=ee(n),pe(t,{name:n,fromWireType:l,argPackAdvance:de,readValueFromPointer:l},{ignoreDuplicateRegistrations:!0})}function yn(t,i){t>>>=0,i>>>=0,i=ee(i),pe(t,{name:i,fromWireType(n){for(var o=F[n>>>2>>>0],l=n+4,u,d,m=l,d=0;d<=o;++d){var w=l+d;if(d==o||ae[w>>>0]==0){var y=w-m,S=Bt(m,y);u===void 0?u=S:(u+="\0",u+=S),m=w+1}}return Fe(n),u},toWireType(n,o){o instanceof ArrayBuffer&&(o=new Uint8Array(o));var l,u=typeof o=="string";u||ArrayBuffer.isView(o)&&o.BYTES_PER_ELEMENT==1||$("Cannot pass non-string to std::string"),l=u?xe(o):o.length;var d=Vr(4+l+1),m=d+4;return F[d>>>2>>>0]=l,u?we(o,m,l+1):ae.set(o,m>>>0),n!==null&&n.push(Fe,d),d},argPackAdvance:de,readValueFromPointer:rt,destructorFunction(n){Fe(n)}})}var Fr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,vn=(t,i)=>{for(var n=t,o=n>>1,l=o+i/2;!(o>=l)&&Ze[o>>>0];)++o;if(n=o<<1,n-t>32&&Fr)return Fr.decode(ae.subarray(t>>>0,n>>>0));for(var u="",d=0;!(d>=i/2);++d){var m=_e[t+d*2>>>1>>>0];if(m==0)break;u+=String.fromCharCode(m)}return u},Sn=(t,i,n)=>{if(n??=2147483647,n<2)return 0;n-=2;for(var o=i,l=n<t.length*2?n/2:t.length,u=0;u<l;++u){var d=t.charCodeAt(u);_e[i>>>1>>>0]=d,i+=2}return _e[i>>>1>>>0]=0,i-o},Cn=t=>t.length*2,In=(t,i)=>{for(var n=0,o="";!(n>=i/4);){var l=P[t+n*4>>>2>>>0];if(l==0)break;if(++n,l>=65536){var u=l-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}else o+=String.fromCharCode(l)}return o},Pn=(t,i,n)=>{if(i>>>=0,n??=2147483647,n<4)return 0;for(var o=i,l=o+n-4,u=0;u<t.length;++u){var d=t.charCodeAt(u);if(d>=55296&&d<=57343){var m=t.charCodeAt(++u);d=65536+((d&1023)<<10)|m&1023}if(P[i>>>2>>>0]=d,i+=4,i+4>l)break}return P[i>>>2>>>0]=0,i-o},Dn=t=>{for(var i=0,n=0;n<t.length;++n){var o=t.charCodeAt(n);o>=55296&&o<=57343&&++n,i+=4}return i},bn=function(t,i,n){t>>>=0,i>>>=0,n>>>=0,n=ee(n);var o,l,u,d;i===2?(o=vn,l=Sn,d=Cn,u=m=>Ze[m>>>1>>>0]):i===4&&(o=In,l=Pn,d=Dn,u=m=>F[m>>>2>>>0]),pe(t,{name:n,fromWireType:m=>{for(var w=F[m>>>2>>>0],y,S=m+4,v=0;v<=w;++v){var I=m+4+v*i;if(v==w||u(I)==0){var D=I-S,L=o(S,D);y===void 0?y=L:(y+="\0",y+=L),S=I+i}}return Fe(m),y},toWireType:(m,w)=>{typeof w!="string"&&$(`Cannot pass non-string to C++ string type ${n}`);var y=d(w),S=Vr(4+y+i);return F[S>>>2>>>0]=y/i,l(w,S+4,y+i),m!==null&&m.push(Fe,S),S},argPackAdvance:de,readValueFromPointer:rt,destructorFunction(m){Fe(m)}})};function En(t,i,n,o,l,u){t>>>=0,i>>>=0,n>>>=0,o>>>=0,l>>>=0,u>>>=0,gt[t]={name:ee(i),rawConstructor:Me(n,o),rawDestructor:Me(l,u),fields:[]}}function Tn(t,i,n,o,l,u,d,m,w,y){t>>>=0,i>>>=0,n>>>=0,o>>>=0,l>>>=0,u>>>=0,d>>>=0,m>>>=0,w>>>=0,y>>>=0,gt[t].fields.push({fieldName:ee(i),getterReturnType:n,getter:Me(o,l),getterContext:u,setterArgumentType:d,setter:Me(m,w),setterContext:y})}var An=function(t,i){t>>>=0,i>>>=0,i=ee(i),pe(t,{isVoid:!0,name:i,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,o)=>{}})},Lr=0,xn=()=>{At=!1,Lr=0};function Gn(t){return t>>>=0,t?-52:0}var Rn=()=>{throw 1/0},Fn={},Wr=t=>{var i=Fn[t];return i===void 0?ee(t):i},Vt=[];function Ln(t,i,n,o,l){return t>>>=0,i>>>=0,n>>>=0,o>>>=0,l>>>=0,t=Vt[t],i=ce.toValue(i),n=Wr(n),t(i,i[n],o,l)}var Wn=t=>{var i=Vt.length;return Vt.push(t),i},Bn=(t,i)=>{for(var n=Array(t),o=0;o<t;++o)n[o]=jt(F[i+o*4>>>2>>>0],`parameter ${o}`);return n},On=(t,i,n)=>{var o=[],l=t.toWireType(o,n);return o.length&&(F[i>>>2>>>0]=ce.toHandle(o)),l},zn=Reflect.construct,Nn=function(t,i,n){i>>>=0;var o=Bn(t,i),l=o.shift();t--;var u=Array(t);return Wn(ft(`methodCaller<(${o.map(d=>d.name).join(", ")}) => ${l.name}>`,(d,m,w,y)=>{for(var S=0,v=0;v<t;++v)u[v]=o[v].readValueFromPointer(y+S),S+=o[v].argPackAdvance;return On(l,w,n===1?zn(m,u):m.apply(d,u))}))};function $n(t){t>>>=0,t>9&&(ye[t+1]+=1)}function Un(){return ce.toHandle([])}function Hn(t){return t>>>=0,ce.toHandle(Wr(t))}function Yn(){return ce.toHandle({})}function Xn(t){t>>>=0,Ot(ce.toValue(t)),Xt(t)}function jn(t,i,n){t>>>=0,i>>>=0,n>>>=0,t=ce.toValue(t),i=ce.toValue(i),n=ce.toValue(n),t[i]=n}function Vn(t,i){t>>>=0,i>>>=0,t=jt(t,"_emval_take_value");var n=t.readValueFromPointer(i);return ce.toHandle(n)}function qn(t,i){t=ke(t),i>>>=0;var n=new Date(t*1e3);P[i>>>2>>>0]=n.getUTCSeconds(),P[i+4>>>2>>>0]=n.getUTCMinutes(),P[i+8>>>2>>>0]=n.getUTCHours(),P[i+12>>>2>>>0]=n.getUTCDate(),P[i+16>>>2>>>0]=n.getUTCMonth(),P[i+20>>>2>>>0]=n.getUTCFullYear()-1900,P[i+24>>>2>>>0]=n.getUTCDay();var o=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),l=(n.getTime()-o)/(1e3*60*60*24)|0;P[i+28>>>2>>>0]=l}var Kn=t=>t%4==0&&(t%100!=0||t%400==0),Qn=[0,31,60,91,121,152,182,213,244,274,305,335],Jn=[0,31,59,90,120,151,181,212,243,273,304,334],Br=t=>(Kn(t.getFullYear())?Qn:Jn)[t.getMonth()]+t.getDate()-1;function Zn(t,i){t=ke(t),i>>>=0;var n=new Date(t*1e3);P[i>>>2>>>0]=n.getSeconds(),P[i+4>>>2>>>0]=n.getMinutes(),P[i+8>>>2>>>0]=n.getHours(),P[i+12>>>2>>>0]=n.getDate(),P[i+16>>>2>>>0]=n.getMonth(),P[i+20>>>2>>>0]=n.getFullYear()-1900,P[i+24>>>2>>>0]=n.getDay();var o=Br(n)|0;P[i+28>>>2>>>0]=o,P[i+36>>>2>>>0]=-(n.getTimezoneOffset()*60);var l=new Date(n.getFullYear(),0,1),u=new Date(n.getFullYear(),6,1).getTimezoneOffset(),d=l.getTimezoneOffset(),m=(u!=d&&n.getTimezoneOffset()==Math.min(d,u))|0;P[i+32>>>2>>>0]=m}var es=function(t){t>>>=0;var i=(()=>{var n=new Date(P[t+20>>>2>>>0]+1900,P[t+16>>>2>>>0],P[t+12>>>2>>>0],P[t+8>>>2>>>0],P[t+4>>>2>>>0],P[t>>>2>>>0],0),o=P[t+32>>>2>>>0],l=n.getTimezoneOffset(),u=new Date(n.getFullYear(),0,1),d=new Date(n.getFullYear(),6,1).getTimezoneOffset(),m=u.getTimezoneOffset(),w=Math.min(m,d);if(o<0)P[t+32>>>2>>>0]=+(d!=m&&w==l);else if(o>0!=(w==l)){var y=o>0?w:Math.max(m,d);n.setTime(n.getTime()+(y-l)*6e4)}P[t+24>>>2>>>0]=n.getDay();var S=Br(n)|0;P[t+28>>>2>>>0]=S,P[t>>>2>>>0]=n.getSeconds(),P[t+4>>>2>>>0]=n.getMinutes(),P[t+8>>>2>>>0]=n.getHours(),P[t+12>>>2>>>0]=n.getDate(),P[t+16>>>2>>>0]=n.getMonth(),P[t+20>>>2>>>0]=n.getYear();var v=n.getTime();return isNaN(v)?-1:v/1e3})();return BigInt(i)};function ts(t,i,n,o,l,u,d){t>>>=0,l=ke(l),u>>>=0,d>>>=0;try{if(isNaN(l))return 61;var m=x.getStreamFromFD(o),w=h.mmap(m,t,l,i,n),y=w.ptr;return P[u>>>2>>>0]=w.allocated,F[d>>>2>>>0]=y,0}catch(S){if(h===void 0||S.name!=="ErrnoError")throw S;return-S.errno}}function rs(t,i,n,o,l,u){t>>>=0,i>>>=0,u=ke(u);try{var d=x.getStreamFromFD(l);n&2&&x.doMsync(t,d,i,o,u)}catch(m){if(h===void 0||m.name!=="ErrnoError")throw m;return-m.errno}}var is=function(t,i,n,o){t>>>=0,i>>>=0,n>>>=0,o>>>=0;var l=new Date().getFullYear(),u=new Date(l,0,1),d=new Date(l,6,1),m=u.getTimezoneOffset(),w=d.getTimezoneOffset(),y=Math.max(m,w);F[t>>>2>>>0]=y*60,P[i>>>2>>>0]=+(m!=w);var S=D=>{var L=D>=0?"-":"+",Q=Math.abs(D);return`UTC${L}${String(Math.floor(Q/60)).padStart(2,"0")}${String(Q%60).padStart(2,"0")}`},v=S(m),I=S(w);w<m?(we(v,n,17),we(I,o,17)):(we(v,o,17),we(I,n,17))},Or=()=>performance.now(),zr=()=>Date.now(),as=t=>t>=0&&t<=3;function ns(t,i,n){if(n>>>=0,!as(t))return 28;var o;t===0?o=zr():o=Or();var l=Math.round(o*1e3*1e3);return ne[n>>>3]=BigInt(l),0}var Nr=()=>4294901760;function ss(){return Nr()}var os=t=>{var i=(t-st.buffer.byteLength+65535)/65536|0;try{return st.grow(i),ur(),1}catch{}};function _s(t){t>>>=0;var i=ae.length,n=Nr();if(t>n)return!1;for(var o=1;o<=4;o*=2){var l=i*(1+.2/o);if(l=Math.min(l,t+100663296),os(Math.min(n,Sr(Math.max(t,l),65536))))return!0}return!1}var qt={},cs=()=>A||"./this.program",at=()=>{if(!at.strings){var t={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",_:cs()};for(var i in qt)qt[i]===void 0?delete t[i]:t[i]=qt[i];var n=[];for(var i in t)n.push(`${i}=${t[i]}`);at.strings=n}return at.strings};function ls(t,i){t>>>=0,i>>>=0;var n=0,o=0;for(var l of at()){var u=i+n;F[t+o>>>2>>>0]=u,n+=we(l,u,1/0)+1,o+=4}return 0}function gs(t,i){t>>>=0,i>>>=0;var n=at();F[t>>>2>>>0]=n.length;var o=0;for(var l of n)o+=xe(l)+1;return F[i>>>2>>>0]=o,0}var hs=()=>At||Lr>0,$r=t=>{hs()||(e.onExit?.(t),bt=!0),U(t,new $i(t))},us=(t,i)=>{$r(t)};function ps(t){try{var i=x.getStreamFromFD(t);return h.close(i),0}catch(n){if(h===void 0||n.name!=="ErrnoError")throw n;return n.errno}}function ds(t,i){i>>>=0;try{var n=0,o=0,l=0,u=x.getStreamFromFD(t),d=u.tty?2:h.isDir(u.mode)?3:h.isLink(u.mode)?7:4;return j[i>>>0]=d,_e[i+2>>>1>>>0]=l,ne[i+8>>>3]=BigInt(n),ne[i+16>>>3]=BigInt(o),0}catch(m){if(h===void 0||m.name!=="ErrnoError")throw m;return m.errno}}var Ur=(t,i,n,o)=>{for(var l=0,u=0;u<n;u++){var d=F[i>>>2>>>0],m=F[i+4>>>2>>>0];i+=8;var w=h.read(t,j,d,m,o);if(w<0)return-1;if(l+=w,w<m)break;o!==void 0&&(o+=w)}return l};function ms(t,i,n,o,l){i>>>=0,n>>>=0,o=ke(o),l>>>=0;try{if(isNaN(o))return 61;var u=Ur(x.getStreamFromFD(t),i,n,o);return F[l>>>2>>>0]=u,0}catch(d){if(h===void 0||d.name!=="ErrnoError")throw d;return d.errno}}var Hr=(t,i,n,o)=>{for(var l=0,u=0;u<n;u++){var d=F[i>>>2>>>0],m=F[i+4>>>2>>>0];i+=8;var w=h.write(t,j,d,m,o);if(w<0)return-1;if(l+=w,w<m)break;o!==void 0&&(o+=w)}return l};function fs(t,i,n,o,l){i>>>=0,n>>>=0,o=ke(o),l>>>=0;try{if(isNaN(o))return 61;var u=Hr(x.getStreamFromFD(t),i,n,o);return F[l>>>2>>>0]=u,0}catch(d){if(h===void 0||d.name!=="ErrnoError")throw d;return d.errno}}function ws(t,i,n,o){i>>>=0,n>>>=0,o>>>=0;try{var l=Ur(x.getStreamFromFD(t),i,n);return F[o>>>2>>>0]=l,0}catch(u){if(h===void 0||u.name!=="ErrnoError")throw u;return u.errno}}function ks(t,i,n,o){i=ke(i),o>>>=0;try{if(isNaN(i))return 61;var l=x.getStreamFromFD(t);return h.llseek(l,i,n),ne[o>>>3]=BigInt(l.position),l.getdents&&i===0&&n===0&&(l.getdents=null),0}catch(u){if(h===void 0||u.name!=="ErrnoError")throw u;return u.errno}}function Ms(t){try{var i=x.getStreamFromFD(t);return i.stream_ops?.fsync?i.stream_ops.fsync(i):0}catch(n){if(h===void 0||n.name!=="ErrnoError")throw n;return n.errno}}function ys(t,i,n,o){i>>>=0,n>>>=0,o>>>=0;try{var l=Hr(x.getStreamFromFD(t),i,n);return F[o>>>2>>>0]=l,0}catch(u){if(h===void 0||u.name!=="ErrnoError")throw u;return u.errno}}function vs(t){return t>>>=0,t}function Ss(t,i){t>>>=0,i>>>=0;try{return Rt(ae.subarray(t>>>0,t+i>>>0)),0}catch(n){if(h===void 0||n.name!=="ErrnoError")throw n;return n.errno}}var Yr=(t,i)=>{t<128?i.push(t):i.push(t%128|128,t>>7)},Cs=t=>{for(var i={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},n={parameters:[],results:t[0]=="v"?[]:[i[t[0]]]},o=1;o<t.length;++o)n.parameters.push(i[t[o]]);return n},Is=(t,i)=>{var n=t.slice(0,1),o=t.slice(1),l={i:127,p:127,j:126,f:125,d:124,e:111};i.push(96),Yr(o.length,i);for(var u of o)i.push(l[u]);n=="v"?i.push(0):i.push(1,l[n])},Ps=(t,i)=>{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(Cs(i),t);var n=[1];Is(i,n);var o=[0,97,115,109,1,0,0,0,1];Yr(n.length,o),o.push(...n),o.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var l=new WebAssembly.Module(new Uint8Array(o));return new WebAssembly.Instance(l,{e:{f:t}}).exports.f},Ds=(t,i)=>{if(Ke)for(var n=t;n<t+i;n++){var o=W(n);o&&Ke.set(o,n)}},Ke,bs=t=>(Ke||(Ke=new WeakMap,Ds(0,Ae.length)),Ke.get(t)||0),Xr=[],Es=()=>{if(Xr.length)return Xr.pop();try{Ae.grow(1)}catch(t){throw t instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":t}return Ae.length-1},jr=(t,i)=>{Ae.set(t,i),xt[t]=Ae.get(t)},Ts=(t,i)=>{var n=bs(t);if(n)return n;var o=Es();try{jr(o,t)}catch(l){if(!(l instanceof TypeError))throw l;jr(o,Ps(t,i))}return Ke.set(t,o),o};h.createPreloadedFile=_a,h.staticInit(),R.doesNotExistError=new h.ErrnoError(44),R.doesNotExistError.stack="<generic error, no stack>",xa(),Ba(),Qa(),an(),e.noExitRuntime&&(At=e.noExitRuntime),e.preloadPlugins&&(Ir=e.preloadPlugins),e.print&&(He=e.print),e.printErr&&(Se=e.printErr),e.wasmBinary&&(Je=e.wasmBinary),e.arguments&&e.arguments,e.thisProgram&&(A=e.thisProgram),e.addFunction=Ts,e.setValue=Xi,e.getValue=Yi,e.UTF8ToString=Bt,e.stringToUTF8=we,e.lengthBytesUTF8=xe,e.FS=h;var As={cb:qi,za:Ki,R:Qi,z:Ji,Ba:Zi,a:ea,y:ta,sa:la,qa:ga,ta:ha,$:ua,pa,H:da,oa:ma,ja:fa,bb:wa,wa:ka,la:Ma,ma:ya,F:va,ab:Sa,_a:Ca,$a:Ia,na:Pa,Za:Da,_:ba,ua:Ea,Oa:Aa,U:Ra,Ia:Fa,M:tn,Ga:sn,x:_n,e:cn,T:gn,m:wn,w:kn,p:Mn,Ha:yn,J:bn,Pa:En,L:Tn,Ja:An,db:xn,Xa:Gn,Va:Rn,La:Ln,l:Xt,Ma:Nn,Na:$n,K:Un,t:Hn,D:Yn,Ka:Xn,r:jn,o:Vn,ca:qn,da:Zn,ea:es,aa:ts,ba:rs,fa:is,ra:ns,P:zr,Ya:ss,E:Or,Wa:_s,xa:ls,ya:gs,C:us,B:ps,O:ds,fb:ms,eb:fs,Q:ws,ga:ks,ka:Ms,G:ys,Sa:ao,A:eo,c:Hs,d:Us,h:$s,j:Vs,Z:io,b:Js,N:oo,n:Qs,Ra:_o,Qa:go,Fa:mo,Ea:fo,s:Zs,Ua:to,I:wo,u:Ks,ha:qs,v:no,k:Ys,f:Xs,Y:co,X:lo,i:Ns,g:js,q:so,V:uo,S:po,Da:ko,W:ho,Ca:Mo,Ta:ro,Aa:vs,va:$r,ia:Ss},s=await Ni();s.hb;var xs=s.ib;e._MagickColor_Create=s.jb,e._MagickColor_Dispose=s.kb,e._MagickColor_Count_Get=s.lb,e._MagickColor_Red_Get=s.mb,e._MagickColor_Red_Set=s.nb,e._MagickColor_Green_Get=s.ob,e._MagickColor_Green_Set=s.pb,e._MagickColor_Blue_Get=s.qb,e._MagickColor_Blue_Set=s.rb,e._MagickColor_Alpha_Get=s.sb,e._MagickColor_Alpha_Set=s.tb,e._MagickColor_Black_Get=s.ub,e._MagickColor_Black_Set=s.vb,e._MagickColor_IsCMYK_Get=s.wb,e._MagickColor_IsCMYK_Set=s.xb,e._MagickColor_Clone=s.yb,e._MagickColor_FuzzyEquals=s.zb,e._MagickColor_Initialize=s.Ab,e._MagickColorCollection_DisposeList=s.Cb,e._MagickColorCollection_GetInstance=s.Db,e._DrawingWand_Create=s.Eb,e._DrawingWand_Dispose=s.Fb,e._DrawingWand_Affine=s.Gb,e._DrawingWand_Alpha=s.Hb,e._DrawingWand_Arc=s.Ib,e._DrawingWand_Bezier=s.Jb,e._DrawingWand_BorderColor=s.Kb,e._DrawingWand_Circle=s.Lb,e._DrawingWand_ClipPath=s.Mb,e._DrawingWand_ClipRule=s.Nb,e._DrawingWand_ClipUnits=s.Ob,e._DrawingWand_Color=s.Pb,e._DrawingWand_Composite=s.Qb,e._DrawingWand_Density=s.Rb,e._DrawingWand_Ellipse=s.Sb,e._DrawingWand_FillColor=s.Tb,e._DrawingWand_FillOpacity=s.Ub,e._DrawingWand_FillPatternUrl=s.Vb,e._DrawingWand_FillRule=s.Wb,e._DrawingWand_Font=s.Xb,e._DrawingWand_FontFamily=s.Yb,e._DrawingWand_FontPointSize=s.Zb,e._DrawingWand_FontTypeMetrics=s._b,e._TypeMetric_Create=s.$b,e._DrawingWand_Gravity=s.ac,e._DrawingWand_Line=s.bc,e._DrawingWand_PathArcAbs=s.cc,e._DrawingWand_PathArcRel=s.dc,e._DrawingWand_PathClose=s.ec,e._DrawingWand_PathCurveToAbs=s.fc,e._DrawingWand_PathCurveToRel=s.gc,e._DrawingWand_PathFinish=s.hc,e._DrawingWand_PathLineToAbs=s.ic,e._DrawingWand_PathLineToHorizontalAbs=s.jc,e._DrawingWand_PathLineToHorizontalRel=s.kc,e._DrawingWand_PathLineToRel=s.lc,e._DrawingWand_PathLineToVerticalAbs=s.mc,e._DrawingWand_PathLineToVerticalRel=s.nc,e._DrawingWand_PathMoveToAbs=s.oc,e._DrawingWand_PathMoveToRel=s.pc,e._DrawingWand_PathQuadraticCurveToAbs=s.qc,e._DrawingWand_PathQuadraticCurveToRel=s.rc,e._DrawingWand_PathSmoothCurveToAbs=s.sc,e._DrawingWand_PathSmoothCurveToRel=s.tc,e._DrawingWand_PathSmoothQuadraticCurveToAbs=s.uc,e._DrawingWand_PathSmoothQuadraticCurveToRel=s.vc,e._DrawingWand_PathStart=s.wc,e._DrawingWand_Point=s.xc,e._DrawingWand_Polygon=s.yc,e._DrawingWand_Polyline=s.zc,e._DrawingWand_PopClipPath=s.Ac,e._DrawingWand_PopGraphicContext=s.Bc,e._DrawingWand_PopPattern=s.Cc,e._DrawingWand_PushClipPath=s.Dc,e._DrawingWand_PushGraphicContext=s.Ec,e._DrawingWand_PushPattern=s.Fc,e._DrawingWand_Rectangle=s.Gc,e._DrawingWand_Render=s.Hc,e._DrawingWand_Rotation=s.Ic,e._DrawingWand_RoundRectangle=s.Jc,e._DrawingWand_Scaling=s.Kc,e._DrawingWand_SkewX=s.Lc,e._DrawingWand_SkewY=s.Mc,e._DrawingWand_StrokeAntialias=s.Nc,e._DrawingWand_StrokeColor=s.Oc,e._DrawingWand_StrokeDashArray=s.Pc,e._DrawingWand_StrokeDashOffset=s.Qc,e._DrawingWand_StrokeLineCap=s.Rc,e._DrawingWand_StrokeLineJoin=s.Sc,e._DrawingWand_StrokeMiterLimit=s.Tc,e._DrawingWand_StrokeOpacity=s.Uc,e._DrawingWand_StrokePatternUrl=s.Vc,e._DrawingWand_StrokeWidth=s.Wc,e._DrawingWand_Text=s.Xc,e._DrawingWand_TextAlignment=s.Yc,e._DrawingWand_TextAntialias=s.Zc,e._DrawingWand_TextDecoration=s._c,e._DrawingWand_TextDirection=s.$c,e._DrawingWand_TextEncoding=s.ad,e._DrawingWand_TextInterlineSpacing=s.bd,e._DrawingWand_TextInterwordSpacing=s.cd,e._DrawingWand_TextKerning=s.dd,e._DrawingWand_TextUnderColor=s.ed,e._DrawingWand_Translation=s.fd,e._DrawingWand_Viewbox=s.gd,e._MagickExceptionHelper_Description=s.hd,e._MagickExceptionHelper_Dispose=s.id,e._MagickExceptionHelper_Related=s.jd,e._MagickExceptionHelper_RelatedCount=s.kd,e._MagickExceptionHelper_Message=s.ld,e._MagickExceptionHelper_Severity=s.md,e._PdfInfo_PageCount=s.nd,e._Environment_Initialize=s.od,e._Environment_GetEnv=s.pd,e._Environment_SetEnv=s.qd,e._MagickMemory_Relinquish=s.rd,e._Magick_Delegates_Get=s.sd,e._Magick_Features_Get=s.td,e._Magick_ImageMagickVersion_Get=s.ud,e._Magick_GetFonts=s.vd,e._Magick_GetFontFamily=s.wd,e._Magick_GetFontName=s.xd,e._Magick_GetWindowsResource=s.yd,e._Magick_DisposeFonts=s.zd,e._Magick_ResetRandomSeed=s.Ad,e._Magick_SetDefaultFontFile=s.Bd,e._Magick_SetRandomSeed=s.Cd,e._Magick_SetLogDelegate=s.Dd,e._Magick_SetLogEvents=s.Ed,e._MagickFormatInfo_CreateList=s.Fd,e._MagickFormatInfo_DisposeList=s.Gd,e._MagickFormatInfo_CanReadMultithreaded_Get=s.Hd,e._MagickFormatInfo_CanWriteMultithreaded_Get=s.Id,e._MagickFormatInfo_Description_Get=s.Jd,e._MagickFormatInfo_Format_Get=s.Kd,e._MagickFormatInfo_MimeType_Get=s.Ld,e._MagickFormatInfo_Module_Get=s.Md,e._MagickFormatInfo_SupportsMultipleFrames_Get=s.Nd,e._MagickFormatInfo_SupportsReading_Get=s.Od,e._MagickFormatInfo_SupportsWriting_Get=s.Pd,e._MagickFormatInfo_GetInfo=s.Qd,e._MagickFormatInfo_GetInfoByName=s.Rd,e._MagickFormatInfo_GetInfoWithBlob=s.Sd,e._MagickFormatInfo_Unregister=s.Td,e._MagickImage_Create=s.Ud,e._MagickImage_Dispose=s.Vd,e._MagickImage_AnimationDelay_Get=s.Wd,e._MagickImage_AnimationDelay_Set=s.Xd,e._MagickImage_AnimationIterations_Get=s.Yd,e._MagickImage_AnimationIterations_Set=s.Zd,e._MagickImage_AnimationTicksPerSecond_Get=s._d,e._MagickImage_AnimationTicksPerSecond_Set=s.$d,e._MagickImage_BackgroundColor_Get=s.ae,e._MagickImage_BackgroundColor_Set=s.be,e._MagickImage_BaseHeight_Get=s.ce,e._MagickImage_BaseWidth_Get=s.de,e._MagickImage_BlackPointCompensation_Get=s.ee,e._MagickImage_BlackPointCompensation_Set=s.fe,e._MagickImage_BorderColor_Get=s.ge,e._MagickImage_BorderColor_Set=s.he,e._MagickImage_BoundingBox_Get=s.ie,e._MagickRectangle_Create=s.je,e._MagickImage_ChannelCount_Get=s.ke,e._MagickImage_ChromaBlue_Get=s.le,e._PrimaryInfo_Create=s.me,e._MagickImage_ChromaBlue_Set=s.ne,e._MagickImage_ChromaGreen_Get=s.oe,e._MagickImage_ChromaGreen_Set=s.pe,e._MagickImage_ChromaRed_Get=s.qe,e._MagickImage_ChromaRed_Set=s.re,e._MagickImage_ChromaWhite_Get=s.se,e._MagickImage_ChromaWhite_Set=s.te,e._MagickImage_ClassType_Get=s.ue,e._MagickImage_ClassType_Set=s.ve,e._QuantizeSettings_Create=s.we,e._QuantizeSettings_Dispose=s.xe,e._MagickImage_ColorFuzz_Get=s.ye,e._MagickImage_ColorFuzz_Set=s.ze,e._MagickImage_ColormapSize_Get=s.Ae,e._MagickImage_ColormapSize_Set=s.Be,e._MagickImage_ColorSpace_Get=s.Ce,e._MagickImage_ColorSpace_Set=s.De,e._MagickImage_ColorType_Get=s.Ee,e._MagickImage_ColorType_Set=s.Fe,e._MagickImage_Compose_Get=s.Ge,e._MagickImage_Compose_Set=s.He,e._MagickImage_Compression_Get=s.Ie,e._MagickImage_Compression_Set=s.Je,e._MagickImage_Depth_Get=s.Ke,e._MagickImage_Depth_Set=s.Le,e._MagickImage_EncodingGeometry_Get=s.Me,e._MagickImage_Endian_Get=s.Ne,e._MagickImage_Endian_Set=s.Oe,e._MagickImage_FileName_Get=s.Pe,e._MagickImage_FileName_Set=s.Qe,e._MagickImage_FilterType_Get=s.Re,e._MagickImage_FilterType_Set=s.Se,e._MagickImage_Format_Get=s.Te,e._MagickImage_Format_Set=s.Ue,e._MagickImage_Gamma_Get=s.Ve,e._MagickImage_GifDisposeMethod_Get=s.We,e._MagickImage_GifDisposeMethod_Set=s.Xe,e._MagickImage_HasAlpha_Get=s.Ye,e._MagickImage_HasAlpha_Set=s.Ze,e._MagickImage_Height_Get=s._e,e._MagickImage_Interlace_Get=s.$e,e._MagickImage_Interlace_Set=s.af,e._MagickImage_Interpolate_Get=s.bf,e._MagickImage_Interpolate_Set=s.cf,e._MagickImage_IsOpaque_Get=s.df,e._MagickImage_MatteColor_Get=s.ef,e._MagickImage_MatteColor_Set=s.ff,e._MagickImage_MeanErrorPerPixel_Get=s.gf,e._MagickImage_MetaChannelCount_Get=s.hf,e._MagickImage_MetaChannelCount_Set=s.jf,e._MagickImage_NormalizedMaximumError_Get=s.kf,e._MagickImage_NormalizedMeanError_Get=s.lf,e._MagickImage_Orientation_Get=s.mf,e._MagickImage_Orientation_Set=s.nf,e._MagickImage_Page_Get=s.of,e._MagickImage_Page_Set=s.pf,e._MagickImage_Quality_Get=s.qf,e._MagickImage_Quality_Set=s.rf,e._MagickImage_RenderingIntent_Get=s.sf,e._MagickImage_RenderingIntent_Set=s.tf,e._MagickImage_ResolutionUnits_Get=s.uf,e._MagickImage_ResolutionUnits_Set=s.vf,e._MagickImage_ResolutionX_Get=s.wf,e._MagickImage_ResolutionX_Set=s.xf,e._MagickImage_ResolutionY_Get=s.yf,e._MagickImage_ResolutionY_Set=s.zf,e._MagickImage_Signature_Get=s.Af,e._MagickImage_TotalColors_Get=s.Bf,e._MagickImage_VirtualPixelMethod_Get=s.Cf,e._MagickImage_VirtualPixelMethod_Set=s.Df,e._MagickImage_Width_Get=s.Ef,e._MagickImage_AdaptiveBlur=s.Ff,e._MagickImage_AdaptiveResize=s.Gf,e._MagickImage_AdaptiveSharpen=s.Hf,e._MagickImage_AdaptiveThreshold=s.If,e._MagickImage_AddNoise=s.Jf,e._MagickImage_AffineTransform=s.Kf,e._MagickImage_Annotate=s.Lf,e._MagickImage_AutoGamma=s.Mf,e._MagickImage_AutoLevel=s.Nf,e._MagickImage_AutoOrient=s.Of,e._MagickImage_AutoThreshold=s.Pf,e._MagickImage_BilateralBlur=s.Qf,e._MagickImage_BlackThreshold=s.Rf,e._MagickImage_BlueShift=s.Sf,e._MagickImage_Blur=s.Tf,e._MagickImage_Border=s.Uf,e._MagickImage_BrightnessContrast=s.Vf,e._MagickImage_CannyEdge=s.Wf,e._MagickImage_ChannelOffset=s.Xf,e._MagickImage_Charcoal=s.Yf,e._MagickImage_Chop=s.Zf,e._MagickImage_Clahe=s._f,e._MagickImage_Clamp=s.$f,e._MagickImage_ClipPath=s.ag,e._MagickImage_Clone=s.bg,e._MagickImage_CloneArea=s.cg,e._MagickImage_Clut=s.dg,e._MagickImage_ColorDecisionList=s.eg,e._MagickImage_Colorize=s.fg,e._MagickImage_ColorMatrix=s.gg,e._MagickImage_ColorThreshold=s.hg,e._MagickImage_Compare=s.ig,e._MagickImage_CompareDistortion=s.jg,e._MagickImage_Composite=s.kg,e._MagickImage_CompositeGravity=s.lg,e._MagickImage_ConnectedComponents=s.mg,e._MagickImage_Contrast=s.ng,e._MagickImage_ContrastStretch=s.og,e._MagickImage_ConvexHull=s.pg,e._MagickImage_Convolve=s.qg,e._MagickImage_CopyPixels=s.rg,e._MagickImage_Crop=s.sg,e._MagickImage_CropToTiles=s.tg,e._MagickImage_CycleColormap=s.ug,e._MagickImage_Decipher=s.vg,e._MagickImage_Deskew=s.wg,e._MagickImage_Despeckle=s.xg,e._MagickImage_DetermineBitDepth=s.yg,e._MagickImage_DetermineColorType=s.zg,e._MagickImage_Distort=s.Ag,e._MagickImage_Edge=s.Bg,e._MagickImage_Emboss=s.Cg,e._MagickImage_Encipher=s.Dg,e._MagickImage_Enhance=s.Eg,e._MagickImage_Equalize=s.Fg,e._MagickImage_Equals=s.Gg,e._MagickImage_EvaluateFunction=s.Hg,e._MagickImage_EvaluateGeometry=s.Ig,e._MagickImage_EvaluateOperator=s.Jg,e._MagickImage_Extent=s.Kg,e._MagickImage_Flip=s.Lg,e._MagickImage_FloodFill=s.Mg,e._MagickImage_Flop=s.Ng,e._MagickImage_FontTypeMetrics=s.Og,e._MagickImage_FormatExpression=s.Pg,e._MagickImage_Frame=s.Qg,e._MagickImage_Fx=s.Rg,e._MagickImage_GammaCorrect=s.Sg,e._MagickImage_GaussianBlur=s.Tg,e._MagickImage_GetArtifact=s.Ug,e._MagickImage_GetAttribute=s.Vg,e._MagickImage_GetColormapColor=s.Wg,e._MagickImage_GetNext=s.Xg,e._MagickImage_GetNextArtifactName=s.Yg,e._MagickImage_GetNextAttributeName=s.Zg,e._MagickImage_GetNextProfileName=s._g,e._MagickImage_GetProfile=s.$g,e._MagickImage_GetReadMask=s.ah,e._MagickImage_GetWriteMask=s.bh,e._MagickImage_Grayscale=s.ch,e._MagickImage_HaldClut=s.dh,e._MagickImage_HasChannel=s.eh,e._MagickImage_HasProfile=s.fh,e._MagickImage_Histogram=s.gh,e._MagickImage_HoughLine=s.hh,e._MagickImage_Implode=s.ih,e._MagickImage_ImportPixels=s.jh,e._MagickImage_Integral=s.kh,e._MagickImage_InterpolativeResize=s.lh,e._MagickImage_InverseLevel=s.mh,e._MagickImage_Kmeans=s.nh,e._MagickImage_Kuwahara=s.oh,e._MagickImage_Level=s.ph,e._MagickImage_LevelColors=s.qh,e._MagickImage_LinearStretch=s.rh,e._MagickImage_LiquidRescale=s.sh,e._MagickImage_LocalContrast=s.th,e._MagickImage_Magnify=s.uh,e._MagickImage_MeanShift=s.vh,e._MagickImage_Minify=s.wh,e._MagickImage_MinimumBoundingBox=s.xh,e._MagickImage_Modulate=s.yh,e._MagickImage_Moments=s.zh,e._MagickImage_Morphology=s.Ah,e._MagickImage_MotionBlur=s.Bh,e._MagickImage_Negate=s.Ch,e._MagickImage_Normalize=s.Dh,e._MagickImage_OilPaint=s.Eh,e._MagickImage_Opaque=s.Fh,e._MagickImage_OrderedDither=s.Gh,e._MagickImage_Perceptible=s.Hh,e._MagickImage_PerceptualHash=s.Ih,e._MagickImage_Quantize=s.Jh,e._MagickImage_Polaroid=s.Kh,e._MagickImage_Posterize=s.Lh,e._MagickImage_RaiseOrLower=s.Mh,e._MagickImage_RandomThreshold=s.Nh,e._MagickImage_RangeThreshold=s.Oh,e._MagickImage_ReadBlob=s.Ph,e._MagickImage_ReadFile=s.Qh,e._MagickImage_ReadPixels=s.Rh,e._MagickImage_ReadStream=s.Sh,e._MagickImage_RegionMask=s.Th,e._MagickImage_Remap=s.Uh,e._MagickImage_RemoveArtifact=s.Vh,e._MagickImage_RemoveAttribute=s.Wh,e._MagickImage_RemoveProfile=s.Xh,e._MagickImage_ResetArtifactIterator=s.Yh,e._MagickImage_ResetAttributeIterator=s.Zh,e._MagickImage_ResetProfileIterator=s._h,e._MagickImage_Resample=s.$h,e._MagickImage_Resize=s.ai,e._MagickImage_Roll=s.bi,e._MagickImage_Rotate=s.ci,e._MagickImage_RotationalBlur=s.di,e._MagickImage_Sample=s.ei,e._MagickImage_Scale=s.fi,e._MagickImage_Segment=s.gi,e._MagickImage_SelectiveBlur=s.hi,e._MagickImage_Separate=s.ii,e._MagickImage_SepiaTone=s.ji,e._MagickImage_SetAlpha=s.ki,e._MagickImage_SetArtifact=s.li,e._MagickImage_SetAttribute=s.mi,e._MagickImage_SetBitDepth=s.ni,e._MagickImage_SetClientData=s.oi,e._MagickImage_SetColormapColor=s.pi,e._MagickImage_SetColorMetric=s.qi,e._MagickImage_SetNext=s.ri,e._MagickImage_SetProfile=s.si,e._MagickImage_SetProgressDelegate=s.ti,e._MagickImage_SetReadMask=s.ui,e._MagickImage_SetWriteMask=s.vi,e._MagickImage_Shade=s.wi,e._MagickImage_Shadow=s.xi,e._MagickImage_Sharpen=s.yi,e._MagickImage_Shave=s.zi,e._MagickImage_Shear=s.Ai,e._MagickImage_SigmoidalContrast=s.Bi,e._MagickImage_SparseColor=s.Ci,e._MagickImage_Spread=s.Di,e._MagickImage_Sketch=s.Ei,e._MagickImage_Solarize=s.Fi,e._MagickImage_SortPixels=s.Gi,e._MagickImage_Splice=s.Hi,e._MagickImage_Statistic=s.Ii,e._MagickImage_Statistics=s.Ji,e._MagickImage_Stegano=s.Ki,e._MagickImage_Stereo=s.Li,e._MagickImage_Strip=s.Mi,e._MagickImage_SubImageSearch=s.Ni,e._MagickImage_Swirl=s.Oi,e._MagickImage_Texture=s.Pi,e._MagickImage_Threshold=s.Qi,e._MagickImage_Thumbnail=s.Ri,e._MagickImage_Tint=s.Si,e._MagickImage_Transparent=s.Ti,e._MagickImage_TransparentChroma=s.Ui,e._MagickImage_Transpose=s.Vi,e._MagickImage_Transverse=s.Wi,e._MagickImage_Trim=s.Xi,e._MagickImage_UniqueColors=s.Yi,e._MagickImage_UnsharpMask=s.Zi,e._MagickImage_Vignette=s._i,e._MagickImage_Wave=s.$i,e._MagickImage_WaveletDenoise=s.aj,e._MagickImage_WhiteBalance=s.bj,e._MagickImage_WhiteThreshold=s.cj,e._MagickImage_WriteBlob=s.dj,e._MagickImage_WriteFile=s.ej,e._MagickImage_WriteStream=s.fj,e._MagickImageCollection_Append=s.gj,e._MagickImageCollection_Coalesce=s.hj,e._MagickImageCollection_Combine=s.ij,e._MagickImageCollection_Complex=s.jj,e._MagickImageCollection_Deconstruct=s.kj,e._MagickImageCollection_Dispose=s.lj,e._MagickImageCollection_Evaluate=s.mj,e._MagickImageCollection_Fx=s.nj,e._MagickImageCollection_Merge=s.oj,e._MagickImageCollection_Montage=s.pj,e._MagickImageCollection_Morph=s.qj,e._MagickImageCollection_Optimize=s.rj,e._MagickImageCollection_OptimizePlus=s.sj,e._MagickImageCollection_OptimizeTransparency=s.tj,e._MagickImageCollection_Polynomial=s.uj,e._MagickImageCollection_Quantize=s.vj,e._MagickImageCollection_ReadBlob=s.wj,e._MagickImageCollection_ReadFile=s.xj,e._MagickImageCollection_ReadStream=s.yj,e._MagickImageCollection_Remap=s.zj,e._MagickImageCollection_Smush=s.Aj,e._MagickImageCollection_WriteFile=s.Bj,e._MagickImageCollection_WriteStream=s.Cj,e._DoubleMatrix_Create=s.Dj,e._DoubleMatrix_Dispose=s.Ej,e._OpenCL_GetDevices=s.Fj,e._OpenCL_GetDevice=s.Gj,e._OpenCL_GetEnabled=s.Hj,e._OpenCL_SetEnabled=s.Ij,e._OpenCLDevice_DeviceType_Get=s.Jj,e._OpenCLDevice_BenchmarkScore_Get=s.Kj,e._OpenCLDevice_IsEnabled_Get=s.Lj,e._OpenCLDevice_IsEnabled_Set=s.Mj,e._OpenCLDevice_Name_Get=s.Nj,e._OpenCLDevice_Version_Get=s.Oj,e._OpenCLDevice_GetKernelProfileRecords=s.Pj,e._OpenCLDevice_GetKernelProfileRecord=s.Qj,e._OpenCLDevice_SetProfileKernels=s.Rj,e._OpenCLKernelProfileRecord_Count_Get=s.Sj,e._OpenCLKernelProfileRecord_Name_Get=s.Tj,e._OpenCLKernelProfileRecord_MaximumDuration_Get=s.Uj,e._OpenCLKernelProfileRecord_MinimumDuration_Get=s.Vj,e._OpenCLKernelProfileRecord_TotalDuration_Get=s.Wj,e._JpegOptimizer_CompressFile=s.Xj,e._JpegOptimizer_CompressStream=s.Yj;var Vr=e._malloc=s.Zj,Fe=e._free=s._j;e._PixelCollection_Create=s.$j,e._PixelCollection_Dispose=s.ak,e._PixelCollection_GetArea=s.bk,e._PixelCollection_GetReadOnlyArea=s.ck,e._PixelCollection_SetArea=s.dk,e._PixelCollection_ToByteArray=s.ek,e._PixelCollection_ToShortArray=s.fk,e._Quantum_Depth_Get=s.gk,e._Quantum_Max_Get=s.hk,e._ResourceLimits_Area_Get=s.ik,e._ResourceLimits_Area_Set=s.jk,e._ResourceLimits_Disk_Get=s.kk,e._ResourceLimits_Disk_Set=s.lk,e._ResourceLimits_Height_Get=s.mk,e._ResourceLimits_Height_Set=s.nk,e._ResourceLimits_ListLength_Get=s.ok,e._ResourceLimits_ListLength_Set=s.pk,e._ResourceLimits_MaxMemoryRequest_Get=s.qk,e._ResourceLimits_MaxMemoryRequest_Set=s.rk,e._ResourceLimits_MaxProfileSize_Get=s.sk,e._ResourceLimits_MaxProfileSize_Set=s.tk,e._ResourceLimits_Memory_Get=s.uk,e._ResourceLimits_Memory_Set=s.vk,e._ResourceLimits_Thread_Get=s.wk,e._ResourceLimits_Thread_Set=s.xk,e._ResourceLimits_Throttle_Get=s.yk,e._ResourceLimits_Throttle_Set=s.zk,e._ResourceLimits_Time_Get=s.Ak,e._ResourceLimits_Time_Set=s.Bk,e._ResourceLimits_Width_Get=s.Ck,e._ResourceLimits_Width_Set=s.Dk,e._ResourceLimits_LimitMemory=s.Ek,e._ResourceLimits_TrimMemory=s.Fk,e._DrawingSettings_Create=s.Gk,e._DrawingSettings_Dispose=s.Hk,e._DrawingSettings_BorderColor_Get=s.Ik,e._DrawingSettings_BorderColor_Set=s.Jk,e._DrawingSettings_FillColor_Get=s.Kk,e._DrawingSettings_FillColor_Set=s.Lk,e._DrawingSettings_FillRule_Get=s.Mk,e._DrawingSettings_FillRule_Set=s.Nk,e._DrawingSettings_Font_Get=s.Ok,e._DrawingSettings_Font_Set=s.Pk,e._DrawingSettings_FontFamily_Get=s.Qk,e._DrawingSettings_FontFamily_Set=s.Rk,e._DrawingSettings_FontPointsize_Get=s.Sk,e._DrawingSettings_FontPointsize_Set=s.Tk,e._DrawingSettings_FontStyle_Get=s.Uk,e._DrawingSettings_FontStyle_Set=s.Vk,e._DrawingSettings_FontWeight_Get=s.Wk,e._DrawingSettings_FontWeight_Set=s.Xk,e._DrawingSettings_StrokeAntiAlias_Get=s.Yk,e._DrawingSettings_StrokeAntiAlias_Set=s.Zk,e._DrawingSettings_StrokeColor_Get=s._k,e._DrawingSettings_StrokeColor_Set=s.$k,e._DrawingSettings_StrokeDashOffset_Get=s.al,e._DrawingSettings_StrokeDashOffset_Set=s.bl,e._DrawingSettings_StrokeLineCap_Get=s.cl,e._DrawingSettings_StrokeLineCap_Set=s.dl,e._DrawingSettings_StrokeLineJoin_Get=s.el,e._DrawingSettings_StrokeLineJoin_Set=s.fl,e._DrawingSettings_StrokeMiterLimit_Get=s.gl,e._DrawingSettings_StrokeMiterLimit_Set=s.hl,e._DrawingSettings_StrokeWidth_Get=s.il,e._DrawingSettings_StrokeWidth_Set=s.jl,e._DrawingSettings_TextAntiAlias_Get=s.kl,e._DrawingSettings_TextAntiAlias_Set=s.ll,e._DrawingSettings_TextDirection_Get=s.ml,e._DrawingSettings_TextDirection_Set=s.nl,e._DrawingSettings_TextEncoding_Get=s.ol,e._DrawingSettings_TextEncoding_Set=s.pl,e._DrawingSettings_TextGravity_Get=s.ql,e._DrawingSettings_TextGravity_Set=s.rl,e._DrawingSettings_TextInterlineSpacing_Get=s.sl,e._DrawingSettings_TextInterlineSpacing_Set=s.tl,e._DrawingSettings_TextInterwordSpacing_Get=s.ul,e._DrawingSettings_TextInterwordSpacing_Set=s.vl,e._DrawingSettings_TextKerning_Get=s.wl,e._DrawingSettings_TextKerning_Set=s.xl,e._DrawingSettings_TextUnderColor_Get=s.yl,e._DrawingSettings_TextUnderColor_Set=s.zl,e._DrawingSettings_SetAffine=s.Al,e._DrawingSettings_SetFillPattern=s.Bl,e._DrawingSettings_SetStrokeDashArray=s.Cl,e._DrawingSettings_SetStrokePattern=s.Dl,e._DrawingSettings_SetText=s.El,e._MagickSettings_Create=s.Fl,e._MagickSettings_Dispose=s.Gl,e._MagickSettings_AntiAlias_Get=s.Hl,e._MagickSettings_AntiAlias_Set=s.Il,e._MagickSettings_BackgroundColor_Get=s.Jl,e._MagickSettings_BackgroundColor_Set=s.Kl,e._MagickSettings_ColorSpace_Get=s.Ll,e._MagickSettings_ColorSpace_Set=s.Ml,e._MagickSettings_ColorType_Get=s.Nl,e._MagickSettings_ColorType_Set=s.Ol,e._MagickSettings_Compression_Get=s.Pl,e._MagickSettings_Compression_Set=s.Ql,e._MagickSettings_Debug_Get=s.Rl,e._MagickSettings_Debug_Set=s.Sl,e._MagickSettings_Density_Get=s.Tl,e._MagickSettings_Density_Set=s.Ul,e._MagickSettings_Depth_Get=s.Vl,e._MagickSettings_Depth_Set=s.Wl,e._MagickSettings_Endian_Get=s.Xl,e._MagickSettings_Endian_Set=s.Yl,e._MagickSettings_Extract_Get=s.Zl,e._MagickSettings_Extract_Set=s._l,e._MagickSettings_Format_Get=s.$l,e._MagickSettings_Format_Set=s.am,e._MagickSettings_FontPointsize_Get=s.bm,e._MagickSettings_FontPointsize_Set=s.cm,e._MagickSettings_Interlace_Get=s.dm,e._MagickSettings_Interlace_Set=s.em,e._MagickSettings_Monochrome_Get=s.fm,e._MagickSettings_Monochrome_Set=s.gm,e._MagickSettings_Verbose_Get=s.hm,e._MagickSettings_Verbose_Set=s.im,e._MagickSettings_SetColorFuzz=s.jm,e._MagickSettings_SetFileName=s.km,e._MagickSettings_SetFont=s.lm,e._MagickSettings_SetNumberScenes=s.mm,e._MagickSettings_SetOption=s.nm,e._MagickSettings_SetPage=s.om,e._MagickSettings_SetPing=s.pm,e._MagickSettings_SetQuality=s.qm,e._MagickSettings_SetScenes=s.rm,e._MagickSettings_SetScene=s.sm,e._MagickSettings_SetSize=s.tm,e._MontageSettings_Create=s.um,e._MontageSettings_Dispose=s.vm,e._MontageSettings_SetBackgroundColor=s.wm,e._MontageSettings_SetBorderColor=s.xm,e._MontageSettings_SetBorderWidth=s.ym,e._MontageSettings_SetFillColor=s.zm,e._MontageSettings_SetFont=s.Am,e._MontageSettings_SetFontPointsize=s.Bm,e._MontageSettings_SetFrameGeometry=s.Cm,e._MontageSettings_SetGeometry=s.Dm,e._MontageSettings_SetGravity=s.Em,e._MontageSettings_SetShadow=s.Fm,e._MontageSettings_SetStrokeColor=s.Gm,e._MontageSettings_SetTextureFileName=s.Hm,e._MontageSettings_SetTileGeometry=s.Im,e._MontageSettings_SetTitle=s.Jm,e._QuantizeSettings_SetColors=s.Km,e._QuantizeSettings_SetColorSpace=s.Lm,e._QuantizeSettings_SetDitherMethod=s.Mm,e._QuantizeSettings_SetMeasureErrors=s.Nm,e._QuantizeSettings_SetTreeDepth=s.Om,e._ChannelMoments_Centroid_Get=s.Pm,e._ChannelMoments_EllipseAngle_Get=s.Qm,e._ChannelMoments_EllipseAxis_Get=s.Rm,e._ChannelMoments_EllipseEccentricity_Get=s.Sm,e._ChannelMoments_EllipseIntensity_Get=s.Tm,e._ChannelMoments_GetHuInvariants=s.Um,e._ChannelPerceptualHash_GetHuPhash=s.Vm,e._ChannelStatistics_Depth_Get=s.Wm,e._ChannelStatistics_Entropy_Get=s.Xm,e._ChannelStatistics_Kurtosis_Get=s.Ym,e._ChannelStatistics_Maximum_Get=s.Zm,e._ChannelStatistics_Mean_Get=s._m,e._ChannelStatistics_Minimum_Get=s.$m,e._ChannelStatistics_Skewness_Get=s.an,e._ChannelStatistics_StandardDeviation_Get=s.bn,e._Moments_DisposeList=s.cn,e._Moments_GetInstance=s.dn,e._PerceptualHash_DisposeList=s.en,e._PerceptualHash_GetInstance=s.fn,e._Statistics_DisposeList=s.gn,e._Statistics_GetInstance=s.hn,e._ConnectedComponent_DisposeList=s.jn,e._ConnectedComponent_GetArea=s.kn,e._ConnectedComponent_GetCentroid=s.ln,e._ConnectedComponent_GetColor=s.mn,e._ConnectedComponent_GetHeight=s.nn,e._ConnectedComponent_GetId=s.on,e._ConnectedComponent_GetWidth=s.pn,e._ConnectedComponent_GetX=s.qn,e._ConnectedComponent_GetY=s.rn,e._ConnectedComponent_GetInstance=s.sn,e._MagickGeometry_Create=s.tn,e._MagickGeometry_Dispose=s.un,e._MagickGeometry_X_Get=s.vn,e._MagickGeometry_Y_Get=s.wn,e._MagickGeometry_Width_Get=s.xn,e._MagickGeometry_Height_Get=s.yn,e._MagickGeometry_Initialize=s.zn,e._MagickRectangle_Dispose=s.An,e._MagickRectangle_X_Get=s.Bn,e._MagickRectangle_X_Set=s.Cn,e._MagickRectangle_Y_Get=s.Dn,e._MagickRectangle_Y_Set=s.En,e._MagickRectangle_Width_Get=s.Fn,e._MagickRectangle_Width_Set=s.Gn,e._MagickRectangle_Height_Get=s.Hn,e._MagickRectangle_Height_Set=s.In,e._MagickRectangle_FromPageSize=s.Jn,e._OffsetInfo_Create=s.Kn,e._OffsetInfo_Dispose=s.Ln,e._OffsetInfo_SetX=s.Mn,e._OffsetInfo_SetY=s.Nn,e._PointInfo_X_Get=s.On,e._PointInfo_Y_Get=s.Pn,e._PointInfoCollection_Create=s.Qn,e._PointInfoCollection_Dispose=s.Rn,e._PointInfoCollection_GetX=s.Sn,e._PointInfoCollection_GetY=s.Tn,e._PointInfoCollection_Set=s.Un,e._PrimaryInfo_Dispose=s.Vn,e._PrimaryInfo_X_Get=s.Wn,e._PrimaryInfo_X_Set=s.Xn,e._PrimaryInfo_Y_Get=s.Yn,e._PrimaryInfo_Y_Set=s.Zn,e._PrimaryInfo_Z_Get=s._n,e._PrimaryInfo_Z_Set=s.$n,e._StringInfo_Length_Get=s.ao,e._StringInfo_Datum_Get=s.bo,e._TypeMetric_Dispose=s.co,e._TypeMetric_Ascent_Get=s.eo,e._TypeMetric_Descent_Get=s.fo,e._TypeMetric_MaxHorizontalAdvance_Get=s.go,e._TypeMetric_TextHeight_Get=s.ho,e._TypeMetric_TextWidth_Get=s.io,e._TypeMetric_UnderlinePosition_Get=s.jo,e._TypeMetric_UnderlineThickness_Get=s.ko;var Gs=s.lo,B=s.mo,Rs=s.no,Fs=s.oo,Ls=s.po,Ws=s.qo,Bs=s.ro,Os=s.so,zs=s.to;function Ns(t,i,n,o){var l=z();try{W(t)(i,n,o)}catch(u){if(O(l),u!==u+0)throw u;B(1,0)}}function $s(t,i,n,o){var l=z();try{return W(t)(i,n,o)}catch(u){if(O(l),u!==u+0)throw u;B(1,0)}}function Us(t,i,n){var o=z();try{return W(t)(i,n)}catch(l){if(O(o),l!==l+0)throw l;B(1,0)}}function Hs(t,i){var n=z();try{return W(t)(i)}catch(o){if(O(n),o!==o+0)throw o;B(1,0)}}function Ys(t,i){var n=z();try{W(t)(i)}catch(o){if(O(n),o!==o+0)throw o;B(1,0)}}function Xs(t,i,n){var o=z();try{W(t)(i,n)}catch(l){if(O(o),l!==l+0)throw l;B(1,0)}}function js(t,i,n,o,l){var u=z();try{W(t)(i,n,o,l)}catch(d){if(O(u),d!==d+0)throw d;B(1,0)}}function Vs(t,i,n,o,l){var u=z();try{return W(t)(i,n,o,l)}catch(d){if(O(u),d!==d+0)throw d;B(1,0)}}function qs(t,i,n,o){var l=z();try{return W(t)(i,n,o)}catch(u){if(O(l),u!==u+0)throw u;return B(1,0),0n}}function Ks(t,i){var n=z();try{return W(t)(i)}catch(o){if(O(n),o!==o+0)throw o;return B(1,0),0n}}function Qs(t,i,n,o,l,u,d,m,w){var y=z();try{return W(t)(i,n,o,l,u,d,m,w)}catch(S){if(O(y),S!==S+0)throw S;B(1,0)}}function Js(t,i,n,o,l,u,d){var m=z();try{return W(t)(i,n,o,l,u,d)}catch(w){if(O(m),w!==w+0)throw w;B(1,0)}}function Zs(t,i,n,o,l){var u=z();try{return W(t)(i,n,o,l)}catch(d){if(O(u),d!==d+0)throw d;B(1,0)}}function eo(t){var i=z();try{return W(t)()}catch(n){if(O(i),n!==n+0)throw n;B(1,0)}}function to(t,i,n){var o=z();try{return W(t)(i,n)}catch(l){if(O(o),l!==l+0)throw l;B(1,0)}}function ro(t,i,n){var o=z();try{W(t)(i,n)}catch(l){if(O(o),l!==l+0)throw l;B(1,0)}}function io(t,i,n,o,l,u){var d=z();try{return W(t)(i,n,o,l,u)}catch(m){if(O(d),m!==m+0)throw m;B(1,0)}}function ao(t,i,n){var o=z();try{return W(t)(i,n)}catch(l){if(O(o),l!==l+0)throw l;B(1,0)}}function no(t){var i=z();try{W(t)()}catch(n){if(O(i),n!==n+0)throw n;B(1,0)}}function so(t,i,n,o,l,u){var d=z();try{W(t)(i,n,o,l,u)}catch(m){if(O(d),m!==m+0)throw m;B(1,0)}}function oo(t,i,n,o,l,u,d,m){var w=z();try{return W(t)(i,n,o,l,u,d,m)}catch(y){if(O(w),y!==y+0)throw y;B(1,0)}}function _o(t,i,n,o,l,u,d,m,w,y){var S=z();try{return W(t)(i,n,o,l,u,d,m,w,y)}catch(v){if(O(S),v!==v+0)throw v;B(1,0)}}function co(t,i,n,o){var l=z();try{W(t)(i,n,o)}catch(u){if(O(l),u!==u+0)throw u;B(1,0)}}function lo(t,i,n,o,l,u,d,m,w,y,S){var v=z();try{W(t)(i,n,o,l,u,d,m,w,y,S)}catch(I){if(O(v),I!==I+0)throw I;B(1,0)}}function go(t,i,n,o,l,u,d,m,w,y,S){var v=z();try{return W(t)(i,n,o,l,u,d,m,w,y,S)}catch(I){if(O(v),I!==I+0)throw I;B(1,0)}}function ho(t,i,n,o,l,u,d,m,w,y){var S=z();try{W(t)(i,n,o,l,u,d,m,w,y)}catch(v){if(O(S),v!==v+0)throw v;B(1,0)}}function uo(t,i,n,o,l,u,d){var m=z();try{W(t)(i,n,o,l,u,d)}catch(w){if(O(m),w!==w+0)throw w;B(1,0)}}function po(t,i,n,o,l,u,d,m){var w=z();try{W(t)(i,n,o,l,u,d,m)}catch(y){if(O(w),y!==y+0)throw y;B(1,0)}}function mo(t,i,n,o,l,u,d,m,w,y,S,v){var I=z();try{return W(t)(i,n,o,l,u,d,m,w,y,S,v)}catch(D){if(O(I),D!==D+0)throw D;B(1,0)}}function fo(t,i,n,o,l,u){var d=z();try{return W(t)(i,n,o,l,u)}catch(m){if(O(d),m!==m+0)throw m;B(1,0)}}function wo(t,i){var n=z();try{return W(t)(i)}catch(o){if(O(n),o!==o+0)throw o;B(1,0)}}function ko(t,i,n,o,l,u,d,m,w){var y=z();try{W(t)(i,n,o,l,u,d,m,w)}catch(S){if(O(y),S!==S+0)throw S;B(1,0)}}function Mo(t,i,n,o,l,u,d,m,w,y,S,v){var I=z();try{W(t)(i,n,o,l,u,d,m,w,y,S,v)}catch(D){if(O(I),D!==D+0)throw D;B(1,0)}}function yo(t){t=Object.assign({},t);var i=n=>o=>n(o)>>>0;return t.ib=i(t.ib),t.Zj=i(t.Zj),t.lo=(n=>(o,l)=>n(o,l)>>>0)(t.lo),t._emscripten_stack_alloc=i(t._emscripten_stack_alloc),t.po=(n=>()=>n()>>>0)(t.po),t.to=i(t.to),t}function Kt(){if(Te>0){et=Kt;return}if(xi(),Te>0){et=Kt;return}function t(){e.calledRun=!0,!bt&&(Gi(),g(e),e.onRuntimeInitialized?.(),Ri())}e.setStatus?(e.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>e.setStatus(""),1),t()},1)):t()}function vo(){if(e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.shift()()}return vo(),Kt(),a=f,a})})(),o_=class{constructor(_){if(_ instanceof URL){if(_.protocol!=="http:"&&_.protocol!=="https:")throw new N("Only http/https protocol is supported");this.locateFile=()=>_.href}else _ instanceof WebAssembly.Module?this.instantiateWasm=(r,a)=>{a(new WebAssembly.Instance(_,r))}:this.wasmBinary=_}wasmBinary;instantiateWasm;locateFile},c=class{loader;api;constructor(){this.loader=(_,r)=>new Promise((a,e)=>{if(this.api!==void 0){a();return}s_(new o_(_)).then(g=>{try{this.writeConfigurationFiles(g,r),rr(g,"MAGICK_CONFIGURE_PATH",p=>{rr(g,"/xml",f=>{g._Environment_SetEnv(p,f),g._Environment_Initialize(),this.api=g,a()})})}catch(p){e(p)}})})}async _initialize(_,r){await this.loader(_,r)}static get _api(){if(!It.api)throw new N("`await initializeImageMagick` should be called to initialize the library");return It.api}static set _api(_){It.api=_}static read(_,r,a,e){return Ne._create(g=>{let p=e;if(typeof _!="string"&&!si(_))typeof r=="number"&&typeof a=="number"&&g.read(_,r,a);else if(typeof r!="number"&&typeof a!="number"){p=a;let f;r instanceof ve?f=r:typeof r=="string"?(f=new ve,f.format=r):p=r,g.read(_,f)}return p(g)})}static readCollection(_,r,a){return or.use(e=>{let g=a,p;return r instanceof ve?p=r:typeof r=="string"?(p=new ve,p.format=r):g=r,e.read(_,p),g(e)})}static readFromCanvas(_,r,a){return Ne._create(e=>(e.readFromCanvas(_,a),r(e)))}writeConfigurationFiles(_,r){_.FS.analyzePath("/xml").exists||_.FS.mkdir("/xml");for(let a of r.all()){let e=_.FS.open(`/xml/${a.fileName}`,"w"),g=new TextEncoder().encode(a.data);_.FS.write(e,g,0,g.length),_.FS.close(e)}}},It=new c;async function O_(_,r){await It._initialize(_,r??So.default)}var __=class{constructor(_,r,a){this.origin=_,this.progress=new re((r+1)/(a*100))}origin;progress;cancel=!1},cr=class ge{static _logDelegate=0;static _onLog;static _progressDelegate=0;static _images={};static setLogDelegate(r){ge._logDelegate===0&&r!==void 0&&(ge._logDelegate=c._api.addFunction(ge.logDelegate,"vii")),c._api._Magick_SetLogDelegate(r===void 0?0:ge._logDelegate),ge._onLog=r}static setProgressDelegate(r){ge._progressDelegate===0&&(this._progressDelegate=c._api.addFunction(ge.progressDelegate,"iijji")),this._images[r._instance]=r,c._api._MagickImage_SetClientData(r._instance,r._instance),c._api._MagickImage_SetProgressDelegate(r._instance,ge._progressDelegate)}static removeProgressDelegate(r){c._api._MagickImage_SetClientData(r._instance,0),c._api._MagickImage_SetProgressDelegate(r._instance,0),delete ge._images[r._instance]}static logDelegate(r,a){if(ge._onLog===void 0)return;let e=se(a,"");ge._onLog(new xo(r,e))}static progressDelegate(r,a,e,g){let p=ge._images[g];if(p===void 0||p.onProgress===void 0)return 1;let f=Number(a),k=Number(e),C=new __(se(r),f,k);return p.onProgress(C),C.cancel?0:1}},c_=class Ie{static _allFormats;constructor(r,a,e,g,p,f,k){this.format=r,this.description=a,this.mimeType=e,this.moduleFormat=g,this.supportsMultipleFrames=p,this.supportsReading=f,this.supportsWriting=k}description;format;mimeType;moduleFormat;supportsMultipleFrames;supportsReading;supportsWriting;static get all(){return Ie._allFormats===void 0&&(Ie._allFormats=Ie.loadFormats()),Ie._allFormats}static loadFormats(){return T.usePointer(r=>ze.use(a=>{let e=c._api._MagickFormatInfo_CreateList(a.ptr,r),g=a.value;try{let p=Array(g),f=Object.values(De);for(let k=0;k<g;k++){let C=c._api._MagickFormatInfo_GetInfo(e,k,r),A=se(c._api._MagickFormatInfo_Format_Get(C)),U=Ie.convertFormat(A,f),X=se(c._api._MagickFormatInfo_Description_Get(C),""),be=se(c._api._MagickFormatInfo_MimeType_Get(C)),Ee=se(c._api._MagickFormatInfo_Module_Get(C));p[k]=new Ie(U,X,be,Ie.convertFormat(Ee,f),c._api._MagickFormatInfo_SupportsMultipleFrames_Get(C)==1,c._api._MagickFormatInfo_SupportsReading_Get(C)==1,c._api._MagickFormatInfo_SupportsWriting_Get(C)==1)}return p}finally{c._api._MagickFormatInfo_DisposeList(e,g)}}))}static convertFormat(r,a){return r===null?De.Unknown:a.includes(r)?r:De.Unknown}},q={None:0,Accelerate:1,Annotate:2,Blob:4,Cache:8,Coder:16,Configure:32,Deprecate:64,Draw:128,Exception:256,Image:512,Locale:1024,Module:2048,Pixel:4096,Policy:8192,Resource:16384,Trace:32768,Transform:65536,User:131072,Wand:262144,Detailed:2147450879,get All(){return this.Detailed|this.Trace}},Dt=class nt{static get delegates(){return se(c._api._Magick_Delegates_Get(),"Unknown")}static get features(){return se(c._api._Magick_Features_Get()," ").slice(0,-1)}static get imageMagickVersion(){return se(c._api._Magick_ImageMagickVersion_Get(),"Unknown")}static get supportedFormats(){return c_.all}static onLog;static addFont(r,a){let e=c._api.FS;e.analyzePath("/fonts").exists||e.mkdir("/fonts");let g=e.open(`/fonts/${r}`,"w");e.write(g,a,0,a.length),e.close(g)}static resetRandomSeed=()=>c._api._Magick_ResetRandomSeed();static setRandomSeed=r=>c._api._Magick_SetRandomSeed(r);static setLogEvents(r){let a=r==q.None?void 0:nt.logDelegate;cr.setLogDelegate(a),E(nt.getEventTypeString(r),e=>c._api._Magick_SetLogEvents(e))}static _getFontFileName(r){let a=`/fonts/${r}`;if(!c._api.FS.analyzePath(a).exists)throw`Unable to find a font with the name '${r}', register it with the addFont method of the Magick class.`;return a}static getEventTypeString(r){if(r==q.All)return"All,Trace";if(r==q.Detailed)return"All";switch(r){case q.Accelerate:return"Accelerate";case q.Annotate:return"Annotate";case q.Blob:return"Blob";case q.Cache:return"Cache";case q.Coder:return"Coder";case q.Configure:return"Configure";case q.Deprecate:return"Deprecate";case q.Draw:return"Draw";case q.Exception:return"Exception";case q.Image:return"Image";case q.Locale:return"Locale";case q.Module:return"Module";case q.Pixel:return"Pixel";case q.Policy:return"Policy";case q.Resource:return"Resource";case q.Trace:return"Trace";case q.Transform:return"Transform";case q.User:return"User";case q.Wand:return"Wand";case q.None:default:return"None"}}static logDelegate(r){nt.onLog!==void 0&&nt.onLog(r)}},l_=class{_font;constructor(_){this._font=_}get font(){return this._font}draw(_){let r=Dt._getFontFileName(this._font);_.font(r)}},g_=class{_gravity;constructor(_){this._gravity=_}get gravity(){return this._gravity}draw(_){_.gravity(this._gravity)}},h_=class{_startX;_startY;_endX;_endY;constructor(_,r,a,e){this._startX=_,this._startY=r,this._endX=a,this._endY=e}get startX(){return this._startX}get startY(){return this._startY}get endX(){return this._endX}get endY(){return this._endY}draw(_){_.line(this._startX,this._startY,this._endX,this._endY)}},u_=class{_paths=[];constructor(_){this._paths=_}draw(_){_.pathStart();for(let r of this._paths)r.draw(_);_.pathFinish()}},p_=class{_x;_y;constructor(_,r){this._x=_,this._y=r}get x(){return this._x}get y(){return this._y}draw(_){_.point(this._x,this._y)}},d_=class{_upperLeftX;_upperLeftY;_lowerRightX;_lowerRightY;constructor(_,r,a,e){this._upperLeftX=_,this._upperLeftY=r,this._lowerRightX=a,this._lowerRightY=e}get upperLeftX(){return this._upperLeftX}get upperLeftY(){return this._upperLeftY}get lowerRightX(){return this._lowerRightX}get lowerRightY(){return this._lowerRightY}draw(_){_.rectangle(this._upperLeftX,this._upperLeftY,this._lowerRightX,this._lowerRightY)}},m_=class{_upperLeftX;_upperLeftY;_lowerRightX;_lowerRightY;_cornerWidth;_cornerHeight;constructor(_,r,a,e,g,p){this._upperLeftX=_,this._upperLeftY=r,this._lowerRightX=a,this._lowerRightY=e,this._cornerWidth=g,this._cornerHeight=p}get upperLeftX(){return this._upperLeftX}get upperLeftY(){return this._upperLeftY}get lowerRightX(){return this._lowerRightX}get lowerRightY(){return this._lowerRightY}get cornerWidth(){return this._cornerWidth}get cornerHeight(){return this._cornerHeight}draw(_){_.roundRectangle(this._upperLeftX,this._upperLeftY,this._lowerRightX,this._lowerRightY,this._cornerWidth,this._cornerHeight)}},f_=class{_color;constructor(_){this._color=_}get color(){return this._color}draw(_){_.strokeColor(this._color)}},w_=class{_dash=[];constructor(_){this._dash=[..._]}get dash(){return this._dash}draw(_){_.strokeDashArray(this._dash)}},k_=class{_offset;constructor(_){this._offset=_}get offset(){return this._offset}draw(_){_.strokeDashOffset(this._offset)}},M_=class{_width;constructor(_){this._width=_}get width(){return this._width}draw(_){_.strokeWidth(this._width)}},y_=class{_alignment;constructor(_){this._alignment=_}get alignment(){return this._alignment}draw(_){_.textAlignment(this._alignment)}},ni=class lr{_isEnabled;constructor(r){this._isEnabled=r}static get disabled(){return new lr(!1)}static get enabled(){return new lr(!0)}get isEnabled(){return this._isEnabled}draw(r){r.textAntialias(this._isEnabled)}},v_=class{_decoration;constructor(_){this._decoration=_}get decoration(){return this._decoration}draw(_){_.textDecoration(this._decoration)}},S_=class{_spacing;constructor(_){this._spacing=_}get spacing(){return this._spacing}draw(_){_.textInterlineSpacing(this._spacing)}},C_=class{_spacing;constructor(_){this._spacing=_}get spacing(){return this._spacing}draw(_){_.textInterwordspacing(this._spacing)}},I_=class{_kerning;constructor(_){this._kerning=_}get kerning(){return this._kerning}draw(_){_.textKerning(this._kerning)}},P_=class{_color;constructor(_){this._color=_}get color(){return this._color}draw(_){_.textUnderColor(this._color)}},D_=class{_x;_y;_value;constructor(_,r,a){this._x=_,this._y=r,this._value=a}get x(){return this._x}get y(){return this._y}get value(){return this._value}draw(_){_.text(this._x,this._y,this._value)}},b_=class{static get None(){return new M(0,0,0,0)}static get Transparent(){return new M(0,0,0,0)}static get AliceBlue(){return new M(240,248,255,255)}static get AntiqueWhite(){return new M(250,235,215,255)}static get Aqua(){return new M(0,255,255,255)}static get Aquamarine(){return new M(127,255,212,255)}static get Azure(){return new M(240,255,255,255)}static get Beige(){return new M(245,245,220,255)}static get Bisque(){return new M(255,228,196,255)}static get Black(){return new M(0,0,0,255)}static get BlanchedAlmond(){return new M(255,235,205,255)}static get Blue(){return new M(0,0,255,255)}static get BlueViolet(){return new M(138,43,226,255)}static get Brown(){return new M(165,42,42,255)}static get BurlyWood(){return new M(222,184,135,255)}static get CadetBlue(){return new M(95,158,160,255)}static get Chartreuse(){return new M(127,255,0,255)}static get Chocolate(){return new M(210,105,30,255)}static get Coral(){return new M(255,127,80,255)}static get CornflowerBlue(){return new M(100,149,237,255)}static get Cornsilk(){return new M(255,248,220,255)}static get Crimson(){return new M(220,20,60,255)}static get Cyan(){return new M(0,255,255,255)}static get DarkBlue(){return new M(0,0,139,255)}static get DarkCyan(){return new M(0,139,139,255)}static get DarkGoldenrod(){return new M(184,134,11,255)}static get DarkGray(){return new M(169,169,169,255)}static get DarkGreen(){return new M(0,100,0,255)}static get DarkKhaki(){return new M(189,183,107,255)}static get DarkMagenta(){return new M(139,0,139,255)}static get DarkOliveGreen(){return new M(85,107,47,255)}static get DarkOrange(){return new M(255,140,0,255)}static get DarkOrchid(){return new M(153,50,204,255)}static get DarkRed(){return new M(139,0,0,255)}static get DarkSalmon(){return new M(233,150,122,255)}static get DarkSeaGreen(){return new M(143,188,143,255)}static get DarkSlateBlue(){return new M(72,61,139,255)}static get DarkSlateGray(){return new M(47,79,79,255)}static get DarkTurquoise(){return new M(0,206,209,255)}static get DarkViolet(){return new M(148,0,211,255)}static get DeepPink(){return new M(255,20,147,255)}static get DeepSkyBlue(){return new M(0,191,255,255)}static get DimGray(){return new M(105,105,105,255)}static get DodgerBlue(){return new M(30,144,255,255)}static get Firebrick(){return new M(178,34,34,255)}static get FloralWhite(){return new M(255,250,240,255)}static get ForestGreen(){return new M(34,139,34,255)}static get Fuchsia(){return new M(255,0,255,255)}static get Gainsboro(){return new M(220,220,220,255)}static get GhostWhite(){return new M(248,248,255,255)}static get Gold(){return new M(255,215,0,255)}static get Goldenrod(){return new M(218,165,32,255)}static get Gray(){return new M(128,128,128,255)}static get Green(){return new M(0,128,0,255)}static get GreenYellow(){return new M(173,255,47,255)}static get Honeydew(){return new M(240,255,240,255)}static get HotPink(){return new M(255,105,180,255)}static get IndianRed(){return new M(205,92,92,255)}static get Indigo(){return new M(75,0,130,255)}static get Ivory(){return new M(255,255,240,255)}static get Khaki(){return new M(240,230,140,255)}static get Lavender(){return new M(230,230,250,255)}static get LavenderBlush(){return new M(255,240,245,255)}static get LawnGreen(){return new M(124,252,0,255)}static get LemonChiffon(){return new M(255,250,205,255)}static get LightBlue(){return new M(173,216,230,255)}static get LightCoral(){return new M(240,128,128,255)}static get LightCyan(){return new M(224,255,255,255)}static get LightGoldenrodYellow(){return new M(250,250,210,255)}static get LightGreen(){return new M(144,238,144,255)}static get LightGray(){return new M(211,211,211,255)}static get LightPink(){return new M(255,182,193,255)}static get LightSalmon(){return new M(255,160,122,255)}static get LightSeaGreen(){return new M(32,178,170,255)}static get LightSkyBlue(){return new M(135,206,250,255)}static get LightSlateGray(){return new M(119,136,153,255)}static get LightSteelBlue(){return new M(176,196,222,255)}static get LightYellow(){return new M(255,255,224,255)}static get Lime(){return new M(0,255,0,255)}static get LimeGreen(){return new M(50,205,50,255)}static get Linen(){return new M(250,240,230,255)}static get Magenta(){return new M(255,0,255,255)}static get Maroon(){return new M(128,0,0,255)}static get MediumAquamarine(){return new M(102,205,170,255)}static get MediumBlue(){return new M(0,0,205,255)}static get MediumOrchid(){return new M(186,85,211,255)}static get MediumPurple(){return new M(147,112,219,255)}static get MediumSeaGreen(){return new M(60,179,113,255)}static get MediumSlateBlue(){return new M(123,104,238,255)}static get MediumSpringGreen(){return new M(0,250,154,255)}static get MediumTurquoise(){return new M(72,209,204,255)}static get MediumVioletRed(){return new M(199,21,133,255)}static get MidnightBlue(){return new M(25,25,112,255)}static get MintCream(){return new M(245,255,250,255)}static get MistyRose(){return new M(255,228,225,255)}static get Moccasin(){return new M(255,228,181,255)}static get NavajoWhite(){return new M(255,222,173,255)}static get Navy(){return new M(0,0,128,255)}static get OldLace(){return new M(253,245,230,255)}static get Olive(){return new M(128,128,0,255)}static get OliveDrab(){return new M(107,142,35,255)}static get Orange(){return new M(255,165,0,255)}static get OrangeRed(){return new M(255,69,0,255)}static get Orchid(){return new M(218,112,214,255)}static get PaleGoldenrod(){return new M(238,232,170,255)}static get PaleGreen(){return new M(152,251,152,255)}static get PaleTurquoise(){return new M(175,238,238,255)}static get PaleVioletRed(){return new M(219,112,147,255)}static get PapayaWhip(){return new M(255,239,213,255)}static get PeachPuff(){return new M(255,218,185,255)}static get Peru(){return new M(205,133,63,255)}static get Pink(){return new M(255,192,203,255)}static get Plum(){return new M(221,160,221,255)}static get PowderBlue(){return new M(176,224,230,255)}static get Purple(){return new M(128,0,128,255)}static get RebeccaPurple(){return new M(102,51,153,255)}static get Red(){return new M(255,0,0,255)}static get RosyBrown(){return new M(188,143,143,255)}static get RoyalBlue(){return new M(65,105,225,255)}static get SaddleBrown(){return new M(139,69,19,255)}static get Salmon(){return new M(250,128,114,255)}static get SandyBrown(){return new M(244,164,96,255)}static get SeaGreen(){return new M(46,139,87,255)}static get SeaShell(){return new M(255,245,238,255)}static get Sienna(){return new M(160,82,45,255)}static get Silver(){return new M(192,192,192,255)}static get SkyBlue(){return new M(135,206,235,255)}static get SlateBlue(){return new M(106,90,205,255)}static get SlateGray(){return new M(112,128,144,255)}static get Snow(){return new M(255,250,250,255)}static get SpringGreen(){return new M(0,255,127,255)}static get SteelBlue(){return new M(70,130,180,255)}static get Tan(){return new M(210,180,140,255)}static get Teal(){return new M(0,128,128,255)}static get Thistle(){return new M(216,191,216,255)}static get Tomato(){return new M(255,99,71,255)}static get Turquoise(){return new M(64,224,208,255)}static get Violet(){return new M(238,130,238,255)}static get Wheat(){return new M(245,222,179,255)}static get White(){return new M(255,255,255,255)}static get WhiteSmoke(){return new M(245,245,245,255)}static get Yellow(){return new M(255,255,0,255)}static get YellowGreen(){return new M(154,205,50,255)}},E_=class{_x;_y;constructor(_,r){this._x=_,this._y=r}get x(){return this._x}get y(){return this._y}draw(_){_.pathLineToAbs(this._x,this._y)}},T_=class{_x;_y;constructor(_,r){this._x=_,this._y=r}get x(){return this._x}get y(){return this._y}draw(_){_.pathLineToRel(this._x,this._y)}},A_=class{_x;_y;constructor(_,r){this._x=_,this._y=r}get x(){return this._x}get y(){return this._y}draw(_){_.pathMoveToAbs(this._x,this._y)}},x_=class{_x;_y;constructor(_,r){this._x=_,this._y=r}get x(){return this._x}get y(){return this._y}draw(_){_.pathMoveToRel(this._x,this._y)}},G_=class{_drawables;_paths=[];constructor(_){this._drawables=_}drawables(){return this._drawables===void 0?new R_().path(this._paths):this._drawables.path(this._paths)}lineToAbs(_,r){return this._paths.push(new E_(_,r)),this}lineToRel(_,r){return this._paths.push(new T_(_,r)),this}moveToAbs(_,r){return this._paths.push(new A_(_,r)),this}moveToRel(_,r){return this._paths.push(new x_(_,r)),this}},R_=class{_drawables=[];affine(_=1,r=1,a=0,e=0,g=0,p=0){return this._drawables.push(new Io(_,r,a,e,g,p)),this}color(_,r,a){return this._drawables.push(new Do(_,r,a)),this}borderColor(_){return this._drawables.push(new Po(_)),this}disableTextAntiAlias(){return this._drawables.push(ni.disabled),this}draw(_){return _.draw(this._drawables),this}enableTextAntiAlias(){return this._drawables.push(ni.enabled),this}fillColor(_){return this._drawables.push(new bo(_)),this}fillOpacity(_){return this._drawables.push(new Eo(_)),this}fillRule(_){return this._drawables.push(new To(_)),this}font(_){return this._drawables.push(new l_(_)),this}fontPointSize(_){return this._drawables.push(new Ao(_)),this}fontTypeMetrics(_,r=!1){return Ne._create(a=>(a.read(b_.Transparent,1,1),ki._use(a,e=>(e.draw(this._drawables),e.fontTypeMetrics(_,r)))))}gravity(_){return this._drawables.push(new g_(_)),this}line(_,r,a,e){return this._drawables.push(new h_(_,r,a,e)),this}path(_){return this._drawables.push(new u_(_)),this}paths(){return new G_(this)}point(_,r){return this._drawables.push(new p_(_,r)),this}rectangle(_,r,a,e){return this._drawables.push(new d_(_,r,a,e)),this}roundRectangle(_,r,a,e,g,p){return this._drawables.push(new m_(_,r,a,e,g,p)),this}strokeColor(_){return this._drawables.push(new f_(_)),this}strokeDashArray(_){return this._drawables.push(new w_(_)),this}strokeDashOffset(_){return this._drawables.push(new k_(_)),this}strokeWidth(_){return this._drawables.push(new M_(_)),this}text(_,r,a){return this._drawables.push(new D_(_,r,a)),this}textAlignment(_){return this._drawables.push(new y_(_)),this}textDecoration(_){return this._drawables.push(new v_(_)),this}textInterlineSpacing(_){return this._drawables.push(new S_(_)),this}textInterwordSpacing(_){return this._drawables.push(new C_(_)),this}textKerning(_){return this._drawables.push(new I_(_)),this}textUnderColor(_){return this._drawables.push(new P_(_)),this}},z_={Undefined:0,Kapur:1,OTSU:2,Triangle:3},N_={Undefined:0,Direct:1,Pseudo:2},$_={Undefined:0,Bilevel:1,Grayscale:2,GrayscaleAlpha:3,Palette:4,PaletteAlpha:5,TrueColor:6,TrueColorAlpha:7,ColorSeparation:8,ColorSeparationAlpha:9,Optimize:10,PaletteBilevelAlpha:11},U_={Undefined:0,Add:1,Conjugate:2,Divide:3,MagnitudePhase:4,Multiply:5,RealImaginary:6,Subtract:7},F_={Undefined:0,B44A:1,B44:2,BZip:3,DXT1:4,DXT3:5,DXT5:6,Fax:7,Group4:8,JBIG1:9,JBIG2:10,JPEG2000:11,JPEG:12,LosslessJPEG:13,LZMA:14,LZW:15,NoCompression:16,Piz:17,Pxr24:18,RLE:19,Zip:20,ZipS:21,Zstd:22,WebP:23,DWAA:24,DWAB:25,BC7:26,BC5:27},H_={Undefined:0,Affine:1,AffineProjection:2,ScaleRotateTranslate:3,Perspective:4,PerspectiveProjection:5,BilinearForward:6,BilinearReverse:7,Polynomial:8,Arc:9,Polar:10,DePolar:11,Cylinder2Plane:12,Plane2Cylinder:13,Barrel:14,BarrelInverse:15,Shepards:16,Resize:17,Sentinel:18,RigidAffine:19},Y_={Undefined:0,LSB:1,MSB:2},X_={Undefined:0,Absolute:1,Fuzz:2,MeanAbsolute:3,MeanErrorPerPixel:4,MeanSquared:5,NormalizedCrossCorrelation:6,PeakAbsolute:7,PeakSignalToNoiseRatio:8,PerceptualHash:9,RootMeanSquared:10,StructuralSimilarity:11,StructuralDissimilarity:12},j_={Undefined:0,Abs:1,Add:2,AddModulus:3,And:4,Cosine:5,Divide:6,Exponential:7,GaussianNoise:8,ImpulseNoise:9,LaplacianNoise:10,LeftShift:11,Log:12,Max:13,Mean:14,Median:15,Min:16,MultiplicativeNoise:17,Multiply:18,Or:19,PoissonNoise:20,Pow:21,RightShift:22,RootMeanSquare:23,Set:24,Sine:25,Subtract:26,Sum:27,ThresholdBlack:28,Threshold:29,ThresholdWhite:30,UniformNoise:31,Xor:32,InverseLog:33},V_={Undefined:0,Point:1,Box:2,Triangle:3,Hermite:4,Hann:5,Hamming:6,Blackman:7,Gaussian:8,Quadratic:9,Cubic:10,Catrom:11,Mitchell:12,Jinc:13,Sinc:14,SincFast:15,Kaiser:16,Welch:17,Parzen:18,Bohman:19,Bartlett:20,Lagrange:21,Lanczos:22,LanczosSharp:23,Lanczos2:24,Lanczos2Sharp:25,Robidoux:26,RobidouxSharp:27,Cosine:28,Spline:29,LanczosRadius:30,CubicSpline:31,MagicKernelSharp2013:32,MagicKernelSharp2021:33},q_={Undefined:0,None:1,Background:2,Previous:3},L_={Undefined:0,NoInterlace:1,Line:2,Plane:3,Partition:4,Gif:5,Jpeg:6,Png:7},K_={Undefined:"Undefined",Unity:"Unity",Gaussian:"Gaussian",DoG:"DoG",LoG:"LoG",Blur:"Blur",Comet:"Comet",Binomial:"Binomial",Laplacian:"Laplacian",Sobel:"Sobel",FreiChen:"FreiChen",Roberts:"Roberts",Prewitt:"Prewitt",Compass:"Compass",Kirsch:"Kirsch",Diamond:"Diamond",Square:"Square",Rectangle:"Rectangle",Octagon:"Octagon",Disk:"Disk",Plus:"Plus",Cross:"Cross",Ring:"Ring",Peaks:"Peaks",Edges:"Edges",Corners:"Corners",Diagonals:"Diagonals",LineEnds:"LineEnds",LineJunctions:"LineJunctions",Ridges:"Ridges",ConvexHull:"ConvexHull",ThinSE:"ThinSE",Skeleton:"Skeleton",Chebyshev:"Chebyshev",Manhattan:"Manhattan",Octagonal:"Octagonal",Euclidean:"Euclidean",UserDefined:"UserDefined"},Q_={Undefined:0,Convolve:1,Correlate:2,Erode:3,Dilate:4,ErodeIntensity:5,DilateIntensity:6,IterativeDistance:7,Open:8,Close:9,OpenIntensity:10,CloseIntensity:11,Smooth:12,EdgeIn:13,EdgeOut:14,Edge:15,TopHat:16,BottomHat:17,HitAndMiss:18,Thinning:19,Thicken:20,Distance:21,Voronoi:22},J_={Undefined:0,Uniform:1,Gaussian:2,MultiplicativeGaussian:3,Impulse:4,Laplacian:5,Poisson:6,Random:7},W_={Undefined:0,TopLeft:1,TopRight:2,BottomRight:3,BottomLeft:4,LeftTop:5,RightTop:6,RightBottom:7,LeftBottom:8},Z_={Undefined:0,Point:1,Replace:2,Floodfill:3,FillToBorder:4,Reset:5},ec={Undefined:0,Saturation:1,Perceptual:2,Absolute:3,Relative:4},tc={Undefined:0,Left:1,Center:2,Right:3},rc={Undefined:0,None:1,Underline:2,Overline:3,LineThrough:4},ic={Undefined:0,Background:1,Dither:2,Edge:3,Mirror:4,Random:5,Tile:6,Transparent:7,Mask:8,Black:9,Gray:10,White:11,HorizontalTile:12,VerticalTile:13,HorizontalTileEdge:14,VerticalTileEdge:15,CheckerTile:16},ac=(function(_){return _[_.Disabled=-1]="Disabled",_[_.Linear=0]="Linear",_[_.Vng=1]="Vng",_[_.Ppg=2]="Ppg",_[_.Ahd=3]="Ahd",_[_.DCB=4]="DCB",_[_.Dht=11]="Dht",_[_.ModifiedAhd=12]="ModifiedAhd",_})({}),nc=(function(_){return _[_.Raw=0]="Raw",_[_.SRGB=1]="SRGB",_[_.AdobeRGB=2]="AdobeRGB",_[_.WideGamutRGB=3]="WideGamutRGB",_[_.KodakProPhotoRGB=4]="KodakProPhotoRGB",_[_.XYZ=5]="XYZ",_[_.ACES=6]="ACES",_})({}),sc=class extends Co{constructor(){super(De.Dng)}disableAutoBrightness;interpolationQuality;outputColor;useAutoWhitebalance;useCameraWhitebalance;getDefines(){let _=[];return this.hasValue(this.interpolationQuality)&&_.push(this.createDefine("interpolation-quality",this.interpolationQuality)),this.hasValue(this.disableAutoBrightness)&&_.push(this.createDefine("no-auto-bright",this.disableAutoBrightness)),this.hasValue(this.outputColor)&&_.push(this.createDefine("output-color",this.outputColor)),this.hasValue(this.useCameraWhitebalance)&&_.push(this.createDefine("use-camera-wb",this.useCameraWhitebalance)),this.hasValue(this.useAutoWhitebalance)&&_.push(this.createDefine("use-auto-wb",this.useAutoWhitebalance)),_}},oc=class Ai{_colorSpace=b.Undefined;_compression=F_.Undefined;_density=new pi(0,0);_format=De.Unknown;_height=0;_interlace=L_.Undefined;_orientation=W_.Undefined;_quality=0;_width=0;get colorSpace(){return this._colorSpace}get compression(){return this._compression}get density(){return this._density}get format(){return this._format}get height(){return this._height}get interlace(){return this._interlace}get orientation(){return this._orientation}get quality(){return this._quality}get width(){return this._width}constructor(){}read(r,a){Ne._create(e=>{e.ping(r,a),this._colorSpace=e.colorSpace,this._compression=e.compression,this._density=e.density,this._format=e.format,this._height=e.height,this._interlace=e.interlace,this._orientation=e.orientation,this._quality=e.quality,this._width=e.width})}static create(r,a){let e=new Ai;return e.read(r,a),e}},_c=class{constructor(_){this.complexOperator=_}complexOperator;signalToNoiseRatio;_setArtifacts(_){this.signalToNoiseRatio!==void 0&&_.setArtifact("complex:snr",this.signalToNoiseRatio)}},cc=class{constructor(_){this.method=_}method;bestFit=!1;scale;viewport;_setArtifacts(_){this.scale!==void 0&&_.setArtifact("distort:scale",this.scale.toString()),this.viewport!==void 0&&_.setArtifact("distort:viewport",this.viewport.toString())}},B_=class extends $e{constructor(_){let r=c._api._MontageSettings_Create(),a=c._api._MontageSettings_Dispose;super(r,a),_.backgroundColor!==void 0&&_.backgroundColor._use(e=>{c._api._MontageSettings_SetBackgroundColor(this._instance,e)}),_.borderColor!==void 0&&_.borderColor._use(e=>{c._api._MontageSettings_SetBorderColor(this._instance,e)}),_.borderWidth!==void 0&&c._api._MontageSettings_SetBorderWidth(this._instance,_.borderWidth),_.fillColor!==void 0&&_.fillColor._use(e=>{c._api._MontageSettings_SetFillColor(this._instance,e)}),_.font!==void 0&&E(Dt._getFontFileName(_.font),e=>{c._api._MontageSettings_SetFont(this._instance,e)}),_.fontPointsize!==void 0&&c._api._MontageSettings_SetFontPointsize(this._instance,_.fontPointsize),_.frameGeometry!==void 0&&E(_.frameGeometry.toString(),e=>{c._api._MontageSettings_SetFrameGeometry(this._instance,e)}),_.geometry!==void 0&&E(_.geometry.toString(),e=>{c._api._MontageSettings_SetGeometry(this._instance,e)}),_.gravity!==void 0&&c._api._MontageSettings_SetGravity(this._instance,_.gravity),_.shadow!==void 0&&c._api._MontageSettings_SetShadow(this._instance,_.shadow?1:0),_.strokeColor!==void 0&&_.strokeColor._use(e=>{c._api._MontageSettings_SetStrokeColor(this._instance,e)}),_.textureFileName!==void 0&&E(_.textureFileName,e=>{c._api._MontageSettings_SetTextureFileName(this._instance,e)}),_.tileGeometry!==void 0&&E(_.tileGeometry.toString(),e=>{c._api._MontageSettings_SetTileGeometry(this._instance,e)}),_.title!==void 0&&E(_.title,e=>{c._api._MontageSettings_SetTitle(this._instance,e)})}},lc=class{backgroundColor;borderColor;borderWidth;fillColor;font;fontPointsize;frameGeometry;geometry;gravity;label;shadow;strokeColor;textureFileName;tileGeometry;title;transparentColor;_use(_){let r=new B_(this);return fe._disposeAfterExecution(r,_)}},gc=class{constructor(_,r,a){this.method=_,this.kernel=r,a!==void 0&&(this.kernel+=`:${a}`)}channels=H.Composite;convolveBias;convolveScale;iterations=1;kernel;method},hc=class{constructor(_,r=0){this.minimum=_,this.maximum=r}minimum;maximum;toString(){return this.maximum===0?this.minimum.toString():`${this.minimum}-${this.maximum}`}};export{Go as AlphaAction,z_ as AutoThresholdMethod,yt as ChannelPerceptualHash,i_ as ChannelStatistics,H as Channels,Ro as ChromaticityInfo,N_ as ClassType,Bo as ColorProfile,b as ColorSpace,Zr as ColorSpaceNames,ei as ColorTransformMode,$_ as ColorType,Oo as CompareResult,zo as CompareSettings,U_ as ComplexOperator,_c as ComplexSettings,Zt as CompositeOperator,F_ as CompressionMethod,Qr as ConfigurationFile,So as ConfigurationFiles,$o as ConnectedComponent,Uo as ConnectedComponentsSettings,Co as DefinesCreator,pi as Density,Le as DensityUnit,H_ as DistortMethod,cc as DistortSettings,Pi as DitherMethod,ac as DngInterpolation,nc as DngOutputColor,sc as DngReadDefines,Io as DrawableAffine,Po as DrawableBorderColor,Do as DrawableColor,bo as DrawableFillColor,Eo as DrawableFillOpacity,To as DrawableFillRule,l_ as DrawableFont,Ao as DrawableFontPointSize,g_ as DrawableGravity,h_ as DrawableLine,u_ as DrawablePath,p_ as DrawablePoint,d_ as DrawableRectangle,m_ as DrawableRoundRectangle,f_ as DrawableStrokeColor,w_ as DrawableStrokeDashArray,k_ as DrawableStrokeDashOffset,M_ as DrawableStrokeWidth,D_ as DrawableText,y_ as DrawableTextAlignment,ni as DrawableTextAntiAlias,v_ as DrawableTextDecoration,S_ as DrawableTextInterlineSpacing,C_ as DrawableTextInterwordSpacing,I_ as DrawableTextKerning,P_ as DrawableTextUnderColor,R_ as Drawables,ki as DrawingWand,Y_ as Endian,X_ as ErrorMetric,j_ as EvaluateOperator,Qo as FillRule,V_ as FilterType,q_ as GifDisposeMethod,K as Gravity,c as ImageMagick,ci as ImageProfile,L_ as Interlace,K_ as Kernel,xo as LogEvent,q as LogEventTypes,Dt as Magick,M as MagickColor,b_ as MagickColors,Jt as MagickDefine,N as MagickError,vi as MagickErrorInfo,tr as MagickErrorSeverity,De as MagickFormat,c_ as MagickFormatInfo,oe as MagickGeometry,Ne as MagickImage,or as MagickImageCollection,oc as MagickImageInfo,ve as MagickReadSettings,nr as MagickSettings,lc as MontageSettings,Q_ as MorphologyMethod,gc as MorphologySettings,$e as NativeInstance,J_ as NoiseType,e_ as OffsetInfo,W_ as Orientation,Z_ as PaintMethod,E_ as PathLineToAbs,T_ as PathLineToRel,A_ as PathMoveToAbs,x_ as PathMoveToRel,G_ as Paths,re as Percentage,er as PerceptualHash,G as PixelChannel,ii as PixelCollection,t_ as PixelIntensityMethod,r_ as PixelInterpolateMethod,Qe as Point,vt as PrimaryInfo,__ as ProgressEvent,sr as QuantizeSettings,Pe as Quantum,ec as RenderingIntent,a_ as Statistics,tc as TextAlignment,rc as TextDecoration,hc as Threshold,Ho as TypeMetric,ic as VirtualPixelMethod,ai as WarningEvent,jo as _getGravityEdges,Vo as _getGravityName,si as _isByteArray,O_ as initializeImageMagick};